ttfunk 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/CHANGELOG.md +11 -1
- data/lib/ttfunk/collection.rb +0 -2
- data/lib/ttfunk/subset/base.rb +1 -1
- data/lib/ttfunk/table/loca.rb +6 -1
- metadata +3 -3
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 901b4b6c09e1f0dfb7c327b51321af55a3f75237
|
4
|
+
data.tar.gz: 504c1cc9444c543617c02963df1df04cc662d211
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 767f9103f60beee020c5a36ff5efb448326f94ea23650eb4cd6c09e497e3194e0692340aeee60519b2dab3e92ac7d751cecb805b240fa87cf5247d9bebef2f12
|
7
|
+
data.tar.gz: 92c600ec5bfcf601261f3c8b50df01fce414c8208451d491b359338057fccd372cf7a8ef7c655238914ae067af30e50d89df88dd6b69708754b0e2493bbfbb78
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,15 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
|
|
7
7
|
|
8
8
|
## [Unreleased]
|
9
9
|
|
10
|
+
## [1.5.1]
|
11
|
+
|
12
|
+
### Fixed
|
13
|
+
|
14
|
+
* loca table corruption during subsetting. The loca table serialization code
|
15
|
+
didn't properly detect suitable table format.
|
16
|
+
|
17
|
+
* Fixed checksum calculation for empty tables.
|
18
|
+
|
10
19
|
## [1.5.0] - 2017-02-13
|
11
20
|
|
12
21
|
### Added
|
@@ -102,7 +111,8 @@ Initial release as a standalone gem
|
|
102
111
|
|
103
112
|
|
104
113
|
|
105
|
-
[Unreleased]: https://github.com/prawnpdf/ttfunk/compare/1.5.
|
114
|
+
[Unreleased]: https://github.com/prawnpdf/ttfunk/compare/1.5.1...HEAD
|
115
|
+
[1.5.1]: https://github.com/prawnpdf/ttfunk/compare/1.5.0...1.5.1
|
106
116
|
[1.5.0]: https://github.com/prawnpdf/ttfunk/compare/1.4.0...1.5.0
|
107
117
|
[1.4.0]: https://github.com/prawnpdf/ttfunk/compare/1.3.0...1.4.0
|
108
118
|
[1.3.0]: https://github.com/prawnpdf/ttfunk/compare/1.2.2...1.3.0
|
data/lib/ttfunk/collection.rb
CHANGED
data/lib/ttfunk/subset/base.rb
CHANGED
@@ -150,7 +150,7 @@ module TTFunk
|
|
150
150
|
|
151
151
|
def checksum(data)
|
152
152
|
data += "\0" * (4 - data.length % 4) unless data.length % 4 == 0
|
153
|
-
data.unpack('N*').reduce(:+) & 0xFFFF_FFFF
|
153
|
+
data.unpack('N*').reduce(0, :+) & 0xFFFF_FFFF
|
154
154
|
end
|
155
155
|
|
156
156
|
def collect_glyphs(glyph_ids)
|
data/lib/ttfunk/table/loca.rb
CHANGED
@@ -13,7 +13,12 @@ module TTFunk
|
|
13
13
|
# * :table - the string representing the table's contents
|
14
14
|
# * :type - the type of offset (to be encoded in the 'head' table)
|
15
15
|
def self.encode(offsets)
|
16
|
-
|
16
|
+
long_offsets = offsets.any? do |offset|
|
17
|
+
short_offset = offset / 2
|
18
|
+
short_offset * 2 != offset || short_offset > 0xffff
|
19
|
+
end
|
20
|
+
|
21
|
+
if long_offsets
|
17
22
|
{ type: 1, table: offsets.pack('N*') }
|
18
23
|
else
|
19
24
|
{ type: 0, table: offsets.map { |o| o / 2 }.pack('n*') }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ttfunk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gregory Brown
|
@@ -34,7 +34,7 @@ cert_chain:
|
|
34
34
|
wxx1aB3kGoI0T6JXywKpPnzUt/qji/qpzCNiVJ0RZxzDHyZuL8NEoA9ORZnAIGiW
|
35
35
|
5u3JK+T0toNEYkMuV6W8NU+gVyo=
|
36
36
|
-----END CERTIFICATE-----
|
37
|
-
date: 2017-
|
37
|
+
date: 2017-04-11 00:00:00.000000000 Z
|
38
38
|
dependencies:
|
39
39
|
- !ruby/object:Gem::Dependency
|
40
40
|
name: rake
|
@@ -172,7 +172,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
172
172
|
version: '0'
|
173
173
|
requirements: []
|
174
174
|
rubyforge_project:
|
175
|
-
rubygems_version: 2.6.
|
175
|
+
rubygems_version: 2.6.11
|
176
176
|
signing_key:
|
177
177
|
specification_version: 4
|
178
178
|
summary: TrueType Font Metrics Parser
|
metadata.gz.sig
CHANGED
Binary file
|