Class: Ucode::Glyphs::DvisvgmRenderer
- Inherits:
-
PageRenderer
- Object
- PageRenderer
- Ucode::Glyphs::DvisvgmRenderer
- Defined in:
- lib/ucode/glyphs/dvisvgm_renderer.rb
Overview
‘dvisvgm` — originally a DVI-to-SVG converter, also handles PDF. The `–no-fonts` flag forces outline-only output (no font subsetting artifacts), which is what we want for vector glyph extraction.
Command: ‘dvisvgm –pdf –no-fonts –page=<n> <in.pdf> -o <out.svg>`
Constant Summary
Constants inherited from PageRenderer
PageRenderer::DEFAULT_SMOKE_FIXTURE, PageRenderer::OUTPUT_FORMAT
Class Method Summary collapse
Methods inherited from PageRenderer
all, available, available?, default, find, output_format, render, reset_working_cache!, working, works?
Class Method Details
.binary_name ⇒ Object
18 19 20 |
# File 'lib/ucode/glyphs/dvisvgm_renderer.rb', line 18 def binary_name :dvisvgm end |
.build_command(pdf_path, page_num, out_path) ⇒ Object
22 23 24 25 |
# File 'lib/ucode/glyphs/dvisvgm_renderer.rb', line 22 def build_command(pdf_path, page_num, out_path) ["dvisvgm", "--pdf", "--no-fonts", "--page=#{page_num}", pdf_path.to_s, "-o", out_path.to_s] end |
.renderer_name ⇒ Object
14 15 16 |
# File 'lib/ucode/glyphs/dvisvgm_renderer.rb', line 14 def renderer_name :dvisvgm end |