Commit Graph

12 Commits

Author SHA1 Message Date
Hamcha 1d07a50459
Change import paths 2018-11-14 10:38:19 +01:00
Nigel Tao bcfeb16b74 Allow multiple kern subtables.
We still only use the first subtable, but we no longer fail if there's
more than one subtable.

Updates fogleman/gg#7
2017-04-29 10:42:25 +10:00
Nigel Tao b12e981082 Support Unicode Full Repertoire cmap tables.
For example, "Apple Color Emoji.ttc" has such a cmap. After this commit,
we can render its glyph for "U+0001F1E6 REGIONAL INDICATOR SYMBOL LETTER
A", which is clearly outside the Unicode BMP.

Note that this only lets us render black-and-white glyphs for out-of-BMP
runes. Rendering color glyphs (i.e. emoji) remains TODO.

Updates #45
2017-04-20 11:23:31 +10:00
Yasuhiro Matsumoto d8e54afd1a Support TTC v2
Close #11
2017-04-07 21:01:03 +09:00
Nigel Tao f9531a3606 Add a face.Metrics method, and parse hhea ascent and descent.
A recent change added a Metrics method to the font.Face interface.
2016-03-24 11:05:48 +11:00
Nigel Tao 640edd0946 Fix some style nits. 2015-09-21 17:13:27 +10:00
Stephen Edwards 995030b974 Add Font.Name method. 2015-09-21 16:46:35 +10:00
Nigel Tao 3cc748686b Use fixed.Rectangle26_6 instead of truetype.Bounds.
The previous "the endpoints are inclusive" comment seems confusing. It's true
that the bounding box's max X equals the right-most coordinate, which suggests
<= instead of <, but that node's coordinate is itself exclusive. Consider the
solid 1-pixel square: (0, 0), (64, 0), (64, 64), (0, 64) in fixed.Point26_6
coordinates. The right-most coordinate is 64, and the bounding box's max X
equals 64, but rasterizing that square only affects sub-pixels up to but not
including 64.

Instead, it seems accurate to follow the fixed.Rectangle26_6 description, in
that the max values are exclusive.
2015-08-30 22:06:37 +10:00
Nigel Tao a021a5f23e Rename Kerning to Kern. 2015-08-24 16:17:16 +10:00
Nigel Tao 2a5cbfd47e Use the fixed.Int26_6 type in package truetype. 2015-08-18 16:30:37 +10:00
Nigel Tao 5193f9f147 Add canonical import paths. 2015-08-12 14:34:19 +10:00
Nigel Tao bf25f8ce0e Move files up one level. 2015-08-12 14:30:01 +10:00
Renamed from freetype/truetype/truetype.go (Browse further)