Raise and lower superscript and subscript runs
This commit is contained in:
1 parent
9dea19d5aa
commit
0b2265580f
6 files changed
+190
-24
No files matched your search
@@ -578,13 +578,14 @@ impl Page {
|
||||
flush_link(&mut link_run, &mut list.items);
|
||||
}
|
||||
let glyph_size = box_.size.unwrap_or(size);
|
||||
let glyph_y = baseline - box_.raise;
|
||||
if let Some(math) = &box_.math {
|
||||
let math_font = Cmr10Metrics::default();
|
||||
Self::paint_math(
|
||||
math,
|
||||
&math_font,
|
||||
x,
|
||||
baseline,
|
||||
glyph_y,
|
||||
glyph_size,
|
||||
&mut list.items,
|
||||
);
|
||||
@@ -593,7 +594,7 @@ impl Page {
|
||||
list.push(DisplayItem::Text {
|
||||
font: box_.font.map_or(face, paragraph_face),
|
||||
x,
|
||||
y: baseline,
|
||||
y: glyph_y,
|
||||
size: glyph_size,
|
||||
text: character_text(character),
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user