Support and General Use > Theming and Appearance Customization

[App] Rockbox Font Convertor [Windows]

<< < (8/14) > >>

bascule:
If you want to make my pre-drag and drop version work how I think you want it to work (although I'm confused now as to what you do want) all you need to do is this:

stick with the makefont [font size] filename1 [filename2 filename3 ...] syntax

But ensure that all spaced filenames are enclosed in quotes, thus making the whole filename a single parameter (This is what dragging and dropping does automatically, thus easing the interpretation of parameters) and ditch the looping filename construction, as it won't be required.
Do the first check on %1 for numeric value or not as per the existing method.
Loop through the parameters, converting each one individually.

E.g.:makefont 19 "Lucida Grande.ttf" "Arial Black.ttf" "Square721 BT.ttf"
 Â        {%1}{        %2        }{       %3       }{       %4        }
So, yes, a hybrid is possible, as the above solution would also work for dropped files. All it may need is the addition that if %1 is non-numeric (i.e., dragged and dropped files), then jump to a font input routine.

What you can't have AFAIK is a way of defaulting the font size for command line users who do not enter one (presumably because they want the default), but requesting font size input for drag and droppers who will surely want that option, because they can't access a font size option any other way...

DanManners:
This is the SINGLEMOST useful tool anyone's released in a while, IMO. Thank you SO MUCH.

-Dan

ryran:
Personally, I think the way Bascule did it in his last release makes the most sense.
And I second Dan--thank you guys so much.

bascule:
OK, I've caved, given the support from you guys :D

Attached is really my final effort, a hybrid app allowing drag and drop or command line usage. Fully tested and working provided the existing caveats are followed.

It only needed one extra line of code (and a modified integer/string check for the font size); even I couldn't complain about that...

Command Line syntax: makefont [font size] filename1 [filename2 filename3 ...]

Drag and Drop: Drop multiple font files onto the batch file. Enter the required font size when prompted, or [return] to default to 8pt.

Font size is optional in the Command Line, but will be prompted for if missing.
Fonts must be in the same folder as the app for both approaches.
Fonts with spaces in their names must be enclosed in quotes.

Command Line examples:
makefont  19 "Lucida Grande.ttf" "Arial Black.ttf" "Square721 BT.ttf"
makefont 12 "comic bold.ttf" comic.ttf
makefont arial.ttf
makefont arial.ttf "Square721 BT.ttf" lucida.ttf
makefont 14 arial.ttf "Square721 BT.ttf" lucida.ttf

iwantanimac:
It's... almost perfect - only problem is you didn't attach the file!

Seriously, man you rule. I hate not having any time to do this, otherwise i'd have done more...

So if you can post your "Final" version, then ill update the builds, help text and add my "Prettying-up" code to it, and it'll be the final-ish version, unless i think of something else to do with it.

Looking amazing - just upload it!!  :D

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version