Isaiah Odhner
da861e4a2c
Rename pathological test case SVG
2023-05-18 14:34:25 -04:00
Isaiah Odhner
453111269e
VS Code: fix auto-imports for textual modules
2023-05-18 11:10:15 -04:00
Isaiah Odhner
b4f958623d
Hide SVG files from samples gallery command
...
oooh is it a gallery? how faaancy...
2023-05-17 23:30:20 -04:00
Isaiah Odhner
1dbbbdfdfe
Tweak logs/comments
2023-05-17 23:28:32 -04:00
Isaiah Odhner
4fc5efd34e
Use minimum rect size to define character cell size
2023-05-17 23:02:43 -04:00
Isaiah Odhner
56f8d47036
Fix string comparison for "none"/"" fill values
2023-05-17 23:00:10 -04:00
Isaiah Odhner
4a9ffbbacd
Clean up: remove old outlier removal code
2023-05-17 22:54:14 -04:00
Isaiah Odhner
d323c25ed4
Add debug markers for grid bounds (min/max)
2023-05-17 22:54:14 -04:00
Isaiah Odhner
d618cab0c9
Make debug visuals line up when grid origin is not at (0,0)
...
as is the case with the pathological SVG test case (combative_character_grid.svg)
2023-05-17 22:54:14 -04:00
Isaiah Odhner
8faaac8cf8
Note useful automation for testing SVG loading
2023-05-17 22:54:14 -04:00
Isaiah Odhner
5a72f5efc2
Don't close any existing message box when opening a new one
2023-05-17 22:54:06 -04:00
Isaiah Odhner
fd6e75abe7
Start handling varying background rect sizes
...
It turns out the background rects can span multiple cells, so I have to
pivot strategy here.
Instead of removing any outliers, remove any containers, i.e. rects that
visually (not structurally) contain other rects.
This doesn't yet fill in multiple cells when a rect is spanned.
2023-05-17 22:53:37 -04:00
Isaiah Odhner
902de786dc
Handle invalid colors more laxly
2023-05-17 20:41:13 -04:00
Isaiah Odhner
8f78ce662a
Fix cell bucketing of text elements, basically
2023-05-17 20:41:13 -04:00
Isaiah Odhner
8458ccf3c9
Visualize cell bucketing for debug
2023-05-17 20:40:46 -04:00
Isaiah Odhner
f17b180546
Adjust cell size based on document size guess
2023-05-17 20:40:11 -04:00
Isaiah Odhner
b9f5f00480
Loosen
2023-05-17 17:38:31 -04:00
Isaiah Odhner
3892dc503e
WIP: open SVG files saved with the app
...
Progress!
print
2023-05-17 12:34:09 -04:00
Isaiah Odhner
55419d671e
Fix API breakage from changes in textual 0.23.0
2023-05-17 12:16:47 -04:00
Isaiah Odhner
6a3ab712a5
Include error traceback in message boxes, shown by clicking Show Details
2023-05-17 10:47:48 -04:00
Isaiah Odhner
498b4ccd0a
Update textual to 0.24.1
...
Gonna use the new `@on` decorator, and Select widget.
2023-05-17 10:47:44 -04:00
Isaiah Odhner
601e50d5b5
Give error if you try to load HTML/SVG
...
- DRY: Make decode_based_on_file_extension use format_from_extension.
- If you try to load .html, .htm, .svg, (or ._rich_console_markup) file,
show an error instead of loading as text. The text would be much
larger than a document you saved in this format, and it wouldn't give
you what you expect, unless you're wanting to load an arbitrary text
file for viewing, and for some reason choose this program to do it.
2023-05-17 00:57:23 -04:00
Isaiah Odhner
259ce5f311
Remove redundant assignment
2023-05-17 00:30:55 -04:00
Isaiah Odhner
51125cc08a
Improve documentation of FIGletFontWriter
2023-05-17 00:26:59 -04:00
Isaiah Odhner
6316513cd3
Document Layout enum values
2023-05-17 00:11:58 -04:00
Isaiah Odhner
97bcdbc344
Add validation to FIGletFontWriter
2023-05-16 23:53:45 -04:00
Isaiah Odhner
4589d9a147
Clarify _fixFigChars with comments
...
Within the span of like a day I forgot that FIGlet fonts can be
proportional and came back to this code and was confused why charWidth
needs to be a dictionary. Well it doesn't NEED to be, it could be
implemented differently, for instance by fixing the height first,
it wouldn't need to calculate a number of spaces for the blank lines —
but how it's implemented, the width fixup could be disabled, and the
height fixup would still work. So even though the code would be a little
simpler, I'm not sure it would be better that way.
2023-05-16 23:53:45 -04:00
Isaiah Odhner
ca5a51bb6c
Dissolve blankLines function
2023-05-16 23:45:02 -04:00
Isaiah Odhner
a833fc3be8
Dissolve spacePad function
2023-05-16 23:45:02 -04:00
Isaiah Odhner
33aa786d9f
Mark missed method as private
2023-05-16 23:45:02 -04:00
Isaiah Odhner
425a15293c
Use an enum for layout options
2023-05-16 23:45:02 -04:00
Isaiah Odhner
e17aeae948
Move license text and add dunders
2023-05-16 22:18:56 -04:00
Isaiah Odhner
323503884f
Move FIGletFontWriter to a file
2023-05-16 20:48:53 -04:00
Isaiah Odhner
8c69e5a8ef
Add MIT license to FIGletFontWriter
...
I obtained permission from the author over email :)
Now I can go ahead and merge this code in.
2023-05-16 20:45:09 -04:00
Isaiah Odhner
7f6a6211ad
Add Open Font License to NanoTiny
2023-05-16 20:14:18 -04:00
Isaiah Odhner
a4c0fd7546
Clarify docstring
2023-05-16 20:14:18 -04:00
Isaiah Odhner
f00bf63fed
Ignore .flf files for spell checking (even though there's no issues)
2023-05-16 20:14:18 -04:00
Isaiah Odhner
6d1b864865
Remove simplistic text format font files
2023-05-16 20:14:18 -04:00
Isaiah Odhner
6c3c34d3ac
Move font files to folder
2023-05-16 20:14:18 -04:00
Isaiah Odhner
b74914e841
Don't pass parameters that are auto-calculated
2023-05-16 20:14:18 -04:00
Isaiah Odhner
a65192d49c
Make all parameters of FIGletFontWriter() optional
2023-05-16 20:14:18 -04:00
Isaiah Odhner
93ef354ec6
Remove fontName parameter, since it's unused
2023-05-16 20:14:18 -04:00
Isaiah Odhner
78d0c5fae7
Add version number to font comments
2023-05-16 20:14:18 -04:00
Isaiah Odhner
13e59cacc1
Improve NanoTiny FIGlet fonts for standalone usage
2023-05-16 20:14:18 -04:00
Isaiah Odhner
27df15487e
Mark methods as private
2023-05-16 20:14:17 -04:00
Isaiah Odhner
e2c5fc9af5
Add docstrings to FIGletFontWriter
2023-05-16 20:14:17 -04:00
Isaiah Odhner
f89a2353ec
Minimize vRule list length
2023-05-16 20:14:17 -04:00
Isaiah Odhner
838fb5d540
Make caseInsensitive a parameter
2023-05-16 20:14:17 -04:00
Isaiah Odhner
e1245aa9e9
Load FIGlet font format
2023-05-16 20:14:17 -04:00
Isaiah Odhner
8b6a1586ef
Remove irrelevant code
2023-05-16 20:14:00 -04:00