sonnykr
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2015
08:54 AM
[Solved] Problem rendering custom otf font
Hey All,
I am trying to embed a custom font to the app using roFontRegistry. I register 5 types of the same font (Bold, Extrabold, Light, Medium and Regular). All of these fonts are open type (.otf)
FontNameBold.otf
FontNameExtraBold.otf
FontNameLight.otf
FontNameMedium.otf
FontNameRegular.otf
The Register(path as String) call returns true for each font, but when I invoke GetFamilies(), it returns only 1 ("FontName") instead of 5 ("FontNameBold", "FontNameExtraBold", "FontNameLight", "FontNameMedium", "FontNameRegular"). Also when I applied that font to a text on image canvas, it doesn't seems to render the font properly.
Font type: Open type font file
Font embeddability: Installable
Any idea why this happens?
I am trying to embed a custom font to the app using roFontRegistry. I register 5 types of the same font (Bold, Extrabold, Light, Medium and Regular). All of these fonts are open type (.otf)
FontNameBold.otf
FontNameExtraBold.otf
FontNameLight.otf
FontNameMedium.otf
FontNameRegular.otf
The Register(path as String) call returns true for each font, but when I invoke GetFamilies(), it returns only 1 ("FontName") instead of 5 ("FontNameBold", "FontNameExtraBold", "FontNameLight", "FontNameMedium", "FontNameRegular"). Also when I applied that font to a text on image canvas, it doesn't seems to render the font properly.
Font type: Open type font file
Font embeddability: Installable
Any idea why this happens?
5 REPLIES 5

NewManLiving
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2015
11:47 AM
Re: Problem rendering custom otf font
You could try using a font editor to rename each font differently. I had a similar problem and solved it by creating unique names for each file
My Channels: 2D API Framework Presentation: https://owner.roku.com/add/2M9LCVC
Updated: 11-11-2015 - Completed Keyboard interface
The Joel Channel ( Final Beta )
Updated: 11-11-2015 - Completed Keyboard interface
The Joel Channel ( Final Beta )
sonnykr
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2015
01:03 PM
Re: Problem rendering custom otf font
I already have each of them as different files.
Like this:
FontNameBold.otf
FontNameExtraBold.otf
FontNameLight.otf
FontNameMedium.otf
FontNameRegular.otf
Is that what u are talking about?
Like this:
FontNameBold.otf
FontNameExtraBold.otf
FontNameLight.otf
FontNameMedium.otf
FontNameRegular.otf
Is that what u are talking about?

NewManLiving
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2015
01:34 PM
Re: Problem rendering custom otf font
You need to open each file with a font editor and change each family name to something different. I would change the font name to the same as the filename without the extension. Apparently there is some kind of issue with the api and font names. You can get a font editor as freeware
My Channels: 2D API Framework Presentation: https://owner.roku.com/add/2M9LCVC
Updated: 11-11-2015 - Completed Keyboard interface
The Joel Channel ( Final Beta )
Updated: 11-11-2015 - Completed Keyboard interface
The Joel Channel ( Final Beta )
sonnykr
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2015
12:39 PM
Re: Problem rendering custom otf font
That solved the problem. Thank you NewManLiving!!

NewManLiving
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2015
02:55 PM
Re: [Solved] Problem rendering custom otf font
As a side benefit the font editor allows you to remove all the stuff you do not need thus reducing your font files by up to 2 thirds in size in some cases.
My Channels: 2D API Framework Presentation: https://owner.roku.com/add/2M9LCVC
Updated: 11-11-2015 - Completed Keyboard interface
The Joel Channel ( Final Beta )
Updated: 11-11-2015 - Completed Keyboard interface
The Joel Channel ( Final Beta )