Implement XeTeX OpenType horizontal scaling across layout and preview
This commit is contained in:
1 parent
cc0246016d
commit
330ecdd03c
7 files changed
+109
-26
No files matched your search
@@ -565,9 +565,10 @@ impl DisplayList {
|
||||
let x = *x as f64 / 65536.;
|
||||
let y = *y as f64 / 65536.;
|
||||
let scale = *size as f64 / (65536. * f64::from(face.units_per_em()));
|
||||
let horizontal = scale * font.paint_horizontal_scale();
|
||||
if !path.is_empty() {
|
||||
out.push_str(&format!(
|
||||
"<g data-font=\\\"{}\\\" data-glyph=\\\"{glyph}\\\" aria-label=\\\"{}\\\"><path d=\\\"{path}\\\" transform=\\\"translate({x:.5} {y:.5}) scale({scale:.9} -{scale:.9})\\\" fill=\\\"#{:02x}{:02x}{:02x}\\\"{fill_opacity}/></g>\n",
|
||||
"<g data-font=\"{}\" data-glyph=\"{glyph}\" aria-label=\"{}\"><path d=\"{path}\" transform=\"translate({x:.5} {y:.5}) scale({horizontal:.9} -{scale:.9})\" fill=\"#{:02x}{:02x}{:02x}\"{fill_opacity}/></g>\n",
|
||||
escape(&font.name), escape(text), fill[0], fill[1], fill[2]
|
||||
));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user