New Fonts with Rho

How and where should I install fonts that RhoElements can use? There are some basic ones like 'Arial Black' that don't seem to work.

Robert Galvin
Have you tried the method

Have you tried the method that mentioned in . - although the topic had to do with multi-lingual fonts, the concept remains the same. You effectively install a font to the devices windows\fonts folder if it does not exist and then change the default font family in the config.xml

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Anonymous (not verified)
Just to add, the folder is

Just to add, the folder is \Windows, not \Windows\fonts... wherever tahoma.ttf is on your device.  In the future the font folder will be configurable but for now it's hard coded.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Joshua McGinnis
I've done a complete search

I've done a complete search of the device, and there is no tahoma.ttf nor any *.ttf. Whenever I try to copy a .ttf to do \Windows or \Windows\fonts (which is empty), I get the error in the screenshot below.

The only time I'm able to get an installed font to work is if I first copy it to a location other than Windows, then from the device, cut/paste to the \Windows\fonts directory. However, \Windows\Fonts does not persist so this is not a long term solution. Why is this?

error.PNG

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Juan-Antonio Ma...
Why don't you make a cab file

Why don't you make a cab file containing the fonts to be copied in \Windows?

I have created one containing tahoma.ttf for you convenience, please find it attached.

I used OCP Software's WinCE Cab Manager to make it.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Darryn Campbell
So I guess the immediate

So I guess the immediate question is: where do I put fonts to make them persist between cold boots and accessible from RhoElements because \Windows and \Windows\fonts do not persist.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Szymon Engel
The other way is to use @font

The other way is to use @font-face feature of CSS. It allows you to embed font directly for HTML, so the application will be device independent. See attached example.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Joshua McGinnis
Using font-face is definitely

Using font-face is definitely an option, though, the downside is that it has the download the entire font before being usable. I know there's services online that will create a font file with only the characters you need to reduce the file size, but still.

I have to think there is a way to install fonts on the device itself. Like I said, the fonts work once get them into the \Windows\fonts directory, but after cool boot, they're gone.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Szymon Engel
What do you mean by download

What do you mean by download the entire font? You can just copy font file to the device and in CSS give the path to this font. This is almost the same as copying the font to \Windows\fonts. In the example attached in previous message you have index.htm and two font files. When you launch this nothing is downloaded over the net.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Joshua McGinnis
Oh, well font-face has a src

Oh, well font-face has a src attribute that you can use to specify a url on the server to where the font lives and should be downloaded. That's how most developers use this feature because most developers don't have the ability to put a file on the end-users' device. But in this case, you're right, we can put a src of src: url('file:///Application/font/Arial.ttf') because we own the device and have the ability to place the font on the device prior to running the application. Has this been tested with Rho? I've already discovered a bunch of other common webkit features that aren't fully supported. If not, I'll test on my MK4000 and see how it goes.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Joshua McGinnis
As suspected, font-face doesn

As suspected, font-face doesn't appear to be supported in RhoElements.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Szymon Engel
Font-face is supported. I

Font-face is supported. I tested this example on ES400 and it works.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Joshua McGinnis
Hmm. It isn't working for me.

Hmm. It isn't working for me. Are you copying the font files to your machine first? Because your sample is pointing to a relative web path, not a local file path.

Here, try this. When I visit this url in Chrome, it works:

http://brooklab.com/sandbox/fonts/

When I visit the same url in the MK4000, it does not work.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Szymon Engel
Oh, you are right. The

Oh, you are right. The default font looks familiar to this I've used. It looks that font-face isn't supported. Can anyone from RhoElements team confirm that?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments