Skip to content
This repository was archived by the owner on Dec 19, 2023. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: actblue/ttfunk
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: prawnpdf/ttfunk
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Able to merge. These branches can be automatically merged.

Commits on Dec 20, 2010

  1. Copy the full SHA
    b48c1e4 View commit details
  2. Copy the full SHA
    1d488ac View commit details

Commits on Jan 27, 2011

  1. Copy the full SHA
    706eef0 View commit details
  2. tweak gemspec

    yob committed Jan 27, 2011
    Copy the full SHA
    d78bb38 View commit details
  3. add a README and CHANGELOG

    yob committed Jan 27, 2011
    Copy the full SHA
    7701e64 View commit details
  4. Copy the full SHA
    c467d86 View commit details

Commits on Mar 30, 2011

  1. Add licensing info

    practicingruby committed Mar 30, 2011
    Copy the full SHA
    94b2bb6 View commit details
  2. Copy the full SHA
    2bee819 View commit details
  3. Fix Jonathan's name

    practicingruby committed Mar 30, 2011
    Copy the full SHA
    b3ebd1a View commit details
  4. Copy the full SHA
    025de47 View commit details

Commits on Apr 2, 2011

  1. ignore .rvmrc file. fix Jonathan's name

    Daniel Nelson committed Apr 2, 2011
    Copy the full SHA
    1395d1c View commit details
  2. updated email address

    Daniel Nelson committed Apr 2, 2011
    Copy the full SHA
    ad18967 View commit details

Commits on Jul 15, 2011

  1. Copy the full SHA
    855ea4e View commit details
  2. Copy the full SHA
    e47bf0f View commit details

Commits on Aug 8, 2011

  1. Copy the full SHA
    545b1e5 View commit details

Commits on Sep 14, 2011

  1. Copy the full SHA
    3a2f8a2 View commit details
  2. fix typo

    bradediger committed Sep 14, 2011
    Copy the full SHA
    a7658a4 View commit details

Commits on Sep 15, 2011

  1. Copy the full SHA
    963ee19 View commit details
  2. Fix README typo

    bradediger committed Sep 15, 2011
    Copy the full SHA
    b18af37 View commit details

Commits on Aug 5, 2012

  1. Copy the full SHA
    9dd7897 View commit details

Commits on Dec 30, 2012

  1. Patch for more reliable astral-plane Unicode support

    Robert Pelkey committed Dec 30, 2012
    Copy the full SHA
    04f4b9f View commit details

Commits on Jan 1, 2013

  1. Copy the full SHA
    70d4898 View commit details
  2. add a travis config file

    yob committed Jan 1, 2013
    Copy the full SHA
    d52d292 View commit details
  3. add a Gemfile

    * explictly list the development dependencies in the gemspec
    * bundler should load the dependencies so the build will work on travis
    yob committed Jan 1, 2013
    Copy the full SHA
    f72f7eb View commit details
  4. add an empty unit spec dir

    * hopefully we'll get there soon
    yob committed Jan 1, 2013
    Copy the full SHA
    55ce21d View commit details

Commits on Jul 30, 2013

  1. Fix JRuby --1.9 problem with subsetting of non-low-ASCII chars

    See the failing spec in Prawn:
    
    prawnpdf/prawn@386998e
    
    When a string to be encoded in a TTF font contained low-ASCII as well as
    non-low-ASCII characters that could both be in the same subset, we would
    be at the mercy of whatever encoding `char.chr` decided to return for
    the first character of the segment. If, for example, this was US-ASCII,
    and a subsequent character in the subset was not US-ASCII, we would
    receive an encoding error when trying to shovel the new character as a
    Fixnum (>= 128) into the US-ASCII string.
    
    Resolve the problem by forcing the encoding on the string to ASCII-8BIT
    (BINARY), so that Ruby treats the subset strings as a stream of bytes
    without imputing encoding semantics.
    bradediger committed Jul 30, 2013
    Copy the full SHA
    a18b430 View commit details
  2. Copy the full SHA
    782d32c View commit details

