#include "pfrload.h"
#include "pfrerror.h"
Go to the source code of this file.
|
| pfr_extra_items_skip (FT_Byte **pp, FT_Byte *limit) |
|
| pfr_extra_items_parse (FT_Byte **pp, FT_Byte *limit, PFR_ExtraItem item_list, FT_Pointer item_data) |
|
| pfr_header_load (PFR_Header header, FT_Stream stream) |
|
| pfr_header_check (PFR_Header header) |
|
| pfr_log_font_count (FT_Stream stream, FT_UInt32 section_offset, FT_Long *acount) |
|
| pfr_log_font_load (PFR_LogFont log_font, FT_Stream stream, FT_UInt idx, FT_UInt32 section_offset, FT_Bool size_increment) |
|
| pfr_extra_item_load_bitmap_info (FT_Byte *p, FT_Byte *limit, PFR_PhyFont phy_font) |
|
| pfr_extra_item_load_font_id (FT_Byte *p, FT_Byte *limit, PFR_PhyFont phy_font) |
|
| pfr_extra_item_load_stem_snaps (FT_Byte *p, FT_Byte *limit, PFR_PhyFont phy_font) |
|
| pfr_extra_item_load_kerning_pairs (FT_Byte *p, FT_Byte *limit, PFR_PhyFont phy_font) |
|
static FT_Error | pfr_aux_name_load (FT_Byte *p, FT_UInt len, FT_Memory memory, FT_String **astring) |
|
| pfr_phy_font_done (PFR_PhyFont phy_font, FT_Memory memory) |
|
| pfr_phy_font_load (PFR_PhyFont phy_font, FT_Stream stream, FT_UInt32 offset, FT_UInt32 size) |
|
◆ FT_COMPONENT
#define FT_COMPONENT trace_pfr |
◆ FT_STRUCTURE
◆ pfr_aux_name_load()
Definition at line 736 of file pfrload.c.
740 {
744
745
746 if ( *astring )
748
749 if (
len > 0 &&
p[
len - 1] == 0 )
751
752
753
755 for (
n = 0;
n <
len;
n++ )
756 if (
p[
n] < 32 ||
p[
n] > 127 )
757 {
759 break;
760 }
761
763 {
766
769 }
770
774 }
#define FT_ALLOC(ptr, size)
#define FT_MEM_COPY(dest, source, count)
Referenced by pfr_phy_font_load().
◆ pfr_extra_item_load_bitmap_info()
Definition at line 456 of file pfrload.c.
459 {
465
466
468
472
473
475 {
477
478
481 new_max ) )
483
485 }
486
487 size1 = 1 + 1 + 1 + 2 + 2 + 1;
489 size1++;
490
492 size1++;
493
495 size1++;
496
498 size1++;
499
501 size1++;
502
504
506
507 for (
n = 0;
n <
count;
n++, strike++ )
508 {
512
516
518
522
526
530 }
531
533
536
537 Too_Short:
539 FT_ERROR((
"pfr_extra_item_load_bitmap_info:"
540 " invalid bitmap info table\n" ));
542 }
#define FT_ERROR(varformat)
#define FT_RENEW_ARRAY(ptr, curcnt, newcnt)
#define FT_PAD_CEIL(x, n)
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
GLuint GLuint GLsizei count
static char memory[1024 *256]
#define PFR_NEXT_ULONG(p)
#define PFR_NEXT_USHORT(p)
#define PFR_STRIKE_3BYTE_SIZE
#define PFR_STRIKE_2BYTE_YPPM
#define PFR_STRIKE_2BYTE_XPPM
#define PFR_STRIKE_3BYTE_OFFSET
#define PFR_STRIKE_2BYTE_COUNT
◆ pfr_extra_item_load_font_id()
Definition at line 556 of file pfrload.c.
559 {
563
564
567
570
571
574
577 }
◆ pfr_extra_item_load_kerning_pairs()
Definition at line 627 of file pfrload.c.
630 {
634
635
638
640
646
647#ifndef PFR_CONFIG_NO_CHECKS
649
651 item->pair_size += 2;
652
654 item->pair_size += 1;
655
657#endif
658
659
660
661 if (
item->pair_count > 0 )
662 {
665
666
668 {
672
674
675 q =
p +
item->pair_size * (
item->pair_count - 1 );
678
680 }
681 else
682 {
686
688
689 q =
p +
item->pair_size * (
item->pair_count - 1 );
692
694 }
695
696
701 }
702 else
703 {
704
706 }
707
710
711 Too_Short:
713
715 FT_ERROR((
"pfr_extra_item_load_kerning_pairs:"
716 " invalid kerning pairs table\n" ));
718 }
GLdouble GLdouble GLdouble GLdouble q
#define PFR_NEXT_SHORT(p)
#define PFR_KERN_INDEX(g1, g2)
#define PFR_KERN_2BYTE_CHAR
#define PFR_KERN_2BYTE_ADJ
PFR_KernItem * kern_items_tail
◆ pfr_extra_item_load_stem_snaps()
Definition at line 582 of file pfrload.c.
585 {
590
591
594
597
598 num_vert =
count & 15;
599 num_horz =
count >> 4;
600 count = num_vert + num_horz;
601
603
606
609
612
615
616 Too_Short:
618 FT_ERROR((
"pfr_extra_item_load_stem_snaps:"
619 " invalid stem snaps table\n" ));
621 }
#define FT_NEW_ARRAY(ptr, count)
#define FT_NEXT_SHORT(buffer)
PFR_DimensionRec horizontal
PFR_DimensionRec vertical
◆ pfr_extra_items_parse()
Definition at line 134 of file pfrload.c.
138 {
141 FT_UInt num_items, item_type, item_size;
142
143
146
147 for ( ; num_items > 0; num_items-- )
148 {
152
154
155 if ( item_list )
156 {
158
159
161 {
162 if (
extra->type == item_type )
163 {
167
168 break;
169 }
170 }
171 }
172
174 }
175
179
180 Too_Short:
181 FT_ERROR((
"pfr_extra_items_parse: invalid extra items table\n" ));
184 }
Referenced by pfr_extra_items_skip(), and pfr_phy_font_load().
◆ pfr_extra_items_skip()
◆ pfr_header_check()
Definition at line 261 of file pfrload.c.
262 {
264
265
266
267 if (
header->signature != 0x50465230L ||
269 header->header_size < 58 ||
270 header->signature2 != 0x0D0A )
271 {
273 }
274
276 }
FT_BEGIN_HEADER typedef unsigned char FT_Bool
Referenced by pfr_face_init().
◆ pfr_header_load()
Definition at line 241 of file pfrload.c.
243 {
245
246
247
250 {
251
252 header->phy_font_max_size +=
253 (FT_UInt32)
header->phy_font_max_size_high << 16;
254 }
255
257 }
#define FT_STREAM_SEEK(position)
#define FT_STREAM_READ_FIELDS(fields, object)
static const FT_Frame_Field pfr_header_fields[]
Referenced by pfr_face_init().
◆ pfr_log_font_count()
pfr_log_font_count |
( |
FT_Stream |
stream, |
|
|
FT_UInt32 |
section_offset, |
|
|
FT_Long * |
acount |
|
) |
| |
Definition at line 289 of file pfrload.c.
292 {
296
297
301
302
303
304
305
306
307
308 if (
count > ( ( 1 << 16 ) - 2 ) / 5 ||
311 {
313 " invalid number of logical fonts\n" ));
316 }
317
319
323 }
#define FT_READ_USHORT(var)
Referenced by pfr_face_init().
◆ pfr_log_font_load()
Definition at line 327 of file pfrload.c.
332 {
338
339
343
344 if (
idx >= num_log_fonts )
345 return FT_THROW( Invalid_Argument );
346
351
352
355
356
357 {
361
362
366
369
371
376
378
381 {
385
388 }
390 {
394 }
395
397
399 {
403
406 }
407
409 {
413 }
414
416 {
420 }
421
425 if ( size_increment )
426 {
429 }
430 }
431
434
437
438 Too_Short:
439 FT_ERROR((
"pfr_log_font_load: invalid logical font table\n" ));
442 }
#define FT_FRAME_ENTER(size)
#define FT_READ_UOFF3(var)
#define FT_STREAM_SKIP(distance)
pfr_extra_items_skip(FT_Byte **pp, FT_Byte *limit)
#define PFR_LINE_JOIN_MASK
#define PFR_LOG_EXTRA_ITEMS
#define PFR_LINE_JOIN_MITER
#define PFR_LOG_2BYTE_BOLD
#define PFR_LOG_2BYTE_STROKE
Referenced by pfr_face_init().
◆ pfr_phy_font_done()
Definition at line 778 of file pfrload.c.
780 {
784
787
790
794
798
801
802 {
804
805
808 {
812 }
815 }
816
818 }
static unsigned __int64 next
Referenced by pfr_face_done().
◆ pfr_phy_font_load()
Definition at line 822 of file pfrload.c.
826 {
833
834
837
840
844
846
849
859
860
862 {
865 }
866
867
869 {
872
875 }
876
877
878
879
882
883 if ( num_aux > 0 )
884 {
887
888
891
892 while ( num_aux > 0 )
893 {
895
896
898 break;
899
901 if ( length < 4 || length > num_aux )
902 break;
903
906
908 {
909 case 1:
910
911
916 break;
917
918 case 2:
920 break;
921
926 break;
927
928 case 3:
929
930
935 break;
936
937 default:
938 ;
939 }
940
943 }
944 }
945
946
947 {
949
950
953
955
958
961 }
962
966
969
970
971 {
973
974
977
981
984
987
990
993
995
998
1000 {
1002
1003
1007
1011
1012#if 0
1015 : 0;
1016#else
1019#endif
1023
1027 }
1028 }
1029
1030
1031
1034
1035
1038
1041
1042 Too_Short:
1044 FT_ERROR((
"pfr_phy_font_load: invalid physical font table\n" ));
1046 }
GLuint GLuint GLsizei GLenum type
GLuint GLsizei GLsizei * length
static const PFR_ExtraItemRec pfr_phy_font_extra_items[]
static FT_Error pfr_aux_name_load(FT_Byte *p, FT_UInt len, FT_Memory memory, FT_String **astring)
#define PFR_CHECK_SIZE(x)
#define PFR_PHY_PROPORTIONAL
#define PFR_PHY_2BYTE_CHARCODE
#define PFR_PHY_EXTRA_ITEMS
#define PFR_PHY_ASCII_CODE
#define PFR_PHY_2BYTE_GPS_SIZE
#define PFR_PHY_3BYTE_GPS_OFFSET
FT_UInt outline_resolution
FT_UInt metrics_resolution
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Referenced by pfr_face_init().
◆ pfr_header_fields
◆ pfr_phy_font_extra_items
Initial value:=
{
}
pfr_extra_item_load_bitmap_info(FT_Byte *p, FT_Byte *limit, PFR_PhyFont phy_font)
pfr_extra_item_load_stem_snaps(FT_Byte *p, FT_Byte *limit, PFR_PhyFont phy_font)
pfr_extra_item_load_kerning_pairs(FT_Byte *p, FT_Byte *limit, PFR_PhyFont phy_font)
pfr_extra_item_load_font_id(FT_Byte *p, FT_Byte *limit, PFR_PhyFont phy_font)
FT_Error(* PFR_ExtraItem_ParseFunc)(FT_Byte *p, FT_Byte *limit, FT_Pointer data)
Definition at line 721 of file pfrload.c.
Referenced by pfr_phy_font_load().