summaryrefslogtreecommitdiff
path: root/fpdfsdk/pdfwindow/PWL_FontMap.h
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2017-06-02 15:27:22 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-06-02 23:02:09 +0000
commit633a3b7b908031ca0db12d7694d6a09715fc6143 (patch)
tree7ddc360a051b92f196693dc200045fecdf47c849 /fpdfsdk/pdfwindow/PWL_FontMap.h
parent12eea8135482911c054e53b482b4176cbd629d97 (diff)
downloadpdfium-633a3b7b908031ca0db12d7694d6a09715fc6143.tar.xz
Rename PWL_FooBar files to cpwl_foo_bar.
Change-Id: I7ed0ba0acbbee291e285555974ebf50c0073668f Reviewed-on: https://pdfium-review.googlesource.com/6250 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fpdfsdk/pdfwindow/PWL_FontMap.h')
-rw-r--r--fpdfsdk/pdfwindow/PWL_FontMap.h96
1 files changed, 0 insertions, 96 deletions
diff --git a/fpdfsdk/pdfwindow/PWL_FontMap.h b/fpdfsdk/pdfwindow/PWL_FontMap.h
deleted file mode 100644
index ca3ab231bd..0000000000
--- a/fpdfsdk/pdfwindow/PWL_FontMap.h
+++ /dev/null
@@ -1,96 +0,0 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#ifndef FPDFSDK_PDFWINDOW_PWL_FONTMAP_H_
-#define FPDFSDK_PDFWINDOW_PWL_FONTMAP_H_
-
-#include <memory>
-#include <vector>
-
-#include "core/fpdfdoc/ipvt_fontmap.h"
-#include "core/fxcrt/fx_codepage.h"
-#include "core/fxge/fx_font.h"
-#include "fpdfsdk/fxedit/fx_edit.h"
-#include "public/fpdf_sysfontinfo.h"
-
-class CPDF_Document;
-class CFX_SystemHandler;
-
-struct CPWL_FontMap_Data {
- CPDF_Font* pFont;
- int32_t nCharset;
- CFX_ByteString sFontName;
-};
-
-struct CPWL_FontMap_Native {
- int32_t nCharset;
- CFX_ByteString sFontName;
-};
-
-class CPWL_FontMap : public IPVT_FontMap {
- public:
- explicit CPWL_FontMap(CFX_SystemHandler* pSystemHandler);
- ~CPWL_FontMap() override;
-
- // IPVT_FontMap
- CPDF_Font* GetPDFFont(int32_t nFontIndex) override;
- CFX_ByteString GetPDFFontAlias(int32_t nFontIndex) override;
- int32_t GetWordFontIndex(uint16_t word,
- int32_t nCharset,
- int32_t nFontIndex) override;
- int32_t CharCodeFromUnicode(int32_t nFontIndex, uint16_t word) override;
- int32_t CharSetFromUnicode(uint16_t word, int32_t nOldCharset) override;
-
- const CPWL_FontMap_Data* GetFontMapData(int32_t nIndex) const;
- static int32_t GetNativeCharset();
- CFX_ByteString GetNativeFontName(int32_t nCharset);
-
- static CFX_ByteString GetDefaultFontByCharset(int32_t nCharset);
- static const FPDF_CharsetFontMap defaultTTFMap[];
-
- protected:
- virtual void Initialize();
- virtual CPDF_Document* GetDocument();
- virtual CPDF_Font* FindFontSameCharset(CFX_ByteString* sFontAlias,
- int32_t nCharset);
- virtual void AddedFont(CPDF_Font* pFont, const CFX_ByteString& sFontAlias);
-
- bool KnowWord(int32_t nFontIndex, uint16_t word);
-
- void Empty();
- int32_t GetFontIndex(const CFX_ByteString& sFontName,
- int32_t nCharset,
- bool bFind);
- int32_t AddFontData(CPDF_Font* pFont,
- const CFX_ByteString& sFontAlias,
- int32_t nCharset = FX_CHARSET_Default);
-
- CFX_ByteString EncodeFontAlias(const CFX_ByteString& sFontName,
- int32_t nCharset);
- CFX_ByteString EncodeFontAlias(const CFX_ByteString& sFontName);
-
- std::vector<std::unique_ptr<CPWL_FontMap_Data>> m_Data;
- std::vector<std::unique_ptr<CPWL_FontMap_Native>> m_NativeFont;
-
- private:
- int32_t FindFont(const CFX_ByteString& sFontName,
- int32_t nCharset = FX_CHARSET_Default);
-
- CFX_ByteString GetNativeFont(int32_t nCharset);
- CPDF_Font* AddFontToDocument(CPDF_Document* pDoc,
- CFX_ByteString& sFontName,
- uint8_t nCharset);
- bool IsStandardFont(const CFX_ByteString& sFontName);
- CPDF_Font* AddStandardFont(CPDF_Document* pDoc, CFX_ByteString& sFontName);
- CPDF_Font* AddSystemFont(CPDF_Document* pDoc,
- CFX_ByteString& sFontName,
- uint8_t nCharset);
-
- std::unique_ptr<CPDF_Document> m_pPDFDoc;
- CFX_UnownedPtr<CFX_SystemHandler> const m_pSystemHandler;
-};
-
-#endif // FPDFSDK_PDFWINDOW_PWL_FONTMAP_H_