summaryrefslogtreecommitdiff
path: root/core/fpdfapi/font/cpdf_font.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-04-09 20:33:45 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-04-09 20:33:45 +0000
commite372ad7333bdd6bb0c579cf074843ef0c6f3414f (patch)
tree9928344d0def23d3fb070713a88947aceb6b5c71 /core/fpdfapi/font/cpdf_font.h
parent0d8e530fbf898c1ba1ba4d3d91aa17e3fd4d8317 (diff)
downloadpdfium-e372ad7333bdd6bb0c579cf074843ef0c6f3414f.tar.xz
Use ByteStringView / pdfium::span in CPDF font as appropriate.chromium/3393
Change-Id: I92c7ba605bf95a9023ad046b8dddebe0a0592802 Reviewed-on: https://pdfium-review.googlesource.com/29992 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fpdfapi/font/cpdf_font.h')
-rw-r--r--core/fpdfapi/font/cpdf_font.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/core/fpdfapi/font/cpdf_font.h b/core/fpdfapi/font/cpdf_font.h
index db99efdd1b..588fb66163 100644
--- a/core/fpdfapi/font/cpdf_font.h
+++ b/core/fpdfapi/font/cpdf_font.h
@@ -53,10 +53,9 @@ class CPDF_Font {
virtual bool IsVertWriting() const;
virtual bool IsUnicodeCompatible() const;
- virtual uint32_t GetNextChar(const char* pString,
- int nStrLen,
- int& offset) const;
- virtual int CountChar(const char* pString, int size) const;
+ virtual uint32_t GetNextChar(const ByteStringView& pString,
+ size_t& offset) const;
+ virtual size_t CountChar(const ByteStringView& pString) const;
virtual int AppendChar(char* buf, uint32_t charcode) const;
virtual int GlyphFromCharCode(uint32_t charcode, bool* pVertGlyph) = 0;
virtual int GlyphFromCharCodeExt(uint32_t charcode);
@@ -75,7 +74,7 @@ class CPDF_Font {
void GetFontBBox(FX_RECT& rect) const { rect = m_FontBBox; }
int GetTypeAscent() const { return m_Ascent; }
int GetTypeDescent() const { return m_Descent; }
- uint32_t GetStringWidth(const char* pString, int size);
+ uint32_t GetStringWidth(const ByteStringView& pString);
uint32_t FallbackFontFromCharcode(uint32_t charcode);
int FallbackGlyphFromCharcode(int fallbackFont, uint32_t charcode);