Top Level Namespace

Defined Under Namespace

Modules: FontFamily, FontMetrics, Markup, RSyntaxTree Classes: MarkupParser, RSTError, String

Constant Summary collapse

ETYPE_NODE =

==========================

rsyntaxtree.rb

Facade of rsyntaxtree library. When loaded by a driver script, it does all the necessary 'require' to use the library. Copyright (c) 2007-2026 Yoichiro Hasebe yohasebe@gmail.com

1
ETYPE_LEAF =
2
SUBSCRIPT_CONST =
0.7
FONT_SCALING =
2
LINE_SCALING =
1
BLINE_SCALING =
2
WHITESPACE_BLOCK =
""
DEFAULT_OPTS =
{
  format: "png",
  leafstyle: "auto",
  fontstyle: "sans",
  fontsize: 16,
  linewidth: 1,
  vheight: 2.0,
  color: "modern",
  symmetrize: "off",
  transparent: "off",
  polyline: "off",
  hide_default_connectors: "off",
  mirror: "off",
  tidy: "off",
  hspacing: 1.0,
  direction: "ttb"
}.freeze
FONT_FAMILIES =

Font family lists shared by the SVG output and the Pango-based text measurement. Each entry is an ordered list of family names; the FontFamily helpers format it for SVG (quoted) or for Pango::FontDescription#family (unquoted). Keeping a single source guarantees that measurement and rendering resolve through the same fallback chain.

{
  sans:  ["Noto Sans", "Noto Sans JP", "Noto Sans CJK JP", "OpenMoji", "OpenMoji Color", "OpenMoji Black", "Noto Emoji", "sans-serif"].freeze,
  serif: ["Noto Serif", "Noto Serif JP", "Noto Serif CJK JP", "OpenMoji", "OpenMoji Color", "OpenMoji Black", "Noto Emoji", "serif"].freeze,
  mono:  ["Noto Sans Mono SemiCondensed", "Noto Sans Mono", "Noto Sans JP", "Noto Sans Mono CJK JP", "OpenMoji", "OpenMoji Color", "OpenMoji Black", "Noto Emoji", "monospace"].freeze,
  # The cjk style puts a full-coverage CJK family first, for text that mixes
  # Han, Hangul and kana. Latin falls back to the same Noto faces the sans
  # style uses. (Before 1.8.0 this was WQY Zen Hei.)
  cjk:   ["Noto Sans CJK JP", "Noto Sans", "Noto Sans JP", "OpenMoji", "OpenMoji Color", "OpenMoji Black", "Noto Emoji", "sans-serif"].freeze
}.freeze