summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2019-04-27 21:53:21 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2019-04-28 20:37:05 +0200
commitd183e4b59207378eeef4ac602a42dd12b16ffec4 (patch)
tree5c77f6d94c4c5793312ac40b8d60bb268e0245ff
parent0578353a4d602805124fb642c7051d99f55e4599 (diff)
Just apply Asian kerning to unmodified glyphs
IMHO the old code was doing the opposite of the comment. But the comment makes more sense then the code, so adjust the code accordingly. OTOH just this code was added in commit f89d70de85a6 ("INTEGRATION: CWS vcl27 (1.30.48); FILE MERGED 2004/09/09 12:33:53 hdu 1.30.48.1: #116489# only apply asian kerning on default-formatted text"). Maybe still a bug? Can't check the bug tracker, as this is pre-Apache, and so can't verify the old bug :-( Change-Id: I550d1524d3e82f7e853820d3e5ddab8cc62228f9 Reviewed-on: https://gerrit.libreoffice.org/71441 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
-rw-r--r--vcl/source/gdi/CommonSalLayout.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/vcl/source/gdi/CommonSalLayout.cxx b/vcl/source/gdi/CommonSalLayout.cxx
index 872603228508..5ef6992cabdc 100644
--- a/vcl/source/gdi/CommonSalLayout.cxx
+++ b/vcl/source/gdi/CommonSalLayout.cxx
@@ -208,12 +208,10 @@ void GenericSalLayout::AdjustLayout(ImplLayoutArgs& rArgs)
ApplyDXArray(rArgs);
else if (rArgs.mnLayoutWidth)
Justify(rArgs.mnLayoutWidth);
-
// apply asian kerning if the glyphs are not already formatted
- if ((rArgs.mnFlags & SalLayoutFlags::KerningAsian)
- && !(rArgs.mnFlags & SalLayoutFlags::Vertical))
- if ((rArgs.mpDXArray != nullptr) || (rArgs.mnLayoutWidth != 0))
- ApplyAsianKerning(rArgs.mrStr);
+ else if ((rArgs.mnFlags & SalLayoutFlags::KerningAsian)
+ && !(rArgs.mnFlags & SalLayoutFlags::Vertical))
+ ApplyAsianKerning(rArgs.mrStr);
}
void GenericSalLayout::DrawText(SalGraphics& rSalGraphics) const