Implement XeTeX OpenType embolden across PDF and SVG
This commit is contained in:
1 parent
45ea5d4297
commit
5a4271364a
7 files changed
+236
-78
No files matched your search
@@ -414,9 +414,11 @@ impl SourceMap {
|
||||
let bottom_offset = -slant * descent as f64;
|
||||
let left = top_offset.min(bottom_offset).floor() as i64;
|
||||
let right = top_offset.max(bottom_offset).ceil() as i64;
|
||||
let stroke = (font.paint_embolden() / (2. * page.units.bp(1))).ceil() as i64;
|
||||
Some((PaintKind::OpenTypeGlyph { font: font.id.index(), glyph: *glyph }, Bounds {
|
||||
x: x + advance.min(&0) + left, y: y - ascent,
|
||||
width: advance.abs() + right - left, height: ascent + descent,
|
||||
x: x + advance.min(&0) + left - stroke, y: y - ascent - stroke,
|
||||
width: advance.abs() + right - left + 2 * stroke,
|
||||
height: ascent + descent + 2 * stroke,
|
||||
}))
|
||||
}
|
||||
DisplayItem::Rule {
|
||||
|
||||
Reference in new issue
Block a user