Module: TTFunk::Subset
- Defined in:
- lib/ttfunk/subset.rb,
lib/ttfunk/subset/base.rb,
lib/ttfunk/subset/unicode.rb,
lib/ttfunk/subset/code_page.rb,
lib/ttfunk/subset/mac_roman.rb,
lib/ttfunk/subset/unicode_8bit.rb,
lib/ttfunk/subset/windows_1252.rb
Overview
Namespace for different types of subsets.
Defined Under Namespace
Classes: Base, CodePage, MacRoman, Unicode, Unicode8Bit, Windows1252
Class Method Summary collapse
-
.for(original, encoding) ⇒ TTFunk::Subset::Unicode, ...
Create a subset for the font using the specified encoding.
Class Method Details
.for(original, encoding) ⇒ TTFunk::Subset::Unicode, ...
Create a subset for the font using the specified encoding.
Source Code
lib/ttfunk/subset.rb, line 18
18 | def self.for(original, encoding) |
19 | case encoding.to_sym |
20 | when :unicode then Unicode.new(original) |
21 | when :unicode_8bit then Unicode8Bit.new(original) |
22 | when :mac_roman then MacRoman.new(original) |
23 | when :windows_1252 then Windows1252.new(original) # rubocop: disable Naming/VariableNumber |
24 | else raise NotImplementedError, "encoding #{encoding} is not supported" |
25 | end
|
26 | end
|