summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMark Hung <marklh9@gmail.com>2015-10-21 22:34:08 +0800
committerAndras Timar <andras.timar@collabora.com>2015-11-10 22:31:17 +0100
commit2bd696881189ceb754a7629d6e623d78ae6211a0 (patch)
tree06653a6cc45e298ffbf2f62b8444567e5b80c4f1 /include
parentd39b2593f894225d3ca202d66bc49f3585a93a3d (diff)
tdf#81144 Chinese full-width punctuation does not align properly
Ideographic fullstop and comma in most Chinese fonts are centered, while those in Japanese fonts align closer to the left. Original compression algorithm trimed right side of the punctuation, making fullwidth fullstop or comma in Chinese font visually unbalanced. In worst case, it crowds together with the followed compressed punctuation. This patch fix the situation in the folowing way 1) make compression less stronger. 2) Trim space according to glyph bearing to font height ratio. 3) fix a memory access violation issue Reviewed-on: https://gerrit.libreoffice.org/19517 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Conflicts: sw/source/core/txtnode/fntcache.cxx Change-Id: Icff215064e6c442fd36eac8e01b01fb6acb27594 Reviewed-on: https://gerrit.libreoffice.org/19764 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit f5ed3a29e995152b80bf1adc888094d735a0882c)
Diffstat (limited to 'include')
-rw-r--r--include/vcl/metric.hxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/vcl/metric.hxx b/include/vcl/metric.hxx
index e2049696e500..1f43dcd96929 100644
--- a/include/vcl/metric.hxx
+++ b/include/vcl/metric.hxx
@@ -72,6 +72,7 @@ public:
long GetExtLeading() const;
long GetLineHeight() const;
long GetSlant() const;
+ bool IsFullstopCentered() const;
FontMetric& operator=( const FontMetric& rMetric );
bool operator==( const FontMetric& rMetric ) const;