Forum Discussion
pkuzmenko
3 years agoBinge Watcher
The font object will be create latter, I guess that roFontRegistry just hold file name and do nothing till you ask the registry to create a roFont object.
Have a look how I do create the fonts in my game engine:
m.fontRegistry = {}
for each font in collection.fonts
uri = "pkg:/"+font.filename
if m.fontRegistry[uri] = invalid then
m.fontRegistry[uri] = CreateObject("roFontRegistry")
m.fontRegistry[uri].Register(uri)
end if
rokuFont = m.fontRegistry[uri].GetFont(m.fontRegistry[uri].GetFamilies()[0],font.fontSize, false, false)
m.fonts[font.name] = {
font: rokuFont,
spacing: font.spacing
}
end for
RokuBen
3 years agoCommunity Moderator
Yes, I just checked the code and the error reporting for bad filenames was lost during a refactor. If you register an invalid file, it will just have no effect on the set of fonts available. I'll file an internal bug to fix this in a future OS release.