prawnpdf / ttfunk

Font Metrics Parser for Prawn
http://prawnpdf.org
Other
125 stars 75 forks source link

Fix typo in TTFunk::Subset::Unicode#includes? #48

Closed mtyaka closed 6 years ago

mtyaka commented 6 years ago

The TTFunk::Subset::Unicode#includes?(char) method is trying to invoke #includes(char) on the underlying Set object, but Set does not respond to #includes.

This is most likely just a typo and should be using #include? instead.

Testing

To reproduce the issue:

require 'ttfunk'
require 'ttfunk/subset'
font = TTFunk::File.open('myfont.ttf')
subset = TTFunk::Subset.for(font, :unicode)
subset.includes?(42)

The above fails with NoMethodError: undefined method `includes' for #<Set: {}>.

mtyaka commented 6 years ago

Rebased from 1215500bbe1819540fdca8d8f5d08499b2370aec.