Commits on Jan 21, 2014

  1. Merge pull request prawnpdf#10 from rlpelkey/master

    support for type 6/10/12 CMAPs (and thus Unicode astral-plane characters)
    practicingruby committed Jan 21, 2014
    Copy the full SHA
    640b88e View commit details
  2. Update README.rdoc

    practicingruby committed Jan 21, 2014
    Copy the full SHA
    56be4cb View commit details
  3. Copy the full SHA
    310a87e View commit details
  4. Clarify licensing

    practicingruby committed Jan 21, 2014
    Copy the full SHA
    c0015eb View commit details

Commits on Feb 24, 2014

  1. Drop comicsans.ttf

    practicingruby committed Feb 24, 2014
    Copy the full SHA
    4561ba0 View commit details
  2. Bump version number

    practicingruby committed Feb 24, 2014
    Copy the full SHA
    cdde294 View commit details

Commits on Apr 2, 2014

  1. Copy the full SHA
    090e816 View commit details
  2. Remove stray debug

    marcusramberg committed Apr 2, 2014
    Copy the full SHA
    dee085d View commit details

Commits on Apr 5, 2014

  1. Copy the full SHA
    20b71ce View commit details
  2. Copy the full SHA
    e1b870a View commit details

Commits on Apr 6, 2014

  1. Copy the full SHA
    214efaf View commit details
  2. Merge pull request prawnpdf#15 from prawnpdf/rubocop

    Add rubocop checks to test suite run.
    packetmonkey committed Apr 6, 2014
    Copy the full SHA
    ea544c5 View commit details

Commits on Jun 6, 2014

  1. Copy the full SHA
    2106f46 View commit details
  2. Copy the full SHA
    b2a8258 View commit details
  3. Merge pull request prawnpdf#17 from prawnpdf/io-object

    Allow TTFunk to open an IO object
    packetmonkey committed Jun 6, 2014
    Copy the full SHA
    2616091 View commit details
  4. Update README.rdoc

    practicingruby committed Jun 6, 2014
    Copy the full SHA
    763e7fe View commit details
  5. Update README.rdoc

    practicingruby committed Jun 6, 2014
    Copy the full SHA
    3d1dc33 View commit details
  6. Update README.rdoc

    practicingruby committed Jun 6, 2014
    Copy the full SHA
    4e6e9e9 View commit details
  7. Update README.rdoc

    practicingruby committed Jun 6, 2014
    Copy the full SHA
    68ae2f2 View commit details

Commits on Jun 23, 2014

  1. Merge pull request prawnpdf#14 from marcusramberg/preferred_family_name

    Use the correct value for preferred family name.
    practicingruby committed Jun 23, 2014
    Copy the full SHA
    f77bc00 View commit details
  2. Bump version number

    practicingruby committed Jun 23, 2014
    Copy the full SHA
    681f294 View commit details

Commits on Aug 7, 2014

  1. Copy the full SHA
    9f306e0 View commit details

