module HexaPDF::Content::TextRenderingMode

Defines all available text rendering modes as constants. Each text rendering mode is an instance of NamedValue. For use with HexaPDF::Content::GraphicsState#text_rendering_mode.

See: PDF1.7 s9.3.6

Constants

CLIP

Add text to path for clipping

FILL

Fill text

FILL_CLIP

Fill text and add to path for clipping

FILL_STROKE

Fill, then stroke text

FILL_STROKE_CLIP

Fill, then stroke text and add to path for clipping

INVISIBLE

Neither fill nor stroke text (invisible)

STROKE

Stroke text

STROKE_CLIP

Stroke text and add to path for clipping

Public Class Methods

normalize(style)

Returns the argument normalized to a valid text rendering mode.

  • 0 or :fill can be used for the FILL mode.

  • 1 or :stroke can be used for the STROKE mode.

  • 2 or :fill_stroke can be used for the FILL_STROKE mode.

  • 3 or :invisible can be used for the INVISIBLE mode.

  • 4 or :fill_clip can be used for the FILL_CLIP mode.

  • 5 or :stroke_clip can be used for the STROKE_CLIP mode.

  • 6 or :fill_stroke_clip can be used for the FILL_STROKE_CLIP mode.

  • 7 or :clip can be used for the CLIP mode.

  • Otherwise an error is raised.