]>
Commit | Line | Data |
---|---|---|
1 | /* | |
2 | * | |
3 | * (C) Copyright IBM Corp. 1998 - 2013 - All Rights Reserved | |
4 | * | |
5 | */ | |
6 | ||
7 | #include "LETypes.h" | |
8 | #include "LEGlyphFilter.h" | |
9 | #include "GDEFMarkFilter.h" | |
10 | #include "GlyphDefinitionTables.h" | |
11 | ||
12 | U_NAMESPACE_BEGIN | |
13 | ||
14 | GDEFMarkFilter::GDEFMarkFilter(const LEReferenceTo<GlyphDefinitionTableHeader> &gdefTable, LEErrorCode &success) | |
15 | : classDefTable(gdefTable->getGlyphClassDefinitionTable(gdefTable, success)) | |
16 | { | |
17 | if(!classDefTable.isValid()) { | |
18 | success = LE_INTERNAL_ERROR; | |
19 | } | |
20 | } | |
21 | ||
22 | GDEFMarkFilter::~GDEFMarkFilter() | |
23 | { | |
24 | // nothing to do? | |
25 | } | |
26 | ||
27 | le_bool GDEFMarkFilter::accept(LEGlyphID glyph) const | |
28 | { | |
29 | le_int32 glyphClass = classDefTable->getGlyphClass(glyph); | |
30 | ||
31 | return glyphClass == gcdMarkGlyph; | |
32 | } | |
33 | ||
34 | U_NAMESPACE_END |