Hello typst Forum,
I have some difficulties on my quest to properly use a different math font.
#show math.equation: set text(font: "xcharter math")
This works fine for most symbols, but I am running into issues on certian glyphs and would love some information/help that I might be missing. I prepared a working(ish) example.
#set page("a6")
*default:*
$dotless.i dotless.j bold(dotless.i) bold(dotless.j)$
*with custom math font: XCharter Math*
_there is also an "xcharter-math" (the dash is important), which is the bold variant, but doesnt work in tandem automagically_
#show math.equation: set text(font: "xcharter math")
$dotless.i dotless.j bold(dotless.i) bold(dotless.j)$
#show math.equation: set text(font: "xcharter-math")
$dotless.i dotless.j bold(dotless.i) bold(dotless.j)$
*direct unicode calls kind of work but not really*
#[
#set text(font: "xcharter math")
\u{1D6A4} \u{1D6A5} \u{1D6A4} \u{1D6A5} \
*\u{1D6A4} \u{1D6A5} \u{1D6A4} \u{1D6A5}*
]
#[
#set text(font: "xcharter-math")
\u{1D6A4} \u{1D6A5} \u{1D6A4} \u{1D6A5}
]
*Now a silly workaround*
#let dli() = {
set text(font: "xcharter math")
"\u{1D6A4}"
}
#let dlj() = {
set text(font: "xcharter math")
"\u{1D6A5}"
}
#let bdli() = {
set text(font: "xcharter-math")
"\u{1D6A4}"
}
#let bdlj() = {
set text(font: "xcharter-math")
"\u{1D6A5}"
}
$dli() dlj() bdli() bdlj()$
The output is in the attached doc.
This workaround works only for the mentioned font obviously. For many docs I prefer sans fonts, and opt for “fira math” as math font. There too $dotless.i$ does not produce an expected outcome, but I would hate to always use and adapt the code above.
testign.pdf (24.5 KB)