Class: Prawn::Fonts::TTC
- Inherits:
-
TTF
- Object
- Prawn::Font
- TTF
- Prawn::Fonts::TTC
- Defined in:
- lib/prawn/fonts/ttc.rb
Overview
Note:
You shouldn’t use this class directly.
TrueType Collection font. It’s an SFNT-based format that contains a bunch of TrueType fonts in a single file.
Class Method Summary collapse
-
.font_names(file) ⇒ Array<String>
Returns a list of the names of all named fonts in the given ttc file.
Constructor Details
This class inherits a constructor from Prawn::Fonts::TTF
Class Method Details
.font_names(file) ⇒ Array<String>
Returns a list of the names of all named fonts in the given ttc file. They are returned in order of their appearance in the file.
Source Code
lib/prawn/fonts/ttc.rb, line 17
17 | def self.font_names(file) |
18 | TTFunk::Collection.open(file) do |ttc| |
19 | ttc.map { |font| font.name.font_name.first } |
20 | end
|
21 | end
|