General Category > General Discussion

FT813 Custom Font Text

<< < (3/3)

jberkhout:
Thank you very much!

Indeed I saw I had to specify 31 as the first character instead of 32.
The problem was the Raw Data Address (RDA) in the Metric Block (MB), that Asset builder calculated.
It is possible I make some wrong adjustment in Asset Builder, but I couldn't find it.
Asset Builder got the RDA wrong, which caused that problem.
And it uses a wrong index in the Glyph Width Table (the first 128 bytes in the Metric Block).
But for bitmaps it is an excellent tool!

Using a font start of 31 was the only way to get it working when the raw file was generated from Asset Builder.
I noticed it calculated various values for the RDA, depending on the chosen font size.
It sometime even came up with negative values for it!
To calculate the RDA, it seemed to follow this formula: RDA = 1000 - Stride * Max_Height + 148;

I got around these issues by creating my own program to convert fonts to raw and header files.
The RDA reflects the load address in RAMG and the MB size (148 Bytes).
This program creates a valid Glyph Width Table and RDA.
It also does batch processing for different font families, styles and sizes, generating many file sets in one go. (no need to wait, just let it work for a period of time)
And I can replace the '$' for '°' symbol. I never use the $ sign on an embedded project but I do use '°' symbol for temperatures.

Now I modified my embedded library so it calculates and sets the RDA on the fly during loading, to allow for much more flexibility.
This way font raw files can be loaded at any location in RAMG, regardless the RAMG address used during conversion.
I now specify 32 as the first character, the RDA will always be correct.
The function that loads the raw files no longers takes a destination address, instead it returns the address it got loaded to.
It also stores the properties into a structure, and it keeps track of the content of the RAMG.
A collection of fonts and images in RAMG can be assigned an unique ID, so it is easy to check if a page needs to reload RAMG with a different collection of images and fonts.
There also is a function to check if a particular images exists in RAMG, and what the properties are.

ppaing126:
Hi jberkhout,
great researching!

I'm new to the forum, recently bought 3 Crystalfontz CFAF800480E1-050SC-A1-1

I have been struggling for some weeks to make it work, I have a good progress playing with it.
Now I'm at the step of adding custom fonts as need a bigger ones for numbers.

I have found a nice font matrix type. But the thing is the resulting characters are someway shifted, it looks it is about the widths of the individual 128 char table.
Have tried adjusting manually the widths but don't work either.
I have converted the font with the Asset Builder.

But if I use another font to convert, it works fine!  So it looks the matrix font is having some issue while being converted by the Asset Builder.
I have also tested using the Screen Editor and looking to the Export folder.

Could you process the font and test with your utility?

Navigation

[0] Message Index

[*] Previous page

Go to full version