Ensure normal weight math font face is consistent (#1774)
@ -258,7 +258,9 @@ impl<'a, 'b, 'v> MathContext<'a, 'b, 'v> {
|
||||
self.local.set(TextElem::set_weight(if style.bold {
|
||||
FontWeight::BOLD
|
||||
} else {
|
||||
FontWeight::REGULAR
|
||||
// The normal weight is what we started with.
|
||||
// It's 400 for CM Regular, 450 for CM Book.
|
||||
self.font.info().variant.weight
|
||||
}));
|
||||
self.style = style;
|
||||
}
|
||||
|
@ -134,7 +134,7 @@ impl Hash for Font {
|
||||
|
||||
impl Debug for Font {
|
||||
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
|
||||
write!(f, "Font({})", self.info().family)
|
||||
write!(f, "Font({},{:?})", self.info().family, self.info().variant)
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 7.9 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.8 KiB |