Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  [App] Rockbox Font Convertor [Windows]
« previous next »
  • Print
Pages: [1] 2 3 ... 5

Author Topic: [App] Rockbox Font Convertor [Windows]  (Read 35684 times)

Offline iwantanimac

  • Member
  • *
  • Posts: 42
  • Rockbox <3er.
    • GSh Blog
[App] Rockbox Font Convertor [Windows]
« on: February 21, 2007, 06:32:27 AM »
ROCKbox Font Convertor
BYO fonts for the Open Source Jukebox Firmware.

..:: DETAILS, LINKS AND UPDATES NOW ON THE ROCKBOX WIKI ::..
http://www.rockbox.org/twiki/bin/view/Main/RockboxFontConvertor

After reading the thread about converting fonts in this post, i decided to code a batch file to do the work for me. This is the result, the Rockbox font convertor. It ain't in any way pretty, as it's all in command prompt, but it does the job and does it well and pretty damn fast, too.
 
More information and a slightly more technical discussion of this can be found at the MisticRiver Forums, [Here]


The Wiki page contains all the links and details you should need. See it [Here]
 
Cheers Guys,
iwantanimac
« Last Edit: April 03, 2007, 10:22:34 AM by iwantanimac »
Logged

Offline bascule

  • Rockbox Expert
  • Member
  • *
  • Posts: 1298
Re: [App] Rockbox Font Convertor [Windows]
« Reply #1 on: February 21, 2007, 11:15:59 AM »
Quote
allow font size to be set from command line -OR- default to standard setting in batch file. (Very Soon - Need help implementing this in a batch file)

Done. Attached version of batch file allows fontsize setting using parameter 2:
Code: [Select]
makefont [Fontfile] [Fontsize]
Quote
Errors if the font filename has a space. (eg. Lucida Grande.ttf) - tries to find both "Lucida" and "Grande.ttf" solved by renaming the file.

Done. Attached version of batch file detects and allows up to one space in the font name:
Code: [Select]
makefont Lucidia Grande.ttf - This is OK
makefont Lucidia Grande Bold.ttf - This will still NOT work

Font size feature from above change also included
Code: [Select]
makefont Lucidia Grande.ttf 14 - This will work OK



[attachment deleted by admin, too old]
Logged
DataBase fanboy and author of the totally overhauled Rockbox Sync Tool

Offline ryran

  • Member
  • *
  • Posts: 379
    • b19 photography
Re: [App] Rockbox Font Convertor [Windows]
« Reply #2 on: February 21, 2007, 03:52:57 PM »
nice job bascule.
ps to Geoff: check the code for your mirror links.
Logged

Offline iwantanimac

  • Member
  • *
  • Posts: 42
  • Rockbox <3er.
    • GSh Blog
Re: [App] Rockbox Font Convertor [Windows]
« Reply #3 on: February 22, 2007, 03:10:58 AM »
Wow, thanks! That's brilliant.

Now i have to update my posts =P

And about the links: I thought the http was conflicting before, but it seems it wasn't =/ Fixing now...
Logged

Offline Flid

  • Member
  • *
  • Posts: 196
Re: [App] Rockbox Font Convertor [Windows]
« Reply #4 on: February 22, 2007, 08:40:41 AM »
Cheers Geoff & Bascule. Nice little DOS utility.
However, I can't get the font height switches to work? It always reverts to it's default 8 point . Guidance appreciated, thanks.

Edit:-
Ok... sussed it.  I read the wiki and discovered that I had to directly manipulate/edit the .bat file. I now have makefont10.bat, makefont12, makefont14 etc.
« Last Edit: February 22, 2007, 10:14:05 AM by Flid »
Logged

Offline ryran

  • Member
  • *
  • Posts: 379
    • b19 photography
Re: [App] Rockbox Font Convertor [Windows]
« Reply #5 on: February 22, 2007, 12:25:02 PM »
uhmm.. Flid, that was the main point behind Bascule's edit. Get the second one he attached and replace makefont.bat from Geoff's zip with it--then syntax is "makefont arial.ttf 12"  ... with the size being last.
Logged

Offline Flid

  • Member
  • *
  • Posts: 196
Re: [App] Rockbox Font Convertor [Windows]
« Reply #6 on: February 22, 2007, 01:15:38 PM »
Well... that's exactly what I expected, but I misread Geoff's comment about updating his links. I assumed incorrectly that he had already updated them, re-downloaded the same files and had the same problems. Fiddling with the .bat file was interesting none the less though. Thanks.
Logged

Offline soap

  • Member
  • *
  • Posts: 1678
  • Creature of habit.
Re: [App] Rockbox Font Convertor [Windows]
« Reply #7 on: February 22, 2007, 09:39:21 PM »
Looks nice, this really should be moved to the wiki.
Logged
Rockbox Forum Guidelines
The Rockbox Manual
How to Ask Questions the Smart Way

Offline ryran

  • Member
  • *
  • Posts: 379
    • b19 photography
