583 {
592
593
594 character = &phys->chars[glyph_index];
595
596
597
598 {
600
601
602 strike = phys->strikes;
603 for (
n = 0;
n < phys->num_strikes;
n++ )
604 {
605 if ( strike->x_ppm == (
FT_UInt)
size->root.metrics.x_ppem &&
606 strike->y_ppm == (
FT_UInt)
size->root.metrics.y_ppem )
607 goto Found_Strike;
608
609 strike++;
610 }
611
612
613 return FT_THROW( Invalid_Argument );
614 }
615
616 Found_Strike:
617
618
619 {
621
622
623 char_len = 4;
625 char_len += 1;
627 char_len += 1;
629 char_len += 1;
630
631
635
638 strike->num_bitmaps,
639 &strike->flags,
640 character->char_code,
641 &gps_offset,
642 &gps_size );
643
645
646 if ( gps_size == 0 )
647 {
648
651 }
652 }
653
654
655 {
659
660
661
663 if ( phys->metrics_resolution != phys->outline_resolution )
665 (
FT_Long)phys->outline_resolution,
666 (
FT_Long)phys->metrics_resolution );
667
669
670
671
673 character->advance,
674 (
FT_Long)phys->metrics_resolution );
675
679
683 &xpos, &ypos,
684 &xsize, &ysize,
687 goto Exit1;
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
711 {
712 case 0:
713 if ( ( (
FT_ULong)xsize * ysize + 7 ) / 8 > gps_size )
715 break;
716 case 1:
717 if ( (
FT_ULong)xsize * ysize > 15 * gps_size )
719 break;
720 case 2:
721 if ( (
FT_ULong)xsize * ysize > 255 * ( ( gps_size + 1 ) / 2 ) )
723 break;
724 default:
725 FT_ERROR((
"pfr_slot_load_bitmap: invalid image type\n" ));
727 }
728
730 {
732 FT_ERROR((
"pfr_slot_load_bitmap: invalid bitmap dimensions\n" ));
733 goto Exit1;
734 }
735
736
737
738
739
740
746 {
748 FT_TRACE1((
"huge bitmap glyph %dx%d over FT_GlyphSlot\n",
749 xpos, ypos ));
751 }
752
754 {
756
757
758
759
764
765
774
775
778
779 if ( metrics_only )
780 goto Exit1;
781
782
783 {
785
786
796 }
797 }
798
799 Exit1:
801 }
802
805 }
FT_MulDiv(FT_Long a, FT_Long b, FT_Long c)
#define FT_TRACE1(varformat)
FT_BEGIN_HEADER typedef signed long FT_Pos
ft_glyphslot_alloc_bitmap(FT_GlyphSlot slot, FT_ULong size)
#define FT_FRAME_ENTER(size)
#define FT_STREAM_SEEK(position)
GLenum GLuint GLint GLenum face
typedefFT_BEGIN_HEADER struct PFR_FaceRec_ * PFR_Face
static FT_Error pfr_load_bitmap_bits(FT_Byte *p, FT_Byte *limit, FT_UInt format, FT_Bool decreasing, FT_Bitmap *target)
static FT_Error pfr_load_bitmap_metrics(FT_Byte **pdata, FT_Byte *limit, FT_Long scaled_advance, FT_Long *axpos, FT_Long *aypos, FT_UInt *axsize, FT_UInt *aysize, FT_Long *aadvance, FT_UInt *aformat)
static void pfr_lookup_bitmap_data(FT_Byte *base, FT_Byte *limit, FT_UInt count, FT_UInt *flags, FT_UInt char_code, FT_ULong *found_offset, FT_ULong *found_size)
#define PFR_FLAG_INVERT_BITMAP
FT_Fixed linearHoriAdvance