nothings/stb

stb_truetype.h: Support Font Variations

開放

#509 建立於 2017年10月13日

 (5 則留言) (0 個反應) (0 位負責人)C (8,054 個分叉)batch import
1 stb_truetype4 enhancementhelp wanted

倉庫指標

星標
 (33,640 顆星)
PR 合併指標
 (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.

貢獻者指南