Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Any way to tap TTF kerning tables?

Author
Message
Jeff Miller
19
Years of Service
User Offline
Joined: 22nd Mar 2005
Location: New Jersey, USA
Posted: 31st Dec 2016 20:12 Edited at: 31st Dec 2016 20:15
I'm elated over the inclusion of TTF font usage in AppGameKit in the latest release. However, I want to kern whatever text I am sending to the screen, say in Times New Roman, where the word "AVAILABLE" simply looks awful without kerning, and I'm really not wild about developing my own kerning tables. I know that it would take considerable time and use considerable space for a table of one point size, and I suspect that I might have to develop such a table for each point size I use. TTF fonts supposedly have kerning tables attached or embedded in some way. Does anyone happen to know a way that these TTF kerning tables can be read and applied in AppGameKit?
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 2nd Jan 2017 00:30
Getting kerning data by parsing the TTF Looks pretty hardcore, but it is well documented so should be easy enough to do (just very time consuming!). Here's a nice doc I found on t'internet that would help if you ever decide to attempt it:
http://hackipedia.org/File%20formats/TrueType/v1.66%20TrueType/ttch02.doc
V2 T1 (Mostly)
Phone Tap!
Uzmadesign
xCept
21
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 2nd Jan 2017 06:57
Pretty sure SetTextSpacing() and SetTextCharPosition() are it and doubt we'd see any more advanced capabilities in that regard. The character spacing seems consistent with what Microsoft Word outputs etc.
Jeff Miller
19
Years of Service
User Offline
Joined: 22nd Mar 2005
Location: New Jersey, USA
Posted: 2nd Jan 2017 12:21
xCept: The similarity between AppGameKit output and MS Word arises because MS Word does not kern by default. To turn kerning on you have to navigate through some settings menus. When it is on it looks pretty good, and I'm guessing that it consults the font kerning tables rather than running algorithms.

CJB: Thanks for posting the article link. Having now read it, i agree that the programming could be quite time-consuming. So, I'll just hunker down and make my own table or two for a few font/point size combos. Thanks for the research.
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 5th Jan 2017 14:58
This is on my list of things to look at, but it is not a high priority at the moment

Login to post a reply

Server time is: 2024-09-29 21:33:09
Your offset time is: 2024-09-29 21:33:09