Commits on Aug 22, 2014

  1. add a missing require "pathnme"

    TTFunk::File.verify_and_open uses the Pathname keyword. Without this
    require statement, one gets the following error
    
    lib/ttfunk.rb:31:in `verify_and_open': uninitialized constant TTFunk::File::Pathname (NameError)
    
    for example, when running the metrics.rb example.
    boutil committed Aug 22, 2014
    Copy the full SHA
    4dc6fbf View commit details
Showing with 12,601 additions and 1,057 deletions.
  1. +78 −0 .github/workflows/ci.yml
  2. +7 −0 .gitignore
  3. +27 −0 .rubocop.yml
  4. +305 −0 CHANGELOG.md
  5. +2 −0 COPYING
  6. +340 −0 GPLv2
  7. +674 −0 GPLv3
  8. +10 −0 Gemfile
  9. +56 −0 LICENSE
  10. +48 −0 README.md
  11. +6 −0 Rakefile
  12. +20 −0 certs/pointlessone.pem
  13. +1 −0 checksums/ttfunk-1.5.0.gem.sha512
  14. +1 −0 checksums/ttfunk-1.5.1.gem.sha512
  15. +1 −0 checksums/ttfunk-1.6.0.gem.sha512
  16. +1 −0 checksums/ttfunk-1.6.1.gem.sha512
  17. +1 −0 checksums/ttfunk-1.6.2.1.gem.sha512
  18. +1 −0 checksums/ttfunk-1.6.2.gem.sha512
  19. +1 −0 checksums/ttfunk-1.7.0.gem.sha512
  20. +1 −0 checksums/ttfunk-1.8.0.gem.sha512
  21. BIN data/fonts/comicsans.ttf
  22. +0 −45 example.rb
  23. +47 −0 examples/metrics.rb
  24. +44 −0 examples/string_width.rb
  25. +256 −26 lib/ttfunk.rb
  26. +20 −0 lib/ttfunk/aggregate.rb
  27. +66 −0 lib/ttfunk/bin_utils.rb
  28. +54 −0 lib/ttfunk/bit_field.rb
  29. +71 −0 lib/ttfunk/collection.rb
  30. +23 −6 lib/ttfunk/directory.rb
  31. +151 −0 lib/ttfunk/encoded_string.rb
  32. +0 −88 lib/ttfunk/encoding/mac_roman.rb
  33. +0 −69 lib/ttfunk/encoding/windows_1252.rb
  34. +40 −0 lib/ttfunk/max.rb
  35. +40 −0 lib/ttfunk/min.rb
  36. +56 −0 lib/ttfunk/one_based_array.rb
  37. +52 −0 lib/ttfunk/otf_encoder.rb
  38. +27 −0 lib/ttfunk/placeholder.rb
  39. +36 −31 lib/ttfunk/reader.rb
  40. +57 −24 lib/ttfunk/resource_file.rb
  41. +46 −0 lib/ttfunk/sci_form.rb
  42. +63 −0 lib/ttfunk/sub_table.rb
  43. +19 −9 lib/ttfunk/subset.rb
  44. +127 −107 lib/ttfunk/subset/base.rb
  45. +133 −0 lib/ttfunk/subset/code_page.rb
  46. +8 −41 lib/ttfunk/subset/mac_roman.rb
  47. +54 −12 lib/ttfunk/subset/unicode.rb
  48. +54 −18 lib/ttfunk/subset/unicode_8bit.rb
  49. +8 −46 lib/ttfunk/subset/windows_1252.rb
  50. +44 −12 lib/ttfunk/subset_collection.rb
  51. +34 −0 lib/ttfunk/sum.rb
  52. +28 −7 lib/ttfunk/table.rb
  53. +89 −0 lib/ttfunk/table/cff.rb
  54. +291 −0 lib/ttfunk/table/cff/charset.rb
  55. +15 −0 lib/ttfunk/table/cff/charsets.rb
  56. +190 −0 lib/ttfunk/table/cff/charsets/expert.rb
  57. +120 −0 lib/ttfunk/table/cff/charsets/expert_subset.rb
  58. +242 −0 lib/ttfunk/table/cff/charsets/iso_adobe.rb
  59. +405 −0 lib/ttfunk/table/cff/charsets/standard_strings.rb
  60. +507 −0 lib/ttfunk/table/cff/charstring.rb
  61. +45 −0 lib/ttfunk/table/cff/charstrings_index.rb
  62. +298 −0 lib/ttfunk/table/cff/dict.rb
  63. +277 −0 lib/ttfunk/table/cff/encoding.rb
  64. +13 −0 lib/ttfunk/table/cff/encodings.rb
  65. +207 −0 lib/ttfunk/table/cff/encodings/expert.rb
  66. +182 −0 lib/ttfunk/table/cff/encodings/standard.rb
  67. +193 −0 lib/ttfunk/table/cff/fd_selector.rb
  68. +91 −0 lib/ttfunk/table/cff/font_dict.rb
  69. +42 −0 lib/ttfunk/table/cff/font_index.rb
  70. +46 −0 lib/ttfunk/table/cff/header.rb
  71. +158 −0 lib/ttfunk/table/cff/index.rb
  72. +45 −0 lib/ttfunk/table/cff/one_based_index.rb
  73. +107 −0 lib/ttfunk/table/cff/path.rb
  74. +104 −0 lib/ttfunk/table/cff/private_dict.rb
  75. +24 −0 lib/ttfunk/table/cff/subr_index.rb
  76. +254 −0 lib/ttfunk/table/cff/top_dict.rb
  77. +21 −0 lib/ttfunk/table/cff/top_index.rb
  78. +39 −13 lib/ttfunk/table/cmap.rb
  79. +42 −23 lib/ttfunk/table/cmap/format00.rb
  80. +89 −55 lib/ttfunk/table/cmap/format04.rb
  81. +81 −0 lib/ttfunk/table/cmap/format06.rb
  82. +87 −0 lib/ttfunk/table/cmap/format10.rb
  83. +102 −0 lib/ttfunk/table/cmap/format12.rb
  84. +87 −23 lib/ttfunk/table/cmap/subtable.rb
  85. +93 −0 lib/ttfunk/table/dsig.rb
  86. +39 −27 lib/ttfunk/table/glyf.rb
  87. +98 −21 lib/ttfunk/table/glyf/compound.rb
  88. +84 −0 lib/ttfunk/table/glyf/path_based.rb
  89. +68 −16 lib/ttfunk/table/glyf/simple.rb
  90. +132 −16 lib/ttfunk/table/head.rb
  91. +122 −18 lib/ttfunk/table/hhea.rb
  92. +63 −23 lib/ttfunk/table/hmtx.rb
  93. +77 −53 lib/ttfunk/table/kern.rb
  94. +42 −14 lib/ttfunk/table/kern/format0.rb
  95. +38 −17 lib/ttfunk/table/loca.rb
  96. +199 −12 lib/ttfunk/table/maxp.rb
  97. +222 −57 lib/ttfunk/table/name.rb
  98. +579 −22 lib/ttfunk/table/os2.rb
  99. +102 −36 lib/ttfunk/table/post.rb
  100. +42 −27 lib/ttfunk/table/post/format10.rb
  101. +24 −11 lib/ttfunk/table/post/format20.rb
  102. +0 −23 lib/ttfunk/table/post/format25.rb
  103. +13 −5 lib/ttfunk/table/post/format30.rb
  104. +10 −3 lib/ttfunk/table/post/format40.rb
  105. +103 −0 lib/ttfunk/table/sbix.rb
  106. +8 −1 lib/ttfunk/table/simple.rb
  107. +82 −0 lib/ttfunk/table/vorg.rb
  108. +218 −0 lib/ttfunk/ttf_encoder.rb
  109. BIN spec/fonts/AlbertTextBold.otf
  110. BIN spec/fonts/ColorTestSbix.ttf
  111. BIN spec/fonts/ComicJens-Regular.otf
  112. +61 −0 spec/fonts/ComicJens_license_cc.txt
  113. BIN spec/fonts/DejaVuSans.ttc
  114. BIN spec/fonts/DejaVuSans.ttf
  115. BIN spec/fonts/Exo-Regular.otf
  116. BIN spec/fonts/Mplus1p.ttf
  117. BIN spec/fonts/NotoSansCJKsc-Thin.otf
  118. +160 −0 spec/integration/subset_spec.rb
  119. +12 −0 spec/spec_helper.rb
  120. +19 −0 spec/support/path_helpers.rb
  121. +15 −0 spec/support/test_file.rb
  122. +50 −0 spec/ttfunk/bin_utils_spec.rb
  123. +68 −0 spec/ttfunk/bit_field_spec.rb
  124. +41 −0 spec/ttfunk/collection_spec.rb
  125. +117 −0 spec/ttfunk/encoded_string_spec.rb
  126. +192 −0 spec/ttfunk/file_spec.rb
  127. +41 −0 spec/ttfunk/otf_encoder_spec.rb
  128. +14 −0 spec/ttfunk/sci_form_spec.rb
  129. +166 −0 spec/ttfunk/table/cff/charset_spec.rb
  130. +177 −0 spec/ttfunk/table/cff/charstrings_index_spec.rb
  131. +109 −0 spec/ttfunk/table/cff/dict_spec.rb
  132. +102 −0 spec/ttfunk/table/cff/encoding_spec.rb
  133. +83 −0 spec/ttfunk/table/cff/fd_selector_spec.rb
  134. +49 −0 spec/ttfunk/table/cff/font_dict_spec.rb
  135. +15 −0 spec/ttfunk/table/cff/font_index_spec.rb
  136. +31 −0 spec/ttfunk/table/cff/header_spec.rb
  137. +161 −0 spec/ttfunk/table/cff/index_spec.rb
  138. +23 −0 spec/ttfunk/table/cff/name_index_spec.rb
  139. +61 −0 spec/ttfunk/table/cff/private_dict_spec.rb
  140. +38 −0 spec/ttfunk/table/cff/subr_index_spec.rb
  141. +55 −0 spec/ttfunk/table/cff/top_dict_spec.rb
  142. +37 −0 spec/ttfunk/table/cff/top_index_spec.rb
  143. +29 −0 spec/ttfunk/table/dsig_spec.rb
  144. +29 −0 spec/ttfunk/table/head_spec.rb
  145. +50 −0 spec/ttfunk/table/loca_spec.rb
  146. +221 −0 spec/ttfunk/table/os2_spec.rb
  147. +59 −0 spec/ttfunk/table/vorg_spec.rb
  148. +71 −0 spec/ttfunk/ttf_encoder_spec.rb
  149. 0 spec/unit/.gitkeep
  150. +55 −0 ttfunk.gemspec
78 changes: 78 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: CI

on:
push:
pull_request:
schedule:
- cron: "6 20 * * 6"

jobs:
code-style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3
- name: Gems cache
uses: actions/cache@v4
with:
path: ~/gems
key: gems-3.3-${{ hashFiles('*.gemspec', 'Gemfile') }}-${{ github.sha }}
restore-keys: |
gems-3.3-${{ hashFiles('*.gemspec', 'Gemfile') }}-
gems-3.3-
- name: Install dependencies
run: |
gem install bundler
bundle config path ~/gems
bundle install --jobs 4 --retry 3
- name: Check code style
run: bundle exec rake rubocop
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby:
- "2.7.0"
- "2.7"
- "3.0.0"
- "3.0"
- "3.1.0"
- "3.1"
- "3.2.0"
- "3.2"
- "3.3.0"
- "3.3"
- ruby-head
- jruby-9.4
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Gems cache
uses: actions/cache@v4
with:
path: ~/gems
key: gems-${{ matrix.ruby }}-${{ hashFiles('*.gemspec', 'Gemfile') }}-${{ github.sha }}
restore-keys: |
gems-${{ matrix.ruby }}-${{ hashFiles('*.gemspec', 'Gemfile') }}-
gems-${{ matrix.ruby }}-
- name: Install dependencies
if: ${{ startsWith(matrix.ruby, '2.') }}
run: |
gem install bundler -v 2.4.22
bundle config path ~/gems
bundle install --jobs 4 --retry 3
- name: Install dependencies
if: ${{ ! startsWith(matrix.ruby, '2.') }}
run: |
gem install bundler
bundle config path ~/gems
bundle install --jobs 4 --retry 3
- name: Run tests
run: bundle exec rake spec
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
*.swp
.rvmrc
.ruby-version
.yardoc
Gemfile.lock
Gemfile.local
doc
*.gem
27 changes: 27 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
inherit_gem:
prawn-dev: rubocop.yml

RSpec/FilePath:
Enabled: false

RSpec/MultipleMemoizedHelpers:
Max: 7
Exclude:
- spec/ttfunk/table/os2_spec.rb

RSpec/SpecFilePathFormat:
CustomTransform:
TTFunk: ttfunk
Exclude:
- spec/ttfunk/table/cff/charstrings_index_spec.rb
- spec/ttfunk/table/cff/name_index_spec.rb

Style/FormatStringToken:
Exclude:
- examples/metrics.rb


Style/Documentation:
Exclude:
- examples/**/*.rb
- spec/**/*.rb
Loading