Skip to content

Commit

Permalink
Appease the Ruby 1.9 encoding god
Browse files Browse the repository at this point in the history
  • Loading branch information
jamis committed Jan 5, 2009
1 parent 10dae44 commit 95d0109
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/ttfunk/subset/base.rb
Expand Up @@ -99,6 +99,7 @@ def encode(options={})
table_data = ""
head_offset = nil
tables.each do |tag, data|
data.force_encoding('BINARY') if data.respond_to?(:force_encoding)
newfont << [tag, checksum(data), offset, data.length].pack("A4N*")
table_data << data
head_offset = offset if tag == 'head'
Expand Down
1 change: 1 addition & 0 deletions lib/ttfunk/table/name.rb
Expand Up @@ -13,6 +13,7 @@ def initialize(text, platform_id, encoding_id, language_id)
@platform_id = platform_id
@encoding_id = encoding_id
@language_id = language_id
force_encoding('BINARY') if respond_to?(:force_encoding)
end
end

Expand Down

0 comments on commit 95d0109

Please sign in to comment.