summaryrefslogtreecommitdiff
path: root/core/fpdfapi/font
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-03-14 14:43:42 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-03-14 19:05:58 +0000
commit05df075154a832fcb476e1dfcfb865722d0ea898 (patch)
treeb8b771b62adae74d5d5ee561db75d10de3a848bf /core/fpdfapi/font
parent6b94f01d1c8ad386d497428c7397b1a99614aeba (diff)
downloadpdfium-05df075154a832fcb476e1dfcfb865722d0ea898.tar.xz
Replace FX_FLOAT with underlying float type.
Change-Id: I158b7d80b0ec28b742a9f2d5a96f3dde7fb3ab56 Reviewed-on: https://pdfium-review.googlesource.com/3031 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'core/fpdfapi/font')
-rw-r--r--core/fpdfapi/font/cpdf_cidfont.cpp2
-rw-r--r--core/fpdfapi/font/cpdf_cidfont.h2
-rw-r--r--core/fpdfapi/font/cpdf_type3font.cpp8
3 files changed, 6 insertions, 6 deletions
diff --git a/core/fpdfapi/font/cpdf_cidfont.cpp b/core/fpdfapi/font/cpdf_cidfont.cpp
index 6e050c4bc7..7d14a9ea0a 100644
--- a/core/fpdfapi/font/cpdf_cidfont.cpp
+++ b/core/fpdfapi/font/cpdf_cidfont.cpp
@@ -823,7 +823,7 @@ void CPDF_CIDFont::LoadMetricsArray(CPDF_Array* pArray,
}
// static
-FX_FLOAT CPDF_CIDFont::CIDTransformToFloat(uint8_t ch) {
+float CPDF_CIDFont::CIDTransformToFloat(uint8_t ch) {
return (ch < 128 ? ch : ch - 255) * (1.0f / 127);
}
diff --git a/core/fpdfapi/font/cpdf_cidfont.h b/core/fpdfapi/font/cpdf_cidfont.h
index e256be1af5..ec7da6a9bf 100644
--- a/core/fpdfapi/font/cpdf_cidfont.h
+++ b/core/fpdfapi/font/cpdf_cidfont.h
@@ -36,7 +36,7 @@ class CPDF_CIDFont : public CPDF_Font {
CPDF_CIDFont();
~CPDF_CIDFont() override;
- static FX_FLOAT CIDTransformToFloat(uint8_t ch);
+ static float CIDTransformToFloat(uint8_t ch);
// CPDF_Font:
bool IsCIDFont() const override;
diff --git a/core/fpdfapi/font/cpdf_type3font.cpp b/core/fpdfapi/font/cpdf_type3font.cpp
index b7ff8c9cf0..10a116ab46 100644
--- a/core/fpdfapi/font/cpdf_type3font.cpp
+++ b/core/fpdfapi/font/cpdf_type3font.cpp
@@ -44,7 +44,7 @@ CPDF_Type3Font* CPDF_Type3Font::AsType3Font() {
bool CPDF_Type3Font::Load() {
m_pFontResources = m_pFontDict->GetDictFor("Resources");
CPDF_Array* pMatrix = m_pFontDict->GetArrayFor("FontMatrix");
- FX_FLOAT xscale = 1.0f, yscale = 1.0f;
+ float xscale = 1.0f, yscale = 1.0f;
if (pMatrix) {
m_FontMatrix = pMatrix->GetMatrix();
xscale = m_FontMatrix.a;
@@ -112,12 +112,12 @@ CPDF_Type3Char* CPDF_Type3Font::LoadChar(uint32_t charcode) {
if (it != m_CacheMap.end())
return it->second.get();
- FX_FLOAT scale = m_FontMatrix.GetXUnit();
+ float scale = m_FontMatrix.GetXUnit();
pNewChar->m_Width = (int32_t)(pNewChar->m_Width * scale + 0.5f);
FX_RECT& rcBBox = pNewChar->m_BBox;
CFX_FloatRect char_rect(
- (FX_FLOAT)rcBBox.left / 1000.0f, (FX_FLOAT)rcBBox.bottom / 1000.0f,
- (FX_FLOAT)rcBBox.right / 1000.0f, (FX_FLOAT)rcBBox.top / 1000.0f);
+ (float)rcBBox.left / 1000.0f, (float)rcBBox.bottom / 1000.0f,
+ (float)rcBBox.right / 1000.0f, (float)rcBBox.top / 1000.0f);
if (rcBBox.right <= rcBBox.left || rcBBox.bottom >= rcBBox.top)
char_rect = pNewChar->m_pForm->CalcBoundingBox();