00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108 #ifndef INC_CCPANOSE
00109 #define INC_CCPANOSE
00110
00111 #if !defined(__WXMSW__)
00112 struct PANOSE
00113 {
00114 BYTE bFamilyType;
00115 BYTE bSerifStyle;
00116 BYTE bWeight;
00117 BYTE bProportion;
00118 BYTE bContrast;
00119 BYTE bStrokeVariation;
00120 BYTE bArmStyle;
00121 BYTE bLetterform;
00122 BYTE bMidline;
00123 BYTE bXHeight;
00124 };
00125 typedef PANOSE *LPPANOSE;
00126
00127 #define PAN_ANY 0
00128 #define PAN_NO_FIT 1
00129
00130 #define PAN_FAMILY_TEXT_DISPLAY 2
00131 #define PAN_FAMILY_SCRIPT 3
00132 #define PAN_FAMILY_DECORATIVE 4
00133 #define PAN_FAMILY_PICTORIAL 5
00134
00135 #define PAN_SERIF_COVE 2
00136 #define PAN_SERIF_OBTUSE_COVE 3
00137 #define PAN_SERIF_SQUARE_COVE 4
00138 #define PAN_SERIF_OBTUSE_SQUARE_COVE 5
00139 #define PAN_SERIF_SQUARE 6
00140 #define PAN_SERIF_THIN 7
00141 #define PAN_SERIF_BONE 8
00142 #define PAN_SERIF_EXAGGERATED 9
00143 #define PAN_SERIF_TRIANGLE 10
00144 #define PAN_SERIF_NORMAL_SANS 11
00145 #define PAN_SERIF_OBTUSE_SANS 12
00146 #define PAN_SERIF_PERP_SANS 13
00147 #define PAN_SERIF_FLARED 14
00148 #define PAN_SERIF_ROUNDED 15
00149
00150 #define PAN_WEIGHT_VERY_LIGHT 2
00151 #define PAN_WEIGHT_LIGHT 3
00152 #define PAN_WEIGHT_THIN 4
00153 #define PAN_WEIGHT_BOOK 5
00154 #define PAN_WEIGHT_MEDIUM 6
00155 #define PAN_WEIGHT_DEMI 7
00156 #define PAN_WEIGHT_BOLD 8
00157 #define PAN_WEIGHT_HEAVY 9
00158 #define PAN_WEIGHT_BLACK 10
00159 #define PAN_WEIGHT_NORD 11
00160
00161 #define PAN_PROP_OLD_STYLE 2
00162 #define PAN_PROP_MODERN 3
00163 #define PAN_PROP_EVEN_WIDTH 4
00164 #define PAN_PROP_EXPANDED 5
00165 #define PAN_PROP_CONDENSED 6
00166 #define PAN_PROP_VERY_EXPANDED 7
00167 #define PAN_PROP_VERY_CONDENSED 8
00168 #define PAN_PROP_MONOSPACED 9
00169
00170 #define PAN_CONTRAST_NONE 2
00171 #define PAN_CONTRAST_VERY_LOW 3
00172 #define PAN_CONTRAST_LOW 4
00173 #define PAN_CONTRAST_MEDIUM_LOW 5
00174 #define PAN_CONTRAST_MEDIUM 6
00175 #define PAN_CONTRAST_MEDIUM_HIGH 7
00176 #define PAN_CONTRAST_HIGH 8
00177 #define PAN_CONTRAST_VERY_HIGH 9
00178
00179 #define PAN_STROKE_GRADUAL_DIAG 2
00180 #define PAN_STROKE_GRADUAL_TRAN 3
00181 #define PAN_STROKE_GRADUAL_VERT 4
00182 #define PAN_STROKE_GRADUAL_HORZ 5
00183 #define PAN_STROKE_RAPID_VERT 6
00184 #define PAN_STROKE_RAPID_HORZ 7
00185 #define PAN_STROKE_INSTANT_VERT 8
00186
00187 #define PAN_STRAIGHT_ARMS_HORZ 2
00188 #define PAN_STRAIGHT_ARMS_WEDGE 3
00189 #define PAN_STRAIGHT_ARMS_VERT 4
00190 #define PAN_STRAIGHT_ARMS_SINGLE_SERIF 5
00191 #define PAN_STRAIGHT_ARMS_DOUBLE_SERIF 6
00192 #define PAN_BENT_ARMS_HORZ 7
00193 #define PAN_BENT_ARMS_WEDGE 8
00194 #define PAN_BENT_ARMS_VERT 9
00195 #define PAN_BENT_ARMS_SINGLE_SERIF 10
00196 #define PAN_BENT_ARMS_DOUBLE_SERIF 11
00197
00198 #define PAN_LETT_NORMAL_CONTACT 2
00199 #define PAN_LETT_NORMAL_WEIGHTED 3
00200 #define PAN_LETT_NORMAL_BOXED 4
00201 #define PAN_LETT_NORMAL_FLATTENED 5
00202 #define PAN_LETT_NORMAL_ROUNDED 6
00203 #define PAN_LETT_NORMAL_OFF_CENTER 7
00204 #define PAN_LETT_NORMAL_SQUARE 8
00205 #define PAN_LETT_OBLIQUE_CONTACT 9
00206 #define PAN_LETT_OBLIQUE_WEIGHTED 10
00207 #define PAN_LETT_OBLIQUE_BOXED 11
00208 #define PAN_LETT_OBLIQUE_FLATTENED 12
00209 #define PAN_LETT_OBLIQUE_ROUNDED 13
00210 #define PAN_LETT_OBLIQUE_OFF_CENTER 14
00211 #define PAN_LETT_OBLIQUE_SQUARE 15
00212
00213 #define PAN_MIDLINE_STANDARD_TRIMMED 2
00214 #define PAN_MIDLINE_STANDARD_POINTED 3
00215 #define PAN_MIDLINE_STANDARD_SERIFED 4
00216 #define PAN_MIDLINE_HIGH_TRIMMED 5
00217 #define PAN_MIDLINE_HIGH_POINTED 6
00218 #define PAN_MIDLINE_HIGH_SERIFED 7
00219 #define PAN_MIDLINE_CONSTANT_TRIMMED 8
00220 #define PAN_MIDLINE_CONSTANT_POINTED 9
00221 #define PAN_MIDLINE_CONSTANT_SERIFED 10
00222 #define PAN_MIDLINE_LOW_TRIMMED 11
00223 #define PAN_MIDLINE_LOW_POINTED 12
00224 #define PAN_MIDLINE_LOW_SERIFED 13
00225
00226 #define PAN_XHEIGHT_CONSTANT_SMALL 2
00227 #define PAN_XHEIGHT_CONSTANT_STD 3
00228 #define PAN_XHEIGHT_CONSTANT_LARGE 4
00229 #define PAN_XHEIGHT_DUCKING_SMALL 5
00230 #define PAN_XHEIGHT_DUCKING_STD 6
00231 #define PAN_XHEIGHT_DUCKING_LARGE 7
00232
00233 struct OUTLINETEXTMETRIC
00234 {
00235 PANOSE otmPanoseNumber;
00236 };
00237 #endif
00238
00239
00240
00241
00242
00243
00244
00245
00246
00247
00248
00249
00250
00251 class CCPanose : public CCObject
00252 {
00253 CC_DECLARE_DYNCREATE(CCPanose)
00254
00255
00256 private:
00257
00258
00259 BYTE mFamilyType;
00260 BYTE mSerifStyle;
00261 BYTE mWeight;
00262 BYTE mProportion;
00263 BYTE mContrast;
00264 BYTE mStrokeVariation;
00265 BYTE mArmStyle;
00266 BYTE mLetterform;
00267 BYTE mMidline;
00268 BYTE mXHeight;
00269
00270
00271 public:
00272 CCPanose();
00273 CCPanose(const PANOSE &PanoseNumber);
00274
00275
00276 public:
00277 void SetAllToAny();
00278 void SetAll(BYTE, BYTE, BYTE, BYTE, BYTE, BYTE, BYTE, BYTE, BYTE, BYTE);
00279 void operator=(const CCPanose & x);
00280
00281 BOOL BodgePanoseNumber(BOOL Bold, BOOL Italic);
00282 BOOL BodgeToNormal();
00283
00284
00285 public:
00286 static UINT32 Distance(const CCPanose &x, const CCPanose &y);
00287 private:
00288 static UINT32 DistanceFamilyType(BYTE x, BYTE y);
00289 static UINT32 DistanceSerifStyle(BYTE x, BYTE y);
00290 static UINT32 DistanceWeight(BYTE x, BYTE y);
00291 static UINT32 DistanceProportion(BYTE x, BYTE y);
00292 static UINT32 DistanceContrast(BYTE x, BYTE y);
00293 static UINT32 DistanceStrokeVariation(BYTE x, BYTE y);
00294 static UINT32 DistanceArmStyle(BYTE x, BYTE y);
00295 static UINT32 DistanceLetterform(BYTE x, BYTE y);
00296 static UINT32 DistanceMidline(BYTE x, BYTE y);
00297 static UINT32 DistanceXHeight(BYTE x, BYTE y);
00298
00299
00300
00301 public:
00302 void SetFamilyType(BYTE value) {mFamilyType = value;};
00303 void SetSerifStyle(BYTE value) {mSerifStyle = value;};
00304 void SetWeight(BYTE value) {mWeight = value;};
00305 void SetProportion(BYTE value) {mProportion = value;};
00306 void SetContrast(BYTE value) {mContrast = value;};
00307 void SetStrokeVariation(BYTE value) {mStrokeVariation = value;};
00308 void SetArmStyle(BYTE value) {mArmStyle = value;};
00309 void SetLetterform(BYTE value) {mLetterform = value;};
00310 void SetMidline(BYTE value) {mMidline = value;};
00311 void SetXHeight(BYTE value) {mXHeight = value;};
00312
00313 BYTE GetFamilyType() const {return mFamilyType;};
00314 BYTE GetSerifStyle() const {return mSerifStyle;};
00315 BYTE GetWeight() const {return mWeight;};
00316 BYTE GetProportion() const {return mProportion;};
00317 BYTE GetContrast() const {return mContrast;};
00318 BYTE GetStrokeVariation() const {return mStrokeVariation;};
00319 BYTE GetArmStyle() const {return mArmStyle;};
00320 BYTE GetLetterform() const {return mLetterform;};
00321 BYTE GetMidline() const {return mMidline;};
00322 BYTE GetXHeight() const {return mXHeight;};
00323
00324 public:
00325
00326 void GetDebugDetails(StringBase * Str);
00327 };
00328
00329 #endif