]> git.saurik.com Git - apple/icu.git/blame - icuSources/layout/CharSubstitutionFilter.h
ICU-491.11.2.tar.gz
[apple/icu.git] / icuSources / layout / CharSubstitutionFilter.h
CommitLineData
374ca955
A
1/*
2 *
3 * (C) Copyright IBM Corp. 1998-2004 - All Rights Reserved
4 *
5 */
6
7#ifndef __CHARSUBSTITUTIONFILTER_H
8#define __CHARSUBSTITUTIONFILTER_H
9
10#include "LETypes.h"
11#include "LEGlyphFilter.h"
12
13U_NAMESPACE_BEGIN
14
15class LEFontInstance;
16
17/**
18 * This filter is used by character-based GSUB processors. It
19 * accepts only those characters which the given font can display.
20 *
21 * @internal
22 */
23class CharSubstitutionFilter : public UMemory, public LEGlyphFilter
24{
25private:
26 /**
27 * Holds the font which is used to test the characters.
28 *
29 * @internal
30 */
31 const LEFontInstance *fFontInstance;
32
33 /**
34 * The copy constructor. Not allowed!
35 *
36 * @internal
37 */
38 CharSubstitutionFilter(const CharSubstitutionFilter &other); // forbid copying of this class
39
40 /**
41 * The replacement operator. Not allowed!
42 *
43 * @internal
44 */
45 CharSubstitutionFilter &operator=(const CharSubstitutionFilter &other); // forbid copying of this class
46
47public:
48 /**
49 * The constructor.
50 *
51 * @param fontInstance - the font to use to test the characters.
52 *
53 * @internal
54 */
55 CharSubstitutionFilter(const LEFontInstance *fontInstance);
56
57 /**
58 * The destructor.
59 *
60 * @internal
61 */
62 ~CharSubstitutionFilter();
63
64 /**
65 * This method is used to test if a particular
66 * character can be displayed by the filter's
67 * font.
68 *
69 * @param glyph - the Unicode character code to be tested
70 *
71 * @return TRUE if the filter's font can display this character.
72 *
73 * @internal
74 */
75 le_bool accept(LEGlyphID glyph) const;
76};
77
78U_NAMESPACE_END
79#endif
80
81