diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2020-04-06 21:02:30 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@cib.de> | 2020-04-08 11:22:37 +0200 |
commit | f570e6618611c2ba239ff686e120d8a4508580c3 (patch) | |
tree | aad6d895d3b72ffebf5e12cf2b9aa125c153d9f4 /vcl | |
parent | 01daaaca2983900ede482aa8741e82b76ca3e22b (diff) |
tdf#131490 sw btlr: fix handling of vertical text
Latin text goes from l->r, then t->b. If we rotate to the right, then we
get t->b, then r->l. Vertical text in vcl's Font means the individual
glyphs are painted in a way that looks "non-rotated" in the tbrl case.
btlr is not symmetric to this: if you rotate to the left, then Latin and
vertical text is handled the same way, i.e. there is no compensation at
a glyph level.
This means that as far as vcl is concerned, the Font's vertical flag has
to be true in the tbrl case, but no in the btlr one. Fix
SwFont::SetVertical() to do this, which means that rotating at a
character level or using the btlr text direction will result in the same
rendering for a one-liner text.
Regression from commit 89e5b431d468745da3a1eff14d48296107b9101b (sw btlr
writing mode: implement DOC filter, 2019-03-28).
(cherry picked from commit a8d26a0bb40c101394ded8061d1b58048153631b)
Change-Id: I2619c77a3b2597dbf9feab6c7042e8d8c7454197
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91820
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/gdi/mtfxmldump.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/vcl/source/gdi/mtfxmldump.cxx b/vcl/source/gdi/mtfxmldump.cxx index efc8dfc5b999..8c242bcb7c21 100644 --- a/vcl/source/gdi/mtfxmldump.cxx +++ b/vcl/source/gdi/mtfxmldump.cxx @@ -1136,6 +1136,7 @@ void MetafileXmlDump::writeXml(const GDIMetaFile& rMetaFile, tools::XmlWriter& r rWriter.attribute("height", aFont.GetFontSize().Height()); rWriter.attribute("orientation", aFont.GetOrientation()); rWriter.attribute("weight", convertFontWeigthToString(aFont.GetWeight())); + rWriter.attribute("vertical", aFont.IsVertical() ? "true" : "false"); rWriter.endElement(); } |