Class: Ucode::CodeChart::Extractor::Result

Inherits:
Struct
  • Object
show all
Defined in:
lib/ucode/code_chart/extractor.rb

Overview

Result of extracting one codepoint.

Carries the SVG payload plus everything downstream concerns need without re-derivation:

* `base_font` — the PDF-embedded BaseFont name (e.g.
"GPJAHB+WolofGaraySansSerif"). Nil for non-PDF sources.
* `gid` — the GID inside that font. Nil for non-PDF sources.
* `source_page` — 1-based PDF page number where the glyph
appears. Nil when the Catalog didn't compute a location
(ToUnicode-only path) — populated by TODO 04's
`Catalog#location_for` integration.
* `source_cell` — `{x: Float, y: Float}` (PDF user space,
origin bottom-left) for the specimen. Same nil rule.
* `extractor_version` — `Ucode::VERSION` at extraction time.

All optional fields default nil so existing call sites that only read codepoint, svg, tier, provenance keep working.

Instance Attribute Summary collapse

Instance Attribute Details

#base_fontObject

Returns the value of attribute base_font

Returns:

  • (Object)

    the current value of base_font



50
51
52
# File 'lib/ucode/code_chart/extractor.rb', line 50

def base_font
  @base_font
end

#codepointObject

Returns the value of attribute codepoint

Returns:

  • (Object)

    the current value of codepoint



50
51
52
# File 'lib/ucode/code_chart/extractor.rb', line 50

def codepoint
  @codepoint
end

#extractor_versionObject

Returns the value of attribute extractor_version

Returns:

  • (Object)

    the current value of extractor_version



50
51
52
# File 'lib/ucode/code_chart/extractor.rb', line 50

def extractor_version
  @extractor_version
end

#gidObject

Returns the value of attribute gid

Returns:

  • (Object)

    the current value of gid



50
51
52
# File 'lib/ucode/code_chart/extractor.rb', line 50

def gid
  @gid
end

#provenanceObject

Returns the value of attribute provenance

Returns:

  • (Object)

    the current value of provenance



50
51
52
# File 'lib/ucode/code_chart/extractor.rb', line 50

def provenance
  @provenance
end

#source_cellObject

Returns the value of attribute source_cell

Returns:

  • (Object)

    the current value of source_cell



50
51
52
# File 'lib/ucode/code_chart/extractor.rb', line 50

def source_cell
  @source_cell
end

#source_pageObject

Returns the value of attribute source_page

Returns:

  • (Object)

    the current value of source_page



50
51
52
# File 'lib/ucode/code_chart/extractor.rb', line 50

def source_page
  @source_page
end

#svgObject

Returns the value of attribute svg

Returns:

  • (Object)

    the current value of svg



50
51
52
# File 'lib/ucode/code_chart/extractor.rb', line 50

def svg
  @svg
end

#tierObject

Returns the value of attribute tier

Returns:

  • (Object)

    the current value of tier



50
51
52
# File 'lib/ucode/code_chart/extractor.rb', line 50

def tier
  @tier
end