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 #include "camtypes.h"
00109 #include "ccpanose.h"
00110
00111 CC_IMPLEMENT_DYNCREATE( CCPanose, CCObject )
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125 CCPanose::CCPanose()
00126 {
00127 SetAllToAny();
00128 }
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142 CCPanose::CCPanose(const PANOSE &PanoseNumber)
00143 {
00144 mFamilyType = PanoseNumber.bFamilyType;
00145 mSerifStyle = PanoseNumber.bSerifStyle;
00146 mWeight = PanoseNumber.bWeight;
00147 mProportion = PanoseNumber.bProportion;
00148 mContrast = PanoseNumber.bContrast;
00149 mStrokeVariation = PanoseNumber.bStrokeVariation;
00150 mArmStyle = PanoseNumber.bArmStyle;
00151 mLetterform = PanoseNumber.bLetterform;
00152 mMidline = PanoseNumber.bMidline;
00153 mXHeight = PanoseNumber.bXHeight;
00154 }
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167
00168 void CCPanose::SetAllToAny()
00169 {
00170 SetAll(PAN_ANY, PAN_ANY, PAN_ANY, PAN_ANY, PAN_ANY, PAN_ANY, PAN_ANY, PAN_ANY, PAN_ANY, PAN_ANY);
00171 }
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195 void CCPanose::SetAll(
00196 BYTE FamilyType,
00197 BYTE SerifStyle,
00198 BYTE Weight,
00199 BYTE Proportion,
00200 BYTE Contrast,
00201 BYTE StrokeVariation,
00202 BYTE ArmStyle,
00203 BYTE LetterForm,
00204 BYTE Midline,
00205 BYTE XHeight)
00206 {
00207 mFamilyType = FamilyType;
00208 mSerifStyle = SerifStyle;
00209 mWeight = Weight;
00210 mProportion = Proportion;
00211 mContrast = Contrast;
00212 mStrokeVariation = StrokeVariation;
00213 mArmStyle = ArmStyle;
00214 mLetterform = LetterForm;
00215 mMidline = Midline;
00216 mXHeight = XHeight;
00217 }
00218
00219
00220
00221
00222
00223
00224
00225
00226
00227
00228
00229
00230
00231 void CCPanose::operator=(const CCPanose & x)
00232 {
00233 this->mFamilyType = x.mFamilyType;
00234 this->mSerifStyle = x.mSerifStyle;
00235 this->mWeight = x.mWeight;
00236 this->mProportion = x.mProportion;
00237 this->mContrast = x.mContrast;
00238 this->mStrokeVariation = x.mStrokeVariation;
00239 this->mArmStyle = x.mArmStyle;
00240 this->mLetterform = x.mLetterform;
00241 this->mMidline = x.mMidline;
00242 this->mXHeight = x.mXHeight;
00243 }
00244
00245
00246
00247
00248
00249
00250
00251
00252
00253
00254
00255
00256
00257
00258 BOOL CCPanose::BodgePanoseNumber(BOOL IsBold, BOOL IsItalic)
00259 {
00260 if (mFamilyType != PAN_FAMILY_PICTORIAL)
00261 {
00262
00263
00264 if (IsBold==FALSE)
00265 {
00266
00267 if (mWeight==PAN_ANY || mWeight==PAN_NO_FIT || mWeight>PAN_WEIGHT_MEDIUM)
00268 {
00269 mWeight=PAN_WEIGHT_MEDIUM;
00270 }
00271 }
00272 else
00273 {
00274
00275 if (mWeight==PAN_ANY || mWeight==PAN_NO_FIT || mWeight<PAN_WEIGHT_BOLD)
00276 {
00277 mWeight=PAN_WEIGHT_BOLD;
00278 }
00279 }
00280
00281 if (IsItalic==FALSE)
00282 {
00283
00284 if (mLetterform==PAN_ANY || mLetterform==PAN_NO_FIT)
00285 {
00286 mLetterform=PAN_LETT_NORMAL_CONTACT;
00287 }
00288 else if (mLetterform>=PAN_LETT_OBLIQUE_CONTACT && mLetterform<=PAN_LETT_OBLIQUE_SQUARE)
00289 {
00290 mLetterform=mLetterform-7;
00291 }
00292 }
00293 else
00294 {
00295
00296 if (mLetterform==PAN_ANY || mLetterform==PAN_NO_FIT)
00297 {
00298 mLetterform=PAN_LETT_OBLIQUE_CONTACT;
00299 }
00300 else if (mLetterform>=PAN_LETT_NORMAL_CONTACT && mLetterform<=PAN_LETT_NORMAL_SQUARE)
00301 {
00302 mLetterform=mLetterform+7;
00303 }
00304 }
00305
00306 }
00307
00308 return TRUE;
00309 }
00310
00311
00312
00313
00314
00315
00316
00317
00318
00319
00320
00321
00322
00323
00324 BOOL CCPanose::BodgeToNormal()
00325 {
00326 return BodgePanoseNumber(FALSE, FALSE);
00327 }
00328
00329
00330
00331
00332
00333
00334
00335
00336
00337
00338
00339
00340
00341
00342
00343
00344
00345
00346
00347
00348
00349
00350
00351
00352 UINT32 CCPanose::Distance(const CCPanose &x, const CCPanose &y)
00353 {
00354 UINT32 Distance = 0;
00355
00356 Distance += DistanceFamilyType(x.mFamilyType, y.mFamilyType);
00357 Distance += DistanceSerifStyle(x.mSerifStyle, y.mSerifStyle);
00358 Distance += DistanceWeight(x.mWeight, y.mWeight);
00359 Distance += DistanceProportion(x.mProportion, y.mProportion);
00360 Distance += DistanceContrast(x.mContrast, y.mContrast);
00361 Distance += DistanceStrokeVariation(x.mStrokeVariation, y.mStrokeVariation);
00362 Distance += DistanceArmStyle(x.mArmStyle, y.mArmStyle);
00363 Distance += DistanceLetterform(x.mLetterform, y.mLetterform);
00364 Distance += DistanceMidline(x.mMidline, y.mMidline);
00365 Distance += DistanceXHeight(x.mXHeight, y.mXHeight);
00366
00367 return Distance;
00368 }
00369
00370 UINT32 CCPanose::DistanceFamilyType(BYTE x, BYTE y)
00371 {
00372
00373
00374
00375
00376
00377
00378
00379
00380
00381
00382
00383
00384
00385 const static UINT32 Metric[6][6] = {
00386 {0x00010000, 0x00100000, 0x00001000, 0x00001000, 0x00001000, 0x00001000},
00387 {0x00100000, 0x10000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000},
00388 {0x00001000, 0x01000000, 0x00000000, 0x000000ff, 0x000000ff, 0x000000ff},
00389 {0x00001000, 0x01000000, 0x000000ff, 0x00000000, 0x000000ff, 0x000000ff},
00390 {0x00001000, 0x01000000, 0x000000ff, 0x000000ff, 0x00000000, 0x000000ff},
00391 {0x00001000, 0x01000000, 0x000000ff, 0x000000ff, 0x000000ff, 0x00000000}};
00392
00393 if ( x>5) x = 1;
00394 if ( y>5) y = 1;
00395
00396 return Metric[x][y];
00397 }
00398
00399 UINT32 CCPanose::DistanceSerifStyle(BYTE x, BYTE y)
00400 {
00401 const static UINT32 Metric[16][16] = {
00402 {0x00010000, 0x00100000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000},
00403 {0x00100000, 0x10000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000},
00404 {0x00001000, 0x01000000, 0x00000000, 0x00000004, 0x00000004, 0x00000004, 0x00000010, 0x00000010, 0x00000010, 0x00000010, 0x00000010, 0x00000040, 0x00000040, 0x00000040, 0x00000010, 0x00000010},
00405 {0x00001000, 0x01000000, 0x00000004, 0x00000000, 0x00000004, 0x00000004, 0x00000010, 0x00000010, 0x00000010, 0x00000010, 0x00000010, 0x00000040, 0x00000040, 0x00000040, 0x00000010, 0x00000010},
00406 {0x00001000, 0x01000000, 0x00000004, 0x00000004, 0x00000000, 0x00000004, 0x00000010, 0x00000010, 0x00000010, 0x00000010, 0x00000010, 0x00000040, 0x00000040, 0x00000040, 0x00000010, 0x00000010},
00407 {0x00001000, 0x01000000, 0x00000004, 0x00000004, 0x00000004, 0x00000000, 0x00000010, 0x00000010, 0x00000010, 0x00000010, 0x00000010, 0x00000040, 0x00000040, 0x00000040, 0x00000010, 0x00000010},
00408 {0x00001000, 0x01000000, 0x00000010, 0x00000010, 0x00000010, 0x00000010, 0x00000000, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000040, 0x00000040, 0x00000040, 0x00000020, 0x00000020},
00409 {0x00001000, 0x01000000, 0x00000010, 0x00000010, 0x00000010, 0x00000010, 0x00000020, 0x00000000, 0x00000020, 0x00000020, 0x00000020, 0x00000040, 0x00000040, 0x00000040, 0x00000020, 0x00000020},
00410 {0x00001000, 0x01000000, 0x00000010, 0x00000010, 0x00000010, 0x00000010, 0x00000020, 0x00000020, 0x00000000, 0x00000020, 0x00000020, 0x00000040, 0x00000040, 0x00000040, 0x00000020, 0x00000020},
00411 {0x00001000, 0x01000000, 0x00000010, 0x00000010, 0x00000010, 0x00000010, 0x00000020, 0x00000020, 0x00000020, 0x00000000, 0x00000020, 0x00000040, 0x00000040, 0x00000040, 0x00000020, 0x00000020},
00412 {0x00001000, 0x01000000, 0x00000010, 0x00000010, 0x00000010, 0x00000010, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000000, 0x00000040, 0x00000040, 0x00000040, 0x00000020, 0x00000020},
00413 {0x00001000, 0x01000000, 0x00000040, 0x00000040, 0x00000040, 0x00000040, 0x00000040, 0x00000040, 0x00000040, 0x00000040, 0x00000040, 0x00000000, 0x00000010, 0x00000010, 0x00000040, 0x00000040},
00414 {0x00001000, 0x01000000, 0x00000040, 0x00000040, 0x00000040, 0x00000040, 0x00000040, 0x00000040, 0x00000040, 0x00000040, 0x00000040, 0x00000010, 0x00000000, 0x00000010, 0x00000040, 0x00000040},
00415 {0x00001000, 0x01000000, 0x00000040, 0x00000040, 0x00000040, 0x00000040, 0x00000040, 0x00000040, 0x00000040, 0x00000040, 0x00000040, 0x00000010, 0x00000010, 0x00000000, 0x00000040, 0x00000040},
00416 {0x00001000, 0x01000000, 0x00000010, 0x00000010, 0x00000010, 0x00000010, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000040, 0x00000040, 0x00000040, 0x00000000, 0x00000020},
00417 {0x00001000, 0x01000000, 0x00000010, 0x00000010, 0x00000010, 0x00000010, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000040, 0x00000040, 0x00000040, 0x00000020, 0x00000000}};
00418
00419 if ( x>15) x = 1;
00420 if ( y>15) y = 1;
00421
00422 return Metric[x][y];
00423 }
00424
00425 UINT32 CCPanose::DistanceWeight(BYTE x, BYTE y)
00426 {
00427 const static UINT32 Metric[12][12] = {
00428 {0x00010000, 0x00100000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000},
00429 {0x00100000, 0x10000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000},
00430 {0x00001000, 0x01000000, 0x00000000, 0x00000001, 0x00000004, 0x00000009, 0x00000010, 0x00000019, 0x00000024, 0x00000031, 0x00000040, 0x00000051},
00431 {0x00001000, 0x01000000, 0x00000001, 0x00000000, 0x00000001, 0x00000004, 0x00000009, 0x00000010, 0x00000019, 0x00000024, 0x00000031, 0x00000040},
00432 {0x00001000, 0x01000000, 0x00000004, 0x00000001, 0x00000000, 0x00000001, 0x00000004, 0x00000009, 0x00000010, 0x00000019, 0x00000024, 0x00000031},
00433 {0x00001000, 0x01000000, 0x00000009, 0x00000004, 0x00000001, 0x00000000, 0x00000001, 0x00000004, 0x00000009, 0x00000010, 0x00000019, 0x00000024},
00434 {0x00001000, 0x01000000, 0x00000010, 0x00000009, 0x00000004, 0x00000001, 0x00000000, 0x00000001, 0x00000004, 0x00000009, 0x00000010, 0x00000019},
00435 {0x00001000, 0x01000000, 0x00000019, 0x00000010, 0x00000009, 0x00000004, 0x00000001, 0x00000000, 0x00000001, 0x00000004, 0x00000009, 0x00000010},
00436 {0x00001000, 0x01000000, 0x00000024, 0x00000019, 0x00000010, 0x00000009, 0x00000004, 0x00000001, 0x00000000, 0x00000001, 0x00000004, 0x00000009},
00437 {0x00001000, 0x01000000, 0x00000031, 0x00000024, 0x00000019, 0x00000010, 0x00000009, 0x00000004, 0x00000001, 0x00000000, 0x00000001, 0x00000004},
00438 {0x00001000, 0x01000000, 0x00000040, 0x00000031, 0x00000024, 0x00000019, 0x00000010, 0x00000009, 0x00000004, 0x00000001, 0x00000000, 0x00000001},
00439 {0x00001000, 0x01000000, 0x00000051, 0x00000040, 0x00000031, 0x00000024, 0x00000019, 0x00000010, 0x00000009, 0x00000004, 0x00000001, 0x00000000}};
00440
00441 if ( x>11) x = 1;
00442 if ( y>11) y = 1;
00443
00444 return Metric[x][y];
00445 }
00446
00447 UINT32 CCPanose::DistanceProportion(BYTE x, BYTE y)
00448 {
00449 const static UINT32 Metric[10][10] = {
00450 {0x00010000, 0x00100000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000},
00451 {0x00100000, 0x10000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000},
00452 {0x00001000, 0x01000000, 0x00000000, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000020},
00453 {0x00001000, 0x01000000, 0x00000020, 0x00000000, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000020},
00454 {0x00001000, 0x01000000, 0x00000020, 0x00000020, 0x00000000, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000020},
00455 {0x00001000, 0x01000000, 0x00000020, 0x00000020, 0x00000020, 0x00000000, 0x00000040, 0x00000004, 0x00000080, 0x00000040},
00456 {0x00001000, 0x01000000, 0x00000020, 0x00000020, 0x00000020, 0x00000040, 0x00000000, 0x00000080, 0x00000004, 0x00000040},
00457 {0x00001000, 0x01000000, 0x00000020, 0x00000020, 0x00000020, 0x00000004, 0x00000080, 0x00000000, 0x000000c0, 0x00000080},
00458 {0x00001000, 0x01000000, 0x00000020, 0x00000020, 0x00000020, 0x00000080, 0x00000004, 0x000000c0, 0x00000000, 0x00000080},
00459 {0x00001000, 0x01000000, 0x00000020, 0x00000020, 0x00000020, 0x00000040, 0x00000040, 0x00000080, 0x00000080, 0x00000000}};
00460
00461 if ( x>9) x = 1;
00462 if ( y>9) y = 1;
00463
00464 return Metric[x][y];
00465 }
00466
00467 UINT32 CCPanose::DistanceContrast(BYTE x, BYTE y)
00468 {
00469 const static UINT32 Metric[10][10] = {
00470 {0x00010000, 0x00100000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000},
00471 {0x00100000, 0x10000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000},
00472 {0x00001000, 0x01000000, 0x00000000, 0x00000001, 0x00000004, 0x00000009, 0x00000010, 0x00000019, 0x00000024, 0x00000031},
00473 {0x00001000, 0x01000000, 0x00000001, 0x00000000, 0x00000001, 0x00000004, 0x00000009, 0x00000010, 0x00000019, 0x00000024},
00474 {0x00001000, 0x01000000, 0x00000004, 0x00000001, 0x00000000, 0x00000001, 0x00000004, 0x00000009, 0x00000010, 0x00000019},
00475 {0x00001000, 0x01000000, 0x00000009, 0x00000004, 0x00000001, 0x00000000, 0x00000001, 0x00000004, 0x00000009, 0x00000010},
00476 {0x00001000, 0x01000000, 0x00000010, 0x00000009, 0x00000004, 0x00000001, 0x00000000, 0x00000001, 0x00000004, 0x00000009},
00477 {0x00001000, 0x01000000, 0x00000019, 0x00000010, 0x00000009, 0x00000004, 0x00000001, 0x00000000, 0x00000001, 0x00000004},
00478 {0x00001000, 0x01000000, 0x00000024, 0x00000019, 0x00000010, 0x00000009, 0x00000004, 0x00000001, 0x00000000, 0x00000001},
00479 {0x00001000, 0x01000000, 0x00000031, 0x00000024, 0x00000019, 0x00000010, 0x00000009, 0x00000004, 0x00000001, 0x00000000}};
00480
00481 if ( x>9) x = 1;
00482 if ( y>9) y = 1;
00483
00484 return Metric[x][y];
00485 }
00486
00487 UINT32 CCPanose::DistanceStrokeVariation(BYTE x, BYTE y)
00488 {
00489 const static UINT32 Metric[9][9] = {
00490 {0x00010000, 0x00100000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000},
00491 {0x00100000, 0x10000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000},
00492 {0x00001000, 0x01000000, 0x00000000, 0x00000010, 0x00000010, 0x00000010, 0x00000020, 0x00000020, 0x00000040},
00493 {0x00001000, 0x01000000, 0x00000010, 0x00000000, 0x00000010, 0x00000010, 0x00000020, 0x00000020, 0x00000040},
00494 {0x00001000, 0x01000000, 0x00000010, 0x00000010, 0x00000000, 0x00000010, 0x00000020, 0x00000020, 0x00000040},
00495 {0x00001000, 0x01000000, 0x00000010, 0x00000010, 0x00000010, 0x00000000, 0x00000020, 0x00000020, 0x00000040},
00496 {0x00001000, 0x01000000, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000000, 0x00000010, 0x00000020},
00497 {0x00001000, 0x01000000, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000010, 0x00000000, 0x00000020},
00498 {0x00001000, 0x01000000, 0x00000040, 0x00000040, 0x00000040, 0x00000040, 0x00000020, 0x00000020, 0x00000000}};
00499
00500 if ( x>8) x = 1;
00501 if ( y>8) y = 1;
00502
00503 return Metric[x][y];
00504 }
00505
00506 UINT32 CCPanose::DistanceArmStyle(BYTE x, BYTE y)
00507 {
00508 const static UINT32 Metric[12][12] = {
00509 {0x00010000, 0x00100000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000},
00510 {0x00100000, 0x10000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000},
00511 {0x00001000, 0x01000000, 0x00000000, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000010, 0x00000040, 0x00000040, 0x00000040, 0x00000040},
00512 {0x00001000, 0x01000000, 0x00000020, 0x00000000, 0x00000020, 0x00000020, 0x00000020, 0x00000040, 0x00000010, 0x00000040, 0x00000040, 0x00000040},
00513 {0x00001000, 0x01000000, 0x00000020, 0x00000020, 0x00000000, 0x00000020, 0x00000020, 0x00000040, 0x00000040, 0x00000010, 0x00000040, 0x00000040},
00514 {0x00001000, 0x01000000, 0x00000020, 0x00000020, 0x00000020, 0x00000000, 0x00000020, 0x00000040, 0x00000040, 0x00000040, 0x00000010, 0x00000040},
00515 {0x00001000, 0x01000000, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000000, 0x00000040, 0x00000040, 0x00000040, 0x00000040, 0x00000010},
00516 {0x00001000, 0x01000000, 0x00000010, 0x00000040, 0x00000040, 0x00000040, 0x00000040, 0x00000000, 0x00000020, 0x00000020, 0x00000020, 0x00000020},
00517 {0x00001000, 0x01000000, 0x00000040, 0x00000010, 0x00000040, 0x00000040, 0x00000040, 0x00000020, 0x00000000, 0x00000020, 0x00000020, 0x00000020},
00518 {0x00001000, 0x01000000, 0x00000040, 0x00000040, 0x00000010, 0x00000040, 0x00000040, 0x00000020, 0x00000020, 0x00000000, 0x00000020, 0x00000020},
00519 {0x00001000, 0x01000000, 0x00000040, 0x00000040, 0x00000040, 0x00000010, 0x00000040, 0x00000020, 0x00000020, 0x00000020, 0x00000000, 0x00000020},
00520 {0x00001000, 0x01000000, 0x00000040, 0x00000040, 0x00000040, 0x00000040, 0x00000010, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000000}};
00521
00522 if ( x>11) x = 1;
00523 if ( y>11) y = 1;
00524
00525 return Metric[x][y];
00526 }
00527
00528 UINT32 CCPanose::DistanceLetterform(BYTE x, BYTE y)
00529 {
00530 const static UINT32 Metric[16][16] = {
00531 {0x00010000, 0x00100000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000},
00532 {0x00100000, 0x10000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000},
00533 {0x00001000, 0x01000000, 0x00000000, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000010, 0x00000040, 0x00000040, 0x00000040, 0x00000040, 0x00000040, 0x00000040},
00534 {0x00001000, 0x01000000, 0x00000020, 0x00000000, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000040, 0x00000010, 0x00000040, 0x00000040, 0x00000040, 0x00000040, 0x00000040},
00535 {0x00001000, 0x01000000, 0x00000020, 0x00000020, 0x00000000, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000040, 0x00000040, 0x00000010, 0x00000040, 0x00000040, 0x00000040, 0x00000040},
00536 {0x00001000, 0x01000000, 0x00000020, 0x00000020, 0x00000020, 0x00000000, 0x00000020, 0x00000020, 0x00000020, 0x00000040, 0x00000040, 0x00000040, 0x00000010, 0x00000040, 0x00000040, 0x00000040},
00537 {0x00001000, 0x01000000, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000000, 0x00000020, 0x00000020, 0x00000040, 0x00000040, 0x00000040, 0x00000040, 0x00000010, 0x00000040, 0x00000040},
00538 {0x00001000, 0x01000000, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000000, 0x00000020, 0x00000040, 0x00000040, 0x00000040, 0x00000040, 0x00000040, 0x00000010, 0x00000040},
00539 {0x00001000, 0x01000000, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000000, 0x00000040, 0x00000040, 0x00000040, 0x00000040, 0x00000040, 0x00000040, 0x00000010},
00540 {0x00001000, 0x01000000, 0x00000010, 0x00000040, 0x00000040, 0x00000040, 0x00000040, 0x00000040, 0x00000040, 0x00000000, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000020},
00541 {0x00001000, 0x01000000, 0x00000040, 0x00000010, 0x00000040, 0x00000040, 0x00000040, 0x00000040, 0x00000040, 0x00000020, 0x00000000, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000020},
00542 {0x00001000, 0x01000000, 0x00000040, 0x00000040, 0x00000010, 0x00000040, 0x00000040, 0x00000040, 0x00000040, 0x00000020, 0x00000020, 0x00000000, 0x00000020, 0x00000020, 0x00000020, 0x00000020},
00543 {0x00001000, 0x01000000, 0x00000040, 0x00000040, 0x00000040, 0x00000010, 0x00000040, 0x00000040, 0x00000040, 0x00000020, 0x00000020, 0x00000020, 0x00000000, 0x00000020, 0x00000020, 0x00000020},
00544 {0x00001000, 0x01000000, 0x00000040, 0x00000040, 0x00000040, 0x00000040, 0x00000010, 0x00000040, 0x00000040, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000000, 0x00000020, 0x00000020},
00545 {0x00001000, 0x01000000, 0x00000040, 0x00000040, 0x00000040, 0x00000040, 0x00000040, 0x00000010, 0x00000040, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000000, 0x00000020},
00546 {0x00001000, 0x01000000, 0x00000040, 0x00000040, 0x00000040, 0x00000040, 0x00000040, 0x00000040, 0x00000010, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000000}};
00547
00548 if ( x>15) x = 1;
00549 if ( y>15) y = 1;
00550
00551 return Metric[x][y];
00552 }
00553
00554 UINT32 CCPanose::DistanceMidline(BYTE x, BYTE y)
00555 {
00556 const static UINT32 Metric[14][14] = {
00557 {0x00010000, 0x00100000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000},
00558 {0x00100000, 0x10000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000},
00559 {0x00001000, 0x01000000, 0x00000000, 0x00000010, 0x00000010, 0x00000020, 0x00000040, 0x00000040, 0x00000020, 0x00000040, 0x00000040, 0x00000020, 0x00000040, 0x00000040},
00560 {0x00001000, 0x01000000, 0x00000010, 0x00000000, 0x00000010, 0x00000040, 0x00000020, 0x00000040, 0x00000040, 0x00000020, 0x00000040, 0x00000040, 0x00000020, 0x00000040},
00561 {0x00001000, 0x01000000, 0x00000010, 0x00000010, 0x00000000, 0x00000040, 0x00000040, 0x00000020, 0x00000040, 0x00000040, 0x00000020, 0x00000040, 0x00000040, 0x00000020},
00562 {0x00001000, 0x01000000, 0x00000020, 0x00000040, 0x00000040, 0x00000000, 0x00000010, 0x00000010, 0x00000020, 0x00000040, 0x00000040, 0x00000020, 0x00000040, 0x00000040},
00563 {0x00001000, 0x01000000, 0x00000040, 0x00000020, 0x00000040, 0x00000010, 0x00000000, 0x00000010, 0x00000040, 0x00000020, 0x00000040, 0x00000040, 0x00000020, 0x00000040},
00564 {0x00001000, 0x01000000, 0x00000040, 0x00000040, 0x00000020, 0x00000010, 0x00000010, 0x00000000, 0x00000040, 0x00000040, 0x00000020, 0x00000040, 0x00000040, 0x00000020},
00565 {0x00001000, 0x01000000, 0x00000020, 0x00000040, 0x00000040, 0x00000020, 0x00000040, 0x00000040, 0x00000000, 0x00000010, 0x00000010, 0x00000020, 0x00000040, 0x00000040},
00566 {0x00001000, 0x01000000, 0x00000040, 0x00000020, 0x00000040, 0x00000040, 0x00000020, 0x00000040, 0x00000010, 0x00000000, 0x00000010, 0x00000040, 0x00000020, 0x00000040},
00567 {0x00001000, 0x01000000, 0x00000040, 0x00000040, 0x00000020, 0x00000040, 0x00000040, 0x00000020, 0x00000010, 0x00000010, 0x00000000, 0x00000040, 0x00000040, 0x00000020},
00568 {0x00001000, 0x01000000, 0x00000020, 0x00000040, 0x00000040, 0x00000020, 0x00000040, 0x00000040, 0x00000020, 0x00000040, 0x00000040, 0x00000000, 0x00000010, 0x00000010},
00569 {0x00001000, 0x01000000, 0x00000040, 0x00000020, 0x00000040, 0x00000040, 0x00000020, 0x00000040, 0x00000040, 0x00000020, 0x00000040, 0x00000010, 0x00000000, 0x00000010},
00570 {0x00001000, 0x01000000, 0x00000040, 0x00000040, 0x00000020, 0x00000040, 0x00000040, 0x00000020, 0x00000040, 0x00000040, 0x00000020, 0x00000010, 0x00000010, 0x00000000}};
00571
00572 if ( x>13) x = 1;
00573 if ( y>13) y = 1;
00574
00575 return Metric[x][y];
00576 }
00577
00578 UINT32 CCPanose::DistanceXHeight(BYTE x, BYTE y)
00579 {
00580 const static UINT32 Metric[8][8] = {
00581 {0x00010000, 0x00100000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000},
00582 {0x00100000, 0x10000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000, 0x01000000},
00583 {0x00001000, 0x01000000, 0x00000000, 0x00000020, 0x00000020, 0x00000010, 0x00000040, 0x00000040},
00584 {0x00001000, 0x01000000, 0x00000020, 0x00000000, 0x00000020, 0x00000040, 0x00000010, 0x00000040},
00585 {0x00001000, 0x01000000, 0x00000020, 0x00000020, 0x00000000, 0x00000040, 0x00000040, 0x00000010},
00586 {0x00001000, 0x01000000, 0x00000010, 0x00000040, 0x00000040, 0x00000000, 0x00000020, 0x00000020},
00587 {0x00001000, 0x01000000, 0x00000040, 0x00000010, 0x00000040, 0x00000020, 0x00000000, 0x00000020},
00588 {0x00001000, 0x01000000, 0x00000040, 0x00000040, 0x00000010, 0x00000020, 0x00000020, 0x00000000}};
00589
00590 if ( x>7) x = 1;
00591 if ( y>7) y = 1;
00592
00593 return Metric[x][y];
00594 }
00595
00596
00597
00598
00599
00600
00601
00602
00603
00604
00605
00606
00607
00608 void CCPanose::GetDebugDetails(StringBase *pStr)
00609 {
00610 TCHAR s[256], t[256];
00611
00612 camSnprintf( s, 256, _T("\r\nPANOSE information\r\n\r\n") );
00613 (*pStr) += s;
00614
00615 switch (mFamilyType)
00616 {
00617 case PAN_ANY : camSnprintf( t, 256, _T("Any") ); break;
00618 case PAN_NO_FIT : camSnprintf( t, 256, _T("No fit") ); break;
00619 case PAN_FAMILY_TEXT_DISPLAY : camSnprintf( t, 256, _T("Text and display") ); break;
00620 case PAN_FAMILY_SCRIPT : camSnprintf( t, 256, _T("Script") ); break;
00621 case PAN_FAMILY_DECORATIVE : camSnprintf( t, 256, _T("Decorative") ); break;
00622 case PAN_FAMILY_PICTORIAL : camSnprintf( t, 256, _T("Pictorial") ); break;
00623 default : camSnprintf( t, 256, _T("!! Unknown !! (tell Andy)") ); break;
00624 }
00625
00626 camSnprintf( s, 256, _T("Family Type\t= (%d) %s\r\n") , mFamilyType, t);
00627 (*pStr) += s;
00628
00629 switch (mSerifStyle)
00630 {
00631 case PAN_ANY : camSnprintf( t, 256, _T("Any") ); break;
00632 case PAN_NO_FIT : camSnprintf( t, 256, _T("No fit") ); break;
00633 case PAN_SERIF_COVE : camSnprintf( t, 256, _T("Cove") ); break;
00634 case PAN_SERIF_OBTUSE_COVE : camSnprintf( t, 256, _T("Obtuse cove") ); break;
00635 case PAN_SERIF_SQUARE_COVE : camSnprintf( t, 256, _T("Square cove") ); break;
00636 case PAN_SERIF_OBTUSE_SQUARE_COVE : camSnprintf( t, 256, _T("Obtuse square cove") ); break;
00637 case PAN_SERIF_SQUARE : camSnprintf( t, 256, _T("Square ") ); break;
00638 case PAN_SERIF_THIN : camSnprintf( t, 256, _T("Thin") ); break;
00639 case PAN_SERIF_BONE : camSnprintf( t, 256, _T("Bone") ); break;
00640 case PAN_SERIF_EXAGGERATED : camSnprintf( t, 256, _T("Exaggerated") ); break;
00641 case PAN_SERIF_TRIANGLE : camSnprintf( t, 256, _T("Triangle") ); break;
00642 case PAN_SERIF_NORMAL_SANS : camSnprintf( t, 256, _T("Normal sans serif") ); break;
00643 case PAN_SERIF_OBTUSE_SANS : camSnprintf( t, 256, _T("Obtuse sans serif") ); break;
00644 case PAN_SERIF_PERP_SANS : camSnprintf( t, 256, _T("Perp sans serif") ); break;
00645 case PAN_SERIF_FLARED : camSnprintf( t, 256, _T("Flared") ); break;
00646 case PAN_SERIF_ROUNDED : camSnprintf( t, 256, _T("Rounded") ); break;
00647 default : camSnprintf( t, 256, _T("!! Unknown !! (tell Andy)") ); break;
00648 }
00649
00650 camSnprintf( s, 256, _T("Serif Style\t\t= (%d) %s\r\n") , mSerifStyle, t);
00651 (*pStr) += s;
00652
00653 switch (mWeight)
00654 {
00655 case PAN_ANY : camSnprintf( t, 256, _T("Any") ); break;
00656 case PAN_NO_FIT : camSnprintf( t, 256, _T("No fit") ); break;
00657 case PAN_WEIGHT_VERY_LIGHT : camSnprintf( t, 256, _T("Very light") ); break;
00658 case PAN_WEIGHT_LIGHT : camSnprintf( t, 256, _T("Light") ); break;
00659 case PAN_WEIGHT_THIN : camSnprintf( t, 256, _T("Thin") ); break;
00660 case PAN_WEIGHT_BOOK : camSnprintf( t, 256, _T("Book") ); break;
00661 case PAN_WEIGHT_MEDIUM : camSnprintf( t, 256, _T("Medium") ); break;
00662 case PAN_WEIGHT_DEMI : camSnprintf( t, 256, _T("Demibold") ); break;
00663 case PAN_WEIGHT_BOLD : camSnprintf( t, 256, _T("Bold") ); break;
00664 case PAN_WEIGHT_HEAVY : camSnprintf( t, 256, _T("Heavy") ); break;
00665 case PAN_WEIGHT_BLACK : camSnprintf( t, 256, _T("Black") ); break;
00666 case PAN_WEIGHT_NORD : camSnprintf( t, 256, _T("Nord") ); break;
00667 default : camSnprintf( t, 256, _T("!! Unknown !! (tell Andy)") ); break;
00668 }
00669
00670 camSnprintf( s, 256, _T("Weight\t\t= (%d) %s\r\n") , mWeight, t);
00671 (*pStr) += s;
00672
00673 switch (mProportion)
00674 {
00675 case PAN_ANY : camSnprintf( t, 256, _T("Any") ); break;
00676 case PAN_NO_FIT : camSnprintf( t, 256, _T("No fit") ); break;
00677 case PAN_PROP_OLD_STYLE : camSnprintf( t, 256, _T("Old style") ); break;
00678 case PAN_PROP_MODERN : camSnprintf( t, 256, _T("Modern") ); break;
00679 case PAN_PROP_EVEN_WIDTH : camSnprintf( t, 256, _T("Even width") ); break;
00680 case PAN_PROP_EXPANDED : camSnprintf( t, 256, _T("Expanded") ); break;
00681 case PAN_PROP_CONDENSED : camSnprintf( t, 256, _T("Condensed") ); break;
00682 case PAN_PROP_VERY_EXPANDED : camSnprintf( t, 256, _T("Very expanded") ); break;
00683 case PAN_PROP_VERY_CONDENSED : camSnprintf( t, 256, _T("Very condensed") ); break;
00684 case PAN_PROP_MONOSPACED : camSnprintf( t, 256, _T("Monospaced") ); break;
00685 default : camSnprintf( t, 256, _T("!! Unknown !! (tell Andy)") ); break;
00686 }
00687
00688 camSnprintf( s, 256, _T("Proportion\t= (%d) %s\r\n") , mProportion, t);
00689 (*pStr) += s;
00690
00691 switch (mContrast)
00692 {
00693 case PAN_ANY : camSnprintf( t, 256, _T("Any") ); break;
00694 case PAN_NO_FIT : camSnprintf( t, 256, _T("No fit") ); break;
00695 case PAN_CONTRAST_NONE : camSnprintf( t, 256, _T("None") ); break;
00696 case PAN_CONTRAST_VERY_LOW : camSnprintf( t, 256, _T("Very low") ); break;
00697 case PAN_CONTRAST_LOW : camSnprintf( t, 256, _T("Low") ); break;
00698 case PAN_CONTRAST_MEDIUM_LOW : camSnprintf( t, 256, _T("Medium low") ); break;
00699 case PAN_CONTRAST_MEDIUM : camSnprintf( t, 256, _T("Medium") ); break;
00700 case PAN_CONTRAST_MEDIUM_HIGH : camSnprintf( t, 256, _T("Medium high") ); break;
00701 case PAN_CONTRAST_HIGH : camSnprintf( t, 256, _T("High") ); break;
00702 case PAN_CONTRAST_VERY_HIGH : camSnprintf( t, 256, _T("Very high") ); break;
00703 default : camSnprintf( t, 256, _T("!! Unknown !! (tell Andy)") ); break;
00704 }
00705
00706 camSnprintf( s, 256, _T("Contrast\t\t= (%d) %s\r\n") , mContrast, t);
00707 (*pStr) += s;
00708
00709 switch (mStrokeVariation)
00710 {
00711 case PAN_ANY : camSnprintf( t, 256, _T("Any") ); break;
00712 case PAN_NO_FIT : camSnprintf( t, 256, _T("No fit") ); break;
00713 case PAN_STROKE_GRADUAL_DIAG : camSnprintf( t, 256, _T("Gradual/diagonal") ); break;
00714 case PAN_STROKE_GRADUAL_TRAN : camSnprintf( t, 256, _T("Gradual/transitional") ); break;
00715 case PAN_STROKE_GRADUAL_VERT : camSnprintf( t, 256, _T("Gradual/vertical") ); break;
00716 case PAN_STROKE_GRADUAL_HORZ : camSnprintf( t, 256, _T("Gradual/horizontal") ); break;
00717 case PAN_STROKE_RAPID_VERT : camSnprintf( t, 256, _T("Rapid/vertical") ); break;
00718 case PAN_STROKE_RAPID_HORZ : camSnprintf( t, 256, _T("Rapid/horizontal") ); break;
00719 case PAN_STROKE_INSTANT_VERT : camSnprintf( t, 256, _T("Instant/vertical") ); break;
00720 default : camSnprintf( t, 256, _T("!! Unknown !! (tell Andy)") ); break;
00721 }
00722
00723 camSnprintf( s, 256, _T("Stroke Variation\t= (%d) %s\r\n") , mStrokeVariation, t);
00724 (*pStr) += s;
00725
00726 switch (mArmStyle)
00727 {
00728 case PAN_ANY : camSnprintf( t, 256, _T("Any") ); break;
00729 case PAN_NO_FIT : camSnprintf( t, 256, _T("No fit") ); break;
00730 case PAN_STRAIGHT_ARMS_HORZ : camSnprintf( t, 256, _T("Straight arms/horizontal") ); break;
00731 case PAN_STRAIGHT_ARMS_WEDGE : camSnprintf( t, 256, _T("Straight arms/wedge") ); break;
00732 case PAN_STRAIGHT_ARMS_VERT : camSnprintf( t, 256, _T("traight arms/vertical") ); break;
00733 case PAN_STRAIGHT_ARMS_SINGLE_SERIF : camSnprintf( t, 256, _T("Straight arms/single-serif") ); break;
00734 case PAN_STRAIGHT_ARMS_DOUBLE_SERIF : camSnprintf( t, 256, _T("Straight arms/double-serif") ); break;
00735 case PAN_BENT_ARMS_HORZ : camSnprintf( t, 256, _T("Non-straight arms/horizontal") ); break;
00736 case PAN_BENT_ARMS_WEDGE : camSnprintf( t, 256, _T("Non-straight arms/wedge") ); break;
00737 case PAN_BENT_ARMS_VERT : camSnprintf( t, 256, _T("Non-straight arms/vertical") ); break;
00738 case PAN_BENT_ARMS_SINGLE_SERIF : camSnprintf( t, 256, _T("Non-straight arms/single-serif") ); break;
00739 case PAN_BENT_ARMS_DOUBLE_SERIF : camSnprintf( t, 256, _T("Non-straight arms/double-serif") ); break;
00740 default : camSnprintf( t, 256, _T("!! Unknown !! (tell Andy)") ); break;
00741 }
00742
00743 camSnprintf( s, 256, _T("Arm Style\t\t= (%d) %s\r\n") , mArmStyle, t);
00744 (*pStr) += s;
00745
00746 switch (mLetterform)
00747 {
00748 case PAN_ANY : camSnprintf( t, 256, _T("Any") ); break;
00749 case PAN_NO_FIT : camSnprintf( t, 256, _T("No fit") ); break;
00750 case PAN_LETT_NORMAL_CONTACT : camSnprintf( t, 256, _T("Normal/contact") ); break;
00751 case PAN_LETT_NORMAL_WEIGHTED : camSnprintf( t, 256, _T("Normal/weighted") ); break;
00752 case PAN_LETT_NORMAL_BOXED : camSnprintf( t, 256, _T("Normal/boxed") ); break;
00753 case PAN_LETT_NORMAL_FLATTENED : camSnprintf( t, 256, _T("Normal/flattened") ); break;
00754 case PAN_LETT_NORMAL_ROUNDED : camSnprintf( t, 256, _T("Normal/rounded") ); break;
00755 case PAN_LETT_NORMAL_OFF_CENTER : camSnprintf( t, 256, _T("Normal/off center") ); break;
00756 case PAN_LETT_NORMAL_SQUARE : camSnprintf( t, 256, _T("Normal/square") ); break;
00757 case PAN_LETT_OBLIQUE_CONTACT : camSnprintf( t, 256, _T("Oblique/contact") ); break;
00758 case PAN_LETT_OBLIQUE_WEIGHTED : camSnprintf( t, 256, _T("Oblique/weighted") ); break;
00759 case PAN_LETT_OBLIQUE_BOXED : camSnprintf( t, 256, _T("Oblique/boxed") ); break;
00760 case PAN_LETT_OBLIQUE_FLATTENED : camSnprintf( t, 256, _T("Oblique/flattened") ); break;
00761 case PAN_LETT_OBLIQUE_ROUNDED : camSnprintf( t, 256, _T("Oblique/rounded") ); break;
00762 case PAN_LETT_OBLIQUE_OFF_CENTER : camSnprintf( t, 256, _T("Oblique/off center") ); break;
00763 case PAN_LETT_OBLIQUE_SQUARE : camSnprintf( t, 256, _T("Oblique/square") ); break;
00764 default : camSnprintf( t, 256, _T("!! Unknown !! (tell Andy)") ); break;
00765 }
00766
00767 camSnprintf( s, 256, _T("Letter Form\t= (%d) %s\r\n") , mLetterform, t);
00768 (*pStr) += s;
00769
00770 switch (mMidline)
00771 {
00772 case PAN_ANY : camSnprintf( t, 256, _T("Any") ); break;
00773 case PAN_NO_FIT : camSnprintf( t, 256, _T("No fit") ); break;
00774 case PAN_MIDLINE_STANDARD_TRIMMED : camSnprintf( t, 256, _T("Standard/trimmed") ); break;
00775 case PAN_MIDLINE_STANDARD_POINTED : camSnprintf( t, 256, _T("Standard/pointed") ); break;
00776 case PAN_MIDLINE_STANDARD_SERIFED : camSnprintf( t, 256, _T("Standard/serifed") ); break;
00777 case PAN_MIDLINE_HIGH_TRIMMED : camSnprintf( t, 256, _T("High/trimmed") ); break;
00778 case PAN_MIDLINE_HIGH_POINTED : camSnprintf( t, 256, _T("High/pointed") ); break;
00779 case PAN_MIDLINE_HIGH_SERIFED : camSnprintf( t, 256, _T("High/serifed") ); break;
00780 case PAN_MIDLINE_CONSTANT_TRIMMED : camSnprintf( t, 256, _T("Constant/trimmed") ); break;
00781 case PAN_MIDLINE_CONSTANT_POINTED : camSnprintf( t, 256, _T("Constant/pointed") ); break;
00782 case PAN_MIDLINE_CONSTANT_SERIFED : camSnprintf( t, 256, _T("Constant/serifed") ); break;
00783 case PAN_MIDLINE_LOW_TRIMMED : camSnprintf( t, 256, _T("Low/trimmed") ); break;
00784 case PAN_MIDLINE_LOW_POINTED : camSnprintf( t, 256, _T("Low/pointed") ); break;
00785 case PAN_MIDLINE_LOW_SERIFED : camSnprintf( t, 256, _T("Low/serifed") ); break;
00786 default : camSnprintf( t, 256, _T("!! Unknown !! (tell Andy)") ); break;
00787 }
00788
00789 camSnprintf( s, 256, _T("Midline\t\t= (%d) %s\r\n") , mMidline, t);
00790 (*pStr) += s;
00791
00792 switch (mXHeight)
00793 {
00794 case PAN_ANY : camSnprintf( t, 256, _T("Any") ); break;
00795 case PAN_NO_FIT : camSnprintf( t, 256, _T("No fit") ); break;
00796 case PAN_XHEIGHT_CONSTANT_SMALL : camSnprintf( t, 256, _T("Constant/small") ); break;
00797 case PAN_XHEIGHT_CONSTANT_STD : camSnprintf( t, 256, _T("Constant/standard") ); break;
00798 case PAN_XHEIGHT_CONSTANT_LARGE : camSnprintf( t, 256, _T("Constant/large") ); break;
00799 case PAN_XHEIGHT_DUCKING_SMALL : camSnprintf( t, 256, _T("Ducking/small") ); break;
00800 case PAN_XHEIGHT_DUCKING_STD : camSnprintf( t, 256, _T("Ducking/standard") ); break;
00801 case PAN_XHEIGHT_DUCKING_LARGE : camSnprintf( t, 256, _T("Ducking/large") ); break;
00802 default : camSnprintf( t, 256, _T("!! Unknown !! (tell Andy)") ); break;
00803 }
00804
00805 camSnprintf( s, 256, _T("XHeight\t\t= (%d) %s\r\n") , mXHeight, t);
00806 (*pStr) += s;
00807 }