Re: [App] Rockbox Font Convertor [Windows]
« Reply #8 on: February 23, 2007, 01:48:37 AM »
It's already in there (a link to the misticriver thread).
Logged

Offline iwantanimac

  • Member
  • *
  • Posts: 42
  • Rockbox <3er.
    • GSh Blog
Re: [App] Rockbox Font Convertor [Windows]
« Reply #9 on: February 23, 2007, 04:23:52 AM »
Sorry guys I'm in the middle of updating it. I might make my own Wiki page later. I've been too busy with schoolwork to update everything.

I really appreciate the positive feedback though. I should've posted this t the rockbox forums long ago XD

But umm... working on getting a default fontsize setting (In case it's unchecked) and getting the multi-word font name working together nicely. And a help more with makefont ?. Should all be in the next release sometime within the next.... 48 hours. Stay tuned!

EDIT: 1.1 Beta is out (See the tiny text next to current version). Please test it (Because i can't right now...) - it's the one i packaged last night, so it's untested (Apart from trying a few different combinations and checking all the variables...) so please post any results when you can!

For more info on using the new version, navigate to the folder as usual and type;

Quote from: Command Prompt
makefont ?
or
Quote from: Command Prompt
makefont help

and it will give you some info on how to use it.
« Last Edit: February 23, 2007, 05:13:30 AM by iwantanimac »
Logged

Offline bascule

  • Rockbox Expert
  • Member
  • *
  • Posts: 1298
Re: [App] Rockbox Font Convertor [Windows]
« Reply #10 on: February 23, 2007, 08:40:37 AM »
This case does not work in the 1.1 Beta:

Code: [Select]
makefont comic bold.ttf
because it's missing the font size (which is now allowed), but my code used it's presence to determine if it was a spaced name or not.

I'm working on it...

EDIT: I've stopped working on it for now :(
For the life of me, I cannot get the FOR... command to do what I want and any other solution will be clunky and very inelegant.
I may just knock together that solution, but it won't be till next week now...

All other cases and the Help/About functionality work fine. :)
« Last Edit: February 23, 2007, 12:29:02 PM by bascule »
Logged
DataBase fanboy and author of the totally overhauled Rockbox Sync Tool

Offline iwantanimac

  • Member
  • *
  • Posts: 42
  • Rockbox <3er.
    • GSh Blog
Re: [App] Rockbox Font Convertor [Windows]
« Reply #11 on: February 24, 2007, 05:27:17 AM »
That's fine. ill have a look at it ASAP (Probably tomorrow) and see what i can do.

Otherwise i might just use the Choice command - can you set a timeout on that? If so ill just use that.

Clunky? sure but for now it should be ok - just until we figure something more useful out.
Logged

Offline bascule

  • Rockbox Expert
  • Member
  • *
  • Posts: 1298
Re: [App] Rockbox Font Convertor [Windows]
« Reply #12 on: February 24, 2007, 01:47:24 PM »
Well, it's done...

I'm not very happy, because it's double the size, but it does now cope with up to 8 arguments on the command line (e.g., makefont comic special broad font.ttf 12) with automatic detection of whether a font size has been specified as the last argument (and defaulting to 8pt if it has not).

As for the CHOICE command, it seems to be a separate executable (for Win2000 at least), so I have not looked further at that option.

[attachment deleted by admin, too old]
« Last Edit: February 24, 2007, 01:49:27 PM by bascule »
Logged
DataBase fanboy and author of the totally overhauled Rockbox Sync Tool

Offline JustJohnny

  • Member
  • *
  • Posts: 51
Re: [App] Rockbox Font Convertor [Windows]
« Reply #13 on: February 24, 2007, 02:07:03 PM »
Hi.

Below is code for a patch that will:
  • accept multiple single spaces in a file name (I've tested it with upto 12 arguments. Theoretical limit is number of arguments allowed by OS)
  • has a default font size--if font size not specified

It basically concatentates all command line arguments into the file name, except for the last one, which it then checks to see if it is an integer or empty to determine the font size.

Currently can't handle titles with multiple spaces between words. I've only tested the patch code (on WindowsXP), and haven't actually converted any fonts with the complete batch file.

Hope this helps,

JJ

----- edit: merged code into attached file --------

[attachment deleted by admin, too old]
« Last Edit: February 24, 2007, 09:10:05 PM by JustJohnny »
Logged

Offline iwantanimac

  • Member
  • *
  • Posts: 42
  • Rockbox <3er.
    • GSh Blog
Re: [App] Rockbox Font Convertor [Windows]
« Reply #14 on: February 24, 2007, 08:17:02 PM »
thanks for the input, guys. ill have a look at this later, and see what works best.

@JustJohnny: could your code be implemented in the new beta version? where exactly would it go?

can't fiddle now, on my psp, and about to leave for lunch.
Logged

  • Print
Pages: [1] 2 3 ... 5
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  [App] Rockbox Font Convertor [Windows]
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.159 seconds with 22 queries.