Skip to content

\Omega renders blank on JDK 25 because font slot 173 maps to U+00AD #111

Description

@jdlee726

Summary

On JDK 25, both \Omega and \varOmega reserve their expected layout space but paint no visible pixels.

This affects JLaTeXMath 1.0.7 and the current 1.0.8-SNAPSHOT branch. It is also visible in consumers such as PlantUML when they run on a recent JDK.

Root cause

JLaTeXMath maps both uppercase Omega symbols to character slot 173:

<SymbolMapping name="Omega" ch="173" fontId="jlm_cmr10"/>
<SymbolMapping name="varOmega" ch="173" fontId="jlm_cmmi10"/>

Decimal 173 is Unicode U+00AD SOFT HYPHEN. Since OpenJDK change JDK-8208377, default-ignorable characters are mapped to INVISIBLE_GLYPH_ID even when the custom font contains a glyph for that code point.

The XML font metrics still supply a non-zero width and height, so the formula occupies space, but AWT paints no glyph.

Reproduction

A direct TeXIcon rendering test on JBR 25.0.3 and OpenJDK 26 produces zero non-transparent pixels for both commands:

TeXIcon icon = new TeXFormula("\\Omega")
        .createTeXIcon(TeXConstants.STYLE_DISPLAY, 40);
BufferedImage image = new BufferedImage(
        icon.getIconWidth(),
        icon.getIconHeight(),
        BufferedImage.TYPE_INT_ARGB);
icon.paintIcon(null, image.createGraphics(), 0, 0);

Proposed fix

Move the internal Omega glyph mapping from slot 173 to unused slot 172, and update:

  • jlm_base.map.xml
  • the jlm_cmr10 and jlm_cmmi10 XML metrics
  • the Unicode cmap entries in both TTF files
  • regression tests that assert both symbols paint visible pixels

Literal U+00AC input is already mapped to \lnot by TeXFormulaSettings.xml, so using slot 172 internally does not change that input behavior.

Verification

  • Full jlatexmath module tests: 11 tests, 0 failures
  • JBR 25.0.3 + PlantUML 1.2026.2 smoke test: both \Omega and \varOmega render visibly

A git-format patch is attached.

jlatexmath-omega-jdk25.patch.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions