From 20c41a5a47b2460277897a1059789fc9e184e3ab Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Wed, 29 Aug 2018 23:53:53 +0000 Subject: Use pdfium::span<>/UnownedPtr in CFX_Font. Move some platform-specific ifdefs so the come last in each section as it is easier to read, perhaps. Change-Id: Ic1c2652c46ecebc63b66213735ed6d94737a7f32 Reviewed-on: https://pdfium-review.googlesource.com/41630 Commit-Queue: Tom Sepez Reviewed-by: Lei Zhang --- core/fxge/apple/fx_apple_platform.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'core/fxge/apple') diff --git a/core/fxge/apple/fx_apple_platform.cpp b/core/fxge/apple/fx_apple_platform.cpp index cafe44730c..aad97ee4cb 100644 --- a/core/fxge/apple/fx_apple_platform.cpp +++ b/core/fxge/apple/fx_apple_platform.cpp @@ -20,6 +20,7 @@ #include "core/fxge/cfx_gemodule.h" #include "core/fxge/cfx_renderdevice.h" #include "core/fxge/fx_freetype.h" +#include "third_party/base/span.h" #ifndef _SKIA_SUPPORT_ @@ -52,8 +53,8 @@ bool CGDrawGlyphRun(CGContextRef pContext, if (pFont->GetPsName() == "DFHeiStd-W5") return false; - pFont->SetPlatformFont( - quartz2d.CreateFont(pFont->GetFontData(), pFont->GetSize())); + pdfium::span span = pFont->GetFontSpan(); + pFont->SetPlatformFont(quartz2d.CreateFont(span.data(), span.size())); if (!pFont->GetPlatformFont()) return false; } -- cgit v1.2.3