font_registery = CreateObject("roFontRegistry") 'GIVES roFont
font_regular = font_registery.getFont("lmroman10 caps", 18, 18, false)
print "line width"
print font_regular.GetOneLineWidth("Alabama",99999)
font_registery = CreateObject("roFontRegistry") 'GIVES roFont
font_regular = font_registery.getdefaultfont()
print "line width"
print font_regular.GetOneLineWidth("Alabama",99999)
this = {
port: CreateObject("roMessagePort")
progress: 0 'buffering progress
position: 0 'playback position (in seconds)
paused: false 'is the video currently paused?
fonts: CreateObject("roFontRegistry") 'global font registry
canvas: CreateObject("roImageCanvas") 'user interface
player: CreateObject("roVideoPlayer")
setup: SetupFramedCanvas 'Calls setup framed Canvas
paint: PaintFramedCanvas
eventloop: EventLoop
}
this.fonts.Register("pkg:/fonts/caps.otf")
Sub RunUserInterface()
' initTheme()
o = Setup()
' o.eventloop()
o.setup()
' o.eventloop()
o.paint()
o.eventloop() 'real
End Sub
Sub Setup() As Object
this = {
port: CreateObject("roMessagePort")
progress: 0 'buffering progress
position: 0 'playback position (in seconds)
paused: false 'is the video currently paused?
fonts: CreateObject("roFontRegistry") 'global font registry
canvas: CreateObject("roImageCanvas") 'user interface
player: CreateObject("roVideoPlayer")
setup: SetupFramedCanvas 'Calls setup framed Canvas
paint: PaintFramedCanvas
eventloop: EventLoop
}
'Register available fonts:
this.fonts.Register("pkg:/fonts/caps.otf")
this.textcolor = "#EEEEEE"'"#406040" title color
Print "font"
print this.fonts.getfamilies()
'Setup image canvas:
this.canvas.SetMessagePort(this.port)
this.canvas.SetLayer(2, { Color: "#000000" }) 'was setlayer 0
this.canvas.Show()
"idunno" wrote:
When I run the program, there is just a space after the word "font" is printed out, almost like the program is not finding any font.
"idunno" wrote:
Good catch, renojim. When you export the files to the Roku Box through eclipse, you have the ability to check and uncheck the files that are uploaded in the zip file. I checked inside the zip file and the fonts folder wasn't there, as I had neglected to select it when I was exporting the zip file. I have checked the box to add the fonts folder to the zip file, and that appears to have solved the problem. Thank you for your help.
"malloys" wrote:
FWIW, I've just modified an eclipse plugin enhancement request entry in the bug queue to check for missing "pkg:" resources as part of the export process (there was already an item for checking for pkg: resources completely missing from the project, but now it includes the export selection list as well).
"TheEndless" wrote:"malloys" wrote:
FWIW, I've just modified an eclipse plugin enhancement request entry in the bug queue to check for missing "pkg:" resources as part of the export process (there was already an item for checking for pkg: resources completely missing from the project, but now it includes the export selection list as well).
(you know it was coming...) Any word on when the update will be available? I'm still pretty desperate to see some of the other features and fixes you mentioned a few weeks back.