Class: Fontisan::Woff2Font
- Inherits:
-
Object
- Object
- Fontisan::Woff2Font
- Defined in:
- lib/fontisan/woff2_font.rb
Overview
Web Open Font Format 2.0 (WOFF2) font loader
This class manages WOFF2 font files and provides access to decompressed tables and transformed data.
Defined Under Namespace
Classes: IOSource
Instance Attribute Summary collapse
-
#decompressed_tables ⇒ Object
Allow both reading and setting for table delegation.
-
#header ⇒ Object
Allow both reading and setting for table delegation.
-
#io_source ⇒ Object
Allow both reading and setting for table delegation.
-
#parsed_tables ⇒ Object
Allow both reading and setting for table delegation.
-
#table_entries ⇒ Object
Allow both reading and setting for table delegation.
-
#underlying_font ⇒ Object
Allow both reading and setting for table delegation.
Class Method Summary collapse
-
.apply_transformations!(table_entries, decompressed_tables) ⇒ void
Apply table transformations for glyf/loca/hmtx tables.
-
.build_sfnt_in_memory(header, table_entries, decompressed_tables) ⇒ String
Build SFNT binary structure in memory.
-
.calculate_table_directory_size(table_entries) ⇒ Integer
Calculate size of table directory.
-
.decompress_tables(io, header, table_entries) ⇒ Hash<String, String>
Decompress tables from WOFF2 compressed data block.
-
.from_file(path, mode: LoadingModes::FULL, lazy: false) ⇒ Woff2Font
Read WOFF2 font from a file and return Woff2Font instance.
-
.read_table_directory_from_io(io, header) ⇒ Array<Woff2TableDirectoryEntry>
Read table directory from IO.
-
.read_uint_base128_from_io(io) ⇒ Integer
Read variable-length UIntBase128 integer from IO.
-
.uint_base128_size(value) ⇒ Integer
Estimate size of UIntBase128 encoded value.
-
.update_checksum_in_memory(sfnt_data, table_records) ⇒ void
Update checksumAdjustment field in head table in memory.
Instance Method Summary collapse
-
#cff? ⇒ Boolean
Check if font has CFF flavor.
-
#family_name ⇒ Object
Get font family name.
-
#find_table_entry(tag) ⇒ Object
Find table entry by tag.
-
#full_name ⇒ Object
Get full font name.
-
#has_table?(tag) ⇒ Boolean
Check if table exists.
-
#initialize ⇒ Woff2Font
constructor
A new instance of Woff2Font.
-
#initialize_storage ⇒ Object
Initialize storage hashes.
-
#metadata ⇒ Object
Get metadata (if present).
-
#post_script_name ⇒ Object
Get PostScript name.
-
#preferred_family_name ⇒ Object
Get preferred family name.
-
#preferred_subfamily_name ⇒ Object
Get preferred subfamily name.
-
#subfamily_name ⇒ Object
Get font subfamily name.
-
#table(tag) ⇒ Object
Get parsed table object.
-
#table_data(tag) ⇒ Object
Get decompressed table data.
-
#table_names ⇒ Object
Get list of table tags.
-
#to_otf(output_path) ⇒ Object
Convert to OTF.
-
#to_ttf(output_path) ⇒ Object
Convert to TTF.
-
#truetype? ⇒ Boolean
Check if font has TrueType flavor.
-
#units_per_em ⇒ Object
Get units per em.
-
#valid? ⇒ Boolean
Check if font is valid.
-
#validate_signature! ⇒ Object
Validate WOFF2 signature.
-
#variable_font? ⇒ Boolean
Check if font is a variable font.
Constructor Details
#initialize ⇒ Woff2Font
Returns a new instance of Woff2Font.
90 91 92 93 94 95 96 97 |
# File 'lib/fontisan/woff2_font.rb', line 90 def initialize @header = nil @table_entries = [] @decompressed_tables = {} @parsed_tables = {} @io_source = nil @underlying_font = nil # Store the actual TrueTypeFont/OpenTypeFont end |
Instance Attribute Details
#decompressed_tables ⇒ Object
Allow both reading and setting for table delegation
88 89 90 |
# File 'lib/fontisan/woff2_font.rb', line 88 def decompressed_tables @decompressed_tables end |
#header ⇒ Object
Allow both reading and setting for table delegation
88 89 90 |
# File 'lib/fontisan/woff2_font.rb', line 88 def header @header end |
#io_source ⇒ Object
Allow both reading and setting for table delegation
88 89 90 |
# File 'lib/fontisan/woff2_font.rb', line 88 def io_source @io_source end |
#parsed_tables ⇒ Object
Allow both reading and setting for table delegation
88 89 90 |
# File 'lib/fontisan/woff2_font.rb', line 88 def parsed_tables @parsed_tables end |
#table_entries ⇒ Object
Allow both reading and setting for table delegation
88 89 90 |
# File 'lib/fontisan/woff2_font.rb', line 88 def table_entries @table_entries end |
#underlying_font ⇒ Object
Allow both reading and setting for table delegation
88 89 90 |
# File 'lib/fontisan/woff2_font.rb', line 88 def @underlying_font end |
Class Method Details
.apply_transformations!(table_entries, decompressed_tables) ⇒ void
This method returns an undefined value.
Apply table transformations for glyf/loca/hmtx tables
498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 |
# File 'lib/fontisan/woff2_font.rb', line 498 def self.apply_transformations!(table_entries, decompressed_tables) # Find entries that need transformation glyf_entry = table_entries.find { |e| e.tag == "glyf" } hmtx_entry = table_entries.find { |e| e.tag == "hmtx" } # Get required metadata for transformations maxp_data = decompressed_tables["maxp"] hhea_data = decompressed_tables["hhea"] return unless maxp_data && hhea_data # Parse num_glyphs from maxp table # maxp format: version(4) + numGlyphs(2) + ... num_glyphs = maxp_data[4, 2].unpack1("n") # Parse numberOfHMetrics from hhea table # hhea format: ... + numberOfHMetrics(2) at offset 34 number_of_h_metrics = hhea_data[34, 2].unpack1("n") # Check if this is a variable font by checking for fvar table variable_font = table_entries.any? { |e| e.tag == "fvar" } # Transform glyf/loca if needed # transform_length is only set when table is actually transformed # Check that transform_length exists and is greater than 0 if glyf_entry&.instance_variable_defined?(:@transform_length) && glyf_entry.transform_length&.positive? transformed_glyf = decompressed_tables["glyf"] if transformed_glyf result = Woff2::GlyfTransformer.reconstruct( transformed_glyf, num_glyphs, variable_font: variable_font, ) decompressed_tables["glyf"] = result[:glyf] decompressed_tables["loca"] = result[:loca] end end # Transform hmtx if needed # transform_length is only set when table is actually transformed # Check that transform_length exists and is greater than 0 if hmtx_entry&.instance_variable_defined?(:@transform_length) && hmtx_entry.transform_length&.positive? transformed_hmtx = decompressed_tables["hmtx"] if transformed_hmtx decompressed_tables["hmtx"] = Woff2::HmtxTransformer.reconstruct( transformed_hmtx, num_glyphs, number_of_h_metrics, ) end end end |
.build_sfnt_in_memory(header, table_entries, decompressed_tables) ⇒ String
Build SFNT binary structure in memory
604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 |
# File 'lib/fontisan/woff2_font.rb', line 604 def self.build_sfnt_in_memory(header, table_entries, decompressed_tables) sfnt_data = +"" # Calculate offset table fields num_tables = table_entries.length entry_selector = (Math.log(num_tables) / Math.log(2)).floor search_range = (2**entry_selector) * 16 range_shift = num_tables * 16 - search_range # Write offset table sfnt_data << [header.flavor].pack("N") sfnt_data << [num_tables].pack("n") sfnt_data << [search_range].pack("n") sfnt_data << [entry_selector].pack("n") sfnt_data << [range_shift].pack("n") # Calculate table offsets offset = 12 + (num_tables * 16) # Header + directory table_records = [] table_entries.each do |entry| tag = entry.tag data = decompressed_tables[tag] next unless data length = data.bytesize # Calculate checksum checksum = Utilities::ChecksumCalculator.calculate_table_checksum(data) table_records << { tag: tag, checksum: checksum, offset: offset, length: length, data: data, } # Update offset for next table (with padding) offset += length padding = (Constants::TABLE_ALIGNMENT - (length % Constants::TABLE_ALIGNMENT)) % Constants::TABLE_ALIGNMENT offset += padding end # Write table directory table_records.each do |record| sfnt_data << record[:tag].ljust(4, "\x00") sfnt_data << [record[:checksum]].pack("N") sfnt_data << [record[:offset]].pack("N") sfnt_data << [record[:length]].pack("N") end # Write table data with padding table_records.each do |record| sfnt_data << record[:data] # Add padding padding = (Constants::TABLE_ALIGNMENT - (record[:length] % Constants::TABLE_ALIGNMENT)) % Constants::TABLE_ALIGNMENT sfnt_data << ("\x00" * padding) if padding.positive? end # Update checksumAdjustment in head table update_checksum_in_memory(sfnt_data, table_records) sfnt_data end |
.calculate_table_directory_size(table_entries) ⇒ Integer
Calculate size of table directory
559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 |
# File 'lib/fontisan/woff2_font.rb', line 559 def self.calculate_table_directory_size(table_entries) size = 0 table_entries.each do |entry| size += 1 # flags byte # Tag (4 bytes if custom, 0 if known) tag_index = entry.flags & 0x3F size += 4 if tag_index == 0x3F # orig_length (UIntBase128) - estimate size += uint_base128_size(entry.orig_length) # transform_length if present if entry.transform_version && !entry.transform_version.nil? size += uint_base128_size(entry.transform_length) end end size end |
.decompress_tables(io, header, table_entries) ⇒ Hash<String, String>
Decompress tables from WOFF2 compressed data block
470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 |
# File 'lib/fontisan/woff2_font.rb', line 470 def self.decompress_tables(io, header, table_entries) # IO stream is already positioned at compressed data after reading table directory # No need to seek - just read from current position compressed_data = io.read(header.total_compressed_size) # Decompress entire data block with Brotli decompressed_data = Brotli.inflate(compressed_data) # Split decompressed data into individual tables decompressed_tables = {} offset = 0 table_entries.each do |entry| table_size = entry.transform_length || entry.orig_length table_data = decompressed_data[offset, table_size] offset += table_size decompressed_tables[entry.tag] = table_data end decompressed_tables end |
.from_file(path, mode: LoadingModes::FULL, lazy: false) ⇒ Woff2Font
Read WOFF2 font from a file and return Woff2Font instance
292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 |
# File 'lib/fontisan/woff2_font.rb', line 292 def self.from_file(path, mode: LoadingModes::FULL, lazy: false) if path.nil? || path.to_s.empty? raise ArgumentError, "path cannot be nil or empty" end raise Errno::ENOENT, "File not found: #{path}" unless File.exist?(path) woff2 = new woff2.io_source = IOSource.new(path) File.open(path, "rb") do |io| # Read header to determine font flavor woff2.header = Woff2::Woff2Header.read(io) # Validate signature unless woff2.header.signature == Woff2::Woff2Header::SIGNATURE raise InvalidFontError, "Invalid WOFF2 signature: expected 0x#{Woff2::Woff2Header::SIGNATURE.to_s(16)}, " \ "got 0x#{woff2.header.signature.to_i.to_s(16)}" end # Read table directory woff2.table_entries = read_table_directory_from_io(io, woff2.header) # Decompress table data woff2.decompressed_tables = decompress_tables(io, woff2.header, woff2.table_entries) # Apply table transformations if present apply_transformations!(woff2.table_entries, woff2.decompressed_tables) # Build SFNT structure in memory sfnt_data = build_sfnt_in_memory(woff2.header, woff2.table_entries, woff2.decompressed_tables) # Create StringIO for reading sfnt_io = StringIO.new(sfnt_data) sfnt_io.rewind # Parse tables based on font type if woff2.truetype? font = TrueTypeFont.read(sfnt_io) font.initialize_storage font.loading_mode = mode font.lazy_load_enabled = lazy # Create fresh StringIO for table data reading table_io = StringIO.new(sfnt_data) font.read_table_data(table_io) # Store underlying font for table access delegation woff2. = font woff2.parsed_tables = font.parsed_tables elsif woff2.cff? font = OpenTypeFont.read(sfnt_io) font.initialize_storage font.loading_mode = mode font.lazy_load_enabled = lazy # Create fresh StringIO for table data reading table_io = StringIO.new(sfnt_data) font.read_table_data(table_io) # Store underlying font for table access delegation woff2. = font woff2.parsed_tables = font.parsed_tables else raise InvalidFontError, "Unknown WOFF2 flavor: 0x#{woff2.header.flavor.to_s(16)}" end end woff2 rescue BinData::ValidityError, EOFError => e raise InvalidFontError, "Invalid WOFF2 file: #{e.}" end |
.read_table_directory_from_io(io, header) ⇒ Array<Woff2TableDirectoryEntry>
Read table directory from IO
373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 |
# File 'lib/fontisan/woff2_font.rb', line 373 def self.read_table_directory_from_io(io, header) table_entries = [] header.num_tables.times do entry = Woff2TableDirectoryEntry.new # Read flags byte with nil check flags_data = io.read(1) if flags_data.nil? raise EOFError, "Unexpected EOF while reading table directory flags" end flags = flags_data.unpack1("C") entry.flags = flags # Determine tag tag_index = flags & 0x3F if tag_index == 0x3F # Custom tag (4 bytes) tag_data = io.read(4) if tag_data.nil? || tag_data.bytesize < 4 raise EOFError, "Unexpected EOF while reading custom tag" end entry.tag = tag_data.force_encoding("UTF-8") else # Known tag from table entry.tag = Woff2TableDirectoryEntry::KNOWN_TAGS[tag_index] unless entry.tag raise InvalidFontError, "Invalid table tag index: #{tag_index}" end end # Read orig_length (UIntBase128) entry.orig_length = read_uint_base128_from_io(io) # Determine if transformLength should be read # According to WOFF2 spec section 4.2: # - glyf/loca with version 0: TRANSFORMED (transformLength present) # - hmtx with non-zero version: TRANSFORMED (transformLength present) # - all other tables: transformation version is 0 (no transformLength) transform_version = (flags >> 6) & 0x03 has_transform_length = if ["glyf", "loca"].include?(entry.tag) && transform_version.zero? true elsif entry.tag == "hmtx" && transform_version != 0 true else false end if has_transform_length entry.transform_length = read_uint_base128_from_io(io) entry.transform_version = transform_version end table_entries << entry end table_entries end |
.read_uint_base128_from_io(io) ⇒ Integer
Read variable-length UIntBase128 integer from IO
441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 |
# File 'lib/fontisan/woff2_font.rb', line 441 def self.read_uint_base128_from_io(io) result = 0 5.times do byte_data = io.read(1) if byte_data.nil? raise EOFError, "Unexpected EOF while reading UIntBase128" end byte = byte_data.unpack1("C") # Continue if high bit is set if (byte & 0x80).zero? return (result << 7) | byte else result = (result << 7) | (byte & 0x7F) end end # If we're here, the encoding is invalid raise InvalidFontError, "Invalid UIntBase128 encoding" end |
.uint_base128_size(value) ⇒ Integer
Estimate size of UIntBase128 encoded value
583 584 585 586 587 588 589 590 591 592 593 594 595 596 |
# File 'lib/fontisan/woff2_font.rb', line 583 def self.uint_base128_size(value) return 1 if value < 128 bytes = 0 v = value while v.positive? bytes += 1 v >>= 7 end [ bytes, 5, ].min # Max 5 bytes end |
.update_checksum_in_memory(sfnt_data, table_records) ⇒ void
This method returns an undefined value.
Update checksumAdjustment field in head table in memory
678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 |
# File 'lib/fontisan/woff2_font.rb', line 678 def self.update_checksum_in_memory(sfnt_data, table_records) # Find head table record head_record = table_records.find { |r| r[:tag] == Constants::HEAD_TAG } return unless head_record # Zero out checksumAdjustment field first head_offset = head_record[:offset] sfnt_data[head_offset + 8, 4] = "\x00\x00\x00\x00" # Calculate file checksum checksum = 0 sfnt_data.bytes.each_slice(4) do |bytes| word = bytes.pack("C*").ljust(4, "\x00").unpack1("N") checksum = (checksum + word) & 0xFFFFFFFF end # Calculate adjustment adjustment = (0xB1B0AFBA - checksum) & 0xFFFFFFFF # Write adjustment to head table sfnt_data[head_offset + 8, 4] = [adjustment].pack("N") end |
Instance Method Details
#cff? ⇒ Boolean
Check if font has CFF flavor
113 114 115 116 117 |
# File 'lib/fontisan/woff2_font.rb', line 113 def cff? return false unless @header [Constants::SFNT_VERSION_OTTO, 0x4F54544F].include?(@header.flavor) end |
#family_name ⇒ Object
Get font family name
242 243 244 245 |
# File 'lib/fontisan/woff2_font.rb', line 242 def family_name name_table = table("name") name_table&.english_name(Tables::Name::FAMILY) end |
#find_table_entry(tag) ⇒ Object
Find table entry by tag
149 150 151 |
# File 'lib/fontisan/woff2_font.rb', line 149 def find_table_entry(tag) @table_entries.find { |entry| entry.tag == tag } end |
#full_name ⇒ Object
Get full font name
254 255 256 257 |
# File 'lib/fontisan/woff2_font.rb', line 254 def full_name name_table = table("name") name_table&.english_name(Tables::Name::FULL_NAME) end |
#has_table?(tag) ⇒ Boolean
Check if table exists
144 145 146 |
# File 'lib/fontisan/woff2_font.rb', line 144 def has_table?(tag) @table_entries.any? { |entry| entry.tag == tag } end |
#initialize_storage ⇒ Object
Initialize storage hashes
100 101 102 103 |
# File 'lib/fontisan/woff2_font.rb', line 100 def initialize_storage @decompressed_tables ||= {} @initialize_storage ||= {} end |
#metadata ⇒ Object
Get metadata (if present)
223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 |
# File 'lib/fontisan/woff2_font.rb', line 223 def return nil unless @header&.&.positive? return nil unless @io_source begin File.open(@io_source.path, "rb") do |io| io.seek(@header.) = io.read(@header.) Brotli.inflate() end rescue StandardError => e warn "Failed to decompress metadata: #{e.}" nil end end |
#post_script_name ⇒ Object
Get PostScript name
260 261 262 263 |
# File 'lib/fontisan/woff2_font.rb', line 260 def post_script_name name_table = table("name") name_table&.english_name(Tables::Name::POSTSCRIPT_NAME) end |
#preferred_family_name ⇒ Object
Get preferred family name
266 267 268 269 |
# File 'lib/fontisan/woff2_font.rb', line 266 def preferred_family_name name_table = table("name") name_table&.english_name(Tables::Name::PREFERRED_FAMILY) end |
#preferred_subfamily_name ⇒ Object
Get preferred subfamily name
272 273 274 275 |
# File 'lib/fontisan/woff2_font.rb', line 272 def preferred_subfamily_name name_table = table("name") name_table&.english_name(Tables::Name::PREFERRED_SUBFAMILY) end |
#subfamily_name ⇒ Object
Get font subfamily name
248 249 250 251 |
# File 'lib/fontisan/woff2_font.rb', line 248 def subfamily_name name_table = table("name") name_table&.english_name(Tables::Name::SUBFAMILY) end |
#table(tag) ⇒ Object
Get parsed table object
171 172 173 174 175 176 177 178 179 180 |
# File 'lib/fontisan/woff2_font.rb', line 171 def table(tag) # Delegate to underlying font if available return @underlying_font.table(tag) if @underlying_font # Fallback to parsed_tables hash # Normalize tag to UTF-8 string for hash lookup # Use dup to create mutable copy since force_encoding modifies in place tag_key = tag.to_s.dup.force_encoding("UTF-8") @parsed_tables[tag_key] end |
#table_data(tag) ⇒ Object
Get decompressed table data
159 160 161 162 163 164 165 166 167 168 |
# File 'lib/fontisan/woff2_font.rb', line 159 def table_data(tag) # First try underlying font's table data if available if @underlying_font.respond_to?(:table_data) = @underlying_font.table_data[tag] return if end # Fallback to decompressed_tables @decompressed_tables[tag] end |
#table_names ⇒ Object
Get list of table tags
154 155 156 |
# File 'lib/fontisan/woff2_font.rb', line 154 def table_names @table_entries.map(&:tag) end |
#to_otf(output_path) ⇒ Object
Convert to OTF
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 |
# File 'lib/fontisan/woff2_font.rb', line 203 def to_otf(output_path) unless cff? raise InvalidFontError, "Cannot convert to OTF: font is not CFF flavored" end # Build SFNT and create OpenTypeFont sfnt_data = self.class.build_sfnt_in_memory(@header, @table_entries, @decompressed_tables) sfnt_io = StringIO.new(sfnt_data) # Create actual OpenTypeFont and save for table delegation @underlying_font = OpenTypeFont.read(sfnt_io) @underlying_font.initialize_storage @underlying_font.read_table_data(sfnt_io) FontWriter.write_to_file(@underlying_font.tables, output_path) end |
#to_ttf(output_path) ⇒ Object
Convert to TTF
183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 |
# File 'lib/fontisan/woff2_font.rb', line 183 def to_ttf(output_path) unless truetype? raise InvalidFontError, "Cannot convert to TTF: font is not TrueType flavored" end # Build SFNT and create TrueTypeFont sfnt_data = self.class.build_sfnt_in_memory(@header, @table_entries, @decompressed_tables) sfnt_io = StringIO.new(sfnt_data) # Create actual TrueTypeFont and save for table delegation @underlying_font = TrueTypeFont.read(sfnt_io) @underlying_font.initialize_storage @underlying_font.read_table_data(sfnt_io) FontWriter.write_to_file(@underlying_font.tables, output_path) end |
#truetype? ⇒ Boolean
Check if font has TrueType flavor
106 107 108 109 110 |
# File 'lib/fontisan/woff2_font.rb', line 106 def truetype? return false unless @header [Constants::SFNT_VERSION_TRUETYPE, 0x00010000].include?(@header.flavor) end |
#units_per_em ⇒ Object
Get units per em
278 279 280 281 |
# File 'lib/fontisan/woff2_font.rb', line 278 def units_per_em head = table("head") head&.units_per_em end |
#valid? ⇒ Boolean
Check if font is valid
134 135 136 137 138 139 140 141 |
# File 'lib/fontisan/woff2_font.rb', line 134 def valid? return false unless @header return false unless @header.signature == Woff2::Woff2Header::SIGNATURE return false unless @header.num_tables == @table_entries.length return false unless has_table?("head") true end |
#validate_signature! ⇒ Object
Validate WOFF2 signature
127 128 129 130 131 |
# File 'lib/fontisan/woff2_font.rb', line 127 def validate_signature! unless @header && @header.signature == Woff2::Woff2Header::SIGNATURE raise InvalidFontError, "Invalid WOFF2 signature" end end |
#variable_font? ⇒ Boolean
Check if font is a variable font
122 123 124 |
# File 'lib/fontisan/woff2_font.rb', line 122 def variable_font? has_table?("fvar") end |