Class: Ucode::Glyphs::EmbeddedFonts::ContentStreamCorrelator::Config

Inherits:
Struct
  • Object
show all
Defined in:
lib/ucode/glyphs/embedded_fonts/content_stream_correlator.rb

Overview

Per-font / per-block configuration.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#label_font_idsObject (readonly)

Type0 font object IDs whose glyphs print the hex codepoint labels on the page.



47
48
49
50
51
52
53
54
# File 'lib/ucode/glyphs/embedded_fonts/content_stream_correlator.rb', line 47

Config = Struct.new(
  :label_font_ids,
  :specimen_font_id,
  :page_numbers,
  :y_bucket,
  :x_bucket,
  keyword_init: true,
)

#page_numbersObject (readonly)

1-based PDF page numbers whose content streams reference the specimen font.



47
48
49
50
51
52
53
54
# File 'lib/ucode/glyphs/embedded_fonts/content_stream_correlator.rb', line 47

Config = Struct.new(
  :label_font_ids,
  :specimen_font_id,
  :page_numbers,
  :y_bucket,
  :x_bucket,
  keyword_init: true,
)

#specimen_font_idObject (readonly)

Type0 font object ID whose glyphs are the specimens we want to attribute.



47
48
49
50
51
52
53
54
# File 'lib/ucode/glyphs/embedded_fonts/content_stream_correlator.rb', line 47

Config = Struct.new(
  :label_font_ids,
  :specimen_font_id,
  :page_numbers,
  :y_bucket,
  :x_bucket,
  keyword_init: true,
)

Instance Method Details

#x_bucket=(value) ⇒ Object

horizontal clustering granularity in PDF points. Default 50.0 — separates label clusters within a row (labels are ~16pt wide, clusters ~60-160pt apart).



47
48
49
50
51
52
53
54
# File 'lib/ucode/glyphs/embedded_fonts/content_stream_correlator.rb', line 47

Config = Struct.new(
  :label_font_ids,
  :specimen_font_id,
  :page_numbers,
  :y_bucket,
  :x_bucket,
  keyword_init: true,
)

#y_bucket=(value) ⇒ Object

vertical clustering granularity in PDF points. Default 1.5 — matches mutool’s text matrix granularity for the row labels.



47
48
49
50
51
52
53
54
# File 'lib/ucode/glyphs/embedded_fonts/content_stream_correlator.rb', line 47

Config = Struct.new(
  :label_font_ids,
  :specimen_font_id,
  :page_numbers,
  :y_bucket,
  :x_bucket,
  keyword_init: true,
)