summaryrefslogtreecommitdiff
path: root/vcl/inc/font
diff options
context:
space:
mode:
authorKhaled Hosny <khaled@libreoffice.org>2023-07-16 16:06:59 +0300
committerخالد حسني <khaled@libreoffice.org>2023-07-23 06:01:17 +0200
commit507a8745870e9a755be3a72f59c6e9a9d811fdcf (patch)
treea1fc123d1547981b6cd76a935e5ab88df8279afd /vcl/inc/font
parent8e9b65c874d99e3302a9e7dfd0c7a30963526bc2 (diff)
vcl: Use doubles for glyph item coordinates
Change how glyph coordinates are represented inside VCL to use floating point instead of integers. Should make no functional difference because we are still rounding them. Change-Id: I5480ee3dec3afab50194954095fd6829ebaa4a22 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154499 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
Diffstat (limited to 'vcl/inc/font')
-rw-r--r--vcl/inc/font/FontMetricData.hxx6
-rw-r--r--vcl/inc/font/LogicalFontInstance.hxx2
2 files changed, 4 insertions, 4 deletions
diff --git a/vcl/inc/font/FontMetricData.hxx b/vcl/inc/font/FontMetricData.hxx
index 000a5a250bbd..bd552562ff9a 100644
--- a/vcl/inc/font/FontMetricData.hxx
+++ b/vcl/inc/font/FontMetricData.hxx
@@ -56,11 +56,11 @@ public:
tools::Long GetInternalLeading() const { return mnIntLeading; }
tools::Long GetExternalLeading() const { return mnExtLeading; }
int GetSlant() const { return mnSlant; }
- tools::Long GetMinKashida() const { return mnMinKashida; }
+ double GetMinKashida() const { return mnMinKashida; }
tools::Long GetHangingBaseline() const { return mnHangingBaseline; }
void SetSlant(int nSlant) { mnSlant=nSlant; }
- void SetMinKashida( tools::Long nMinKashida ) { mnMinKashida=nMinKashida; }
+ void SetMinKashida(double nMinKashida ) { mnMinKashida=nMinKashida; }
// font attributes queried from the font instance
bool IsFullstopCentered() const { return mbFullstopCentered; }
@@ -117,7 +117,7 @@ private:
tools::Long mnIntLeading; // Internal Leading
tools::Long mnExtLeading; // External Leading
int mnSlant; // Slant (Italic/Oblique)
- tools::Long mnMinKashida; // Minimal width of kashida (Arabic)
+ double mnMinKashida; // Minimal width of kashida (Arabic)
tools::Long mnHangingBaseline; // Offset of hanging baseline to Romn baseline
// font attributes queried from the font instance
diff --git a/vcl/inc/font/LogicalFontInstance.hxx b/vcl/inc/font/LogicalFontInstance.hxx
index e85d25b41f10..43b23d9cd0e9 100644
--- a/vcl/inc/font/LogicalFontInstance.hxx
+++ b/vcl/inc/font/LogicalFontInstance.hxx
@@ -109,7 +109,7 @@ public: // TODO: make data members private
double GetGlyphWidth(sal_GlyphId, bool = false, bool = true) const;
- int GetKashidaWidth() const;
+ double GetKashidaWidth() const;
void GetScale(double* nXScale, double* nYScale) const;