harfbuzz 0.1 → 0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/README.md +8 -1
- data/examples/example.rb +8 -0
- data/lib/harfbuzz.rb +6 -0
- data/lib/harfbuzz/face.rb +1 -1
- data/lib/harfbuzz/font.rb +1 -1
- data/lib/harfbuzz/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 425a156ab5d58b38e4f614832449cc65a9d20820
|
4
|
+
data.tar.gz: 9f3f54a1a7151bd5a14b0ec8fa82f9ed37dc669e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4f00d562f047bcfeb3314fe0252e5941d186b4a2b43321ae6f9bbc20d522bbfdcb484129303ed9485105c5a2ef116f9a6b41959461035f922f8b0bfd901dac1
|
7
|
+
data.tar.gz: e516082b7432448465b819ea6ff8ed69c2ef2572bcb8b3f00f001e2507ad14b427481b3b0852100e99b39ed86651177f4b1ff42806b4ca61c33983483b8ab55f
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -2,7 +2,7 @@ The Harfbuzz gem is a Ruby interface to the Harfbuzz text shaping engine. By usi
|
|
2
2
|
|
3
3
|
For more information about Harfbuzz itself, see [harfbuzz.org](http://harfbuzz.org).
|
4
4
|
|
5
|
-
For an example of use, see [example.rb](harfbuzz/examples/example.rb).
|
5
|
+
For an example of use, see [examples/example.rb](https://github.com/jslabovitz/harfbuzz-gem/blob/master/examples/example.rb). You can run this from the base directory of the gem:
|
6
6
|
|
7
7
|
ruby examples/example.rb
|
8
8
|
|
@@ -53,6 +53,13 @@ There are no tests or specs.
|
|
53
53
|
Memory management may not be correct.
|
54
54
|
|
55
55
|
|
56
|
+
## To-do
|
57
|
+
|
58
|
+
Implement hb_buffer_set_* functions.
|
59
|
+
|
60
|
+
Add documentation & tests.
|
61
|
+
|
62
|
+
|
56
63
|
## Feedback
|
57
64
|
|
58
65
|
As this is a new project, I'd love to hear your feedback. Email me at [johnl@johnlabovitz.com](mailto:johnl@johnlabovitz.com).
|
data/examples/example.rb
CHANGED
@@ -15,8 +15,16 @@ puts "Shapers: #{Harfbuzz.shapers.join(', ')}"
|
|
15
15
|
#
|
16
16
|
|
17
17
|
face = Harfbuzz::Face.new(File.open('/Library/Fonts/ACaslonPro-Regular.otf', 'rb'))
|
18
|
+
|
19
|
+
puts "Font face index: #{face.index}"
|
20
|
+
puts "Font face upem: #{face.upem}"
|
21
|
+
puts "Font face glyph count: #{face.glyph_count}"
|
22
|
+
|
18
23
|
font = Harfbuzz::Font.new(face)
|
19
24
|
|
25
|
+
puts "Font scale: #{font.scale}"
|
26
|
+
puts "Font ppem: #{font.ppem}"
|
27
|
+
|
20
28
|
#
|
21
29
|
# Create a buffer to hold the text and the resulting glyphs/positions.
|
22
30
|
#
|
data/lib/harfbuzz.rb
CHANGED
@@ -30,6 +30,12 @@ module Harfbuzz
|
|
30
30
|
]
|
31
31
|
end
|
32
32
|
|
33
|
+
MinimumHarfbuzzVersion = '1.0.4'
|
34
|
+
|
35
|
+
unless Gem::Version.new(Harfbuzz.version_string) >= Gem::Version.new(MinimumHarfbuzzVersion)
|
36
|
+
raise "Harfbuzz C library is version #{Harfbuzz.version_string}, but this gem requires version #{MinimumHarfbuzzVersion} or later"
|
37
|
+
end
|
38
|
+
|
33
39
|
end
|
34
40
|
|
35
41
|
require 'harfbuzz/base'
|
data/lib/harfbuzz/face.rb
CHANGED
data/lib/harfbuzz/font.rb
CHANGED
data/lib/harfbuzz/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: harfbuzz
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.2'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Labovitz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
@@ -94,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
94
94
|
version: '0'
|
95
95
|
requirements: []
|
96
96
|
rubyforge_project:
|
97
|
-
rubygems_version: 2.
|
97
|
+
rubygems_version: 2.5.0
|
98
98
|
signing_key:
|
99
99
|
specification_version: 4
|
100
100
|
summary: Ruby interface to the Harfbuzz text shaping engine
|