filters
transform.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef TRANSFORM_H
00021 #define TRANSFORM_H
00022
00023 #include <qpair.h>
00024 #include "CharTypes.h"
00025
00026 namespace PDFImport
00027 {
00028
00029 enum CharType {
00030 Unknown = 0,
00031 Punctuation = 1,
00032 SymbolChar = 2,
00033 Digit = 3,
00034 Letter = 4,
00035
00036 Hyphen = 5,
00037 Bullet = 6,
00038 SuperScript = 7,
00039 SpecialSymbol = 8,
00040 Ligature = 13,
00041
00042
00043 Punctuation_Accent = 9,
00044 Accent = 10,
00045 Letter_CanHaveAccent = 11,
00046
00047 LatexSpecial = 12
00048
00049 };
00050
00051 inline bool isPunctuation(CharType type) {
00052 return ( type==Punctuation || type==Hyphen
00053 || type==Punctuation_Accent );
00054 }
00055 inline bool isSymbol(CharType type) {
00056 return ( type==SymbolChar || type==Hyphen || type==Bullet
00057 || type==SpecialSymbol || type==Accent
00058 || type==LatexSpecial );
00059 }
00060 inline bool isLetter(CharType type) {
00061 return ( type==Letter || type==Letter_CanHaveAccent );
00062 }
00063 inline bool isAlphaNumeric(CharType type) {
00064 return ( type==Digit || isLetter(type) );
00065 }
00066 inline bool isAccent(CharType type) {
00067 return ( type==Punctuation_Accent || type==Accent );
00068 }
00069
00070 CharType type(Unicode);
00071
00072 enum { MaxLigatureLength = 3 };
00073 uint checkLigature(Unicode, Unicode res[MaxLigatureLength]);
00074
00075 CharType checkSpecial(Unicode, Unicode &res);
00076
00077
00078
00079 Unicode checkCombi(Unicode letter, Unicode accent);
00080 }
00081
00082 #endif
|