nothings/stb

stb_truetype.h: Support Font Variations

オープン

#509 opened on 2017/10/13

 (5 件のコメント) (0 件のリアクション) (0 人の担当者)C (8,054 件のフォーク)batch import
1 stb_truetype4 enhancementhelp wanted

Repository metrics

Stars
 (33,640 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

I figure this is probably goes along with adding support for hinting. However there is some fonts where a lot of data is missing because of the lack of support for Font Variations. The two major variations for this are as follows:

Variation 1: Apple Advanced Typography (AAT) - This is Apple's Variation on TrueType Fonts, and has a slightly different signature than OpenType. This is still a good reference since a lot of the behavior is the same in this, and OpenType. The only difference may be the table name is changed.

Variation 2: OpenType Version 1.8.2 or newer - This includes most of the tables used by Apple, and adds a few mores. Also, Collections for OpenType use the OTC file extension.

To help with implementation, I have a list of the tables that need implementing to add this feature, and you can find the list in the table below...

Table Name Description AAT Support OpenType Support
avar Axis Variations Table Y Y
cvar Control Value Variations table. Y Y
fvar Font Variation Table Y Y
gvar Glyph Variation Table Y Y
name Name Table Y Y
HVAR Horizontal Metrics Variations N Y
MVAR Metrics Variations Table N Y
VVAR Vertical Metrics Variations N Y
ttcf TrueType Collections Table N Y

Also, Since there is a need for fonts to test to make sure this works, you can find the fonts in the following list. In general these fonts have have two downloadable versions where one version includes the Font Variations, and the other version has the fonts variations as separate font files.

コントリビューターガイド