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
translations translations
Search



Donate

Rockbox Technical Forums


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

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  Where should I place fonts that only display icons/graphics?
« previous next »
  • Print
Pages: [1]

Author Topic: Where should I place fonts that only display icons/graphics?  (Read 98 times)

Offline Dook

  • Member
  • *
  • Posts: 66
    • D00k.net
Where should I place fonts that only display icons/graphics?
« on: May 15, 2025, 04:56:29 PM »
I've recently developed a consistant and (relatively) simple method of generating font files that contain vector icons/graphics that can be displayed accurately as intended in themes. (For anyone wondering why, it's the only way of drawing re-colourable graphics with anti-aliasing.)

My question is, where do you think I should place these files? As they are technically a font, precedence would say they should be stored in the Fonts folder but a user selecting them from the Font menu would be left with an unreadable menu. On the other hand, placing them in the theme's folder in the wps directory would make some sense since these folders are used to store graphics, albeit intended for bitmaps. The only downside to this is that calling these using the font preloading tag, one has to point rockbox to the theme's folder from the font folder like "../wps/themefolder/file.fnt". None of this seems to be considered illegal by checkwps or the theme uploader.

My instincts say to place it in the wps directory instead of the font one, but I want to see what some other people's opinions are on this.
Logged

Offline bahus

  • Member
  • *
  • Posts: 207
Re: Where should I place fonts that only display icons/graphics?
« Reply #1 on: May 15, 2025, 05:07:58 PM »
Quote from: Dook on May 15, 2025, 04:56:29 PM
user selecting them from the Font menu would be left with an unreadable menu.
Can't  it be prevented by using some custom extension for such fonts?
Logged

Offline Dook

  • Member
  • *
  • Posts: 66
    • D00k.net
Re: Where should I place fonts that only display icons/graphics?
« Reply #2 on: May 15, 2025, 05:13:22 PM »
Quote from: bahus on May 15, 2025, 05:07:58 PM
Quote from: Dook on May 15, 2025, 04:56:29 PM
user selecting them from the Font menu would be left with an unreadable menu.
Can't  it be prevented by using some custom extension for such fonts?

Just checked this, rockbox refuses to load the theme unless fonts end in the .fnt extensions.
Logged

Offline iPodVT

  • Member
  • *
  • Posts: 467
Re: Where should I place fonts that only display icons/graphics?
« Reply #3 on: May 15, 2025, 07:17:15 PM »
Given their unconventional nature, it seems more logical to me to put those specialized non-text .fnt files in the theme's folder within the WPS directory rather than in the Fonts directory.  Also, giving them filenames that are as descriptive as possible, as well as providing an accompanying README file, would help to make their intended purpose and use clear.

Wherever they end up, I'm intrigued and eager to see what they look like.
Logged

Offline bahus

  • Member
  • *
  • Posts: 207
Re: Where should I place fonts that only display icons/graphics?
« Reply #4 on: May 16, 2025, 04:32:49 AM »
Quote from: Dook on May 15, 2025, 05:13:22 PM
Just checked this, rockbox refuses to load the theme unless fonts end in the .fnt extensions.
Will it work with  ".fnticons"? If I'm not mistaken it should work with any extension that starts with .fnt:
https://github.com/Rockbox/rockbox/blob/944026f2b752cb7b6934c399954d67e1f75bb2ac/apps/gui/skin_engine/skin_parser.c#L490C1-L494C40

Logged

Offline Dook

  • Member
  • *
  • Posts: 66
    • D00k.net
Re: Where should I place fonts that only display icons/graphics?
« Reply #5 on: May 16, 2025, 08:01:36 AM »
Quote from: bahus on May 16, 2025, 04:32:49 AM
Quote from: Dook on May 15, 2025, 05:13:22 PM
Just checked this, rockbox refuses to load the theme unless fonts end in the .fnt extensions.
Will it work with  ".fnticons"? If I'm not mistaken it should work with any extension that starts with .fnt:
https://github.com/Rockbox/rockbox/blob/944026f2b752cb7b6934c399954d67e1f75bb2ac/apps/gui/skin_engine/skin_parser.c#L490C1-L494C40



You're right! That works, and as you theorized it doesn't show up in the menu too. Great to know you can do this.

Quote from: iPodVT on May 15, 2025, 07:17:15 PM
Given their unconventional nature, it seems more logical to me to put those specialized non-text .fnt files in the theme's folder within the WPS directory rather than in the Fonts directory.  Also, giving them filenames that are as descriptive as possible, as well as providing an accompanying README file, would help to make their intended purpose and use clear.

Wherever they end up, I'm intrigued and eager to see what they look like.

Great points on the descriptive filenames and README. It might be a good idea to put a reference table in it to communicate the contents of each file as well.
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  Where should I place fonts that only display icons/graphics?
 

  • SMF 2.0.19 | SMF © 2021, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.171 seconds with 22 queries.