ReTeX / ReX

ReX - typesetting mathematics
120 stars 10 forks source link

Fail to render 'h' #40

Open elbaro opened 2 years ago

elbaro commented 2 years ago

A symbol for 'h' is equivalent to the planck constant 'h'. The unicode standard omits the mathematical 'h' to avoid the duplication. ReX currently uses this non-existing glyph and fails to render 'h'.

A workaround is to check for this special case and use the alternative codepoint.

Find and replace

match codepoint {
        LOWER_A..=LOWER_Z => style_lookup(&LATIN_LOWER_LUT, codepoint, style),

with


const LOWER_H: u32 = 'h' as u32;

match codepoint {
        LOWER_H..=LOWER_H => 0x210E,  // planck constant
        LOWER_A..=LOWER_Z => style_lookup(&LATIN_LOWER_LUT, codepoint, style),