Hi,
I've developed a TrueType font containg some kerning pairs for my music application. The original font editor was TypeSmith but currently High-Logik FontCreator. When I used Text() to output these characters, it seems that the kerning is not applied to the printout, i.e. the character combination 'fp' is not output as close as designed in the editor. Can Text() output kerning or how to proceed here?
Marko
Font Kerning in AmigaOS4?
Re: Font Kerning in AmigaOS4?
It will definitely work if you plot the glyphs manually, using the kerning information. Text() is not that useful unless you're printing simple text in the system's default charset; I don't think there is any way of making it do kerning.blmara wrote:Can Text() output kerning or how to proceed here?
Re: Font Kerning in AmigaOS4?
Good to know, thanks. Where could I find the actual kerning information? Do you have code examples?chris wrote:It will definitely work if you plot the glyphs manually, using the kerning information. Text() is not that useful unless you're printing simple text in the system's default charset; I don't think there is any way of making it do kerning.blmara wrote:Can Text() output kerning or how to proceed here?
Marko
Marko
Re: Font Kerning in AmigaOS4?
Nothing particularly coherent, but http://git.netsurf-browser.org/netsurf. ... ont.c#n711 is the code NetSurf uses. ami_font_plot_glyph does the actual plotting. This is effectively the character advance in pixels for a kerned pair:blmara wrote:Good to know, thanks. Where could I find the actual kerning information? Do you have code examples?
Code: Select all
if(*char2) EObtainInfo(&ofont->olf_EEngine,
OT_TextKernPair, &kern,
TAG_END);
char_advance = (ULONG)(((glyph->glm_Width - kern) * emwidth) / 65536);
Re: Font Kerning in AmigaOS4?
Thanks a lot, I look into these!chris wrote: Plot the glyphs and advance using that and you're pretty much there.
Marko
Marko