Add bin and edit workflow
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 9s

This commit is contained in:
2026-09-16 13:11:16 -06:00
parent c8ac4fcae5
commit 4cee170d66
17576 changed files with 895740 additions and 2 deletions
@@ -0,0 +1,28 @@
# frozen_string_literal: true
require_relative 'subset/unicode'
require_relative 'subset/unicode_8bit'
require_relative 'subset/mac_roman'
require_relative 'subset/windows_1252'
module TTFunk
# Namespace for different types of subsets.
module Subset
# Create a subset for the font using the specified encoding.
#
# @param original [TTFunk::File]
# @param encoding [:unicode, :unicode_8bit, :mac_roman, :windows_1252]
# @raise [NotImplementedError] for unsupported encodings
# @return [TTFunk::Subset::Unicode, TTFunk::Subset::Unicode8Bit,
# TTFunk::Subset::MacRoman, TTFunk::Subset::Windows1252]
def self.for(original, encoding)
case encoding.to_sym
when :unicode then Unicode.new(original)
when :unicode_8bit then Unicode8Bit.new(original)
when :mac_roman then MacRoman.new(original)
when :windows_1252 then Windows1252.new(original) # rubocop: disable Naming/VariableNumber
else raise NotImplementedError, "encoding #{encoding} is not supported"
end
end
end
end