Class: TTFunk::Table::Name::String

Inherits:
String
  • Object
show all
Defined in:
lib/ttfunk/table/name.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(text, platform_id, encoding_id, language_id) ⇒ String

Returns a new instance of String.



11
12
13
14
15
16
# File 'lib/ttfunk/table/name.rb', line 11

def initialize(text, platform_id, encoding_id, language_id)
  super(text)
  @platform_id = platform_id
  @encoding_id = encoding_id
  @language_id = language_id
end

Instance Attribute Details

#encoding_idObject (readonly)

Returns the value of attribute encoding_id.



8
9
10
# File 'lib/ttfunk/table/name.rb', line 8

def encoding_id
  @encoding_id
end

#language_idObject (readonly)

Returns the value of attribute language_id.



9
10
11
# File 'lib/ttfunk/table/name.rb', line 9

def language_id
  @language_id
end

#platform_idObject (readonly)

Returns the value of attribute platform_id.



7
8
9
# File 'lib/ttfunk/table/name.rb', line 7

def platform_id
  @platform_id
end

Instance Method Details

#strip_extendedObject



18
19
20
21
22
# File 'lib/ttfunk/table/name.rb', line 18

def strip_extended
  stripped = gsub(/[\x00-\x19\x80-\xff]/n, "")
  stripped = "[not-postscript]" if stripped.empty?
  return stripped
end