Top Level Namespace
Defined Under Namespace
Modules: FontFamily, FontMetrics, Markup, RSyntaxTree Classes: MarkupParser, RSTError, String
Constant Summary collapse
- FONT_DIR =
==========================
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
File.(File.join(__dir__, "/../fonts"))
- ETYPE_NODE =
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", 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", "OpenMoji", "OpenMoji Color", "OpenMoji Black", "sans-serif"].freeze, serif: ["Noto Serif", "Noto Serif JP", "OpenMoji", "OpenMoji Color", "OpenMoji Black", "serif"].freeze, mono: ["Noto Sans Mono SemiCondensed", "Noto Sans JP", "OpenMoji", "OpenMoji Color", "OpenMoji Black", "sans-serif"].freeze, cjk: ["WenQuanYi Zen Hei", "Noto Sans", "OpenMoji", "OpenMoji Color", "OpenMoji Black", "sans-serif"].freeze }.freeze