Steven Edwards
ff2b91c280
Move cmap consts to parseCmap.
2015-09-08 20:33:00 -04:00
Steven Edwards
7c1e8f1985
Reset re-adding Bounds when rebasing.
2015-09-08 20:30:39 -04:00
Steven Edwards
b78feafacd
Refactor Name with parseCmap.
2015-09-05 06:02:41 -04:00
Steven Edwards
a05e60ea09
Update Name to match structure of parseCmap.
2015-09-05 04:25:49 -04:00
Steven Edwards
e259c188c8
Make NameID constants explicit.
2015-09-04 16:01:46 -04:00
Steven Edwards
b81666dccc
Move parseName to Name, rewritten to be lazy.
...
Move nameEntryInASCII into the global scope.
2015-09-04 16:01:45 -04:00
Steven Edwards
c765a57301
Remove eager reading of name table.
2015-09-04 16:01:45 -04:00
Steven Edwards
948039527f
Rewrite parseName, Name to use new NameID constants.
...
Also:
- redefine nameInfo;
- set font.nameRecord to *nameInfo;
- remove Style func.
2015-09-04 16:01:45 -04:00
Steven Edwards
52fdfd4dac
Removed parentheses in parseName conditional.
2015-09-04 15:44:54 -04:00
Steven Edwards
5f872e4f01
Replaced bytes.Buffer with []byte in nameEntryInASCII.
2015-09-04 15:44:54 -04:00
Steven Edwards
ae9e4ed6b9
Rewrite parseName to be consistent with freetype2.
2015-09-04 15:44:54 -04:00
Steven Edwards
b96c7d6be0
Sort table names in Font definition, parse.
2015-09-04 15:44:54 -04:00
Steven Edwards
dc8d81915d
Set f.nameRecord to its name and style.
...
Code was returning from parseHead before setting the nameRecord.
2015-09-04 15:44:53 -04:00
Steven Edwards
efd8dbcc39
Inlined decodeUTF16 func to remove runes.go
2015-09-04 15:44:53 -04:00
Steven Edwards
5e7426d6f5
Add parseName, Name, and Style funcs.
...
Also includes decodeUTF16 func, which is used by parseName.
2015-09-04 15:44:53 -04: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