summaryrefslogtreecommitdiff
path: root/core/fpdfapi/font/cfx_cttgsubtable.h
diff options
context:
space:
mode:
authorNicolas Pena <npm@chromium.org>2017-11-29 16:05:10 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-29 16:05:10 +0000
commit97b4b48685b7624cc69f73f9c57bb9e23159c8ec (patch)
tree0b77ad684504308764360e14b092554cb4cd3068 /core/fpdfapi/font/cfx_cttgsubtable.h
parentc0062b913cf7e45fc398ac96d83777ae8812f9a7 (diff)
downloadpdfium-97b4b48685b7624cc69f73f9c57bb9e23159c8ec.tar.xz
Remove unneded structs from CFX_CTTGSUBTable part 1
This CL removes some useless structs from CFX_CTTGSUBTable. Change-Id: Iaf8b58d70b36d77fea73946c6b4279b15f5726e8 Reviewed-on: https://pdfium-review.googlesource.com/19710 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
Diffstat (limited to 'core/fpdfapi/font/cfx_cttgsubtable.h')
-rw-r--r--core/fpdfapi/font/cfx_cttgsubtable.h57
1 files changed, 7 insertions, 50 deletions
diff --git a/core/fpdfapi/font/cfx_cttgsubtable.h b/core/fpdfapi/font/cfx_cttgsubtable.h
index f8fd6c5c5e..fc8d125f3e 100644
--- a/core/fpdfapi/font/cfx_cttgsubtable.h
+++ b/core/fpdfapi/font/cfx_cttgsubtable.h
@@ -19,21 +19,12 @@
class CFX_CTTGSUBTable {
public:
CFX_CTTGSUBTable();
- explicit CFX_CTTGSUBTable(FT_Bytes gsub);
- virtual ~CFX_CTTGSUBTable();
+ ~CFX_CTTGSUBTable();
- bool IsOk() const;
bool LoadGSUBTable(FT_Bytes gsub);
bool GetVerticalGlyph(uint32_t glyphnum, uint32_t* vglyphnum);
private:
- struct tt_gsub_header {
- uint32_t Version;
- uint16_t ScriptList;
- uint16_t FeatureList;
- uint16_t LookupList;
- };
-
struct TLangSys {
TLangSys();
~TLangSys();
@@ -81,17 +72,6 @@ class CFX_CTTGSUBTable {
TScriptRecord& operator=(const TScriptRecord&) = delete;
};
- struct TScriptList {
- TScriptList();
- ~TScriptList();
-
- std::vector<TScriptRecord> ScriptRecords;
-
- private:
- TScriptList(const TScriptList&) = delete;
- TScriptList& operator=(const TScriptList&) = delete;
- };
-
struct TFeature {
TFeature();
~TFeature();
@@ -115,17 +95,6 @@ class CFX_CTTGSUBTable {
TFeatureRecord& operator=(const TFeatureRecord&) = delete;
};
- struct TFeatureList {
- TFeatureList();
- ~TFeatureList();
-
- std::vector<TFeatureRecord> FeatureRecords;
-
- private:
- TFeatureList(const TFeatureList&) = delete;
- TFeatureList& operator=(const TFeatureList&) = delete;
- };
-
enum TLookupFlag {
LOOKUPFLAG_RightToLeft = 0x0001,
LOOKUPFLAG_IgnoreBaseGlyphs = 0x0002,
@@ -245,24 +214,13 @@ class CFX_CTTGSUBTable {
TLookup& operator=(const TLookup&) = delete;
};
- struct TLookupList {
- TLookupList();
- ~TLookupList();
-
- std::vector<TLookup> Lookups;
-
- private:
- TLookupList(const TLookupList&) = delete;
- TLookupList& operator=(const TLookupList&) = delete;
- };
-
bool Parse(FT_Bytes scriptlist, FT_Bytes featurelist, FT_Bytes lookuplist);
- void ParseScriptList(FT_Bytes raw, TScriptList* rec);
+ void ParseScriptList(FT_Bytes raw);
void ParseScript(FT_Bytes raw, TScript* rec);
void ParseLangSys(FT_Bytes raw, TLangSys* rec);
- void ParseFeatureList(FT_Bytes raw, TFeatureList* rec);
+ void ParseFeatureList(FT_Bytes raw);
void ParseFeature(FT_Bytes raw, TFeature* rec);
- void ParseLookupList(FT_Bytes raw, TLookupList* rec);
+ void ParseLookupList(FT_Bytes raw);
void ParseLookup(FT_Bytes raw, TLookup* rec);
std::unique_ptr<TCoverageFormatBase> ParseCoverage(FT_Bytes raw);
void ParseCoverageFormat1(FT_Bytes raw, TCoverageFormat1* rec);
@@ -288,10 +246,9 @@ class CFX_CTTGSUBTable {
std::set<uint32_t> m_featureSet;
bool m_bFeautureMapLoad;
bool loaded;
- tt_gsub_header header;
- TScriptList ScriptList;
- TFeatureList FeatureList;
- TLookupList LookupList;
+ std::vector<TScriptRecord> ScriptList;
+ std::vector<TFeatureRecord> FeatureList;
+ std::vector<TLookup> LookupList;
};
#endif // CORE_FPDFAPI_FONT_CFX_CTTGSUBTABLE_H_