290 {
295
299
300
301 cidface->num_faces = 1;
302
305 {
308
309 if ( !psaux )
310 {
311 FT_ERROR((
"cid_face_init: cannot access `psaux' module\n" ));
314 }
315
317 }
318
321 {
324
325 face->pshinter = pshinter;
326 }
327
329
330
333
337
338
339 if ( face_index < 0 )
341
342
343
344 if ( ( face_index & 0xFFFF ) != 0 )
345 {
346 FT_ERROR((
"cid_face_init: invalid face index\n" ));
349 }
350
351
352
353
354
355
356 {
359
360
361 cidface->num_glyphs = (
FT_Long)
cid->cid_count;
362 cidface->num_charmaps = 0;
363
364 cidface->face_index = face_index & 0xFFFF;
365
369
370 if (
info->is_fixed_pitch )
372
373
374
375
376
377 cidface->family_name =
info->family_name;
378
379 cidface->style_name = (char *)"Regular";
380 if ( cidface->family_name )
381 {
382 char* full =
info->full_name;
383 char* family = cidface->family_name;
384
385
386 if ( full )
387 {
388 while ( *full )
389 {
390 if ( *full == *family )
391 {
392 family++;
393 full++;
394 }
395 else
396 {
397 if ( *full == ' ' || *full == '-' )
398 full++;
399 else if ( *family == ' ' || *family == '-' )
400 family++;
401 else
402 {
403 if ( !*family )
404 cidface->style_name = full;
405 break;
406 }
407 }
408 }
409 }
410 }
411 else
412 {
413
414 if (
cid->cid_font_name )
415 cidface->family_name =
cid->cid_font_name;
416 }
417
418
419 cidface->style_flags = 0;
420 if (
info->italic_angle )
423 {
427 }
428
429
430 cidface->num_fixed_sizes = 0;
431 cidface->available_sizes =
NULL;
432
433 cidface->bbox.xMin =
cid->font_bbox.xMin >> 16;
434 cidface->bbox.yMin =
cid->font_bbox.yMin >> 16;
435
436 cidface->bbox.xMax = (
cid->font_bbox.xMax + 0xFFFF ) >> 16;
437 cidface->bbox.yMax = (
cid->font_bbox.yMax + 0xFFFF ) >> 16;
438
439 if ( !cidface->units_per_EM )
440 cidface->units_per_EM = 1000;
441
442 cidface->ascender = (
FT_Short)( cidface->bbox.yMax );
443 cidface->descender = (
FT_Short)( cidface->bbox.yMin );
444
445 cidface->height = (
FT_Short)( ( cidface->units_per_EM * 12 ) / 10 );
446 if ( cidface->height < cidface->ascender - cidface->descender )
447 cidface->height = (
FT_Short)( cidface->ascender - cidface->descender );
448
449 cidface->underline_position = (
FT_Short)
info->underline_position;
450 cidface->underline_thickness = (
FT_Short)
info->underline_thickness;
451 }
452
455 }
cid_face_open(CID_Face face, FT_Int face_index)
#define FT_STYLE_FLAG_ITALIC
#define FT_FACE_FLAG_SCALABLE
#define FT_FACE_FLAG_HINTER
#define FT_FACE_FLAG_FIXED_WIDTH
#define FT_STYLE_FLAG_BOLD
#define FT_FACE_FLAG_HORIZONTAL
#define FT_ERROR(varformat)
#define FT_TRACE2(varformat)
#define FT_FACE_LIBRARY(x)
FT_Get_Module_Interface(FT_Library library, const char *mod_name)
#define FT_STREAM_SEEK(position)
GLenum const GLfloat * params
PSHinter_Interface * PSHinter_Service
struct PSAux_ServiceRec_ * PSAux_Service