code
stringlengths
0
56.1M
repo_name
stringlengths
3
57
path
stringlengths
2
176
language
stringclasses
672 values
license
stringclasses
8 values
size
int64
0
56.8M
/* Copyright Sergue E. Leontiev 2013. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) */ // Stub file for universal binary #if defined(__i386__) #include "make_i386_sysv_macho_gas.S" #elif defined(__x86_64__) #include "make_x86_64_sysv_macho_gas.S" #else #error "No arch's" #endif
whupdup/frame
real/third_party/boost_context/asm/not_modified_yet/make_i386_x86_64_sysv_macho_gas.S
Assembly
gpl-3.0
425
/* Copyright Oliver Kowalke 2009. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) */ /******************************************************* * * * ------------------------------------------------- * * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | * * ------------------------------------------------- * * | 0 | 4 | 8 | 12 | 16 | 20 | 24 | 28 | * * ------------------------------------------------- * * | S0 | S1 | S2 | S3 | S4 | S5 | S6 | S7 | * * ------------------------------------------------- * * ------------------------------------------------- * * | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * * ------------------------------------------------- * * | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 60 | * * ------------------------------------------------- * * | FP |hiddn| RA | PC | GP | FCTX| DATA| | * * ------------------------------------------------- * * * * *****************************************************/ /******************************************************* * * * ------------------------------------------------- * * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | * * ------------------------------------------------- * * | 0 | 4 | 8 | 12 | 16 | 20 | 24 | 28 | * * ------------------------------------------------- * * | F20 | F22 | F24 | F26 | * * ------------------------------------------------- * * ------------------------------------------------- * * | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * * ------------------------------------------------- * * | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 60 | * * ------------------------------------------------- * * | F28 | F30 | S0 | S1 | S2 | S3 | * * ------------------------------------------------- * * ------------------------------------------------- * * | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | * * ------------------------------------------------- * * | 64 | 68 | 72 | 76 | 80 | 84 | 88 | 92 | * * ------------------------------------------------- * * | S4 | S5 | S6 | S7 | FP |hiddn| RA | PC | * * ------------------------------------------------- * * ------------------------------------------------- * * | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | * * ------------------------------------------------- * * | 96 | 100 | 104 | 108 | 112 | 116 | 120 | 124 | * * ------------------------------------------------- * * | GP | FCTX| DATA| | | | | | * * ------------------------------------------------- * * * * *****************************************************/ .text .globl make_fcontext .align 2 .type make_fcontext,@function .ent make_fcontext make_fcontext: #ifdef __PIC__ .set noreorder .cpload $t9 .set reorder #endif # first arg of make_fcontext() == top address of context-stack move $v0, $a0 # shift address in A0 to lower 16 byte boundary move $v1, $v0 li $v0, -16 # 0xfffffffffffffff0 and $v0, $v1, $v0 # reserve space for context-data on context-stack # including 48 byte of shadow space (sp % 16 == 0) addiu $v0, $v0, -112 # third arg of make_fcontext() == address of context-function sw $a2, 92($v0) # save global pointer in context-data sw $gp, 96($v0) # compute address of returned transfer_t addiu $t0, $v0, 52 sw $t0, 84($v0) # compute abs address of label finish la $t9, finish # save address of finish as return-address for context-function # will be entered after context-function returns sw $t9, 88($v0) jr $ra # return pointer to context-data finish: lw $gp, 0($sp) # allocate stack space (contains shadow space for subroutines) addiu $sp, $sp, -32 # save return address sw $ra, 28($sp) # restore GP (global pointer) # move $gp, $s1 # exit code is zero move $a0, $zero # address of exit lw $t9, %call16(_exit)($gp) # exit application jalr $t9 .end make_fcontext .size make_fcontext, .-make_fcontext /* Mark that we don't need executable stack. */ .section .note.GNU-stack,"",%progbits
whupdup/frame
real/third_party/boost_context/asm/not_modified_yet/make_mips32_o32_elf_gas.S
Assembly
gpl-3.0
4,582
/* Copyright Sergue E. Leontiev 2013. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) */ // Stub file for universal binary #if defined(__ppc__) #include "make_ppc32_sysv_macho_gas.S" #elif defined(__ppc64__) #include "make_ppc64_sysv_macho_gas.S" #else #error "No arch's" #endif
whupdup/frame
real/third_party/boost_context/asm/not_modified_yet/make_ppc32_ppc64_sysv_macho_gas.S
Assembly
gpl-3.0
423
/* Copyright Oliver Kowalke 2009. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) */ /****************************************************** * * * ------------------------------------------------- * * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | * * ------------------------------------------------- * * | 0 | 4 | 8 | 12 | 16 | 20 | 24 | 28 | * * ------------------------------------------------- * * | F14 | F15 | F16 | F17 | * * ------------------------------------------------- * * ------------------------------------------------- * * | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * * ------------------------------------------------- * * | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 60 | * * ------------------------------------------------- * * | F18 | F19 | F20 | F21 | * * ------------------------------------------------- * * ------------------------------------------------- * * | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | * * ------------------------------------------------- * * | 64 | 68 | 72 | 76 | 80 | 84 | 88 | 92 | * * ------------------------------------------------- * * | F22 | F23 | F24 | F25 | * * ------------------------------------------------- * * ------------------------------------------------- * * | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | * * ------------------------------------------------- * * | 96 | 100 | 104 | 108 | 112 | 116 | 120 | 124 | * * ------------------------------------------------- * * | F26 | F27 | F28 | F29 | * * ------------------------------------------------- * * ------------------------------------------------- * * | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | * * ------------------------------------------------- * * | 128 | 132 | 136 | 140 | 144 | 148 | 152 | 156 | * * ------------------------------------------------- * * | F30 | F31 | fpscr | R13 | R14 | * * ------------------------------------------------- * * ------------------------------------------------- * * | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | * * ------------------------------------------------- * * | 160 | 164 | 168 | 172 | 176 | 180 | 184 | 188 | * * ------------------------------------------------- * * | R15 | R16 | R17 | R18 | R19 | R20 | R21 | R22 | * * ------------------------------------------------- * * ------------------------------------------------- * * | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | * * ------------------------------------------------- * * | 192 | 196 | 200 | 204 | 208 | 212 | 216 | 220 | * * ------------------------------------------------- * * | R23 | R24 | R25 | R26 | R27 | R28 | R29 | R30 | * * ------------------------------------------------- * * ------------------------------------------------- * * | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | * * ------------------------------------------------- * * | 224 | 228 | 232 | 236 | 240 | 244 | 248 | 252 | * * ------------------------------------------------- * * | R31 |hiddn| CR | LR | PC |bchai|linkr| FCTX| * * ------------------------------------------------- * * ------------------------------------------------- * * | 64 | | * * ------------------------------------------------- * * | 256 | | * * ------------------------------------------------- * * | DATA| | * * ------------------------------------------------- * * * *******************************************************/ .text .globl make_fcontext .align 2 .type make_fcontext,@function make_fcontext: # save return address into R6 mflr %r6 # first arg of make_fcontext() == top address of context-function # shift address in R3 to lower 16 byte boundary clrrwi %r3, %r3, 4 # reserve space for context-data on context-stack # including 64 byte of linkage + parameter area (R1 % 16 == 0) subi %r3, %r3, 336 # third arg of make_fcontext() == address of context-function stw %r5, 240(%r3) # set back-chain to zero li %r0, 0 stw %r0, 244(%r3) mffs %f0 # load FPSCR stfd %f0, 144(%r3) # save FPSCR # compute address of returned transfer_t addi %r0, %r3, 252 mr %r4, %r0 stw %r4, 228(%r3) # load LR mflr %r0 # jump to label 1 bl 1f 1: # load LR into R4 mflr %r4 # compute abs address of label finish addi %r4, %r4, finish - 1b # restore LR mtlr %r0 # save address of finish as return-address for context-function # will be entered after context-function returns stw %r4, 236(%r3) # restore return address from R6 mtlr %r6 blr # return pointer to context-data finish: # save return address into R0 mflr %r0 # save return address on stack, set up stack frame stw %r0, 4(%r1) # allocate stack space, R1 % 16 == 0 stwu %r1, -16(%r1) # exit code is zero li %r3, 0 # exit application bl _exit@plt .size make_fcontext, .-make_fcontext /* Mark that we don't need executable stack. */ .section .note.GNU-stack,"",%progbits
whupdup/frame
real/third_party/boost_context/asm/not_modified_yet/make_ppc32_sysv_elf_gas.S
Assembly
gpl-3.0
5,649
/* Copyright Oliver Kowalke 2009. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) */ /****************************************************** * * * ------------------------------------------------- * * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | * * ------------------------------------------------- * * | 0 | 4 | 8 | 12 | 16 | 20 | 24 | 28 | * * ------------------------------------------------- * * | F14 | F15 | F16 | F17 | * * ------------------------------------------------- * * ------------------------------------------------- * * | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * * ------------------------------------------------- * * | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 60 | * * ------------------------------------------------- * * | F18 | F19 | F20 | F21 | * * ------------------------------------------------- * * ------------------------------------------------- * * | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | * * ------------------------------------------------- * * | 64 | 68 | 72 | 76 | 80 | 84 | 88 | 92 | * * ------------------------------------------------- * * | F22 | F23 | F24 | F25 | * * ------------------------------------------------- * * ------------------------------------------------- * * | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | * * ------------------------------------------------- * * | 96 | 100 | 104 | 108 | 112 | 116 | 120 | 124 | * * ------------------------------------------------- * * | F26 | F27 | F28 | F29 | * * ------------------------------------------------- * * ------------------------------------------------- * * | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | * * ------------------------------------------------- * * | 128 | 132 | 136 | 140 | 144 | 148 | 152 | 156 | * * ------------------------------------------------- * * | F30 | F31 | fpscr | R13 | R14 | * * ------------------------------------------------- * * ------------------------------------------------- * * | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | * * ------------------------------------------------- * * | 160 | 164 | 168 | 172 | 176 | 180 | 184 | 188 | * * ------------------------------------------------- * * | R15 | R16 | R17 | R18 | R19 | R20 | R21 | R22 | * * ------------------------------------------------- * * ------------------------------------------------- * * | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | * * ------------------------------------------------- * * | 192 | 196 | 200 | 204 | 208 | 212 | 216 | 220 | * * ------------------------------------------------- * * | R23 | R24 | R25 | R26 | R27 | R28 | R29 | R30 | * * ------------------------------------------------- * * ------------------------------------------------- * * | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | * * ------------------------------------------------- * * | 224 | 228 | 232 | 236 | 240 | 244 | 248 | 252 | * * ------------------------------------------------- * * | R31 |hiddn| CR | LR | PC |bchai|linkr| FCTX| * * ------------------------------------------------- * * ------------------------------------------------- * * | 64 | | * * ------------------------------------------------- * * | 256 | | * * ------------------------------------------------- * * | DATA| | * * ------------------------------------------------- * * * *******************************************************/ .text .globl _make_fcontext .align 2 _make_fcontext: # save return address into R6 mflr r6 # first arg of make_fcontext() == top address of context-function # shift address in R3 to lower 16 byte boundary clrrwi r3, r3, 4 # reserve space for context-data on context-stack # including 64 byte of linkage + parameter area (R1 16 == 0) subi r3, r3, 336 # third arg of make_fcontext() == address of context-function stw r5, 240(r3) # set back-chain to zero li r0, 0 stw r0, 244(r3) mffs f0 # load FPSCR stfd f0, 144(r3) # save FPSCR # compute address of returned transfer_t addi r0, r3, 252 mr r4, r0 stw r4, 228(r3) # load LR mflr r0 # jump to label 1 bl 1f 1: # load LR into R4 mflr r4 # compute abs address of label finish addi r4, r4, finish - 1b # restore LR mtlr r0 # save address of finish as return-address for context-function # will be entered after context-function returns stw r4, 236(r3) # restore return address from R6 mtlr r6 blr # return pointer to context-data finish: # save return address into R0 mflr r0 # save return address on stack, set up stack frame stw r0, 4(r1) # allocate stack space, R1 16 == 0 stwu r1, -16(r1) # exit code is zero li r3, 0 # exit application bl _exit@plt
whupdup/frame
real/third_party/boost_context/asm/not_modified_yet/make_ppc32_sysv_macho_gas.S
Assembly
gpl-3.0
5,461
/* Copyright Oliver Kowalke 2009. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) */ /****************************************************** * * * ------------------------------------------------- * * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | * * ------------------------------------------------- * * | 0 | 4 | 8 | 12 | 16 | 20 | 24 | 28 | * * ------------------------------------------------- * * | F14 | F15 | F16 | F17 | * * ------------------------------------------------- * * ------------------------------------------------- * * | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * * ------------------------------------------------- * * | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 60 | * * ------------------------------------------------- * * | F18 | F19 | F20 | F21 | * * ------------------------------------------------- * * ------------------------------------------------- * * | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | * * ------------------------------------------------- * * | 64 | 68 | 72 | 76 | 80 | 84 | 88 | 92 | * * ------------------------------------------------- * * | F22 | F23 | F24 | F25 | * * ------------------------------------------------- * * ------------------------------------------------- * * | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | * * ------------------------------------------------- * * | 96 | 100 | 104 | 108 | 112 | 116 | 120 | 124 | * * ------------------------------------------------- * * | F26 | F27 | F28 | F29 | * * ------------------------------------------------- * * ------------------------------------------------- * * | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | * * ------------------------------------------------- * * | 128 | 132 | 136 | 140 | 144 | 148 | 152 | 156 | * * ------------------------------------------------- * * | F30 | F31 | fpscr | R13 | R14 | * * ------------------------------------------------- * * ------------------------------------------------- * * | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | * * ------------------------------------------------- * * | 160 | 164 | 168 | 172 | 176 | 180 | 184 | 188 | * * ------------------------------------------------- * * | R15 | R16 | R17 | R18 | R19 | R20 | R21 | R22 | * * ------------------------------------------------- * * ------------------------------------------------- * * | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | * * ------------------------------------------------- * * | 192 | 196 | 200 | 204 | 208 | 212 | 216 | 220 | * * ------------------------------------------------- * * | R23 | R24 | R25 | R26 | R27 | R28 | R29 | R30 | * * ------------------------------------------------- * * ------------------------------------------------- * * | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | * * ------------------------------------------------- * * | 224 | 228 | 232 | 236 | 240 | 244 | 248 | 252 | * * ------------------------------------------------- * * | R31 |hiddn| CR | LR | PC |bchai|linkr| FCTX| * * ------------------------------------------------- * * ------------------------------------------------- * * | 64 | | * * ------------------------------------------------- * * | 256 | | * * ------------------------------------------------- * * | DATA| | * * ------------------------------------------------- * * * *******************************************************/ .globl make_fcontext[DS] .globl .make_fcontext[PR] .align 2 .csect make_fcontext[DS] make_fcontext: .long .make_fcontext[PR] .csect .make_fcontext[PR], 3 #.make_fcontext: # save return address into R6 mflr 6 # first arg of make_fcontext() == top address of context-function # shift address in R3 to lower 16 byte boundary clrrwi 3, 3, 4 # reserve space for context-data on context-stack # including 64 byte of linkage + parameter area (R1 % 16 == 0) subi 3, 3, 336 # third arg of make_fcontext() == address of context-function stw 5, 240(3) # set back-chain to zero li 0, 0 stw 0, 244(3) # compute address of returned transfer_t addi 0, 3, 252 mr 4, 0 stw 4, 228(3) # load LR mflr 0 # jump to label 1 bl .Label .Label: # load LR into R4 mflr 4 # compute abs address of label .L_finish addi 4, 4, .L_finish - .Label # restore LR mtlr 0 # save address of finish as return-address for context-function # will be entered after context-function returns stw 4, 236(3) # restore return address from R6 mtlr 6 blr # return pointer to context-data .L_finish: # save return address into R0 mflr 0 # save return address on stack, set up stack frame stw 0, 4(1) # allocate stack space, R1 % 16 == 0 stwu 1, -16(1) # exit code is zero li 3, 0 # exit application bl ._exit nop
whupdup/frame
real/third_party/boost_context/asm/not_modified_yet/make_ppc32_sysv_xcoff_gas.S
Assembly
gpl-3.0
5,522
/* Copyright Oliver Kowalke 2009. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) */ /******************************************************* * * * ------------------------------------------------- * * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | * * ------------------------------------------------- * * | 0 | 4 | 8 | 12 | 16 | 20 | 24 | 28 | * * ------------------------------------------------- * * | TOC | R14 | R15 | R16 | * * ------------------------------------------------- * * ------------------------------------------------- * * | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * * ------------------------------------------------- * * | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 60 | * * ------------------------------------------------- * * | R17 | R18 | R19 | R20 | * * ------------------------------------------------- * * ------------------------------------------------- * * | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | * * ------------------------------------------------- * * | 64 | 68 | 72 | 76 | 80 | 84 | 88 | 92 | * * ------------------------------------------------- * * | R21 | R22 | R23 | R24 | * * ------------------------------------------------- * * ------------------------------------------------- * * | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | * * ------------------------------------------------- * * | 96 | 100 | 104 | 108 | 112 | 116 | 120 | 124 | * * ------------------------------------------------- * * | R25 | R26 | R27 | R28 | * * ------------------------------------------------- * * ------------------------------------------------- * * | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | * * ------------------------------------------------- * * | 128 | 132 | 136 | 140 | 144 | 148 | 152 | 156 | * * ------------------------------------------------- * * | R29 | R30 | R31 | hidden | * * ------------------------------------------------- * * ------------------------------------------------- * * | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | * * ------------------------------------------------- * * | 160 | 164 | 168 | 172 | 176 | 180 | 184 | 188 | * * ------------------------------------------------- * * | CR | LR | PC | back-chain| * * ------------------------------------------------- * * ------------------------------------------------- * * | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | * * ------------------------------------------------- * * | 192 | 196 | 200 | 204 | 208 | 212 | 216 | 220 | * * ------------------------------------------------- * * | cr saved | lr saved | compiler | linker | * * ------------------------------------------------- * * ------------------------------------------------- * * | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | * * ------------------------------------------------- * * | 224 | 228 | 232 | 236 | 240 | 244 | 248 | 252 | * * ------------------------------------------------- * * | TOC saved | FCTX | DATA | | * * ------------------------------------------------- * * * *******************************************************/ .globl make_fcontext #if _CALL_ELF == 2 .text .align 2 make_fcontext: addis %r2, %r12, .TOC.-make_fcontext@ha addi %r2, %r2, .TOC.-make_fcontext@l .localentry make_fcontext, . - make_fcontext #else .section ".opd","aw" .align 3 make_fcontext: # ifdef _CALL_LINUX .quad .L.make_fcontext,.TOC.@tocbase,0 .type make_fcontext,@function .text .align 2 .L.make_fcontext: # else .hidden .make_fcontext .globl .make_fcontext .quad .make_fcontext,.TOC.@tocbase,0 .size make_fcontext,24 .type .make_fcontext,@function .text .align 2 .make_fcontext: # endif #endif # save return address into R6 mflr %r6 # first arg of make_fcontext() == top address of context-stack # shift address in R3 to lower 16 byte boundary clrrdi %r3, %r3, 4 # reserve space for context-data on context-stack # including 64 byte of linkage + parameter area (R1 % 16 == 0) subi %r3, %r3, 248 # third arg of make_fcontext() == address of context-function # entry point (ELFv2) or descriptor (ELFv1) #if _CALL_ELF == 2 # save address of context-function entry point std %r5, 176(%r3) #else # save address of context-function entry point ld %r4, 0(%r5) std %r4, 176(%r3) # save TOC of context-function ld %r4, 8(%r5) std %r4, 0(%r3) #endif # set back-chain to zero li %r0, 0 std %r0, 184(%r3) # compute address of returned transfer_t addi %r0, %r3, 232 mr %r4, %r0 std %r4, 152(%r3) # load LR mflr %r0 # jump to label 1 bl 1f 1: # load LR into R4 mflr %r4 # compute abs address of label finish addi %r4, %r4, finish - 1b # restore LR mtlr %r0 # save address of finish as return-address for context-function # will be entered after context-function returns std %r4, 168(%r3) # restore return address from R6 mtlr %r6 blr # return pointer to context-data finish: # save return address into R0 mflr %r0 # save return address on stack, set up stack frame std %r0, 8(%r1) # allocate stack space, R1 % 16 == 0 stdu %r1, -32(%r1) # exit code is zero li %r3, 0 # exit application bl _exit nop #if _CALL_ELF == 2 .size make_fcontext, .-make_fcontext #else # ifdef _CALL_LINUX .size .make_fcontext, .-.L.make_fcontext # else .size .make_fcontext, .-.make_fcontext # endif #endif /* Mark that we don't need executable stack. */ .section .note.GNU-stack,"",%progbits
whupdup/frame
real/third_party/boost_context/asm/not_modified_yet/make_ppc64_sysv_elf_gas.S
Assembly
gpl-3.0
6,123
/* Copyright Oliver Kowalke 2009. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) */ /******************************************************* * * * ------------------------------------------------- * * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | * * ------------------------------------------------- * * | 0 | 4 | 8 | 12 | 16 | 20 | 24 | 28 | * * ------------------------------------------------- * * | TOC | R14 | R15 | R16 | * * ------------------------------------------------- * * ------------------------------------------------- * * | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * * ------------------------------------------------- * * | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 60 | * * ------------------------------------------------- * * | R17 | R18 | R19 | R20 | * * ------------------------------------------------- * * ------------------------------------------------- * * | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | * * ------------------------------------------------- * * | 64 | 68 | 72 | 76 | 80 | 84 | 88 | 92 | * * ------------------------------------------------- * * | R21 | R22 | R23 | R24 | * * ------------------------------------------------- * * ------------------------------------------------- * * | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | * * ------------------------------------------------- * * | 96 | 100 | 104 | 108 | 112 | 116 | 120 | 124 | * * ------------------------------------------------- * * | R25 | R26 | R27 | R28 | * * ------------------------------------------------- * * ------------------------------------------------- * * | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | * * ------------------------------------------------- * * | 128 | 132 | 136 | 140 | 144 | 148 | 152 | 156 | * * ------------------------------------------------- * * | R29 | R30 | R31 | hidden | * * ------------------------------------------------- * * ------------------------------------------------- * * | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | * * ------------------------------------------------- * * | 160 | 164 | 168 | 172 | 176 | 180 | 184 | 188 | * * ------------------------------------------------- * * | CR | LR | PC | back-chain| * * ------------------------------------------------- * * ------------------------------------------------- * * | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | * * ------------------------------------------------- * * | 192 | 196 | 200 | 204 | 208 | 212 | 216 | 220 | * * ------------------------------------------------- * * | cr saved | lr saved | compiler | linker | * * ------------------------------------------------- * * ------------------------------------------------- * * | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | * * ------------------------------------------------- * * | 224 | 228 | 232 | 236 | 240 | 244 | 248 | 252 | * * ------------------------------------------------- * * | TOC saved | FCTX | DATA | | * * ------------------------------------------------- * * * .text .globl _make_fcontext _make_fcontext: ; save return address into R6 mflr r6 ; first arg of make_fcontext() == top address of context-function ; shift address in R3 to lower 16 byte boundary clrrwi r3, r3, 4 ; reserve space for context-data on context-stack ; including 64 byte of linkage + parameter area (R1 16 == 0) subi r3, r3, 248 ; third arg of make_fcontext() == address of context-function stw r5, 176(r3) ; set back-chain to zero li %r0, 0 std %r0, 184(%r3) ; compute address of returned transfer_t addi %r0, %r3, 232 mr %r4, %r0 std %r4, 152(%r3) ; load LR mflr r0 ; jump to label 1 bl l1 l1: ; load LR into R4 mflr r4 ; compute abs address of label finish addi r4, r4, lo16((finish - .) + 4) ; restore LR mtlr r0 ; save address of finish as return-address for context-function ; will be entered after context-function returns std r4, 168(r3) ; restore return address from R6 mtlr r6 blr ; return pointer to context-data finish: ; save return address into R0 mflr r0 ; save return address on stack, set up stack frame stw r0, 8(r1) ; allocate stack space, R1 16 == 0 stwu r1, -32(r1) ; set return value to zero li r3, 0 ; exit application bl __exit nop
whupdup/frame
real/third_party/boost_context/asm/not_modified_yet/make_ppc64_sysv_macho_gas.S
Assembly
gpl-3.0
4,959
.globl make_fcontext[DS] .globl .make_fcontext[PR] .align 2 .csect .make_fcontext[PR], 3 .globl _make_fcontext #._make_fcontext: # save return address into R6 mflr 6 # first arg of make_fcontext() == top address of context-function # shift address in R3 to lower 16 byte boundary clrrwi 3, 3, 4 # reserve space for context-data on context-stack # including 64 byte of linkage + parameter area (R1 % 16 == 0) subi 3, 3, 248 # third arg of make_fcontext() == address of context-function stw 5, 176(3) # set back-chain to zero li 0, 0 std 0, 184(3) # compute address of returned transfer_t addi 0, 3, 232 mr 4, 0 std 4, 152(3) # load LR mflr 0 # jump to label 1 bl .Label .Label: # load LR into R4 mflr 4 # compute abs address of label .L_finish addi 4, 4, .L_finish - .Label # restore LR mtlr 0 # save address of finish as return-address for context-function # will be entered after context-function returns stw 4, 168(3) # restore return address from R6 mtlr 6 blr # return pointer to context-data .L_finish: # save return address into R0 mflr 0 # save return address on stack, set up stack frame stw 0, 8(1) # allocate stack space, R1 % 16 == 0 stwu 1, -32(1) # exit code is zero li 3, 0 # exit application bl ._exit nop
whupdup/frame
real/third_party/boost_context/asm/not_modified_yet/make_ppc64_sysv_xcoff_gas.S
Assembly
gpl-3.0
1,436
/* Copyright Oliver Kowalke 2009. Copyright Thomas Sailer 2013. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) */ /************************************************************************************* * ---------------------------------------------------------------------------------- * * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | * * ---------------------------------------------------------------------------------- * * | 0x0 | 0x4 | 0x8 | 0xc | 0x10 | 0x14 | 0x18 | 0x1c | * * ---------------------------------------------------------------------------------- * * | SEE registers (XMM6-XMM15) | * * ---------------------------------------------------------------------------------- * * ---------------------------------------------------------------------------------- * * | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * * ---------------------------------------------------------------------------------- * * | 0x20 | 0x24 | 0x28 | 0x2c | 0x30 | 0x34 | 0x38 | 0x3c | * * ---------------------------------------------------------------------------------- * * | SEE registers (XMM6-XMM15) | * * ---------------------------------------------------------------------------------- * * ---------------------------------------------------------------------------------- * * | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | * * ---------------------------------------------------------------------------------- * * | 0xe40 | 0x44 | 0x48 | 0x4c | 0x50 | 0x54 | 0x58 | 0x5c | * * ---------------------------------------------------------------------------------- * * | SEE registers (XMM6-XMM15) | * * ---------------------------------------------------------------------------------- * * ---------------------------------------------------------------------------------- * * | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | * * ---------------------------------------------------------------------------------- * * | 0x60 | 0x64 | 0x68 | 0x6c | 0x70 | 0x74 | 0x78 | 0x7c | * * ---------------------------------------------------------------------------------- * * | SEE registers (XMM6-XMM15) | * * ---------------------------------------------------------------------------------- * * ---------------------------------------------------------------------------------- * * | 32 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | * * ---------------------------------------------------------------------------------- * * | 0x80 | 0x84 | 0x88 | 0x8c | 0x90 | 0x94 | 0x98 | 0x9c | * * ---------------------------------------------------------------------------------- * * | SEE registers (XMM6-XMM15) | * * ---------------------------------------------------------------------------------- * * ---------------------------------------------------------------------------------- * * | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | * * ---------------------------------------------------------------------------------- * * | 0xa0 | 0xa4 | 0xa8 | 0xac | 0xb0 | 0xb4 | 0xb8 | 0xbc | * * ---------------------------------------------------------------------------------- * * | fc_mxcsr|fc_x87_cw| <alignment> | fbr_strg | fc_dealloc | * * ---------------------------------------------------------------------------------- * * ---------------------------------------------------------------------------------- * * | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | * * ---------------------------------------------------------------------------------- * * | 0xc0 | 0xc4 | 0xc8 | 0xcc | 0xd0 | 0xd4 | 0xd8 | 0xdc | * * ---------------------------------------------------------------------------------- * * | limit | base | R12 | R13 | * * ---------------------------------------------------------------------------------- * * ---------------------------------------------------------------------------------- * * | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | * * ---------------------------------------------------------------------------------- * * | 0xe0 | 0xe4 | 0xe8 | 0xec | 0xf0 | 0xf4 | 0xf8 | 0xfc | * * ---------------------------------------------------------------------------------- * * | R14 | R15 | RDI | RSI | * * ---------------------------------------------------------------------------------- * * ---------------------------------------------------------------------------------- * * | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | * * ---------------------------------------------------------------------------------- * * | 0x100 | 0x104 | 0x108 | 0x10c | 0x110 | 0x114 | 0x118 | 0x11c | * * ---------------------------------------------------------------------------------- * * | RBX | RBP | hidden | RIP | * * ---------------------------------------------------------------------------------- * * ---------------------------------------------------------------------------------- * * | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | * * ---------------------------------------------------------------------------------- * * | 0x120 | 0x124 | 0x128 | 0x12c | 0x130 | 0x134 | 0x138 | 0x13c | * * ---------------------------------------------------------------------------------- * * | parameter area | * * ---------------------------------------------------------------------------------- * * ---------------------------------------------------------------------------------- * * | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | * * ---------------------------------------------------------------------------------- * * | 0x140 | 0x144 | 0x148 | 0x14c | 0x150 | 0x154 | 0x158 | 0x15c | * * ---------------------------------------------------------------------------------- * * | FCTX | DATA | | * * ---------------------------------------------------------------------------------- * **************************************************************************************/ .file "make_x86_64_ms_pe_gas.asm" .text .p2align 4,,15 .globl make_fcontext .def make_fcontext; .scl 2; .type 32; .endef .seh_proc make_fcontext make_fcontext: .seh_endprologue /* first arg of make_fcontext() == top of context-stack */ movq %rcx, %rax /* shift address in RAX to lower 16 byte boundary */ /* == pointer to fcontext_t and address of context stack */ andq $-16, %rax /* reserve space for context-data on context-stack */ /* on context-function entry: (RSP -0x8) % 16 == 0 */ leaq -0x150(%rax), %rax /* third arg of make_fcontext() == address of context-function */ movq %r8, 0x100(%rax) /* first arg of make_fcontext() == top of context-stack */ /* save top address of context stack as 'base' */ movq %rcx, 0xc8(%rax) /* second arg of make_fcontext() == size of context-stack */ /* negate stack size for LEA instruction (== substraction) */ negq %rdx /* compute bottom address of context stack (limit) */ leaq (%rcx,%rdx), %rcx /* save bottom address of context stack as 'limit' */ movq %rcx, 0xc0(%rax) /* save address of context stack limit as 'dealloction stack' */ movq %rcx, 0xb8(%rax) /* set fiber-storage to zero */ xorq %rcx, %rcx movq %rcx, 0xb0(%rax) /* compute address of transport_t */ leaq 0x140(%rax), %rcx /* store address of transport_t in hidden field */ movq %rcx, 0x110(%rax) /* compute abs address of label trampoline */ leaq trampoline(%rip), %rcx /* save address of finish as return-address for context-function */ /* will be entered after jump_fcontext() first time */ movq %rcx, 0x118(%rax) /* compute abs address of label finish */ leaq finish(%rip), %rcx /* save address of finish as return-address for context-function */ /* will be entered after context-function returns */ movq %rcx, 0x108(%rax) ret /* return pointer to context-data */ trampoline: /* store return address on stack */ /* fix stack alignment */ pushq %rbp /* jump to context-function */ jmp *%rbx finish: /* 32byte shadow-space for _exit() */ andq $-32, %rsp /* 32byte shadow-space for _exit() are */ /* already reserved by make_fcontext() */ /* exit code is zero */ xorq %rcx, %rcx /* exit application */ call _exit hlt .seh_endproc .def _exit; .scl 2; .type 32; .endef /* standard C library function */ .section .drectve .ascii " -export:\"make_fcontext\""
whupdup/frame
real/third_party/boost_context/asm/not_modified_yet/make_x86_64_ms_pe_gas.S
Assembly
gpl-3.0
9,650
// Copyright Oliver Kowalke 2009. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // Modified for use in FiberTaskingLib // // FiberTaskingLib is the legal property of Adrian Astley // Copyright Adrian Astley 2015 - 2018 #pragma once #include <stddef.h> // size_t namespace boost_context { using fcontext_t = void *; extern "C" void jump_fcontext(fcontext_t *from, fcontext_t to, void *arg); extern "C" fcontext_t make_fcontext(void *sp, size_t size, void (*func)(void *)); // sp is the pointer to the _top_ of the stack (ie &stack_buffer[size]). } // End of namespace boost_context
whupdup/frame
real/third_party/boost_context/include/boost_context/fcontext.h
C++
gpl-3.0
719
BasedOnStyle: Chromium AlignAfterOpenBracket: Align AlignConsecutiveAssignments: true AlignConsecutiveDeclarations: true AlignConsecutiveMacros: true AlignEscapedNewlines: true # AlignOperands: Align AlignTrailingComments: true AlwaysBreakAfterReturnType: AllDefinitions BreakBeforeBraces: Allman ColumnLimit: 80 DerivePointerAlignment: false IndentCaseLabels: false PointerAlignment: Left SpaceBeforeParens: ControlStatements SpacesInParentheses: true
whupdup/frame
real/third_party/freetype-2.12.0/.clang-format
none
gpl-3.0
453
# CMakeLists.txt # # Copyright (C) 2013-2022 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # Written originally by John Cary <cary@txcorp.com> # # This file is part of the FreeType project, and may only be used, modified, # and distributed under the terms of the FreeType project license, # LICENSE.TXT. By continuing to use, modify, or distribute this file you # indicate that you have read the license and understand and accept it # fully. # # # The following will (1) create a build directory, and (2) change into it and # call cmake to configure the build with default parameters as a static # library. See # # https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html # # for information about debug or release builds, for example # # cmake -B build -D CMAKE_BUILD_TYPE=Release # # # For a dynamic library, use # # cmake -B build -D BUILD_SHARED_LIBS=true -D CMAKE_BUILD_TYPE=Release # # For a framework on OS X, use # # cmake -E chdir build cmake -G Xcode -D BUILD_FRAMEWORK:BOOL=true .. # # For an iOS static library, use # # cmake -E chdir build cmake -G Xcode -D IOS_PLATFORM=OS .. # # or # # cmake -E chdir build cmake -G Xcode -D IOS_PLATFORM=SIMULATOR .. # # or # # cmake -E chdir build cmake -G Xcode -D IOS_PLATFORM=SIMULATOR64 .. # # # Finally, build the project with # # cmake --build build # # Install it with # # (sudo) cmake --build build --target install # # A binary distribution can be made with # # cmake --build build --config Release --target package # # Please refer to the cmake manual for further options, in particular, how # to modify compilation and linking parameters. # # Some notes. # # - `cmake' creates configuration files in # # <build-directory>/include/freetype/config # # which should be further modified if necessary. # # - You can use `cmake' directly on a freshly cloned FreeType git # repository. # # - `CMakeLists.txt' is provided as-is since it is normally not used by the # developer team. # # - Set the `FT_REQUIRE_ZLIB', `FT_REQUIRE_BZIP2', `FT_REQUIRE_PNG', # `FT_REQUIRE_HARFBUZZ', and `FT_REQUIRE_BROTLI' CMake variables to `ON' # or `TRUE' to force using a dependency. Leave a variable undefined # (which is the default) to use the dependency only if it is available. # Example: # # cmake -B build -D FT_REQUIRE_ZLIB=TRUE \ # -D FT_REQUIRE_BZIP2=TRUE \ # -D FT_REQUIRE_PNG=TRUE \ # -D FT_REQUIRE_HARFBUZZ=TRUE \ # -D FT_REQUIRE_BROTLI=TRUE [...] # # - Set `FT_DISABLE_XXX=TRUE' to disable a dependency completely (where # `XXX' is a CMake package name like `BZip2'). Example for disabling all # dependencies: # # cmake -B build -D FT_DISABLE_ZLIB=TRUE \ # -D FT_DISABLE_BZIP2=TRUE \ # -D FT_DISABLE_PNG=TRUE \ # -D FT_DISABLE_HARFBUZZ=TRUE \ # -D FT_DISABLE_BROTLI=TRUE [...] # # - NOTE: If a package is set as DISABLED, it cannot be set as REQUIRED # without unsetting the DISABLED value first. For example, if # `FT_DISABLE_HARFBUZZ=TRUE' has been set (Cache is present), you need to # call `FT_DISABLE_HARFBUZZ=FALSE' before calling # `FT_REQUIRE_HARFBUZZ=TRUE'. # # - Installation of FreeType can be controlled with the CMake variables # `SKIP_INSTALL_HEADERS', `SKIP_INSTALL_LIBRARIES', and `SKIP_INSTALL_ALL' # (this is compatible with the same CMake variables in zlib's CMake # support). # To minimize the number of cmake_policy() workarounds, # CMake >= 3 is requested. cmake_minimum_required(VERSION 3.0) if (NOT CMAKE_VERSION VERSION_LESS 3.3) # Allow symbol visibility settings also on static libraries. CMake < 3.3 # only sets the property on a shared library build. cmake_policy(SET CMP0063 NEW) # Support new IN_LIST if() operator. cmake_policy(SET CMP0057 NEW) endif () include(CheckIncludeFile) include(CMakeDependentOption) include(FindPkgConfig) # CMAKE_TOOLCHAIN_FILE must be set before `project' is called, which # configures the base build environment and references the toolchain file if (APPLE) if (DEFINED IOS_PLATFORM) if (NOT "${IOS_PLATFORM}" STREQUAL "OS" AND NOT "${IOS_PLATFORM}" STREQUAL "SIMULATOR" AND NOT "${IOS_PLATFORM}" STREQUAL "SIMULATOR64") message(FATAL_ERROR "IOS_PLATFORM must be set to either OS, SIMULATOR, or SIMULATOR64") endif () if (NOT "${CMAKE_GENERATOR}" STREQUAL "Xcode") message(AUTHOR_WARNING "You should use Xcode generator with IOS_PLATFORM enabled to get Universal builds.") endif () if (BUILD_SHARED_LIBS) message(FATAL_ERROR "BUILD_SHARED_LIBS can not be on with IOS_PLATFORM enabled") endif () if (BUILD_FRAMEWORK) message(FATAL_ERROR "BUILD_FRAMEWORK can not be on with IOS_PLATFORM enabled") endif () # iOS only uses static libraries set(BUILD_SHARED_LIBS OFF) set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/builds/cmake/iOS.cmake) endif () else () if (DEFINED IOS_PLATFORM) message(FATAL_ERROR "IOS_PLATFORM is not supported on this platform") endif () endif () project(freetype C) set(VERSION_MAJOR "2") set(VERSION_MINOR "12") set(VERSION_PATCH "0") # Generate LIBRARY_VERSION and LIBRARY_SOVERSION. set(LIBTOOL_REGEX "version_info='([0-9]+):([0-9]+):([0-9]+)'") file(STRINGS "${PROJECT_SOURCE_DIR}/builds/unix/configure.raw" VERSION_INFO REGEX ${LIBTOOL_REGEX}) string(REGEX REPLACE ${LIBTOOL_REGEX} "\\1" LIBTOOL_CURRENT "${VERSION_INFO}") string(REGEX REPLACE ${LIBTOOL_REGEX} "\\2" LIBTOOL_REVISION "${VERSION_INFO}") string(REGEX REPLACE ${LIBTOOL_REGEX} "\\3" LIBTOOL_AGE "${VERSION_INFO}") # This is what libtool does internally on Unix platforms. math(EXPR LIBRARY_SOVERSION "${LIBTOOL_CURRENT} - ${LIBTOOL_AGE}") set(LIBRARY_VERSION "${LIBRARY_SOVERSION}.${LIBTOOL_AGE}.${LIBTOOL_REVISION}") # External dependency library detection is automatic. See the notes at the # top of this file, for how to force or disable dependencies completely. option(FT_DISABLE_ZLIB "Disable use of system zlib and use internal zlib library instead." OFF) cmake_dependent_option(FT_REQUIRE_ZLIB "Require system zlib instead of internal zlib library." OFF "NOT FT_DISABLE_ZLIB" OFF) option(FT_DISABLE_BZIP2 "Disable support of bzip2 compressed fonts." OFF) cmake_dependent_option(FT_REQUIRE_BZIP2 "Require support of bzip2 compressed fonts." OFF "NOT FT_DISABLE_BZIP2" OFF) option(FT_DISABLE_PNG "Disable support of PNG compressed OpenType embedded bitmaps." OFF) cmake_dependent_option(FT_REQUIRE_PNG "Require support of PNG compressed OpenType embedded bitmaps." OFF "NOT FT_DISABLE_PNG" OFF) option(FT_DISABLE_HARFBUZZ "Disable HarfBuzz (used for improving auto-hinting of OpenType fonts)." OFF) cmake_dependent_option(FT_REQUIRE_HARFBUZZ "Require HarfBuzz for improving auto-hinting of OpenType fonts." OFF "NOT FT_DISABLE_HARFBUZZ" OFF) option(FT_DISABLE_BROTLI "Disable support of compressed WOFF2 fonts." OFF) cmake_dependent_option(FT_REQUIRE_BROTLI "Require support of compressed WOFF2 fonts." OFF "NOT FT_DISABLE_BROTLI" OFF) # Disallow in-source builds if ("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") message(FATAL_ERROR "In-source builds are not permitted! Make a separate folder for" " building, e.g.,\n" " cmake -E make_directory build\n" " cmake -E chdir build cmake ..\n" "Before that, remove the files created by this failed run with\n" " cmake -E remove CMakeCache.txt\n" " cmake -E remove_directory CMakeFiles") endif () # Add local cmake modules list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/builds/cmake) if (BUILD_FRAMEWORK) if (NOT "${CMAKE_GENERATOR}" STREQUAL "Xcode") message(FATAL_ERROR "You should use Xcode generator with BUILD_FRAMEWORK enabled") endif () set(CMAKE_OSX_ARCHITECTURES "$(ARCHS_STANDARD)") set(BUILD_SHARED_LIBS ON) endif () # Find dependencies if (NOT FT_DISABLE_HARFBUZZ) set(HARFBUZZ_MIN_VERSION "2.0.0") if (FT_REQUIRE_HARFBUZZ) find_package(HarfBuzz ${HARFBUZZ_MIN_VERSION} REQUIRED) else () find_package(HarfBuzz ${HARFBUZZ_MIN_VERSION}) endif () endif () if (NOT FT_DISABLE_PNG) if (FT_REQUIRE_PNG) find_package(PNG REQUIRED) else () find_package(PNG) endif () endif () if (NOT FT_DISABLE_ZLIB) if (FT_REQUIRE_ZLIB) find_package(ZLIB REQUIRED) else () find_package(ZLIB) endif () endif () if (NOT FT_DISABLE_BZIP2) # Genuine BZip2 does not provide bzip2.pc, but some platforms have it. # For better dependency in freetype2.pc, bzip2.pc is searched # regardless of the availability of libbz2. If bzip2.pc is found, # Requires.private is used instead of Libs.private. if (FT_REQUIRE_BZIP2) find_package(BZip2 REQUIRED) else () find_package(BZip2) endif () pkg_check_modules(PC_BZIP2 bzip2) endif () if (NOT FT_DISABLE_BROTLI) if (FT_REQUIRE_BROTLI) find_package(BrotliDec REQUIRED) else () find_package(BrotliDec) endif () endif () # Create the configuration file if (UNIX) check_include_file("unistd.h" HAVE_UNISTD_H) check_include_file("fcntl.h" HAVE_FCNTL_H) file(READ "${PROJECT_SOURCE_DIR}/builds/unix/ftconfig.h.in" FTCONFIG_H) if (HAVE_UNISTD_H) string(REGEX REPLACE "#undef +(HAVE_UNISTD_H)" "#define \\1 1" FTCONFIG_H "${FTCONFIG_H}") endif () if (HAVE_FCNTL_H) string(REGEX REPLACE "#undef +(HAVE_FCNTL_H)" "#define \\1 1" FTCONFIG_H "${FTCONFIG_H}") endif () else () file(READ "${PROJECT_SOURCE_DIR}/include/freetype/config/ftconfig.h" FTCONFIG_H) endif () set(FTCONFIG_H_NAME "${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h") if (EXISTS "${FTCONFIG_H_NAME}") file(READ "${FTCONFIG_H_NAME}" ORIGINAL_FTCONFIG_H) else () set(ORIGINAL_FTCONFIG_H "") endif () if (NOT (ORIGINAL_FTCONFIG_H STREQUAL FTCONFIG_H)) file(WRITE "${FTCONFIG_H_NAME}" "${FTCONFIG_H}") endif () # Create the options file file(READ "${PROJECT_SOURCE_DIR}/include/freetype/config/ftoption.h" FTOPTION_H) if (ZLIB_FOUND) string(REGEX REPLACE "/\\* +(#define +FT_CONFIG_OPTION_SYSTEM_ZLIB) +\\*/" "\\1" FTOPTION_H "${FTOPTION_H}") endif () if (BZIP2_FOUND) string(REGEX REPLACE "/\\* +(#define +FT_CONFIG_OPTION_USE_BZIP2) +\\*/" "\\1" FTOPTION_H "${FTOPTION_H}") endif () if (PNG_FOUND) string(REGEX REPLACE "/\\* +(#define +FT_CONFIG_OPTION_USE_PNG) +\\*/" "\\1" FTOPTION_H "${FTOPTION_H}") endif () if (HARFBUZZ_FOUND) string(REGEX REPLACE "/\\* +(#define +FT_CONFIG_OPTION_USE_HARFBUZZ) +\\*/" "\\1" FTOPTION_H "${FTOPTION_H}") endif () if (BROTLIDEC_FOUND) string(REGEX REPLACE "/\\* +(#define +FT_CONFIG_OPTION_USE_BROTLI) +\\*/" "\\1" FTOPTION_H "${FTOPTION_H}") endif () set(FTOPTION_H_NAME "${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h") if (EXISTS "${FTOPTION_H_NAME}") file(READ "${FTOPTION_H_NAME}" ORIGINAL_FTOPTION_H) else () set(ORIGINAL_FTOPTION_H "") endif () if (NOT (ORIGINAL_FTOPTION_H STREQUAL FTOPTION_H)) file(WRITE "${FTOPTION_H_NAME}" "${FTOPTION_H}") endif () file(GLOB PUBLIC_HEADERS "include/ft2build.h" "include/freetype/*.h") file(GLOB PUBLIC_CONFIG_HEADERS "include/freetype/config/*.h") file(GLOB PRIVATE_HEADERS "include/freetype/internal/*.h") set(BASE_SRCS src/autofit/autofit.c src/base/ftbase.c src/base/ftbbox.c src/base/ftbdf.c src/base/ftbitmap.c src/base/ftcid.c src/base/ftfstype.c src/base/ftgasp.c src/base/ftglyph.c src/base/ftgxval.c src/base/ftinit.c src/base/ftmm.c src/base/ftotval.c src/base/ftpatent.c src/base/ftpfr.c src/base/ftstroke.c src/base/ftsynth.c src/base/fttype1.c src/base/ftwinfnt.c src/bdf/bdf.c src/bzip2/ftbzip2.c src/cache/ftcache.c src/cff/cff.c src/cid/type1cid.c src/gzip/ftgzip.c src/lzw/ftlzw.c src/pcf/pcf.c src/pfr/pfr.c src/psaux/psaux.c src/pshinter/pshinter.c src/psnames/psnames.c src/raster/raster.c src/sdf/sdf.c src/sfnt/sfnt.c src/smooth/smooth.c src/svg/svg.c src/truetype/truetype.c src/type1/type1.c src/type42/type42.c src/winfonts/winfnt.c ) if (UNIX) list(APPEND BASE_SRCS "builds/unix/ftsystem.c") elseif (WIN32) list(APPEND BASE_SRCS "builds/windows/ftsystem.c") else () list(APPEND BASE_SRCS "src/base/ftsystem.c") endif () if (WIN32) enable_language(RC) list(APPEND BASE_SRCS builds/windows/ftdebug.c src/base/ftver.rc) elseif (WINCE) list(APPEND BASE_SRCS builds/wince/ftdebug.c) else () list(APPEND BASE_SRCS src/base/ftdebug.c) endif () if (BUILD_FRAMEWORK) list(APPEND BASE_SRCS builds/mac/freetype-Info.plist) endif () if (NOT DISABLE_FORCE_DEBUG_POSTFIX) set(CMAKE_DEBUG_POSTFIX d) endif () add_library(freetype ${PUBLIC_HEADERS} ${PUBLIC_CONFIG_HEADERS} ${PRIVATE_HEADERS} ${BASE_SRCS} ) set_target_properties( freetype PROPERTIES C_VISIBILITY_PRESET hidden) target_compile_definitions( freetype PRIVATE FT2_BUILD_LIBRARY) if (WIN32) target_compile_definitions( freetype PRIVATE _CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_WARNINGS) if (BUILD_SHARED_LIBS) target_compile_definitions( freetype PRIVATE DLL_EXPORT) endif () endif () if (BUILD_SHARED_LIBS) set_target_properties(freetype PROPERTIES VERSION ${LIBRARY_VERSION} SOVERSION ${LIBRARY_SOVERSION}) endif () # Pick up ftconfig.h and ftoption.h generated above, first. target_include_directories( freetype PUBLIC $<INSTALL_INTERFACE:include/freetype2> $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/include ${CMAKE_CURRENT_SOURCE_DIR}/include # Make <ftconfig.h> available for builds/unix/ftsystem.c. ${CMAKE_CURRENT_BINARY_DIR}/include/freetype/config ) if (BUILD_FRAMEWORK) set_property(SOURCE ${PUBLIC_CONFIG_HEADERS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/config ) set_target_properties(freetype PROPERTIES FRAMEWORK TRUE MACOSX_FRAMEWORK_INFO_PLIST builds/mac/freetype-Info.plist PUBLIC_HEADER "${PUBLIC_HEADERS}" XCODE_ATTRIBUTE_INSTALL_PATH "@rpath" ) endif () set(PKG_CONFIG_REQUIRED_PRIVATE "") set(PKG_CONFIG_LIBS_PRIVATE "") if (ZLIB_FOUND) target_link_libraries(freetype PRIVATE ${ZLIB_LIBRARIES}) target_include_directories(freetype PRIVATE ${ZLIB_INCLUDE_DIRS}) list(APPEND PKG_CONFIG_REQUIRED_PRIVATE "zlib") endif () if (BZIP2_FOUND) target_link_libraries(freetype PRIVATE ${BZIP2_LIBRARIES}) target_include_directories(freetype PRIVATE ${BZIP2_INCLUDE_DIR}) # not BZIP2_INCLUDE_DIRS if (PC_BZIP2_FOUND) list(APPEND PKG_CONFIG_REQUIRED_PRIVATE "bzip2") else () list(APPEND PKG_CONFIG_LIBS_PRIVATE "-lbz2") endif () endif () if (PNG_FOUND) target_link_libraries(freetype PRIVATE ${PNG_LIBRARIES}) target_compile_definitions(freetype PRIVATE ${PNG_DEFINITIONS}) target_include_directories(freetype PRIVATE ${PNG_INCLUDE_DIRS}) list(APPEND PKG_CONFIG_REQUIRED_PRIVATE "libpng") endif () if (HarfBuzz_FOUND) target_link_libraries(freetype PRIVATE ${HarfBuzz_LIBRARY}) target_include_directories(freetype PRIVATE ${HarfBuzz_INCLUDE_DIRS}) list(APPEND PKG_CONFIG_REQUIRED_PRIVATE "harfbuzz >= ${HARFBUZZ_MIN_VERSION}") endif () if (BROTLIDEC_FOUND) target_link_libraries(freetype PRIVATE ${BROTLIDEC_LIBRARIES}) target_compile_definitions(freetype PRIVATE ${BROTLIDEC_DEFINITIONS}) target_include_directories(freetype PRIVATE ${BROTLIDEC_INCLUDE_DIRS}) list(APPEND PKG_CONFIG_REQUIRED_PRIVATE "libbrotlidec") endif () # Installation include(GNUInstallDirs) if (NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL) install( # Note the trailing slash in the argument to `DIRECTORY'! DIRECTORY ${PROJECT_SOURCE_DIR}/include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/freetype2 COMPONENT headers PATTERN "internal" EXCLUDE PATTERN "ftconfig.h" EXCLUDE PATTERN "ftoption.h" EXCLUDE) install( FILES ${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h ${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/freetype2/freetype/config COMPONENT headers) endif () if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL) # Generate the pkg-config file file(READ "${PROJECT_SOURCE_DIR}/builds/unix/freetype2.in" FREETYPE2_PC_IN) string(REPLACE ";" ", " PKG_CONFIG_REQUIRED_PRIVATE "${PKG_CONFIG_REQUIRED_PRIVATE}") string(REPLACE "%prefix%" ${CMAKE_INSTALL_PREFIX} FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) string(REPLACE "%exec_prefix%" "\${prefix}" FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) string(REPLACE "%libdir%" "\${prefix}/${CMAKE_INSTALL_LIBDIR}" FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) string(REPLACE "%includedir%" "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}" FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) string(REPLACE "%ft_version%" "${LIBTOOL_CURRENT}.${LIBTOOL_REVISION}.${LIBTOOL_AGE}" FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) string(REPLACE "%REQUIRES_PRIVATE%" "${PKG_CONFIG_REQUIRED_PRIVATE}" FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) string(REPLACE "%LIBS_PRIVATE%" "${PKG_CONFIG_LIBS_PRIVATE}" FREETYPE2_PC_IN ${FREETYPE2_PC_IN}) set(FREETYPE2_PC_IN_NAME "${PROJECT_BINARY_DIR}/freetype2.pc") if (EXISTS "${FREETYPE2_PC_IN_NAME}") file(READ "${FREETYPE2_PC_IN_NAME}" ORIGINAL_FREETYPE2_PC_IN) else () set(ORIGINAL_FREETYPE2_PC_IN "") endif () if (NOT (ORIGINAL_FREETYPE2_PC_IN STREQUAL FREETYPE2_PC_IN)) file(WRITE "${FREETYPE2_PC_IN_NAME}" ${FREETYPE2_PC_IN}) endif () install( FILES ${PROJECT_BINARY_DIR}/freetype2.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig COMPONENT pkgconfig) include(CMakePackageConfigHelpers) write_basic_package_version_file( ${PROJECT_BINARY_DIR}/freetype-config-version.cmake VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH} COMPATIBILITY SameMajorVersion) install( TARGETS freetype EXPORT freetype-targets LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} FRAMEWORK DESTINATION Library/Frameworks COMPONENT libraries) install( EXPORT freetype-targets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/freetype FILE freetype-config.cmake COMPONENT headers) install( FILES ${PROJECT_BINARY_DIR}/freetype-config-version.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/freetype COMPONENT headers) endif () # Packaging set(CPACK_PACKAGE_NAME ${CMAKE_PROJECT_NAME}) set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "The FreeType font rendering library.") set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README") set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.TXT") set(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR}) set(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR}) set(CPACK_PACKAGE_VERSION_PATCH ${VERSION_PATCH}) set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") if (WIN32) set(CPACK_GENERATOR ZIP) else () set(CPACK_GENERATOR TGZ) endif () set(CPACK_COMPONENT_LIBRARIES_DISPLAY_NAME "Libraries") set(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C/C++ Headers") set(CPACK_COMPONENT_LIBRARIES_DESCRIPTION "Library used to build programs which use FreeType") set(CPACK_COMPONENT_HEADERS_DESCRIPTION "C/C++ header files for use with FreeType") set(CPACK_COMPONENT_HEADERS_DEPENDS libraries) set(CPACK_COMPONENT_LIBRARIES_GROUP "Development") set(CPACK_COMPONENT_HEADERS_GROUP "Development") include(CPack)
whupdup/frame
real/third_party/freetype-2.12.0/CMakeLists.txt
Text
gpl-3.0
19,809
2022-03-31 Werner Lemberg <wl@gnu.org> * Version 2.12.0 released. ========================== Tag sources with `VER-2-12-0'. * docs/VERSION.TXT: Add entry for version 2.12.0. * docs/CHANGES, docs/release: Updated. * README, src/base/ftver.rc, builds/windows/vc2010/index.html, builds/windows/visualc/index.html, builds/windows/visualce/index.html, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/index.html, docs/freetype-config.1: s/2.11.1/2.12.0/, s/2111/2120/. * include/freetype/freetype.h (FREETYPE_MINOR): Set to 12. (FREETYPE_PATCH): Set to 0. * builds/unix/configure.raw (version_info): Set to 24:2:18. * CMakeLists.txt (VERSION_MINOR): Set to 12. (VERSION_PATCH): Set to 0. * builds/toplevel.mk (do-dist): Generate `ChangeLog` entries for all commits since version 2.11.0 (when we stopped creating this file manually). 2022-03-31 Werner Lemberg <wl@gnu.org> Fix clang++ warnings. * src/base/ftglyph.c (ft_svg_glyph_prepare), src/base/ftobj.c (ft_glyphslot_init), src/cache/ftccmap.c (ftc_cmap_node_new), src/cache/ftcimage.c (FTC_INode_New), src/lzw/ftlzw.c (FT_Stream_OpenLZW), src/psaux/psobjs.c (ps_parser_load_field), src/pshinter/pshglob.c (psh_globals_new), src/sfnt/ttsvg.c (tt_face_load_svg_doc): Initialize variables used for allocation. * src/sdf/ftsdf.c (split_sdf_conic, split_sdf_cubic): Change type of `max_splits` to FT_UInt. (sdf_generate_bounding_box): Add cast. 2022-03-30 Werner Lemberg <wl@gnu.org> Whitespace. 2022-03-30 Werner Lemberg <wl@gnu.org> [builds] Fix creation of `freetype2.pc` for static-only builds. We have to help `pkg-config` since it can't recognize that there is no shared library installed. Note that meson already does exactly the same. * builds/unix/configure.raw (REQUIRES_PRIVATE, LIBS_PRIVATE): Rename to... (PKGCONFIG_REQUIRES_PRIVATE, PKGCONFIG_LIBS_PRIVATE): This. Adjust them depending on `$enable_shared`. (PKGCONFIG_REQUIRES, PKGCONFIG_LIBS): New variables. * builds/unix/freetype2.in, builds/unix/unix-def.in: Use new and updated variables. 2022-03-25 Werner Lemberg <wl@gnu.org> Add `FT_FACE_FLAG_SBIX_OVERLAY` and `FT_HAS_SBIX_OVERLAY`. * include/freetype/freetype.h (FT_FACE_FLAG_SBIX_OVERLAY, FT_HAS_SBIX_OVERLAY): New macro. * src/sfnt/ttsbit.c (tt_face_load_sbit): Handle `FT_FACE_FLAG_SBIX_OVERLAY`. Remove obsolete tracing message. 2022-03-25 Werner Lemberg <wl@gnu.org> Add `FT_PARAM_TAG_IGNORE_SBIX`. This is another bit to handle 'sbix' tables as described in the OpenType specification. * include/freetype/ftparams.h (FT_PARAM_TAG_IGNORE_SBIX): New macro. * src/sfnt/sfobjc.c (is_apple_sbix): Rename to... (has_sbix): ... this. Check for more sbit tables. Handle `FT_PARAM_TAG_IGNORE_SBIX` to eventually control `has_sbix`. Only call sbit table loader if an sbit table is present. 2022-03-25 Werner Lemberg <wl@gnu.org> [truetype] Fix 'sbix' table handling. * src/sfnt/ttsbit.c (tt_face_load_sbix_image): Correct calculation of 'metrics->horiBearingY'. Set vertical metrics. * src/sfnt/sfobjs.c (sfnt_load_face): Adjust setting of `FT_FACE_FLAG_SBIX`. Handle metrics of fonts with 'sbix' table. * src/truetype/ttgload.c (TT_Load_Glyph): For 'sbix' embedded bitmaps, apply bbox offset and bearing values of the corresponding glyph in the 'glyf' table if it exists and has a contour. * src/truetype/ttobjs.c (tt_face_init): Handle font with 'sbix' table. Fixes issue #998. 2022-03-25 Werner Lemberg <wl@gnu.org> Add `FT_FACE_FLAG_SBIX` and `FT_HAS_SBIX`. Fonts with 'sbix' tables need special handling by the application. * include/freetype/freetype.h (FT_FACE_FLAG_SBIX, FT_HAS_SBIX): New macros. * src/sfnt/sfobjs.c (sfnt_load_face): Set `FT_FACE_FLAG_SBIX` if 'sbix' table is present. 2022-03-25 Werner Lemberg <wl@gnu.org> * include/freetype/freetype.h (FT_LOAD_SBITS_ONLY): Tag macro as public. 2022-03-24 Carlo Bramini <carlo.bramix@libero.it> [builds/windows] Fix WCE support. * builds/windows/ftsystem.c [_WIN32_WCE]: Include <malloc.h> needed by _alloca. 2022-03-24 Steve Lhomme <robux4@ycbcr.xyz> [build/windows] Improve UWP support. * builds/windows/ftsystem.c [UWP]: Wrap CreateFile2 into CreateFileA. 2022-03-21 Werner Lemberg <wl@gnu.org> * src/sfnt/ttkern.c (tt_face_get_kerning): Exit early if no table. Fixes #1141. 2022-03-20 Ben Wagner <bungeman@chromium.org> [woff2] Support overlap flag for simple glyphs. In the woff2 spec it has been proposed to allow the OVERLAP_SIMPLE flag to be retained through the woff2 format [0]. [0] https://www.w3.org/TR/WOFF2/#glyf_table_format * src/sfnt/sfwoff2.h (GLYF_OVERLAP_SIMPLE): add glyf flag. * src/sfnt/sfwoff2.c (reconstruct_glyf): parse optionFlags and overlapSimpleBitmap[]. (store_points): set OVERLAP_SIMPLE on first point's flag if the overlap bit is set. 2022-03-19 Werner Lemberg <wl@gnu.org> [cff] Synchronize `cff_slot_load` with `TT_Load_Glyph`. * src/cff/cffgload.c (IS_DEFAULT_INSTANCE): New macro. (cff_slot_load): Use it. 2022-03-19 Werner Lemberg <wl@gnu.org> * src/base/ftobjs.c (FT_Request_Size): Guard `face->size`. Fixes #1140. 2022-03-19 Werner Lemberg <wl@gnu.org> * src/base/ftobjs.c (ft_open_face_internal): Thinko. 2022-03-19 Ben Wagner <bungeman@chromium.org> [doc] FT_OUTLINE_OVERLAP was introduced in 2.10.3. * include/freetype/ftimage.h (FT_OUTLINE_OVERLAP): Document when added. 2022-03-19 Werner Lemberg <wl@gnu.org> * src/base/ftobjs.c (ft_open_face_internal): Properly guard `face_index`. We must ensure that the cast to `FT_Int` doesn't change the sign. Fixes #1139. 2022-03-17 Werner Lemberg <wl@gnu.org> [sfnt] Avoid invalid face index. Fixes #1138. * src/sfnt/sfobjs.c (sfnt_init_face), src/sfnt/sfwoff2.c (woff2_open_font): Check `face_index` before decrementing. 2022-03-07 Werner Lemberg <wl@gnu.org> Documentation, whitespace. 2022-03-05 Anuj Verma <anuj@womp.xyz> [sdf] Fix corner checks and improve performance. * src/sdf/ftsdf.c (sdf_generate_bounding_box): Always check for a corner if two distances (for different curves) are very close. (sdf_conic_to): Check whether the conic curve can be treated as a line (which happens if the control point coincides with any end point). 2022-03-05 Anuj Verma <anuj@womp.xyz> [sdf] Implement deviation-based splitting for Bezier curves. * src/sdf/ftsdf.c (split_sdf_cubic, split_sdf_shape): Add checks to figure out the deviation of Bezier curves and stop splitting if the curve is flat enough. * src/sdf/ftsdfcommon.h (ONE_PIXEL): New macro. 2022-03-05 Anuj Verma <anuj@womp.xyz> * include/freetype/freetype.h: Improve SDF documentation. 2022-03-03 Ben Wagner <bungeman@chromium.org> [sfnt] Fix bounds check in SVG. The `SVG_DOCUMENT_LIST_MINIMUM_SIZE` macro is non trivial and not protected by parentheses. As a result, the expression `table_size - SVG_DOCUMENT_LIST_MINIMUM_SIZE` expands to `table_size - 2U + SVG_DOCUMENT_RECORD_SIZE` instead of the expected `table_size - (2U + SVG_DOCUMENT_RECORD_SIZE)`. This causes an incorrect bounds check which may lead to reading past the end of the `SVG ` table. * src/sfnt/ttsvg.c (tt_face_load_svg): wrap macro definitions in parentheses. Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=45179 2022-02-23 Ben Wagner <bungeman@chromium.org> [psaux] Full bounds check for OtherSubr 19. It is possible for OtherSubr 19 to be invoked when `decoder->buildchar` is NULL (so that `decoder->len_buildchar` is 0), the `blend` is non-NULL with `blend->num_designs` set to 2, and the user supplied `idx` to be large (for example 0xFFFFFFFE). Since these are all `FT_UInt32` the existing bounds check overflows in a well defined manner, allowing for an invalid call to `memcpy`. In addition, it is possible to call OtherSubr 19 with `decoder->len_buildchar`, `blend->num_designs`, and `idx` all zero (implying that `blend->weight_vector` and `decoder->buildchar` are NULL). This passes the bounds check (it is logically always fine to copy nothing starting at index zero) but may invoke undefined behavior in `ft_memcpy` if it is backed by `memcpy`. Calling `memcpy` with either the `src` or `dst` NULL is undefined behavior (even if `count` is zero). * src/psaux/psintrp.c (cf2_interpT2CharString): Correctly check that `blend->num_designs` can be copied to `decoder->buildchar[idx]`. Also avoid passing NULL to `ft_memcpy`. Bug: https://crbug.com/1299259 2022-02-21 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [cmake] Drop the support of CMake 2.x. * CMakeLists.txt: Require CMake 3.0 (released on 2014) or newer. The issue #1059 reports the difficulty to support both of CMake 2.x and newer one by single CMakeLists.txt without the inflation of cmake_policy() workarounds. For better maintainability, the support of CMake 2.x is dropped. 2022-02-19 Werner Lemberg <wl@gnu.org> * src/bdf/README: Updated. 2022-02-19 Werner Lemberg <wl@gnu.org> * builds/mac/ftmac.c, src/base/ftmac.c: s|FT_MAC_H|<freetype/ftmac.h>|. 2022-02-19 Werner Lemberg <wl@gnu.org> src/sfnt/ttkern.c (tt_face_load_kern): Micro-optimize. A kerning table can be handled by binary search if it has equal entries. Fixes #1132. 2022-02-17 Steve Lhomme <robux4@ycbcr.xyz> Alexei Podtelezhnikov <apodtele@gmail.com> [builds/windows] Add support for legacy UWP builds. * builds/windows/ftsystem.c: Add neccessary macro substitutions to enable strict UWP builds. See !141. 2022-02-16 Werner Lemberg <wl@gnu.org> ftmm.h: Minor documentation improvement. 2022-02-13 Alexei Podtelezhnikov <apodtele@gmail.com> [pshinter] Tune PSH_STRONG_THRESHOLD_MAXIMUM value. Before the change, the hinting engine frequently confused horizontal stem and serif hints making some stems too thin and some serifs too thick. The value was tuned using serif fonts from the URW+ base 35 collection. * src/pshinter/pshalgo.c [PSH_STRONG_THRESHOLD_MAXIMUM]: s/30/12/. 2022-02-12 Werner Lemberg <wl@gnu.org> t1tables.h: Documentation improvements. 2022-02-12 Werner Lemberg <wl@gnu.org> t1tables.h: Whitespace. 2022-02-11 Werner Lemberg <wl@gnu.org> [type42] Fix `FT_Get_PS_Font_Private` for this format. Since Type42 fonts don't have a 'Private' dictionary, the return value should be `FT_Err_Invalid_Argument`. * src/type42/t42drivr.c (t42_ps_get_font_private): Removed. (t42_service_ps_info): Updated. 2022-02-09 Alexei Podtelezhnikov <apodtele@gmail.com> [pshinter] Clear reused mask. In PS hinter, memory allocations persist until the module is done. Therefore, we have to clear reused masks. * src/pshinter/pshrec.c (ps_mask_table_alloc): Clear reused mask. 2022-02-09 Alexei Podtelezhnikov <apodtele@gmail.com> [pshinter] Use unsigned indices. This reduces casting and eliminates some checks. * src/pshinter/pshrec.c (ps_mask_test_bit, ps_mask_table_merge, ps_dimension_add_t1stem, ps_hints_t1stem3): Updated. (ps_dimension_add_counter): Updated, unnecessary checks removed. 2022-02-08 Alexei Podtelezhnikov <apodtele@gmail.com> [pshinter] Fix mask merging. We forgot to update the number of bits when merging a larger mask into a smaller one. This fix might have rendering effects. * src/pshinter/pshrec.c (ps_mask_table_merge): Inherit the number of bits from a larger mask. There is no need to zero unused bits, already zeroed during allocation. (ps_mask_clear_bit): Removed. (ps_mask_ensure): Minor. 2022-02-08 Alexei Podtelezhnikov <apodtele@gmail.com> [pshinter] Revise the hint table handling. * src/pshinter/pshrec.c (ps_hint_table_ensure): Remove redundant size check; avoid array zeroing because it is fully initialized when used. (ps_hint_table_alloc): Fix off-by-one comparison and remove another zeroing of the array elements. 2022-02-06 Werner Lemberg <wl@gnu.org> Various minor doc fixes. 2022-02-06 Alexei Podtelezhnikov <apodtele@gmail.com> [builds/windows] Add SVG to to project files. * builds/windows/vc2010/freetype.vcxproj: Updated. * builds/windows/vc2010/freetype.vcxproj.filters: Updated. * builds/windows/visualc/freetype.vcproj: Updated. 2022-02-03 Alexei Podtelezhnikov <apodtele@gmail.com> * src/winfonts/winfnt.c (fnt_face_get_dll_font): Trace font resources. 2022-02-02 Eric Jing <@CPUcontrol> [cmake] Fix build on MacOS. * CMakeLists.txt (CMAKE_OSX_ARCHITECTURES): Update value to fix the building of a framework on MacOS. * builds/mac/freetype-Info.plist (CFBundleExecutable): Make identifier lowercase only. Fixes #1127. 2022-02-02 Alexei Podtelezhnikov <apodtele@gmail.com> [psaux] Revise `PS_Table` handling. The old impleemntation was not using `FT_REALLOC`, buing too careful with the offset rebasing. It shoudl be safe to rely on the base movements. * src/psaux/psobjs.c (reallocate_t1_table, shift_elements): Combine into... (ps_table_realloc): ... this function based on `FT_REALLOC`. (ps_table_done): Simplified. (ps_table_add): Updated. 2022-02-02 Alexei Podtelezhnikov <apodtele@gmail.com> * src/cache/ftcmru.c (FTC_MruList_New): Explain zeroing. 2022-01-31 Alexei Podtelezhnikov <apodtele@gmail.com> [cache] Partially revert 9870b6c07e2c. Fix crashes reported by Werner. * src/cache/ftcmru.c (FTC_MruList_New): Use `FT_ALLOC` again. 2022-01-31 Werner Lemberg <wl@gnu.org> freetype.h: Minor documentation improvement. 2022-01-31 Alexei Podtelezhnikov <apodtele@gmail.com> [cache] Fix fallouts from edd4fedc5427. Reported by Werner. * src/cache/ftcimage.c (FTC_INode_New): Always initialize FT_Glyph. * src/cache/ftcsbits.c (FTC_SNode_New): Always initialize FT_SBit. 2022-01-31 Alexei Podtelezhnikov <apodtele@gmail.com> Clean-up - do not doubt FT_FREE. * src/base/ftobjs.c (memory_stream_close): Do not reassign zero after `FT_FREE`. * src/sfnt/sfwoff.c (sfnt_stream_close): Ditto. * src/sfnt/sfwoff2.c (stream_close): Ditto. * src/psaux/psobjs.c (ps_parser_load_field): Ditto. * src/truetype/ttgxvar.c (ft_var_load_avar, tt_set_mm_blend, tt_set_mm_blend): Ditto. 2022-01-30 Werner Lemberg <wl@gnu.org> * CMakeLists.txt: Include 'FindPkgConfig' module. Older cmake versions don't provide `pkg_check_modules` by default. Fixes #1126. 2022-01-30 Alexei Podtelezhnikov <apodtele@gmail.com> * src/psaux/psobjs.c (ps_parser_load_field): Reduce `string` scope. 2022-01-29 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [cmake] Check the availability of `bzip2.pc'. (CMakeLists.txt): Check the availability of `bzip2.pc'. * If `bzip2.pc' is available, Requires.private should include bzip2, but Libs.private should not include -lbz2. * If `bzip2.pc' is unavailable, Requires.private cannot include bzip2, but Libs.private should include -lbz2. Fix #897. 2022-01-28 Werner Lemberg <wl@gnu.org> * unix/configure.raw: We need 'librsvg' version 2.46.0 or newer. Older versions don't have function `rsvg_handle_get_intrinsic_dimensions`. 2022-01-28 Alexei Podtelezhnikov <apodtele@gmail.com> Minor clean-ups. * src/base/ftrfork.c (raccess_make_file_name): Do not set error. * src/sfnt/sfdriver.c (get_win_string, get_apple_string): Ditto. * src/cff/cffobjs.c (cff_strcpy): Do not confuse about error. * src/psaux/psobjs.c (ps_table_done): Ditto. * src/truetype/ttgxvar.c (ft_var_readpacked*, ft_var_load_avar): Ditto. 2022-01-27 Ben Wagner <bungeman@chromium.org> Document `FT_Outline_Decompose` degenerate segments. `FT_Outline_Decompose` does not filter out and can return degenerate segments in an outline. This can be surprising when attemping to stroke such an outline. Clarify the existing documentation on this matter to cover all forms of degeneracy (without specifying exactly how they will be reported), why they might arise, and better explain in what cases they may be an issue. * include/freetype/ftoutlin.h (FT_Outline_Decompose): update documentation. Fixes #952. 2022-01-27 Anuj Verma <anujv@posteo.net> Fix sdf computation while `USE_SQUARED_DISTANCES`. Function `map_fixed_to_sdf` expects spread to be absolute and not squared. * src/sdf/ftbsdf.c (finalize_sdf): Pass absolute spread while `map_fixed_to_sdf`. * src/sdf/ftsdf.c (sdf_generate_bounding_box): Ditto. 2022-01-27 Tapish Ojha <tapishojha2000@gmail.com> [sfnt] Improve sRGB constants. * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Use slightly more precise values. Fixes #1018. 2022-01-27 Werner Lemberg <wl@gnu.org> docs/release: Updated. 2022-01-26 Alexei Podtelezhnikov <apodtele@gmail.com> * src/pfr/pfrload.c (pfr_phy_font_load): Use FT_QNEW_ARRAY. 2022-01-26 Alexei Podtelezhnikov <apodtele@gmail.com> * src/sdf/ftsdf.c (sdf_*_new): Use standard macro. 2022-01-26 Alexei Podtelezhnikov <apodtele@gmail.com> [pcf] Delay encoding allocation and avoid its zeroing. * src/pcf/pcfread.c (pcf_get_encodings): Refactor and use FT_QNEW_ARRAY. 2022-01-25 Werner Lemberg <wl@gnu.org> Aarg, typo. 2022-01-25 Werner Lemberg <wl@gnu.org> freetype.h: More updates to `FT_LOAD_COLOR` description. 2022-01-25 Werner Lemberg <wl@gnu.org> * builds/unix/configure.raw (FT_DEMO_CFLAGS): Pass `-DHAVE-LIBRSVG`. This helps in decoupling library support from `pkg-config` for other platforms. 2022-01-25 Werner Lemberg <wl@gnu.org> Update documentation for `FT_LOAD_COLOR`. 2022-01-24 Ben Wagner <bungeman@chromium.org> [pshinter] Ensure all point flags are initialized. Only off curve point flags were fully initialized. * src/pshinter/pshalgo.c (psh_glyph_init): always initialize flags. Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=43930 2022-01-24 Werner Lemberg <wl@gnu.org> .mailmap: Typo. 2022-01-23 Werner Lemberg <wl@gnu.org> * src/svg/ftsvg.c (ft_svg_property_set): Disallow NULL pointers. 2022-01-23 Werner Lemberg <wl@gnu.org> .mailmap: Updated. 2022-01-23 Werner Lemberg <wl@gnu.org> More documentation on handling OT-SVG. 2022-01-23 Werner Lemberg <wl@gnu.org> * src/svg/ftsvg.c: Rename `svg_hooks` to `svg-hooks` for consistency. 2022-01-22 Werner Lemberg <wl@gnu.org> [sfnt] Reject malformed SVG tables. * src/sfnt/ttsvg.c (SVG_TABLE_HEADER_SIZE, SVG_DOCUMENT_RECORD_SIZE, SVG_DOCUMENT_LIST_MINIMUM_SIZE, SVG_MINIMUM_SIZE): New macros. (tt_face_load_svg): Check offsets. Check table and record sizes. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=43918 2022-01-22 Alexei Podtelezhnikov <apodtele@gmail.com> * src/psaux/psobjs.c (ps_table_new): Revert to zeroing. 2022-01-20 Alexei Podtelezhnikov <apodtele@gmail.com> [psaux, type1, type42] Avoid annecessary zeroing. * src/psaux/psobjs.c (ps_table_new): Use FT_QNEW_ARRAY. * src/type1/t1load.c (parse_encoding): Ditto. * src/type42/t42parse.c (t42_parse_encoding): Ditto. 2022-01-20 Werner Lemberg <wl@gnu.org> [builds/unix] Handle 'librsvg' for demo programs. * builds/unix/configure.raw: Check for 'librsvg'. (LIB_CLOCK_GETTIME): Don't call `AC_SUBST` on this but on... (FT_DEMO_CFLAGS, FT_DEMO_LDFLAGS): ... these two new variables. * builds/unix/unix-cc.in (LIB_CLOCK_GETTIME): Replaced by... (FT_DEMO_CFLAGS, FT_DEMO_LDFLAGS): ... these two new variables. 2022-01-20 Moazin Khatti <moazinkhatri@gmail.com> Add 'svg' module for OT-SVG rendering. * CMakeLists.txt (BASE_SRCS): Add svg module file. * meson.build (ft2_public_headers): Add `otsvg.h`. * modules.cfg (RASTER_MODULES): Add `svg` module. * builds/meson/parse_modules_cfg.py: Add svg module. * include/freetype/config/ftmodule.h: Add `ft_svg_renderer_class`. * include/freetype/fterrdef.h: Add `Invalid_SVG_Document` and `Missing_SVG_Hooks` error codes. * include/freetype/internal/fttrace.h: Add tracing for `otsvg`. * include/freetype/internal/svginterface.h: New file. It adds an interface to enable the presetting hook from the `base` module. * include/freetype/otsvg.h (SVG_Lib_Init_Func, SVG_Lib_Free_Func, SVG_Lib_Render_Func, SVG_Lib_Preset_Slot_Func): New hooks for SVG rendering. (SVG_RendererHooks): New structure to access them. * src/base/ftobjs.c: Include `svginterface.h`. (ft_glyphslot_preset_bitmap): Add code for presetting the slot for SVG glyphs. (ft_add_renderer): Updated. * src/svg/*: New files. 2022-01-20 Moazin Khatti <moazinkhatri@gmail.com> Add `FT_Glyph` support for OT-SVG glyphs. * include/freetype/ftglyph.h (FT_SvgGlyphRec, FT_SvgGlyph): New structure. * src/base/ftglyph.c: Include `otsvg.h`. (ft_svg_glyph_init, ft_svg_glyph_done, ft_svg_glyph_copy, ft_svg_glyph_transform, ft_svg_glyph_prepare): New function. (ft_svg_glyph_class): New class. (FT_New_Glyph, FT_Glyph_To_Bitmap): Updated to handle OT-SVG glyphs. * src/base/ftglyph.h: Updated. 2022-01-20 Moazin Khatti <moazinkhatri@gmail.com> [truetype, cff] Add code to load SVG document. * src/cff/cffgload.c (cff_slot_load): Add code to load SVG doc. * src/truetype/ttgload.c (TT_Load_Glyph): Add code to load SVG doc. 2022-01-20 Moazin Khatti <moazinkhatri@gmail.com> Add code to load OT-SVG glyph documents. * include/freetype/config/ftheader.h (FT_OTSVG_H): New macro. * include/freetype/freetype.h (FT_FACE_FLAG_SVG, FT_HAS_SVG): New macros. (FT_LOAD_SVG_ONLY): New internal macro. * include/freetype/ftimage.h (FT_Glyph_Format): New enumeration value `FT_GLYPH_FORMAT_SVG`. * include/freetype/internal/ftobjs.h (FT_GLYPH_OWN_GZIP_SVG): New macro. * include/freetype/internal/fttrace.h: Add `ttsvg` for `ttsvg.c`. * include/freetype/internal/sfnt.h(load_svg, free_svg, load_svg_doc): New functions. * include/freetype/internal/tttypes.h (TT_FaceRec): Add `svg` for the SVG table. * include/freetype/otsvg.h (FT_SVG_DocumentRec): New structure to hold the SVG document and other necessary information of an OT-SVG glyph in a glyph slot. * include/freetype/tttags.h (TTAG_SVG): New macro. * src/base/ftobjs.c: Include `otsvg.h`. (ft_glyphslot_init): Allocate `FT_SVG_DocumentRec` in `slot->other` if the SVG table exists. (ft_glyphslot_clear): Free it upon clean-up if it is a GZIP compressed glyph. (ft_glyphslot_done): Free the document data if it is a GZIP compressed glyph. (FT_Load_Glyph): Don't auto-hint SVG documents. * src/cache/ftcbasic.c (ftc_basic_family_load_glyph): Add support for FT_GLYPH_FORMAT_SVG. * src/sfnt/rules.mk (SFNT_DRV_SRC): Add `ttsvg.c`. * src/sfnt/sfdriver.c: Include `ttsvg.h`. (sfnt_interface): Add `tt_face_load_svg`, `tt_face_free_svg` and `tt_face_load_svg_doc`. * src/sfnt/sfnt.c: Include `ttsvg.c`. * src/sfnt/sfobjs.c (sfnt_load_face, sfnt_done_face): Add code to load and free data of the the SVG table. * src/sfnt/ttsvg.c: New file, implementing `tt_face_load_svg`, `tt_face_free_svg` and `tt_face_load_svg_doc`. * src/sfnt/ttsvg.h: Declarations of the SVG functions in `ttsvg.c`. 2022-01-20 Moazin Khatti <moazinkhatri@gmail.com> Add flag `FT_CONFIG_OPTION_SVG`. This flag is going to be used to conditionally compile support for OT-SVG glyphs. FreeType will do the parsing and rely on external hooks for rendering of OT-SVG glyphs. * devel/ftoption.h, include/freetype/config/ftoption.h (FT_CONFIG_OPTION_SVG): New flag. 2022-01-20 Alexei Podtelezhnikov <apodtele@gmail.com> [pshinter] Avoid unnecessary zeroing. * src/pshinter/pshalgo.c (psh_hint_table_init,psh_glyph_init, psh_glyph_interpolate_normal_points): Use FT_QNEW_ARRAY. 2022-01-20 Alexei Podtelezhnikov <apodtele@gmail.com> * include/freetype/freetype.h: Clarify `FT_Size` life cycle. 2022-01-20 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Undefined scale means no scale. It might be surprising that FreeType does not have default ppem and the size has to be set explicitly or face undefined behavior with undefined variables and errors. This offers an alternative to missing or zero scale by simply setting FT_LOAD_NO_SCALE. Defined behavior is bettr than undefined one. This is alternative to !132 and discussed in https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=43708 * src/base/ftobjs.c (FT_Load_Glyph): Deal with zero scale. * include/freetype/freetype.h: Document it. 2022-01-18 Alexei Podtelezhnikov <apodtele@gmail.com> * src/autofit/afglobal.c (af_face_globals_new): Reduce zeroing. Everything in AF_FaceGlobals is initialized except metrics. Those are zeroed here and initialized on demand later. 2022-01-16 Alexei Podtelezhnikov <apodtele@gmail.com> [bdf,type1] Avoid unnecessary hash zeroing. * src/bdf/bdflib.c (_bdf_parse_start): Use `FT_QALLOC`. * src/type1/t1load.c (parse_subrs): Use `FT_QNEW`. 2022-01-16 Ozkan Sezer <sezeroz@gmail.com> Add Watcom C/C++ calling. In the unlikely case the source is built with OpenWatcom's -ec? switches to enforce a calling convention, the qsort() compare function must still be set to __watcall. * include/freetype/internal/compiler-macros.h (FT_COMPARE_DEF): Updated. 2022-01-15 Ben Wagner <bungeman@chromium.org> [pshinter] Avoid accessing uninitialized zone. The `normal_top.count` may be 0, implying no `normal_top.zones` exist. The code must not access these (non-existent) `normal_top.zones`. * src/pshinter/pshalgo.c (ps_hints_apply): Do not assume that `normal_top.zones[0]` is initialized. Test `normal_top.count` before using `normal_top.zones[0]`. Do not rescale if there are no `zones`. Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=43675 2022-01-15 Alexei Podtelezhnikov <apodtele@gmail.com> [cache] Avoid unnecessary zeroing. * src/cache/ftccmap.c (ftc_cmap_node_new): Use `FT_QNEW`. * src/cache/ftcimage.c (FTC_INode_New): Ditto. * src/cache/ftcsbits.c (FTC_SNode_New): Ditto. 2022-01-15 Ozkan Sezer <sezeroz@gmail.com> Add Watcom C/C++ support. * include/freetype/config/integer-types.h: Make sure `long long` is used then available. * include/freetype/internal/ftcalc.h (FT_MSB): Add Watcom C/C++ pragma. 2022-01-15 Alexei Podtelezhnikov <apodtele@gmail.com> * src/sdf/ftbsdf.c (ED): s/near/prox/. This works around the Watcom C definition of `near` as restricted __near. 2022-01-15 Alexei Podtelezhnikov <apodtele@gmail.com> * include/freetype/internal/compiler-macros.h [FT_COMPARE_DEF]: Tighten. This works around Watcom C library using __watcall. 2022-01-14 Alexei Podtelezhnikov <apodtele@gmail.com> * src/pshinter/pshglob.c (psh_globals_new): Avoid zeroing. This large allocation is followed by careful initialization. Whatever is missed should be initialized manually. 2022-01-14 Alexei Podtelezhnikov <apodtele@gmail.com> * src/base/fthash.c (hash_insert): Avoid unnecessary zeroing. 2022-01-14 Alexei Podtelezhnikov <apodtele@gmail.com> * src/bdf/bdflib.c (_bdf_parse_glyphs): Remove redundant assignment. 2022-01-13 Alexei Podtelezhnikov <apodtele@gmail.com> * src/lzw/ftlzw.c (FT_Stream_OpenLZW): Avoid unnecessary zeroing. 2022-01-13 Ben Wagner <bungeman@chromium.org> [bzip2] Reset bzip stream on any error. According to the bzip documentation it is undefined what will happen if `BZ2_bzDecompress` is called on a `bz_stream` it has previously returned an error against. If `BZ2_bzDecompress` returns anything other than `BZ_OK` the only valid next action is `BZ2_bzDecompressEnd`. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=43564 * src/bzip2/ftbzip2.c (FT_BZip2FileRec_): Add `reset` to track the need to reset the stream. (ft_bzip2_file_init): Initialize `reset` to 0. (ft_bzip2_file_reset): Set `reset` to 0 after resetting. (ft_bzip2_file_fill_output): Set `reset` to 1 when `BZ2_bzDecompress` returns anything other than `BZ_OK`. 2022-01-12 Werner Lemberg <wl@gnu.org> .gitlab-ci.yml: Minor comment cleanups. 2022-01-12 Azamat H. Hackimov <azamat.hackimov@gmail.com> .gitlab-ci.yml: Add steps to `before_script` to ensure recent CA. Fetch current list of valid CAs from Windows Update and manually import them to trusted datastore. This action is required to make downloads work from sites that need recent Let's Encrypt ISRG Root X1 certificate. 2022-01-11 Ben Wagner <bungeman@chromium.org> Revert "[bzip2] Avoid use of uninitialized memory." This reverts commit d276bcb7f0c02c20d3585b2e5626702df6d140a6. The original commit did avoid the use of uninitialized memory. However, it appears that the original commit is no longer required. The underlying issue was resolved by a change in freetype2-testing "Build bzip2 correctly." [0]. Prior to [0] bzip2 was built without msan, so bzip2 writes were not tracked or considered initialized. Clearing `buffer` in the original commit allowed msan to see the `buffer` content initialized once in FreeType code, but msan saw no writes into buffer from bzip2. With bzip2 now built with msan, the bzip2 writes are properly instrumented and msan sees the bzip2 writes into the buffer. As a result the original commit can be safely reverted to allow for better detection of other uninitialized data scenarios. * src/bzip2/ftbzip2.c (FT_Stream_OpenBzip2): Revert to using `FT_QNEW`. [0] https://github.com/freetype/freetype2-testing/commit/3c052a837a3c960709227a0d6ddd256e87b88853 2022-01-11 Ben Wagner <bungeman@chromium.org> [type42] Track how much type42 ttf data is available. Currently `T42_Open_Face` eagerly allocates 12 bytes for the ttf header data which it expects `t42_parse_sfnts` to fill out from /sfnts data. However, there is no guarantee that `t42_parse_sfnts` will actually be called while parsing the type42 data as the /sfnts array may be missing or very short. This is also confusing behavior as it means `T42_Open_Face` is tightly coupled to the implementation of the very distant `t42_parse_sfnts` code which requires at least 12 bytes to already be reserved in `face->ttf_data`. `t42_parse_sfnts` itself eagerly updates `face->ttf_size` to track how much space is reserved for ttf data instead of traking how much data has actually been written into `face->ttf_data`. It will also act strangely in the presense of multiple /sfnts arrays. * src/type42/t42objs.c (T42_Open_Face): ensure `ttf_data` is initialized to NULL. Free `ttf_data` on error. * src/type42/t42parse.c (t42_parse_sfnts): delay setting `ttf_size` and set it to the actual number of bytes read. Ensure `ttf_data` is freed if there are multiple /sfnts arrays or there are any errors. 2022-01-11 Dominik Röttsches <drott@chromium.org> [sfnt] Fix limit checks for `COLR` v1 ClipBoxes * src/sfnt/ttcolr.c (tt_face_get_color_glyph_clipbox): Fix off-by-one in limit checks. 2022-01-11 Werner Lemberg <wl@gnu.org> Update all copyright notices. 2022-01-11 Werner Lemberg <wl@gnu.org> * src/sfnt/ttcolr.c (read_paint): Fix undefined left-shift operation. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=43151 2022-01-11 Werner Lemberg <wl@gnu.org> * src/type42/t42objs.c (T42_Open_Face): Avoid use of uninitialized memory. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=43508 2022-01-11 Werner Lemberg <wl@gnu.org> .gitlab-ci.yml: Fix typo in previous commit. 2022-01-11 Werner Lemberg <wl@gnu.org> .gitlab-ci.yml: Update Windows image. The old image produced errors like ``` Downloading zlib patch from https://wrapdb.mesonbuild.com/v2/zlib_1.2.11-5/get_patch A fallback URL could be specified using patch_fallback_url key in the wrap file WrapDB connection failed to https://wrapdb.mesonbuild.com/v2/zlib_1.2.11-5/get_patch with error <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1122)> ``` 2022-01-11 Werner Lemberg <wl@gnu.org> * subprojects/zlib.wrap: Update from upstream. 2022-01-10 Werner Lemberg <wl@gnu.org> * src/sfnt/ttcolr.c (tt_face_get_color_glyph_clipbox): Add limit checks. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40716 2022-01-10 Werner Lemberg <wl@gnu.org> [zlib] Don't typedef `ptrdiff_t`. While using zlib in 'solo' mode (via the `Z_SOLO` macro), we actually include some standard header files, making the typedef fail on systems where the native `ptrdiff_t` type differs. Fixes #1124. * src/zlib/zutil.h: Comment out definition; it doesn't work on Windows. * src/zlib/patches/freetype-zlib.diff: Updated. 2022-01-10 Werner Lemberg <wl@gnu.org> [zlib] Some organizational changes. We now first apply zlib's `zlib2ansi` script, then FreeType's patch file. * src/gzip/README.freetype: Updated. * patches/0001-zlib-Fix-zlib-sources-to-compile-for-FreeType.patch: Renamed to... * patches/freetype-zlib.diff: This. Clean up description, then regenerate it as follows: - Copy unmodified files from `zlib` repository. - Run `zlib2ansi` script. - Run `git diff -R > patches/freetype-zlib.diff.new`. - Insert patch description of old diff file, then replace old diff with new diff file. 2022-01-09 David Turner <david@freetype.org> [gzip] Update sources to zlib 1.2.11 This can be tested by building with the Unix development build make setup devel make or by building the freetype-demos programs with meson setup build -Dfreetype2:zlib=internal meson compile -C out and trying to run `ftview` with a `.pcf.gz` font file. * src/gzip/ftgzip.c, src/gzip/rules.mk: Update for new zlib sources. Also remove the temporary fix introduced in commit 6a431038 to work around the fact that the internal sources were too old. * src/gzip/README.freetype: New file describing the origin of the sources and how they were modified. * src/gzip/patches/*: Patch files applied to original sources. * src/gzip/*: Updated zlib sources with the patch file(s) from `src/gzip/patches/` applied, followed by a conversion with zlib's `zlib2ansi` script. 2022-01-09 David Turner <david@freetype.org> [meson] Change Zlib configuration option. * meson_options.txt, meson.build: Change the format of the 'zlib' meson build configuration option to be a combo with the following choices: - none: Do not support gzip-compressed streams at all. - internal: Support gzip-compressed streams using the copy of the gzip sources under `src/gzip/`; this should only be used during development to ensure these work properly. - external: Support gzip-compressed streams using the 'zlib' Meson subproject, linked as a static library. - system: Support gzip-compressed streams using a system-installed version of zlib. - auto: Support gzip-compressed streams using a system-installed version of zlib, if available, or using the 'zlib' subproject otherwise. This is the default. - disabled: Backward-compatible alias for 'none'. - enabled: Backward-compatible alias for 'auto'. 2022-01-09 Werner Lemberg <wl@gnu.org> [bzip2] Avoid use of uninitialized memory. * src/bzip2/ftbzip2.c (FT_Stream_OpenBzip2): Don't use `FT_QNEW` but `FT_NEW` for setting up `zip` to avoid uninitialized memory access while handling malformed PCF fonts later on. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=42800 2022-01-09 Alexei Podtelezhnikov <apodtele@gmail.com> [sfnt] Fix off-by-one error. The 0-base index is equal to the number of previosly parsed entries. It is an error to adjust it by one to get the number truncated by a stream error. This is probably inconsequential because valid entries are correctly accounted for. * src/sfnt/ttload.c (check_table_dir): Do not adjust the truncated number of tables. 2022-01-08 Werner Lemberg <wl@gnu.org> [sfnt, type42] Correct previous commit. Really fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=42773. * src/sfnt/ttload.c (check_table_dir): Revert change. * src/type42/t42.parse.c (t42_parse_sfnts): Don't use `FT_QREALLOC` but `FT_REALLOC` for setting up `ttf_data` to avoid uninitialized memory access while handling malformed TrueType fonts later on. 2022-01-07 Werner Lemberg <wl@gnu.org> * src/sfnt/ttload.c (check_table_dir): Initialize `table`. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=42773 2022-01-07 Werner Lemberg <wl@gnu.org> [sfnt] Avoid 'runtime error: applying zero offset to null pointer'. * src/sfnt/ttsbit.c (tt_sbit_decoder_load_byte_aligned): Exit early if `line` is NULL. 2022-01-07 Werner Lemberg <wl@gnu.org> [autofit, pshinter] Use `FT_OFFSET`. This avoids ``` runtime error: applying zero offset to null pointer ``` warnings of clang's undefined behaviour sanitizer. * src/autofit/afcjk.c (af_cjk_hints_link_segments, af_cjk_hints_compute_edges, af_cjk_hints_compute_blue_edges, af_cjk_hint_edges, af_cjk_align_edge_points): Do it. * src/autofit/afhints.c (af_glyph_hints_align_edge_points, af_glyph_hints_align_strong_points): Ditto. * src/autofit/aflatin.c (af_latin_metrics_init_widths, af_latin_hints_link_segments, af_latin_hints_compute_edges, af_latin_hints_compute_blue_edges, af_latin_hint_edges): Ditto. * src/pshinter/pshalgo.c (psh_hint_table_init): Ditto. 2022-01-06 Ben Wagner <bungeman@chromium.org> [truetype] Reset localpoints when varying cvt. When iterating over the cvt tuples and reading in the points it is necessary to set all of `localpoints`, `points`, and `point_count` in all cases. The existing code did not reset `localpoints` to `NULL` when there were no private point numbers. If the previous tuple did have private point numbers and set `localpoints` to `ALL_POINTS` this would not be cleared and the wrong branch would be taken later, leading to possible heap buffer overflow. * src/truetype/ttgxvar.c (tt_face_vary_cvt): Reset `localpoints` to `NULL` when it isn't valid. Fixes: https://crbug.com/1284742 2022-01-02 Werner Lemberg <wl@gnu.org> * builds/unix/configure.raw: Restore `SYSTEM_ZLIB` variable. This was accidentally removed with commit 93ebcbd0 almost eight years ago. 2021-12-27 Alexander Borsuk <me@alex.bio> Fix warnings for CMake Unity builds. * src/cache/ftcbasic.c (FT_COMPONENT): Undefine macro before redefinition. * src/smooth/ftgrays.c (TRUNC, FRACT): Ditto. 2021-12-18 Alexander Borsuk <alexander.borsuk@qnective.com> Clang-Tidy warning fixes. * src/base/ftobjs.c (FT_Get_Paint): Operator has equivalent nested operands. * src/bdf/bdflib.c (_bdf_add_property): Value stored to `fp` is never read. * src/sdf/ftbsdf.c (bsdf_init_distance_map): Value stored to `pixel` is never read. * src/sdf/ftsdf.c (split_sdf_shape): Value stored to `error` is never read. 2021-12-17 Eli Schwartz <eschwartz@archlinux.org> * meson.build: Optimize lookup for `python3` program. The python module's `find_installation` method is intended to provide routines for compiling and installing python modules into the `site-packages` directory. It does a couple of slow things, including run an introspection command to scrape sysconfig info from the detected interpreter, which are not needed for the sole use case of invoking the found installation as an executable. Furthermore, when invoked without the name or path of a python binary, it is hardcoded to always look for `python3` corresponding to the interpreter meson itself uses to run. So using `find_installation` did not even allow detecting `python2` as a fallback. Instead, switch to a simple `find_program` lookup that finishes as soon as the program is found. 2021-12-17 Eli Schwartz <eschwartz@archlinux.org> * builds/meson/*.py: Fix name of python executable for auxiliary scripts. The previous change to check the return code of `run_command` invocations caused the CI to fail. Although most scripts used `python_exe` as the program command, the script to determine the project version did not. But, all scripts used `python` as the shebang, and this is not available on all systems. Particularly Debian does not provide a `python` command, though `python3` does exist. This meant that formerly the version number was lacking, and now the build simply fails. Instead, rely on `python3` since it is guaranteed to exist when running meson, and `python2` is end of life anyway. 2021-12-17 Eli Schwartz <eschwartz@archlinux.org> * meson.build: Check the return value of `run_command`. By default, errors are not checked and a command that is somehow broken will just capture incorrect output (likely an empty string). Current development versions of meson now raise a warning for this implicit behavior, and advise explicitly setting the `check:` keyword argumend to determine whether a failing return code should be considered an error. Since none of the commands in this project are expected to fail, mark them as required to succeed. 2021-12-13 Alexei Podtelezhnikov <apodtele@gmail.com> [truetype] Upstream the hdmx binary search. * src/truetype/ttobjs.h (TT_SizeRec): Add `widthp` for the hdmx widths. * src/truetype/ttobjs.c (tt_size_reset): Initialize `widthp` even though it might never be used by the interpreter. * src/truetype/ttgload.c (tt_loader_init): Avoid repeated searches in the hdmx table. 2021-12-12 Alexei Podtelezhnikov <apodtele@gmail.com> [truetype] Reset the IUP-called flags for each subglyph. This fixes fall-out from 7809007a5b88b15, where the composite accents were no longer hinted. * src/truetype/ttgload.c (ttloader_init): Move the IUP-called flag initialization from here... * src/truetype/ttinterp.c (TT_Run_Context): ... to here. 2021-12-12 Alexei Podtelezhnikov <apodtele@gmail.com> [truetype] Binary search through the `hdmx` records. The `hdmx` table is supposed to be sorted by ppem size, which enables binary search. We also drop the check for the sufficient length of the record because it is now enforced when the table is loaded. * include/freetype/internal/tttypes.h (TT_FaceRec): Store the `hdmx` record pointers sorted by ppem instead of ppem's themselves. * src/truetype/ttpload.c (tt_face_load_hdmx): Prudently sort records. (tt_face_get_device_metrics): Implement binary search to retrieve advances. 2021-12-12 Alexei Podtelezhnikov <apodtele@gmail.com> [truetype] Honor FT_LOAD_ADVANCE_ONLY if `hdmx` is usable. This simply shortcuts the glyph loading if FT_LOAD_ADVANCE_ONLY is specified by FT_Get_Advances and the `hdmx` data are located. Particularly, the classic v35 interpreter or "verified" ClearType fonts might see 100x speed up in retrieving the hdmx cache. * src/truetype/ttgload.c (TT_Load_Glyph): Insert the shortcut. 2021-12-12 Alexei Podtelezhnikov <apodtele@gmail.com> [truetype] Initialize the loader with `hdmx` data. The `hdmx` matching can be done before the glyph is loaded. * include/freetype/internal/tttypes.h (TT_LoaderRec): Add a field. * src/truetype/ttgload.c (compute_glyph_metrics): Relocate the `hdmx` code from here... (tt_loader_init): ... to here, before the glyph is loaded. 2021-12-12 Alexei Podtelezhnikov <apodtele@gmail.com> [truetype] Relocate subpixel flag setting. `TT_RunIns` is too busy to deal with subpixel flags. It is better to set them in `tt_loader_init`, which is executed before each glyph program. * src/truetype/ttinterp.c (TT_RunIns): Move the flag setting from here... * src/truetype/ttgload.c (tt_loader_init): ... to here. 2021-12-12 Alexei Podtelezhnikov <apodtele@gmail.com> [truetype] Limit INSTCTRL appication within specs. * src/truetype/ttinterp.c (Ins_INSTCTRL): Limit its global effects to the CVT program and local effects to the glyph program. This also fixes an Infinality buglet. The `ignore_x_mode` should be locally unset by the glyph program. 2021-12-09 Ben Wagner <bungeman@chromium.org> [bdf] Fix use of uninitialized value. In _bdf_readstream if the data contained no newline then the buffer would continue to grow and uninitialized data read until either the uninitialized data contained a newline or the buffer reached its maxiumum size. The assumption was that the line was always too long and the buffer had been filled, however this case can also happen when there is not enough data to fill the buffer. Correct this by properly setting the cursor to the end of the available data, which may be different from the end of the buffer. This may still result in one extra allocation, but only on malformed fonts. * src/bdf/bdflib.c (_bfd_readstream): Correctly update cursor. Remove unread set of `avail`. Bug: https://lists.nongnu.org/archive/html/freetype-devel/2021-12/msg00001.html 2021-12-07 Alexei Podtelezhnikov <apodtele@gmail.com> [truetype] Reduce Infinality footprint again. * src/truetype/ttgload.c (compute_glyph_metrics): Streamline and prioritize the Infinality checks to use `hdmx`. 2021-12-07 Cameron Cawley <ccawley2011@gmail.com> [builds/windows] Guard some non-ancient API. We can support Windows 98 and NT 4.0 in principle... * builds/windows/ftdebug.c, builds/windows/ftsystem.c: Check for the ancient SDK using _WIN32_WINDOWS, _WIN32_WCE, or _WIN32_WINNT. 2021-12-07 Cameron Cawley <ccawley2011@gmail.com> * builds/windows/visualc/freetype.vcproj: Add missing file. 2021-12-02 Werner Lemberg <wl@gnu.org> * Version 2.11.1 released. ========================== Tag sources with `VER-2-11-1'. * docs/VERSION.TXT: Add entry for version 2.11.1. * docs/CHANGES, docs/release: Updated. * README, src/base/ftver.rc, builds/windows/vc2010/index.html, builds/windows/visualc/index.html, builds/windows/visualce/index.html, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/index.html, docs/freetype-config.1: s/2.11.0/2.11.1/, s/2110/2111/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1. * builds/unix/configure.raw (version_info): Set to 24:1:18. * CMakeLists.txt (VERSION_PATCH): Set to 1. * builds/toplevel.mk (version_tag, CHANGELOG_SCRIPT): New variables. (do-dist): Generate `ChangeLog` file with all commits since last release. 2021-11-30 Alexei Podtelezhnikov <apodtele@gmail.com> [builds/windows] Improve debugging. * builds/windows/ftdebug.c (FT_Message, FT_Panic): Buffer output and call `OutputDebugStringA` only if `IsDebuggerPresent`. [_WIN32_WCE] (OutputDebugStringA): Implement the missing API. 2021-11-29 Seigo Nonaka <nona@google.com> * src/base/ftobjs.c (FT_Request_Metrics): Fix build warning on Android. Use casts since `FT_USHORT_MAX` is unsigned short in bionic (libc used in Android). 2021-11-28 Alexei Podtelezhnikov <apodtele@gmail.com> * builds/windows/vc2010/freetype.vcxproj (DlgCopy): Minor tweak. 2021-11-26 Alexei Podtelezhnikov <apodtele@gmail.com> * src/truetype/ttpload.c (tt_face_load_hdmx): Added comments. 2021-11-26 Alexei Podtelezhnikov <apodtele@gmail.com> [truetype] Quietly reject out-of-spec `hdmx` tables. The `hdmx` table is optional and can be safely rejected without an error if it does not follow specifications. The record size must be equal to the number of glyphs + 2 + 32-bit padding. * src/truetype/ttpload.c (tt_face_load_hdmx): Thoroughly check the record size and improve tracing. 2021-11-23 Alexei Podtelezhnikov <apodtele@gmail.com> [truetype] Partly revert 5b626281. Fixes #1118. * src/truetype/ttpload.c (tt_face_load_hdmx): Do not assume that `record_size` is rounded even though the records are padded. 2021-11-23 Alexei Podtelezhnikov <apodtele@gmail.com> * builds/windows/vc2010/freetype.vcxproj (DlgCopy): Use transforms. 2021-11-22 Werner Lemberg <wl@gnu.org> Update `CHANGES` files, other minor whitespace and documentation issues. 2021-11-21 Werner Lemberg <wl@gnu.org> formats.txt: Add info about WOFF and WOFF2. 2021-11-21 Werner Lemberg <wl@gnu.org> meson.build: Initialize `common_ldflags`. 2021-11-21 Lukas Oberhuber <@lukaso> * meson.build: Fix compatibility version on MacOS. Fixes #1117. 2021-11-21 Werner Lemberg <wl@gnu.org> * src/truetype/ttinterp.c (Ins_MD): Avoid `FT_ABS`. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=38562 2021-11-20 Alexei Podtelezhnikov <apodtele@gmail.com> * include/freetype/fttypes.h (FT_MAKE_TAG): Remove the same casting. 2021-11-20 Werner Lemberg <wl@gnu.org> [gxvalid] Fix minor compilation warning. * src/gxvalid/gxvmort5.c (gxv_mort_subtable_type5_subtable_setup): Declare as static. 2021-11-20 Werner Lemberg <wl@gnu.org> [smooth] Fix stand-alone compilation. * src/smooth/ftgrays.c (FT_Trace_Enable, FT_Trace_Disable)[STANDALONE_]: Define. 2021-11-20 Werner Lemberg <wl@gnu.org> Avoid undefined left-shifts. We really have to use double casts to avoid issues with C's and C++'s signedness propagation rules in implicit casts. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=41178 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=41182 * include/freetype/config/public-macros.h (FT_STATIC_CAST, FT_REINTERPRET_CAST): Modify macro to take two arguments. Update all callers. (FT_STATIC_BYTE_CAST): New macro. * include/freetype/freetype.h (FT_ENC_TAG): Use `FT_STATIC_BYTE_CAST`. * include/freetype/ftimage.h (FT_IMAGE_TAG): Ditto. * include/freetype/fttypes.h (FT_MAKE_TAG): Ditto. Use `FT_Tag` for casting. * src/ftraster/ftmisc.h (FT_MAKE_TAG): Removed, no longer needed. (FT_STATIC_BYTE_CAST): New macro. * src/smooth/ftgrays.c (FT_STATIC_CAST): Replace with... (FT_STATIC_BYTE_CAST): ... this. 2021-11-18 Werner Lemberg <wl@gnu.org> Provide C++ versions for public macros with casts. Many FreeType clients use C++. However `g++ -Wold-style-cast` warns for macros with C-style casts even for system header files; this also affects directories included with `-isystem`. While this could be seen as a problem with g++, the problem is more a philosophical one: Over the time, C and C++ diverged more and more, and some features of C are no longer the 'right' solution in C++. * include/freetype/config/public-macros.h (FT_STATIC_CAST, FT_REINTERPRET_CAST): New macros. * include/freetype/freetype.h (FT_ENC_TAG, FT_LOAD_TARGET_, FT_LOAD_TARGET_MODE): Use `FT_STATIC_CAST`. Correctly handle negative 'signed char' input. * include/freetype/ftimage.h (FT_IMAGE_TAG): Ditto. * include/freetype/fttypes.h (FT_MAKE_TAG, FT_BOOL): Ditto. * include/freetype/ftmodapi.h (FT_FACE_DRIVER_NAME): Use `FT_REINTERPRET_CAST`. * src/smooth/ftgrays.c (FT_STATIC_CAST)[STANDALONE_]: New macro. [!STANDALONE]: Include `FT_CONFIG_CONFIG_H`. Fixes #1116. 2021-11-16 Werner Lemberg <wl@gnu.org> Fix clang++ warnings. * src/*: Initialize some variables to NULL. 2021-11-16 Werner Lemberg <wl@gnu.org> [truetype] Updates for the forthcoming OpenType 1.9 standard (2/2). * src/truetype/ttgxvar.c (ft_var_load_item_variation_store): s/shortDeltaCount/wordDeltaCount/ (as done in the specification, too). Recognize new format and reject it for now. 2021-11-16 Werner Lemberg <wl@gnu.org> [truetype] Updates for the forthcoming OpenType 1.9 standard (1/2). This is in preparation for implementing `DeltaSetIndexMap` format 1, which is used by `COLR` v1 tables, and which allows 32bit indices. https://docs.microsoft.com/en-us/typography/opentype/otspec190/delta/otvarcommonformats_delta.html * src/truetype/ttgxvar.h (GX_DeltaSetIdxMapRec): Change type of `mapCount` to `FT_ULong`. * src/truetype/ttgxvar.c (ft_var_load_delta_set_index_mapping): Add argument for passing the table size; update caller. Implement new format. 2021-11-14 Werner Lemberg <wl@gnu.org> Fix clang warnings. * src/gxvalid/gxvcmmn.h (GXV_SET_ERR_IF_PARANOID): Use 'do' block. * src/gxvalid/gxvmod.c (GXV_TABLE_LOAD, GXV_TABLE_VALIDATE): Ditto. * src/smooth/ftgrays.c (gray_convert_glyph): Add cast. * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Remove cast. * src/type1/t1load.c (read_binay_data): Use `FT_ULong` for `size` parameter. (parse_subrs, parse_charstrings, parse_dict): Ditto; also add some casts. 2021-11-13 Dominik Röttsches <drott@chromium.org> [sfnt] Avoid undefined shifts in `COLR` v1 paint parsing * src/sfnt/ttcolr.c (read_paint, tt_face_get_paint): Tighten shift behavior by using multiplication, mostly using macros from ftcalc.h. Fixes: https://bugs.chromium.org/p/chromium/issues/detail?id=1269168 2021-11-13 Alexei Podtelezhnikov <apodtele@gmail.com> [builds/windows] Improve `DlgCopy` target. Fixes #1113. * builds/windows/vc2010/freetype.vcxproj: Run `DlgCopy` conditionally and decouple it from `Build`. 2021-11-12 Alexei Podtelezhnikov <apodtele@gmail.com> Explicitly define `FT_MSB` for Clang. * include/freetype/internal/ftcalc.h [__clang__] (FT_MSB): Updated. 2021-11-10 Alexei Podtelezhnikov <apodtele@gmail.com> * src/truetype/ttgxvar.c (ft_var_to_normalized): Edge optimization. 2021-11-10 Alexei Podtelezhnikov <apodtele@gmail.com> Additional `FT_MSB` macro definitions. Better macros for Windoes CE and ARM in general, based on !109 from metarutaiga. * include/freetype/internal/ftcalc.h [_MSC_VER] (FT_MSB): Updated. 2021-11-09 Alexei Podtelezhnikov <apodtele@gmail.com> [build/windows] Remove logging from default debug configurations. DLG is rather costly for performance and should be used judiciously. This removes it from the default configurations but gives an example how to enable it using the `UserDefines` property. * builds/windows/vc2010/freetype.vcxproj: Hide FT_DEBUG_LOGGING. 2021-11-08 Werner Lemberg <wl@gnu.org> * src/sfnt/sfobjs.c (sfnt_open_font): Fix typo. 2021-11-08 Werner Lemberg <wl@gnu.org> * src/gxvalid.*, src/otvalid.*: Fix `-Wformat` warnings. 2021-11-08 Werner Lemberg <wl@gnu.org> [pshinter] Fix C++ compilation. * src/pshinter/pshalgo.c (psh_compute_dir): Fix type of `result`. (psh_hint_table_find_strong_points): Add cast. 2021-11-08 Werner Lemberg <wl@gnu.org> [sfnt] Reduce footprint if WOFF and WOFF2 support is not needed. Based on a patch from metarutaiga (MR !106). The gist of this commit is that it doesn't make sense to support WOFF without compression (which would be only possible in WOFF 1.0 anyway). * src/sfnt/sfobjs.c (sfnt_open_font): Guard WOFF code with `FT_CONFIG_OPTION_USE_ZLIB` block. Guard WOFF2 code with `FT_CONFIG_OPTION_USE_BROTLI` block. * src/sfnt/sfwoff.c, src/sfnt/sfwoff.h: Guard files with `FT_CONFIG_OPTION_USE_ZLIB` blocks, not parts of the code. * src/sfnt/sfwoff2.c, src/sfnt/sfwoff2.h, src/sfnt/woff2tags.c, src/sfnt/woff2tags.h: Guard files with `FT_CONFIG_OPTION_USE_BROTLI` blocks, not parts of the code. Fixes #1111. 2021-11-08 Werner Lemberg <wl@gnu.org> [truetype] Make trickyness checks depend on TT_USE_BYTECODE_INTERPRETER. Based on a patch from metarutaiga (MR !106). * src/truetype/ttobjs.c (tt_skip_pdffont_random_tag, tt_check_trickyness_family, tt_synth_sfnt_checksum, tt_get_sfnt_checksum, tt_check_trickyness_sfnt_ids, tt_check_trickyness): Put functions into a `TT_USE_BYTECODE_INTERPRETER` block. (tt_face_init): Put trickyness checks into a `TT_USE_BYTECODE_INTERPRETER` block. Fixes #1111. 2021-11-08 Alexei Podtelezhnikov <apodtele@gmail.com> * src/sfnt/ttload.c (tt_face_load_gasp): Fix a type mismatch warning. 2021-11-07 Alexei Podtelezhnikov <apodtele@gmail.com> [dlg] Define DLG_STATIC explicitly. DLG_STATIC is intended to disable Windows DLL linking attributes. It does not hurt to define it explicitly when we wrap DLG code. This fixes tons of LNK4286 and C4273 warnings from MSVC if we forget to define DLG_STATIC as a compiler option. * builds/windows/vc2010/freetype.vcxproj: Remove DLG_STATIC option. * src/dlg/dlgwrap.c [FT_DEBUG_LOGGING]: Define DLG_STATIC. * include/freetype/internal/ftdebug.h [FT_DEBUG_LOGGING]: Ditto. 2021-11-07 Alexei Podtelezhnikov <apodtele@gmail.com> [dlg] Lighten up the inclusions. The DLG wrapper needs to know if FT_DEBUG_LOGGING is defined in `ftoption.h`. It does not need entire FreeType. * src/dlg/dlgwrap.c: Include FT_CONFIG_OPTIONS_H directly. 2021-11-07 Alexei Podtelezhnikov <apodtele@gmail.com> [truetype] Avoid some memory zeroing in variations. * src/truetype/ttgxvar.c (ft_var_readpackeddeltas, ft_var_load_avar, ft_var_load_item_variation_store, ft_var_load_gvar): Use FT_QNEW_ARRAY if memory immediately initialized or discarded otherwise. 2021-11-05 Jany Belluz <jany.belluz@daltonmaag.com> [truetype] Fix handling of packed deltas in Variation Fonts. * src/truetype/ttgxvar (ft_var_readpackeddeltas): Don't expect the number of bytes used to encode the deltas to be higher than the number of encoded values. The specification allows a very compact encoding; for example, a list of 200 zeros can be encoded with just a couple of bytes. We now count the consumed bytes to make sure to not read more than expected. 2021-11-04 Jany Belluz <jany.belluz@daltonmaag.com> [truetype] Fix CVAR handling of tuples for all points. * src/truetype/ttgxvar (tt_face_vary_cvt): Function `ft_var_readpackedpoints`, when it returns `ALL_POINTS`, also sets `point_count` to value 0. However, the CVAR code was incorrectly expecting that `point_count` would be set to match the length of the CVT table. 2021-11-04 Jany Belluz <jany.belluz@daltonmaag.com> * src/truetype/ttgxvar.c: Fix typos in macros that guard CVAR code. 2021-11-04 Alexei Podtelezhnikov <apodtele@gmail.com> * docs/INSTALL: Mention Meson and MSBuild more prominently. 2021-11-03 Gabor Kertesz <gabor.kertesz@linaro.org> [libpng] Update Meson wrap for win-arm64 1.6.37-5 released patches for win-arm64 to successfully build libpng with Meson: https://github.com/mesonbuild/wrapdb/pull/205 https://github.com/mesonbuild/wrapdb/pull/216 Updated by the following command: meson wrap update libpng Tested on win-arm64 and x64. 2021-11-03 Dominik Röttsches <drott@chromium.org> [sfnt] Clarify `COLR` v1 FT_Paint* format representations * include/freetype/ftcolor.h (FT_PaintLinearGradient, FT_PaintRadialGradient, FT_PaintSweepGradient, FT_PaintTransform, FT_PaintTranslate, FT_PaintScale, FT_PaintRotate, FT_PaintSkew): Clarify 16.16 fixed point representation of struct fields. * src/sfnt/ttcolr.c (read_paint): Shift coordinates for FT_PaintLinearGradient, FT_PaintRadialGradient, FT_PaintSweepGradient accordingly. Fixes: https://gitlab.freedesktop.org/freetype/freetype/-/issues/1110 2021-11-03 Alexei Podtelezhnikov <apodtele@gmail.com> [builds/windows] Let MSBuild handle DLG copy. * builds/windows/vc2010/freetype.vcxproj: Specify DlgCopy target. * builds/windows/vc2010/script.bat: Deleted. 2021-10-29 Alexei Podtelezhnikov <apodtele@gmail.com> * src/truetype/ttgload.c (load_truetype_glyph): Fix MSVC warning C4312. 2021-10-29 Alexei Podtelezhnikov <apodtele@gmail.com> [builds/windows] Separate MSVC linker and librarian. MSVC uses LIB for static and LINK for dynamic libraries. They are related but the former has much smaller set of options. * builds/windows/vc2010/freetype.vcxproj: Updated. 2021-10-29 Alexei Podtelezhnikov <apodtele@gmail.com> [builds/windows] Revise MSVC linking optimizations. * builds/windows/vc2010/freetype.vcxproj: Optimize DLL linking only. * builds/windows/visualc/freetype.dsp: Ditto. * builds/windows/visualc/freetype.vcproj: Ditto. 2021-10-28 Alexei Podtelezhnikov <apodtele@gmail.com> [woff] Optimize table tagging. * include/freetype/internal/wofftypes.h (WOFF_TableRec): Use 32-bit tag. * src/sfnt/sfwoff.c (woff_open_font): Use 32-bit tag. 2021-10-28 Alexei Podtelezhnikov <apodtele@gmail.com> [woff2] Optimize table tagging. Fixes #1107. * include/freetype/internal/wofftypes.h (WOFF2_TableRec): Use 32-bit tag. * src/sfnt/sfwoff2.c (compare_tags, find_table, woff2_open_font): Use 32-bit tag. * src/sfnt/woff2tags.[ch] (woff2_known_tags): Use static storage and return 32-bit tag. 2021-10-26 Werner Lemberg <wl@gnu.org> Formatting. 2021-10-26 Ben Wagner <bungeman@chromium.org> [mm] Tolerate missing Blend dictionary entries In a Multiple Master font, the Blend dictionary must contain valid Private, FontInfo, and FontBBox. The current code will error if any of these are present and invalid, but will not error and will provide uninitialized data if the Blend dictionary exists but does not contain one of these entries. This change reverts to the older behavior of treating any missing entries as containing all zero data and not returning an error. In the future it may be best to keep track of when these are actually initialized and error if they are not. * src/type1/t1load.c (t1_allocate_blend): Zero initiailize. 2021-10-26 Alexei Podtelezhnikov <apodtele@gmail.com> [builds/windows] Add MSVC linker optimazations. We continue to build static libraries with statically linked C run- time and add options to optimize references. * builds/windows/vc2010/freetype.vcxproj: Sort entries, add options. 2021-10-23 Alexei Podtelezhnikov <apodtele@gmail.com> * builds/windows/vc2010/freetype.vcxproj: Use MachineARM64. 2021-10-22 Alexei Podtelezhnikov <apodtele@gmail.com> [builds/windows] Prioritize x64. * builds/windows/vc2010/freetype.sln: Sort entries. 2021-10-22 Gabor Kertesz <gabor.kertesz@linaro.org> [builds/windows] Add ARM64 platform. * builds/windows/vc2010/freetype.sln: Updated * builds/windows/vc2010/freetype.vcxproj: Updated. * builds/windows/vc2010/freetype.vcxproj.filters: Minor fix. 2021-10-21 Ben Wagner <bungeman@chromium.org> [mm] Delay setting blend weight and design position. Previously the `blend->weight_vector`, `blend->default_weight_vector`, and `blend->design_pos` were set early to allocated but uninitialized memory under the assumption that the memory would eventually be initialized. However, it is possible that some of the required keywords may not actually be present, leaving the memory uninitialized. This is different from a present but invalid table, which would produce an error. Reported as https://bugs.chromium.org/p/chromium/issues/detail?id=1261762 * src/type1/t1load.c (t1_allocate_blend): Remove early allocation and initialization. (parse_blend_design_positions, parse_weight_vector): Parse into local and assign to blend if valid. (T1_Open_Face): Check that if a blend exists that it has the weight vector and design positions. 2021-10-21 Ben Wagner <bungeman@chromium.org> [cff] Commit vstore data and regions on allocation. The vstore->regionCount and vstore->dataCount were read directly from the data. However, vstore->varRegionList and vstore->varData would still contain uninitialized entries with uninitialized pointers in the event of an error, leading to issues when attempting to clean up. Reportd as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40104 * src/cff/cffload.c (cff_vstore_load): Read the region and data counts into locals and update the vstore counts immediately after each entry becomes free-able. 2021-10-20 Ben Wagner <bungeman@chromium.org> [sfnt] Delay setting gasp ranges and count until computed. Previously, the gasp.numRanges was set and gasp.gaspRanges was allocated and assigned before a possible early exit if the frame could not be entered. It is also possible that the gaspRanges allocation could fail but the numRanges still be set to non-zero. In such cases an error would be returned, but the face would have a gasp in an inconsistent state which may still be accessed. Reported as https://bugs.chromium.org/p/chromium/issues/detail?id=1261450 * src/sfnt/ttload.c (tt_face_load_gasp): Delay setting gasp.numRanges and gasp.gaspRanges until after the ranges are initialized. 2021-10-20 Ben Wagner <bungeman@chromium.org> [sfnt] Delay setting names and langTags until computed. Previously, the table->names and table->langTags fields were created pointing to uninitialized memory and an early exit could happen if the frame could not be entered. The caller would then be unable to properly dispose of the memory as the string fields had not been initialized. Reported as https://bugs.chromium.org/p/chromium/issues/detail?id=1261343 * src/sfnt/ttload.c (tt_face_load_name): delay setting table->langTags and table->names until after the memory they will point to is fully initialized. 2021-10-20 Alexei Podtelezhnikov <apodtele@gmail.com> * tests/issue-1063/main.c: s/PATH_MAX/FILENAME_MAX/. Closes !97 for Windows by using a standard macro. 2021-10-19 Werner Lemberg <wl@gnu.org> [bdf, cid, pfr, winfonts] Improve rejection of other font formats. This is mainly for better diagnostics of malformed fonts. * src/bdf/bdflib.c (_bfd_readstream): Stop font format testing if the first input line is too long or doesn't end with `\r` or `\n`. * src/cid/cidparse.c (cid_parser_new): Don't handle too short input as an error but as an unknown format. * src/pfr/pfrobjs.c (pfr_face_init): Ditto. * src/winfonts/winfnt.c (fnt_font_load, fnt_face_get_dll_font): Ditto. 2021-10-19 Alexei Podtelezhnikov <apodtele@gmail.com> [pcf] Zero out the allocated properties. Fallout reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40033 * src/pcf/pcfread.c (pcf_get_properties): Use FT_NEW_ARRAY and zero out `properties` in case of failure. 2021-10-18 Werner Lemberg <wl@gnu.org> configure: Use string comparison for directory inodes. Inode values might be larger than integers supported by the shell. Fixes #1105. 2021-10-17 Alexei Podtelezhnikov <apodtele@gmail.com> * src/sfnt/ttload.c (tt_face_load_name): NULL-initialize langTag. Another attempt to fix fallout reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40024 2021-10-17 Alexei Podtelezhnikov <apodtele@gmail.com> [bdf] Fix up user properties. Fallout reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40027 * src/bdf/bdflib.c (_bdf_add_property): Cosmetic NULL. (bdf_create_property): Limit allocations to customary signed FT_Long and NULL-initialize unused storage. (bdf_free_font): Do not free unused storage. 2021-10-17 Alexei Podtelezhnikov <apodtele@gmail.com> * src/sfnt/ttload.c (tt_face_load_name): Accounting fix. Fallout reported as https://crbug.com/40024 2021-10-16 Ben Wagner <bungeman@chromium.org> Fix typos in memory macros. FT_QNEW_ARRAY and FT_QRENEW_ARRAY were using the non-Q FT_MEM_NEW_ARRAY and FT_MEM_RENEW_ARRAY. Change these to use the Q versions. Also fix the one issue discovered in tt_face_load_name where table->names is created with FT_QNEW_ARRAY but the extra string member is not initialized to NULL. * include/freetype/internal/ftmemory.h (FT_Q(RE)NEW_ARRAY): Use FT_MEM_Q(RE)NEW_ARRAY as needed. * src/sfnt/ttload.c (tt_face_load_name): Initialize `entry->string`. 2021-10-15 Ben Wagner <bungeman@chromium.org> [truetype] Reload context after re-executing `prep`. When a different hinting mode from the current is selected, the `prep` table must be re-executed with the new mode. After this happens the context must be re-loaded in preparation for the glyph program to be run. Fixes #1104. * truetype/ttgload.c (tt_loader_init): Add call to `TT_Load_Context`. 2021-10-15 Werner Lemberg <wl@gnu.org> [truetype] Minor documentation improvements. 2021-10-14 Anurag Thakur <anuthadev@gmail.com> Add clang build to linux CI 2021-10-12 Anurag Thakur <anuthadev@gmail.com> CI: Add macOS CI, including a clang build 2021-10-12 Alexei Podtelezhnikov <apodtele@gmail.com> * src/cid/cidload.c (parse_fd_array): Protect against trancation. 2021-10-12 Alexei Podtelezhnikov <apodtele@gmail.com> [type1] Revert to signed size for binary data. Recently introduced and reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=39838 * src/type1/t1load.c (read_binary_data): Reject negative size. (parse_subrs, parse_charstrings): Use customary signed size. 2021-10-11 Alexei Podtelezhnikov <apodtele@gmail.com> [psaux] Signedness revisions. Unsigned indexes are easier to check. * src/psaux/cffdecode.c (cff_decoder_parse_charstrings): Updated. * src/psaux/psintrp.c (cf2_interpT2CharString): Ditto. * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Ditto. * src/type1/t1load.c (read_binary_data): Ditto. 2021-10-11 Alexei Podtelezhnikov <apodtele@gmail.com> [cid] Signedness revisions. Unsigned checks are simpler. * include/freetype/t1tables.h (CID_FaceInfoRec): Change to unsignd `num_dicts`. * src/cid/cidparse.h (CID_Parser): Change to unsigned `num_dict`. * src/cid/cidgload.c (cid_load_glyph): Updated. * src/cid/cidload.c (cid_load_keyword, parse_fd_array, parse_expansion_factor, parse_font_name, cid_read_subrs, cid_face_open): Updated. * src/cid/cidobjs.c (cid_face_done): Updated. * src/cid/cidparse.c (cid_parser_new): Updated. 2021-10-09 Alexei Podtelezhnikov <apodtele@gmail.com> * src/cid/cidload.c (cid_face_open): Streamline CIDCount check. 2021-10-08 Alexei Podtelezhnikov <apodtele@gmail.com> * src/cid/cidload.c (cid_face_open): Streamline SubrCount check. 2021-10-08 Alexei Podtelezhnikov <apodtele@gmail.com> * src/cid/cidgload.c (cid_load_glyph): Fortify incremental loading. 2021-10-08 Alexei Podtelezhnikov <apodtele@gmail.com> Signedness revisions. This eliminates explicit casting by switching to unsigned fields. The revisions mostly impact the handling of CID fonts. * include/freetype/fttypes.h (FT_Data): Change to unsigned `length`. * include/freetype/t1tables.h (CID_FaceDictRec): Ditto for `sd_bytes`. (CID_FaceInfoRec): Ditto for `gd_bytes` and `gd_bytes`. * include/freetype/internal/tttypes.h (TT_LoaderRec): Ditto for `byte_len`. * src/cid/cidgload.c (cid_load_glyph): Updated. * src/cid/cidload.h (cid_get_offset): Update argument. * src/cid/cidload.c (cid_get_offset, cid_read_subrs, cid_face_open): Updated. * src/cff/cffgload.c (cff_get_glyph_data, cff_free_glyph_data): Updated. * src/psaux/psft.c (cf2_getT1SeacComponent): Updated. * src/truetype/ttgload.c (TT_Process_Composite_Glyph, load_truetype_glyph): Updated. 2021-10-07 Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> meson.build (gen_docs): Use `current_source_dir` instead of `source_root`. These two are not equal when FreeType is used as a subproject, such as in `freetype-demos`. In that case, `source_root` points at the root project, causing the docs build to fail. 2021-10-05 Alexei Podtelezhnikov <apodtele@gmail.com> * src/smooth/ftgrays.c (FT_DIV_MOD): Limit the ARM workaround. 2021-10-05 Alexei Podtelezhnikov <apodtele@gmail.com> [builds/unix, builds/vms] Standardize `mmap` failure. * builds/unix/ftsystem.c (FT_Stream_Open): Check for MAP_FAILED. * builds/vms/ftsystem.c (FT_Stream_Open): Ditto. This should cover https://savannah.nongnu.org/patch/?5909 as well. 2021-10-05 Hugh McMaster <hugh.mcmaster@outlook.com> autogen.sh: Only copy submodules if building from a git branch. `autogen.sh` fails if building from a standard source tarball. Firstly, git expects to be called in a git repository, then `copy_submodule_files` blindly attempts to copy files. Debian, Ubuntu, Linux Mint, and other derivatives all run `autogen.sh` before compiling to regenerate build files. This patch ensures that various git commands are only called and 'dlg' files are only copied if `autogen.sh` is called from a git repository. 2021-10-05 Alexei Podtelezhnikov <apodtele@gmail.com> * include/freetype/internal/ftgloadr.h: Add missing header. Noticed by Jouk Jansen. 2021-10-05 Alexei Podtelezhnikov <apodtele@gmail.com> [pshinter] Additional clean-ups. * src/pshinter/pshalgo.h (psh_hint_table_find_strong_points): Streamline code. * src/pshinter/pshalgo.h (PSH_Glyph): Remove unused fields. 2021-10-04 Alexei Podtelezhnikov <apodtele@gmail.com> [pshinter] More convenient direction definition. It is easier to check directions using flags than integer values. * src/pshinter/pshalgo.h (PSH_Dir): Redefine directions. (PSH_PointRec): Use them as an enum type. * src/pshinter/pshalgo.c (psh_compute_dir): Modify return type. (psh_glyph_init, psh_hint_table_find_strong_points, psh_glyph_find_blue_points): Update users. 2021-10-04 Alexei Podtelezhnikov <apodtele@gmail.com> [pshinter] Remove unnecessary check. * src/pshinter/pshalgo.c (psh_hint_table_find_strong_points): Do not check if direction is defined before checking how. 2021-10-02 AnuthaDev <anuthadev@gmail.com> CI: Hardcode meson version to fix build failure on windows 2021-10-01 Alexei Podtelezhnikov <apodtele@gmail.com> Additional `FT_MSB` macro definitions. * include/freetype/internal/ftcalc.h [__DECC,_CRAYC]: Use builtins and intrinsics. 2021-10-01 Alexei Podtelezhnikov <apodtele@gmail.com> * src/autofit/afhints.c (af_glyph_hints_reload): Decrease casting. 2021-09-30 Alexei Podtelezhnikov <apodtele@gmail.com> * src/tools/apinames.c: Facilitate OpenVMS linker options. 2021-09-29 Alexei Podtelezhnikov <apodtele@gmail.com> * src/winfonts/winfnt.c (FNT_Face_Init): Correct reallocation. 2021-09-25 Alexei Podtelezhnikov <apodtele@gmail.com> [builds/unix] Do not use autoconf SIZEOF. * builds/unix/ftconfig.h.in [FT_USE_AUTOCONF_SIZEOF_TYPES]: Removed. * builds/unix/configure.raw: Remove AC_CHECK_SIZEOF and update. After this commit, autoconf builds will fully rely on <limits.h> rather than falling back on it if AC_CHECK_SIZEOF failed for some reason. There is a risk that misconfigured cross-compilation might have wrong headers. Note that Meson and CMake builds always relied on <limits.h> for sizes and availability of integer types. 2021-09-25 Alexei Podtelezhnikov <apodtele@gmail.com> Propagate sign when reading OFF3. Signed 24-bit values are extremely rare. FreeType only reads them in PFR fonts with bitmap strikes conditionally. They have not been seen in the known fonts. That is why this bug could never be discovered. `FT_FRAME_OFF3` propagates sign correctly. * include/freetype/internal/ftstream.h (FT_PEEK_OFF3, FT_PEEK_OFF3_LE): Propagate sign into 32-bit value. (FT_GET_OFF3, FT_READ_OFF3): Needed fixing but removed as unused. 2021-09-25 Alexei Podtelezhnikov <apodtele@gmail.com> [bdf] Simplify comment collection or lack thereof. BDF comments are neither actually collected nor retrieved. There is no need to be fancy with delimiters. * src/bdf/bdflib.c (_add_bdf_comment): Delimit comments with zeros... (bdf_load_font): ...and do not null-terminate comments additionally. (_bdf_parse_glyphs): Check if comments are kept, which they are not. (_bdf_parse_start): Minor clean up. 2021-09-24 Alexei Podtelezhnikov <apodtele@gmail.com> Use NULL for pointers only. * src/bdf/bdflib.c (*): Code changes. * include/freetype/freetype.h: Comments only. * src/cff/cffload.c, src/cff/cffobjs.c: Ditto. * src/winfonts/winfnt.c: Ditto. 2021-09-23 Werner Lemberg <wl@gnu.org> Minor documentation fixes and improvements. 2021-09-23 Alexei Podtelezhnikov <apodtele@gmail.com> Reference `fopen` in the docs. 2021-09-23 Alexei Podtelezhnikov <apodtele@gmail.com> [bdf, pcf] Minor optimization. * src/pcf/pcfread.c (pcf_load_font): Do not call `FT_MulDiv` for a small job. * src/bdf/bdfdrivr.c (BDF_Face_Init): Ditto. * src/bdf/bdflib.c (_bdf_parse_glyphs): Fix a comment. 2021-09-22 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Initialize stream memory earlier. With Windows memory management tracking heap, it is important to use it during the stream opening fallback. In Unix, the argument is unused, but it is better to set it correctly. * src/base/ftobjs.c (FT_Stream_New): Set memory before calling `FT_Stream_Open`. * builds/windows/ftsystem.c, builds/unix/ftsystem.c (FT_Stream_Open, ft_close_stream_by_free): Call `ft_alloc` and `ft_free` with proper memory argumment. 2021-09-22 Alexei Podtelezhnikov <apodtele@gmail.com> [builds/windows] Revert back to `CreateFileA` only. Calling `CreateFileW` without making sure that the patname is really `wchar_t` is a bad idea and can lead to unpredictable overreads. For Windows CE, we impelemnt the missing API. Fixes #1098 and !76 again. * builds/windows/ftsystem.c (FT_Stream_Open): Call `CreateFileA`. [_WIN32_WCE] (CreateFileA, FileSizeEx): Implement missing interfaces. 2021-09-21 Alexei Podtelezhnikov <apodtele@gmail.com> * src/bdf/bdflib.c (_bdf_parse_{start,glyphs}): Use appropriate scanner. 2021-09-21 Alexei Podtelezhnikov <apodtele@gmail.com> Minor. 2021-09-20 Alexei Podtelezhnikov <apodtele@gmail.com> * src/cff/cffdrivr.c (cff_ps_get_font_{info,extra}): Use FT_QNEW. 2021-09-18 Alexei Podtelezhnikov <apodtele@gmail.com> [cache] Minor clean-ups. * src/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP): Remove parantheses. * src/cache/ftccache.c (FTC_Cache_Lookup): Ditto. (FTC_Cache_RemoveFaceID): Remove unnecessary variable. 2021-09-17 Alexei Podtelezhnikov <apodtele@gmail.com> [builds/windows] Try both wide and narrow `CreateFile` Windows handles wchar_t* UTF-16 and char* ANSI (presently UTF-8) filenames using alternative -A and -W API. We'll try them both when opening a file. This means that you should not worry about about conversions. Fixes #1098 and !76. * builds/windows/ftsystem.c (FT_Stream_Open): Call alternative `CreateFile` in the case of failure. 2021-09-17 Edwin Steiner <edwin.steiner@gmail.com> [cff] Explicitly set StandardEncoding or ExpertEncoding offsets. Fixes #1097. * src/cff/cffload.c (cff_encoding_load): Set special offset values. 2021-09-16 Alexei Podtelezhnikov <apodtele@gmail.com> [cache] Miscellaneous clean-ups. * src/cache/ftccache.c (ftc_get_top_node_for_hash, FTC_Cache_Clear): Remove barely used variables. (ftc_cache_add): Adjust casting. * src/cache/ftccmap.c (FTC_CMapCache_Lookup): Remove casting. * src/cache/ftcsbits.c (ftc_snode_load): Remove casting. 2021-09-16 Alexei Podtelezhnikov <apodtele@gmail.com> * src/cff/cffload.c (cff_fd_select_get): Remove casting. 2021-09-16 Alexei Podtelezhnikov <apodtele@gmail.com> * src/pcf/pcfread.c (pcf_read_TOC): Remove casting. 2021-09-15 Alexei Podtelezhnikov <apodtele@gmail.com> Minor type adjustments. * src/cff/cffobjs.c (cff_face_init): Reduce casting. * src/truetype/ttobjs.c (tt_size_ready_bytecode): Ditto. * src/type1/t1load.c (T1_Set_MM_Design): Ditto. 2021-09-15 Alexei Podtelezhnikov <apodtele@gmail.com> Replace boolean allocation macros with MEM ones. * src/base/ftbitmap.c (FT_Bitmap_Copy): Use MEM-macro. * src/base/ftobjs.c (ft_glyphslot_alloc_bitmap): Ditto. * src/bzip2/ftbzip2.c (ft_bzip2_alloc): Ditto. * src/cache/ftccache.c (ftc_cache_init): Ditto * src/gzip/ftgzip.c (ft_gzip_alloc): Ditto. * src/psnames/psmodule.c (ps_unicodes_init): Ditto. * src/sfnt/sfobjs.c (sfnt_load_face): Ditto. * src/sfnt/ttload.c (tt_face_load_name): Ditto. 2021-09-15 Alexei Podtelezhnikov <apodtele@gmail.com> [cache] Revert to some zeroing. * src/cache/ftccache.c (ftc_cache_init, ftc_cache_resize): Zero `buckets` again to fix some crashes. 2021-09-14 Alexei Podtelezhnikov <apodtele@gmail.com> * src/pshinter/pshrec.c (ps_mask_table_merge_all): Tweak loops. Fixes fallout from 731d0b685685 reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=38685 2021-09-13 Alexei Podtelezhnikov <apodtele@gmail.com> [cff, pshinter] Clean up unsigned counters. Loops with unsigned decrement can be reliably stopped when the counter wraps around after reaching zero. * src/cff/cffload.c (cff_charset_compute_cids): Use unsigned counter. * src/pshinter/pshalgo.c (psh_hint_table_activate_mask): Ditto. * src/pshinter/pshrec.c (ps_mask_table_merge): Ditto. 2021-09-13 Alexei Podtelezhnikov <apodtele@gmail.com> [bdf, psnames, sfnt] Avoid some memory zeroing. * src/bdf/bdfdrivr.c (BDF_Face_Init): Use Q-macro. * src/sfnt/sfobjs.c (sfnt_load_face): Ditto. * src/psnames/psmodule.c (src/psnames/psmodule.c): Remove zero. 2021-09-13 Alexei Podtelezhnikov <apodtele@gmail.com> * src/base/ftobjs.c (FT_CMap_New): Revert to zeroing. Fixes fallout from c1fa7aa2bc96, reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=38641 2021-09-13 Alexei Podtelezhnikov <apodtele@gmail.com> [truetype] Clean up `exec` initialization. * src/truetype/ttinterp.c (Init_Context): Absorbed into... (TT_New_Context): ... this function. 2021-09-13 Alexei Podtelezhnikov <apodtele@gmail.com> [truetype] Avoid some memory zeroing. * src/truetype/ttgload.c (load_truetype_glyph): Use Q-macro. * src/truetype/ttinterp.c (Update_Max): Ditto. * src/truetype/ttpload.c (src/truetype/ttpload.c): Ditto. 2021-09-13 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Avoid some memory zeroing. * src/base/ftobjs.c (FT_New_Size, FT_CMap_New, FT_CMap_Done, ft_open_face_internal, ft_open_face_internal): Use Q-macros. 2021-09-13 Alexei Podtelezhnikov <apodtele@gmail.com> [cache, psaux] Remove zeros. * src/cache/ftcmru.c (FTC_MruList_New): Remove initialization. * src/psaux/psstack.c (cf2_stack_init): Ditto. 2021-09-12 Alexei Podtelezhnikov <apodtele@gmail.com> [cache] Avoid some memory zeroing. * src/cache/ftcmru.c (FTC_MruList_New): Use Q-macro. * src/cache/ftcmanag.c (FTC_Manager_RegisterCache): Ditto. * src/cache/ftccache.c (ftc_cache_init, ftc_cache_resize): Ditto. 2021-09-11 Alexei Podtelezhnikov <apodtele@gmail.com> * src/cache/ftcmanag.c (FTC_Manager_New): Add missing zero. Fixes fall out from a7b199d081e7. 2021-09-10 Alexei Podtelezhnikov <apodtele@gmail.com> [truetype] Tweak `hdmx` checking. Fixes #1096. * src/truetype/ttpload.c (tt_face_load_hdmx): Account for padding. 2021-09-10 Alexei Podtelezhnikov <apodtele@gmail.com> [truetype] Tweak `loca` clamping. Fixes #1095. * src/truetype/ttpload.c (tt_face_load_loca): Fix up clamping. * include/freetype/internal/tttypes.h (TT_Face): Correct docs. 2021-09-08 Alexei Podtelezhnikov <apodtele@gmail.com> Fortify memory debugging (cont'd). * src/base/ftdbgmem.c (FT_DumpMemory): Check for active debugger. (ft_mem_table_destroy): Move `FT_DumpMemory` call from here... (ft_mem_debug_done): ... to here. 2021-09-08 Alexei Podtelezhnikov <apodtele@gmail.com> Fortify memory debugging. These changes are neccessary to properly recover `memory->user` that holds the Windows heap handle now. * src/base/ftdbgmem.c (ft_mem_debug_init): Handle all table allocations, initializations, and sizing instead of... (ft_mem_table_new): ... this function removed. (ft_mem_debug_done): Better check for the active debugger and free the debugger table here instead of... (ft_mem_table_destroy): ... here. 2021-09-08 Werner Lemberg <wl@gnu.org> src/tools/ftrandom/ftrandom.c (_XOPEN_SOURCE): Set to 600. This allows C99 compilation on Solaris. Problem reported by Mojca Miklavec. 2021-09-07 Alexei Podtelezhnikov <apodtele@gmail.com> [builds/windows] Use native memory allocation API. * builds/windows/ftsystem.c (ft_alloc, ft_realloc, ft_free): Wrap HeapAlloc, HeapReAlloc, and HeapFree. (FT_New_Memory): Set the heap handle. 2021-09-07 Werner Lemberg <wl@gnu.org> [dlg] Synchronize with upstream. * src/dlg/dlgwrap.c (_XOPEN_SOURCE): Set to 600. Fixes #1093. 2021-09-04 Alexei Podtelezhnikov <apodtele@gmail.com> Cosmetic zeros. 2021-09-03 Alexei Podtelezhnikov <apodtele@gmail.com> * src/bdf/bdflib.c (_bdf_parse_start): Keep parser memory. 2021-09-03 Werner Lemberg <wl@gnu.org> autogen.sh: Make it work with old Solaris 10 shell. 2021-09-03 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth, raster, sdf] Clean up initialization calls. * src/raster/ftraster.c (ft_black_init): Removed. (ft_black_new): Clean up. * src/sdf/ftbsdf.c (bsdf_raster_new): Ditto. * src/sdf/ftsdf.c (sdf_raster_new): Ditto. * src/smooth/ftgrays.c (gray_raster_new): Ditto. 2021-09-03 Alexei Podtelezhnikov <apodtele@gmail.com> * src/cache/ftcmanag.c (FTC_Manager_New): Avoid some zeroing. 2021-09-03 Alexei Podtelezhnikov <apodtele@gmail.com> * src/bdf/bdflib.c (bdf_load_font): Remove memory shuffling. 2021-09-03 Alexei Podtelezhnikov <apodtele@gmail.com> Cosmetic zeros. 2021-09-02 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Clean up stream reading. * src/base/ftstream.c (FT_Stream_ReadUShort, FT_Stream_ReadUOffset, FT_Stream_ReadULong and their LE variants): Remove unnecessary initialization and slightly refactor. (FT_Stream_GetByte, FT_Stream_ReadByte): Rename to return unsigned value and align with sister functions. * include/freetype/internal/ftstream.h (FT_Stream_GetByte, FT_Stream_ReadByte): Update prototypes and caller macros. 2021-09-02 Alexei Podtelezhnikov <apodtele@gmail.com> s/0/NULL/ where appropriate. 2021-08-30 Alexei Podtelezhnikov <apodtele@gmail.com> * builds/windows/ftsystem.c (FT_Stream_Open): Fix double-close. 2021-08-30 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Reduce shift in multiply-shift optimization. * src/smooth/ftgrays.c (FT_UDIVPREP, FT_UDIV): Reduce shift. Smaller shifts that keep the division operands of FT_UDIVPREP within 32 bits result in slightly faster divisions, which is noticeable in the overall performance. The loss of precision is tolerable until the divisors (the components dx and dy) approach 32 - PIXEL_BITS. With PIXEL_BITS = 8, this corresponds to 65,000 pixels or the bitmap size that we refuse to render anyway. Using `ftbench -p -s60 -t5 -bc timesi.ttf`, Before: 8.52 us/op After: 8.32 us/op 2021-08-28 Werner Lemberg <wl@gnu.org> [truetype] Fix compilation if !TT_CONFIG_OPTION_BYTECODE_INTERPRETER. * src/truetype/ttgxvar.c (tt_cvt_ready_iterator): Compile function conditionally. (tt_face_vary_cvt) [!TT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Add code. Fixes #1091. 2021-08-27 Alexei Podtelezhnikov <apodtele@gmail.com> [builds/windows] Revise SSE2 settings. * builds/windows/vc2010/freetype.vcxproj [x64]: Remove explicit SSE2. * builds/windows/visualc/freetype.vcproj [Win32]: Add explicit SSE2. 2021-08-27 Ben Wagner <bungeman@chromium.org> [smooth] Detect SSE2 with MSVC for x86 MSVC does not set `__SSE2__`. Instead one must check whether `_M_IX86_FP` is defined and greater than or equal to 2. * src/smooth/ftgrays.c (FT_SSE2): New macro. Use it where appropriate. 2021-08-26 Alexei Podtelezhnikov <apodtele@gmail.com> Expand comment (cont'd). 2021-08-26 Alexei Podtelezhnikov <apodtele@gmail.com> Expand comment. 2021-08-24 Alexei Podtelezhnikov <apodtele@gmail.com> * src/smooth/ftgrays.c (gray_render_conic): Refactor redundancy. 2021-08-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [truetype] Fix for the family name shorter than 8 characters. * src/truetype/ttobjs.c (tt_skip_pdffont_random_tag): If the family name to be checked is shorter than 8 characters, do not check its syntax. 2021-08-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [truetype] Simplify `trick_names'. * src/truetype/ttobjs.c (tt_check_trickyness_family): For the case that the beginning part of a long tricky family name is already registered as another tricky family name, no need to double-check the longer one. Such long tricky family names are removed from the `trick_names'. 2021-08-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [truetype] Add 2 tricky font names. Additional fix for the issue #1087. * src/truetype/ttobjs.c (tt_check_trickyness_family): Add 2 tricky font names reported in #1087. 2021-08-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [truetype] New function to skip the randomization tag. * src/truetype/ttobjs.c (tt_skip_pdffont_random_tag): New function to skip the randomization tag in the names of the fonts embedded in a PDF. It is used by tt_check_trickyness_family(), to keep from mistaking "DLC" in the randomization tag as a tricky font name. See discussion in: https://lists.nongnu.org/archive/html/freetype-devel/2021-02/msg00002.html For technical detail about the randomization tag, please find PDF Reference 5.5.3 "Font Subsets". Thanks to Justyna Wawrzynska for pointing out the issue caused by the randomization tag. 2021-08-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [truetype] Add checksums for 2 tricky fonts. Thanks to Ting717 for providing sample PDF. Fixes #1087. * src/truetype/ttobjs.c (tt_check_trickyness_sfnt_ids): Add checksums for 2 tricky fonts `DFHei-Bd-WIN-HK-BF' and `DFMing-Md-WIN-HK-BF'. 2021-08-23 Alexei Podtelezhnikov <apodtele@gmail.com> Whitespace formatting. 2021-08-22 Alexei Podtelezhnikov <apodtele@gmail.com> Decorate const arguments. * src/base/ftglyph.c (FT_Glyph_Transform, FT_Glyph_To_Bitmap): Do it. * include/freetype/ftglyph.h (FT_Glyph_Transform, FT_Glyph_To_Bitmap): Do it. 2021-08-21 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Clean up the null cell usage. Put the null cell at the end of the pool and store it explicitly so that we can use it as both the limit and the dumpster. * src/smooth/ftgrays.c (gray_TWorker): Store the last `cell_null` and remove unnecesary fields. (NULL_CELL_PTR, CELL_IS_NULL): Remove in favor of explicit `cell_null`. (gray_dump_cells, gray_set_cell, gray_sweep{,_direct}): Update callers. (gray_convert_glyph_inner): Trace remaining cells (oh well). (gray_convert_glyph): Set up `cell_null` and slightly improve the pool management. 2021-08-20 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Restore quiet no-op rendering of bitmap glyphs. Fixes #1076. * src/base/ftobjs.c (FT_Render_Glyph_Internal): Discard an error when rendering a bitmap glyph. 2021-08-20 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Fortify 64-bit algorithm. * src/smooth/ftgrays.c (FT_UDIVPREP, FT_UDIV): s/long/FT_Int64/ and s/unsigned long/FT_UInt64/. (gray_render_line): Adjust a critical variable type. 2021-08-20 Carlo Bramini <carlo.bramix@libero.it> * builds/windows/ftsystem.c (FT_Stream_Open): Support legacy Windows. 2021-08-20 Alexei Podtelezhnikov <apodtele@gmail.com> Determine `long long` availability based on its size. MSVC, for example, used `long long` even without full C99 support. * include/freetype/config/ftstdlib.h: Check if `long long` limits are defined in <limits.h>. * include/freetype/config/integer-types.h: Check `long long` size and use it to typedef FT_Int64. 2021-08-19 Dominik Röttsches <drott@chromium.org> [sfnt] Fix format expectation for `COLR` v1 ClipList * src/sfnt/ttcolr.c (tt_face_get_color_glyph_clipbox): Change ClipList format expectation to 1 instead of 0 to make it compliant with the latest spec. 2021-08-19 Alexei Podtelezhnikov <apodtele@gmail.com> Readily use `long long` as a 64-bit type in C99 mode. * include/freetype/config/integer-types.h (FT_INT64): FT_CONFIG_OPTION_FORCE_INT64 is no longer required to use `long long`. 2021-08-19 Alexei Podtelezhnikov <apodtele@gmail.com> Use FT_INT64 instead of FT_LONG64. * include/freetype/config/integer-types.h: Remove synonymous FT_LONG64. * include/freetype/internal/ftcalc.h: s/FT_LONG64/FT_INT64/. * src/base/ftcalc.c: Ditto. * src/base/fttrigon.c: Ditto. * src/smooth/ftgrays.c: Ditto. 2021-08-18 Alexei Podtelezhnikov <apodtele@gmail.com> [builds/windows] Do not set CharacterSet for VC++. * builds/windows/vc2010/freetype.vcxproj: s/Unicode/NotSet/. * builds/windows/visualc/freetype.vcproj: s/"1"/"0"/. 2021-08-18 Werner Lemberg <wl@gnu.org> * src/sdf/ftsdf.c (get_control_box): Fix compiler warning. 2021-08-18 Werner Lemberg <wl@gnu.org> [base] Fix ppem size overflow. Fixes #1086. * src/base/ftobjs.c (FT_Request_Metrics): Add return value. Check whether ppem values fit into unsigned short values. (FT_Request_Size): Updated. * include/freetype/internal/ftobjs.h: Updated. * src/cff/cffobjs.c (cff_size_request), src/cid/cidobjs.c (cid_size_request), src/truetype/ttdriver.c (tt_size_request), src/type1/t1objs.c (T1_Size_Request): Updated. 2021-08-18 Alexei Podtelezhnikov <apodtele@gmail.com> * builds/windows/ftsystem.c (FT_Stream_Open): Cast to remove warning. 2021-08-18 Alexei Podtelezhnikov <apodtele@gmail.com> * builds/windows/ftsystem.c (FT_Stream_Open): Support UNICODE compilation. 2021-08-09 Werner Lemberg <wl@gnu.org> * src/sfnt/ttcolr.c (tt_face_get_color_glyph_clipbox): Minor fix. 2021-08-09 Dominik Röttsches <drott@chromium.org> [sfnt] Add missing blend mode 'plus' to 'COLR' v1. * include/freetype/ftcolor.h (FT_Composite_Mode): Add missing blend mode 'plus' after it was added to the spec. 2021-08-08 Werner Lemberg <wl@gnu.org> include/freetype/freetype.h (FT_Encoding): Improve documentation. Based on a suggestion by Antony Lee <anntzer.lee@gmail.com>. 2021-08-07 Werner Lemberg <wl@gnu.org> [smooth] Avoid integer overflow. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36243 * src/smooth/ftgrays.c(ADD_LONG, SUB_LONG, MUL_LONG, NEG_LONG) [STANDALONE_]: Removed, unused. (ADD_INT) [STANDALONE_]: New macro. (FT_INTEGRATE): Use ADD_INT. 2021-08-07 Dominik Röttsches <drott@chromium.org> [sfnt] Add API for retrieving a 'COLR' v1 'ClipBox' table. The optional 'COLR' v1 glyph-specific clip box helps upstream graphics libraries allocate a sufficiently large bitmap for a glyph without having to traverse the glyph graph for that. See https://github.com/googlefonts/colr-gradients-spec/issues/251 for background on the introduction of this specification change. * include/freetype/ftcolor.h (FT_ClipBox): New structure. (FT_Get_Color_Glyph_ClipBox): New function declaration. * include/freetype/internal/sfnt.h (TT_Get_Color_Glyph_ClipBox_Func): New function type. (SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): Use it. * src/base/ftobjs.c (FT_Get_Color_Glyph_ClipBox): New function to link API with SFNT implementation. * src/sfnt/sfdriver.c (sfnt_interface): Updated. * src/sfnt/ttcolr.c (Colr): New field `clip_list`. (tt_face_load_colr): Parse global clip list offset. (tt_face_get_color_glyph_clipbox): New function to find the clip box for a glyph id from the clip list array. * src/sfnt/ttcolr.h: Updated. 2021-08-06 Werner Lemberg <wl@gnu.org> [smooth] Fix left shifts of negative numbers. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36241 * src/smooth/ftgrays.c (LEFT_SHIFT): New macro. (gray_render_conic) [BEZIER_USE_DDA]: Use it. 2021-08-02 Werner Lemberg <wl@gnu.org> * meson.build: Fix zlib support. This commit synchronizes zlib support with both autotools and cmake: If no external zlib is found (or intentionally disabled on the command line), use the internal zlib by undefining `FT_CONFIG_OPTION_SYSTEM_ZLIB` without modifying `FT_CONFIG_OPTION_USE_ZLIB`. Also improve summary output. Problem reported by Moazin. 2021-08-02 Anuj Verma <anujv@iitbhilai.ac.in> [sdf] Fix out-of-range-access. * src/sdf/ftbsdf.c (first_pass, second_pass): Fix range during forward pass. Otherwise the index goes out of range for the last column. Fixes issue #1077. 2021-08-02 Anuj Verma <anujv@iitbhilai.ac.in> Fix invalid memory access in `bsdf` rasterizer. Do not generate SDF from bitmap if the `FT_GLYPH_OWN_BITMAP` flag is not set. In some cases the bitmap buffer is freed but still points to a valid address; to handle those cases check the flag before accessing the memory. * src/sdf/ftsdfrend.c (ft_bsdf_render): Handle the above case. Also, return an error message if the bitmap's rows/pitch is invalid, otherwise `slot->buffer` might be assigned to some invalid memory location. (ft_sdf_render): Same as above. Plus, move the outline back to original state after rasterization and not if any error occurs. 2021-07-29 Heiko Becker <heirecka@exherbo.org> * meson.build: Honor `--includedir` instead of hard-coding 'include'. 2021-07-29 Werner Lemberg <wl@gnu.org> src/sfnt/ttcolr.c: Minor formatting. 2021-07-29 Dominik Röttsches <drott@chromium.org> [sfnt] 'COLR' v1 PaintSweepGradient spec update * src/sfnt/ttcolr.c (read_paint): PaintSweepGradient follows other spec changes and now has the angles specified as F2DOT14, reflect that in the implementation. * include/freetype/ftcolor.h (FT_PaintSweepGradient): Update documentation. 2021-07-29 Dominik Röttsches <drott@chromium.org> [sfnt] Retrieve affine matrix from offset in 'COLR' v1 parsing. * src/sfnt/ttcolr.c (read_paint): Implement spec change where affine transform matrix is now referenced by offset instead of being placed inline in the PaintTransform table. 2021-07-29 Dominik Röttsches <drott@chromium.org> [sfnt] 'COLR' v1 PaintSkew related spec updates * src/sfnt/ttcolr.c (read_paint): Implement spec changes around PaintSkew, PaintSkewAroundCenter. Update parsing to read shorter values as changed in the spec. * include/freetype/ftcolor.h (FT_PaintSkew): Update documentation. 2021-07-29 Dominik Röttsches <drott@chromium.org> [sfnt] PaintRotate/PaintRotateAroundCenter spec updates * src/sfnt/ttcolr.c (read_paint): Implement spec change where PaintRotate and PaintRotateAroundCenter were split for a more compact format definition. Update parsing to read shorter values as changed in the spec. * include/freetype/ftcolor.h (FT_PaintRotate): Update documentation. 2021-07-29 Dominik Röttsches <drott@chromium.org> [sfnt] 'COLR' v1 PaintTranslate and PaintScale precision * src/sfnt/ttcolr.c (read_paint): Implement spec changes in PaintTranslate and PaintScale and friends. Update parsing to read new shorter values. 2021-07-29 AnuthaDev <anuthadev@gmail.com> README.git: Add Code of Conduct. 2021-07-25 Werner Lemberg <wl@gnu.org> ChangeLog housekeeping. Archive old `ChangeLog` file. We no longer write ChangeLog entries manually; instead, the file will be created from commit messages (which should be formatted in GNU's ChangeLog style) by a call to gitlog-to-changelog --format='%B%n' or something similar (this script is part of the 'gnulib' repository). 2021-07-24 Werner Lemberg <wl@gnu.org> Fix some `cppcheck` warnings. * src/bzip2/ftbzip2.c (ft_bzip2_file_skip_output), src/gzip/ftgzip.c (ft_gzip_file_skip_output): Reduce scope of `delta`. * src/psaux/psintrp.c, src/psaux/psintrp.h (cf2_interpT2CharString): Add `const` to `buf` parameter. * src/raster/ftraster.c (DelOld): Add `const` to `profile` parameter. (Vertical_Sweep_Span): Reduce scope of `target`. (FT_Outline_Get_CBox): Reduce scope of `xMin`, `xMax`, `yMin`, `yMax`. * src/smooth/ftgrays.c (gray_render_conic): Reduce scope of `split`. (gray_sweep, gray_sweep_direct): Reduce scope of `area`. * src/tools/apinames.c (names_dump) <OUTPUT_WATCOM_LBC>: Reduce scope of `temp`. 2021-07-24 AnuthaDev <anuthadev@gmail.com> * .gitlab-ci.yml: Fixed cmake build, using correct options. 2021-07-24 AnuthaDev <anuthadev@gmail.com> * CMakeLists.txt: Make `cmake` handle disabled dependencies correctly. Include 'CMakeDependentOption'. Replace `FT_WITH_XXX` options with `FT_DISABLE_XXX` and `FT_REQUIRE_XXX` pairs. Update option logic accordingly. Fixes #1066. 2021-07-24 Ben Wagner <bungeman@chromium.org> [autofit] Split `afwrtsys.h`. The header file `afwrtsys.h` has two distinct functions: to include the required writing system headers and also to generate code for each writing system. At each current use site only one or the other is used, with various macro trickery selecting one or the other. Split this header into `afws-decl.h` for the required writing system declarations and `afws-iter.h` for iterating over the writing systems to generate code. The motivation for this change is that the Visual C++ compiler treats the standard include guard idiom like `#pragma once` 'if no non-comment code or preprocessor directive comes before or after the standard form of the idiom'. It appears to check this after macro expansion, so if `WRITING_SYSTEM` expands to empty the bottom of `afwrtsys.h` is empty and looks like the standard include guard idiom which is treated like `#pragma once`, so subsequent inclusion of `afwrtsys.h` is elided. Fixes #1075. * src/autofit/afglobal.c (af_writing_system_classes), src/autofit/aftypes.h (AF_WritingSystem), src/autofit/rules.mk (AUTOF_DRV_H): Updated. * src/autofit/afwrtsys.h: Split into... * src/autofit/afws-decl.h, src/autofit/afws-iter.h: New files.
whupdup/frame
real/third_party/freetype-2.12.0/ChangeLog
none
gpl-3.0
100,764
# # FreeType 2 build system -- top-level Makefile # # Copyright (C) 1996-2022 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, # and distributed under the terms of the FreeType project license, # LICENSE.TXT. By continuing to use, modify, or distribute this file you # indicate that you have read the license and understand and accept it # fully. # Project names # PROJECT := freetype PROJECT_TITLE := FreeType # The variable TOP_DIR holds the path to the topmost directory in the project # engine source hierarchy. If it is not defined, default it to `.'. # TOP_DIR ?= . # The variable OBJ_DIR gives the location where object files and the # FreeType library are built. # OBJ_DIR ?= $(TOP_DIR)/objs include $(TOP_DIR)/builds/toplevel.mk # EOF
whupdup/frame
real/third_party/freetype-2.12.0/Makefile
Makefile
gpl-3.0
846
FreeType 2.12.0 =============== Homepage: https://www.freetype.org FreeType is a freely available software library to render fonts. It is written in C, designed to be small, efficient, highly customizable, and portable while capable of producing high-quality output (glyph images) of most vector and bitmap font formats. Please read the `docs/CHANGES` file, it contains IMPORTANT INFORMATION. Read the files `docs/INSTALL*` for installation instructions; see the file `docs/LICENSE.TXT` for the available licenses. For using FreeType's git repository instead of a distribution bundle, please read file `README.git`. The FreeType 2 API reference is located in directory `docs/reference`; use the file `index.html` as the top entry point. [Please note that currently the search function for locally installed documentation doesn't work due to cross-site scripting issues.] Additional documentation is available as a separate package from our sites. Go to https://download.savannah.gnu.org/releases/freetype/ and download one of the following files. freetype-doc-2.12.0.tar.xz freetype-doc-2.12.0.tar.gz ftdoc2120.zip To view the documentation online, go to https://www.freetype.org/freetype2/docs/ Mailing Lists ------------- The preferred way of communication with the FreeType team is using e-mail lists. general use and discussion: freetype@nongnu.org engine internals, porting, etc.: freetype-devel@nongnu.org announcements: freetype-announce@nongnu.org git repository tracker: freetype-commit@nongnu.org The lists are moderated; see https://www.freetype.org/contact.html how to subscribe. Bugs ---- Please submit bug reports at https://gitlab.freedesktop.org/freetype/freetype/-/issues Alternatively, you might report bugs by e-mail to `freetype-devel@nongnu.org`. Don't forget to send a detailed explanation of the problem -- there is nothing worse than receiving a terse message that only says 'it doesn't work'. Patches ------- For larger changes please provide merge requests at https://gitlab.freedesktop.org/freetype/freetype/-/merge_requests Alternatively, you can send patches to the `freetype-devel@nongnu.org` mailing list -- and thank you in advance for your work on improving FreeType! Details on the process can be found here: https://www.freetype.org/developer.html#patches Enjoy! The FreeType Team ---------------------------------------------------------------------- Copyright (C) 2006-2022 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, and distributed under the terms of the FreeType project license, LICENSE.TXT. By continuing to use, modify, or distribute this file you indicate that you have read the license and understand and accept it fully. --- end of README ---
whupdup/frame
real/third_party/freetype-2.12.0/README
none
gpl-3.0
2,970
README.git ========== repository issues ----------------- FreeType's official repository site is https://gitlab.freedesktop.org/freetype , from which the 'freetype.git' and 'freetype-demos.git' repositories can be cloned in the usual way. git clone https://gitlab.freedesktop.org/freetype/freetype.git git clone https://gitlab.freedesktop.org/freetype/freetype-demos.git If you want to use the Savannah mirror instead, you have to do a slightly different incantation because the repository names contain digit '2' for historical reasons. git clone \ https://git.savannah.nongnu.org/git/freetype/freetype2.git \ freetype git clone \ https://git.savannah.nongnu.org/git/freetype/freetype2-demos.git \ freetype-demos standard builds with `configure` -------------------------------- The git repository doesn't contain pre-built configuration scripts for UNIXish platforms. To generate them say sh autogen.sh which in turn depends on the following packages: automake (1.10.1) libtool (2.2.4) autoconf (2.62) The versions given in parentheses are known to work. Newer versions should work too, of course. Note that `autogen.sh` also sets up proper file permissions for the `configure` and auxiliary scripts. The `autogen.sh` script checks whether the versions of the above three tools match the numbers above. Otherwise it will complain and suggest either upgrading or using environment variables to point to more recent versions of the required tools. Note that `aclocal` is provided by the 'automake' package on Linux, and that `libtoolize` is called `glibtoolize` on Darwin (OS X). alternative build methods ------------------------- For static builds that don't use platform-specific optimizations, no configure script is necessary at all; saying make setup ansi make should work on all platforms that have GNU `make` (or `makepp`). A build with `cmake` or `meson` can be done directly from the git repository. However, if you want to use the `FT_DEBUG_LOGGING` macro (see file `docs/DEBUG` for more information) it is currently mandatory to execute `autogen.sh` in advance; this script clones the 'dlg' git submodule and copies some files into FreeType's source tree. Code of Conduct --------------- Please note that this project is released with a Contributor Code of Conduct (CoC). By participating in this project you agree to abide by its terms, which you can find in the following link: https://www.freedesktop.org/wiki/CodeOfConduct CoC issues may be raised to the project maintainers at the following address: wl@gnu.org apodtele@gmail.com ---------------------------------------------------------------------- Copyright (C) 2005-2022 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, and distributed under the terms of the FreeType project license, LICENSE.TXT. By continuing to use, modify, or distribute this file you indicate that you have read the license and understand and accept it fully. --- end of README.git ---
whupdup/frame
real/third_party/freetype-2.12.0/README.git
git
gpl-3.0
3,154
#!/bin/sh # Copyright (C) 2005-2022 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, # and distributed under the terms of the FreeType project license, # LICENSE.TXT. By continuing to use, modify, or distribute this file you # indicate that you have read the license and understand and accept it # fully. run () { echo "running \`$*'" eval $* if test $? != 0 ; then echo "error while running \`$*'" exit 1 fi } get_major_version () { echo $1 | sed -e 's/\([0-9][0-9]*\)\..*/\1/g' } get_minor_version () { echo $1 | sed -e 's/[0-9][0-9]*\.\([0-9][0-9]*\).*/\1/g' } get_patch_version () { # tricky: some version numbers don't include a patch # separated with a point, but something like 1.4-p6 patch=`echo $1 | sed -e 's/[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\).*/\1/g'` if test "$patch" = "$1"; then patch=`echo $1 | sed -e 's/[0-9][0-9]*\.[0-9][0-9]*\-p\([0-9][0-9]*\).*/\1/g'` # if there isn't any patch number, default to 0 if test "$patch" = "$1"; then patch=0 fi fi echo $patch } # $1: version to check # $2: minimum version compare_to_minimum_version () { MAJOR1=`get_major_version $1` MAJOR2=`get_major_version $2` if test $MAJOR1 -lt $MAJOR2; then echo 0 return else if test $MAJOR1 -gt $MAJOR2; then echo 1 return fi fi MINOR1=`get_minor_version $1` MINOR2=`get_minor_version $2` if test $MINOR1 -lt $MINOR2; then echo 0 return else if test $MINOR1 -gt $MINOR2; then echo 1 return fi fi PATCH1=`get_patch_version $1` PATCH2=`get_patch_version $2` if test $PATCH1 -lt $PATCH2; then echo 0 else echo 1 fi } # check the version of a given tool against a minimum version number # # $1: tool path # $2: tool usual name (e.g. `aclocal') # $3: tool variable (e.g. `ACLOCAL') # $4: minimum version to check against # $5: option field index used to extract the tool version from the # output of --version check_tool_version () { field=$5 # assume the output of "[TOOL] --version" is "toolname (GNU toolname foo bar) version" if test "$field"x = x; then field=3 # default to 3 for all GNU autotools, after filtering enclosed string fi version=`$1 --version | head -1 | sed 's/([^)]*)/()/g' | cut -d ' ' -f $field` version_check=`compare_to_minimum_version $version $4` if test "$version_check"x = 0x; then echo "ERROR: Your version of the \`$2' tool is too old." echo " Minimum version $4 is required (yours is version $version)." echo " Please upgrade or use the $3 variable to point to a more recent one." echo "" exit 1 fi } # Solaris 10's shell doesn't like the `!` operator to negate the exit status. if test -f ./builds/unix/configure.raw; then : else echo "You must be in the same directory as \`autogen.sh'." echo "Bootstrapping doesn't work if srcdir != builddir." exit 1 fi # On MacOS X, the GNU libtool is named `glibtool'. HOSTOS=`uname` if test "$LIBTOOLIZE"x != x; then : elif test "$HOSTOS"x = Darwinx; then LIBTOOLIZE=glibtoolize else LIBTOOLIZE=libtoolize fi if test "$ACLOCAL"x = x; then ACLOCAL=aclocal fi if test "$AUTOCONF"x = x; then AUTOCONF=autoconf fi check_tool_version $ACLOCAL aclocal ACLOCAL 1.10.1 check_tool_version $LIBTOOLIZE libtoolize LIBTOOLIZE 2.2.4 check_tool_version $AUTOCONF autoconf AUTOCONF 2.62 # This sets FREETYPE version. eval `sed -n \ -e 's/^#define *\(FREETYPE_MAJOR\) *\([0-9][0-9]*\).*/\1=\2/p' \ -e 's/^#define *\(FREETYPE_MINOR\) *\([0-9][0-9]*\).*/\1=\2/p' \ -e 's/^#define *\(FREETYPE_PATCH\) *\([0-9][0-9]*\).*/\1=\2/p' \ include/freetype/freetype.h` if test "$FREETYPE_PATCH" = "0"; then FREETYPE=$FREETYPE_MAJOR.$FREETYPE_MINOR else FREETYPE=$FREETYPE_MAJOR.$FREETYPE_MINOR.$FREETYPE_PATCH fi echo "FreeType $FREETYPE:" cd builds/unix echo "generating \`configure.ac'" sed -e "s;@VERSION@;$FREETYPE;" \ < configure.raw > configure.ac run aclocal -I . --force run $LIBTOOLIZE --force --copy --install run autoconf --force chmod +x install-sh cd ../.. chmod +x ./configure # Copy all necessary 'dlg' files. copy_submodule_files () { echo "Copying files from \`subprojects/dlg' to \`src/dlg' and \`include/dlg'" mkdir include/dlg 2> /dev/null cp $DLG_INC_DIR/output.h include/dlg cp $DLG_INC_DIR/dlg.h include/dlg cp $DLG_SRC_DIR/* src/dlg } if test -d ".git"; then DLG_INC_DIR=subprojects/dlg/include/dlg DLG_SRC_DIR=subprojects/dlg/src/dlg if test -d "$DLG_INC_DIR"; then : else echo "Checking out submodule in \`subprojects/dlg':" git submodule init git submodule update fi copy_submodule_files fi # EOF
whupdup/frame
real/third_party/freetype-2.12.0/autogen.sh
Shell
gpl-3.0
4,768
#!/bin/sh # # Copyright (C) 2002-2022 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, # and distributed under the terms of the FreeType project license, # LICENSE.TXT. By continuing to use, modify, or distribute this file you # indicate that you have read the license and understand and accept it # fully. # # # Call the `configure' script located in `builds/unix'. # rm -f config.mk builds/unix/unix-def.mk builds/unix/unix-cc.mk # respect GNUMAKE environment variable for backward compatibility if test "x$GNUMAKE" = x; then if test "x$MAKE" = x; then if test "x`make -v 2>/dev/null | egrep 'GNU|makepp'`" = x; then MAKE=gmake else MAKE=make fi fi else MAKE=$GNUMAKE fi if test "x`$MAKE -v 2>/dev/null | egrep 'GNU|makepp'`" = x; then echo "GNU make (>= 3.81) or makepp (>= 2.0) is required to build FreeType2." >&2 echo "Please try" >&2 echo >&2 echo " MAKE=<GNU make command name> $0" >&2 echo >&2 echo "or" >&2 echo >&2 echo " MAKE=\"makepp --norc-substitution\" $0" >&2 exit 1 fi # Get `dirname' functionality. This is taken and adapted from autoconf's # m4sh.m4 (_AS_EXPR_PREPARE, AS_DIRNAME_EXPR, and AS_DIRNAME_SED). if expr a : '\(a\)' >/dev/null 2>&1; then ft_expr=expr else ft_expr=false fi ft2_dir=`(dirname "$0") 2>/dev/null || $ft_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` abs_curr_dir=`pwd` abs_ft2_dir=`cd "$ft2_dir" && pwd` # `--srcdir=' option can override abs_ft2_dir if test $# -gt 0; then for x in "$@"; do case x"$x" in x--srcdir=*) abs_ft2_dir=`echo $x | sed 's/^--srcdir=//'` ;; esac done fi # build a dummy Makefile if we are not building in the source tree; # we use inodes to avoid issues with symbolic links inode_src=`ls -id $abs_ft2_dir | awk '{print $1}'` inode_dst=`ls -id $abs_curr_dir | awk '{print $1}'` if test $inode_src != $inode_dst; then if test ! -d docs; then mkdir docs echo "Copying documentation assets" cp -R $abs_ft2_dir/docs/markdown $abs_curr_dir/docs fi if test ! -r $abs_curr_dir/modules.cfg; then echo "Copying \`modules.cfg'" cp $abs_ft2_dir/modules.cfg $abs_curr_dir fi echo "Generating \`Makefile'" echo "TOP_DIR := $abs_ft2_dir" > Makefile echo "OBJ_DIR := $abs_curr_dir" >> Makefile echo "OBJ_BUILD := \$(OBJ_DIR)" >> Makefile echo "DOC_DIR := \$(OBJ_DIR)/docs" >> Makefile echo "FT_LIBTOOL_DIR := \$(OBJ_DIR)" >> Makefile echo "ifndef FT2DEMOS" >> Makefile echo " include \$(TOP_DIR)/Makefile" >> Makefile echo "else" >> Makefile echo " TOP_DIR_2 := \$(TOP_DIR)/../ft2demos" >> Makefile echo " PROJECT := freetype" >> Makefile echo " CONFIG_MK := \$(OBJ_DIR)/config.mk" >> Makefile echo " include \$(TOP_DIR_2)/Makefile" >> Makefile echo "endif" >> Makefile fi # call make CFG= # work around zsh bug which doesn't like `${1+"$@"}' case $# in 0) ;; *) for x in "$@"; do case x"$x" in x--srcdir=* ) CFG="$CFG '$x'/builds/unix" ;; *) CFG="$CFG '$x'" ;; esac done ;; esac CFG=$CFG $MAKE setup unix # eof
whupdup/frame
real/third_party/freetype-2.12.0/configure
none
gpl-3.0
3,999
/**************************************************************************** * * ft2build.h * * FreeType 2 build and setup macros (development version). * * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, * modified, and distributed under the terms of the FreeType project * license, LICENSE.TXT. By continuing to use, modify, or distribute * this file you indicate that you have read the license and * understand and accept it fully. * */ /* * This is a development version of <ft2build.h> to build the library in * debug mode. Its only difference to the default version is that it * includes a local `ftoption.h' header file with different settings for * many configuration macros. * * To use it, simply ensure that the directory containing this file is * scanned by the compiler before the default FreeType header directory. * */ #ifndef FT2BUILD_H_ #define FT2BUILD_H_ #define FT_CONFIG_MODULES_H <ftmodule.h> #define FT_CONFIG_OPTIONS_H <ftoption.h> #include <freetype/config/ftheader.h> #endif /* FT2BUILD_H_ */ /* END */
whupdup/frame
real/third_party/freetype-2.12.0/devel/ft2build.h
C++
gpl-3.0
1,177
/**************************************************************************** * * ftoption.h (for development) * * User-selectable configuration macros (specification only). * * Copyright (C) 1996-2022 by * David Turner, Robert Wilhelm, and Werner Lemberg. * * This file is part of the FreeType project, and may only be used, * modified, and distributed under the terms of the FreeType project * license, LICENSE.TXT. By continuing to use, modify, or distribute * this file you indicate that you have read the license and * understand and accept it fully. * */ #ifndef FTOPTION_H_ #define FTOPTION_H_ #include <ft2build.h> FT_BEGIN_HEADER /************************************************************************** * * USER-SELECTABLE CONFIGURATION MACROS * * This file contains the default configuration macro definitions for a * standard build of the FreeType library. There are three ways to use * this file to build project-specific versions of the library: * * - You can modify this file by hand, but this is not recommended in * cases where you would like to build several versions of the library * from a single source directory. * * - You can put a copy of this file in your build directory, more * precisely in `$BUILD/freetype/config/ftoption.h`, where `$BUILD` is * the name of a directory that is included _before_ the FreeType include * path during compilation. * * The default FreeType Makefiles use the build directory * `builds/<system>` by default, but you can easily change that for your * own projects. * * - Copy the file <ft2build.h> to `$BUILD/ft2build.h` and modify it * slightly to pre-define the macro `FT_CONFIG_OPTIONS_H` used to locate * this file during the build. For example, * * ``` * #define FT_CONFIG_OPTIONS_H <myftoptions.h> * #include <freetype/config/ftheader.h> * ``` * * will use `$BUILD/myftoptions.h` instead of this file for macro * definitions. * * Note also that you can similarly pre-define the macro * `FT_CONFIG_MODULES_H` used to locate the file listing of the modules * that are statically linked to the library at compile time. By * default, this file is `<freetype/config/ftmodule.h>`. * * We highly recommend using the third method whenever possible. * */ /*************************************************************************/ /*************************************************************************/ /**** ****/ /**** G E N E R A L F R E E T Y P E 2 C O N F I G U R A T I O N ****/ /**** ****/ /*************************************************************************/ /*************************************************************************/ /*#************************************************************************ * * If you enable this configuration option, FreeType recognizes an * environment variable called `FREETYPE_PROPERTIES`, which can be used to * control the various font drivers and modules. The controllable * properties are listed in the section @properties. * * You have to undefine this configuration option on platforms that lack * the concept of environment variables (and thus don't have the `getenv` * function), for example Windows CE. * * `FREETYPE_PROPERTIES` has the following syntax form (broken here into * multiple lines for better readability). * * ``` * <optional whitespace> * <module-name1> ':' * <property-name1> '=' <property-value1> * <whitespace> * <module-name2> ':' * <property-name2> '=' <property-value2> * ... * ``` * * Example: * * ``` * FREETYPE_PROPERTIES=truetype:interpreter-version=35 \ * cff:no-stem-darkening=1 * ``` * */ #define FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES /************************************************************************** * * Uncomment the line below if you want to activate LCD rendering * technology similar to ClearType in this build of the library. This * technology triples the resolution in the direction color subpixels. To * mitigate color fringes inherent to this technology, you also need to * explicitly set up LCD filtering. * * When this macro is not defined, FreeType offers alternative LCD * rendering technology that produces excellent output. */ /* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */ /************************************************************************** * * Many compilers provide a non-ANSI 64-bit data type that can be used by * FreeType to speed up some computations. However, this will create some * problems when compiling the library in strict ANSI mode. * * For this reason, the use of 64-bit integers is normally disabled when * the `__STDC__` macro is defined. You can however disable this by * defining the macro `FT_CONFIG_OPTION_FORCE_INT64` here. * * For most compilers, this will only create compilation warnings when * building the library. * * ObNote: The compiler-specific 64-bit integers are detected in the * file `ftconfig.h` either statically or through the `configure` * script on supported platforms. */ #undef FT_CONFIG_OPTION_FORCE_INT64 /************************************************************************** * * If this macro is defined, do not try to use an assembler version of * performance-critical functions (e.g., @FT_MulFix). You should only do * that to verify that the assembler function works properly, or to execute * benchmark tests of the various implementations. */ /* #define FT_CONFIG_OPTION_NO_ASSEMBLER */ /************************************************************************** * * If this macro is defined, try to use an inlined assembler version of the * @FT_MulFix function, which is a 'hotspot' when loading and hinting * glyphs, and which should be executed as fast as possible. * * Note that if your compiler or CPU is not supported, this will default to * the standard and portable implementation found in `ftcalc.c`. */ #define FT_CONFIG_OPTION_INLINE_MULFIX /************************************************************************** * * LZW-compressed file support. * * FreeType now handles font files that have been compressed with the * `compress` program. This is mostly used to parse many of the PCF * files that come with various X11 distributions. The implementation * uses NetBSD's `zopen` to partially uncompress the file on the fly (see * `src/lzw/ftgzip.c`). * * Define this macro if you want to enable this 'feature'. */ #define FT_CONFIG_OPTION_USE_LZW /************************************************************************** * * Gzip-compressed file support. * * FreeType now handles font files that have been compressed with the * `gzip` program. This is mostly used to parse many of the PCF files * that come with XFree86. The implementation uses 'zlib' to partially * uncompress the file on the fly (see `src/gzip/ftgzip.c`). * * Define this macro if you want to enable this 'feature'. See also the * macro `FT_CONFIG_OPTION_SYSTEM_ZLIB` below. */ #define FT_CONFIG_OPTION_USE_ZLIB /************************************************************************** * * ZLib library selection * * This macro is only used when `FT_CONFIG_OPTION_USE_ZLIB` is defined. * It allows FreeType's 'ftgzip' component to link to the system's * installation of the ZLib library. This is useful on systems like * Unix or VMS where it generally is already available. * * If you let it undefined, the component will use its own copy of the * zlib sources instead. These have been modified to be included * directly within the component and **not** export external function * names. This allows you to link any program with FreeType _and_ ZLib * without linking conflicts. * * Do not `#undef` this macro here since the build system might define * it for certain configurations only. * * If you use a build system like cmake or the `configure` script, * options set by those programs have precedence, overwriting the value * here with the configured one. * * If you use the GNU make build system directly (that is, without the * `configure` script) and you define this macro, you also have to pass * `SYSTEM_ZLIB=yes` as an argument to make. */ /* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */ /************************************************************************** * * Bzip2-compressed file support. * * FreeType now handles font files that have been compressed with the * `bzip2` program. This is mostly used to parse many of the PCF files * that come with XFree86. The implementation uses `libbz2` to partially * uncompress the file on the fly (see `src/bzip2/ftbzip2.c`). Contrary * to gzip, bzip2 currently is not included and need to use the system * available bzip2 implementation. * * Define this macro if you want to enable this 'feature'. * * If you use a build system like cmake or the `configure` script, * options set by those programs have precedence, overwriting the value * here with the configured one. */ #define FT_CONFIG_OPTION_USE_BZIP2 /************************************************************************** * * Define to disable the use of file stream functions and types, `FILE`, * `fopen`, etc. Enables the use of smaller system libraries on embedded * systems that have multiple system libraries, some with or without file * stream support, in the cases where file stream support is not necessary * such as memory loading of font files. */ /* #define FT_CONFIG_OPTION_DISABLE_STREAM_SUPPORT */ /************************************************************************** * * PNG bitmap support. * * FreeType now handles loading color bitmap glyphs in the PNG format. * This requires help from the external libpng library. Uncompressed * color bitmaps do not need any external libraries and will be supported * regardless of this configuration. * * Define this macro if you want to enable this 'feature'. * * If you use a build system like cmake or the `configure` script, * options set by those programs have precedence, overwriting the value * here with the configured one. */ #define FT_CONFIG_OPTION_USE_PNG /************************************************************************** * * HarfBuzz support. * * FreeType uses the HarfBuzz library to improve auto-hinting of OpenType * fonts. If available, many glyphs not directly addressable by a font's * character map will be hinted also. * * Define this macro if you want to enable this 'feature'. * * If you use a build system like cmake or the `configure` script, * options set by those programs have precedence, overwriting the value * here with the configured one. */ #define FT_CONFIG_OPTION_USE_HARFBUZZ /************************************************************************** * * Brotli support. * * FreeType uses the Brotli library to provide support for decompressing * WOFF2 streams. * * Define this macro if you want to enable this 'feature'. * * If you use a build system like cmake or the `configure` script, * options set by those programs have precedence, overwriting the value * here with the configured one. */ #define FT_CONFIG_OPTION_USE_BROTLI /************************************************************************** * * Glyph Postscript Names handling * * By default, FreeType 2 is compiled with the 'psnames' module. This * module is in charge of converting a glyph name string into a Unicode * value, or return a Macintosh standard glyph name for the use with the * TrueType 'post' table. * * Undefine this macro if you do not want 'psnames' compiled in your * build of FreeType. This has the following effects: * * - The TrueType driver will provide its own set of glyph names, if you * build it to support postscript names in the TrueType 'post' table, * but will not synthesize a missing Unicode charmap. * * - The Type~1 driver will not be able to synthesize a Unicode charmap * out of the glyphs found in the fonts. * * You would normally undefine this configuration macro when building a * version of FreeType that doesn't contain a Type~1 or CFF driver. */ #define FT_CONFIG_OPTION_POSTSCRIPT_NAMES /************************************************************************** * * Postscript Names to Unicode Values support * * By default, FreeType~2 is built with the 'psnames' module compiled in. * Among other things, the module is used to convert a glyph name into a * Unicode value. This is especially useful in order to synthesize on * the fly a Unicode charmap from the CFF/Type~1 driver through a big * table named the 'Adobe Glyph List' (AGL). * * Undefine this macro if you do not want the Adobe Glyph List compiled * in your 'psnames' module. The Type~1 driver will not be able to * synthesize a Unicode charmap out of the glyphs found in the fonts. */ #define FT_CONFIG_OPTION_ADOBE_GLYPH_LIST /************************************************************************** * * Support for Mac fonts * * Define this macro if you want support for outline fonts in Mac format * (mac dfont, mac resource, macbinary containing a mac resource) on * non-Mac platforms. * * Note that the 'FOND' resource isn't checked. */ #define FT_CONFIG_OPTION_MAC_FONTS /************************************************************************** * * Guessing methods to access embedded resource forks * * Enable extra Mac fonts support on non-Mac platforms (e.g., GNU/Linux). * * Resource forks which include fonts data are stored sometimes in * locations which users or developers don't expected. In some cases, * resource forks start with some offset from the head of a file. In * other cases, the actual resource fork is stored in file different from * what the user specifies. If this option is activated, FreeType tries * to guess whether such offsets or different file names must be used. * * Note that normal, direct access of resource forks is controlled via * the `FT_CONFIG_OPTION_MAC_FONTS` option. */ #ifdef FT_CONFIG_OPTION_MAC_FONTS #define FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK #endif /************************************************************************** * * Allow the use of `FT_Incremental_Interface` to load typefaces that * contain no glyph data, but supply it via a callback function. This is * required by clients supporting document formats which supply font data * incrementally as the document is parsed, such as the Ghostscript * interpreter for the PostScript language. */ #define FT_CONFIG_OPTION_INCREMENTAL /************************************************************************** * * The size in bytes of the render pool used by the scan-line converter to * do all of its work. */ #define FT_RENDER_POOL_SIZE 16384L /************************************************************************** * * FT_MAX_MODULES * * The maximum number of modules that can be registered in a single * FreeType library object. 32~is the default. */ #define FT_MAX_MODULES 32 /************************************************************************** * * Debug level * * FreeType can be compiled in debug or trace mode. In debug mode, * errors are reported through the 'ftdebug' component. In trace mode, * additional messages are sent to the standard output during execution. * * Define `FT_DEBUG_LEVEL_ERROR` to build the library in debug mode. * Define `FT_DEBUG_LEVEL_TRACE` to build it in trace mode. * * Don't define any of these macros to compile in 'release' mode! * * Do not `#undef` these macros here since the build system might define * them for certain configurations only. */ #define FT_DEBUG_LEVEL_ERROR #define FT_DEBUG_LEVEL_TRACE /************************************************************************** * * Logging * * Compiling FreeType in debug or trace mode makes FreeType write error * and trace log messages to `stderr`. Enabling this macro * automatically forces the `FT_DEBUG_LEVEL_ERROR` and * `FT_DEBUG_LEVEL_TRACE` macros and allows FreeType to write error and * trace log messages to a file instead of `stderr`. For writing logs * to a file, FreeType uses an the external `dlg` library (the source * code is in `src/dlg`). */ #define FT_DEBUG_LOGGING /************************************************************************** * * Autofitter debugging * * If `FT_DEBUG_AUTOFIT` is defined, FreeType provides some means to * control the autofitter behaviour for debugging purposes with global * boolean variables (consequently, you should **never** enable this * while compiling in 'release' mode): * * ``` * _af_debug_disable_horz_hints * _af_debug_disable_vert_hints * _af_debug_disable_blue_hints * ``` * * Additionally, the following functions provide dumps of various * internal autofit structures to stdout (using `printf`): * * ``` * af_glyph_hints_dump_points * af_glyph_hints_dump_segments * af_glyph_hints_dump_edges * af_glyph_hints_get_num_segments * af_glyph_hints_get_segment_offset * ``` * * As an argument, they use another global variable: * * ``` * _af_debug_hints * ``` * * Please have a look at the `ftgrid` demo program to see how those * variables and macros should be used. * * Do not `#undef` these macros here since the build system might define * them for certain configurations only. */ #define FT_DEBUG_AUTOFIT /************************************************************************** * * Memory Debugging * * FreeType now comes with an integrated memory debugger that is capable * of detecting simple errors like memory leaks or double deletes. To * compile it within your build of the library, you should define * `FT_DEBUG_MEMORY` here. * * Note that the memory debugger is only activated at runtime when when * the _environment_ variable `FT2_DEBUG_MEMORY` is defined also! * * Do not `#undef` this macro here since the build system might define it * for certain configurations only. */ #define FT_DEBUG_MEMORY /************************************************************************** * * Module errors * * If this macro is set (which is _not_ the default), the higher byte of * an error code gives the module in which the error has occurred, while * the lower byte is the real error code. * * Setting this macro makes sense for debugging purposes only, since it * would break source compatibility of certain programs that use * FreeType~2. * * More details can be found in the files `ftmoderr.h` and `fterrors.h`. */ #undef FT_CONFIG_OPTION_USE_MODULE_ERRORS /************************************************************************** * * OpenType SVG Glyph Support * * Setting this macro enables support for OpenType SVG glyphs. By * default, FreeType can only fetch SVG documents. However, it can also * render them if external rendering hook functions are plugged in at * runtime. * * More details on the hooks can be found in file `otsvg.h`. */ #define FT_CONFIG_OPTION_SVG /************************************************************************** * * Error Strings * * If this macro is set, `FT_Error_String` will return meaningful * descriptions. This is not enabled by default to reduce the overall * size of FreeType. * * More details can be found in the file `fterrors.h`. */ /* #define FT_CONFIG_OPTION_ERROR_STRINGS */ /*************************************************************************/ /*************************************************************************/ /**** ****/ /**** S F N T D R I V E R C O N F I G U R A T I O N ****/ /**** ****/ /*************************************************************************/ /*************************************************************************/ /************************************************************************** * * Define `TT_CONFIG_OPTION_EMBEDDED_BITMAPS` if you want to support * embedded bitmaps in all formats using the 'sfnt' module (namely * TrueType~& OpenType). */ #define TT_CONFIG_OPTION_EMBEDDED_BITMAPS /************************************************************************** * * Define `TT_CONFIG_OPTION_COLOR_LAYERS` if you want to support colored * outlines (from the 'COLR'/'CPAL' tables) in all formats using the 'sfnt' * module (namely TrueType~& OpenType). */ #define TT_CONFIG_OPTION_COLOR_LAYERS /************************************************************************** * * Define `TT_CONFIG_OPTION_POSTSCRIPT_NAMES` if you want to be able to * load and enumerate the glyph Postscript names in a TrueType or OpenType * file. * * Note that when you do not compile the 'psnames' module by undefining the * above `FT_CONFIG_OPTION_POSTSCRIPT_NAMES`, the 'sfnt' module will * contain additional code used to read the PS Names table from a font. * * (By default, the module uses 'psnames' to extract glyph names.) */ #define TT_CONFIG_OPTION_POSTSCRIPT_NAMES /************************************************************************** * * Define `TT_CONFIG_OPTION_SFNT_NAMES` if your applications need to access * the internal name table in a SFNT-based format like TrueType or * OpenType. The name table contains various strings used to describe the * font, like family name, copyright, version, etc. It does not contain * any glyph name though. * * Accessing SFNT names is done through the functions declared in * `ftsnames.h`. */ #define TT_CONFIG_OPTION_SFNT_NAMES /************************************************************************** * * TrueType CMap support * * Here you can fine-tune which TrueType CMap table format shall be * supported. */ #define TT_CONFIG_CMAP_FORMAT_0 #define TT_CONFIG_CMAP_FORMAT_2 #define TT_CONFIG_CMAP_FORMAT_4 #define TT_CONFIG_CMAP_FORMAT_6 #define TT_CONFIG_CMAP_FORMAT_8 #define TT_CONFIG_CMAP_FORMAT_10 #define TT_CONFIG_CMAP_FORMAT_12 #define TT_CONFIG_CMAP_FORMAT_13 #define TT_CONFIG_CMAP_FORMAT_14 /*************************************************************************/ /*************************************************************************/ /**** ****/ /**** T R U E T Y P E D R I V E R C O N F I G U R A T I O N ****/ /**** ****/ /*************************************************************************/ /*************************************************************************/ /************************************************************************** * * Define `TT_CONFIG_OPTION_BYTECODE_INTERPRETER` if you want to compile a * bytecode interpreter in the TrueType driver. * * By undefining this, you will only compile the code necessary to load * TrueType glyphs without hinting. * * Do not `#undef` this macro here, since the build system might define it * for certain configurations only. */ #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER /************************************************************************** * * Define `TT_CONFIG_OPTION_SUBPIXEL_HINTING` if you want to compile * subpixel hinting support into the TrueType driver. This modifies the * TrueType hinting mechanism when anything but `FT_RENDER_MODE_MONO` is * requested. * * In particular, it modifies the bytecode interpreter to interpret (or * not) instructions in a certain way so that all TrueType fonts look like * they do in a Windows ClearType (DirectWrite) environment. See [1] for a * technical overview on what this means. See `ttinterp.h` for more * details on the LEAN option. * * There are three possible values. * * Value 1: * This value is associated with the 'Infinality' moniker, contributed by * an individual nicknamed Infinality with the goal of making TrueType * fonts render better than on Windows. A high amount of configurability * and flexibility, down to rules for single glyphs in fonts, but also * very slow. Its experimental and slow nature and the original * developer losing interest meant that this option was never enabled in * default builds. * * The corresponding interpreter version is v38. * * Value 2: * The new default mode for the TrueType driver. The Infinality code * base was stripped to the bare minimum and all configurability removed * in the name of speed and simplicity. The configurability was mainly * aimed at legacy fonts like 'Arial', 'Times New Roman', or 'Courier'. * Legacy fonts are fonts that modify vertical stems to achieve clean * black-and-white bitmaps. The new mode focuses on applying a minimal * set of rules to all fonts indiscriminately so that modern and web * fonts render well while legacy fonts render okay. * * The corresponding interpreter version is v40. * * Value 3: * Compile both, making both v38 and v40 available (the latter is the * default). * * By undefining these, you get rendering behavior like on Windows without * ClearType, i.e., Windows XP without ClearType enabled and Win9x * (interpreter version v35). Or not, depending on how much hinting blood * and testing tears the font designer put into a given font. If you * define one or both subpixel hinting options, you can switch between * between v35 and the ones you define (using `FT_Property_Set`). * * This option requires `TT_CONFIG_OPTION_BYTECODE_INTERPRETER` to be * defined. * * [1] * https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx */ /* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING 1 */ /* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING 2 */ #define TT_CONFIG_OPTION_SUBPIXEL_HINTING ( 1 | 2 ) /************************************************************************** * * Define `TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED` to compile the * TrueType glyph loader to use Apple's definition of how to handle * component offsets in composite glyphs. * * Apple and MS disagree on the default behavior of component offsets in * composites. Apple says that they should be scaled by the scaling * factors in the transformation matrix (roughly, it's more complex) while * MS says they should not. OpenType defines two bits in the composite * flags array which can be used to disambiguate, but old fonts will not * have them. * * https://www.microsoft.com/typography/otspec/glyf.htm * https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6glyf.html */ #undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED /************************************************************************** * * Define `TT_CONFIG_OPTION_GX_VAR_SUPPORT` if you want to include support * for Apple's distortable font technology ('fvar', 'gvar', 'cvar', and * 'avar' tables). Tagged 'Font Variations', this is now part of OpenType * also. This has many similarities to Type~1 Multiple Masters support. */ #define TT_CONFIG_OPTION_GX_VAR_SUPPORT /************************************************************************** * * Define `TT_CONFIG_OPTION_BDF` if you want to include support for an * embedded 'BDF~' table within SFNT-based bitmap formats. */ #define TT_CONFIG_OPTION_BDF /************************************************************************** * * Option `TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES` controls the maximum * number of bytecode instructions executed for a single run of the * bytecode interpreter, needed to prevent infinite loops. You don't want * to change this except for very special situations (e.g., making a * library fuzzer spend less time to handle broken fonts). * * It is not expected that this value is ever modified by a configuring * script; instead, it gets surrounded with `#ifndef ... #endif` so that * the value can be set as a preprocessor option on the compiler's command * line. */ #ifndef TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES #define TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES 1000000L #endif /*************************************************************************/ /*************************************************************************/ /**** ****/ /**** T Y P E 1 D R I V E R C O N F I G U R A T I O N ****/ /**** ****/ /*************************************************************************/ /*************************************************************************/ /************************************************************************** * * `T1_MAX_DICT_DEPTH` is the maximum depth of nest dictionaries and arrays * in the Type~1 stream (see `t1load.c`). A minimum of~4 is required. */ #define T1_MAX_DICT_DEPTH 5 /************************************************************************** * * `T1_MAX_SUBRS_CALLS` details the maximum number of nested sub-routine * calls during glyph loading. */ #define T1_MAX_SUBRS_CALLS 16 /************************************************************************** * * `T1_MAX_CHARSTRING_OPERANDS` is the charstring stack's capacity. A * minimum of~16 is required. * * The Chinese font 'MingTiEG-Medium' (covering the CNS 11643 character * set) needs 256. */ #define T1_MAX_CHARSTRINGS_OPERANDS 256 /************************************************************************** * * Define this configuration macro if you want to prevent the compilation * of the 't1afm' module, which is in charge of reading Type~1 AFM files * into an existing face. Note that if set, the Type~1 driver will be * unable to produce kerning distances. */ #undef T1_CONFIG_OPTION_NO_AFM /************************************************************************** * * Define this configuration macro if you want to prevent the compilation * of the Multiple Masters font support in the Type~1 driver. */ #undef T1_CONFIG_OPTION_NO_MM_SUPPORT /************************************************************************** * * `T1_CONFIG_OPTION_OLD_ENGINE` controls whether the pre-Adobe Type~1 * engine gets compiled into FreeType. If defined, it is possible to * switch between the two engines using the `hinting-engine` property of * the 'type1' driver module. */ #define T1_CONFIG_OPTION_OLD_ENGINE /*************************************************************************/ /*************************************************************************/ /**** ****/ /**** C F F D R I V E R C O N F I G U R A T I O N ****/ /**** ****/ /*************************************************************************/ /*************************************************************************/ /************************************************************************** * * Using `CFF_CONFIG_OPTION_DARKENING_PARAMETER_{X,Y}{1,2,3,4}` it is * possible to set up the default values of the four control points that * define the stem darkening behaviour of the (new) CFF engine. For more * details please read the documentation of the `darkening-parameters` * property (file `ftdriver.h`), which allows the control at run-time. * * Do **not** undefine these macros! */ #define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 500 #define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 400 #define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 1000 #define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 275 #define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 1667 #define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 275 #define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 2333 #define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 0 /************************************************************************** * * `CFF_CONFIG_OPTION_OLD_ENGINE` controls whether the pre-Adobe CFF engine * gets compiled into FreeType. If defined, it is possible to switch * between the two engines using the `hinting-engine` property of the 'cff' * driver module. */ #define CFF_CONFIG_OPTION_OLD_ENGINE /*************************************************************************/ /*************************************************************************/ /**** ****/ /**** P C F D R I V E R C O N F I G U R A T I O N ****/ /**** ****/ /*************************************************************************/ /*************************************************************************/ /************************************************************************** * * There are many PCF fonts just called 'Fixed' which look completely * different, and which have nothing to do with each other. When selecting * 'Fixed' in KDE or Gnome one gets results that appear rather random, the * style changes often if one changes the size and one cannot select some * fonts at all. This option makes the 'pcf' module prepend the foundry * name (plus a space) to the family name. * * We also check whether we have 'wide' characters; all put together, we * get family names like 'Sony Fixed' or 'Misc Fixed Wide'. * * If this option is activated, it can be controlled with the * `no-long-family-names` property of the 'pcf' driver module. */ #define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES /*************************************************************************/ /*************************************************************************/ /**** ****/ /**** A U T O F I T M O D U L E C O N F I G U R A T I O N ****/ /**** ****/ /*************************************************************************/ /*************************************************************************/ /************************************************************************** * * Compile 'autofit' module with CJK (Chinese, Japanese, Korean) script * support. */ #define AF_CONFIG_OPTION_CJK /************************************************************************** * * Compile 'autofit' module with fallback Indic script support, covering * some scripts that the 'latin' submodule of the 'autofit' module doesn't * (yet) handle. Currently, this needs option `AF_CONFIG_OPTION_CJK`. */ #ifdef AF_CONFIG_OPTION_CJK #define AF_CONFIG_OPTION_INDIC #endif /************************************************************************** * * Use TrueType-like size metrics for 'light' auto-hinting. * * It is strongly recommended to avoid this option, which exists only to * help some legacy applications retain its appearance and behaviour with * respect to auto-hinted TrueType fonts. * * The very reason this option exists at all are GNU/Linux distributions * like Fedora that did not un-patch the following change (which was * present in FreeType between versions 2.4.6 and 2.7.1, inclusive). * * ``` * 2011-07-16 Steven Chu <steven.f.chu@gmail.com> * * [truetype] Fix metrics on size request for scalable fonts. * ``` * * This problematic commit is now reverted (more or less). */ /* #define AF_CONFIG_OPTION_TT_SIZE_METRICS */ /* */ /* * This macro is obsolete. Support has been removed in FreeType version * 2.5. */ /* #define FT_CONFIG_OPTION_OLD_INTERNALS */ /* * The next three macros are defined if native TrueType hinting is * requested by the definitions above. Don't change this. */ #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER #define TT_USE_BYTECODE_INTERPRETER #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING #if TT_CONFIG_OPTION_SUBPIXEL_HINTING & 1 #define TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY #endif #if TT_CONFIG_OPTION_SUBPIXEL_HINTING & 2 #define TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL #endif #endif #endif /* * The TT_SUPPORT_COLRV1 macro is defined to indicate to clients that this * version of FreeType has support for 'COLR' v1 API. This definition is * useful to FreeType clients that want to build in support for 'COLR' v1 * depending on a tip-of-tree checkout before it is officially released in * FreeType, and while the feature cannot yet be tested against using * version macros. Don't change this macro. This may be removed once the * feature is in a FreeType release version and version macros can be used * to test for availability. */ #ifdef TT_CONFIG_OPTION_COLOR_LAYERS #define TT_SUPPORT_COLRV1 #endif /* * Check CFF darkening parameters. The checks are the same as in function * `cff_property_set` in file `cffdrivr.c`. */ #if CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 < 0 || \ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 < 0 || \ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 < 0 || \ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 < 0 || \ \ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 < 0 || \ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 < 0 || \ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 < 0 || \ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 < 0 || \ \ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 > \ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 || \ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 > \ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 || \ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 > \ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 || \ \ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 > 500 || \ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 > 500 || \ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 > 500 || \ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 > 500 #error "Invalid CFF darkening parameters!" #endif FT_END_HEADER #endif /* FTOPTION_H_ */ /* END */
whupdup/frame
real/third_party/freetype-2.12.0/devel/ftoption.h
C++
gpl-3.0
40,230
CHANGES BETWEEN 2.11.1 and 2.12.0 I. IMPORTANT CHANGES - FreeType now handles OT-SVG fonts, to be controlled with `FT_CONFIG_OPTION_SVG` configuration macro. By default, it can only load the 'SVG ' table of an OpenType font. However, by using the `svg-hooks` property of the new 'ot-svg' module it is possible to register an external SVG rendering engine. The FreeType demo programs have been set up to use 'librsvg' as the rendering library. This work was Moazin Khatti's GSoC 2019 project. II. MISCELLANEOUS - The handling of fonts with an 'sbix' table has been improved. - Corrected bitmap offsets. - A new tag `FT_PARAM_TAG_IGNORE_SBIX` for `FT_Open_Face` makes FreeType ignore an 'sbix' table in a font, allowing applications to access the font's outline glyphs. - `FT_FACE_FLAG_SBIX` and `FT_FACE_FLAG_SBIX_OVERLAY` together with their corresponding preprocessor macros `FT_HAS_SBIX` and `FT_HAS_SBIX_OVERLAY` enable applications to treat 'sbix' tables as described in the OpenType specification. - The internal 'zlib' code has been updated to be in sync with the current 'zlib' version (1.2.11). - The previously internal load flag `FT_LOAD_SBITS_ONLY` is now public. - Some minor improvements of the building systems, in particular handling of the 'zlib' library (internal vs. external). - Support for non-desktop Universal Windows Platform. - Various other minor bug and documentation fixes. - The `ftdump` demo program shows more information for Type1 fonts if option `-n` is given. - `ftgrid` can now display embedded bitmap strikes. ====================================================================== CHANGES BETWEEN 2.11.0 and 2.11.1 I. IMPORTANT CHANGES - Some fields in the `CID_FaceDictRec`, `CID_FaceInfoRec`, and `FT_Data` structures have been changed from signed to unsigned type, which better reflects the actual usage. It is also an additional means to protect against malformed input. II. MISCELLANEOUS - Cmake support has been further improved. To do that various backward-incompatible changes were necessary; please see file `CMakeLists.txt` for more details. - Since version 2.11.0, a C99 compiler is necessary to compile FreeType. - The experimental 'COLR' v1 API has been updated to the latest OpenType standard 1.9. - The `apinames` tool got a new option `-wV` to output an OpenVMS Linker Option File. - VMS support was updated. - MS Visual Studio support was added to build the demo programs. ====================================================================== CHANGES BETWEEN 2.10.4 and 2.11.0 I. IMPORTANT CHANGES - A new rendering module has been added to create 8-bit Signed Distance Field (SDF) bitmaps for both outline and bitmap glyphs. The new rendering mode is called `FT_RENDER_MODE_SDF`, the pixel mode is `FT_PIXEL_MODE_GRAY8`, and the corresponding raster flag is `FT_RASTER_FLAG_SDF`. This work was Anuj Verma's GSoC 2020 project. - A new, experimental API is now available for surfacing properties of 'COLR' v1 color fonts (as the name says, this is an extension to the 'COLR' table for outline color fonts using the SFNT container format). 'COLR' v1 fonts are a recently proposed addition to OFF and OpenType; specification work currently happens in https://github.com/googlefonts/colr-gradients-spec/ 'COLR' v1 is expected to be merged to OpenType; the ISO standardisation process for adding 'COLR' v1 as an amendment to OFF is underway. Functions similar to the already existing 'COLR' API have been added to access the corresponding data. FT_Get_Color_Glyph_Paint Retrieve the root paint for a given glyph ID. FT_Get_Paint_Layers Access the layers of a `PaintColrLayers` table. FT_Get_Colorline_Stops Retrieve the 'color stops' on a color line. As an input, a color stop iterator gets used, which in turn is retrieved from a paint. FT_Get_Paint Dereference an `FT_OpaquePaint` object and retrieve the corresponding `FT_COLR_Paint` object, which contains details on how to draw the respective 'COLR' v1 `Paint` table. II. MISCELLANEOUS - FreeType has moved its infrastructure to https://gitlab.freedesktop.org/freetype A side effect is that the git repositories are now called `freetype.git` and `freetype-demos.git`, which by default expand to the directories `freetype` and `freetype-demos`, respectively. The documentation has been updated accordingly. FreeType's Savannah repositories will stay; they are now mirrors of the 'freedesktop.org' repositories. - A new function `FT_Get_Transform` returns the values set by `FT_Set_Transform`. - A new configuration macro `FT_DEBUG_LOGGING` is available. It provides extended debugging capabilities for FreeType, for example showing a time stamp or displaying the component a tracing message comes from. See file `docs/DEBUG` for more information. This work was Priyesh Kumar's GSoC 2020 project. - The legacy Type 1 and CFF engines are further demoted due to lack of CFF2 charstring support. You now need to use `FT_Property_Set` to enable them besides the `T1_CONFIG_OPTION_OLD_ENGINE` and `CFF_CONFIG_OPTION_OLD_ENGINE` options, respectively. - The experimental 'warp' mode (AF_CONFIG_OPTION_USE_WARPER) for the auto-hinter has been removed. - The smooth rasterizer performance has been improved by >10%. Note that due to necessary code changes there might be very subtle differences in rendering. They are not visible by the eye, however. - PCF bitmap fonts compressed with LZW (these are usually files with the extension `.pcf.Z`) are now handled correctly. - Improved Meson build files, including support to build the FreeType demo programs. - A new demo program `ftsdf` is available to display Signed Distance Fields of glyphs. - The `ftlint` demo program has been extended to do more testing of its input. In particular, it can display horizontal and vertical acutances for quality assessment, together with computing MD5 checksums of rendered glyphs. [The acutance measures how sharply the pixel coverage changes at glyph edges. For monochrome bitmaps, it is always 2.0 in either X or Y direction. For anti-aliased bitmaps, it depends on the hinting and the shape of a glyph and might approach or even reach value 2.0 for glyphs like 'I', 'L', '+', '-', or '=', while it might be lower for glyphs like 'O', 'S', or 'W'.] - The `ttdebug` demo program didn't show changed point coordinates (bug introduced in version 2.10.3). - It is now possible to adjust the axis increment for variable fonts in the `ftmulti` demo program. - It is now possible to change the hinting engine in the `ftstring` demo program. - The graphical demo programs work better now in native color depth on win32 and x11. ====================================================================== CHANGES BETWEEN 2.10.3 and 2.10.4 (2020-Oct-20) I. IMPORTANT BUG FIXES - A heap buffer overflow has been found in the handling of embedded PNG bitmaps, introduced in FreeType version 2.6. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-15999 If you use option FT_CONFIG_OPTION_USE_PNG you should upgrade immediately. ====================================================================== CHANGES BETWEEN 2.10.2 and 2.10.3 (2020-Oct-10) I. IMPORTANT CHANGES - New flag `FT_OUTLINE_OVERLAP'. If set, make the smooth rasterizer do 4x4 oversampling to mitigate artifacts in pixels partially covered by overlapping contours. Note that this at least quadruples the rendering time. If a glyph in a TrueType font has the `OVERLAP_SIMPLE' or `OVERLAP_COMPOUND' bit set, FreeType automatically selects this rendering mode. II. MISCELLANEOUS - Using the arcane method of including FreeType header files with macros like `FT_FREETYPE_H' is no longer mandatory (but retained as an optional feature for backward compatibility). - Support for building the library with Meson. Building the demo programs with Meson will follow in a forthcoming release. - Minor improvements to the B/W rasterizer. - Auto-hinter support for Medefaidrin script. - Fix various memory leaks (mainly for CFF) and other issues that might cause crashes in rare circumstances. - Jam support has been removed. - In `ftview', custom LCD filter values are now normalized and balanced. Unorthodox filters are still available through the `-L' command line option. - The GUI demo programs can now be resized. - Demo programs that accept command line option `-k' can now handle function keys, too. The corresponding character codes start with 0xF1. As an example, the POSIX shell syntax (accepted by bash, ksh, and zsh) -k $'\xF3q' emulates the pressing of function key `F3' followed by key `q'. ====================================================================== CHANGES BETWEEN 2.10.1 and 2.10.2 (2020-May-09) I. IMPORTANT CHANGES - Support of WOFF2 fonts. This code contribution was Nikhil Ramakrishnan's GSoC 2019 project. II. MISCELLANEOUS - Function `FT_Get_Var_Axis_Flags' returned random data for Type 1 MM fonts. - Type 1 fonts with non-integer metrics are now supported by the new (CFF) engine introduced in FreeType 2.9. - Drop support for Python 2 in Freetype's API reference generator `docwriter' (Python >= 3.5 is required for targets `make refdoc' and `make refdoc-venv'). - Auto-hinter support for Hanifi Rohingya. - Document the `FT2_KEEP_ALIVE' debugging environment variable. - The Visual C++ (and Visual C) project files for Windows builds no longer generate libraries that contain the FreeType version in its filenames. Instead, a resource file gets used to make the libraries contain the corresponding information. - The next release will remove Jam build support. - The `ftbench' demo program has a new test for testing the `FT_Glyph_Stroke' functionality. ====================================================================== CHANGES BETWEEN 2.10.0 and 2.10.1 (2019-Jul-01) I. IMPORTANT BUG FIXES - The bytecode hinting of OpenType variation fonts was flawed, since the data in the `CVAR' table wasn't correctly applied. II. MISCELLANEOUS - Auto-hinter support for Mongolian. - For distribution, `.tar.bz2' packages are replaced with `.tar.xz' bundles. - The handling of the default character in PCF fonts as introduced in version 2.10.0 was partially broken, causing premature abortion of charmap iteration for many fonts. - If `FT_Set_Named_Instance' was called with the same arguments twice in a row, the function returned an incorrect error code the second time. - Direct rendering using FT_RASTER_FLAG_DIRECT crashed (bug introduced in version 2.10.0). - Increased precision while computing OpenType font variation instances. - The flattening algorithm of cubic Bezier curves was slightly changed to make it faster. This can cause very subtle rendering changes, which aren't noticeable by the eye, however. - The auto-hinter now disables hinting if there are blue zones defined for a `style' (i.e., a certain combination of a script and its related typographic features) but the font doesn't contain any characters needed to set up at least one blue zone. - The `ftmulti' demo program now supports multiple hidden axes with the same name tag. - `ftview', `ftstring', and `ftgrid' got a `-k' command line option to emulate a sequence of keystrokes at start-up. - `ftview', `ftstring', and `ftgrid' now support screen dumping to a PNG file. - The bytecode debugger, `ttdebug', now supports variation TrueType fonts; a variation font instance can be selected with the new `-d' command line option. ====================================================================== CHANGES BETWEEN 2.9.1 and 2.10.0 (2019-Mar-15) I. IMPORTANT CHANGES - A bunch of new functions has been added to access and process COLR/CPAL data of OpenType fonts with color-layered glyphs. FT_Palette_Data_Get Retrieve color palette data. FT_Palette_Select Select and activate a color palette for color-layered glyphs. FT_Palette_Set_Foreground_Color Set text foreground color for palette index 0xFFFF. FT_Get_Color_Glyph_Layer Get color layers for a given glyph (using an interator object). FT_Bitmap_Blend Blend one bitmap onto another with a given color. - An experimental feature is the new behaviour of the `FT_LOAD_COLOR' load flag for color-layered glyphs: Internally it sets a flag so that if `FT_Render_Glyph' is called with `FT_RENDER_MODE_NORMAL' (or `FT_Load_Glyph' with `FT_LOAD_RENDER'), a default blending of the color glyph layers will happen automatically for convenience. - As a GSoC 2018 project, Nikhil Ramakrishnan completely overhauled and modernized the API reference. II. MISCELLANEOUS - The logic for computing the global ascender, descender, and height of OpenType fonts has been slightly adjusted for consistency. . If the `useTypoMetrics' flag (i.e., bit 7 in the `fsSelection' field) in the `OS/2' table is set, use the `sTypo' fields in `OS/2' unconditionally. . Otherwise use the metrics data from the `hhea' table (if not zero). . Otherwise use the `sTypo' fields from the `OS/2' table (if not zero). . Otherwise use the `usWin' data from the `OS/2' table as a last resort. Variable fonts will apply the `MVAR' deltas to whichever metrics were picked. - `TT_Set_MM_Blend' could fail if call repeatedly with the same arguments. - The precision of handling deltas in Variation Fonts has been increased. The problem did only show up with multidimensional designspaces. - New function `FT_Library_SetLcdGeometry' to set up the geometry of LCD subpixels. - FreeType now uses the `defaultChar' property of PCF fonts to set the glyph for the undefined character at glyph index 0 (as FreeType already does for all other supported font formats). As a consequence, the order of glyphs of a PCF font if accessed with FreeType can be different now compared to previous versions. This change doesn't affect PCF font access with cmaps. - `FT_Select_Charmap' has been changed to allow parameter value `FT_ENCODING_NONE', which is valid for BDF, PCF, and Windows FNT formats to access built-in cmaps that don't have a predefined `FT_Encoding' value. - A previously reserved field in the `FT_GlyphSlotRec' structure now holds the glyph index. - On Win32 platforms, the use of `_DLL' to build the library has been replaced with `DLL_EXPORT' and `DLL_IMPORT'. - The usual round of fuzzer bug fixes to better reject malformed fonts. - `FT_Outline_New_Internal' and `FT_Outline_Done_Internal' have been removed. These two functions were public by oversight only and were never documented. - A new function `FT_Error_String' returns descriptions of error codes if configuration macro FT_CONFIG_OPTION_ERROR_STRINGS is defined. - `FT_Set_MM_WeightVector' and `FT_Get_MM_WeightVector' are new functions limited to Adobe MultiMaster fonts to directly set and get the weight vector. - Support for Position Independent Code as needed by systems that prohibit automatic address fixups, such as BREW, has been removed. [Compilation with modern compilers that use flags like `-fPIC' or `-fPIE' is not affected.] - The `ftdump' demo program has new options `-c' and `-C' to display charmaps in compact and detailed format, respectively. Option `-V' has been removed. - The `ftview', `ftstring', and `ftgrid' demo programs use a new command line option `-d' to specify the program window's width, height, and color depth. - The `ftview' demo program now displays red boxes for zero-width glyphs. - `ftglyph' has limited support to display fonts with color-layered glyphs. This will be improved later on. - `ftgrid' can now display bitmap fonts also. - The `ttdebug' demo program has a new option `-f' to select a member of a TrueType collection (TTC). - Other various improvements to the demo programs. ====================================================================== CHANGES BETWEEN 2.9 and 2.9.1 (2019-May-01) I. IMPORTANT BUG FIXES - Type 1 fonts containing flex features were not rendered correctly (bug introduced in version 2.9). - CVE-2018-6942: Older FreeType versions can crash with certain malformed variation fonts. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-6942 II. MISCELLANEOUS - Bug fix: Multiple calls to `FT_Get_MM_Var' returned garbage. - The base extensions `ftlcdfil' and `ftfntfmt' are now part of the base module (and thus no longer configurable in file `modules.cfg'). - Emboldening of bitmaps didn't work correctly sometimes, showing various artifacts (bug introduced in version 2.8.1). - Use of the `freetype-config' script to get compilation and linking options is deprecated since it doesn't support cross-compiling, among other deficiencies. Instead, you should use the `pkg-config' interface. The `configure' script no longer installs `freetype-config' by default. For backward compatibility, a new configure option `--enable-freetype-config' is provided that reverts this decision. - The auto-hinter script ranges have been updated for Unicode 11. No support for new scripts have been added, however, with the exception of Georgian Mtavruli. - Support for cmake has been improved. - The next release will remove support for Position Independent Code as needed by systems that prohibit automatic address fixups, such as BREW. [Compilation with modern compilers that use flags like `-fPIC' or `-fPIE' is not affected.] ====================================================================== CHANGES BETWEEN 2.8.1 and 2.9 (2018-Jan-08) I. IMPORTANT BUG FIXES - Advance width values of variation fonts were often wrong. - More fixes for variation font support; you should update to this version if you want to support them. II. IMPORTANT CHANGES - As a GSoC project, Ewald Hew extended the new (Adobe) CFF engine to handle Type 1 fonts also, thus greatly improving the rendering of this format. This is the new default. The old engine is still available if the configuration macro `T1_CONFIG_OPTION_OLD_ENGINE' gets defined; using the `hinting-engine' property of the `type1' driver module you can then switch between the two engines. - A new function, `FT_Set_Named_Instance', can be used to set or change the current named instance. - Starting with this FreeType version, resetting variation coordinates will return to the currently selected named instance. Previously, FreeType returned to the base font (i.e., no instance set). III. MISCELLANEOUS - The `face_flags' field of the `FT_Face' structure has a new bit, `FT_FACE_FLAG_VARIATION', which is set if a variation font has been altered with `FT_Set_MM_Design_Coordinates', `FT_Set_Var_Design_Coordinates', or `FT_Set_Var_Blend_Coordinates'. - If the current face is a named instance, the new macro `FT_IS_NAMED_INSTANCE' returns true. - `FT_IS_VARIATION' is a new macro that returns true whenever a face object has been altered by `FT_Set_MM_Design_Coordinates', `FT_Set_Var_Design_Coordinates', or `FT_Set_Var_Blend_Coordinates'. - Changing the design coordinates of a variation font with `FT_Set_Var_Design_Coordinates' or `FT_Set_Var_Blend_Coordinates' does not influence the named instance index value (only `FT_Set_Named_Instance' does that). - Special PostScript names for named instances are only returned if the named instance is set with `FT_Set_Named_Instance' (and the font has corresponding entries in its `fvar' table). If `FT_IS_VARIATION' returns true, the algorithmically derived PostScript name is provided, not looking up special entries for named instances. - A new function `FT_Done_MM_Var' is provided to free the memory returned in a call to `FT_Get_MM_Var'. - On platforms using the `configure' script, the installed `ftoption.h' file now correctly reflects configuration options like `--with-harfbuzz'. - Better support to build FreeType as a DLL on Windows using Visual C. - All data specific to driver modules is now collected in a single file, `FT_DRIVER_H'. Consequently, the macros `FT_AUTOHINTER_H', `FT_CFF_DRIVER_H', `FT_TRUETYPE_DRIVER_H', and `FT_PCF_DRIVER_H' still work but are deprecated. - Some fuzzer fixes to better reject malformed fonts. - The `ftbench' demo program has a new test for opening a new face and loading some glyphs. - The `ftbench' demo program has a new option `-j' to specify the last glyph index to be used in the tests. - The `ftgrid' demo program has a new option `-n' to suppress display of named instances of variation fonts. - The `ttdebug' demo program can now show a stack trace (key `K') and switch between hexadecimal and decimal display of integers (key `I'). ====================================================================== CHANGES BETWEEN 2.8 and 2.8.1 (2017-Sep-16) I. IMPORTANT BUG FIXES - B/W hinting of TrueType fonts didn't work properly if interpreter version 38 or 40 was selected. - Some severe problems within the handling of TrueType Variation Fonts were found and fixed. - Function `FT_Set_Var_Design_Coordinates' didn't correctly handle the case with less input coordinates than axes. II. IMPORTANT CHANGES - By default, FreeType now offers high quality LCD-optimized output without resorting to ClearType techniques of resolution tripling and filtering. In this method, called Harmony, each color channel is generated separately after shifting the glyph outline, capitalizing on the fact that the color grids on LCD panels are shifted by a third of a pixel. This output is indistinguishable from ClearType with a light 3-tap filter. III. MISCELLANEOUS - Using the new function `FT_Get_Var_Axis_Flags', an application can access the `flags' field of a variation axis (introduced in OpenType version 1.8.2) - More sanity checks. - The internal representation of buffers for LCD rendering has changed (to be more precise, the amount of padding gets computed differently). Applications that use the FreeType API are not affected. - To reset all design axis values of a variation font to its default values you can now say error = FT_Set_Var_Design_Coordinates( face, 0, NULL ); This also works with functions `FT_Set_MM_Design_Coordinates' and `FT_Set_MM_Blend_Coordinates'. - FreeType now synthesizes a missing Unicode cmap for (older) TrueType fonts also if glyph names are available. - FreeType has improved handling of BDF fonts without the `POINT_SIZE', `RESOLUTION_X', or `RESOLUTION_Y' properties; the library now uses the values of the `SIZE' keyword if they are missing. Previously, `SIZE' was completely ignored, and FreeType used heuristic values instead. - Multiple calls to `FT_Bitmap_Convert' do work now as advertised. Previously, they failed with an assertion error if there was an empty bitmap between non-empty ones. - The warping option has moved from `light' to `normal' hinting where it replaces the original hinting algorithm. The `light' mode is now always void of any hinting in x-direction. - 16bit compiler support is now officially ended. We didn't provide any maintenance since many years, and given that there were no error or problem reports either it seems that it is no longer needed. - The `ftgrid' demo program can now toggle the display of grid lines with the `G' key. - The `ftgrid' demo program can toggle a different set of colors (suitable to color-blind people) with the `C' key. - The `ftgrid' demo program now supports the `-e' command line option to select a cmap. - The `ftdump' demo program has a new command line option `-t' to output the SFNT table list. ====================================================================== CHANGES BETWEEN 2.7.1 and 2.8 (2017-May-13) I. IMPORTANT CHANGES - Support for OpenType Variation Fonts is now complete. The last missing part was handling the `VVAR' and `MVAR' tables, which is available with this release. - A new function `FT_Face_Properties' allows the control of some module and library properties per font. Currently, the following properties can be handled: stem darkening, LCD filter weights, and the random seed for the `random' CFF operator. - The PCF change to show more `colorful' family names (introduced in version 2.7.1) was too radical; it can now be configured with PCF_CONFIG_OPTION_LONG_FAMILY_NAMES at compile time. If activated, it can be switched off at run time with the new pcf property `no-long-family-names'. If the `FREETYPE_PROPERTIES' environment variable is available, you can say FREETYPE_PROPERTIES=pcf:no-long-family-names=1 - Support for the following scripts has been added to the auto-hinter. Adlam, Avestan, Bamum, Buhid, Carian, Chakma, Coptic, Cypriot, Deseret, Glagolitic, Gothic, Kayah, Lisu, N'Ko, Ol Chiki, Old Turkic, Osage, Osmanya, Saurashtra, Shavian, Sundanese, Tai Viet, Tifinagh, Unified Canadian Syllabics, Vai II. IMPORTANT BUG FIXES - `Light' auto-hinting mode no longer uses TrueType metrics for TrueType fonts. This bug was introduced in version 2.4.6, causing horizontal scaling also. Almost all GNU/Linux distributions (with Fedora as a notable exception) disabled the corresponding patch for good reasons; chances are thus high that you won't notice a difference. If optical backward compatibility for legacy applications is necessary, you might enable the AF_CONFIG_OPTION_TT_SIZE_METRICS configuration option. However, it is strongly recommended to avoid that, adjusting font sizes instead. - Global size metrics values in the `FT_Size_Metrics' structure can be different for TrueType fonts. Reason is that in older FreeType versions the metrics were rounded differently to integer pixels compared to all other font formats, yielding an inconsistent behaviour if you used non-native hinting. Starting with this version, global size metrics for TrueType fonts are handled the same as other font formats: `ascender' gets rounded up, `descender' gets rounded down, `height' gets normally rounded, and `max_advance' gets normally rounded, too. If you need more precise values of (global) ascender, descender, height, or `max_advance', please take the corresponding values from the `FT_Face' structure and scale them manually. - If a TrueType font gets loaded with FT_LOAD_NO_HINTING, FreeType now scales the font linearly again (bug introduced in version 2.4.6). - CVE-2017-8105, CVE-2017-8287: Older FreeType versions have out-of-bounds writes caused by heap-based buffer overflows related to Type 1 fonts. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-8105 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-8287 III. MISCELLANEOUS - A new function `FT_Set_Default_Properties' has been added to parse the `FREETYPE_PROPERTIES' environment variable (previously, it was internal only). `FT_Init_FreeType' always call this function, but `FT_New_Library' does not (similar to `FT_Add_Default_Modules'). - To be in sync with OpenType version 1.7 and newer, macros FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY, FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY, TT_NAME_ID_PREFERRED_FAMILY TT_NAME_ID_PREFERRED_SUBFAMILY are renamed to FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY, FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY, TT_NAME_ID_TYPOGRAPHIC_FAMILY TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY The old macro names are deprecated (but still available). - Support for SFNT `name' tables has been improved. . Format 1 `name' tables are now supported. Use new function `FT_Get_Sfnt_LangTag' to access associated language tags. . Language, encoding, and name IDs have been updated to OpenType version 1.8.1. - The new CFF engine now handles the `random' operator. All CFF opcodes are now supported. - The CFF module has a new property `random-seed' to control the pseudo-random number generation for the `random' operator. - The `freetype-config' script is now a wrapper of `pkg-config' if this program is available in the path. - FT_LOAD_TARGET_LCD is now a variant of FT_LOAD_TARGET_LIGHT; this should provide better rendering results. - A mode to display light auto-hinting with subpixel positioning has been added to `ftdiff'. ====================================================================== CHANGES BETWEEN 2.7 and 2.7.1 (2016-Dec-30) I. IMPORTANT CHANGES - Support for the new CFF2 font format as introduced with OpenType 1.8 has been contributed by Dave Arnolds from Adobe. - Preliminary support for variation fonts as specified in OpenType 1.8 (in addition to the already existing support for Adobe's MM and Apple's GX formats). Dave Arnolds contributed handling of advance width change variation; more will come in the next version. II. IMPORTANT BUG FIXES - Handling of raw CID fonts was partially broken (bug introduced in 2.6.4). - CVE-2016-10328: Older FreeType versions had an out-of-bounds write caused by a heap-based buffer overflow related to the CFF fonts. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-10328 III. MISCELLANEOUS - Some limits for TrueType bytecode execution have been tightened to speed up FreeType's handling of malformed fonts, in particular to quickly abort endless loops. - The number of twilight points can no longer be set to an arbitrarily large value. - The total number of jump opcode instructions (like JMPR) with negative arguments is dynamically restricted; the same holds for the total number of iterations in LOOPCALL opcodes. The dynamic limits are based on the number of points in a glyph and the number of CVT entries. Please report if you encounter a font where the selected values are not adequate. - PCF family names are made more `colorful'; they now include the foundry and information whether they contain wide characters. For example, you no longer get `Fixed' but rather `Sony Fixed' or `Misc Fixed Wide'. - A new function `FT_Get_Var_Blend_Coordinates' (with its alias name `FT_Get_MM_Blend_Coordinates') to retrieve the normalized blend coordinates of the currently selected variation instance has been added to the Multiple Masters interface. - A new function `FT_Get_Var_Design_Coordinates' to retrieve the design coordinates of the currently selected variation instance has been added to the Multiple Masters interface. - A new load flag `FT_LOAD_BITMAP_METRICS_ONLY' to retrieve bitmap information without loading the (embedded) bitmap itself. - Retrieving advance widths from bitmap strikes (using `FT_Get_Advance' and `FT_Get_Advances') have been sped up. - The usual round of fuzzer fixes to better reject malformed fonts. - The `ftmulti' demo program can now switch engines with key `H'. - The `ftstring' demo program can now show some built-in, non-latin sample strings (to be selected with the TAB key). - The `ftview' demo program can now switch between a font's charmaps using the TAB key. ====================================================================== CHANGES BETWEEN 2.6.5 and 2.7 (2016-Sep-08) I. IMPORTANT CHANGES - As announced earlier, the 2.7.x series now uses the new subpixel hinting mode as the default, emulating a modern version of ClearType. This change inevitably leads to different rendering results, and you might change the `TT_CONFIG_OPTION_SUBPIXEL_HINTING' configuration option to adapt it to your taste (or use the new `FREETYPE_PROPERTIES' environment variable). See the corresponding entry below for version 2.6.4, which gives more information. - A new option `FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES' has been introduced. If set (which is the default), an environment variable `FREETYPE_PROPERTIES' can be used to control driver properties. Example: FREETYPE_PROPERTIES=truetype:interpreter-version=35 \ cff:no-stem-darkening=1 \ autofitter:warping=1 This allows to select, say, the subpixel hinting mode at runtime for a given application. See file `ftoption.h' for more. II. IMPORTANT BUG FIXES - After loading a named instance of a GX variation font, the `face_index' value in the returned `FT_Face' structure now correctly holds the named instance index in the upper 16bits as documented. III. MISCELLANEOUS - A new macro `FT_IS_NAMED_INSTANCE' to test whether a given face is a named instance. - More fixes to GX font handling. - Apple's `GETVARIATION' bytecode operator (needed for GX variation font support) has been implemented. - Another round of fuzzer fixes, mainly to reject invalid fonts faster. - Handling of raw CID fonts was broken (bug introduced in version 2.6.4). - The smooth rasterizer has been streamlined to make it faster by approx. 20%. - The `ftgrid' demo program now understands command line option `-d' to give start-up design coordinates. - The `ftdump' demo program has a new command line option `-p' to dump TrueType bytecode instructions. ====================================================================== CHANGES BETWEEN 2.6.4 and 2.6.5 (2016-Jul-12) I. IMPORTANT BUG FIXES - Compilation works again on Mac OS X (bug introduced in version 2.6.4). II. IMPORTANT CHANGES - The new subpixel hinting mode is now disabled by default; it will be enabled by default in the forthcoming 2.7.x series. Main reason for reverting this feature is the principle of least surprise: a sudden change in appearance of all fonts (even if the rendering improves for almost all recent fonts) should not be expected in a new micro version of a series. ====================================================================== CHANGES BETWEEN 2.6.3 and 2.6.4 (2016-Jul-05) I. IMPORTANT CHANGES - A new subpixel hinting mode has been contributed by Nikolaus Waxweiler, which is now the default rendering mode for TrueType fonts. It implements (almost everything of) version 40 of the bytecode engine. The existing code base in FreeType (the `Infinality code') was stripped to the bare minimum and all configurability removed in the name of speed and simplicity. The configurability was mainly aimed at legacy fonts like Arial, Times New Roman, or Courier. [Legacy fonts are fonts that modify vertical stems to achieve clean black-and-white bitmaps.] The new mode focuses on applying a minimal set of rules to all fonts indiscriminately so that modern and web fonts render well while legacy fonts render okay. Activation of the subpixel hinting support can be controlled with the `TT_CONFIG_OPTION_SUBPIXEL_HINTING' configuration option at compile time: If set to value 1, you get the old Infinality mode (which was never the default due to its slowness). Value 2 activates the new subpixel hinting mode, and value 3 activates both. The default is value 2. At run time, you can select the subpixel hinting mode with the `interpreter-version' property (provided you have compiled in the corresponding hinting mode); see `ftttdrv.h' for more. - Support for the following scripts has been added to the auto-hinter. Armenian, Cherokee, Ethiopic, Georgian, Gujarati, Gurmukhi, Malayalam, Sinhala, Tamil II. MISCELLANEOUS - Type 42 fonts as created by LilyPond are now supported. - Minor rendering improvements in the auto-hinter. - For experimental reasons, the old CFF engine now supports all CFF operators except `random', including the deprecated Multiple Masters instructions. This allows the display of fonts like `ITCGaramondMM-It.otf' (without font variations, though). - Another round of fixes to improve handling of invalid fonts. - The `ftgrid' demo program now displays the rendered pixels also; this can be switched off with the `b' key. Selection of various LCD filtering modes can be done with the `L' key. - The demo programs have been extended to allow selection of all available TrueType bytecode engines. - A very early beta version of a new, Qt based demo program called `ftinspect' is part of the source code bundle; it will eventually supersede the other demo programs. Currently, you have to compile it manually with `qmake; make'; note that many features are still missing. ====================================================================== CHANGES BETWEEN 2.6.2 and 2.6.3 (2016-Feb-08) I. IMPORTANT CHANGES - Khmer, Myanmar, Bengali, and Kannada script support has been added to the auto-hinter. II. MISCELLANEOUS - Better support of Indic scripts like Devanagari by using a top-to-bottom hinting flow. - All FreeType macros starting with two underscores have been renamed to avoid a violation of both the C and C++ standards. Example: Header macros of the form `__FOO_H__' are now called `FOO_H_'. In most cases, this should be completely transparent to the user. The exception to this is `__FTERRORS_H__', which must be sometimes undefined by the user to get FreeType error strings: Both this form and the new `FTERRORS_H_' macro are accepted for backward compatibility. - Minor improvements mainly to the Type 1 driver. - The new CFF engine now supports all Type 2 operators except `random'. - The macro `_STANDALONE_', used for compiling the B/W and smooth rasterizers as stand-alone modules, has been renamed to `STANDALONE_', since macro names starting with an underscore and followed by an uppercase letter are reserved in both C and C++. - Function `FT_Library_SetLcdFilterWeights' now also activates custom LCD filter weights (instead of just adjusting them). - Support for `unpatented hinting' has been completely removed: Consequently, the two functions `FT_Face_CheckTrueTypePatents' and `FT_Face_SetUnpatentedHinting' now return always false, doing nothing. - The `ftgamma' demo program has been modernized; the gamma grid display has been moved from `ftview' to this program. - In `ftview', it is now possible to cycle through the available LCD filtering modes. ====================================================================== CHANGES BETWEEN 2.6.1 and 2.6.2 (2015-Nov-28) I. IMPORTANT CHANGES - The auto-hinter now supports stem darkening, to be controlled by the new `no-stem-darkening' and `darkening-parameters' properties. This is an experimental feature contributed by Nikolaus Waxweiler, and the interface might change in a future release. - By default, stem darkening is now switched off (for both the CFF engine and the auto-hinter). The main reason is that you need linear alpha blending and gamma correction to get correct rendering results, and the latter is not yet available in most freely available rendering stacks like X11. Applying stem darkening without proper gamma correction leads to far too dark rendering results. - The meaning of `FT_RENDER_MODE_LIGHT' has been slightly modified. It now essentially means `no hinting along the horizontal axis'; in particular, no change of glyph advance widths. Consequently, the auto-hinter is used for all scalable font formats except for CFF. It is planned that other font-specific rendering engines (TrueType, Type 1) will follow. II. MISCELLANEOUS - The default LCD filter has been changed to be normalized and color-balanced. - For better compatibility with FontConfig, function `FT_Library_SetLcdFilter' accepts a new enumeration value `FT_LCD_FILTER_LEGACY1' (which has the same meaning as `FT_LCD_FILTER_LEGACY'). - A large number of bugs have been detected by using the libFuzzer framework, which should further improve handling of invalid fonts. Thanks again to Kostya Serebryany and Bungeman! - `TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES', a new configuration option, controls the maximum number of executed opcodes within a bytecode program. You don't want to change this except for very special situations (e.g., making a library fuzzer spend less time to handle broken fonts). - The smooth renderer has been made faster. - The `ftstring' demo program now supports subpixel rendering; use key `l' to cycle through the LCD modes. - The `ftstring' demo program now supports color rendering; use the `space' key to cycle through various color combinations. - The graphical demo programs now use a default gamma value of 1.8 (instead of 1.2). ====================================================================== CHANGES BETWEEN 2.6 and 2.6.1 (2015-Oct-04) I. IMPORTANT BUG FIXES - It turned out that for CFFs only the advance widths should be taken from the `htmx' table, not the side bearings. This bug, introduced in version 2.6.0, makes it necessary to upgrade if you are using CFFs; otherwise, you get cropped glyphs with GUI interfaces like GTK or Qt. - Accessing Type 42 fonts returned incorrect results if the glyph order of the embedded TrueType font differs from the glyph order of the Type 42 charstrings table. II. IMPORTANT CHANGES - The header file layout has been changed (again), moving all header files except `ft2build.h' into a subdirectory tree. Doing so reduces the possibility of header file name clashes (e.g., FTGL's `FTGlyph.h' with FreeType's `ftglyph.h') on case insensitive file systems like Mac OS X or Windows. Applications that use (a) the `freetype-config' script or FreeType's `freetype2.pc' file for pkg-config to get the include directory for the compiler, and (b) the documented way for header inclusion like #include <ft2build.h> #include FT_FREETYPE_H ... don't need any change to the source code. - Simple access to named instances in GX variation fonts is now available (in addition to the previous method via FreeType's MM interface). In the `FT_Face' structure, bits 16-30 of the `face_index' field hold the current named instance index for the given face index, and bits 16-30 of `style_flags' contain the number of instances for the given face index. `FT_Open_Face' and friends also understand the extended bits of the face index parameter. You need to enable TT_CONFIG_OPTION_GX_VAR_SUPPORT for this new feature. Otherwise, bits 16-30 of the two fields are zero (or are ignored). - Lao script support has been added to the auto-hinter. III. MISCELLANEOUS - The auto-hinter's Arabic script support has been enhanced. - Superscript-like and subscript-like glyphs as used by various phonetic alphabets like the IPA are now better supported by the auto-hinter. - The TrueType bytecode interpreter now runs slightly faster. - Improved support for builds with cmake. - The function `FT_CeilFix' now always rounds towards plus infinity. - The function `FT_FloorFix' now always rounds towards minus infinity. - A new load flag `FT_LOAD_COMPUTE_METRICS' has been added; it makes FreeType ignore pre-computed metrics, as needed by font validating or font editing programs. Right now, only the TrueType module supports it to ignore data from the `hdmx' table. - Another round of bug fixes to better handle broken fonts, found by Kostya Serebryany <kcc@google.com>. ====================================================================== CHANGES BETWEEN 2.5.5 and 2.6 (2015-Jun-07) I. IMPORTANT CHANGES - Behdad Esfahbod contributed code for improved thread-safety, which results in the following model. * An `FT_Face' object can only be safely used from one thread at a time. * An `FT_Library' object can now be used without modification from multiple threads at the same time. * `FT_Face' creation and destruction with the same `FT_Library' object can only be done from one thread at a time. One can use a single `FT_Library' object across threads as long as a mutex lock is used around `FT_New_Face' and `FT_Done_Face'. Any calls to `FT_Load_Glyph' and similar API are safe and do not need the lock to be held as long as the same `FT_Face' is not used from multiple threads at the same time. - Thai script support has been added to the auto-hinter. - Arabic script support has been added to the auto-hinter. - Following OpenType version 1.7, advance widths and side bearing values in CFFs (wrapped in an SFNT structure) are now always taken from the `hmtx' table. - Following OpenType version 1.7, the PostScript font name of a CFF font (wrapped in an SFNT structure) is now always taken from the `name' table. This is also true for OpenType Collections (i.e., TTCs using CFFs subfonts instead of TTFs), where it may have a significant difference. - Fonts natively hinted for ClearType are now supported, properly handling selector index 3 of the INSTCTRL bytecode instruction. - Major improvements to the GX TrueType variation font handling. II. MISCELLANEOUS - A new auto-hinter property `warping' can switch on and off the warping code if this experimental feature is compiled in (by defining the AF_CONFIG_OPTION_USE_WARPER configuration option; by default this option is now enabled but warping is switched off). The AF_CONFIG_OPTION_USE_WARPER option itself is an old feature, available since 2006. Warping only works in `light' auto-hinting mode. The idea of the code is to slightly scale and shift a glyph along the non-hinted dimension (which is usually the horizontal axis) so that as much of its segments are aligned (more or less) to the grid. To find out a glyph's optimal scaling and shifting value, various parameter combinations are tried and scored. See file `ftautoh.h' for more; the demo programs `ftdiff', `ftview', and `ftgrid' can toggle warping with key `w'. - Some fields in the `FTC_ImageTypeRec' structure have been changed from signed to unsigned type, which better reflects the actual usage. It is also an additional means to protect against malformed input. This change doesn't break the ABI; however, it might cause compiler warnings. - Function `FT_Bitmap_New' has been renamed to `FT_Bitmap_Init', since this name better reflects its function. For backward compatibility, the old function name is still available. - Function `FT_Get_X11_Font_Format' has been renamed to `FT_Get_Font_Format', since this name better reflects its function. For backward compatibility, the old function name is still available. Additionally, the header file macro for this function has been renamed to `FT_FONT_FORMATS_H' (the old name `FT_XFREE86_H' is retained for backward compatibility). - Various improvements to the `ftgrid' demo program. . It can now display GX and MM fonts while interactively manipulating the axes (with keys F2, F3, and F4). . Anti-aliasing rendering modes can now be selected (with keys F5 and F6). . The display of point numbers can be toggled with key `D'. - Various improvements to the `ftdump' demo program. . It now displays information on MM and GX variation axes. . New command line option `-u' makes it output data in utf-8 encoding. - The `ftmulti' demo program can now handle up to six MM or GX axes. ====================================================================== CHANGES BETWEEN 2.5.4 and 2.5.5 (2014-Dec-30) I. IMPORTANT BUG FIXES - Handling of uncompressed PCF files works again (bug introduced in version 2.5.4). ====================================================================== CHANGES BETWEEN 2.5.3 and 2.5.4 (2014-Dec-06) I. IMPORTANT BUG FIXES - A variant of vulnerability CVE-2014-2240 was identified (cf. https://savannah.nongnu.org/bugs/?43661) and fixed in the new CFF driver. All users should upgrade. - The new auto-hinter code using HarfBuzz crashed for some invalid fonts. - Many fixes to better protect against malformed input. II. IMPORTANT CHANGES - Full auto-hinter support of the Devanagari script. - Experimental auto-hinter support of the Telugu script. - CFF stem darkening behaviour can now be controlled at build time using the eight macros CFF_CONFIG_OPTION_DARKENING_PARAMETER_{X,Y}{1,2,3,4} . - Some fields in the `FT_Bitmap' structure have been changed from signed to unsigned type, which better reflects the actual usage. It is also an additional means to protect against malformed input. This change doesn't break the ABI; however, it might cause compiler warnings. III. MISCELLANEOUS - Improvements to the auto-hinter's algorithm to recognize stems and local extrema. - Function `FT_Get_SubGlyph_Info' always returned an error even in case of success. - Version 2.5.1 introduced major bugs in the cjk part of the auto-hinter, which are now fixed. - The `FT_Sfnt_Tag' enumeration values have been changed to uppercase, e.g. `FT_SFNT_HEAD'. The lowercase variants are deprecated. This is for orthogonality with all other enumeration (and enumeration-like) values in FreeType. - `cmake' now supports builds of FreeType as an OS X framework and for iOS. - Improved project files for vc2010, introducing a property file. - The documentation generator for the API reference has been updated to produce better HTML code (with proper CSS). At the same time, the documentation got a better structure. - The FT_LOAD_BITMAP_CROP flag is obsolete; it is not used by any driver. - The TrueType DELTAP[123] bytecode instructions now work in subpixel hinting mode as described in the ClearType whitepaper (i.e., for touched points in the non-subpixel direction). - Many small improvements to the internal arithmetic routines. ====================================================================== CHANGES BETWEEN 2.5.2 and 2.5.3 (2014-Mar-06) I. IMPORTANT BUG FIXES - A vulnerability (CVE-2014-2240) was identified and fixed in the new CFF driver (cf. https://savannah.nongnu.org/bugs/?41697). All users should upgrade. - More bug fixes related to correct positioning of composite glyphs. - Many fixes to better protect against malformed input. II. IMPORTANT CHANGES - FreeType can now use the HarfBuzz library to greatly improve the auto-hinting of fonts that use OpenType features: Many glyphs that are part of such features but don't have cmap entries are now handled properly, for example small caps or superscripts. Define the configuration macro FT_CONFIG_OPTION_USE_HARFBUZZ to activate HarfBuzz support. You need HarfBuzz version 0.9.19 or newer. Note that HarfBuzz depends on FreeType; this currently causes a chicken-and-egg problem that can be solved as follows in case HarfBuzz is not yet installed on your system. 1. Compile and install FreeType without the configuration macro FT_CONFIG_OPTION_USE_HARFBUZZ. 2. Compile and install HarfBuzz. 3. Define macro FT_CONFIG_OPTION_USE_HARFBUZZ, then compile and install FreeType again. With FreeType's `configure' script the procedure boils down to configure, build, and install FreeType, then configure, compile, and install HarfBuzz, then configure, compile, and install FreeType again (after executing `make distclean'). - All libraries FreeType depends on are now checked using the `pkg-config' configuration files first, followed by alternative methods. - The new value `auto' for the various `--with-XXX' library options (for example `--with-harfbuzz=auto') makes the `configure' script automatically link to the libraries it finds. This is now the default. - In case FreeType's `configure' script can't find a library, you can pass environment variables to circumvent pkg-config, and those variables have been harmonized as a consequence of the changes mentioned above: LIBZ -> removed; use LIBZ_CFLAGS and LIBZ_LIBS LIBBZ2 -> removed; use BZIP2_CFLAGS and BZIP2_LIBS LIBPNG_LDFLAGS -> LIBPNG_LIBS `./configure --help' shows all available environment variables. - The `freetype-config' script now understands option `--static' to emit static linking information. ====================================================================== CHANGES BETWEEN 2.5.1 and 2.5.2 (2013-Dec-08) I. IMPORTANT BUG FIXES - Improving the display of some broken TrueType fonts introduced a bug that made FreeType crash on some popular (but not fully conformant) fonts like `ahronbd.ttf'. - Another round of improvements to correct positioning and hinting of composite glyphs in TrueType fonts. II. MISCELLANEOUS - Version 2.5.1 introduced a bug in handling embedded bitmap strikes of TrueType fonts, causing garbage display under some circumstances. - The `ftgrid' demo program couldn't be compiled in non-development builds. ====================================================================== CHANGES BETWEEN 2.5 and 2.5.1 (2013-Nov-25) I. IMPORTANT BUG FIXES - For some WinFNT files, the last glyph wasn't displayed but incorrectly marked as invalid. - The vertical size of glyphs was incorrectly set after a call to `FT_GlyphSlot_Embolden', resulting in clipped glyphs. - Many fields of the `PCLT' table in SFNT based fonts (if accessed with `FT_Get_Sfnt_Table') were computed incorrectly. - In TrueType fonts, hinting of composite glyphs could sometimes deliver incorrect positions of components or even distorted shapes. II. IMPORTANT CHANGES - WOFF font format support has been added. - The auto-hinter now supports Hebrew. Greek and Cyrillic support has been improved. - Support for the forthcoming `OS/2' SFNT table version 5, as can be found e.g. in the `Sitka' font family for Windows 8.1. - The header file layout has been changed. After installation, all files are now located in `<prefix>/include/freetype2'. Applications that use (a) `freetype-config' or FreeType's `pkg-config' file to get the include directory for the compiler, and (b) the documented way for header inclusion like #include <ft2build.h> #include FT_FREETYPE_H ... don't need any change to the source code. III. MISCELLANEOUS - The stem darkening feature of the new CFF engine can now be fine-tuned with the new `darkening-parameters' property. - `ftgrid' has been updated to toggle various engines with the `H' key, similar to `ftview' and `ftdiff'. - The functionality of `ttdebug' has been greatly enhanced. . It now displays twilight, storage, and control value data; key `T' shows the twilight point table, key `S' the storage data, and key `C' the control value table. . Some keys have been reassigned from lowercase to their uppercase equivalents; for example `q' to quit the program is now `Q'. . Key `f' finishes the current function. . Key `R' restarts the debugger. . Keys `b' and `p' set a breakpoint. . Key `B' provides a function call backtrace. - Better support of ARMv7 and x86_64 processors. - Apple's `sbix' color bitmap format is now supported. - Improved auto-hinter rendering for many TrueType fonts, especially in the range 20-40ppem. - A new face flag `FT_FACE_FLAG_COLOR' has been added (to be accessed with the macro `FT_HAS_COLOR'). - `FT_Gzip_Uncompress' (modeled after zlib's `uncompress' function) has been added; this is a by-product of the newly added WOFF support. - Support for a build with `cmake' has been contributed by John Cary <cary@txcorp.com>. - Support for x64 builds with Visual C++ has been contributed by Kenneth Miller <kennethadammiller@yahoo.com> - Manual pages for most demo programs have been added. - The GETINFO bytecode instruction for TrueType fonts was buggy if used to retrieve subpixel hinting information. It was necessary to set selector bit 6 to get results for selector bits 7-10, which is wrong. - Improved computation of emulated vertical metrics for TrueType fonts. - Fixed horizontal start-up position of vertical phantom points in TrueType bytecode. ====================================================================== CHANGES BETWEEN 2.4.12 and 2.5 (2013-Jun-19) I. IMPORTANT BUG FIXES - The cache manager function `FTC_Manager_Reset' didn't flush the cache. II. IMPORTANT CHANGES - Behdad Esfahbod (on behalf of Google) contributed support for color embedded bitmaps (eg. color emoji). A new load flag, FT_LOAD_COLOR, makes FreeType load color embedded-bitmaps, following this draft specification https://color-emoji.googlecode.com/git/specification/v1.html which defines two new SFNT tables, `CBDT' and `CBLC' (named and modeled after `EBDT' and `EBLC', respectively). The color bitmaps are stored in the new FT_PIXEL_MODE_BGRA format to represent BGRA pre-multiplied sRGB images. If PNG support is available, PNG color images as defined in the same proposed specification are supported also. Note that color bitmaps are converted to grayscale if client didn't ask for color. - As announced in the previous release, the old FreeType CFF engine is now disabled by default. It can be conditionally compiled by defining the configuration macro CFF_CONFIG_OPTION_OLD_ENGINE. - As announced in the previous release, all code related to macro FT_CONFIG_OPTION_OLD_INTERNALS has been removed, thus becoming obsolete. III. MISCELLANEOUS - The property API (`FT_Property_Get' and `FT_Property_Set') is now declared as stable. The exception, however, are the experimental auto-hinter properties `glyph-to-script-map' and `fallback-script' which are subject to change in a forthcoming release. - `ftview' has been updated to support color embedded bitmaps; it can be toggled on and off with key `c'. The small cache toggle is now key `K'. - It is now possible to control the version of the TrueType hinting engine using the new `interpreter-version' property of the `truetype' module: Versions 35 and 38 (the default) are supported, which roughly corresponds to disable and enable subpixel hinting support, respectively. In both `ftview' and `ftdiff', switching between the two versions can be done with key `H'. In the `ftbench' demo program, command line option `-H' has been extended to activate the non-default interpreter version. - The `ttdebug' program has been further improved. In particular, it accepts a new command line option `-H' to select the hinting engine. - `ftdump's verbose option has been renamed to `-V'. For all demo programs, `-v' now shows version information. - Another round of TrueType subpixel hinting fixes. - The `apinames' tool can now create an import file for NetWare. - 64bit compilation of the new CFF engine was buggy. - Some fixes to improve robustness in memory-tight situations. ====================================================================== CHANGES BETWEEN 2.4.11 and 2.4.12 (2013-May-08) - We have another CFF parsing and hinting engine! Written by Dave Arnold <darnold@adobe.com>, this work has been contributed by Adobe in collaboration with Google. It is vastly superior to the old CFF engine, and it will replace it in the next release. Right now, it is still off by default, and you have to explicitly select it using the new `hinting-engine' property of the cff driver: ... #include FT_MODULE_H #include FT_CFF_DRIVER_H FT_Library library; int engine = FT_CFF_HINTING_ADOBE; ... FT_Property_Set( library, "cff", "hinting-engine", &engine ); The code has a (mature) beta status; we encourage all users to test it and report any problems. In case you want to activate the new CFF engine unconditionally, apply this patch: --- snip --- diff --git a/src/cff/cffobjs.c b/src/cff/cffobjs.c index ebcf189..3f2ce6b 100644 --- a/src/cff/cffobjs.c +++ b/src/cff/cffobjs.c @@ -1056,7 +1056,7 @@ /* set default property values */ - driver->hinting_engine = FT_CFF_HINTING_FREETYPE; + driver->hinting_engine = FT_CFF_HINTING_ADOBE; driver->no_stem_darkening = FALSE; return FT_Err_Ok; --- snip --- - The macro FT_CONFIG_OPTION_OLD_INTERNALS is no longer set by default. In the next release, we will completely remove the associated code. Please update your programs in case you are still using this macro. II. MISCELLANEOUS - The (top-level) `configure' script now respects the MAKE environment variable to specify a `make' binary. For backward compatibility, GNUMAKE still overrides MAKE, though. - The `ftview' and `ftdiff' demo programs have been redesigned, showing more options permanently on the screen, among other minor improvements. - Using the `H' key, it is now possible to select the CFF engine in both `ftview' and `ftdiff'. - The new command line option `-H' for `ftbench' selects the Adobe CFF engine. - It is now possible to directly select the LCD rendering mode with the keys `A'-`F' in `ftview'. The key mapping for cycling through LCD modes has been changed from `K' and `L' to `k' and `l', and toggling custom LCD filtering is no longer mapped to key `F' but to key `L'. - In `ftdiff', key `x' toggles between layout modes: Either use the advance width (this is new and now the default) or the bounding box information to determine line breaks. - For all demo tools, the new command line option `-v' shows the version. - For the demo tools with a GUI, the new command line options `-w' and `-h' select the width and the height of the output window, respectively. - The `ttdebug' program was broken and has been reactivated. Note that this program is not compiled by default. ====================================================================== CHANGES BETWEEN 2.4.10 and 2.4.11 (2012-Dec-20) I. IMPORTANT BUG FIXES - Some vulnerabilities in the BDF implementation have been fixed. Users of this font format should upgrade. II. IMPORTANT CHANGES - Subpixel hinting support has been contributed by Infinality, based on Greg Hitchcock's whitepaper at https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx Originally, it was a separate patch available from https://web.archive.org/web/20150710073951/http://www.infinality.net:80/blog/ and which has been integrated. Note that ClearType support is not completely implemented! In particular, full support for the options `compatible_widths', `symmetrical_smoothing, and `bgr' (via the GETINFO bytecode instruction) is missing. Activation of subpixel hinting support can be controlled with the `TT_CONFIG_OPTION_SUBPIXEL_HINTING' configuration option; it is switched off by default. This feature is still experimental; we welcome test reports! - Support for OpenType collections (OTC) has been added. - Pure CFF fonts within an SFNT wrapper are now supported. III. MISCELLANEOUS - Minor rendering improvements to the auto-hinter. - `FT_GlyphSlot_Oblique' now uses a shear angle of 12°. - Experimental support to handle `property modules', for example to control the behaviour of the auto-hinter. The API consists of two new functions, `FT_Property_Set' and `FT_Property_Get'. The code is still subject to change and should not be used for production. - The `ftdiff' demo program now supports UTF-8 encoded input files for option `-f'. - Using keys `r' and `R', you can now adjust the stroker radius in the `ftview' demo program. - Other, minor fixes and improvements. ====================================================================== CHANGES BETWEEN 2.4.9 and 2.4.10 (2012-Jun-15) I. IMPORTANT BUG FIXES - Incremental glyph loading as needed by ghostscript was broken. II. MISCELLANEOUS - A new function `FT_Outline_EmboldenXY', contributed by Alexei Podtelezhnikov. - In the `ftview' demo program, key `e' has been replaced with `x' and `y' to embolden in the horizontal and vertical direction, respectively. - The glyph spacing computation in `FT_GlyphSlot_Embolden' (and similar code in `ftview') has been improved. - Minor improvements to the TrueType bytecode interpreter and glyph loader, the auto-hinter, and the B/W rasterizer. ====================================================================== CHANGES BETWEEN 2.4.8 and 2.4.9 (2012-Mar-08) I. IMPORTANT BUG FIXES - Another round of fixes to better handle invalid fonts. Many of them are vulnerabilities (see CVE-2012-1126 up to CVE-2012-1144 and SA48320) so all users should upgrade. II. MISCELLANEOUS - The `ENCODING -1 <n>' format of BDF fonts is now supported. - For BDF fonts, support for the whole Unicode encoding range has been added. - Better TTF support for x_ppem != y_ppem. - `FT_Get_Advances' sometimes returned bogus values. - The demo programs no longer recognize and handle default suffixes; you now have to always specify the complete font name. - Better rendering and LCD mode cycling added to `ftview'. ====================================================================== CHANGES BETWEEN 2.4.7 and 2.4.8 (2011-Nov-14) I. IMPORTANT BUG FIXES - Some vulnerabilities in handling CID-keyed PostScript fonts have been fixed; see CVE-2011-3439. II. MISCELLANEOUS - Chris Liddell contributed a new API, `FT_Get_PS_Font_Value', to retrieve most of the dictionary keys in Type 1 fonts. ====================================================================== CHANGES BETWEEN 2.4.6 and 2.4.7 (2011-Oct-18) I. IMPORTANT BUG FIXES - Some vulnerabilities in handling Type 1 fonts have been fixed; see CVE-2011-3256. II. MISCELLANEOUS - FreeType now properly handles ZapfDingbats glyph names while constructing a Unicode character map (for fonts which don't have one). ====================================================================== CHANGES BETWEEN 2.4.5 and 2.4.6 (2011-Jul-29) I. IMPORTANT BUG FIXES - For TrueType based fonts, the ascender and descender values were incorrect sometimes (off by a pixel if the ppem value was not a multiple of 5). Depending on the use you might now experience a different layout; the change should result in better, more consistent line spacing. - Fix CVE-2011-0226 which causes a vulnerability while handling Type 1 fonts. - BDF fonts containing glyphs with negative values for ENCODING were incorrectly rejected. This bug has been introduced in FreeType version 2.2.0. - David Bevan contributed a major revision of the FreeType stroker code: . The behaviour of FT_STROKER_LINEJOIN_BEVEL has been corrected. . A new line join style, FT_STROKER_LINEJOIN_MITER_FIXED, has been introduced to support PostScript and PDF miter joins. . FT_STROKER_LINEJOIN_MITER_VARIABLE has been introduced as an alias for FT_STROKER_LINEJOIN_MITER. . Various stroking glitches has been fixed. II. MISCELLANEOUS - SFNT bitmap fonts which contain an outline glyph for `.notdef' only no longer set the FT_FACE_FLAG_SCALABLE flag. ====================================================================== CHANGES BETWEEN 2.4.4 and 2.4.5 (2011-Jun-25) I. IMPORTANT BUG FIXES - A rendering regression for second-order Bézier curves has been fixed, introduced in 2.4.3. II. IMPORTANT CHANGES - If autohinting is not explicitly disabled, FreeType now uses the autohinter if a TrueType based font doesn't contain native hints. - The load flag FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH has been made redundant and is simply ignored; this means that FreeType now ignores the global advance width value in TrueType fonts. III. MISCELLANEOUS - `FT_Sfnt_Table_Info' can now return the number of SFNT tables of a font. - Support for PCF files compressed with bzip2 has been contributed by Joel Klinghed. To make this work, the OS must provide a bzip2 library. - Bradley Grainger contributed project and solution files in Visual Studio 2010 format. - Again some fixes to better handle broken fonts. - Some improvements to the B/W rasterizer. - Fixes to the cache module to improve robustness. - Just Fill Bugs contributed (experimental) code to compute blue zones for CJK Ideographs, improving the alignment of horizontal stems at the top or bottom edges. - The `ftgrid' demo program can now display autohinter segments, to be toggled on and off with key `s'. ====================================================================== CHANGES BETWEEN 2.4.3 and 2.4.4 (2010-Nov-28) I. IMPORTANT BUG FIXES - UVS support (TrueType/OpenType cmap format 14) support is fixed. This regression has been introduced in version 2.4.0. II. MISCELLANEOUS - Detect tricky fonts (e.g. MingLiU) by the lengths and checksums of Type42-persistent subtables (`cvt ', `fpgm', and `prep') when a TrueType font without family name is given. The previous fix, introduced in 2.4.3, was too rigorous, causing many subsetted fonts (mainly from PDF files) displayed badly because FreeType forced rendering with the TrueType bytecode engine instead of the autohinter. - Better support for 64bit platforms. - More fixes to improve handling of broken fonts. ====================================================================== CHANGES BETWEEN 2.4.2 and 2.4.3 (2010-Oct-03) I. IMPORTANT BUG FIXES - Fix rendering of certain cubic, S-shaped arcs. This regression has been introduced in version 2.4.0. II. MISCELLANEOUS - To fix the above mentioned rendering issue, a new spline flattening algorithm has been introduced which speeds up both conic and cubic arcs. - Handling of broken fonts has been further improved. ====================================================================== CHANGES BETWEEN 2.4.1 and 2.4.2 (2010-Aug-06) I. IMPORTANT BUG FIXES - A stack overflow in CFF Type2 CharStrings interpreter is fixed. - Handling Type 42 font deallocation was broken; additionally, the library is now more robust against malformed Type 42 fonts. II. MISCELLANEOUS - Two new functions, `FT_Reference_Library' (in FT_MODULE_H) and `FT_Reference_Face' (in FT_FREETYPE_H), have been added to simplify life-cycle management. A counter gets initialized to 1 at the time an FT_Library (or FT_Face) structure is created. The two new functions increment the respective counter. `FT_Done_Library' and `FT_Done_Face' then only destroy a library or face if the counter is 1, otherwise they simply decrement the counter. ====================================================================== CHANGES BETWEEN 2.4.0 and 2.4.1 (2010-Jul-18) I. IMPORTANT CHANGES - A serious bug in the CFF font module prevented display of many glyphs in CFF fonts like `MinionPro-Regular.otf'. ====================================================================== CHANGES BETWEEN 2.3.12 and 2.4.0 (2010-Jul-12) I. IMPORTANT CHANGES - Since May 2010, all patents regarding the TrueType bytecode interpreter have expired worldwide. Consequently, we now define TT_CONFIG_OPTION_BYTECODE_INTERPRETER by default (and undefine TT_CONFIG_OPTION_UNPATENTED_HINTING). - A new function `FT_Library_SetLcdFilterWeights' is available to adjust the filter weights set by `FT_Library_SetLcdFilter'. II. MISCELLANEOUS - Thanks to many reports from Robert Święcki, FreeType's stability in handling broken or damaged fonts is much improved. - Support for LCD filter control has been added to the demo programs `ftdiff' and `ftview'. ====================================================================== CHANGES BETWEEN 2.3.11 and 2.3.12 I. IMPORTANT CHANGES - For `FT_Open_Face', new parameters are available to ignore preferred family names: FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY and FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY. II. MISCELLANEOUS - Support for incremental font loading (controlled with the FT_CONFIG_OPTION_INCREMENTAL macro) is now active by default. - Better support for vertical metrics. - Various minor bug fixes. ====================================================================== CHANGES BETWEEN 2.3.10 and 2.3.11 I. IMPORTANT BUG FIXES - Version 2.3.10 broke PCF support. ====================================================================== CHANGES BETWEEN 2.3.10 and 2.3.9 I. IMPORTANT BUG FIXES - If all ASCII digits in a font have the same (unscaled) width, the autohinter respects this and won't change it. - TrueType fonts are now rasterized correctly if the horizontal and vertical resolution differ. - Type 1 fonts are now handled with increased precision internally to avoid serious rounding issues if non-integral coordinates are encountered. - Horizontally condensed CFF fonts (using the font matrix) were rendered incorrectly. This bug has been introduced after release 2.3.5. II. IMPORTANT CHANGES - Support for the SFNT cmap 13 table format (as defined by the new OpenType 1.6 specification) has been added. - B/W rasterization of well-hinted TrueType fonts at small sizes has been greatly improved. - Calculation of vertical metrics in OpenType fonts has been improved. III. MISCELLANEOUS - It is now possible to change the emboldening factor in the `ftview' demo program with keys `e' and `E'. - It is now possible to change the slant value in the `ftview' demo program with keys `s' and `S'. - The 5-levels grayscale mode of the `ftraster' module (which FreeType doesn't use by default) was broken since version 2.3.0. - Compilation of the `ftgrays' and `ftraster' modules was broken in stand-alone mode. - Various fixes for compilation on 64bit and 16bit architectures. ====================================================================== CHANGES BETWEEN 2.3.9 and 2.3.8 I. IMPORTANT BUG FIXES - Very unfortunately, FreeType 2.3.8 contained a change that broke its official ABI. The end result is that programs compiled against previous versions of the library, but dynamically linked to 2.3.8 can experience memory corruption if they call the `FT_Get_PS_Font_Info' function. We recommend all users to upgrade to 2.3.9 as soon as possible, or to downgrade to a previous release of the library if this is not an option. The origin of the bug is that a new field was added to the publicly defined `PS_FontInfoRec' structure. Unfortunately, objects of this type can be stack or heap allocated by callers of `FT_Get_PS_Font_Info', resulting in a memory buffer overwrite with its implementation in 2.3.8. If you want to know whether your code is vulnerable to this issue, simply search for the substrings `PS_FontInfo' and `PS_Font_Info' in your source code. If none is found, your code is safe and is not affected. The FreeType team apologizes for the problem. - The POSIX support of MacOS resource-fork fonts (Suitcase fonts and LaserWriter Type1 PostScript fonts) was broken in 2.3.8. If FreeType2 is built without Carbon framework, these fonts are not handled correctly. Version 2.3.7 didn't have this bug. - `FT_Get_Advance' (and `FT_Get_Advances') returned bad values for almost all font formats except TrueType fonts. - Fix a bug in the SFNT kerning table loader/parser which could crash the engine if certain malformed tables were encountered. - Composite SFNT bitmaps are now handled correctly. II. IMPORTANT CHANGES - The new functions `FT_Get_CID_Is_Internally_CID_keyed' and `FT_Get_CID_From_Glyph_Index' can be used to access CID-keyed CFF fonts via CID values. This code has been contributed by Michael Toftdal. III. MISCELLANEOUS - `FT_Outline_Get_InsideBorder' returns FT_STROKER_BORDER_RIGHT for empty outlines. This was incorrectly documented. - The `ftview' demo program now supports UTF-8 encoded strings. ====================================================================== CHANGES BETWEEN 2.3.8 and 2.3.7 I. IMPORTANT BUG FIXES - CID-keyed fonts in an SFNT wrapper were not handled correctly. - The smooth renderer produced truncated images (on the right) for outline parts with negative horizontal values. Most fonts don't contain outlines left to the y coordinate axis, but the effect was very noticeable for outlines processed with FT_Glyph_Stroke, using thick strokes. - `FT_Get_TrueType_Engine_Type' returned a wrong value if both configuration macros TT_CONFIG_OPTION_BYTECODE_INTERPRETER and TT_CONFIG_OPTION_UNPATENTED_HINTING were defined. - The `face_index' field in the `FT_Face' structure wasn't initialized properly after calling FT_Open_Face and friends with a positive face index for CFFs, WinFNTs, and, most importantly, for TrueType Collections (TTCs). II. IMPORTANT CHANGES - Rudimentary support for Type 1 fonts and CID-keyed Type 1 fonts in an SFNT wrapper has been added -- such fonts are used on the Mac. The core SFNT tables `TYP1' and `CID ' are passed to the PS Type 1 and CID-keyed PS font drivers; other tables (`ALMX', `BBOX', etc.) are not supported yet. - A new interface to extract advance values of glyphs without loading their outlines has been added. The functions are called `FT_Get_Advance' and `FT_Get_Advances'; they are defined in file `ftadvanc.h' (to be accessed as FT_ADVANCES_H). - A new function `FT_Get_FSType_Flags' (in FT_FREETYPE_H) has been contributed by David Bevan to access the embedding and subsetting restriction information of fonts. III. MISCELLANEOUS - FT_MulFix is now an inlined function; by default, assembler code is provided for x86 and ARM. See FT_CONFIG_OPTION_INLINE_MULFIX and FT_CONFIG_OPTION_NO_ASSEMBLER (in ftoption.h) for more. - The handling of `tricky' fonts (this is, fonts which don't work with the autohinter, needing the font format's hinting engine) has been generalized and changed slightly: . A new face flag FT_FACE_FLAG_TRICKY indicates that the font format's hinting engine is necessary for correct rendering. The macro FT_IS_TRICKY can be used to check this flag. . FT_LOAD_NO_HINTING is now ignored for tricky fonts. To really force raw loading of such fonts (without hinting), both FT_LOAD_NO_HINTING and FT_LOAD_NO_AUTOHINT must be used -- this is something which you probably never want to do. . Tricky TrueType fonts always use the bytecode interpreter, either the patented or unpatented version. - The function `FT_GlyphSlot_Own_Bitmap' has been moved from FT_SYNTHESIS_H to FT_BITMAP_H; it is now part of the `official' API. (The functions in FT_SYNTHESIS_H are still subject to change, however.) - In the `ftdiff' demo program you can now toggle the use of FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH with key `a'. ====================================================================== CHANGES BETWEEN 2.3.7 and 2.3.6 I. IMPORTANT BUG FIXES - If the library was compiled on an i386 platform using gcc, and compiler option -O3 was given, `FT_MulFix' sometimes returned incorrect results which could have caused problems with `FT_Request_Metrics' and `FT_Select_Metrics', returning an incorrect descender size. - Pure CFFs without subfonts were scaled incorrectly if the font matrix was non-standard. This bug has been introduced in version 2.3.6. - The `style_name' field in the `FT_FaceRec' structure often contained a wrong value for Type 1 fonts. This misbehaviour has been introduced in version 2.3.6 while trying to fix another problem. [Note, however, that this value is informative only since the used algorithm to extract it is very simplistic.] II. IMPORTANT CHANGES - Two new macros, FT_OUTLINE_SMART_DROPOUTS and FT_OUTLINE_EXCLUDE_STUBS, have been introduced. Together with FT_OUTLINE_IGNORE_DROPOUTS (which was ignored previously) it is now possible to control the dropout mode of the `raster' module (for B&W rasterization), using the `flags' field in the `FT_Outline' structure. - The TrueType bytecode interpreter now passes the dropout mode to the B&W rasterizer. This greatly increases the output for small ppem values of many fonts like `pala.ttf'. ====================================================================== CHANGES BETWEEN 2.3.6 and 2.3.5 I. IMPORTANT BUG FIXES - A bunch of potential security problems have been found. All users should update. - Microsoft Unicode cmaps in TrueType fonts are now always preferred over Apple cmaps. This is not a bug per se, but there exist some buggy fonts created for MS which have broken Apple cmaps. This affects only the automatic selection of FreeType; it's always possible to manually select an Apple Unicode cmap if desired. - Many bug fixes to the TrueType bytecode interpreter. - Improved Mac support. - Subsetted CID-keyed CFFs are now supported correctly. - CID-keyed CFFs with subfonts which are scaled in a non-standard way are now handled correctly. - A call to FT_Open_Face with `face_index' < 0 crashed FreeType if the font was a Windows (bitmap) FNT/FON. II. IMPORTANT CHANGES - The new function `FT_Get_CID_Registry_Ordering_Supplement' gives access to those fields in a CID-keyed font. The code has been contributed by Derek Clegg. - George Williams contributed code to validate the new `MATH' OpenType table (within the `otvalid' module). The `ftvalid' demo program has been extended accordingly. - An API for cmap 14 support (for Unicode Variant Selectors, UVS) has been contributed by George Williams. - A new face flag FT_FACE_FLAG_CID_KEYED has been added, together with a macro FT_IS_CID_KEYED which evaluates to 1 if the font is CID-keyed. III. MISCELLANEOUS - Build support for symbian has been contributed. - Better WGL4 glyph name support, contributed by Sergey Tolstov. - Debugging output of the various FT_TRACEX macros is now sent to stderr. - The `ftview' demo program now provides artificial slanting too. - The `ftvalid' demo program has a new option `-f' to select the font index. ====================================================================== CHANGES BETWEEN 2.3.5 and 2.3.4 I. IMPORTANT BUG FIXES - Some subglyphs in TrueType fonts were handled incorrectly due to a missing graphics state reinitialization. - Large .Z files (as distributed with some X11 packages) weren't handled correctly, making FreeType increase the heap stack in an endless loop. - A large number of bugs have been fixed to avoid crashes and endless loops with invalid fonts. II. IMPORTANT CHANGES - The two new cache functions `FTC_ImageCache_LookupScaler' and `FTC_SBit_Cache_LookupScaler' have been added to allow lookup of glyphs using an `FTC_Scaler' object; this makes it possible to use fractional pixel sizes in the cache. The demo programs have been updated accordingly to use this feature. - A new API `FT_Get_CMap_Format' has been added to get the cmap format of a TrueType font. This is useful in handling PDF files. The code has been contributed by Derek Clegg. - The auto-hinter now produces better output by default for non-Latin scripts like Indic. This was done by using the CJK hinting module as the default instead of the Latin one. Thanks to Rahul Bhalerao for this suggestion. - A new API `FT_Face_CheckTrueTypePatents' has been added to find out whether a given TrueType font uses patented bytecode instructions. The `ft2demos' bundle contains a new program called `ftpatchk' which demonstrates its usage. - A new API `FT_Face_SetUnpatentedHinting' has been added to enable or disable the unpatented hinter. - Support for Windows FON files in PE format has been contributed by Dmitry Timoshkov. III. MISCELLANEOUS - Vincent Richomme contributed Visual C++ project files for Pocket PCs. ====================================================================== CHANGES BETWEEN 2.3.4 and 2.3.3 I. IMPORTANT BUG FIXES - A serious bug in the handling of bitmap fonts (and bitmap strikes of outline fonts) has been introduced in 2.3.3. ====================================================================== CHANGES BETWEEN 2.3.3 and 2.3.2 I. IMPORTANT BUG FIXES - Remove a serious regression in the TrueType bytecode interpreter that was introduced in version 2.3.2. Note that this does not disable the improvements introduced to the interpreter in version 2.3.2, only some ill cases that occurred with certain fonts (though a few popular ones). - The auto-hinter now ignores single-point contours for computing blue zones. This bug created `wavy' baselines when rendering text with various fonts that use these contours to model mark-attach points (these are points that are never rasterized and are placed outside of the glyph's real outline). - The `rsb_delta' and `lsb_delta' glyph slot fields are now set to zero for mono-spaced fonts. Otherwise code that uses them would essentially ruin the fixed-advance property. - Fix CVE-2007-1351 which can cause an integer overflow while parsing BDF fonts, leading to a potentially exploitable heap overflow condition. II. MISCELLANEOUS - Fixed compilation issues on some 64-bit platforms (see ChangeLog for details). - A new demo program `ftdiff' has been added to compare TrueType hinting, FreeType's auto hinting, and rendering without hinting in three columns. ====================================================================== CHANGES BETWEEN 2.3.2 and 2.3.1 I. IMPORTANT BUG FIXES - FreeType returned incorrect kerning information from TrueType fonts when the bytecode interpreter was enabled. This happened due to a typo introduced in version 2.3.0. - Negative kerning values from PFM files are now reported correctly (they were read as 16-bit unsigned values from the file). - Fixed a small memory leak when `FT_Init_FreeType' failed for some reason. - The Postscript hinter placed and sized very thin and ghost stems incorrectly. - The TrueType bytecode interpreter has been fixed to get rid of most of the rare differences seen in comparison to the Windows font loader. II. IMPORTANT CHANGES - The auto-hinter now better deals with serifs and corner cases (e.g., glyph '9' in Arial at 9pt, 96dpi). It also improves spacing adjustments and doesn't change widths for non-spacing glyphs. - Many Mac-specific functions are deprecated (but still available); modern replacements have been provided for them. See the documentation in file `ftmac.h'. ====================================================================== CHANGES BETWEEN 2.3.1 and 2.3.0 I. IMPORTANT BUG FIXES - The TrueType interpreter sometimes returned incorrect horizontal metrics due to a bug in the handling of the SHZ instruction. - A typo in a security check introduced after version 2.2.1 prevented FreeType to render some glyphs in CFF fonts. ====================================================================== CHANGES BETWEEN 2.3.0 and 2.2.1 I. IMPORTANT BUG FIXES - The PCF font loader is now much more robust while loading malformed font files. - Various memory leaks have been found and fixed. - The TrueType name loader now deals properly with some fonts that encode their names in UTF-16 (the specification was vague, and the code incorrectly assumed UCS-4). - Fixed the TrueType bytecode loader to deal properly with subtle monochrome/gray issues when scaling the CVT. Some fonts exhibited bad rendering artifacts otherwise. - `FT_GlyphSlot_Embolden' now supports vertical layouts correctly (it mangled the vertical advance height). - Fixed byte endian issues of `ftmac.c' to support Mac OS X on i386. - The PFR font loader no longer erroneously tags font files without any outlines as FT_FACE_FLAG_SCALABLE. II. NEW API FUNCTIONS - `FT_Library_SetLcdFilter' allows you to select a special filter to be applied to the bitmaps generated by `FT_Render_Glyph' if one of the FT_RENDER_MODE_LCD and FT_RENDER_MODE_LCD_V modes has been selected. This filter is used to reduce color fringes; several settings are available through the FT_LCD_FILTER_XXX enumeration. Its declaration and documentation can be found in file `include/freetype/ftlcdfil.h' (to be accessed with macro FT_LCD_FILTER_H). *IMPORTANT*: This function returns an error (FT_Err_Unimplemented_Feature) in default builds of the library for patent reasons. See below. - `FT_Get_Gasp' allows you to query the flags of the TrueType `gasp' table for a given character pixel size. This is useful to duplicate the text rendering of MS Windows when the native bytecode interpreter is enabled (which isn't the default for other patent reasons). Its declaration and documentation can be found in file `include/freetype/ftgasp.h' (to be accessed with macro FT_GASP_H). III. IMPORTANT CHANGES - The auto-hinter has been tuned a lot to improve its results with serif fonts, resulting in much better font rendering of many web pages. - The unpatented hinter is now part of the default build of the library; we have added code to automatically support `tricky' fonts that need it. This means that FreeType should `just work' with certain Asian fonts, like MingLiU, which cannot properly be loaded without a bytecode interpreter, but which fortunately do not use any of the patented bytecode opcodes. We detect these fonts by name, so please report any font file that doesn't seem to work with FreeType, and we shall do what we can to support it in a next release. Note that the API hasn't changed, so you can still force unpatented hinting with a special parameter to `FT_Open_Face' as well. This might be useful in same cases; for example, a PDF reader might present a user option to activate it to deal with certain `tricky' embedded fonts which cannot be clearly identified. If you are a developer for embedded systems, you might want to *disable* the feature to save code space by undefining TT_CONFIG_OPTION_UNPATENTED_HINTING in file `ftoption.h'. - LCD-optimized rendering is now *disabled* in all default builds of the library, mainly due to patent issues. For more information see: https://lists.gnu.org/archive/html/freetype/2006-09/msg00064.html A new configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING has been introduced in `ftoption.h'; manually define it in this file if you want to re-enable the feature. The change only affects the implementation, not the FreeType API. This means that clients don't need to be modified, because the library still generates LCD decimated bitmaps, but with the added constraint that R=G=B on each triplet. The displayed result should be equal to normal anti-aliased rendering. Additionally, if FT_CONFIG_OPTION_SUBPIXEL_RENDERING is not defined, the new `FT_Library_SetLcdFilter' function returns the FT_Err_Unimplemented_Feature error code. - Some computation bugs in the TrueType bytecode interpreter were found, which allow us to get rid of very subtle and rare differences we had experienced with the Windows renderer. - It is now possible to cross-compile the library easily. See the file `docs/INSTALL.CROSS' for details. - The file `src/base/ftmac.c' now contains code for Mac OS X only; its deprecated function `FT_GetFile_From_Mac_Font_Name' always returns an error even if the QuickDraw framework is available. The previous version has been moved to `builds/mac/ftmac.c'. Selecting configure option `--with-quickdraw-carbon' makes the build process use the original `ftmac.c' file instead of the Mac OS X-only version. IV. MISCELLANEOUS - Various performance and memory footprint optimizations have been performed on the TrueType and CFF font loaders, sometimes with very drastic benefits (e.g., the TrueType loader is now about 25% faster; FreeType should use less heap memory under nearly all conditions). - The anti-aliased rasterizer has been optimized and is now 15% to 25% percent faster than in previous versions, depending on content. - The Type 1 loader has been improved; as an example, it now skips top-level dictionaries properly. - Better support for Mac fonts on POSIX systems, plus compilation fixes for Mac OS X on ppc64 where `ftmac.c' cannot be built. - Configuration without `--with-old-mac-fonts' does not include `ftmac.c' (this was the behaviour in FreeType version 2.1.10). - The TrueTypeGX validator (gxvalid) checks the order of glyph IDs in the kern table. ====================================================================== CHANGES BETWEEN 2.2.1 and 2.2 I. IMPORTANT BUG FIXES - Various integer overflows have been fixed. - PFB fonts with MacOS resource fork weren't handled correctly on non-MacOS platforms. ====================================================================== CHANGES BETWEEN 2.2 and 2.1.10 (not released officially) I. IMPORTANT BUG FIXES - Vertical metrics for SFNT fonts were incorrect sometimes. - The FT_HAS_KERNING macro always returned 0. - CFF OpenType fonts didn't return correct vertical metrics for glyphs with outlines. - If FreeType was compiled without hinters, all font formats based on PS outlines weren't scaled correctly. II. IMPORTANT CHANGES - Version 2.2 no longer exposes its internals, this is, the header files located in the `include/freetype/internal' directory of the source package are not copied anymore by the `make install' command. Consequently, a number of rogue clients which directly access FreeType's internal functions and structures won't compile without modification. We provide patches for most of those rogue clients. See the following page for more information: https://www.freetype.org/freetype2/patches/rogue-patches.html Note that, as a convenience to our Unix desktop users, version 2.2 is *binary* compatible with FreeType 2.1.7, which means that installing this release on an existing distribution shall not break any working desktop. - FreeType's build mechanism has been redesigned. With GNU make it is now sufficient in most cases to edit two files: `modules.cfg', to select the library components, and the configuration file `include/freetype/config/ftoption.h' (which can be copied to the objects directory). Removing unused module directories to prevent its compilation and editing `include/freetype/config/ftmodule.h' is no longer necessary. - The LIGHT hinting algorithm produces more pleasant results. Also, using the FT_LOAD_TARGET_LIGHT flags within FT_Load_Glyph always forces auto-hinting, as a special exception. This allows you to experiment with it even if you have enabled the TrueType bytecode interpreter in your build. - The auto hinter now employs a new algorithm for CJK fonts, based on Akito Hirai's patch. Note that this only works for fonts with a Unicode charmap at the moment. - The following callback function types have changed slightly (by adding the `const' keyword where appropriate): FT_Outline_MoveToFunc FT_Outline_LineToFunc FT_Outline_ConicToFunc FT_Outline_CubicToFunc FT_SpanFunc FT_Raster_RenderFunc FT_Glyph_TransformFunc FT_Renderer_RenderFunc FT_Renderer_TransformFunc Note that this doesn't affect binary backward compatibility. - On MacOS, new APIs have been added as replacements for legacy APIs: `FT_New_Face_From_FSRef' for `FT_New_Face_From_FSSpec', and `FT_GetFile_From_Mac_ATS_Name' for `FT_GetFile_From_Mac_Name'. Legacy APIs are still available, if FreeType is built without disabling them. - A new API `FT_Select_Size' has been added to select a bitmap strike by its index. Code using other functions to select bitmap strikes should be updated to use this function. - A new API `FT_Get_SubGlyph_Info' has been added to retrieve subglyph data. This can be used by rogue clients which used to access the internal headers to get the corresponding data. - In 2.1.10, the behaviour of `FT_Set_Pixel_Sizes' was changed for BDF/PCF fonts, and only for them. This causes inconsistency. In this release, we undo the change. The intent of the change in 2.1.10 is to allow size selection through real dimensions, which can now be done through `FT_Request_Size'. - Some security issues were discovered and fixed in the CFF and Type 1 loader, causing crashes of FreeType by malformed font files. III. MISCELLANEOUS - The documentation for FT_LOAD_TARGET_XXX and FT_RENDER_MODE_XXX values now better reflects its usage and differences: One set is used to specify the hinting algorithm, the other to specify the pixel rendering mode. - `FT_New_Face' and `FT_New_Face_From_FSSpec' in ftmac.c have been changed to count supported scalable faces (sfnt, LWFN) only, and to return the number of available faces via face->num_faces. Unsupported bitmap faces (fbit, NFNT) are ignored. - builds/unix/configure has been improved for MacOS X. It now automatically checks available functions in Carbon library, and prepare to use newest functions by default. Options to specify the dependencies of each Carbon APIs (FSSpec, FSRef, old/new QuickDraw, ATS) are available too. By manual disabling of all QuickDraw functionality, FreeType can be built without `deprecated function' warnings on MacOS 10.4.x, but FT_GetFile_Mac_Name in ftmac.c then is changed to a dummy function, and returns an `unimplemented' error. For details see builds/mac/README. - SFNT cmap handling has been improved, mainly to run much faster with CJK fonts. - A new function `FT_Get_TrueType_Engine_Type (declared in `FT_MODULE_H') is provided to determine the status of the TrueType bytecode interpreter compiled into the library (patented, unpatented, unimplemented). - Vertical metrics of glyphs are synthesized if the font does not provide such information. You can tell whether the metrics are synthesized or not by checking the FT_FACE_FLAG_VERTICAL flag of the face. - The demo programs `ftview' and `ftstring' have been rewritten for better readability. `ftview' has a new switch `-p' to test FT_New_Memory_Face (instead of FT_New_Face). - FreeType now honours bit 1 in the `head' table of TrueType fonts (meaning `left sidebearing point at x=0'). This helps with some buggy fonts. - Rudimentary support for Adobe's new `SING Glyphlet' format. See https://www.adobe.com/content/dam/acom/en/devnet/font/pdfs/5148.SING_Tutorial.pdf for more information. - The `ftdump' program from the `ft2demos' bundle now shows some information about charmaps. It also supports a new switch `-v' to increase verbosity. - Better AFM support. This includes track kerning support. ====================================================================== CHANGES BETWEEN 2.1.10 and 2.1.9 I. IMPORTANT BUG FIXES - The size comparison for BDF and PCF files could fail sometimes. - Some CFF files were still not loaded correctly. Patch from Derek Noonburg. - The stroker still had some serious bugs. - Boris Letocha fixed a bug in the TrueType interpreter: The NPUSHW instruction wasn't skipped correctly in IF clauses. Some fonts like `Helvetica 75 Bold' failed. - Another serious bug in handling TrueType hints caused many distortions. It has been introduced in version 2.1.8, and it is highly recommended to upgrade. - FreeType didn't properly parse empty Type 1 glyphs. - An unbound dynamic buffer growth was fixed in the PFR loader. - Several bugs have been fixed in the cache sub-system. - FreeType behaved incorrectly when resizing two distinct but very close character pixel sizes through `FT_Set_Char_Size' (Savannah bug #12263). - The auto-hinter didn't work properly for fonts without a Unicode charmap -- it even refused to load the glyphs. II. IMPORTANT CHANGES - Many fixes have been applied to drastically reduce the amount of heap memory used by FreeType, especially when using memory-mapped font files (which is the default on Unix systems which support them). - The auto-hinter has been replaced with a new module, called the `auto-fitter'. It consumes less memory than its predecessor, and it is prepared to support non-latin scripts better in next releases. - George Williams contributed code to read kerning data from PFM files. - FreeType now uses the TT_NAME_ID_PREFERRED_FAMILY and TT_NAME_ID_PREFERRED_SUBFAMILY strings (if available) for setting family and style in SFNT fonts (patch from Kornfeld Eliyahu Peter). - A new API `FT_Sfnt_Table_Info' (in FT_TRUETYPE_TABLES_H) has been added to retrieve name and size information of SFNT tables. - A new API `FT_OpenType_Validate' (in FT_OPENTYPE_VALIDATE_H) has been added to validate OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF). After validation it is no longer necessary to check for errors in those tables while accessing them. Note that this module might be moved to another library in the future to avoid a tight dependency between FreeType and the OpenType specification. - A new API in FT_BITMAP_H (`FT_Bitmap_New', `FT_Bitmap_Convert', `FT_Bitmap_Copy', `FT_Bitmap_Embolden', `FT_Bitmap_Done') has been added. Its use is to convert an FT_Bitmap structure in 1bpp, 2bpp, 4bpp, or 8bpp format into another 8bpp FT_Bitmap, probably using a different pitch, and to further manipulate it. - A new API `FT_Outline_Embolden' (in FT_OUTLINE_H) gives finer control how outlines are emboldened. - `FT_GlyphSlot_Embolden' (in FT_SYNTHESIS_H) now handles bitmaps also (code contributed by Chia I Wu). Note that this function is still experimental and may be replaced with a better API. - The method how BDF and PCF bitmap fonts are accessed has been refined. Formerly, FT_Set_Pixel_Sizes and FT_Set_Char_Size were synonyms in FreeType's BDF and PCF interface. This has changed now. FT_Set_Pixel_Sizes should be used to select the actual font dimensions (the `strike', which is the sum of the `FONT_ASCENT' and `FONT_DESCENT' properties), while FT_Set_Char_Size selects the `nominal' size (the `PIXELSIZE' property). In both functions, the width parameter is ignored. III. MISCELLANEOUS - The BDF driver no longer converts all returned bitmaps with a depth of 2bpp or 4bpp to a depth of 8bpp. The documentation has not mentioned this explicitly, but implementors might have relied on this after looking into the source files. - A new option `--ftversion' has been added to freetype-config to return the FreeType version. - The memory debugger has been updated to dump allocation statistics on all allocation sources in the library. This is useful to spot greedy allocations when loading and processing fonts. - We removed a huge array of constant pointers to constant strings in the `psnames' module. The problem was that compilations in PIC mode (i.e., when generating a Unix shared object/dll) put the array into the non-shared writable section of the library since absolute pointers are not relocatable by nature. This reduces the memory consumption by approximately 16KByte per process linked to FreeType. We now also store the array in a compressed form (as a trie) which saves about 20KByte of code as well. - Kirill Smelkov provided patches to make src/raster/ftraster.c compile stand-alone again. ====================================================================== CHANGES BETWEEN 2.1.9 and 2.1.8 I. IMPORTANT BUG FIXES - The function `FT_Get_CharMap_Index' was only declared, without any real code. For consistency, it has been renamed to `FT_Get_Charmap_Index'. (This function is needed to implement cmap caches.) - `FT_Outline_Get_BBox' sometimes returned incorrect values for conic outlines (e.g., for TrueType fonts). - Handling of `bhed' table has been fixed. - The TrueType driver with enabled byte code interpreter sometimes returned artifacts due to incorrect rounding. This bug has been introduced after version 2.1.4. - The BDF driver dropped the last glyph in the font. - The BDF driver now uses the DEFAULT_CHAR property (if available) to select a glyph shape for the undefined glyph. - The stroker failed for closed outlines and single points. II. IMPORTANT CHANGES - George Williams contributed code to handle Apple's font distortion technology found in GX fonts (`avar', `cvar', `fvar', and `gvar' tables; the Multiple Masters API has been slightly extended to cope with the new functionality). - The `FT_GlyphSlotRec' structure has been extended: The elements `lsb_delta' and `rsb_delta' give the difference between hinted and unhinted left and right side bearings if autohinting is active. Using those values can improve the inter-letter spacing considerably. See the documentation of `FT_GlyphSlotRec' and the `ftstring' demo program how to use it. - Loading TrueType and Type 1 fonts has been made much faster. - The stroker is no longer experimental (but the cache subsystem still is). III. MISCELLANEOUS - A new documentation file `formats.txt' describes various font formats supported (and not supported) by FreeType. ====================================================================== CHANGES BETWEEN 2.1.8 and 2.1.7 I. IMPORTANT BUG FIXES - The native TrueType hinter contained some bugs which prevented some fonts to be rendered correctly, most notably Legendum.otf. - The PostScript hinter now produces improved results. - The linear advance width and height values were incorrectly rounded, making them virtually unusable if not loaded with FT_LOAD_LINEAR_DESIGN. - Indexing CID-keyed CFF fonts is now working: The glyph index is correctly treated as a CID, similar to FreeType's CID driver module. Note that CID CMap support is still missing. - The FT_FACE_FLAG_GLYPH_NAMES flag is now set correctly for all font formats. - Some subsetted Type 1 fonts weren't parsed correctly. This bug has been introduced in 2.1.7. In summary, the Type 1 parser has become more robust. - Non-decimal numbers weren't parsed correctly in PS fonts. - The WinFNT driver now correctly reports FT_ENCODING_NONE for all but one encoding. Use the new FT_WinFNT_ID_XXX values together with `FT_Get_WinFNT_Header' to get the WinFNT charset ID. - The descender metrics (face->size->metrics.descender) for WinFNT bitmap fonts had the wrong sign. - The (emulated) `seac' support for CFF fonts was broken. - The `flex' operator didn't work for CFF fonts. - PS glyphs which use the `hintmask' operator haven't been rendered correctly in some cases. - Metrics for BDF and PCF bitmap font formats have been fixed. - Autohinting is now disabled for glyphs which are vertically distorted or mirrored (using a transformation matrix). This fixes a bug which produced zero-height glyphs. - The `freetype-config' script now handles --prefix and --exec-prefix correctly; it also returns the proper --rpath (or -R) value if FreeType has been built as a shared library. II. IMPORTANT CHANGES - Both PCF and BDF drivers now handle the SETWIDTH_NAME and ADD_STYLE_NAME properties. Values are appended to face->style_name; example: `Bold SemiCondensed'. - The PCF driver now handles bitmap fonts compressed with the LZW algorithm (extension .pcf.Z, compressed with `compress'). - A new API function `FT_Get_CMap_Language_ID' (declared in `tttables.h') is available to get the language ID of a TrueType/SFNT cmap. - The hexadecimal format of data after the `StartData' command in CID-keyed Type 1 fonts is now supported. While this can't occur in file-based fonts, it can happen in document-embedded resources of PostScript documents. - Embedded bitmaps in SFNT-based CFF fonts are now supported. - A simple API is now available to control FreeType's tracing mechanism if compiled with FT_DEBUG_LEVEL_TRACE. See the file `ftdebug.h' for more details. - YAMATO Masatake contributed improved handling of MacOS resource forks on non-MacOS platforms (for example, Linux can mount MacOS file systems). - Support for MacOS has been improved; there is now a new function `FT_New_Face_From_FSSpec' similar to `FT_New_Face' except that it accepts an FSSpec instead of a path. - The cache sub-system has been rewritten. - There is now support for deinstallation of faces. - A new API function `FTC_Manager_RemoveFaceID' has been added to delete all `idle' nodes that correspond to a given FTC_FaceID. All `locked' nodes (i.e., those with a reference count > 0), will be modified to prevent them from appearing in further lookups (they will be cleaned normally when their reference count reaches 0). - There is now support for point scaling (i.e., providing character sizes in points + dpis, instead of pixels). - Three abstract cache classes are now available: FTC_GCache: Used to store one glyph item per cache node, with the ability to group common attributes into `families'. This replaces the old FTC_GlyphCache class. FTC_ICache: Used to store one FT_Glyph per cache node. This extends FTC_GCache. Family definition, family comparison, and glyph loading are however left to sub-classes. FTC_SCache: Used to store up to 16 small bitmaps per cache node. This extends FTC_GCache. Family definition, family comparison and glyph loading are however left to sub-classes. - The file `src/cache/ftcbasic.c' implements: FTC_ImageCache: Extends FTC_ICache; implements family definitions and glyph loading similar to the old API. FTC_SBitCache: Extends FTC_SCache, implements family definitions and glyph loading similar to the old API Client applications should be able to extend FTC_GCache, FTC_ICache, or FTC_SCache much more easily (i.e., less code to write, and less callbacks). For example, one could envision caches that are capable of storing transformed (obliqued), stroked, emboldened, or colored glyph images. Use `ftcbasic.c' as an example. - All public APIs are now in `include/freetype/ftcache.h', (to be accessed as `FT_CACHE_H'). The contents of `include/freetype/cache/' is only needed by applications that wish to implement their own caches. - There were some major performance improvements through the use of various programming tricks. Cache hits are up to 70% faster than in the old code. - The FTC_CMapCache has been simplified. Charmaps can only be accessed by index right now. There is also a new API named `FT_Charmap_GetIndex' for this purpose. - The demo programs have been updated to the new code. The previous versions will not work with the current one. - Using an invalid face index in FT_Open_Face and friends now causes an error even if the font contains a single face only. III. MISCELLANEOUS - Wolfgang Domröse contributed support files for building FreeType on the Atari using the PureC compiler. Note that the Atari is a 16bit platform. - Vitaliy Pasternak contributed project files for VS.NET 2003. ====================================================================== CHANGES BETWEEN 2.1.7 and 2.1.6 I. IMPORTANT BUG FIXES - Updated to newest libtool version, fixing build problems on various platforms. - On Unix platforms, `make install' didn't copy the correct `ftconfig.h' file. Note that version 2.1.7 contains the same library C source code as version 2.1.6. ====================================================================== CHANGES BETWEEN 2.1.6 and 2.1.5 I. IMPORTANT BUG FIXES - The PFR font driver didn't load kerning tables correctly, and the functions in FT_PFR_H didn't work at all. - Type 1 font files in binary format (PFB) with an end-of-file indicator weren't accepted by the FreeType engine. - Fonts which contain /PaintType and /StrokeWidth no longer cause a segfault. This bug has been introduced in version 2.1.5. - Fonts loaded with FT_LOAD_RENDER no longer cause strange results. This bug has been introduced in version 2.1.5. - Some Windows (bitmap) FNT/FON files couldn't be handled correctly. II. IMPORTANT CHANGES - The internal module API has been heavily changed in favor of massive simplifications within the font engine. This also means that authors of third-party modules must adapt their code to the new scheme. NOTE: THE NEW SCHEME IS NOT COMPLETED YET. PLEASE WAIT UNTIL A FINAL ANNOUNCEMENT! - The PostScript parser has been enhanced to handle comments and strings correctly. Additionally, more syntax forms are recognized. - Added the optional unpatented hinting system for TrueType. It allows typefaces which need hinting to produce correct glyph forms (e.g., Chinese typefaces from Dynalab) to work acceptably without infringing Apple patents. This system is compiled only if TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING is defined in ftoption.h (activated by default). III. MISCELLANEOUS - There is now a guard in the public header files to protect against inclusion of freetype.h from FreeType 1. - Direct inclusion of freetype.h and other public header files no longer works. You have to use the documented scheme #include <ft2build.h> #include FT_FREETYPE_H to load freetype.h with a symbolic name. This protects against renaming of public header files (which shouldn't happen but actually has, avoiding two public header files with the same name). ====================================================================== CHANGES BETWEEN 2.1.5 and 2.1.4 I. IMPORTANT BUG FIXES - Parsing the /CIDFontName field now removes the leading slash to be in sync with other font drivers. - gzip support was buggy. Some fonts could not be read. - Fonts which have nested subglyphs more than one level deep no longer cause a segfault. - Creation of synthetic cmaps for fonts in CFF format was broken partially. - Numeric font dictionary entries for synthetic fonts are no longer overwritten. - The font matrix wasn't applied to the advance width for Type1, CID, and CFF fonts. This caused problems when loading certain synthetic Type 1 fonts like `Helvetica Narrow'. - The test for the charset registry in BDF and PCF fonts is now case-insensitive. - FT_Vector_Rotate sometimes returned strange values due to rounding errors. - The PCF driver now returns the correct number of glyphs (including an artificial `notdef' glyph at index 0). - FreeType now supports buggy CMaps which are contained in many CJK fonts from Dynalab. - Opening an invalid font on a Mac caused a segfault due to double-freeing memory. - BDF fonts with more than 32768 glyphs weren't supported properly. II. IMPORTANT CHANGES - Accessing bitmap font formats has been synchronized. To do that the FT_Bitmap_Size structure has been extended to contain new fields `size', `x_ppem', and `y_ppem'. - The FNT driver now returns multiple faces, not multiple strikes. - The `psnames' module has been updated to the Adobe Glyph List version 2.0. - The `psnames' module now understands `uXXXX[X[X]]' glyph names. - The algorithm for guessing the font style has been improved. - For fonts in SFNT format, root->height is no longer increased if the line gap is zero. There exist fonts (containing e.g. form drawing characters) which intentionally have a zero line gap value. - ft_glyph_bbox_xxx flags are now deprecated in favour of FT_GLYPH_BBOX_XXX. - ft_module_xxx flags are now deprecated in favour of FT_MODULE_XXX. - FT_ENCODING_MS_{SJIS,GB2312,BIG5,WANSUNG,JOHAB} are now deprecated in favour of FT_ENCODING_{SJIS,GB2312,BIG5,WANSUNG,JOHAB} -- those encodings are not specific to Microsoft. III. MISCELLANEOUS - The autohinter has been further improved; for example, `m' glyphs now retain its vertical symmetry. - Partial support of Mac fonts on non-Mac platforms. - `make refdoc' (after first `make') builds the HTML documentation. You need Python for this. - The make build system should now work more reliably on DOS-like platforms. - Support for EMX gcc and Watson C/C++ compilers on MS-DOS has been added. - Better VMS build support. - Support for the pkg-config package by providing a `freetype.pc' file. - New configure option --with-old-mac-fonts for Darwin. - Some source files have been renamed (mainly to fit into the 8.3 naming scheme). ====================================================================== CHANGES BETWEEN 2.1.4 and 2.1.3 I. IMPORTANT BUG FIXES - Updated to newest libtool version, fixing build problems on various platforms. - A fix in the Gzip stream reader: It couldn't read certain .gz files properly due to a small typo. In certain cases, FreeType could also loop endlessly when trying to load tiny gzipped files. - The configure script now tries to use the system-wide zlib when it finds one (instead of the copy found in src/gzip). And `freetype-config' has been updated to return relevant flags in this case when invoked with `--libs' (e.g. `-lzlib'). - Certain fonts couldn't be loaded by 2.1.3 because they lacked a Unicode charmap (e.g. SYMBOL.TTF). FreeType erroneously rejected them. - The CFF loader was modified to accept fonts which only contain a subset of their reference charset. This prevented the correct use of PDF-embedded fonts. - The logic to detect Unicode charmaps has been modified. This is required to support fonts which include both 16-bit and 32-bit charmaps (like very recent asian ones) using the new 10 and 12 SFNT formats. - The TrueType loader now limits the depth of composite glyphs. This is necessary to prevent broken fonts to break the engine by blowing the stack with recursive glyph definitions. - The CMap cache is now capable of managing UCS-4 character codes that are mapped through extended charmaps in recent TrueType/OpenType fonts. - The cache sub-system now properly manages out-of-memory conditions instead of blindly reporting them to the caller. This means that it will try to empty the cache before restarting its allocations to see if that can help. - The PFR driver didn't return the list of available embedded bitmaps properly. - There was a nasty memory leak when using embedded bitmaps in certain font formats. II. IMPORTANT CHANGES - David Chester contributed some enhancements to the auto-hinter that significantly increase the quality of its output. The Postscript hinter was also improved in several ways. - The FT_RENDER_MODE_LIGHT render mode was implemented. - A new API function called `FT_Get_BDF_Property' has been added to FT_BDF_H to retrieve BDF properties from BDF _and_ PCF font files. THIS IS STILL EXPERIMENTAL, since it hasn't been properly tested yet. - A Windows FNT specific API has been added, mostly to access font headers. This is used by Wine. - TrueType tables without an `hmtx' table are now tolerated when an incremental interface is used. This happens for certain Type42 fonts passed from Ghostscript to FreeType. - The PFR font driver is now capable of returning the font family and style names when they are available (instead of the sole `FontID'). This is performed by parsing an *undocumented* portion of the font file! III. MISCELLANEOUS - The path stroker in FT_STROKER_H has entered beta stage. It now works very well, but its interface might change a bit in the future. More on this in later releases. - The documentation for FT_Size_Metrics didn't appear properly in the API reference. - The file docs/VERSION.DLL has been updated to explain versioning with FreeType (i.e., comparing release/libtool/so numbers, and how to use them in autoconf scripts). - The installation documentation has been seriously revamped. Everything is now in the `docs' directory. ====================================================================== CHANGES BETWEEN 2.1.3 and 2.1.2 I. IMPORTANT BUG FIXES - FT_Vector_Transform had been incorrectly modified in 2.1.2, resulting in incorrect transformations being applied (for example, rotations were processed in opposite angles). - The format 8 and 12 TrueType charmap enumeration routines have been fixed (FT_Get_Next_Char returned invalid values). - The PFR font driver returned incorrect advance widths if the outline and metrics resolution defined in the font file were different. - FT_Glyph_To_Bitmap now returns successfully when called with an FT_BitmapGlyph argument (it previously returned an error). - A bug in the Type 1 loader that prevented valid font bounding boxes to be loaded from multiple master fonts. - The SFNT validation code has been rewritten. FreeType can now load `broken' fonts that were usable on Windows, but not with previous versions of the library. - The computation of bearings in the BDF driver has been fixed. - The Postscript hinter crashed when trying to hint certain glyphs (more precisely, when trying to apply hints to an empty glyph outline). - The TrueType glyph loader now supports composites in `Apple format' (they differ slightly from Microsoft/OpenType ones in the way transformation offsets are computed). - FreeType was very slow at opening certain asian CID/CFF fonts, due to fixed increment in dynamic array re-allocations. This has been changed to exponential behaviour to get acceptable performance. II. IMPORTANT CHANGES - The PCF driver now supports gzip-compressed font files natively. This means that you will be able to use all these bitmap fonts that come with XFree86 with FreeType (and libXft/libXft2, by extension). - The automatic and postscript hinters have both been updated. This results in a relatively important increase of rendering quality since many nasty defaults have been suppressed. Please visit the web page: https://www.freetype.org/hinting/smooth-hinting.html for additional details on this topic. - The `load_flags' parameter of `FT_Load_Glyph' is now an FT_Int32 (instead of just being an FT_Int). This breaks source and binary compatibility for 16bit systems only, while retaining both of them for 32 and 64 bit ones. Some new flags have been added consequently: FT_LOAD_NO_AUTOHINT :: Disable the use of the auto-hinter (but not native format hinters). FT_LOAD_TARGET_NORMAL :: Hint and render for normal anti-aliased displays. FT_LOAD_TARGET_MONO :: Hint and render for 1-bit displays. FT_LOAD_TARGET_LCD :: Hint and render for horizontal RGB or BGR subpixel displays (like LCD screens). THIS IS STILL EXPERIMENTAL! FT_LOAD_TARGET_LCD_V :: Same as FT_LOAD_TARGET_LCD, for vertical subpixel displays (like rotated LCD screens). THIS IS STILL EXPERIMENTAL! FT_LOAD_MONOCHROME is still supported, but only affects rendering, not the hinting. Note that the `ftview' demo program available in the `ft2demos' package has been updated to support LCD-optimized display on non-paletted displays (under Win32 and X11). - The PFR driver now supports embedded bitmaps (all formats supported), and returns correct kerning metrics for all glyphs. - The TrueType charmap loader now supports certain `broken' fonts that load under Windows without problems. - The cache API has been slightly modified (it's still a beta!): - The type FTC_ImageDesc has been removed; it is now replaced by FTC_ImageTypeRec. Note that one of its fields is a `load_flag' parameter for FT_Load_Glyph. - The field `num_grays' of FT_SBitRec has been changed to `max_grays' in order to fit within a single byte. Its maximum value is thus 255 (instead of 256 as previously). III. MISCELLANEOUS - Added support for the DESTDIR variable during `make install'. This simplifies packaging of FreeType. - Included modified copies of the ZLib sources in `src/gzip' in order to support gzip-compressed PCF fonts. We do not use the system-provided zlib for now, though this is a probable enhancement for future releases. - The DocMaker tool used to generate the on-line API reference has been completely rewritten. It is now located in `src/tools/docmaker/docmaker.py'. Features: - better cross-referenced output - more polished output - uses Python regular expressions (though it didn't speed the program) - much more modular structure, which allows for different `backends' in order to generate HTML, XML, or whatever format. One can regenerate the API reference by calling: python src/tools/docmaker/docmaker.py \ --prefix=ft2 \ --title=FreeType-2.1.3 \ --output=<outputdirectory> include/freetype/*.h \ include/freetype/config/*.h \ include/freetype/cache/*.h - A new, experimental, support for incremental font loading (i.e., loading of fonts where the glyphs are not in the font file itself, but provided by an external component, like a Postscript interpreter) has been added by Graham Asher. This is still work in progress, however. - A new, EXPERIMENTAL, path stroker has been added. It doesn't suffer from severe rounding errors and treat bezier arcs directly. Still work in progress (i.e. not part of the official API). See the file <freetype/ftstroker.h> for some of the details. - The massive re-formatting of sources and internal re-design is still under-way. Many internal functions, constants, and types have been renamed. ====================================================================== CHANGES BETWEEN 2.1.2 and 2.1.1 I. IMPORTANT BUG FIXES - Many font drivers didn't select a Unicode charmap by default when a new face was opened (with the FT_CONFIG_OPTION_USE_CMAPS options enabled), causing many applications to not be able to display text correctly with the 2.1.x releases. - The PFR driver had a bug in its composite loading code that produces incorrectly placed accents with many fonts. - The Type42 driver crashed sometimes due to a nasty bug. - The Type 1 custom encoding charmap didn't handle the case where the first glyph index wasn't 0. - A serious typo in the TrueType composite loader produced incorrectly placed glyphs in fonts like `Wingdings' and a few others. II. MISCELLANEOUS - The Win32 Visual C++ project file has been updated to include the PFR driver as well. - `freetype.m4' is now installed by default by `make install' on Unix systems. - The function FT_Get_PS_Font_Info now works with CID and Type42 fonts as well. ====================================================================== CHANGES BETWEEN 2.1.1 and 2.1.0 I. IMPORTANT BUG FIXES - The `version_info' returned by `freetype-config' in 2.1.0 returned an invalid value. It now returns 9:1:3 (2.0.9 returned 9:0:3). - Version 2.1.0 couldn't be linked against applications on Win32 and Amiga systems due to a new debug function that wasn't properly propagated to the system-specific directory in `builds'. - Various MacOS and Mac OS X specific fixes. - Fixed a bug in the TrueType charmap validation routines that made version 2.1.0 too restrictive -- many popular fonts have been rejected. - There was still a very small difference between the monochrome glyph bitmaps produced by FreeType 1.x and FreeType 2.x with the bytecode interpreter enabled. This was caused by an invalid flag setting in the TrueType glyph loader, making the rasterizer change its drop-out control mode. Now the results should _really_ be completely identical. - The TrueType name table loader has been improved to support many popular though buggy Asian fonts. It now ignores empty name entries, invalid pointer offsets and a few other incorrect subtleties. Moreover, name strings are now loaded on demand, which reduces the memory load of many faces (e.g. the ARIAL.TTF font file contains a 10kByte name table with 70 names). - Fixed a bug in the Postscript hinter that prevented family blues substitution to happen correctly. II. NEW FEATURES - Three new font drivers in this release: * A BDF font driver, contributed by Franco Zappa Nardelli, heavily modified by Werner Lemberg. It also supports anti-aliased bitmaps (using a slightly extended BDF format). * A Type42 font driver, contributed by Roberto Alameda. It is still experimental but seems to work relatively well. * A PFR font driver, contributed by David Turner himself. It doesn't support PFR hinting -- note that BitStream has at least two patents on this format! III. MISCELLANEOUS - The cache sub-system has been optimized in important ways. Cache hits are now significantly faster. For example, using the CMap cache is about twice faster than calling FT_Get_Char_Index on most platforms. Similarly, using an SBit cache is about five times faster than loading the bitmaps from a bitmap file, and 300 to 500 times faster than generating them from a scalable format. Note that you should recompile your sources if you designed a custom cache class for the FT2 Cache subsystem, since the changes performed are source, but not binary, compatible. ====================================================================== CHANGES BETWEEN 2.1.0 and 2.0.9 I. IMPORTANT BUG FIXES - The TrueType bytecode interpreter has been fixed to produce _exactly_ the same output as FreeType 1.x. Previous differences were due to slightly distinct fixed-point computation routines used to perform dot products and vector length measurements. It seems that native TrueType hinting is _extremely_ sensitive to rounding errors. The required vector computation routines have been optimized and placed within the `ttinterp.c' file. - Fixed the parsing of accelerator tables in the PCF font driver. - Fixed the Type1 glyph loader routine used to compute the font's maximum advance width. II. NEW FEATURES - The `configure' script used on Unix systems has been modified to check that GNU Make is being used to build the library. Otherwise, it will display a message proposing to use the GNUMAKE environment variable to name it. The Unix-specific file README.UNX has been modified accordingly. III. MISCELLANEOUS - The FreeType License in `docs/FTL.TXT' has been updated to include a proposed preferred disclaimer. If you are using FreeType in your products, you are encouraged (but not mandated) to use the following text in your documentation: """ Portions of this software are copyright © 1996-2002 The FreeType Project (www.freetype.org). All rights reserved. """ - The default size of the render pool has been reduced to 16kByte. This shouldn't result in any noticeable performance penalty, unless you are using the engine as-is to render very large and complex glyphs. - The FreeType 2 redesign has begun. More information can be found at this URL: https://www.freetype.org/freetype2/redesign.html The following internal changes have been performed within the sources of this release: - Many internal types have been renamed to increase consistency. The following should be true, except for public types: * All structure types have a name ending in `Rec' (short for `record'). * A pointer-to-structure type has the same name as the structure, _without_ the `Rec' suffix. Example: typedef struct FooRec_ { ... } FooRec, *Foo; - Many internal macros have been renamed to increase consistency. The following should be true: * All macros have a name beginning with `FT_'. This required a few changes like ALLOC => FT_ALLOC FREE => FT_FREE REALLOC => FT_REALLOC * All macros are completely UPPERCASE. This required a few changes like: READ_Short => FT_READ_SHORT NEXT_Short => FT_NEXT_SHORT GET_ULongLE => FT_GET_ULONG_LE MEM_Set => FT_MEM_SET MEM_Copy => FT_MEM_COPY etc. * Whenever possible, all macro names follow the FT_<OBJECT>_<METHOD> pattern. For example ACCESS_Frame => FT_FRAME_ENTER FORGET_Frame => FT_FRAME_EXIT EXTRACT_Frame => FT_FRAME_EXTRACT RELEASE_Frame => FT_FRAME_RELEASE FILE_Pos => FT_STREAM_POS FILE_Seek => FT_STREAM_SEEK FILE_Read => FT_STREAM_READ FILE_ReadAt => FT_STREAM_READ_AT READ_Fields => FT_STREAM_READ_FIELDS - Many internal functions have been renamed to follow the FT_<Object>_<Method> pattern. For example: FT_Seek_Stream => FT_Stream_Seek FT_Read_Stream_At => FT_Stream_ReadAt FT_Done_Stream => FT_Stream_Close FT_New_Stream => FT_Stream_Open FT_New_Memory_Stream => FT_Stream_OpenMemory FT_Extract_Frame => FT_Stream_ExtractFrame Note that method names do not contain `_'. - The FT_ALLOC_ARRAY and FT_REALLOC_ARRAY have been replaced with FT_NEW_ARRAY and FT_RENEW_ARRAY which do not take a type as the fourth argument. Instead, the array element type size is computed automatically from the type of the target pointer used. - A new object class, FT_CMap, has been introduced. These internal objects are used to model character maps. This eases the support of additional charmap types within the engine. - A new configuration file named `ftstdlib.h' has been added to `include/freetype/config'. It is used to define aliases for _every_ routine of the ISO C library that the font engine uses. Each aliases has a `ft_' prefix (e.g. `ft_strlen' is an alias for `strlen'). This is used to ease the porting of FreeType 2 to exotic runtime environments where the ISO C Library isn't available (e.g. XFree86 extension modules). More details are available in the `ChangeLog' file. ====================================================================== CHANGES BETWEEN 2.0.9 and 2.0.8 I. IMPORTANT BUG FIXES - Certain fonts like `foxjump.ttf' contain broken name tables with invalid entries and wild offsets. This caused FreeType to crash when trying to load them. The SFNT `name' table loader has been fixed to be able to support these strange fonts. Moreover, the code in charge of processing this table has been changed to always favour Windows-formatted entries over other ones. Hence, a font that works on Windows but not on the Mac will load cleanly in FreeType and report accurate values for Family & PostScript names. - The CID font driver has been fixed. It unfortunately returned a Postscript Font name with a leading slash, as in `/MunhwaGothic-Regular'. - FreeType 2 should now compile fine on AIX 4.3.3 as a shared library. - A bug in the Postscript hinter has been found and fixed, removing un-even stem widths at small pixel sizes (like 14-17). This improves the quality of a certain number of Postscript fonts. II. NEW FEATURES - A new function named `FT_Library_Version' has been added to return the current library's major, minor, and patch version numbers. This is important since the macros FREETYPE_MAJOR, FREETYPE_MINOR, and FREETYPE_PATCH cannot be used when the library is dynamically linked by a program. - Two new APIs have been added: `FT_Get_First_Char' and `FT_Get_Next_Char'. Together, these can be used to iterate efficiently over the currently selected charmap of a given face. Read the API reference for more details. III. MISCELLANEOUS - The FreeType sources are under heavy internal re-factoring. As a consequence, we have created a branch named `STABLE' on the CVS to hold all future releases/fixes in the 2.0.x family. The HEAD branch now contains the re-factored sources and shouldn't be used for testing or packaging new releases. In case you would like to access the 2.0.9 sources from our CVS repository, use the tag `VER-2-0-9'. ====================================================================== CHANGES BETWEEN 2.0.8 and 2.0.7 I. IMPORTANT BUG FIXES - There was a small but nasty bug in `freetype-config.in' which caused the `freetype-config' script to fail on Unix. This didn't prevent the installation of the library or even its execution, but caused problems when trying to compile many Unix packages that depend on it. - Some TrueType or OpenType fonts embedded in PDF documents do not have a 'cmap', 'post' and 'name' as is required by the specification. FreeType no longer refuses to load such fonts. - Various fixes to the PCF font driver. ====================================================================== CHANGES BETWEEN 2.0.7 and 2.0.6 I. IMPORTANT BUG FIXES - Fixed two bugs in the Type 1 font driver. The first one resulted in a memory leak in subtle cases. The other one caused FreeType to crash when trying to load `.gsf' files (Ghostscript so-called Postscript fonts). (This made _many_ KDE applications crash on certain systems. FreeType _is_ becoming a critical system component on Linux :-) - Fixed a memory leak in the CFF font driver. - Fixed a memory leak in the PCF font driver. - Fixed the Visual C++ project file `builds/win32/visualc/freetype.dsp' since it didn't include the Postscript hinter component, causing errors at build time. - Fixed a small rendering bug in the anti-aliased renderer that only occurred when trying to draw thin (less than 1 pixel) strokes. - Fixed `builds/unix/freetype2.a4' which is used to generate a valid `freetype2.m4' for use with autoconf. - Fixed the OpenVMS Makefiles. II. MISCELLANEOUS - Added `configure' and `install' scripts to the top-level directory. A GNU-style installation is thus now easily possible with ./configure <options> make make install ====================================================================== CHANGES BETWEEN 2.0.6 and 2.0.5 I. IMPORTANT BUG FIXES - It wasn't possible to load embedded bitmaps when the auto-hinter was used. This is now fixed. - The TrueType font driver didn't load some composites properly (the sub-glyphs were slightly shifted, and this was only noticeable when using monochrome rendering). - Various fixes to the auto-hinter. They merely improve the output of sans-serif fonts. Note that there are still problems with serifed fonts and composites (accented characters). - All scalable font drivers erroneously returned un-fitted glyph advances when hinting was requested. This created problems for a number of layout applications. This is a very old bug that got undetected mainly because most test/demo program perform rounding explicitly or implicitly (through the cache). - `FT_Glyph_To_Bitmap' did erroneously modify the source glyph in certain cases. - `glnames.py' still contained a bug that made FreeType return invalid names for certain glyphs. - The library crashed when loading certain Type 1 fonts like `sadn.pfb' (`Stalingrad Normal'), which appear to contain pathetic font info dictionaries. - The TrueType glyph loader is now much more paranoid and checks everything when loading a given glyph image. This was necessary to avoid problems (crashes and/or memory overwrites) with broken fonts that came from a really buggy automatic font converter. II. IMPORTANT UPDATES AND NEW FEATURES - Important updates to the Mac-specific parts of the library. - The caching sub-system has been completely re-designed, and its API has evolved (the old one is still supported for backward compatibility). The documentation for it is not yet completed, sorry. For now, you are encouraged to continue using the old API. However, the ftview demo program in the ft2demos package has already been updated to use the new caching functions. - A new charmap cache is provided too. See `FTC_CMapCache'. This is useful to perform character code -> glyph index translations quickly, without the need for an opened FT_Face. - A NEW POSTSCRIPT HINTER module has been added to support native hints in the following formats: PostScript Type 1, PostScript CID, and CFF/CEF. Please test! Note that the auto-hinter produces better results for a number of badly-hinted fonts (mostly auto-generated ones) though. - A memory debugger is now part of the standard FreeType sources. To enable it, define FT_DEBUG_MEMORY in <freetype/config/ftoption.h>, and recompile the library. Additionally, define the _environment_ variable FT_DEBUG_MEMORY and run any program using FreeType. When the library is exited, a summary of memory footprints and possible leaks will be displayed. This works transparently with _any_ program that uses FreeType. However, you will need a lot of memory to use this (allocated blocks are never released to the heap to detect double deletes easily). III. MISCELLANEOUS - We are aware of subtle differences between the output of FreeType versions 1 and 2 when it comes to monochrome TrueType-hinted glyphs. These are most probably due to small differences in the monochrome rasterizers and will be worked out in an upcoming release. - We have decided to fork the sources in a `stable' branch, and an `unstable' one, since FreeType is becoming a critical component of many Unix systems. The next bug-fix releases of the library will be named 2.0.7, 2.0.8, etc., while the `2.1' branch will contain a version of the sources where we will start major reworking of the library's internals, in order to produce FreeType 2.2.0 (or even 3.0) in a more distant future. We also hope that this scheme will allow much more frequent releases than in the past. ====================================================================== CHANGES BETWEEN 2.0.5 and 2.0.4 NOTE THAT 2.0.5 DOES NOT CONTAIN THE POSTSCRIPT HINTER. THIS MODULE WILL BE PART OF THE NEXT RELEASE (EITHER 2.0.6 or 2.1) - Fixed a bug that made certain glyphs, like `Cacute', `cacute' and `lslash' unavailable from Unicode charmaps of Postscript fonts. This prevented the correct display of Polish text, for example. - The kerning table of Type 1 fonts was loaded by FreeType, when its AFM file was attached to its face, but the FT_FACE_FLAG_HAS_KERNING bit flags was not set correctly, preventing FT_Get_Kerning to return meaningful values. - Improved SFNT (TrueType & OpenType) charmap support. Slightly better performance, as well as support for the new formats defined by the OpenType 1.3 specification (8, 10, and 12) - Fixed a serious typo in `src/base/ftcalc.c' which caused invalid computations in certain rare cases, producing ugly artefacts. - The size of the EM square is computed with a more accurate algorithm for Postscript fonts. The old one caused slight errors with embedded fonts found in PDF documents. - Fixed a bug in the cache manager that prevented normal LRU behaviour within the cache manager, causing unnecessary reloads (for FT_Face and FT_Size objects only). - Added a new function named `FT_Get_Name_Index' to retrieve the glyph index of a given glyph name, when found in a face. - Added a new function named `FT_Get_Postscript_Name' to retrieve the `unique' Postscript font name of a given face. - Added a new public header size named FT_SIZES_H (or <freetype/ftsizes.h>) providing new FT_Size-management functions: FT_New_Size, FT_Activate_Size, FT_Done_Size. - Fixed a reallocation bug that generated a dangling pointer (and possibly memory leaks) with Postscript fonts (in src/psaux/psobjs.c). - Many fixes for 16-bit correctness. - Removed many pedantic compiler warnings from the sources. - Added an Amiga build directory in `builds/amiga'. ====================================================================== CHANGES BETWEEN 2.0.4 and 2.0.3 - Fixed a rather annoying bug that was introduced in 2.0.3. Namely, the font transformation set through FT_Set_Transform was applied twice to auto-hinted glyphs, resulting in incorrectly rotated text output. - Fixed _many_ compiler warnings. FT2 should now compile cleanly with Visual C++'s most pedantic warning level (/W4). It already compiled fine with GCC and a few other compilers. - Fixed a bug that prevented the linear advance width of composite TrueType glyphs to be correctly returned. - Fixed the Visual C++ project files located in `builds/win32/visualc' (previous versions used older names of the library). - Many 32-bit constants have an `L' appended to their value, in order to improve the 16-bitness of the code. Someone is actually trying to use FT2 on an Atari ST machine! - Updated the `builds/detect.mk' file in order to automatically build FT2 on AIX systems. AIX uses `/usr/sbin/init' instead of `/sbin/init' and wasn't previously detected as a Unix platform by the FreeType build system. - Updated the Unix-specific portions of the build system (new libtool version, etc.). - The SFNT kerning loader now ensures that the table is sorted (since some problem fonts do not meet this requirement). ======================================================================= CHANGES BETWEEN 2.0.3 and 2.0.2 I. CHANGES TO THE MODULES / FONT DRIVERS - THE AUTO-HINTER HAS BEEN SLIGHTLY IMPROVED, in order to fix several annoying artefacts, mainly: - Blue zone alignment of horizontal stems wasn't performed correctly, resulting in artefacts like the `d' being placed one pixel below the `b' in some fonts like Time New Roman. - Overshoot thresholding wasn't performed correctly, creating unpleasant artefacts at large character pixel sizes. - Composite glyph loading has been simplified. This gets rid of various artefacts where the components of a composite glyphs were not correctly spaced. These are the last changes to the current auto-hinting module. A new hinting sub-system is currently in the work in order to support native hints in Type 1 / CFF / OpenType fonts, as well as globally improve rendering. - The PCF driver has been fixed. It reported invalid glyph dimensions for the fonts available on Solaris. - The Type 1, CID and CFF drivers have been modified to fix the computation of the EM size. - The Type 1 driver has been fixed to avoid a dangerous bug that crashed the library with non-conforming fonts (i.e. ones that do not place the .notdef glyph at position 0). - The TrueType driver had a rather subtle bug (dangling pointer when loading composite glyphs) that could crash the library in rare occasions! II. HIGH-LEVEL API CHANGES - The error code enumeration values have been changed. An error value is decomposed in a generic error code, and a module number. see <freetype/fterrors.h> for details. - A new public header file has been introduced, named FT_TRIGONOMETRY_H (include/freetype/fttrigon.h), providing trigonometric functions to compute sines, cosines, arctangents, etc. with 16.16 fixed precision. The implementation is based on the CORDIC algorithm and is very fast while being sufficiently accurate. III. INTERNALS - Added BeOS-specific files in the old build sub-system. Note that no changes were required to compile the library with Jam. - The configuration is now capable of automatically detecting 64-bit integers on a set of predefined compilers (GCC, Visual C++, Borland C++) and will use them by default. This provides a small performance boost. - A small memory leak that happened when opening 0-sized files (duh!) have been fixed. - Fixed bezier stack depth bug in the routines provided by the FT_BBOX_H header file. Also fixed similar bugs in the rasterizers. - The outline bounding box code has been rewritten to use direct computations, instead of bezier sub-division, to compute the exact bounding box of glyphs. This is slightly slower but more accurate. - The build system has been improved and fixed, mainly to support `make' on Windows 2000 correctly, avoid problems with `make distclean' on non Unix systems, etc. - Hexadecimal constants have been suffixed with `U' to avoid problems with certain compilers on 64-bit platforms. - A new directory named `src/tools' has been created. It contains Python scripts and simple unit test programs used to develop the library. - The DocMaker tool has been moved from `docs' to `src/tools' and has been updated with the following: - Now accepts the `--title=XXXX' or `-t XXXX' option from the command line to set the project's name in the generated API reference. - Now accepts the `--output=DIR' or `-o DIR' option from the command line to set the output directory for all generated HTML files. - Now accepts the `--prefix=XXXX' or `-p XXX' option from the command line to set the file prefix to use for all generated HTML files. - Now generates the current time/data on each generated page in order to distinguish between versions. DocMaker can be used with other projects now, not only FT2 (e.g. MLib, FTLayout, etc.). ====================================================================== CHANGES BETWEEN 2.0.2 and 2.0.1 I. CHANGES TO THE MODULES / FONT DRIVERS - THE TRUETYPE BYTECODE INTERPRETER IS NOW TURNED OFF, in order to avoid legal problems with the Apple patents. It seems that we mistakenly turned this option on in previous releases of the build. Note that if you want to use the bytecode interpreter in order to get high-quality TrueType rendering, you will need to toggle by hand the definition of the TT_CONFIG_OPTION_BYTECODE_INTERPRETER macro in the file `include/freetype/config/ftoption.h'. - The CFF driver has been improved by Tom Kacvinsky and Sander van der Wal: * Support for `seac' emulation. * Support for `dotsection'. * Support for retrieving glyph names through `FT_Get_Glyph_Name'. The first two items are necessary to correctly a large number of Type 1 fonts converted to the CFF formats by Adobe Acrobat. - The Type 1 driver was also improved by Tom & others: * Better EM size computation. * Better support for synthetic (transformed) fonts. * The Type 1 driver returns the charstrings corresponding to each glyph in the `glyph->control_data' field after a call to `FT_Load_Glyph' (thanks Ha Shao). - Various other bugfixes, including the following: * Fixed a nasty memory leak in the Type 1 driver. * The autohinter and the pcf driver used static writable data when they shouldn't. * Many casts were added to make the code more 64-bits safe. It also now compiles on Windows XP 64-bits without warnings. * Some incorrect writable statics were removed in the `autohint' and `pcf' drivers. FreeType 2 now compiles on Epoc again. II. CHANGES TO THE HIGH-LEVEL API - The library header files inclusion scheme has been changed. The old scheme looked like: #include <freetype/freetype.h> #include <freetype/ftglyph.h> #include <freetype/ftcache.h> #include <freetype/cache/ftimage.h> Now you should use: #include <ft2build.h> #include FT_FREETYPE_H #include FT_GLYPH_H #include FT_CACHE_H #include FT_CACHE_IMAGE_H NOTE THAT THE OLD INCLUSION SCHEME WILL STILL WORK WITH THIS RELEASE. HOWEVER, WE DO NOT GUARANTEE THAT THIS WILL STILL BE TRUE IN THE NEXT ONE (A.K.A. FREETYPE 2.1). The file <ft2build.h> is used to define the header filename macros. The complete and commented list of macros is available in the API reference under the section name `Header File Macros' in Chapter I. For more information, see section I of the following document: https://www.freetype.org/freetype2/docs/tutorial/step1.html - Many, many comments have been added to the public source file in order to automatically generate the API Reference through the `docmaker.py' Python script. The latter has been updated to support the grouping of sections in chapters and better index sort. See: https://www.freetype.org/freetype2/docs/reference/ft2-toc.html III. CHANGES TO THE BUILD PROCESS - If you are not building FreeType 2 with its own build system (but with your own Makefiles or project files), you will need to be aware that the build process has changed a little bit. You don't need to put the `src' directory in the include path when compiling any FT2 component. Instead, simply put the component's directory in the current include path. So, if you were doing something like: cc -c -Iinclude -Isrc src/base/ftbase.c change the line to: cc -c -Iinclude -Isrc/base src/base/ftbase.c If you were doing something like: cd src/base cc -c -I../../include -I.. ftbase.c change it to: cd src/base cc -c -I../../include ftbase.c ====================================================================== CHANGES BETWEEN 2.0.1 and 2.0 2.0.1 introduces a few changes: - Fixed many bugs related to the support of CFF / OpenType fonts. These formats are now much better supported though there is still work planned to deal with charset tables and PDF-embedded CFF files that use the old `seac' command. - The library could not be compiled in debug mode with a very small number of C compilers whose pre-processors didn't implement the `##' directive correctly (i.e. per se the ANSI C specification!) An elegant fix was found. - Added support for the free Borland command-line C++ Builder compiler. Use `make setup bcc32'. Also fixed a few source lines that generated new warnings with BCC32. - Fixed a bug in FT_Outline_Get_BBox when computing the extrema of a conic Bezier arc. - Updated the INSTALL file to add IDE compilation. - Other minor bug fixes, from invalid Type 1 style flags to correct support of synthetic (obliqued) fonts in the auto-hinter, better support for embedded bitmaps in a SFNT font. - Fixed some problems with `freetype-config'. Finally, the `standard' scheme for including FreeType headers is now gradually changing, but this will be explained in a later release (probably 2.0.2). And very special thanks to Tom Kacvinsky and YAMANO-UCHI Hidetoshi for their contributions! ====================================================================== CHANGES BETWEEN beta8 and 2.0 - Changed the default installation path for public headers from `include/freetype' to `include/freetype2'. Also added a new `freetype-config' that is automatically generated and installed on Unix and Cygwin systems. The script itself is used to retrieve the current install path, C compilation flags as well as linker flags. - Fixed several small bugs: * Incorrect max advance width for fixed-pitch Type 1 fonts. * Incorrect glyph names for certain TrueType fonts. * The glyph advance was not copied when FT_Glyph_To_Bitmap was called. * The linearHoriAdvance and linearVertAdvance fields were not correctly returned for glyphs processed by the auto-hinter. * `type1z' renamed back to `type1'; the old `type1' module has been removed. - Revamped the build system to make it a lot more generic. This will allow us to re-use nearly un-modified in lots of other projects (including FreeType Layout). - Changed `cid' to use `psaux' too. - Added the cache sub-system. See <freetype/ftcache.h> as well as the sources in `src/cache'. Note that it compiles but is still untested for now. - Updated `docs/docmaker.py', a draft API reference is available at https://web.archive.org/web/20001215173400/http://www.freetype.org:80/ft2api.html. - Changed `type1' to use `psaux'. - Created a new module named `psaux' to hold the Type 1 & Type 2 parsing routines. It should be used by `type1', `cid', and `cff' in the future. - Fixed an important bug in `FT_Glyph_Get_CBox'. - Fixed some compiler warnings that happened since the TrueType bytecode decoder was deactivated by default. - Fixed two memory leaks: * The memory manager (16 bytes) isn't released in FT_Done_FreeType! * Using custom input streams, the copy of the original stream was never released. - Fixed the auto-hinter by performing automatic computation of the `filling direction' of each glyph. This is done through a simple and fast approximation, and seems to work (problems spotted by Werner though). The Arphic fonts are a lot nicer though there are still a lot of things to do to handle Asian fonts correctly. ====================================================================== BETA-8 (RELEASE CANDIDATE) CHANGES - Deactivated the TrueType bytecode interpreter by default. - Deactivated the `src/type1' font driver. Now `src/type1z' is used by default. - Updates to the build system. We now compile the library correctly under Unix system through `configure' which is automatically called on the first `make' invocation. - Added the auto-hinting module! Fixing some bugs here and there. - Found some bugs in the composite loader (seac) of the Type1-based font drivers. - Renamed the directory `freetype2/config' to `freetype2/builds' and updated all relevant files. - Found a memory leak in the `type1' driver. - Incorporated Tom's patches to support flex operators correctly in OpenType/CFF fonts. Now all I need is to support pure CFF and CEF fonts to be done with this driver :-) - Added the Windows FNT/FON driver in `src/winfonts'. For now, it always `simulates' a Unicode charmap, so it shouldn't be considered completed right now. It is there to be more a proof of concept than anything else anyway. The driver is a single C source file, that compiles to 3 Kb of code. I'm still working on the PCF/BDF drivers, but I'm too lazy to finish them now. - CHANGES TO THE HIGH-LEVEL API * FT_Get_Kerning has a new parameter that allows you to select the coordinates of the kerning vector (font units, scaled, scaled + grid-fitted). * The outline functions are now in <freetype/ftoutln.h> and not part of <freetype/freetype.h> anymore. * <freetype/ftmodule.h> now contains declarations for FT_New_Library, FT_Done_Library, FT_Add_Default_Modules. * The so-called convenience functions have moved from `ftoutln.c' to `ftglyph.c', and are thus available with this optional component of the library. They are declared in <freetype/ftglyph.h> now. * Anti-aliased rendering is now the default for FT_Render_Glyph (i.e. corresponds to render_mode == 0 == ft_render_mode_normal). To generate a monochrome bitmap, use ft_render_mode_mono, or the FT_LOAD_MONOCHROME flag in FT_Load_Glyph/FT_Load_Char. FT_LOAD_ANTI_ALIAS is still defined, but values to 0. * <freetype/freetype.h> now include <freetype/config/ftconfig.h>, solving a few headaches :-) * The type FT_GlyphSlotRec has now a `library' field. - CHANGES TO THE `ftglyph.h' API This API has been severely modified in order to make it simpler, clearer, and more efficient. It certainly now looks like a real `glyph factory' object, and allows client applications to manage (i.e. transform, bbox and render) glyph images without ever knowing their original format. - Added support for CID-keyed fonts to the CFF driver. Maybe support for pure CFF + CEF fonts should come in? - Cleaned up source code in order to avoid two functions with the same name. Also changed the names of the files in `type1z' from `t1XXXX' to `z1XXXX' in order to avoid any conflicts. `make multi' now works well :-) Also removed the use of `cidafm' for now, even if the source files are still there. This functionality will certainly go into a specific module. - ADDED SUPPORT FOR THE AUTO-HINTER It works :-) I have a demo program which simply is a copy of `ftview' that does a `FT_Add_Module(library, &autohinter_module_class)' after library initialization, and Type 1 & OpenType/CFF fonts are now hinted. CID fonts are not hinted, as they include no charmap and the auto-hinter doesn't include `generic' global metrics computations yet. Now, I need to release this thing to the FreeType 2 source. - CHANGES TO THE RENDERER MODULES The monochrome and smooth renderers are now in two distinct directories, namely `src/raster1' and `src/smooth'. Note that the old `src/renderer' is now gone. I ditched the 5-gray-levels renderers. Basically, it involved a simple #define toggle in 'src/raster1/ftraster.c'. FT_Render_Glyph, FT_Outline_Render & FT_Outline_Get_Bitmap now select the best renderer available, depending on render mode. If the current renderer for a given glyph image format isn't capable of supporting the render mode, another one will be found in the library's list. This means that client applications do not need to switch or set the renderers themselves (as in the latest change), they'll get what they want automatically. At last. Changed the demo programs accordingly. - MAJOR INTERNAL REDESIGN: A lot of internal modifications have been performed lately on the source in order to provide the following enhancements: * More generic module support: The FT_Module type is now defined to represent a handle to a given module. The file <freetype/ftmodule.h> contains the FT_Module_Class definition, as well as the module-loading public API. The FT_Driver type is still defined, and still represents a pointer to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module, FT_Get_Driver by FT_Get_Module, etc. * Support for generic glyph image types: The FT_Renderer type is a pointer to a module used to perform various operations on glyph image. Each renderer is capable of handling images in a single format (e.g. ft_glyph_format_outline). Its functions are used to: - transform an glyph image - render a glyph image into a bitmap - return the control box (dimensions) of a given glyph image The scan converters `ftraster.c' and `ftgrays.c' have been moved to the new directory `src/renderer', and are used to provide two default renderer modules. One corresponds to the `standard' scan-converter, the other to the `smooth' one. he current renderer can be set through the new function FT_Set_Renderer. The old raster-related function FT_Set_Raster, FT_Get_Raster and FT_Set_Raster_Mode have now disappeared, in favor of the new: FT_Get_Renderer FT_Set_Renderer See the file <freetype/ftrender.h> for more details. These changes were necessary to properly support different scalable formats in the future, like bi-color glyphs, etc. * Glyph loader object: A new internal object, called a 'glyph loader' has been introduced in the base layer. It is used by all scalable format font drivers to load glyphs and composites. This object has been created to reduce the code size of each driver, as each one of them basically re-implemented its functionality. See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for more information. * FT_GlyphSlot has new fields: In order to support extended features (see below), the FT_GlyphSlot structure has a few new fields: linearHoriAdvance: This field gives the linearly scaled (i.e. scaled but unhinted) advance width for the glyph, expressed as a 16.16 fixed pixel value. This is useful to perform WYSIWYG text. linearVertAdvance: This field gives the linearly scaled advance height for the glyph (relevant in vertical glyph layouts only). This is useful to perform WYSIWYG text. Note that the two above field replace the removed `metrics2' field in the glyph slot. advance: This field is a vector that gives the transformed advance for the glyph. By default, it corresponds to the advance width, unless FT_LOAD_VERTICAL_LAYOUT was specified when calling FT_Load_Glyph or FT_Load_Char. bitmap_left: This field gives the distance in integer pixels from the current pen position to the left-most pixel of a glyph image IF IT IS A BITMAP. It is only valid when the `format' field is set to `ft_glyph_format_bitmap', for example, after calling the new function FT_Render_Glyph. bitmap_top: This field gives the distance in integer pixels from the current pen position (located on the baseline) to the top-most pixel of the glyph image IF IT IS A BITMAP. Positive values correspond to upwards Y. loader: This is a new private field for the glyph slot. Client applications should not touch it. * Support for transforms and direct rendering in FT_Load_Glyph: Most of the functionality found in <freetype/ftglyph.h> has been moved to the core library. Hence, the following: - A transform can be specified for a face through FT_Set_Transform. this transform is applied by FT_Load_Glyph to scalable glyph images (i.e. NOT TO BITMAPS) before the function returns, unless the bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags. - Once a glyph image has been loaded, it can be directly converted to a bitmap by using the new FT_Render_Glyph function. Note that this function takes the glyph image from the glyph slot, and converts it to a bitmap whose properties are returned in `face.glyph.bitmap', `face.glyph.bitmap_left' and `face.glyph.bitmap_top'. The original native image might be lost after the conversion. - When using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph and FT_Load_Char functions will call FT_Render_Glyph automatically when needed. - Reformatted all modules source code in order to get rid of the basic data types redefinitions (i.e. `TT_Int' instead of `FT_Int', `T1_Fixed' instead of `FT_Fixed'). Hence the format-specific prefixes like `TT_', `T1_', `T2_' and `CID_' are only used for relevant structures. ====================================================================== OLD CHANGES FOR BETA 7 - bug-fixed the OpenType/CFF parser. It now loads and displays my two fonts nicely, but I'm pretty certain that more testing is needed :-) - fixed the crummy Type 1 hinter, it now handles accented characters correctly (well, the accent is not always well placed, but that's another problem..) - added the CID-keyed Type 1 driver in `src/cid'. Works pretty well for only 13 Kb of code ;-) Doesn't read AFM files though, nor the really useful CMAP files.. - fixed two bugs in the smooth renderer (src/base/ftgrays.c). Thanks to Boris Letocha for spotting them and providing a fix. - fixed potential `divide by zero' bugs in ftcalc.c. - added source code for the OpenType/CFF driver (still incomplete though..) - modified the SFNT driver slightly to perform more robust header checks in TT_Load_SFNT_Header. This prevents certain font files (e.g. some Type 1 Multiple Masters) from being incorrectly `recognized' as TrueType font files.. - moved a lot of stuff from the TrueType driver to the SFNT module, this allows greater code re-use between font drivers (e.g. TrueType, OpenType, Compact-TrueType, etc..) - added a tiny segment cache to the SFNT Charmap 4 decoder, in order to minimally speed it up.. - added support for Multiple Master fonts in `type1z'. There is also a new file named <freetype/ftmm.h> which defines functions to manage them from client applications. The new file `src/base/ftmm.c' is also optional to the engine.. - various formatting changes (e.g. EXPORT_DEF -> FT_EXPORT_DEF) + small bug fixes in FT_Load_Glyph, the `type1' driver, etc.. - a minor fix to the Type 1 driver to let them apply the font matrix correctly (used for many oblique fonts..) - some fixes for 64-bit systems (mainly changing some FT_TRACE calls to use %p instead of %lx). Thanks to Karl Robillard. - fixed some bugs in the sbit loader (src/base/sfnt/ttsbit.c) + added a new flag, FT_LOAD_CROP_BITMAP to query that bitmaps be cropped when loaded from a file (maybe I should move the bitmap cropper to the base layer ??). - changed the default number of gray levels of the smooth renderer to 256 (instead of the previous 128). Of course, the human eye can't see any difference ;-) - removed TT_MAX_SUBGLYPHS, there is no static limit on the number of subglyphs in a TrueType font now.. ====================================================================== OLD CHANGES 16 May 2000 - tagged `BETA-6' in the CVS tree. This one is a serious release candidate even though it doesn't incorporate the auto-hinter yet.. - various obsolete files were removed, and copyright header updated - finally updated the standard raster to fix the monochrome rendering bug + re-enable support for 5-gray levels anti-aliasing (suck, suck..) - created new header files, and modified sources accordingly: <freetype/fttypes.h> - simple FreeType types, without the API <freetype/internal/ftmemory.h> - definition of memory-management macros - added the `DSIG' (OpenType Digital Signature) tag to <freetype/tttags.h> - light update/cleaning of the build system + changes to the sources in order to get rid of _all_ compiler warnings with three compilers, i.e: gcc with `-ansi -pedantic -Wall -W', Visual C++ with `/W3 /WX' and LCC IMPORTANT NOTE FOR WIN32-LCC USERS: | | It seems the C pre-processor that comes with LCC is broken, it | doesn't recognize the ANSI standard directives # and ## | correctly when one of the argument is a macro. Also, | something like: | | #define F(x) print##x | | F(("hello")) | | will get incorrectly translated to: | | print "hello") | | by its pre-processor. For this reason, you simply cannot build | FreeType 2 in debug mode with this compiler.. - yet another massive grunt work. I've changed the definition of the EXPORT_DEF, EXPORT_FUNC, BASE_DEF & BASE_FUNC macros. These now take an argument, which is the function's return value type. This is necessary to compile FreeType as a DLL on Windows and OS/2. Depending on the compiler used, a compiler-specific keyword like __export or __system must be placed before (VisualC++) or after (BorlandC++) the type.. Of course, this needed a lot of changes throughout the source code to make it compile again... All cleaned up now, apparently.. Note also that there is a new EXPORT_VAR macro defined to allow the _declaration_ of an exportable public (constant) variable. This is the case of the raster interfaces (see ftraster.h and ftgrays.h), as well as each module's interface (see sfdriver.h, psdriver.h, etc..) - new feature: it is now possible to pass extra parameters to font drivers when creating a new face object. For now, this capability is unused. It could however prove to be useful in a near future.. the FT_Open_Args structure was changes, as well as the internal driver interface (the specific `init_face' module function has now a different signature). - updated the tutorial (not finished though). - updated the top-level BUILD document - fixed a potential memory leak that could occur when loading embedded bitmaps. - added the declaration of FT_New_Memory_Face in <freetype/freetype.h>, as it was missing from the public header (the implementation was already in `ftobjs.c'). - the file <freetype/fterrors.h> has been seriously updated in order to allow the automatic generation of error message tables. See the comments within it for more information. - major directory hierarchy re-organisation. This was done for two things: * first, to ease the `manual' compilation of the library by requiring at lot less include paths :-) * second, to allow external programs to effectively access internal data fields. For example, this can be extremely useful if someone wants to write a font producer or a font manager on top of FreeType. Basically, you should now use the 'freetype/' prefix for header inclusion, as in: #include <freetype/freetype.h> #include <freetype/ftglyph.h> Some new include sub-directories are available: a. the `freetype/config' directory, contains two files used to configure the build of the library. Client applications should not need to look at these normally, but they can if they want. #include <freetype/config/ftoption.h> #include <freetype/config/ftconfig.h> b. the `freetype/internal' directory, contains header files that describes library internals. These are the header files that were previously found in the `src/base' and `src/shared' directories. As usual, the build system and the demos have been updated to reflect the change.. Here's a layout of the new directory hierarchy: TOP_DIR include/ freetype/ freetype.h ... config/ ftoption.h ftconfig.h ftmodule.h internal/ ftobjs.h ftstream.h ftcalc.h ... src/ base/ ... sfnt/ psnames/ truetype/ type1/ type1z/ Compiling a module is now much easier, for example, the following should work when in the TOP_DIR directory on an ANSI build: gcc -c -I./include -I./src/base src/base/ftbase.c gcc -c -I./include -I./src/sfnt src/sfnt/sfnt.c etc.. (of course, using -Iconfig/<system> if you provide system-specific configuration files). - updated the structure of FT_Outline_Funcs in order to allow direct coordinate scaling within the outline decomposition routine (this is important for virtual `on' points with TrueType outlines) + updates to the rasters to support this.. - updated the OS/2 table loading code in `src/sfnt/ttload.c' in order to support version 2 of the table (see OpenType 1.2 spec) - created `include/tttables.h' and `include/t1tables.h' to allow client applications to access some of the SFNT and T1 tables of a face with a procedural interface (see `FT_Get_Sfnt_Table') + updates to internal source files to reflect the change.. - some cleanups in the source code to get rid of warnings when compiling with the `-Wall -W -ansi -pedantic' options in gcc. - debugged and moved the smooth renderer to `src/base/ftgrays.c' and its header to `include/ftgrays.h' - updated TT_MAX_SUBGLYPHS to 96 as some CJK fonts have composites with up to 80 sub-glyphs !! Thanks to Werner ====================================================================== OLD CHANGES - 14-apr-2000 - fixed a bug in the TrueType glyph loader that prevented the correct loading of some CJK glyphs in mingli.ttf - improved the standard Type 1 hinter in `src/type1' - fixed two bugs in the experimental Type 1 driver in `src/type1z' to handle the new XFree86 4.0 fonts (and a few other ones..) - the smooth renderer is now complete and supports sub-banding to render large glyphs at high speed. However, it is still located in `demos/src/ftgrays.c' and should move to the library itself in the next beta. NOTE: The smooth renderer doesn't compile in stand-alone mode anymore, but this should be fixed RSN.. - introduced convenience functions to more easily deal with glyph images, see `include/ftglyph.h' for more details, as well as the new demo program named `demos/src/ftstring.c' that demonstrates its use - implemented FT_LOAD_NO_RECURSE in both the TrueType and Type 1 drivers (this is required by the auto-hinter to improve its results). - changed the raster interface, in order to allow client applications to provide their own span-drawing callbacks. However, only the smooth renderer supports this. See `FT_Raster_Params' in the file `include/ftimage.h'. - fixed a small bug in FT_MulFix that caused incorrect transform computation! - Note: The tutorial is out-of-date. ====================================================================== OLD CHANGES - 12-mar-2000 - changed the layout of configuration files : now, all ANSI configuration files are located in `freetype2/config'. System-specific over-rides can be placed in `freetype2/config/<system>'. - moved all configuration macros to `config/ftoption.h' - improvements in the Type 1 driver with AFM support - changed the fields in the FT_Outline structure : the old `flags' array is re-named `tags', while all ancient flags are encoded into a single unsigned int named `flags'. - introduced new flags in FT_Outline.flags (see ft_outline_.... enums in `ftimage.h'). - changed outline functions to `FT_Outline_<action>' syntax - added a smooth anti-alias renderer to the demonstration programs - added Mac graphics driver (thanks Just) - FT_Open_Face changed in order to received a pointer to a FT_Open_Args descriptor.. - various cleanups, a few more API functions implemented (see FT_Attach_File) - updated some docs ====================================================================== OLD CHANGES - 22-feb-2000 - introduced the `psnames' module. It is used to: o convert a Postscript glyph name into the equivalent Unicode character code (used by the Type 1 driver(s) to synthesize on the fly a Unicode charmap). o provide an interface to retrieve the Postscript names of the Macintosh, Adobe Standard & Adobe Expert character codes. (the Macintosh names are used by the SFNT-module postscript names support routines, while the other two tables are used by the Type 1 driver(s)). - introduced the `type1z' alternate Type 1 driver. This is a (still experimental) driver for the Type 1 format that will ultimately replace the one in `src/type1'. It uses pattern matching to load data from the font, instead of a finite state analyzer. It works much better than the `old' driver with `broken' fonts. It is also much smaller (under 15 Kb). - the Type 1 drivers (both in `src/type1' and `src/type1z') are nearly complete. They both provide automatic Unicode charmap synthesis through the `psnames' module. No re-encoding vector is needed. (note that they still leak memory due to some code missing, and I'm getting lazy). Trivial AFM support has been added to read kerning information but wasn't exactly tested as it should ;-) - The TrueType glyph loader has been seriously rewritten (see the file `src/truetype/ttgload.c'. It is now much, much simpler as well as easier to read, maintain and understand :-) Preliminary versions introduced a memory leak that has been reported by Jack Davis, and is now fixed.. - introduced the new `ft_glyph_format_plotter', used to represent stroked outlines like Windows `Vector' fonts, and certain Type 1 fonts like `Hershey'. The corresponding raster will be written soon. - FT_New_Memory_Face is gone. Likewise, FT_Open_Face has a new interface that uses a structure to describe the input stream, the driver (if required), etc.. TODO - Write FT_Get_Glyph_Bitmap and FT_Load_Glyph_Bitmap - Add a function like FT_Load_Character(face, char_code, load_flags) that would really embed a call to FT_Get_Char_Index then FT_Load_Glyph to ease developer's work. - Update the tutorial! - consider adding support for Multiple Master fonts in the Type 1 drivers. - Test the AFM routines of the Type 1 drivers to check that kerning information is returned correctly. - write a decent auto-gridding component !! We need this to release FreeType 2.0 gold ! less urgent needs: - add a CFF/Type2 driver - add a BDF driver - add a FNT/PCF/HBF driver - add a Speedo driver from the X11 sources ====================================================================== OLDER CHANGES - 27-jan-2000 - updated the `sfnt' module interface to allow several SFNT-based drivers to co-exist peacefully - updated the `T1_Face' type to better separate Postscript font content from the rest of the FT_Face structure. Might be used later by the CFF/Type2 driver.. - added an experimental replacement Type 1 driver featuring advanced (and speedy) pattern matching to retrieve the data from postscript fonts. - very minor changes in the implementation of FT_Set_Char_Size and FT_Set_Pixel_Sizes (they now implement default to lighten the font driver's code). ====================================================================== OLD MESSAGE This file summarizes the changes that occurred since the last `beta' of FreeType 2. Because the list is important, it has been divided into separate sections: Table Of Contents: I High-Level Interface (easier !) II Directory Structure III Glyph Image Formats IV Build System V Portability VI Font Drivers ---------------------------------------------------------------------- High-Level Interface: The high-level API has been considerably simplified. Here is how: - resource objects have disappeared. this means that face objects can now be created with a single function call (see FT_New_Face and FT_Open_Face) - when calling either FT_New_Face & FT_Open_Face, a size object and a glyph slot object are automatically created for the face, and can be accessed through `face->glyph' and `face->size' if one really needs to. In most cases, there's no need to call FT_New_Size or FT_New_Glyph. - similarly, FT_Load_Glyph now only takes a `face' argument (instead of a glyph slot and a size). Also, its `result' parameter is gone, as the glyph image type is returned in the field `face->glyph.format' - the list of available charmaps is directly accessible through `face->charmaps', counting `face->num_charmaps' elements. Each charmap has an 'encoding' field which specifies which known encoding it deals with. Valid values are, for example: ft_encoding_unicode (for ASCII, Latin-1 and Unicode) ft_encoding_apple_roman ft_encoding_sjis ft_encoding_adobe_standard ft_encoding_adobe_expert other values may be added in the future. Each charmap still holds its `platform_id' and `encoding_id' values in case the encoding is too exotic for the current library ---------------------------------------------------------------------- Directory Structure: Should seem obvious to most of you: freetype/ config/ -- configuration sub-makefiles ansi/ unix/ -- platform-specific configuration files win32/ os2/ msdos/ include/ -- public header files, those to be included directly by client apps src/ -- sources of the library base/ -- the base layer sfnt/ -- the sfnt `driver' (see the drivers section below) truetype/ -- the truetype driver type1/ -- the type1 driver shared/ -- some header files shared between drivers demos/ -- demos/tools docs/ -- documentation (a bit empty for now) ---------------------------------------------------------------------- Glyph Image Formats: Drivers are now able to register new glyph image formats within the library. For now, the base layer supports of course bitmaps and vector outlines, but one could imagine something different like colored bitmaps, bi-color vectors or whatever else (Metafonts anyone ??). See the file `include/ftimage.h'. Note also that the type FT_Raster_Map is gone, and is now replaced by FT_Bitmap, which should encompass all known bitmap types. Each new image format must provide at least one `raster', i.e. a module capable of transforming the glyph image into a bitmap. It's also possible to change the default raster used for a given glyph image format. The default outline scan-converter now uses 128 levels of grays by default, which tends to smooth many things. Note that the demo programs have been updated significantly in order to display these.. ---------------------------------------------------------------------- Build system: You still need GNU Make to build the library. The build system has been very seriously re-vamped in order to provide things like : - automatic host platform detection (reverting to 'config/ansi' if it is not detected, with pseudo-standard compilation flags) - the ability to compile from the Makefiles with very different and exotic compilers. Note that linking the library can be difficult for some platforms. For example, the file `config/win32/lcclib.bat' is invoked by the build system to create the `.lib' file with LCC-Win32 because its librarian has too many flaws to be invoked directly from the Makefile. Here's how it works: - the first time you type `make', the build system runs a series of sub-makefiles in order to detect your host platform. It then dumps what it found, and creates a file called `config.mk' in the current directory. This is a sub-Makefile used to define many important Make variables used to build the library. - the second time, the build system detects the `config.mk' then use it to build the library. All object files go into 'obj' by default, as well as the library file, but this can easily be changed. Note that you can run `make setup' to force another host platform detection even if a `config.mk' is present in the current directory. Another solution is simply to delete the file, then re-run make. Finally, the default compiler for all platforms is gcc (for now, this will hopefully changed in the future). You can however specify a different compiler by specifying it after the 'setup' target as in: gnumake setup lcc on Win32 to use the LCC compiler gnumake setup visualc on Win32 to use Visual C++ See the file `config/<system>/detect.mk' for a list of supported compilers for your platforms. It should be relatively easy to write new detection rules files and config.mk.. Finally, to build the demo programs, go to `demos' and launch GNU Make, it will use the `config.mk' in the top directory to build the test programs.. ---------------------------------------------------------------------- Portability: In the previous beta, a single FT_System object was used to encompass all low-level operations like thread synchronisation, memory management and i/o access. This has been greatly simplified: - thread synchronisation has been dropped, for the simple reason that the library is already re-entrant, and that if you really need two threads accessing the same FT_Library, you should really synchronize access to it yourself with a simple mutex. - memory management is performed through a very simple object called `FT_Memory', which really is a table containing a table of pointers to functions like malloc, realloc and free as well as some user data (closure). - resources have disappeared (they created more problems than they solved), and i/o management have been simplified greatly as a result. Streams are defined through FT_Stream objects, which can be either memory-based or disk-based. Note that each face has its own stream, which is closed only when the face object is destroyed. Hence, a function like TT_Flush_Face in 1.x cannot be directly supported. However, if you really need something like this, you can easily tailor your own streams to achieve the same feature at a lower level (and use FT_Open_Face instead of FT_New_Face to create the face). See the file `include/ftsystem.h' for more details, as well as the implementations found in `config/unix' and `config/ansi'. ---------------------------------------------------------------------- Font Drivers: The Font Driver interface has been modified in order to support extensions & versioning. The list of the font drivers that are statically linked to the library at compile time is managed through a new configuration file called `config/<platform>/ftmodule.h'. This file is autogenerated when invoking `make modules'. This target will parse all sub-directories of 'src', looking for a `module.mk' rules file, used to describe the driver to the build system. Hence, one should call `make modules' each time a font driver is added or removed from the `src' directory. Finally, this version provides a `pseudo-driver' in `src/sfnt'. This driver doesn't support font files directly, but provides services used by all TrueType-like font drivers. Hence, its code is shared between the TrueType & OpenType font formats, and possibly more formats to come if we're lucky.. ---------------------------------------------------------------------- Extensions support: The extensions support is inspired by the one found in 1.x. Now, each font driver has its own `extension registry', which lists which extensions are available for the font faces managed by the driver. Extension ids are now strings, rather than 4-byte tags, as this is usually more readable. Each extension has: - some data, associated to each face object - an interface (table of function pointers) An extension that is format-specific should simply register itself to the correct font driver. Here is some example code: // Registering an extensions // FT_Error FT_Init_XXXX_Extension( FT_Library library ) { FT_DriverInterface* tt_driver; driver = FT_Get_Driver( library, "truetype" ); if (!driver) return FT_Err_Unimplemented_Feature; return FT_Register_Extension( driver, &extension_class ); } // Implementing the extensions // FT_Error FT_Proceed_Extension_XXX( FT_Face face ) { FT_XXX_Extension ext; FT_XXX_Extension_Interface ext_interface; ext = FT_Get_Extension( face, "extensionid", &ext_interface ); if (!ext) return error; return ext_interface->do_it(ext); } ------------------------------------------------------------------------ Copyright (C) 2000-2022 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, and distributed under the terms of the FreeType project license, LICENSE.TXT. By continuing to use, modify, or distribute this file you indicate that you have read the license and understand and accept it fully. Local Variables: version-control: never coding: utf-8 End: --- end of CHANGES ---
whupdup/frame
real/third_party/freetype-2.12.0/docs/CHANGES
none
gpl-3.0
210,575
Support for a cmake build has been contributed. See the remarks in the top-level `CMakeLists.txt' file for more.
whupdup/frame
real/third_party/freetype-2.12.0/docs/CMAKE
none
gpl-3.0
114
How to customize the compilation of the library =============================================== FreeType is highly customizable to fit various needs, and this document describes how it is possible to select options and components at compilation time. I. Configuration macros The file `include/freetype/config/ftoption.h' contains a list of commented configuration macros that can be toggled by developers to indicate which features should be active while building the library. These options range from debug level to availability of certain features, like native TrueType hinting through a bytecode interpreter. We invite you to read this file for more information. You can change the file's content to suit your needs, or override it with one of the techniques described below. II. Modules list If you use GNU make please edit the top-level file `modules.cfg'. It contains a list of available FreeType modules and extensions to be compiled. Change it to suit your own preferences. Be aware that certain modules depend on others, as described in the file. GNU make uses `modules.cfg' to generate `ftmodule.h' (in the object directory). If you build FreeType in a directory separate from the source files, put your customized `modules.cfg' in that directory; that way you can keep the source files `clean'. If you don't use GNU make you have to manually edit the file `include/freetype/config/ftmodule.h' (which is *not* used with if compiled with GNU make) to add or remove the drivers and components you want to compile into the library. See `INSTALL.ANY' for more information. III. System interface FreeType's default interface to the system (i.e., the parts that deal with memory management and i/o streams) is located in `src/base/ftsystem.c'. The current implementation uses standard C library calls to manage memory and to read font files. It is however possible to write custom implementations to suit specific systems. To tell the GNU Make-based build system to use a custom system interface, you have to define the environment variable FTSYS_SRC to point to the relevant implementation: on Unix: ./configure <your options> export FTSYS_SRC=foo/my_ftsystem.c make make install on Windows: make setup <compiler> set FTSYS_SRC=foo/my_ftsystem.c make IV. Overriding default configuration and module headers It is possible to override the default configuration and module headers without changing the original files. There are three ways to do that: 1. With GNU make [This is actually a combination of method 2 and 3.] Just put your custom `ftoption.h' file into the objects directory (normally `<topdir>/objs' if you build in the source tree, or the directory where you invoke configure if you build in a separate directory), which GNU make prefers over the standard location. No action is needed for `ftmodule.h' because it is generated automatically in the objects directory. 2. Using the C include path Use the C include path to ensure that your own versions of the files are used at compile time when the lines #include FT_CONFIG_OPTIONS_H #include FT_CONFIG_MODULES_H are compiled. Their default values being <freetype/config/ftoption.h> and <freetype/config/ftmodule.h>, you can do something like: custom/ config/ ftoption.h => custom options header ftmodule.h => custom modules list include/ => normal FreeType 2 include ... then change the C include path to always give the path to `custom' before the FreeType 2 `include'. 3. Redefining FT_CONFIG_OPTIONS_H and FT_CONFIG_MODULES_H Another way to do the same thing is to redefine the macros used to name the configuration headers. To do so, you need a custom `ft2build.h' whose content can be as simple as: #ifndef FT2_BUILD_MY_PLATFORM_H_ #define FT2_BUILD_MY_PLATFORM_H_ #define FT_CONFIG_OPTIONS_H <custom/my-ftoption.h> #define FT_CONFIG_MODULES_H <custom/my-ftmodule.h> #include <freetype/config/ftheader.h> #endif /* FT2_BUILD_MY_PLATFORM_H_ */ Place those files in a separate directory, e.g., custom/ ft2build.h => custom version described above my-ftoption.h => custom options header my-ftmodule.h => custom modules list header and change the C include path to ensure that `custom' is always placed before the FT2 `include' during compilation. ---------------------------------------------------------------------- Copyright (C) 2003-2022 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, and distributed under the terms of the FreeType project license, LICENSE.TXT. By continuing to use, modify, or distribute this file you indicate that you have read the license and understand and accept it fully. --- end of CUSTOMIZE ---
whupdup/frame
real/third_party/freetype-2.12.0/docs/CUSTOMIZE
none
gpl-3.0
5,301
Debugging within the FreeType sources ===================================== I. Configuration macros ----------------------- There are several ways to enable debugging features in a FreeType 2 builds. This is controlled through the definition of special macros located in the file `ftoption.h'. The macros are: FT_DEBUG_LEVEL_ERROR #define this macro if you want to compile the `FT_ERROR' macro calls to print error messages during program execution. This does not stop the program. Very useful to spot invalid fonts during development and to code workarounds for them. FT_DEBUG_LEVEL_TRACE #define this macro if you want to compile both macros `FT_ERROR' and `FT_TRACE'. This also includes the variants `FT_TRACE0', `FT_TRACE1', `FT_TRACE2', ..., `FT_TRACE7'. The trace macros are used to send debugging messages when an appropriate `debug level' is configured at runtime through the `FT2_DEBUG' environment variable (more on this later). FT_DEBUG_MEMORY If this macro is #defined, the FreeType engine is linked with a small but effective debugging memory manager that tracks all allocations and frees that are performed within the font engine. When the `FT2_DEBUG_MEMORY' environment variable is defined at runtime, a call to `FT_Done_FreeType' dumps memory statistics, including the list of leaked memory blocks and optionally with the source locations where these were allocated. It is always a very good idea to define this in development builds. This works with _any_ program linked to FreeType, but requires a big deal of memory (the debugging memory manager never frees the blocks to the heap in order to detect double frees). When `FT2_DEBUG_MEMORY' isn't defined at runtime, the debugging memory manager is ignored, and performance is unaffected. FT_DEBUG_LOGGING #define this macro for enhanced logging support; it automatically sets `FT_DEBUG_LEVEL_TRACE' and `FT_DEBUG_LEVEL_ERROR'. If defined, `FT_TRACE' and `FT_ERROR' can send tracing and debugging messages to a file. The location of the log file has to be set with the `FT_LOGGING_FILE' environment variable (more on this later). The main enhancements are the possibility of logging the time and the name of the `FT_COMPONENT' macro together with the affected `FT_TRACE' or `FT_ERROR' calls. See below how to activate this in the `FT2_DEBUG' environment variable. II. Debugging macros -------------------- Several macros can be used within the FreeType sources to help debugging its code: 1. FT_ERROR(( ... )) This macro is used to send debug messages that indicate relatively serious errors (like broken font files) without stopping the execution of the running program. Its code is compiled only when either `FT_DEBUG_LEVEL_ERROR' or `FT_DEBUG_LEVEL_TRACE' are defined in `ftoption.h'. Note that you have to use a printf-like signature, but with double parentheses, like in FT_ERROR(( "your %s is not %s\n", "foo", "bar" )); 2. FT_ASSERT( condition ) This macro is used to check strong assertions at runtime. If its condition isn't TRUE, the program aborts with a panic message. Its code is compiled when either `FT_DEBUG_LEVEL_ERROR' or `FT_DEBUG_LEVEL_TRACE' are defined. You don't need double parentheses here. Example: FT_ASSERT( ptr != NULL ); 3. FT_TRACE( level, (message...) ) The `FT_TRACE' macro is used to send general-purpose debugging messages during program execution. This macro uses an *implicit* macro named `FT_COMPONENT', which names the current FreeType component being run. The developer should always define `FT_COMPONENT' as appropriate, for example as in #undef FT_COMPONENT #define FT_COMPONENT io The value of the `FT_COMPONENT' macro is one of the component names defined in the internal file `internal/fttrace.h'. If you modify the FreeType source code and insert a new `FT_COMPONENT' macro, you must register it in `fttrace.h'. If you insert or remove many trace macros, you can test for undefined or unused trace macros with the script `src/tools/chktrcmp.py'. Each such component is assigned a `debug level', ranging from value 0 to 7, through the use of the `FT2_DEBUG' environment variable (described below) when a program linked with FreeType starts. When `FT_TRACE' is called, its level is compared to the one of the corresponding component. Messages with trace levels *higher* than the corresponding component level are filtered out and never printed. This means that trace messages with level 0 are always printed, those with level 2 are only printed when the component level is *at least* 2, etc. The second parameter to `FT_TRACE' must contain parentheses and corresponds to a printf-like call, as in FT_TRACE( 2, ( "your %s is not %s\n", "foo", "bar" ) ) The shortcut macros `FT_TRACE0', `FT_TRACE1', `FT_TRACE2', ..., `FT_TRACE7' can be used with constant level indices, and are much cleaner to use, as in FT_TRACE2(( "your %s is not %s\n", "foo", "bar" )); III. Environment variables -------------------------- The following environment variables control debugging output and behaviour of FreeType at runtime. FT2_DEBUG This variable is only used when FreeType is built with `FT_DEBUG_LEVEL_TRACE' defined. It contains a list of component level definitions, following this format: component1:level1 component2:level2 component3:level3 ... where `componentX' is the name of a tracing component, as defined in `fttrace.h'. `levelX' is the corresponding level to use at runtime. `any' is a special component name that is interpreted as `any/all components'. For example, the following definitions set FT2_DEBUG=any:2 memory:5 io:4 (on Windows) export FT2_DEBUG="any:2 memory:5 io:4" (on Linux with bash) both stipulate that all components should have level 2, except for the memory and io components, which are set to the trace levels 5 and 4, respectively. If `FT_DEBUG_LOGGING' is defined, two more options are available. * -v: Print also the name of FreeType's component from which the current log is produced, together with the tracing level. * -t: Print also the time. Here are some examples how the output might look like. FT2_DEBUG="any:7 memory:5 -vt" => [20:32:02:44969 ttload:2] table directory loaded FT2_DEBUG="any:7 memory:5 -t" => [20:32:02:44969] table directory loaded FT2_DEBUG="any:7 memory:5 -v" => [ttload:2] table directory loaded FT_LOGGING_FILE This variable is only used if FreeType is built with the `FT_DEBUG_LOGGING' macro defined. It contains the path to the file where the user wants to put his log file. If it is not set, FreeType uses stderr. Examples: On UNIX-like systems with bash: export FT_LOGGING_FILE="/tmp/freetype2.log" On Windows: set FT_LOGGING_FILE=C:\Users\AppData\Local\Temp\freetype2.log FT2_DEBUG_MEMORY This environment variable, when defined, tells FreeType to use a debugging memory manager that tracks leaking memory blocks as well as other common errors like double frees. It is also capable of reporting _where_ the leaking blocks were allocated, which considerably saves time when debugging new additions to the library. This code is only compiled when FreeType is built with the `FT_DEBUG_MEMORY' macro #defined in `ftoption.h' though, it is ignored in other builds. FT2_ALLOC_TOTAL_MAX This variable is ignored if `FT2_DEBUG_MEMORY' is not defined. It allows you to specify a maximum heap size for all memory allocations performed by FreeType. This is very useful to test the robustness of the font engine and programs that use it in tight memory conditions. If it is undefined, or if its value is not strictly positive, no allocation bounds are checked at runtime. FT2_ALLOC_COUNT_MAX This variable is ignored if `FT2_DEBUG_MEMORY' is not defined. It allows you to specify a maximum number of memory allocations performed by FreeType before returning the error `FT_Err_Out_Of_Memory'. This is useful for debugging and testing the engine's robustness. If it is undefined, or if its value is not strictly positive, no allocation bounds are checked at runtime. FT2_KEEP_ALIVE This variable is ignored if `FT2_DEBUG_MEMORY' is not defined. `Keep alive' means that freed blocks aren't released to the heap. This is useful to detect double-frees or weird heap corruption, reporting the source code location of the original allocation and deallocation in case of a problem. It uses large amounts of memory, however. If it is undefined, or if its value is not strictly positive, freed blocks are released at runtime. IV. Additional Capabilities with `FT_DEBUG_LOGGING' --------------------------------------------------- If `FT_DEBUG_LOGGING' is defined, four APIs are available to provide additional debugging support. Use #include <freetype/ftlogging.h> to access them. FT_Trace_Set_Level( const char* level ) By default, FreeType uses the tracing levels set in the `FT2_DEBUG' environment variable. Use this function to override the value with `level'. Use value `NULL' to disable tracing. FT_Trace_Set_Default_Level(): Reset the tracing levels to the default value, i.e., the value of the `FT2_DEBUG' environment variable or no tracing if not set. FT_Set_Log_Handler( ft_custom_log_handler handler ): Use `handler' as a custom handler for formatting tracing and error messages. The `ft_custom_log_handler' typedef has the following prototype. void (*ft_custom_log_handler)( const char* ft_component, const char* fmt, va_list args ); `ft_component' is the current component like `ttload', `fmt' is the first argument of `FT_TRACE' or `FT_ERROR', and `args' holds the remaining arguments. FT_Set_Default_Log_Handler(): Reset the log handler to the default version. ------------------------------------------------------------------------ Copyright (C) 2002-2022 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, and distributed under the terms of the FreeType project license, LICENSE.TXT. By continuing to use, modify, or distribute this file you indicate that you have read the license and understand and accept it fully. --- end of DEBUG ---
whupdup/frame
real/third_party/freetype-2.12.0/docs/DEBUG
none
gpl-3.0
11,290
Introduction ------------ Documentation is an extremely important part of any project, and it helps a lot if it uses consistent syntax and layout. The documentation for the FreeType library is maintained in header files in the `include/` directory in the form of code comments. These comments are extracted and organized by 'docwriter' (previously 'docmaker'). The generated docs can be viewed in the `docs/reference/site/` directory after running `make refdoc`. Documentation comments follow a specific structure and format as described below. Documentation Structure ----------------------- The documentation is divided into multiple chapters, which contain sections relevant to it. The chapter details and sections contained in them are listed in `include/freetype/ftchapters.h`. Any unlisted section is added to the 'Miscellaneous' chapter. Sections may contain sub-sections which consist of properties, enumerations, and other data types. Comment Blocks -------------- Documentation blocks follow a specific format: /***************************** (should end on column 77) * * (1 asterisk, 1 space, then content) * */ (end of block) To make 'docwriter' recognize a comment block, there must be at least two asterisks in the first line. As a consequence, you should change the second asterisk to something else if you want to prevent a comment block being handled by 'docwriter' (for example, change `/****/` to `/*#**/`). Markup Tags ----------- Markup tags are used to indicate what comes next. The syntax for a tag is: @foo: An `@`, followed by the tag, and then `:`. Reserved Tags ------------- There are some keywords that have a special meaning to docwriter. As a convention, all keywords are written in lowercase. * `chapter`: Defines a chapter. Usually the title with underscores. * `sections`: List of sections in the chapter, in order. * `section`: Defines the start or continuation of a section. * `title`: Title for a chapter or section. May contain spaces. * `abstract`: The abstract for a section, visible in the Table of Contents (TOC). * `description`: Detailed description of a tag (except chapters), shown as synopsis. * `values`: A list of 'values' for the tag. These values are used for cross-referencing. Other Tags ---------- Except the ones given above, any other tags will be added as a part of a subsection. All tags are lowercase by convention. Public Header Definitions ------------------------- The public headers for FreeType have their names defined in `include/freetype/config/ftheader.h`. Any new public header file must be defined in this file, in the following format: #define FT_NEWNAME_H <freetype/newname.h> Where `newname` is the name of the header file. This macro is combined with the file location of a sub-section and printed with the object. Note on code blocks captured after comments ------------------------------------------- All non-documentation lines after a documentation comment block are captured to be displayed as the code for the sub-section. To stop collection, a line with `/* */` should be added. General Formatting Conventions ------------------------------ * Use two spaces after a full stop ending a sentence. * Use appropriate uppercasing in titles. Refer https://english.stackexchange.com/a/34 for more information. * Do not add trailing parentheses when citing a C function. Markdown Usage -------------- All tags, except the ones that define the name and title for a block support markdown in them. Docwriter uses a markdown parser that follows rules given in John Gruber's markdown guide: https://daringfireball.net/projects/markdown/syntax with a few exceptions and extensions, detailed below. This may also be referred to as the **FreeType Flavored Markdown**. Headers ------- Markdown headers should not be used directly, because these are added based on section titles, sub-section names, and tags. However, if a header needs to be added, note the following correspondence to HTML tags: * Section title on top of the page is `H1`. * Sub-section titles are `H2`. * Parts of sub-sections are `H4`. * Any header added will be visible in the Table of Contents (TOC) of the page. Emphasis -------- * Use `_underscores_` for italics. * Use `**double asterisks**` for bold. Although the other notations (double underscore for bold, single asterisk for italics) are supported, it is recommended to use the above for consistency. Note that there may be cases where having two asterisks or underscores in a line may lead to text being picked up as italics or bold. Although unintentional, this is correct markdown behavior. For inline code, wrap the sequence with backticks (see below). This renders symbols correctly without modifications. If a symbol is absolutely required outside of an inline code block or code sequence, escape it with a backslash (like `\*` or `\_`). Lists ----- Unordered lists can be created with asterisks: * Unordered list items can use asterisks. * Another list item. Ordered lists start with numbers: 1. This is an ordered list item. 2. Brackets after numbers won't work. To continue a list over multiple paragraphs, indent them with at least four spaces. For example: 1. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing. 2. This is the second list item. This paragraph is not a part of the list. More information on lists in markdown is available at https://daringfireball.net/projects/markdown/syntax#list Cross-references ---------------- Other sub-sections can be linked with the `@` symbol: @description: While FreeType's CFF driver doesn't expose API functions by itself, it is possible to control its behaviour with @FT_Property_Set and @FT_Property_Get. If a field in the `values` table of another sub-section is linked, the link leads to its parent sub-section. Links and Images ---------------- All URLs are converted to links in the HTML documentation. Markdown syntax for links and images are fully supported. Inline Code ----------- To indicate a span of code, wrap it with backtick quotes (`` ` ``): Use the `printf()` function. Cross-references, markdown, and html styling do not work in inline code sequences. Code and Syntax Highlighting ---------------------------- Blocks of code are fenced by lines with three back-ticks `` ``` `` followed by the language name, if any (used for syntax highlighting), as demonstrated in the following example. ```c x = y + z; if ( zookoo == 2 ) { foobar(); } ``` Note that the indentation of the opening line and the closing line must be exactly the same. The code sequence itself should have a larger indentation than the surrounding back-ticks. Like inline code, markdown and html styling is *not* supported inside code blocks. Tables ------ Tables are used to list values, input, and other fields. The FreeType Flavored Markdown adopts a simple approach to tables with two columns, or field definition tables. Field definition names may contain alphanumeric, underscore, and the `.` characters. This is followed by `::`. The following lines are the second column of the table. A field definition ends with the start of another field definition, or a markup tag. @Input: pathname :: A path to the font file. face_index :: See @FT_Open_Face for a detailed description of this parameter. Non-breaking Space ------------------ A tilde can be used to create a non-breaking space. The example The encoding value~0 is reserved. is converted to The encoding value&nbsp;0 is reserved. ---------------------------------------------------------------------- Copyright (C) 2018-2022 by Nikhil Ramakrishnan, David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, and distributed under the terms of the FreeType project license, LICENSE.TXT. By continuing to use, modify, or distribute this file you indicate that you have read the license and understand and accept it fully. --- end of DOCGUIDE ---
whupdup/frame
real/third_party/freetype-2.12.0/docs/DOCGUIDE
none
gpl-3.0
8,604
The FreeType Project LICENSE ---------------------------- 2006-Jan-27 Copyright 1996-2002, 2006 by David Turner, Robert Wilhelm, and Werner Lemberg Introduction ============ The FreeType Project is distributed in several archive packages; some of them may contain, in addition to the FreeType font engine, various tools and contributions which rely on, or relate to, the FreeType Project. This license applies to all files found in such packages, and which do not fall under their own explicit license. The license affects thus the FreeType font engine, the test programs, documentation and makefiles, at the very least. This license was inspired by the BSD, Artistic, and IJG (Independent JPEG Group) licenses, which all encourage inclusion and use of free software in commercial and freeware products alike. As a consequence, its main points are that: o We don't promise that this software works. However, we will be interested in any kind of bug reports. (`as is' distribution) o You can use this software for whatever you want, in parts or full form, without having to pay us. (`royalty-free' usage) o You may not pretend that you wrote this software. If you use it, or only parts of it, in a program, you must acknowledge somewhere in your documentation that you have used the FreeType code. (`credits') We specifically permit and encourage the inclusion of this software, with or without modifications, in commercial products. We disclaim all warranties covering The FreeType Project and assume no liability related to The FreeType Project. Finally, many people asked us for a preferred form for a credit/disclaimer to use in compliance with this license. We thus encourage you to use the following text: """ Portions of this software are copyright © <year> The FreeType Project (www.freetype.org). All rights reserved. """ Please replace <year> with the value from the FreeType version you actually use. Legal Terms =========== 0. Definitions -------------- Throughout this license, the terms `package', `FreeType Project', and `FreeType archive' refer to the set of files originally distributed by the authors (David Turner, Robert Wilhelm, and Werner Lemberg) as the `FreeType Project', be they named as alpha, beta or final release. `You' refers to the licensee, or person using the project, where `using' is a generic term including compiling the project's source code as well as linking it to form a `program' or `executable'. This program is referred to as `a program using the FreeType engine'. This license applies to all files distributed in the original FreeType Project, including all source code, binaries and documentation, unless otherwise stated in the file in its original, unmodified form as distributed in the original archive. If you are unsure whether or not a particular file is covered by this license, you must contact us to verify this. The FreeType Project is copyright (C) 1996-2000 by David Turner, Robert Wilhelm, and Werner Lemberg. All rights reserved except as specified below. 1. No Warranty -------------- THE FREETYPE PROJECT IS PROVIDED `AS IS' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL ANY OF THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES CAUSED BY THE USE OR THE INABILITY TO USE, OF THE FREETYPE PROJECT. 2. Redistribution ----------------- This license grants a worldwide, royalty-free, perpetual and irrevocable right and license to use, execute, perform, compile, display, copy, create derivative works of, distribute and sublicense the FreeType Project (in both source and object code forms) and derivative works thereof for any purpose; and to authorize others to exercise some or all of the rights granted herein, subject to the following conditions: o Redistribution of source code must retain this license file (`FTL.TXT') unaltered; any additions, deletions or changes to the original files must be clearly indicated in accompanying documentation. The copyright notices of the unaltered, original files must be preserved in all copies of source files. o Redistribution in binary form must provide a disclaimer that states that the software is based in part of the work of the FreeType Team, in the distribution documentation. We also encourage you to put an URL to the FreeType web page in your documentation, though this isn't mandatory. These conditions apply to any software derived from or based on the FreeType Project, not just the unmodified files. If you use our work, you must acknowledge us. However, no fee need be paid to us. 3. Advertising -------------- Neither the FreeType authors and contributors nor you shall use the name of the other for commercial, advertising, or promotional purposes without specific prior written permission. We suggest, but do not require, that you use one or more of the following phrases to refer to this software in your documentation or advertising materials: `FreeType Project', `FreeType Engine', `FreeType library', or `FreeType Distribution'. As you have not signed this license, you are not required to accept it. However, as the FreeType Project is copyrighted material, only this license, or another one contracted with the authors, grants you the right to use, distribute, and modify it. Therefore, by using, distributing, or modifying the FreeType Project, you indicate that you understand and accept all the terms of this license. 4. Contacts ----------- There are two mailing lists related to FreeType: o freetype@nongnu.org Discusses general use and applications of FreeType, as well as future and wanted additions to the library and distribution. If you are looking for support, start in this list if you haven't found anything to help you in the documentation. o freetype-devel@nongnu.org Discusses bugs, as well as engine internals, design issues, specific licenses, porting, etc. Our home page can be found at https://www.freetype.org --- end of FTL.TXT ---
whupdup/frame
real/third_party/freetype-2.12.0/docs/FTL.TXT
Text
gpl-3.0
6,743
GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. <signature of Ty Coon>, 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License.
whupdup/frame
real/third_party/freetype-2.12.0/docs/GPLv2.TXT
Text
gpl-3.0
17,994
There are several ways to build the FreeType library, depending on your system and the level of customization you need. Here is a short overview of the documentation available: I. Prerequisites and dependencies ================================= FreeType is a low level C library that only depends on the standard C library with very few platform-dependent optimizations utilized at build time. Any C99-compliant compiler should be able to compile FreeType. System libraries, such as zlib, Gzip, bzip2, Brotli, and libpng, might be used to handle compressed fonts or decode embedded PNG glyphs. FreeType auto-configuration scripts should be able to detect the prerequisites if the necessary headers are available at the default locations. Otherwise, modify `include/freetype/config/ftoption.h` to control how the FreeType library gets built. Normally, you don't need to change anything. Applications have very limited control over FreeType's behaviour at run-time; look at the documentation of function `FT_Property_Set`. II. Normal installation and upgrades ==================================== 1. Unix and Unix-like systems This also includes MacOS, Cygwin, MinGW + MSYS, Mingw-w64 + MSYS2, and possibly other, similar environments. Please read `INSTALL.UNIX` to install or upgrade FreeType 2 on a Unix system. Note that you *need* GNU Make for automatic compilation, since other make tools won't work (this includes BSD Make). GNU Make VERSION 3.81 OR NEWER IS NEEDED! 2. Other systems using GNU Make On some non-Unix platforms, it is possible to build the library using only the GNU Make utility. Note that *NO OTHER MAKE TOOL WILL WORK*[1]! This methods supports several compilers on Windows, OS/2, and BeOS, including MinGW* (without MSYS*), Visual C++, Borland C++, and more. Instructions are provided in the file `INSTALL.GNU`. 3. Other build tools and platforms. A few other tools can be used to build FreeType. You can find the corresponding instruction files in the FreeType root folder or the builds/ sub-folder. CMake :: see `CMakeLists.txt` for more information Meson :: see `meson.build` for more information MSBuild :: see `builds/windows/vc2010/freetype.vcxproj` MMS :: see `vms_make.com` and `docs/INSTALL.VMS` 4. With an IDE Project File (e.g., for Visual Studio or CodeWarrior) We provide a small number of 'project files' for various IDEs to automatically build the library as well. Note that these files are not actively supported by FreeType developers, they can break or become obsolete. To find them, have a look at the content of the `builds/<system>` directory, where <system> stands for your OS or environment. 5. From you own IDE, or own Makefiles If you want to create your own project file, follow the instructions given in the `INSTALL.ANY` document of this directory. III. Custom builds of the library ================================= Customizing the compilation of FreeType is easy, and allows you to select only the components of the font engine that you really need. For more details read the file `CUSTOMIZE`. ---------------------------------------------------------------------- [1] make++, a make tool written in Perl, has sufficient support of GNU make extensions to build FreeType. See https://makepp.sourceforge.net for more information; you need version 2.0 or newer, and you must pass option `--norc-substitution`. ---------------------------------------------------------------------- Copyright (C) 2000-2022 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, and distributed under the terms of the FreeType project license, LICENSE.TXT. By continuing to use, modify, or distribute this file you indicate that you have read the license and understand and accept it fully. --- end of INSTALL ---
whupdup/frame
real/third_party/freetype-2.12.0/docs/INSTALL
none
gpl-3.0
4,174
Instructions on how to build FreeType with your own build tool ============================================================== See the file `CUSTOMIZE' to learn how to customize FreeType to specific environments. I. Standard procedure --------------------- * If you use macro names for FreeType header files (while mandatory in earlier versions, this is now optional since FreeType version 2.6.1) it is necessary to disable pre-compiled headers. This is very important for Visual C++, because lines like #include FT_FREETYPE_H are not correctly supported by this compiler while being ISO C compliant! * You need to add the directory `include' to your include path when compiling the library. * FreeType 2 is made of several components; each of them is located in a subdirectory of `freetype/src'. For example, `freetype/src/truetype/' contains the TrueType font driver. * DO NOT COMPILE ALL C FILES! Rather, compile the following ones. -- base components (required) src/base/ftsystem.c src/base/ftinit.c src/base/ftdebug.c src/base/ftbase.c src/base/ftbbox.c -- recommended, see <ftbbox.h> src/base/ftglyph.c -- recommended, see <ftglyph.h> src/base/ftbdf.c -- optional, see <ftbdf.h> src/base/ftbitmap.c -- optional, see <ftbitmap.h> src/base/ftcid.c -- optional, see <ftcid.h> src/base/ftfstype.c -- optional src/base/ftgasp.c -- optional, see <ftgasp.h> src/base/ftgxval.c -- optional, see <ftgxval.h> src/base/ftmm.c -- optional, see <ftmm.h> src/base/ftotval.c -- optional, see <ftotval.h> src/base/ftpatent.c -- optional src/base/ftpfr.c -- optional, see <ftpfr.h> src/base/ftstroke.c -- optional, see <ftstroke.h> src/base/ftsynth.c -- optional, see <ftsynth.h> src/base/fttype1.c -- optional, see <t1tables.h> src/base/ftwinfnt.c -- optional, see <ftwinfnt.h> src/base/ftmac.c -- only on the Macintosh -- font drivers (optional; at least one is needed) src/bdf/bdf.c -- BDF font driver src/cff/cff.c -- CFF/OpenType font driver src/cid/type1cid.c -- Type 1 CID-keyed font driver src/pcf/pcf.c -- PCF font driver src/pfr/pfr.c -- PFR/TrueDoc font driver src/sfnt/sfnt.c -- SFNT files support (TrueType & OpenType) src/truetype/truetype.c -- TrueType font driver src/type1/type1.c -- Type 1 font driver src/type42/type42.c -- Type 42 font driver src/winfonts/winfnt.c -- Windows FONT / FNT font driver -- rasterizers (optional; at least one is needed for vector formats) src/raster/raster.c -- monochrome rasterizer src/sdf/sdf.c -- Signed Distance Field driver src/smooth/smooth.c -- anti-aliasing rasterizer -- auxiliary modules (optional) src/autofit/autofit.c -- auto hinting module src/cache/ftcache.c -- cache sub-system (in beta) src/gzip/ftgzip.c -- support for compressed fonts (.gz) src/lzw/ftlzw.c -- support for compressed fonts (.Z) src/bzip2/ftbzip2.c -- support for compressed fonts (.bz2) src/gxvalid/gxvalid.c -- TrueTypeGX/AAT table validation src/otvalid/otvalid.c -- OpenType table validation src/psaux/psaux.c -- PostScript Type 1 parsing src/pshinter/pshinter.c -- PS hinting module src/psnames/psnames.c -- PostScript glyph names support Notes: `ftcache.c' needs `ftglyph.c' `ftfstype.c' needs `fttype1.c' `ftglyph.c' needs `ftbitmap.c' `ftstroke.c' needs `ftglyph.c' `ftsynth.c' needs `ftbitmap.c' `cff.c' needs `sfnt.c', `pshinter.c', and `psnames.c' `truetype.c' needs `sfnt.c' and `psnames.c' `type1.c' needs `psaux.c' `pshinter.c', and `psnames.c' `type1cid.c' needs `psaux.c', `pshinter.c', and `psnames.c' `type42.c' needs `truetype.c' Please consult the central `include/freetype/config/ftoption.h' configuration file for details on additional libraries necessary for some optional features. Read the file `CUSTOMIZE' in case you want to compile only a subset of the drivers, renderers, and optional modules; a detailed description of the various base extension is given in the top-level file `modules.cfg'. You are done. In case of problems, see the archives of the FreeType development mailing list. II. Support for flat-directory compilation ------------------------------------------ It is possible to put all FreeType 2 source files into a single directory, with the *exception* of the `include' hierarchy. 1. Copy all files in current directory cp freetype/src/base/*.[hc] . cp freetype/src/raster1/*.[hc] . cp freetype/src/smooth/*.[hc] . etc. 2. Compile sources cc -c -Iinclude -DFT2_BUILD_LIBRARY ftsystem.c cc -c -Iinclude -DFT2_BUILD_LIBRARY ftinit.c cc -c -Iinclude -DFT2_BUILD_LIBRARY ftdebug.c cc -c -Iinclude -DFT2_BUILD_LIBRARY ftbase.c etc. You don't need to define the FT_FLAT_COMPILATION macro (as this was required in previous releases of FreeType 2). ---------------------------------------------------------------------- Copyright (C) 2003-2022 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, and distributed under the terms of the FreeType project license, LICENSE.TXT. By continuing to use, modify, or distribute this file you indicate that you have read the license and understand and accept it fully. --- end of INSTALL.ANY ---
whupdup/frame
real/third_party/freetype-2.12.0/docs/INSTALL.ANY
any
gpl-3.0
5,944
This document contains instructions on how to cross-build the FreeType library on Unix systems, for example, building binaries for Linux/MIPS on FreeBSD/i386. Before reading this document, please consult the file `INSTALL.UNIX' for required tools and the basic self-building procedure. 1. Required Tools ----------------- For self-building the FreeType library on a Unix system, GNU Make 3.81 or newer is required. `INSTALL.UNIX' contains hints how to check the installed `make'. The GNU C compiler to cross-build the target system is required. Currently, using a non-GNU cross compiler is untested. The cross compiler is expected to be installed with a system prefix. For example, if your building system is FreeBSD/i386 and the target system is Linux/MIPS, the cross compiler should be installed with the name `mips-ip22-linuxelf-gcc'. A C compiler for a self-build is required also, to build a tool (`apinames') that is executed during the build procedure. Non-GNU self compilers are acceptable, but such a setup is untested. 2. Configuration ---------------- 2.1. Building and target system To configure a cross-build, the options `--host=<system>' and `--build=<system>' must be passed to the `configure' script. For example, if your build system is FreeBSD/i386 and the target system is Linux/MIPS, say ./configure \ --build=i386-unknown-freebsd \ --host=mips-ip22-linuxelf \ [other options] It should be noted that `--host=<system>' specifies the system where the built binaries will be executed, not the system where the build actually happens. Older versions of GNU autoconf use the option pair `--host=' and `--target='. This is broken and doesn't work. Similarly, an explicit CC specification like env CC=mips-ip22-linux-gcc ./configure # BAD or env CC=/usr/local/mips-ip22-linux/bin/gcc ./configure # BAD doesn't work either; such a configuration confuses the `configure' script while trying to find the cross and native C compilers. 2.2. The prefix to install FreeType2 Setting `--prefix=<prefix>' properly is important. The prefix to install FreeType2 is written into the `freetype-config' script and `freetype2.pc' configuration file. If the built FreeType 2 library is used as a part of the cross-building system, the prefix is expected to be different from the self-building system. For example, a configuration with `--prefix=/usr/local' installs binaries into the system-wide `/usr/local' directory, which then can't be executed due to the incorrect architecture. This causes confusion in configuration of all applications that use FreeType2. Instead, use a prefix to install the cross-build into a separate system tree, for example, `--prefix=/usr/local/mips-ip22-linux/'. On the other hand, if the built FreeType 2 library is used as a part of the target system, the prefix to install should reflect the file system structure of the target system. 2.3. Library dependencies FreeType normally depends on external libraries like `libpng' or `libharfbuzz'. The easiest case is to deactivate all such dependencies using the `--without-XXX' configuration options. However, if you want to use those libraries, you should ensure that they are available both on the target system and as (cross-compiled) libraries on the build system. FreeType uses `pkg-config' to find most of the libraries; the other libraries it links to are expected in the standard system directories. Since the default pkg-config's meta-information files (like `harfbuzz.pc') of the build platform don't work, use one of the two possible solutions below. o Use pkg-config's meta-information files that are adjusted to cross-compile and cross-link with the target platform's libraries. Make sure those files are found before the build system's default files. Example: ./configure \ --build=i386-unknown-freebsd \ --host=mips-ip22-linuxelf \ PKG_CONFIG_LIBDIR="/usr/local/mips-ip22-linux/lib/pkgconfig" \ [other options] See the manpage of `pkg-config' for more details. o Set variables like LIBPNG_LIBS as additional options to the `configure' script, overriding the values `pkg-config' would provide. `configure --help' shows the available environment variables. Example: ./configure \ --build=i386-unknown-freebsd \ --host=mips-ip22-linuxelf \ LIBPNG_CFLAGS="-I/usr/local/mips-ip22-linux/include" \ LIBPNG_LIBS="-L/usr/local/mips-ip22-linux/lib -lpng12" \ [other options] 3. Building command ------------------- If the configuration finishes successfully, invoking GNU make builds FreeType2. Just say make or gmake depending on the name the GNU make binary actually has. 4. Installation --------------- Saying make install as usual to install FreeType2 into the directory tree specified by the argument of the `--prefix' option. As noted in section 2.2, FreeType2 is sometimes configured to be installed into the system directory of the target system, and should not be installed in the cross-building system. In such cases, the make variable `DESTDIR' is useful to change the root directory in the installation. For example, after make DESTDIR=/mnt/target_system_root/ install the built FreeType2 library files are installed into the directory `/mnt/target_system_root/<prefix_in_configure>/lib'. 5. TODO ------- Cross building between Cygwin (or MSys) and Unix must be tested. ---------------------------------------------------------------------- Copyright (C) 2006-2022 by suzuki toshiya, David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, and distributed under the terms of the FreeType project license, LICENSE.TXT. By continuing to use, modify, or distribute this file you indicate that you have read the license and understand and accept it fully. --- end of INSTALL.CROSS ---
whupdup/frame
real/third_party/freetype-2.12.0/docs/INSTALL.CROSS
cross
gpl-3.0
6,687
This document contains instructions how to build the FreeType library on non-Unix systems with the help of GNU Make. Note that if you are running Cygwin or MinGW/MSYS in Windows, you should follow the instructions in the file `INSTALL.UNIX' instead. FreeType 2 includes a powerful and flexible build system that allows you to easily compile it on a great variety of platforms from the command line. To do so, just follow these simple instructions. 1. Install GNU Make ------------------- The FreeType 2 build system relies on many features special to GNU Make. NEARLY ALL OTHER MAKE TOOLS FAIL, INCLUDING `BSD MAKE', SO REALLY INSTALL A RECENT VERSION OF GNU MAKE ON YOUR SYSTEM! Note that make++, a make tool written in Perl, supports enough features of GNU make to compile FreeType. See https://makepp.sourceforge.net for more information; you need version 2.0 or newer, and you must pass option `--norc-substitution'. Make sure that you are invoking GNU Make from the command line, by typing something like: make -v to display its version number. VERSION 3.81 OR NEWER IS NEEDED! 2. Invoke `make' ---------------- Go to the root directory of FreeType 2, then simply invoke GNU Make from the command line. This will launch the FreeType 2 host platform detection routines. A summary will be displayed, for example, on Win32. ============================================================== FreeType build system -- automatic system detection The following settings are used: platform windows compiler gcc configuration directory .\builds\windows configuration rules .\builds\windows\w32-gcc.mk If this does not correspond to your system or settings please remove the file 'config.mk' from this directory then read the INSTALL file for help. Otherwise, simply type 'make' again to build the library or 'make refdoc' to build the API reference (the latter needs Python >= 3.5). ============================================================= If the detected settings correspond to your platform and compiler, skip to step 5. Note that if your platform is completely alien to the build system, the detected platform will be `ansi'. 3. Configure the build system for a different compiler ------------------------------------------------------ If the build system correctly detected your platform, but you want to use a different compiler than the one specified in the summary (for most platforms, gcc is the default compiler), invoke GNU Make with make setup <compiler> Examples: to use Visual C++ on Win32, type: `make setup visualc' to use Borland C++ on Win32, type `make setup bcc32' to use Watcom C++ on Win32, type `make setup watcom' to use Intel C++ on Win32, type `make setup intelc' to use LCC-Win32 on Win32, type: `make setup lcc' to use Watcom C++ on OS/2, type `make setup watcom' to use VisualAge C++ on OS/2, type `make setup visualage' The <compiler> name to use is platform-dependent. The list of available compilers for your system is available in the file `builds/<system>/detect.mk'. If you are satisfied by the new configuration summary, skip to step 5. 3a. Use clang instead of gcc ---------------------------- The `clang' compiler can use FreeType's setup for `gcc'; it is sufficient to set the `CC' variable, for example make CC=clang 3b. Compiling with a C++ compiler --------------------------------- FreeType can be built with a C++ compiler, for example make CC="g++" If `clang++' should be used it is necessary to also override the `ANSIFLAGS' variable: make CC="clang++" ANSIFLAGS="" 4. Configure the build system for an unknown platform/compiler -------------------------------------------------------------- The auto-detection/setup phase of the build system copies a file to the current directory under the name `config.mk'. For example, on OS/2+gcc, it would simply copy `builds/os2/os2-gcc.mk' to `./config.mk'. If for some reason your platform isn't correctly detected, copy manually the configuration sub-makefile to `./config.mk' and go to step 5. Note that this file is a sub-Makefile used to specify Make variables for compiler and linker invocation during the build. You can easily create your own version from one of the existing configuration files, then copy it to the current directory under the name `./config.mk'. 5. Build the library -------------------- The auto-detection/setup phase should have copied a file in the current directory, called `./config.mk'. This file contains definitions of various Make variables used to invoke the compiler and linker during the build. [It has also generated a file called `ftmodule.h' in the objects directory (which is normally `<toplevel>/objs/'); please read the file `docs/CUSTOMIZE' for customization of FreeType.] To launch the build, simply invoke GNU Make again: The top Makefile will detect the configuration file and run the build with it. If you have used variables in step 3, you must use the same variables here, too. Final note The above instructions build a _statically_ linked library of the font engine in the `objs' directory. On Windows, you can build a DLL either with MinGW (within an MSYS shell, following the instructions in `INSTALL.UNIX'), or you use one of the Visual C++ project files; see the subdirectories of `builds/windows'. For everything else, you are on your own, and you might follow the instructions in `INSTALL.ANY' to create your own Makefiles. ---------------------------------------------------------------------- Copyright (C) 2003-2022 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, and distributed under the terms of the FreeType project license, LICENSE.TXT. By continuing to use, modify, or distribute this file you indicate that you have read the license and understand and accept it fully. --- end of INSTALL.GNU ---
whupdup/frame
real/third_party/freetype-2.12.0/docs/INSTALL.GNU
gnu
gpl-3.0
6,588
Please follow the instructions in INSTALL.UNIX to install FreeType on Mac OS X. Currently FreeType2 functions based on some deprecated Carbon APIs return `FT_Err_Unimplemented_Feature' always, even if FreeType2 is configured and built on the system that deprecated Carbon APIs are available. To enable deprecated FreeType2 functions as far as possible, replace `src/base/ftmac.c' by `builds/mac/ftmac.c'. Starting with Mac OS X 10.5, gcc defaults the deployment target to 10.5. In previous versions of Mac OS X, this defaulted to 10.1. If you want your built binaries to run only on 10.5, this change does not concern you. If you want them to also run on older versions of Mac OS X, then you must either set the MACOSX_DEPLOYMENT_TARGET environment variable or pass `-mmacosx-version-min' to gcc. You should specify the oldest version of Mac OS you want the code to run on. For example, if you use Bourne shell: export MACOSX_DEPLOYMENT_TARGET=10.2 or, if you use C shell: setenv MACOSX_DEPLOYMENT_TARGET 10.2 Alternatively, you could pass `-mmacosx-version-min=10.2' to gcc. Here the number 10.2 is the lowest version that the built binaries can run on. In the above cases, the built binaries will run on Mac OS X 10.2 and later, but _not_ earlier. If you want to run on earlier, you have to set lower version, e.g., 10.0. For classic Mac OS (Mac OS 7, 8, 9) please refer to builds/mac/README.
whupdup/frame
real/third_party/freetype-2.12.0/docs/INSTALL.MAC
mac
gpl-3.0
1,466
This document contains instructions on how to build the FreeType library on Unix systems. This also works for emulations like Cygwin or MSys on Win32: 1. Ensure that you are using GNU Make ------------------------------------- The FreeType build system _exclusively_ works with GNU Make. You will not be able to compile the library with the instructions below using any other alternative (including BSD Make). Check that you have GNU make by running the command: make -v This should dump some text that begins with: GNU Make <version number> Copyright (C) <year> Free Software Foundation Inc. Note that version 3.81 or higher is *required* or the build will fail. It is also fine to have GNU Make under another name (e.g. 'gmake') if you use the MAKE variable as described below. As a special exception, 'makepp' can also be used to build FreeType 2. See the file docs/MAKEPP for details. For builds with `cmake' please check file `CMakeLists.txt'; this is a contributed file not directly supported by the FreeType team. 2. Regenerate the configure script if needed -------------------------------------------- This only applies if you are building a git snapshot or checkout, *not* if you grabbed the sources of an official release. You need to invoke the `autogen.sh' script in the top-level directory in order to create the `configure' script for your platform. Normally, this simply means typing: sh autogen.sh In case of problems, you may need to install or upgrade Automake, Autoconf or Libtool. See `README.git' in the top-level directory for more information. 3. Build and install the library -------------------------------- Say ./configure --help to see the list of possible configuration options and important environment variables. The ./configure script will detect some prerequisite system libraries (libpng, brotli, etc.) if their headers are available at the default locations. The following should work on all Unix systems where the `make' command invokes GNU Make: ./configure [options] make make install (as root) The default installation path is `/usr/local'. It can be changed with the `--prefix=<path>' option. Example: ./configure --prefix=/usr When using a different command to invoke GNU Make, use the MAKE variable. For example, if `gmake' is the command to use on your system, do something like: MAKE=gmake ./configure [options] gmake gmake install (as root) If this still doesn't work, there must be a problem with your system (e.g., you are using a very old version of GNU Make). For library identification, FreeType's `configure' script uses the `pkg-config' interface: Assuming it needs library `foo', it calls the `pkg-config' program to find information on library `foo', which in turn looks for a `foo.pc' file installed at the system. Some platforms, however, don't come with `pkg-support'; you then have to use environment variables as described by `configure --help'. Example: LIBPNG_CFLAGS="-I/path/to/libpng/include/directory" \ LIBPNG_LIBS="-L/path/to/libpng/lib/directory" \ configure ... It is possible to compile FreeType in a different directory. Assuming the FreeType source files in directory `/src/freetype' a compilation in directory `foo' works as follows: cd foo /src/freetype/configure [options] make make install 3.1 Interdependency with HarfBuzz ................................. Note that there is a chicken-and-egg problem currently since the HarfBuzz library (used by the auto-hinter to improve support of OpenType fonts) depends on FreeType, which can be solved as follows in case HarfBuzz is not yet installed on your system. 1. Call FreeType's `configure' script with option `--without-harfbuzz', then compile and install FreeType. 2. Compile and install HarfBuzz. 3. Call FreeType's `configure' script without option `--without-harfbuzz' (after executing `make distclean'), then compile and install FreeType again. ---------------------------------------------------------------------- Copyright (C) 2003-2022 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, and distributed under the terms of the FreeType project license, LICENSE.TXT. By continuing to use, modify, or distribute this file you indicate that you have read the license and understand and accept it fully. --- end of INSTALL.UNIX ---
whupdup/frame
real/third_party/freetype-2.12.0/docs/INSTALL.UNIX
unix
gpl-3.0
4,933
How to build the FreeType 2 library on VMS ----------------------------------------- It is actually very straightforward to install the FreeType 2 library. Just execute vms_make.com from the toplevel directory to build the library. This procedure currently accepts the following options: DEBUG Build the library with debug information and without optimization. lopts=<value> Options to pass to the link command e.g. lopts=/traceback ccopt=<value> Options to pass to the C compiler e.g. ccopt=/float=ieee In case you did download the demos, place them in a separate directory sharing the same top level as the directory of FreeType 2 and follow the same instructions as above for the demos from there. The build process relies on this to figure out the location of the FreeType 2 include files. To rebuild the sources it is necessary to have MMS/MMK installed on the system. The library is available in the directory [.LIB] To compile applications using FreeType 2 you have to define the logical FREETYPE pointing to the directory [.INCLUDE.FREETYPE] i.e., if the directory in which this INSTALL.VMS file is located is $disk:[freetype] then define the logical with define freetype $disk:[freetype.include.freetype] This version has been tested with Compaq C V6.2-006 on OpenVMS Alpha V7.2-1. Any problems can be reported to Jouk Jansen <joukj@hrem.stm.tudelft.nl> or Martin P.J. Zinser <zinser@zinser.no-ip.info> ------------------------------------------------------------------------ Copyright (C) 2000-2022 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, and distributed under the terms of the FreeType project license, LICENSE.TXT. By continuing to use, modify, or distribute this file you indicate that you have read the license and understand and accept it fully. --- end of INSTALL.VMS ---
whupdup/frame
real/third_party/freetype-2.12.0/docs/INSTALL.VMS
vms
gpl-3.0
1,971
As a special exception, FreeType can also be built with the 'makepp' build tool, available from https://makepp.sourceforge.net. Note, however, that you will need at least version 2.0 and pass the option --norc-substitution to have it work correctly.
whupdup/frame
real/third_party/freetype-2.12.0/docs/MAKEPP
none
gpl-3.0
256
This file describes various problems that have been encountered in compiling, installing and running FreeType 2. Suggestions for additions or other improvements to this file are welcome. ---------------------------------------------------------------------- Running Problems ================ * Some Type 1, Multiple Masters, and CID-keyed PostScript fonts aren't handled correctly. ----- Of course, there might be bugs in FreeType, but some fonts based on the PostScript format can't be handled indeed. The reason is that FreeType doesn't contain a full PostScript interpreter but applies pattern matching instead. In case a font doesn't follow the standard structure of the given font format, FreeType fails. A typical example is Adobe's `Optima' font family which contains extra code to switch between low and high resolution versions of the glyphs. It might be possible to patch FreeType in some situations, though. Please report failing fonts so that we investigate the problem and set up a list of such problematic fonts. * Why do identical FreeType versions render differently on different platforms? ----- Different distributions compile FreeType with different options. The developer version of a distribution's FreeType package, which is needed to compile your program against FreeType, includes the file ftoption.h. Compare each platform's copy of ftoption.h to find the differences. ---------------------------------------------------------------------- Compilation Problems ==================== * I get an `internal compilation error' (ICE) while compiling FreeType 2.2.1 with Intel C++. This has been reported for the following compiler version: Intel(R) C++ Compiler for 32-bit applications, Version 9.0 Build 20050430Z Package ID: W_CC_P_9.0.019 ----- The best solution is to update the compiler to version Intel(R) C++ Compiler for 32-bit applications, Version 9.1 Build 20060323Z Package ID: W_CC_P_9.1.022 or newer. If this isn't feasible, apply the following patch. --- src/cache/ftcbasic.c 20 Mar 2006 12:10:24 -0000 1.20 +++ src/cache/ftcbasic.c.patched 15 May 2006 02:51:02 -0000 @@ -252,7 +252,7 @@ */ FT_CALLBACK_TABLE_DEF - const FTC_IFamilyClassRec ftc_basic_image_family_class = + FTC_IFamilyClassRec ftc_basic_image_family_class = { { sizeof ( FTC_BasicFamilyRec ), @@ -266,7 +266,7 @@ FT_CALLBACK_TABLE_DEF - const FTC_GCacheClassRec ftc_basic_image_cache_class = + FTC_GCacheClassRec ftc_basic_image_cache_class = { { ftc_inode_new, ---------------------------------------------------------------------- --- end of PROBLEMS ---
whupdup/frame
real/third_party/freetype-2.12.0/docs/PROBLEMS
none
gpl-3.0
2,714
After saying `make refdoc' or `make refdoc-venv' the `reference/' directory contains the FreeType API reference. You need Python >= 3.5 and pip to make this target. There are two ways to generate the documentation: 1. Using `make refdoc': - Ensure `python' and `pip' are available. - Install pip package `docwriter' with `pip install --user docwriter'. - Make target with `make refdoc'. - This target can be run offline once required packages are installed. 2. Using `make refdoc-venv' (requires internet access): - Ensure `python', `pip' and Python package `virtualenv' are available. - Make target with `make refdoc-venv'. - This may or may not require internet access every time depending on pip and system caching. This also works with Jam: Just type `jam refdoc' in the main directory. Some troubleshooting tips: * Regularly run `pip install --upgrade docwriter' to check for updates which may include bug fixes. * `Docwriter' does not support Python 2. Ensure that Python >= 3.5 is installed and available as `python3'/`python'. * Ensure that `docwriter' is installed in the same Python target that `make refdoc' uses (python3/python). * If none of this works, send a mail to `freetype-devel@nongnu.org' or file an issue at `https://github.com/freetype/docwriter/issues'.
whupdup/frame
real/third_party/freetype-2.12.0/docs/README
none
gpl-3.0
1,323
Here is a list of items that need to be addressed in FreeType 2 --------------------------------------------------------------- * Implement stem3/counter hints properly in the Postscript hinter. * Add CIDCMap support to the CID driver. * Add track kerning support to the PFR driver. * Add kerning (AFM file) support to the CID driver. Here is a list of bugs which should be handled ---------------------------------------------- Other bugs have been registered at the savannah bugzilla of FreeType. * CID driver: Handle the case where a CID font has a top-level font matrix also (see PLRM, 5.11.3, Type 0 CIDFonts). Since CID_FaceInfoRec lacks a font_matrix entry we have to directly apply it to all subfont matrices. * CID driver: Use top-level font matrix entry for setting the upem value, not the entries in the FDarray. If absent, use 1000. ------------------------------------------------------------------------ Copyright (C) 2001-2022 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, and distributed under the terms of the FreeType project license, LICENSE.TXT. By continuing to use, modify, or distribute this file you indicate that you have read the license and understand and accept it fully. --- end of TODO ---
whupdup/frame
real/third_party/freetype-2.12.0/docs/TODO
none
gpl-3.0
1,364
Due to our use of `libtool' to generate and install the FreeType 2 libraries on Unix systems, as well as other historical events, it is generally very difficult to know precisely which release of the font engine is installed on a given system. This file tries to explain why and to document ways to properly detect FreeType on Unix. 1. Version and Release numbers ------------------------------ For each new public release of FreeType 2, there are generally *three* distinct `version' numbers to consider: * The official FreeType 2 release number, like 2.7.0 or 2.10.2. * The libtool (and Unix) specific version number, like 23.2.17. This is what pkg-config freetype2 --modversion or freetype-config --version returns. * The platform-specific shared object number, used for example when the library is installed as `/usr/lib/libfreetype.so.6.17.2'. The platform-specific number is, unsurprisingly, platform-specific and varies with the operating system you are using (several variants of Linux, FreeBSD, Solaris, etc.). You should thus _never_ use it, even for simple tests. The libtool-specific number does not equal the release number but is tied to it. The release number is available at *compile* time through the following macros defined in `freetype.h': - FREETYPE_MAJOR: major release number - FREETYPE_MINOR: minor release number - FREETYPE_PATCH: patch release number See below for a small autoconf fragment. The release number is also available at *runtime* through the `FT_Library_Version' API. 2. History ---------- The following table gives, for all releases since 2.5.0, the corresponding libtool number, as well as the shared object number found on _most_ systems, but not all of them: release libtool so ------------------------------- 2.12.0 24.2.18 6.18.2 2.11.1 24.1.18 6.18.1 2.11.0 24.0.18 6.18.0 2.10.4 23.4.17 6.17.4 2.10.3 23.3.17 6.17.3 2.10.2 23.2.17 6.17.2 2.10.1 23.1.17 6.17.1 2.10.0 23.0.17 6.17.0 2.9.1 22.1.16 6.16.1 2.9.0 22.0.16 6.16.0 2.8.1 21.0.15 6.15.0 2.8.0 20.0.14 6.14.0 2.7.1 19.0.13 6.13.0 2.7.0 18.6.12 6.12.6 2.6.5 18.5.12 6.12.5 2.6.4 18.4.12 6.12.4 2.6.3 18.3.12 6.12.3 2.6.2 18.2.12 6.12.2 2.6.1 18.1.12 6.12.1 2.6.0 18.0.12 6.12.0 2.5.5 17.4.11 6.11.4 2.5.4 17.3.11 6.11.3 2.5.3 17.2.11 6.11.2 2.5.2 17.1.11 6.11.1 2.5.1 17.0.11 6.11.0 2.5.0 16.2.10 6.10.2 3. Autoconf Code Fragment ------------------------- Lars Clausen contributed the following autoconf fragment to check which version of FreeType is installed on a system (now updated to use `pkg-config' instead of `freetype-config'). This one tests for a version that is at least 2.10.2; you should change it to check against other release numbers. AC_MSG_CHECKING([whether FreeType version is 2.10.2 or higher]) old_CPPFLAGS="$CPPFLAGS" CPPFLAGS=`pkg-config freetype2 --cflags` AC_TRY_CPP([ #include <ft2build.h> #include <freetype/freetype.h> #if FREETYPE_MAJOR*10000 + FREETYPE_MINOR*100 + FREETYPE_PATCH < 21002 # error FreeType version too low. #endif ], [AC_MSG_RESULT(yes) FREETYPE_LIBS=`pkg-config freetype2 --libs` AC_SUBST(FREETYPE_LIBS) AC_DEFINE(HAVE_FREETYPE,1,[Define if you have the FreeType2 library]) CPPFLAGS="$old_CPPFLAGS"], [AC_MSG_ERROR([Need FreeType library version 2.10.2 or higher])]) ---------------------------------------------------------------------- Copyright (C) 2002-2022 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, and distributed under the terms of the FreeType project license, LICENSE.TXT. By continuing to use, modify, or distribute this file you indicate that you have read the license and understand and accept it fully. --- end of VERSIONS.TXT ---
whupdup/frame
real/third_party/freetype-2.12.0/docs/VERSIONS.TXT
Text
gpl-3.0
4,182
This file contains a list of various font formats. It gives the reference document and whether it is supported in FreeType 2. Table fields ------------ wrapper format The format used to represent the font data. In the table below it is used only if the font format differs. Possible values are SFNT binary PFB binary PS a text header, followed by binary or text data LZW compressed with either `gzip' or `compress' BZ2 compressed with `bzip2'. font format How the font is to be accessed, possibly after converting the file type and wrapper format into a generic form. Bitmap formats are `BDF', `PCF', and one form of `WINFNT'; all others are vector formats. `PS' indicates third-order, `TT' second-order Bézier curves. font type Sub-formats of the font format. `SBIT' and `MACSBIT' are bitmap formats, `MM' and `VAR' support optical axes. `CFF2' supports optical axes also. glyph access If not specified, the glyph access is `standard' to the font format. Values are `CID' for CID-keyed fonts, `SYNTHETIC' for fonts that are modified versions of other fonts by means of a transformation matrix, and `TYPE_0' for PS fonts which are to be accessed in a tree-like structure. FreeType driver The module in the FreeType library which handles the specific font format. A missing entry means that FreeType doesn't support the font format (yet). Notes ----- The SFNT container format also provides `collections' (usually having the file extension `.ttc' or `.otc'). A collection contains multiple font faces that share some tables to avoid redundancy, thus reducing the file size. In FreeType, elements of a collection can be accessed with a proper face index. Both the GX and the OpenType 1.8 variation fonts provide `named instances'. FreeType maps them to face indices (they can also be accessed with the standard MM interface). Other font formats (not using the SFNT wrapper) also provide multiple faces within one file; they are marked with an asterisk (`*') in the table below. FreeType can be configured to support Mac files (on older Mac OS versions, a `file' is stored as a data and a resource fork, this is, within two separate data chunks). If a file can't be opened as a font, FreeType then checks whether it is a resource fork, trying to extract the contained font data from either a `POST' or `sfnt' resource. Please send additions and/or corrections to wl@gnu.org or to the FreeType developer's list at freetype-devel@nongnu.org (for subscribers only). If you can provide a font example for a format which isn't supported yet please send a mail too. wrapper font font glyph FreeType reference format format type access driver documents ----------------------------------------------------------------------------- --- BDF --- --- bdf 5005.BDF_Spec.pdf, X11 SFNT PS TYPE_1 --- type1 Type 1 GX Font Format (for the Mac) [3] SFNT PS TYPE_1 CID cid 5180.sfnt.pdf (for the Mac) [3] SFNT PS CFF --- cff OT spec, 5176.CFF.pdf (`OTTO' format) SFNT PS CFF CID cff OT spec, 5176.CFF.pdf SFNT PS CFF SYNTHETIC --- OT spec, 5176.CFF.pdf SFNT PS CFF2 --- cff OT spec 1.8 SFNT TT SBIT --- sfnt XFree86 (bitmaps only; with `head' table) SFNT TT MACSBIT --- sfnt OT spec (for the Mac; bitmaps only; `bhed' table) SFNT TT --- --- truetype OT spec (`normal' TT font) SFNT TT VAR --- truetype GX spec (`?var' tables) SFNT TT VAR --- truetype OT spec 1.8 (`?var' + `?VAR' tables) WOFF --- --- --- cff, Compressed SFNT, ver. 1.0 [6] truetype WOFF2 --- --- --- cff, Compressed SFNT, ver. 2.0 [6] truetype --- PS TYPE_1 --- type1 T1_SPEC.pdf (PFA, Type 1 font resource) PFB PS TYPE_1 --- type1 T1_SPEC.pdf, 5040.Download_Fonts.pdf (`normal' Type 1 font) --- PS TYPE_1 CID cid PLRM.pdf (CID Font Type 0; Type 9 font) --- PS MM --- type1 5015.Type1_Supp.pdf (Multiple Masters) --- PS CFF --- cff 5176.CFF.pdf (`pure' CFF) --- PS* CFF CID cff 5176.CFF.pdf (`pure' CFF) --- PS CFF SYNTHETIC --- 5176.CFF.pdf (`pure' CFF) --- PS CFF/MM --- cff old 5167.CFF.pdf (`pure' CFF) [3] --- PS* CFF/MM CID cff old 5167.CFF.pdf (`pure' CFF) [3] --- PS CFF/MM SYNTHETIC --- old 5167.CFF.pdf (`pure' CFF) [3] PS PS CFF --- --- PLRM.pdf (Type 2) [1] PS PS* CFF CID --- PLRM.pdf (Type 2) [1] PS PS CFF SYNTHETIC --- PLRM.pdf (Type 2) [1] PS PS CFF/MM --- --- PLRM.pdf (Type 2) [1] PS PS* CFF/MM CID --- PLRM.pdf (Type 2) [1] PS PS CFF/MM SYNTHETIC --- PLRM.pdf (Type 2) [1] --- PS --- TYPE_0 --- PLRM.pdf --- PS TYPE_3 --- --- PLRM.pdf (never supported) --- PS TYPE_3 CID --- PLRM.pdf (CID Font Type 1; Type 10 font; never supported) PS PS TYPE_14 --- --- PLRM.pdf (Chameleon font; Type 14 font; never supported?) --- PS TYPE_32 CID --- PLRM.pdf (CID Font Type 4; Type 32 font; never supported?) PS TT --- --- type42 5012.Type42_Spec.pdf (Type 42 font) PS TT --- CID --- PLRM.pdf (CID Font Type 2; Type 11 font) ? ? CEF ? cff ? --- PCF --- --- pcf X11 [4] LZW PCF --- --- pcf X11 [4] BZ2 PCF --- --- pcf X11 [4] --- PFR* PFR0 --- pfr [2] --- PFR PFR1 --- --- (undocumented, proprietary; probably never supported) --- WINFNT* --- --- winfonts Windows developer's notes [5] --- WINFNT VECTOR --- --- Windows developer's notes [5] [1] Support should be rather simple since this is identical to `CFF' but in a PS wrapper. [2] The official PFR specification is no longer available, but archive.org has archived it: https://web.archive.org/web/20091014062300/http://www.bitstream.com/font_rendering/products/truedoc/pfrspec.html https://web.archive.org/web/20081115152605/http://www.bitstream.com/font_rendering/pdfs/pfrspec1.3.pdf The syntax of the auxiliary data is not defined there, but is partially defined in MHP 1.0.3 (also called ETSI TS 101812 V1.3.1) section 7.4. https://www.etsi.org/ https://webapp.etsi.org/workprogram/Report_WorkItem.asp?WKI_ID=18799 [3] Support is rudimentary currently; some tables or data are not loaded yet. [4] See THE X WINDOW SYSTEM SERVER: X VERSION 11, RELEASE 5 Elias Israel, Erik Fortune, Digital Press, 1992 ISBN 1-55558-096-3 for a specification given in Appendix D on pgs. 436-450. However, this information might be out of date; unfortunately, there is no PCF specification available online, and this book is out of print. George Williams deduced the font format from the X11 sources and documented it for his FontForge font editor: https://fontforge.github.io/pcf-format.html [5] This is from MS Windows 3; see Microsoft's Knowledge Base article at https://support.microsoft.com/kb/65123 [6] Supported font formats are TrueType and OpenType fonts as defined in the OpenType specification 1.6 and newer. ------------------------------------------------------------------------ Copyright (C) 2004-2022 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, and distributed under the terms of the FreeType project license, LICENSE.TXT. By continuing to use, modify, or distribute this file you indicate that you have read the license and understand and accept it fully. --- end of formats.txt --- Local Variables: coding: utf-8 End:
whupdup/frame
real/third_party/freetype-2.12.0/docs/formats.txt
Text
gpl-3.0
9,551
.TH FREETYPE-CONFIG 1 "March 2022" "FreeType 2.12.0" . . .SH NAME . freetype-config \- Get information about a libfreetype installation . . .SH SYNOPSIS . .B freetype-config .RI [ options ] . . .SH DESCRIPTION . .B freetype-config returns information needed for compiling and linking programs with the FreeType library, such as linker flags and compilation parameters. . Alternatively, it can be used to query information about the FreeType library version installed on the system, such as the installation (directory path) prefix or the FreeType version number. . .PP If .BR pkg-config (1) is found in the path, .B freetype-config acts as a wrapper for .BR pkg-config . . .PP This program is part of the FreeType package. . . .SH OPTIONS . There are two types of options: output/display selection options, and path override options. . . .SS Output selection options . Only one of the output selection options should be given at each program invocation. . .TP .B \-\-prefix Return the prefix value of the installed FreeType library (the default prefix will be `/usr' in most cases for distribution-installed packages). . .TP .B \-\-exec-prefix Return the executable prefix value of the installed FreeType library (will often be the same as the prefix value). . .TP .B \-\-ftversion Return the FreeType version number, directly derived from file `freetype.h'. . .TP .B \-\-version Return the `libtool version' of the FreeType library. . .TP .B \-\-libtool Return the library name for linking with libtool. . .TP .B \-\-libs Return compiler flags for linking with the installed FreeType library. . .TP .B \-\-cflags Return compiler flags for compiling against the installed FreeType library. . .TP .B \-\-static Make command line options display flags for static linking. . .TP .B \-\-help Show help and exit. . . .SS Path override options . These affect any selected output option, except the libtool version returned by .BR \-\-version . . .TP .BI \-\-prefix= PREFIX Override .B \-\-prefix value with .IR PREFIX . . This also sets .BI \-\-exec-prefix= PREFIX if option .B \-\-exec-prefix is not explicitly given. . .TP .BI \-\-exec-prefix= EPREFIX Override .B \-\-exec-prefix value with .IR EPREFIX . . . .SH BUGS In case the libraries FreeType links to are located in non-standard directories, and .BR pkg-config (1) is not available, the output from option .B \-\-libs might be incomplete. . It is thus recommended to use the .BR pkg-config (1) interface instead, which is able to correctly resolve all dependencies. . .PP Setting .B \-\-exec-prefix (either explicitly or implicitly) might return incorrect results if combined with option .BR \-\-static . . The same problem can occur if you set the .B SYSROOT environment variable. . . .SH AUTHOR . This manual page was contributed by Nis Martensen <nis.martensen@web.de>, with further refinements from the FreeType team. . . .\" eof
whupdup/frame
real/third_party/freetype-2.12.0/docs/freetype-config.1
1
gpl-3.0
2,887
2002-02-09 Werner Lemberg <wl@gnu.org> * README: Fix typo. * docs/CHANGES: Minor fixes. * Version 2.0.8 released. ========================= 2002-02-08 David Turner <david@freetype.org> * docs/CHANGES: Updating for 2.0.8. * include/freetype/freetype.h: Setting `PATCH_LEVEL' to 8 and removing `FT_Get_Next_Char' from the API (temporarily). * include/freetype/freetype.h: Adding comments to FT_Get_Next_Char; note that this function might temporarily be removed for the 2.0.8 release. 2002-02-07 David Turner <david@freetype.org> * src/pcf/pcfread.c (pcf_load_font): Removed immature support of the AVERAGE_WIDTH property. 2002-02-06 David Turner <david@freetype.org> * src/sfnt/sfobjs.c (SFNT_Load_Face): Since many fonts embedded in PDF documents do not include 'cmap', 'post' and 'name' tables, the SFNT face loader has been changed to not immediately report an error if these are not present. Note that the specification _requires_ these tables, but Adobe seems to ignore it completely. * src/sfnt/ttcmap.c: Removing compiler warnings. * src/pcf/pcfread.c (pcf_read_TOC): Use FT_UInt. (pcf_parse_metric, pcf_parse_compressed_metric): Removed. Code is now in ... (pcf_get_metric): Here. (pcfSeekToType): Renamed to ... (pcf_seek_to_table_type): This. Use FT_Int. (pcfHasType): Renamed to ... (pcf_has_table_type): This. Use FT_Int. (find_property): Renamed to ... (pcf_find_property): This. Use FT_Int. (pcf_get_bitmaps, pcf_get_encodings): Handle invalid PCF fonts better (delaying format checks out of FT_Access_Frame .. FT_Forget_Frame blocks to avoid leaving the stream in an incorrect state when encountering an invalid PCF font). * src/pcf/pcfdriver.c (PCF_Done_Face): Renamed to ... (PCF_Face_Done): This. (PCF_Init_Face): Renamed to ... (PCF_Face_Init): This. (PCF_Get_Char_Index): Renamed to ... (PCF_Char_Get_Index): This. (PCF_Get_Next_Char): Renamed to ... (PCF_Char_Get_Next): This. (pcf_driver_class): Updated. * src/pcf/pcf.h (PCF_Done_Face): Removed. 2002-02-06 Detlef Würkner <TetiSoft@apg.lahn.de> * src/pcf/pcfdriver.c (FT_Done_Face): Fixed small memory leak. * src/pcf/pcfread.c (pcf_load_font): Now handles the `AVERAGE_WIDTH' property to return correct character pixel (width/height) pairs for embedded bitmaps. 2002-02-04 Keith Packard <keithp@keithp.com> Adding the function `FT_Get_Next_Char', doing the obvious thing w.r.t. the selected charmap. * include/freetype/freetype.h: Add prototype. * include/freetype/internal/ftdriver.h: Add `FTDriver_getNextChar' typedef. (FT_Driver_Class): Use it. * include/freetype/internal/psnames.h: Add `PS_Next_Unicode_Func' typedef. (PSNames_Interface): Use it. * include/freetype/internal/tttypes.h: Add `TT_CharNext_Func' typedef. (TT_CMapTable): Use it. * src/base/ftobjs.c (FT_Get_Next_Char): New function, implementing high-level API. * src/cff/cffdrivr.c (cff_get_next_char): New function. (cff_driver_class): Add it. * src/cid/cidriver.c (Cid_Get_Next_Char): New function. (t1cid_driver_class): Add it. * src/pcf/pcfdriver.c (PCF_Get_Next_Char): New function. (pcf_driver_class): Add it. * src/psnames/psmodule.c (PS_Next_Unicode): New function. (psnames_interface): Add it. * src/sfnt/ttcmap.c (code_to_next0, code_to_next2, code_to_next4, code_to_next6, code_to_next_8_12, code_to_next_10): New auxiliary functions. (TT_CharMap_Load): Use them. * src/truetype/ttdriver.c (Get_Next_Char): New function. (tt_driver_class): Add it. * src/type1/t1driver.c (Get_Next_Char): New function. (t1_driver_class): Add it. * src/winfonts/winfnt.c (FNT_Get_Next_Char): New function. (winfnt_driver_class): Add it. * src/pcf/pcfread.c (pcf_load_font): For now, report Unicode for Unicode and Latin 1 encodings. 2002-02-02 Keith Packard <keithp@keithp.com> * builds/unix/freetype-config.in: Add missing `fi'. * Version 2.0.7 released. ========================= 2002-02-01 David Turner <david@freetype.org> * include/freetype/freetype.h: Increasing FREETYPE_PATCH to 7 for the new release. 2002-01-31 David Turner <david@freetype.org> * README, README.UNX, docs/CHANGES: Updating documentation for the 2.0.7 release. 2002-01-30 David Turner <david@freetype.org> * INSTALL: Moved to ... * docs/INSTALL: Here to avoid conflicts with the `install' script on Windows, where the filesystem doesn't preserve case. 2002-01-29 David Turner <david@freetype.org> * configure: Fixed the script. It previously didn't accept more than one argument correctly. For example, when typing: ./configure --disable-shared --disable-nls the `--disable-nls' was incorrectly sent to the `make' program. 2002-01-29 Werner Lemberg <wl@gnu.org> * README.UNX: Fix typo. * builds/unix/install.mk (uninstall): Fix library name for libtool. 2002-01-28 Francesco Zappa Nardelli <Francesco.Zappa.Nardelli@ens.fr> * src/pcf/pcfdriver.c (PCF_Done_Face): Fix incorrect destruction of the face object (face->toc.tables, face->root.family_name, face->root.available_size, face->charset_encoding, face->charset_registry are now freed). Thanks to Niels Moseley. 2002-01-28 Roberto Alameda <ojancano@geekmail.de> * src/type1/t1load.c (parse_encoding): Set `loader->num_chars'. 2002-01-28 Werner Lemberg <wl@gnu.org> * src/type1/t1load.c (parse_subrs, parse_charstrings): Use copy of `base' string for decrypting to not modify the original data. Based on a patch by Jakub Bogusz <qboosh@pld.org.pl>. 2002-01-27 Giuliano Pochini <pochini@shiny.it> * src/smooth/ftgrays.c (gray_render_scanline): Fix bug which caused bad rendering of thin lines (less than one pixel thick). 2002-01-25 Werner Lemberg <wl@gnu.org> * src/cff/cffdrivr.c (cff_get_name_index): Make last patch work actually. 2002-01-25 Martin Zinser <zinser@decus.de> * src/cache/ftccache.c (ftc_node_done, ftc_node_destroy): Fix compilation warnings. * src/base/descrip.mms (OBJS): Add `ftmm.obj'. * src/cache/descrip.mms (ftcache.obj): Dependencies added. 2002-01-25 WANG Yi <wangyi@founder.com.cn> * src/cff/cffdrivr.c (cff_get_name_index): Fix deallocation bug. 2002-01-21 Antoine Leca <Antoine-Freetype@Leca-Marti.org> * docs/PATENTS: Typo fixed (thanks to Detlef `Hawkeye' Würkner) in the URL for the online resource. 2002-01-18 Ian Brown <ian.brown@printsoft.de> * builds/win32/ftdebug.c: New file. * builds/win32/visualc/freetype.dsp: Updated. 2002-01-18 Detlef Würkner <TetiSoft@apg.lahn.de> * builds/amiga/src/base/ftsystem.c: Updated for AmigaOS 3.9. * builds/amiga/README: Updated. 2002-01-18 Ian Brown <ian.brown@printsoft.de> * builds/win32/visualc/freetype.dsp: Updated. 2002-01-13 Werner Lemberg <wl@gnu.org> * builds/unix/freetype2.a4: The script was still buggy. * builds/unix/freetype-config.in: Make it really work for any install prefix. 2002-01-10 Werner Lemberg <wl@gnu.org> * builds/unix/freetype2.a4: Fix some serious bugs. 2002-01-09 David Turner <david@freetype.org> * builds/unix/configure.ac: Build top-level Jamfile. 2002-01-09 Maxim Shemanarev <mcseemagg@yahoo.com> * src/smooth/ftgrays.c (gray_render_line): Small optimization to the smooth anti-aliased renderer that deals with vertical segments. This results in a 5-7% speedup in rendering speed. 2002-01-08 David Turner <david@freetype.org> Added some wrapper scripts to make the installation more Unix-friendly. * configure, install: New files. * INSTALL, README.UNX: Updated installation documentation to use the new 'configure' and 'install' scripts. 2002-01-07 David Turner <david@freetype.org> * Version 2.0.6 released. ========================= * docs/BUGS, docs/CHANGES: Updating documentation for 2.0.6 release. * src/tools/docmaker.py: Fixed HTML quoting in sources. (html_format): Replaced with ... (html_quote): New function. (html_quote0): New function. (DocCode::dump_html): Small improvement. (DocParagraph::dump, DocBlock::html): Use html_quote0 and html_quote. * include/freetype/config/ftoption.h: Setting default options for a release build (debugging off, bytecode interpreter off). * src/base/ftobjs.c, src/base/ftoutln.c, src/cache/ftccmap.c, src/cff/cffload.c, src/cff/cffobjs.c, src/pshinter/pshalgo2.c, src/sfnt/ttload.c, src/sfnt/ttsbit.c: Removing small compiler warnings (in pedantic compilation modes). 2002-01-05 David Turner <david@freetype.org> * src/autohint/ahhint.c (ah_align_linked_edge): Modified computation of auto-hinted stem widths; this avoids color fringes in `ClearType-like' rendering. * src/truetype/ttgload.c (TT_Load_Glyph_Header, TT_Load_Simple_Glyph, TT_Load_Composite_Glyph, load_truetype_glyph): Modified the TrueType loader to make it more paranoid; this avoids nasty buffer overflows in the case of invalid glyph data (as encountered in the output of some buggy font converters). 2002-01-04 David Turner <david@freetype.org> * README.UNX: Added special README file for Unix users. * builds/unix/ftsystem.c (FT_New_Stream): Fixed typo. * src/base/ftobjs.c: Added #include FT_OUTLINE_H to get rid of compiler warnings. * src/base/ftoutln.c (FT_Outline_Check): Remove compiler warning. 2002-01-03 Werner Lemberg <wl@gnu.org> * src/type1/t1objs.c (T1_Face_Init): Add cast to avoid compiler warning. 2002-01-03 Keith Packard <keithp@keithp.com> * builds/unix/ftsystem.c (FT_New_Stream): Added a fix to ensure that all FreeType input streams are closed in child processes of a `fork' on Unix systems. This is important to avoid (potential) access control issues. 2002-01-03 David Turner <david@freetype.org> * src/type1/t1objs.c (T1_Face_Init): Fixed a bug that crashed the library when dealing with certain weird fonts like `Stalingrad', in `sadn.pfb' (this font has no full font name entry). * src/base/ftoutln.c, include/freetype/ftoutln.h (FT_Outline_Check): New function to check the consistency of outline data. * src/base/ftobjs.c (FT_Load_Glyph): Use `FT_Outline_Check' to ensure that loaded glyphs are valid. This allows certain fonts like `tt1095m_.ttf' to be loaded even though it appears they contain really funky glyphs. There still is a bug there, though. * src/truetype/ttgload.c (load_truetype_glyph): Fix error condition. 2001-12-30 David Turner <david@freetype.org> * src/autohint/ahhint.c (ah_hinter_load): Fix advance width computation of auto-hinted glyphs. This noticeably improves the spacing of letters in KDE and Gnome. 2001-12-25 Antoine Leca <Antoine-Freetype@Leca-Marti.org> * builds/dos/detect.mk: Correcting the order for Borland compilers: 16-bit bcc was never selected, always overridden by 32-bit bcc32. 2001-12-22 Francesco Zappa Nardelli <Francesco.Zappa.Nardelli@ens.fr> * src/pcf/pcfread.c (pcf_load_font): Handle property `POINT_SIZE' and fix incorrect computation of `available_sizes'. 2001-12-22 David Turner <david@freetype.org> * src/autohint/ahhint.c (ah_hinter_load): Auto-hinted glyphs had an incorrect glyph advance in the case of mono-width fonts (like Courier, Andale Mono, and others). 2001-12-22 Detlef Würkner <TetiSoft@apg.lahn.de> * builds/amiga/*: Adaptations to latest changes. Support added for MorphOS. 2001-12-22 Werner Lemberg <wl@gnu.org> * src/pshinter/pshrec.c (FT_COMPONENT): Redefine to `trace_pshrec'. (ps_mask_table_merge, ps_hints_open, ps_hints_stem, ps_hints_t1stem3, ps_hints_t2mask, ps_hints_t2counter): Fix FT_ERROR messages. * src/pshinter/pshalgo1.c (FT_COMPONENT): Define as `trace_pshalgo1'. * src/pshinter/pshalgo2.c (FT_COMPONENT): Define as `trace_pshalgo2'. * include/freetype/internal/ftdebug.h (FT_Trace): Updated. * docs/modules.txt: New file. 2001-12-21 David Turner <david@freetype.org> * src/pshinter/pshrec.c (ps_hints_t2mask, ps_hints_t2counter): Ignore invalid `hintmask' and `cntrmask' operators (instead of returning an error). Glyph 2028 of the CFF font `MSung-Light-Acro' couldn't be rendered otherwise (it seems its charstring is buggy, though this requires more analysis). (FT_COMPONENT): Define. * src/cff/cffgload.c (CFF_Parse_CharStrings), src/psaux/t1decode.c (T1_Decoder_Parse_Charstrings), src/pshinter/pshalgo2.c (*), Fixed a bug where the X and Y axis where inverted in the postscript hinter. This caused problem when displaying on non-square surfaces. * src/pshinter/pshalgo2.c: s/vertical/dimension/. * src/pshinter/pshglob.c (psh_globals_new): Replaced a floating point constant with a fixed-float equivalent. For some reasons not all compilers are capable of directly computing a floating pointer constant casted to FT_Fixed, and will link a math library instead. 2001-12-20 Werner Lemberg <wl@gnu.org> * src/cache/ftccache.c (ftc_node_destroy, ftc_cache_lookup): Fix tracing strings. * src/cache/ftccmap.c (ftc_cmap_family_init): Ditto. * src/cache/ftcmanag.c (ftc_family_table_alloc, ftc_family_table_free, FTC_Manager_Check): Ditto. * src/cache/ftcsbits.c (ftc_sbit_node_load): Ditto. * src/base/ftobjs.c (FT_Done_Library): Remove compiler warning. 2001-12-20 David Turner <david@freetype.org> Added PostScript hinter support to the CFF and CID drivers. * include/freetype/internal/cfftypes.h (CFF_Font): New member `pshinter'. * src/cff/cffload.c (CFF_Get_Standard_Encoding): New function. * src/cff/cffload.h: Updated. * src/cff/cffgload.c (CFF_Init_Builder): Renamed to ... (CFF_Builder_Init): This. Added new argument `hinting'. (CFF_Done_Builder): Renamed to ... (CFF_Builder_Done): This. (CFF_Init_Decoder): Added new argument `hinting'. (CFF_Parse_CharStrings): Implement vstem support. (CFF_Load_Glyph): Updated. Add hinting support. (cff_lookup_glyph_by_stdcharcode): Use CFF_Get_Standard_Encoding(). (cff_argument_counts): Updated. * src/cff/cffgload.h: Updated. * src/cff/cffobjs.c: Include FT_INTERNAL_POSTSCRIPT_HINTS_H. (CFF_Size_Get_Globals_Funcs, CFF_Size_Done, CFF_Size_Init, CFF_Size_Reset, CFF_GlyphSlot_Done, CFF_GlyphSlot_Init): New functions. (CFF_Init_Face): Renamed to ... (CFF_Face_Init): This. Add hinter support. (CFF_Done_Face): Renamed to ... (CFF_Face_Done): This. (CFF_Init_Driver): Renamed to ... (CFF_Driver_Init): This. (CFF_Done_Driver): Renamed to ... (CFF_Driver_Done): This. * src/cff/cffobjs.h: Updated. * src/cff/cffdrivr.c (cff_driver_class): Updated. * include/freetype/internal/t1types.h (CID_FaceRec): New member `pshinter'. * src/cid/cidgload.c (CID_Load_Glyph): Add hinter support. * src/cid/cidobjs.c: Include FT_INTERNAL_POSTSCRIPT_HINTS_H. (CID_GlyphSlot_Done, CID_GlyphSlot_Init, CID_Size_Get_Globals_Funcs, CID_Size_Done, CID_Size_Init, CID_Size_Reset): New functions. (CID_Done_Face): Renamed to ... (CID_Face_Done): This. (CID_Init_Face): Renamed to ... (CID_Face_Init): This. Add hinting support. (CID_Init_Driver): Renamed to ... (CID_Driver_Init): This. (CID_Done_Driver): Renamed to ... (CID_Driver_Done): This. * src/cid/cidobjs.h: Updated. * src/cidriver.c: Updated. * src/pshinter/pshrec.c (t2_hint_stems): Fixed. * src/base/ftobjs.c (FT_Done_Library): Fixed a stupid bug that crashed the library on exit. * src/type1/t1gload.c (T1_Load_Glyph): Enable font matrix transformation of hinted glyphs. * src/cid/cidload.c (cid_read_subrs): Fix error condition. * src/cid/cidobjs.c (CID_Face_Done): Fixed a memory leak; the subrs routines were never released when CID faces were destroyed. * src/cff/cffload.h, src/cff/cffload.c, src/cff/cffgload.c: Updated to move the definition of encoding tables back within `cffload.c' instead of making them part of a shared header (causing problems in `multi' builds). This reverts change 2001-08-08. * docs/CHANGES: Updated for 2.0.6 release. * docs/TODO: Added `stem3 and counter hints support' to the TODO list for the Postscript hinter. * docs/BUGS: Closed the AUTOHINT-NO-SBITS bug. 2001-12-19 David Turner <david@freetype.org> * include/freetype/cache/ftcache.h: Added comments to indicate that some of the exported functions should only be used by applications that need to implement custom cache types. * src/truetype/ttgload.c (cur_to_org, org_to_cur): Fixed a nasty bug that prevented composites from loading correctly, due to missing parentheses around macro parameters. * src/sfnt/sfobjs.c (SFNT_Load_Face): Make the `post' and `name' tables optional to load PCL fonts properly. * src/truetype/ttgload.c (TT_Load_Glyph), src/base/ftobjs.c (FT_Load_Glyph), include/freetype/freetype.h (FT_LOAD_SBITS_ONLY): `Fixed' the bug that prevented embedded bitmaps to be loaded when the auto-hinter is used. This actually is a hack but will be enough until the internal re-design scheduled for FreeType 2.1. * src/raster/ftrend1.c (ft_raster1_render): Fixed a nasty outline shifting bug in the monochrome renderer. * README: Updated version numbers to 2.0.6. 2001-12-17 Werner Lemberg <wl@gnu.org> * src/truetype/ttgload.c (load_truetype_glyph): Fix test for invalid glyph header. 2001-12-15 Werner Lemberg <wl@gnu.org> * src/base/ftglyph.c (FT_Glyph_To_Bitmap): Remove compiler warning. * include/freetype/ftcache.h (FTC_Node_Unref): Removed. It is already in ftcmanag.h. * src/cache/ftcsbits.c (ftc_sbit_node_load): Remove unused variable `gfam'. * src/cache/ftcmanag.c (ftc_family_table_alloc, * ftc_family_table_free): Use FT_EXPORT_DEF. * include/freetype/cache/ftcmanag.h: Updated. * src/cache/ftccache.c (ftc_node_destroy): Use FT_EXPORT_DEF. * src/cache/ftccmap.c (ftc_cmap_node_init): Remove unused variable `cfam'. Remove compiler warning. (FTC_CMapCache_Lookup): Remove compiler warnings. (ftc_cmap_family_init): Ditto. (FTC_CMapCache_Lookup): Ditto. * builds/unix/configure.ac: Increase `version_info' to 8:0:2. * builds/unix/configure: Regenerated. 2001-12-14 Werner Lemberg <wl@gnu.org> * builds/mac/README: Updated. 2001-12-14 Scott Long <scott@swiftview.com> * src/truetype/ttgload.c (load_truetype_glyph): Fixing crash when dealing with invalid fonts (i.e. glyph size < 10 bytes). 2001-12-14 Sam Latinga <slouken@devolution.com> * builds/mac/freetype.make: A new Makefile to build with MPW on MacOS classic. 2001-12-14 David Turner <david@freetype.org> * src/truetype/ttgload.c (TT_Load_Glyph), src/type1/t1gload.c (T1_Load_Glyph), src/cid/cidgload.c (CID_Load_Glyph), src/cff/cffgload.c (CFF_Load_Glyph): Fixed a serious bug common to all font drivers (the advance width was never hinted when it should). * include/freetype/freetype.h (FREETYPE_PATCH): New macro. * src/base/ftdbgmem.c (debug_mem_dummy) [!FT_DEBUG_MEMORY]: Don't use `extern' keyword. 2001-12-12 David Turner <david@freetype.org> * src/pshinter/pshglob.c (psh_blues_scale_zones, psh_blues_snap_stem psh_globals_new): Adding correct BlueScale/BlueShift support, plus family blues processing. * src/pshinter/pshglob.h (PSH_BluesRec): Updated. Started adding support for the Postscript hinter in the CFF module. * src/cff/cffgload.c: Include FT_INTERNAL_POSTSCRIPT_HINTS_H. (CFF_Parse_CharStrings): Implement it. * src/cff/cffgload.h: Updated. 2001-12-12 Werner Lemberg <wl@gnu.org> * builds/unix/freetype2.m4: Some portability fixes. 2001-12-11 Jouk Jansen <joukj@hrem.stm.tudelft.nl> * src/base/descrip.mms (OBJS): Add ftdebug.obj. 2001-12-11 Werner Lemberg <wl@gnu.org> * src/sfnt/ttload.c (TT_Load_Generic_Header): Typos. 2001-12-11 David Turner <david@freetype.org> * builds/unix/freetype-config.in: Modified the script to prevent passing `-L/usr/lib' to gcc. * docs/FTL.TXT: Simple fix (change `LICENSE.TXT' to `FTL.TXT'). * builds/unix/freetype2.m4: New file for checking configure paths. We need to install it in $(prefix)/share/aclocal/freetype2.m4 but I didn't modify builds/unix/install.mk yet. * INSTALL: Updated the instructions to build shared libraries with Jam. They were simply wrong. * src/base/fttrigon.c (FT_Cos): Fixed a small bug that caused slightly improper results for `FT_Cos' and `FT_Sin' (example: FT_Sin(0) == -1!). 2001-12-11 Detlef Würkner <TetiSoft@apg.lahn.de> * include/freetype/internal/ftstream.h (GET_LongLE, GET_ULongLE): Fixed incorrect argument types. 2001-12-10 Francesco Zappa Nardelli <Francesco.Zappa.Nardelli@ens.fr> * src/pcf/pcfdriver.c (PCF_Init_Face): Allow Xft to use PCF fonts by setting the `face->metrics.max_advance' correctly. 2001-12-07 David Turner <david@freetype.org> * include/freetype/cache/ftccmap.h, src/cache/ftccmap.c: Added new charmap cache. * src/cache/ftcache.c: Updated. * src/autohint/ahhint.c (ah_hinter_hint_edges): s/UNUSED/FT_UNUSED/. 2001-12-06 Leonard Rosenthol <leonardr@lazerware.com> Added support for reading .dfont files on Mac OS X. Also added a new routine which looks up a given font by name in the Mac OS and returns the disk file where it resides. * src/base/ftmac.c: Include <Files.h> and <TextUtils.h>. (is_dfont): New auxiliary function. (FT_New_Face_From_dfont): New function. (FT_GetFile_From_Mac_Name): New exported function. (FT_New_Face): Updated. * include/freetype/ftmac.h: Updated. 2001-12-06 David Turner <david@freetype.org> * src/cache/Jamfile, src/cache/rules.mk: Updated. 2001-12-06 Werner Lemberg <wl@gnu.org> * INSTALL: Small update. 2001-12-05 David Turner <david@freetype.org> * src/base/ftglyph.c (FT_Glyph_To_Bitmap): Re-ordered code for debugging purposes. Comment out use of `origin'. * src/smooth/ftsmooth.c (ft_smooth_render): Fixed a nasty hidden bug where outline shifting wasn't correctly undone after bitmap rasterization. This created problems with certain glyphs (like '"' of certain fonts) and the cache system. * src/pshinter/pshalgo1.c (psh1_hint_table_init): Fix typo. * src/pshinter/pshalgo2.c (psh2_hint_table_init): Fix typo. (ps2_hints_apply): Small fix. 2001-12-05 David Turner <david@freetype.org> * src/pshinter/pshalgo2.c (psh2_hint_table_init), src/pshinter/pshalgo1.c (psh1_hint_table_init): Removed compiler warnings. * include/freetype/ftcache.h, include/freetype/cache/*, src/cache/*: Yet another massive rewrite of the caching sub-system in order to both increase performance and allow simpler cache sub-classing. As an example, the code for the image and sbit caches is now much simpler. I still need to update the documentation in www/freetype2/docs/cache.html to reflect the new design though. * include/freetype/config/ftheader.h (FT_CACHE_CHARMAP_H): New macro. (FT_CACHE_INTERNAL_CACHE_H): Updated. 2001-12-05 David Krause <freetype@davidkrause.com> * docs/license.txt: s/X Windows/X Window System/. 2001-12-04 Werner Lemberg <wl@gnu.org> * src/raster/ftraster.c: Fix definition condition of MEM_Set(). * src/smooth/ftgrays.c (M_Y): Change value to 192. * src/base/ftdbgmem.c (ft_mem_table_destroy): Fix printf() parameter. Remove unused variable. * src/cache/ftcimage.c (ftc_image_node_init, ftc_image_node_compare): Remove unused variables. * src/cache/ftcsbits.c (ftc_sbit_node_weight): Remove unused variable. * src/raster/ftraster.c (MEM_Set): Move definition down to avoid compiler warning. * src/autohint/ahhint.c (ah_hinter_hint_edges): Use UNUSED() to avoid compiler warnings. * src/pcf/pcfread.c (tableNames): Use `const'. (pcf_read_TOC): Change counter name to avoid compiler warning. Use `const'. * src/pshinter/pshrec.c (ps_hints_close): Remove redundant declaration. * src/pshinter/pshalgo1.c (psh1_hint_table_init): Rename variables to avoid shadowing. * src/pshinter/pshalgo2.c (psh2_hint_table_activate_mask): Ditto. * src/type1/t1objs.h: Remove double declarations of `T1_Size_Init()' and `T1_Size_Done()'. 2001-11-20 Antoine Leca <antoineleca@multimania.com> * include/freetype/ttnameid.h: Added some new Microsoft language codes and LCIDs as found in MSDN (Passport SDK). Also added comments about the meaning of bit 57 of the `OS/2' table (TT_UCR_SURROGATES) which (with OpenType v.1.3) now means `there is a character beyond 0xFFFF in this font'. Thanks to Detlef Würkner <TetiSoft@apg.lahn.de> for noticing this. 2001-11-20 David Turner <david@freetype.org> * src/pshinter/{pshalgo2.c, pshalgo1.c}: Fixed stupid bug in sorting routine that created nasty alignment artefacts. * src/pshinter/pshrec.c, tests/gview.c: Debugging updates. * src/smooth/ftgrays.c: De-activated experimental gamma support. Apparently, `optimal' gamma tables depend on the monitor type, resolution and general karma, so it's better to compute them outside of the rasterizer itself. (gray_convert_glyph): Use `volatile' keyword. 2001-10-29 David Turner <david@freetype.org> Adding experimental `gamma' support. This produces smoother glyphs at small sizes for very little cost. * src/smooth/ftgrays.c (grays_init_gamma): New function. (gray_raster_new): Use it. Various fixes to the auto-hinter. They merely improve the output of sans-serif fonts. Note that there are still problems with serifed fonts and composites (accented characters). * src/autohint/ahglyph.c (ah_outline_load, ah_outline_link_segments): Implement it. Fix typos. (ah_outline_save, ah_outline_compute_segments): Fix typos. * src/autohint/ahhint.c (ah_align_serif_edge): New argument `vertical'. Implement improvement. (ah_hint_edges_3, ah_hinter_hint_edges): Implement it. Fix typos. (ah_hinter_align_strong_points, ah_hinter_align_weak_points): Fix typos. (ah_hinter_load): Set `ah_debug_hinter' if DEBUG_HINTER is defined. * src/autohint/ahmodule.c: Implement support for DEBUG_HINTER macro. * src/autohint/ahtypes.h: Ditto. (AH_Hinter): Remove `disable_horz_edges' and `disable_vert_edges' (making them global as `ah_debug_disable_horz' and `ah_debug_disable_vert'). Fix typos. * tests/gview.c: Updated the debugging glyph viewer to show the hints generated by the `autohint' module. 2001-10-27 David Turner <david@freetype.org> * src/cache/ftcchunk.c (ftc_chunk_cache_lookup): Fixed a bug that considerably lowered the performance of the abstract chunk cache. 2001-10-26 David Turner <david@freetype.org> * include/freetype/ftcache.h, include/freetype/cache/*.h, src/cache/*.c: Major re-design of the cache sub-system to provide better performance as well as an `Acquire'/`Release' API. Seems to work well here, but probably needs a bit more testing. 2001-10-26 Leonard Rosenthol <leonardr@lazerware.com> * builds/mac/README: Updated to reflect my taking over the project and that is now being actively maintained. * src/base/ftmac.c (parse_fond): Applied patches from Paul Miller <paulm@profoundeffects.com> to support loading a face other than the first from a FOND resource. (FT_New_Face_From_FOND): Updated. 2001-10-25 Leonard Rosenthol <leonardr@lazerware.com> * builds/mac/ftlib.prj: Update of CodeWarrior project file for Mac OS for latest version (7) of CWPro and for recent changes to the FT source tree. 2001-10-25 David Turner <david@freetype.org> * include/freetype/config/ftoption.h: Updated comments to explain precisely how to use project-specific macro definitions without modifying this file manually. (FT_CONFIG_FORCE_INT64): Define. (FT_DEBUG_MEMORY): New macro. 2001-10-24 Tom Kacvinsky <tkacvins@freetype.org> * builds/unix/ftsystem.c (FT_New_Memory): Added a missing `{'. 2001-10-23 David Turner <david@freetype.org> * include/freetype/internal/ftmemory.h, src/base/ftdbgmem.c: Improvements to the memory debugger to report more information in case of errors. Also, some allocations that occurred through REALLOC couldn't be previously caught correctly. * src/autohint/ahglyph.c (ah_outline_compute_segments, ah_outline_compute_edges), src/raster/ftraster.c (ft_black_new), src/smooth/ftgrays.c (gray_render_span, gray_raster_new): Replaced liberal uses of memset() by the MEM_Set() macro. 2001-10-23 David Turner <david@freetype.org> * src/raster/ftraster.c (Update): Removed to be inlined in ... (Sort): Updated. 2001-10-22 David Turner <david@freetype.org> * builds/unix/ftsystem.c (FT_New_Memory, FT_Done_Memory), builds/vms/ftsystem.c (FT_New_Memory, FT_Done_Memory), builds/amiga/ftsystem.c (FT_New_Memory, FT_Done_Memory), src/base/ftdbgmem.c: Updated the memory debugger and platform-specific implementations of `ftsystem' in order to be able to debug memory allocations on Unix, VMS and Amiga too! * src/pshinter/pshalgo2.c (psh2_hint_table_record_mask): Removed some bogus warnings. * include/freetype/internal/ftmemory.h, src/base/ftdbgmem.c: Modified the debugging memory manager to report the location (source file name + line number) where leaked memory blocks are allocated in the source file. * src/base/ftdbgmem.c: New debugging memory manager. You must define the FT_DEBUG_MEMORY macro in `ftoption.h' to enable it. It will record every memory block allocated and report simple errors like memory leaks and double deletes. * src/base/Jamfile: Include ftdbgmem. * src/base/rules.mk: Ditto. * src/base/ftbase.c: Include ftdbgmem.c. * include/freetype/config/ftoption.h: Added the FT_DEBUG_MEMORY macro definition. * src/base/ftsystem.c (FT_New_Memory, FT_Done_Memory): Modified the base component to use the debugging memory manager when the macro FT_DEBUG_MEMORY is defined. 2001-10-21 Tom Kacvinsky <tkacvins@freetype.org> * src/cff/cffload.c (CFF_Done_Font): Free subfonts array only if we are working with a CID keyed CFF font. Otherwise, a variable that was never allocated memory might freed. This is a correction to the previous patch for freeing subfonts. 2001-10-21 Tom Kacvinsky <tkacvins@freetype.org> * src/cff/cffload.c (CFF_Done_Font): Free the subfonts array to avoid a memory leak. 2001-10-21 David Turner <david@freetype.org> * src/pshinter/pshalgo2.c, src/pshinter/pshalgo1.c, src/pshinter/pshglob.c: Removing compiler warnings in pedantic modes (in multi-object compilation mode, mainly). 2001-10-20 Tom Kacvinsky <tkacvins@freetype.org> * src/type1/t1load.c (parse_encoding): Add a test to make sure that custom encodings (i.e., neither StandardEncoding nor ExpertEncoding) are not loaded twice when the Type 1 font is synthetic. * src/type1/t1load.c (parse_font_name, parse_subrs): Added a test for when loading synthetic fonts to make sure that the font name and subroutines are not loaded twice. This is to remove a memory leak that occurred because the original memory blocks for these objects were not deallocated when the objects were parsed the second time. 2001-10-19 David Turner <david@freetype.org> * src/smooth/ftgrays.c, src/pshinter/pshglob.h, src/pshinter/pshrec.c, src/pshinter/pshalgo2.c: Getting rid of compiler warnings. * src/pshinter/module.mk, src/pshinter/rules.mk: Adding control files to build the PostScript hinter with the `old' build system. 2001-10-19 Jacob Jansen <joukj@hrem.stm.tudelft.nl> * descrip.mms, src/pshinter/descrip.mms: Updates to the VMS build files. 2001-10-18 David Turner <david@freetype.org> * src/psnames/pstables.h, src/tools/glnames.py: Rewrote the `glnames.py' script used to generate the `pstables.h' header file. The old one contained a serious bug that made FreeType return incorrect glyph names for certain glyphs. * src/truetype/ttdriver.c (Set_Char_Sizes): Changing computation of pixel size from character size to use rounding. This is an experiment to see whether this gives values similar to Windows for scaled ascent/descent/etc. * src/base/ftcalc.c (FT_Div64by32): Changed the implementation slightly since the original code was mis-compiled on Mac machines using the MPW C compiler. * src/base/ftobjs.c (FT_Realloc): When a memory block was grown through FT_Realloc(), the new bytes were not set to 0, which created some strange bugs in the PostScript hinter. (destroy_face): Don't deallocate unconditionally. * src/cid/cidgload.c (CID_Compute_Max_Advance, CID_Load_Glyph): Adding support to new PostScript hinter. * include/freetype/internal/psglobal.h, include/freetype/internal/pshints.h, include/freetype/config/ftmodule.h, src/pshinter/Jamfile, src/pshinter/pshalgo.h, src/pshinter/pshalgo1.h, src/pshinter/pshalgo1.c, src/pshinter/pshalgo2.h, src/pshinter/pshalgo2.c, src/pshinter/pshglob.h, src/pshinter/pshglob.c, src/pshinter/pshinter.c, src/pshinter/pshmod.c, src/pshinter/pshmod.h, src/pshinter/pshrec.c, src/pshinter/pshrec.h: Adding new PostScript hinter module. * include/freetype/internal/ftobjs.h, include/freetype/internal/internal.h, include/freetype/internal/psaux.h, include/freetype/internal/t1types.h, src/psaux/psobjs.c, src/psaux/psobjs.h, src/psaux/t1decode.h, src/psaux/t1decode.c, src/type1/t1driver.c, src/type1/t1gload.c, src/type1/t1objs.c, src/type1/t1objs.h: Updates to use the new PostScript hinter. * tests/Jamfile, tests/gview.c: Adding a new glyph hinting viewer/debugger to the source tree. Note that you will _not_ be able to compile it since it depends on an unavailable graphics library named `Nirvana' to render vector images. 2001-10-17 David Turner <david@freetype.org> * Version 2.0.5 released. ========================= * include/freetype/freetype.h, include/internal/ftobjs.h, src/base/ftobjs.c, src/type1/t1driver.c: Adding a new function named 'FT_Get_Postscript_Name' to retrieve the PostScript name of a given font. Should work with all formats except pure CFF/CEF fonts (this will be added soon). * src/cid/cidriver (cid_get_postscript_name): New function. (CID_Get_Interface): Handle `postscript_name' interface. * src/sfnt/sfdriver.c (get_sfnt_postscript_name): New function. (SFNT_Get_Interface): Handle `postscript_name' interface. * src/type1/t1driver.c (t1_get_ps_name): New function. (Get_Interface): Handle `postscript_name' interface. * README, docs/CHANGES: Updated for 2.0.5 release. 2001-10-08 David Turner <david@freetype.org> Fixed a bug in `glnames.py' that prevented it from generating correct glyph names tables. This resulted in the unavailability of certain glyphs like `Cacute', `cacute' and `lslash' in Unicode charmaps, even if these were present in the font (causing problems for Polish users). * src/tools/glnames.py (mac_standard_names): Fixed. (t1_standard_strings): Some fixes and renamed to ... (sid_standard_names): This. (t1_expert_encoding): Fixed. (the_adobe_glyph_list): Renamed to ... (adobe_glyph_names): This. (the_adobe_glyphs): Renamed to ... (adobe_glyph_values): This. (dump_mac_indices, dump_glyph_list, dump_unicode_values, main): Updated. * src/psnames/pstables.h: Regenerated. * src/psnames/psmodule.c (PS_Unicode_Value): Fix offset. Fix return value. Use `sid_standard_table' and `ps_names_to_unicode' instead of `t1_standard_glyphs' and `names_to_unicode'. (PS_Macintosh_Name): Use `ps_glyph_names' instead of `standard_glyph_names'. (PS_Standard_Strings): Use `sid_standard_names' instead of `t1_standard_glyphs'. * doc/BUGS, doc/TODO: New documents. 2001-10-07 Richard Barber <rich@solutionuk.com> * src/cache/ftlru.c (FT_Lru_Lookup_Node): Fixed a bug that prevented correct LRU behaviour. 2001-10-07 David Turner <david@freetype.org> setjmp() and longjmp() are now used for rollback (i.e. when memory pool overflow occurs). Function names are now all uniformly prefixed with `gray_'. * src/smooth/ftgrays.c: Include <setjmp.h>. (ErrRaster_MemoryOverflow): New macro. (TArea): New type to store area values in each cell (using `int' was too small on 16-bit systems). <limits.h> is included to properly get the needed data type. (TCell, TRaster): Use it. (TRaster): New element `jump_buffer'. (gray_compute_cbox): Use `RAS_ARG' as the only parameter and get `outline' from it. (gray_record_cell): Use longjmp(). (gray_set_cell): Use gray_record_cell() for error handling. (gray_render_line, gray_render_conic, gray_render_cubic): Simplify. (gray_convert_glyph_inner): New function, using setjmp(). (gray_convert_glyph): Use it. 2001-10-07 David Turner <david@freetype.org> Provide a public API to manage multiple size objects for a given FT_Face in the new header file `ftsizes.h'. * include/freetype/ftsizes.h: New header file, * include/freetype/internal/ftobjs.h: Use it. Remove declarations of FT_New_Size and FT_Done_Size (moved to ftsizes.h). * include/freetype/config/ftheader.h (FT_SIZES_H): New macro. * src/base/ftobjs.c (FT_Activate_Size): New function. * src/cache/ftcmanag.c: Include ftsizes.h. (ftc_manager_init_size, ftc_manager_flush_size): Use FT_Activate_Size. 2001-09-20 Detlef Würkner <TetiSoft@apg.lahn.de> * builds/amiga/*: Added port to Amiga with the SAS/C compiler. 2001-09-15 Detlef Würkner <TetiSoft@apg.lahn.de> * src/type1/t1afm.c (T1_Done_AFM): Free `afm'. 2001-09-10 Yao Zhang <yzhang@sharemedia.com> * src/sfnt/ttcmap.c (code_to_index2): Handle code values with hi-byte == 0 correctly. 2001-09-10 Werner Lemberg <wl@gnu.org> * builds/link-std.mk ($(PROJECT_LIBRARY)): Fix typo. 2001-08-30 Martin Muskens <mmuskens@aurelon.com> * src/type1/t1load.c (parse_font_matrix): A new way to compute the units per EM with greater accuracy (important for embedded T1 fonts in PDF documents that were automatically generated from TrueType ones). * src/type1/t1load.c (is_alpha): Now supports `+' in font names; this is used in embedded fonts. * src/psaux/psobjs.c (PS_Table_Add): Fixed a reallocation bug that generated a dangling pointer reference. 2001-08-30 Anthony Feik <afeick@hotmail.com> * src/type1/t1afm.c (T1_Read_AFM): Now correctly sets the flag FT_FACE_FLAG_KERNING when appropriate for Type1 + AFM files. 2001-08-25 Werner Lemberg <wl@gnu.org> * src/sfnt/ttload.c (TT_Load_CMap): Fix frame length of `cmap_rec_fields'. * include/freetype/fterrors.h [!FT_CONFIG_OPTION_USE_MODULE_ERRORS]: Undefine FT_ERR_BASE before defining again. 2001-08-22 Werner Lemberg <wl@gnu.org> * src/truetype/ttinterp.h: Fix prototype of TT_Move_Func. 2001-08-21 Werner Lemberg <wl@gnu.org> * builds/dos/dos-def.mk (NO_OUTPUT): Don't use `&>' but `>'. 2001-08-21 David Turner <david@freetype.org> * include/freetype/config/ftoption.h: Changed the default setting for FT_CONFIG_OPTION_USE_MODULE_ERRORS to undefined, since it breaks source compatibility in a few cases. Updated the comment to explain that too. 2001-08-17 Martin Muskens <mmuskens@aurelon.com> * src/base/ftcalc.c (FT_MulDiv): Fixed serious typo. 2001-08-12 Werner Lemberg <wl@gnu.org> Updating to OpenType 1.3. * include/freetype/internal/tttypes.h (TT_CMap0, TT_CMap2, TT_CMap4, TT_CMap6): Adding field `language'. (TT_CMapTable): Removing field `language'. Type of `length' field changed to FT_ULong. Adding fields for cmaps format 8, 10, and 12. (TT_CMapGroup): New auxiliary structure. (TT_CMap8_12, TT_CMap10): New structures. * include/freetype/tttables.h (TT_HoriHeader, TT_VertHeader): Removed last element of `Reserved' array. * include/freetype/ttnameid.h (TT_PLATFORM_CUSTOM, TT_MS_ID_UCS_4, TT_NAME_ID_CID_FINDFONT_NAME): New macros. * src/sfnt/ttcmap.c (TT_CharMap_Load): Updated loading of `language' field to the new structures. Fixed freeing of arrays in case of unsuccessful loads. Added support for loading format 8, 10, and 12 cmaps. (TT_CharMap_Free): Added support for freeing format 8, 10, and 12 cmaps. (code_to_index4): Small improvement. (code_to_index6): Ditto. (code_to_index8_12, code_to_index10): New functions. * src/sfnt/ttload.c (TT_Load_Metrics_Header): Updated to new structure. (TT_Load_CMap): Ditto. * src/sfnt/sfobjs.c (tt_encodings): Add MS UCS4 table (before MS Unicode). 2001-08-11 Werner Lemberg <wl@gnu.org> * src/type1/t1driver.c (t1_get_name_index): Fix compiler warning. 2001-08-09 Tom Kacvinsky <tkacvins@freetype.org> * src/cff/cffdrivr.c (get_cff_glyph_name): Renamed to cff_get_glyph_name for consistency. (cff_get_glyph_index): Minor documentation change. * src/type1/t1driver.c (t1_get_name_index): New function used in Get_Interface as the function returned when the `name_index' function is requested. (get_t1_glyph_name): Renamed to t1_get_glyph_name for consistency. 2001-08-08 Tom Kacvinsky <tkacvins@freetype.org> * src/cff/cffload.c: Removed definitions of cff_isoadobe_charset, cff_expert_charset, cff_expertsubset_charset, cff_standard_encoding, and cff_expert_encoding arrays to cffload.h. * src/cff/cffload.h: Added definitions of cff_isoadobe_charset, cff_expert_charset, cff_expertsubset_charset, cff_standard_encoding, and cff_expert_encoding arrays. * src/cff/cffdrivr.c (cff_get_name_index): New function, returned when `cff_get_interface' is called with a request for the `name_index' function. (cff_get_interface): Modified so that it returns the function `cff_get_name_index' when the `name_index' function is requested. * src/base/ftobjs.c (FT_Get_Name_Index): New function, used to return a glyph index for a given glyph name only if the driver supports glyph names. * include/freetype/internal/ftobjs.h (FT_Name_Index_Requester): New function pointer type definition used in the function FT_Get_Name_Index. * include/freetype/freetype.h (FT_Get_Name_Index): Added documentation and prototype. 2001-07-26 Werner Lemberg <wl@gnu.org> * builds/cygwin/*: Removed. Use the unix stuff instead. 2001-07-26 Jouk Jansen <joukj@hrem.stm.tudelft.nl> * builds/vms/ftconfig.h (FT_CALLBACK_DEF): Updated to change dated 2001-06-27. 2001-07-17 Werner Lemberg <wl@gnu.org> * include/freetype/internal/psaux.h (PS_Table): Use FT_Offset for `cursor' and `capacity'. * src/psaux/psobjs.c (reallocate_t1_table): Use FT_Long for second parameter. (PS_Table_Add): Use FT_Offset for `new_size'. Add support for version 0.5 maxp tables. * src/sfnt/ttload.c (TT_Load_MaxProfile): Implement it. (TT_Load_OS2): Initialize some values. 2001-07-13 Werner Lemberg <wl@gnu.org> * src/base/ftsynth.c: Include ftcalc.h unconditionally. 2001-07-07 David Turner <david@freetype.org> * src/truetype/ttgload.c, src/truetype/ttinterp.c, src/pcf/pcfread: Removed pedantic compiler warnings when the bytecode interpreter is compiled in. 2001-07-03 Werner Lemberg <wl@gnu.org> * src/autohint/ahhint.c (ah_hinter_align_weak_points): Remove unused variable `edges'. (ah_hinter_load): Remove unused variables `old_width' and `new_width'. * src/cid/cidload.c (cid_decrypt): Use `U' for constant (again). * src/psaux/psobjs.c (T1_Decrypt): Ditto. * src/type1/t1parse.c (T1_Get_Private_Dict): Ditto. 2001-06-28 David Turner <david@freetype.org> * include/internal/ftstream.h: Modified the definitions of the FT_GET_XXXX and NEXT_XXXX macros for 16-bit correctness. 2001-06-26 Werner Lemberg <wl@gnu.org> * src/cid/cidload.c, src/cid/cidload.h (cid_decrypt): Use FT_Offset instead of FT_Int as type for `length' parameter. * include/freetype/internal/psaux.h (PSAux_Interface): Updated. 2001-06-27 Wolfgang Domröse <porthos.domroese@harz.de> * src/psaux/psobjs.c, src/psaux/psobjs.h (T1_Decrypt): Use FT_Offset instead of FT_Int as type for `length' parameter. * Version 2.0.4 released. ========================= 2001-06-27 David Turner <david@freetype.org> * builds/unix/ftconfig.in: Changed the definition of the FT_CALLBACK_DEF macro. * include/freetype/ftconfig.h, src/*/*.c: Changed the definition and use of the FT_CALLBACK_DEF macro in order to support 16-bit compilers. * builds/unix/ftconfig.in: Changed the definition of the FT_CALLBACK_DEF macro. * src/sfnt/ttload.c (TT_Load_Kern): The kern table loader now ensures that the kerning table is correctly sorted (some problem fonts don't have a correct kern table). 2001-06-26 Wolfgang Domröse <porthos.domroese@harz.de> * include/freetype/internal/ftstream.h (FT_GET_OFF3_LE): Fix typo. 2001-06-24 David Turner <david@freetype.org> * src/base/ftcalc.c (ft_div64by32): Fixed the source to work correctly on 16-bit systems. 2001-06-23 Anthony Fok <fok@debian.org> * debian/*: Added Debian package build directory for 2.0.4. 2001-06-22 David Turner <david@freetype.org> * docs/PATENTS: Added patents disclaimer. This one was missing! * docs/CHANGES, docs/todo: Updated for the upcoming 2.0.4 release. 2001-06-20 Werner Lemberg <wl@gnu.org> * include/freetype/config/ftconfig.h: Add two more `L's to constants. Add missing semicolons. * builds/toplevel.mk: Do similar change as for builds/unix/detect.mk. * include/freetype/freetype.h (FT_ENC_TAG): New version to make it easier to redefine. * include/freetype/ftimage.h (FT_IMAGE_TAG): Ditto. * src/pcf/pcfread.c (pcf_get_encodings): Add cast. 2001-06-19 David Turner <david@freetype.org> * builds/win32/visualc/freetype.dsp, builds/win32/visualc/index.html: Updated the Visual C++ project (for the 2.0.4 release). * builds/unix/detect.mk: Added rule for AIX detection (which uses /usr/sbin/init instead of /sbin/init). * include/freetype/fterrors.h, src/*/*err*.h: Updated some of the error macros to simplify handling of new error scheme. 2001-06-19 Werner Lemberg <wl@gnu.org> * include/freetype/fttypes.h (FT_ERROR_MODULE): New macro. 2001-06-19 David Turner <david@freetype.org> Removing _lots_ of compiler warnings when the most pedantic warning levels of Visual C++ and Borland C++ are used. Too many files to be listed here, but FT2 now compiles without warnings with VC++ and the `/W4' warning level (lint-style). * include/freetype/freetype.h (FT_New_Memory_Face): Updated documentation. * include/freetype/fttypes.h (FT_BOOL): New macro. * include/freetype/internal/ftdebug.h: Add #pragma for Visual C++ to suppress warning. * include/freetype/internal/ftstream.h (FT_GET_SHORT_{BE,LE}, FT_GET_OFF3_{BE,LE}, FT_GET_LONG_{BE,LE}): New macros. (NEXT_*): Use them. * src/autohint/ahglobal.c: Include FT_INTERNAL_DEBUG_H. (FT_New_Memory_Face): Add `const' to function declaration. 2001-06-18 Werner Lemberg <wl@gnu.org> Minor cleanups to remove compiler warnings. * include/freetype/cache/ftcmanag.h (FTC_MAX_BYTES_DEFAULT): Use `L' for constant. * include/freetype/config/ftoption.h (FT_RENDER_POOL_SIZE): Ditto. * src/base/ftcalc.c (FT_MulDiv): Use `L' for constant. * src/base/ftglyph.c (FT_Glyph_Get_CBox): Remove `error' variable. * src/base/fttrigon.c (ft_trig_arctan_table): Use `L' for constants. * src/base/ftobjs.c (FT_Done_Size): Fix return value. (FT_Set_Char_Size, FT_Set_Pixel_Sizes, FT_Get_Kerning): Remove unused `memory' variable. * src/autohint/ahglyph.c (ah_get_orientation): Use `L' for constant. * src/autohint/ahhint.c (ah_hint_edges_3, ah_hinter_align_edge_points): Remove unused `before' and `after' variables. (ah_hinter_align_weak_points): Remove unused `edge_limit' variable. (ah_hinter_load): Remove unused `new_advance', `start_contour', and `metrics' variables. * src/cff/cffload.c (CFF_Load_Encoding): Remove dead code to avoid compiler warning. * src/cff/cffobjs.c (CFF_Init_Face): Remove unused `base_offset' variable. * src/cff/cffgload.c (CFF_Parse_CharStrings): Remove unused `outline' variable. (cff_compute_bias): Use `U' for constant. * src/cid/cidload.c (cid_decrypt): Ditto. * src/psaux/psobjs.c (T1_Decrypt): Ditto. * src/psaux/t1decode.c (T1_Decoder_Parse_Charstrings): Ditto. * src/sfnt/ttload.c (TT_Load_Kern): Remove unused `version' variable. * src/sfnt/ttsbit.c (TT_Load_SBit_Image): Remove unused `top' variable. * src/truetype/ttgload.c (load_truetype_glyph): Remove unused `num_contours' and `ins_offset' variables. (compute_glyph_metrics): Remove unused `Top' and `x_scale' variables. (TT_Load_Glyph): Remove unused `memory' variable. * src/smooth/ftgrays.c (grays_raster_render): Use `L' for constants. 2001-06-18 Werner Lemberg <wl@gnu.org> Make the new error scheme source compatible with older FT versions by introducing another layer. * include/freetype/fterrors.h (FT_ERRORDEF_, FT_NOERRORDEF_): New macros. (FT_NOERRORDEF): Removed. * include/*/*err*.h: Use FT_ERRORDEF_ and FT_NOERRORDEF_. 2001-06-16 Werner Lemberg <wl@gnu.org> * include/freetype/freetype.h (FT_ENC_TAG): New macro. (FT_Encoding_): Use it. * include/freetype/ftimage.h (FT_IMAGE_TAG): Define it conditionally. 2001-06-14 David Turner <david@freetype.org> Modified the TrueType interpreter to let it use the new trigonometric functions provided in `fttrigon.h'. This gets rid of some old 64-bit computation routines, as well as many warnings when compiling the library with the `long long' 64-bit integer type. * include/freetype/config/ftoption.h: Undefine FT_CONFIG_OPTION_OLD_CALCS. * include/freetype/internal/ftcalc.h: Rearrange use of FT_CONFIG_OPTION_OLD_CALCS. * src/base/ftcalc.c: Add declaration of FT_Int64 if FT_CONFIG_OPTION_OLD_CALCS isn't defined. * src/truetype/ttinterp.c: Use FT_TRIGONOMETRY_H. (Norm): Add a special version if FT_CONFIG_OPTION_OLD_CALCS isn't defined. (Current_Ratio, Normalize): Simplify code. 2001-06-11 Mike Owens <MOwens@amtdatasouth.com> * src/base/ftcalc.c (FT_MulDiv, FT_DivFix, FT_Sqrt64): Remove compiler warnings. 2001-06-08 Werner Lemberg <wl@gnu.org> * builds/unix/configure.in: Renamed to ... * builds/unix/configure.ac: This to make sure that autoconf 2.50 is needed. Run `autoupdate' on it. Increase `version_info' to 7:0:1. * builds/unix/configure: Regenerated. 2001-06-08 David Turner <david@freetype.org> * src/autohint/ahhint.c (ah_hinter_load_glyph): Fixed a bug that corrupted transformed glyphs that were auto-hinted (the transform was applied twice). Fixed a bug that returned an invalid linear width for composite TrueType glyphs. * include/internal/tttypes.h (TT_Loader_): Two new elements `linear' and `linear_def'. * src/truetype/ttgload.c (load_truetype_glyph, compute_glyph_metrics): Use it. * include/fttypes.h (FT_ERROR_BASE): New macro. * src/base/ftobjs.c (FT_Open_Face, FT_Render_Glyph_Internal): Use it to make source code work with the new error scheme implemented by Werner. * src/base/ftoutln.c (FT_Outline_Render): Ditto. 2001-06-07 Werner Lemberg <wl@gnu.org> Updating to libtool 1.4.0 and autoconf 2.50. * builds/unix/ltconfig: Removed. * builds/unix/ltmain.sh, builds/unix/configure.in, builds/unix/aclocal.m4: Updated. * builds/unix/configure: Regenerated. 2001-06-06 Werner Lemberg <wl@gnu.org> Complete redesign of error codes. Please check ftmoderr.h for more details. * include/freetype/internal/cfferrs.h, include/freetype/internal/tterrors.h, include/freetype/internal/t1errors.h: Removed. Replaced with files local to the module. All extra error codes have been moved to `fterrors.h'. * src/sfnt/ttpost.h: Move error codes to `fterrors.h'. * src/autohint/aherrors.h, src/cache/ftcerror.h, src/cff/cfferrs.h, src/cid/ciderrs.h, src/pcf/pcferror.h, src/psaux/psauxerr.h, src/psnames/psnamerr.h, src/raster/rasterrs.h, src/sfnt/sferrors.h, src/smooth/ftsmerrs.h, src/truetype/tterrors.h, src/type1/t1errors.h, src/winfonts/fnterrs.h: New files defining the error names for the module it belongs to. * include/freetype/ftmoderr.h: New file, defining the module error offsets. Its structure is similar to `fterrors.h'. * include/freetype/fterrors.h (FT_NOERRORDEF): New macro. (FT_ERRORDEF): Redefined to use module error offsets. All internal error codes are now public; unused error codes have been removed, some are new. * include/freetype/config/ftheader.h (FT_MODULE_ERRORS_H): New macro. * include/freetype/config/ftoption.h (FT_CONFIG_OPTION_USE_MODULE_ERRORS): New macro. All other source files have been updated to use the new error codes; some already existing (internal) error codes local to a module have been renamed to give them the same name as in the base module. All make files have been updated to include the local error files. 2001-06-06 Werner Lemberg <wl@gnu.org> * src/cid/cidtokens.h: Replaced with... * src/cid/cidtoken.h: This file for 8+3 consistency. * src/raster/ftraster.c: Use macros for header file names. * src/include/freetype/tttables.h (TT_HoriHeader_, TT_VertHeader_): Fix length of `Reserved' array. Note that this isn't the real fix since recent OpenType specs have introduced a `CaretOffset' field instead of the first reserved byte. 2001-05-29 Werner Lemberg <wl@gnu.org> * INSTALL: Minor fixes. * Version 2.0.3 released. ========================= 2001-05-29 David Turner <david@freetype.org> * INSTALL, docs/CHANGES: Updated. 2001-05-25 David Turner <david@freetype.org> Moved several documents from the top-level to the `docs' directory. * src/base/ftcalc.c (FT_DivFix): Small fix to return value. 2001-05-16 David Turner <david@freetype.org> * src/truetype/ttgload.c (load_truetype_glyph): Fixed a bug in the composite loader. Spotted by Keith Packard. * src/base/ftobjs.c (FT_GlyphLoader_Check_Points, FT_GlyphLoader_Check_Subglyphs): Ditto. 2001-05-14 David Turner <david@freetype.org> Fixed the incorrect blue zone computations, and improved the composite support. Note that these changes result in improved rendering, while sometimes introducing their own artefacts. This is probably the last big change to the autohinter before the introduction of a complete replacement. * src/autohint/ahglobal.c (sort_values): Fix loop. * src/autohint/ahglyph.c: Removed some obsolete code. (ah_outline_compute_edges): Modify code to set the ah_edge_round flag. (ah_outline_compute_blue_edges): Add code to compute active blue zones. * src/autohint/ahhint.c (ah_hinter_glyph_load): Change load_flags value. * src/base/ftcalc.c (FT_DivFix): Fixed a bug in the 64-bit code that created incorrect scale factors! (FT_RoundFix, FT_CeilFix, FT_FloorFix): Minor improvements. 2001-05-12 Werner Lemberg <wl@gnu.org> * include/freetype/ftbbox.h: FTBBOX_H -> __FTBBOX_H__. * include/freetype/fttrigon.h: __FT_TRIGONOMETRY_H__ -> __FTTRIGON_H__. Include FT_FREETYPE_H. Beautified; added copyright. * src/base/fttrigon.c: Beautified; added copyright. 2001-05-11 David Turner <david@freetype.org> * src/cff/cffparse.c (cff_parse_font_matrix), src/cid/cidload.c (parse_font_matrix), src/type1/t1load.c (parse_font_matrix): Fixed the incorrect EM size computation. * include/freetype/fttrigon.h, src/base/fttrigon.c: New files, adding trigonometric functions to the core API (using Cordic algorithms). * src/base/ftbase.c, src/base/Jamfile, src/base/rules.mk: Use them. * builds/newline: New file. * builds/top_level.mk, builds/detect.mk: Use it. This fixes problems with Make on Windows 2000, as well as problems when `make distclean' is invoked on a non-Unix platform when there is no `config.mk' in the current directory. * builds/freetype.mk: Fixed a problem with object deletions under Dos/Windows/OS/2 systems. Added new directory to hold tools and test programs. * docs/docmaker.py, docs/glnames.py: Moved to... * src/tools/docmaker.py, src/tools/glnames.py: This place. * src/tools/cordic.py: New file used to compute arctangent table needed by fttrigon.c. * src/tools/test_bbox.c, src/tools/test_trig.c: New test files. * src/tools/docmaker.py: Improved the script to add the current date at the footer of each web page (useful to distinguish between versions). * Jamfile: Fixed incorrect HDRMACRO argument. * TODO: Removed the cubic arc bbox computation note, since it has been fixed recently. * src/base/ftbbox.c (test_cubic_zero): Renamed to... (test_cubic_extrema): This function. Use `UL' for unsigned long constants. * include/freetype/t1tables.h, include/freetype/config/ftoption.h: Formatting. 2001-05-10 David Turner <david@freetype.org> * src/base/ftobjs.c (FT_Open_Face): Fixed a small memory leak which happened when trying to open 0-size font files! 2001-05-09 Werner Lemberg <wl@gnu.org> * include/freetype/internal/ftcalc.h: Move declaration of FT_SqrtFixed() out of `#ifdef FT_LONG64'. 2001-05-08 Francesco Zappa Nardelli <Francesco.Zappa.Nardelli@ens.fr> * src/pcfdriver.c (PCF_Load_Glyph): Fixed incorrect bitmap width computation. 2001-05-08 David Turner <david@freetype.org> * docs/docmaker.py: Updated the DocMaker script in order to add command line options (--output,--prefix,--title), fix the erroneous line numbers reported during errors and warnings, and other formatting issues. * src/base/ftcalc.c (FT_MulDiv, FT_MulFix, FT_DivFix): Various tiny fixes related to rounding in 64-bits routines and pseudo-`optimizations'. 2001-04-27 David Turner <david@freetype.org> * src/base/ftbbox.c (BBox_Cubic_Check): Fixed the coefficient normalization algorithm (invalid final bit position, and invalid shift computation). 2001-04-26 Werner Lemberg <wl@gnu.org> * builds/unix/config.guess, builds/unix/config.sub: Updated to latest versions from gnu.org. * builds/compiler/gcc-dev.mk: Add `-Wno-long-long' flag. * include/freetype/internal/ftcalc.h: Define FT_SqrtFixed() unconditionally. * src/base/ftbbox.c: Include FT_INTERNAL_CALC_H. Fix compiler warnings. * src/base/ftcalc.c: Fix (potential) compiler warnings. 2001-04-26 David Turner <david@freetype.org> * src/base/ftcalc.c (FT_SqrtFixed): Corrected/optimized the 32-bit fixed-point square root computation. It is now used even with 64-bits integers, as it is _much_ faster than calling FT_Sqrt64 :-) * src/base/ftbbox.c: Removed invalid `#include FT_BEZIER_H' line. 2001-04-25 David Turner <david@freetype.org> * src/base/ftbbox.c (BBox_Cubic_Check): Rewrote function to use direct computations with 16.16 values instead of sub-divisions. It is now slower, but proves a point :-) * src/raster/ftraster.c, src/smooth/ftgrays.c, src/base/ftbbox.c: Fixed the Bézier stack depths. * src/base/ftcalc.c (FT_MulFix): Minor rounding fix. * builds/beos: Added BeOS-specific files to the old build system (no changes were necessary to support BeOS in the Jamfile though). 2001-04-20 David Turner <david@freetype.org> * ftconfig.h, ftoption.h: Updated `ftconfig.h' to detect 64-bit int types on platforms where Autoconf is not available). Also removed FTCALC_USE_LONG_LONG and replaced it with FT_CONFIG_OPTION_FORCE_INT64. * builds/win32/freetype.dsp: Updated the Visual C++ project file. Doesn't create a DLL yet. * cffgload.c: Removed a compilation warning. 2001-04-10 Tom Kacvinsky <tkacvins@freetype.org> * t1load.c (parse_charstrings): Changed code for placing .notdef glyph into slot 0 so that we no longer have a memory access violation. * t1load.h: In structure T1_Loader, added swap_table (of type PS_Table) to facilitate placing the .notdef glyph into slot 0. 2001-04-10 Francesco Zappa Nardelli <francesco.zappa.nardelli@ens.fr> * src/pcf/pcfdriver.c (PCF_Get_Char_Index): Fix return value. 2001-04-09 Laurence Withers <lwithers@lwithers.demon.co.uk> * builds/dos/detect.mk: Add support for bash. 2001-04-05 Werner Lemberg <wl@gnu.org> * builds/os2/*.mk: These files have been forgotten to update to the structure of similar makefiles. * builds/dos/*.mk: Ditto. * builds/ansi/*.mk: Ditto. * builds/win32/win32-def.mk (BUILD): Fix typo. * builds/compiler/*.mk (CLEAN_LIBRARY): Don't use NO_OUTPUT. This is already used in the link_*.mk files. 2001-04-03 Werner Lemberg <wl@gnu.org> * src/*/Jamfile: Slight changes to make files more cryptic. 2001-04-03 Werner Lemberg <wl@gnu.org> * Jamfile, src/Jamfile, src/*/Jamfile: Formatted. Slight changes to give files identical structure. 2001-04-02 Werner Lemberg <wl@gnu.org> * CHANGES: Reformatted, minor fixes. * TODO: Updated. * README: Formatting. * include/freetype/freetype.h: Formatting. * Jamfile: Fix typo. * src/cff/cffparse.c: Move error code #defines to... * include/freetype/internal/cfferrs.h: This file. * src/cff/cffdrivr.c, src/cff/cffobjs.c, src/cff/cffload.c: Replaced `FT_Err_*' with `CFF_Err_*'. * src/cid/cidparse.c: Replaced `FT_Err_*' with `T1_Err_*'. * src/psaux/psobjs.c, src/psaux/t1decode.c: Ditto. * src/sfnt/sfobjs.c, src/sfnt/ttload.c: Replaced `FT_Err_*' with `TT_Err_*'. * src/truetype/ttgload.c, src/truetype/ttobjs.c: Ditto. * src/type1/t1gload.c, src/type1/t1load.c, src/type1/t1objs.c, src/type1/t1parse.c: Replaced `FT_Err_*' with `T1_Err_*'. * include/freetype/internal/cfferrs.h: Add `CFF_Err_Unknown_File_Format'. * include/freetype/internal/t1errors.h: Add `T1_Err_Unknown_File_Format'. * include/freetype/internal/tterrors.h: Add `TT_Err_Unknown_File_Format'. * src/cff/cffload.h: Add `cff_*_encoding' and `cff_*_charset' references. * src/psaux/psobjs.c: Include `FT_INTERNAL_TYPE1_ERRORS_H'. * src/cff/cffobjs.c (CFF_Init_Face, CFF_Done_Face): Use FT_LOCAL_DEF. * src/cid/cidobjs.c (CID_Done_Driver): Ditto. * src/truetype/ttobjs.c (TT_Init_Face, TT_Done_Face, TT_Init_Size): Ditto. * src/type1/t1objs.c (T1_Done_Driver): Ditto. * src/pcf/pcfdriver.c (PCF_Done_Face): Ditto. * src/pcf/pcf.h: Use FT_LOCAL for `PCF_Done_Face'. 2001-04-02 Tom Kacvinsky <tkacvins@freetype.org> * src/sfnt/ttload.c (TT_Load_Metrics): Fix an improper pointer dereference. Submitted by Herbert Duerr <duerr@sun.com>. 2001-03-26 Tom Kacvinsky <tkacvins@freetype.org> * include/freetype/config/ftconfig.h: Changed hexadecimal constants to use suffix U to avoid problems with HP-UX's c89 compiler. Submitted by G.W. Lucas <glucas@sonalysts.com>. 2001-03-24 David Turner <david.turner@freetype.org> * Jamrules, Jamfile, src/Jamfile, src/*/Jamfile: Adding jamfiles to the source tree. See www.freetype.org/jam/index.html for details. * Version 2.0.2 released. ========================= 2001-03-20 Werner Lemberg <wl@gnu.org> * builds/win32/detect.mk: Fix .PHONY target for Intel compiler. 2001-03-20 David Turner <david.turner@freetype.org> * include/freetype/config/ftheader.h, include/freetype/ftsnames.h: Renamed `ftnames.h' to `ftsnames.h', and FT_NAMES_H to FT_SFNT_NAMES_H. * docs/docmaker.py: Added generation of INDEX link in table of contents. * INSTALL, docs/BUILD: Updated documentation to indicate that the compilation process has changed slightly (no more `src' required in the include path). * builds/*/*-def.mk: Changed the objects directory from `obj' to `objs'. * include/freetype/config/ftheader.h: Removed obsolete macros like FT_SOURCE_FILE, etc. and added cache-specific macro definitions that were previously defined in <freetype/ftcache.h>. Added comments to be included in a new API Reference section. * src/*/*: Removed the use of FT_SOURCE_FILE, etc. Now, each component needs to add its own directory to the include path at compile time. Modified all `rules.mk' and `descrip.mms' accordingly. 2001-03-20 Werner Lemberg <wl@gnu.org> * builds/unix/configure.in: Add $ft_version. * builds/unix/freetype-config.in: Use it. * builds/unix/configure: Updated. 2001-03-19 Tom Kacvinsky <tkacvins@freetype.org> * src/type1/t1load.c (parse_font_matrix): Assign the units per em value an unsigned short value, first by shifting right 16 bits, then by casting the results to FT_UShort. * src/cff/cffparse.c (cff_parse_font_bbox): Assign the units per em value an unsigned short value, first by shifting right 16 bits, then by casting the results to FT_UShort. 2001-03-17 David Turner <david.turner@freetype.org> * src/cid/cidobjs.c, src/cid/cidload.c, src/pcf/pcfread.c, src/type1/t1load.c, src/type1/t1objs.c: Added a few casts to remove compiler warnings in pedantic modes. * include/config/ft2build.h, include/config/ftheader.h: The file `ft2build.h' was renamed to `ftheader.h' to avoid conflicts with the top-level <ft2build.h>. * include/config/ftheader.h: Added new section describing the #include macros. 2001-03-17 Tom Kacvinsky <tkacvins@freetype.org> * src/cff/cffparse.c (cff_parse_font_bbox): Obtain rounded FT_Fixed values for the bounding box numbers. * src/cff/cffobjs.c (CFF_Init_Face): When processing a CFF/CEF font, set `root->ascender' (`root->descender') to the integer part of `root->bbox.yMax' (`root->bbox.yMin', respectively). 2001-03-16 Tom Kacvinsky <tkacvins@freetype.org> * src/cff/cffdrivr.c (get_cff_glyph_name): New function. Used in cff_get_interface to facilitate getting a glyph name for glyph index via FT_Get_Glyph_Name(). (cff_get_interface): Added support for getting a glyph name via the `glyph_name' module interface. Uses the new function get_cff_glyph_name(). Submitted by Sander van der Wal <svdwal@xs4all.nl>. * src/cff/cffobjs.c (CFF_Init_Face): Logical or the face flags with FT_FACE_FLAG_GLYPH_NAMES only if FT_CONFIG_OPTION_NO_GLYPH_NAMES is not defined. This is to add support for getting a glyph name from a glyph index via FT_Get_Glyph_Name(). Submitted by Sander van der Wal <svdwal@xs4all.nl>. * src/cff/cffgload.c (CFF_Parse_CharStrings): Added support for deprecated operator `dotsection'. Submitted by Sander van der Wal <svdwal@xs4all.nl>. 2001-03-12 Werner Lemberg <wl@gnu.org> * src/psaux/t1decode.c (T1_Decoder_Parse_Charstrings): Fix error messages. * INSTALL, docs/BUILD: We need GNU make 3.78.1 or newer. 2001-03-12 Tom Kacvinsky <tkacvins@freetype.org> * include/freetype/internal/psaux.h: Changed the lenIV member of the T1_Decoder_ struct to be an FT_Int instead of an FT_UInt. * src/psaux/t1decode.c (T1_Decoder_Parse_Charstrings): Adjust for lenIV seed bytes at the start of a decrypted subroutine. * src/cid/cidload.c (cid_read_subrs): Decrypt subroutines only if lenIV >= 0. * src/cid/cidgload.c (cid_load_glyph): Decrypt charstrings only if lenIV >= 0. 2001-03-11 Werner Lemberg <wl@gnu.org> * TODO: Updated. * src/pcf/pcfread.c: Put READ_Fields() always in a conditional to avoid compiler warnings. 2001-03-10 Tom Kacvinsky <tkacvins@freetype.org> * TODO: New file. * include/freetype/freetype.h: Added prototypes and notes for three new functions: FT_RoundFix, FT_CeilFix, and FT_FloorFix. * src/base/ftcalc.c (FT_RoundFix, FT_CeilFix, FT_FloorFix): Added implementation code. * src/cid/cidobjs.c (CID_Init_Face): Use calculated units_per_EM, and if that is not available, default to 1000 units per EM. Changed assignment code for ascender and descender values. * src/cid/cidload.c (parse_font_matrix): Added units_per_EM processing. (parse_font_bbox): Changed to use FT_Fixed number handling. * src/type1/t1objs.c (T1_Init_Face): Changed the assignment code for ascender, descender, and max_advance_width. * src/type1/t1load.c (parse_font_bbox): Changed to use FT_Fixed number handling. 2001-03-10 Henrik Grubbström <grubba@roxen.com> * src/*/*.c: Added many casts to make code more 64bit-safe. 2001-03-07 Werner Lemberg <wl@gnu.org> * INSTALL, docs/BUILD: We need GNU make 3.78 or newer. 2001-03-07 Tom Kacvinsky <tkacvins@freetype.org> * src/type1/t1objs.c (T1_Init_Face): Minor correction: We must wait until parse_font_bbox is changed before we use logical shift rights in the assignments of `root->ascender', `root->descender', and `root->max_advance_width'. (T1_Done_Face): Free `char_name' table to avoid a memory leak. Submitted by Sander van der Wal <svdwal@xs4all.nl>. 2001-03-05 Tom Kacvinsky <tkacvins@freetype.org> * src/cff/cffgload.c (CFF_Load_Glyph): Set glyph control data to the the Type 2 glyph charstring (used by conversion programs). Submitted by Ha Shao <hashao@chinese.com>. 2001-03-04 Antoine Leca <Antoine.Leca@renault.fr> * include/freetype/ttnameid.h: Correct a stupid typo which prevented correct compilation (TT_MS_LANGID_TIGRIGNA_ETHIOPIA appeared twice). 2001-03-04 Werner Lemberg <wl@gnu.org> * src/autohint/ahtypes.h (AH_Hinter): Add elements `disable_horz_edges', `disable_vert_edges'. * src/autohint/ahhint.c (ah_hint_edges_3, ah_hinter_hint_edges): Use them (and remove static variables with the same names). * src/pcf/pcfutil.c (BitOrderInvert): Add `const'. * docs/glnames.py: Updated to latest pstables.h changes. * builds/unix/detect.mk: Add test for Hurd. * builds/hurd/detect.mk: Removed. 2001-03-04 Sander van der Wal <svdwal@xs4all.nl> * src/psnames/pstables.h: Add more `const'. * src/pcf/pcfutil.c: Ditto. 2001-03-04 Werner Lemberg <wl@gnu.org> * src/base/ftglyph.c (FT_Glyph_To_Bitmap): Fixing typo (FT_Glyph_Done -> FT_Done_Glyph). 2001-03-01 Antoine Leca <Antoine.Leca@renault.fr> * include/freetype/ttnameid.h: Added some new Microsoft language codes and LCIDs as found in Office Xp. 2001-02-28 David Turner <david.turner@freetype.org> * builds/hurd/detect.mk: New file. Added support to detect the GNU Hurd operating system as Unix-like. Fix submitted by Anthony Fok <foka@debian.org>. * src/type1/t1gload.c (T1_Load_Glyph): Set glyph control data to the the Type 1 glyph charstring (used by conversion programs). Submitted by Ha Shao <hashao@chinese.com>. 2001-02-22 David Turner <david.turner@freetype.org> * src/base/ftgrays.c (grays_sweep): The function didn't exit immediately if `num_cells' was 0 as it should. Thanks to Boris for finding this out. * src/base/ftglyph.c (FT_Glyph_To_Bitmap): Fixed memory leak when bitmap rendering fails (thanks to Graham Asher). 2001-02-13 Werner Lemberg <wl@gnu.org> * docs/docmaker.py (DocSection::add_element): Use `self.print_error()'. * builds/unix/config.{guess,sub}: Updated (from ftp.gnu.org). 2001-02-13 David Turner <david.turner@freetype.org> * docs/docmaker.py, include/freetype/*.h: Updated the DocMaker script to support chapters and section block ordering. Updated the public header files accordingly. * src/base/ftglyph.c (FT_Glyph_Copy): Advance width and glyph format were not correctly copied. 2001-02-08 Tom Kacvinsky <tkacvins@freetype.org> * src/cff/cffparse.c (cff_parse_font_matrix): Removed an unnecessary fprintf( stderr, ... ). 2001-02-07 Tom Kacvinsky <tkacvins@freetype.org> * src/type1/t1objs.c (T1_Init_Face): Added code to get the units_per_EM from the value assigned in parse_font_matrix, if available. Default to 1000 if not available. * src/cff/cffparse.c (cff_parse_font_matrix): Added logic to get the units_per_EM from the FontMatrix. (cff_parse_fixed_thousand): New function. Gets a real number from the CFF font, but multiplies by 1000 (this is to avoid rounding errors when placing this real number into a 16.16 fixed number). (cff_parse_real): Added code so that the integer part is moved into the high sixteen bits of the 16.16 fixed number. * src/cff/cffobjs.c (CFF_Init_Face): Added logic to get the units per EM from the CFF dictionary, if available. * include/freetype/internal/cfftypes.h: In struct CFF_Font_Dict_, added a units_per_em member to facilitate passing of units_per_em from function cff_parse_font_matrix. * src/type1/t1load.c (is_alpha): Make `-' a legal alphanumeric character. This is so that font names with `-' are fully parsed, etc... 2001-02-02 Werner Lemberg <wl@gnu.org> * src/psaux/psobjs.c (shift_elements): Remove if clause (which is obsolete now). (reallocate_t1_table, PS_Table_Done): Replace REALLOC() with ALLOC() + MEM_Copy() to avoid a memory bug. 2001-02-01 David Turner <david.turner@freetype.org> * docs/docmaker.py: Improved the index sorting routine to place capital letters before small ones. Added the `<order>' marker to section blocks in order to give the order of blocks. 2001-01-30 Antoine Leca <Antoine.Leca@renault.fr> * include/freetype/ttnameid.h: Latest updates to Microsoft language ID codes. 2001-01-24 Tom Kacvinsky <tkacvins@freetype.org> * src/cff/t1load.c (parse_font_matrix): Added heuristic to get units_per_EM from the font matrix. (parse_dict): Deleted test to see whether the FontInfo keyword has been seen. Deletion of this test allows fonts without FontInfo dictionaries to be parsed by the Type 1 driver. (T1_Open_Face): Deleted empty subroutines array test to make sure fonts with no subroutines still are parsed. 2001-01-17 Francesco Zappa Nardelli <francesco.zappa.nardelli@ens.fr> * src/pcfread.c (pcf_get_properties, pcf_get_metrics, pcf_get_bitmaps): Fix compiler errors. 2001-01-11 David Turner <david.turner@freetype.org> * src/pcf/pcfread.c: Removed some compilation warnings related to comparison of signed vs. unsigned integers. * include/freetype/internal/ftdebug.h: Changed the debug trace constants from trace_t2xxxx to trace_cffxxxx to be able to compile the CFF driver in debug mode. 2001-01-11 Matthew Crosby <mcrosby@marthon.org> * builds/unix/freetype-config.in: Fix problems with separate --prefix and --exec-prefix. 2001-01-11 David Turner <david.turner@freetype.org> * docs/docmaker.py: Added cross-references generation as well as more robust handling of pathname wildcard matching. 2001-01-10 Werner Lemberg <wl@gnu.org> * docs/docmaker.py: Minor improvements to reduce unwanted spaces and empty lines in output. 2001-01-09 David Turner <david.turner@freetype.org> * docs/docmaker.py: Improved script to generate table of contents and index pages. It also supports wildcards on non Unix systems. * include/freetype/*.h, include/freetype/cache/*.h: Updated comments to include section definitions/delimitations for the API Reference generator. * include/freetype/freetype.h: Moved declaration of `FT_Generic_Finalizer' and the `FT_Generic' structure to... * include/freetype/fttypes.h: here. 2001-01-04 Werner Lemberg <wl@gnu.org> * include/freetype/ttnameid.h: Updated Unicode code range comments. 2001-01-03 Tom Kacvinsky <tkacvins@freetype.org> * src/cff/rules.mk: Use cffgload.{c,h} instead of t2gload.{c,h}. * include/freetype/internal/internal.h: Changed to use cfftypes.h (cfferrs.h) instead of t2types.h (t2errors.h, respectively). * include/freetype/internal/cfftypes.h: Merged in changes from t2types.h and made this the canonical `types' header for the CFF driver. * include/freetype/internal/t2types.h: This file was merged with cfftypes.h and is no longer necessary. * include/freetype/internal/t2errors.h: Renamed to cfferrs.h. * src/cff/cffobjs.c, src/cff/cffobjs.h, src/cff/cffparse.c, src/cff/cffdrivr.c, src/cff/cff.c, src/cff/cffload.c, src/cff/cffgload.c, src/cff/cffgload.h: Changed to use cffgload.{c,h} instead of t2gload.{c,h}. All occurrences of t2_ (T2_) were replaced with cff_ (CFF_, respectively). * src/cff/t2gload.h: Renamed cffgload.h. * src/cff/t2gload.c: Renamed cffgload.c 2000-01-02 Jouk Jansen <joukj@hrem.stm.tudelft.nl> * builds/vms: Support files for VMS architecture added. * descrip.mms, src/*/descrip.mms: VMS makefiles added. * README.VMS: New file. 2000-01-01 Werner Lemberg <wl@gnu.org> * LICENSE.TXT: Added info about PCF driver license. 2001-01-01 Francesco Zappa Nardelli <francesco.zappa.nardelli@ens.fr> * src/pcf/*: New driver module for PCF font format (used in X Window System). * include/freetype/internal/ftdebug.h (FT_Trace): Added values for PCF driver. * include/freetype/internal/pcftypes.h: New file. * include/freetype/config/ftmodule.h: Added PCF driver module. 2001-01-01 Werner Lemberg <wl@gnu.org> * src/winfonts/winfnt.c (FNT_Get_Char_Index): Fix parameter type. 2000-12-31 Werner Lemberg <wl@gnu.org> * builds/modules.mk (clean_module_list): Fixed deletion of module file in case `make make_module_list' is called before `make setup'. 2000-12-30 Werner Lemberg <wl@gnu.org> * src/cff/cffload.c (CFF_Load_Charset): Improved error messages. (CFF_Load_Charset, CFF_Load_Encoding): Remove unnecessary variable definition. 2000-12-30 Tom Kacvinsky <tkacvins@freetype.org> * include/freetype/internal/t2types.h, include/freetype/internal/cfftypes.h: Changed the structures for CFF_Charset and CFF_Encoding for the new implementations of the charset and encoding parsers in the CFF driver. * src/cff/t2gload.c (t2_lookup_glyph_by_stdcharcode, t2_operator_seac): Added these functions for use in implementing the seac emulation provided by the Type 2 endchar operator. (T2_Parse_CharStrings): Added seac emulation for the endchar operator. * src/cff/cffload.c (CFF_Load_Encoding, CFF_Load_Charset, CFF_Done_Encoding, CFF_Done_Charset): Extended to load and parse the charset/encoding tables, and free the memory used by them when the CFF driver is finished with them. Added tables cff_isoadobe_charset cff_expert_charset cff_expertsubset_charset cff_standard_encoding cff_expert_encoding so that the encoding/charset parser can handle predefined encodings and charsets. 2000-12-24 Tom Kacvinsky <tkacvins@freetype.org> * src/cff/t2gload.c (T2_Load_Glyph): Added code so that the font transform is applied. * src/cff/cffparse.c (cff_parse_font_matrix): Added code so that the font matrix numbers are scaled by 1/(matrix->yy). Also, the offset vector now contains integer values instead of 16.16 fixed numbers. 2000-12-22 Tom Kacvinsky <tkacvins@freetype.org> * src/autohint/ahhint.c (ah_hinter_load_glyph): Removed unnecessary comments and commented-out code. 2000-12-21 David Turner <david.turner@freetype.org> * src/cid/cidafm.c, src/cid/cidafm.h: removed un-needed files, we'll work on supporting CID AFM files later I guess :-) 2000-12-21 Tom Kacvinsky <tkacvins@freetype.org> * src/autohint/ahhint.c (ah_hinter_load, ah_hinter_load_glyph): Changed so that fonts with a non-standard FontMatrix render correctly. Previously, the first glyph rendered from such a font did not have the transformation matrix applied. 2000-12-17 Werner Lemberg <wl@gnu.org> * *.mk: Added lots of `.PHONY' targets. 2000-12-17 Karsten Fleischer <kfleisc1@ford.com> * *.mk: Implemented `platform' target to disable auto-detection. 2000-12-14 Werner Lemberg <wl@gnu.org> * docs/design/modules.html: Removed. Covered by design-*.html. * INSTALL: Added info about makepp. 2000-12-14 David Turner <david.turner@freetype.org> Added support for clipped direct rendering in the smooth renderer. This should not break binary compatibility of existing applications. * include/freetype/fttypes.h, include/freetype/ftimage.h: Move definition of the FT_BBox structure from the former to the latter. * include/freetype/ftimage.h: Add `ft_raster_flag_clip' value to FT_Raster_Flag enumeration. Add `clip_box' element to FT_Raster_Params structure. * src/smooth/ftgrays.c (grays_convert_glyph): Implement it. * INSTALL: Updated installation instructions on Win32, listing the new `make setup list' target used to list supported compilers/targets. * src/raster/ftraster.c (ft_black_render): Test for unsupported direct rendering before testing arguments. 2000-12-13 David Turner <david.turner@freetype.org> * include/freetype/config/ft2build.h, include/freetype/internal/internal.h: Fixed header inclusion macros to use direct definitions. This is the only way to do these things in a portable way :-( The rest of the code should follow shortly though everything compiles now. * builds/compiler/intelc.mk, builds/compiler/watcom.mk: New files. * builds/win32/detect.mk: Added support for the Intel C/C++ compiler, as well as _preliminary_ (read: doesn't work!) support for Watcom. Also added a new setup target. Type `make setup list' for a list of supported command-line compilers on Win32. * src/base/ftdebug.c: Added dummy symbol to avoid empty file if conditionals are off. 2000-12-13 Werner Lemberg <wl@gnu.org> * builds/unix/ftsystem.c: Fixed typos. Fixed inclusion of wrong ftconfig.h file. 2000-12-12 Werner Lemberg <wl@gnu.org> * include/freetype/config/ft2build.h (FT2_ROOT, FT2_CONFIG_ROOT): Removed. ANSI C doesn't (explicitly) allow macro expansion in arguments using `##'. (FT2_PUBLIC_FILE, FT2_CONFIG_FILE, FT2_INTERNAL_FILE): Use directory names directly. Make them configurable. Use `##' to strip leading and trailing spaces from arguments. * builds/unix/ft2unix.h: Adapted. * src/base/ftsystem.c (ft_alloc, ft_realloc, ft_free, ft_io_stream, ft_close_stream): Use FT_CALLBACK_DEF. * builds/unix/ftsystem.c: Use new header scheme. (FT_Done_Memory): Use free() from FT_Memory structure. * src/base/ftinit.c, src/base/ftmac.c: Header scheme fixes. 2000-12-11 Werner Lemberg <wl@gnu.org> * include/freetype/config/ft2build.h (FT2_CONFIG_ROOT, FT2_PUBLIC_FILE, FT2_CONFIG_FILE, FT2_INTERNAL_FILE, FT_SOURCE_FILE): Use `##' operator to be really ANSI C compliant. 2000-12-09 Werner Lemberg <wl@gnu.org> * builds/unix/detect.mk: Remove unused USE_CFLAGS variable. 2000-12-08 Werner Lemberg <wl@gnu.org> * */*.h: Changed body inclusion macro names to start and end with `__' (those which haven't converted yet). Fixed minor conversion issues. * src/winfonts/winfnt.c: Updated to new header inclusion scheme. * src/truetype/ttinterp.c: Remove unused CALC_Length() macro. 2000-12-07 David Turner <david.turner@freetype.org> * */*.[ch]: Changed source files to adhere to the new header inclusion scheme. Not completely tested but works for now here. * src/cff/t2driver.c: Renamed and updated to... * src/cff/cffdrivr.c: New file. * src/cff/t2driver.h: Renamed and updated to... * src/cff/cffdrivr.h: New file. * src/cff/t2load.c: Renamed and updated to... * src/cff/cffload.c: New file. * src/cff/t2load.h: Renamed and updated to... * src/cff/cffload.h: New file. * src/cff/t2objs.c: Renamed and updated to... * src/cff/cffobjs.c: New file. * src/cff/t2objs.h: Renamed and updated to... * src/cff/cffobjs.h: New file. * src/cff/t2parse.c: Renamed and updated to... * src/cff/cffparse.c: New file. * src/cff/t2parse.h: Renamed and updated to... * src/cff/cffparse.h: New file. * src/cff/t2tokens.h: Renamed and updated to... * src/cff/cfftoken.h: New file. * src/cff/cff.c, src/cff/rules.mk: Updated. 2000-12-06 David Turner <david.turner@freetype.org> * src/cache/ftlru.c (FT_Lru_Done): Fixed memory leak. 2000-12-06 Werner Lemberg <wl@gnu.org> * builds/module.mk: Replaced `xxx #' with `xxx$(space). * builds/os2/detect.mk, builds/win32/detect.mk: Moved comment to avoid trailing spaces in variable. * builds/freetype.mk: Use $(D) instead of $D to make statement more readable. * docs/docmaker.py: Formatting. 2000-12-05 David Turner <david.turner@freetype.org> * src/psaux/psauxmod.c: Fixed a broken inclusion of component header files (an FT_FLAT_COMPILE test was missing). * src/cache/ftcmanag.c (FTC_Manager_Done): Fixed a bug that caused an occasional crash when the function was called (due to a dangling pointer). * src/base/ftsystem.c (FT_Done_Memory): Fixed an obvious bug: The ANSI `free()' function was called instead of `memory->free()'. * docs/docmaker.py: Added section filtering, multi-page generation (index page generation is still missing though). 2000-12-04 David Turner <david.turner@freetype.org> * builds/unix/install.mk, builds/unix/ft2unix.h: The file `ft2unix.h' is now installed as <ft2build.h> for Unix systems. Note that we still use the `freetype2/freetype' installation path for now. * */*.[ch]: Now using <ft2build.h> as the default build and setup configuration file in all public headers. Internal source files still need some changes though. * builds/devel/ft2build.h, builds/devel/ftoption.h: Created a new directory to hold all development options for both the Unix and Win32 developer builds. * builds/win32/detect.mk, builds/win32/w32-bccd.mk, builds/win32/w32-dev.mk: Changed the developer build targets to `devel-gcc' and `devel-bcc' in order to be able to develop with the Borland C++ compiler. 2000-12-01 David Turner <david.turner@freetype.org> * Version 2.0.1 released. ========================= * builds/unix/configure.in, builds/unix/configure, builds/cygwin/configure.in, builds/cygwin/configure: Setting `version_info' to 6:1:0 for the 2.0.1 release. * CHANGES: Added a summary of changes between 2.0.1 and 2.0. * builds/unix/ftconfig.in, builds/cygwin/ftconfig.in: Changes to allow compilation under Unix with the Unix-specific config files. 2000-12-01 Werner Lemberg <wl@gnu.org> * INSTALL: Revised. * builds/compiler/bcc-dev.mk, builds/compiler/visualage.mk, builds/compiler/bcc.mk, builds/win32/w32-bcc.mk, builds/win32/w32-bccd.mk: Revised. * include/freetype/config/ftbuild.h, include/freetype/internal/internal.h: Revised. * include/freetype/ftimage.h: Updated to new header inclusion scheme. 2000-11-30 Werner Lemberg <wl@gnu.org> * builds/toplevel.mk (.PHONY): Adding `distclean'. * builds/unix/detect.mk (.PHONY): Adding `devel', `unix', `lcc', `setup'. 2000-11-30 David Turner <david.turner@freetype.org> * INSTALL: Slightly updated the quick starter documentation to include IDE compilation, prevent against BSD Make, and specify `make setup' instead of a single `make' for build configuration. * include/config/ftbuild.h, include/internal/internal.h: Added new configuration files used to determine the location of all public, configuration, and internal header files for FreeType 2. Modified all headers under `include/freetype' to reflect this change. Note that we still need to change the library source files themselves though. * builds/compiler/bcc.mk, builds/compiler/bcc-dev.mk, builds/win32/w32-bcc.mk, builds/win32/w32-bccd.mk, builds/win32/detect.mk: Added new files to support compilation with the free Borland C++ command-line compiler. Modified the detection rules to recognize the new `bcc32' target in `make setup bcc32'. * src/sfnt/ttcmap.c, src/sfnt/ttpost.c, src/sfnt/ttsbit.c, src/truetype/ttobjs.c, src/truetype/ttgload.c, src/truetype/ttinterp.c: Fixed a few comparisons that Borland C++ didn't really like. Basically, this compiler complains when FT_UInt is compared to FT_UShort (apparently, it promotes `UShort' to `Int' in these cases). 2000-11-30 Tom Kacvinsky <tkacvins@freetype.org> * t2objs.c (T2_Init_Face): Added calculation of `face->height' for pure CFF fonts. * t1objs.c (T1_Init_Face): Fixed computation of `face->height'. 2000-11-29 David Turner <david.turner@freetype.org> * src/base/ftbbox.c (BBox_Conic_Check): Fixed a really stupid bug in the formula used to compute the conic Bézier extrema of non-monotonous arcs. 2000-11-29 Werner Lemberg <wl@gnu.org> * src/base/ftcalc.c (FT_SqrtFixed), src/base/ftobjs.c (FT_Set_Renderer): Use FT_EXPORT_DEF. * src/cache/ftcimage.c (FTC_Image_Cache_Lookup), src/cache/ftcmanag.c (FTC_Manager_Done, FTC_Manager_Reset, FTC_Manager_Lookup_Face, FTC_Manager_Lookup_Size, FTC_Manager_Register_Cache), src/cache/ftcsbits.c (FTC_SBit_Cache_Lookup): Ditto. * src/include/freetype/cache/ftcglyph.h (FTC_GlyphNode_Init), src/include/freetype/ftmac.h (FT_New_Face_From_FOND): Use FT_EXPORT. 2000-11-29 Werner Lemberg <wl@gnu.org> * src/sfnt/sfdriver.c: Include ttsbit.h and ttpost.h only conditionally. * src/truetype/ttdriver.c (Set_Char_Sizes, Set_Pixel_Sizes): Set `size->strike_index' only conditionally. * src/type1/t1driver.c, src/type1/t1objs.c: Include t1afm.h only conditionally. * src/winfonts/winfnt.h: Move all type definitions to... * src/include/freetype/internal/fnttypes.h: New file. * src/winfonts/winfnt.c: Use it. 2000-11-29 ??? ??? <darin@eazel.com> * include/freetype/internal/ftdebug.h: Replaced FT_CAT and FT_XCAT with a direct solution (which also satisfies picky compilers). 2000-11-28 YAMANO-UCHI Hidetoshi <mer@din.or.jp> * src/truetype/ttobjs.c (TT_Init_Size): Fix #ifdef's to work with disabled interpreter also. * src/base/ftnames.c (FT_Get_Sfnt_Name_Count): Fix incorrect parentheses. 2000-11-26 Tom Kacvinsky <tkacvins@freetype.org> * src/cff/t2gload.c (T2_Parse_CharStrings): Added logic to glyph width setting code to take into account even/odd argument counts and glyph width operand before endchar/hmoveto/vmoveto. 2000-11-26 Werner Lemberg <wl@gnu.org> * builds/ansi/ansi.mk: Fix inclusion order of files. 2000-11-26 Keith Packard <keithp@keithp.com> * src/type1/t1objs.c (T1_Init_Face): Compute style flags. 2000-11-26 Werner Lemberg <wl@gnu.org> * builds/compiler/ansi-cc.mk (CLEAN_LIBRARY): Fix rule and conditional. 2000-11-23 Werner Lemberg <wl@gnu.org> * src/type1/t1load.c (parse_subrs, parse_charstrings): Use decrypt function from PSAux module. * src/type1/t1parse.c (T1_Done_Parse): Renamed to... (T1_Finalize_Parser): New function (to avoid name clash with a function in the PSAux module). (T1_Decrypt): Removed since it is duplicated in the PSAux module. (T1_Get_Private_Dict): Added `psaux' as new parameter; use decrypt function from PSAux module. * src/type1/t1parse.h: Adapted. 2000-11-22 Tom Kacvinsky <tkacvins@freetype.org> * src/cff/t2objs.c (T2_Init_Face): For pure CFF fonts, set `root->num_faces' to `cff->num_faces' and set `units_per_EM' to 1000. * src/cff/t2parse.c (parse_t2_real): Fixed real number parsing loop. * src/cff/t2load.c (T2_Get_String): Called T2_Get_Name with a sid that was off by one. 2000-11-16 David Turner <david@freetype.org> * src/autohint/ahtypes.h (AH_Hinter): Added new fields to control auto-hinting of synthetic Type 1 fonts. * src/autohint/ahhint.c (ah_hinter_load, ah_hinter_load_glyph): Added auto-hinting support of synthetic Type 1 fonts. 2000-11-12 Tom Kacvinsky <tkacvins@freetype.org> * src/sfnt/ttload.c (TT_LookUp_Table, TT_Load_Generic_Table): Change tracing output. * src/sfnt/sfobjs.c (SFNT_Load_Face): Set boolean variable `has-outline' to true only if the font has a `glyf' or `CFF ' table. 2000-11-11 Werner Lemberg <wl@gnu.org> * builds/win32/visualc/freetype.dsp: Fix raster1->raster and type1z->type1. 2000-11-11 Tom Kacvinsky <tkacvins@freetype.org> * builds/unix/freetype-config.in, builds/cygwin/freetype-config.in: Added a --libtool option. When freetype-config --libtool is invoked, the absolute path to the libtool convenience library is returned. 2000-11-11 Werner Lemberg <wl@gnu.org> * builds/cygwin/cygwin-def.in: Same fix as previous. 2000-11-10 Tom Kacvinsky <tkacvins@freetype.org> * builds/unix/unix-def.in: Add INSTALL_PROGRAM := @INSTALL_PROGRAM@ INSTALL_SCRIPT := @INSTALL_SCRIPT@ so that installation of freetype-config does not fail. 2000-11-10 Werner Lemberg <wl@gnu.org> * builds/cygwin/freetype-config.in, builds/unix/freetype-config.in: Move test down for empty --exec-prefix. Fix --version. * builds/cygwin/install.mk, builds/unix/install.mk: Use $(INSTALL_SCRIPT) for installation of freetype-config. * builds/cygwin/install.mk: Fix clean target names. 2000-11-09 David Turner <david@freetype.org> * Version 2.0 released. ======================= ---------------------------------------------------------------------------- Copyright (C) 2000-2022 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, and distributed under the terms of the FreeType project license, LICENSE.TXT. By continuing to use, modify, or distribute this file you indicate that you have read the license and understand and accept it fully. Local Variables: version-control: never coding: utf-8 End:
whupdup/frame
real/third_party/freetype-2.12.0/docs/oldlogs/ChangeLog.20
20
gpl-3.0
91,563
2005-06-08 Werner Lemberg <wl@gnu.org> * Version 2.1.10 released. ========================== * src/pcf/readme: Renamed to... * src/pcf/README: This. 2005-06-07 Detlef Würkner <TetiSoft@apg.lahn.de> * builds/amiga/*: Added copyright notes, reworked some comments. 2005-06-05 Werner Lemberg <wl@gnu.org> * Add copyright notices to all files which don't have one. * docs/license.txt: Renamed to... * docs/LICENSE.TXT: This. * docs/FTL.txt: Renamed to... * docs/FTL.TXT: This. * docs/GPL.txt: Renamed to... * docs/GPL.TXT: This. * docs/PATENTS: Slightly reworded. Suggested by Sylvain Beucler <beuc@gnu.org>. 2005-06-04 Werner Lemberg <wl@gnu.org> * include/freetype/ftimage.h (FT_Outline_MoveToFunc, FT_Outline_LineToFunc, FT_Outline_ConicToFunc, FT_Outline_CubicToFunc, FT_Raster_RenderFunc), include/freetype/ftrender.h (FT_Glyph_TransformFunc, FT_Renderer_RenderFunc, FT_Renderer_TransformFunc): Don't use `const' to stay compatible with FreeType 2.1.9. 2005-06-01 Adam D. Moss <adam@gimp.org> * src/base/ftstroke.c (ft_stroker_inside): Revert `sigma' patch from 2004-07-11; this gives much better results under normal circumstances. 2005-05-30 Chia I Wu <b90201047@ntu.edu.tw> * include/freetype/ftbitmap.h (FT_Bitmap_Embolden): Minor documentation improvements. * include/freetype/ftoutln.h (FT_Outline_Embolden): Fix typos. * src/base/ftbitmap.c (FT_Bitmap_Embolden): Add support for bitmap of pixel_mode FT_PIXEL_MODE_GRAY2 or FT_PIXEL_MODE_GRAY4. If xstr is larger than 8 and bitmap is of pixel_mode FT_PIXEL_MODE_MONO, set xstr to 8 instead of returning error. 2005-05-29 Chia I Wu <b90201047@ntu.edu.tw> * src/base/ftbitmap.c (FT_Bitmap_Embolden): Fix emboldening bitmap of mode FT_PIXEL_MODE_GRAY. Also add support for mode FT_PIXEL_MODE_LCD and FT_PIXEL_MODE_LCD_V. (ft_bitmap_assure_buffer): FT_PIXEL_MODE_LCD and FT_PIXEL_MODE_LCD_V should have ppb (pixel per byte) 1. Zero the padding when there's no need to allocate memory. * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Handle slot->advance too. More suited emboldening strength. 2005-05-28 Chia I Wu <b90201047@ntu.edu.tw> * src/base/ftbitmap.c (FT_Bitmap_Embolden): Handle negative pitch. Handle FT_PIXEL_MODE_GRAY with num_gray != 256. Improve speed for FT_PIXEL_MODE_GRAY. (ft_bitmap_assure_buffer): Accept FT_PIXEL_MODE_LCD and FT_PIXEL_MODE_LCD_V. 2005-05-27 Chia I Wu <b90201047@ntu.edu.tw> * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Initialize `error'. * src/base/ftobjs.c (ft_cmap_done_internal): New function. (FT_CMap_Done): Remove cmap from cmap list. (destroy_charmaps, FT_CMap_New): Don't call FT_CMap_Done but ft_cmap_done_internal. 2005-05-26 Werner Lemberg <wl@gnu.org> * docs/GPL.txt: Update postal address of FSF. 2005-05-26 Chia I Wu <b90201047@ntu.edu.tw> * include/freetype/ftbitmap.h (FT_Bitmap_Embolden): Improve documentation. * src/base/ftsynth.c (FT_BOLD_THRESHOLD): Removed. (FT_GlyphSlot_Embolden): Check whether slot is bitmap owner. Always modify the metrics. 2005-05-24 Werner Lemberg <wl@gnu.org> * docs/CHANGES: Updated. 2005-05-24 Chia I Wu <b90201047@ntu.edu.tw> * include/freetype/ftbitmap.h (FT_Bitmap_Embolden): New declaration. * include/freetype/ftoutln.h (FT_Outline_Embolden): New declaration. * src/base/ftbitmap.c (ft_bitmap_assure_buffer): New auxiliary function. (FT_Bitmap_Embolden): New function. * src/base/ftoutln.c (FT_Outline_Embolden): New function. * src/base/ftsynth.c: Don't include FT_INTERNAL_CALC_H and FT_TRIGONOMETRY_H but FT_BITMAP_H. (FT_GlyphSlot_Embolden): Use FT_Outline_Embolden or FT_Bitmap_Embolden. 2005-05-24 Werner Lemberg <wl@gnu.org> * configure: Always remove config.mk, builds/unix/unix-def.mk, and builds/unix/unix-cc.mk. This fixes repeated calls of the script. Reported by Nelson Beebe and Behdad Esfahbod. * README.CVS: Mention file permissions. 2005-05-23 Werner Lemberg <wl@gnu.org> * builds/amiga/makefile.os4 (WARNINGS), builds/compiler/gcc-dev.mk (CFLAGS), builds/compiler/gcc.mk (CFLAGS): Remove -fno-strict-aliasing. * src/sfnt/rules.mk (SFNT_DRV_SRC): Don't include ttsbit0.c -- it is currently loaded from ttsbit.c. 2005-05-23 Behdad Esfahbod <behdad@cs.toronto.edu> Say you have `(Foo*)x' and want to assign, pass, or return it as `(Bar*)'. If you simply say `x' or `(Bar*)x', then the C compiler would warn you that type casting incompatible pointer types breaks strict-aliasing. The solution is to cast to `(void*)' instead which is the generic pointer type, so the compiler knows that it should make no strict-aliasing assumption on `x'. But the problem with `(void*)x' is that seems like in C++, unlike C, `void*' is not a generic pointer type and assigning `void*' to `Bar*' without a cast causes an error. The solution is to cast to `Bar*' too, with `(Bar*)(void*)x' as the result -- this is what the patch does. * include/freetype/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP), include/freetype/cache/ftcmru.h (FTC_MRULIST_LOOKUP_CMP): Remove cast on lvalue, use a temporary pointer instead. Cast temporarily to (void*) to not break strict aliasing. * include/freetype/internal/ftmemory.h (FT_MEM_ALLOC, FT_MEM_REALLOC, FT_MEM_QALLOC, FT_MEM_QREALLOC, FT_MEM_FREE), src/base/ftglyph.c (FT_Glyph_To_Bitmap): Cast temporarily to (void*) to not break strict aliasing. * src/base/ftinit.c (FT_USE_MODULE): Fix wrong type information. * builds/unix/configure.ac (XX_CFLAGS): Remove -fno-strict-aliasing. 2005-05-23 David Turner <dturner@freetype.org> Fix Savannah bug #12213 (incorrect behaviour of the cache sub-system in low-memory conditions). * include/freetype/cache/ftccache.h (FTC_CACHE_TRYLOOP, FTC_CACHE_TRYLOOP_END): New macros. * src/cache/ftccache.c (FTC_Cache_NewNode), src/cache/ftcsbits.c (ftc_snode_compare): Use FT_CACHE_TRYLOOP and FTC_CACHE_TRYLOOP_END. 2005-05-23 Werner Lemberg <wl@gnu.org> * src/base/rules.mk (BASE_SRC): Don't add ftsynth.c here but... (BASE_EXT_SRC): Here. 2005-05-22 Werner Lemberg <wl@gnu.org> * src/base/ftrfork.c (raccess_guess_apple_generic): Mark `version_number' and `entry_length' as unused. (raccess_guess_linux_double_from_file_name): Remove `memory'. (raccess_make_file_name): Mark `error' as unused. * src/bdf/bdflib.c (_bdf_parse_properties): Remove `memory'. * src/cid/cidobjs.c (cid_face_init): Remove `psnames'. * src/sfnt/sfobjs.c (sfnt_load_face): Remove `memory'. * src/truetype/ttgxvar.c (ft_var_readpackedpoints, ft_var_readpackeddeltas, ft_var_load_avar): Mark `error' as unused. * src/base/rules.mk (BASE_SRC): Add ftsynth.c. 2005-05-21 David Turner <david@freetype.org> * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Fix a bug that produced unpleasant artefacts when trying to embolden very sharp corners. 2005-05-20 Werner Lemberg <wl@gnu.org> * docs/CHANGES: Updated. 2005-05-20 Chia I Wu <b90201047@ntu.edu.tw> * src/base/ftbitmap.c: Don't include FT_FREETYPE_H and FT_IMAGE_H but FT_BITMAP_H. (FT_Bitmap_Copy): New function (from ftglyph.c). * include/freetype/ftbitmap.h (FT_Bitmap_Copy): New public definition. * src/base/ftglyph.c: Include FT_BITMAP_H. (ft_bitmap_copy): Move to ftbitmap.c. (ft_bitmap_glyph_init): Remove `memory' variable. Create new bitmap object if FT_GLYPH_OWN_BITMAP isn't set. (ft_bitmap_glyph_copy): Use FT_Bitmap_Copy. (ft_bitmap_glyph_done): Use FT_Bitmap_Done. (ft_outline_glyph_init): Use FT_Outline_Copy. * src/base/ftoutln.c (FT_Outline_Copy): Handle source == target. (FT_Outline_Done_Internal): Check for valid `memory' pointer. (FT_Outline_Translate, FT_Outline_Reverse, FT_Outline_Render, FT_Outline_Transform): Check for valid `outline' pointer. * src/base/ftobjs.c (FT_New_GlyphSlot): Prepend glyph slot to face->glyph, otherwise a new second glyph slot cannot be created. (FT_Done_GlyphSlot): Fix memory leak. (FT_Open_Face): Updated -- face->glyph is already managed by FT_New_GlyphSlot. * src/type42/t42objs.c (T42_GlyphSlot_Done): Updated. 2005-05-20 Kirill Smelkov <kirr@mns.spb.ru> * include/freetype/ftimage.h (FT_Raster_Params), include/freetype/ftoutln.h (FT_Outline_Translate, FT_Outline_Transform), src/base/ftoutln.c (FT_Outline_Translate, FT_Outline_Transform): Decorate parameters with `const' where appropriate. Update all callers. * src/raster/ftraster.c (ft_black_reset), src/smooth/ftgrays.c (gray_raster_reset): Remove `const' from `pool_base' argument. 2005-05-18 Kirill Smelkov <kirr@mns.spb.ru> * src/raster/ftmisc.h: New file. Only needed if ftraster.c is compiled as stand-alone. * src/raster/ftraster.c: Add comment how to compile as stand-alone. s/FT_CONFIG_OPTION_STATIC_RASTER/FT_STATIC_RASTER/. s/TT_STATIC_RASTER/FT_STATIC_RASTER/. [_STANDALONE_]: Include ftimage.h and ftmisc.h. (FT_TRACE1, FT_TRACE6, ft_memset, FT_MEM_ZERO): Define conditionally. (Render_Glyph, Render_Gray_Glyph): Return Raster_Err_None (or Raster_Err_Unsupported). (ft_black_new) [_STANDALONE_]: Fix type of `the_raster'. (ft_black_init, ft_black_reset, ft_black_set_mode, ft_black_render): Use `ras', not `raster'. (ft_black_done): Use FT_UNUSED_RASTER. (Horizontal_Sweep_Init, Horizontal_Sweep_Step, Horizontal_Gray_Sweep_Span): Use FT_UNUSED_RASTER. 2005-05-18 Werner Lemberg <wl@gnu.org> * docs/announce: Start updating. * docs/CHANGES: Updated. 2005-05-16 Vitaliy Pasternak <v_a_pasternak@mail.ru> * builds/win32/visualc/freetype.vcproj: Updated. Exclude debug info for `Release' versions to reduce library size. 2005-05-16 Werner Lemberg <wl@gnu.org> * src/base/ftobjs.c (FT_Open_Face): Make it work as documented, this is, ignore `aface' completely if face_index < 0. Reported by David Osborn <spam@habitualhiatus.com>. 2005-05-16 Kirill Smelkov <kirr@mns.spb.ru> * include/freetype/ftimage.h (FT_Outline_MoveToFunc, FT_Outline_LineTo_Func, FT_Outline_ConicToFunc, FT_Outline_CubicToFunc), src/smooth/ftgrays.c (gray_render_conic, gray_render_cubic, gray_move_to, gray_line_to, gray_conic_to, gray_cubic_to, gray_render_span, gray_sweep): Decorate parameters with `const' where appropriate. 2005-05-11 Kirill Smelkov <kirr@mns.spb.ru> * include/freetype/ftimage.h (FT_Raster_RenderFunc), include/freetype/ftrender.h (FT_Glyph_TransformFunc, FT_Renderer_Render_Func, FT_Renderer_TransformFunc), src/base/ftglyph.c (ft_outline_glyph_transform), src/raster/ftrend1.c (ft_raster1_transform, ft_raster1_render), src/smooth/ftgrays.c (FT_Outline_Decompose, gray_raster_render), src/smooth/ftsmooth.c (ft_smooth_transform, ft_smooth_render_generic, ft_smooth_render, ft_smooth_render_lcd, ft_smooth_render_lcd_v): Decorate parameters with `const' where appropriate. * src/raster/ftraster.c (RASTER_RENDER_POOL): Removed. Obsolete. (ft_black_render): Decorate parameters with `const' where appropriate. 2005-05-11 Werner Lemberg <wl@gnu.org> * src/sfnt/ttcmap.c (tt_cmap4_set_range): Fix typo (FT_PEEK_SHORT -> FT_PEEK_USHORT) which caused crashes. Reported by Ismail Donmez <ismail@kde.org.tr>. 2005-05-08 Werner Lemberg <wl@gnu.org> * include/freetype/internal/ftserv.h (FT_FACE_FIND_GLOBAL_SERVICE) [__cplusplus]: Fix typo. 2005-05-07 Werner Lemberg <wl@gnu.org> Handle unsorted SFNT type 4 cmaps correctly (reported by Dirck Blaskey <listtarget@danbala.com>). * src/sfnt/ttcmap.h (TT_CMap): Add member `unsorted'. * src/sfnt/ttcmap.c: Use SFNT_Err_Ok where appropriate. (tt_cmap0_validate, tt_cmap2_validate, tt_cmap6_validate, tt_cmap8_validate, tt_cmap10_validate, tt_cmap12_validate): Use `FT_Error' as return type. (tt_cmap4_validate): Use `FT_Error' as return type. Return error code for unsorted cmap. (tt_cmap4_char_index, tt_cmap4_char_next): Use old code for unsorted cmaps. (tt_face_build_cmaps): Set `unsorted' variable in cmap. 2005-05-07 Werner Lemberg <wl@gnu.org> * src/truetype/ttpload.c (tt_face_get_location): Fix typo. 2005-05-06 Werner Lemberg <wl@gnu.org> * src/cff/cffobjs.c (cff_face_init): Set ppem value in top dictionary for SFNT-based CFF. 2005-05-05 Werner Lemberg <wl@gnu.org> Handle malformed `loca' table entries. * docs/TODO: Add some bugs which should be fixed. * include/freetype/internal/tttypes.h (TT_FaceRec): Add `glyf_len' element. * src/truetype/ttpload.c (tt_face_load_loca): Get length of `glyf' table. (tt_face_get_location): Fix computation of `asize' for malformed `loca' entries. 2005-05-01 David Turner <david@freetype.org> * Jamfile: Remove `otvalid' from the list of compiled modules. * include/freetype/internal/ftserv.h: Add compiler pragmas to get rid of annoying warnings with Visual C++ compiler in maximum warning mode. * src/autofit/afhints.c, src/autofit/aflatin.c, src/base/ftstroke.c, src/bdf/bdfdrivr.c, src/cache/ftcbasic.c, src/cache/ftccmap.c, src/cache/ftcmanag.c, src/cff/cffload.c, src/cid/cidload.c, src/lzw/zopen.c, src/otvalid/otvgdef.c, src/pcf/pcfread.c, src/sfnt/sfobjs.c, src/truetype/ttgxvar.c: Remove compiler warnings. 2005-04-28 Werner Lemberg <wl@gnu.org> * docs/TODO: Updated. 2005-04-24 Werner Lemberg <wl@gnu.org> * src/otvalid/otvcommn.c (otv_GSUBGPOS_have_MarkAttachmentType_flag): Handle table == 0. 2005-04-16 Werner Lemberg <wl@gnu.org> * src/cff/cffobjs.c (cff_face_init): Set default upem value in top font dict also. Handle font matrix settings in subfonts. * src/cff/cffgload.c (cff_slot_load): Use the correct font matrix for CID-keyed fonts with subfonts. * docs/formats.txt: Updated. 2005-04-14 Kirill Smelkov <kirr@mns.spb.ru> * include/freetype/freetype.h (FT_Vector_Transform), include/freetype/ftimage.h (FT_Raster_Params), include/freetype/ftoutln.h, src/base/ftoutln.c (FT_Outline_Get_CBox, FT_Outline_Copy, FT_Outline_Transform, FT_Vector_Transform, FT_Outline_Get_Bitmap), src/raster/ftraster.c (ft_black_render), src/smooth/ftgrays.c (gray_raster_render): Decorate parameters with `const' where appropriate. 2005-04-14 Werner Lemberg <wl@gnu.org> * src/type1/t1load.c (parse_charstrings): Catch this non-standard beginning of the /CharStrings dictionary: /CharStrings 118 dict def Private begin CharStrings begin * src/sfnt/ttsbit0.c (tt_sbit_decoder_load_image): Fix arguments to call of tt_sbit_decoder_load_bitmap. 2005-04-13 Werner Lemberg <wl@gnu.org> * docs/TODO: Updated. * autogen.sh: Use `--force' for all commands. 2005-04-09 Werner Lemberg <wl@gnu.org> * src/pshinter/pshalgo.c (ps_hints_apply): Change scaling values only if `fitted' is not zero. 2005-04-06 Werner Lemberg <wl@gnu.org> * src/truetype/ttgload.c (tt_face_get_metrics) [FT_OPTIMIZE_MEMORY]: Fix typo which sometimes causes wrong metrics for the last glyph. 2005-04-04 David Turner <david@freetype.org> * devel/ftoption.h, include/freetype/config/ftoption.h (FT_OPTIMIZE_MEMORY): Comment out this macro for the upcoming 2.1.10 release. (*_CHESTER_*): Removed. No longer used. * src/autofit/afhints.c (af_axis_hints_new_segment, af_axis_hints_new_edge): Small tweak to use less heap memory. 2005-04-03 Werner Lemberg <wl@gnu.org> * src/type1/t1parse.c (T1_New_Parser): Relax the check for a valid first line in the font. 2005-04-03 Werner Lemberg <wl@gnu.org> * docs/CHANGES, include/freetype/freetype.h: Improve documentation of FT_Set_Pixel_Sizes and FT_Set_Char_Size. 2005-03-26 Detlef Würkner <TetiSoft@apg.lahn.de> * builds/amiga/src/base/ftsystem.c (ft_amiga_stream_io): Fix buffer offsets after a large read. 2005-03-26 Werner Lemberg <wl@gnu.org> * src/autofit/afglobal.c (af_face_globals_get_metrics): s/index/gidx/. * src/sfnt/ttsbit0.c (tt_sbit_decoder_load_image): Fix compiler warnings. * src/sfnt/rules.mk (SFNT_DRV_SRC): Add ttsbit0.c. * src/sfnt/ttsbit0.h: Dummy file for build with `make'. 2005-03-26 Detlef Würkner <TetiSoft@apg.lahn.de> Update of the Amiga port. * builds/amiga/makefile, builds/amiga/makefile.os4, builds/amiga/smakefile: Included the base extension files (ftbitmap.c, ftotval.c, ftpfr.c, ftstroke.c, ftxf86.c). 2005-03-25 Detlef Würkner <TetiSoft@apg.lahn.de> Update of the Amiga port. * builds/amiga/makefile, builds/amiga/smakefile: Handle new modules. * builds/amiga/makefile.os4: Makefile for AmigaOS4 SDK. * builds/amiga/README: Updated. * builds/amiga/include/freetype/config/ftconfig.h: Handle gcc for AmigaOS4. * builds/amiga/include/freetype/config/ftmodule.h: Handle new modules. * builds/amiga/src/base/ftdebug.c: Updated to current version of default ftdebug.c. Add various include files and macros to have proper support for both AmigaOS4 and older AmigaOS versions. Don't declare KVPrintF explicitly. Replace getenv with GetVar. Actually enable debugging code. * builds/amiga/src/base/ftsystem.c: Major rewrite. 2005-03-23 Werner Lemberg <wl@gnu.org> * tests/*: Removed. 2005-03-23 Werner Lemberg <wl@gnu.org> * docs/CHANGES, docs/INSTALL.ANY: Updated. * include/freetype/ftmoderr.h: Replace `Autohint' with `Autofit'. Add `OTvalid'. * src/autofit/aferrors.h: New file. * src/autofit/afglobal.c, src/autofit/afhints.c, src/autofit/aflatin.c, src/autofit/afloader.c: s/FT_Err_/AF_Err_/. Include aferrors.h. * src/autofit/rules.mk (AUTOF_DRV_H): Include aferrors.h. * src/otvalid/otverror.h: s/FT_Mod_Err_OTV/FT_Mod_Err_OTvalid/. 2005-03-22 David Turner <david@freetype.org> * src/autohint/*: Removed. * Jamfile: Updated. 2005-03-15 David Turner <david@freetype.org> * src/bdf/bdflib.c: Remove compiler warnings. (hash_rehash, hash_init): Don't call FT_MEM_ZERO. (_bdf_list_t): Add `memory' field. (_bdf_list_init, _bdf_list_done, _bdf_list_ensure): New functions. (_bdf_shift, _bdf_join): Rename to... (_bdf_list_shift, _bdf_list_join): This. (_bdf_split): Renamed to... (_bdf_list_split): This. Use new functions. (bdf_internal_readstream): Removed. (NO_SKIP): New macro. (_bdf_readstream): Rewritten. (bdf_create_property, _bdf_add_comment): Improve allocation. (_bdf_set_default_spacing, _bdf_parse_glyphs): Updated. Improve allocation. (_bdf_parse_properties, _bdf_parse_start): Updated. (bdf_load_font): Updated to use new functions. * src/type1/t1parse.c (check_type1_format): New function. (T1_New_Parser): Use it to check font header before allocating anything on the heap. * src/type42/t42parse.c (t42_parser_init): Modify functions to check the font header before allocating anything on the heap. * include/freetype/internal/ftmemory.h (FT_ARRAY_MAX, FT_ARRAY_CHECK): New macros. * src/base/ftstream.c (FT_Stream_TryRead): New function. * include/freetype/internal/ftstream.h: Updated. * src/pcf/pcfread.c (pcf_read_TOC), src/pcf/pcfutil.c (BitOrderInvert, TwoByteSwap, FourByteSwap): Minor fixes and simplifications. Try to protect the PCF driver from doing stupid things with broken fonts. * src/lzw/ftlzw.c (FT_Stream_OpenLZW): Check the LZW header before doing anything else. This avoids unnecessary heap allocations (400KByte of heap memory for the LZW decoder). * src/gzip/ftgzip.c (FT_Stream_OpenGzip): Ditto for the gzip decoder, although the code savings are smaller. * docs/CHANGES: Updated. 2005-03-10 David Turner <david@freetype.org> * src/tools/glnames.py: Add comment to explain the compression being used for the Adobe Glyph List. 2005-03-10 Werner Lemberg <wl@gnu.org> * src/truetype/ttpload.c (tt_face_load_cvt, tt_face_load_fpgm): Fix serious typo which prevented correct TT rendering. * include/freetype/internal/ftmemory.h: Undo change from 2005-03-03. To suppress warnings it is sufficient to use `-fno-strict-aliasing'. 2005-03-10 Werner Lemberg <wl@gnu.org> * src/tools/glnames.py: Formatted. Format output to be in sync with other FreeType code. Import `re' and `os.path'. (StringTable) <__init__>: Add parameter to initialize master table name. (StringTable) <dump>: Don't pass master table name. (StringTable) <dump_sublist>: Emit explanatory comment. Simplify and make output more human readable. (t1_bias, glyph_list, adobe_glyph_names): Removed. Unused. (main): Use `basename' for file name in header. * src/psnames/pstables.h: Regenerated. 2005-03-09 David Turner <david@freetype.org> * src/tools/glnames.py: Rewrite the generator for the `pstables.h' header file which contains various constant tables related to glyph names. It now uses a different, more compact storage scheme that saves about 20KB. This also closes Savannah bug #12262. * src/psnames/pstables.h: Regenerated. * src/psnames/psmodule.c (ps_unicode_value): Use `ft_get_adobe_glyph_index', a new function defined in `pstables.h'. (ps_get_macintosh_name, ps_get_standard_strings): Updated. * src/base/ftobjs.c (FT_Set_Char_Size): Handle fractional sizes more carefully. This fixes Savannah bug #12263. 2005-03-06 David Turner <david@freetype.org> * src/otvalid/otvgsub.c, src/otvalid/otvgpos.c: Make static tables constant. * src/autofit/aflatin.c (af_latin_metrics_init): Fix Savannah bug #12212 (auto-hinter refuses to work if no Unicode charmap in font). 2005-03-05 Werner Lemberg <wl@gnu.org> * autogen.sh: New script for bootstrapping. * README.CVS: New file which documents bootstrapping. * builds/unix/aclocal.m4, builds/unix/config.guess, builds/unix/config.sub, builds/unix/configure, builds/unix/ltmain.sh: Removed. 2005-03-04 Werner Lemberg <wl@gnu.org> * src/base/ftutil.c: Include FT_INTERNAL_OBJECTS_H. 2005-03-03 Werner Lemberg <wl@gnu.org> Various fixes for C and C++ compiling. * src/autofit/*: Add copyright messages. * src/autofit/afhints.c (af_glyph_hints_done): Don't use `AF_Dimension' but `int' for loop counter. * src/autofit/aflatin.c (af_latin_metrics_init_widths): Don't use `AF_Dimension' but `int' for loop counter. Use proper enumeration value for `render_mode'. (af_latin_metrics_scale_dim): Don't shadow variables. (af_latin_hints_compute_segments): Use proper cast for `major_dir' and `segment_dir'. (af_latin_align_linked_edge, af_latin_hint_edges): Fix arguments of call to `af_latin_compute_stem_width'. (af_latin_hints_apply): Don't use `AF_Dimension' but `int' for loop counter. * src/base/ftdbgmem.c (ft_mem_table_get_source, FT_DumpMemory): Use proper cast for memory allocation. * src/cff/cffdrivr.c (cff_get_kerning): Use proper cast for initialization of `sfnt'. * src/sfnt/sfdriver.c: Include `ttkern.h'. * src/sfnt/ttkern.c (tt_face_get_kerning): Don't shadow variables. * src/truetype/ttgload.c: Include `ttpload.h'. 2005-03-03 David Turner <david@freetype.org> * include/freetype/internal/ftmemory.h (FT_ALLOC, FT_REALLOC, FT_QALLOC, FT_QREALLOC) [gcc >= 3.3]: Provide macro versions which avoid compiler warnings. (FT_NEW, FT_NEW_ARRAY, FT_RENEW_ARRAY, FT_QNEW, FT_QNEW_ARRAY, FT_QRENEW_ARRAY, FT_ALLOC_ARRAY, FT_REALLOC_ARRAY): Updated. * include/freetype/internal/ftserv.h (FT_FACE_FIND_SERVICE, FT_FACE_FIND_GLOBAL_SERVICE, FT_FACE_LOOKUP_SERVICE) [__cplusplus]: Provide macro versions which avoid compiler warnings. * src/base/ftutil.c (ft_highpow2): New utility function. * include/freetype/internal/ftobjs.h: Updated. * src/pfr/pfrload.c (pfr_get_gindex, pfr_compare_kern_pairs, pfr_sort_kerning_pairs): Don't define if FT_OPTIMIZE_MEMORY is set. (pfr_phy_font_done): Don't handle `kern_pairs' if FT_OPTIMIZE_MEMORY is set. (pfr_phy_font_load): Don't call `pfr_sort_kerning_pairs' if FT_OPTIMIZE_MEMORY is set. * src/pfr/pfrobjs.c (pfr_slot_load): Comment out some code which doesn't work with broken fonts. (pfr_face_get_kerning) [FT_OPTIMIZE_MEMORY]: Implement. * src/pfr/pfrtypes.h (PFR_KernItemRec): Optimize member types. (PFR_NEXT_KPAIR): New macro. (PFR_PhyFontRec): Don't define `kern_pairs' if FT_OPTIMIZE_MEMORY is set. * src/sfnt/ttsbit0.c (tt_sbit_decoder_load_image): Introduce temporary variable to avoid gcc warning. (tt_face_load_sbit_image): Mark unused variables with FT_UNUSED. * src/truetype/ttpload.c (tt_face_load_loca) [FT_OPTIMIZE_MEMORY]: Remove redundant variable. * include/freetype/config/ftmodule.h: Moving the order of drivers to speed up font loading. The PCF and BDF loaders are still slow and consume far too much memory. 2005-03-03 Werner Lemberg <wl@gnu.org> * devel/ftoption.h: Updated to recent changes. 2005-03-02 Werner Lemberg <wl@gnu.org> * src/autofit/afdummy.c, src/autofit/afdummy.h (af_dummy_script_class): Fix type. * src/autofit/aflatin.c, src/autofit/aflatin.h (af_latin_script_class): Fix type. * src/autofit/rules.mk (AUTOF_DRV_SRC): Fix typo. 2005-03-01 David Turner <david@freetype.org> * src/sfnt/ttkern.c (tt_face_load_kern, tt_face_get_kerning), src/sfnt/ttsbit0.c (tt_face_load_sbit_strikes, tt_sbit_decoder_load_byte_aligned, tt_sbit_decoder_load_compound, tt_sbit_decoder_load_image), src/sfnt/ttload.c (tt_face_load_metrics): Remove compiler warnings -- redundant variables, missing initializations, etc. * src/sfnt/ttsbit.h: Handle FT_OPTIMIZE_MEMORY. * src/autofit/rules.mk, src/autofit/module.mk, src/autofit/afangles.h: New files. * src/autofit/afhints.c (af_axis_hints_new_segment, af_axis_hints_new_edge): New functions. (af_glyph_hints_done): Do proper deallocation. (af_glyph_hints_reload): Only reallocate points array. This drastically reduces heap usage. * src/autofit/afhints.h (AF_PointRec, AF_SegmentRec): Optimize member types and positions. (AF_AxisHintsRec): Add `max_segments' and `max_edges'. (af_axis_hints_new_segment, af_axis_hints_new_edge): New prototypes. * src/autofit/aflatin.c (af_latin_metrics_scale): Don't call AF_SCALER_EQUAL_SCALES. (af_latin_hints_compute_segments): Change return type to FT_Error. Update all callers. Improve segment allocation. (af_latin_hints_compute_edges): Change return type to FT_Error. Update all callers. Improve edge allocation and link handling. (af_latin_hints_detect_features): Change return type to FT_Error. Update all callers. * src/autofit/aflatin.h: Updated. * src/autofit/afloader.c (af_loader_load_g) <FT_GLYPH_FORMAT_OUTLINE>: Assure axis->num_edges > 1. This fixes a bug with certain fonts. * include/freetype/config/ftmodule.h: The auto-fitter is now the only supported auto-hinting module. * include/freetype/config/ftstdlib.h (FT_INT_MAX): New macro. 2005-02-28 Werner Lemberg <wl@gnu.org> * src/truetype/ttpload.c (tt_face_load_loca): Fix typo. * src/sfnt/ttkern.c: Include `ttkern.h'. (FT_COMPONENT): Updated. * include/freetype/internal/fttrace.h: Add entry for `ttkern'. * src/sfnt/ttsbit0.c: s/FT_Err_/SFNT_Err_/. Decorate constants with `U' and `L' where necessary. * src/sfnt/ttcmap.c (tt_cmap4_next): Remove unused variable. 2005-02-28 David Turner <david@freetype.org> * src/base/ftdbgmem.c (FT_DumpMemory): Added sorting of memory sources according to decreasing maximum cumulative allocations. (ft_mem_source_compare): New auxiliary function. * src/sfnt/ttsbit0.c: New file, implementing a heap-optimized embedded bitmap loader. * src/sfnt/ttsbit.c: Include `ft2build.h', FT_INTERNAL_DEBUG_H, FT_INTERNAL_STREAM_H, FT_TRUETYPE_TAGS_H. Load `ttsbit0.c' if FT_OPTIMIZE_MEMORY is set, otherwise use file contents. (tt_face_load_sbit_strikes): Set up root fields to indicate the strikes. This fixes Savannah bug #12107. Use `static' keyword for `sbit_line_metrics_field', `strike_start_fields', `strike_end_fields'. * include/freetype/internal/tttypes.h (TT_FaceRec): Define `sbit_table', `sbit_table_size', `sbit_num_strikes' if FT_OPTIMIZE_MEMORY is set. Don't define `num_sbit_strikes' and `sbit_strikes' if FT_OPTIMIZE_MEMORY is set. * src/cff/cffobjs.c (sbit_size_reset): Handle FT_OPTIMIZE_MEMORY. * src/sfnt/sfobjs.c (sfnt_load_face): Fixed bug that prevented loading SFNT fonts without a `kern' table. Properly pass root->face_flags. Remove code for TT_CONFIG_OPTION_EMBEDDED_BITMAPS. * src/sfnt/sfdriver.c (sfnt_interface) [TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: Don't use `tt_find_sbit_image' and `tt_load_sbit_metrics'. * src/sfnt/ttcmap.c: Optimize linear charmap scanning for Format 4. (OPT_CMAP4): New macro. (TT_CMap4Rec) [OPT_CMAP4]: New structure. (tt_cmap4_init, tt_cmap4_set_range, tt_cmap4_next, tt_cmap4_reset) [OPT_CMAP4]: New functions. (tt_cmap4_char_next) [OPT_CMAP4]: Use `tt_cmap4_next' and `tt_cmap4_reset'. (tt_cmap4_class_rec) [OPT_CMAP4]: Use `TT_CMap4Rec' and `tt_cmap4_init'. * src/truetype/ttobjs.c (Reset_SBit_Size): Handle FT_OPTIMIZE_MEMORY. * src/autofit/afhints.h (AF_PointRec, AF_SegmentRec, AF_EdgeRec): Optimize member types. * src/autofit/afloader.c (af_loader_done): Call `af_glyph_hints_done'. 2005-02-27 David Turner <david@freetype.org> * src/sfnt/ttkern.c (tt_face_load_kern): Fix a small bug which caused invalid (random) return values for the horizontal kerning. 2005-02-25 David Turner <david@freetype.org> Implement several memory optimizations to drastically reduce the heap usage of FreeType, especially in the case of memory-mapped files. The idea is to avoid loading and decoding tables in the heap, and instead access the raw data whenever possible (i.e., when it doesn't compromise performance). This has several benefits: For example, opening vera.ttf now uses just a small amount of memory (even when the FT_Library footprint is accounted for), until you start loading glyphs. Even then, you save at least 20KB compared to the non-optimized case. Performance of various operations, including open and close, has also been dramatically improved. More optimizations to come, especially for the auto-hinter. * include/freetype/internal/sfnt.h (TT_Face_GetKerningFunc): New function type. (SFNT_Interface): Add it. * include/freetype/internal/tttypes.h (TT_HdmxEntryRec, TT_HdmxRec, TT_Kern0_PairRec): Don't define if FT_OPTIMIZE_MEMORY is set. (TT_FaceRec): Define `horz_metrics', `horz_metrics_size', `vert_metrics', `vert_metrics_size', `hdmx_table', `hdmx_table_size', `hdmx_record_count', `hdmx_record_size', `hdmx_record_sizes', `kern_table', `kern_table_size, `num_kern_tables', `kern_avail_bits', `kern_order_bits' if FT_OPTIMIZE_MEMORY is set. Don't define `hdmx', `num_kern_pairs', `kern_table_index', `kern_pairs' if FT_OPTIMIZE_MEMORY is set. * src/base/ftdbgmem.c (ft_mem_table_set): Don't shadow variable. Fix compiler warning. * src/cff/cffdrivr.c (Get_Kerning): Renamed to... (cff_get_kerning): This. Simplify. (cff_driver_class): Updated. * src/sfnt/Jamfile (_sources): Add `ttkern'. * src/sfnt/rules.mk (SFNT_DRV_SRC): Add `ttkern.c'. * src/sfnt/sfdriver.c (sfnt_interface): Add `tt_face_get_kerning'. * src/sfnt/sfnt.c: Include `ttkern.c'. * src/sfnt/sfobjs.c: Include `ttkern.h'. (sfnt_load_face): Consider the `kern' and `gasp' table as optional. (sfnt_done_face): Call `tt_face_done_kern'. Handle horizontal metrics for FT_OPTIMIZE_MEMORY. * src/sfnt/ttkern.c, src/sfnt/ttkern.h: New files. Code has been taken from `ttload.c' and `ttload.h'. Provide special versions of `tt_face_load_kern', `tt_face_get_kerning', and `tt_face_done_kern' for FT_OPTIMIZE_MEMORY. * src/sfnt/ttload.c (tt_face_load_metrics, tt_face_load_hdmx, tt_face_free_hdmx): Provide version for FT_OPTIMIZE_MEMORY. (tt_face_load_kern, tt_kern_pair_compare, TT_KERN_INDEX): Moved to `ttkern.c'. * src/sfnt/ttload.h: Updated. * src/sfnt/ttsbit.c (sbit_metrics_field): Add `static' keyword. * src/truetype/ttdriver.c (Get_Kerning): Renamed to... (tt_get_kerning): This. Simplify. (tt_driver_class): Updated. * src/truetype/ttgload.c (TT_Get_Metrics): Renamed to... (tt_face_get_metrics): This. Provide version for FT_OPTIMIZE_MEMORY. Update all callers. (Get_Advance_Widths): Replaced with... (Get_Advance_WidthPtr): This. Provide version for FT_OPTIMIZE_MEMORY. Update all callers. * src/truetype/ttgload.h: Updated. 2005-02-22 David Turner <david@freetype.org> * src/base/ftdbgmem.c: Partly rewritten. Added the ability to list all allocation sites in the memory debugger. Also a new function FT_DumpMemory() was added. It is only available in builds with FT_DEBUG_MEMORY defined, and you must declare it in your own code to use it, i.e., with something like: extern void FT_DumpMemory( FT_Memory ); ... FT_DumpMemory( memory ); * include/freetype/config/ftoption.h (TT_CONFIG_OPTION_BYTECODE_INTERPRETER): Comment out definition -- again. (FT_OPTIMIZE_MEMORY): New configuration macro to control various optimizations for reducing the heap footprint of memory-mapped TrueType files. * include/freetype/internal/ftmemory.h (FT_ARRAY_ZERO): New convenience macro. * include/freetype/internal/tttypes.h (TT_FaceRec) [FT_OPTIMIZE_MEMORY]: Use optimized types for `num_locations' and `glyph_locations'. * src/truetype/ttgload.c (load_truetype_glyph): Call `tt_face_get_location'. * src/truetype/ttobjs.c (tt_face_init) [FT_CONFIG_OPTION_INCREMENTAL]: Improve error handling. (tt_face_done): Call `tt_face_done_loca'. * src/truetype/ttpload.c (tt_face_get_location, tt_face_done_loca): New functions. If FT_OPTIMIZE_MEMORY is set, the locations table is read directly from memory-mapped streams, instead of being decoded into the heap. (tt_face_load_loca) [FT_OPTIMIZE_MEMORY]: New implementation. (tt_face_load_cvt, tt_face_load_fpgm): Only load table if the bytecode interpreter is compiled in. * src/truetype/ttpload.h: Updated. * src/autohint/ahglyph.c (ah_outline_load): Improve allocation logic. 2005-02-20 Werner Lemberg <wl@gnu.org> * builds/unix/ltmain.sh: Regenerated with `libtoolize --force --copy' from libtool 1.5.14. * builds/unix/aclocal.m4: Regenerated with `aclocal -I .' from automake 1.9.4. * builds/unix/config.guess, builds/unix/config.sub: Updated from `config' CVS module at subversions.gnu.org. * builds/unix/install-sh, builds/unix/mkinstalldirs: Updated from `texinfo' CVS module at subversions.gnu.org. 2005-02-14 Werner Lemberg <wl@gnu.org> * src/cff/cffcmap.c (cff_cmap_unicode_init): Don't try to build a cmap for a CID-keyed font which doesn't have SIDs. 2005-02-13 Werner Lemberg <wl@gnu.org> * src/type1/t1load.c (read_binary_data): Return more meaningful value. (parse_encoding, parse_subrs, parse_charstrings, parse_dict): Check parser error value after call to T1_Skip_PS_Token (where necessary). * src/type1/t1parse.c (T1_Get_Private_Dict): Check parser error value after call to T1_Skip_PS_Token. * src/cid/cidparse.c (cid_parser_new): Check parser error value after call to cid_parser_skip_PS_token. * src/type42/t42parse.c (t42_parse_encoding, t42_parse_sfnts, t42_parse_charstrings, t42_parse_dict): Check parser error value after call to T1_Skip_PS_Token (where necessary). * src/psaux/psobjs.c (skip_string, ps_parser_skip_PS_token, ps_tobytes): Add error messages. 2005-02-12 Werner Lemberg <wl@gnu.org> * configure: Output more variables to the created Makefile so that it can be used for ft2demos also (if the FT2DEMOS variable is defined). 2005-02-10 David Turner <david@freetype.org> * src/pfr/pfrgload.c (pfr_glyph_load): Fix an unbounded growing dynamic array when loading a glyph from a PFR font (Savannah bug #11921). * src/base/ftbitmap.c (FT_Bitmap_Convert): Small improvements to the conversion function (mainly stupid optimization). * src/base/Jamfile: Adding ftbitmap.c to the list of compiled files. 2005-02-10 Werner Lemberg <wl@gnu.org> * builds/unix/freetype-config.in: Add new flag `--ftversion' to return the FreeType version. Suggested by George Williams <gww@silcom.com>. * docs/CHANGES: Updated. 2005-02-09 Werner Lemberg <wl@gnu.org> * src/otvalid/otvmod.c (otv_validate): Deallocate arrays in case of error. Reported by YAMANO-UCHI Hidetoshi <mer@din.or.jp>. 2005-02-08 Werner Lemberg <wl@gnu.org> * src/psaux/t1decode.c (t1_decoder_parse_charstrings) <op_closepath>: Accept `T1_Parse_Have_Moveto' state also which can happen in empty glyphs. Reported by Ian Brown <ian.brown@printsoft.de> (Savannah bug #11856). 2005-02-04 Werner Lemberg <wl@gnu.org> * src/otlayout/*: Removed. Obsolete. 2004-12-28 Werner Lemberg <wl@gnu.org> * builds/unix/ltmain.sh: Regenerated with `libtoolize --force --copy' from libtool 1.5.10. * builds/unix/aclocal.m4: Regenerated with `aclocal -I .' from automake 1.9.4. * builds/unix/configure: Regenerated with autoconf 2.59b. * builds/unix/config.guess, builds/unix/config.sub: Updated from `config' CVS module at subversions.gnu.org. * builds/unix/install-sh: Updated from `texinfo' CVS module at subversions.gnu.org. * builds/unix/ftsystem.c (FT_Stream_Open): Add proper cast for ft_alloc. Fix compiler warning. 2004-12-27 Dirck Blaskey <listtarget@danbala.com> * src/cff/cffobjs.c (cff_face_init): Improve computation of FT_STYLE_BOLD_FLAG. 2004-12-27 Werner Lemberg <wl@gnu.org> * src/cff/cffobjs.c (cff_face_init): A CFF within an SFNT can have only a single font. This is undocumented but has been verified on the opentype list. 2004-12-26 Werner Lemberg <wl@gnu.org> * Jamfile (FT2_COMPONENTS): Add `otvalid'. 2004-12-25 Werner Lemberg <wl@gnu.org> * src/base/ftbitmap.c (FT_Bitmap_Convert): Fix compiler warning. 2004-12-15 Werner Lemberg <wl@gnu.org> * vms_make.com: Add ftbitmap.obj. 2004-12-14 Werner Lemberg <wl@gnu.org> * src/base/ftbitmap.c, include/freetype/ftbitmap.h: New files for handling various bitmap formats. * include/freetype/config/ftheader.h (FT_BITMAP_H): New macro. * src/base/rules.mk (BASE_EXT_SRC): Add ftbitmap.c. * src/bdf/bdfdrivr.c (BDF_Glyph_Load): Don't convert bitmaps to 8bpp but return them as-is. * docs/CHANGES: Mention new bitmap API. * include/freetype/ftchapters.h: Updated. 2004-12-11 Robert Clark <freetype@ratty.org.uk> * src/base/ftobjs.c (FT_Get_Kerning): Make kerning amount dependent on ppem by scaling down for ppem < 25, then do normal rounding. This gives slightly better results than rounding towards zero. 2004-12-09 Werner Lemberg <wl@gnu.org> * src/base/ftobjs.c (FT_Get_Kerning): Always round towards zero for FT_KERNING_DEFAULT. This greatly enhances the kerning for small ppem values. 2004-12-08 Werner Lemberg <wl@gnu.org> * src/base/ftobjs.c (ft_glyphslot_clear): Reset `lsb_delta' and `rsb_delta'. 2004-12-05 Werner Lemberg <wl@gnu.org> * builds/unix/install.mk (install): Use $(OBJ_BUILD) for ftconfig.h. 2004-12-03 Antoine Leca <Antoine-Freetype@Leca-Marti.org> * include/freetype/ttnameid.h: Updated to latest specifications from Microsoft. 2004-11-26 Jouk Jansen <joukj@hrem.stm.tudelft.nl> * vms_make.com: Include ftbbox.c. Fix `ccopt'. Handle `otvalid' module. Update `vmslib.dat' default values. Fixes to `libs.opt'. 2004-11-23 Anders Kaseorg <anders@kaseorg.com> * src/base/ftoutln.c (FT_OrientationExtremumRec, ft_orientation_extremum_compute): Removed. (FT_Outline_Get_Orientation): Rewritten, simplified. * src/autohint/ahglyph.c: Include FT_OUTLINE_H. (ah_test_extremum, ah_get_orientation): Removed. (ah_outline_load): Use FT_Outline_Get_Orientation. * src/base/ftsynth.c (ft_test_extrema, ft_get_orientation): Removed. (FT_GlyphSlot_Embolden): Use FT_Outline_Get_Orientation. 2004-11-23 Fernando Papa <fpapa@netgate.com.uy> * src/truetype/ttinterp.h: Fix typo. 2004-11-22 Antoine Leca <Antoine-Freetype@Leca-Marti.org> * builds/win32/detect.mk: Corrected logic that detects Windows NT to use the previous change even if win32 is forced. Corrected detection of win32 on Win9X. * builds/dos/detect.mk: Added same correction as for win32 about COPY on Windows NT. Detection of plain DOS 7.x. 2004-11-22 Werner Lemberg <wl@gnu.org> * builds/detect.mk: Undo change from 2004-11-20. * builds/win32/detect.mk: If the `OS' environment variable contains `Windows_NT', use `cmd.exe /c copy' for copying files. 2004-11-20 Werner Lemberg <wl@gnu.org> * builds/detect.mk (dos_setup): Use `cmd.exe' for copying $(CONFIG_MK) to force lowercase file name under Windows. 2004-11-19 Werner Lemberg <wl@gnu.org> Fix a serious bug in the TT hinter. * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Don't shift points vertically before hinting. * docs/CHANGES: Updated. * src/cache/ftcglyph.c (FTC_GNode_UnselectFamily, FTC_GCache_Lookup): A new try to fix comparison with zero. 2004-11-16 Werner Lemberg <wl@gnu.org> * builds/unix/configure.ac: Add `-fno-strict-aliasing' if gcc is used. * builds/unix/configure: Regenerated. * builds/unix/config.guess, builds/unix/config.sub: Updated from `config' CVS module at subversions.gnu.org. 2004-11-16 Dr. Martin P.J. Zinser <zinser@decus.de> * src/cache/ftcglyph.c (FTC_GNode_UnselectFamily, FTC_GCache_Lookup): Fix comparison with zero. * docs/INSTALL.VMS: Updated. * vms_make.com: Updated. All `descrip.mms' files are now created automatically. * src/*/descrip.mms: Removed. 2004-11-16 Owen Taylor <otaylor@redhat.com> * builds/unix/freetype-config.in: Suppress -L$libdir for /usr/lib64 as well as /usr/lib. (Reported by Dan Winship - https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=139199) 2004-11-11 Werner Lemberg <wl@gnu.org> * src/cff/cffdrivr.c (cff_service_ps_info): Updated. * src/cid/cidriver.c (cid_service_ps_info): Updated. * src/type42/t42drivr.c (t42_ps_get_font_private): New function. (t42_service_ps_info): Updated. * src/type42/t42parse.c (t42_parse_dict): Remove compiler warning. 2004-11-11 David Bevan <dbevan@emtex.com> Add new function FT_Get_PS_Font_Private(). * include/freetype/internal/services/svpsinfo.h (PS_GetFontPrivateFunc): New service function. * include/freetype/t1tables.h, src/base/fttype1.c (FT_Get_PS_Font_Private): New function. * src/type1/t1driver.c (t1_ps_get_font_private): New function. (t1_service_ps_info): Updated. 2004-10-13 Werner Lemberg <wl@gnu.org> * include/freetype/config/ftstdlib.h: Include `stddef.h'. (ft_ptrdiff_t): Define. * include/freetype/fttypes.h (FT_PtrDist): Use `ft_ptrdiff_t'. * src/cid/cidload.c (cid_parse_dict), src/type1/t1load.c (parse_dict): Fix compiler warning. 2004-10-11 Joshua Neal <jneal@csdaily.com> * src/sfnt/ttcmap.c (tt_face_build_cmaps): Check for pointer overflow. * src/sfnt/ttload.c (tt_face_load_hdmx): Protect against bad input. Don't use FT_QNEW_ARRAY but FT_NEW_ARRAY to make deallocation work in case of failure. * src/sfnt/ttsbit.c (Load_SBit_Range): Check range intervals. (tt_face_load_sbit_strikes): Allocate `strike_sbit_ranges' after frame test. * src/truetype/ttgload.c (TTLoad_Simple_Glyph): Add assertion for `flag'. 2004-10-09 Werner Lemberg <wl@gnu.org> * docs/CHANGES: Updated. 2004-10-09 Boris Letocha <b.letocha@cz.gmc.net> Fix handling of NPUSHW if skipped in data stream. * src/truetype/ttinterp.c (opcode_length): Set value for NPUSHW to -2. (SkipCode, TT_RunIns): Use opcode_length value for computation of bytes to be skipped. 2004-09-10 Jouk Jansen <joukj@hrem.stm.tudelft.nl> * vms_make.com: Updated. 2004-09-09 Werner Lemberg <wl@gnu.org> Adding OpenType validation module. The code is based on the (unfinished) `otlayout' module but has been heavily modified to make it much more compact. * src/otvalid/*: New module. * include/freetype/ftotval.h, src/base/ftotval.c, include/freetype/internal/services/svotval.h: New files. * include/freetype/config/ftmodule.h: Add otv_module_class. * include/freetype/config/ftheader.h (FT_OPENTYPE_VALIDATE_H): New macro. * include/freetype/internal/ftserv.h (FT_SERVICE_OPENTYPE_VALIDATE_H): New macro. * include/freetype/internal/fttrace.h (otvmodule, otvcommon, otvbase, otvgdef, otvgpos, otvgsub, otvjstf): New trace components. * include/freetype/ftchapters.h: Updated. * src/base/Jamfile (Library), src/base/descrip.mms (OBJS), src/base/rules.mk (BASE_EXT_SRC): Updated. * docs/CHANGES: Updated. 2004-09-08 Werner Lemberg <wl@gnu.org> * src/tools/docmaker/sources.py (re_source_block_format2) <column>: Use lookahead assertion to not match `*/'. This removes spurious insertions of `/' in the HTML output. 2004-09-07 Werner Lemberg <wl@gnu.org> * src/truetype/ttgxvar.c (TT_Vary_Get_Glyph_Deltas): Fix call to FT_NEW_ARRAY. 2004-09-04 Werner Lemberg <wl@gnu.org> * include/freetype/internal/ftobjs.h: Don't include FT_CONFIG_STANDARD_LIBRARY_H. (FT_Validator, FT_ValidationLevel, FT_ValidatorRec, FT_VALIDATOR, ft_validator_init, ft_validator_run, ft_validator_error, FT_INVALID, FT_INVALID_TOO_SHORT, FT_INVALID_OFFSET, FT_INVALID_FORMAT, FT_INVALID_GLYPH_ID, FT_INVALID_DATA): Move to... * include/freetype/internal/ftvalid.h: New file. Make FT_INVALID return module-specific error codes. * include/freetype/internal/internal.h (FT_INTERNAL_VALIDATE_H): New macro. * include/freetype/fterrors.h: Undefine FT_ERR_PREFIX only if FT_KEEP_ERR_PREFIX isn't defined. * src/base/ftobjs.c: Include FT_INTERNAL_VALIDATE_H. * src/sfnt/ttcmap.h: Don't include FT_INTERNAL_OBJECTS_H but FT_INTERNAL_VALIDATE_H. * src/sfnt/ttcmap.c: Don't include FT_INTERNAL_OBJECTS_H but FT_INTERNAL_VALIDATE_H. Include sferrors.h before FT_INTERNAL_VALIDATE_H. s/FT_Err_Ok/SFNT_Err_Ok/. * src/sfnt/sferrors.h: Define FT_KEEP_ERR_PREFIX. * src/type1/t1afm.c: Include t1errors.h. 2004-09-03 Werner Lemberg <wl@gnu.org> * src/base/ftdebug.c (ft_debug_init): Highest debug level is 7, not 6. * docs/DEBUG: Updated. 2004-08-30 Werner Lemberg <wl@gnu.org> * include/freetype/tttags.h (TTAG_BASE, TTAG_GDEF, TTAG_GPOS, TTAG_JSTF): New tags. * include/freetype/fttypes.h (FT_Bytes, FT_Tag): New typedefs. (FT_Int): Add `signed'. 2004-08-29 Werner Lemberg <wl@gnu.org> * src/otlayout/otlgpos.c (otl_gpos_subtable_validate): Add argument to pass number of lookups. Update all callers. Don't call otl_lookup_list_validate but otl_lookup_validate. (otl_gpos_validate): Call otl_lookup_list_validate instead of otl_gpos_subtable_validate. * src/otlayout/otlgpos.h: Updated. * src/otlayout/otljstf.c (otl_jstf_max_validate): Add argument to pass number of lookups. Update all callers. * src/cff/cffparse.c (cff_parse_real): s/exp/exponent/ to avoid compiler warning. * src/sfnt/ttcmap0.c, src/sfnt/ttcmap0.h: Renamed to... * src/sfnt/ttcmap.c, src/sfnt/ttcmap.h: This. * src/sfnt/Jamfile, src/sfnt/rules.mk, src/sfnt/sfdriver.c, src/sfnt/sfnt.c, src/sfnt/sfobjs.c: Updated. * builds/compiler/gcc-dev.mk (CFLAGS): Don't add `-Wnested-externs' if compiler is g++ (v3.3.3 emits a warning otherwise). 2004-08-28 Werner Lemberg <wl@gnu.org> * src/otlayout/otlgpos.c (otl_value_length): Return number of bytes, not number of 16bit entities. (otl_gpos_lookup2_validate): Check class definition tables for format 2. Fix loop for format 2. (otl_liga_mark2_validate): Fix offset for otl_anchor_validate. 2004-08-27 Werner Lemberg <wl@gnu.org> * src/base/ftmac.c: Don't include truetype/ttobjs.h. Don't include type1/t1objs.h. (FT_New_Face_From_FSSpec) [!__MWERKS__]: Remove compiler warnings. 2004-08-27 Mathieu Malaterre <mathieu@malaterre.com> * src/base/ftmac.c: Handle OS_INLINE for xlc compiler also. 2004-08-27 Werner Lemberg <wl@gnu.org> * src/otlayout/otlayout.h: Add copyright. (OTL_INVALID_OFFSET): Removed. * src/otlayout/otlgdef.h: Include otlayout.h. Comment out inclusion of otltable.h. * src/otlayout/otlgpos.c (otl_gpos_lookup4_validate): Fix call to otl_base_array_validate. (otl_liga_mark2_validate): Fix `for' loop. * src/otlayout/otlgsub.c (otl_ligature_validate): Check `glyph_id', not components array. * src/otlcommn.c (otl_lookup_get_count, otl_feature_get_count): Comment out. (otl_lookup_list_get_count, otl_feature_list_get_count): Activate. (otl_feature_list_validate, otl_gsubgpos_get_lookup_count): s/otl_lookup_get_count/otl_lookup_list_get_count/. (otl_script_list_validate): s/otl_feature_get_count/otl_feature_list_get_count/. (otl_script_validate): Call otl_lang_validate for default language. * src/otlayout/otlcommn.h: Updated. 2004-08-16 Werner Lemberg <wl@gnu.org> * src/otlayout/otlgpos.c (otl_gpos_lookup1_validate, otl_gpos_lookup2_validate, otl_gpos_lookup3_validate, otl_gpos_lookup4_validate, otl_gpos_lookup5_validate, otl_gpos_lookup6_validate, otl_gpos_lookup9_validate, otl_gpos_validate): Update function arguments. (otl_gpos_lookup7_validate, otl_gpos_lookup8_validate): Update function arguments. Handle NULL offsets correctly. Check sequence and lookup indices for format 3. (otl_pos_rule_validate, otl_chain_pos_rule_validate): Add argument to pass lookup count. Check sequence and glyph indices. (otl_gpos_subtable_validate): Update function arguments. Update callers. * src/otlayout/otlgpos.h: Updated. * src/otlayout/otlgsub.c (otl_gsub_lookup1_validate, otl_gsub_lookup3_validate, otl_gsub_lookup8_validate): Update function arguments. Add glyph index checks. (otl_sequence_validate, otl_alternate_set_validate, otl_ligature_validate): Add argument to pass glyph count. Update callers. Add glyph index check. (otl_gsub_lookup2_validate, otl_gsub_lookup4_validate): Update function arguments. (otl_ligature_set_validate): Add argument to pass glyph count. Update caller. (otl_sub_class_rule_validate, otl_sub_class_rule_set_validate): Removed. (otl_sub_rule_validate, otl_chain_sub_rule_validate): Add argument to pass lookup count. Update callers. Add lookup index check. (otl_sub_rule_set_validate, otl_chain_sub_rule_set_validate): Add argument to pass lookup count. Update callers. (otl_gsub_lookup5_validate): Update function arguments. Handle NULL offsets correctly. Don't call otl_sub_class_rule_set_validate but otl_sub_rule_set_validate. Check sequence and lookup indices for format 3. (otl_gsub_lookup6_validate): Update function arguments. Handle NULL offsets correctly. Check sequence and lookup indices for format 3. (otl_gsub_lookup7_validate, otl_gsub_validate): Update function arguments. * src/otlayout/otlgsub.h: Updated. * src/otlayout/otlbase.c (otl_base_validate): Handle NULL offsets correctly. * src/otlayout/otlcommn.c (otl_class_definition_validate): Fix compiler warning. (otl_coverage_get_first, otl_coverage_get_last): New functions. (otl_lookup_validate): Add arguments to pass lookup and glyph counts. Update callers. (otl_lookup_list_validate): Add argument to pass glyph count. Update callers. * src/otlayout/otlcommn.h: Updated. * src/otlayout/otljstf.c (otl_jstf_extender_validate, otl_jstf_max_validate, otl_jstf_script_validate, otl_jstf_priority_validate, otl_jstf_lang_validate): Add parameter to validate glyph indices. Update callers. (otl_jstf_validate): Add parameter which specifies number of glyphs in font. * src/otlayout/otljstf.h: Updated. 2004-08-15 Werner Lemberg <wl@gnu.org> * src/otlayout/otlgpos.c (otl_liga_mark2_validate): Add parameter to handle possible NULL values properly. Update all callers. 2004-08-15 Werner Lemberg <wl@gnu.org> * src/otlayout/gpos.c: Rename counting variables to be more meaningful. Add copyright. (otl_liga_attach_validate): Renamed to... (otl_liga_mark2_validate): This. Update all callers. (otl_mark2_array_validate): Removed. (otl_gpos_lookup6_validate): Call otl_liga_mark2_validate, not otl_mark2_array_validate. (otl_pos_class_set_validate, otl_pos_class_rule_validate): Removed. (otl_gpos_lookup7_validate): Complete code for format 2. (otl_chain_pos_class_rule_validate, otl_chain_pos_class_set_validate): Removed. (otl_gpos_lookup8_validate): Don't call otl_chain_pos_class_set_validate but otl_chain_pos_rule_set_validate. Simplify some code. * src/otlayout/otlgpos.h: Add copyright. 2004-08-14 Werner Lemberg <wl@gnu.org> * src/otlayout/otljstf.c (otl_jstf_gsub_mods_validate): Removed. (otl_jstf_gpos_mods_validate): Renamed to... (otl_jstf_gsubgpos_mods_validate): This. Test whether lookup_count is zero. (otl_jstf_priority_validate): Use otl_jstf_gsubgpos_mods_validate. (otl_jstf_validate): Initialize gsub_lookup_count and gpos_lookup_count if gsub or gpos is zero. * src/otlayout/otlgsub.c: Rename counting variables to be more meaningful. Add copyright. (otl_gsub_lookup1_validate): Simplify code. (otl_gsub_lookup2_validate, otl_gsub_lookup3_validate, otl_gsub_lookup4_validate, otl_gsub_lookup7_validate): Remove unused variables. (otl_gsub_lookup5_validate): Remove unused variable. Fix call to otl_sub_rule_set_validate and otl_sub_class_rule_set_validate. (otl_chain_sub_class_rule_validate, otl_chain_sub_class_set_validate): Removed. (otl_gsub_lookup6_validate): Remove unused variable. Fix call to otl_chain_sub_rule_set_validate. (otl_gsub_lookup7_validate): Handle lookup type 8 also. (otl_gsub_lookup8_validate: New function. (otl_gsub_lookup1_apply, otl_gsub_lookup2_apply, otl_gsub_lookup3_apply): Commented out. (otl_gsub_validate_funcs): Add otl_gsub_lookup7_validate and otl_gsub_lookup8_validate. (otl_gsub_validate): Updated. * src/otlayout/otlgsub.h: Add copyright. * src/otlayout/otlcommn.c, src/otlayout/otlcommn.h (otl_coverage_get_index): Comment out. 2004-08-13 Werner Lemberg <wl@gnu.org> * src/otlayout/otlcommn.c (otl_gsubgpos_get_lookup_count): New function. * src/otlayout/otlcommn.h: Updated. * src/otlayout/otlbase.c: Rename counting variables to be more meaningful. Add copyright message. * src/otlayout/otlbase.h: Add copyright message. * src/otlayout/otlgdef.c: Rename counting variables to be more meaningful. Add copyright message. Use OTL_CHECK everywhere. (otl_caret_value_validate): Remove unused variable. (otl_gdef_validate): All tables are optional. * src/otlayout/otlgdef.h: Add copyright message. * src/otlayout/otljstf.c: Rename counting variables to be more meaningful. Add copyright message. (otl_jstf_gsub_mods_validate, otl_jstf_gpos_mods_validate): Add parameter to pass lookup count. Update all callers. Check lookup array. (otl_jstf_max_validate): s/otl_gpos_subtable_check/otl_gpos_subtable_validate/. (otl_jstf_priority_validate, otl_jstf_lang_validate, otl_jstf_script_validate): Add two parameters to pass lookup counts. Update all callers. (otl_jstf_validate): Add two parameters to pass GPOS and GSUB table offsets; use otl_gsubgpos_get_lookup_count to convert extract lookup counts. Fix typo. * src/otlayout/otljstf.h: Updated. Add copyright message. * src/otlayout/otlgpos.c (otl_gpos_subtable_validate): New function. (otl_gpos_validate): Use it. * src/otlayout/otlgpos.h: Updated. 2004-08-13 Werner Lemberg <wl@gnu.org> * src/otlayout/otcommn.c: Use OTL_CHECK everywhere. (otl_coverage_validate): Initialize `p', s/count/num_glyphs/. s/start_cover/start_coverage/. (otl_coverage_get_index): Return OTL_Long, not OTL_Int. Remove unused variables. (otl_class_definition_validate): s/count/num_glyphs/. Remove unused variables. (otl_class_definition_get_value, otl_device_table_get_start, otl_device_table_get_end, otl_device_table_get_delta, otl_lookup_get_table, otl_lookup_list_get_count, otl_lookup_list_get_lookup, otl_lookup_list_get_table, otl_feature_get_lookups, otl_feature_list_get_count, otl_feature_list_get_feature, otl_lang_get_count, otl_lang_get_req_feature, otl_lang_get_features): Commented out temporarily until we really need it. (otl_lookup_validate): Removed. (otl_lookup_table_validate): Renamed to ... (otl_lookup_validate): This. Update callers. (otl_lookup_list_validate): Remove already commented out definition and move the other definition up. (otl_feature_validate): Add parameter to pass number of lookups. Update callers. Check lookup indices. (otl_feature_list_validate): Add parameter to pass lookup table. Update callers. (otl_lang_validate): Add parameter to pass number of features. Update callers. Handle req_feature and check feature indices. (otl_script_validate): Add parameter to pass number of features. Update callers. (otl_script_list_validate): Add parameter to pass feature table. Update callers. * src/otlayout/otcommn.h: s/LOCALDEF/LOCAL/. Comment out the same functions as in otcommn.c. (otl_script_list_get_script): Removed. * src/otlayout/otlgsub.c (otl_gsub_lookup1_apply): Change `index' to type OTL_Long. (otl_gsub_lookup2_apply, otl_gsub_lookup3_apply): Change `index' to type OTL_Long. Fix test. (otl_gsub_validate): Fix order of validation. * src/otlayout/otlgpos.c (otl_gpos_validate): Fix order of validation. 2004-08-12 Werner Lemberg <wl@gnu.org> Make otlayout module compile (without actually working). * src/otlayout/*: s/OTL_Valid/OTL_Validator/. s/NULL/0/. * src/otlayout/otlayout.h: Fix various typos. (OTL_Bool): New typedef. (OTL_Int, OTL_Long, OTL_Int16, OTL_Int32): Use `signed' keyword. (OTL_Err_InvalidArgument): Removed. (OTL_Err_InvalidData, OTL_Err_InvalidSize): New enum values. (OTL_MAKE_TAG): Add missing parenthesis. (OTL_INVALID_DATA): Use OTL_Err_InvalidData. (OTL_INVALID_TOO_SHORT): Use OTL_Err_InvalidSize. (OTL_INVALID_FORMAT, OTL_INVALID_OFFSET): New macros. * src/otlayout/otlgpos.c: s/FT_/OTL_/. s/OTL_Short/OTL_Int16/. (otl_gpos_pairset_validate): Add return type. (otl_base_array_validate): Fix call to otl_anchor_validate. (otl_liga_array_validate): Fix call to otl_liga_attach_validate. (otl_gpos_lookup5_validate): Fix typos. (otl_gpos_lookup6_validate): Fix call to otl_mark2_array_validate. (otl_gpos_lookup7_validate): Comment out unfinished code. Fix typos. * src/otlayout/otlgsub.c: Add forward declaration for otl_gsub_validate_funcs. (otl_gsub_lookup1_apply, otl_gsub_lookup2_apply, otl_gsub_lookup3_apply): Fix call to otl_parser_check_property. s/otl_coverage_lookup/otl_coverage_get_index/. (otl_ligature_validate): Add missing variable declaration. (otl_sub_rule_validate): Fix typo. (otl_sub_class_rule_validate): Add missing variable declaration. Fix typo. (otl_gsub_lookup5_validate): Fix typo. (otl_gsub_lookup6_validate): Fix call to otl_chain_sub_class_set_validate. (otl_gsub_validate_funcs): Don't use `const'. * src/otlayout/otlcommn.c (otl_class_definition_get_value, otl_device_table_validate, otl_device_table_get_delta, otl_lookup_validate, otl_script_validate): Add missing variable declarations. (otl_lookup_list_validate): Comment out first definition. (otl_lookup_list_foreach, otl_feature_list_foreach): Comment out. (otl_feature_list_validate): s/otl_feature_table_validate/otl_feature_validate/. (otl_script_list_validate): s/otl_script_table_validate/otl_script_validate/. * src/otlayout/otlcommn.h: Comment out first declaration. (otl_lookup_list_foreach, otl_feature_list_foreach): Comment out. * src/otlayout/otlbase.c (otl_base_coord_validate): Fix call to otl_device_table_validate. (otl_base_script_validate): Add missing variable declarations. (otl_base_script_list_validate): Fix call to otl_base_script_validate. (otl_axis_table_validate): Fix calls to otl_base_tag_list_validate and otl_base_script_list_validate. (otl_base_validate): Fix calls to otl_axis_table_validate. * src/otlayout/otlgdef.c (otl_attach_list_validate): Fix call to otl_attach_point_validate. (otl_caret_value_validate): Add missing variable declaration. Fix call to otl_device_table_validate. (otl_ligature_glyph_validate): Fix call to otl_caret_value_validate. (otl_ligature_caret_list_validate): Fix call to otl_ligature_glyph_validate. (otl_gdef_validate): Fix calls to otl_class_definition_validate, otl_attach_list_validate, otl_ligature_caret_list_validate, and otl_class_definition_validate. * src/otlayout/otltable.h (otl_table_validate, otl_table_init, otl_table_set_script): Comment out. * src/otlayout/otlparse.h (OTL_ParserRec): s/OTL_Alternate/OTL_GSUB_Alternate/. (OTL_ParseError): Add OTL_Err_Parser_Memory and OTL_Err_Parser_Internal. (otl_parser_error): Fix typo. (otl_parser_check_property): Remove third argument. * src/otlayout/otlparse.c (otl_string_ensure): s/OTL_Parse_Err_Memory/OTL_Err_Parser_Memory/. (OTL_STRING_ENSURE, otl_parser_error, otl_parser_get_index, otl_parser_replace_1, otl_parser_replace_n): Fix typos. (OTL_PARSER_UNCOVERED): Removed. (otl_parser_check_property): Remove third argument. * src/otlayout/otljstf.c (otl_jstf_priority_validate): Add missing variable declaration. * src/otlayout/otlutils.h (OTL_MEM_REALLOC): Fix typo. 2004-08-11 Danny <dannyboynow@yahoo.com> * src/base/ftstream.c (FT_Stream_Close): Don't reset stream->close to NULL. This allows custom close functions to delete the FT_STREAM object. 2004-08-11 Werner Lemberg <wl@gnu.org> Add API to get information about SFNT tables. * include/freetype/internal/services/svsfnt.h (FT_SFNT_Table_Info_Func): New typedef. (SFNT_Table): Add it. * src/base/ftobjs (FT_Sfnt_Table_Info): New function. * include/freetype/tttables.h: Updated. * src/sfnt/sfdriver.c (sfnt_table_info): New function. (sfnt_service_sfnt_table): Add it. * docs/CHANGES: Updated. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 10. * builds/unix/configure.ac (version_info): Set to 9:8:3. * builds/unix/configure: Updated. * builds/win32/visualc/index.html, builds/win32/visualc/freetype.dsp, builds/win32/visualc/freetype.vcproj: s/219/2110/, s/2.1.9/2.1.10/. * builds/freetype.mk (refdoc), README, Jamfile (RefDoc): s/2.1.9/2.1.10/. * docs/CHANGES, docs/VERSION.DLL: Updated. 2004-08-11 Detlef Würkner <TetiSoft@apg.lahn.de> * src/base/ftrfork.c (FT_Raccess_Guess) [!FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK]: Remove compiler warnings. 2004-08-06 Adam Piotrowski <st_intel@poczta.onet.pl> * src/pfr/pfrload.c (pfr_sort_kerning_pairs): Single-byte adjustments are unsigned, not signed. 2004-08-05 David Turner <david@freetype.org> `Activate' gray-scale specifying hinting within the TrueType bytecode interpreter. This is an experimental feature which should probably be made optional. * src/truetype/ttgload.c (TT_Process_Simple_Glyph, load_truetype_glyph): Move the code to set the pedantic_hinting flag to... (TT_Load_Glyph): Here. Set `grayscale' flag except for `FT_LOAD_TARGET_MONO'. * src/truetype/ttinterp.c (Ins_GETINFO): Return MS rasterizer version 1.7. Return rotation and stretching info only if glyph is rotated or stretched, respectively. Handle grayscale info. * src/truetype/ttinterp.h (TT_ExecContextRec): Add `grayscale' member. 2004-08-02 George Williams <gww@silcom.com> * src/base/ftobjs.c (FT_Attach_File): Initialize `open.stream'. 2004-08-01 Werner Lemberg <wl@gnu.org> * docs/CHANGES: Updated. 2004-08-01 George Williams <gww@silcom.com> FreeType now can read kerning values from PFM files. * src/type1/t1afm.c (T1_Done_AFM): Renamed to... (T1_Done_Metrics): This. Update all callers. (T1_Read_AFM): Make it static. Don't enter and leave a frame. (LITTLE_ENDIAN_USHORT, LITTLE_ENDIAN_UINT): New macros. (T1_Read_PFM): New function. (T1_Read_Metrics): New higher-level function to be used instead of T1_Read_AFM. Update all callers. 2004-07-31 Werner Lemberg <wl@gnu.org> * src/pcf/pcfread (pcf_load_font), src/bdf/bdfdrivr.c (BDF_Face_Init), src/truetype/ttgxvar (TT_Get_MM_Var, tt_face_vary_cvt): Fix compiler warnings. 2004-07-26 Søren Sandmann <sandmann@daimi.au.dk> * src/pcf/pcfread.c (pcf_interpret_style): Always allocate memory for face->style_name. * src/pcf/pcfdrivr.c (PCF_Face_Done): Free `style_name'. 2004-07-26 Darren J Longhorn <darren.longhorn@redcom.co.uk> * include/freetype/config/ftconfig.h (FT_SIZEOF_LONG): Recognize five-byte `long' (which is avoided then). 2004-07-25 Detlef Würkner <TetiSoft@apg.lahn.de> * src/pcf/pcfdrivr.c (PCF_Set_Pixel_Size): Compare heights, not ppem values. (PCF_Set_Point_Size): Don't call PCF_Set_Pixel_Size but provide own code to compare ppem values. * src/bdf/bdfdrivr.c (BDF_Set_Pixel_Size): Compare heights, not ppem values. (BDF_Set_Point_Size): Don't call BDF_Set_Pixel_Size but provide own code to compare ppem values. 2004-07-25 Kornfeld Eliyahu Peter <peter@e-kadmon.net> * src/sfnt/sfobjs.c (sfnt_load_face): Handle TT_NAME_ID_PREFERRED_FAMILY and TT_NAME_ID_PREFERRED_SUBFAMILY. 2004-07-24 Derek B. Noonburg <derekn@foolabs.com> * src/cff/cffload.c (cff_font_load): Always create inverse mapping. Even if the charstring count is the same as the CID count, it is still possible that the font uses a different CID -> GID mapping. 2004-07-23 Werner Lemberg <wl@gnu.org> * src/truetype/ttobjs.c (tt_face_init): Accept 0x00020000 format tag found in some Arphic fonts made for Chinese version of Windows 3.1. 2004-07-17 David Turner <david@freetype.org> Fixed a dangling pointer bug in the cache code that happened in very rare cases, i.e., when a new family object was destroyed by an out-of-memory condition during a glyph node initialization. The function FTC_Cache_Lookup would flush the cache and restart the lookup with a bad pointer. * include/freetype/cache/ftcglyph.h (FTC_FAMILY_TREE): New macro. (FTC_GCACHE_LOOKUP_CMP): Use it. Handle reference count in `num_nodes' correctly. * src/cache/ftcglyph.c (FTC_GNode_UnselectFamily): Use FTC_FAMILY_FREE. (FTC_GCache_Lookup): Handle reference count in `num_nodes' correctly. * src/cache/ftcmanag.c (FTC_Manager_FlushN): Fixed a cache flushing bug. * src/truetype/ttinterp.c (Normalize): Fixed a bug that caused long and unnecessary delays while normalizing huge vectors. 2004-07-15 Werner Lemberg <wl@gnu.org> * docs/CHANGES: Updated. * src/base/ftstroke.c (FT_Stroker_ParseOutline): Fix compiler warning. 2004-07-15 David Turner <david@freetype.org> * src/base/ftstroke.c (FT_Stroker_ParseOutline): Single points are not stroked, preventing a bug with pala.ttf and other fonts. * include/freetype/ftstroke.h: Updating documentation comments. 2004-07-13 Werner Lemberg <wl@gnu.org> * src/base/ftstroke.c (ft_stroke_border_reverse): Removed. Unused. 2004-07-12 David Turner <david@freetype.org> * src/base/ftstroke.c (ft_stroke_border_close): Add second parameter to indicate reversion of points. Update all callers. (ft_stroke_border_reverse): Fix initialization of `point1' and `tag1'. * src/cache/ftcsbits.c (ftc_snode_load): Fixing advance computation for transformed glyphs. 2004-07-11 David Turner <david@freetype.org> Fix bugs that prevented the stroker to correctly generate stroked paths from closed paths, i.e., nearly all glyphs in vectorial fonts. The code is still _very_ buggy though; treat with special care. * src/base/ftstroke.c (FT_STROKE_TAG_BEGIN_END): New macro. (ft_stroke_border_reverse): New function. (ft_stroker_inside): Remove local variable `sigma'; use different threshold. (ft_stroker_add_reverse_left): Switch begin/end tags if necessary. (FT_Stroker_EndSubPath): Call ft_stroker_inside and ft_stroke_border_reverse. 2004-06-26 Peter Kovar <peter.kovar@r3.roburnet.sk> * src/truetype/ttgload.c (load_truetype_glyph): Fix typo. 2004-06-25 Werner Lemberg <wl@gnu.org> * src/type1/t1afm.c (afm_atoindex): Fix boundary test. Reported by Dirck Blaskey. 2004-06-24 David Turner <david@freetype.org> * Version 2.1.9 released. ========================= * src/truetype/ttgload.c, src/truetype/ttxgvar.c: Removing compiler warnings. 2004-06-23 Werner Lemberg <wl@gnu.org> * include/freetype/internal/ftmemory.h [FT_DEBUG_MEMORY]: Declare FT_QAlloc_Debug and FT_QRealloc_Debug. * src/base/ftutil.c (FT_QAlloc): Fix error and debug messages. (FT_QRealloc): Call FT_QAlloc if original pointer is NULL. Fix error message. 2004-06-23 David Turner <david@freetype.org> * include/freetype/internal/ftmemory.h, src/base/ftutil.c (FT_QAlloc, FT_QRealloc), src/base/ftdbgmem.c (FT_QAlloc_Debug, FT_QRealloc_Debug): New functions that perform allocation without zero-ing out the corresponding blocks. * include/freetype/internal/ftmemory.h (FT_MEM_QALLOC, FT_MEM_QREALLOC, FT_MEM_QNEW, FT_MEM_QNEW_ARRAY, FT_MEM_QRENEW_ARRAY, FT_QALLOC, FT_QREALLOC, FT_QNEW, FT_QNEW_ARRAY, FT_QRENEW_ARRAY): New macros. * src/base/ftstream.c (FT_Stream_EnterFrame): Use FT_QALLOC. * src/gzip/ftgzip.c (FT_Stream_OpenGzip): Use FT_QNEW_ARRAY. * src/sfnt/sfobjs.c (tt_face_get_name): Use FT_QNEW_ARRAY. * src/sfnt/ttload.c (tt_face_load_directory, tt_face_load_metrics, tt_face_load_gasp): Use FT_QNEW_ARRAY. (tt_face_load_kern): Use FT_QNEW_ARRAY. Small optimization in the kerning table verifier; this speeds up TrueType face opening by about 7%. (tt_face_load_hdmx): Use FT_QNEW_ARRAY and FT_QALLOC. * include/freetype/config/ftmodule.h: Changed the order of modules, putting TrueType and Type 1 first. This dramatically improves the performance of face open/close operations. For example, putting the TrueType driver first in the list results in a 5x speedup when opening `Vera.ttf'. The very problem is that both the PCF and BDF drivers do a lot more than necessary to detect that they cannot handle a font file. 2004-06-22 Werner Lemberg <wl@gnu.org> * src/pcf/pcfread.c (pcf_read_TOC, pcf_get_properties, pcf_get_metrics, pcf_get_bitmaps, pcf_get_encodings): Improve debugging messages. * src/pcf/pcfdrivr.c (FT_COMPONENT): Move up. (PCF_Face_Init): Simplify code. * src/bdf/bdfdrivr.h (BDF_FaceRec): New element `default_glyph'. * src/bdf/bdflib.c (_bdf_add_property, _bdf_parse_start), src/bdf/bdf.h (bdf_font_t): s/default_glyph/default_char/. * src/bdf/bdfdrivr.c (BDF_Face_Init): Fix number of glyphs. Set `default_glyph'. (BDF_Glyph_Load): Use `default_glyph' for undefined glyph. * docs/CHANGES: Updated. 2004-06-21 Werner Lemberg <wl@gnu.org> * docs/CHANGES: Updated. 2004-06-21 David Turner <david@freetype.org> * src/truetype/ttgload.c (TT_Process_Simple_Glyph, load_truetype_glyph): Don't access (unrounded) `TT_Size.root.metrics' but (rounded) `TT_Size.metrics'. This fixes a scaling bug that caused incorrect rendering when the bytecode interpreter was enabled. 2004-06-14 Huw D M Davies <h.davies1@physics.ox.ac.uk> * src/winfonts/winfnt.c (FNT_Face_Init): Set x_ppem and y_ppem based on pixel_width and pixel_height. (FNT_Size_Set_Pixels): Updated. 2004-06-14 Werner Lemberg <wl@gnu.org> * src/lzw/zopen.c: Comment out inclusion of signal.h and unistd.h. Reported by Hyvärinen Jyrki Juhani. 2004-06-11 Werner Lemberg <wl@gnu.org> * docs/CHANGES: Updated. 2004-06-10 David Turner <david@freetype.org> * src/base/ftobject.c, src/base/fthash.c, src/base/ftexcept.c, src/base/ftsysio.c, src/base/ftsysmem.c, src/base/ftlist.c: Removed. Obsolete. * src/raster/ftraster.c (Alignment, PAlignment): New union to fix problems with 64bit systems. (AlignProfileSize): Use it. 2004-06-08 David Turner <david@freetype.org> * include/freetype/freetype.h (FT_Glyph_Metrics): Move `lsb_delta' and `rsb_delta' elements to... (FT_GlyphSlotRec): Here to retain binary compatibility with older FreeType versions. Update all users. * src/sfnt/sfobjs.c (tt_face_get_name): Remove compiler warning. * src/winfonts/winfnt.c (FNT_Load_Glyph): Add missing initialization of slot->metrics.width and slot->metrics.height when loading a Windows FNT glyph. Thanks to Huw Davies. * include/freetype/cache/ftcmru.h (FTC_MruNode_CompareFunc): Change return type to FT_Bool. * src/cache/ftcbasic.c (ftc_basic_family_compare): Change return type to FT_Bool. * src/cache/ftccache.c (FTC_Cache_Init, ftc_cache_init): Make the former call the latter, not vice versa. (FTC_Cache_Done, ftc_cache_done): Ditto. * src/cache/ftcglyph.c (FTC_GNode_Compare, ftc_gnode_compare): Make the former call the latter, not vice versa. (FTC_GCache_Init, ftc_gcache_init): Ditto. (FTC_GCache_Done, ftc_gcache_done): Ditto. * src/cache/ftcimage.c (FTC_INode_Free, ftc_inode_free): Make the former call the latter, not vice versa. (FTC_INode_Weight, ftc_inode_weight): Ditto. * src/cache/ftcmanag.c (ftc_size_node_compare, ftc_size_node_compare_faceid, ftc_face_node_compare): Change return type to FT_Bool. * src/cache/ftcsbits.c (FTC_SNode_Free, ftc_snode_free): Make the former call the latter, not vice versa. (FTC_SNode_Weight, ftc_snode_weight): Ditto. (FTC_SNode_Compare, ftc_snode_compare): Ditto. * src/cache/ftcsbits.c: Fix some bugs and inefficiencies in the cache sub-system. 2004-06-05 Werner Lemberg <wl@gnu.org> * src/autofit/afloader.c (af_loader_load_g): Set `lsb_delta' and `rsb_delta' in slot->metrics and tune side bearings slightly. 2004-06-04 Werner Lemberg <wl@gnu.org> * docs/CHANGES: Updated. 2004-06-04 David Chester <davidchester@qmx.net> Improve inter-letter spacing for autohinted glyphs. * include/freetype/freetype.h (FT_Glyph_Metrics): Add elements `lsb_delta' and `rsb_delta'. * src/autohint/ahhint.c (ah_hinter_load): Set `lsb_delta' and `rsb_delta' in slot->metrics and tune side bearings slightly. 2004-06-04 David Turner <david@freetype.org> * src/autofit/*: Important fixes to the auto-fitter. The output now seems to be 100% equivalent to the auto-hinter, while being about 2% faster (which proves that script-specific algorithm selection isn't a performance problem). To test it, change `autohint' to `autofit' in <freetype/config/ftmodule.h> and recompile. A few more testing is needed before making this the official auto-hinting module. 2004-06-02 Werner Lemberg <wl@gnu.org> * src/truetype/ttgload.c (compute_glyph_metrics): Fix compiler warnings. 2004-06-01 Werner Lemberg <wl@gnu.org> * src/sfnt/sfobjs.c (tt_face_get_name): Make sure that an English name record for the Apple platform is preferred to a non-English entry for the Microsoft platform. Problem reported by HANDA Ken'ichi. 2004-05-19 George Williams <gww@silcom.com> * src/type1/t1load.c (mm_axis_unmap, mm_weights_unmap): New auxiliary functions. (T1_Get_MM_Var): Provide axis tags. Use mm_axis_unmap and mm_weights_unmap to provide default values for design and normalized axis coordinates. * include/freetype/t1tables.h (PS_DesignMapRec): Change type of `design_points' to FT_Long. Update all users. 2004-05-17 Werner Lemberg <wl@gnu.org> * src/base/ftbbox.c (BBox_Conic_Check): Fix boundary cases. Reported by Mikey Anbary <manbary@vizrt.com>. 2004-05-15 Werner Lemberg <wl@gnu.org> * src/sfnt/sfobjs.c (sfnt_done_face): Free face->postscript_name. 2004-05-15 George Williams <gww@silcom.com> * src/sfnt/ttload.c (tt_face_load_max_profile): Always set face->root.num_glyphs. 2004-05-14 Masatake YAMATO <jet@gyve.org> George Williams <gww@silcom.com> * src/sfnt/ttload.c (sfnt_dir_check): Handle `bhed' properly. 2004-05-14 Werner Lemberg <wl@gnu.org> * src/cache/ftcbasic.c (ftc_basic_family_compare, ftc_basic_family_init, ftc_basic_family_get_count, ftc_basic_family_load_bitmap, ftc_basic_family_load_glyph, ftc_basic_gnode_compare_faceid): Adjust parameters and return types to prototypes given in header files from include/freetype/cache. Use casts to proper types locally. (ftc_basic_image_family_class, ftc_basic_image_cache_class, ftc_basic_sbit_family_class, ftc_basic_sbit_cache_class): Remove casts. * src/cache/ftccback.h: Adjust parameters and return types to prototypes given in header files from include/freetype/cache. * src/cache/ftcimage.c (ftc_inode_free, ftc_inode_new, ftc_inode_weight): Adjust parameters and return types to prototypes given in header files from include/freetype/cache. Use casts to proper types locally. * src/cache/ftcsbits.c (ftc_snode_free, ftc_snode_new, ftc_snode_weight, ftc_snode_compare): Adjust parameters and return types to prototypes given in header files from include/freetype/cache. Use casts to proper types locally. * src/cache/ftccmap.c (ftc_cmap_node_free, ftc_cmap_node_new, ftc_cmap_node_weight, ftc_cmap_node_compare, ftc_cmap_node_remove_faceid): Adjust parameters and return types to prototypes given in header files from include/freetype/cache. Use casts to proper types locally. (ftc_cmap_cache_class): Remove casts. * src/cache/ftcglyph.c (ftc_gnode_compare, ftc_gcache_init, ftc_gcache_done): Adjust parameters and return types to prototypes given in header files from include/freetype/cache. Use casts to proper types locally. * src/cache/ftcmanag.c (ftc_size_node_done, ftc_size_node_compare, ftc_size_node_init, ftc_size_node_reset, ftc_size_node_compare_faceid, ftc_face_node_init, ftc_face_node_done, ftc_face_node_compare: Adjust parameters and return types to prototypes given in header files from include/freetype/cache. Use casts to proper types locally. (ftc_size_list_class, ftc_face_list_class): Remove casts. 2004-05-13 Werner Lemberg <wl@gnu.org> * src/autohint/ahmodule.c (ft_autohinter_init, ft_autohinter_done): Use FT_Module as parameter and do a cast to FT_AutoHinter locally. (autohint_module_class): Remove casts. * src/base/ftglyph.c (ft_bitmap_glyph_init, ft_bitmap_glyph_copy, ft_bitmap_glyph_done, ft_bitmap_glyph_bbox, ft_outline_glyph_init, ft_outline_glyph_done, ft_outline_glyph_copy, ft_outline_glyph_transform, ft_outline_glyph_bbox, ft_outline_glyph_prepare): Use FT_Glyph as parameter and do a cast to FT_XXXGlyph locally. Use FT_CALLBACK_DEF throughout. (ft_bitmap_glyph_class, ft_outline_glyph_class): Remove casts. * src/bdf/bdfdrivr.c (bdf_cmap_init, bdf_cmap_done, bdf_cmap_char_index, bdf_cmap_char_next): Use FT_CMap as parameter and do a cast to BDF_CMap locally. (bdf_cmap_class): Remove casts. 2004-05-12 Werner Lemberg <wl@gnu.org> * src/cff/cffgload.h (CFF_Builder): Remove `error'. * src/cff/cffgload.c (cff_decoder_parse_charstrings): Replace `Memory_Error' with `Fail' and update all users. 2004-05-11 Werner Lemberg <wl@gnu.org> * include/freetype/internal/psaux.h (T1_ParseState): New enumeration. (T1_BuilderRec): Replace `path_begun' with `parse_state'. Remove `error'. * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Replace `Memory_Error' with `Fail' and update all users. Don't use `builder->error'. Replace `path_begun' with `parse_state' and check parsing states. * src/psaux/psobjs.c (t1_builder_init, t1_builder_start_point): Replace `path_begun' with `parse_state' and check parsing states. 2004-05-10 George Williams <gww@silcom.com> * src/truetype/ttxgvar.c (ft_var_load_avar): Do free arrays in case of error -- `avar' is optional so we can't rely on tt_done_blend being called automatically. 2004-05-09 George Williams <gww@silcom.com> * src/truetype/ttxgvar.c (ft_var_load_avar, ft_var_load_gvar): Fix error handling. 2004-05-07 Werner Lemberg <wl@gnu.org> * src/pfr/pfrobjs.c, src/pfr/pfrobjs.h (pfr_face_init, pfr_face_done, pfr_face_get_kerning, pfr_slot_init, pfr_slot_done, pfr_slot_load): Don't use PFR_XXX but FT_XXX arguments which are typecast to the proper PFR_XXX types within the function. Update code accordingly. * src/pfr/pfrdrivr.c (pfr_get_kerning, pfr_get_advance, pfr_get_metrics, pfr_get_service): Don't use PFR_XXX but FT_XXX arguments which are typecast to the proper PFR_XXX types within the function. Update code accordingly. Use FT_CALLBACK_DEF throughout. (pfr_metrics_service_rec, pfr_driver_class): Remove casts. 2004-05-06 Masatake YAMATO <jet@gyve.org> * src/truetype/ttgxvar.c (ft_var_load_gvar): Use FT_FACE_STREAM. (*): Rename local variable OffsetToData to offsetToData. 2004-05-06 Werner Lemberg <wl@gnu.org> * src/cff/cffobjs.c (cff_size_done, cff_size_init, cff_size_reset, cff_slot_done, cff_slot_init, cff_face_init, cff_face_done): Access root fields directly. * src/cff/cffdrivr.c (Load_Glyph): Access root fields directly. * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Save current frame before calling TT_Vary_Get_Glyph_Deltas. * src/pcf/pcfdrivr.c (PCF_CMapRec): Rename `cmap' to `root' for consistency. (pcf_cmap_init, pcf_cmap_done, pcf_cmap_char_index, pcf_cmap_char_next): Don't use PCF_XXX but FT_XXX arguments which are typecast to the proper PCF_XXX types within the function. Update code accordingly. (pcf_cmap_class): Remove casts. (PCF_Face_Done, PCF_Face_Init, PCF_Set_Pixel_Size): Don't use PCF_XXX but FT_XXX arguments which are typecast to the proper PCF_XXX types within the function. Update code accordingly. Use FT_CALLBACK_DEF throughout. (PCF_Set_Point_Size): New wrapper function. (PCF_Glyph_Load, pcf_driver_requester): Use FT_CALLBACK_DEF. (pcf_driver_class): Remove casts. 2004-05-04 Steve Hartwell <shspamsink@comcast.net> * src/truetype/ttobjs.c (tt_driver_done): Fix typo. 2004-05-04 Werner Lemberg <wl@gnu.org> * src/bdf/bdfdrivr.c (BDF_Face_Done, BDF_Face_Init, BDF_Set_Pixel_Size): Don't use BDF_XXX but FT_XXX arguments which are typecast to the proper BDF_XXX types within the function. Update code accordingly. Use FT_CALLBACK_DEF throughout. (BDF_Set_Point_Size): New wrapper function. (bdf_driver_class): Remove casts. * src/cff/cffdrivr.c (Get_Kerning, Load_Glyph, cff_get_interface): Don't use CFF_XXX but FT_XXX arguments which are typecast to the proper CFF_XXX types within the function. Update code accordingly. Use FT_CALLBACK_DEF throughout. (cff_driver_class): Remove casts. * src/cff/cffobjs.h, src/cff/cffobjs.c (cff_size_done, cff_size_init, cff_size_reset, cff_slot_done, cff_slot_init, cff_face_init, cff_face_done, cff_driver_init, cff_driver_done): Don't use CFF_XXX but FT_XXX arguments which are typecast to the proper CFF_XXX types within the function. Update code accordingly. (cff_point_size_reset): New wrapper function. * src/cid/cidobjs.h, src/cid/cidobjs.c (cid_slot_done, cid_slot_init, cid_size_done, cid_size_init, cid_size_reset, cid_face_done, cid_face_init, cid_driver_init, cid_driver_done): Don't use CID_XXX but FT_XXX arguments which are typecast to the proper CID_XXX types within the function. Update code accordingly. (cid_point_size_reset): New wrapper function. * src/cid/cidgload.c, src/cid/cidgload.h (cid_slot_load_glyph): Don't use CID_XXX but FT_XXX arguments which are typecast to the proper CID_XXX types within the function. Update code accordingly. * src/cid/cidriver.c (cid_get_interface): Don't use CID_XXX but FT_XXX arguments which are typecast to the proper CID_XXX types within the function. Update code accordingly. Use FT_CALLBACK_DEF. (t1cid_driver_class): Remove casts. * src/truetype/ttdriver.c (tt_get_interface): Use FT_CALLBACK_DEF. * src/truetype/ttgxvar.c (ft_var_load_avar): Don't free non-local variables (this is done later). (ft_var_load_avar): Fix call to FT_FRAME_ENTER. (TT_Get_MM_Var): Fix size for `fvar_fields'. (TT_Vary_Get_Glyph_Deltas): Handle deallocation of local variables correctly. * src/base/ftdbgmem.c (ft_mem_debug_realloc): Don't abort if current size is zero. 2004-05-03 Steve Hartwell <shspamsink@comcast.net> * src/truetype/ttobjs.h, src/truetype/ttobjs.c (tt_face_init, tt_face_done, tt_size_init, tt_size_done, tt_driver_init, tt_driver_done): Don't use TT_XXX but FT_XXX arguments which are typecast to the proper TT_XXX types within the function. Update code accordingly. * src/truetype/ttdriver.c (Get_Kerning, Set_Char_Sizes, Set_Pixel_Sizes, Load_Glyph, tt_get_interface): Don't use TT_XXX but FT_XXX arguments which are typecast to the proper TT_XXX types within the function. Update code accordingly. (tt_driver_class): Remove casts. 2004-05-02 Werner Lemberg <wl@gnu.org> * src/sfnt/ttload.c (tt_face_free_names): Check that `table->names' is not NULL. Reported by Gordon Childs <gchilds@quickcut.com.au>. 2004-04-29 Werner Lemberg <wl@gnu.org> * docs/formats.txt: Add more information on PFR format. 2004-04-28 Werner Lemberg <wl@gnu.org> * docs/formats.txt: New file. * docs/CHANGES: Updated. 2004-04-28 Masatake YAMATO <jet@gyve.org> * include/freetype/internal/tttypes.h (GX_BlendRec_) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Fix a typo. * src/truetype/ttgxvar.h (GX_BlendRec_): Fix a typo. 2004-04-27 Masatake YAMATO <jet@gyve.org> * src/truetype/ttgxvar.h: Use FT_LOCAL instead of FT_LOCAL_DEF for function declarations. 2004-04-25 George Williams <gww@silcom.com> * src/truetype/ttgxvar.c (ft_var_apply_tuple): Fix typo. 2004-04-25 Werner Lemberg <wl@gnu.org> * src/truetype/Jamfile, docs/CHANGES: Updated. 2004-04-24 Werner Lemberg <wl@gnu.org> * src/pcf/pcfdrivr.c: Revert change from 2004-04-17. * src/pcf/pcfutil.c: Use FT_LOCAL_DEF. * src/pcf/pcfutil.h: Include FT_CONFIG_CONFIG_H. Use FT_BEGIN_HEADER and FT_END_HEADER. Use FT_LOCAL. 2004-04-24 George Williams <gww@silcom.com> Add support for Apple's distortable font technology (in GX fonts). * devel/ftoption.h, include/freetype/config/ftoption.h (TT_CONFIG_OPTION_GX_VAR_SUPPORT): New macro. * include/freetype/ftmm.h (FT_Var_Axis, FT_Var_Named_Style, FT_MM_Var): New structures. (FT_Get_MM_Var, FT_Set_Var_Design_Coordinates, FT_Set_Var_Blend_Coordinates): New function declarations. * include/freetype/internal/services/svmm.h (FT_Get_MM_Var_Func, FT_Set_Var_Design_Func): New typedefs. Update MultiMasters service. * include/freetype/internal/tttypes.h [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include FT_MULTIPLE_MASTERS_H. (GX_Blend) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: New typedef. (TT_Face) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: New members `doblend' and `blend'. * include/freetype/tttags.h (TTAG_avar, TTAG_cvar, TTAG_gvar): New macros. * include/freetype/internal/fttrace.h: Add `ttgxvar'. * src/base/ftmm.c (FT_Get_MM_Var, FT_Set_Var_Design_Coordinates, FT_Set_Var_Blend_Coordinates): New functions. * src/sfnt/sfobjs.c (sfnt_load_face) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Set FT_FACE_FLAG_MULTIPLE_MASTERS flag for GX var fonts. * src/truetype/ttgxvar.c, src/truetype/ttgxvar.h: New files. * src/truetype/truetype.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include ttgxvar.c. * src/truetype/ttdriver.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include FT_MULTIPLE_MASTERS_H, FT_SERVICE_MULTIPLE_MASTERS_H, and ttgxvar.h. (tt_service_gx_multi_masters) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: New service. (tt_services) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Updated. * src/truetype/ttgload.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include ttgxvar.h. (TT_Process_Simple_Glyph, load_truetype_glyph) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Support GX var fonts. * src/truetype/ttobjs.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include ttgxvar.h. (tt_done_face) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Call tt_done_blend. * src/truetype/ttpload.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include ttgxvar.h. (tt_face_load_cvt) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Call tt_face_vary_cvt. * src/truetype/rules.mk (TT_DRV_SRC): Add ttgxvar.c. * src/type1/t1driver.c (t1_service_multi_masters): Add T1_Get_MM_Var and T1_Set_Var_Design. * src/type1/t1load.c (FT_INT_TO_FIXED, FT_FIXED_TO_INT): New macros. (T1_Get_MM_Var, T1_Set_Var_Design): New functions. * src/type1/t1load.h (T1_Get_MM_Var, T1_Set_Var_Design): New function declarations. 2004-04-23 Werner Lemberg <wl@gnu.org> * include/freetype/ftcache.h (FT_Get_CharMap_Index): Rename declaration and move to... * include/freetype/freetype.h (FT_Get_Charmap_Index): Here. (FREETYPE_PATCH): Set to 9. * src/base/ftobjs.c (FT_Get_Charmap_Index): New function. * builds/unix/configure.ac (version_info): Set to 9:7:3. * builds/unix/configure: Updated. * builds/win32/visualc/index.html, builds/win32/visualc/freetype.dsp, builds/win32/visualc/freetype.vcproj: s/218/219/. * builds/freetype.mk (refdoc), README, Jamfile (RefDoc): s/2.1.8/2.1.9/. * docs/CHANGES, docs/VERSION.DLL: Updated. 2004-04-21 Werner Lemberg <wl@gnu.org> * src/cff/cffparse.c (cff_parser_run), src/psaux/psobjs.c (ps_parser_load_field): Use FT_CHAR_BIT. 2004-04-21 David Turner <david@freetype.org> * Version 2.1.8 released. ========================= * src/cff/cffobjs.c (cff_face_init): Fix a small memory leak. * src/autofit/afloader.c (af_loader_load_g), src/autofit/afmodule.c (af_autofitter_load_glyph), src/base/ftdebug.c (FT_Trace_Get_Name): Remove compiler warnings. * src/autofit/aftypes.h: Undefine AF_DEBUG. * src/lzw/zopen.c (rmask), src/pcf/pcfdrivr.c (pcf_service_bdf, pcf_services), src/pcf/pcfread.c (tableNames), src/psaux/psobjs.c (ft_char_table), src/type42/t42drivr.c (t42_service_glyph_dict, t42_service_ps_font_name): Decorate data arrays with `const' to avoid populating the `.data' segment. * src/lzw/Jamfile: New file. 2004-04-20 Werner Lemberg <wl@gnu.org> * src/psaux/psobjs.c (T1Radix): Renamed to... (ps_radix): This. Update current cursor position. * docs/CHANGES: Updated. 2004-04-18 Werner Lemberg <wl@gnu.org> * src/truetype/ttgload.c, src/truetype/ttgload.h (TT_Load_Glyph), src/ttdriver.c (Load_Glyph): Change type of `glyph_index' to FT_UInt. From Lex Warners. 2004-04-17 Chisato Yamauchi <cyamauch@a.phys.nagoya-u.ac.jp> * src/sfnt/ttload.c (tt_face_load_sfnt_header): Really fix change from 2004-03-19. * src/bdf/bdfdrivr.c (BDF_Face_Init): Use `ft_strlen'. * src/pcf/pcfutil.c, src/pcf/pcfutil.h: Decorate functions with `static'. Remove unused function `RepadBitmap'. * src/pcf/pcfdrivr.c: Don't include pcfutil.h. 2004-04-16 Werner Lemberg <wl@gnu.org> * builds/unix/freetype-config.in (usage): Fix and improve usage information. 2004-04-15 Werner Lemberg <wl@gnu.org> * builds/unix/ftconfig.in, builds/vms/ftconfig.h: Define FT_CHAR_BIT. * src/base/ftobjs.c (FT_Load_Glyph): Don't apply autohinting if glyph is vertically distorted or mirrored. * src/cff/cffgload.c (cff_slot_load): Handle zero `size' properly for embedded bitmaps. * docs/CHANGES: Updated. 2004-04-15 bytesoftware <bytesoftware@btinternet.com> * include/freetype/config/ftconfig.h, src/base/ftstream.c (FT_Stream_ReadFields): More fixes using FT_CHAR_BIT. 2004-04-14 Werner Lemberg <wl@gnu.org> * include/freetype/config/ftconfig.h (FT_CHAR_BIT): New macro. 2004-04-14 Alex Strelnikov <ptktyrf@mail.ru> * src/cache/ftcsbits.c (ftc_snode_load): Initialize `*asize' in case of error. 2004-04-14 Werner Lemberg <wl@gnu.org> * src/base/ftmac.c [__GNUC__]: Define OS_INLINE. * builds/unix/configure.ac: Don't try to remove `-ansi' compilation switch on the Mac. * builds/unix/ltmain.sh: Regenerated with `libtoolize --force --copy' from libtool 1.5.6. * builds/unix/aclocal.m4: Regenerated with `aclocal -I .' from automake 1.8a. * builds/unix/configure: Regenerated with autoconf 2.59a. 2004-04-13 Werner Lemberg <wl@gnu.org> * include/freetype/config/ftconfig.h: Use CHAR_BIT to define size of FT_SIZEOF_xxx. 2004-04-12 Chisato Yamauchi <cyamauch@a.phys.nagoya-u.ac.jp> * include/freetype/internal/sfnt.h (TT_Find_SBit_Image_Func, TT_Load_SBit_Metrics_Func): New typedefs. (SFNT_Interface): Add find_sbit_image and load_sbit_metrics. * src/sfnt/sfdriver.c (sfnt_interface): Updated. * src/sfnt/ttsbit.h (tt_find_sbit_image, tt_load_sbit_metrics): New declarations. * src/sfnt/ttsbit.c (find_sbit_image): Renamed to... (tt_find_sbit_image): This. Updated all callers. (load_sbit_metrics): Renamed to... (tt_load_sbit_metrics): This. Updated all callers. 2004-04-12 Werner Lemberg <wl@gnu.org> * configure: Accept makepp also. * builds/unix/detect.mk: Use proper path to unix-def.mk. * builds/unix/unix-def.in (BUILD_DIR, PLATFORM): Remove. * builds/unix/unix.mk (BUILD_DIR, PLATFORM): Define. Use BUILD_DIR. * docs/INSTALL, docs/INSTALL.GNU, docs/INSTALL.UNX: Update documentation on makepp. 2004-04-11 Werner Lemberg <wl@gnu.org> * src/lzw/zopen.c: Don't include sys/param.h and sys/stat.h. 2004-04-10 Werner Lemberg <wl@gnu.org> * src/lzw/ftlzw.c: Include zopen.h dependent on FT_CONFIG_OPTION_USE_LZW. * src/base/ftdebug.c: s/index/idx/ to avoid compiler warnings. 2004-04-02 Werner Lemberg <wl@gnu.org> * builds/unix/ltmain.sh: Regenerated with `libtoolize --force --copy' from libtool 1.5.2. * builds/unix/aclocal.m4: Regenerated with `aclocal -I .' from automake 1.8a. * builds/unix/configure: Regenerated with autoconf 2.59a. 2004-04-01 Werner Lemberg <wl@gnu.org> * builds/unix/ft-munmap.m4 (FT_MUNMAP_PARAM): Fix arguments of AC_COMPILE_IFELSE. * builds/unix/aclocal.m4: Regenerated with `aclocal -I .' from automake 1.8a. * builds/unix/configure: Regenerated with autoconf 2.59a. * builds/unix/config.guess, builds/unix/config.sub: Updated from `config' CVS module at subversions.gnu.org. * builds/unix/install-sh, builds/unix/mkinstalldirs: Updated from `texinfo' CVS module at subversions.gnu.org. * builds/freetype.mk (refdoc): Updated. 2004-03-31 Werner Lemberg <wl@gnu.org> Handle broken FNT files which don't have a trailing NULL byte in the face name string. * src/winfonts/winfnt.h (FNT_FontRec): New member `family_name'. * src/winfonts/winfnt.c (fnt_font_done): Free font->family_name. (FNT_Face_Init): Append a final zero byte to the font face name. 2004-03-30 Werner Lemberg <wl@gnu.org> * src/sfnt/ttload.c (tt_face_load_sfnt_header): Fix change from 2004-03-19. 2004-03-27 Werner Lemberg <wl@gnu.org> * src/base/descrip.mms (OBJS): Add ftbbox.obj. 2004-03-26 George Williams <gww@silcom.com> Add vertical phantom points. * include/freetype/internal/tttypes.h (TT_LoaderRec): Add `top_bearing', `vadvance', `pp3', and `pp4'. * src/autofit/afloader.c (af_loader_load_g): Handle two more points. * src/autohint/ahhint.c (ah_hinter_load): Handle two more points. * src/truetype/ttgload.c (Get_VMetrics): New function. (TT_Load_Simple_Glyph, TT_Process_Simple_Glyph): Handle two more points. (load_truetype_glyph): Use Get_VMetrics. Handle two more points. (compute_glyph_metrics): Thanks to vertical phantom points we now can always compute `advance_height' and `top_bearing'. * src/truetype/ttobjs.h (TT_SubglyphRec): Add vertical phantom points. * src/autohint/ahglyph.c (ah_outline_load): Fix allocation of `news'. 2004-03-21 Werner Lemberg <wl@gnu.org> * src/bdf/bdfdrivr.c (BDF_Glyph_Load): Fix left side bearing. 2004-03-20 Steve Hartwell <shspamsink@comcast.net> * src/cache/ftcmru.c (FTC_MruList_RemoveSelection): Handle a NULL value for `selection' as `select all'. 2004-03-19 Steve Hartwell <shspamsink@comcast.net> * src/sfnt/ttload.c (tt_face_load_sfnt_header): Reject face_index values > 0 if loading non-TTC fonts. * src/base/ftmac.c (open_face_from_buffer): Set positive face_index to zero before calling FT_Open_Face. * docs/CHANGES: Updated. 2004-03-04 Werner Lemberg <wl@gnu.org> * Jamfile, vms_make.com, builds/win32/visualc/freetype.dsp, builds/win32/visualc/freetype/vcproj, include/freetype/ftmoderr.h: Add LZW module. * Jamfile.in: Removed. * docs/CHANGES: Updated. * include/freetype/internal/ftobjs.h: s/MIN/FT_MIN/, s/MAX/FT_MAX/, s/ABS/FT_ABS/. Updated all callers. * src/type1/t1load.c (parse_dict), src/pcf/pcfdrivr.c (PCF_Face_Init): Use FT_ERROR_BASE. 2004-03-04 Albert Chin <china@thewrittenword.com> Add support for PCF fonts compressed with LZW (extension .pcf.Z, created with `compress'). * include/freetype/config/ftoption.h, devel/ftoption.h (FT_CONFIG_OPTION_USE_LZW): New macro. * include/freetype/ftlzw.h: New file. * include/freetype/config/ftheader.h (FT_LZW_H): New macro for ftlzw.h. * src/lzw/*: New files. * src/pcf/pcfdrivr.c: Include FT_LZW_H. (PCF_Face_Init): Try LZW also. * src/gzip/ftgzip.c: s/0/Gzip_Err_Ok/ where appropriate. Beautify. 2004-03-03 Werner Lemberg <wl@gnu.org> * src/pshinter/pshalgo.c (psh_hint_table_init): Simplify code. 2004-03-02 Werner Lemberg <wl@gnu.org> Add embedded bitmap support to CFF driver. * src/cff/cffobjs.h (CFF_SizeRec): New structure. * src/cff/cffgload.c (cff_builder_init): Updated. (cff_slot_load): Updated. [TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: Load sbit. * src/cff/cffobjs.c (sbit_size_reset) [TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: New function. (cff_size_get_globals_funcs, cff_size_done, cff_size_init): Updated. (cff_size_reset): Updated. [TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: Call sbit_size_reset. * src/cff/cffdrivr.c (Load_Glyph): Updated. (cff_driver_class): Use CFF_SizeRec. * docs/CHANGES: Updated. 2004-03-01 Werner Lemberg <wl@gnu.org> * src/pshinter/pshglob.c (psh_globals_scale_widths): Don't use FT_RoundFix but FT_PIX_ROUND. (psh_blues_snap_stem): Don't use blue_shift but blue_threshold. * src/pshinter/pshalgo.c (PSH_STRONG_THRESHOLD_MAXIMUM): New macro. (psh_glyph_find_strong_points): Use PSH_STRONG_THRESHOLD_MAXIMUM. (psh_glyph_find_blue_points): New function. Needed for fonts like p052003l.pfb (URW Palladio L Roman) which have flex curves at the base line within blue zones, but the flex curves aren't covered by hints. (ps_hints_apply): Use psh_glyph_find_blue_points. 2004-02-27 Garrick Meeker <garrick@digitalanarchy.com> * builds/unix/configure.ac: Fix compiler flags for `--with-old-mac-fonts'. * builds/unix/configure: Regenerated. * src/base/ftmac.c: s/TARGET_API_MAC_CARBON/!TARGET_API_MAC_OS8/. (FT_New_Face_From_Resource): New function. (FT_New_Face): Use FT_New_Face_From_Resource. (FT_New_Face_From_FSSpec): Use FT_New_Face_From_Resource. [__MWERKS__]: Don't include FSp_fopen.h. 2004-02-26 Werner Lemberg <wl@gnu.org> * src/pshinter/pshglob.c (psh_globals_new): Fix value of `dim->stdw.count'. Don't assign default values to blue scale and blue shift. 2004-02-25 Werner Lemberg <wl@gnu.org> * docs/CHANGES: Updated. 2004-02-25 Garrick Meeker <garrick@digitalanarchy.com> Steve Hartwell <shspamsink@comcast.net> Improve MacOS fond support. Provide a new API `FT_New_Face_From_FSSpec' similar to `FT_New_Face'. * src/base/ftmac.c [__MWERKS__]: Include FSp_fopen.h. STREAM_FILE [__MWERKS__]: New macro. (ft_FSp_stream_close, ft_FSp_stream_io) [__MWERKS__]: New functions. (file_spec_from_path) [__MWERKS__]: Updated #if statement. (get_file_type, make_lwfn_spec): Use `const' for argument. (is_dfont) [TARGET_API_MAC_CARBON]: Removed. (count_face_sfnt, count_faces): New functions. (parse_fond): Do some range checking. (read_lwfn): Change type of second argument. No longer call FSpOpenResFile. (OpenFileAsResource): New function. (FT_New_Face_From_LWFN): Use `const' for second argument. Use OpenFileAsResource. (FT_New_Face_From_Suitcase): Change type of second argument. No longer call FSpOpenResFile. Loop over all resource indices. (FT_New_Face_From_dfont) [TARGET_API_MAC_CARBON]: Removed. (FT_GetFile_From_Mac_Name): Use `const' for first argument. (ResourceForkSize): Removed. (FT_New_Face): Updated to use new functions. (FT_New_Face_From_FSSpec): New function. * include/freetype/ftmac.h: Updated. 2004-02-24 Malcolm Taylor <mtaylor@clear.net.nz> * src/autohint/ahhint.c (ah_hinter_load) <FT_GLYPH_FORMAT_OUTLINE>: Handle case where outline->num_vedges is zero while computing hinted metrics. 2004-02-24 Gordon Childs <gchilds@quickcut.com.au> * src/cff/cffcmap.c (cff_cmap_unicode_init): Provide correct value for `count'. 2004-02-24 Werner Lemberg <wl@gnu.org> * include/freetype/t1tables.h (PS_PrivateRec): Add `expansion_factor'. * src/pshinter/pshglob (psh_blues_scale_zones): Fix computation of blues->no_overshoots -- `blues_scale' is stored with a magnification of 1000, and `scale' returns fractional pixels. * src/type1/t1load.c (T1_Open_Face): Initialize `blue_shift', `blue_fuzz', `expansion_factor', and `blue_scale' according to the Type 1 specification. * src/type1/t1tokens.h: Handle `ExpansionFactor'. * docs/CHANGES: Updated. 2004-02-24 Masatake YAMATO <jet@gyve.org> Provide generic access to MacOS resource forks. * src/base/ftrfork.c, include/freetype/internal/ftrfork.h: New files. * src/base/ftobjs.c: Include FT_INTERNAL_RFORK_H. (Mac_Read_POST_Resource, Mac_Read_sfnt_Resource): Remove arguments `resource_listoffset' and `resource_data' and adapt code accordingly. These values are calculated outside of the function now. Add new argument `offsets'. (IsMacResource): Use `FT_Raccess_Get_HeaderInfo' and `FT_Raccess_Get_DataOffsets'. (load_face_in_embedded_rfork): New function. (load_mac_face): Use load_face_in_embedded_rfork. (ft_input_stream_new): Renamed to... (FT_Stream_New): This. Use FT_BASE_DEF. Updated all callers. (ft_input_stream_free): Renamed to... (FT_Stream_Free): This. Use FT_BASE_DEF. Updated all callers. * src/base/ftbase.c: Include ftrfork.c. * src/base/rules.mk (BASE_SRC), src/base/Jamfile: Updated. * include/freetype/internal/internal.h (FT_INTERNAL_RFORK_H): New macro. * include/freetype/internal/fttrace.h: Added `rfork' as a new trace definition. * include/freetype/internal/ftstream.h: Declare FT_Stream_New and FT_Stream_Free. * include/freetype/config/ftoption.h, devel/ftoption.h (FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK): New option. * include/freetype/config/ftstdlib.h (ft_strrchr): New macro. 2004-02-23 Werner Lemberg <wl@gnu.org> * docs/CHANGES: Updated. * include/freetype/internal/ftdebug.h: Include FT_FREETYPE_H. 2004-02-23 Masatake YAMATO <jet@gyve.org> Provide a simple API to control FreeType's tracing levels. * include/freetype/internal/ftdebug.h (FT_Trace_Get_Count, FT_Trace_Get_Name): New declarations. * src/base/ftdebug.c (FT_Trace_Get_Count, FT_Trace_Get_Name): New functions. 2004-02-23 David Turner <david@freetype.org> * src/autofit/afhints.c, src/autofit/afhints.h, src/autofit/aflatin.c, src/autofit/afloader.c, src/types.h: Grave bugs have been fixed. The auto-fitter works, doesn't crash, but still produces unexpected results... 2004-02-21 Werner Lemberg <wl@gnu.org> * src/pshinter/pshalgo.c (PSH_STRONG_THRESHOLD): Changed to hold the accepted shift for strong points in fractional pixels (which is a heuristic value). (psh_glyph_find_strong_points): Compute threshold for psh_hint_table_find_strong_points. (psh_hint_table_find_strong_point): Add parameter to pass threshold. 2004-02-20 Werner Lemberg <wl@gnu.org> * src/pshinter/pshrec.c (ps_mask_table_set_bits): Don't call ps_mask_table_alloc but ps_mask_table_last. (ps_hints_t2mask): Use correct position and number for vertical and horizontal hinter mask bits. * docs/CHANGES: Updated. 2004-02-19 Werner Lemberg <wl@gnu.org> * src/base/ftstroke.c (FT_Glyph_StrokeBorder): Fix enum handling. * src/cff/cffdrivr.c (cff_get_cmap_info): Remove compiler warning. 2004-02-18 Werner Lemberg <wl@gnu.org> * include/freetype/freetype.h: Document FT_LOAD_TARGET_XXX properly. * src/base/ftglyph.c (ft_bitmap_glyph_class, ft_outline_glyph_class): Tag with FT_CALLBACK_TABLE_DEF. * src/smooth/ftsmooth.c (ft_smooth_render): Handle FT_RENDER_MODE_LIGHT. 2004-02-17 Werner Lemberg <wl@gnu.org> Fix callback functions in cache module. * src/cache/ftccback.h: New file for callback declarations. * src/cache/ftcbasic.c (ftc_basic_family_compare, ftc_basic_family_init, ftc_basic_family_get_count, ftc_basic_family_load_bitmap, ftc_basic_family_load_glyph, ftc_basic_gnode_compare_faceid): Use FT_CALLBACK_DEF. (ftc_basic_image_family_class, ftc_basic_image_cache_class, ftc_basic_sbit_family_class, ftc_basic_sbit_cache_class): Use FT_CALLBACK_TABLE_DEF and local wrapper functions. * src/cache/ftccache.c: Include ftccback.h. (ftc_cache_init, ftc_cache_done): New wrapper functions which use FT_LOCAL_DEF. * src/cache/ftccmap.c: Include ftccback.h. (ftc_cmap_cache_class): Use local wrapper functions. * src/cache/ftcglyph.c: Include ftccback.h. (ftc_gnode_compare, ftc_gcache_init, ftc_gcache_done): New wrapper functions which use FT_LOCAL_DEF. * src/cache/ftcimage.c: Include ftccback.h. (ftc_inode_free, ftc_inode_new, ftc_inode_weight): New wrapper functions which use FT_LOCAL_DEF. * src/cache/ftcmanag.c (ftc_size_list_class, ftc_face_list_class): Use FT_CALLBACK_TABLE_DEF. * src/cache;/ftcsbits.c: Include ftccback.h. (ftc_snode_free, ftc_snode_new, ftc_snode_weight, ftc_snode_compare): New wrapper functions which use FT_LOCAL_DEF. * src/cache/rules.mk (CACHE_DRV_H): Add ftccback.h. 2004-02-17 Masatake YAMATO <jet@gyve.org> * include/freetype/ftmac.h (FT_GetFile_From_Mac_Name): Fix a typo (FT_EXPORT_DEF -> FT_EXPORT). * include/freetype/ftxf86.h (FT_Get_X11_Font_Format): Ditto. 2004-02-15 Werner Lemberg <wl@gnu.org> * src/base/ftobjs.c (FT_Set_Char_Size): Fix typo. 2004-02-14 Masatake YAMATO <jet@gyve.org> * builds/unix/ftsystem.c: Include errno.h. (ft_close_stream): Renamed to... (ft_close_stream_by_munmap): This. (ft_close_stream_by_free): New function. (FT_Stream_Open): Use fallback method if mmap fails. Use proper function for closing the stream. 2004-02-14 Werner Lemberg <wl@gnu.org> * src/type1/t1load.c (parse_dict): Initialize `start_binary'. 2004-02-13 Robert Etheridge <roberte@stcc.cc.tx.us> * src/type42/t42objs.c (T42_Face_Init), src/type1/t1objs.c (T1_Face_Init), src/cid/cidobjs.c (cid_face_init): Fix computation of underline_position and underline_thickness. 2004-02-12 Werner Lemberg <wl@gnu.org> * src/base/ftobjs.c (FT_Set_Char_Size): Return immediately if ppem values don't change. Suggested by Graham Asher. 2004-02-11 Werner Lemberg <wl@gnu.org> * src/cid/cidload.c (cid_face_open): Always allocate face->cid_stream so that we can deallocate it safely. 2004-02-10 Werner Lemberg <wl@gnu.org> Make the PS parser more tolerant w.r.t. non-standard font data. In general, an error is only reported in case of a syntax error; a wrong type is now simply ignored (if possible). To be independent of the order of various MM-specific keywords, the parse_shared_dict routine has been removed -- the PS parser is now capable to skip this data. It no longer fails on parsing e.g. dup /WeightVector exch def Since the token following /WeightVector isn't `[' (starting an array) it is simply ignored. * include/freetype/fterrdef.h: Define `FT_Err_Ignore' (0xA2) as a new internal error value. * src/type1/t1load.c (parse_blend_axis_types, parse_blend_design_positions, parse_blend_design_map): Return T1_Err_Ignore if no proper array is following the keyword. (parse_weight_vector): Use T1_ToTokenArray, initializing `blend' structure, if necessary. Return T1_Err_Ignore if no proper array is following the keyword. (parse_shared_dict): Removed. (parse_encoding): Set parser->root.error to return T1_Err_Ignore if no result can be obtained. Check for errors before accessing `elements' array. (t1_keywords): Remove /shareddict. (parse_dict): Reset error if t1_load_keyword returns T1_Err_Ignore. Set keyword_flag only in case of success. Check error code if skipping an unrecognized token. (T1_Open_Face) [!T1_CONFIG_OPTION_NO_MM_SUPPORT]: Call T1_Done_Blend if blend commands haven't set up a proper MM font. * src/psaux/psobjs.c (ps_parser_load_field_table): Remove special code for synthetic fonts. Return PSaux_Err_Ignore if no proper value has been found. 2004-02-09 Werner Lemberg <wl@gnu.org> * src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_endchar>: Preserve glyph width before calling cff_operator_seac. 2004-02-09 Martin Muskens <mmuskens@aurelon.com> * src/cff/cffgload.c (cff_decoder_parse_charstrings): Handle special first argument for `hintmask' and `cntrmask' operators also. 2004-02-08 Werner Lemberg <wl@gnu.org> * builds/unix/configure.in: Call AC_SUBST for `enable_shared', `hardcode_libdir_flag_spec', and `wl'. * builds/unix/configure: Regenerated. * builds/unix/freetype-config.in: Make --prefix and --exec-prefix actually work. Report a proper --rpath (or -R) value for --libs argument if a shared library has been built. * docs/CHANGES: Updated. 2004-02-07 Keith Packard <keithp@keithp.com> * src/bdf/bdfdrivr.c (BDF_Face_Init, BDF_Set_Pixel_Size): Fix computation of various vertical and horizontal metric values. * src/pcfdrivr.c (PCF_Set_Pixel_Size), src/pcfread (pcf_load_font): Ditto. 2004-02-07 Werner Lemberg <wl@gnu.org> * builds/win32/visualc/index.html, builds/win32/visualc/freetype.dsp, builds/win32/visualc/freetype.dsw, docs/CHANGES: Updated. 2004-02-07 Vitaliy Pasternak <v_a_pasternak@mail.ru> * builds/win32/visualc/freetype.sln, builds/win32/visualc/freetype.vcproj: New files for VS.NET 2003. 2004-02-03 Werner Lemberg <wl@gnu.org> * include/freetype/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP): Initialize `node'. * src/type1/t1load.c (parse_dict): Initialize `have_integer'. 2004-02-02 Werner Lemberg <wl@gnu.org> * src/type1/t1load.c (parse_dict): Handle `RD' and `-|' commands outside of /Subrs or /CharStrings. This can happen if there is additional code manipulating those two arrays so that FreeType doesn't recognize them properly. (T1_Open_Face): Improve an error message. 2004-02-01 Werner Lemberg <wl@gnu.org> * src/type1/t1load.c (parse_charstrings): Exit immediately if there are no elements in /CharStrings. This is needed for fonts like Optima-Oblique which not only define /CharStrings but access it also. 2004-02-01 David Turner <david@freetype.org> * src/sfnt/Jamfile: Removing `ttcmap' from the list of sources. * include/freetype/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP) <FTC_INLINE>: Provide macro version which doesn't use inline code. * include/freetype/cache/ftcglyph.h (FTC_GCACHE_LOOKUP_CMP) <FTC_INLINE>: Ditto. Use FTC_MRULIST_LOOKUP_CMP. * include/freetype/cache/ftcmru.h (FTC_MRULIST_LOOKUP_CMP): New macro. (FTC_MRULIST_LOOKUP): Use it. * src/cache/Jamfile (_sources), src/cache/descrip.mms: Updated. * src/cache/ftcbasic.c: Fix compiler warnings. * src/cache/ftcmanag.c (FTC_Manager_LookupSize, FTC_Manager_LookupFace) <FTC_INLINE>: Use FTC_MRULIST_LOOKUP_CMP. * src/cache/ftcmru.c (FTC_MruList_Find): Fix a bug (found after heavy testing). * Jamfile: Updating `refdoc' target, and adding `autohint' to the list of modules to build. Both the autohinter and autofitter will be built by default. But which one will be used is determined by the content of `ftmodule.h'. * src/autofit/*: Many updates, but the code is still buggy... 2004-01-31 Werner Lemberg <wl@gnu.org> * src/cff/cffgload.c (cff_operator_seac): Fix magnitude of accent offset. Update code similarly to the seac support for Type 1 fonts. (cff_decoder_parse_charstrings) <cff_op_endchar>: Fix magnitude of accent offset. Don't hint glyphs twice if seac is emulated. <cff_op_flex>: Assign correct point tags. * docs/CHANGES: Updated. 2004-01-30 Werner Lemberg <wl@gnu.org> * src/type1/t1parse.c (T1_Get_Private_Dict): Use FT_MEM_MOVE, not FT_MEM_COPY, for copying the private dict. * src/type1/t1load.c (parse_subrs): Assign number of subrs only in first run. (parse_charstrings): Parse /CharStrings in second run without assigning values. (parse_dict): Skip all /CharStrings arrays but the first. We need this for non-standard fonts like `Optima' which have different outlines depending on the resolution. Note that there is no guarantee that we get fitting /Subrs and /CharStrings arrays; this can only be done by a real PS interpreter. 2004-01-29 Antoine Leca <Antoine-Freetype@Leca-Marti.org> * builds/win32/visualc/index.html: New file, giving detailed explanations about forcing CR+LF line endings for the VC++ project files. 2004-01-22 Garrick Meeker <garrick@digitalanarchy.com> * src/cff/cffload.c (cff_subfont_load): Initialize `dict'. 2004-01-22 Werner Lemberg <wl@gnu.org> Add support for the hexadecimal representation of binary data started with `StartData' in CID-keyed Type 1 fonts. * include/freetype/internal/t1types.h (CID_FaceRec): Add new members `binary_data' and `cid_stream'. * src/cid/cidload.c (cid_read_subrs): Use `face->cid_stream'. (cid_hex_to_binary): New auxiliary function. (cid_face_open): Add new argument `face_index' to return quickly if less than zero. Updated all callers. Call `cid_hex_to_binary', then open and assign memory stream to `face->cid_stream' if `parser->binary_length' is non-zero. * src/cid/cidload.h: Updated. * src/cid/cidobjs.c (cid_face_done): Free `binary_data' and `cid_stream'. * src/cid/cidparse.c (cid_parser_new): Check arguments to `StartData' and set parser->binary_length accordingly. * src/cid/cidparse.h (CID_Parser): New member `binary_length'. * src/cid/cidgload.c (cid_load_glyph): Use `face->cid_stream'. * docs/CHANGES: Updated. 2004-01-21 Werner Lemberg <wl@gnu.org> include/freetype/config/ftstdlib.h (ft_atoi): Replaced with... (ft_atol): This. * src/base/ftdbgmem.c: s/atol/ft_atol/. * src/type42/t42drivr.c: s/ft_atoi/ft_atol/. 2004-01-20 Masatake YAMATO <jet@gyve.org> * include/freetype/ftcache.h: Delete duplicated definition of FTC_FaceID. * src/cff/cffdrivr.c (cff_get_cmap_info): Call sfnt module's TT CMap Info service function if the cmap comes from sfnt. Return 0 if the cmap is synthesized in cff module. 2004-01-20 David Turner <david@freetype.org> * src/cache/ftcmanag.c (ftc_size_node_compare): Call FT_Activate_Size. 2004-01-20 Werner Lemberg <wl@gnu.org> * src/type1/t1parse.c (T1_Get_Private_Dict): Skip exactly one CR, LF, or CR/LF after `eexec'. 2004-01-18 David Turner <david@freetype.org> * src/sfnt/ttsbit.c (tt_face_set_sbit_strike): Remove compiler warning. * src/tools/docmaker/*: Updating beautifier tool. 2004-01-15 David Turner <david@freetype.org> * src/base/ftoutln.c (ft_orientation_extremum_compute): Fix infinite loop bug. * include/freetype/ftstroke.h: Include FT_GLYPH_H. (FT_Stroker_Rewind, FT_Glyph_Stroke, FT_Glyph_StrokeBorder): New declarations. * src/base/ftstroke.c: Include FT_INTERNAL_OBJECTS_H. (FT_Outline_GetOutsideBorder): Inverse result. (FT_Stroker_Rewind, FT_Glyph_Stroke, FT_Glyph_StrokeBorder): New functions. (FT_Stroker_EndSubPath): Close path if needed. (FT_Stroker_Set, FT_Stroker_ParseOutline): Use FT_Stroker_Rewind. * include/freetype/cache/ftcmanag.h (FTC_ScalerRec, FTC_Manager_LookupSize): Moved to... * include/freetype/ftcache.h (FTC_ScalerRec, FTC_Manager_LookupSize): Here. * src/tools/docmaker/docbeauty.py: New file to beautify the documentation comments (e.g., to convert them to single block border mode). * src/tools/docmaker/docmaker.py (file_exists, make_file_list): Moved to... * src/tools/docmaker/utils.py (file_exists, make_file_list): Here. 2004-01-14 David Turner <david@freetype.org> * include/freetype/internal/ftmemory.h (FT_ARRAY_COPY, FT_ARRAY_MOVE): New macros to make copying arrays easier. Updated all relevant code to use them. 2004-01-14 Werner Lemberg <wl@gnu.org> * src/cff/cffload.c (cff_font_load): Load charstrings_index earlier. Use number of charstrings as argument to CFF_Load_FD_Select (as documented in the CFF specs). 2004-01-13 Graham Asher <graham.asher@btinternet.com> * src/pshinter/pshalgo.c (psh_glyph_init): Move assignment of `glyph->memory' up to free arrays properly in case of failure. 2004-01-10 Masatake YAMATO <jet@gyve.org> Make `FT_Get_CMap_Language_ID' work with CFF. Bug reported by Steve Hartwell <shspamsink@comcast.net>. * src/cff/cffdrivr.c: Include FT_SERVICE_TT_CMAP_H. (cff_services): Added an entry for FT_SERVICE_ID_TT_CMAP. (cff_get_cmap_info): New function. (cff_service_get_cmap_info) New entry for cff_services. * src/sfnt/ttcmap0.c: Exit loop after a format match has been found. Suggested by Steve Hartwell <shspamsink@comcast.net>. 2004-01-03 Masatake YAMATO <jet@gyve.org> * src/base/ftobjs.c (destroy_charmaps): New function. (destroy_face, open_face): Use `destroy_charmaps'. 2004-01-01 Werner Lemberg <wl@gnu.org> * docs/CHANGES: Updated. 2004-01-01 Michael Jansson <mjan@em2-solutions.com> * src/winfonts/winfnt.c (FNT_Size_Set_Pixels): Fix sign of size->metrics.descender. 2003-12-31 Wolfgang Domröse <porthos.domroese@harz.de> * src/cff/cffgload.c (cff_decoder_parse_charstrings) [FT_DEBUG_LEVEL_TRACE]: Use `%ld' in FT_TRACE4. <cff_op_flex1>: Change type of dx and dy to FT_Pos and remove cast for accessing arguments. 2003-12-31 Werner Lemberg <wl@gnu.org> * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Revert previous change. It's not necessary. 2003-12-29 Smith Charles <smith.charles@free.fr> * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Handle `repeated flags set' correctly. 2003-12-29 Werner Lemberg <wl@gnu.org> * src/cff/cffobjs.c (cff_face_init): Fix memory leak by deallocating `full' and `weight' properly. * src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_hintmask> [FT_DEBUG_LEVEL_TRACE]: Use `0x' as prefix for tracing output. 2003-12-26 Werner Lemberg <wl@gnu.org> * include/freetype/internal/sfnt.h (TT_Set_SBit_Strike_Func): Use FT_UInt for ppem values. * src/sfnt/ttsbit.c (tt_face_set_sbit_strike): Use FT_UInt for ppem values. * src/sfnt/ttsbit.h: Updated. * src/base/ftobjs.c (FT_Set_Pixel_Sizes): Don't allow ppem values larger than -0FFFF. 2003-12-25 Werner Lemberg <wl@gnu.org> * src/base/fttrigon.c, src/base/ftgloadr.c: Include FT_INTERNAL_OBJECTS_H. * src/base/ftstroke.c (FT_Outline_GetInsideBorder, FT_Outline_GetOutsideBorder): s/or/o/ to make it compile with C++ compilers. * src/cache/ftcmru.c, include/freetype/cache/ftcmru.h: s/select/selection/ to avoid compiler warning. * src/cff/cffload.h: s/select/ftselect/ to avoid potential compiler warning. 2003-12-24 Werner Lemberg <wl@gnu.org> * src/cache/ftcsbits.c (FTC_SNode_Weight): s/FTC_SBIT_ITEM_PER_NODE/FTC_SBIT_ITEMS_PER_NODE/. 2003-12-24 David Turner <david@freetype.org> * Fixed compilation problems in the cache sub-system. * Partial updates to src/autofit. * Jamfile (FT2_COMPONENTS): Add autofit module. 2003-12-23 Werner Lemberg <wl@gnu.org> * src/cff/cffgload.c (cff_lookup_glyph_by_stdcharcode): Handle CID-keyed fonts. 2003-12-23 David Turner <david@freetype.org> * include/freetype/internal/ftobjs.h (FT_PAD_FLOOR, FT_PAD_ROUND, FT_PAD_CEIL, FT_PIX_FLOOR, FT_PIX_ROUND, FT_PIX_CEIL): New macros. They are used to avoid compiler warnings with very pedantic compilers. Note that `(x) & -64' causes a warning if (x) is not signed. Use `(x) & ~63' instead! Updated all related code. Add support for extraction of `inside' and `outside' borders. * src/base/ftstroke.c (FT_StrokerBorder): New enumeration. (FT_Outline_GetInsideBorder, FT_Outline_GetOutsideBorder, FT_Stroker_GetBorderCounts, FT_Stroker_ExportBorder): New functions. (FT_StrokeBorderRec): New boolean member `valid'. (ft_stroke_border_get_counts): Updated. * include/freetype/ftstroke.h: Updated. 2003-12-22 Werner Lemberg <wl@gnu.org> * include/freetype/ftwinfnt.h (FT_WinFNT_ID_*): New definitions to describe the `charset' field in FT_WinFNT_HeaderRec. * src/winfonts/winfnt.c (FNT_Face_Init): Set encoding to FT_ENCODING_NONE except for FT_WinFNT_ID_MAC. * include/freetype/freetype.h (FT_Encoding): Improve comment, based on work by Detlef Würkner <TetiSoft@apg.lahn.de>. * docs/CHANGES: Updated. 2003-12-22 David Turner <david@freetype.org> * include/freetype/ftcache.h, include/freetype/cache/ftcmanag.h, include/freetype/cache/ftccache.h, include/freetype/cache/ftcmanag.h, include/freetype/cache/ftcmru.h (added), include/freetype/cache/ftlru.h (removed), include/freetype/cache/ftcsbits.h, include/freetype/cache/ftcimage.h, include/freetype/cache/ftcglyph.h, src/cache/ftcmru.c, src/cache/ftcmanag.c, src/cache/ftccache.c, src/cache/ftcglyph.c, src/cache/ftcimage.c, src/cache/ftcsbits.c, src/cache/ftccmap.c, src/cache/ftcbasic.c (added), src/cache/ftlru.c (removed): *Complete* rewrite of the cache sub-system to `solve' the following points: - all public APIs have been moved to FT_CACHE_H, everything under `include/freetype/cache' is only needed by client applications that want to implement their own caches - a new function named FTC_Manager_RemoveFaceID to deal with the uninstallation of FaceIDs - the image and sbit cache are now abstract classes, that can be extended much more easily by client applications - better performance in certain areas. Further optimizations to come shortly anyway... - the FTC_CMapCache_Lookup function has changed its signature, charmaps can now only be retrieved by index - FTC_Manager_Lookup_Face => FTC_Manager_LookupFace FTC_Manager_Lookup_Size => FTC_Manager_LookupSize (still in private header for the moment) 2003-12-21 Werner Lemberg <wl@gnu.org> * src/type1/t1load.c (parse_dict): Stop parsing if `eexec' keyword is encountered. 2003-12-19 Werner Lemberg <wl@gnu.org> * src/cff/cfftypes.h (CFF_MAX_CID_FONTS): Increase to 32. For example, the Japanese Hiragino font already contains 15 subfonts. * src/cff/cffload.c (cff_font_load): Deallocate `sids' array for CID-keyed fonts. * devel/ftoption.h: Define FT_DEBUG_MEMORY. 2003-12-18 Werner Lemberg <wl@gnu.org> * include/freetype/ttnameid.h (TT_ADOBE_ID_LATIN_1): New macro. * src/type1/t1objs.c (T1_Face_Init): Use TT_ADOBE_ID* values. 2003-12-18 Werner Lemberg <wl@gnu.org> * src/cff/cfftypes.h (CFF_FontRecDictRec): Change type of `cid_count' to `FT_ULong'. * src/cff/cffgload.c (cff_slot_load): Take care of empty `cids' array. * src/cff/cffload.c (cff_charset_done): Free `cids' array. (cff_font_load): Create cids array only for CID-keyed fonts which are subsetted. * src/cff/cffobjs.c (cff_face_init): Check the availability of the PSNames modules for non-pure CFFs also. Set FT_FACE_FLAG_GLYPH_NAMES for a non-pure CFF also if it isn't CID-keyed. * src/cff/rules.mk (CFF_DRV_H): Add cfftypes.h. 2003-12-17 Werner Lemberg <wl@gnu.org> * src/sfnt/sfobjs.c (sfnt_init_face): Don't set FT_FACE_FLAG_GLYPH_NAMES if the font contains a version 3.0 `post' table. * docs/CHANGES: Updated. 2003-12-17 Masatake YAMATO <jet@gyve.org> Add new function FT_Get_CMap_Language_ID to extract the language ID for TrueType/sfnt fonts. * include/freetype/internal/services/svttcmap.h: New file. * include/freetype/internal/ftserv.h (FT_SERVICE_TT_CMAP_H): Add svttcmap.h. * src/sfnt/sfdriver.c: Include ttcmap0.h. (tt_service_get_cmap_info): New service. (sfnt_services): Updated. * src/sfnt/ttcmap0.c (tt_cmap*_get_info): New functions. (tt_cmap*_class_rec): Add tt_cmap*_get_info members. (tt_get_cmap_info): New function. * src/sfnt/ttcmap0.h: Include FT_SERVICE_TT_CMAP_H. (TT_CMap_ClassRec): New field `get_cmap_info'. (tt_get_cmap_info): New declaration. * src/base/ftobjs.c: Include FT_SERVICE_TT_CMAP_H. (FT_Get_CMap_Language_ID): New function implementation. * include/freetype/tttables.h (FT_Get_CMap_Language_ID): New function declaration. 2003-12-16 Werner Lemberg <wl@gnu.org> * src/sfnt/ttcmap.c, src/sfnt/ttcmap.h: Removed. Obsolete. * include/freetype/internal/sfnt.h (SFNT_Interface): Remove obsolete fields `load_charmap' and `free_charmap'. (TT_CharMap_Load_Func, TT_CharMap_Free_Func): Removed. * src/sfnt/sfnt.c: Don't include ttcmap.c. * src/sfnt/rules.mk (SFNT_DRV_SRC): Don't include ttcmap.c. * src/sfnt/ttload.c: Don't include ttcmap.h. * src/sfnt/sfdriver.c: Don't include ttcmap.h. (sfnt_interface): Updated. * include/freetype/internal/tttypes.h (TT_TableDirRec, TT_CMapDirRec, TT_CMapDirEntryRec, TT_CMap0, TT_CMap2SubHeaderRec, TT_CMap2Rec, TT_CMap4Segment, TT_CMap4Rec, TT_CMap6, TT_CMapGroupRec, TT_CMap8_12Rec, TT_CMap10Rec, TT_CharMap_Func, TT_CharNext_Func, TT_CMapTableRec, TT_CharMapRec): Removed. Obsolete. * src/cff/cffobjs.h (CFF_CharMapRec): Removed. Obsolete. 2003-12-15 Werner Lemberg <wl@gnu.org> * docs/CHANGES: Updated. 2003-12-15 Wolfgang Domröse <porthos.domroese@harz.de> * builds/atari/*: New directory for building FreeType 2 on Atari with the PureC compiler. 2003-12-12 Wolfgang Domröse <porthos.domroese@harz.de> * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Add cast. * src/cff/cffdrivr.c (cff_ps_has_glyph_names): Assure that return value is either 0 or 1. 2003-12-12 Werner Lemberg <wl@gnu.org> * src/cff/cffdrivr.c (cff_get_glyph_name): Improve error message. (cff_get_name_index): Return if no PSNames service is available. (cff_ps_has_glyph_names): Handle CID-keyed fonts correctly. * src/cff/cfftypes.h (CFF_CharsetRec): New field `cids', used for CID-keyed fonts. This is the inverse mapping of `sids'. * src/cff/cffload.c (cff_charset_load): New argument `invert'. Initialize charset->cids if `invert' is set. (cff_font_load): In call to cff_charset_load, set `invert' to true for CID-keyed fonts. * src/cff/cffgload.c (cff_slot_load): Handle glyph index as CID and map it to the real glyph index. * docs/CHANGES: Updated. 2003-12-11 Werner Lemberg <wl@gnu.org> * src/cff/cffobjs.c (cff_face_init): Don't set FT_FACE_FLAG_GLYPH_NAMES for CID-keyed fonts. Don't construct a cmap for CID-keyed fonts. 2003-12-10 Werner Lemberg <wl@gnu.org> Use implementation specific SID value 0xFFFF to indicate that a dictionary element is missing. * src/cff/cffload.c (cff_subfont_load): Initialize all fields which hold SIDs to 0xFFFF. (cff_index_get_sid_string): Handle SID value 0xFFFF. Handle case where `psnames' is zero. (cff_font_load): Updated. Don't load encoding for CID-keyed CFFs. * src/cff/cffobjs.c (cff_face_init): Updated. Don't check for PSNames module if font is CID-keyed. Compute style name properly (using the same algorithm as in the CID driver). Fix computation of style flags. * src/cff/cfftoken.h: Comment out handling of base_font_name. Rename `postscript' field to `embedded_postscript' * src/cff/cfftypes.h (CFF_FontRecDictRec): Remove `base_font_name' and `postscript'. 2003-12-10 Detlef Würkner <TetiSoft@apg.lahn.de> * src/pcf/pcfdrivr.c (pcf_get_charset_id): New function (a clone of the similar BDF function). (pcf_service_bdf): Use it. 2003-12-09 Werner Lemberg <wl@gnu.org> * src/sfnt/sfobjs.c (sfnt_load_face): Set FT_FACE_FLAG_GLYPH_NAMES only if a `post' table is present. 2003-12-09 George Williams <gww@silcom.com> * src/base/ftobjs.c (load_mac_face): Recent versions of Linux support Mac's HFS+ file system, thus enable code to read /rsrc on non-Macintosh platforms also. 2003-12-08 Werner Lemberg <wl@gnu.org> * include/freetype/internal/psaux.h (PS_TableRec): Change type of `lengths' to FT_PtrDist. (T1_DecoderRec): Change type of `subrs_len' to FT_PtrDist. * include/freetype/internal/t1types.h (T1_FontRec): Change type of `subrs_len' and `charstrings_len' to FT_PtrDist. * src/base/ftobjs.c (Mac_Read_POST_Resource): Replace `junk' variable with better solution. (IsMacResource): Remove unused variable `map_len'. Replace `junk' variable with better solution. (FT_Open_Face) [!FT_MACINTOSH]: Add conditional FT_CONFIG_OPTION_MAC_FONTS. 2003-12-08 Wolfgang Domröse <porthos.domroese@harz.de> * src/autohint/ahhint.c (ah_hinter_hint_edges, ah_hinter_align_strong_points): Add some casts. * src/base/ftoutln.c (FT_OrientationExtremumRec): Change type of `pos' to FT_Long. * src/base/ftobjs.c (Mac_Read_POST_Resource, Mac_Read_sfnt_Resource): Change type of `len' to FT_Long. * src/type42/t42parse.c (t42_parse_dict): Add cast for `n_keywords'. 2003-12-07 Werner Lemberg <wl@gnu.org> * docs/raster.txt: New file, taken from FreeType 1 and completely revised. 2003-12-04 Masatake YAMATO <jet@gyve.org> * src/type1/t1driver.c (Get_Interface): Remove FT_UNUSED for t1_interface. t1_interface is used. 2003-11-27 David Turner <david@freetype.org> * src/pfr/pfrdrivr.c (pfr_get_metrics): Revert incorrect change of 2003-11-23: For PFR fonts, metrics->x_scale and metrics->y_scale are the scaling values for outline units, not for metric units. 2003-11-25 Werner Lemberg <wl@gnu.org> * src/base/ftcalc.c, include/freetype/internal/ftcalc.h (FT_MulDiv_No_Round): Surround code with `#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER ... #endif'. 2003-11-23 Werner Lemberg <wl@gnu.org> * src/base/ftcalc.c (FT_MulDiv_No_Round): New function (32 and 64 bit version). * include/freetype/internal/ftcalc.h: Updated. * src/truetype/ttinterp.c (TT_MULDIV_NO_ROUND): New macro. (TT_INT64): Removed. (DO_DIV): Use TT_MULDIV_NO_ROUND. * src/pfr/pfrdrivr.c (pfr_get_metrics): Directly use metrics->x_scale and metrics->y_scale. 2003-11-22 Rogier van Dalen <R.C.van.Dalen@umail.leidenuniv.nl> * src/truetype/ttinterp.c (CUR_Func_move_orig): New macro. (Direct_Move_Orig, Direct_Move_Orig_X, Direct_Move_Orig_Y): New functions. Similar to Direct_Move, Direct_Move_X, and Direct_Move_Y but without touching. (Compute_Funcs): Use new functions. (Round_None, Round_To_Grid, Round_To_Half_Grid, Round_Down_To_Grid, Round_Up_To_Grid, Round_To_Double_Grid, Round_Super, Round_Super_45): Fix rounding of value zero. (DO_DIV): Don't use TT_MULDIV. (Ins_SHC): This instruction actually touches the points. (Ins_MSIRP): Fix undocumented behaviour. * src/truetype/ttinterp.h (TT_ExecContextRec): Updated. 2003-11-22 Werner Lemberg <wl@gnu.org> * docs/VERSION.DLL, docs/CHANGES: Updated. * src/base/ftobjs.c (FT_Set_Char_Size): Make metrics->x_scale and metrics->y_scale really precise. (FT_Load_Glyph): Update computation of linearHoriAdvance and linearVertAdvance. * src/truetype/ttinterp.c (Update_Max): Use FT_REALLOC. 2003-11-22 David Turner <david@freetype.org> * src/autofit/*: More updates. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 8. * builds/unix/configure.ac (version_info): Set to 9:6:3. * README: Updated. 2003-11-13 John A. Boyd Jr. <jaboydjr@netwalk.com> * src/bdf/bdfdrivr.c (bdf_interpret_style), src/pcf/pcfread.c (pcf_interpret_style): Replace spaces with dashes in properties SETWIDTH_NAME and ADD_STYLE_NAME to simplify parsing. 2003-11-11 Werner Lemberg <wl@gnu.org> * docs/CHANGES: Updated. 2003-11-11 John A. Boyd Jr. <jaboydjr@netwalk.com> Handle SETWIDTH_NAME and ADD_STYLE_NAME properties for BDF and PCF fonts. * src/bdf/bdfdrivr.c (bdf_interpret_style): New auxiliary function. (BDF_Face_Init): Don't handle style properties but call bdf_interpret_style. * src/pcf/pcfread.c (pcf_interpret_style): New auxiliary function. (pcf_load_font): Don't handle style properties but call pcf_interpret_style. 2003-11-07 Werner Lemberg <wl@gnu.org> * Version 2.1.7 released. ========================= * include/freetype/freetype.h (FREETYPE_PATCH): Set to 7. * builds/unix/ft2unix.h: Fix comments. * builds/unix/ftconfig.in: Synchronized with ANSI version. Use `#undef' in templates as recommended in the autoconf documentation. Since real `#undef' lines don't survive during configuration, use `/undef' instead; the postprocessing facility of the AC_CONFIG_HEADERS autoconf macro converts them to `#undef'. * builds/unix/install.mk (install): Install Unix version of `ftconfig.h'. * builds/unix/unix-cc.in (CFLAGS): Set FT_CONFIG_CONFIG_H macro to include the correct `ftconfig.h' file. * builds/unix/ft-munmap.m4 (FT_MUNMAP_DECL): Removed. (FT_MUNMAP_PARAM): Updated syntax to autoconf 2.59. * builds/unix/freetype2.m4: Updated syntax to autoconf 2.59. * builds/unix/configure.ac: Use AC_CONFIG_HEADERS instead of AC_CONFIG_HEADER to create ftconfig.h, and use second argument to replace `/undef' with `#undef'. Don't use FT_MUNMAP_DECL but AC_CHECK_DECLS to check for munmap. Use AS_HELP_STRING in AC_ARG_WITH. Update syntax to autoconf 2.59. * builds/unix/ltmain.sh: Regenerated with `libtoolize --force --copy' from libtool 1.5. * builds/unix/aclocal.m4: Regenerated with `aclocal -I .' from automake 1.7.8. * builds/unix/configure: Regenerated with autoconf 2.59. * builds/unix/config.guess, builds/unix/config.sub: Updated from `config' CVS module at subversions.gnu.org * builds/unix/install-sh, builds/unix/mkinstalldirs: Updated from `texinfo' CVS module at subversions.gnu.org. * builds/vms/ftconfig.h: Synchronized with ANSI version. * docs/CUSTOMIZE: Fix documentation error. * docs/CHANGES, docs/VERSION.DLL, docs/release: Updated. * builds/freetype.mk (refdoc): Updated --title. 2003-11-07 David Turner <david@freetype.org> * Version 2.1.6 released. ========================= * install: Removed. Obsolete. 2003-11-04 Werner Lemberg <wl@gnu.org> * src/sfnt/sfdriver.c: Include FT_SERVICE_SFNT_H. (sfnt_service_sfnt_table): New service. (sfnt_services): Updated. * docs/license.txt: Reworded. 2003-11-03 Werner Lemberg <wl@gnu.org> * include/freetype/*: Add a guard to all public header files which load FT_FREETYPE_H to reject freetype.h from FreeType 1. 2003-11-02 Patrick Welche <prlw1@newn.cam.ac.uk> * builds/unix/freetype2.m4, builds/unix/ft-munmap.m4: Protect first argument of AC_DEFUN with brackets to avoid possible expansion. 2003-11-02 Werner Lemberg <wl@gnu.org> * include/freetype/cache/ftcglyph.h: Don't include stddef.h. * include/freetype/freetype.h: Fix check for ft2build.h. 2003-11-01 Werner Lemberg <wl@gnu.org> * include/freetype/freetype.h: Check that ft2build.h has been loaded first. * src/base/fttype1.c (FT_Get_PS_Font_Info): Fix incorrectly applied patch. 2003-10-31 Detlef Würkner <TetiSoft@apg.lahn.de> * src/base/fttype1.c (FT_Get_PS_Font_Info, FT_Has_PS_Glyph_Names): Fix parameter order in calls to FT_FACE_FIND_SERVICE. 2003-10-31 Werner Lemberg <wl@gnu.org> * include/freetype/internal/ftserv.h (FT_SERVICE_POSTSCRIPT_NAMES_H): Removed. Unused. * src/type42/t42drivr.c (t42_services): Updated. 2003-10-29 David Turner <david@freetype.org> * include/freetype/internal/bdftypes.h: Removed. Obsolete. * src/base/ftbdf.c: Updated. * include/freetype/internal/cfftypes.h: Moved to... * src/cff/cfftypes.h: This place since no other module needs to know about those types. * include/freetype/internal/t42types.h: Moved to... * src/type42/t42types.h: This place since no other module needs to know about those types. * include/freetype/internal/services/svbdf.h: Include FT_BDF_H. * include/freetype/internal/services/svpsname.h: Renamed to... * include/freetype/internal/services/svpscmap.h: This. Updated `FT_Service_PsNames' -> `FT_Service_PsCMaps' and `POSTSCRIPT_NAMES' -> `POSTSCRIPT_CMAPS' everywhere. * include/freetype/internal/services/svpsinfo.h: New file, providing PostScript info service. * include/freetype/internal/ftserv.h (FT_SERVICE_POSTSCRIPT_CMAPS_H, FT_SERVICE_POSTSCRIPT_INFO_H): New macros for svpscmap.h and svpsinfo.h. * include/freetype/internal/internal.h (FT_INTERNAL_TYPE42_TYPES_H, FT_INTERNAL_CFF_TYPES_H, FT_INTERNAL_BDF_TYPES_H): Removed. * src/base/fttype1.c: Don't include FT_INTERNAL_TYPE1_TYPES_H and FT_INTERNAL_TYPE42_TYPES_H but FT_INTERNAL_SERVICE_H and FT_SERVICE_POSTSCRIPT_INFO_H. (FT_Get_PS_Font_Info, FT_Has_PS_Glyph_Names): Use new POSTSCRIPT_INFO service. * src/cff/cffdrivr.c: Include FT_SERVICE_POSTSCRIPT_INFO_H. (cff_ps_has_glyph_names): New function. (cff_service_ps_info): New service. (cff_services): Updated. * src/cff/cffload.h, src/cff/cffobjs.h, src/cff/cffparse.h: Don't include FT_INTERNAL_CFF_TYPES_H but cfftypes.h directly. * src/cid/cidriver.c: Include FT_SERVICE_POSTSCRIPT_INFO_H. (cid_ps_get_font_info): New function. (cid_service_ps_info): New service. (cid_services): Updated. * src/type1/t1driver.c: Include FT_SERVICE_POSTSCRIPT_INFO_H. (t1_ps_get_font_info, t1_ps_has_glyph_names): New functions. (t1_service_ps_info): New service. (t1_services): Updated. * src/type42/t42drivr.c: Include FT_SERVICE_POSTSCRIPT_INFO_H. (t42_ps_get_font_info, t42_ps_has_glyph_names): New functions. (t42_service_ps_info): New service. * src/type42/t42objs.h: Don't include FT_INTERNAL_TYPE42_TYPES_H but t42types.h directly. * src/psnames/psmodule.c (psnames_interface, psnames_services): Renamed to... (pscmaps_interface, pscmaps_services): This. Updated all users. * src/gzip/infblock.c (inflate_blocks): Remove compiler warning. 2003-10-22 Werner Lemberg <wl@gnu.org> * src/type1/t1load.c (parse_encoding): Handle `/Encoding [ ... ]'. * src/type1/t1parse.c (T1_Get_Private_Dict): Test whether `eexec' is real. * src/type42/t42parse.c (t42_parse_encoding): Improve boundary checking while parsing. * docs/CHANGES: Updated. 2003-10-21 Josselin Mouette <joss@debian.org> * include/freetype/internal/t1types.h (T1_FontRec): `paint_type' and `stroke_width' aren't pointers. * src/type42/t42objs.c (T42_Face_Done), src/type1/t1objs.c (T1_Face_Done): Don't free `paint_type' and `stroke_width'. 2003-10-20 Graham Asher <graham.asher@btinternet.com> * src/winfonts/winfnt.c (fnt_cmap_class): Fix position of `const'. 2003-10-19 Werner Lemberg <wl@gnu.org> * src/autohint/ahhint.c (ah_hinter_load_glyph): Patch from 2003-08-18 introduced a severe bug (FT_Render_Glyph was called twice under some circumstances, causing strange results). This is fixed now by clearing the FT_LOAD_RENDER bit of `load_flags'. * src/base/ftpfr.c (FT_Get_PFR_Metrics): Initialize `error'. * src/psaux/psobjs.c (ps_tobytes): Initialize `n'. * src/type42/t42parse.c (t42_parse_sfnts): Initialize `string_size'. 2003-10-16 Werner Lemberg <wl@gnu.org> Completely revised Type 42 parser. It now handles both fonts produced with ttftot42 (tested version 0.3.1) and TrueTypeToType42.ps (tested version May 2001; it is necessary to fix the broken header comment to be `%!PS-TrueTypeFont...'). * src/type42/t42objs.c (T42_GlyphSlot_Load): Change fourth parameter to `FT_UInt'. * src/type42/t42objs.h: Updated. * src/type42/t42parse.h (T42_ParserRec): Change type of `in_memory' to FT_Bool. (T42_Loader): Change type of `num_chars' and `num_glyphs' to FT_UInt. Add `swap_table' element. * src/type42/t42parse.c (T42_KEYWORD_COUNT, T1_ToFixed, T1_ToCoordArray, T1_ToTokenArray): Removed. (T1_ToBytes): New macro. (t42_is_alpha, t42_hexval): Removed. (t42_is_space): Handle `\0'. (t42_parse_encoding): Updated to use new PostScript parser routines from psaux. Handle `/Encoding [ ... ]' also. (T42_Load_Status): New enumeration. (t42_parse_sfnts): Updated to use new PostScript parser routines from psaux. (t42_parse_charstrings): Updated to use new PostScript parser routines from psaux. Handle `/CharStrings << ... >>' also. Don't expect that /.notdef is the first element in dictionary. Copy code from type1 module to handle this. (t42_parse_dict): Updated to use new PostScript parser routines from psaux. Remove code for synthetic fonts (which can't occur in Type 42 fonts). (t42_loader_done): Release `swap_table'. * src/psaux/psobjs.c (skip_string): Increase `cur' properly. * src/type1/t1load.c (parse_charstrings): Make test for `.notdef' faster. 2003-10-15 Graham Asher <graham.asher@btinternet.com> * src/autohint/ahglobal.c (blue_chars), src/winfonts/winfnt.c (fnt_cmap_class_rec, fnt_cmap_class), src/bdf/bdflib.c (empty, _num_bdf_properties), src/gzip/infutil.c (inflate_mask), src/gzip/inffixed.h (fixed_bl, fixed_bd, fixed_tl, fixed_td), src/gzip/inftrees.h (inflate_trees_fixed), src/gzip/inftrees.c (inflate_trees_fixed): Decorate with more `const' to avoid writable global variables which are disallowed on ARM. 2003-10-08 Werner Lemberg <wl@gnu.org> * src/type1/t1load.c (parse_font_matrix, parse_charstrings): Remove code specially for synthetic fonts; this is handled elsewhere. (parse_encoding): Remove code specially for synthetic fonts; this is handled elsewhere. Improve boundary checking while parsing. (parse_dict): Improve boundary checking while parsing. Use ft_memcmp to simplify code. 2003-10-07 Werner Lemberg <wl@gnu.org> * src/type1/t1load.c (parse_subrs, parse_dict): Handle synthetic fonts properly. (parse_charstrings): Copy correct number of characters into `name_table'. 2003-10-06 Werner Lemberg <wl@gnu.org> Heavy modification of the PS parser to handle comments and strings correctly. This doesn't slow down the loading of PS fonts significantly since charstrings aren't affected. * include/freetype/config/ftstdlib.h (ft_xdigit): Renamed to... (ft_isxdigit): This. Updated all callers. (ft_isdigit): New alias to `isdigit'. * include/freetype/internal/psaux.h (PS_Parser_FuncsRec): Renamed `skip_alpha' to `skip_PS_token'. Add parameter to `to_bytes' and change some argument types. * src/psaux/psauxmod.c (ps_parser_funcs): Updated. * src/psaux/psobjs.c (ft_char_table): New array to map character codes (ASCII and EBCDIC) of digits to numbers. (OP): New auxiliary macro holding either `>=' or `<' depending on the character encoding. (skip_comment): New function. (skip_spaces): Use it. (skip_alpha): Removed. (skip_literal_string, skip_string): New functions. (ps_parser_skip_PS_token): New function. This is a better replacement of... (ps_parser_skip_alpha): Removed. (ps_parser_to_token, ps_parser_to_token_array): Updated. (T1Radix): Rewritten, using `ft_char_table'. (t1_toint): Renamed to... (ps_toint): This. Update all callers. Use `ft_char_table'. (ps_tobytes): Add parameter to handle delimiters and change some argument types. Use `ft_char_table'. (t1_tofixed): Renamed to... (ps_tofixed): This. Update all callers. Use `ft_char_table'. (t1_tocoordarray): Renamed and updated to... (ps_tocoordarray): This. Update all callers. (t1_tofixedarray): Renamed and updated to... (ps_tofixedarray): This. Update all callers. (t1_tobool): Renamed to... (ps_tobool): This. Update all callers. (ps_parser_load_field): Updated. (ps_parser_load_field_table): Use `T1_MAX_TABLE_ELEMENTS' everywhere. (ps_parser_to_int, ps_parser_to_fixed, ps_parser_to_coord_array, ps_parser_to_fixed_array): Skip spaces. Updated. (ps_parser_to_bytes): Add parameter to handle delimiters and change some argument types. Updated. * src/psaux/psobjs.h: Updated. * src/cid/cidload.c (cid_parse_dict): Updated. * src/cid/cidparse.c (cid_parser_new): Check whether the `StartData' token was really found. * src/cid/cidparse.h (cid_parser_skip_alpha): Updated and renamed to... (cid_parser_skip_PS_token): This. * src/type1/t1parse.h (T1_ParserRec): Use `FT_Bool' for boolean fields. (T1_Skip_Alpha): Replaced with... (T1_Skip_PS_Token): This new macro. * src/type1/t1parse.c (hexa_value): Removed. (T1_Get_Private_Dict): Use `ft_isxdigit' and `psaux->ps_parser_funcs_to_bytes' for handling ASCII hexadecimal encoding. After decrypting, replace the four random bytes at the beginning with whitespace. * src/type1/t1load.c (t1_allocate_blend): Use proper error values. (parser_blend_design_positions, parse_blend_design_map, parse_weight_vector): Updated. (is_space): Handle `\f' also. (is_name_char): Removed. (read_binary_data): Updated. (parse_encoding): Use `ft_isdigit'. Updated. (parse_subrs): Updated. (TABLE_EXTEND): New macro. (parse_charstrings): Updated. Provide a workaround for buggy fonts which have more entries in the /CharStrings dictionary then expected; the function now adds some slots and skips entries which still exceed the new limit. (parse_dict): Updated. Terminate on the token `closefile'. * src/type42/t42parse.c (T1_Skip_Alpha): Replaced with... (T1_Skip_PS_Token): This new macro. Updated all callers. (t42_parse_encoding): Use `ft_isdigit'. * src/base/ftmm.c (ft_face_get_mm_service): Return FT_Err_Ok if success. 2003-10-05 Werner Lemberg <wl@gnu.org> * include/freetype/ftmodule.h: Renamed to... * include/freetype/ftmodapi.h: This to avoid duplicate file names. * include/freetype/config/ftheader.h (FT_MODULE_H): Updated. 2003-10-04 Werner Lemberg <wl@gnu.org> * src/base/ftoutln.c (FT_OrientationExtremumRec, FT_Outline_Get_Orientation): Trivial typo fixes to make it compile. 2003-10-02 Markus F.X.J. Oberhumer <markus@oberhumer.com> * src/winfonts/winfnt.c (FT_WinFNT_HeaderRec): `color_table_offset' has four bytes, not two. Fix all users. (fnt_font_load, FNT_Load_Glyph): Add more font validity tests. 2003-10-01 David Turner <david@freetype.org> * src/autofit/*: Adding first source files of the new multi-script `auto-fitter'. * include/freetype/ftoutln.h (FT_Orientation): New enumeration. (FT_Outline_Get_Orientation): New declaration. * src/base/ftoutln.c (FT_OrientationExtremumRec): New structure. (ft_orientation_extremum_compute): New auxiliary function. (FT_Outline_Get_Orientation): New function to compute the fill orientation of a given glyph outline. * include/freetype/internal/ftserv.h (FT_FACE_LOOKUP_SERVICE): Fixed trivial bug which could crash the font engine when a cached service pointer was retrieved. 2003-09-30 Werner Lemberg <wl@gnu.org> * src/cid/cidload.c (cid_parse_dict): Skip token if no keyword is found. * src/type1/t1parse.c (IS_T1_WHITESPACE, IS_T1_LINESPACE, IS_T1_SPACE): Removed. (PFB_Tag): Removed. (read_pfb_tag): Don't use PFB_Tag. * src/type42/t42parse.c (t42_is_space): Handle `\f' also. (t42_parse_encoding): Handle synthetic fonts. 2003-09-29 Werner Lemberg <wl@gnu.org> * include/freetype/internal/t1types.h: Don't include FT_INTERNAL_OBJECTS_H but FT_INTERNAL_SERVICE_H. * src/truetype/ttobjs.c: Don't include FT_SERVICE_POSTSCRIPT_NAMES_H. 2003-09-29 David Turner <david@freetype.org> Added new service to handle glyph name dictionaries, replacing the old internal header named `psnames.h' by `services/svpsname.h'. Note that this is different from `services/svpostnm.h' which only handles the retrieval of PostScript font names for a given face. (Should we merge these two services into a single header?) * include/freetype/internal/psnames.h: Removed. Most of its contents is moved to... * include/freetype/internal/services/svpsname.h: New file. * include/freetype/internal/services/svpostnm.h (FT_SERVICE_ID_POSTSCRIPT_NAME): Replaced with... (FT_SERVICE_ID_POSTSCRIPT_FONT_NAME): New macro. (PsName): Service named changed to... (PsFontName): This. Updated `FT_Service_PsName' -> `FT_Service_PsFontName' and `POSTSCRIPT_NAME' -> `POSTSCRIPT_FONT_NAME' everywhere. * include/freetype/internal/internal.h (FT_INTERNAL_POSTSCRIPT_NAMES_H): Removed. * include/freetype/internal/psaux.h: Include FT_SERVICE_POSTSCRIPT_NAMES_H. (T1_DecoderRec): Updated type of `psnames'. * include/freetype/internal/t1types.h: Don't include FT_INTERNAL_POSTSCRIPT_NAMES_H but FT_SERVICE_POSTSCRIPT_NAMES_H. Include FT_INTERNAL_OBJECTS_H. * include/freetype/internal/t42types.h: Don't include FT_INTERNAL_POSTSCRIPT_NAMES_H. * include/freetype/internal/tttypes.h (TT_FaceRec): Updated. * include/freetype/internal/ftserv.h (FT_FACE_FIND_SERVICE): Changed order of parameters. All callers updated. (FT_FACE_FIND_GLOBAL_SERVICE): New macro to look up a service globally, checking all modules. (FT_ServiceCacheRec): Updated. (FT_SERVICE_POSTSCRIPT_NAMES_H): New macro for accessing `svpsname.h'. * include/freetype/internal/ftobjs.h, src/base/ftobjs.c (ft_module_get_service): New function. * src/cff/cffdrivr.c: Don't include FT_INTERNAL_POSTSCRIPT_NAMES_H but FT_SERVICE_POSTSCRIPT_NAMES_H. (cff_get_glyph_name, cff_get_name_index): Use new POSTSCRIPT_NAMES service. * src/cff/cffcmap.c (cff_cmap_unicode_init): Updated. * src/cff/cffload.c, src/cff/cffload.h: Don't include FT_INTERNAL_POSTSCRIPT_NAMES_H but FT_SERVICE_POSTSCRIPT_NAMES_H. (cff_index_get_sid_string): Updated. * src/cff/cffobjs.c: Don't include FT_INTERNAL_POSTSCRIPT_NAMES_H but FT_SERVICE_POSTSCRIPT_NAMES_H. (cff_face_init): Use new POSTSCRIPT_NAMES service. * src/cff/cffobjs.h: Don't include FT_INTERNAL_POSTSCRIPT_NAMES_H but FT_SERVICE_POSTSCRIPT_NAMES_H. * src/cid/cidobjs.c: Don't include FT_INTERNAL_POSTSCRIPT_NAMES_H but FT_SERVICE_POSTSCRIPT_NAMES_H. (cid_face_init): Use new POSTSCRIPT_NAMES service. * src/cid/cidriver.c: Don't include FT_INTERNAL_POSTSCRIPT_NAMES_H. * src/psaux/t1cmap.c (t1_cmap_std_init, t1_cmap_unicode_init): Use new POSTSCRIPT_NAMES service. * src/psaux/t1decode.h (t1_lookup_glyph_by_stdcharcode, t1_decode_init): Use new POSTSCRIPT_NAMES service. * src/psaux/t1cmap.h, src/psaux/t1decode.h: Don't include FT_INTERNAL_POSTSCRIPT_NAMES_H. * src/psnames/psmodule.c: Don't include FT_INTERNAL_POSTSCRIPT_NAMES_H but FT_SERVICE_POSTSCRIPT_NAMES_H. (ps_build_unicode_table): Renamed to... (ps_unicodes_init): This. (ps_lookup_unicode): Renamed to... (ps_unicodes_char_index): This. (ps_next_unicode): Renamed to... (ps_unicodes_char_next): This. (psnames_interface): Updated. (psnames_services): New services list. (psnames_get_service): New function. (psnames_module_class): Updated. * src/sfnt/sfobjs.c: Don't include FT_INTERNAL_POSTSCRIPT_NAMES_H but FT_SERVICE_POSTSCRIPT_NAMES_H. (sfnt_init_face): Use new POSTSCRIPT_NAMES service. * src/sfnt/ttpost.c: Don't include FT_INTERNAL_POSTSCRIPT_NAMES_H but FT_SERVICE_POSTSCRIPT_NAMES_H. (tt_face_get_ps_name): Updated. * src/truetype/ttobjs.c: Don't include FT_INTERNAL_POSTSCRIPT_NAMES_H but FT_SERVICE_POSTSCRIPT_NAMES_H. * src/type1/t1driver.c: Don't include FT_INTERNAL_POSTSCRIPT_NAMES_H but FT_SERVICE_POSTSCRIPT_NAMES_H. * src/type1/t1objs.c: Don't include FT_INTERNAL_POSTSCRIPT_NAMES_H but FT_SERVICE_POSTSCRIPT_NAMES_H. (T1_Face_Init): Use new POSTSCRIPT_NAMES service. * src/type42/t42drivr.c (t42_get_ps_name): Renamed to... (t42_get_ps_font_name): This. (t42_service_ps_name): Renamed to... (t42_service_ps_font_name): This. (t42_services): Updated. * src/type42/t42objs.c (T42_Face_Init): Use new POSTSCRIPT_NAMES service. * src/type42/t42objs.h: Don't include FT_INTERNAL_POSTSCRIPT_NAMES_H but FT_SERVICE_POSTSCRIPT_NAMES_H. * src/base/ftglyph.c (FT_Get_Glyph): Don't access `slot' before testing its validity. Reported by Henry Maddocks <maddocks@metservice.com>. 2003-09-21 Werner Lemberg <wl@gnu.org> * include/freetype/internal/ftserv.h (FT_FACE_FIND_SERVICE): Fix compilation warning (s/pptr/Pptr/). * include/freetype/internal/internal.h (FT_INTERNAL_PFR_H, FT_INTERNAL_FNT_TYPES_H): Removed. 2003-09-21 David Turner <david@freetype.org> Migrating the PFR and WINFNT drivers to the new service-based internal API. * include/freetype/internal/fnttypes.h: Removed. Most of its data are moved to winfnt.h and... * include/freetype/internal/services/svwinfnt.h: New file. * include/freetype/internal/pfr.h: Removed. Most of its data are moved to... * include/freetype/internal/services/svpfr.h: New file. * include/freetype/internal/ftserv.h (FT_FACE_FIND_SERVICE, FT_FACE_LOOKUP_SERVICE): Simplify fix of 2003-09-16 by removing pointer type argument. Updated all callers. Update macro names of services header files. * src/base/ftobjs.c (FT_Get_Name_Index): Simplified code. * src/base/ftpfr.c: Include FT_SERVICE_PFR_H instead of FT_INTERNAL_PFR_H. (ft_pfr_check, FT_Get_PFR_Metrics, FT_Get_PFR_Kerning, FT_Get_PFR_Advance): Use services provided in `PFR_METRICS'. * src/base/ftwinfnt.c: Include FT_SERVICE_WINFNT_H instead of FT_INTERNAL_FNT_TYPES_H. (FT_Get_WinFNT_Header): Use service provided in `WINFNT'. * src/pfr/pfrdrivr.c: Include FT_SERVICE_PFR_H and FT_SERVICE_XFREE86_NAME_H instead of FT_INTERNAL_PFR_H. (pfr_service_bdf): Updated. (pfr_services): New services list. (pfr_get_service): New function. (pfr_driver_class): Updated. * src/winfonts/winfnt.c: Include FT_SERVICE_WINFNT_H and FT_SERVICE_XFREE86_NAME_H instead of FT_INTERNAL_FNT_TYPES_H. (winfnt_get_header, winfnt_get_service): New functions. (winfnt_service_rec): New structure providing WINFNT services. (winfnt_services): New services list. (winfnt_driver_class): Updated. * src/winfonts/winfnt.h: Add most of the removed fnttypes.h data. * src/sfnt/sfdriver.c (sfnt_service_ps_name): Fix typo. * src/type1/t1driver.c (t1_service_ps_name): Fix typo. * src/cff/cffobjs.c, src/cid/cidobjs.c, src/pfr/pfrsbit.c, src/psaux/psobjs.c, src/sfnt/sfobjs.c, src/truetype/ttobjs.c, src/type1/t1objs.c, src/type42/t42objs.c: Removing various compiler warnings. 2003-09-19 David Bevan <dbevan@emtex.com> * src/type1/t1parse.c (pfb_tag_fields): Removed. (read_pfb_tag): Fix code so that it doesn't fail on end-of-file indicator (0x8003). * docs/CHANGES: Updated. 2003-09-16 Werner Lemberg <wl@gnu.org> * include/freetype/internal/ftserv.h (FT_FACE_FIND_SERVICE, FT_FACE_LOOKUP_SERVICE): Add parameter to pass pointer type. Ugly, I know, but this is needed for compilation with C++ -- maybe someone knows a better solution? Updated all callers. * src/base/ftobjs.c (FT_Get_Name_Index, FT_Get_Glyph_Name): Remove C++ compiler warnings. * src/base/ftbdf.c (FT_Get_BDF_Charset_ID, FT_Get_BDF_Property): Fix order of arguments passed to FT_FACE_FIND_SERVICE. 2003-09-15 Werner Lemberg <wl@gnu.org> Avoid header files with identical names. * include/freetype/internal/services/bdf.h: Renamed to... * include/freetype/internal/services/svbdf.h: This. Add copyright notice. * include/freetype/internal/services/glyfdict.h: Renamed to... * include/freetype/internal/services/svgldict.h: This. Add copyright notice. * include/freetype/internal/services/multmast.h: Renamed to... * include/freetype/internal/services/svmm.h: This. Add copyright notice. Add FT_BEGIN_HEADER and FT_END_HEADER. * include/freetype/internal/services/sfnt.h: Renamed to... * include/freetype/internal/services/svsfnt.h: This. Add copyright notice. * include/freetype/internal/services/postname.h: Renamed to... * include/freetype/internal/services/svpostnm.h: This. Add copyright notice. * include/freetype/internal/services/xf86name.h: Renamed to... * include/freetype/internal/services/svxf86nm.h: This. Add copyright notice. * include/freetype/internal/ftserv.h: Add FT_BEGIN_HEADER and FT_END_HEADER. Add copyright notice. Update macro names of services header files. * builds/freetype.mk (SERVICES_DIR): New variable. (BASE_H): Add services header files. 2003-09-11 Werner Lemberg <wl@gnu.org> * builds/toplevel.mk (distclean): Remove `builds/unix/freetype2.pc'. * src/cff/cffdrivr.c: Don't load headers twice. * include/freetype/internal/ftserv.h (FT_SERVICE_SFNT_H): New macro. * src/base/ftobjs.c: Include FT_SERVICE_SFNT_H. * src/cff/cffcmap.c: Include `cfferrs.h'. * src/pfr/pfrdrivr.c: Include `pfrerror.h'. * src/sfnt/sfdriver.c: Include `sferrors.h'. * src/psaux/psobjs.h: Add declaration for `ps_parser_to_bytes'. 2003-09-11 David Turner <david@freetype.org> Introducing the concept of `module services'. This is the first step towards a massive simplification of the engine's internals, in order to get rid of various numbers of hacks. Note that these changes will break source & binary compatibility for authors of external font drivers. * include/freetype/config/ftconfig.h (FT_BEGIN_STMNT, FT_END_STMNT, FT_DUMMY_STMNT): New macros. * include/freetype/internal/ftserv.h: New file, containing the new structures and macros to provide `services'. * include/freetype/internal/internal.h (FT_INTERNAL_EXTENSION_H, FT_INTERNAL_EXTEND_H, FT_INTERNAL_HASH_H, FT_INTERNAL_OBJECT_H): Removed, obsolete. (FT_INTERNAL_SERVICE_H): New macro for `ftserv.h'. * include/freetype/internal/services/bdf.h, include/freetype/internal/services/glyfdict.h, include/freetype/internal/services/postname.h, include/freetype/internal/services/xf86name.h: New files. * include/freetype/ftmm.h (FT_Get_MM_Func, FT_Set_MM_Design_Func, FT_Set_MM_Blend_Func): Function pointers moved (in modified form) to... * include/freetype/internal/services/multmast.h: New file. * include/freetype/internal/sfnt.h (SFNT_Interface): `get_interface' is now of type `FT_Module_Requester'. (SFNT_Get_Interface_Func, SFNT_Load_Table_Func): Function pointers moved (in modified form) to... * include/freetype/internal/services/sfnt.h: New file. * include/freetype/tttables.h (FT_Get_Sfnt_Table_Func): Function pointer moved (in modified form) to `services/sfnt.h'. * include/freetype/ftmodule.h (FT_Module_Interface): Make it a a typedef to `FT_Pointer'. * include/freetype/internal/tttypes.h (TT_FaceRec): Add `postscript_name'. * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): Remove `postscript_name'. Add `services' element. (FT_LibraryRec): Remove `meta_class'. * src/base/ftbdf.c: Include FT_SERVICE_BDF_H. (test_font_type): Removed. (FT_Get_BDF_Charset_ID, FT_Get_BDF_Property): Use services provided in `FT_SERVICE_ID_BDF'. * src/base/ftmm.c: Include FT_SERVICE_MULTIPLE_MASTERS_H. (ft_face_get_mm_service): New auxiliary function to get services from `FT_SERVICE_ID_MULTI_MASTERS'. (FT_Get_Multi_Master, FT_Set_MM_Design_Coordinates, FT_Set_MM_Blend_Coordinates): Use `ft_face_get_mm_service'. * src/base/ftobjs.c: Include FT_SERVICE_POSTSCRIPT_NAME_H and FT_SERVICE_GLYPH_DICT_H. (ft_service_list_lookup): New function to get a specific service. (destroy_face): Updated. (Mac_Read_POST_Resource): Simplify some code. (IsMacResource): Fix warnings. (FT_Get_Name_Index, FT_Get_Glyph_Name): Use services provided in `FT_SERVICE_ID_GLYPH_DICT'. (FT_Get_Postscript_Name): Use service provided in `FT_SERVICE_ID_POSTSCRIPT_NAME'. (FT_Get_Sfnt_Table, FT_Load_Sfnt_Table): Use services provided in `FT_SERVICE_ID_SFNT_TABLE'. * src/base/ftxf86.c: Include FT_SERVICE_XFREE86_NAME_H. (FT_Get_X11_Font_Format): Use service provided in `FT_SERVICE_ID_XF86_NAME'. * src/bdf/bdfdrivr.c: Include FT_SERVICE_BDF_H and FT_SERVICE_XFREE86_NAME_H. (bdf_get_charset_id): New function. (bdf_service_bdf): New structure providing BDF services. (bdf_services): New services list. (bdf_driver_requester): Use `ft_service_list_lookup'. * src/cff/cffdrivr.c: Include FT_SERVICE_XFREE86_NAME_H and FT_SERVICE_GLYPH_DICT_H. (cff_service_glyph_dict): New structure providing CFF services. (cff_services): New services list. (cff_get_interface): Use `ft_service_list_lookup'. * src/cid/cidriver.c: Include FT_SERVICE_POSTSCRIPT_NAME_H and FT_SERVICE_XFREE86_NAME_H. (cid_service_ps_name): New structure providing CID services. (cid_services): New services list. (cid_get_interface): Use `ft_service_list_lookup'. * src/pcf/pcfdrivr.c: Include FT_SERVICE_BDF_H and FT_SERVICE_XFREE86_NAME_H. (pcf_service_bdf): New structure providing PCF services. (pcf_services): New services list. (pcf_driver_requester): Use `ft_service_list_lookup'. * src/sfnt/sfdriver.c: Include FT_SERVICE_GLYPH_DICT_H and FT_SERVICE_POSTSCRIPT_NAME_H. (get_sfnt_glyph_name): Renamed to... (sfnt_get_glyph_name): This. (get_sfnt_postscript_name): Renamed to... (sfnt_get_ps_name): This. Updated. (sfnt_service_glyph_dict, sfnt_service_ps_name): New structures providing services. (sfnt_services): New services list. (sfnt_get_interface): Use `ft_service_list_lookup'. * src/truetype/ttdriver.c: Include FT_SERVICE_XFREE86_NAME_H. (tt_services): New services list. (tt_get_interface): Use `ft_service_list_lookup'. * src/type1/t1driver.c: Include FT_SERVICE_MULTIPLE_MASTERS_H, FT_SERVICE_GLYPH_DICT_H, FT_SERVICE_XFREE86_NAME_H, and FT_SERVICE_POSTSCRIPT_NAME_H. (t1_service_glyph_dict, t1_service_ps_name, t1_service_multi_masters): New structures providing Type 1 services. (t1_services): New services list. (Get_Interface): Use `ft_service_list_lookup'. * src/type42/t42drivr.c: Include FT_SERVICE_XFREE86_NAME_H, FT_SERVICE_GLYPH_DICT_H, and FT_SERVICE_POSTSCRIPT_NAME_H. (t42_service_glyph_dict, t42_service_ps_name): New structures providing Type 42 services. (t42_services): New services list. (T42_Get_Interface): Use `ft_service_list_lookup'. * README, docs/CHANGES: Updating version numbers for 2.1.6, and removing obsolete warnings in the documentation. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 6. * builds/unix/configure.ac (version_info): Set to 9:5:3. * builds/unix/configure: Regenerated. * include/freetype/internal/ftcore.h, include/freetype/internal/ftexcept.h, include/freetype/internal/fthash.h, include/freetype/internal/ftobject.h: Removed. Obsolete. 2003-09-09 David Turner <david@freetype.org> Fixing PFR kerning support. The tables within the font file contain (charcode,charcode) kerning pairs, we need to convert them to (gindex,gindex). * src/base/ftpfr.c (ft_pfr_check): Fix serious typo. * src/pfr/pfrload.c: Remove dead code. (pfr_get_gindex, pfr_compare_kern_pairs, pfr_sort_kerning_pairs): New functions. (pfr_phy_font_done): Free `kern_pairs'. (pfr_phy_font_load): Call `pfr_sort_kerning_pairs'. * src/pfr/pfrobjs.c (pfr_face_get_kerning): Fix kerning extraction. * src/pfr/pfrtypes.h (PFR_KERN_PAIR_INDEX): New macro. (PFR_KernPairRec): Make `kerning' an FT_Int. (PFR_PhyFontRec): New element `kern_pairs'. (PFR_KernFlags): Values of PFR_KERN_2BYTE_CHAR and PFR_KERN_2BYTE_ADJ were erroneously reversed. * include/freetype/ftoption.h: Commenting out the macro TT_CONFIG_OPTION_BYTECODE_INTERPRETER. 2003-09-02 David Turner <david@freetype.org> * Version 2.1.5 released. ========================= 2003-08-31 Manish Singh <yosh@gimp.org> * src/bdf/bdflib.c (_bdf_readstream): Don't use FT_MEM_COPY but FT_MEM_MOVE. 2003-08-30 Werner Lemberg <wl@gnu.org> * include/freetype/freetype.h (FT_ENCODING_SJIS, FT_ENCODING_GB2312, FT_ENCODING_BIG5, FT_ENCODING_WANSUNG, FT_ENCODING_JOHAB): New enumerations of FT_Encoding. The FT_ENCODING_MS_* variants except FT_ENCODING_MS_SYMBOL are now deprecated. Updated all users. * docs/CHANGES: Document it. 2003-08-27 Werner Lemberg <wl@gnu.org> * src/bdf/bdfdrivr.c (BDF_Face_Init): Accept lowercase characters for spacing. 2003-08-27 Mike FABIAN <mfabian@suse.de> * src/pcf/pcfread.c (pcf_load_font), src/bdf/bdfdrivr.c (BDF_Face_Init): Accept lowercase characters for slant and weight. 2003-08-18 David Turner <david@freetype.org> * include/freetype/config/ftoption.h: Disabling TrueType bytecode interpreter until the UNPATENTED_HINTING works as advertised. * src/autohint/ahhint.c (ah_hinter_load_glyph): Use `|' for setting `load_flags'. * Jamfile: Adding the `refdoc' target to the Jamfile in order to build the API Reference in `docs/reference' automatically. * include/freetype/t1tables.h (PS_FontInfoRec), src/cid/cidtoken.h, src/type1/t1tokens.h, src/type42/t42parse.c: Resetting the types of `italic_angle', `underline_position', and `underline_thickness' to their previous values (i.e., long, short, and ushort) in order to avoid breaking binary compatibility. * include/freetype/ttunpat.h: Fixing documentation comment. * include/freetype/config/ftoption.h, devel/ftoption.h (TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING): Replaced with... (TT_CONFIG_OPTION_UNPATENTED_HINTING): This. Updated all users. (TT_CONFIG_OPTION_FORCE_UNPATENTED_HINTING): Removed. * include/freetype/internal/ftobjs.h (FT_DEBUG_HOOK_TYPE1): Removed. (FT_DEBUG_HOOK_UNPATENTED_HINTING): New macro. Use this with `FT_Set_Debug_Hook' to get the same effect as the removed TT_CONFIG_OPTION_FORCE_UNPATENTED_HINTING. * src/truetype/ttobjs.c (tt_face_init): Use `FT_DEBUG_HOOK_UNPATENTED_HINTING'. 2003-08-06 Werner Lemberg <wl@gnu.org> * src/type1/t1gload.c (T1_Load_Glyph), src/cff/cffgload.c (cff_slot_load), src/cid/cidgload.c (cid_slot_load_glyph): Fix previous change. 2003-08-05 Werner Lemberg <wl@gnu.org> * src/type1/t1gload.c (T1_Load_Glyph), src/cff/cffgload.c (cff_slot_load), src/cid/cidgload.c (cid_slot_load_glyph): Apply font matrix to advance width also. * docs/CHANGES: Updated. 2003-07-26 Werner Lemberg <wl@gnu.org> * builds/unix/configure.ac (version_info): Set to 9:4:3. * builds/unix/configure: Updated. * docs/CHANGES, docs/VERSION.DLL: Updated. * include/freetype/freetype.h (FT_GlyphSlot): Change 2003-06-16 also breaks binary compatibility. Reintroduce an unsigned integer at the old position of `flags' called `reserved'. 2003-07-25 Werner Lemberg <wl@gnu.org> Make API reference valid HTML 4.01 transitional. * src/tools/docmaker/tohtml.py (html_header_1): Add doctype and charset. (html_header_2): Fix style elements and add some more. Fix syntax. (block_header, block_footer, description_header, description_footer, marker_header, marker_footer, source_header, source_footer, chapter_header): Don't use <center>...</center> but `align=center' table attribute. (chapter_inter, chapter_footer): Add <li> and use special <ul> class. Use double quotes around table widths given in percent. (keyword_prefix, keyword_suffix): Don't change font color directly but use a new <span> class. (section_synopsis_header, section_synopsis_footer): Don't change color. (code_header, code_footer): Don't change font color directly but use a special <pre> class. (print_html_field): <tr> gets the `valign' attribute, not <table>. (print_html_field_list): Ditto. (index_exit): Don't use <center>...</center> but `align=center' table attribute. (section_enter): Ditto. (toc_exit): Don't emit </table>. (block_enter): Use <h4><a>, not <a><h4>. (__init__): Fix tag order in self.html_footer. 2003-07-25 David Turner <david@freetype.org> This change reimplements fix from 2003-05-30 without breaking binary compatibility. * include/freetype/t1tables.h (PS_FontInfoRec): `italic_angle', `is_fixed_pitch', `underline_position', `underline_thickness' are reverted to be normal values. * include/freetype/internal/psaux.h (T1_FieldType): Remove `T1_FIELD_TYPE_BOOL_P', `T1_FIELD_TYPE_INTEGER_P', `T1_FIELD_TYPE_FIXED_P', `T1_FIELD_TYPE_FIXED_1000_P'. (T1_FIELD_TYPE_BOOL_P, T1_FIELD_NUM_P, T1_FIELD_FIXED_P, T1_FIELD_FIXED_1000_P): Removed. (T1_FIELD_TYPE_BOOL): Renamed to... (T1_FIELD_BOOL): New macro. Updated all callers. * src/type42/t42parse.c: `italic_angle', `is_fixed_pitch', `underline_position', `underline_thickness', `paint_type', `stroke_width' are reverted to be normal values. (T42_KEYWORD_COUNT): New macro. (t42_parse_dict): New array `keyword_flags' to mark that a value has already been assigned to a dictionary entry. * src/type42/t42objs.c (T42_Face_Init, T42_Face_Done): Updated. * src/cid/cidtoken.h: `italic_angle', `is_fixed_pitch', `underline_position', `underline_thickness' are reverted to be normal values. * src/cid/cidobjs.c (cid_face_done, cid_face_init): Updated. * src/psaux/psobjs.c (ps_parser_load_field): Updated. * src/type1/t1tokens.h: `italic_angle', `is_fixed_pitch', `underline_position', `underline_thickness', `paint_type', `stroke_width' are reverted to be normal values. * src/type1/t1objs.c (T1_Face_Done, T1_Face_Init): Updated. * src/type1/t1load.c (T1_FIELD_COUNT): New macro. (parse_dict): Add parameter for keyword flags. Record only first instance of a field. (T1_Open_Face): New array `keyword_flags'. 2003-07-24 Werner Lemberg <wl@gnu.org> * include/freetype/freetype.h (FREETYPE_PATCH): Set to 5. * builds/unix/configure.ac (version_info): Set to 10:0:3. * builds/unix/configure: Updated. * builds/freetype.mk (refdoc): Fix --title. * docs/CHANGES, docs/VERSION.DLL, README: Updated. * src/tools/docmaker/sources.py (re_crossref): Fix regular expression to handle trailing punctuation characters. * src/tools/docmaker/tohtml.py (make_html_word): Updated. * docs/release: New file. 2003-07-23 YAMANO-UCHI Hidetoshi <mer@din.or.jp> * include/freetype/internal/psaux.h (PS_Parser_FuncsRec): New member function `to_bytes'. * src/psaux/psauxmod.c (ps_parser_funcs): New member `ps_parser_to_bytes'. (psaux_module_class): Increase version to 0x20000L. * src/psaux/psobjs.c (IS_T1_LINESPACE): Add \f. (IS_T1_NULLSPACE): New macro. (IS_T1_SPACE): Add it. (skip_spaces, skip_alpha): New functions. (ps_parser_skip_spaces, ps_parser_skip_alpha): Use them. (ps_tobytes, ps_parser_to_bytes): New functions. 2003-07-07 Werner Lemberg <wl@gnu.org> * builds/freetype.mk (DOC_DIR): New variable. (refdoc): Use *_DIR variables. (distclean): Remove documentation files. * builds/detect.mk (std_setup, dos_setup): Mention `make refdoc'. * configure: Set DOC_DIR variable. 2003-07-07 Patrik Hägglund <patrik.hagglund@bredband.net> * builds/freetype.mk (refdoc): New target to build the documentation. (.PHONY): Updated. * include/freetype/freetype.h: Improve documentation of FT_CharMap. * include/freetype/ftimage,h: Fix documentation of FT_OUTLINE_FLAGS. * include/freetype/tttables.h: Document FT_Sfnt_Tag. 2003-07-06 Werner Lemberg <wl@gnu.org> * src/bdf/bdfdrivr.c (BDF_Face_Init), src/pcf/pcfread.c (pcf_load_font): Fix computation of height if PIXEL_SIZE property is missing. 2003-07-01 Werner Lemberg <wl@gnu.org> * src/cache/ftcsbits.c (ftc_sbit_node_compare): Only add `size' if there is no error. Reported by Knut St. Osmundsen <bird-freetype@anduin.net>. 2003-06-30 Werner Lemberg <wl@gnu.org> A new try to synchronize bitmap font access. * include/freetype/freetype.h (FT_Bitmap_Size): `height' is now defined to return the baseline-to-baseline distance. This was already the value returned by the BDF and PCF drivers. The `width' field now gives the average width. I wasn't able to find something better. It should be taken as informative only. New fields `size', `x_ppem', and `y_ppem'. * src/pcf/pcfread.c (pcf_load_font): Updated to properly fill FT_Bitmap_Size. Do proper rounding and conversion from 72.27 to 72 points. * src/bdf/bdfdrivr.c (BDF_Face_Init): Updated to properly fill FT_Bitmap_Size. Do proper rounding and conversion from 72.27 to 72 points. * src/sfnt/sfobjs.c (sfnt_load_face): Updated to properly fill FT_Bitmap_Size. * src/winfonts/winfnt.c (FNT_Face_Init): Updated to properly fill FT_Bitmap_Size. 2003-06-29 Werner Lemberg <wl@gnu.org> Redesigning the FNT driver to return multiple faces, not multiple strikes. At least one font (app850.fon from WinME) contains different FNT charmaps for its subfonts. Consequently, the previous design of having multiple bitmap strikes in a single font face fails since we have only one charmap per face. * include/freetype/internal/fnttypes.h (FNT_Size_Rec): Removed. (FNT_FaceRec): Remove `num_fonts' field and replace `fonts' with `font'. * src/base/ftwinfnt.c (FT_Get_WinFNT_Header): Updated. * src/winfonts/winfnt.c (fnt_font_load): Don't set pixel_width equal to pixel_height. (fnt_face_done_fonts): Removed. (fnt_face_get_dll_fonts): Renamed to... (fnt_face_get_dll_font): This. Add second function argument to select face index. Updated to load just one subfont. (fnt_font_done, FNT_Face_Done): Updated. (FNT_Face_Init): Handle `face_index'. Updated. (FNT_Size_Set_Pixels): Simplified; similar to BDF and PCF, the bitmap width is now ignored. (FNT_Load_Glyph): Updated. Fix glyph index computation. (winfnt_driver_class): Updated. 2003-06-25 Owen Taylor <otaylor@redhat.com> * src/sfnt/ttload.c (tt_face_load_hdmx): Don't assign num_records until we actually decide to load the table, otherwise, we'll segfault in tt_face_free_hdmx. 2003-06-24 Werner Lemberg <wl@gnu.org> * src/cff/cffdrivr.c (cff_get_glyph_name): Protect against zero glyph name pointer. Reported by Mikey Anbary <manbary@vizrt.com>. 2003-06-23 Werner Lemberg <wl@gnu.org> * src/tools/glnames.py: Updated to AGL 2.0. * src/psnames/pstables.h: Regenerated. 2003-06-22 Werner Lemberg <wl@gnu.org> * include/freetype/cache/ftcglyph.h, include/freetype/ttnameid.h, src/base/ftcalc.c, src/base/fttrigon.c, src/cff/cffgload.c, src/otlayout/otlgsub.c, src/pshinter/pshrec.c, src/psnames/psmodule.c, src/sfnt/sfobjs.c, src/truetype/ttdriver.c: Decorate constants with `U' and `L' if appropriate. * include/freetype/ftmoderr.h: Updated to include recent module additions. * src/pshinter/pshnterr.h (FT_ERR_BASE): Define as `FT_Mod_Err_PShinter'. * src/type42/t42error.h (FT_ERR_BASE): Define as `FT_Mod_Err_Type42'. * src/pshinter/pshrec.h (PS_HINTS_MAGIC): Removed. Not used. * include/freetype/config/ftconfig.h [__MWERKS__]: Define FT_LONG64 and FT_INT64. 2003-06-21 Werner Lemberg <wl@gnu.org> * src/winfonts/winfnt.c (FNT_Load_Glyph): Use first_char in computation of glyph_index. (FNT_Size_Set_Pixels): To find a strike, first check pixel_height only, then try to find a better hit by comparing pixel_width also. Without this fix it isn't possible to access all strikes. Also compute metrics.max_advance to be in sync with other bitmap drivers. * src/base/ftobjs.c (FT_Set_Char_Size): Remove redundant code. (FT_Set_Pixel_Sizes): Assign value to `metrics' after validation of arguments. 2003-06-20 Werner Lemberg <wl@gnu.org> Synchronize computation of height and width for bitmap strikes. The `width' field in the FT_Bitmap_Size structure is now only useful to enumerate different strikes. The `max_advance' field of the FT_Size_Metrics structure should be used to get the (maximum) width of a strike. * src/bdf/bdfdrivr.c (BDF_Face_Init): Don't use AVERAGE_WIDTH for computing `available_sizes->width' but make it always equal to `available_sizes->height'. * src/pcf/pcfread.c (pcf_load_font): Don't use RESOLUTION_X for computing `available_sizes->width' but make it always equal to `available_sizes->height'. * src/truetype/ttdriver.c (Set_Pixel_Sizes): Pass only single argument to function. * src/psnames/psmodule.c (ps_unicode_value): Handle `.' after `uniXXXX' and `uXXXX[X[X]]'. 2003-06-19 Werner Lemberg <wl@gnu.org> * src/bdf/bdfdrivr.c: s/FT_Err_/BDF_Err/. * src/cache/ftccache.c, src/cache/ftcsbits.c, src/cache/ftlru.c: s/FT_Err_/FTC_Err_/. * src/cff/cffcmap.c: s/FT_Err_/CFF_Err_/. * src/pcf/pcfdrivr.c: s/FT_Err_/PCF_Err_/. * src/psaux/t1cmap.c: Include psauxerr.h. s/FT_Err_/PSaux_Err_/. * src/pshinter/pshnterr.h: New file. * src/pshinter/rules.mk: Updated. * src/pshinter/pshalgo.c, src/pshinter/pshrec.c: Include pshnterr.h. s/FT_Err_/PSH_Err_/. * src/pfr/pfrdrivr.c, src/pfr/pfrobjs.c, src/pfr/pfrsbit.c: s/FT_Err_/PFR_Err_/. * src/sfnt/sfdriver.c, src/sfnt/sfobjs.c, src/sfnt/ttcmap0.c, src/sfnt/ttload.c: s/FT_Err_/SFNT_Err_/. * src/truetype/ttgload.c: s/FT_Err_/TT_Err_/. * src/gzip/ftgzip.c: Load FT_MODULE_ERRORS_H and define FT_ERR_PREFIX and FT_ERR_BASE. s/FT_Err_/Gzip_Err_/. 2003-06-19 Dirck Blaskey <listtarget@danbala.com> * src/cff/cffload (cff_encoding_load): `nleft' must be FT_UInt, otherwise adding 1 might wrap the result. 2003-06-18 Werner Lemberg <wl@gnu.org> * src/psnames/psmodule.c (ps_unicode_value): Add support to recognize `uXXXX[X[X]]' glyph names. Don't handle glyph names starting with `uni' which have more than four digits. 2003-06-16 Werner Lemberg <wl@gnu.org> * include/freetype/freetype.h (FT_Open_Flags): Replaced with #defines for the constants. (FT_Open_Args): Change type of `flags' to FT_UInt. (FT_GlyphSlot): Move `flags' to FT_Slot_Internal. * include/freetype/ftimage.h (FT_Outline_Flags, FT_Raster_Flag): Replaced with #defines for the constants. * include/freetype/internal/ftobjs.h (FT_Slot_Internal): New field `flags' (from FT_GlyphSlot). Updated all affected source files. (FT_GLYPH_OWN_BITMAP): New macro (from ftgloadr.h). * include/freetype/internal/ftgloadr.h (FT_GLYPH_OWN_BITMAP): Moved to ftobjs.h. * src/base/ftglyph.c (FT_Glyph_To_Bitmap): Use dummy FT_GlyphSlot_Internal object. 2003-06-15 Werner Lemberg <wl@gnu.org> * builds/compiler/gcc.mk, builds/compiler/gcc-dev.mk (CFLAGS): Add -fno-strict-aliasing to get rid of zillion warnings from gcc version 3.3. 2003-06-14 Werner Lemberg <wl@gnu.org> * include/freetype/ftglyph.h (ft_glyph_bbox_unscaled, ft_glyph_bbox_subpixels, ft_glyph_bbox_gridfit, ft_glyph_bbox_truncate, ft_glyph_bbox_pixels): Replaced with FT_GLYPH_BBOX_UNSCALED, FT_GLYPH_BBOX_SUBPIXELS, FT_GLYPH_BBOX_GRIDFIT, FT_GLYPH_BBOX_TRUNCATE, FT_GLYPH_BBOX_PIXELS. The lowercase variants are now (deprecated aliases) to the uppercase versions. Updated all other files. * include/freetype/ftmodule.h (ft_module_font_driver, ft_module_renderer, ft_module_hinter, ft_module_styler, ft_module_driver_scalable, ft_module_driver_no_outlines, ft_module_driver_has_hinter): Replaced with FT_MODULE_FONT_DRIVER, FT_MODULE_RENDERER, FT_MODULE_HINTER, FT_MODULE_STYLER, FT_MODULE_DRIVER_SCALABLE, FT_MODULE_DRIVER_NO_OUTLINES, FT_MODULE_DRIVER_HAS_HINTER. The lowercase variants are now (deprecated aliases) to the uppercase versions. Updated all other files. * src/base/ftglyph.c (FT_Glyph_Get_CBox): Handle bbox_mode better as enumeration. * src/pcf/pcfdrivr.c (pcf_driver_class), src/winfonts/winfnt.c (winfnt_driver_class), src/bdf/bdfdrivr.c (bdf_driver_class): Add the FT_MODULE_DRIVER_NO_OUTLINES flag. 2003-06-13 Detlef Würkner <TetiSoft@apg.lahn.de> * src/pfr/pfrobjs.c (pfr_slot_load): Apply font matrix. 2003-06-13 Werner Lemberg <wl@gnu.org> * builds/dos/detect.mk: Test not only for `Dos' but for `DOS' also. * builds/dos/dos-emx.mk, builds/compiler/emx.mk: New files for EMX gcc compiler. * builds/dos/detect.mk: Add target `emx'. * builds/compiler/watcom.mk (LINK_LIBRARY): GNU Make for DOS doesn't like a trailing semicolon; add a dummy command. * src/cid/cidload.c: Remove parse_font_bbox code (already enclosed with #if 0 ... #endif). * src/type1/t1tokens.h: Handle /FontName. * src/type1/t1load.c (parse_font_name): Removed. Remove parse_font_bbox code (already enclosed with #if 0 ... #endif). * src/type42/t42parse.c (t42_parse_font_name): Removed. Remove t42_parse_font_bbox code (already enclosed with #if 0 ... #endif). (t42_keywords): Handle /FontName with T1_FIELD_KEY. 2003-06-12 Werner Lemberg <wl@gnu.org> * include/freetype/internal/psaux.h (T1_FieldType): Add T1_FIELD_TYPE_KEY. (T1_FIELD_KEY): New macro. * src/psaux/psobjs.c (ps_parser_load_field): Handle T1_FIELD_TYPE_KEY. * src/cid/cidtoken.h: Use T1_FIELD_KEY for /CIDFontName. 2003-06-11 Alexander Malmberg <alexander@malmberg.org> * src/cache/ftlru.c (FT_LruList_Remove_Selection): Decrease number of nodes. (FT_LruList_Lookup): Fix assertion for out-of-memory case. 2003-06-11 Werner Lemberg <wl@gnu.org> * src/cid/cidload.c (cid_decrypt): Removed. (cid_read_subrs): Use t1_decrypt from psaux module. * src/cid/cidload.h: Updated. * src/cid/cidgload.c (cid_load_glyph): Use t1_decrypt from psaux module. 2003-06-10 Werner Lemberg <wl@gnu.org> * src/cid/cidobjs.c: Apply change 2003-05-31 from <Ron.Dev@gmx.de>. Compute style flags. Fix computation of root->height. * src/cid/cidtoken.h: Handle FontBBox. * src/cid/cidload.c (cid_load_keyword): Handle T1_FIELD_LOCATION_BBOX. (parse_font_bbox): Commented out. (cid_field_records): Comment out element for parsing FontBBox. * src/type42/t42parse.c (t42_parse_font_bbox): Commented out. (t42_keywords): Handle FontBBox with T1_FIELD_BBOX, not with T1_FIELD_CALLBACK. (t42_parse_font_bbox): Commented out. (t42_load_keyword): Handle T1_FIELD_LOCATION_BBOX. * src/type42/t42objs.c (T42_Face_Init): Apply change 2003-05-31 from <Ron.Dev@gmx.de>. 2003-06-09 George Williams <gww@silcom.com> * src/truetype/ttinterp.c (SetSuperRound) <0x30>: Follow Apple's TrueType specification. (Ins_MDRP, Ins_MIRP): Fix single width cut-in test. 2003-06-09 Detlef Würkner <TetiSoft@apg.lahn.de> * src/gzip/ftgzip.c: (inflate_mask): Replaced with... (NO_INFLATE_MASK): This. * src/gzip/infutil.h: Declare `inflate_mask' conditionally by NO_INFLATE_MASK. 2003-06-09 Alexis S. L. Carvalho <alexis@cecm.usp.br> * src/gzip/ftgzip.c (ft_gzip_file_fill_output): Handle Z_STREAM_END correctly. 2003-06-09 Wolfgang Domröse <porthos.domroese@harz.de> * src/pshinter/pshglob.c (psh_globals_new): Change calculation of dim->stdw.count to avoid compiler problem. * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Move the block variables to the beginning of the function to avoid compiler problems. Add casts necessary for 16bit compilers. 2003-06-09 Werner Lemberg <wl@gnu.org> * src/pfr/rules.mk (PFR_DRV_SRC): Add pfrsbit.c. (PFR_DRV_H): Add pfrtypes.h. * include/freetype/config/ftconfig.h: s/__MWKS__/__MWERKS__/. 2003-06-08 Karl Schultz <kschultz@rsinc.com> * src/pfr/pfrsbit.c (pfr_bitwriter_init): Change type of third argument to FT_Bool. (pfr_lookup_bitmap_data): Change type of third and fourth argument to FT_UInt. Updated caller. (pfr_load_bitmap_bits): Change type of fourth argument to FT_Bool. 2003-06-08 Werner Lemberg <wl@gnu.org> Completely revised FreeType's make management. . In all makefiles `/' is used as the path separator. The conversion to the real path separators is done as late as possible using $(subst ...). . $(HOSTSEP) no longer exists. Now, $(SEP) gives the path separator for the operating system, and the new $(COMPILER_SEP) the path separator for the compiler tools. . $(BUILD) has been renamed to $(BUILD_DIR). In general, all directory variables end with `_DIR'. The variants ending in `_' (like `BASE_' have been removed). The following ChangeLog entries only describe changes which are not related to the redesign. * builds/beos/beos-def.mk (BUILD_DIR): Fix typo. * builds/compiler/watcom.mk (LINK_LIBRARY): Fix linker call to avoid overlong arguments as suggested by J. Ali Harlow <ali@avrc.city.ac.uk>. * builds/dos/dos-wat.mk: New file. * builds/freetype.mk (FREETYPE_H): Include header files from the `devel' subdirectory. * builds/os2/os2-dev.mk, builds/unix/unixddef.mk, builds/unix/unixddef.mk, builds/win32/w32-bccd.mk, builds/win32/w32-dev.mk (BUILD_DIR): Fix path. * builds/unix/configure.ac, builds/unix/configure: Updated. * builds/unix/unix-def.in (DISTCLEAN): Add `freetype2.pc'. 2003-06-07 Werner Lemberg <wl@gnu.org> * src/base/ftmac.c (FT_New_Face_From_SFNT): s/rlen/sfnt_size/ to make it compile. * devel/ftoption.h: Updated. 2003-06-07 Detlef Würkner <TetiSoft@apg.lahn.de> * include/freetype/internal/psaux.h, src/truetype/ttgload.h: s/index/idx/ to fix compiler warnings. * src/sfnt/ttcmap0.c (tt_face_build_cmaps): Use more `volatile' to fix compiler warning. * src/gzip/ftgzip.c (BUILDFIXED): Removed. * src/gzip/inftrees.c (inflate_trees_fixed) [!BUILDFIXED]: Use FT_UNUSED to remove compiler warning. 2003-06-06 Werner Lemberg <wl@gnu.org> * include/freetype/ftstroker.h: Renamed to... * include/freetype/ftstroke.h: This. * src/base/ftstroker.c: Renamed to... * src/base/ftstroke.c: This. * include/freetype/config/ftheader.h (FT_STROKER_H): Updated. * src/base/descrip.mms, src/base/Jamfile, src/base/rules.mk: Updated. * src/pcf/pcfdriver.c: Renamed to... * src/pcf/pcfdrivr.c: This. * src/pcf/pcfdriver.h: Renamed to... * src/pcf/pcfdrivr.h: This. * src/pcf/Jamfile, src/pcf/rules.mk: Updated. 2003-06-05 Wenlin Institute (Tom Bishop) <wenlin@wenlin.com> * src/base/ftmac.c (file_spec_from_path) [TARGET_API_MAC_CARBON]: Add `#if !defined(__MWERKS__)'. 2003-06-05 Werner Lemberg <wl@gnu.org> * include/freetype/internal/psaux.h (T1_FieldType): Add T1_FIELD_TYPE_FIXED_1000 and T1_FIELD_TYPE_FIXED_1000_P. (T1_FIELD_FIXED_1000, T1_FIELD_FIXED_1000_P): New macros. * src/psaux/psobjs.c (ps_parser_load_field): Handle T1_FIELD_TYPE_FIXED_1000 and T1_FIELD_TYPE_FIXED_1000_P. * src/cff/cffparse.c (cff_kind_fixed_thousand): New enumeration. (CFF_FIELD_FIXED_1000): New macro. (cff_parser_run): Handle cff_kind_fixed_thousand. * src/cff/cfftoken.h: Use CFF_FIELD_FIXED_1000 for blue_scale. * src/cff/cffload (cff_subfont_load): Fix default values of expansion_factor and blue_scale. * src/cid/cidtoken.h, src/type1/t1tokens.h: Use T1_FIELD_FIXED_1000 for blue_scale. * src/pshinter/pshglob.c (psh_globals_new): Fix default value of blue_scale. 2003-06-04 Wolfgang Domröse <porthos.domroese@harz.de> * include/freetype/internal/ftdriver.h, include/freetype/internal/ftobjs.h, include/freetype/internal/psaux.h, src/cid/cidgload.c, src/psaux/psobjs.c, src/psaux/t1decode.c, src/psaux/psobjs.h, src/pshinter/pshrec.c, src/pshinter/pshalgo.c, src/psnames/psmodule.c, src/raster/ftraster.c, src/sfnt/sfobjs.c, src/smooth/ftgrays.c, src/smooth/ftsmooth.c, src/truetype/ttobjs.c, src/truetype/ttdriver.c, src/truetype/ttgload.c, src/type1/t1afm.c, src/type1/t1gload.c, src/type1/t1gload.h, src/type1/t1load.c, src/type1/t1objs.c, src/type42/t42parse.c, src/type42/t42parse.h: Many casts and slight argument type changes to make it work with a 16bit compiler. 2003-06-04 Werner Lemberg <wl@gnu.org> * include/freetype/config/ftoption.h: Defining TT_CONFIG_OPTION_FORCE_UNPATENTED_HINTING by default is a bad idea since some fonts (e.g. Arial) produce worse results than without hinting. Reverted. 2003-06-04 Werner Lemberg <wl@gnu.org> * src/truetype/ttgload.c (load_truetype_glyph) [TT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Call FT_GlyphLoader_CheckPoints before adding phantom points. This fixes a segfault bug with fonts (e.g. htst3.ttf) which have nested subglyphs more than one level deep. Reported by Anthony Fok. * include/freetype/config/ftoption.h: Define TT_CONFIG_OPTION_BYTECODE_INTERPRETER, TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING, and TT_CONFIG_OPTION_FORCE_UNPATENTED_HINTING to make it the new default. 2003-06-03 Werner Lemberg <wl@gnu.org> * src/autohint/ahhint.c (ah_hinter_hint_edges): Removed. Just a wrapper for ah_hint_edges. (ah_hint_edges): Renamed to... (ah_hinter_hint_edges): This. * src/base/ftobjs.c (FT_Set_Hint_Flags): Removed. Unused. * include/freetype/internal/ftobjs.h (FT_Face_InternalRec), include/freetype/internal/psaux.h (T1_DecoderRec), src/cff/cffgload.h (CFF_Builder): Remove `hint_flags' field. Unused. * src/cff/cffgload.c (cff_builder_init): Updated. (cff_decoder_parse_charstrings) <cff_op_endchar>: Call hinter->apply with decoder->hint_mode instead of builder->hint_flags. * src/psaux/t1decode.c (t1_decoder_init): Updated. * src/base/ftstroker.c (ft_stroke_border_export): s/index/idx/. * src/sfnt/sfobjs.c (sfnt_load_face): Commented out code which increased root->height by 15% if the line gap was zero. There exist fonts (containing e.g. form drawing characters) which intentionally have a zero line gap value. * src/truetype/ttinterp.c (Free_Project, CUR_Func_freeProj): Removed. Unused. Updated all callers. 2003-06-02 Werner Lemberg <wl@gnu.org> * src/cff/cffobjs.c (cff_face_init): Use symbolic names for Adobe specific encoding IDs (there was a wrong EID value for custom encoding). * src/cff/cffcmap.h (CFF_CMapStdRec): Remove `count'. * src/cff/cffcmap.c (cff_cmap_encoding_init, cff_cmap_encoding_done): Updated. (cff_cmap_encoding_char_index, cff_cmap_encoding_char_next): Use 256 as limit for character code. 2003-06-01 Werner Lemberg <wl@gnu.org> * src/winfonts/winfnt.c (FNT_Load_Glyph): Revert change from 2003-03-20. 2003-05-31 Werner Lemberg <wl@gnu.org> * include/freetype/fttrigon.h (FT_Vector_Normalize): Removed. 2003-05-31 <Ron.Dev@gmx.de> * src/type1/t1objs.c (T1_Face_Init): Improve algorithm for guessing the font style by ignoring spaces and hyphens. * builds/unix/freetype2.in: Fix `Version' field. 2003-05-30 Werner Lemberg <wl@gnu.org> Avoid overwriting of numeric font dictionary entries for synthetic fonts. Additionally, some entries were handled as `integer' instead of `number'. * include/freetype/internal/psaux.h (T1_FieldType): Add T1_FIELD_TYPE_BOOL_P, T1_FIELD_TYPE_INTEGER_P, and T1_FIELD_TYPE_FIXED_P. (T1_FIELD_BOOL_P, T1_FIELD_NUM_P, T1_FIELD_FIXED_P): New macros. * src/psaux/psobjs.c (ps_parser_load_field): Handle new field types. * include/freetype/internal/cfftypes.h (CFF_FontRecDict), src/cff/cfftoken.h: Change type of underline_position and underline_thickness to FT_Fixed. * src/cff/cffload.c (cff_subfont_load): Fix default values of underline_position and underline_thickness. * src/cff/cffobjs.c (cff_face_init): Set underline_position and underline_thickness in `root'. * include/freetype/internal/t1types.h (T1_Font): Change point_type and stroke_width to pointers. * include/freetype/t1tables.h (PS_FontInfo): Change italic_angle, is_fixed_pitch, underline_position, and underline_thickness to pointers. * src/type1/t1tokens.h: Change italic_angle, is_fixed_pitch, underline_position, and underline_thickness to pointers. Change the type of the latter two to `fixed'. Change type of stroke_width to `fixed' and make it a pointer. Change paint_type to pointer. * src/type1/t1objs.c (T1_Face_Done): Updated. (T1_Face_Init): Updated. Fix assignment of underline_position and underline_thickness. * src/cid/cidtoken.h: Change italic_angle, is_fixed_pitch, underline_position, and underline_thickness to pointers. Change the type of the latter two to `fixed'. Change type of stroke_width to `fixed'. * src/cid/cidobjs.c (cid_face_done): Updated. (cid_face_init): Updated. Fix assignment of underline_position and underline_thickness. * src/type42/t42parse.c: Change italic_angle, is_fixed_pitch, underline_position, and underline_thickness to pointers. Change the type of the latter two to `fixed'. Change type of stroke_width to `fixed' and make it a pointer. Change paint_type to pointer. * src/type42/t42objs.c (T42_Face_Init): Updated. Fix assignment of underline_position and underline_thickness. (T42_Face_Done): Updated. * src/base/ftobjs.c (open_face_from_buffer): Fix compiler warning. * src/pshinter/pshglob.c, src/pshinter/pshglob.h (psh_globals_set_scale): Make it a local function. * test/gview.c: Fix renaming ps3->ps typo. Formatting. 2003-05-29 Werner Lemberg <wl@gnu.org> * src/pshinter/pshalgo1.[ch], src/pshinter/pshalgo2.[ch]: Removed. * src/pshinter/pshalgo.h: Removed. * src/pshinter/pshalgo3.[ch]: Renamed to... * src/pshinter/pshalgo.[ch]: New files. s/PSH3/PSH/. s/psh3/psh/. s/ps3/ps/. * src/pshinter/pshrec.c, src/pshinter/pshinter.c: Updated. * src/pshinter/rules.mk, src/pshinter/Jamfile: Updated. * src/pshinter/pshglob.[ch] (psh_dimension_snap_width): Commented out. * tests/gview.c: Remove code for pshalgo1 and pshalgo2. Updated. 2003-05-28 Martin Zinser <zinser@decus.de> * vms_make.com: Reworked support for shareable images on VMS. The first version was kind of a hack; the current implementation of the procedure to extract the required symbols is much cleaner. Reworked creation of MMS files, avoiding a number of temporary files which were created in the previous version. Further work on creating descrip.mms files on the fly. * builds/vms/descrip.mms, src/autohint/descrip.mms, src/type1/descrip.mms: Removed. 2003-05-28 Werner Lemberg <wl@gnu.org> * src/pshinter/pshalgo3.c (psh3_glyph_compute_extrema): Skip contours with only a single point to avoid segfault. * src/base/ftglyph.c (FT_Glyph_To_Bitmap): Activate code for handling `origin'. 2003-05-24 Werner Lemberg <wl@gnu.org> * src/autohint/ahtypes.h (AH_OPTION_NO_STRONG_INTERPOLATION): Removed since unused. 2003-05-21 Werner Lemberg <wl@gnu.org> * include/freetype/config/ftstdlib.h (ft_strcat): New wrapper macro for strcat. * src/base/ftmac.c (create_lwfn_name): s/isupper/ft_isupper/. (parse_font): s/memcpy/ft_memcpy/. (is_dfont) [TARGET_API_MAC_CARBON]: s/memcmp/ft_memcmp/. * src/base/ftobjs.c (load_mac_face) [FT_MACINTOSH]: s/strlen/ft_strlen/. s/strcat/ft_strcat/. s/strcpy/ft_strcpy/. * src/gzip/zutil.h: s/memset/ft_memset/. s/memcmp/ft_memcmp/. * src/bdf/bdfdrivr.c (BDF_Face_Init), src/pcf/pcfdriver.c (PCF_Face_Init): Test for charset registry case-insensitively. * src/gzip/ftgzip.c (ft_gzip_file_io): Revert change from yesterday; it has already been fixed differently. * src/truetype/ttinterp.c (DO_SFVTL): Add missing braces around if-clause. 2003-05-21 Martin Zinser <zinser@decus.de> * t1load.c (parse_blend_axis_types): Fix compiler warning. * descrip.mms: Removed. Now created by... * vms_make.com: New file. 2003-05-21 Weiqi Gao <weiqigao@networkusa.net> * src/gzip/ftgzip.c (ft_gzip_file_io): Avoid zero value of `delta' to prevent infinite loop. 2003-05-21 Lars Clausen <lrclause@cs.uiuc.edu> * docs/VERSION.DLL: Provide better autoconf snippet to check FreeType version. 2003-05-21 Werner Lemberg <wl@gnu.org> * src/base/ftobjs.c (open_face): Free `internal' not `face->internal' in case of error to avoid possible segfault. * src/pshinter/pshalgo3.c (ps3_hints_apply): Check whether we actually have an outline. 2003-05-20 David Chester <davidchester@qmx.net> * src/pshinter/pshalgo3.c (ps3_hints_apply): Try to optimize y_scale so that the top of non-capital letters is aligned on a pixel boundary whenever possible. * src/autohint/ahhint.c (ah_hint_edges): Make sure that lowercase m's maintain their symmetry. 2003-05-20 Werner Lemberg <wl@gnu.org> * src/autohint/ahhint.c (ah_hinter_load_glyph): Oops! David's patch from yesterday has been resolved already in a different way. Reverted. 2003-05-19 David Chester <davidchester@qmx.net> * src/autohint/ahhint.c (ah_hinter_load_glyph): Don't scale y_scale locally but face->size->metrics.y_scale. 2003-05-19 David Turner <david@freetype.org> * src/sfnt/ttcmap0.c (tt_cmap4_char_next): Select proper start value for `hi' to avoid infinite loop. 2003-05-18 Yong Sun <sunyong@njstar.com> * src/raster/ftraster.c (Insert_Y_Turn): Fix overflow test. 2003-05-18 Werner Lemberg <wl@gnu.org> * include/freetype/config/ftoption.h [FT_CONFIG_OPTION_MAC_FONTS]: New macro. * src/base/ftobjs.c: Use it to control mac font support on non-mac platforms. 2003-05-17 George Williams <gww@silcom.com> Implement partial support of Mac fonts on non-Mac platforms. * src/base/ftobjs.c (memory_stream_close, new_memory_stream, open_face_from_buffer, Mac_Read_POST_Resource, Mac_Read_sfnt_Resource, IsMacResource, IsMacBinary, load_mac_face) [!FT_MACINTOSH]: New functions. (FT_Open_Face) [!FT_MACINTOSH]: Use load_mac_face. 2003-05-17 Werner Lemberg <wl@gnu.org> * src/base/ftobjs.c (FT_Load_Glyph): Scale linear advance width only if FT_FACE_FLAG_SCALABLE is set (otherwise we have a division by zero since FNT and friends don't define `face->units_per_EM'). 2003-05-15 David Turner <david@freetype.org> * src/base/fttrigon.c (FT_Vector_Rotate): Avoid rounding errors for small values. 2003-05-15 Werner Lemberg <wl@gnu.org> * src/autohint/ahtypes.h (AH_PointRec): Remove unused `in_angle' and `out_angle' fields. 2003-05-14 George Williams <gww@silcom.com> * src/base/ftmac.c (FT_New_Face_From_SFNT): Handle CFF files also. 2003-05-14 Werner Lemberg <wl@gnu.org> * include/freetype/freetype.h: Fix typo in comment (FT_HAS_FIXED_SIZES). 2003-05-10 Dan Williams <dan@bigw.org> * builds/unix/aclocal.m4: Comment out definition of `allow_undefined_flag' for Darwin 1.3. * builds/unix/configure.ac: Add option --with-old-mac-fonts. * builds/unix/ltmain.sh: Fix version numbering for Darwin 1.3. * builds/unix/configure: Regenerated. * include/freetype/config/ftconfig.h: Fix conditions for defining `FT_MACINTOSH'. * src/base/ftbase.c: Include `ftmac.c' conditionally. * src/base/ftmac.c: Handle __GNUC__. 2003-05-07 YAMANO-UCHI Hidetoshi <mer@din.or.jp> * src/cid/cidload.c (is_alpha): Removed. (cid_parse_dict): Use `cid_parser_skip_alpha' instead of `is_alpha'. 2003-05-07 Werner Lemberg <wl@gnu.org> * src/autohint/ahoptim.c, src/autohint/ahoptim.h: Obsolete, removed. 2003-05-07 David Turner <david@freetype.org> * src/autohint/ahglyph.c (ah_setup_uv): Exchange `for' loop and `switch' statement to make it run faster. (ah_outline_compute_segments): Reset `segment->score' and `segment->link'. (ah_outline_link_segments): Provide alternative code which does the same but runs much faster. Handle major direction also. (ah_outline_compute_edges): Scale `edge_distance_threshold' down after rounding instead of scaling comparison value in loop. * src/autohint/ahhint.c (ah_hinter_align_strong_points): Provide alternative code which runs faster. Handle `before->scale == 0'. * src/autohint/ahtypes.h (AH_SegmentRec): Move some fields down. (AH_EdgeRec): Move some fields in structure. New field `scale'. * src/sfnt/ttcmap0.c (tt_cmap4_char_next): Use binary search. 2003-05-02 Werner Lemberg <wl@gnu.org> * src/autohint/ahoptim.c (LOG): Renamed to... (AH_OPTIM_LOG): This. (AH_Dump_Springs): Fix log message format. * src/autohint/ahhint.c (ah_hint_edges_3): Renamed to... (ah_hint_edges): This. 2002-05-02 Keith Packard <keithp@keithp.com> * src/bdf/bdfdrivr.c (BDF_Set_Pixel_Size): Initialize `max_advance'. 2003-05-01 Werner Lemberg <wl@gnu.org> * src/autohint/ahglyph.c (ah_test_extrema): Renamed to... (ah_test_extremum): This. 2003-04-28 Werner Lemberg <wl@gnu.org> * builds/unix/configure.ac: Generate `freetype.pc' from `freetype.in'. * builds/unix/configure: Regenerated. * builds/unix/install.mk (install, uninstall): Handle `freetype.pc'. 2003-04-28 Gustavo J. A. M. Carneiro <gjc@inescporto.pt> * builds/unix/freetype2.in: New file. Contains building information for the `pkg-config' package. 2003-04-28 David Turner <david@freetype.org> * src/base/ftobjs.c (FT_Load_Glyph): Fix boundary check for `glyph_index'. 2003-04-25: Graham Asher <graham.asher@btinternet.com> Added the optional unpatented hinting system for TrueType. It allows typefaces which need hinting to produce correct glyph forms (e.g., Chinese typefaces from Dynalab) to work acceptably without infringing Apple patents. This system is compiled only if TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING is defined in ftoption.h. * include/freetype/ttunpat.h: New file. Defines FT_PARAM_TAG_UNPATENTED_HINTING. * include/freetype/config/ftheader.h (FT_TRUETYPE_UNPATENTED_H): New macro to use when including ttunpat.h. * include/freetype/config/ftoption.h (TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING, TT_CONFIG_OPTION_FORCE_UNPATENTED_HINTING): New configuration macros (not defined, but in comments) for the unpatented hinting system. * include/freetype/internal/tttypes.h (TT_FaceRec) [TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING]: New element `FT_Bool unpatented_hinting'. * src/truetype/ttinterp.c (NO_APPLE_PATENT, APPLE_THRESHOLD): Removed. (GUESS_VECTOR): New macro. (TT_Run_Context) [TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING]: Set `both_x_axis'. (tt_default_graphics_state) [TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING]: Updated. (Current_Ratio) [TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING]: Handle `unpatented_hinting'. (Direct_Move) [NO_APPLE_PATENT]: Removed. [TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING]: Insert assertion. (Project, FreeProject) [TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING]: Insert assertion. (Compute_Funcs) [TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING]: Implement unpatented hinting. (DO_SPVTCA, DO_SFVTCA, DO_SPVTL, DO_SFVTL, DO_SPVFS, DO_SFVFS, Ins_SDPVTL): Call `GUESS_VECTOR'. (DO_GPV, DO_GFV) [TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING]: Handle `unpatented_hinting'. (Compute_Point_Displacement) [NO_APPLE_PATENT]: Removed. [TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING]: Implement unpatented hinting. (Move_Zp2_Point, Ins_SHPIX, Ins_DELTAP, Ins_DELTAC) [TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING]: Implement unpatented hinting. (TT_RunIns): Updated. * src/truetype/ttobjs.c [TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING]: Include FT_TRUETYPE_UNPATENTED_H. (tt_face_init) [TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING, TT_CONFIG_OPTION_FORCE_UNPATENTED_HINTING]: Check FT_PARAM_TAG_UNPATENTED_HINTING. * src/truetype/ttobjs.h (TT_GraphicsState) [TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING]: Add `both_x_axis'. 2003-04-25 Werner Lemberg <wl@gnu.org> * src/bdf/bdflib.c (hash_bucket, hash_lookup): Use `const' for first argument. (bdf_get_font_property): Use `const' for third argument. Updated all callers. * src/bdf/bdfdrivr.c (BDF_Face_Init): Set pixel width and height similar to the PCF driver. * src/bdf/bdf.h (_hashnode): Use `const' for `key'. Updated. * src/gzip/ftgzip.c: C++ doesn't like that the array `inflate_mask' is declared twice. It is perhaps better to modify the zlib source files directly instead of this hack. (zcalloc, zfree, ft_gzip_stream_close, ft_gzip_stream_io): Add casts to make build with g++ successful. 2003-04-24 Manish Singh <yosh@gimp.org> * src/cid/cidobjs.c (cid_face_init), src/type1/t1objs.c (T1_Face_Init), src/type42/t42objs.c (T42_Face_Init): Split on `-' also for searching the style name. 2003-04-24 David Turner <david@freetype.org> * src/pcf/pcfread.c (pcf_load_font): Fixed the computation of face->num_glyphs. We must increase the value by 1 to respect the convention that glyph index 0 always corresponds to the `missing glyph'. 2003-04-24 Werner Lemberg <wl@gnu.org> * builds/unix/unix-cc.in (CFLAGS): Add @CPPFLAGS@. 2003-04-24 Dieter Baron <dillo@netbsd.org> * builds/unix/freetype-config.in (cflags): Emit FreeType 2's include files first. Otherwise there are conflicts with FreeType 1 installed simultaneously. 2003-04-23 Werner Lemberg <wl@gnu.org> Fixing bugs reported by Nelson Beebe. * src/base/ftstroker.c (FT_Stroker_ParseOutline): Remove unused variable `in_path'. * src/base/ftobjs (ft_glyphslot_set_bitmap): Change type of second argument to `FT_Byte*'. * include/freetype/internal/ftobjs.h: Updated. * src/bdf/bdflib.c (_bdf_readstream): Remove unused variable `res'. (_bdf_parse_glyphs): Remove unused variable `next'. Mark `call_data' as unused. * src/cache/ftlru.c (FT_LruList_Lookup): Remove unused variable `plast'. * src/pcf/pcfread.c (pcf_seek_to_table_type): Slight recoding to actually use `error'. (pcf_load_font): Remove unused variable `avgw'. * src/pfr/pfrobjs.c (pfr_face_get_kerning): Change return type to `void'. Mark `error' as unused. * src/pfr/pfrobjs.h: Updated. * src/pfr/pfrdrivr.c (pfr_get_kerning): Updated. * src/sfnt/ttload.c (sfnt_dir_check): Remove unused variable `format_tag'. * src/sfnt/ttcmap0.c (tt_cmap6_validate, tt_cmap10_validate): Remove unused variable `start'. (tt_cmap10_char_next): Remove unused variable `result' * src/sfnt/sfobjs.c (tt_face_get_name): Mark `error' as unused. * src/sfnt/sfdriver.c (get_sfnt_postscript_name): Mark `error' as unused. * src/type1/t1objs.c (T1_Face_Init): Remove unused variable `pshinter'. * src/type1/t1gload.c (T1_Load_Glyph): Use `glyph_data_loaded' only for FT_CONFIG_OPTION_INCREMENTAL. 2003-04-23 Akito Hirai <akito@kde.gr.jp> * src/sfnt/ttcmap0.c (tt_cmap4_validate): Provide a weak variant of the glyph ID bounding check if FT_VALIDATE_TIGHT is not active. Without this change, many CJK fonts from Dynalab are rejected. 2003-04-23 Joe Marcus Clarke <marcus@FreeBSD.org> * src/base/ftbdf.c (FT_Get_BDF_Property): Check for valid `get_interface'. 2003-04-23 Paul Miller <paulm@profoundeffects.com> * src/base/ftmac.c (parse_fond): Fix handling of style names. 2003-04-23 Werner Lemberg <wl@gnu.org> * src/pfr/pfrload.c (pfr_extra_item_load_font_id): Use FT_PtrDist instead of FT_UInt for `len'. 2003-04-22 Werner Lemberg <wl@gnu.org> * src/gzip/ftgzip.c (zcalloc) [!FT_CONFIG_OPTION_SYSTEM_ZLIB]: Convert K&R format to modern C usage. (FT_Stream_OpenGzip): Use long constant. 2003-04-21 Werner Lemberg <wl@gnu.org> * src/cache/ftccache.c (ftc_cache_lookup): Remove shadow declaration of `manager'. 2003-04-20 Werner Lemberg <wl@gnu.org> * doc/INSTALL.UNX: Cleaned up. 2003-04-09 Torrey Lyons <torrey@mrcla.com> * src/base/ftmac.c (open_face_from_buffer): Removed a double-free bug that had nasty consequences when trying to open an `invalid' font on a Mac. 2003-04-09 Mike Fabian <mfabian@suse.de> * src/bdf/bdfdrivr.h (BDF_encoding_el), src/pcf/pcf.h (PCF_EncodingRec): Changed FT_Short to FT_UShort in order to be able to access more than 32768 glyphs in fonts. 2003-04-08 David Turner <david@freetype.org> * Version 2.1.4 released. ========================= 2003-04-03 Martin Muskens <mmuskens@aurelon.com> * src/type1/t1load.c (T1_Open_Face): Fixed the code to make it handle special cases where a font only contains a `.notdef' glyph (happens in PDF-embedded fonts). Otherwise, FT_Panic was called. 2003-03-27 David Turner <david@freetype.org> * README: Updated. * README.UNX: Removed (now replaced by docs/INSTALL.UNX). * src/pshinter/pshalgo3.c: The hinter now performs as in 2.1.3 and will ignore stem quantization only when FT_LOAD_TARGET_SMOOTH is used. (psh3_dimension_quantize_len): Enabled. (psh3_hint_align): Enable commented code. (psh3_hint_align_light): Commented out. * src/base/ftobjs.c (FT_Set_Char_Size): Changed the default computations to include rounding in all cases; this is required to provide accurate kerning data when native TrueType hinting is enabled. * src/type1/t1load.c (is_name_char): The Type 1 loader now accepts more general names according to the PostScript specification (the previous one was too restrictive). (parse_font_name, parse_encoding, parse_charstrings, parse_dict): Use `is_name_char'. (parse_subrs): Handle empty arrays. 2003-03-20 David Turner <david@freetype.org> Serious rewriting of the documentation. * docs/BUGS, docs/BUILD: Removed. * docs/DEBUG.TXT: Renamed to... * docs/DEBUG: This. * docs/CUSTOMIZE, docs/TRUETYPE, docs/UPGRADE.UNX: New files. * docs/INSTALL.ANY, docs/INSTALL.UNX, docs/INSTALL.GNU New files, containing platform specific information previously in INSTALL. * docs/readme.vms: Renamed to... * docs/INSTALL.VMS: This. * docs/*: Updated. Introduced three new functions to deal with glyph bitmaps within FT_GlyphSlot objects: ft_glyphslot_free_bitmap ft_glyphslot_alloc_bitmap ft_glyphslot_set_bitmap These functions are much more convenient to use than managing the FT_GLYPH_OWN_BITMAP flag manually. * include/freetype/internal/ftobjs.h (ft_glyphslot_free_bitmap, ft_glyphslot_alloc_bitmap, ft_glyphslot_set_bitmap): New functions. * src/base/ftobjs.c: Implement them. (ft_glyphslot_done): Use ft_glyphslot_free_bitmap. * src/bdf/bdfdrivr.c (BDF_Glyph_Load), src/pcf/pcfdriver.c (PCF_Glyph_Load): Remove unused variable `memory'. Use `ft_glyphslot_*' functions. Don't set `FT_GLYPH_OWN_BITMAP'. * src/pfr/pfrsbit.c (pfr_slot_load_bitmap): Use `ft_glyphslot_alloc_bitmap'. * src/sfnt/ttsbit.c (Load_SBit_Image): Change 5th argument to type `FT_GlyphSlot'. Adding argument `depth' to handle recursive calls. Use `ft_glyphslot_alloc_bitmap'. (tt_face_load_sbit_image): Remove unused variable `memory'. Don't handle `FT_GLYPH_OWN_BITMAP'. Update call to Load_SBit_Image. * src/type42/t42objs.c (ft_glyphslot_clear): Renamed to... (t42_glyphslot_clear): This. Updated caller. Call `ft_glyphslot_free_bitmap'. * src/winfonts/winfnt.c (FNT_Load_Glyph): Use `ft_glyphslot_set_bitmap'. Don't handle `FT_GLYPH_OWN_BITMAP'. * src/cache/ftlru.c (FT_LruList_Lookup): Fixed an invalid assertion check. * src/autohint/ahglyph.c (ah_outline_load): Add two scaling arguments. * src/autohint/ahglyph.h: Updated. * src/autohint/ahhint.c (ah_hinter_load): Updated. * src/autohint/ahglobal.c (ah_hinter_compute_widths): Updated. * src/cache/ftccache.c (ftc_family_done): Fixed small bug that could crash the cache in rare circumstances (mostly with broken fonts). 2003-03-15 David Turner <david@freetype.org> * src/truetype/ttdriver.c (Set_Char_Sizes): Fixed a small rounding bug. Actually, it seems that previous versions of FreeType didn't perform TrueType rounding exactly as appropriate. 2003-03-14 David Turner <david@freetype.org> * src/truetype/ttdriver.c (Set_Char_Sizes): Fixing the small TrueType native rendering glitches; they came from a small rounding error. 2003-03-13 David Turner <david@freetype.org> Added new environment variables to control memory debugging with FreeType. See the description of `FT2_DEBUG_MEMORY', `FT2_ALLOC_TOTAL_MAX' and `FT2_ALLOC_COUNT_MAX' in DEBUG.TXT. * src/base/ftdbgmem.c (FT_MemTableRec): Add `alloc_count', `bound_total', `alloc_total_max', `bound_count', `alloc_count_max'. (ft_mem_debug_alloc): Handle new variables. (ft_mem_debug_init): s/FT_DEBUG_MEMORY/FT2_DEBUG_MEMORY/. Handle new environment variables. * docs/DEBUG.TXT: Updated. Fixed the cache sub-system to correctly deal with out-of-memory conditions. * src/cache/ftccache.c (ftc_node_destroy): Comment out generic check. (ftc_cache_lookup): Implement loop. * src/cache/ftccmap.c: Define FT_COMPONENT. * src/cache/ftcsbits.c (ftc_sbit_node_load): Handle FT_Err_Out_Of_Memory. * src/cache/ftlru.c: Include FT_INTERNAL_DEBUG_H. (FT_LruList_Lookup): Implement loop. * src/pfr/pfrobjs.c (pfr_face_done): Fix memory leak. (pfr_face_init): Fixing compiler warnings. * src/psaux/psobjs.c (reallocate_t1_table): Fixed a bug (memory leak) that only happened when a try to resize an array would end in an out-of-memory condition. * src/smooth/ftgrays.c (gray_convert_glyph): Removed compiler warnings / volatile bug. * src/truetype/ttobjs.c (tt_glyphzone_done): Removed segmentation fault that happened in tight memory environments. 2003-02-28 Pixel <pixel@mandrakesoft.com> * src/gzip/ftgzip.c (ft_gzip_file_done): Fixed memory leak: The ZLib stream was not properly finalized. 2003-02-25 Anthony Fok <anthony@thizlinux.com> * src/cache/ftccmap.c: Include FT_TRUETYPE_IDS_H. (ftc_cmap_family_init): The cmap cache now supports UCS-4 charmaps when available in Asian fonts. * src/sfnt/ttload.c, src/base/ftobjs.c: Changed `asian' to `Asian' in comments. 2003-02-25 David Turner <david@freetype.org> * src/gzip/ftgzip.c (ft_gzip_file_fill_output): Fixed a bug that caused FreeType to loop endlessly when trying to read certain compressed gzip files. The following test reveals the bug: touch 0123456789 ; gzip 0123456789 ; ftdump 0123456789.gz Several fixes to the PFR font driver: - The list of available embedded bitmaps was not correctly set in the root FT_FaceRec structure describing the face. - The glyph loader always tried to load the outlines when FT_LOAD_SBITS_ONLY was specified. - The table loaded now scans for *undocumented* elements of a physical font's auxiliary data record. This is necessary to retrieve the `real' family and style names. NOTE THAT THESE CHANGES THE FAMILY NAME OF MANY PFR FONTS! * src/pfr/pfrload.c (pfr_aux_name_load): New function. (pfr_phy_font_done): Free `family_name' and `style_name' also. Remove unused variables. (pfr_phy_font_load): Extract useful information from the auxiliary bytes. * src/pfr/pfrobjs.c (pfr_face_done): Set pointers to NULL. (pfr_face_init): Provide fallback values for `family_name' and `style_name'. Handle strikes. (pfr_slot_load): Handle FT_LOAD_SBITS_ONLY. * src/pfr/pfrtypes.h (PFR_PhyFontRec): Add fields `ascent', `descent', `leading', `family_name', and `style_name'. * src/truetype/ttdriver.c (Set_Char_Sizes): Fixed a rounding bug when computing the scale factors for a given character size in points with resolution. * devel/ft2build.h, devel/ftoption.h: New files (in a new directory) which are special development versions of include/ft2build.h and include/freetype/config/ftoption.h, respectively. 2003-02-18 David Turner <david@freetype.org> Fixing the slight distortion problem that occurred due to the latest auto-hinter changes. * src/base/ftobjs.c (ft_recompute_scaled_metrics): Fix rounding. * src/truetype/ttdriver.c (Set_Char_Sizes): New variable `metrics2'. [!TT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Removed. * src/truetype/ttobjs.h (TT_SizeRec): New field `metrics'. * src/truetype/ttobjs.c (Reset_Outline_Size): Fix initialization of `metrics'. [FT_CONFIG_CHESTER_ASCENDER]: Code removed. (Reset_SBit_Size): Fix initialization of `metrics'. * src/truetype/ttinterp.c (TT_Load_Context): Fix initialization of `exec->metrics'. * src/autohint/ahhint.c (ah_hinter_load): Disabled the advance width `correction' which seemed to provide more trouble than benefits. 2003-02-13 Graham Asher <graham.asher@btinternet.com> Changed the incremental loading interface in a way that makes it simpler and allows glyph metrics to be changed (e.g., by adding a constant, as required by CFF fonts) rather than just overridden. This was required to make the GhostScript-to-FreeType bridge work. * src/cff/cffgload.c (cff_slot_load) [FT_CONFIG_OPTION_INCREMENTAL]: Allow metrics to be overridden. * src/cid/cidgload.c (cid_load_glyph) [FT_CONFIG_OPTION_INCREMENTAL]: Ditto. * src/truetype/ttgload.c (load_truetype_glyph) [FT_CONFIG_OPTION_INCREMENTAL]: Simplify. (compute_glyph_metrics) [FT_CONFIG_OPTION_INCREMENTAL]: Code block moved down. * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String) [FT_CONFIG_OPTION_INCREMENTAL]: Updated. * include/freetype/ftincrem.h: Updated. 2003-01-31 David Turner <david@freetype.org> * docs/CHANGES, docs/VERSION.DLL, docs/TODO: Updating documentation for the 2.1.4 release. * builds/win32/visualc/freetype.dsp, builds/win32/visualc/index.html: Updating the project file for 2.1.4. * src/gzip/adler32.c, src/gzip/ftgzip.c, src/gzip/infblock.c, src/gzip/infcodes.c, src/gzip/inflate.c, src/gzip/inftrees.c, src/gzip/infutil.c: Removed old-style (K&R)function definitions. This avoids warnings with Visual C++ at its most pedantic mode. * src/pfr/pfrsbit.c: Removed compiler warnings. * src/cache/ftccmap.c (ftc_cmap_family_init): Changed an FT_ERROR into an FT_TRACE1 since it caused `ftview' and others to dump too much junk when trying to display a waterfall with a font without a Unicode charmap (e.g. SYMBOL.TTF). Implemented FT_CONFIG_CHESTER_BLUE_SCALE, corresponding to the last patch from David Chester, but with a much simpler (and saner) implementation. * src/autohint/ahhint.c (ah_hinter_load_glyph) [FT_CONFIG_CHESTER_BLUE_SCALE]: Try to optimize the y_scale so that the top of non-capital letters is aligned on a pixel boundary whenever possible. * src/base/ftobjs.c (FT_Set_Char_Size) [FT_CONFIG_CHESTER_BLUE_SCALE]: Round differently. * src/truetype/ttdriver.c (Set_Char_Sizes) [TT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Do some rounding only if this macro is defined. * src/truetype/ttobjs.c (Reset_Outline_Size) [FT_CONFIG_CHESTER_ASCENDER]: Round differently. * src/pshinter/pshalgo3.c: Improved the Postscript hinter. Getting rid of stem snapping seems to work well here (though the stems are still slightly moved to increase contrast). (psh3_dimension_quantize_len): Commented out. (psh3_hint_align_light): New function. (psh3_hint_align): Comment out some code. THIS IMPROVES ANTI-ALIASED RENDERING, BUT MONOCHROME AND LCD MODES STILL SUCK. 2003-01-22 David Chester <davidchester@qmx.net> * src/autohint/ahhint.c (ah_compute_stem_width): Small fix to the stem width optimization. 2003-01-22 David Turner <david@freetype.org> Adding a new API `FT_Get_BDF_Property' to retrieve the BDF properties of a given PCF or BDF font. * include/freetype/ftbdf.h (BDF_PropertyType): New enumeration. (BDF_Property, BDF_PropertyRec): New structure. FT_Get_BDF_Property): New function. * include/freetype/internal/bdftypes.h: Include FT_BDF_H. (BDF_GetPropertyFunc): New function pointer. * src/base/ftbdf.c (test_font_type): New helper function. (FT_Get_BDF_Charset_ID): Use `test_font_type'. (FT_Get_BDF_Property): New function. * src/bdf/bdfdrivr.c: Include FT_BDF_H. (bdf_get_bdf_property, bdf_driver_requester): New functions. (bdf_driver_class): Use `bdf_driver_requester'. * src/pcf/pcfdrivr.c: Include FT_BDF_H. (pcf_get_bdf_property, pcf_driver_requester): New functions (pcf_driver_class): Use `pcf_driver_requester'. * src/pcf/pcfread.c: Include `pcfread.h'. (pcf_find_property): Decorate it with FT_LOCAL_DEF. * src/pcf/pcfread.h: New file, providing `pcf_find_property'. * src/sfnt/ttload.c (sfnt_dir_check): Relaxed the `head' table size verification to accept a few broken fonts who pad the size incorrectly (the table should be padded, but its `size' field shouldn't according to the specification). 2003-01-18 Werner Lemberg <wl@gnu.org> * builds/unix/ltmain.sh: Regenerated with `libtoolize --force --copy' from libtool 1.4.3. * builds/unix/aclocal.m4: Regenerated with `aclocal -I .' from automake 1.7.1. * builds/unix/configure: Regenerated with autoconf 2.54. * builds/unix/config.guess, builds/unix/config.sub: Updated from `config' CVS module at subversions.gnu.org. * builds/unix/install-sh, builds/unix/mkinstalldirs: Updated from `automake' CVS module at subversions.gnu.org. 2003-01-15 David Turner <david@freetype.org> * include/freetype/freetype.h: Fixed documentation for FT_Size_Metrics. 2003-01-15 James Su <suzhe@turbolinux.com.cn> * src/gzip/ftgzip.c (ft_gzip_check_header): Bugfix: couldn't read certain gzip-ed font files (typo: `&&' -> `&'). 2003-01-15 Huw D M Davies <h.davies1@physics.ox.ac.uk> Added a Windows .FNT specific API (mostly for Wine). Also fixed a nasty bug in the header loader which would cause invalid memory overwrites. * include/freetype/config/ftheader.h (FT_WINFONTS_H): New macro for ftwinfnt.h. * include/freetype/internal/fnttypes.h: Include FT_WINFONTS_H. (FNT_FontRec): Updated. Move Windows FNT definition to... * include/freetype/ftwinfnt.h: This new file. (FT_WinFNT_HeaderRec): Rename `reserved2' to `reserved1'. * src/base/ftwinfnt.c: New file, providing `FT_Get_WinFNT_Header'. * src/winfonts/winfnt.c (winfnt_header_fields): Updated. Rename `reserved2' to `reserved1'. (fnt_font_load): Updated. * src/base/Jamfile, src/base/descrip.mms, src/base/rules.mk: Updated. 2003-01-14 Graham Asher <graham.asher@btinternet.com> * include/freetype/ftglyph.h, src/base/ftglyph.c: Added `const' to the type of the first argument to FT_Matrix_Multiply, which isn't changed -- this adds documentation and convenience. 2003-01-13 Graham Asher <graham.asher@btinternet.com> * src/sfnt/ttload.c (tt_face_load_metrics) [FT_CONFIG_OPTION_INCREMENTAL]: TrueType typefaces without horizontal metrics (without the `hmtx' table) are now tolerated if an incremental interface has been specified that has a get_glyph_metrics function, implying that metrics will be supplied from outside. This happens for certain Type 42 fonts passed from GhostScript. 2003-01-11 David Chester <davidchester@qmx.net> Patches to the auto-hinter in order to slightly improve the output. Note that everything is controlled through the new FT_CONFIG_OPTION_CHESTER_HINTS defined in `ftoption.h'. There are also individual FT_CONFIG_CHESTER_XXX macros to control individual `features'. Note that all improvements are enabled by default, but can be tweaked for optimization and testing purposes. The configuration macros will most likely disappear in the short future. * include/freetype/config/ftoption.h (FT_CONFIG_OPTION_CHESTER_HINTS): New macro. (FT_CONFIG_CHESTER_{SMALL_F,ASCENDER,SERIF,STEM,BLUE_SCALE}) [FT_CONFIG_OPTION_CHESTER_HINTS]: New macros to control individual features. * src/autohint/ahglobal.c (blue_chars) [FT_CONFIG_CHESTER_SMALL_F]: Add blue zone for `fijkdbh'. * src/autohint/ahglobal.h (AH_IS_TOP_BLUE) [FT_CONFIG_CHESTER_SMALL_F]: Use `AH_BLUE_SMALL_F_TOP'. * src/autohint/ahglyph.c (ah_outline_compute_edges) [FT_CONFIG_CHESTER_SERIF]: Use `AH_EDGE_SERIF'. (ah_outline_compute_blue_edges) [FT_CONFIG_CHESTER_SMALL_F]: Increase threshold for `best_dist'. * src/autohint/ahhint.c (ah_compute_stem_width) [FT_CONFIG_CHESTER_SERIF]: Provide new version for improved serif handling. (ah_align_linked_edge) [FT_CONFIG_CHESTER_SERIF]: Use special version of `ah_compute_stem_width'. (ah_hint_edges_3) [FT_CONFIG_CHESTER_STEM]: A new algorithm for stem alignment when stem widths are less than 1.5 pixels wide centers the stem slightly off-center of the center of a pixel (this increases sharpness and consistency). [FT_CONFIG_CHESTER_SERIF]: Use special version of `ah_compute_stem_width'. * src/autohint/ahtypes.h [FT_CONFIG_CHESTER_SMALL_F]: Add `AH_BLUE_SMALL_F_TOP'. 2003-01-11 David Turner <david@freetype.org> * include/freetype/internal/fnttypes.h (WinFNT_HeaderRec): Increase size of `reserved2' to avoid memory overwrites. 2003-01-08 Huw Davies <huw@codeweavers.com> * src/winfonts/winfnt.c (winfnt_header_fields): Read 16 bytes into `reserved2', not `reserved'. * src/base/ftobjs.c (find_unicode_charmap): Fixed the error code returned when the font doesn't contain a Unicode charmap. This allows FT2 to load `symbol.ttf' and a few others correctly since the last release. (open_face): Fix return value. 2003-01-08 Owen Taylor <owen@redhat.com> Implemented the FT_RENDER_MODE_LIGHT hinting mode in the auto and postscript hinters. * src/autohint/ahtypes.h (AH_HinterRec): Add `do_stem_adjust'. * src/autohint/ahhint.c (ah_compute_stem_width): Handle hinter->do_stem_adjust. (ah_hinter_load_glyph): Set hinter->do_stem_adjust. * src/pshinter/pshalgo3.h (PSH3_GlyphRec): Add `do_stem_adjust'. * src/pshinter/pshalgo3.c (psh3_hint_align): Use `do_stem_adjust'. (ps3_hints_apply): Handle FT_RENDER_MODE_LIGHT. * include/freetype/freetype.h (FT_Render_Mode): Add FT_RENDER_MODE_LIGHT. * src/truetype/ttgload.c: Fixing the TrueType loader to handle invalid composites correctly by limiting the recursion depth. (TT_MAX_COMPOSITE_RECURSE): New macro. (load_truetype_glyph): Add argument `recurse_count'. Load a composite only if the numbers of contours is -1, emit error otherwise. (TT_Load_Glyph): Updated. 2003-01-08 David Turner <david@freetype.org> * Jamrules, Jamfile, Jamfile.in, src/*/Jamfile: Small changes to support the compilation of FreeType 2 as part of larger projects with their own configuration options (only with Jam). 2003-01-07 David Turner <david@freetype.org> * src/base/ftstroker.c: Probably the last bug-fixes to the stroker; the API is likely to change, however. (ft_stroke_border_close): Don't record empty paths. (ft_stroke_border_get_counts): Increase `num_points' also in for loop. (ft_stroke_border_export): Don't increase `write' twice in for loops. (ft_stroker_outside): Handle `phi' together with `theta'. (FT_Stroker_ParseOutline): New function. * src/base/fttrigon.c (FT_Angle_Diff): Fixing function: It returned invalid values for large negative angle differences (resulting in incorrect stroker computations, among other things). * src/cache/ftccache.c (ftc_node_hash_unlink): Removing incorrect assertion, and changing code to avoid hash table size contraction. * src/base/Jamfile, src/base/rules.mk, src/base/descrip.mms: Adding `ftstroker' to default build, as optional component. 2002-12-26 David Turner <david@freetype.org> * src/gzip/adler32.c, src/gzip/infblock.c, src/gzip/inflate.c, src/gzip/inftrees.c, src/gzip/zconf.h, src/gzip/zlib.h, src/gzip/zutil.h: Updates to allow compilation without compiler warnings with LCC-Win32. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 4. * builds/unix/configure.ac (version_info): Increased to 9:3:3. * builds/unix/configure: Regenerated. * docs/VERSION.DLL: Updated. 2002-12-23 Anthony Fok <anthony@thizlinux.com> * builds/unix/configure.ac, builds/unix/unix-cc.in (LINK_LIBRARY), builds/unix/unix-def.in (SYSTEM_ZLIB): Small fix to configure sub-system on Unix to allow other programs to correctly link with zlib when needed. 2002-12-19 David Turner <david@freetype.org> * include/freetype/internal/sfnt.h (SFNT_Load_Table_Func): New function pointer. * include/freetype/tttables.h (FT_Load_Sfnt_Table): New function. * src/base/ftobjs.c: Implement it. * src/sfnt/sfdriver.c (sfnt_get_interface): Handle `load_sfnt' module request. 2002-12-17 David Turner <david@freetype.org> * src/base/ftobjs.c (find_unicode_charmap): Added some comments to better explain what's happening there. (open_face): Included Graham Asher's fix to prevent faces without Unicode charmaps from loading. * src/winfonts/winfnt.c: Included George Williams's fix to support version 2 fonts correctly. (winfnt_header_fields): Updated. (fnt_font_load): Handle version 2 fonts. (FNT_Load_Glyph): Updated. 2002-12-16 David Turner <david@freetype.org> * docs/VERSION.DLL: Updating document to better explain the differences between the three version numbers being used on Unix, as well as providing an autoconf fragment provided by Lars Clausen. * src/smooth/ftgrays.c (gray_render_conic): Fixed small bug that prevented Bézier arcs with negative vertical coordinates to be rendered appropriately. 2002-12-02 Antoine Leca <Antoine-Freetype@Leca-Marti.org> * src/base/ftobjs.c: Modified the logic to get Unicode charmaps. Now it loads UCS-4 charmaps when there is one. (find_unicode_charmap): New function. (open_face): Refer to the above one. (FT_Select_Charmap): Idem. 2002-11-29 Antoine Leca <Antoine-Freetype@Leca-Marti.org> * include/freetype/ftgzip.h: Correct the name of the controlling macro (was __FTXF86_H__ ...). 2002-11-27 Vincent Caron <v.caron@zerodeux.net> * builds/unix/unix-def.in, builds/unix/freetype-config.in, builds/unix/configure.ac, src/gzip/rules.mk, src/gzip/ftgzip.c [FT_CONFIG_OPTION_SYSTEM_ZLIB]: Adding support for system zlib installations if available on the target platform (Unix only). 2002-11-23 David Turner <david@freetype.org> * src/cff/cffload.c (cff_charset_load, cff_encoding_load): Modified charset loader to accept pre-defined charsets, even when the font contains fewer glyphs. Also enforced more checks to ensure that we never overflow the character codes array in the encoding. 2002-11-22 Antoine Leca <Antoine-Freetype@Leca-Marti.org> * include/freetype/ttnameid.h: Updated to latest OpenType specification. 2002-11-18 David Turner <david@freetype.org> * Version 2.1.3 released. ========================= 2002-11-07 David Turner <david@freetype.org> * src/cache/ftcsbits.c (ftc_sbit_node_load): Fixed a small bug that caused problems with embedded bitmaps. * src/otlayout/otlayout.h, src/otlayout/otlconf.h, src/otlayout/otlgsub.c, src/otlayout/otlgsub.h, src/otlayout/otlparse.c, src/otlayout/otlparse.h, src/otlayout/otlutils.h: Updating the OpenType Layout code, adding support for the first GSUB lookups. Nothing that really compiles for now though. * src/autohint/ahhint.c (ah_align_serif_edge): Disabled serif stem width quantization. It produces slightly better shapes though this is not distinguishable with many fonts. Remove other dead code. * src/Jamfile, src/*/Jamfile: Simplified. Use $(FT2_SRC_DIR). 2002-11-06 David Turner <david@freetype.org> * include/freetype/freetype.h (FT_LOAD_TARGET_LIGHT): New macro. (FT_LOAD_TARGET, FT_LOAD_TARGET_MODE): Use `& 15' instead of `& 7'. 2002-11-05 David Turner <david@freetype.org> * include/freetype/config/ftoption.h, src/gzip/ftgzip.c: Added support for the FT_CONFIG_OPTION_SYSTEM_ZLIB option, used to specify the use of system-wide zlib. Note that this macro, as well as TT_CONFIG_OPTION_BYTECODE_INTERPRETER, is not #undef-ed anymore. This allows the build system to define them depending on the configuration (typically by adding -D flags at compile time). * src/sfnt/ttcmap0.c (tt_face_build_cmaps): Removed compiler warnings in optimized mode relative to the `volatile' local variables. This was not a compiler bug after all, but the fact that a pointer to a volatile variable is not the same as a volatile pointer to a variable :-) The fix was to change `volatile FT_Byte* p' into `FT_Byte* volatile p'. * src/pfr/pfrload.c (pfr_phy_font_load), src/pfr/pfrdrivr.c (pfr_get_metrics), src/gzip/inftrees.c: Removed compiler warnings in optimized modes. * src/gzip/*.[hc]: Modified our zlib copy in order to prevent exporting any zlib function names outside of the component. This prevents linking problems on some platforms, when applications want to link FreeType _and_ zlib together. 2002-11-05 Juliusz <jch@pps.jussieu.fr> * src/psaux/psobjs.c (ps_table_add): Modified increment loop in order to implement exponential behaviour. 2002-11-01 David Turner <david@freetype.org> Added PFR-specific public API. Fixed the kerning retrieval routine (it returned invalid values when the outline and metrics resolution differ). * include/freetype/ftpfr.h, include/freetype/internal/pfr.h: New files. * include/freetype/internal/internal.h (FT_INTERNAL_PFR_H): New macro for pfr.h. * src/base/ftpfr.c: New file. * src/base/Jamfile, src/base/descrip.mms: Updated. * src/pfr/pfrdrivr.c: Include FT_INTERNAL_PFR_H. (pfr_get_kerning, pfr_get_advance, pfr_get_metrics): New functions. (pfr_service_rec): New format interface. (pfr_driver_class): Use `pfr_service_rec'. Replace `pfr_face_get_kerning' with `pfr_get_kerning'. * src/pfr/pfrobjs.c: Remove dead code. * src/base/ftobjs.c (ft_glyphslot_clear): Small internal fix to better support bitmap-based font formats. * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Fix handling of `scale'. Fix arguments to `FT_Vector_From_Polar'. 2002-10-31 David Turner <david@freetype.org> Add support for automatic handling of gzip-compressed PCF files. * src/gzip/*: New files, taken from the zlib package (except ftgzip.c). * include/freetype/ftgzip.h, src/gzip/ftgzip.c: New files. * include/freetype/config/ftheader.h (FT_GZIP_H): New macro for `ftgzip.h'. * src/pcf/pcfdriver.c: Include FT_GZIP_H and FT_ERRORS_H. (PCF_Face_Init): If normal open fails, try to open gzip stream. (PCF_Face_Done): Close gzip stream. * include/freetype/internal/pcftypes.h (PCF_Public_FaceRec), src/pcf/pcf.h (PCF_FaceRec): Add `gzip_stream' and `gzip_source'. * include/freetype/config/ftoption.h (FT_CONFIG_OPTION_USE_ZLIB): New macro. (T1_CONFIG_OPTION_DISABLE_HINTER, FT_CONFIG_OPTION_USE_CMAPS FT_CONFIG_OPTION_NO_CONVENIENCE_FUNCS, FT_CONFIG_OPTION_ALTERNATE_GLYPH_FORMATS): Removed. (FT_EXPORT, FT_EXPORT_DEF, FT_DEBUG_LEVEL_ERROR, FT_DEBUG_LEVEL_TRACE, FT_DEBUG_MEMORY): Comment out definitions so that platform specific configuration file can override. * include/freetype/internal/ftstream.h: Include FT_SYSTEM_H. 2002-10-30 David Turner <david@freetype.org> * FreeType 2.1.3rc3 released. 2002-10-25 David Turner <david@freetype.org> * include/freetype/ftcache.h (FT_POINTER_TO_ULONG): New macro. (FTC_FACE_ID_HASH): Rewritten, using FT_POINTER_TO_ULONG. 2002-10-22 Giuseppe Ghibò <ghibo@mandrakesoft.com> * include/freetype/freetype.h (FT_Encoding): Fix entry for latin-2. 2002-10-07 Werner Lemberg <wl@gnu.org> * include/freetype/freetype.h (FT_Open_Face): Use `const' for `args' (suggested by Graham). * src/base/ftobjs.c (FT_Open_Face): Updated. (ft_input_stream_new): Ditto. 2002-10-05 David Turner <david@freetype.org> Adding support for embedded bitmaps to the PFR driver, and rewriting its kerning loader/handler to use all kerning pairs in a physical font (and not just the first item). * src/pfr/pfr.c: Include `pfrsbit.c'. * src/pfr/pfrgload.c: Include `pfrsbit.h'. * src/pfr/pfrload.c (pfr_extra_item_load_kerning_pairs): Rewritten. (pfr_phy_font_done, pfr_phy_font_load): Updated. * src/pfr/pfrobjs.c: Include `pfrsbit.h'. (pfr_face_init): Handle kerning and embedded bitmaps. (pfr_slot_load): Load embedded bitmaps. (PFR_KERN_INDEX): Removed. (pfr_face_get_kerning): Rewritten. * src/pfr/pfrsbit.c, src/pfr/pfrsbit.h: New files. * src/pfr/pfrtypes.h (PFR_KernItemRec): New structure. (PFR_KERN_INDEX): New macro. (PFR_PhyFontRec): Add items for kerning and embedded bitmaps. * src/pfr/Jamfile (_sources) [FT2_MULTI]: Add `pfrsbit'. * src/base/ftobjs.c (FT_Load_Glyph): Don't load bitmap fonts if FT_LOAD_NO_RECURSE is set. Load embedded bitmaps only if FT_LOAD_NO_BITMAP isn't set. * src/tools/docmaker/content.py, src/tools/docmaker/sources.py, src/tools/docmaker/tohtml.py: Fixing a few nasty bugs. * src/sfnt/ttcmap0.c (tt_cmap4_validate): The validator for format 4 sub-tables is now capable of dealing with invalid `length' fields at the start of the sub-table. This allows fonts like `mg______.ttf' (i.e. Marriage) to return accurate charmaps. * docs/CHANGES: Updated. 2002-10-05 Werner Lemberg <wl@gnu.org> * src/smooth/ftgrays.c (SUBPIXELS): Add cast to `TPos'. Update all callers. (TRUNC): Add cast to `TCoord'. Update all callers. (TRaster): Use `TPos' for min_ex, max_ex, min_ey, max_ey, and last_ey. Update all casts. (gray_render_line): Fix casts for `p' and `first'. 2002-10-02 Detlef Würkner <TetiSoft@apg.lahn.de> * src/bdf/bdflib.c (bdf_load_font): Allocate the _bdf_parse_t structure with FT_ALLOC instead of using the stack. 2002-09-27 Werner Lemberg <wl@gnu.org> * src/include/freetype/internal/tttypes.h (num_sbit_strikes, num_sbit_scales): Use `FT_ULong'. * src/sfnt/sfobjs.c (sfnt_load_face): Updated accordingly. * src/sfnt/ttsbit.c (tt_face_set_sbit_strike): Ditto. (find_sbit_image): Remove cast. * src/raster/ftrend1.c (ft_raster1_render): Fix cast. 2002-09-27 Wolfgang Domröse <porthos.domroese@harz.de> * src/sfnt/ttload.c (tt_face_load_names): Use cast. * src/sfnt/ttcmap.c (code_to_next2): Use long constant. (code_to_index4): Use cast. (code_to_index8_12): Fix cast. * src/sfnt/ttcmap0.c (tt_cmap4_char_next, tt_cmap8_char_index, tt_cmap12_char_index): Use cast for `result'. (tt_face_build_cmaps): Use cast. * src/sfnt/sfobjs.c (tt_name_entry_ascii_from_ucs4): Use cast for `code'. (sfnt_load_face): Use FT_Int32 for `flags'. * src/smooth/ftgrays.c (gray_render_scanline, gray_render_line, gray_compute_cbox, gray_convert_glyph, gray_raster_reset): Add casts to `TCoord' and `int'. More 16bit fixes. s/FT_Pos/TPos/. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Add casts. 2002-09-26 Werner Lemberg <wl@gnu.org> * src/sfnt/ttpost.c (load_post_names, tt_face_free_ps_names, tt_face_get_ps_name): Replace switch statement with if clauses to make it more portable. * src/cff/cffobjs.c (cff_face_init): Ditto. * include/freetype/ftmodule.h (FT_Module_Class): Use `FT_Long' for `module_size'. * include/freetype/ftrender.h (FT_Glyph_Class_): Use `FT_Long' for `glyph_size'. * src/base/ftobjs.c (FT_Render_Glyph): Change second parameter to `FT_Render_Mode'. (FT_Render_Glyph_Internal): Change third parameter to `FT_Render_Mode'. * src/base/ftglyph.c (FT_Glyph_To_Bitmap): Change second parameter to `FT_Render_Mode'. * src/raster/ftrend1.c (ft_raster1_render): Change third parameter to `FT_Render_Mode'. * src/smooth/ftsmooth.c (ft_smooth_render, ft_smooth_render_lcd, ft_smooth_render_lcd_v): Ditto. (ft_smooth_render_generic): Change third and fifth parameter to `FT_Render_Mode'. * include/freetype/freetype.h, include/freetype/internal/ftobjs.h, include/freetype/ftglyph.h: Updated. * src/cff/cffdrivr.c (Load_Glyph), src/pcf/pcfdriver.c (PCF_Glyph_Load), src/pfr/pfrobjs.c (pfr_slot_load), src/winfonts/winfnt.c (FNT_Load_Glyph), src/t42/t42objs.c (T42_GlyphSlot_Load), src/bdf/bdfdrivr.c (BDF_Glyph_Load): Change fourth parameter to `FT_Int32'. * src/pfr/pfrobjs.c (pfr_face_init): Add two missing parameters and declare them as unused. * src/cid/cidparse.h (CID_Parser): Use FT_Long for `postscript_len'. * src/psnames/psnames.h (PS_Unicode_Value_Func): Change return value to FT_UInt32. * src/psnames/psmodule.c (ps_unicode_value, ps_build_unicode_table): Updated accordingly. 2002-09-26 Wolfgang Domröse <porthos.domroese@harz.de> * src/cff/cffdrivr.c (Get_Kerning): Use FT_Long for `middle'. (cff_get_glyph_name): Use cast for result of ft_strlen. * src/cff/cffparse.c (cff_parse_real): User cast for assigning `exp'. * src/cff/cffload.c (cff_index_get_pointers): Use FT_ULong for some local variables. (cff_charset_load, cff_encoding_load): Use casts to FT_UInt for some switch statements. (cff_font_load): Use cast in call to CFF_Load_FD_Select. * src/cff/cffobjs.c (cff_size_init): Use more casts. (cff_face_init): Use FT_Int32 for `flags'. * src/cff/cffgload.c (cff_operator_seac): Use cast for assigning `adx' and `ady'. (cff_decoder_parse_charstrings): Use FT_ULong for third parameter. Use more casts. * src/cff/cffcmap.c (cff_cmap_unicode_init): Use cast for `count'. * src/cid/cidload.c (cid_read_subrs): Use FT_ULong for `len'. * src/cid/cidgload.c (cid_load_glyph): Add missing cast for `cid_get_offset'. * src/psaux/t1decode.c (t1_decoder_parse_charstrings) <18>: Use cast for `num_points'. (t1_decoder_init): Use cast for assigning `decoder->num_glyphs'. * src/base/ftdebug.c (ft_debug_init): Use FT_Int. * include/freetype/internal/ftdriver.h (FT_Slot_LoadFunc): Use `FT_Int32' for fourth parameter. * src/base/ftobjs.c (open_face): Use cast for calling clazz->init_face. * src/raster/ftraster.c (Set_High_Precision): Use `1' instead of `1L'. (Finalize_Profile_Table, Line_Up, ft_black_init): Use casts. * src/raster/ftrend1.c (ft_raster1_render): Ditto. * src/sfnt/sfnt_dir_check: Compare `magic' with unsigned long constant. 2002-09-26 Detlef Würkner <TetiSoft@apg.lahn.de> * builds/amiga/include/freetype/config/ftmodule.h: Updated. 2002-09-25 David Turner <david@freetype.org> * src/autohint/ahtypes.h (AH_HINT_METRICS): Disabling metrics hinting in the auto-hinter. This produces much better anti-aliased text. * docs/CHANGES: Updating the changes documentation. 2002-09-25 Anthony Fok <anthony@thizlinux.com> * src/sfnt/ttcmap0.c (tt_cmap4_validate, tt_cmap4_char_index, tt_cmap4_char_next): Added support for opens___.ttf (it contains a charmap that uses offset=0xFFFFU instead of 0x0000 to indicate a missing glyph). 2002-09-21 Wolfgang Domröse <porthos.domroese@harz.de> * src/truetype/ttdriver.c (Load_Glyph): Fourth parameter must be FT_Int32. * src/truetype/ttgload.c, src/truetype/ttgload.h (TT_Load_Glyph): Ditto. 2002-09-19 Wolfgang Domröse <porthos.domroese@harz.de> More 16bit fixes. * src/autohint/ahglobal.c (sort_values): Use FT_Pos for `swap'. (ah_hinter_compute_widths): Use FT_Pos for `dist'. Use AH_MAX_WIDTHS. * src/autohint/ahglyph.c (ah_outline_scale_blue_edges): Use FT_Pos for `delta'. (ah_outline_compute_edges): Replace some ints with FT_Int and FT_Pos. (ah_test_extrema): Clean up code. (ah_get_orientation): Use 4 FT_Int variables instead of FT_BBox to hold indices. * src/autohint/ahtypes.h (AH_SegmentRec): Change type of `score' to FT_Pos. 2002-09-19 Werner Lemberg <wl@gnu.org> * builds/unix/config.guess, builds/unix/config.sub: Updated to recent versions. 2002-09-18 David Turner <david@freetype.org> * src/base/ftobjs.c (FT_Library_Version): Bugfix. * FreeType 2.1.3rc2 (release candidate 2) is released! 2002-09-17 David Turner <david@freetype.org> * include/freetype/freetype.h, include/freetype/ftimage.h, include/freetype/ftstroker.h, include/freetype/ftsysio.h, include/freetype/ftsysmem.h, include/freetype/ttnameid.h: Updating the in-source documentation. * src/tools/docmaker/tohtml.py: Updating the HTML formatter in the DocMaker tool. * src/tools/docmaker.py: Removed. 2002-09-17 Werner Lemberg <wl@gnu.org> More 16bit fixes. * src/psaux/psobjs.c (reallocate_t1_table): Use FT_Long for second parameter. 2002-09-16 Werner Lemberg <wl@gnu.org> 16bit fixes from Wolfgang Domröse. * src/type1/t1parse.h (T1_ParserRec): Change type of `base_len' and `private_len' to FT_Long. * src/type1/t1parse.c (T1_Get_Private_Dict): Remove cast for `private_len'. * src/type1/t1load.c: Use FT_Int cast for most calls of T1_ToInt. Use FT_PtrDist where appropriate. (parse_encoding): Use FT_Long for `count' and `n'. (read_binary_data): Use FT_Long* for second parameter. * src/type1/t1afm.c (afm_atoindex): Use FT_PtrDist. * src/cache/ftcsbits.c (ftc_sbit_node_load): Remove unused label. * src/pshinter/pshalgo3.c (psh3_hint_align): Remove unused variable. 2002-09-14 Werner Lemberg <wl@gnu.org> Making ftgrays.c compile stand-alone again. * include/freetype/ftimage.h: Include ft2build.h only if _STANDALONE_ isn't defined. * src/smooth/ftgrays.c [_STANDALONE_]: Define ft_memset, FT_BEGIN_HEADER, FT_END_HEADER. (FT_MEM_ZERO): Define. (TRaster) [GRAYS_USE_GAMMA]: Use `unsigned char' instead of FT_Byte. (gray_render_span, gray_init_gamma): Don't use `FT_UInt'. Don't cast with `FT_Byte'. (grays_init_gamma): Don't use `FT_UInt'. 2002-09-14 Werner Lemberg <wl@gnu.org> * src/base/ftinit.c (FT_Add_Default_Modules): Improve error message. * src/pcf/pcfdriver.c (PCF_Face_Done): Improve tracing message. * include/freetype/config/ftoption.h (FT_MAX_MODULES): Increased to 32. 2002-09-10 Werner Lemberg <wl@gnu.org> * builds/unix/configure.ac (version_info): Set to 9:2:3. * builds/unix/configure: Regenerated. * docs/VERSION.DLL: Updated. 2002-09-09 David Turner <david@freetype.org> * src/pshinter/pshalgo2.c (psh2_glyph_find_strong_points), src/pshinter/pshalgo3.c (psh3_glyph_find_strong_points): Adding fix to prevent segfault when hints are provided in an empty glyph. * src/cache/ftccache.i (GEN_CACHE_LOOKUP) [FT_DEBUG_LEVEL_ERROR]: Removed conditional code. This fixes a bug that prevented compilation in debug mode of template instantiation. * include/freetype/ftimage.h: Removed incorrect `zft_' definitions and updated constants documentation comments. * src/cff/cffparse.c (cff_parser_run): Fixed the CFF table loader. It didn't accept empty arrays, and this prevented the loading of certain fonts. * include/freetype/freetype.h (FT_FaceRec): Updating documentation comment. The `descender' value is always *negative*, not positive. 2002-09-09 Owen Taylor <owen@redhat.com> * src/pcf/pcfdriver.c (PCF_Glyph_Load): Fixing incorrect computation of bitmap metrics. 2002-09-08 David Turner <david@freetype.org> Various updates to correctly support subpixel rendering. * include/freetype/config/ftmodule.h: Add two renderers for LCD. * src/base/ftobjs.c (FT_Load_Glyph): Updated. * src/smooth/ftsmooth.c (ft_smooth_render_lcd, ft_smooth_render_lcd_v): Set FT_PIXEL_MODE_LCD and FT_PIXEL_MODE_LCD_V, respectively. * include/freetype/cache/ftcimage.h (FTC_ImageTypeRec): New structure. Updated all users. (FTC_ImageDesc): Removed. (FTC_ImageCache_Lookup): Second parameter is now of type `FTC_ImageType'. Updated all users. (FTC_IMAGE_DESC_COMPARE): Updated and renamed to... (FTC_IMAGE_TYPE_COMPARE): This. (FTC_IMAGE_DESC_HASH): Updated and renamed to... (FTC_IMAGE_TYPE_HASH): This. * include/freetype/cache/ftcsbits.h (FTC_SBitRec): Field `num_grays' replaced with `max_grays'. `pitch' is now FT_Short. (FTC_SBitCache_Lookup): Second parameter is now of type `FTC_ImageType'. Updated all users. * src/cache/ftcimage.c (FTC_ImageQueryRec, FTC_ImageFamilyRec): Updated. (ftc_image_node_init): Updated. Moved code to convert type flags to load flags to... (FTC_Image_Cache_Lookup): This function. (ftc_image_family_init): Updated. * src/cache/ftcsbits.c (FTC_SBitQueryRec, FTC_SBitFamilyRec): Updated. (ftc_sbit_node_load): Updated. Moved code to convert type flags to load flags to... (FTC_SBitCache_Lookup): This function. * src/autohint/ahtypes.h (AH_HinterRec): Replace `no_*_hints' with `do_*_snapping'. Update all users (with negation). * src/autohint/ahhint.c (ah_compute_stem_width): Fix threshold for `dist' for `delta' < 40. * src/pshinter/pshalgo3.h (PSH3_GlyphRec): Replace `no_*_hints' with `do_*_snapping'. Update all users (with negation). * src/pshinter/pshalgo3.c (psh3_dimension_quantize_len): New function. (psh3_hint_align): Use it. Improve hinting code. [STRONGER]: Removed. (STRONGER): Removed. * include/freetype/freetype.h (FT_Set_Hint_Flags, FT_HINT_*): Removed. 2002-09-05 Werner Lemberg <wl@gnu.org> * src/cid/cidobjs.c (CID_Size_Init): Renamed to... (cid_size_init): This. * src/psaux/psobjs.c (T1_Builder_Add_Point1): Renamed to... (t1_builder_add_point1): This. Updated all affected code. * src/pshinter/pshalgo3.c (psh3_hint_align): Fix compiler warnings. * src/type1/t1gload.c (T1_Compute_Max_Advance): Ditto. 2002-09-04 David Turner <david@freetype.org> * include/freetype/freetype.h: Corrected the definition of ft_encoding_symbol to be FT_ENCODING_MS_SYMBOL (instead of the erroneous FT_ENCODING_SYMBOL). * builds/unix/unix-def.in (datadir): Initialize it (thanks to Anthony Fok). 2002-08-29 David Turner <david@freetype.org> Slight modification to the Postscript hinter to slightly increase the contrast of smooth hinting. This is very similar to what the auto-hinter does when it comes to stem width computations. However, it produces better results with well-hinted fonts. * include/freetype/internal/psaux.h (T1_Decoder_FuncsRec): Add hint mode to `init' member function. (T1_DecoderRec): Add hint mode. * include/freetype/internal/pshints (T1_Hints_ApplyFunc, T2_Hints_ApplyFunc): Pass `hint_mode', not `hint_flags'. * src/psaux/t1decode.c (t1_decoder_init): Add hint mode argument. * src/pshinter/pshalgo1.c (ps1_hints_apply): Pass hint mode, not hint flags. * src/pshinter/pshalgo2.c (ps2_hints_apply): Ditto. * src/pshinter/pshalgo3.c (ps3_hints_apply): Ditto. (STRONGER): New macro. (psh3_hint_align, psh3_hint_table_align_hints): Pass `glyph' instead of `hint_flags'. Implement announced changes. * src/pshinter/pshalgo3.h (PSH3_GlyphRec): Add flags to control vertical and horizontal hints and snapping. * README, docs/CHANGES: Updating for the 2.1.3 release. 2002-08-27 David Turner <david@freetype.org> * Massive re-formatting changes to many, many source files. I don't want to list them all here. The operations performed were all logical transformations of the sources: - trying to convert all enums and constants to CAPITALIZED_STYLE, #with define definitions like #define my_old_constants MY_NEW_CONSTANT - big, big update of the documentation comments * include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c, include/freetype/ftimage.h: Adding support for LCD-optimized rendering though the new constants/enums: FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V This is still work in progress, don't expect everything to work correctly though most of the features have been implemented. * Adding new FT_LOAD_XXX flags, used to specify both hinting and rendering targets: FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering FT_LOAD_TARGET_MONO :: monochrome bitmaps FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering Note that FT_LOAD_TARGET_NORMAL is 0, which means that the default behaviour of the font engine is _unchanged_. * include/freetype/ftimage.h (FT_Outline_{Move,Line,Conic,Cubic}To_Func): Renamed to... (FT_Outline_{Move,Line,Conic,Cubic}ToFunc): This. (FT_Raster_Span_Func): Renamed to ... (FT_SpanFunc): This. (FT_Raster_{New,Done,Reset,Set_Mode,Render}_Func): Renamed to ... (FT_Raster_{New,Done,Reset,SetMode,Render}Func}: This. Updated all affected code. * include/freetype/ftrender.h (FT_Glyph_{Init,Done,Transform,BBox,Copy,Prepare}_Func): Renamed to ... (FT_Glyph_{Init,Done,Transform,GetBBox,Copy,Prepare}Func): This. (FTRenderer_{render,transform,getCBox,setMode}): Renamed to ... (FT_Renderer_{RenderFunc,TransformFunc,GetCBoxFunc,SetModeFunc}): This. Updated all affected code. * src/autohint/ahtypes.h (AH_Point, AH_Segment, AH_Edge, AH_Globals, AH_Face_Globals, AH_Outline, AH_Hinter): These typedefs are now pointers to the corresponding `*Rec' structures. All source files have been updated accordingly. * src/cff/cffgload.c (cff_decoder_init): Add hint mode as parameter. * src/cff/cffgload.h (CFF_Decoder): Add `hint_mode' element. * src/cid/cidgload.c (CID_Compute_Max_Advance): Renamed to... (cid_face_compute_max_advance): This. (CID_Load_Glyph): Renamed to... (cid_slot_load_glyph): This. * src/cid/cidload.c (CID_Open_Face): Renamed to... (cid_face_open): This. * src/cid/cidobjs.c (CID_GlyphSlot_{Done,Init}): Renamed to... (cid_slot_{done,init}): This. (CID_Size_{Get_Globals_Funcs,Done,Reset): Renamed to... (cid_size_{get_globals_funcs,done,reset): This. (CID_Face_{Done,Init}): Renamed to... (cid_face_{done,init}): This. (CID_Driver_{Done,Init}: Renamed to... (cid_driver_{done,init}: This. * src/cid/cidparse.c (CID_{New,Done}_Parser): Renamed to... (cid_parser_{new,done}): This. * src/cid/cidparse.h (CID_Skip_{Spaces,Alpha}): Renamed to... (cid_parser_skip_{spaces,alpha}): This. (CID_To{Int,Fixed,CoordArray,FixedArray,Token,TokenArray}): Renamed to... (cid_parser_to_{int,fixed,coord_array,fixed_array,token,token_array}): This. (CID_Load_{Field,Field_Table): Renamed to... (cid_parser_load_{field,field_table}): This. * src/cid/cidriver.c (CID_Get_Interface): Renamed to... (cid_get_interface): This. Updated all affected code. * src/psaux/psobjs.c (PS_Table_*): Renamed to... (ps_table_*): This. (T1_Builder_*): Renamed to... (t1_builder_*): This. * src/psaux/t1decode.c (T1_Decoder_*): Renamed to... (t1_decoder_*): This. * src/psnames/psmodule.c (PS_*): Renamed to... (ps_*): This. Updated all affected code. * src/sfnt/sfdriver (SFNT_Get_Interface): Renamed to... (sfnt_get_interface): This. * src/sfnt/sfobjs.c (SFNT_*): Renamed to... (sfnt_*): This. * src/sfnt/ttcmap.c (TT_CharMap_{Load,Free}): Renamed to... (tt_face_{load,free}_charmap): This. * src/sfnt/ttcmap0.c (TT_Build_CMaps): Renamed to... (tt_face_build_cmaps): This. * src/sfnt/ttload.c (TT_*): Renamed to... (tt_face_*): This. * src/sfnt/ttpost.c (TT_Post_Default_Names): Renamed to... (tt_post_default_names): This. (Load_*): Renamed to... (load_*): This. (TT_*): Renamed to... (tt_face_*): This. * src/sfnt/ttsbit.c (TT_*): Renamed to... (tt_face_*): This. ({Find,Load,Crop}_*): Renamed to... ({find,load,crop}_*): This. Updated all affected code. * src/smooth/ftsmooth.c (ft_smooth_render): Renamed to... (ft_smooth_render_generic): This. Make function more generic by adding vertical and horizontal scaling factors. (ft_smooth_render, ft_smooth_render_lcd, ft_smooth_render_lcd_v): New functions. (ft_smooth_lcd_renderer_class, ft_smooth_lcdv_renderer_class): New classes. * src/truetype/ttobjs.c (TT_{Done,New}_GlyphZone): Renamed to... (tt_glyphzone_{done,new}): This. (TT_{Face,Size,Driver}_*): Renamed to... (tt_{face,size,driver}_*): This. * src/truetype/ttpload.c (TT_Load_Locations): Renamed to... (tt_face_load_loca): This. (TT_Load_Programs): Renamed to... (tt_face_load_fpgm): This. (TT_*): Renamed to... (tt_face_*): This. 2002-08-27 Werner Lemberg <wl@gnu.org> * docs/VERSION.DLL: New file. 2002-08-23 Graham Asher <graham.asher@btinternet.com> * src/cff/cffgload.c (cff_operator_seac) [FT_CONFIG_OPTION_INCREMENTAL]: Incremental fonts (actually not incremental in the case of CFF but just using callbacks to get glyph recipes) pass the character code, not the glyph index, to the get_glyph_data function; they have no valid charset table. * src/cff/cffload.c (cff_font_load): Removed special cases for FT_CONFIG_OPTION_INCREMENTAL, which are no longer necessary; CFF fonts provided via the incremental interface now have to conform more closely to the CFF font format. * src/cff/cffload.h (cff_font_load): Removed argument now unneeded. * src/cff/cffobjs.c (cff_face_init): Changed call to cff_font_load to conform with new signature. 2002-08-22 David Turner <david@freetype.org> * src/base/ftobject.c, src/base/ftsynth.c, src/base/ftstroker.c, src/bdf/bdfdrivr.c: Removed compiler warnings. 2002-08-21 Werner Lemberg <wl@gnu.org> * src/pshinter/pshalgo3.c (psh3_glyph_compute_inflections, psh3_glyph_compute_extrema, psh3_hint_table_find_strong_point): Fix compiler warnings and resolve shadowing of local variables. 2002-08-21 David Turner <david@freetype.org> The automatic and Postscript hinter now automatically detect inflection points in glyph outlines and treats them specially. This is very useful to prevent nasty effect like the disappearing diagonals of `S' and `s' in many, many fonts. * src/autohint/ahtypes.h (ah_flag_inflection): New macro. * src/autohint/ahangles.c (ah_angle_diff): New function. * src/autohint/ahangles.h: Updated. * src/autohint/ahglyph.c (ah_outline_compute_inflections): New function. (ah_outline_detect_features): Use it. * src/autohint/ahhint.c (ah_hinter_align_strong_points) [!AH_OPTION_NO_WEAK_INTERPOLATION]: Handle inflection. * src/tools/docmaker/docmaker.py, src/tools/docmaker/utils.py, src/tools/docmaker/tohtml.py: Updating the DocMaker tool. * include/freetype/freetype.h: Changing the type of the `load_flags' parameter from `FT_Int' to `FT_Int32', this in order to support more options. This should only break binary and/or source compatibility on 16-bit platforms (Atari?). (FT_LOAD_NO_AUTOHINT): New macro. * src/base/ftobjs.c (FT_Load_Glyph): Updated. Handle FT_LOAD_NO_AUTOHINT. (FT_Load_Char): Updated. * src/pshinter/pshalgo3.c, src/base/ftobjs.c, src/base/ftobject.c, src/autohint/ahglyph.c, include/freetype/freetype.h: Fixing typos and removing compiler warnings. 2002-08-20 Werner Lemberg <wl@gnu.org> * src/truetype/ttgload.c (TT_Get_Metrics): Add guard for k = 0. 2002-08-20 David Turner <david@freetype.org> * src/pshinter/pshalgo1.c, src/pshinter/pshalgo2.c, src/pshinter/pshglob.c, src/pshinter/pshrec.c, src/autohint/ahmodule.c [DEBUG_HINTER]: Removing compiler warnings (only used in development builds anyway). Improve support of local extrema and stem edge points. * src/pshinter/pshalgo3.h (PSH3_Hint_TableRec): Use PSH3_ZoneRec for `zones'. (PSH3_DIR_UP, PSH3_DIR_DOWN): Exchange values. (PSH3_DIR_HORIZONTAL, PSH3_DIR_VERTICAL): New macros. (PSH3_DIR_COMPARE, PSH3_DIR_IS_HORIZONTAL, PSH3_IS_VERTICAL): New macros. (PSH3_POINT_INFLEX): New enum. (psh3_point_{is,set}_{off,inflex}): New macros. (PSH3_POINT_{EXTREMUM,POSITIVE,NEGATIVE,EDGE_MIN,EDGE_MAX): New enum values. (psh3_point_{is,set}_{extremum,positive,negative,edge_min,edge_max}): New macros. (PSH3_PointRec): New members `flags2' and `org_v'. (PSH3_POINT_EQUAL_ARG, PSH3_POINT_ANGLE): New macros. * src/pshinter/pshalgo3.c [DEBUG_HINTER]: Removing compiler warnings. (COMPUTE_INFLEXS): New macro. (psh3_hint_align): Simplify some basic arithmetic computations. (psh3_point_is_extremum): Removed. (psh3_glyph_compute_inflections) [COMPUTE_INFLEXS]: New function. (psh3_glyph_init) [COMPUTE_INFLEXS]: Use it. (psh3_glyph_compute_extrema): New function. (PSH3_STRONG_THRESHOLD): Increased to 30. (psh3_hint_table_find_strong_point): Improved. (psh3_glyph_find_strong_points, psh3_glyph_interpolate_strong_points): Updated. (psh3_hints_apply): Use psh3_glyph_compute_extrema. * test/gview.c (draw_ps3_hint, ps3_draw_control_points): New functions. Other small updates. * Jamfile: Small updates. 2002-08-18 Arkadiusz Miskiewicz <misiek@pld.ORG.PL> * builds/unix/install.mk (install, uninstall): Add $(DESTDIR) to make life easier for package maintainers. 2002-08-18 Werner Lemberg <wl@gnu.org> * src/pcf/pcfdriver.c (PCF_Glyph_Load): Fix computation of horiBearingX. * src/bdf/bdfdrivr.c (BDF_Glyph_Load): Fix computation of horiBearingY. 2002-08-16 George Williams <gww@silcom.com> Add support for Apple composite glyphs. * include/freetype/config/ftoption.h (TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED): New macro. * src/truetype/ttgload.c (OVERLAP_COMPOUND, SCALED_COMPONENT_OFFSET, UNSCALED_COMPONENT_OFFSET): New macros for additional OpenType glyph loading flags. (load_truetype_glyph): Implement it. 2002-08-16 Werner Lemberg <wl@gnu.org> * src/cff/cffgload.c (cff_free_glyph_data), src/cff/cffload.c (cff_font_load): Use FT_UNUSED. 2002-08-15 Werner Lemberg <wl@gnu.org> * src/base/ftglyph.c (FT_Glyph_To_Bitmap): Initialize `error'. * src/sfnt/sfobjs.c (SFNT_Load_Face): Fix compiler warning. 2002-08-15 Graham Asher <graham.asher@btinternet.com> Implemented the incremental font loading system for the CFF driver. Tested using the GhostScript-to-FreeType bridge (under development). * src/cff/cffgload.c (cff_get_glyph_data, cff_free_glyph_data): New functions. (cff_operator_seac, cff_compute_max_advance, cff_slot_load): Use them. * src/cff/cffload.c (cff_font_load): Add `face' parameter. Load charset and encoding only if there are glyphs. [FT_CONFIG_OPTION_INCREMENTAL]: Incremental fonts don't need character recipes. * src/cff/cffload.h, src/cff/cffobjs.c: Updated. * src/cid/cidgload.c (cid_load_glyph) [FT_CONFIG_OPTION_INCREMENTAL]: Corrected the incremental font loading implementation to use the new system introduced on 2002-08-01. 2002-08-06 Werner Lemberg <wl@gnu.org> * src/cff/cffcmap.c: Remove compiler warnings. * src/cache/ftccache.c, src/cache/ftccache.i, src/pfr/pfrload.c, src/pfr/pfrgload.c: s/index/idx/. * src/cff/cffload.c: s/select/fdselect/. * src/raster/ftraster.c: s/wait/waiting/. 2002-08-01 Graham Asher <graham.asher@btinternet.com> * src/type1/t1load.c (T1_Open_Face): Tolerate a face with no charstrings if there is an incremental loading interface. Type 1 faces supplied by PostScript interpreters like GhostScript will typically not provide any charstrings at load time, so this is essential if they are to work. 2002-08-01 Graham Asher <graham.asher@btinternet.com> Modified incremental loading interface to be closer to David's preferences. The header freetype.h is not now affected, the interface is specified via an FT_Parameter, the pointer to the interface is hidden in an internal part of the face record, and all the definitions are in ftincrem.h. * include/freetype/freetype.h [FT_CONFIG_OPTION_INCREMENTAL]: Removed. * include/freetype/internal/ftobjs.h [FT_CONFIG_OPTION_INCREMENTAL]: Include FT_INCREMENTAL_H. (FT_Face_InternalRec) [FT_CONFIG_OPTION_INCREMENTAL]: Add `incremental_interface'. * src/base/ftobjs.c (open_face, FT_Open_Face) [FT_CONFIG_OPTION_INCREMENTAL]: Updated. * src/sfnt/sfobjs.c (SFNT_Load_Face) [FT_CONFIG_OPTION_INCREMENTAL]: Updated. * src/truetype/ttgload.c (load_truetype_glyph) [FT_CONFIG_OPTION_INCREMENTAL]: Updated. Free loaded glyph data properly. (compute_glyph_metrics, TT_Load_Glyph) [FT_CONFIG_OPTION_INCREMENTAL]: Updated. * src/truetype/ttobjs.c (TT_Face_Init) [FT_CONFIG_OPTION_INCREMENTAL]: Updated. * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String) [FT_CONFIG_OPTION_INCREMENTAL]: Updated. (T1_Parse_Glyph) [FT_CONFIG_OPTION_INCREMENTAL]: Updated. Free loaded glyph data properly. (T1_Load_Glyph): Updated. [FT_CONFIG_OPTION_INCREMENTAL]: Free loaded glyph data properly. 2002-07-30 David Turner <david@freetype.org> * include/freetype/ftincrem.h: Adding new experimental header file to demonstrate a `cleaner' API to support incremental font loading. * include/freetype/config/ftheader.h (FT_INCREMENTAL_H): New macro. * src/tools/docmaker/*: Adding new (more advanced) version of the DocMaker tool, using Python's sophisticated regexps. 2002-07-28 Werner Lemberg <wl@gnu.org> s/ft_memset/FT_MEM_SET/. s/FT_MEM_SET/FT_MEM_ZERO/ where appropriate. 2002-07-27 Werner Lemberg <wl@gnu.org> * src/sfnt/ttload.c (sfnt_dir_check): Make it work with TTCs. 2002-07-26 Werner Lemberg <wl@gnu.org> * src/truetype/ttgload.c (load_truetype_glyph) [FT_CONFIG_OPTION_INCREMENTAL]: s/memset/ft_memset/. * src/autohint/ahhint.c (ah_hint_edges_3): Fix compiler warning. * src/cff/cffload.c (cff_encoding_load): Remove `memory' variable. * src/cff/cffcmap.c (cff_cmap_encoding_init): Remove `psnames' variable. * src/truetype/ttgload.c (load_truetype_glyph): Remove statement without effect. * src/truetype/ttdriver (Get_Char_Index, Get_Next_Char): Removed. * src/pshinter/pshalgo3.c (psh3_hint_table_record, psh3_hint_table_init, psh3_hint_table_activate_mask): Fix error message. 2002-07-24 Graham Asher <graham.asher@btinternet.com> * src/truetype/ttobjs.c: Fix for bug reported by Sven Neumann [sven@gimp.org] on the FreeType development forum: `If FT_CONFIG_OPTION_INCREMENTAL is undefined (this is the default), the TrueType loader crashes in line 852 of src/truetype/ttgload.c when it tries to access face->glyph_locations.' 2002-07-18 Graham Asher <graham.asher@btinternet.com> Added types and structures to support incremental typeface loading. The FT_Incremental_Interface structure, defined in freetype.h, is designed to be passed to FT_Open_Face to provide callback functions to obtain glyph recipes and metrics, for fonts like those passed from PostScript that do not necessarily provide all, or any, glyph information, when first opened. * include/freetype/config/ftoption.h (FT_CONFIG_OPTION_INCREMENTAL): New configuration macro to enable incremental face loading. By default it is not defined. * include/freetype/freetype.h (FT_Basic_Glyph_Metrics, FT_Get_Glyph_Data_Func, FT_Get_Glyph_Metrics_Func, FT_Incremental_Interface_Funcs, FT_Incremental_Interface) [FT_CONFIG_OPTION_INCREMENTAL]: New. (FT_Open_Args, FT_FaceRec) [FT_CONFIG_OPTION_INCREMENTAL]: New field `incremental_interface'. (FT_Open_Flags) [FT_CONFIG_OPTION_INCREMENTAL]: New enum `ft_open_incremental'. * include/freetype/fttypes.h: Include FT_CONFIG_CONFIG_H. (FT_Data): New structure to represent binary data. * src/base/ftobjs.c (open_face) [FT_CONFIG_OPTION_INCREMENTAL]: Add parameter for incremental loading. (FT_Open_Face) [FT_CONFIG_OPTION_INCREMENTAL]: Use incremental interface. * src/truetype/ttgload.c (load_truetype_glyph) [FT_CONFIG_OPTION_INCREMENTAL]: Added the incremental loading system for the TrueType driver. (compute_glyph_metrics): Return FT_Error. [FT_CONFIG_OPTION_INCREMENTAL]: Check for overriding metrics. (TT_Load_Glyph) [FT_CONFIG_OPTION_INCREMENTAL]: Don't look for the glyph table while handling an incremental font. Get glyph offset. * src/truetype/ttobjs.c (TT_Face_Init) [FT_CONFIG_OPTION_INCREMENTAL]: Added the incremental loading system for the TrueType driver. * src/cid/cidgload.c (cid_load_glyph) [FT_CONFIG_OPTION_INCREMENTAL]: Added the incremental loading system for the CID driver. * src/sfnt/sfobjs.c (SFNT_Load_Face) [FT_CONFIG_OPTION_INCREMENTAL]: Changes to support incremental Type 42 fonts: Assume a font has glyphs if it has an incremental interface object. * src/type1/t1gload.c (T1_Parse_Glyph): Renamed to... (T1_Parse_Glyph_And_Get_Char_String): This. [FT_CONFIG_OPTION_INCREMENTAL]: Added support for incrementally loaded Type 1 faces. (T1_Parse_Glyph): New function. (T1_Load_Glyph): Updated. 2002-07-17 David Turner <david@freetype.org> Cleaning up the cache sub-system code; linear hashing is now the default. * include/freetype/cache/ftccache.h, src/cache/ftccache.i, src/cache/ftccache.c [!FTC_CACHE_USE_LINEAR_HASHING]: Removed. (FTC_CACHE_USE_LINEAR_HASHING): Removed also. FT_CONFIG_OPTION_USE_CMAPS is now the default. * include/freetype/internal/ftdriver.h (FT_Driver_ClassRec): Remove `get_char_index' and `get_next_char'. * include/freetype/config/ftoption.h, include/freetype/internal/tttypes.h, src/base/ftobjs.c, src/bdf/bdfdrivr.c, src/cff/cffobjs.c, src/pcf/pcfdrivr.c, src/pfr/pfrdrivr.c, src/sfnt/sfobjs.c, src/sfnt/ttcmap0.c, src/sfnt/ttcmap0.h, src/sfnt/ttload.c, src/type1/t1objs.c, src/type42/t42objs.c, src/winfonts/winfnt.c [!FT_CONFIG_OPTION_USE_CMAPS]: Removed. The new cmap code is now the default. * src/type42/t42objs.c (T42_CMap_CharIndex, T42_CMap_CharNext): Removed. * src/type42/t42objs.h: Updated. * src/cid/cidriver.c (Cid_Get_Char_Index, Cid_Get_Next_Char): Removed. (t1cid_driver_class): Updated. * src/truetype/ttdriver.c (tt_driver_class): Updated. * src/type1/t1driver.c (Get_Char_Index, Get_Next_Char): Removed (t1_driver_class): Updated. * src/type42/t42drivr.c (t42_driver_class): Updated. * src/base/ftobjs.c (open_face): Select Unicode cmap by default. * src/sfnt/ttload.c (TT_Load_SFNT_Header): Fixed a recent bug that prevented OpenType fonts to be recognized by FreeType. 2002-07-11 David Turner <david@freetype.org> Changing the SFNT loader to check for SFNT-based font files differently. We now ignore the range `helper' fields and check the `head' table's magic number instead. * include/freetype/internal/tttypes.h (SFNT_HeaderRec): Add `offset' field. * src/sfnt/ttload.c (sfnt_dir_check): New function. (TT_Load_SFNT_HeaderRec): Renamed to... (TT_Load_SFNT_Header): This. Implement new functionality. * src/sfnt/ttload.h: Updated. * src/sfnt/sfdriver.c (sfnt_interface): Updated. * src/base/ftobject.c, src/base/fthash.c: Updated object sub-system and dynamic hash table implementation (still experimental, don't use). * include/freetype/internal/fthash.h: Updated. * include/freetype/internal/ftobjs.h (FT_LibraryRec): New member `meta_class'. Fixing a bug in the Type 1 loader that prevented valid font bounding boxes to be loaded from multiple master fonts. * include/freetype/t1tables.h (PS_BlendRec): Add `bboxes' field. * include/freetype/internal/psaux.h (T1_FieldType): Add `T1_FIELD_TYPE_BBOX'. (T1_FieldLocation): Add `T1_FIELD_LOCATION_BBOX'. (T1_FIELD_BBOX): New macro. * src/psaux/psobjs.c (PS_Parser_LoadField): Handle T1_FIELD_TYPE_BBOX. * src/type1/t1load.c (t1_allocate_blend): Create blend->bboxes. (T1_Done_Blend): Free blend->bboxes. (t1_load_keyword): Handle T1_FIELD_LOCATION_BBOX. (parse_font_bbox): Commented out. (t1_keywords): Comment out `parse_font_bbox'. * src/type1/t1tokens.h: Define `FontBBox' field. 2002-07-10 David Turner <david@freetype.org> * src/cff/cffobjs.c: Small fix to select the Unicode charmap by default when needed. Small fix to allow OpenType fonts to support Adobe charmaps when needed. * src/cff/cffcmap.c, src/cff/cffcmap.h: New files to support charmaps for CFF fonts. * src/cff/cff.c, src/cff/Jamfile, src/cff/rules.mk: Updated. * include/freetype/internal/cfftypes.h (CFF_EncodingRec): Use fixed-length arrays for `sids' and `codes'. Add `count' member. (CFF_FontRec): Add `psnames' member. * src/cff/cffdrivr.c, src/cff/cffload.c, src/cff/cffload.h, src/cff/cffobjs.c, src/cff/cffobjs.h, src/cff/cffparse.c, src/cffparse.h, src/cff/cffgload.c, src/cff/cffgload.h: Adding support for CFF charmaps, reformatting the sources, and removing some bugs in the Encoding and Charset loaders. Many fonts renamed to use lowercase only: CFF_Builder_Init -> cff_builder_init CFF_Builder_Done -> cff_builder_done CFF_Init_Decoder -> cff_decoder_init CFF_Parse_CharStrings -> cff_decoder_parse_charstrings CFF_Load_Glyph -> cff_slot_load CFF_Init_Decoder -> cff_decoder_init CFF_Prepare_Decoder -> cff_decoder_prepare CFF_Get_Standard_Encoding -> cff_get_standard_encoding CFF_Access_Element -> cff_index_access_element CFF_Forget_Element -> cff_index_forget_element CFF_Get_Name -> cff_index_get_name CFF_Get_String -> cff_index_get_sid_string CFF_Get_FD -> cff_fd_select_get CFF_Done_Charset -> cff_charset_done CFF_Load_Charset -> cff_charset_load CFF_Done_Encoding -> cff_encoding_done CFF_Load_Encoding -> cff_encoding_load CFF_Done_SubFont -> cff_subfont_done CFF_Load_Font -> cff_font_load CFF_Done_Font -> cff_font_done CFF_Size_Get_Globals_Funcs -> cff_size_get_globals_funcs CFF_Size_Done -> cff_size_done CFF_Size_Init -> cff_size_init CFF_Size_Reset -> cff_size_reset CFF_GlyphSlot_Done -> cff_slot_done CFF_GlyphSlot_Init -> cff_slot_init CFF_StrCopy -> cff_strcpy CFF_Face_Init -> cff_face_init CFF_Face_Done -> cff_face_done CFF_Driver_Init -> cff_driver_init CFF_Driver_Done -> cff_driver_done CFF_Parser_Init -> cff_parser_init CFF_Parser_Run -> cff_parser_run add_point -> cff_builder_add_point add_point1 -> cff_builder_add_point1 add_contour -> cff_builder_add_contour close_contour -> cff_builder_close_contour cff_explicit_index -> cff_index_get_pointers 2002-07-09 Owen Taylor <owen@redhat.com> * src/pshinter/pshglob.c (psh_globals_new): Fixed a bug that prevented the hinter from using correct standard width and height values, resulting in hinting bugs with certain fonts (e.g. Utopia). 2002-07-07 David Turner <david@freetype.org> * src/base/ftglyph.c (FT_Glyph_To_Bitmap): Added code to return successfully when the function is called with a bitmap glyph (the previous code simply returned with an error). * docs/DEBUG.TXT: Adding debugging support documentation. * src/base/ftdebug.c (ft_debug_init), builds/win32/ftdebug.c (ft_debug_init), builds/amiga/src/ftdebug.c (ft_debug_init): Changed the syntax of the FT2_DEBUG environment variable used to control debugging output (i.e. logging and error messages). It must now look like: any:6 memory:4 io:3 or any:6,memory:4,io:3 or any:6;memory:4;io:3 2002-07-07 Owen Taylor <owen@redhat.com> * src/pshinter/pshglob.c (psh_blues_snap_stem): Adding support for blue fuzz. * src/pshinter/pshglob.h (PSH_BluesRec): Add `blue_fuzz' field. * src/type1/t1load.c (T1_Open_Face): Initialize `blue_fuzz'. Adding support for hinter-specific bit flags, and the new FT_Set_Hint_Flags high-level API. * include/freetype/freetype.h (FT_Set_Hint_Flags): New function. (FT_HINT_NO_INTEGER_STEM, FT_HINT_NO_HSTEM_ALIGN, FT_HINT_NO_VSTEM_ALIGN): New macros. * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): Add `hint_flags' member. * src/base/ftobjs.c (FT_Set_Hint_Flags): New function. * include/freetype/internal/psaux.h (T1_DecoderRec): Add `hint_flags' member. * include/freetype/internal/pshints.h (T1_Hints_ApplyFunc, T2_Hints_ApplyFunc): Add parameter to pass hint flags. * src/psaux/t1decode.c (T1_Decoder_Parse_Charstrings, T1_Decoder_Init): Use decoder->hint_flags. * src/cff/cffgload.h (CFF_Builder): Add `hint_flags' field. * src/cff/cffgload.c (CFF_Builder_Init): Set builder->hint_flags. (CFF_Parse_CharStrings): Updated. * src/pshinter/pshalgo1.c (ps1_hints_apply): Add parameter to handle hint flags (unused). * src/pshinter/pshalgo1.h: Updated. * src/pshinter/pshalgo2.c (ps2_hints_apply): Add parameter to handle hint flags (unused). * src/pshinter/pshalgo2.h: Updated. * src/pshinter/pshalgo3.c (ps3_hints_apply): Add parameter to handle hint flags. * src/pshinter/pshalgo3.h: Updated. 2002-07-04 David Turner <david@freetype.org> * src/pfr/pfrobjs.c (pfr_slot_load): Fixed a small bug that returned incorrect advances when the outline resolution was different from the metrics resolution. * src/autohint/ahhint.c: Removing compiler warnings. * src/autohint/ahglyph.c: s/FT_MEM_SET/FT_ZERO/ where appropriate. (ah_outline_link_segments): Slight improvements to the serif detection code. More work is needed though. 2002-07-03 David Turner <david@freetype.org> Small improvements to the automatic hinter. Uneven stem-widths have now disappeared and everything looks much better, even if there are still issues with serifed fonts. * src/autohint/ahtypes.h (AH_Globals): Added `stds' array. * src/autohint/ahhint.c (OPTIM_STEM_SNAP): New #define. (ah_snap_width): Commented out. (ah_align_linked_edge): Renamed to... (ah_compute_stem_width): This. Don't allow uneven stem-widths. (ah_align_linked_edge): New function. (ah_align_serifed_edge): Don't strengthen serifs. (ah_hint_edges_3, ah_hinter_scale_globals): Updated. 2002-07-03 Owen Taylor <owen@redhat.com> Adding new algorithm based on Owen Taylor's recent work. * src/pshinter/pshalgo3.c, src/pshinter/pshalgo3.h: New files. * src/pshinter/pshalgo.h: Updated. Use pshalgo3 by default. * src/pshinter/pshinter.c: Include pshalgo3.c. * src/pshinter/Jamfile, src/pshinter/rules.mk: Updated. 2002-07-01 Owen Taylor <owen@redhat.com> * src/pshinter/pshalgo2.c (psh2_glyph_find_strong_points): Fix a bug where, if a glyph has more than hint mask, the second mask gets applied to points that should have been covered by the first mask. 2002-07-01 Keith Packard <keithp@keithp.com> * src/sfnt/ttcmap0.c (tt_cmap8_char_next, tt_cmap12_char_next): Fixing the cmap 8 and 12 parsing routines. 2002-07-01 David Turner <david@freetype.org> * src/base/ftsynth.c: Include FT_TRIGONOMETRY_H. (FT_Outline_Embolden): Renamed to... (FT_GlyphSlot_Embolden): This. Updated to new trigonometric functions. (FT_Outline_Oblique): Renamed to... (FT_GlyphSlot_Oblique): This. (ft_norm): Removed. * include/freetype/ftsynth.h: Updated. 2002-06-26 David Turner <david@freetype.org> * include/freetype/internal/ftobject.h: Updating the object sub-system definitions (still experimental). * src/base/fthash.c (ft_hash_remove): Fixing a small reallocation bug. * src/base/fttrigon.c (FT_Vector_From_Polar, FT_Angle_Diff): New functions. * include/freetype/fttrigon.h: Updated. Adding path stroker component (work in progress). * include/freetype/ftstroker.h, src/base/ftstroker.c: New files. * src/base/Jamfile: Updated. * include/freetype/config/ftheader.h (FT_STROKER_H): New macro. * src/truetype/ttgload.c (TT_Load_Composite_Glyph), src/base/ftoutln.c (FT_Vector_Transform): Fixed Werner's latest fix. FT_Vector_Transform wasn't buggy, the TrueType composite loader was. 2002-06-24 Werner Lemberg <wl@gnu.org> * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3. 2002-06-21 David Turner <david@freetype.org> * Version 2.1.2 released. ========================= 2002-06-21 Roberto Alameda <ojancano@geekmail.de>. * include/freetype/internal/t42types.h (T42_Font): Removed since it is already in t42objs.h. (T42_Face): Use T1_FontRec. * src/base/fttype1.c (FT_Get_PS_Font_Info): Updated. (FT_Has_PS_Glyph_Names): Check for type42 driver name also. * src/type42/t42objs.h: Include FT_INTERNAL_TYPE42_TYPES_H. (T42_Face): Removed since it is already in t42types.h. 2002-06-21 Detlef Würkner <TetiSoft@apg.lahn.de> * src/pfrgload.c (pfr_glyph_load_compound): Fix loading of composite glyphs. 2002-06-21 Sven Neumann <sven@convergence.de> * src/pfr/pfrtypes.h (PFR_KernPair): New structure. (PFR_PhyFont): Use it. (PFR_KernFlags): New enumeration. * src/pfr/pfrload.c (pfr_extra_item_load_kerning_pairs): New function. (pfr_phy_font_extra_items): Use it. (pfr_phy_font_done): Updated. * src/pfr/pfrobjs.c (pfr_face_init): Set kerning flag conditionally. (pfr_face_get_kerning): New function. * src/pfr/pfrobjs.h: Updated. * src/pfr/pfrdrivr.c (pfr_driver_class): Updated. 2002-06-21 David Turner <david@freetype.org> * README, docs/CHANGES: Preparing the 2.1.2 release. 2002-06-19 Detlef Würkner <TetiSoft@apg.lahn.de> * src/base/fttype1.c: Include FT_INTERNAL_TYPE42_TYPES_H. (t1_face_check_cast): Removed. (FT_Get_PS_Font_Info): Make it work with CID and Type 42 drivers also. 2002-06-19 Sebastien BARRE <http://barre.nom.fr/contact.html#email> * src/type42/t42parse.c (t42_parse_sfnts): Fix compiler warning. 2002-06-19 Werner Lemberg <wl@gnu.org> * src/base/ftoutln.c (FT_Vector_Transform): Fix serious typo (xy <-> yx). * src/truetype/ttgload.c (load_truetype_glyph): Replace `|' with `||' to make code easier to read. 2002-06-18 Roberto Alameda <ojancano@geekmail.de>. * src/type42/t42objs.c (t42_check_size_change): Removed. (T42_Size_SetChars, T42_Size_SetPixels): Use FT_Activate_Size instead. (T42_GlyphSlot_Load): Remove call to t42_check_size_change. 2002-06-18 Detlef Würkner <TetiSoft@apg.lahn.de> * src/psaux/t1cmap.c (t1_cmap_custom_char_index, t1_cmap_custom_char_next): Fix index computation -- indices start with 0 and not with cmap->first. Provide default charmaps. * src/bdf/bdfdrivr.c (BDF_Face_Init), src/pcf/pcfdriver.c (PCF_Face_Init), src/pfr/pfrobjs.c (pfr_face_init), src/type1/t1objs (T1_Face_Init), src/winfonts/winfnt.c (FNT_Face_Init): Implement it. 2002-06-17 Sven Neumann <sven@gimp.org> * src/pfr/pfrobjs.c (pfr_face_init): Fix typo. 2002-06-16 Leonard Rosenthol <leonardr@lazerware.com> Updated Win32/VC++ projects to include the new PFR driver. * builds/win32/visualc/freetype.dsp: Updated. 2002-06-16 Anthony Fok <fok@debian.org> Install freetype2.m4. * builds/unix/install.mk (install, uninstall): Handle it. 2002-06-16 Detlef Würkner <TetiSoft@apg.lahn.de> Same fix for PFR driver. * src/pfr/pfrcmap.c (pfr_cmap_char_index, pfr_cmap_char_next): Increase return value by 1. * src/pfr/pfrobjs.c (pfr_slot_load): Decrease index by 1. 2002-06-15 Detlef Würkner <TetiSoft@apg.lahn.de> Fix glyph indices to make index zero always the undefined glyph. * src/bdf/bdfdrivr.c (bdf_cmap_init): Don't decrease cmap->num_encodings. (bdf_cmap_char_index, bdf_cmap_char_next, BDF_Get_Char_Index): Increase result by 1 for normal cases. (BDF_Glyph_Load): Decrease index by 1. * src/pcf/pcfdriver.c (pcf_cmap_char_index, pcf_cmap_char_next, PCF_Char_Get_Index): Increase result by 1 for normal cases. (PCF_Glyph_Load): Decrease index by 1. * src/pcf/pcfread.c (pcf_get_encodings): Don't decrease j for allocating `encoding'. * src/base/ftobjs.c (FT_Load_Glyph, FT_Get_Glyph_Name): Fix bounding tests. 2002-06-14 Detlef Würkner <TetiSoft@apg.lahn.de> Add new cmap support to BDF driver. * src/bdf/bdfdrivr.c (BDF_CMapRec) [FT_CONFIG_OPTION_USE_CMAPS]: New structure. (bdf_cmap_init, bdf_cmap_done, bdf_cmap_char_index, bdf_cmap_char_next) [FT_CONFIG_OPTION_USE_CMAPS]: New functions. (BDF_Get_Char_Index) [!FT_CONFIG_OPTION_USE_CMAPS]: Use only conditionally. (BDF_Face_Init): Handle `AVERAGE_WIDTH' and `POINT_SIZE' keywords. Implement new cmap handling. (bdf_driver_class): Updated. 2002-06-14 Werner Lemberg <wl@gnu.org> * Makefile, configure, */*.mk, builds/unix/unix-def.in, docs/CHANGES, docs/INSTALL: s/TOP/TOP_DIR/. 2002-06-12 Werner Lemberg <wl@gnu.org> * src/bdf/bdflib.c: s/FT_Short/short/ for consistency. 2002-06-11 David Turner <david@freetype.org> * builds/win32/ftdebug.c: Added a missing #endif. * src/sfnt/ttload.c, src/bdf/bdflib.c: Removing compiler warnings. Removed the bug in Type 42 driver that prevented un-hinted outlines to be loaded. * src/type42/t42objs.c (T42_Face_Init): Call FT_Done_Size. (T42_Size_Init): Call FT_Activate_Size. (t42_check_size_change): New function. (T42_Size_SetChars, T42_Size_SetPixels): Use it. (ft_glyphslot_clear): Replace FT_MEM_SET with FT_ZERO. (T42_GlyphSlot_Load): Use t42_check_size_change. Initialize more fields of `glyph'. * builds/win32/visualc/freetype.dsp: Updated. 2002-06-09 David Turner <david@freetype.org> * Version 2.1.1 released. ========================= 2002-06-08 Juliusz Chroboczek <jch@pps.jussieu.fr> * include/freetype/internal/ftobjs.h, src/autohint/ahglyph.c, src/base/ftobjs.c, src/sfnt/ttcmap0.c, src/smooth/ftgrays.c: Don't use `setjmp', `longjmp', and `jmp_buf' but `ft_setjmp', `ft_longjmp', and `ft_jmp_buf'. Removed direct references to <stdio.h> and <setjmp.h> when appropriate, to eventually replace them with a FT_CONFIG_STANDARD_LIBRARY_H. Useful for the XFree86 Font Server backend based on FT2. * src/base/fttype1.c (FT_Has_PS_Glyph_Names): Fix return value. 2002-06-08 David Turner <david@freetype.org> * src/pcf/pcfdriver.c (pcf_cmap_char_next): Fixed a bug that caused the function to return invalid values. * src/cache/ftccache.i: Removing a typo that prevented the source's compilation. * src/cache/ftccache.c (ftc_node_hash_unlink): Fixed a bug that caused nasty memory overwrites. The hash table's buckets array wasn't correctly resized when shrunk. 2002-06-08 Detlef Würkner <TetiSoft@apg.lahn.de> * builds/amiga/smakefile, builds/amiga/makefile: Updated. 2002-06-08 Werner Lemberg <wl@gnu.org> * src/cache/ftccache.c (ftc_node_hash_unlink, ftc_node_hash_link) [FTC_CACHE_USE_LINEAR_HASHING]: Fix returned error code. Fix debugging messages. * src/cache/ftccache.i (GEN_CACHE_LOOKUP): Move declaration of `family' and `hash' up to make it compilable with g++. * src/type42/t42error.h: New file. * src/type42/t42drivr.c, src/type42/t42objs.c, src/type42/t42parse.c: Use t42 error codes. * src/type42/rules.mk: Updated. * src/base/ftnames.c: Include FT_INTERNAL_STREAM_H. 2002-06-08 David Turner <david@freetype.org> * src/cache/ftccmap.c: GEN_CACHE_FAMILY_COMPARE, GEN_CACHE_NODE_COMPARE, GEN_CACHE_LOOKUP) [FTC_CACHE_USE_INLINE]: New macros. (ftc_cmap_cache_lookup) [!FTC_CACHE_USE_INLINE]: Typedef to ftc_cache_lookup. (FTC_CMapCache_Lookup): Updated. Adding various experimental optimizations to the cache manager. * include/freetype/cache/ftccache.h (FTC_CACHE_USE_INLINE, FTC_CACHE_USE_LINEAR_HASHING): New options. (FTC_CacheRec) [FTC_CACHE_USE_LINEAR_HASHING]: New elements `p', `mask', and `slack'. * src/cache/ftccache.c (FTC_HASH_MAX_LOAD, FTC_HASH_MIN_LOAD, FTC_HASH_SUB_LOAD) [FTC_CACHE_USE_LINEAR_HASHING, FTC_HASH_INITIAL_SIZE]: New macros. (ftc_node_mru_link, ftc_node_mru_up): Optimized. (ftc_node_hash_unlink, ftc_node_hash_link) [FTC_CACHE_USE_LINEAR_HASHING]: New variants. (FTC_PRIMES_MIN, FTC_PRIMES_MAX, ftc_primes, ftc_prime_closest, FTC_CACHE_RESIZE_TEST, ftc_cache_resize) [!FTC_CACHE_USE_LINEAR_HASHING]: Define it conditionally. (ftc_cache_init, ftc_cache_clear) [FTC_CACHE_USE_LINEAR_HASHING]: Updated. (ftc_cache_lookup) [FTC_CACHE_USE_LINEAR_HASHING]: Implement it. * src/cache/ftccache.i: New file. * src/cache/ftcsbits.c (GEN_CACHE_FAMILY_COMPARE, GEN_CACHE_NODE_COMPARE, GEN_CACHE_LOOKUP) [FTC_CACHE_USE_INLINE]: New macros. (ftc_sbit_cache_lookup) [!FTC_CACHE_USE_INLINE]: Typedef to ftc_cache_lookup. (FTC_SBitCache_Lookup): Updated. * src/type42/t42parse.c: Removing duplicate function. 2002-06-07 Graham Asher <graham.asher@btinternet.com> * src/base/ftobjs.c (FT_Render_Glyph_Internal): Changed definition from FT_EXPORT_DEF to FT_BASE_DEF. 2002-06-07 David Turner <david@freetype.org> Fixed the bug that prevented the correct display of fonts with `ftview'. * src/type42/t42drivr.c: Split into... * src/type42/t42drivr.h, src/type42/t42parse.c, src/type42/t42parse.h, src/type42/t42objs.h, src/type42/t42objs.c, src/type42/type42.c: New files. (t42_get_glyph_name, t42_get_ps_name, t42_get_name_index): Use `face->type1'. (Get_Interface): Renamed to... (T42_Get_Interface): This. Updated. (T42_Open_Face, T42_Face_Done): Updated. (T42_Face_Init): Add new cmap support. Updated. (T42_Driver_Init, T42_Driver_Done, T42_Size_Init, T42_Size_Done, T42_GlyphSlot_Init, T42_GlyphSlot_Done): Updated. (Get_Char_Index, Get_Next_Char): Renamed to... (T42_CMap_CharIndex, T42_CMap_CharNext): This. Updated. (T42_Char_Size, T42_Pixel_Size): Renamed to... (T42_Size_SetChars, T42_Size_SetPixels): This. (T42_Load_Glyph): Renamed to... (T42_GlyphSlot_Load): This. (t42_init_loader, t42_done_loader): Renamed to... (t42_loader_init, t42_loader_done): This. (T42_New_Parser, T42_Finalize_Parser): Renamed to... (t42_parser_init, t42_parser_done): This. (parse_dict): Renamed to... (t42_parse_dict): This. (is_alpha, is_space, hexval): Renamed to... (t42_is_alpha, t42_is_space, t42_hexval): This. (parse_font_name, parse_font_bbox, parse_font_matrix, parse_encoding, parse_sfnts, parse_charstrings, parse_dict): Renamed to... (t42_parse_font_name, t42_parse_font_bbox, t42_parse_font_matrix, t42_parse_encoding, t42_parse_sfnts, t42_parse_charstrings, t42_parse_dict): This. Updated. (t42_keywords): Updated. * src/type42/Jamfile, src/type42/descrip.mms: Updated. 2002-06-03 Werner Lemberg <wl@gnu.org> Add 8bpp support to BDF driver. * src/bdf/bdflib.c (_bdf_parse_start): Handle 8bpp. * src/bdf/bdfdrivr.c (BDF_Glyph_Load): Ditto. * src/bdf/README: Updated. 2002-06-02 Detlef Würkner <TetiSoft@apg.lahn.de> * src/pfr/pfrload.c (pfr_phy_font_done): Free `blue_values' array. 2002-05-29 Detlef Würkner <TetiSoft@apg.lahn.de> * src/bdf/bdflib.c (_bdf_readstream): Allocate `buf' dynamically. (_bdf_parse_glyphs): Use correct size for allocating `font->unencoded'. (bdf_load_font): Free array conditionally. Return proper error code in case of failure. * src/bdf/bdfdrivr.c (BDF_Face_Init): Make it more robust against unusual fonts. 2002-05-29 Werner Lemberg <wl@gnu.org> * src/bdf/descrip.mms, src/type42/descrip.mms: New files. * descrip.mms (all): Updated. * src/bdf/bdflib.c (_bdf_parse_glyphs): Fix typo which prevented compilation. * src/pshglob.c (psh_blues_scale_zones): Fix compiler warning. 2002-05-28 Detlef Würkner <TetiSoft@apg.lahn.de> * builds/amiga/makefile, builds/amiga/smakefile, amiga/include/freetype/config/ftmodule.h: Updated to include support for BDF and Type42 drivers. * docs/modules.txt: Updated. 2005-05-28 David Turner <david@freetype.org> * docs/CHANGES: Updating file for next release (2.1.1). * src/bdf/bdflib.c: Removing compiler warnings. * include/freetype/ftxf86.h, src/base/ftxf86.c: New files. They provide a new API (FT_Get_X11_Font_Format) to retrieve an X11-compatible string describing the font format of a given face. This was put in a new optional base source file, corresponding to a new public header (named FT_XFREE86_H since this function should only be used within the XFree86 font server IMO). * include/freetype/config/ftheader.h (FT_XFREE86_H): New macro (not documented yet). * src/base/fttype1.c: New file, providing two new API functions (FT_Get_PS_Font_Info and FT_Has_PS_Glyph_Names). * include/freetype/t1tables.h: Updated. * src/base/Jamfile, src/base/rules.mk, src/base/descrip.mms: Updating build control files for the new files `ftxf86.c' and `fttype1.c' in src/base. * src/pshinter/pshglob.c (psh_blues_scale_zones): Fixed a bug that prevented family blue zones substitution from happening correctly. * include/freetype/ftbdf.h FT_Get_BDF_Charset_ID): Adding documentation comment. 2002-05-28 Werner Lemberg <wl@gnu.org> * src/base/ftnames.c (FT_Get_Sfnt_Name): Don't use FT_STREAM_READ_AT but FT_STREAM_READ. Declare `stream' variable. * src/bdf/bdflib.c (_bdf_parse_glyphs): Replace floating point math with calls to `FT_MulDiv'. 2002-05-28 David Turner <david@freetype.org> Fixing the SFNT name table loader to support various buggy fonts. It now ignores empty name entries, entries with invalid pointer Offsets and certain fonts containing tables with broken `storageOffset' fields. Name strings are now loaded on demand, which reduces the memory requirements for a given FT_Face tremendously (for example, the name table of Arial.ttf is about 10Kb and contains 70 names). This is a temporary fix. The whole name table loader and interface will be rewritten in a much more cleanly way shortly, once CSEH have been introduced in the sources. * include/freetype/internal/tttypes.h (TT_NameEntryRec): Change type of `stringOffset' to FT_ULong. (TT_NameTableRec): Change type of `numNameRecords' and `storageOffset' to FT_UInt. Replace `storage' with `stream'. * src/base/ftnames.c (FT_Get_Sfnt_Name): Load name on demand. * src/sfnt/sfdriver.c (get_sfnt_postscript_name): Ditto. Make code more robust. * src/sfnt/sfobjs.c (TT_NameEntry_ConvertFunc): New typedef. (tt_face_get_name): Use it. Make code more robust. * src/sfnt/ttload.c (TT_Load_Names): Use `static' for arrays. Handle invalid `storageOffset' data better. Set length fields to zero for invalid or ignored data. Remove code within FT_DEBUG_LEVEL_TRACE. (TT_Free_Names): Updated. 2002-05-24 Tim Mooney <enchanter@users.sourceforge.net> * builds/unix/ft-munmap.m4: New file, extracted FT_MUNMAP_DECL and FT_MUNMAP_PARAM from aclocal.m4 into here, so aclocal.m4 can be rebuilt from sources. Set macro serial to 1, and use third argument to AC_DEFINE for our two custom symbols, so ftconfig.in could one day be rebuilt with autoheader (not recommended now, ftconfig.in is a custom source file) 2002-05-22 Werner Lemberg <wl@gnu.org> * include/freetype/config/ftheader.h (FT_BEZIER_H): Removed. (FT_BDF_H): New macro for accessing `ftbdf.h'. * src/type42/t42drivr.c (hexval): Fix typo. 2002-05-21 Martin Muskens <mmuskens@aurelon.com> * src/psaux/psobjs.c (T1Radix): New function. (t1_toint): Use it to handle numbers in radix format. * src/psaux/t1decode.c (T1_Decoder_Parse_Charstrings): Add dummy for undocumented, obsolete opcode 15. 2002-05-21 David Turner <david@freetype.org> * src/bdf/bdflib.c: Removed compiler warning, and changed all tables to the `static const' storage specifier (instead of simply `static'). * src/type42/t42drivr.c (hexval): Use more efficient code. Removing compiler warnings. * src/bdf/bdfdrivr.c: Removing compiler warnings. * include/freetype/internal/ftbdf.h, src/base/ftbdf.c, src/base/descrip.mms, src/base/Jamfile, src/base/rules.mk (FT_Get_BDF_Charset_ID): New API to retrieve BDF-specific strings from a face. This is much cleaner than accessing the internal types `BDF_Public_Face' defined in FT_INTERNAL_BDF_TYPES_H. 2002-05-21 Werner Lemberg <wl@gnu.org> * src/bdf/README: Mention Microsoft's SBIT tool. * src/cff/cffdrivr.c, src/cid/cidriver.c, src/pcf/pcfdriver.c, src/truetype/ttdriver.c, src/type1/t1driver.c, src/winfonts/winfnt.c, src/type42/t42drivr.c, src/bdf/bdfdrivr.c [FT_CONFIG_OPTION_DYNAMIC_DRIVERS]: Completely removed. It has been never used. 2002-05-21 Roberto Alameda <ojancano@geekmail.de>. * src/type42/t42drivr.c: s/T42_ENCODING_TYPE_/T1_ENCODING_TYPE_/. (parse_font_matrix): Remove unnecessary code. (parse_sfnts): Initialize some variables. (t42_driver_class) [TT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Use ft_module_driver_has_hinter conditionally. Moved some type 42 specific structure definitions to... * include/freetype/internal/t42types.h: New file. * include/freetype/internal/internal.h (FT_INTERNAL_T42_TYPES_H): New macro. 2002-05-20 Werner Lemberg <wl@gnu.org> * include/freetype/cache/ftcsbits.h (FTC_SBit): Added a new field `num_grays' for specifying the number of used gray levels. * src/cache/ftcsbits.c (ftc_sbit_node_load): Initialize it. 2002-05-19 Werner Lemberg <wl@gnu.org> Adding a driver for BDF fonts written by Francesco Zappa Nardelli <Francesco.Zappa.Nardelli@ens.fr>. Heavily modified by me to better adapt it to FreeType, removing unneeded stuff. Additionally, it now supports Mark Leisher's BDF extension for anti-aliased bitmap glyphs with 2 and 4 bpp. * src/bdf/*: New driver. * include/freetype/internal/bdftypes.h: New file. * include/freetype/internal/fttrace.h: Added BDF driver components. * include/freetype/fterrdef.h: Added error codes for BDF driver. * include/freetype/config/ftmodule.h, src/Jamfile: Updated. * include/freetype/internal/internal.h (FT_INTERNAL_BDF_TYPES_H): New macro. * include/freetype/config/ftstdlib.h (ft_sprintf): New alias for sprintf. 2002-05-18 Werner Lemberg <wl@gnu.org> * include/freetype/internal/fttrace.h: Added Type 42 driver component. * src/type42/t42drivr.c: Use it. * include/freetype/internal/internal.h (FT_INTERNAL_PCF_TYPES_H): New macro. 2002-05-17 Werner Lemberg <wl@gnu.org> * src/type42/Jamfile: New file. 2002-05-14 Werner Lemberg <wl@gnu.org> Adding a driver for Type42 fonts written by Roberto Alameda <ojancano@geekmail.de>. * src/type42/*: New driver. * include/freetype/config/ftmodule.h, src/Jamfile: Updated. * include/freetype/config/ftstdlib.h (ft_xdigit, ft_memcmp, ft_atoi): New aliases for xdigit, memcmp, and atoi, respectively. 2002-05-12 Owen Taylor <otaylor@redhat.com> * src/sfnt/ttload.c (TT_LookUp_Table): Protect against tables with a zero length value. 2002-05-12 Michael Pfeiffer <michael.pfeiffer@utanet.at> * builds/beos/beos.mk: Include `link-std.mk'. 2002-05-12 Werner Lemberg <wl@gnu.org> * src/type1/t1load.h (T1_Loader): Renamed to... (T1_LoaderRec): This. (T1_Loader): Now pointer to T1_LoaderRec. * src/type1/t1load.c: Updated. * include/freetype/internal/t1types.h, src/type1/t1load.c, src/type1/t1objs.c: s/T1_ENCODING_TYPE_EXPORT/T1_ENCODING_TYPE_EXPERT/. 2002-05-06 Werner Lemberg <wl@gnu.org> * README: Add a note regarding libttf vs. libfreetype. 2002-05-05 Werner Lemberg <wl@gnu.org> FreeType 2 can now be built in an external directory with the configure script also. * builds/freetype.mk (INCLUDES): Add `OBJ_DIR'. * builds/unix/detect.mk (have_mk): New variable to test for external build. (unix-def.mk): Defined according to value of `have_mk'. * builds/unix/unix.mk (have_mk): New variable to test for external build. Select include paths for unix-def.mk and unix-cc.mk according to value of `have_mk'. * builds/unix/unix-def.in (OBJ_BUILD): New variable. (DISTCLEAN): Use it. * builds/unix/unix-cc.in (LIBTOOL): Define default value only if not yet defined. * builds/unix/install.mk (install): Use `OBJ_BUILD' for installing freetype-config. * configure: Don't depend on bash features. (ft2_dir, abs_curr_dir, abs_ft2_dir): New variables (code partially taken from Autoconf). Build a dummy Makefile if not building in source tree. * docs/INSTALL: Document it. 2002-05-04 David Turner <david@freetype.org> * src/truetype/ttgload.c (TT_Load_Glyph): Finally fixing the last bug that prevented FreeType 2.x and FreeType 1.x to produce bit-by-bit identical monochrome glyph bitmaps with native TrueType hinting. The culprit was a single-bit flag that wasn't set correctly by the TrueType glyph loader. * src/otlayout/otlayout.h, src/otlayout/otlbase.c, src/otlayout/otlbase.h, src/otlayout/otlconf.h, src/otlayout/otlgdef.c, src/otlayout/otlgdef.h, src/otlayout/otlgpos.c, src/otlayout/otlgpos.h, src/otlayout/otlgsub.c, src/otlayout/otlgsub.h, src/otlayout/otljstf.c, src/otlayout/otljstf.h, src/otlayout/otltable.c, src/otlayout/otltable.h, src/otlayout/otltags.h: New OpenType Layout source files. The module is still incomplete. 2002-05-02 Werner Lemberg <wl@gnu.org> * src/sfnt/ttcmap0.c (tt_cmap4_char_index): Fix serious typo (0xFFFU -> 0xFFFFU). 2002-05-01 Werner Lemberg <wl@gnu.org> * docs/INSTALL: Fix URL of makepp. 2002-05-01 David Turner <david@freetype.org> * src/sfnt/sfobjs.c (tt_face_get_name): Fixing a bug that caused FreeType to crash when certain broken fonts (e.g. `hya6gb.ttf') were opened. * src/sfnt/ttload.c (TT_Load_Names): Applied a small work-around to manage fonts containing a broken name table (e.g. `hya6gb.ttf'). * src/sfnt/ttcmap0.c (tt_cmap4_validate): Fixed over-restrictive validation test. The charmap validator now accepts overlapping ranges in format 4 charmaps. * src/sfnt/ttcmap0.c (tt_cmap4_char_index): Switched to a binary search algorithm. Certain fonts contain more than 170 distinct segments! * include/freetype/config/ftstdlib.h: Adding an alias for the `exit' function. This will be used in the near future to panic in case of unexpected exception (which shouldn't happen in theory). * include/freetype/internal/fthash.h, src/base/fthash.c: New files. This is generic implementation of dynamic hash tables using a linear algorithm (to get rid of `stalls' during resizes). In the future this will be used in at least three parts of the library: the cache sub-system, the object sub-system, and the memory debugger. * src/base/Jamfile: Updated. * include/freetype/internal/internal.h (FT_INTERNAL_HASH_H, FT_INTERNAL_OBJECT_H): New macros. * include/freetype/internal/ftcore.h: New file to group all new definitions related to exception handling and memory management. It is very likely that this file will disappear or be renamed in the future. * include/freetype/internal/ftobject.h, include/freetype/ftsysmem.h: Adding comments to better explain the object sub-system as well as the new memory manager interface. 2002-04-30 Wenlin Institute (Tom Bishop) <wenlin@wenlin.com> * src/base/ftmac.c (p2c_str): Removed. (file_spec_from_path) [TARGET_API_MAC_CARBON]: Added support for OS X. (is_dfont) [TARGET_API_MAC_CARBON]: Define only for OS X. Handle `nameLen' <= 6 also. (parse_fond): Remove unused variable `name_table'. Use functionality of old p2c_str directly. Add safety checks. (read_lwfn): Initialize `size_p'. Check for size_p == NULL. (new_memory_stream, open_face_from_buffer): Updated to FreeType 2.1. (FT_New_Face_From_LWFN): Remove unused variable `memory'. Remove some dead code. (FT_New_Face_From_SFNT): Remove unused variable `stream'. (FT_New_Face_From_dfont) [TARGET_API_MAC_CARBON]: Define only for OS X. (FT_New_Face_From_FOND): Remove unused variable `error'. (ResourceForkSize): New function. (FT_New_Face): Use it. Handle empty resource forks. Conditionalize some code for OS X. Add code to call normal loader as a fallback. 2002-04-30 Werner Lemberg <wl@gnu.org> `interface' is reserved on the Mac. * include/freetype/ftoutln.h, include/freetype/internal/sfnt.h, src/base/ftoutln.c: s/interface/func_interface/. * src/base/ftbbox.c (FT_Outline_Get_BBox): s/interface/bbox_interface/. * src/cff/cffdrivr.c: s/interface/module_interface/. * src/cff/cffload.c, src/cff/cffload.h: s/interface/psnames_interface/. * src/cid/cidriver.c: s/interface/cid_interface/. * src/sfnt/sfdriver.c: s/interface/module_interface/. * src/smooth/ftgrays.c: s/interface/func_interface/. * src/truetype/ttdriver.c: s/interface/tt_interface/. * src/type1/t1driver.c: s/interface/t1_interface/. Some more variable renames to avoid troubles on the Mac. * src/raster/ftraster.c: s/Unknown|Ascending|Descending|Flat/\1_State/. * src/smooth/ftgrays.c: s/TScan/TCoord/. Other changes for the Mac. * include/freetype/config/ftconfig.h: Define FT_MACINTOSH for Mac platforms. * src/base/ftobjs.c: s/macintosh/FT_MACINTOSH/. * src/raster/ftrend1.c (ft_raster1_render): Make `pitch' always an even number. 2002-04-29 Jouk Jansen <joukj@hrem.stm.tudelft.nl> * descrip.mms (all): Add pfr driver. 2002-04-28 Werner Lemberg <wl@gnu.org> * src/pfr/pfrerror.h: New file. * include/freetype/ftmoderr.h: Add PFR error codes. * src/pfr/pfrgload.c: Include pfrerror.h. Use PCF error codes. (pfr_extra_item_load_stem_snaps): Fix debug message. * src/pfr/pfrgload.c: Include pfrerror.h. Use PCF error codes. (pfr_extra_item_load_bitmap_info, pfr_glyph_load_simple, pfr_glyph_load_compound): Fix debug message. * src/pfr/pfrobjs.c: Include pfrerror.h. Use PCF error codes. (pfr_face_init): Return PFR_Err_Unknown_File_Format. * src/pfr/rules.mk (PFR_DRV_H): Include pfrerror.h. * src/pcf/pcfdriver.c (PCF_Face_Init) [!FT_CONFIG_OPTION_USE_CMAPS]: `root' -> `face->root'. * src/sfnt/ttcmap0.c (TT_Build_CMaps) [!FT_CONFIG_OPTION_USE_CMAPS]: Removed. * src/sfnt/ttcmap0.c: Declare TT_Build_CMaps only for FT_CONFIG_OPTION_USE_CMAPS. 2002-04-27 Werner Lemberg <wl@gnu.org> * src/cache/ftccache.c (ftc_cache_lookup), src/cache/ftccmap.c (ftc_cmap_family_init), src/cache/ftcmanag.c (ftc_family_table_alloc), src/cache/ftcsbits.c (FTC_SBit_Cache_Lookup): Use FTC_Err_*. src/cache/ftcimage.c (FTC_Image_Cache_Lookup): Use FTC_Err_*. (FTC_ImageCache_Lookup): Fix handling of invalid arguments. 2002-04-22 Werner Lemberg <wl@gnu.org> * builds/unix/configure.ac: Set `version_info' to 9:1:3 (FT2 version 2.0.9 has 9:0:3). * builds/unix/configure: Regenerated (using autoconf 2.53). 2002-04-19 Werner Lemberg <wl@gnu.org> * src/pfr/pfrload.c (pfr_extra_items_parse): Fix debug message. (pfr_phy_font_load): s/size/Size/ for local variable to avoid compiler warning. * src/pfr/pfrobjs.c (pfr_face_init): Fix debug message. (pfr_slot_load): Remove redundant local variable. 2002-04-19 David Turner <david@freetype.org> Adding a PFR font driver to the FreeType sources. Note that it doesn't support embedded bitmaps or kerning tables yet. src/pfr/*: New files. * include/freetype/config/ftmodule.h, include/freetype/internal/fttrace.h, src/Jamfile: Updated. * src/type1/t1gload.h (T1_Load_Glyph), src/type1/t1gload.c (T1_Load_Glyph): Fixed incorrect parameter sign-ness in callback function. * include/freetype/internal/ftmemory.h (FT_MEM_ZERO, FT_ZERO): New macros. * include/freetype/internal/ftstream.h (FT_NEXT_OFF3, FT_NEXT_UOFF3, FT_NEXT_OFF3_LE, FT_NEXT_UOFF3_LE): New macros to parse in-memory 24-bit integers. 2002-04-18 David Turner <david@freetype.org> * src/base/ftobjs.c, builds/win32/ftdebug.c, builds/amiga/src/base/ftdebug.c: Version 2.1.0 couldn't be linked against applications in Win32 and Amiga builds due to changes to `src/base/ftdebug.c' that were not properly propagated to `builds/win32' and `builds/amiga'. This has been fixed. * include/freetype/internal/ftobject.h, include/freetype/internal/ftexcept.h, include/freetype/ftsysmem.h, include/freetype/ftsysio.h, src/base/ftsysmem.c, src/base/ftsysio.c: New experimental files. 2002-04-17 David Turner <david@freetype.org> * Version 2.1.0 released. ========================= 2002-04-17 Michael Jansson <mjan@em2-solutions.com> * src/type1/t1gload.c (T1_Compute_Max_Advance): Fixed a small bug that prevented the function to return the correct value. 2002-04-16 Francesco Zappa Nardelli <Francesco.Zappa.Nardelli@ens.fr> * src/pcf/pcfread.c (pcf_get_accel): Fix parsing of accelerator tables. 2002-04-15 David Turner <david@freetype.org> * docs/FTL.txt: Formatting. * include/freetype/config/ftoption.h: Reduce the size of the render pool from 32kByte to 16kByte. * src/pcf/pcfread.c (pcf_seek_to_table_type): Remove compiler warning. * include/freetype/config/ftoption.h (FT_MAX_EXTENSIONS): Removed. * docs/CHANGES: Preparing 2.1.0 release. 2002-04-13 Werner LEMBERG <wl@gnu.org> * src/cff/cffgload.c (CFF_Parse_CharStrings): s/rand/Rand/ to avoid compiler warning. 2002-04-12 David Turner <david@freetype.org> * README.UNX: Updated the Unix-specific quick-compilation guide to warn about the GNU Make requirement at compile time. * include/freetype/config/ftstdlib.h, include/freetype/config/ftconfig.h, include/freetype/config/ftheader.h, include/freetype/internal/ftmemory.h, include/freetype/internal/ftobjs.h, src/autohint/ahoptim.c, src/base/ftdbgmem.c, src/base/ftdebug.c, src/base/ftmac.c, src/base/ftobjs.c, src/base/ftsystem.c, src/cache/ftcimage.c, src/cache/ftcsbits.c, src/cff/cffdrivr.c, src/cff/cffload.c, src/cff/cffobjs.c, src/cid/cidload.c, src/cid/cidparse.c, src/cid/cidriver.c, src/pcf/pcfdriver.c, src/pcf/pcfread.c, src/psaux/t1cmap.c, src/psaux/t1decode.c, src/pshinter/pshalgo1.c, src/pshinter/pshalgo2.c, src/pshinter/pshrec.c, src/psnames/psmodule.c, src/raster/ftraster.c, src/sfnt/sfdriver.c, src/sfnt/ttload.c, src/smooth/ftgrays.c, src/type1/t1afm.c, src/type1/t1driver.c, src/type1/t1gload.c, src/type1/t1load.c, src/type1/t1objs.c, src/type1/t1parse.c, builds/unix/ftconfig.in, builds/vms/ftconfig.h, builds/amiga/src/base/ftdebug.c: Added the new configuration file `ftstdlib.h' used to define aliases for all ISO C library functions used by the engine (e.g. strlen, qsort, setjmp, etc.). This eases the porting of FreeType 2 to environments like XFree86 modules/extensions. Also removed many #include <string.h>, #include <stdlib.h>, etc. from the engine's sources where they are not needed. * src/sfnt/ttpost.c: Use macro name for psnames.h. 2002-04-12 Vincent Caron <v.caron@zerodeux.net> * configure, builds/detect.mk: Updated the build system to print a warning message in case GNU Make isn't used to build the library. 2002-04-11 David Turner <david@freetype.org> * README, docs/CHANGES, Jamfile.in: Updates for the 2.1.0 release. * docs/FTL.txt: Updated license text to provide a preferred disclaimer and adjust copyright dates/extents. * include/freetype/cache/ftcglyph.h: Removing obsolete (and confusing) comment. * Jamfile.in: New file. 2002-04-11 Maxim Shemanarev <mcseemagg@yahoo.com> * src/smooth/ftgrays.c (gray_hline): Minor optimization. 2002-04-02 Werner Lemberg <wl@gnu.org> Fixes from the stable branch: * include/freetype/config/ftoption.h (FT_CONFIG_OPTION_OLD_CALCS): Removed. [FT_CONFIG_OPTION_OLD_CALCS]: Removed. * include/freetype/internal/ftcalc.h, src/base/ftcalc.c [FT_CONFIG_OPTION_OLD_CALCS]: Removed. * src/base/fttrigon.c (FT_Vector_Length): Change algorithm to match output of FreeType 1. * src/pshinter/pshglob.c (psh_globals_scale_widths): Fixed a small bug that created un-even stem widths when hinting Postscript fonts. * src/type1/t1driver.c, src/type1/t1parse.c: 16bit fixes. 2002-04-01 Werner Lemberg <wl@gnu.org> * src/truetype/ttgload.c: 16bit fixes. (TT_Load_Simple_Glyph): Improve debug messages. (load_truetype_glyph): Remove dead code. * src/truetype/ttinterp.c: 16bit fixes. * src/truetype/ttobjs.c: Ditto. * include/freetype/ftsnames.h, include/freetype/internal/sfnt.h, src/cff/cffload.h, src/psaux/psobjs.h, src/truetype/ttinterp.[ch], src/sfnt/ttpost.h: s/index/idx/. 2002-03-31 Yao Zhang <yaoz@vidar.niaaa.nih.gov> * src/truetype/ttobjs.c (TT_Size_Init): Fix typo. 2002-03-31 Werner Lemberg <wl@gnu.org> * src/otlayout/otlcommn.c, src/otlayout/otlcommn.h: s/index/idx/. * src/psaux/t1cmap.c: Ditto. * src/sfnt/ttcmap0.c: Ditto. * include/freetype/internal/tttypes.h, include/freetype/internal/sfnt.h (TT_Goto_Table_Func): Renamed to ... (TT_Loader_GotoTableFunc): This. * src/psaux/t1decode.c (T1_Decoder_Parse_Charstrings): Fix debug messages. * src/psnames/psmodule.c (psnames_interface) [!FT_CONFIG_OPTION_ADOBE_GLYPH_LIST]: Fix typo. * src/sfnt/sfdriver.c (get_sfnt_table): 16bit fix. * src/sfnt/ttcmap.c: 16bit fixes (0xFFFF -> 0xFFFFU). * src/sfnt/ttcmap0.c: 16bit fixes. (TT_Build_CMaps): Simplify debug messages. (tt_cmap12_char_next): Fix offset. * src/sfnt/ttload.c (TT_Load_Names, TT_Load_CMap): Fix debug messages. (TT_Load_OS2): 16bit fix. 2002-03-30 David Turner <david@freetype.org> * include/freetype/internal/tttypes.h: Adding comments to some of the TT_FaceRec fields. * src/sfnt/ttcmap0.c (TT_Build_CMaps): Removed compiler warnings. * src/sfnt/sfobjs.c (tt_name_entry_ascii_from_{utf16,ucs4,other}: New functions. (tt_face_get_name): Use them to properly extract an ascii font name. 2002-03-30 Werner Lemberg <wl@gnu.org> * include/freetype/t1tables.h (t1_blend_max): Fix typo. * src/base/ftstream.c: Simplify FT_ERROR calls. * src/cff/cffdrivr.c (cff_get_glyph_name): Fix debug message. * src/cff/cffobjs.c (CFF_Driver_Init, CFF_Driver_Done) [TT_CONFIG_OPTION_EXTEND_ENGINE]: Removed. * src/cff/sfobjs.c (SFNT_Load_Face) [TT_CONFIG_OPTION_EXTEND_ENGINE]: Ditto. * src/truetype/ttobjs.c (TT_Init_Driver, TT_Done_Driver) [TT_CONFIG_OPTION_EXTEND_ENGINE]: Ditto. * src/truetype/ttdriver.c, src/truetype/ttobjs.c, src/truetype/ttobjs.h: Renaming driver functions to the FT_<Subject>_<Action> scheme: TT_Init_Driver => TT_Driver_Init TT_Done_Driver => TT_Driver_Done TT_Init_Face => TT_Face_Init TT_Done_Face => TT_Face_Done TT_Init_Size => TT_Size_Init TT_Done_Size => TT_Size_Done TT_Reset_Size => TT_Size_Reset 2002-03-29 Werner Lemberg <wl@gnu.org> * builds/vms/ftconfig.h: Rename LOCAL_DEF and LOCAL_FUNC to FT_LOCAL and FT_LOCAL_DEF, respectively, as with other ftconfig.h files. * builds/unix/ftconfig.in: Add argument to FT_LOCAL and FT_LOCAL_DEF. * src/truetype/ttinterp.c: s/FT_Assert/FT_ASSERT/. * builds/unix/configure.ac: Temporarily deactivate creation of ../../Jamfile. * builds/unix/configure: Updated. 2002-03-28 KUSANO Takayuki <AE5T-KSN@asahi-net.or.jp> * src/sfnt/sfdriver.c (get_sfnt_postscript_name): Fix serious typos. 2002-03-28 Werner Lemberg <wl@gnu.org> * include/freetype/internal/psaux.h (PSAux_ServiceRec): Fix compiler warnings. * include/freetype/internal/t1types.h (T1_FaceRec): Use `const' for some members. * src/base/ftapi.c (FT_New_Memory_Stream): Fix typos. * src/psaux/t1cmap.c (t1_cmap_std_init, t1_cmap_unicode_init): Add cast. (t1_cmap_{standard,expert,custom,unicode}_class_rec): Use `FT_CALLBACK_TABLE_DEF'. * src/psaux/t1cmap.h: Updated. * src/sfnt/ttcmap0.c (TT_Build_CMaps): Use `ft_encoding_none' instead of zero. * src/type1/t1objs.c (T1_Face_Init): Use casts. 2002-03-26 David Turner <david@freetype.org> * src/sfnt/sfdriver.c, src/sfnt/sfobjs.c, src/sfnt/ttcmap0.c: Fixed a small bug in the FT_CMaps support code. 2002-03-25 David Turner <david@freetype.org> * src/truetype/ttinterp.c (Norm): Replaced with... (TT_VecLen): This. (TT_MulFix14, TT_DotFix14): New functions. (Project, Dual_Project, Free_Project, Compute_Point_Displacement, Ins_SHPIX, Ins_MIAP, Ins_MIRP): Use them. [FT_CONFIG_OPTION_OLD_CALCS]: Removed all code. 2002-03-22 David Turner <david@freetype.org> * src/base/ftobjs.c, src/sfnt/ttcmap0.c, src/type1/t1objs.c: Various fixes to make the FT_CMaps support work correctly (more tests are still needed). * include/freetype/internal/ftobjs.h, src/sfnt/Jamfile, src/sfnt/rules.mk, src/sfnt/sfnt.c, src/sfnt/sfobjs.c, src/sfnt/ttload.c, src/sfnt/ttcmap0.c, src/sfnt/ttcmap0.h: Updated the SFNT charmap support to use FT_CMaps. * include/freetype/fterrdef.h: New file. * include/freetype/fterrors.h: Include it. It contains all error codes. * include/freetype/config/ftheader.h (FT_ERROR_DEFINITIONS_H): New macro. * include/freetype/internal/ftmemory.h, and a lot of other files: Changed the names of memory macros. Examples: MEM_Set => FT_MEM_SET MEM_Copy => FT_MEM_COPY MEM_Move => FT_MEM_MOVE ALLOC => FT_ALLOC FREE => FT_FREE REALLOC = >FT_REALLOC FT_NEW was introduced to allocate a new object from a _typed_ pointer. Note that ALLOC_ARRAY and REALLOC_ARRAY have been replaced by FT_NEW_ARRAY and FT_RENEW_ARRAY which take _typed_ pointer arguments. This results in _lots_ of sources being changed, but makes the code more generic and less error-prone. * include/freetype/internal/ftstream.h, src/base/ftstream.c, src/cff/cffload.c, src/pcf/pcfread.c, src/sfnt/ttcmap.c, src/sfnt/ttcmap0.c, src/sfnt/ttload.c, src/sfnt/ttpost.c, src/sfnt/ttsbit.c, src/truetype/ttgload.c, src/truetype/ttpload.c, src/winfonts/winfnt.c: Changed the definitions of stream macros. Examples: NEXT_Byte => FT_NEXT_BYTE NEXT_Short => FT_NEXT_SHORT NEXT_UShortLE => FT_NEXT_USHORT_LE READ_Short => FT_READ_SHORT GET_Long => FT_GET_LONG etc. Also introduced the FT_PEEK_XXXX functions. * src/cff/cffobjs.c (CFF_Build_Unicode_Charmap): Removed commented out function. (find_encoding): Removed. (CFF_Face_Init): Remove charmap support. * include/freetype/config/ftoption.h (FT_CONFIG_OPTION_USE_CMAPS, TT_CONFIG_CMAP_FORMAT{0,2,4,6,8,10,12}): New macros to fine-tune support of cmaps. 2002-03-21 David Turner <david@freetype.org> * src/base/ftobjs.c, src/pcf/pcfdriver.c, src/pcf/pcfread.c: Updated to new FT_CMap definitions. * src/psaux/t1cmap.h, src/psaux/t1cmap.c, src/type1/t1cmap.h, src/type1/t1cmap.c: Updating and moving the Type 1 FT_CMap support from `src/type1' to `src/psaux' since it is going to be shared by the Type 1 and CID font drivers. * src/psaux/Jamfile, src/psaux/psaux.c, src/psaux/psauxmod.c, src/psaux/rules.mk, include/freetype/internal/psaux.h: Added support for Type 1 FT_CMaps. 2002-03-20 David Turner <david@freetype.org> * src/base/ftgloadr.c (FT_GlyphLoader_CheckSubGlyphs): Fixed a memory allocation bug that was due to un-careful renaming of the FT_SubGlyph type. * src/base/ftdbgmem.c (ft_mem_table_destroy): Fixed a small bug that caused the library to crash with Electric Fence when memory debugging is used. * Renaming stream macros. Examples: FILE_Skip => FT_STREAM_SKIP FILE_Read => FT_STREAM_READ ACCESS_Frame => FT_FRAME_ENTER FORGET_Frame => FT_FRAME_EXIT etc. * src/sfnt/sfdriver.c (get_sfnt_postscript_name): Fixed memory leak. * include/freetype/internal/ftobjs.h: Changing the definition of FT_CMap_CharNextFunc slightly. * src/cff/*.c: Updating CFF type definitions. 2002-03-14 David Turner <david@freetype.org> * include/freetype/internal/autohint.h, src/autohint/ahmodule.c, src/base/ftapi.c, src/base/ftobjs.c: Updating the type definitions for the auto-hinter module. FT_AutoHinter_Interface => FT_AutoHinter_ServiceRec FT_AutoHinter_Interface* => FT_AutoHinter_Service etc. FT_AutoHinter_Get_Global_Func => FT_AutoHinter_GlobalGetFunc FT_AutoHinter_Done_Global_Func => FT_AutoHinter_GlobalDoneFunc etc. * ahloader.h [_STANDALONE_]: Removed all conditional code. * include/freetype/internal/cfftypes.h, src/cff/*.c: Updating the type definitions of the CFF font driver. CFF_Font => CFF_FontRec CFF_Font* => CFF_Font etc. * include/freetype/internal/fnttypes.h, src/winfonts/*.c: Updating type definitions of the Windows FNT font driver. * include/freetype/internal/ftdriver.h, include/freetype/internal/ftobjs.h, src/base/ftapi.c, src/base/ftobjs.c, src/cff/cffdrivr.c, src/cff/cffdrivr.h, src/cid/cidriver.c, src/cid/cidriver.h, src/pcf/pcfdriver.c, src/pcf/pcfdriver.h, src/truetype/ttdriver.c, src/truetype/ttdriver.h, src/type1/t1driver.c, src/type1/t1driver.h, src/winfonts/winfnt.c, src/winfonts/winfnt.h: Updating type definitions for font drivers. FTDriver_initFace => FT_Face_InitFunc FTDriver_initGlyphSlot => FT_Slot_InitFunc etc. * src/cid/cidobjs.c (CID_Face_Init): Remove dead code. * include/freetype/internal/ftobjs.h, src/base/ftobjs.c: Updated a few face method definitions: FT_PSName_Requester => FT_Face_GetPostscriptNameFunc FT_Glyph_Name_Requester => FT_Face_GetGlyphNameFunc FT_Name_Index_Requester => FT_Face_GetGlyphNameIndexFunc * src/base/ftapi.c: New file. It contains backward compatibility functions. * include/freetype/internal/psaux.h, src/cid/cidload.c, src/cidtoken.h, src/psaux/psobjs.c, src/psaux/psobjs.h, src/psaux/t1decode.c, src/type1/t1load.c, src/type1/t1tokens.h: Updated common PostScript type definitions. Renamed all enumeration values like to uppercase variants: t1_token_any => T1_TOKEN_TYPE_ANY t1_field_cid_info => T1_FIELD_LOCATION_CID_INFO etc. * include/freetype/internal/psglobal.h: Removed. * include/freetype/internal/pshints.h, src/pshinter/pshglob.h: Updated. * include/freetype/internal/tttypes.h, include/freetype/internal/sfnt.h, src/base/ftnames.c, src/cff/cffdrivr.c, src/sfnt/*.c, src/truetype/*.c: Updated SFNT/TrueType type definitions. * include/freetype/freetype.h, include/freetype/internal/ftgloadr.h: Updating type definitions for the glyph loader. 2002-03-13 Antoine Leca <antoine@oriolnet.com> * include/freetype/config/ftoption.h: Changed the automatic detection of Microsoft C compilers to automatically support 64-bit integers only since revision 9.00 (i.e. >= Visual C++ 2.0). 2002-03-08 Werner Lemberg <wl@gnu.org> * src/base/ftutil.c (FT_Realloc): Use MEM_Set instead of memset. 2002-03-07 Werner Lemberg <wl@gnu.org> * src/base/ftdbgmem.c (ft_mem_table_resize, ft_mem_table_new, ft_mem_table_set, ft_mem_debug_alloc, ft_mem_debug_free, ft_mem_debug_realloc, ft_mem_debug_done, FT_Alloc_Debug, FT_Realloc_Debug, FT_Free_Debug): Fix compiler warnings. * src/base/ftcalc.c (FT_MulFix): Ditto. * src/cff/cffdrivr.c (cff_get_name_index): Ditto. * src/cff/cffobjs.c (CFF_Size_Get_Globals_Funcs, CFF_Size_Init, CFF_GlyphSlot_Init): Ditto. * src/cid/cidobjs.c (CID_GlyphSlot_Init, CID_Size_Get_Globals_Funcs): Ditto. * src/type1/t1objs.c (T1_Size_Get_Globals_Funcs, T1_GlyphSlot_Init): Ditto. * src/pshinter/pshmod.c (pshinter_interface): Use `static const'. * src/winfonts/winfnt.c (FNT_Get_Next_Char): Remove unused variables. * include/freetype/internal/psaux.h (T1_Builder_Funcs): Renamed to... (T1_Builder_FuncsRec): This. (T1_Builder_Funcs): New typedef. (PSAux_Interface): Remove compiler warnings. * src/psaux/psauxmod.c (t1_builder_funcs), src/psaux/psobjs.h (t1_builder_funcs): Updated. * src/pshinter/pshglob.h (PSH_Blue_Align): Replaced with ... (PSH_BLUE_ALIGN_{NONE,TOP,BOT}): New defines. (PSH_AlignmentRec): Updated. * include/freetype/internal/ftstream.h (GET_Char, GET_Byte): Fix typo. * include/freetype/internal/ftgloadr.h (FT_SubGlyph): Ditto. * src/base/ftstream (FT_Get_Char): Rename to... (FT_Stream_Get_Char): This. * src/base/ftnames.c (FT_Get_Sfnt_Name): s/index/idx/ -- `index' is a built-in function in gcc, causing warning messages with gcc 3.0. * src/autohint/ahglyph.c (ah_outline_load): Ditto. * src/autohint/ahglobal.c (ah_hinter_compute_blues): Ditto. * src/cache/ftcmanag.c (ftc_family_table_alloc, ftc_family_table_free, FTC_Manager_Done, FTC_Manager_Register_Cache): Ditto. * src/cff/cffload.c (cff_new_index, cff_done_index, cff_explicit_index, CFF_Access_Element, CFF_Forget_Element, CFF_Get_Name, CFF_Get_String, CFF_Load_SubFont, CFF_Load_Font, CFF_Done_Font): Ditto. * src/psaux/psobjs.c (PS_Table_Add, PS_Parser_LoadField): Ditto. * src/psaux/t1decode.c (T1_Decoder_Parse_Charstrings): Ditto. * src/pshinter/pshrec.c (ps_mask_test_bit, ps_mask_clear_bit, ps_mask_set_bit, ps_dimension_add_t1stem, ps_hints_t1stem3, * src/pshinter/pshalgo1.c (psh1_hint_table_record, psh1_hint_table_record_mask, psh1_hint_table_activate_mask): Ditto. * src/pshinter/pshalgo2.c (psh2_hint_table_record, psh2_hint_table_record_mask, psh2_hint_table_activate_mask): Ditto. * src/sfnt/ttpost.c (Load_Format_20, Load_Format_25, TT_Get_PS_Name): Ditto. * src/truetype/ttgload.c (TT_Get_Metrics, Get_HMetrics, load_truetype_glyph): Ditto. * src/type1/t1load.c (parse_subrs, T1_Open_Face): Ditto. * src/type1/t1afm.c (T1_Get_Kerning): Ditto. * include/freetype/cache/ftcmanag.h (ftc_family_table_free): Ditto. 2002-03-06 David Turner <david@freetype.org> * src/type1/t1objs.c (T1_Face_Init), src/cid/cidobjs.c (CID_Face_Init): Fixed another bug related to the ascender/descender/text height of Postscript fonts. * src/pshinter/pshalgo2.c (print_zone): Renamed to ... (psh2_print_zone): This. * src/pshinter/pshalgo1.c (print_zone): Renamed to ... (psh1_print_zone): This. * include/freetype/freetype.h, include/freetype/internal/ftobjs.h, src/base/ftobjs.c: Adding the new FT_Library_Version API to return the library's current version in dynamic links. * src/base/ftinit.c (FT_Init_FreeType): Updated. 2002-03-06 Werner Lemberg <wl@gnu.org> * src/pshinter/pshglob.h (PSH_DimensionRec): s/std/stdw/. * src/pshinter/pshglob.c (psh_global_scale_widths, psh_dimension_snap_width, psh_globals_destroy, psh_globals_new): Ditto. 2002-03-05 David Turner <david@freetype.org> * src/type1/t1objs.c (T1_Face_Init), src/cff/cffobjs.c (CFF_Face_Init), src/cid/cidobjs.c (CID_Face_Init): Removing the bug that returned global BBox values in 16.16 fixed format (instead of integer font units). * src/cid/cidriver.c (cid_get_postscript_name): Fixed a bug that caused the CID driver to return Postscript font names with a leading slash (`/') as in `/MOEKai-Regular'. * src/sfnt/ttload.c (TT_Load_Names), src/sfnt/sfobjs.c (Get_Name), src/sfnt/sfdriver.c (get_sfnt_postscript_name): Fixed the loader so that it accepts broken fonts like `foxjump.ttf', which made FreeType crash when trying to load them. Also improved the name table parser to be able to load Windows-encoded entries before Macintosh or Unicode ones, since it seems some fonts don't have reliable values here anyway. * include/freetype/internal/psnames.h: Add typedef for `PSNames_Service'. 2002-03-05 Werner Lemberg <wl@gnu.org> * builds/unix/aclocal.m4, builds/unix/ltmain.sh: Update to libtool 1.4.2. Apply a small patch for AIX to make shared libraries work (this patch is already in the CVS version of libtool). * builds/unix/config.sub, builds/unix/config.guess: Updated to recent versions. * builds/unix/configure.ac: Fix typo (AC_CONFIG_FILE->AC_CONFIG_FILES). * builds/unix/configure: Regenerated. 2002-02-28 David Turner <david@freetype.org> * include/freetype/ftconfig.h: Changed `FT_LOCAL xxxx' to `FT_LOCAL( xxxx )' everywhere in the source. The same goes for `FT_LOCAL_DEF xxxx' which is translated to `FT_LOCAL_DEF( xxxxx )'. * include/freetype/freetype.h (FREETYPE_MINOR, FREETYPE_PATCH): Changing version to 2.1.0 to indicate an unstable branch. Added the declarations of FT_Get_First_Char and FT_Get_Next_Char. * src/base/ftobjs.c: Implement FT_Get_First_Char and FT_Get_Next_Char. * include/freetype/t1tables.h: Renaming structure types. This typedef T1_Struct_ { } T1_Struct; becomes typedef PS_StructRec_ { } PS_StructRec, *PS_Struct; typedef PS_StructRec T1_Struct; /* backward compatibility */ Hence, we increase the coherency of the source code by effectively using the `Rec' prefix for structure types. 2002-02-27 David Turner <david@freetype.org> * src/sfnt/ttload.c (TT_Load_Names): Simplifying and securing the names table loader. Invalid individual name entries are now handled correctly. This allows the loading of very buggy fonts like `foxjump.ttf' without allocating tons of memory and causing crashes. * src/otlayout/otlcommon.h, src/otlayout/otlcommon.c: Adding (still experimental) code for OpenType Layout tables validation and parsing. * src/type1/t1cmap.h, src/type1/t1cmap.c: Adding (still experimental) code for Type 1 charmap processing. * src/sfnt/ttcmap0.c: New file. It contains a new, still experimental SFNT charmap processing support. * include/freetype/internal/ftobjs.h: Adding validation support as well as internal charmap object definitions (FT_CMap != FT_CharMap). 2002-02-24 David Turner <david@freetype.org> * Renaming stream functions to the FT_<Subject>_<Action> scheme: FT_Seek_Stream => FT_Stream_Seek FT_Skip_Stream => FT_Stream_Skip FT_Read_Stream => FT_Stream_Read FT_Read_Stream_At => FT_Stream_Read_At FT_Access_Frame => FT_Stream_Enter_Frame FT_Forget_Frame => FT_Stream_Exit_Frame FT_Extract_Frame => FT_Stream_Extract_Frame FT_Release_Frame => FT_Stream_Release_Frame FT_Get_XXXX => FT_Stream_Get_XXXX FT_Read_XXXX => FT_Stream_Read_XXXX FT_New_Stream( filename, stream ) => FT_Stream_Open( stream, filename ) (The function doesn't create the FT_Stream structure, it simply initializes it for reading.) FT_New_Memory_Stream( library, FT_Byte* base, size, stream ) => FT_Stream_Open_Memory( stream, const FT_Byte* base, size ) FT_Done_Stream => FT_Stream_Close FT_Stream_IO => FT_Stream_IOFunc FT_Stream_Close => FT_Stream_CloseFunc ft_close_stream => ft_ansi_stream_close (in base/ftsystem.c only) ft_io_stream => ft_ansi_stream_io (in base/ftsystem.c only) * src/base/ftutil.c: New file. Contains all memory and list management code (previously in `ftobjs.c' and `ftlist.c', respectively). * include/freetype/internal/ftobjs.h: Moving all code related to glyph loaders to ... * include/freetype/internal/ftgloadr.h: This new file. `FT_GlyphLoader' is now a pointer to the structure `FT_GlyphLoaderRec'. (ft_glyph_own_bitmap): Renamed to ... (FT_GLYPH_OWN_BITMAP): This. * src/base/ftobjs.c: Moving all code related to glyph loaders to ... * src/base/ftgloadr.c: This new file. 2002-02-22 Werner Lemberg <wl@gnu.org> * include/freetype/internal/ftdebug.h (FT_Trace): Remove comma in enum to avoid compiler warnings. 2002-02-21 David Turner <david@freetype.org> Modified the debug sub-system initialization. Trace levels can now be specified within the `FT2_DEBUG' environment variable. See the comments within `ftdebug.c' for more details. * src/base/ftdebug.c: (FT_SetTraceLevel): Removed. (ft_debug_init): New function. (ft_debug_dummy): Removed. Updated to changes in ftdebug.h * include/freetype/internal/ftdebug.h: Always define FT_DEBUG_LEVEL_ERROR if FT_DEBUG_LEVEL_TRACE is defined. (FT_Assert): Renamed to ... (FT_ASSERT): This. Some stuff from ftdebug.h has been moved to ... * include/freetype/internal/fttrace.h: New file, to define the trace levels used for debugging. It is used both to define enums and toggle names for FT2_DEBUG. * include/freetype/internal/internal.h: Updated. * src/base/ftobjs.c, src/base/ftstream.c: Updated. * include/freetype/internal/ftextend.h, src/base/ftextend.c: Removed. Both files are now completely obsolete. * src/base/Jamfile, src/base/rules.mk: Updated. * include/freetype/fterrors.h: Adding `#undef FT_ERR_CAT' and `#undef FT_ERR_XCAT' to avoid warnings with certain compilers (like LCC). * src/pshinter/pshalgo2.c (print_zone): Renamed to ... (psh2_print_zone): This to avoid errors during compilation of debug library. * src/smooth/ftgrays.c (FT_COMPONENT): Change definition to as `trace_smooth'. 2002-02-20 David Turner <david@freetype.org> * README: Adding `devel@freetype.org' address for bug reports. 2002-02-20 Werner Lemberg <wl@gnu.org> * builds/unix/install.mk (check): New dummy target. (.PHONY): Add it. 2002-02-19 Werner Lemberg <wl@gnu.org> * builds/freetype.mk (FT_CFLAGS): Use $(INCLUDE_FLAGS) first. * src/cache/ftccache.c (ftc_cache_resize): Mark `error' as unused to avoid compiler warning. * src/cff/cffload.c (CFF_Get_String): Ditto. * src/cff/cffobjs.c (CFF_StrCopy): Ditto. * src/psaux/psobjs.c (PS_Table_Done): Ditto. * src/pcf/pcfread.c (pcf_seek_to_table_type): Ditto. * src/sfnt/sfdriver.c (get_sfnt_postscript_name): Ditto. (pcf_get_bitmaps): The same for `sizebitmaps'. * src/psaux/t1decode.c (T1_Decoder_Parse_Charstrings): The same for `orig_y'. (t1operator_seac): Comment out more dead code. * src/pshinter/pshalgo2.c (ps2_hints_apply): Add `DEBUG_HINTER' conditional. * src/truetype/ttgload.c (TT_Process_Simple_Glyph, load_truetype_glyph): Add `TT_CONFIG_OPTION_BYTECODE_INTERPRETER' conditional. 2002-02-18 Werner Lemberg <wl@gnu.org> * src/autohint/ahglyph.c (ah_outline_link_segments): Remove unused variables. * src/autohint/ahhint.c (ah_align_serif_edge): Use FT_UNUSED instead of UNUSED. * src/autohint/ahmodule.c (ft_autohinter_reset): Ditto. * src/pshinter/pshrec.c (ps_mask_table_merge): Fix typo in variable swapping code. * src/pshinter/pshglob.h (PSH_Blue_Align): Add PSH_BLUE_ALIGN_NONE. * src/pshinter/pshglob.c (psh_blues_snap_stem): Use it. * src/pshinter/pshalgo1.c (psh1_hint_table_optimize): Ditto. * src/pshinter/pshalgo2.c (psh2_hint_align): Ditto. * include/freetype/internal/ftobjs.h (UNUSED): Removed. 2002-02-10 Roberto Alameda <ojancano@geekmail.de> Add support for ISOLatin1 PS encoding. * include/freetype/freetype.h (ft_encoding_latin_1): New tag (`lat1'). * include/freetype/internal/t1types.h (T1_Encoding_Type): Add `t1_encoding_isolatin1'. * src/type1/t1driver.c (Get_Char_Index, Get_Next_Char): Handle ft_encoding_latin_1. * src/type1/t1load.c (parse_encoding): Handle `ISOLatin1Encoding'. * src/type1/t1objs.c (T1_Face_Init): Handle `t1_encoding_isolatin1'. ---------------------------------------------------------------------------- Copyright (C) 2002-2022 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, and distributed under the terms of the FreeType project license, LICENSE.TXT. By continuing to use, modify, or distribute this file you indicate that you have read the license and understand and accept it fully. Local Variables: version-control: never coding: utf-8 End:
whupdup/frame
real/third_party/freetype-2.12.0/docs/oldlogs/ChangeLog.21
21
gpl-3.0
329,142
2021-07-18 Werner Lemberg <wl@gnu.org> * Version 2.11.0 released. ========================== Tag sources with `VER-2-11-0'. * docs/VERSION.TXT: Add entry for version 2.11.0. * docs/CHANGES: Updated. * README, src/base/ftver.rc, builds/windows/vc2010/index.html, builds/windows/visualc/index.html, builds/windows/visualce/index.html, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/index.html, docs/freetype-config.1: s/2.10.4/2.11.0/, s/2104/2110/. * include/freetype/freetype.h (FREETYPE_MINOR): Set to 11. (FREETYPE_PATCH): Set to 0. * builds/unix/configure.raw (version_info): Set to 24:0:18. * CMakeLists.txt (VERSION_MINOR): Set to 11. (VERSION_PATCH): Set to 0. * builds/toplevel.mk (dist): Ignore more git-related files. 2021-07-17 David Turner <david@freetype.org> * src/smooth/ftgrays.c: Fix compilation if `FT_LONG64` is undefined. The code assumed that if `__SSE2__` is defined, then 64-bit integer types are available. This is not the case apparently for certain multilib compiler targets like 'x86_32.x86' used by Gentoo. This patch fixes the issue by disabling the special code path when 64-bit integer types are not available. Fixes #1071. 2021-07-16 Alex Richardson <Alexander.Richardson@cl.cam.ac.uk> [tests] Allow arbitrary build directories. * tests/issue-1063/main.c (main): I am building with a build directory that is not directly inside the source tree, so the path `../tests/data/As.I.Lay.Dying.ttf` does not resolve to the test input file. This change passes the test data directory as an environment variable to allow arbitrary build directories. * tests/meson.build: Updated. 2021-07-16 Alex Richardson <Alexander.Richardson@cl.cam.ac.uk> * tests/issue-1063/main.c (main): Fix uninitialized variable. I tried running `meson test` but the test just crashed and gdb reported that the face argument to `FT_Get_Char_Index` was nonsense. With this change the test prints 'Could not open file: ' as it should. 2021-07-16 Werner Lemberg <wl@gnu.org> [smooth] Minor fixes. * src/smooth/ftgrays.c (gray_render_conic): Move variable and structure declarations to beginning of function. Inspite of C99 compliance we still do this for the sake of backward compatibility. This also avoids a shadowing declaration of `count`. (gray_convert_glyph_inner): Fix typo. 2021-07-15 Ben Wagner <bungeman@chromium.org> * src/smooth/ftgrays.c: Guard inclusion of `emmintrin.h`. Guard inclusion of `emmintrin.h` with `#ifdef __SSE2__`. The gcc version of this header, `xmmintrin.h`, and `mmintrin.h` check that the appropriate defines are set before defining anything (are internally guarded). However, the clang versions of these includes are not internally guarded. As a result of this, externally guard the inclusion of these headers. 2021-07-15 David Turner <david@freetype.org> [smooth] Implement Bézier quadratic arc flattening with DDA. Benchmarking shows that this provides a very slighty performance boost when rendering fonts with lots of quadratic Bézier arcs, compared to the recursive arc splitting, but only when SSE2 is available, or on 64-bit CPUs. On a 2017 Core i5-7300U CPU on Linux/x86_64: ftbench -p -s10 -t5 -cb DroidSansFallbackFull.ttf Before: 4.033 us/op (best of 5 runs for all numbers) After: 3.876 us/op ftbench -p -s60 -t5 -cb DroidSansFallbackFull.ttf Before: 13.467 us/op After: 13.385 us/op * src/smooth/ftgrays.c (gray_render_conic): New implementation based on DDA and optionally SSE2. 2021-07-15 David Turner <david@freetype.org> [smooth] Minor speedup to smooth rasterizer. This speeds up the smooth rasterizer by avoiding conditional branches in the hot path. - Define a fixed 'null cell', which will be pointed to whenever the current cell is outside of the current target region. This avoids a `ras.cell != NULL` check in the `FT_INTEGRATE` macro. - Also use the null cell as a sentinel at the end of all `ycells` linked-lists, by setting its x coordinate to `INT_MAX`. This avoids a `if (!cell)` check in `gray_set_cell` as well. - Slightly change the worker struct fields to perform a little less operations during rendering. Example results (on a 2013 Corei5-3337U CPU) out/ftbench -p -s10 -t5 -bc DroidSansFallbackFull.ttf Before: 5.472 us/op After: 5.275 us/op out/ftbench -p -s60 -t5 -bc DroidSansFallbackFull.ttf Before: 17.988 us/op After: 17.389 us/op * src/smooth/ftgrays.c (grat_TWorker): Replace `num_cells` field with `cell_free` and `cell_limit`. (NULL_CELL_PTR, CELL_MAX_X_VALUE, CELL_IS_NULL): New macros. (gray_dump_cells, gray_set_cell, gray_sweep, gray_sweep_direct, gray_convert_glyph_inner, gray_convert_glyph): Updated. 2021-07-15 David Turner <david@freetype.org> [tests] Rewrite download script in Python3. This commit replaces the bash script with a Python script that does the same work, plus avoiding to download anything if the files are already installed with the right content. We now use the first 8 bytes of each file's sha256 hash for the digest. * tests/scripts/download-test-fonts.sh: Removed. * tests/scripts/download-test-fonts.py: New script. * tests/README.md: Updated. 2021-07-15 Alex Richardson <Alexander.Richardson@cl.cam.ac.uk> Support architectures where `long` is smaller than pointers. I am currently trying to compile FreeType for CHERI-extended ISAs (CHERI-RISC-V and Arm's Morello), but I am getting compiler warnings from the `FT_UINT_TO_POINTER` macro. When compiling with the CHERI Clang compiler, not using `uinptr_t` for casts between integers an pointers results in the following `-Werror` build failures: ``` In file included from .../src/truetype/truetype.c:22: .../src/truetype/ttgload.c:1925:22: error: cast from provenance-free integer type to pointer type will give pointer that can not be dereferenced [-Werror,-Wcheri-capability-misuse] node->data = FT_UINT_TO_POINTER( glyph_index ); ^ .../include/freetype/internal/compiler-macros.h:79:34: note: expanded from macro 'FT_UINT_TO_POINTER' ``` * include/freetype/internal/compiler-macros.h (FT_UINT_TO_POINTER): The ISO C standard compliant fix for this would be to use `uintptr_t` from `stdint.h`, but I am not sure if this is supported by the minimum compiler version. Therefore, use the compiler-defined `__UINTPTR_TYPE__` macro (supported in GCC 4.6+ and Clang since about 3.0) before checking for `_WIN64` and falling back to `unsigned long`. 2021-07-13 Oleg Oshmyan <chortos@inbox.lv> [base] Fix `FT_Open_Face`'s handling of user-supplied streams. This was already true (though undocumented) most of the time, but not if `FT_NEW` inside `FT_Stream_New` failed or if the `FT_OPEN_XXX` flags were bad. Normally, `FT_Open_Face` calls `FT_Stream_New`, which returns the user-supplied stream unchanged, and in case of any subsequent error in `FT_Open_Face`, the stream is closed via `FT_Stream_Free`. Up to now, however, `FT_Stream_New` allocates a new stream even if it is already given one by the user. If this allocation fails, the user-supplied stream is not returned to `FT_Open_Face` and never closed. Moreover, the user cannot detect this situation: all they see is that `FT_Open_Face` returns `FT_Err_Out_Of_Memory`, but that can also happen after a different allocation fails within the main body of `FT_Open_Face`, when the user's stream has already been closed by `FT_Open_Face`. It is plausible that the user stream's `close` method frees memory allocated for the stream object itself, so the user cannot defensively free it upon `FT_Open_Face` failure lest it ends up doubly freed. All in all, this ends up leaking the memory/resources used by user's stream. Furthermore, `FT_Stream_New` simply returns an error if the `FT_OPEN_XXX` flags are unsupported, which can mean either an invalid combination of flags or a perfectly innocent `FT_OPEN_STREAM` on a FreeType build that lacks stream support. With this patch, the user-supplied stream is closed even in these cases, so the user can be sure that if `FT_Open_Face` failed, the stream is definitely closed. * src/base/ftobjs.c (FT_Stream_New): Don't allocate a buffer unnecessarily. Move error-handling code to make the control flow more obvious. Close user-supplied stream if the flags are unsupported. `FT_Stream_Open` always sets `pathname.pointer`, so remove the redundant (re)assignment. None of the `FT_Stream_Open...` functions uses `stream->memory`, so keep just one assignment at the end, shared among all possible control flow paths. ('Unsupported flags' that may need a stream closure can be either an invalid combination of multiple `FT_OPEN_XXX` mode flags or a clean `FT_OPEN_STREAM` flag on a FreeType build that lacks stream support.) 2021-07-13 Oleg Oshmyan <chortos@inbox.lv> [base] Reject combinations of incompatible `FT_OPEN_XXX` flags. The three modes are mutually exclusive, and the documentation of the `FT_OPEN_XXX` constants notes this. However, there was no check to validate this in the code, and the documentation on `FT_Open_Args` claimed that the corresponding bits were checked in a well-defined order, implying it was valid (if useless) to specify more than one. Ironically, this documented order did not agree with the actual code, so it could not be relied upon; hopefully, nobody did this and nobody will be hurt by the new validation. Even if multiple mode bits were allowed, they could cause memory leaks: if both `FT_OPEN_STREAM` and `stream` are set along with either `FT_OPEN_MEMORY` or `FT_OPEN_PATHNAME`, then `FT_Stream_New` allocated a new stream but `FT_Open_Face` marked it as an 'external' stream, so the stream object was never released. * src/base/ftobjs.c (FT_Stream_New): Reject incompatible `FT_OPEN_XXX` flags. 2021-07-12 Alex Richardson <Alexander.Richardson@cl.cam.ac.uk> * meson.build: Fix build for other UNIX systems (e.g., FreeBSD). Without this change the build of `unix/ftsystem.c` fails because the `ftconfig.h` header that defines macros such as `HAVE_UNISTD_H` and `HAVE_FCNTL_H` is only being generated for Linux, macOS, and Cygwin systems: ``` .../builds/unix/ftsystem.c:258:32: error: use of undeclared identifier 'O_RDONLY' file = open( filepathname, O_RDONLY ); ``` Instead of hardcoding a list of operating systems for this check, update the logic that decides whether to build the file and set a boolean flag that can be checked instead. 2021-07-12 Werner Lemberg <wl@gnu.org> [autofit] More clean-ups. * src/autofit/afhints.h (AF_GlyphHintsRec): Remove the no longer needed fields `xmin_delta` and `xmax_delta`. * src/autofit/afhints.c (af_glyph_hints_reload), src/autofit/afloader.c (af_loader_load_glyph): Updated. 2021-07-12 Werner Lemberg <wl@gnu.org> Small clean-ups for the last few commits. * include/freetype/fttrace.h (afwarp): Removed. 2021-07-12 David Turner <david@freetype.org> Remove obsolete `AF_Angle` type and related sources. * src/autofit/afangles.c: File removed. Functions related to sorting moved to... * src/autofit/afhints.c (af_sort_pos, af_sort_and_quantize_widths): This file. * src/autofit/afangles.h: File removed. * src/autofit/aftypes.h: Updated. * src/autofit/autofit.c: Updated. * src/autofit/rules.mk (AUTOF_DRV_SRC): Updated. 2021-07-12 David Turner <david@freetype.org> Remove experimental auto-hinting 'warp' mode. This feature was always experimental, and probably never worked properly. This patch completely removes it from the source code, except for a documentation block describing it for historical purposes. * devel/ftoption.h, include/freetype/config/ftoption.h: Remove `AF_CONFIG_OPTION_USE_WARPER`. * include/freetype/ftdriver.h: Document 'warping' property as obsolete. * src/autofit/afwarp.c, src/autofit/afwarp.h: Files removed. * src/autofit/*: Remove any code related to warp mode. 2021-07-12 David Turner <david@freetype.org> Remove experimental 'Latin2' writing system (`FT_OPTION_AUTOFIT2`). This code has always been experimental and was never compiled anyway (`FT_OPTION_AUTOFIT2` does not appear in `ftoption.h` or even any of our build files). * include/freetype/internal/fttrace.h (aflatin2): Removed. * src/autofit/aflatin2.h, src/autofit/aflatin2.c: Files removed. * src/autofit/afloader.c: Remove undocumented hook to activate Latin2 system. * src/autofit/afstyles.h: Remove `ltn2_dflt` style definition. * src/autofit/afwrtsys.h: Remove `LATIN2` writing system definition. * src/autofit/autofit.c: Updated. 2021-07-05 Werner Lemberg <wl@gnu.org> * src/base/ftlcdfil.c (FT_Library_SetLcdGeometry): Fix argument. Reported by Hin-Tak. 2021-07-03 Werner Lemberg <wl@gnu.org> * meson_options.txt: Sort alphabetically; no final full stops. 2021-07-01 Ben Wagner <bungeman@chromium.org> * src/truetype/ttgxvar.c (tt_set_mm_blend): Test `coords`. It is undefined behavior to pass `NULL` to `memcpy`. `coords' is passed to `memcpy` but `TT_Get_MM_Blend` and `TT_Get_Var_Design` explictly call `tt_set_mm_blend` with `coords` as `NULL`. In addition, `TT_Set_MM_Blend` has a similar possible issue. 2021-06-30 Dominik Röttsches <drott@chromium.org> [sfnt] Support PaintScale in 'COLR' v1 parsing. * include/freetype/ftcolor.h (FT_PaintFormat): Renumber values, add `FT_COLR_PAINTFORMAT_SCALE`. (FT_PaintScale): New structure to represent 'PaintScale*' tables. (FT_COLR_Paint): Updated. * src/sfnt/ttcolr.c (FT_PaintFormat_Internal): New enumeration. (read_paint): Parse 'PaintScale' and friends. 2021-06-30 Dominik Röttsches <drott@chromium.org> [sfnt] Handle fonts without layer list in 'COLR' v1. 'COLR' v1 fonts do not necessarily need to have a layer list; for this reason, 'fontTools' recently started generating fonts in a way that drops the layer list if there are no layers in it. This results in the layer list offset becoming zero, which FreeType treated as an invalid table. Fix that and handle the case for layer list offset being 0. This slightly changes how we need to calculate the starting offset for paints. * src/sfnt/ttcolr.c (tt_face_load_colr): Handle case of layer list offset being zero without outright rejecting table. 2021-06-30 Alexei Podtelezhnikov <apodtele@gmail.com> * src/raster/ftraster.c (Render_Single_Pass): Simplify `band_stack'. 2021-06-29 Alexei Podtelezhnikov <apodtele@gmail.com> [raster] Do not skip the second pass without dropout control. The second pass also fixes horizontal lines through the pixel centers. * src/raster/ftraster.c (black_TWorker): Do not use `second_pass'. (Render_Glyph): Skip the second pass only with the appropriate flag. 2021-06-29 Alexei Podtelezhnikov <apodtele@gmail.com> [raster] Handle sub-band stack locally. * src/raster/ftraster.c (black_TWorker): Move `band_stack' from here.. (Render_Single_Pass): ... to here and accept limit arguments. (Render_Glyph): Updated. 2021-06-25 Anurag Thakur <anuthadev@gmail.com> [CI] Introduce linux CI and refactor job names. * .gitlab-ci.yml: Added jobs for building freetype on linux. 2021-06-28 Alexei Podtelezhnikov <apodtele@gmail.com> [raster] Handle Bézier stack locally. * src/raster/ftraster.c (black_TWorker): Move `arcs' from here... (Conic_To, Cubic_To): ... to here to tighten their scope. (Bezier_Up, Bezier_Down): ... Take the current `arc' argument. 2021-06-28 Dominik Röttsches <drott@chromium.org> [sfnt] Improve paint limit checks Paint tables can appear before the `base_glyphs_v1` offset if the font is produced with the layer list before the base glyph list. In this case paint tables can occur after the layer list but before the base glyph list. Checks in the 'COLR' v1 code were rejecting fonts with this layout. Improve these checks by calculating a minimum offset after which paint tables can occur and use that in safety checks. * src/sfnt/ttcolr.c (Colr, tt_face_load_colr): Declare `paint_start_v1` and calculate that as the minimum of the end of layer list and base glyph list. (get_child_table_pointer, read_paint, tt_face_get_paint_layers): Use that in safety checks. 2021-06-28 Alexei Podtelezhnikov <apodtele@gmail.com> [raster] Clean up vertical sweep. * src/raster/ftraster.c (black_TWorker): Replace the current line offset with the pointer and drop the increment. (Function_Sweep_Init): Take values as arguments instead of pointers. (Vertical_Sweep_*, Horizontal_Sweep_Init, Draw_Sweep): Updated. 2021-06-25 Alexei Podtelezhnikov <apodtele@gmail.com> [raster] Make `band_top' local variable. * src/raster/ftraster.c (black_TWorker): Move `band_top' from here... (Render_Single_Pass): ... to here, and refactor. (Render_Glyph): Updated. 2021-06-25 Alexei Podtelezhnikov <apodtele@gmail.com> [raster] Adjust sub-band bisecting limits. We can bisect a band until it is just a single scan line. This might be slow and cause time-outs but if we need to impose limits it should be elsewhere. * src/raster/ftraster.c (Render_Single_Pass): Tweak sub-banding. 2021-06-25 Alexei Podtelezhnikov <apodtele@gmail.com> * src/raster/ftraster.c (Render_Single_Pass): Remove dead code. 2021-06-25 Werner Lemberg <wl@gnu.org> [base] Add trace level to logging output. Some practical debugging work has shown that displaying level X of an `FT_TRACEX` macro in the output of `FT2_DEBUG="... -v"` would be very helpful to find out which trace level should be selected. As an example, we now get output like ``` [ttobjs:2] TTF driver [ttobjs:2] SFNT driver [sfobjs:2] not a font using the SFNT container format [t1objs:2] Type 1 driver [stream:7] FT_Stream_EnterFrame: 14 bytes ``` * include/freetype/internal/ftdebug.h (FT_LOGGING_TAGX): New macro. (FT_LOG): Use it to add the trace level to the logging tag. * include/freetype/internal/fttrace.h (FT_MAX_TRACE_LEVEL_LENGTH): Adjust. * docs/DEBUG: Updated. 2021-06-24 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth, raster] Fix up and align error codes. FT_Render_Glyph picked up FAILURE or 1 returned from the raster function, which became a confusing error code. Instead, return Raster_Overflow in the unlikely event that banding does not help or another meaningful error. * src/smooth/ftgrays.c (gray_convert_glyph_inner, gray_convert_glyph): Use Raster_Overflow when the rendering pool is exhausted and return it if banding does not help. (gray_raster_render): Use Smooth_Err_Ok. * src/raster/ftraster.c (Render_Single_Pass): Return Raster_Overflow if banding does not help or another error code. 2021-06-23 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth, raster] Remove synonymous error macros. * src/smooth/ftgays.c [STANDALONE_]: s/ErrRaster_/Smooth_Err_/. (gray_convert_glyph_inner): Updated accordingly. * src/raster/ftraster.c [STANDALONE_]: Do not abbreviate error macros. (New_Profile, End_Profile, Insert_Y_Turn, Line_Up, Bezier_Up, Decompose_Curve, Draw_Sweep, Render_Single_Pass, ft_black_render): Updated accordingly. 2021-06-22 Dominik Röttsches <drott@chromium.org> [sfnt] s/PaintTransformed/PaintTransform/, s/transformed/transform/. * include/freetype/ftcolor.h (FT_PaintTransformed, FT_PaintFormat, FT_COLR_Paint): Do it to make it harmonize with other names such as 'PaintTranslate'. * src/sfnt/ttcolr.c (read_paint, tt_face_get_paint): Ditto. 2021-06-22 Dominik Röttsches <drott@chromium.org> Move 'COLR' API to `ftcolor.h`. * include/freetype/freetype.h: Cut section layer managament containing 'COLR' v0 and v1 API and move it to `ftcolor.h` as requested by Werner on freetype-devel. * include/freetype/ftcolor.h: Paste that section. 2021-06-19 Werner Lemberg <david@freetype.org> [truetype] Fix integer overflow. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=35312 * src/truetype/ttinterp.c (Ins_JMPR): Use `ADD_LONG`. 2021-06-19 Werner Lemberg <david@freetype.org> [autofit] Prevent hinting if there are too many segments. This speeds up handling of broken glyphs. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=35309 * src/autofit/aflatin.c (af_latin_hints_compute_segments): Implement it. 2021-06-18 Alexei Podtelezhnikov <apodtele@gmail.com> * src/sdf/ftsdfrend.c (ft_(b)sdf_render): Do not FT_ERROR routinely. 2021-06-16 David Turner <david@freetype.org> [autofit] Fix return value of `FT_Load_Glyph`. * src/autofit/afglobal.c (af_face_globals_get_metrics): The issue is that `style_metrics_init` sometimes returns -1 without clearing `error`. While looping to `Again`, the next operation is successful, but -1 is still returned by the function. The fix is to set `error` to 0 appropriately. Fixes #1063. 2021-06-15 David Turner <david@freetype.org> [meson] Add first regression test to FreeType. * tests/README.md: New file that explains how to build and run the tests with the Meson build. * tests/scripts/download-test-fonts.sh: New bash script to download test font files to the `tests/data` folder. * meson.build, meson_options.txt: Add 'tests' option to enable building and running the test programs (disabled by default). * tests/meson.build: New file. * tests/issue-1063/main.c: Simple regression test to exhibit issue 1063. * .gitignore: Ignore the content of the `tests/data` folder for now. 2021-06-12 Alexei Podtelezhnikov <apodtele@gmail.com> [type42] Fix new memory leak. We need to inverse inheritance of FT_GlyphSlot_Internal so that we have a chance to free the rendered bitmap from the parent slot. * src/type42/t42objs.c (T42_GlyphSlot_Init): Remove the internal parts of the child `ttslot' and replace it with the parent structure. (T42_GlyphSlot_Done): Updated accordingly. 2021-06-12 Werner Lemberg <wl@gnu.org> [psaux] Fix another assertion. * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_escCALLOTHERSUBR>: Convert assertion into error, since the problem can happen with invalid user input. Test case is file fuzzing/corpora/legacy/oss-fuzz/5754332360212480-unknown-read in the `freetype2-testing` repository. 2021-06-12 Werner Lemberg <wl@gnu.org> [psaux] Fix assertions. * src/psaux/pshints.c (cf2_hintmap_adjustHints): Check for overflow before emitting an assertion error. Test case is file fuzzing/corpora/legacy/oss-fuzz/4594115297673216-integer-overflow in the `freetype2-testing` repository. 2021-06-09 Alexei Podtelezhnikov <apodtele@gmail.com> * src/truetype/ttinterp.c (TT_RunIns): Optimize tracing. 2021-06-09 Alexei Podtelezhnikov <apodtele@gmail.com> [sdf] Fix SDF positioning. * src/sdf/ftsdfrend.c (ft_sdf_render, ft_bsdf_render): Add padding to `bitmap_top' and `bitmap_left'. * sdf/sdf/ftsdf.c (sdf_generate_with_overlaps): Fix VC++ warning. 2021-06-08 Werner Lemberg <wl@gnu.org> Fix 'devel' build for 'COLR' v1. * devel/ftoption.h: Synchronize with `include/freetype/config/ftoption.h`. 2021-06-08 Werner Lemberg <wl@gnu.org> [sfnt] Sanitize cmap4 table better. Fixes #1062. * src/sfnt/ttcmap.c (tt_cmap4_validate): Handle a too-small value of `length` gracefully. 2021-06-08 Dominik Röttsches <drott@chromium.org> [sfnt] Pointer validity check when reading 'COLR' v1 layers * src/sfnt/ttcolr.c (tt_face_get_paint_layers): In addition to the existing sanity checks, ensure that the pointer to the layer to be read is within the 'COLR' v1 table. 2021-06-08 Werner Lemberg <wl@gnu.org> * src/sdf/ftsdfcommon.c: Fix inclusion of header files. 2021-06-08 Werner Lemberg <wl@gnu.org> [sdf] Make `make multi` work. * src/sdf/ftsdf.c: Include `ftbitmap.h`. * src/sdf/ftsdfcommon.h: Move function bodies to `ftsdfcommon.c`. Include `ftobjs.h` to get definitions of `FT_LOCAL` and friends. * src/sdf/ftsdfcommon.c: New file. * src/sdf/rules.mk, src/sdf/sdf.c: Updated. 2021-06-08 Anuj Verma <anujv@iitbhilai.ac.in> [sdf] Use 8 bits for final SDF output instead of 16bits. Since 8-bits is enough to represent SDF data we no longer require 16-bits for this purpose. Also, we now normalize the output data to use the entire 8-bit range efficiently. For example: if we use 3.5 format with a spread of 1 we basically only use the starting 5-bits. By normalizing we can use the entire 8-bit range. * include/freetype/freetype.h (FT_Render_Mode): Updated description for `FT_RENDER_MODE_SDF` regarding this change. * include/freetype/ftimage.h (FT_Pixel_Mode): Removed `FT_PIXEL_MODE_GRAY16` since no longer required. * include/freetype/fttypes.h (FT_F6Dot10): Removed since no longer required. * src/sdf/ftsdfrend.c (ft_sdf_render, ft_bsdf_render): Allocate 8-bit bitmap instead of 16-bit buffer. * src/sdf/ftsdfcommon.h (map_fixed_to_sdf): Added function to convert 16.16 distance value to our desired format. * src/sdf/ftsdf.c (sdf_generate_with_overlaps, sdf_generate_bounding_box): Use the new `map_fixed_to_sdf` function and also use 8-bit output buffer. * src/sdf/ftbsdf.c (finalize_sdf): Output to a 8-bit buffer instead of 16-bit buffer. 2021-06-02 Ben Wagner <bungeman@chromium.org> Werner Lemberg <wl@gnu.org> [sfnt] Fix fallout from 2021-05-29 change. * src/sfnt/ttcolr.c (find_base_glyph_record, find_base_glyph_v1_record): Adjust binary search. Needs to be updated with change to unsigned. 2021-06-02 Werner Lemberg <wl@gnu.org> * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Fix tracing. Problem reported by Alexei. 2021-06-02 Werner Lemberg <wl@gnu.org> [psaux] Fix MSVC compiler warnings. * src/psaux/afmparse.c (afm_parse_track_kern, afm_parse_kern_pairs): Add cast. 2021-05-29 Werner Lemberg <wl@gnu.org> Fix compilation errors and (some) warnings for clang++. * src/autofit/afmodule.c (AF_GlyphHintsRec): Make it static. * src/cache/ftcache.c (FTC_Cache_NewNode), src/cache/ftcsbits.c (ftc_snode_compare): Remove semicolon. * src/cff/cffparse.c (cff_parser_run): Add `break` statement. * src/cid/cidload.c (cid_hex_to_binary): Add cast. * src/sdf/ftbsdf.c (CHECK_NEIGHBOR): Use `do {} while(0)` loop. (bsdf_init_distance_map, finalize_sdf, bsdf_raster_render): Add casts. * src/sdf/ftsdf.c (sdf_generate_bounding_box, sdf_generate_with_overlaps): Ditto. * src/sdf/ftsdfcommon.h (square_root): Ditto. * src/sdf/ftsdfrend.c (sdf_property_get, ft_sdf_render, ft_bsdf_render): Ditto. * src/sfnt/ttcolr.c (find_base_glyph_record, find_base_glyph_v1_record): Fix variable signedness. (read_color_line): Add cast. (read_paint): Add casts. Fix signedness issue. (tt_face_get_colorline_stops) Fix signedness issues. * src/sfnt/ttpost.c (load_format_20): Add casts. * src/truetype/ttsubpix.c (TWEAK_RULES, TWEAK_RULES_EXCEPTIONS): Remove final semicolons. 2021-05-29 Werner Lemberg <wl@gnu.org> [build] Allow overriding of `ANSIFLAGS` for GNU make build. * builds/*: Implement it. 2021-05-27 Alexei Podtelezhnikov <apodtele@gmail.com> [type42] Fix auto-hinting. The autohinter could not access the base (unscaled) outline in the child TrueType glyph slot. We now share the internal parts between the parent and child glyph slots. Fixes #1057. * src/type42/t42objs.c (T42_GlyphSlot_Init): Remove the internal parts of `T42_GlyphSlot' and replace it with the child TrueType structure. (T42_GlyphSlot_Done): Updated accordingly. 2021-05-25 Werner Lemberg <wl@gnu.org> [psaux] Guard and trace AFM kern data allocation. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=31543 * include/freetype/internal/fttrace.h: Add 'afmparse' trace component. * src/psaux/afmparse.c (FT_COMPONENT): Define. (afm_parse_track_kern, afm_parse_kern_pairs): Protect against allocations bombs. Add tracing. (afm_parse_kern_data): Don't allow multiple kern data sections. 2021-05-23 Alexei Podtelezhnikov <apodtele@gmail.com> * meson.build (ft2_public_headers): Add missing `ftcid.h'. Fixes #1058. 2021-05-20 Alexei Podtelezhnikov <apodtele@gmail.com> [type42] Avoid some memory zeroing. * src/type42/t42objs.c (T42_Open_Face): Tweak allocation macro. * src/type42/t42parse.c (t42_parse_sfnts): Ditto. 2021-05-19 Nikolaus Waxweiler <madigens@gmail.com> [CMake] Update dependency finders. 1. Fixes CMake using any found HarfBuzz version lower than the minimum required. This is based on HALX99's merge request at https://gitlab.freedesktop.org/freetype/freetype/-/merge_requests/31 2. Update FindHarfBuzz.cmake from https://github.com/WebKit/WebKit/blob/1ce32454/Source/cmake/FindHarfBuzz.cmake and guard post-CMake-3.1 features to keep the minimum version unchanged 3. Update FindBrotliDec.cmake to stop the warnings, based on what https://github.com/google/woff2/blob/a0d0ed7d/cmake/FindBrotliDec.cmake is doing * CMakeLists.txt, builds/cmake/FindHarfBuzz.cmake: Implement 1 and 2. * builds/cmake/FindBrotliDec.cmake: Implement 3. 2021-05-19 Ben Wagner <bungeman@chromium.org> [gzip] Use exact type for `ft_gzip_alloc` and `ft_gzip_free`. While a function pointer may be cast to another function pointer type, it is required to cast the function pointer back to the original function pointer type before calling it. If a parameter is a pointer the exact pointer type is required. Using a pointer to a different underlying type is technically undefined behavior. The wrapper functions `ft_gzip_alloc` and `ft_gzip_free` took `FT_Memory` (a `FT_MemoryRec_*`) instead of `voidpf` (`void*`), so when gzip calls these callbacks through `alloc_func` or `free_func` it invokes undefined behavior. On most platforms this works out as expected, but newer undefined behavior detectors and targets like wasm can detect this and will produce an error. * src/gzip/ftgzip.c (ft_gzip_alloc, ft_gzip_free): Update signatures to exactly match `alloc_func` and `free_func`, respectively. Internally, cast the `void*` opaque pointer to `FT_Memory`. 2021-05-18 Alexei Podtelezhnikov <apodtele@gmail.com> Prioritize the anti-aliasing renderer module. * modules.cfg: Reorder the renderers. * include/freetype/config/ftmodule.h: Ditto. 2021-05-16 Alexei Podtelezhnikov <apodtele@gmail.com> [sfnt] Additional guards on the POST table. Fixes timeout (#1055) analyzed by Ben Wagner, reported as https://crbug.com/1194092 * src/sfnt/ttload.c (tt_face_load_post): Check POST format. * src/sfnt/sfobjs.c (sfnt_load_face): Synthesize the missing unicode charmap only if the glyph names exist. * src/psnames/psmodule.c (ps_unicode_value): Short cut ".notdef" and ".null". 2021-05-13 Daniel McArdle <dmcardle@chromium.org> [psaux] Use doubling allocation strategy for CF2_ArrStack. Fixes timeout reported as https://crbug.com/1206181 * src/psaux/psarrst.c (cf2_arrstack_{push,init}): Implement it. * src/psaux/psarrst.h (CF2_ArrStackiRec): Drop `chunk'. 2021-05-12 Alexei Podtelezhnikov <apodtele@gmail.com> * src/smooth/ftgrays.c (FT_MAX_GRAY_SPANS): Increase from 10 to 16. Ten was barely enough for two slanted stems. Sixteen can actually fit a bit more complicated scanlines. 2021-05-11 Alexei Podtelezhnikov <apodtele@gmail.com> * src/smooth/ftgrays.c (FT_GRAY_SET): Adjust for better code. 2021-05-11 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Faster bitmap sweeping. Selecting the fill rule or checking the direct mode each time we call `gray_hline' is sub-optimal. This effectively splits the direct mode into a separate code path while inlining `gray_hline' and saving 5-7% of rendering time. * src/smooth/ftgrays.c (gray_hline): Eliminated in favor of... (FT_FILL_RULE, FT_GRAY_SET): ... these new macros... (gray_sweep): ... inlined here. (gray_sweep_direct): New function that handles the direct span buffer. (gray_TWorker): Remove the span buffer. (gray_raster_render, gray_convert_glyph): Updated. 2021-05-10 Alexei Podtelezhnikov <apodtele@gmail.com> * src/smooth/ftgrays.c (gray_hline): Simplify even-odd computations. It is too bad the even-odd rule is not used much. 2021-05-07 Alexei Podtelezhnikov <apodtele@gmail.com> [type1] Avoid MM memory zeroing. * src/type1/t1load.c (t1_allocate_blend, parse_blend_design_map): Tweak allocation macros. * src/type1/t1objs.c (T1_Face_Done): Minor. 2021-05-07 Alexei Podtelezhnikov <apodtele@gmail.com> * src/bdf/bdflib.c (_bdf_list_ensure): Tweak allocation macro. 2021-05-06 Alexei Podtelezhnikov <apodtele@gmail.com> * src/psaux/psobjs.c (ps_parser_load_field): Tweak allocation macro. 2021-05-06 Alexei Podtelezhnikov <apodtele@gmail.com> * src/sfnt/sfobjs.c (sfnt_load_face): Tweak allocation macro. 2021-05-06 Alexei Podtelezhnikov <apodtele@gmail.com> * src/cid/cidload.c (cid_read_subrs): Tweak allocation macro. 2021-05-06 Alexei Podtelezhnikov <apodtele@gmail.com> * src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Tweak allocation. 2021-05-05 Alexei Podtelezhnikov <apodtele@gmail.com> [cff,psaux] Avoid memory zeroing (contd.). * src/cff/cffload.c (cff_blend_doBlend, cff_blend_build_vector): Tweak allocation macros. * src/psaux/psarrst.c (cf2_arrstack_setNumElements): Ditto. * src/psaux/psstack.c (cf2_stack_init): Ditto. 2021-05-04 Ben Wagner <bungeman@chromium.org> * src/cid/cidload.c (cid_hex_to_binary): Improve return value. Add argument to return the actual number of bytes that were decoded. The actual number of bytes decoded can be quite variable depending on the number of ignored 'whitespace' bytes or early termination with `>`. (cid_face_open): Updated to use this calculated value. This avoids trusting `parser->binary_length` is always be correct and reading uninitialized bits if fewer are actually decoded. First reported as https://crbug.com/1203240 2021-05-03 Alexei Podtelezhnikov <apodtele@gmail.com> [sfnt] Streamline POST format 2.0 handing. To reduce memory allocations, we read an entire Pascal-string buffer and convert it to a C-string buffer. We also reject tables with Postscript glyph names exceeding 63 bytes. * src/sfnt/ttpost.c (load_format20): Implement it. (load_post_names): Check the minimal POST table size. (load_format25, tt_face_free_ps_names): Updated accordingly. 2021-05-02 Alexei Podtelezhnikov <apodtele@gmail.com> [bdf,pcf] Avoid memory zeroing (contd.). * src/bdf/bdflib.c (bdf_create_property, _bdf_add_comment, _bdf_add_property, bdf_load_font): Tweak allocation macros. * src/pcf/pcfread.c (pcf_get_properties, pcf_get_metrics): Ditto. 2021-05-01 Alexei Podtelezhnikov <apodtele@gmail.com> * src/cid/cidload.c (cid_read_subrs): Tweak allocaton macro. 2021-05-01 Alexei Podtelezhnikov <apodtele@gmail.com> [sfnt] Avoid some memory zeroing. * src/sfnt/sfobjs.c (sfnt_open_font, sfnt_init_face, tt_name_ascii_from_{utf16,other}): Tweak allocaton macros. * src/sfnt/ttload.c (tt_face_load_name): Ditto. 2021-05-01 Alexei Podtelezhnikov <apodtele@gmail.com> * src/sfnt/ttpost.c (load_format_{20,25}): Tweak allocaton macros. 2021-05-01 Alexei Podtelezhnikov <apodtele@gmail.com> * src/sfnt/pngshim.c (Load_SBit_Png): Tweak allocaton macro. 2021-05-01 Alexei Podtelezhnikov <apodtele@gmail.com> [truetype] Avoid some memory zeroing. * src/truetype/ttinterp.c (Init_Context): Tweak allocation macro. * src/truetype/ttpload.c (tt_face_load_cvt): Ditto. 2021-05-01 Alexei Podtelezhnikov <apodtele@gmail.com> [woff2] Avoid some memory zeroing. * src/sfnt/sfwoff2.c (store_loca, woff2_open_font): Tweak macros. 2021-04-30 Alexei Podtelezhnikov <apodtele@gmail.com> * src/gzip/ftgzip.c (ft_gzip_alloc): Zero out memory again. 2021-04-27 Alexei Podtelezhnikov <apodtele@gmail.com> [lzw] Preserve decompression stack when relocating to heap. * src/lzw/ftzopen.c (ft_lzwstate_stack_grow): Copy stack when relocating to heap. 2021-04-27 Alexei Podtelezhnikov <apodtele@gmail.com> * src/cid/cidgload.c (cid_load_glyph): Restore the glyph_length check. 2021-04-27 Werner Lemberg <wl@gnu.org> * src/psmodule.c (ps_unicodes_init): Ignore empty glyph names. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=33637 2021-04-26 Alexei Podtelezhnikov <apodtele@gmail.com> * src/sfnt/sfobjs.c (sfnt_init_face): Revert macro change. 2021-04-26 Alexei Podtelezhnikov <apodtele@gmail.com> [cff] Avoid some memory zeroing. * src/cff/cffparse.c (cff_parser_init): Tweak memory macro. * src/cff/cffload.c (cff_index_load_offsets, cff_index_get_pointers, cff_charset_load, cff_vstore_load): Ditto. 2021-04-26 Alexei Podtelezhnikov <apodtele@gmail.com> [pfr] Avoid some memory zeroing. * src/pfr/pfrobjs.c (pfr_face_init) : Tweak memory macro. * src/pfr/pfrload.c (pfr_extra_item_load_stem_snaps, pfr_phy_font_load): Ditto. 2021-04-26 Alexei Podtelezhnikov <apodtele@gmail.com> * src/winfonts/winfnt.c (FNT_Face_Init): Tweak memory macro. 2021-04-26 Alexei Podtelezhnikov <apodtele@gmail.com> [psaux,psnames] Avoid some memory zeroing. * src/psaux/psstack.c (cf2_stack_init): Tweak memory macro. * src/psnames/psmodule.c (ps_unicodes_init): Ditto. 2021-04-25 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Avoid some memory zeroing. * src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Use FT_QNEW_ARRAY. * src/base/ftsnames.c (FT_Get_Sfnt_{Name,LangTag}): Ditto. 2021-04-25 Alexei Podtelezhnikov <apodtele@gmail.com> [bdf,pcf] Avoid some memory zeroing. * src/pcf/pcfread.c (pcf_read_TOC, pcf_get_properties, pcf_load_font): Tweak memory macros. * src/bdf/bdfdrivr.c (BDF_Face_Init): Ditto. * src/bdf/bdflib.c (_bdf_readstreami, bdf_create_property, _bdf_parse_glyphs, _bdf_parse_start): Ditto. (_bdf_add_property): Do not handle zero size. 2021-04-25 Issam E. Maghni <issam.e.maghni@mailbox.org> * builds/meson/process_ftoption_h.py: Add LF at EOF. This fixes .../ftoption.h:1030:10: error: no newline at end of file [-Werror,-Wnewline-eof] for the generated `ftoption.h` file. 2021-04-24 Alexei Podtelezhnikov <apodtele@gmail.com> * src/cff/cffload.c (cff_index_get_pointers): s/FT_QALLOC/FT_ALLOC/. 2021-04-23 Alexei Podtelezhnikov <apodtele@gmail.com> * src/base/ftobjs.c (Mac_Read_POST_Resource): s/FT_ALLOC/FT_QALLOC/. * builds/mac/ftmac.c (FT_New_Face_From_SFNT, read_lwfn): Ditto. 2021-04-23 Alexei Podtelezhnikov <apodtele@gmail.com> * src/sdf/ftsdf.c (sdf_{edge,contour,shape}_new): Use FT_QALLOC. 2021-04-23 Alexei Podtelezhnikov <apodtele@gmail.com> [sfnt] s/FT_ALLOC/FT_QALLOC/ for initialized buffers. * src/sfnt/sfdriver.c (get_win_string, get_apple_string, sfnt_get_var_ps_name): Do not zero out the buffer. * src/sfnt/sfobjs.c (sfnt_init_face): Ditto. * src/sfnt/sfwoff.c (woff_open_font): Ditto. * src/sfnt/sfwoff2.c (woff2_open_font): Ditto. 2021-04-23 Alexei Podtelezhnikov <apodtele@gmail.com> [cff,type1,type42] s/FT_ALLOC/FT_QALLOC/ for initialized buffers. * src/cff/cffload.c (cff_index_get_pointers, cff_index_get_name): Do not zero out the buffer. * src/cff/cffdrivr.c (cff_ps_get_font_info): Ditto. * src/type1/t1load.c (parse_subrs, parse_charstrings, parse_blend_axis_types): Ditto. * src/type1/t1parse.c (T1_New_Parser, T1_Get_Private_Dict): Ditto. * src/type42/t42parse.c (t42_parser_init): Ditto. 2021-04-23 Alexei Podtelezhnikov <apodtele@gmail.com> [cid] s/FT_ALLOC/FT_QALLOC/ and clean up. * src/cid/cidgload.c (cid_load_glyph): Do not zero out the buffer. * src/cid/cidload.c (cid_face_open, cid_read_subrs): Ditto. 2021-04-23 Alexei Podtelezhnikov <apodtele@gmail.com> [pfr] s/FT_ALLOC/FT_QALLOC/ for initialized buffers. * src/pfr/pfrload.c (pfr_extra_item_load_font_id, pfr_aux_name_load): Do not zero out the buffer. 2021-04-23 Alexei Podtelezhnikov <apodtele@gmail.com> [bzip2,gzip] s/FT_ALLOC/FT_QALLOC/ for initialized buffers. * src/bzip2/ftbzip2.c (ft_bzip2_alloc): Do not zero out the buffer. * src/gzip/ftgzip.c (ft_gzip_alloc, FT_Stream_OpenGzip): Ditto. 2021-04-23 Alexei Podtelezhnikov <apodtele@gmail.com> [pcf,bdf,winfonts] s/FT_ALLOC/FT_QALLOC/ for initialized buffers. * src/pcf/pcfread.c (pcf_interpret_style): Do not zero out the buffer. * src/bdf/bdfdrivr.c (bdf_interpret_style): Ditto. * src/winfonts/winfnt.c (FNT_Face_Init, FNT_Load_Glyph): Ditto. 2021-04-22 Alexei Podtelezhnikov <apodtele@gmail.com> [cache] Optimize SBit copying. * src/cache/ftcsbits.c (ftc_snode_load): Do not initialize the buffer. (ftc_sbit_copy_bitmap): Accept zero size, s/FT_ALLOC/FT_QALLOC/. 2021-04-22 Alexei Podtelezhnikov <apodtele@gmail.com> [gxvalid,otvalid] s/FT_ALLOC/FT_QALLOC/ for initialized buffers. * src/gxvalid/gxvmod.c (gxv_load_table): Do not zero out the buffer. * src/otvalid/otvmod.c (otv_load_table): Ditto. 2021-04-22 Alexei Podtelezhnikov <apodtele@gmail.com> [psaux] s/FT_ALLOC/FT_QALLOC/ for initialized buffers. * src/psaux/psobjs.c (ps_table_done, ps_parser_load_field): Do not zero out the buffer. 2021-04-22 Alexei Podtelezhnikov <apodtele@gmail.com> [base] s/FT_ALLOC/FT_QALLOC/ for initialized buffers. * src/base/ftobjs.c (open_face_PS_from_sfnt_stream, Mac_Read_sfnt_Resource): Do not zero out the buffer. * src/base/ftmac.c (FT_New_Face_From_SFNT, read_lwfn): Ditto. * src/base/ftrfork.c (raccess_make_file_name, raccess_guess_darwin_hfsplus, raccess_guess_darwin_newvfs): Ditto. 2021-04-20 Alexei Podtelezhnikov <apodtele@gmail.com> [cache] Restore SBit copying for unowned (BDF) bitmaps. * src/cache/ftcsbits.c (ftc_sbit_copy_bitmap): Restore. (ftc_snode_load): Check ownership and copy unowned bitmaps. 2021-04-19 Dominik Röttsches <drott@chromium.org> [sfnt] Return in 'COLR' v1 when layer pointer outside table * src/sfnt/ttcolr.c (tt_face_get_paint_layers): Add missing return when paint pointer outside table. (read_paint): Add missing return when paint pointer outside table. 2021-04-18 Alexei Podtelezhnikov <apodtele@gmail.com> [cache] Switch to lazy SBit setting. * src/cache/ftcsbits.c (ftc_sbit_copy_bitmap): Removed. (ftc_snode_load): Take the bitmap ownership instead of copying. 2021-04-16 Daniel Welty <@danielwelty> * src/cache/ftcsbits.c (ftc_snode_load): Properly handle short pitch. 2021-04-16 Werner Lemberg <wl@gnu.org> * builds/unix/freetype2.m4: Fix help string formatting. The indented `dnl` macros inserted unwanted horizontal space. Problem reported by Ozkan Sezer <sezeroz@gmail.com>. 2021-04-16 Dominik Röttsches <drott@chromium.org> [sfnt] Safeguard 'COLR' v1 layer extraction * src/sfnt/ttcolr.c (tt_face_get_paint_layers): Do not output layer pointer to iterator if it is outside the 'COLR' table. (read_paint): Do not attempt to read layers that are outside the table. 2021-04-02 Ben Wagner <bungeman@chromium.org> [base] Complete `ft_glyphslot_clear`. * src/base/ftobjs.c (ft_glyphslot_clear): This function is intended to reset all the values of a glyph slot. However, it was not resetting the values of the advances and `glyph_index`. Reset the advances and `glyph_index` to zero. 2021-04-02 Ben Wagner <bungeman@chromium.org> [truetype] Prevent glyph program state from persisting. `FDEF` instructions are specified as allowed only in 'prep' or 'fpgm'. FreeType has attempted to prevent their use in the glyph program, but they were still allowed in glyph programs if defined in a function defined in 'prep' or 'fpgm' and called from the glyph program. Similarly, `IDEF` instructions are specified not to be able to modify any existing instruction. FreeType has attempted to prevent their use in the glyph program, but they can still be used like `FDEF`. This change stores the initial bytecode range type and disallows the use of `FDEF` and `IDEF` while running the glyph program. Most other state is copied from the `TT_Size` into the execution context. However, it is possible for a glyph program to use `WS` to write to the storage area or `WCVTP`, `WCVTF`, and `DELTAC[123]` to write to the control value table. Allowing any change to the global state from the glyph program is problematic as the outlines of any given glyph may change based on the order the glyphs are loaded or even how many times they are loaded. There exist fonts that write to the storage area or the control value table in the glyph program, so their use should not be an error. Possible solutions to using these in the glyph program are * ignore the writes; * value-level copy on write, discard modified values when finished; * array-level copy on write, discard the copy when finished; * array-level copy up-front. Ignoring the writes may break otherwise good uses. A full copy up-front was implemented, but was quite heavy as even well behaved fonts required a full copy and the memory management that goes along with it. Value-level copy on write could use less memory but requires a great deal more record keeping and complexity. This change implements array-level copy on write. If any attempt is made to write to the control value table or the storage area when the initial bytecode range was in a glyph program, the relevant array will be copied to a designated storage area and the copy used for the rest of the glyph program's execution. * src/truetype/ttinterp.h (TT_ExecContextRec): New fields `iniRange`, `glyfCvtSize`, `glyfCvt`, `origCvt`, `glyfStoreSize`, `glyfStorage`, and `origStorage`. * src/truetype/ttinterp.c (Modify_CVT_Check): New function to handle `exc->glyfCvt`. (Write_CVT, Write_CVT_Stretched, Move_CVT, Move_CVT_Stretched): Use it. (Ins_WS): Handle `exc->glyfStorage`. (Ins_FDEF, Ins_IDEF): Updated. (TT_RunIns): Updated. (TT_Done_Context): Free 'glyf' CVT working and storage area. (TT_Load_Context): Fix/add casts. * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Fix cast. 2021-03-30 Dominik Röttsches <drott@chromium.org> [sfnt] Check validity of pointer location of `read_color_line`. * src/sfnt/ttcolr.c (get_child_table_pointer): New function to fetch child table pointer early for all paint formats that compute a child table pointer. (read_color_line, read_paint): Updated. (tt_face_get_colorline_stops): Check `colr->table`. 2021-03-28 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> [docs] Update docwriter stylesheet for 1.3.1. This change is required to support docwriter 1.3.1. See https://gitlab.freedesktop.org/freetype/docwriter/-/merge_requests/101 for more information. * docs/markdown/stylesheets/extra.css: (.wy-nav-content, .md-sidebar--secondary): Remove. 2021-03-16 Alexei Podtelezhnikov <apodtele@gmail.com> * src/sfnt/pngshim.c (Load_SBit_Png): Free `rows` once later. 2021-03-16 Ben Wagner <bungeman@google.com> [sfnt] Fix memory leak in png loading. Reported as https://bugs.chromium.org/p/chromium/issues/detail?id=1182552 Memory is allocated and the pointer assigned to `rows` inside a 'setjmp' scope. This memory must be freed outside the 'setjmp' scope after a 'longjmp'. Since `rows` is a local and modified inside the 'setjmp' scope it must be marked volatile or it will have an indeterminate value after the 'longjmp'. * src/sfnt/pngshim.c (Load_SBit_Png): Fix memory leak of `rows`. 2021-03-16 Christopher Degawa <ccom@randomderp.com> * CMakeLists.txt: Don't limit generation of 'pkg-config' file to UNIX. mingw-w64 uses the 'pkg-config' files but does not set UNIX. 2021-03-11 Alexei Podtelezhnikov <apodtele@gmail.com> * src/smooth/ftgrays.c (gray_set_cell): Refactor to fix VC++ warning. 2021-03-13 Werner Lemberg <wl@gnu.org> Handle various VC++ compiler warnings. Fixes #1039. * src/base/ftstroke.c (ft_stroker_inside, ft_stroker_outside): Initialize `sigma`. * src/sdf/ftsdf.c (sdf_generate_with_overlaps): Exit immediately if function arguments are invalid. * src/sdf/ftsdfrend.c (sdf_property_set) <"overlaps">: Fix cast. * src/sfnt/sfwoff2.c (woff2_decompress) [!FT_CONFIG_OPTION_USE_BROTLI]: Use `FT_UNUSED`. * src/truetype/ttgxvar.c (TT_Get_MM_Var): Initialize `fvar_head`. 2021-03-11 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Reduce copying during integration phase. We now record `cover' and `area' directly into the linked list. This makes rendering faster by 10% or even more at larger sizes. * src/smooth/ftgrays.c (FT_INTEGRATE): Write directly. (gray_TWorker): Add direct cell reference and remove unused fields. (gray_set_cell): Consolidate the linked list management and pointers. (gray_convert_glyph, gray_convert_glyph_inner): Updated. 2021-03-10 Alexei Podtelezhnikov <apodtele@gmail.com> * src/smooth/ftgrays.c (FT_INTEGRATE): New convenience macro. (gray_render_line, gray_render_scanline): Use it. 2021-03-09 Alexei Podtelezhnikov <apodtele@gmail.com> * src/smooth/ftgrays.c (gray_render_line): Rearrange conditionals. These produce faster or more optimizable code. 2021-03-08 Tim-Philipp Müller <tim@centricular.com> [meson] Fix 'mmap' handling on Windows. * meson.build (ft2_sources): Always use `windows/ftsystem.c` on Windows unless mmap has been disabled. https://gitlab.freedesktop.org/freetype/freetype/-/merge_requests/5#note_829289 2021-03-07 Tim-Philipp Müller <tim@centricular.com> [ci] Add basic support for Meson builds with MSVC on Windows. This adds meson jobs for VS2017 (x86 and x86_64). * .gitlab-ci.yml: New file. 2021-03-07 Tim-Philipp Müller <tim@centricular.com> [meson] Add subproject fallbacks for 'libpng' and 'zlib'. * subprojects/libpng.wrap, subprojects/zlib.wrap: New files. * meson.build: Updated. 2021-03-07 Xavier Claessens <xavier.claessens@collabora.com> [meson] Make it work with Windows. * meson.build: Do not process `ftconfig.h` when not using `ftconfig.h.in`. Fixes #1029. 2021-02-25 Werner Lemberg <wl@gnu.org> [woff2] Fix memory leak. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28148 * src/sfnt/sfwoff2.c (woff2_open_font): Reject fonts that have multiple tables with the same tag. While not explicitly forbidden in the OpenType specification, it is implicitly forbidden by describing a binary search algorithm for tables that only works reliably if table tags are unique. 2021-02-22 Werner Lemberg <wl@gnu.org> * CMakeLists.txt: Update location of `LICENSE.TXT`. Fixes #1035. 2021-02-19 Werner Lemberg <wl@gnu.org> * builds/unix/ax_pthread.m4: Update from 'autoconf-archive'. A bunch of fixes were added recently to its git repository. 2021-02-17 Werner Lemberg <wl@gnu.org> [unix] Updates for autoconf 2.71. This fixes warnings reported by autoupdate. * builds/unix/ax_pthread.m4: Replace `as_echo` with `AS_ECHO`. * builds/unix/configure.raw: Remove obsolete `AC_HEADER_STDC`. Don't escape back quotes in messages for `AC_MSG_WARN`. 2021-02-16 Werner Lemberg <wl@gnu.org> * builds/toplevel.mk: Fix previous commit. <top_level>: Use `TOP_DIR` in `wildcard` function. (check_out_submodule, copy_submodule): Move down to come after definition of `all` rule. Call `mkdir` conditionally. 2021-02-16 Werner Lemberg <wl@gnu.org> * builds/toplevel.mk: Use rules for handling 'dlg'. Suggested by Alexei. (check_out_submodule, copy_submodule): New targets. <top-level>: Replace calls to `shell` with rules. 2021-02-16 Werner Lemberg <wl@gnu.org> * builds/toplevel.mk: Avoid side effects of `shell`. We use a dummy variable to catch its output. Otherwise the `make` program is going to interpret the return value of `shell`; this can cause obscure warning or error messages or even be harmful. 2021-02-16 Werner Lemberg <wl@gnu.org> Move 'dlg' submodule to `subprojects` directory. This is for future changes with Meson, which doesn't allow a different name for its `subprojects` directory. Having both a `submodules` and a `subprojects` directory is confusing. * .gitmodules, autogen.sh (copy_submodule_files, DLG_INC_DIR, DLG_SRC_DIR): Updated. * builds/toplevel.mk (<top-level>, do-dist), builds/windows/vc2010/script.bat: Updated. * src/tools/no-copyright: Updated. 2021-02-16 Dominik Röttsches <drott@chromium.org> [sfnt] Update paint format values to support non-variable paints. * freetype.h (FT_PaintFormat): Update paint format identifiers after a specification change. The specification was updated to have sibling formats, variable and non-variable variants for each. Reflect that here. * sfnt/ttcolr.c (read_paint): Remove parsing of variable indices as the non-variable formats no longer have them. 2021-02-15 Daniel E <daniel.engberg.lists@pyret.net> * CMakeLists.txt: Improve 'bz2' support. Not all distributions such as FreeBSD provide a `.pc` file for '(lib)bz2' so follow autotools and add it to `Libs.private` instead. 2021-02-13 Werner Lemberg <wl@gnu.org> * src/tools/update-copyright-year: Fix single-year entry handling. The fix from 2021-01-17 didn't cover the case where the year to be updated is identical to the current year. 2021-02-13 Werner Lemberg <wl@gnu.org> Add new function `FT_Get_Transform`. See https://github.com/harfbuzz/harfbuzz/issues/2428 for some reasons to introduce this function. * include/freetype/freetype.h, src/base/ftobjs.c (FT_Get_Transform): Implement it. 2021-02-12 Alexei Podtelezhnikov <apodtele@gmail.com> Decorate `qsort` callbacks with `cdecl`. * include/freetype/internal/compiler-macros.h (FT_COMPARE_DEF): Add new macro. * src/base/ftrfork.c, src/bdf/bdflib.c, src/gxvalid/gxvcommn.c, src/psaux/afmparse.c, src/psnames/psmodule.c, src/type1/t1afm.c, src/sfnt/sfwoff.c, src/sfnt/sfwoff2.c: Update `qsort` callbacks. Fixes #1026 when compiling FreeType with an unusual calling convention while the C library function `qsort` still expects `cdecl`. 2021-02-10 Dominik Röttsches <drott@chromium.org> [sfnt] Implement 'COLR' v1 sweep gradients. * freetype.h (FT_PaintSweepGradient): Add `FT_PaintSweepGradient` to represent a 'COLR' v1 sweep gradient. Update format. (FT_PaintFormat): Update shifted paint formats. Sync with spec. * sfnt/ttcolr.c (read_paint): Logic to parse sweep gradients. Fix struct access in radial gradient implementation. 2021-02-09 Dominik Röttsches <drott@chromium.org> [sfnt] Provide optional root transform for 'COLR' v1 glyph graph. * include/freetype/freetype.h (FT_Get_Color_Glyph_Paint): Additional function argument `root_transform` to control whether root transform should be returned. (FT_OpaquePaint): Additional tracking field to denote whether root transform is to be returned. * include/freetype/internal/sfnt.h (TT_Get_Color_Glyph_Paint_Func): Propagate additional argument. * src/base/ftobjs.c (FT_Get_Color_Glyph_Paint): Ditto. * src/sfnt/ttcolr.c (tt_face_get_colr_glyph_paint): Return root transform reflecting the size and tranform configured on `FT_Face`. (read_paint): Initialize and track status of insert_root_transform flag. 2021-02-09 Xavier Claessens <xavier.claessens@collabora.com> * meson.build: s/freetype2_dep/freetype_dep/. Many projects (e.g., fontconfig, cairo) hardcode the `freetype_dep` variable name to use FreeType as subproject because that was the variable name in Centricular's Meson port of FreeType. While they should stop hardcoding that variable name, it does not cost us anything to keep using that name to ease transition. 2021-02-09 Xavier Claessens <xavier.claessens@collabora.com> [meson] Fix handling of HarfBuzz library. * meson.build (harfbuzz_dep): Do not fall back to HarfBuzz by default. Otherwise it causes a dependency cycle: cairo => fontconfig => freetype2 => harfbuzz => cairo Meson will still fall back to HarfBuzz subprojects if the `harfbuzz` option is set to `enabled` instead of `auto` and a `subprojects/harfbuzz.wrap` file is present. In that case it is the responsibility of the main project to set the proper options on each subproject to break the dependency cycle. Fixes: #1028. 2021-02-09 Xavier Claessens <xavier.claessens@collabora.com> [meson] Fix dependency lookup and generate `ftconfig.h`. - zlib: If not found on the system, meson can build it as a subproject. We thus never use the (outdated) zlib support that comes with FreeType. Doing so has the additional advantage that the zlib code can be shared with other projects like GLib if both are subprojects of an application. - harfbuzz: Build as a subproject if not found on the system. - 'QUESTION: What if the compiler doesn't support `-D` but uses `/D` instead as on Windows?' Answer: Meson translate arguments for us. - visibility: Replace self-made code with meson-specific solution. * meson.build (ft2_defines): Rewrite logic to set and handle it. (process_header_command): New variable, previously called `ftoption_command`. (ftoption_command, ftconfig_command): New variables. (zlib_option): Removed. (zlib_dep): New variable. (ft2_deps): Updated. (harfbuzz_dep): Updated. (ftconfig_h_in, ftconfig_h): New variables. (ft2_sources): Updated. (ft2_lib): Updated, handle visibility. (summary): Updted. * meson_options.txt (zlib): Updated. 2021-02-09 Xavier Claessens <xavier.claessens@collabora.com> * meson.build: Fix resource compilation on Windows. This is copied from GStreamer's meson port of FreeType. (ft2_sources): Add both debug and resource file (the latter for Windows only). (ft2_debug_src): Removed. 2021-02-09 Xavier Claessens <xavier.claessens@collabora.com> * meson.build: s/ft2_libtool_version/ft2_pkgconfig_version/. (freetype2_dep): Use it. `ft2_libtool_version` would be the shared library version, not the one we should use in file `freetype2.pc`. 2021-02-09 Xavier Claessens <xavier.claessens@collabora.com> * meson.build: Use `meson.override_dependency`. This is a new meson mechanism to avoid other projects to hard-code the `freetype2_dep` variable name in their build definition. It also ensures that meson does not mix system and subproject versions of FreeType inside of the same project. Also remove outdated TODO because `declare_dependency` was already there. 2021-02-09 Xavier Claessens <xavier.claessens@collabora.com> * meson.build (bzip2_dep): Simplify. We remove `static:false` from `find_library('bz2')`. I don't know whether the previous code was a workaround for an old meson bug, but at least with version >=0.55.0 (which FreeType uses) it picks the shared library when both are available. File `freetype2.pc` still contains the full path to file `libbz2.so` instead of `-lbz2` – that we need to do this is a meson bug even present in the current version (0.57.0). 2021-02-09 Xavier Claessens <xavier.claessens@collabora.com> * meson.build: Set project version. 2021-02-04 Werner Lemberg <wl@gnu.org> [base] Fix Netpbm tracing message. * src/base/ftobjs.c (FT_Render_Glyph_Internal): Don't emit Netpbm warning if there is nothing to output. 2021-02-04 Werner Lemberg <wl@gnu.org> * src/*: Don't use more than one '\n' in `FT_TRACE` and `FT_ERROR`. This ensures good logging output, with all lines having a proper prefix (if requested). This is a continuation of a similar patch from 2020-12-02, which missed some locations. 2021-02-03 Alexei Podtelezhnikov <apodtele@gmail.com> * builds/unix/configure.raw [mmap]: Restore default path. Fixes #1023. 2021-02-03 Werner Lemberg <wl@gnu.org> [psaux] Fix integer overflow. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=30154 * src/psaux/psblues.c (cf2_blues_capture): Use `SUB_INT32`. 2021-02-02 Alexei Podtelezhnikov <apodtele@gmail.com> * builds/unix/configure.raw [mmap support]: Explicitly handle Windows. Fixes #1024. 2021-01-31 Werner Lemberg <wl@gnu.org> * builds/unix/configure.raw [mmap support]: Correctly handle Windows. Fixes #1024. 2021-01-31 Werner Lemberg <wl@gnu.org> * builds/windows/ftdebug.c: Synchronize with `src/base/ftdebug.c`. 2021-01-31 Werner Lemberg <wl@gnu.org> Always provide logging API. It's easier to have stubs if FT_DEBUG_LOGGING is undefined than to modify `ftexport.sym` conditionally. Problem reported by Alexei. * src/base/ftdebug.c: Include `ftlogging.h`. (FT_Trace_Set_Level, FT_Trace_Set_Default_Level, FT_Set_Log_Handler, FT_Set_Default_Log_Handler) [!FT_DEBUG_LOGGING]: Provide stubs. 2021-01-31 Werner Lemberg <wl@gnu.org> * builds/unix/configure.raw: Fix typo. Bug introduced in Vincent's last commit bb33f03. Fixes issue #1021. 2021-01-27 Alexei Podtelezhnikov <apodtele@gmail.com> * src/base/ftstroke.c (FT_Stroker_EndSubPath): Ignore tiny gaps. Fixes bug #1020. 2021-01-27 Alexei Podtelezhnikov <apodtele@gmail.com> [stroker] Minor clean-up. * src/base/ftstroke.c (FT_Stroker_{ConicTo,CubicTo}): Reset the last line length. (FT_Stroker_EndSubPath): Call `ft_stroker_process_corner'. 2021-01-27 Vincent Torri <vincent.torri@gmail.com> * builds/windows/ftsystem.c: Add shared memory support on Windows. * CMakeLists.txt (BASE_SRCS), builds/unix/configure.raw (FTSYS_SRC), builds/windows/vc2010/freetype.vcxproj, builds/windows/visualc/freetype.vcproj, meson.build (ft2_sources): Add it (conditionally). 2021-01-23 Werner Lemberg <wl@gnu.org> Require HarfBuzz 2.0.0. This is needed to make commit f1f9705f9 work. * CMakeLists.txt (HARFBUZZ_MIN_VERSION), builds/unix/configure.raw (harfbuzz_pkg), meson.build (harfbuzz_dep): Updated. 2021-01-22 Alexei Podtelezhnikov <apodtele@gmail.com> * autogen.sh: Absorb `version.sed'. * version.sed: Removed. 2021-01-19 Alexei Podtelezhnikov <apodtele@gmail.com> * srd/base/ftlcdfil.c (FT_Library_SetLcdGeometry): Fix return value. 2021-01-15 Nikolaus Waxweiler <madigens@gmail.com> [afshaper] Fix hb_ot_tags_from_script deprecation warning. * autofit/afshaper.c (af_shaper_get_coverage): Copy the source code of the function as suggested in https://github.com/harfbuzz/harfbuzz/issues/2737 and adjust to handle at most three tags. 2021-01-17 Werner Lemberg <wl@gnu.org> * src/tools/update-copyright-year: Fix single-year entry handling. 2021-01-16 Alexei Podtelezhnikov <apodtele@gmail.com> * builds/unix/unixddef.mk: Remove the second DEVEL_DIR definition. 2021-01-14 Dominik Röttsches <drott@chromium.org> [sfnt] Additional checks for 'colr' table presence. * sfnt/ttcolr.c (tt_face_get_colr_glyph_paint, tt_face_get_colorline_stops, tt_face_get_paint): Additional checks for whether colr table is present. Prevents crashes when these methods are called on non-COLR fonts. 2021-01-13 Dominik Röttsches <drott@chromium.org> Add config option to test for 'COLR' v1 support in headers. * include/freetype/config/ftoption.h (TT_SUPPORT_COLRV1): New macro so that clients can test whether the FreeType checkout that they are building against supports the 'COLR' v1 API. This is intended to be a temporary solution until 'COLR' v1 support is released in a FreeType version and such a check can be made by using the version number instead. 2020-12-16 Dominik Röttsches <drott@chromium.org> [base] Fill 'COLR' v1 API templates to make them work (#59703). * src/base/ftobjs.c (FT_Get_Color_Glyph_Paint, FT_Get_Paint_Layers, FT_Get_Paint, FT_Get_Colorline_Stops): Add basic sanity checks, check for existence of `FT_Face`, check arguments and delegate calls for the respective 'COLR' v1 API to the SFNT driver. 2020-12-16 Dominik Röttsches <drott@chromium.org> [sfnt] Register 'COLR' v1 API in driver (#59703). * include/freetype/internal/sfnt.h (TT_Get_Color_Glyph_Paint_Func, TT_Get_Paint_Layers_Func, TT_Get_Colorline_Stops_Func, TT_Get_Paint_Func): New function pointer types. (SFNT_Interface): Add them. (FT_DEFINE_SFNT_INTERFACE): Updated. * src/sfnt/sfdriver.c (PUT_COLOR_LAYERS_V1): New macro. (sfnt_interface): Add new function pointers. 2020-12-16 Dominik Röttsches <drott@chromium.org> [sfnt] Add 'COLR' v1 API to retrieve color layers (#59703). * src/sfnt/ttcolr.c (tt_face_get_paint_layers): New function to get the layers of a `PaintColrLayers` table in the font, using an `FT_LayerIterator` from an `FT_PaintColrLayers` object retrieved via `tt_face_get_paint`. * src/sfnt/ttcolr.h: Updated. 2020-12-16 Dominik Röttsches <drott@chromium.org> [sfnt] Add 'COLR' v1 API to iterate color stops (#59703). * src/sfnt/ttcolr.c (tt_face_get_colorline_stops): New function to return the current `FT_ColorStop` object from `FT_ColorStopIterator`. Also increment the iterator. * src/sfnt/ttcolr.h: Updated. 2020-12-16 Dominik Röttsches <drott@chromium.org> [sfnt] Add API to get actual paint from `FT_OpaquePaint` (#59703). * src/sfnt/ttcolr.c (tt_face_get_paint): New function to resolve an `FT_OpaquePaint` paint reference into an `FT_COLR_Paint` object of a certain format, which contains the detailed information stored in a paint of the respective format. (read_paint): New function to provide the format specific parsing and to populate the data members of each specific `FT_COLR_Paint` subtype. (read_color_line): New function to parse retrieved color line information into an `FT_ColorLine` object, which has information about the color line extend mode as well as an `FT_ColorStopIterator` object. * src/sfnt/ttcolr.h: Updated. 2020-12-16 Dominik Röttsches <drott@chromium.org> [sfnt] Add API to retrieve 'COLR' v1 root paint (#59703). * src/sfnt/ttcolr.c (BaseGlyphV1Record): New structure. (tt_face_load_colr): Handle version 1 table header. (find_base_glyph_v1_record): New auxiliary function. (tt_face_get_colr_glyph_paint): New function to find the root `FT_OpaquePaint` object for a given glyph ID. * src/sfnt/ttcolr.h: Updated. 2020-12-16 Dominik Röttsches <drott@chromium.org> Add new methods required for 'COLR' v1 to public API (#59703). * include/freetype/freetype.h (FT_Get_Color_Glyph_Paint): New method for retrieving the root paint object for a color glyph by specifying a glyph ID. (FT_Get_Paint_Layers): New method for retrieving the layers of a `PaintColorGlyph`. (FT_Get_ColorLine_Stops): New method for retrieving the stops of a color. (FT_Get_Paint): New method for resolving an `FT_OpaquePaint` into an `FT_COLR_Paint` object. 2020-12-16 Dominik Röttsches <drott@chromium.org> Add types required for 'COLR' v1 to public API (#59703). * include/freetype/freetype.h (FT_PaintFormat, FT_ColorStopIterator, FT_ColorIndex, FT_ColorStop, FT_PaintExtend, FT_ColorLine, FT_Affine23, FT_CompositeMode, FT_OpaquePaint, FT_PaintColrLayers, FT_PaintSolid, FT_PaintLinearGradient, FT_PaintRadialGradient, FT_PaintGlyph, FT_PaintColrGlyph, FT_PaintTransformed, FT_PaintTranslate, FT_PaintRotate, FT_PaintSkew, FT_PaintComposite, FT_COLR_Paint): Adding structs and enum to represent paint format, color stop information, gradient extend information, structs to reference paint offsets, and to define transforms and compositions. Adding a union type to represent the union of the structs, distinguished by `FT_PaintFormat`. 2021-01-10 Werner Lemberg <wl@gnu.org> * builds/*: s/BUILD_DIR/PLATFORM_DIR/. The old variable name caused confusion. 2021-01-08 Alexei Podtelezhnikov <apodtele@gmail.com> [builds] Revert `FTMODULE_H' changes. * builds/toplevel.mk, builds/freetype.mk: Revert changes. 2021-01-07 Alexei Podtelezhnikov <apodtele@gmail.com> [builds/windows] Fix up DLG build with VC++. * builds/windows/vc2010/script.bat: Copy headers to include/. * builds/windows/vc2010/freetype.vcxproj: Remove DLG paths. 2021-01-07 Alexei Podtelezhnikov <apodtele@gmail.com> [builds] Relocate `FTMODULE_H'. * builds/toplevel.mk: Place `FTMODULE_H' in include/. * builds/freetype.mk: Simplify included path. 2021-01-07 Werner Lemberg <wl@gnu.org> Fix ABI incompatibility. * include/freetype/ftimage.h (FT_Pixel_Mode): Don't insert `FT_PIXEL_MODE_GRAY16' but append it. * src/base/ftobjs.c (pixel_modes): Updated. 2021-01-07 Alexei Podtelezhnikov <apodtele@gmail.com> [dlg] Move the headers to include/dlg to simplify their use. * autogen.sh, builds/toplevel.mk: Copy headers to include/dlg. * builds/freetype.mk, builds/windows/vc2010/freetype.vcxproj: Simplify included path. * include/freetype/internal/ftdebug.h: Simplify #include. * src/dlg/rules.mk, .gitignore: Updated. 2021-01-06 Werner Lemberg <wl@gnu.org> * meson.build: Add summary. Based on a patch from Vincent Torri <vincent.torri@gmail.com>. 2021-01-06 Torsten Hilbrich <emacs.nolkaf@hilbrich.tk> * meson.build: Fix 'png' build option (#59458). Without this patch, 'png' is always required. 2021-01-04 Alexei Podtelezhnikov <apodtele@gmail.com> [builds/windows] Add SDF to VC2010 project. * builds/windows/vc2010/freetype.vcxproj: Updated; AfterBuild conveniences. 2020-12-26 Werner Lemberg <wl@gnu.org> [sdf] Use 'counter-clockwise', not 'anti-clockwise'. We prefer US nomenclature. * src/sdf/ftsdf.c (SDF_Contour_Orientation): s/SDF_ORIENTATION-ACW/SDF_ORIENTATION_CCW/. Update all users. 2020-12-26 Werner Lemberg <wl@gnu.org> * src/base/ftobjs.c (pixel_modes): Updated. 2020-12-26 Anuj Verma <anujv@iitbhilai.ac.in> [sdf] Remove custom memory tracker. The internal FreeType memory tracker is sufficient. * src/sdf/ftsdf.c (FT_DEBUG_INNER, FT_ASSIGNP_INNER, SDF_MemoryUser, sdf_alloc, sdf_free, SDF_ALLOC, SDF_FREE, SDF_MEMORY_TRACKER_DECLARE, SDF_MEMORY_TRACKER_SETUP, SDF_MEMORY_TRACKER_DONE): Removed. s/SDF_ALLOC/FT_ALLOC/. s/SDF_FREE/FT_FREE/. Other updates. 2020-12-24 Werner Lemberg <wl@gnu.org> [sdf] Fix `make multi`. * src/sdf/ftsdf.c: Include `ftoutln.h`. 2020-12-24 Werner Lemberg <wl@gnu.org> [sdf] Fix tracing. * include/freetype/internal.fttrace.h: Add 'bsdf' component. * src/sdf/ftbsdf.c, src/sdf/ftsdf.c (FT_COMPONENT): Define. 2020-08-21 Anuj Verma <anujv@iitbhilai.ac.in> [sdf] Add debugging function. * src/sdf/ftsdf.c (sdf_shape_dump): New function. 2020-08-20 Anuj Verma <anujv@iitbhilai.ac.in> [sdf] Add 'bsdf' renderer to 'sdf' module. * src/sdf/ftsdfrend.c (ft_bsdf_render): New function. (ft_bitmap_sdf_renderer_class): New structure. 2020-08-20 Anuj Verma <anujv@iitbhilai.ac.in> [sdf] Add interface functions for the 'bsdf' rasterizer. * src/sdf/ftsdf.c (bsdf_raster_new, bsdf_raster_reset, bsdf_raster_set_mode, bsdf_raster_render, bsdf_raster_done): New functions. (ft_bitmap_sdf_raster): New variable. * src/sdf/ftsdf.h: Updated. 2020-08-20 Anuj Verma <anujv@iitbhilai.ac.in> [sdf] Add function to copy SDF data into output bitmap. * src/sdf/ftbsdf.c (finalize_sdf): New function. 2020-08-20 Anuj Verma <anujv@iitbhilai.ac.in> [sdf] Add '8-point sequential Euclidean distance mapping' algorithm. * src/sdf/ftbsdf.c (compare_neighbor, first_pass, second_pass, edt8): New functions. 2020-08-20 Anuj Verma <anujv@iitbhilai.ac.in> [sdf] Add function to copy source bitmap to distance map. * src/sdf/ftbsdf.c (bsdf_init_distance_map): New function. 2020-08-20 Anuj Verma <anujv@iitbhilai.ac.in> [sdf] Add functions to compute pixel edge distances. * src/sdf/ftbsdf.c (compute_edge_distance, bsdf_approximate_edge): New functions. 2020-08-20 Anuj Verma <anujv@iitbhilai.ac.in> [sdf] Add function to find edge pixels in a grid of alpha values. * src/sdf/ftbsdf.c (bsdf_is_edge): New function. 2020-08-20 Anuj Verma <anujv@iitbhilai.ac.in> [sdf] Add essential structures for the 'bsdf' rasterizer. * src/sdf/ftbsdf.c (ONE): New macro. (BSDF_TRaster, ED, BSDF_Worker): New structures. (zero_ed): New constant. 2020-08-20 Anuj Verma <anujv@iitbhilai.ac.in> [sdf] Add 'sdf' module to non-gnumake build systems. * include/freetype/config/ftmodule.h: Add both the 'sdf' and 'bsdf' renderers to the list of modules. * CMakeLists.txt (BASE_SRCS): Add 'sdf' single-object module. 2020-08-20 Anuj Verma <anujv@iitbhilai.ac.in> [sdf] Added basic overlapping contour support. * src/sdf/ftsdf.c (sdf_generate_with_overlaps): New function. (sdf_raster_render): Enable it. 2020-08-19 Anuj Verma <anujv@iitbhilai.ac.in> [sdf] Add build infrastructure. * src/sdf/module.mk, src/sdf/rules.mk: New files. * src/sdf/ftsdf.h (ft_sdf_raster): New forward declaration. * include/freetype/ftmoderr.h (FT_MODERRDEF): Add error definition for the 'sdf' module. * include/freetype/internal/fttrace.h (FT_TRACE_DEF): Add trace definition for the `sdf' module. * modules.cfg (RASTER_MODULES): Add the `sdf' module to the list of rasterizers. 2020-08-19 Anuj Verma <anujv@iitbhilai.ac.in> [sdf] Add interface functions for the 'sdf' rasterizer. * src/sdf/ftsdf.c (sdf_raster_new, sdf_raster_reset, sdf_raster_set_mode, sdf_raster_render, sdf_raster_done): New functions. (ft_sdf_raster): New structure. 2020-08-19 Anuj Verma <anujv@iitbhilai.ac.in> [sdf] Add subdivision and bounding box optimization. * src/sdf/ftsdf.c (sdf_generate_bounding_box): New function, which is an optimized version of `sdf_generate`. (sdf_generate_subdivision): New function. 2020-08-19 Anuj Verma <anujv@iitbhilai.ac.in> [sdf] Add function to generate SDF. * src/sdf/ftsdf.c (sdf_generate): New function, currently disabled. This is a proof-of-concept implementation: It doesn't use any optimization, it simply checks all grid points against all contours. 2020-08-19 Anuj Verma <anujv@iitbhilai.ac.in> [sdf] Add functions to get shortest distance from any edge/contour. * src/sdf/ftsdf.c (sdf_edge_get_min_distance): New function. (sdf_contour_get_min_distance): New function, currently disabled. 2020-08-18 Anuj Verma <anujv@iitbhilai.ac.in> [sdf] Add shortest distance finding functions. * src/sdf/ftsdf.c (get_min_distance_line, get_min_distance_conic, get_min_distance_cubic): New functions. Note that `get_min_distance_conic` comes with two implementations (using an analytical and an iterative method, to be controlled with the `USE_NEWTON_FOR_CONIC` macro). 2020-08-18 Anuj Verma <anujv@iitbhilai.ac.in> [sdf] Add function to resolve corner distances. * src/sdf/ftsdf.c (resolve_corner): New function. 2020-08-18 Anuj Verma <anujv@iitbhilai.ac.in> [sdf] Add essential math functions. * src/sdf/ftsdf.c (cube_root, arc_cos) [!USE_NEWTON_FOR_CONIC]: New auxiliary functions. * src/sdf/ftsdf.c (solve_quadratic_equation, solve_cubic_equation) [!USE_NEWTON_FOR_CONIC]: New functions. 2020-08-18 Anuj Verma <anujv@iitbhilai.ac.in> [sdf] Add utility functions for contours. * src/sdf/ftsdf.c (get_control_box, get_contour_orientation): New functions. (split_conic, split_cubic, split_sdf_conic, split_sdf_cubic, split_sdf_shape): New functions. 2020-08-17 Anuj Verma <anujv@iitbhilai.ac.in> [sdf] Add functions to decompose `FT_Outline`. * src/sdf/ftsdf.c (sdf_move_to, sdf_line_to, sdf_conic_to, sdf_cubic_to): New auxiliary decomposition functions. (sdf_compose_funcs): New structure. (sdf_outline_decompose): New function. 2020-08-17 Anuj Verma <anujv@iitbhilai.ac.in> [sdf] Structs, enums, macros, and functions for 'sdf' rasterizer. * src/sdf/ftsdf.c (FT_DEBUG_INNER, FT_ASSIGNP_INNER) [FT_DEBUG_LEVEL_TRACE && FT_DEBUG_MEMORY]: New macros. (SDF_MemoryUser) [FT_DEBUG_LEVEL_TRACE && FT_DEBUG_MEMORY]: New struct for memory usage tracing. (sdf_alloc, sdf_free) [FT_DEBUG_LEVEL_TRACE && FT_DEBUG_MEMORY]: New functions for memory usage tracing. (SDF_ALLOC, SDF_FREE): New macros for memory management. (SDF_MEMORY_TRACKER_DECLARE, SDF_MEMORY_TRACKER_SETUP, SDF_MEMORY_TRACKER_DONE): New macros to set up memory usage tracing. (USE_NEWTON_FOR_CONIC, MAX_NEWTON_DIVISIONS, MAX_NEWTON_STEPS, CORNER_CHECK_EPSILON, CG_DIMEN): New configuration macros for controlling the process of finding the shortest distance. (MUL_26D6, VEC_26D6_DOT): New auxiliary macros. (SDF_TRaster, SDF_Edge, SDF_Contour, SDF_Shape, SDF_Signed_Distance, SDF_Params): New structs for setting up SDF data. (SDF_Edge_Type, SDF_Contour_Orientation): New enums for SDF data. (zero_vector, null_edge, null_contour, null_shape, max_sdf): Useful constants. (sdf_edge_new, sdf_edge_done, sdf_contour_new, sdf_contour_done, sdf_shape_new, sdf_shape_done): New constructors and destructors. 2020-08-17 Anuj Verma <anujv@iitbhilai.ac.in> [sdf] Add raster parameters structure. * src/sdf/ftsdf.h (SDF_Raster_Params): New structure. * src/sdf/sdf.c: Include source files in order to make a single object of the module. 2020-08-17 Anuj Verma <anujv@iitbhilai.ac.in> [sdf] Add 'sdf' renderer. * src/sdf/ftsdf.c: Add 'sdf' renderer along with its interface functions. Also add functions to set and get properties. 2020-08-17 Anuj Verma <anujv@iitbhilai.ac.in> [sdf] Add common elements for 'sdf' and 'bsdf' renderers. * src/sdf/ftsdfrend.h (SDF_Rendere_Module, ft_sdf_renderer_class, ft_bitmap_sdf_renderer_class): New structures. * src/sdf/ftsdfcommon.h (DEFAULT_SPREAD, MIN_SPREAD_MAX_SPREAD, USE_SQUARED_DISTANCES): New macros. (FT_INT_26D6, FT_INT_16D16, FT_26D6_16D16): New macros. (FT_CALL, VECTOR_LENGTH_16D16): New macros. (FT_26D6_Vec, FT_16D16_Vec, FT_16D16, FT_26D6, FT_6D10, FT_CBox): New typedefs. (square_root): New macro. * src/sdf/ftsdferrs.h: Add module error setup. 2020-08-16 Anuj Verma <anujv@iitbhilai.ac.in> [sdf] Add files for new 'sdf' module. Here is a breakdown of what the files will contain. * src/sdf/ftsdfrend.c, src/sdf/ftsdfrend.h: The 'sdf' and 'bsdf' renderers. * src/sdf/ftsdf.c, src/sdf/ftsdf.h: The rasterizer for the 'sdf' renderer. * src/sdf/ftbsdf.c, src/sdf/ftbsdf.h: The rasterizer for the 'bsdf' renderer. * src/sdf/ftsdfcommon.h: Commmon properties and functions for both rasterizers. * src/sdf/ftsdferrs.h: Common error defines. * src/sdf/sdf.c: For building a single object of the entire module. 2020-08-16 Anuj Verma <anujv@iitbhilai.ac.in> [base] Allow renderers of different formats. * src/base/ftobjs.c (FT_Render_Glyph_Internal): Do not return if the glyph's slot format is `FT_GLYPH_FORMAT_BITMAP`. The forthcoming 'bsdf' renderer will require bitmaps for processing. * src/base/ftobjs.c (ft_add_renderer, ft_remove_renderer): Remove renderer's glyph format check before adding and removing them. The 'bsdf' renderer will have a format `FT_GLYPH_FORMAT_BITMAP`. 2020-08-16 Anuj Verma <anujv@iitbhilai.ac.in> Add data types required for the forthcoming 'sdf' module. * include/freetype/freetype.h (FT_Render_Mode): Add new render mode `FT_RENDER_MODE_SDF`, which will be used to generate SDF. * include/freetype/ftimage.h (FT_Pixel_Mode): Add new pixel mode `FT_PIXEL_MODE_GRAY16`, which will be the output of the 'sdf' module. (FT_RASTER_FLAG_SDF): New raster flag to be used internally by the 'sdf' module. * include/freetype/fttypes.h (FT_F6Dot10): New data type. 2020-08-16 Anuj Verma <anujv@iitbhilai.ac.in> [base] Allow renderers of different formats. * src/base/ftobjs.c (FT_Render_Glyph_Internal): Do not return if the glyph's slot format is `FT_GLYPH_FORMAT_BITMAP`. The forthcoming 'bsdf' renderer will require bitmaps for processing. * src/base/ftobjs.c (ft_add_renderer, ft_remove_renderer): Remove renderer's glyph format check before adding and removing them. The 'bsdf' renderer will have a format `FT_GLYPH_FORMAT_BITMAP`. 2020-12-23 Werner Lemberg <wl@gnu.org> * builds/windows/detect.mk (COPY): Make it work with `shell`. Without this patch, we get the error builds/toplevel.mk:127: *** missing separator. Stop. Reported by Anuj, with a solution from Alexei. 2020-12-23 Ignacio Casal Quinteiro <qignacio@amazon.com> * meson.build (ft2_defines): Fix builds on Windows. 2020-12-18 Tatsuyuki Ishi <ishitatsuyuki@gmail.com> [autofit] Fix double division in stem darkening. The old code used to divide the darkening amount by em_ratio twice, leading to unnecessarily bold stems on certain fonts with higher units per em (e.g. Inter). This patch fixes it. The return value of af_loader_compute_darkening was also changed to use 16.16 fixed point to get rid of a redundant truncation operation. This should slightly improve the precision, although it's still bottlenecked by the emboldening function, which uses 26.6 fixed point. * src/autofit/afloader.[ch] (af_loader_compute_darkening): Return FT_Fixed. (af_loader_embolden_glyph_in_slot): Revise calculations. 2020-12-17 Alexei Podtelezhnikov <apodtele@gmail.com> * include/freetype/ftmodapi.h (FT_FACE_DRIVER_NAME): New public macro. The driver name is needed for `FT_Property_Set' and `FT_Property_Get'. 2020-12-16 Chris Liddell <chris.liddell@artifex.com> [truetype] Fix incremental metrics (#59503). * src/truetype/ttgload.c (tt_get_metrics, load_truetype_glyph): Previously, the code would populate the phantom points before calling the `get_glyph_metrics` callback. For formats like PCL XL format 1, class 2 downloaded fonts (where metrics are removed from the TTF header), this causes problems when the hinting program uses the phantom points (misplaced and distorted glyphs) due to the metrics being unset (all zeros). (tt_get_metrics_incr_overrides): Renamed to... (tt_get_metrics_incremental): ... this. Updated caller * include/freetype/ftincrem.h: Update the documentation to make it clearer that `get_glyph_metrics` is to retrieve metrics from a non-standard source, but *not* for the purpose of imposing custom metrics. 2020-12-14 Werner Lemberg <wl@gnu.org> [type42] Pacify static analysis tools (#59682). * src/type42/t42objs.c (T42_Size_Init, T42_GlyphSlot_Init): Avoid warnings about uninitialized variables. 2020-12-07 Werner Lemberg <wl@gnu.org> * builds/unix/configure.raw: Don't set `FT_DEBUG_LOGGING`. All debug options are handled exclusively in `ftoption.h`. 2020-12-07 Werner Lemberg <wl@gnu.org> * src/*: More fixes for using a '\n' in `FT_TRACE` and `FT_ERROR`. 2020-12-07 Werner Lemberg <wl@gnu.org> */*: s/FT_LOGGING/FT_DEBUG_LOGGING/. 2020-12-05 Werner Lemberg <wl@gnu.org> * builds/toplevel.mk (do-dist): Remove `submodules` directory. 2020-12-02 Werner Lemberg <wl@gnu.org> * src/*: Don't use more than one '\n' in `FT_TRACE` and `FT_ERROR`. This ensures good logging output, with all lines having a proper prefix (if requested). 2020-12-02 Werner Lemberg <wl@gnu.org> [base] Don't close 'stderr' after logging. * src/base/ftdebug.c, builds/windows/ftdebug.c (ft_logging_deinit): Fix it. 2020-12-02 Werner Lemberg <wl@gnu.org> * submodules/dlg: Updated to commit 9f0c8b22. 2020-12-02 Werner Lemberg <wl@gnu.org> * src/bdf/bdflib.c: Fix `-Wformat` warning. 2020-12-02 Werner Lemberg <wl@gnu.org> Improve setup for 'dlg' library. * autogen.sh (copy_submodule_file), builds/toplevel.mk: Redirect stderr to `/dev/null`. * builds/toplevel.mk: Move code block to handle 'dlg' stuff into `check_platform` conditional. Also fix wildcard expressions for guarding `git submodule` commands. Also make file copying work with non-Unix platforms (untested). 2020-12-01 Werner Lemberg <wl@gnu.org> [build] Use gcc (and clang) in C99 mode. Other compilers are unchanged. * builds/compiler/gcc-dev.mk, builds/compiler/gcc.mk (ANSIFLAGS): s/-ansi/-std=c99/. * builds/freetype.mk (FT_CFLAGS): Remove `-std=c99`. * builds/unix/configure.raw: Handle C99. Remove no longer needed test for gcc 4.6 and earlier. 2020-12-01 Werner Lemberg <wl@gnu.org> [dlg] Fix compiler warnings. * src/dlg/dlgwrap.c: Duplicate some feature test macros from `dlg.c`, which must come first before loading standard headers. For example, `freetype.h` loads `stdio.h` if compiled in debug mode. 2020-12-01 Werner Lemberg <wl@gnu.org> * src/type42/t42parse.c: Fix `-Wformat` warnings. 2020-12-01 Priyesh Kumar <priyeshkkumar@gmail.com> [builds/unix] Check for 'pthread' library. * builds/unix/ax_pthread.m4: New file, taken from 'autoconf-archive' git repository. * builds/unix/configure.raw: Check for 'pthread'; also check whether it works. 2020-12-01 Werner Lemberg <wl@gnu.org> [base] Implement vertical alignment of log printing. Based on a patch by Priyesh. * include/freetype/internal/fttrace.h (FT_MAX_TRACE_LEVEL_LENGTH): New macro. * src/base/ftdebug.c, builds/windows/ftdebug.c (ft_log_handler): Print logs after a fixed width to handle different lengths of `FT_COMPONENT` entries. Use `ft_strrchr` to check for final newline character. 2020-11-30 Priyesh Kumar <priyeshkkumar@gmail.com> Update logging related documentation. * docs/DEBUG: Updates related to `FT_LOGGING`. * README.git: Updates related to logging. 2020-11-30 Priyesh Kumar <priyeshkkumar@gmail.com> * src/*: Fix `-Wformat` warnings. 2020-11-30 Priyesh Kumar <priyeshkkumar@gmail.com> [builds/windows] Changes to build 'dlg' with FreeType on Windows. We only support Visual C++ 2010 and newer. * builds/windows/vc2010/script.bat: New windows batch file to copy necessary 'dlg' files from `submodules/dlg` to `src/dlg`. This file is used as a pre-built event in Visual C++. * builds/windows/ftdebug.c: Synchronize with `src/base/ftdebug.c`. * builds/windows/vc2010/freetype.vcxproj.filters: Add `src/dlgwrap.c`. * builds/windows/vc2010/freetype.vcxproj (AdditionalIncludeDirectories): Add include files of dlg for 'Debug' and 'Debug Static' configurations on both 'x64' and 'win32' platforms. (PreprocessorDefinitions): Add `FT_LOGGING` for 'Debug' and 'Debug Static' configurations on both 'x64' and 'win32' platforms. Add `DLG_STATIC' for 'Debug' configuration on 'x64' and 'win32' platforms. (DisableLanguageExtensions): We need to disable the `/Za` option when building 'dlg' with FreeType as 'dlg' strictly follows the C99 standard. Visual C++ produces behaves unexpectedly when compiling a C99 file with `/Za` option enabled. 2020-11-30 Priyesh Kumar <priyeshkkumar@gmail.com> [base] Add public API to change log handling function. * include/freetype/ftlogging.h (FT_Custom_Log_Handler): New function typedef to store the custom callback logging function. (FT_Set_Log_Handler, FT_Set_Default_Log_Handler): New functions to set and reset custom log handler. * include/freetype/internal/ftdebug.h (custom_output_handler): New variable to support a custom callback logging function. (FT_Logging_Callback): A new function typedef to print log using custom callback logging function, which is set using `FT_Set_Log_Handler`. (FT_Log): Use it. * src/base/ftdebug.c (FT_Set_Log_Handler, FT_Set_Default_Log_Handler, FT_Logging_Callback): Add function definitions. 2020-11-28 Priyesh Kumar <priyeshkkumar@gmail.com> [base] Add public API to change the levels of tracing components. * include/freetype/ftlogging.h: New header file. * include/freetype/internal/ftdebug.h [FT_LOGGING]: Include `ftlogging.h`. * src/base/ftdebug.c (ft_custom_trace_level): New variable. (ft_debug_init): Update to support change of levels of tracing components of FreeType at run-time. (FT_Trace_Set_Level): New function to change the levels of tracing components at run-time. (FT_Trace_Set_Default_Level): New function to reset the levels of tracing components back to default. 2020-11-28 Priyesh Kumar <priyeshkkumar@gmail.com> [base] Updates to print timestamp and name of `FT_COMPONENT` in logs. * include/freetype/internal/ftdebug.h (FT_LOGGING_TAG, FT_LOGGING_TAG_): New macros to resolve the value of `FT_COMPONENT' into a string. (ft_add_tag, ft_remove_tag): New functions to add and remove dlg tags. * src/base/ftdebug.c: Add new variables to control the logging of timestamp and name of `FT_COMPONENT` along with actual logs. (ft_add_tag, ft_remove_tag): Add function definitions. (ft_log_handler): Updates to print timestamp and name of `FT_COMPONENT`. (ft_debug_init) [FT_LOGGING]: Users can now control the logging of timestamp and name of `FT_COMPONENT` by adding tags in the `FT2_DEBUG` environment variable. 2020-11-27 Priyesh Kumar <priyeshkkumar@gmail.com> [base] Add functions and variables to print logs to a file. * include/freetype/internal/ftdebug.h: Added dlg's header files. (FT_LOG): New macro to redirect trace logs to dlg's API's whenever `FT_LOGGING' is defined. (ft_logging_init, ft_logging_deinit): New functions to handle initialization and uninitialization of logging related variables. (ft_log_handler): New function to handle logs of FreeType. * src/base/ftdebug.c: Add necessary logging related variables. (ft_logging_init, ft_logging_deinit, ft_log_handler): Add function definitions. * src/base/ftinit.c (FT_Init_FreeType) [FT_LOGGING]: Call `ft_logging_init`. (FT_Done_FreeType) [FT_LOGGING]: Call `ft_logging_deinit`. * src/base/ftobjs.c (FT_New_Library): Call `ft_debug_init` only if `FT_LOGGING` is not defined. 2020-11-27 Priyesh Kumar <priyeshkkumar@gmail.com> [builds] Necessary changes to make 'dlg' compile. * autogen.sh (copy_submodule_files): New script to copy all the necessary source and include files from `submodules/dlg` to `src/dlg`. * src/dlg/dlgwrap.c: New wrapper file for `src/dlg.c`. It enables the build of 'dlg' if the `FT_LOGGING` macro is defined. * src/dlg/rules.mk: New sub-Makefile. * builds/freetype.mk (DLG_DIR): New variable to include the header files of the 'dlg' library. (INCLUDES): Add `DLG_DIR`. (FT_CFLAGS): Add `-std=c99' flag. Include `src/dlg/rules.mk` file to build 'dlg' library. (OBJ_S, OBJ_M): Add `DLG_OBJS_M` and `DLG_OBJS_S`. * builds/toplevel.mk: For builds directly from the git repository we need to copy files from `submodule/dlg` to `src/dlg`. * include/freetype/config/ftoption.h, devel/ftoption.h (FT_LOGGING): New macro to enable or disable the logging facility in FreeType. 2020-11-27 Priyesh Kumar <priyeshkkumar@gmail.com> * .gitmodules: Add 'dlg' library's git repository as submodule. 2020-12-01 Werner Lemberg <wl@gnu.org> * src/tools/chktrcmp.py (trace_use_pat): Update to current use. 2020-11-20 Alexei Podtelezhnikov <apodtele@gmail.com> [cff,cid,type1] Demote old engine for lack of CFF2. * src/cff/cffobjs.c (cff_driver_init): Always default to Adobe engine. * src/cid/cidobjs.c (cid_driver_init): Ditto. * src/type1/t1objs.c (T1_Driver_Init): Ditto. 2020-11-09 Werner Lemberg <wl@gnu.org> * src/type42/t42parse.c (t42_parse_sfnts): More tracing messages. 2020-11-04 Werner Lemberg <wl@gnu.org> * meson.build: Fix .pc file generation. For backwards compatibility we need the libtool version, not the .so number. Reported by Nikolaus. 2020-10-28 Werner Lemberg <wl@gnu.org> [truetype] Minor update to forthcoming OpenType 1.8.4 standard. * src/truetype/ttgxvar.c (ft_var_load_item_variation_store): Limit size of `regionCount`. 2020-10-26 Werner Lemberg <wl@gnu.org> * meson.build: Fix 'harfbuzz' and 'brotli' build options (#59347). Without this patch, 'harfbuzz' and 'brotli' are always required. Patch submitted anonymously in Savannah bug report. 2020-10-23 Ben Wagner <bungeman@google.com> * src/sfnt/pngshim.c (Load_SBit_Png): Fix memory leak (#59322). The issue is that `rows` is allocated but will not be freed in the event that the call to `png_read_image` fails and calls `longjmp`. 2020-10-20 Werner Lemberg <wl@gnu.org> * Version 2.10.4 released. ========================== Tag sources with `VER-2-10-4'. * docs/VERSION.TXT: Add entry for version 2.10.4. * docs/CHANGES: Updated. * README, src/base/ftver.rc, builds/windows/vc2010/index.html, builds/windows/visualc/index.html, builds/windows/visualce/index.html, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/index.html, docs/freetype-config.1: s/2.10.3/2.10.4/, s/2103/2104/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 4. * builds/unix/configure.raw (version_info): Set to 23:4:17. * CMakeLists.txt (VERSION_PATCH): Set to 4. 2020-10-19 Werner Lemberg <wl@gnu.org> [sfnt] Fix heap buffer overflow (#59308). This is CVE-2020-15999. * src/sfnt/pngshim.c (Load_SBit_Png): Test bitmap size earlier. 2020-10-17 Alexei Podtelezhnikov <apodtele@gmail.com> * src/sfnt/tt{colr,cpal}.c: Fix signedness warnings from VC++. 2020-10-17 Alexei Podtelezhnikov <apodtele@gmail.com> * src/sfnt/sfwoff2.c (Read255UShort): Tweak types to please VC++. 2020-10-10 Werner Lemberg <wl@gnu.org> * Version 2.10.3 released. ========================== Tag sources with `VER-2-10-3'. * docs/VERSION.TXT: Add entry for version 2.10.3. * README, src/base/ftver.rc, builds/windows/vc2010/index.html, builds/windows/visualc/index.html, builds/windows/visualce/index.html, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/index.html, docs/freetype-config.1: s/2.10.2/2.10.3/, s/2102/2103/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3. * builds/unix/configure.raw (version_info): Set to 23:3:17. * CMakeLists.txt (VERSION_PATCH): Set to 3. 2020-09-25 Werner Lemberg <wl@gnu.org> [autofit] Synchronize with ttfautohint. This corresponds to the following commits in the ttfautohint git repository: bb6842bd3bd437b7b4a7921b0376c860f5e73d18 Typo, formatting. d5c91ddb1cb310257a3dfe9a8e20e1fc51335faa Add Medefaidrin script. * src/autofit/afblue.dat: Add blue zone data for Medefaidrin. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Medefaidrin standard characters. * src/autofit/afranges.c, src/autofit/afstyles.h: Add Medefaidrin data. 2020-09-25 Werner Lemberg <wl@gnu.org> Move `scripts/make_distribution_archives.py` to `src/tools`. * scr/tools/scripts/make_distribution_archives.py: (_TOP_DIR, _SCRIPT_DIR): Updated to new location. (main): s/shutils.copyfile/shutils.copy/ to preserve file permissions. (main): Prefix source file paths with `git_dir` while copying files to allow calls of the script from other places than the top-level directory. 2020-09-24 Werner Lemberg <wl@gnu.org> * src/cff/cffgload.c (cff_slot_load): Scale `vertBearingY`. Towards the end of the the function there is a call to `FT_Outline_Get_CBox` that retrieves the glyph bbox in scaled units. That sets `horiBearing{X,Y}` and `vertBearingX` but `vertBearingY` is left alone, and is not scaled. Patch from Eric Muller <emuller@amazon.com>. 2020-09-24 Werner Lemberg <wl@gnu.org> * src/base/ftobjs.c (FT_Load_Glyph): Trace glyph metrics. 2020-09-22 Werner Lemberg <wl@gnu.org> [meson] Move auxiliary scripts to `builds/meson`. Suggested by Alexei. * scripts/*.py: Move meson scripts to... * builds/meson/*.py: ... this new location. * meson.build: Updated. 2020-09-21 David Turner <david@freetype.org> Add python script for building tarballs. * scripts/make_distribution_archives.py: New file. This standalone Python script should be equivalent to running `make dist` with the Make-based build system, with the following minor differences: - Since `make distclean` doesn't always clean up `objs/` properly, `make dist` archives may contain some stale binaries like `objs/.libs/libfreetype.so.6` or others. - `config.guess` and `config.sub` are not updated unless option `--gnu-config-dir=DIR` is used to specify the location of these files. - Some bits of the auto-generated reference documentation may appear in slightly different order, probably due to issues related to mkdocs and docwriter. As an example, the call scripts/make_distribution_archives.py /tmp/freetype2-dist creates the following files under `/tmp/freetype2-dist`: freetype-<version>.tar.gz freetype-<version>.tar.xz ft<winversion>.zip 2020-09-21 Werner Lemberg <wl@gnu.org> * scripts/extract_freetype_version.py: Fix regex typos. 2020-09-21 David Turner <david@freetype.org> Add Meson build project file. Example usage: # Configure Meson build in directory `build-meson` to generate # release binaries comparable to to the ones from the # autotools/make build system. meson setup build-meson \ --prefix=/usr/local \ --buildtype=debugoptimized \ --strip \ -Db_ndebug=true # After configuring the Meson build with the above command, # compile and install to `/usr/local/`; this includes a pkg-config # file. ninja -C build-meson install # Alternatively, compile and install to `/tmp/aa/usr/local/...` # for packaging. DESTDIR=/tmp/aa ninja -C build-meson install # Generate documentation under `build-meson/docs`. ninja -C build-meson docs Library size comparison for stripped `libfreetype.so` generated by all three build systems: - Default build (autotools + libtool): 712 KiB - CMake build (RelWithDebInfo): 712 KiB - Meson build: 712 KiB * meson.build: New top-level Meson build file for the library. * meson_options.txt: New file. It holds user-selectable options for the build, which can be printed with `meson configure`, and selected at `meson setup` or `meson --reconfigure` time with `-D<option>=<value>`. * scripts/parse_modules_cfg.py: A script invoked by `meson.build` to parse `modules.cfg` and extract important information out of it (i.e., the list of modules). * scripts/process_ftoption_h.py: New script invoked by `meson.build` to process the original `ftoption.h` file. It enables or disables configuration macro variables based on the available dependencies. This is similar to what other build systems are using (i.e., Meson's `configure_file()` command is not used here). * scripts/extract_freetype_version.py: New script invoked by `meson.build` to extract the FreeType version number from `<freetype/freetype.h>`. * scripts/extract_libtool_version.py: New script invoked by `meson.build` to extract the libtool `revision_info` data from `builds/unix/configure.raw`, and to generate the corresponding shared library suffix. * scripts/generate_reference_docs.py: New script invoked by `meson.build` to generate the FreeType 2 reference documentation (using the `docwriter` and `mkdocs` packages, which must be already installed). 2020-09-11 Alexei Podtelezhnikov <apodtele@gmail.com> [raster] Improve the second pass (#58373). Besides dropout control the second horizontal sweep is supposed to clean up straight horizontal edges that are mishandled by the first vertical sweep when a line passes through pixel centers. This line would present as perfectly aligned span edges in the second sweep. * src/raster/ftraster.c (Horizontal_Sweep_Span): Replace the old implementation with a better one focusing on aligned span edges only. 2020-09-08 Alexei Podtelezhnikov <apodtele@gmail.com> [raster] Tune SMART macro (#58352). Windows seems to perform smart dropout control at 26.6 precision. To mimick Windows independent of increased precision, we need to tweak the macro so that some close calls break down rather than up. * src/raster/ftraster.c (SMART): Tweak the macro. 2020-09-08 Alexei Podtelezhnikov <apodtele@gmail.com> [raster] Introduce SMART macro. * src/raster/ftraster.c (SMART): New macro for smart dropout rounding. (Verstical_Sweep_Drop, Horizontal_Sweep_Drop): Use it. 2020-09-03 Boris Dalstein <dalboris@gmail.com> [build] Make CMake install basic version information. * CMakeLists.txt: Do it. 2020-09-02 Alexei Podtelezhnikov <apodtele@gmail.com> [truetype] Reduce Infinality footprint (cont'd). * src/truetype/ttinterp.c (Ins_DELTAP): Shrink variable scope. (Ins_SHPIX, Ins_MIRP): Revise if-logic. 2020-09-02 Alexei Podtelezhnikov <apodtele@gmail.com> [truetype] Reduce Infinality footprint. * src/truetype/ttinterp.c (Ins_SHPIX, Ins_MSIRP, Ins_MIAP, Ins_MDRP, Ins_MIRP): Shrink variable scopes and consolidate ifdefs. 2020-09-01 Alexei Podtelezhnikov <apodtele@gmail.com> [truetype] Refactor compensation color. * src/truetype/ttinterp.h (TT_Round_Func): Change the last argument. * src/truetype/ttinterp.c (Ins_ROUND, Ins_NROUND, Ins_MDAP, Ins_MIAP, Ins_MDRP, Ins_MIRP): Move compensation retrieval from here... (Round_*): ... to here. * src/truetype/ttobjs.c (tt_size_init_bytecode): Reserve zero compensation at color index 3. 2020-08-28 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Don't set target in direct mode. * src/smooth/ftsmooth.c (ft_smooth_raster_overlap): Remove assignment. (ft_smooth_raster_lcd) [!FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Ditto. 2020-08-25 Alexei Podtelezhnikov <apodtele@gmail.com> * src/smooth/ftsmooth.c (ft_smooth_raster_overlap): Limit width. Segmentation fault reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=24729 2020-08-22 Werner Lemberg <wl@gnu.org> * src/truetype/ttgload.c (TT_Get_VMetrics): Add tracing message. 2020-08-05 Alexei Podtelezhnikov <apodtele@gmail.com> [truetype] Retain OVERLAP_SIMPLE and OVERLAP_COMPOUND. For glyphs with OVERLAP_SIMPLE or OVERLAP_COMPOUND, set FT_OUTLINE_OVERLAP to render them with direct oversampling, which mitigates artifacts (see 3bb512bc9f62). * include/freetype/ftimage.h (FT_OUTLINE_OVERLAP): Redefine to rhyme with OVERLAP_SIMPLE. * src/base/ftgloadr.c (FT_GlyphLoader_Rewind): Reset outline flags. * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Retain OVERLAP_SIMPLE. (load_truetype_glyph): Retain OVERLAP_COMPOUND. 2020-08-04 Alexei Podtelezhnikov <apodtele@gmail.com> * src/truetype/ttgload.c (TT_Load_Glyph): More tracing. 2020-07-28 Alexei Podtelezhnikov <apodtele@gmail.com> Hide internal functions with SunPro. * include/freetype/internal/compiler-macros.h (FT_INTERNAL_FUNCTION_ATTRIBUTE) <__SUNPRO_C>: Define as __hidden. 2020-07-28 Anuj Verma <anujv@iitbhilai.ac.in> Fix static compilation with Visual C. * include/freetype/internal/compiler-macros.h (FT_INTERNAL_FUNCTION_ATTRIBUTE) <_WIN32>: Define as empty. 2020-07-28 Priyesh Kumar <priyeshkkumar@gmail.com> Fix `-Wformat' compiler warnings. * src/*: Fix format specifiers. * builds/unix/ftsystem.c (FT_Stream_Open): Ditto. 2020-07-25 Werner Lemberg <wl@gnu.org> Fix `-Wformat' compiler warnings. Problem reported by Priyesh kumar <priyeshkkumar@gmail.com> * src/base/ftoutln.c (FT_Outline_Decompose): Fix number of arguments to tracing macro. * src/bdf/bdfdrivr.c (bdf_cmap_char_next, bdf_get_bdf_property): Ditto. * src/cache/ftcbasic.c (ftc_basic_family_get_count): Ditto. Reformulate message. * src/pcf/pcfdrivr.c (pcf_get_bdf_property): Ditto. * src/sfnt/sfwoff2.c (woff2_open_font): Ditto. Trace table offset, too. * src/truetype/ttgxvar.c (ft_var_apply_tuple): Ditto. 2020-07-23 Werner Lemberg <wl@gnu.org> * src/sfnt/sfwoff2.c (woff2_decompress): Fix compiler warning. Reported by Hin-Tak. 2020-07-12 Werner Lemberg <wl@gnu.org> * builds/unix/configure.raw: Fix inclusion of `ftoption.h'. 2020-07-07 Werner Lemberg <wl@gnu.org> Fix clang warnings. * include/freetype/internal/autohint.h (FT_DECLARE_AUTOHINTER_INTERFACE): New macro. * src/autofit/afmodule.h: Use it to declare `af_autofitter_interface'. * include/freetype/internal/ftobjs.h (FT_DECLARE_GLYPH): New macro. * src/base/ftbase.h: Use it to declare `ft_bitmap_glyph_class' and `ft_outline_glyph_class'. * src/base/ftglyph.c: Include `ftbase.h'. * src/cff/cffparse.c (cff_parser_run): Fix type of `t2_size'. * src/pcf/pcfdrivr.c (pcf_cmap_char_next): Fix type of `result'. * src/psaux/psauxmod.c (psaux_module_class): Use `FT_DEFINE_MODULE'. * src/psaux/psauxmod.h: Declare `afm_parser_funcs', `t1_cmap_classes', `cff_decoder_funcs', and `psaux_module_class'. * src/pshinter/pshmod.c: Include `pshmod.h'. * src/sfnt/sfwoff2.c (ROUND4, WRITE_SHORT): Fix implicit sign conversion. (compute_ULong_sum): Fix return type. Fix implicit sign conversion. (store_points): Fix type of `last_flag', `repeat_count', and `flag'. Use casts to avoid warnings. (reconstruct_glyf): Fix implicit sign conversion. Use cast to avoid warning. (get_x_mins): Fix implicit sign conversion. * src/sfnt/ttcmap.c: Undef `TTCMAPCITEM'. * src/sfnt/ttcmap.h: Define `TTCMAPCITEM' and include `ttcmapc.h' to declare cmap classes. * src/smooth/ftsmooth.c (ft_smooth_overlap_spans): Use cast. * src/truetype/ttinterp.c (Ins_MIAP): Fix typo. 2020-07-07 David Turner <david@freetype.org> [build] Really fix multi and C++ builds. The following builds were still failing due to previous changes: make multi make multi CC="c++" make CC="c++" This patch fixes the issues, which were missing includes to get the right macro definitions in multi-build mode. Also, `FT_UNUSED' is actually used by third-party code, so move it back to `public-macros.h' to avoid breaking it. * include/freetype/config/public-macros.h (FT_EXPORT): Remove special definition for C++. (FT_UNUSED): Define here instead of... * include/freetype/config/compiler-macros.h: ... here. (FT_FUNCTION_DECLARATION): Remove special definition for C++. (FT_LOCAL_ARRAY_DEF): Fix definition. * src/cache/ftccback.h, src/lzw/ftzopen.h, src/gxvalid/gxvmort.h, src/gxvalid/gxvmorx.h: Add `FT_BEGIN_HEADER' and `FT_END_HEADER'. 2020-07-06 David Turner <david@freetype.org> [build] Fix multi and C++ builds. The following builds were failing due to previous changes: make multi make multi CC="c++" * include/freetype/config/ftconfig.h: Remove `FT_END_HEADER'. * include/freetype/config/ftheader.h (FT_BEGIN_HEADER, FT_END_HEADER): Protect against redefinition. * src/cache/ftccache.h, src/cache/ftcmru.h, src/pcf/pcfutil.h, src/psaux/pserror.h, src/psaux/psft.h, src/psaux/psstack.h, src/sfnt/woff2tags.h: Include `compiler-macros.h'. * src/sfnt/woff2tags.c: Include `woff2tags.h'. 2020-07-06 Werner Lemberg <wl@gnu.org> [psaux] Improve `t1_decoder_parse_metrics' (#58646). * src/psaux/t1decode.c (t1_decoder_parse_metrics): Copy corresponding code from old engine's `t1_decoder_parse_charstrings' function to handle `op_callsubr' and `op_return'. 2020-07-05 David Turner <david@freetype.org> [build] Improve visibility support of library function names. * include/freetype/config/public-macros.h (FT_PUBLIC_FUNCTION_ATTRIBUTE): New macro to tag functions as public (and thus exportable). (FT_EXPORT): Use it. * include/freetype/config/compiler-macros.h (FT_INTERNAL_FUNCTION_ATTRIBUTE): New macro to tag functions as internal to the library (and thus hidden). Note that on ELF systems, all internal functions have hidden visibility, which avoids the need to enforce this when invoking the compiler (e.g., with an option like `-fvisibility=hidden'). (FT_FUNCTION_DECLARATION, FT_FUNCTION_DEFINITION): New base macros to deal with C and C++ linkage issues at the same time. (FT_LOCAL, FT_LOCAL_DEF, FT_LOCAL_ARRAY, FT_LOCAL_ARRAY_DEF, FT_BASE, FT_BASE_DEF, FT_EXPORT_VAR, FT_BASE_CALLBACK, FT_BASE_CALLBACK_DEF): Redefined using new macros. 2020-07-05 David Turner <david@freetype.org> [build] Split off more stuff from `ftconfig.h'. * builds/unix/ftconfig.h.in, builds/vms/ftconfig.h, include/freetype/config/ftconfig.h: Split off macro definitions required by the FreeType API headers to... * include/freetype/config/public-macros.h: ...this new file. * builds/unix/ftconfig.h.in, builds/vms/ftconfig.h, include/freetype/config/ftconfig.h: Split off macro definitions used by the library but not to be exposed to clients to... * include/freetype/config/compiler-macros.h: ...this new file. * include/freetype/internal/*.h, src/raster/ftraster.h: Include `compiler-macros.h' where needed. 2020-07-05 David Turner <david@freetype.org> [build] Move mac support code to `mac-support.h'. * builds/unix/ftconfig.h.in, builds/vms/ftconfig.h, include/freetype/config/ftconfig.h: Split off mac-specific stuff to... * include/freetype/config/mac-support.h: ...this new file. * CMakeLists.txt, builds/unix/configure.raw: Remove `/undef -> #undef' string replacement; the affected code is no longer part of the `ftconfig.h' template. 2020-07-05 David Turner <david@freetype.org> [build] Put integer type definitions into `integer-types.h'. Refactor some of the `ftconfig.h' headers and template to move the definition of the FreeType integer types (e.g., `FT_Int16') to a common header file `freetype/config/integer-types.h'. * builds/unix/ftconfig.h.in, builds/vms/ftconfig.h, include/freetype/config/ftconfig.h: Split off integer type definition stuff to... * include/freetype/config/integer-types.h: ...this new file. * builds/unix/ftconfig.h.in: Control the definition of `FT_SIZEOF_INT' and `FT_SIZEOF_LONG' with macro `FT_USE_AUTOCONF_SIZEOF_TYPES'. If these are not defined, auto detection happens in `integer-types.h' as usual based on `INTXX_MAX' values. Otherwise the autoconf-detected values are used. * builds/unix/configure.raw (CPPFLAGS): Don't include path to `config' directory. Instead, ... (FT_CONFIG_STANDARD_LIBRARY_H): Use complete path. 2020-07-05 David Turner <david@freetype.org> [build] Rename `build/unix/ftconfig.in' to `ftconfig.h.in'. Since we are no longer limited to 8.3 file names, it is simpler to follow the usual conventions for template files. * builds/unix/ftconfig.in: Renamed to... * builds/unix/ftconfig.h.in: ...this. * CMakeLists.txt, builds/unix/configure.raw: Updated. 2020-07-03 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Introduce direct oversampling for overlaps. This implements oversampling to mitigate artifacts in pixels partially covered by overlapping contours. It turns out that the 4x4 oversampling is sufficient but, at least, quadruples the rendering time. The outline has to set FT_OUTLINE_OVERLAP to use this method. * include/freetype/ftimage.h (FT_OUTLINE_OVERLAP): New flag. * src/smooth/ftsmooth.c (ft_smooth_render): Check it to... (ft_smooth_raster_overlap): ... inflate outline and set up direct rendering for oversampling with... (ft_smooth_overlap_spans): ... new span function that integrates them. 2020-07-03 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Use direct rendering mode in Harmony. Instead of rendering 3 bitmaps side by side and reshuffling, we use direct rendering to deliver the bitmaps on each third byte. * src/smooth/ftsmooth.c (ft_smooth_raster_lcd) [!FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Set up direct mode with... (ft_smooth_lcd_spans): ... new span function. 2020-07-03 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Separate LCD paths from gray rendering. This makes `ft_smooth_render' a lot smaller and easier to follow. It also cleanly separates Harmony and ClearType-style LCD rendering algorithms. Now I only wish to move LCD filtering and geometry from FT_Library to FT_Renderer. * src/smooth/ftsmooth.c (ft_smooth_render): Move LCD code from here... (ft_smooth_raster_lcd, ft_smooth_raster_lcdv): ... to here. [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Reorganize #ifdef's. 2020-06-20 Sebastian Rasmussen <sebras@gmail.com> [cff] Fix handling of `style_name == NULL' (#58630). * src/cff/cffobjs.c (cff_face_init): If a call to `cff_strcpy' fails by returning NULL in `cff_face_init', `remove_style' is still called. This means that the NULL pointer is dereferenced, causing a crash. 2020-06-19 Sebastian Rasmussen <sebras@gmail.com> [cff] Fix another two memory leaks (#58629). * src/cff/cffobjs.c (cff_size_init): If a call to `funcs->create' fails to allocate one of the `internal->subfont' variables, make sure to free `internal->topfont' and any successfully allocated subfonts. 2020-06-19 Sebastian Rasmussen <sebras@gmail.com> [psaux] Fix memory leak (#58626). * src/psaux/psstack.c (cf2_stack_init): If `cf2_stack_init' fails to allocate the stack, return error early. 2020-06-19 Sebastian Rasmussen <sebras@gmail.com> [base] Fix memory leak (#58624). * src/base/ftobjs.c (FT_New_Size): Avoid trying to free `size->internal' unless `size' has been allocated. This mistake appeared in the fix for issue #58611. 2020-06-19 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Rework d1180b5f9598 until further notice. * src/base/ftoutln.c (FT_Outline_Get_Orientation): Reject large outlines. 2020-06-19 Sebastian Rasmussen <sebras@gmail.com> [cff, cid] Fix segfaults in case of error (#58621). * src/cff/cffobjs.c (cff_slot_done), src/cid/cidobjs.c (cid_slot_done): If `ft_glyphslot_init' fails to allocate `internal', then the class' `done_slot' callback (called by `ft_glyphslot_done') must not dereference the pointer to `internal'. 2020-06-19 Werner Lemberg <wl@gnu.org> [base] Fix UBSAN error. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=23166 * src/base/ftoutln.c (FT_Outline_Get_Orientation): Avoid values larger than 32 bits. 2020-06-19 Werner Lemberg <wl@gnu.org> [woff2] Fix segfault. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=23402 * src/sfnt/sfwoff2.c (get_x_mins): Check whether `loca' table exists. 2020-06-19 Stephen McDowell <svenevs.dev@gmail.com> [sfnt] Support Intel compilers. * src/sfnt/pngshim.c (premultiply_data): Intel compilers do not currently support `__builtin_shuffle'. 2020-06-19 Sebastian Rasmussen <sebras@gmail.com> [base] Fix memory leak (#58611). * src/base/ftobjs.c (FT_New_Size): When the call to `clazz->init_size' fails, make sure to free `size->internal'. 2020-06-19 Sebastian Rasmussen <sebras@gmail.com> [cff] Fix memory leak (#58610). * src/cff/cffobjs.c (cff_size_init): When the call to `funcs->create' fails, make sure to free `internal'. 2020-06-19 Werner Lemberg <wl@gnu.org> * src/cff/cffload.c (cff_index_get_pointers): Rename `t' to `tbl'. 2020-06-19 Sebastian Rasmussen <sebras@gmail.com> [cff] Free table upon error allocating other data (#58609). * src/cff/cffload.c (cff_index_get_pointers): When new_bytes fails to allocate, make sure to free the table. Do the same for both allocations if there is a later error. 2020-06-13 Werner Lemberg <wl@gnu.org> Remove redundant inclusion of `ft2build.h'. * */*: Remove `#include <ft2build.h>' where possible. * include/freetype/freetype.h: Remove cpp error about missing inclusion of `ft2build.h'. 2020-06-08 David Turner <david@freetype.org> Make macros for header file names optional. We no longer have to take care of the 8.3 file name limit; this allows us (a) to introduce longer, meaningful file names, and (b) to avoid macro names in `#include' lines altogether since some compilers (most notably Visual C++) doesn't support this properly. */*: Replace #include FOO_H with #include <freetype/foo.h> or something similar. Also update the documentation. 2020-06-02 Werner Lemberg <wl@gnu.org> * src/sfnt/ttcmap.c (tt_face_build_cmaps): Trace number of cmaps. 2020-05-18 David Turner <david@freetype.org> Remove obsolete HAVE_STDINT_H probing macro. This macro was updated by the unix configure script and the `CMakeLists.txt' one, but is never used in the source tree (nor is <stdint.h> included anywhere). * CMakeLists.txt, builds/unix/ftconfig.in: Don't handle `HAVE_STDINT_H'. 2020-05-18 David Turner <david@freetype.org> Remove Jamfile files from the tree. These have not been used in a very, very long time, so better remove them. A corresponding patch will be submitted to the `freetype2-demos' repository. * src/Jamfile, src/*/Jamfile, Jamrules: Delete. 2020-05-12 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Turn on LCD filtering during FreeType initialization. * src/smooth/ftsmooth.c (ft_smooth_init): Enable LCD filtering. * include/freetype/ftlcdfil.h: Document it, remove patent warnings. * include/freetype/freetype.h (FT_Render_Mode): Updated. * include/freetype/config/ftoption.h, devel/ftoption.h [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Do not mention patents. 2020-05-11 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Stop using dedicated LCD modules and classes. The LCD modules were never truly independent. They mostly served as a way to disable patented LCD rendering, which is no longer necessary. The `smooth' module now handles LCD modes as well. * src/smooth/ftsmooth.c (ft_smooth_lcd_renderer_class. ft_smooth_lcdv_renderer_class): Deleted. (ft_render_smooth): Reworked from `ft_render_smooth_generic'. * src/smooth/ftsmooth.h: Remove dedicated LCD classes. * src/smooth/module.mk: Remove dedicated LCD modules. * include/freetype/config/ftmodule.h: Ditto. * builds/amiga/include/config/ftmodule.h: Ditto. * include/freetype/ftmodapi.h: Do not mention LCD modules. 2020-05-09 Werner Lemberg <wl@gnu.org> * Version 2.10.2 released. ========================== Tag sources with `VER-2-10-2'. * docs/VERSION.TXT: Add entry for version 2.10.2. * README, Jamfile (RefDoc), src/base/ftver.rc, builds/windows/vc2010/index.html, builds/windows/visualc/index.html, builds/windows/visualce/index.html, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/index.html, docs/freetype-config.1: s/2.10.1/2.10.2/, s/2101/2102/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 2. * builds/unix/configure.raw (version_info): Set to 23:2:17. * CMakeLists.txt (VERSION_PATCH): Set to 2. * docs/CHANGES: Updated. 2020-05-08 Jakub Alba <jalba@vewd.com> * src/truetype/ttinterp.c (TT_RunIns): Adjust loop counter (#58319). The font that exceeds the old limit is Icono Regular, version 1.00000. 2020-05-03 Alexei Podtelezhnikov <apodtele@gmail.com> * builds/freetype.mk: Refactor for readability. 2020-05-02 Alexei Podtelezhnikov <apodtele@gmail.com> [builds] Clean up Windows CE project files. Remove version from filenames that caused a lot of polution in the release process. Use VERSIONINFO resource instead. * builds/wince/vc2005-ce/freetype.vcproj, builds/wince/vc2008-ce/freetype.vcproj, builds/windows/visualce/freetype.vcproj, builds/windows/visualce/freetype.dsp: s/2101//g, but add `ftver.rc'. * builds/wince/vc2008-ce/index.html, builds/wince/vc2005-ce/index.html, builds/windows/visualce/index.html: s/2101//g. 2020-05-01 Alexei Podtelezhnikov <apodtele@gmail.com> * devel/ft2build.h: Override FT_CONFIG_MODULES_H here as well. 2020-05-01 Alexei Podtelezhnikov <apodtele@gmail.com> [builds/unix] Consolidate marco overrides (for the demos to see them). * builds/unix/unix-cc.in (FT_CONFIG_MODULES_H, FT_CONFIG_OPTIONS_H): Override them here... * builds/freetype.mk: ... instead of here. 2020-04-08 Werner Lemberg <wl@gnu.org> Allow setting `CC' in Unix build (#58051). * builds/unix/unix-cc.in (CC): Use `override'. The command line value of `CC' (if any) is stored already in `CCraw'. 2020-04-04 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> [woff2] Return if single stream operation fails. * src/sfnt/sfwoff2.c (get_x_mins): Do it. * src/sfnt/woff2tags.c: Remove unused include. 2020-03-22 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> [docs] Fix building docs if `srcdir' != `builddir'. `docs/reference/*' was moved one directory up in commit 237fed6. * builds/unix/unix-def.in (PIP): Remove variable. * configure: Create `docs' directory and copy assets from `docs/markdown'. * docs/README: Output directory is `reference'. 2020-03-21 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> [docwriter] Drop support for Python < 3.5. Python versions < 3.5 have reached end-of-life and as such, no security or bug fixes will be provided for those versions. See https://devguide.python.org/#status-of-python-branches for more information. * Jamfile (RefDoc): Add `site' parameter. * builds/detect.mk (std_setup): Update Python version requirement. * builds/freetype.mk (refdoc-venv): Use pip as `python -m pip'. * builds/unix/ax_compare_version.m4, builds/unix/ax_prog_python_version.m4: Macros to detect Python version. New files. * builds/unix/configure.raw: Check for Python >= 3.5 and remove check for `pip'. * docs/CHANGES, docs/INSTALL.GNU, docs/README: Updated. 2020-03-02 Moazin Khatti <moazinkhatri@gmail.com> [gzip] Support `gzip' encoded header conditionally. In order to support `gzip' encoded header the call to `inflateInit2' was modified in commit 6a92b1fadde26477a9179. However, this code breaks with the outdated internal version of zlib. This is a temporary fix to conditionally support `gzip' encoded header whenever a system installation of zlib is being used. Problem report in https://lists.nongnu.org/archive/html/freetype-devel/2020-02/msg00023.html * src/gzip/ftgzip.c (FT_Gzip_Uncompress): Change the the call to `inflateInit2' depending on whether the system installation is being used or the internal copy. 2020-02-29 Ben Wagner <bungeman@google.com> [truetype] Fix state of `FT_Face' for buggy `gvar' tables (#57923). By resetting the blend as implemented with this commit fonts with invalid `gvar' tables may keep calling into `ft_var_load_gvar' from `tt_set_mm_blend' and failing, but the font was invalid anyway and we want to keep seeing the failure in `tt_set_mm_blend'. * src/truetype/ttgxvar.c (ft_var_load_gvar): Calculate length of offset array once. Allocate arrays after `FT_FRAME_ENTER' (extra check before allocating and avoid needing to free array later if error entering frame). Always call `FT_FRAME_EXIT'. Consistently set counts immediately after array initialized. Reset the blend (particularly `blend->glyphoffsets') on failure. 2020-03-01 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> [docs] Update docwriter stylesheet. This change is required to support docwriter 1.2.1. See https://github.com/freetype/docwriter/issues/36 for more information. * docs/markdown/stylesheets/extra.css: (.md-typeset code) -> (.md-typeset pre>code) (pre) -> (pre>code) (p, .md-typeset p, h4): Remove commented styles. (table.index): Remove unused styles. 2020-02-28 Ben Wagner <bungeman@google.com> [truetype] Add better checks for loading `gvar' table (#57905). * src/truetype/ttgxvar.c (ft_var_load_gvar): Delay settings of any `blend->xxxcount' values until the corresponding data has been checked. Also do some sanitizing to avoid a too early exit. (TT_Vary_Apply_Glyph_Deltas): Improve tracing message. 2020-02-27 Werner Lemberg <wl@gnu.org> Make `FT_HAS_*' and `FT_IS_*' really return true (#57906). * include/freetype/freetype.h (FT_HAS_*, FT_IS_*): Implement it. 2020-02-25 Dominik Röttsches <drott@chromium.org> Fix for CFF space glyph regression (#57541). * src/psaux/psft.c (cf2_decoder_parse_substrings): Replace early-out with FT_OFFSET. 2020-02-22 Werner Lemberg <wl@gnu.org> [woff2] Fix font table access. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=20778 * src/sfnt/sfwoff2.c (get_x_mins): Explicitly check for presence of `head' table, which might not have been processed yet. 2020-02-21 Werner Lemberg <wl@gnu.org> [psaux] Make `t1_decoder_parse_metrics' handle `op_div' (#57519). * src/psaux/t1decode.c (t1_decoder_parse_metrics): Copy corresponding code from old engine's `t1_decoder_parse_charstrings' function. 2020-02-19 Nikolaus Waxweiler <nikolaus.waxweiler@daltonmaag.com> [autofit] Add support for Hanifi Rohingya script. * src/autofit/afblue.dat: Add blue zone data for Hanifi Rohingya. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Hanifi Rohingya standard character. * src/autofit/afranges.c, src/autofit/afstyles.h: Add Hanifi Rohingya data. 2020-02-19 Werner Lemberg <wl@gnu.org> Require HarfBuzz 1.8. * builds/unix/configure.raw, CMakeLists.txt: Request HarfBuzz 1.8.0 or newer. We are going to add auto-hinter support for Hanifi Rohingya, which was introduced in Unicode 11.0. 2020-02-12 Werner Lemberg <wl@gnu.org> * src/sfnt/ttcmap.c (tt_face_build_cmaps): Ignore version (#57708). 2020-02-04 Werner Lemberg <wl@gnu.org> * src/truetype/ttinterp.c (TT_RunIns): Adjust loop counter (#57732). The font that exceeds the old limit is Constantine, version 1.001. 2020-01-04 Werner Lemberg <wl@gnu.org> [base] Fix `FREETYPE_PROPERTIES=type1:hinting-engine=adobe`. * src/base/ftpsprop.c (ps_property_set) [hinting-engine]: Avoid an incorrect return value that caused a warning. The function did the right thing, though. 2020-01-03 Werner Lemberg <wl@gnu.org> [woff2] Fix memory leaks and a runtime warning. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19773 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=18101 * src/sfnt/sfwoff2.c (compute_ULong_sum): Add missing cast. (reconstruct_hmtx): Add missing deallocation calls. 2020-01-02 Dominik Röttsches <drott@chromium.org> [truetype] Fix UBSan warning on offset to nullptr (#57501). * src/truetype/ttinterp.c (Ins_CALL): Fail if `exc->FDefs' is null. 2019-12-31 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> [woff2] Allow bitmap-only fonts (#57394). * src/sfnt/sfwoff2.c (reconstruct_font): Fix test for `glyf' and `loca' tables. 2019-12-21 Hugh McMaster <hugh.mcmaster@outlook.com> [docs] (2/2) Fix generation of API documentation (#56745). Creating the API Reference in the (new) `reference' sub-directory is consistent with other documentation sub-topics, such as `design', `glyphs' and `tutorial'. This patch fixes broken hyperlinks in the documentation pointing to and from the API Reference. It also allows web assets to load from their relative paths. * builds/freetype.mk (DOC_DIR): Adjust. (refdoc, refdoc-venv): Add `--site' argument. * builds/toplevel.mk (do-dist): Updated. 2019-12-21 Hugh McMaster <hugh.mcmaster@outlook.com> [docs] (1/2) Move static web assets (#56745). * docs/reference/*: Move ... * docs: ... one directory up. 2019-12-21 Dominik Röttsches <drott@chromium.org> Fix more UBSan warnings on adding offset to nullptr (#57432). * src/truetype/ttinterp.c (Ins_LOOPCALL), src/psaux/psft.c (cf2_initLocalRegionBuffer): Use `FT_OFFSET'. 2019-12-16 Werner Lemberg <wl@gnu.org> [truetype] Fix UBSan warnings on adding offsets to nullptr. Reported as https://bugs.chromium.org/p/chromium/issues/detail?id=1032152 * src/truetype/ttinterp.c (Ins_FDEF, Ins_IDEF): Use `FT_OFFSET'. 2019-12-14 Werner Lemberg <wl@gnu.org> [truetype] Fix integer overflow. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19305 * src/truetype/ttinterp.c (Ins_MIRP): Use `ADD_LONG'. 2019-12-13 Werner Lemberg <wl@gnu.org> Another bunch of UBSan warnings on adding offsets to nullptr. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19427 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19433 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19441 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19451 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19452 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19457 * src/autofit/aflatin.c (af_latin_hints_compute_segments, af_latin_hints_compute_edges): Use `FT_OFFSET'. * src/base/ftstream.c (FT_Stream_EnterFrame): Use `FT_OFFSET'. * src/psaux/cffdecode.c (cff_decoder_parse_charstrings): Exit early if there is no charstring. * src/psaux/psobjs.c (t1_decrypt): Use `FT_OFFSET'. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Exit early for zero bitmap dimensions. 2019-12-09 Dominik Röttsches <drott@chromium.org> Fix more UBSan warnings on adding offset to nullptr (#57384). * src/smooth/ftsmooth.c (ft_smooth_render_generic), src/psaux/psobjs.c (ps_table_add): Use `FT_OFFSET'. 2019-12-05 Werner Lemberg <wl@gnu.org> * src/truetype/ttinterp.c (TT_RunIns): Use `FT_OFFSET'. Reported as https://bugs.chromium.org/p/chromium/issues/detail?id=1030614 2019-12-03 Werner Lemberg <wl@gnu.org> More nullptr offset UBSan warnings (#57331, #57347). * src/autofit/afcjk.c (af_cjk_hints_compute_segments), src/psaux/psft.c (cf2_getSeacComponent), src/truetype/ttinterp.c (Ins_UNKNOWN): Use `FT_OFFSET'. 2019-11-29 Dominik Röttsches <drott@chromium.org> Avoid more nullptr offset UBSan warnings (#57316). * src/base/ftoutln.c (FT_Outline_Transform): Bail on empty points. * src/cff/cffload.c (cff_subfont_load): Use `FT_OFFSET'. * src/psaux/psft.c (cf2_decoder_parse_substrings): Early out if `charstring_base' or `charstring_len' are null. * src/sfnt/ttload.c (tt_face_load_name): Use `FT_OFFSET'. 2019-11-23 John Stracke <jstracke@Google.com> [base] Really fix #57194. Apply accidentally missed second part of patch. * src/base/ftgloadr.c (FT_GlyphLoader_CheckPoints): Call `FT_GlyphLoader_CreateExtra'. 2019-11-23 Werner Lemberg <wl@gnu.org> [truetype] Avoid sanitizer warning (#57289). * src/truetype/ttpload.c (tt_face_get_device_metrics): Use `FT_OFFSET'. 2019-11-23 Armin Hasitzka <prince.cherusker@gmail.com> [truetype] Fix integer overflow (#57287). * src/truetype/ttgload.c (compute_glyph_metrics): Use `SUB_LONG'. 2019-11-23 Ben Wagner <bungeman@google.com> [sfnt] Avoid sanitizer warning (#57286). * src/sfnt/ttcmap.c (tt_face_build_cmaps): Avoid possible `NULL + offset' computation. Tag `table' as `const'. 2019-11-23 John Stracke <jstracke@Google.com> Werner Lemberg <wl@gnu.org> [base] Fix `NULL + offset' sanitizer warnings (#57194). * src/base/ftgloadr.c (FT_GlyphLoader_Adjust_Points, FT_GlyphLoader_Adjust_Subglyphs): Use `FT_OFFSET'. (FT_GlyphLoader_CreateExtra): Add short cut if some values are zero. 2019-11-23 Werner Lemberg <wl@gnu.org> * include/freetype/internal/ftmemory.h (FT_OFFSET): New macro. Use this for `base + offset' pointer calculations where `base' can be NULL (triggering a sanitizer warning even if the resulting pointer gets never dereferenced since it is undefined behaviour in C). Suggested by Ben Wagner. 2019-11-23 Ben Wagner <bungeman@google.com> [sfnt] Ensure OTTO fonts have tables (#57285). * src/sfnt/ttload.c (tt_face_load_font_dir): Add test. 2019-11-23 Behdad Esfahbod <behdad@behdad.org> Minor fixes for recent compilers. * src/gzip/infutil.h (inflate_mask): Add `const'. * src/autofit/aflatin2.c: Include `ft2build.h'. 2019-11-07 Nikolaus Waxweiler <madigens@gmail.com> * CMakeLists.txt: Minor additions to the notes, compile builds/unix/ftsystem.c instead of src/base/ftsystem.c on UNIX. The latter change is based on the code proposed by rim in #55235. 2019-10-25 Werner Lemberg <wl@gnu.org> * src/sfnt/sfwoff2.c (woff2_open_font): Check `num_fonts' for TTCs. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=18494 2019-10-22 Werner Lemberg <wl@gnu.org> * src/sfnt/sfwoff2.c (woff2_open_font): Avoid undefined shift. Also improve tracing. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=18390 2019-10-10 Alexei Podtelezhnikov <apodtele@gmail.com> * src/sfnt/pngshim.c (premultiply_data): Optimize for __SSE__ only. 2019-10-10 Werner Lemberg <wl@gnu.org> * src/sfnt/sfwoff2.c (reconstruct_glyf): Check `triplet_size'. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=18108 2019-10-09 John Tytgat <John.Tytgat@esko.com> [cff] Fix FT_FACE_FLAG_GLYPH_NAMES for CFF2 based fonts (#57023). * src/cff/cffobjs.c (cff_face_init): Don't set FT_FACE_FLAG_GLYPH_NAMES for CFF2 based fonts. 2019-10-08 Werner Lemberg <wl@gnu.org> [woff2] Fix SFNT table checks. Also reduce number of SFNT table lookups. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=18065 * include/freetype/internal/wofftypes.h (WOFF2_InfoRec): Add fields `glyf_table', `loca_table', and `head_table'. * src/sfnt/sfwoff2.c (reconstruct_glyf): Update signature. Use table pointers in `info' parameter. (get_x_mins): Check `maxp_table' Use table pointers in `info' parameter. (reconstruct_font): Use and set table pointers in `info' parameter. Fix check for `glyf' and `loca' tables. Update call to `reconstruct_glyf'. (woff2_open_font): Updated. 2019-10-06 Werner Lemberg <wl@gnu.org> * src/sfnt/sfwoff2.c (reconstruct_glyf): Fix reallocation. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=18046 2019-10-06 Werner Lemberg <wl@gnu.org> Improve memory debugging. * include/freetype/internal/ftmemory.h (FT_MEM_FREE): Use `FT_DEBUG_INNER' to set source code file name and line. * src/base/ftdbgmem.c (ft_mem_table_remove): Better formatting of tracing message. 2019-10-03 Werner Lemberg <wl@gnu.org> * src/sfnt/sfwoff2 (reconstruct_font): Fix reallocation. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=17966 2019-10-01 Alexei Podtelezhnikov <apodtele@gmail.com> * src/base/ftstroke.c (ft_stroker_inside): Speed up. 2019-10-01 Werner Lemberg <wl@gnu.org> * src/sfnt/sfwoff2 (woff2_open_font): Initialize `woff2.ttc_fonts'. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=17804 2019-09-30 Werner Lemberg <wl@gnu.org> * src/sfnt/sfwoff2.c (reconstruct_font): Fix memory leak. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=17812 2019-09-30 Werner Lemberg <wl@gnu.org> [woff2] Reject fonts without `head' table. Also fix memory deallocation in case of error. `head' problem reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=17820 * src/sfnt/sfwoff2.c (reconstruct_glyf): Don't use `stream_close'. Abort if `head_table' is NULL. Don't free `transformed_buf' in case of error. (woff2_open_font): Don't set `uncompressed_buf' to NULL. 2019-09-29 Werner Lemberg <wl@gnu.org> [woff2] Fix compiler warnings. Problem reported by Alexei. * src/sfnt/sfwoff2.c (reconstruct_glyf): Initialize `x_min'. (reconstruct_font): Initialize `num_hmetrics'. (woff2_open_font): Initialize `info'. 2019-09-28 Werner Lemberg <wl@gnu.org> * src/sfnt/sfwoff2.c (woff2_open_font): Fix sanity check. Correct thinkos in patch from 2019-09-01. 2019-09-28 Werner Lemberg <wl@gnu.org> [woff2] Fix memory leaks. One of them reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=17766 * src/sfnt/sfwoff2.c (woff2_open_font): Free `info->x_mins' and `woff2->ttc_fonts'. (reconstruct_glyf): Initialize `info->x_mins'. 2019-09-27 Alexei Podtelezhnikov <apodtele@gmail.com> * src/base/ftstroke.c (ft_stroker_cap): Speed up caps. 2019-09-25 Alexei Podtelezhnikov <apodtele@gmail.com> * src/base/ftstroke.c (ft_stroker_outside): Speed up clipped miter. * include/freetype/ftstroke.h: Wordsmith miter docs. 2019-09-25 Werner Lemberg <wl@gnu.org> * src/sfnt/sfwoff2.c (woff2_open_font): Check (sum of) table sizes. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=17684 2019-09-23 Alexei Podtelezhnikov <apodtele@gmail.com> * src/base/ftstroke.c (ft_stroke_border_arcto): Speed up calculations. 2019-09-20 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> [woff2] Fix memory leaks. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16896 * src/sfnt/sfwoff2.c (woff2_open_font): Fix error handling. Free `uncompressed_buf'. (reconstruct_font): Free `transformed_buf'. 2019-09-17 Werner Lemberg <wl@gnu.org> * src/otvalid/otvcommon.c (otv_Coverage_get_last): Guard `count'. Problem reported by Marc Schönefeld <marc.schoenefeld@gmx.org>. 2019-09-17 Werner Lemberg <wl@gnu.org> * src/sfnt/sfwoff2.c (woff2_open_font): Check table index. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=17100 2019-09-15 Avi Halachmi (:avih) <avihpit@yahoo.com> [cmake] Don't fail if brotli is missing (#56894). The libs which cmake controls are commented out at include/freetype/config/ftoption.h and cmake un-comment each enabled library, but the brotli option was not commented out, therefore `FT_CONFIG_OPTION_USE_BROTLI' remained defined even if brotli was missing/disabled/etc. Comment it such that cmake can control it, which means leaving it undefined if brotli is missing. * include/freetype/config/ftoption.h: Fix typo. 2019-09-05 Werner Lemberg <wl@gnu.org> [cmake] Add brotli support. * CMakeLists.txt (FT_WITH_BROTLI): New option. * builds/cmake/FindBrotliDec.cmake: New file. 2019-09-05 Werner Lemberg <wl@gnu.org> Fix handling of `AF_CONFIG_OPTION_INDIC'. * devel/ftoption.h, include/freetype/config/ftoption.h: `AF_CONFIG_OPTION_INDIC' needs `AF_CONFIG_OPTION_CJK'. 2019-09-05 Werner Lemberg <wl@gnu.org> CMakeLists.txt: Fix generation of DLL related stuff (#56852). Extract `version_info' variable from `builds/unix/configure.raw' and use the data to correctly set `LIBRARY_VERSION' and `LIBRARY_SOVERSION'. Also use the data to set `ft_version' field in `freetype2.pc'. Also fix the needed minimum version of HarfBuzz in `freetype2.pc'. 2019-09-03 Werner Lemberg <wl@gnu.org> * src/sfnt/sfwoff2.c (compute_ULong_sum): Fix undefined shift. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16933 2019-09-01 Werner Lemberg <wl@gnu.org> * src/sfnt/sfwoff2.c (woff2_open_font): Add sanity check. Don't trust `totalSfntSize' unconditionally. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16893 2019-08-27 Dominik Röttsches <drott@chromium.org> [woff2] Don't use `FT_UInt64' (#56815). * src/sfnt/sfwoff2.c (woff2_open_font): Use `FT_UInt32' for `file_offset'. This fixes builds on platforms where `FT_LONG64' is not defined while still being sufficient to store a file offset. 2019-08-27 Werner Lemberg <wl@gnu.org> [truetype] Prevent crash in `TT_Set_Named_Instance' (#56813). * src/truetype/ttgxvar.c (TT_Set_Named_Instance): Fix error handling. 2019-08-27 Werner Lemberg <wl@gnu.org> [woff2] Fix compiler warnings. * src/sfnt/sfwoff2.c (read_num_hmetrics): Remove unused argument `table_len'. Update caller. (triplet_decode, compute_bbox, store_loca, reconstruct_glyf): Make `i' variable unsigned. (reconstruct_glyph): Remove condition which is always false. (reconstruct_html): Removed unused argument `transformed_size'. Update caller. * src/sfnt/woff2tags.c (woff2_known_tags): Remove condition which is always false. 2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> [woff2] Check whether known tag is in array bounds. If table tag is not 0x3f, we expect a value between 0 and 62. If this is not the case, exit with errors. * src/sfnt/sfwoff2/c: Check whether table tag makes sense. * src/sfnt/woff2tags.c: Return 0 if tag is out of bounds. 2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> * src/sfnt/sfwoff2.c: Improve trace comments. Adjust tracing levels for comments, and more formatting. 2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> [woff2] Support `hmtx' reconstruction when `glyf' is untransformed. `reconstruct_hmtx' requires `info->x_mins' and `info->num_glyphs' to reconstruct the hmtx table. In case glyf is not transformed, we call `get_x_mins' which does the necessary work. * src/sfnt/sfwoff2.c (get_x_mins): New function. (reconstruct_font): Call get_x_mins. 2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> [sfnt] Support `face->num_faces' for WOFF2 fonts. Set correct value of `face->num_faces' for WOFF2 fonts. This is being handled separately because we only load the tables for the requested font face in `woff2_open_font' and create a single-face sfnt stream. The full discussion is at: https://lists.gnu.org/archive/html/freetype-devel/2019-08/msg00000.html * src/sfnt/sfobjs.c (sfnt_open_font): Add parameter `woff2_num_faces'. (sfnt_init_face): Introduce variable `woff2_num_faces', and change `face->root.num_faces' if `woff2_num_faces' is set. * src/sfnt/sfwoff2.c (woff2_open_font): Validate requested face index and handle negative face indices. * src/sfnt/sfwoff2.h (woff2_open_font): Add parameter `num_faces' to declaration. 2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> [woff2] Improve memory and error handling. Free up memory after use, and improve error handling. * src/sfnt/sfwoff2.c (reconstruct_font, woff2_open_font): Implement changes. 2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> [woff2] Avoid too many calls to `FT_REALLOC'. We do this by using `totalSfntSize' as an initial reference, and extending the buffer when required. This reduces rendering time considerably. * include/freetype/internal/wofftypes.h (WOFF2_HeaderRec): Add `totalSfntSize', rename `total_sfnt_size' to `actual_sfnt_size'. * src/sfnt/sfwoff2.c (write_buf): Add parameter `dst_size' to keep track of and update total size of stream. (WRITE_SFNT_BUF, WRITE_SFNT_BUF_AT): Modify macros accordingly. (pad4, store_loca, reconstruct_glyf, reconstruct_hmtx, reconstruct_font): Update parameters to accept `sfnt_size'. (woff2_open_font): Add variable `sfnt_size'. Use WOFF2 header field `totalSfntSize' as initial reference (if value makes sense) and allocate `totalSfntSize' bytes for the sfnt stream. `write_buf' handles reallocation if and when required. Also resize the stream to `actual_sfnt_size' after reconstruction. 2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> [woff2] Reconstruct `loca', `hmtx', and swap out stream. Add necessary functions to reconstruct loca and hmtx tables (the two remaining tables that can have a transform). `woff2_open_font' is now capable of loading a woff2 font face. This code may still need more refining and better memory management. * include/freetype/internal/wofftypes.h (WOFF2_HeaderRec): Add total (final) size of sfnt stream. (WOFF2_InfoRec): Add header checksum value. * src/sfnt/sfobjs.c (sfnt_open_font): Change `face_instance_index' parameter to its pointer so its value can be modified by `woff2_open_font'. * src/sfnt/sfwoff2.c: (WRITE_SFNT_BUF_AT): New macro to write into sfnt buffer at given position. (write_buf): Add parameter `extend_buf' which allows caller to specify whether buffer should be reallocated before copying data. (WRITE_SFNT_BUF): Updated. (pad4, store_loca, reconstruct_htmx): New functions. (reconstruct_glyf): Calculate loca values and store them. (reconstruct_font): Call `reconstruct_hmtx', write table record entries, and calculate table checksums. Also calculate font checksum and update `checksumAdjustment' entry in head table. (woff2_open_font): Open stream for sfnt buffer, swap out input stream and return. * src/sfnt/sfwoff2.h (woff2_open_font): Modify parameter to accept pointer to `face_index'. 2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> [woff2] Reconstruct transformed `glyf' table. Reconstruct `glyf' table if it is transformed in the uncompressed table stream. Also add necessary structures, macros and functions. * include/freetype/internal/wofftypes.h (WOFF2_InfoRec, WOFF2_SubstreamRec, WOFF2_PointRec): New structures. (WOFF2_TableRec): s/OrigLength/dst_length/. * src/sfnt/sfwoff2.c (READ_255USHORT, READ_BASE128): Use `FT_SET_ERROR' to set implicit `error' variable. (WRITE_SHORT): New macro. (N_CONTOUR_STREAM, N_POINTS_STREAM, FLAG_STREAM, GLYPH_STREAM, COMPOSITE_STREAM, BBOX_STREAM, INSTRUCTION_STREAM): New macros to refer to substreams of the transformed `glyf' tables. (Read255UShort, ReadBase128): Return errors set by `FT_READ_XXX' macros. (with_sign, safe_int_addition): New functions to add sign to values based on a flag and perform safe addition respectively. (triplet_decode): Decode variable-length (flag, xCoordinate, yCoordinate) triplet for a simple glyph. See https://www.w3.org/TR/WOFF2/#triplet_decoding (store_points, compute_bbox, composteGlyph_size, reconstruct_glyf): New functions. (reconstruct_font): Call `reconstruct_glyf'. * src/sfnt/sfwoff2.h: Add required constants. * src/sfnt/woff2tags.h: Move out constants to `sfwoff2.h'. 2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> [woff2] Copy un-transformed tables to sfnt stream. Copy un-transformed tables to the sfnt stream. * src/sfnt/sfwoff2.c: (WRITE_SFNT_BUF): New macro. (write_buf): New function. Extend memory of `dst' buffer and copy bytes from `src'. (compute_ULong_sum): New function. Calculate checksum of table. (reconstruct_font): Change `FT_Byte* sfnt' to `FT_Byte** sfnt_bytes'. This has been done because we reallocate memory to `sfnt' multiple times, which may change the pointer value of `sfnt'. This new pointer must be propogated back to the caller. Same reason for using a double pointer in `write_buf'. * src/sfnt/woff2tags.h (WOFF2_DEFAULT_MAX_SIZE): New macro used for overflow checking. 2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> [woff2] Create stream for uncompressed buffer. Uncompressed buffer is now an `FT_Stream'. Perform basic checks and start iterating over tables. * src/sfnt/sfwoff2.c (stream_close, find_table, read_num_hmetrics): New functions. (reconstruct_font): Modify parameters and iterate over tables. (woff2_open_font): Updated. 2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> [woff2] Handle TTCs and start reconstructing font. We `handle' TTCs by modifying the `indices' array to point to only those tables that are part of the requested `face_index'. Set and use `num_tables' in `WOFF2_TtcFont'. * src/sfnt/sfwoff2.c (reconstruct_font): New function. (woff2_open_font): Start reconstruction of font. 2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> [woff2] Get known tags from function. Change `KnownTags' to a function (`woff2_known_tags'). This avoids introducing a global constant array. This function returns the specified index without *any* checks. The caller must ensure that `index' is within array limits. * src/sfnt/sfwoff2.c (woff2_open_font): Change `KnownTags[...]' notation to `woff2_known_tags( ... )'. * src/sfnt/woff2tags.c: Perform changes. * src/sfnt/woff2tags.h: Update definitions. 2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> [woff2] Minor. * src/sfnt/sfwoff2.c (woff2_uncompress): Add error message (woff2_open_font): Free `uncompressed_buf'. 2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> [woff2] Uncompress Brotli streams and `face_index' support. WOFF2 compressed stream is now uncompressed if Brotli is available. This data is stored in a separate buffer (uncompressed_buf) because it does not contain direct table data. Certain tables have transformations applied to them, and they must be reconstructed before we can write those tables to the SFNT stream. `face_index' is now being passed as a parameter to `woff2_open_font'. * src/sfnt/sfobjs.c (sfnt_open_font): Add parameter `face_instance_index'. * src/sfnt/sfwoff2.c (woff2_uncompress): New function. (woff2_open_font): Call `woff2_uncompress'. (compute_first_table_offset): Fix return type. * src/sfnt/sfwoff2.h (woff2_open_font): Modify declaration. 2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> * builds/unix/configure.raw: Change argument name to `brotli'. 2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> Add Brotli dependency and required checks. Brotli is required for decompressing WOFF2 font directory streams. The library is thus being added as an optional dependency for FreeType. * builds/unix/configure.raw: Add checks for `libbrotlidec'. (REQUIRES_PRIVATE, LIBS_PRIVATE, LIBSSTATIC_CONFIG): Updated. * devel/ftoption.h, include/freetype/config/ftoption.h (FT_CONFIG_OPTION_USE_BROTLI): New macro. 2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> [woff2] Write SFNT Offset table. * src/sfnt/sfwoff2.c (WRITE_USHORT, WRITE_ULONG): New macros. (compare_tags): New function. (woff2_open_font): Implement it. 2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> * src/sfnt/sfwoff2.c: #undef macros. 2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> [woff2] Read table and collection directory. * include/freetype/internal/wofftypes.h (WOFF2_TtcFontRec): New structure. (WOFF2_HeaderRec): Add more fields. * src/sfnt/sfwoff2.c (READ_255USHORT, READ_BASE128, ROUND4): New macros. (Read255UShort, CollectionHeaderSize, compute_first_table_offset): New functions. (ReadBase128): Use `FT_READ_BYTE'. (woff2_open_font): Add functionality to read table directory and collection directory (if present). 2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> [sfnt] Include `woff2tags.c' for building. * src/sfnt/rules.mk (SFNT_DRV_SRC): Add `woff2tags.c'. * src/sfnt/sfnt.c: Include `woff2tags.c'. 2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> [sfnt] Add WOFF2 constants. Add constants required for WOFF2, and known table tags as defined in the specification. See https://www.w3.org/TR/WOFF2/#table_dir_format for details. * src/sfnt/woff2tags.c, src/sfnt/woff2tags.h: New files. 2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> [sfnt] Read WOFF 2 header. Check for WOFF2 tag, call `woff2_open_font', and implement it to read header according to specification. * include/freetype/internal/fttrace.h: Add `sfwoff2.c'. * src/sfnt/rules.mk (SFNT_DRV_SRC): Add `sfwoff2.c'. * src/sfnt/sfnt.c: Include `sfwoff2.c'. * src/sfnt/sfobjs.c (sfnt_open_font): Check for `wOF2' tag and call `woff2_open_font'. * src/sfnt/sfwoff2.c, src/sfnt/sfwoff2.h: New files. 2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> Add structures for WOFF2. Add structures and macro for WOFF 2 header and table directory. * include/freetype/internal/wofftypes.h (WOFF2_HeaderRec, WOFF2_TableRec_): New structures. * include/freetype/tttags.h (TTAG_wOF2): New macro. 2019-08-26 Werner Lemberg <wl@gnu.org> * src/psaux/cffdecode.c (cff_operator_seac): Fix numeric overflow. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16470 2019-08-26 Werner Lemberg <wl@gnu.org> [type1] Fix `FT_Get_Var_Axis_Flags' (#56804). * src/type1/t1load.c (T1_Get_MM_Var): Allocate space for axis flags. Also remove redundant assignment. 2019-07-24 Alexei Podtelezhnikov <apodtele@gmail.com> * src/base/ftbbox.c (cubic_peak): Sanitize left shift (#56586). 2019-07-22 Weiyi Wu <w1w2y3@gmail.com> * src/cid/cidload.c (cid_hex_to_binary): Fix typo (#56653). 2019-07-12 Werner Lemberg <wl@gnu.org> [sfnt, winfonts] Avoid memory leaks in case of error (#56587). * src/sfnt/sfwoff.c (woff_open_font): Call `FT_FRAME_EXIT' in case of error. * src/winfonts/winfnt.c (fnt_face_get_dll_font): Ditto. 2019-07-12 Ben Wagner <bungeman@google.com> Properly handle phantom points for variation fonts (#56601). * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Scale phantom points if HVAR and/or VVAR is present. 2019-07-04 Werner Lemberg <wl@gnu.org> [psaux] (2/2) Handle fonts that use SEAC for ligatures (#56580). The same as previous commit but for the old engine. * src/psaux/t1decode.c (t1operator_seac): Implement it. 2019-07-04 Chris Liddell <chris.liddell@artifex.com> [psaux] (1/2) Handle fonts that use SEAC for ligatures (#56580). As originally intended, a Type 1 SEAC charstring would be used for an accented glyph (like `acaron' or `uumlaut'), where the advance width of the SEAC glyph is the same as that of the `base' glyph (like `a' or `u'). In this case it is not uncommon for the SEAC glyph to not use an (H)SBW opcode of its own but to rely on the value from the base glyph. However, out-of-spec fonts also use SEAC glyphs for ligatures (like `oe' or `fi'), and in those cases the overall advance width is greater than that of the `base' glyph. For this reason we have to allow that the SEAC glyph can have an (H)SBW value of its own, and if it has, retain this value, rather than the one from the base glyph. * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_escSEAC>: Implement it. 2019-07-01 Werner Lemberg <wl@gnu.org> * Version 2.10.1 released. ========================== Tag sources with `VER-2-10-1'. * docs/VERSION.TXT: Add entry for version 2.10.1. * README, Jamfile (RefDoc), src/base/ftver.rc, builds/windows/vc2010/freetype.vcxproj, builds/windows/vc2010/index.html, builds/windows/visualc/freetype.dsp, builds/windows/visualc/freetype.vcproj, builds/windows/visualc/index.html, builds/windows/visualce/freetype.dsp, builds/windows/visualce/freetype.vcproj, builds/windows/visualce/index.html, builds/wince/vc2005-ce/freetype.vcproj, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/freetype.vcproj, builds/wince/vc2008-ce/index.html: s/2.10.0/2.10.1/, s/2100/2101/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1. * builds/unix/configure.raw (version_info): Set to 23:1:17. * CMakeLists.txt (VERSION_PATCH): Set to 1. * include/freetype/fterrors.h (FT_Error_String): Fix C++ compilation. 2019-06-26 Alexei Podtelezhnikov <apodtele@gmail.com> * src/bdf/bdfdrivr.c (bdf_cmap_char_{index,next}): Fix inequality. Reported by Armin Hasitzka. 2019-06-16 Werner Lemberg <wl@gnu.org> * src/tools/apinames.c: Formatting, minor edits. 2019-06-16 Werner Lemberg <wl@gnu.org> [autofit] Disable hinting if no blue zones are available (#56450). * src/autofit/afglobal.c (af_face_global_get_metrics): Start again (with dummy hinter module) if no blue zones are present. * src/autofit/aflatin.c (af_latin_metrics_init_blues): Change signature to return error code. If no blue zones are found, update `glyph_styles' array to hold AF_STYLE_NONE_DFLT instead of the current style. (af_latin_metrics_init): Return internal error code if no blue zones are found. 2019-06-16 Werner Lemberg <wl@gnu.org> Towards better VMS support. More to come. * builds/vms/LIBS.OPT_IA64, builds/vms/_LINK.OPT_IA64, builds/vms/vmslib.dat: New files provided by Jouk Jansen <joukj@hrem.nano.tudelft.nl>. * builds/vms/ftconfig.h: Update, also from Jouk. 2019-06-13 Werner Lemberg <wl@gnu.org> * src/autofit/aflatin.c (af_latin_metrics_init_widths): Minor. 2019-06-13 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Restore the span buffering for direct mode only. The buffer size FT_MAX_GRAY_SPANS is set to 10 spans, which should be enough to cover the entire scanline for simple glyphs in most cases: each slightly slanted edge needs up to two spans, plus a filling span in-between. This is not new, we used to do it before cb4388783cecc. * src/smooth/ftgrays.c (gray_TWorker): Add `spans' and `num_spans'. (gray_hline, gray_sweep): Implement the span buffering. (gray_raster_render): Use negative `num_spans' to avoid the direct mode. 2019-06-12 Alexei Podtelezhnikov <apodtele@gmail.com> * include/freetype/ftmodapi.h (FT_DebugHook_Func): Return error. Fix a warning by adding a return value as in `TT_RunIns', which should not be a compatibility issue. 2019-06-11 Alexei Podtelezhnikov <apodtele@gmail.com> * src/truetype/ttobjs.c (tt_check_trickyness_family): Add `const'. 2019-06-11 Moazin Khatti <moazinkhatri@gmail.com> [gzip] Add support for `gzip' encoded header. * src/gzip/ftgzip.c (FT_Gzip_Uncompress): Modify the the call to `inflateInit2' to enable support for `gzip' encoded headers. 2019-06-10 Alexei Podtelezhnikov <apodtele@gmail.com> [type1,type42] Use `const' for string literals. * include/freetype/internal/psaux.h (PS_Table_FuncsRec): Updated. * include/freetype/internal/t1types.h (T1_EncodingRec): Updated. * src/psaux/psobjs.[ch] (ps_table_add): Updated. * src/type1/t1load.c (T1_Open_Face, parse_encoding): Updated. * src/type42/t42objs.c (T42_Open_Face): Updated. * src/type42/t42parse.c (t42_parse_encoding): Updated. * src/cff/cffobjs.c (cff_face_init): Minor. 2019-06-10 Alexei Podtelezhnikov <apodtele@gmail.com> [bdf,pcf] Use `const' for string literals. * src/bdf/bdf.h (bdf_property_t): Updated `name'. * src/bdf/bdflib.c (_bdf_list_split,bdf_create_property, _bdf_add_property,_bdf_ato*): Updated. * src/bdf/bdfdrivr.c (bdf_interpret_style): Updated. * src/pcf/pcfread.c (pcf_intrpret_style): Ditto. 2019-06-07 Philip Race <philip.race@oracle.com> * src/base/ftinit.c (FT_Set_Default_Properties): Fix crash. Terminate loop at end of environment. 2019-05-31 Alexei Podtelezhnikov <apodtele@gmail.com> Solidify VC2005 builds. * include/freetype/internal/ftcalc.h (FT_MSB) [_MSC_VER]: Explicitly declare `_BitScanReverse' intrinsic. * builds/windows/visualc/freetype.vcproj [Debug]: Disable intrinsics. 2019-05-30 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> [sfnt] Separate WOFF sources and headers. Move WOFF sources and headers to separate files. * include/freetype/internal/wofftypes.h, src/sfnt/sfwoff.c, src/sfnt/sfwoff.h: New files. * include/freetype/internal/fttrace.h: Register `sfwoff.c'. * include/freetype/internal/internal.h: Define FT_INTERNAL_WOFF_TYPES_H. * include/freetype/internal/sfnt.h: Include FT_INTERNAL_WOFF_TYPES_H. * include/freetype/internal/tttypes.h: Move out WOFF structures. * src/sfnt/rules.mk: Add `sfwoff.c'. * src/sfnt/sfnt.c: Include `sfwoff.c'. * src/sfnt/sfobjs.c: Include `sfwoff.h', move out WOFF sources. 2019-05-30 Werner Lemberg <wl@gnu.org> [base] Fix `make multi'. Reported by Nikhil. * src/base/fterrors.c: Include FT_INTERNAL_DEBUG_H. 2019-05-29 Ben Wagner <bungeman@google.com> [truetype] Fix copy-and-paste error (#56409). * src/truetype/ttgload.c (load_truetype_glyph): Use correct indices into `unrounded' array for phantom points. 2019-05-29 Werner Lemberg <wl@gnu.org> [truetype] Fix 32bit builds (#56404). Patch suggested by Ben Wagner <bungeman@google.com>. * src/truetype/ttgxvar.c (FT_fixedToInt, FT_fixedToFdot6): Remove harmful cast to unsigned type. 2019-05-26 Ben Wagner <bungeman@google.com> * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Improve accuracy. 2019-05-23 Werner Lemberg <wl@gnu.org> [truetype] Draw glyphs without deltas in variation font (#56374). * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Always fill `unrounded' array. 2019-05-21 Werner Lemberg <wl@gnu.org> * src/truetype/ttinterp.c (opcode_name): Improve mnemonics. 2019-05-16 Werner Lemberg <wl@gnu.org> [truetype] Actually scale varied CVT values. Up to now, only the unscaled CVT values were varied; in other words, the `CVAR' data was never used for bytecode hinting. * src/truetype/ttgxvar.c (tt_cvt_ready_iterator): New auxiliary function. (tt_face_vary_cvt): Use it to trigger rescaling of CVT values. 2019-05-16 Werner Lemberg <wl@gnu.org> [truetype] Use 26.6 format for storing unscaled CVT values. If `CVAR' data is applied to variation fonts, fractional values are possible. * include/freetype/internal/tttypes.h (TT_FaceRec): Change type of `cvt' from `FT_Short' to `FT_Int32'. * src/truetype/ttgxvar.c (FT_fdot6ToFixed): New macro. (tt_face_vary_cvt): Use it to update code to 26.6 format. * src/truetype/ttobjs.c (tt_size_run_prep): Update code to 26.6 format. * src/truetype/ttpload.c (tt_face_load_cvt): Stora data in 26.6 format. 2019-05-16 Werner Lemberg <wl@gnu.org> * src/truetype/ttgload.c (load_truetype_glyph): Init `unrounded'. This fixes linear advance width values for spacing glyphs. Bug introduced 2019-05-09. 2019-05-16 Werner Lemberg <wl@gnu.org> [truetype] Avoid code duplication. * src/truetype/ttobjs.c (tt_size_run_prep): Scale CVT values in this function. (tt_size_ready_bytecode): Updated. * src/truetype/ttgload.c (tt_loader_init): Updated. 2019-05-13 Jouk Jansen <joukj@hrem.nano.tudelft.nl> * vms_make.com: Updated. Handle `bzip2' directory, too. 2019-05-13 Werner Lemberg <wl@gnu.org> * src/psaux/psfont.c (cf2_font_setup): Fix compiler warning. 2019-05-12 Werner Lemberg <wl@gnu.org> [truetype] Doh. Fix last commit to make it work. Very embarassing :-) Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14701 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14705 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14710 * src/truetype/ttgload.c (IS_DEFAULT_INSTANCE): Move up and add argument; update all callers. (TT_Process_Simple_Glyph): Use it. The `unrounded' array is active for variation fonts only, thus also enclose related code with `#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT ... #endif' where necessary. Revert commit a113e5d from 2019-05-09, and don't use `extra_points2' but allocate a temporary array. Speed up the scaling of the `unrounded' array. * src/truetype/ttgxvar.c (FT_fixedToInt, FT_FixedToFdot6): Fix type conversions and rounding. The unsigned type must have more or equal bits to the signed type. 2019-05-09 Werner Lemberg <wl@gnu.org> [truetype] Increase precision of font variation (#54371). This patch makes FreeType use font units in 26.6 format internally instead of integers. * src/truetype/ttgxvar.c (FT_fixedToFdot6): New macro. (TT_Vary_Apply_Glyph_Deltas): Add argument to output unrounded font coordinates. * src/truetype/ttgxvar.h: Updated. * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Use `extra_points2' array to temporarily hold unrounded point coordinates; use them to compute scaled coordinates and linear advance width and height. (load_truetype_code): Adjust similarly. 2019-05-09 Werner Lemberg <wl@gnu.org> * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Minor. 2019-05-08 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Faster fractions. * src/smooth/ftgrays.c (SUBPIXELS): Replace with... (FRACT): A fractional coordinate macro to use in... (gray_render_line, gray_render_scanline): ... here. 2019-05-07 Alexei Podtelezhnikov <apodtele@gmail.com> * src/raster/ftraster.c (Draw_Sweep): Unbreak. 2019-05-05 Alexei Podtelezhnikov <apodtele@gmail.com> * src/raster/ftraster.c: Clean-ups. 2019-05-05 Werner Lemberg <wl@gnu.org> * src/truetype/ttgxvar.c: More use of `FT_fdot14ToFixed'. 2019-05-04 Alexei Podtelezhnikov <apodtele@gmail.com> * src/smooth/ftgrays.c (gray_render_line): Small shortcut. 2019-05-04 Werner Lemberg <wl@gnu.org> Various clang 8.0 static analyzer fixes. Reported by Sender Ghost <lightside@gmx.com>. * src/autofit/afcjk.c (af_cjk_hints_compute_edges): Catch a corner case where `edge->first' could be NULL. * src/pfr/pfrobjs.c (pfr_slot_load): Remove unnecessary test of `size'. * src/raster/ftraster.c (Draw_Sweep): Catch a corner case where `draw_right' might be NULL. * src/sfnt/ttmtx.c (tt_face_get_metrics): Fix limit test for `aadvance'. Ensure `abearing' always hold a meaningful result. * src/truetype/ttgload.c (load_truetype_glyph): Ensure `subglyph' is not NULL before accessing it. * src/truetype/ttgxvar.c (TT_Set_Named_Instance): Remove unnecessary test of `namedstyle'. * src/type42/t42parse.c (t42_parser_done): Ensure `parser->root.funcs.done' is not NULL before accessing it. 2019-05-03 Alexei Podtelezhnikov <apodtele@gmail.com> Miscellaneous macro updates. * src/base/ftoutln.c (SCALED): Updated. * src/smooth/ftgrays.c (SCALED): Ditto. (FLOOR, ROUND, CEILING): Removed. * src/psaux/psfixed.h (cf2_fracToFixed): Updated. 2019-05-02 Alexei Podtelezhnikov <apodtele@gmail.com> Tweak LCD filtering. * src/base/ftlcdfil.c (ft_lcd_filter_fir, _ft_lcd_filter_legacy): Choose direction from bitmap's pixel_mode. * include/freetype/internal/ftobjs.c (FT_Bitmap_LcdFilterFunc): Updated. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Updated. 2019-05-02 Werner Lemberg <wl@gnu.org> * vms_make.com: Updated (#56253). Remove no longer existing directories (`autohint', `otlayout'). Update used base extensions. Activate `autofit' module. Add `gxvalid' module. Update copyright notices. 2019-04-29 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Simplify cubic Bézier flattening. The previous implementation is correct but it is too complex. The revised algorithm is based on the fact that each split moves the control points closer to the trisection points on the chord. The corresponding distances are good surrogates for the curve deviation from the straight line. This cubic flattening algorithm is somewhat similar to the conic algorithm based the distance from the control point to the middle of the chord. The cubic distances, however, decrease less predictably but are easy enough to calculate on each step. The new algorithm produces slightly larger number of splits, which is compensated by its simplicity. The overall rendering performance is improved by 1-2%. The larger number of splits does not necessarily result in higher quality, which stays comparable. * src/smooth/ftgrays.c (gray_render_cubic): Replace the split condition. 2019-04-26 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Bithacks and cosmetics. * src/smooth/ftgrays.c (gray_record_cell, gray_set_cell, gray_hline, gray_render_conic, gray_convert_glyph_inner): Updated. 2019-04-25 Alexei Podtelezhnikov <apodtele@gmail.com> Optimize Bézier bisections. This change makes bisections faster by 20-30%. When inlined into `gray_render_cubic', this makes the function faster by 10% and is noticeable in the overall rendering performance. * src/raster/ftraster.c (Split_Conic, Split_Cubic): Use shifts and refactor. * src/smooth/ftgrays.c (gray_split_conic, gray_split_cubic): Ditto. * src/base/ftstroke.c (ft_conic_split, ft_cubic_split): Ditto. * src/base/ftbbox.c (cubic_peak): Use shifts. 2019-04-23 Werner Lemberg <wl@gnu.org> * src/sfnt/ttcmap.c (tt_cmap12_next): Remove dead code. Found by clang 8.0's static analyzer and reported by Sender Ghost <lightside@gmx.com>. 2019-04-23 Werner Lemberg <wl@gnu.org> [base] Fix thinko in previous commit. * src/base/ftbitmap.c (FT_Bitmap_Blend): Check final width, not target pitch. Problem reported by Sender Ghost <lightside@gmx.com>. 2019-04-22 Werner Lemberg <wl@gnu.org> * src/base/ftbitmap.c (FT_Bitmap_Blend): Check target pitch. Problem reported by Sender Ghost <lightside@gmx.com>. 2019-04-22 Werner Lemberg <wl@gnu.org> Fix return value of `FT_Set_Named_Instance' (#56186). * src/truetype/ttgxvar.c (TT_Set_Named_Instance): Correctly handle internal return value -1 of `TT_Set_Var_Design'. 2019-04-18 Werner Lemberg <wl@gnu.org> [pcf] Fix handling of undefined glyph (#56067). This commit fixes the changes from 2018-07-21, which broke charmap iteration. We now add the default character as a new glyph with index 0, thus increasing the number of glyphs by one (as before). * src/pcf/pcfread.c (pcf_get_metrics): Adjust to new artificial glyph with index 0. Limit number of elements to 65534. (pcf_get_bitmaps): Ditto. Unify two loops into one; this avoids allocation of an intermediate array. (pcf_get_encodings): Don't flip indices but copy glyph metrics of default character to index 0. Also handle invalid default character. * docs/CHANGES: Updated. 2019-04-15 Minmin Gong <gongminmin@msn.com> * CMakeLists.txt: Avoid rewriting of unchanged configuration files. Reported as https://savannah.nongnu.org/patch/index.php?9755 2019-04-15 JDG <JonathanG@iQmetrix.com> * src/tools/apinames.c (main): Fix error message. Reported as https://savannah.nongnu.org/patch/?9796 2019-04-11 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Fix segfault in direct mode (#56092). * src/base/ftoutln.c (FT_Outline_Render): Set missing clip_box for direct mode. * src/smooth/ftgrays.c (gray_raster_render): Use it. 2019-04-06 Werner Lemberg <wl@gnu.org> * src/sfnt/ttcmap.c (tt_get_glyph_name): Pacify compiler (#56061). This is for Visual Studio 2019 on ARM. 2019-04-06 Werner Lemberg <wl@gnu.org> For distribution, replace `.tar.bz2' with `.tar.xz' bundles. * builds/toplevel.mk (build): Do it. * README, docs/CHANGES, docs/release: Updated. 2019-04-06 Antony Lee <anntzer.lee@gmail.com> Make `glyph_name' parameter to `FT_Get_Name_Index' a `const'. * include/freetype/freetype.h (FT_Get_Name_Index), include/freetype/internal/ftobjs.h (FT_Face_GetGlyphNameIndexFunc), include/freetype/internal/services/svgldict.h (FT_GlyphDict_NameIndexFunc), src/base/ftobjs.c (FT_Get_Name_Index), src/cff/cffdrivr.c (cff_get_name_index), src/sfnt/sfdriver.c (sfnt_get_name_index), src/type1/t1driver.c (t1_get_name_index), src/type42/t42drivr.c (t42_get_name_index): Add `const' to second argument. 2019-03-31 Armin Hasitzka <prince.cherusker@gmail.com> [cff] Fix boundary checks. 642bc7590c701c8cd35a9f60fa899cfa518b17ff introduced dynamically allocated memory when parsing CFF files with the "old" engine. Bounds checks have never been updated, however, leading to pointless comparisons of pointers in some cases. This commit presents a solution for bounds checks in the CFF module with an extended logic for the "old" engine while staying as concise as possible for the "new" one. * src/cff/cffparse.h: Introduce the struct `CFF_T2_StringRec' and the additional field `t2_strings' within `CFF_ParserRec'. * src/cff/cffparse.c (cff_parser_within_limits): Move all boundary checks into this new function and update the rest of `cffparse.c' to use it. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=12137 2019-03-20 Werner Lemberg <wl@gnu.org> [autofit] Fix Mongolian blue zone characters. * src/autofit/afblue.dat: Use U+200D (ZERO-WIDTH JOINER) characters to get medial forms for some Mongolian characters. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. 2019-03-19 Werner Lemberg <wl@gnu.org> [autofit] Add support for Mongolian script. As a de-facto standard, layouts using this script are constructed horizontally line by line, then the lines are rotated clockwise for vertical display. * src/autofit/afblue.dat: Add blue zone data for Mongolian. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Mongolian standard characters. * src/autofit/afranges.c, src/autofit/afstyles.h: Add Mongolian data. 2019-03-15 Werner Lemberg <wl@gnu.org> * Version 2.10.0 released. ========================== Tag sources with `VER-2-10-0'. * docs/VERSION.TXT: Add entry for version 2.10.0. * docs/CHANGES: Updated. * README, Jamfile (RefDoc), src/base/ftver.rc, builds/windows/vc2010/freetype.vcxproj, builds/windows/vc2010/index.html, builds/windows/visualc/freetype.dsp, builds/windows/visualc/freetype.vcproj, builds/windows/visualc/index.html, builds/windows/visualce/freetype.dsp, builds/windows/visualce/freetype.vcproj, builds/windows/visualce/index.html, builds/wince/vc2005-ce/freetype.vcproj, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/freetype.vcproj, builds/wince/vc2008-ce/index.html: s/2.9.1/2.10.0/, s/291/2100/. * include/freetype/freetype.h (FREETYPE_MINOR): Set to 10. (FREETYPE_PATCH): Set to 0. * builds/unix/configure.raw (version_info): Set to 23:0:17. * CMakeLists.txt (VERSION_MINOR): Set to 10. (VERSION_PATCH): Set to 0. * builds/toplevel.mk (version, winversion): Since the minor version number has two digits now, never omit the patch number. We would get ambiguous zip file names otherwise. (dist): Remove remnants of `docmaker' tool. (do-dist): Remove unused intermediate files. * src/cff/cffparse.c (destrict_c2s_item): Guard function with CFF_CONFIG_OPTION_OLD_ENGINE macro. 2019-03-07 Andrei Alexeyev <0x416b617269@gmail.com> Werner Lemberg <wl@gnu.org> Fix invalid function pointer casts. This change should allow Freetype to work on WASM/Emscripten without needing `-s EMULATE_FUNCTION_POINTER_CASTS=1'. * src/autofit/afdummy.c (af_dummy_hints_apply): Fix signature. * src/cid/cidload.c (cid_parse_font_matrix, parse_fd_array, parse_expansion_factor, parse_font_name): Return `void', not `FT_Error'. * include/freetype/internal/ftobjs.h (FT_CMap_CharVarIsDefaultFunc): Fix signature. 2019-03-05 Werner Lemberg <wl@gnu.org> [base] Handle numeric overflow (#55827). * src/base/ftglyph.c (FT_Glyph_Get_CBox): Use `FT_PIX_CEIL_LONG'. 2019-03-05 Sebastian Rasmussen <sebras@gmail.com> [psaux] Fix use of uninitialized memory (#55832). * src/psaux/psintrp.c (cf2_interpT2CharString): The call to `cf2_arrstack_setCount' may fail because the allocator ran out of memory. When this happens the stack is still written to before the error condition is checked. This means that FreeType writes outside of allocated memory. This commit moves the error check prior to the stack assignment, hence the function now properly returns with an error condition. 2019-02-23 Werner Lemberg <wl@gnu.org> * src/base/ftbitmap.c (FT_Bitmap_Blend): No fractional offsets. The function only provided a framework without an actual implementation, which this commit removes. 2019-02-23 Werner Lemberg <wl@gnu.org> * src/tools/update-copyright-year: Insert `(C)'. 2019-02-21 Armin Hasitzka <prince.cherusker@gmail.com> [truetype] Mask numeric overflows. * src/truetype/ttinterp.c (Move_CVT, Move_CVT_Stretched, Ins_MIRP): Mask numeric overflows. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11681 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11734 2019-02-21 Armin Hasitzka <prince.cherusker@gmail.com> [psaux] Mask numeric overflow. * src/psaux/cffdecode.c (cff_decoder_parse_charstrings): Mask numeric overflow. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13041 2019-02-16 Wink Saville <wink@saville.com> * src/autofit/afwarp.h (af_warper_compute): Fix declaration. 2019-02-02 Nikolaus Waxweiler <madigens@gmail.com> [truetype] Apply MVAR hasc, hdsc and hlgp metrics to current FT_Face metrics. Instead of setting typo or win metrics as the new `FT_Face' metrics indiscriminately, apply only typo deltas to the currently active `FT_Face' metrics. This prevents line height differences when the default outlines were used as the regular face and instances for everything else, for example. * src/truetype/ttgxvar.c (tt_apply_mvar): Implement. 2019-02-02 Nikolaus Waxweiler <madigens@gmail.com> [sfnt] Use typo metrics if OS/2 fsSelection USE_TYPO_METRICS bit is set. If the `OS/2' table exists and `fsSelection' bit 7 (USE_TYPO_METRICS) is set, use the `sTypo*' set of values to compute the `FT_Face's ascender, descender, and height. Otherwise, fall back to old behavior. * src/sfnt/sfobjs.c (sfnt_load_face): Implement. 2019-01-18 John Tytgat <John.Tytgat@esko.com> [sfnt] Handle TT fonts having two PostScript font names (#55471). * src/sfnt/sfdriver.c (sfnt_get_name_id): Prefer English over any other language found for PostScript font names. 2019-01-08 Chris Liddell <chris.liddell@artifex.com> [psaux] Fix closepath (#55414). All of the Type 1 path building is done with code common to the revised CFF engine, with the exception of closepath, which was still calling ps_builder_close_contour(), thus previously cached segments were not always written to the path, and glyph corruption, or even invalid outlines were possible. * src/psauc/psinterp.c (cf2_interpT2CharString) <cf2_cmdCLOSEPATH>: Switch to calling `cf2_glyphpath_closeOpenPath'. 2018-12-29 Werner Lemberg <wl@gnu.org> * src/autofit/aflatin2.c: Some fixes from `aflatin.c' (#55310). 2018-12-25 Werner Lemberg <wl@gnu.org> * src/psaux/cffdecode.c (cff_operaor_seac): Fix numeric overflow. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11915 2018-12-12 Werner Lemberg <wl@gnu.org> [gxvalid] Fix compiler warnings. * src/gxvalid/gxvjust.c (gxv_just_check_max_gid), src/gxvalid/gxvmort.c (gxv_mort_coverage_validate): Use `FT_UNUSED'. 2018-12-11 Werner Lemberg <wl@gnu.org> * src/truetype/ttgload.c (TT_Hint_Glyph): Remove useless test. `control_len' only gets its value from `n_ins' (and vice versa), which is always read as `unsigned short' and thus can't be larger than 0xFFFF. 2018-12-04 Werner Lemberg <wl@gnu.org> [bdf] Ignore data after `ENDFONT'. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10798 * src/bdf/bdflib.c (_bdf_parse_end): New function. (_bdf_parse_glyphs): Switch to `_bdf_parse_end' after `ENDFONT' has been encountered. 2018-12-02 Alexei Podtelezhnikov <apodtele@gmail.com> * builds/windows/visualc/freetype.dsp: Dust off. 2018-11-27 Alexei Podtelezhnikov <apodtele@gmail.com> * builds/windows/vc2010/freetype.vcxproj: Simplify. 2018-11-27 Chris Liddell <chris.liddell@artifex.com> [type1,cff] Add FT_{Set,Get}_MM_WeightVector API calls. For multiple master fonts, common usage (in Postscript) is to modify the WeightVector of an existing font instance, this addition supports that use. * include/freetype/ftmm.h, src/base/ftmm.c (FT_Set_MM_WeightVector, FT_Get_MM_WeightVector): New API functions. * include/freetype/internalservices/svmm.h (FT_Set_MM_WeightVector_Func, FT_Get_MM_WeightVector_Func): New function types. (MultiMasters): Add `set_mm_weightvector' and `get_mm_weightvector' members. (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated. * src/cffcffdrivr.c (cff_set_mm_weightvector, cff_get_mm_weightvector): New functions. (cff_service_multi_masters): Register them. * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated. This driver doesn't use the new interface. * src/type1/t1load.c (T1_Set_MM_WeightVector, T1_Get_MM_WeightVector): New functions. * src/type1/t1driver.c (t1_service_multi_masters): Register them. * src/type1/t1load.h: Updated. 2018-11-27 Ben Wagner <bungeman@google.com> [cff] Fix compiler warning (#55105). * src/cff/cffparse.c (cff_parser_run): Guard label only used if CFF_CONFIG_OPTION_OLD_ENGINE is active. 2018-11-27 Ben Wagner <bungeman@google.com> [truetype] Fix numeric overflow (#55103). * src/truetype/ttgload.c (compute_glyph_metrics): Use `SUB_LONG'. 2018-11-25 Alexei Podtelezhnikov <apodtele@gmail.com> [builds] Belated DLL support with vc2002-vc2008. The solution and project files should be automatically upgraded for the approriate Visual C++ version. * builds/windows/visualc/freetype.{sln,vcproj}: Major upgrades. * builds/windows/visualc/index.html: Document the change. * builds/windows/vc2005, builds/windows/vc2008: Removed as redundant. 2018-11-22 Armin Hasitzka <prince.cherusker@gmail.com> * src/cff/cffparse.c: Please the compiler. 2018-11-22 Armin Hasitzka <prince.cherusker@gmail.com> [cff] Fix memory overflow. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9869 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10869 * src/cff/cffparse.c (destruct_t2s_item, cff_parser_run): Store evaluated T2 charstrings in separately allocated memory. 2018-11-18 Alexei Podtelezhnikov <apodtele@gmail.com> * builds/windows/{visualc,vc2005,vc2008}/freetype.vcproj: Fix it. 2018-11-10 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Placeholder only for library-enabled LCD filtering. * src/smooth/ftsmooth.c (ft_smooth_init): Add disabled `FT_Library_SetLcdFilter' call. 2018-11-09 Young Xiao <yangx92@hotmail.com> [psaux] Add safety guard (#54985). * src/psaux/psobjs.c (cff_builder_close_contour): Do it. 2018-11-08 Alexei Podtelezhnikov <apodtele@gmail.com> * builds/unix/configure.raw: Require `windows.h' for windres. 2018-11-08 Alexei Podtelezhnikov <apodtele@gmail.com> [ftstroke] Fix unpredictable failures (#54986). * src/base/ftstroke.c (ft_sroke_border_lineto): Fix lineto check. 2018-11-08 Alexei Podtelezhnikov <apodtele@gmail.com> [ftstroke] Fix unpredictable failures (#54976). * src/base/ftstroke.c (ft_sroke_border_close): Set the start tags. 2018-11-07 Ben Wagner <bungeman@google.com> [truetype] Fix VF check from 2018-09-12 (#54973). * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Use correct offsets for estimates. 2018-11-06 Werner Lemberg <wl@gnu.org> [pshinter] Fix numeric overflow. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11242 * src/pshinter/pshrec.c (ps_dimension_add_t1stem): Implement it. 2018-11-06 Werner Lemberg <wl@gnu.org> [psaux] Fix timeout in old CFF engine. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11260 * src/psaux/cffdecode.c (cff_decoder_parse_charstrings) <cff_op_sqrt> [CFF_CONFIG_OPTION_OLD_ENGINE]: Fix potential endless loop. 2018-11-04 Alexei Podtelezhnikov <apodtele@gmail.com> * src/truetype/ttgxvar.c: Use enum definitions. 2018-11-03 Alexei Podtelezhnikov <apodtele@gmail.com> * src/truetype/ttgxvar.c (ft_var_apply_tuple): Adjust condition. 2018-11-03 Alexei Podtelezhnikov <apodtele@gmail.com> * src/truetype/ttgxvar.c (ft_var_apply_tuple): Tracing tweaks. 2018-11-03 Alexei Podtelezhnikov <apodtele@gmail.com> Revert due to specs: [truetype] Speed up variation IUP. 2018-11-02 Alexei Podtelezhnikov <apodtele@gmail.com> * src/truetype/ttgxvar.c (ft_var_get_item_delta): Fixed logic. Reported and tested by Behdad. 2018-11-02 Shailesh Mistry <shailesh.mistry@hotmail.co.uk> [autofit] Prevent SEGV. See https://bugs.ghostscript.com/show_bug.cgi?id=697545 for more details on how the bug was found. * src/autofit/afloader.c (af_loader_load_glyph): Propagate error code. 2018-10-31 Alexei Podtelezhnikov <apodtele@gmail.com> [truetype] Speed up variation IUP. * src/truetype/ttgxvar.c (tt_delta_interpolate): Separate trivial snapping to the same position from true interpolation. 2018-10-31 Alexei Podtelezhnikov <apodtele@gmail.com> * src/type1/t1load.c (t1_set_mm_blend): Optimized. 2018-10-31 Alexei Podtelezhnikov <apodtele@gmail.com> * src/truetype/ttgxvar.c (ft_var_get_item_delta): Optimized. 2018-10-29 Werner Lemberg <wl@gnu.org> [base] Fix numeric overflow. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11080 * src/base/ftoutln.c (FT_Outline_Get_Orientation): Use `MUL_LONG'. 2018-10-29 Werner Lemberg <wl@gnu.org> [cff] Fix numeric overflow. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10988 * src/cff/cffparse.c (cff_parser_run) [CFF_CONFIG_OPTION_OLD_ENGINE]: Use `NEG_LONG'. 2018-10-27 Alexei Podtelezhnikov <apodtele@gmail.com> [sfnt] Make `head' timestamps unsigned. It's been more than 2^31 seconds since 1904. * include/freetype/tttables.h (TT_Header): Change field types. * src/sfnt/ttload.c (tt_face_load_generic_header): Updated. 2018-10-27 Alexei Podtelezhnikov <apodtele@gmail.com> Revert: Align FreeType with standard C memory management. 2018-10-27 Werner Lemberg <wl@gnu.org> [psaux] Fix numeric overflow. Triggered by https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11157 * src/psaux/cffdecode.c (cff_decoder_parse_charstrings) <cff_op_blend> [CFF_CONFIG_OPTION_OLD_ENGINE]: Fix integer overflow. 2018-10-20 Werner Lemberg <wl@gnu.org> Avoid endless loop while tracing (#54858). * src/type1/t1load.c (parse_buildchar): Guard tracing stuff with FT_DEBUG_LEVEL_TRACE. 2018-10-17 David Demelier <markand@malikania.fr> * CMakeLists.txt: Specify `RUNTIME DESTINATION'. This is needed for DLL builds. 2018-10-07 Werner Lemberg <wl@gnu.org> A missing Unicode cmap is not a fatal error. This is a follow-up to the previous commit. * src/cff/cffobjs.c (cff_face_init), src/sfnt/sfobjs.c (sfnt_load_face), src/type1/t1objs.c (T1_Face_Init), src/type42/t42objs.c (T42_Face_Init): Implement it. 2018-10-07 Werner Lemberg <wl@gnu.org> Fix handling of FT_CONFIG_OPTION_ADOBE_GLYPH_LIST (#54794). * src/cff/cffcmap.c (cff_cmap_unicode_init), src/psaux/t1cmap.c (t1_cmap_unicode_init), src/sfnt/ttcmap.c (tt_cmap_unicode_init): Check `unicodes_init' field. 2018-10-03 Werner Lemberg <wl@gnu.org> [ftgrays] Fix typo in stand-alone mode (#54771). * src/smooth/ftgrays.c (FT_THROW) [STANDALONE_ && FT_DEBUG_LEVEL_TRACE]: Fix call to `FT_ERR_CAT'. 2018-10-02 Werner Lemberg <wl@gnu.org> [psaux] Fix segfault. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10768 * src/psaux/cffdecode.c (cff_decoder_parse_charstrings) <cff_op_callothersubr> [CFF_CONFIG_OPTION_OLD_ENGINE]: Check argument. 2018-10-02 Werner Lemberg <wl@gnu.org> [psaux] Fix numeric overflow. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10740 * src/psaux/cffdecode.c (cff_decoder_parse_charstrings) <cff_op_roll> [CFF_CONFIG_OPTION_OLD_ENGINE]: Use NEG_INT. 2018-10-02 Werner Lemberg <wl@gnu.org> [pshinter] Handle numeric overflow. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10550 * src/pshinter/pshglob.c (psh_blues_snap_stem): Mask numeric overflow. 2018-09-27 Alexei Podtelezhnikov <apodtele@gmail.com> Align FreeType with standard C memory management. * include/freetype/ftsystem.h: Include FT_TYPES_H. (*FT_Alloc_Func, *FT_Realloc_Func): Use size_t for the size arguments. * src/raster/ftmisc.h: Ditto. * builds/amiga/src/base/ftsystem.c, builds/unix/ftsystem.c, * builds/vms/ftsystem.c, src/base/ftsystem.c (ft_alloc, ft_realloc): Use size_t for the size arguments. * src/base/ftdbgmem.c (ft_mem_debug_alloc, ft_mem_debug_realloc): Use FT_Offset, aka size_t, for the size arguments. 2018-09-25 Werner Lemberg <wl@gnu.org> Fix handling of `FT_Bool'. Before this commit we had code like (FT_Bool)( globals->glyph_styles[gindex] & 0x8000) Since `FT_Bool' is defined to be an `unsigned char', the code evaluated to something like (unsigned char)( 0x8532 & 0x8000) which in turn expanded to (unsigned char)( 0x8000) and finally yielded 0x00 – i.e., false – not as expected. Problem reported and analyzed by Tony Smith <tony.smith@macro4.com>. * include/freetype/fttypes.h (FT_BOOL): Add a comparison against zero so that we always have a Boolean expression. */*: Replace castings to `FT_Bool' with calls to `FT_BOOL' where possible. 2018-09-23 Alexei Podtelezhnikov <apodtele@gmail.com> [bdf] Speed up charmap access. This makes FT_Get_Char_Index and FT_Get_Next_Char 4-5 times faster. * src/bdf/bdfdrivr.c (bdf_cmap_char_{index,next}): Help binary search with continuous prediction. 2018-09-22 Alexei Podtelezhnikov <apodtele@gmail.com> * src/base/ftobjs.c (ft_glyphslot_preset_bimap): Another tweak. This one should be clearer. When the rounded monochrome bbox collapses we add a pixel that covers most if not all original cbox. 2018-09-21 Alexei Podtelezhnikov <apodtele@gmail.com> * src/base/ftobjs.c (ft_glyphslot_preset_bimap): Further tweak. 2018-09-21 Ben Wagner <bungeman@google.com> Improve auto-hinter handling of bitmap fonts (#54681). For bitmap fonts, `FT_Load_Glyph' should either return an error or not set the format to `FT_GLYPH_FORMAT_OUTLINE'. However, in this case `FT_Load_Glyph' calls into the auto-hinter which calls back into `FT_Load_Glyph' with `FT_LOAD_NO_SCALE' in the flags, which marks the glyph as `FT_GLYPH_FORMAT_OUTLINE' with an empty path (even though it doesn't have any path). It appears that the auto-hinter should not be called when the face doesn't have outlines. The current test for using the auto-hinter in `FT_Load_Glyph' checks whether the driver supports scalable outlines, but not if the face supports scalable outlines. * src/base/ftobjs.c (FT_Load_Glyph): Directly check whether we have scalable outlines. 2018-09-21 Werner Lemberg <wl@gnu.org> [raster] Fix disappearing vertical lines (#54589). * src/raster/ftraster.c (Vertical_Sweep_Span): Handle special case where both left and right outline exactly pass pixel centers. 2018-09-20 Alexei Podtelezhnikov <apodtele@gmail.com> * src/base/ftobjs.c (ft_glyphslot_preset_bimap): Tiny rounding tweak. This adds pixels in case a contour goes through the center and they need to be turned on in the b/w rasterizer. 2018-09-20 Alexei Podtelezhnikov <apodtele@gmail.com> [pcf] Replace charmap implementation. PCF comes with charmap lookup table, aka PCF encodings. Using it directly makes FT_Get_Char_Index and FT_Get_Next_Char 4-5 times faster than the original BDF-like binary searches. * src/pcf/pcf.h (PCF_EncodingRec): Removed. (PCF_FaceRec): Remove `nencodings' and `encodings'. * src/pcf/pcfdrivr.c (pcf_cmap_char_{index,next}): Replaced. * src/pcf/pcfread.c (pcf_get_encodings): Store data differently. 2018-09-20 Werner Lemberg <wl@gnu.org> [base] Remove unused function `FT_GlyphLoader_CopyPoints'. * include/freetype/internal/ftgloadr.h, src/base/ftgloadr.c (FT_GlyphLoader_CopyPoints): Do it. 2018-09-19 Alexei Podtelezhnikov <apodtele@gmail.com> [pcf] Prepare to replace charmap implementation. * src/pcf/pcf.h (PCF_FaceRec): Updated to include... (PCF_EncRec): ... this new structure to store charmap geometry. * src/pcf/pcfread.c (pcf_get_encodings): Store charmap geometry. 2018-09-18 Alexei Podtelezhnikov <apodtele@gmail.com> Remove unused fields. * src/pcf.h (PCF_FaceRec): Remove `charmap' and `charmap_handle'. * src/bdfdrvr.h (BDF_FaceRec): Ditto. * src/winfonts/winfnt.h (FNT_FaceRec): Ditto. 2018-09-17 Werner Lemberg <wl@gnu.org> [pshinter] Handle numeric overflow. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10396 * src/pshinter/pshglob.c: Include FT_INTERNAL_CALC_H. (psh_blues_snap_stem): Mask numeric overflow. 2018-09-13 Werner Lemberg <wl@gnu.org> [truetype] Some fixes for VF checks. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10317 * src/truetype/ttgxvar.c (ft_var_load_gvar): Properly exit memory frame if we have invalid glyph variation data offsets. (tt_face_vary_cvt): Protect against missing `tuplecoords' array. Fix typo. 2018-09-13 Werner Lemberg <wl@gnu.org> * src/sfnt/sfdriver.c (sfnt_get_var_ps_name): Fix last commit. 2018-09-13 Werner Lemberg <wl@gnu.org> * src/sfnt/sfdriver.c (sfnt_get_var_ps_name): Check `result'. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10316 2018-09-12 John Tytgat <John.Tytgat@esko.com> [sfnt] Better PS name handling (#54629). * src/sfnt/sfdriver (IS_WIN, IS_APPLE): Omit language ID checks. (get_win_string, get_apple_string): Return NULL when the PostScript font name characters is not according to specification. (get_win_string): Make trace output work if the high byte if non-zero. (sfnt_get_var_ps_name, sfnt_get_ps_name): Previously we preferred Win PS name (when there is also an Apple PS name); change this into a fallback to Apple PS name in case the Win PS name is invalid. 2018-09-12 Werner Lemberg <wl@gnu.org> [truetype] Improve VF check. Triggered by https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10255 * src/truetype/ttgxvar.c (ft_var_load_gvar): Use better limit check for `tupleCount'. 2018-09-12 Werner Lemberg <wl@gnu.org> * src/truetype/ttgxvar.c (ft_var_load_gvar): Check `glyphoffsets'. 2018-09-10 Armin Hasitzka <prince.cherusker@gmail.com> * src/pshinter/pshrec.c (t2_hints_stems): Mask numeric overflow. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10215 2018-09-09 Ben Wagner <bungeman@google.com> * builds/freetype.mk (refdoc-venv): Ensure python version (#54631). 2018-09-07 Werner Lemberg <wl@gnu.org> [truetype] Fix assertion failure. Triggered by https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10212 * src/truetype/ttgload.c (load_truetype_glyph): Reintroduce `opened_frame' (removed in a change from 2018-08-26) to handle deallocation of the second frame. 2018-09-05 Werner Lemberg <wl@gnu.org> Synchronize `ftdebug.c' files. * builds/amiga/src/base/ftdebug.c, builds/wince/ftdebug.c, builds/windows/ftdebug.c: Synchronize with `src/base/ftdebug.c'. 2018-09-05 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> Add documentation guidelines file. * docs/DOCGUIDE: New file. 2018-09-04 Werner Lemberg <wl@gnu.org> * devel/ftoption.h: Synchronize with master `ftoption.h'. 2018-09-03 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> [docwriter] Don't break code snippets accross lines. Reported as https://lists.nongnu.org/archive/html/freetype-devel/2018-08/msg00124.html * docs/reference/markdown/stylesheets/extra.css (.md-typeset code): Add rule `white-space'. 2018-09-03 Werner Lemberg <wl@gnu.org> */*: s/PSNames/psnames/. Only tracing messages are affected. 2018-09-03 Werner Lemberg <wl@gnu.org> [sfnt] Fix heap buffer overflow in CPAL handling. * src/sfnt/ttcpal.c (tt_face_palette_set): Fix boundary test. (tt_face_load_cpal): Updated. 2018-09-01 Werner Lemberg <wl@gnu.org> Remove `FT_Outline_{New,Done}_Internal'. These public API functions(!) were always undocumented and have escaped all clean-up efforts until now. * include/freetype/ftoutln.h (FT_Outline_New_Internal, FT_Outline_Done_Internal): Removed. * src/base/ftoutln.h (FT_Outline_New_Internal, FT_Outline_Done_Internal): Merge into... (FT_Outline_New, FT_Outline_Done): ... these functions. * docs/README: Updated. 2018-08-30 Alexei Podtelezhnikov <apodtele@gmail.com> * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Check glyph format. 2018-08-31 Armin Hasitzka <prince.cherusker@gmail.com> [errors] Refine the macro logic surrounding `FT_Error_String'. * include/freetype/fterrors.h (FT_INCLUDE_ERR_PROTOS, FT_ERR_PROTOS_DEFINED): Undefine `FT_INCLUDE_ERR_PROTOS' after checking it and introduce a new macro that takes proper care of multiple-inclusion protection. 2018-08-31 Werner Lemberg <wl@gnu.org> * src/base/ftdebug.c (FT_Throw): Restore missing `FT_UNUSED' calls. 2018-08-31 Werner Lemberg <wl@gnu.org> * src/base/ftdebug.c (FT_Throw): Reduce chattiness. 2018-08-31 Werner Lemberg <wl@gnu.org> * src/autofit/afhints.c (af_glyph_hints_reload): Add initialization. 2018-08-30 Alexei Podtelezhnikov <apodtele@gmail.com> Consolidate bitmap presetting and size assessment. * include/freetype/internal/ftobjs.h (ft_glyphslot_preset_bitmap): Change return type. * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Return the bitmap size assessment. * src/raster/ftrend1.c (ft_raster1_render): Use it to refuse the rendering of enourmous or far-fetched outlines. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Ditto. 2018-08-30 Alexei Podtelezhnikov <apodtele@gmail.com> * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Correct mono. 2018-08-30 Armin Hasitzka <prince.cherusker@gmail.com> [errors] Introduce a macro to control `FT_Error_String'. * devel/ftoption.h (FT_CONFIG_OPTION_ERROR_STRINGS), include/freetype/config/ftoption.h (FT_CONFIG_OPTION_ERROR_STRINGS): New macro. 2018-08-30 Armin Hasitzka <prince.cherusker@gmail.com> [errors] Introduce `FT_Error_String'. * include/freetype/fterrors.h (FT_Error_String), src/base/fterrors.c (FT_Error_String): Implement `FT_Error_String'. * src/base/ftbase.c, src/base/Jamfile (_source), src/base/rules.mk (BASE_SRC): Add `fterrors.c' to the build logic. * src/base/ftdebug.c (FT_Throw): Use `FT_Error_String'. 2018-08-30 Werner Lemberg <wl@gnu.org> [autofit] Trace `before' and `after' edges of strong points. * src/autofit/afhints.h (AF_PointRec) [FT_DEBUG_AUTOFIT]: New arrays `before' and `after'. * src/autofit/afhints.c (af_get_strong_edge_index): New auxiliary function. (af_glyph_hints_dump_points): Trace `before' and `after' edges. (af_glyph_hints_align_strong_points) [FT_DEBUG_AUTOFIT]: Set `before' and `after' information. 2018-08-30 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Overflow-resistant bitmap presetting. * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Implement it. 2018-08-29 Armin Hasitzka <prince.cherusker@gmail.com> Fix numeric overflows. * src/pshint/pshalgo.c (psh_hint_align, psh_hint_align_light, psh_hint_table_find_strong_points): Fix numeric overflows. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10083 2018-08-29 Werner Lemberg <wl@gnu.org> [cff] Fix handling of `roll' op in old engine. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10080 * src/psaux/cffdecode.c (cff_decoder_parse_charstrings) <cff_op_roll> [CFF_CONFIG_OPTION_OLD_ENGINE]: Use modulo for loop count, as documented in the specification. 2018-08-26 Werner Lemberg <wl@gnu.org> * src/truetype/ttobjs.c (tt_size_read_bytecode): Trace CVT values. 2018-08-26 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> * configure: Copy assets required by docwriter. Copy directory `docs/reference/markdown' when FreeType is compiled in a different directory. Fixes `make refdoc' if builddir != srcdir. Reported as https://lists.nongnu.org/archive/html/freetype-devel/2018-08/msg00083.html 2018-08-26 Werner Lemberg <wl@gnu.org> * src/pshint/pshalgo.c (psh_hint_overlap): Fix numeric overflow. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10057 2018-08-26 Werner Lemberg <wl@gnu.org> Minor tracing adjustments. * src/base/ftstream.c (FT_Stream_EnterFrame, FT_Stream_ExitFrame): Trace. * src/truetype/ttgload.c (TT_Access_Glyph_Frame): Remove tracing. 2018-08-26 Werner Lemberg <wl@gnu.org> [truetype] Avoid nested frames. Triggered by https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10054 * src/truetype/ttgload.c (load_truetype_glyph): Don't use variable `opened_frame' to trace whether a frame must be closed at the end of function: This fails because `TT_Vary_Apply_Glyph_Deltas' (which gets called for space glyphs) uses a frame by itself. Instead, close the frame after loading the header, then use another frame for the remaining part of the glyph later on. Also avoid calling `tt_get_metrics' twice under some circumstances. 2018-08-26 Werner Lemberg <wl@gnu.org> Various minor clean-ups. * src/base/ftapi.c: Remove. Unused. * src/base/Jamfile (_sources): Updated. * src/base/ftstream.c (FT_Stream_ReleaseFrame): Remove redundant code. 2018-08-25 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> Convert documentation markup to Markdown. It is the result of a GSoC 2018 project; this separate ChangeLog commit covers the last four commits ae5d1a4cec37557f31aec270332cfe886a62f9a0 53c69ce04faed3dcc68ca0f54cb8d703d8babf69 195728d5ba38f34fb2c2c20807c01656f2f59b66 c962db28ea59225f0105c03d907d4a9b71765687 * docs/reference/markdown/images/favico.ico, docs/reference/markdown/javascripts/extra.js, docs/reference/markdown/stylesheets/extra.css: New files. * docs/reference/.gitignore, docs/reference/README: Updated. * src/tools/docmaker/*: Removed. It has been replaced with `docwriter', a python package available at https://pypi.org/project/docwriter/ * Jamfile: Updated. * builds/ansi/ansi-def.mk, builds/beos/beos-def.mk, builds/dos/dos-def.mk, builds/os2/os2-def.mk (BIN), builds/unix/unixddef.mk, builds/windows/win32-def.mk: New variable. * builds/unix/configure.raw: Check for `python' and `pip'. If not present, warn that `make refdoc' will fail. * builds/unix/unix-def.in (PYTHON, PIP, BIN): New variables. * builds/freetype.mk (PYTHON, PIP, VENV_NAME, VENV_DIR, ENV_PYTHON, ENV_PIP): New variables. (refdoc): Updated. (refdoc-venv): New target. (.PHONY): Updated. 2018-08-23 Werner Lemberg <wl@gnu.org> Add macros for handling over-/underflowing `FT_Int64' values. * include/freetype/internal/ftcalc.h (ADD_INT64, SUB_INT64, MUL_INT64, DIV_INT64) [FT_LONG64]: New macros. * src/base/ftcalc.c (ft_corner_orientation) [FT_LONG64]: Use `SUB_INT64' and `MUL_INT64'. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10028 2018-08-22 Werner Lemberg <wl@gnu.org> [truetype] Improve legibility of `glyf' parsing. * src/truetype/ttgload.c (ON_CURVE_POINT, X_SHORT_VECTOR, Y_SHORT_VECTOR, REPEAT_FLAG, X_POSITIVE, SAME_X, Y_POSITIVE, SAME_Y, OVERLAP_SIMPLE): New macros. (TT_Load_Simple_Glyph): Use new macros to make code more readable. Remove useless adjustment of `outline->tags' elements. 2018-08-21 Werner Lemberg <wl@gnu.org> * src/sfnt/ttcpal.c (tt_face_load_cpal): Add missing safety check. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9981 2018-08-18 Werner Lemberg <wl@gnu.org> [psaux] Avoid slow PS font parsing in case of error. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9955 * src/psaux/psobjs.c (ps_parser_to_bytes): Set `parser->cursor' even in case of error to avoid potential re-scanning. 2018-08-18 Werner Lemberg <wl@gnu.org> [cff] Fix heap buffer overflow in old engine. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9967 * src/psaux/cffdecode.c (cff_decoder_parse_charstrings) <cff_op_blend> [CFF_CONFIG_OPTION_OLD_ENGINE]: `num_designs' must be non-zero. 2018-08-16 Young Xiao <yangx92@hotmail.com> * builds/mac/ftmac.c (parse_fond): Fix buffer overrun. Reported as bug #54515, duplicate of #43540. 2018-08-16 Werner Lemberg <wl@gnu.org> * builds/*/ftsystem.c (FT_COMPONENT): Updated also. 2018-08-15 Alexei Podtelezhnikov <apodtele@gmail.com> [bdf] Don't track duplicate encodings. There is no harm except some umbiguity in broken fonts with duplicate encodings. * src/bdf/bdflib.c (_bdf_parse_glyphs): Remove duplicate tracking. (_bdf_parse_t): Remove large `have' bitfield. 2018-08-15 Werner Lemberg <wl@gnu.org> Don't use `trace_' prefix for FT_COMPONENT arguments. * include/freetype/internal/ftdebug.h (FT_TRACE_COMP, FT_TRACE_COMP_): New auxiliary macros to add `trace_' prefix. (FT_TRACE): Use `FT_TRACE_COMP'. */* (FT_COMPONENT): Updated. 2018-08-14 Werner Lemberg <wl@gnu.org> Use formatting string in FT_TRACEX calls for non-simple arguments. * src/psaux/cffdecode.c (cff_decoder_parse_charstrings) <cff_op_hstem, cff_op_hintmask, cff_op_hlineto, cff_op_vhcurveto>: Do it. * src/psaux/pshints.c (cf2_hintmap_build): Ditto. * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_cmdHSTEM, cf2_cmdVSTEM, cf2_cmdHLINETO, cf2_cmdRRCURVETO, cf2_cmdCALLSUBR, cf2_escHSTEM3, cf2_cmdHINTMASK, cf2_cmdHVCURVETO>: Ditto. * src/truetype/ttinterp.c (TT_RunIns): Ditto. 2018-08-14 Alexei Podtelezhnikov <apodtele@gmail.com> [bdf] Remove unused fields. * src/bdf/bdf.h (bdf_font_t): Remove `nmod', `umod', and `modified', which were set but never used. * src/bdf/bdflib.c (_bdf_parse_{glyphs,properties}, bdf_load_font): Updated accordingly. 2018-08-14 Werner Lemberg <wl@gnu.org> [cff] Fix another segv in old engine. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9872 * src/psaux/cffdecode.c (cff_decoder_parse_charstrings) [CFF_CONFIG_OPTION_OLD_ENGINE]: Disallow invalid T1 opcodes in dictionaries. 2018-08-14 Werner Lemberg <wl@gnu.org> [cff] Fix missing error handling. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9865 * src/psaux/cffparse.c (cff_parser_run) [CFF_CONFIG_OPTION_OLD_ENGINE]: Don't ignore return value of `parse_charstrings_old'. 2018-08-14 Alexei Podtelezhnikov <apodtele@gmail.com> [bdf] Remove unused overflow storage. * src/bdf/bdf.h (bdf_glyphlist_t): Remove this type. (bdf_font_t): Remove `overflow' field. * src/bdf/bdflib.c (bdf_free_font): Remove `overflow' freeing. 2018-08-14 Werner Lemberg <wl@gnu.org> [cff] Fix segv in old engine. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9864 * src/psaux/cffdecode.c (cff_decoder_parse_charstrings) <cff_op_random> [CFF_CONFIG_OPTION_OLD_ENGINE]: Use top dict's `random' field directly if parsing dictionaries. 2018-08-13 Alexei Podtelezhnikov <apodtele@gmail.com> [bdf] Use unsigned types. * src/bdf/bdf.h (bdf_glyph_t): Unsign `encoding'. (bdf_font_t): Unsign `default_char'. * src/bdf/bdfdrivr.h (BDF_encoding_el): Unsign `enc'. * src/bdf/bdflib.c (_bdf_add_property, _bdf_parse_glyphs, _bdf_parse_start): Updated accordingly. * src/bdf/bdfdrivr.c (bdf_cmap_char_{index,next}): Ditto. 2018-08-13 Werner Lemberg <wl@gnu.org> * src/type42/t42parse.c (t42_parse_sfnts): One more format check. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9832 2018-08-11 Werner Lemberg <wl@gnu.org> * src/base/ftcalc.c (FT_Matrix_Check): Fix integer overflow. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9811 2018-08-10 Alexei Podtelezhnikov <apodtele@gmail.com> * src/sfnt/ttsbit.c (tt_sbit_decoder_load_compound): Follow specs. 2018-08-10 Ben Wagner <bungeman@google.com> * src/sfnt/sfobjs.c (sfnt_done_face): Fix memory leak (#54435). 2018-08-10 Werner Lemberg <wl@gnu.org> * src/base/ftobjs.c (FT_Render_Glyph_Internal): Improve tracing. 2018-08-10 Werner Lemberg <wl@gnu.org> Fix clang warnings. * src/base/ftdebug.c (ft_trace_level_enabled, ft_trace_level_disabled): Add `static' keyword. 2018-08-09 Alexei Podtelezhnikov <apodtele@gmail.com> [raster, smooth] Reinstate bitmap size limits. This again moves outline and bitmap size checks one level up. * src/base/ftoutln.c (FT_Outline_Render): Explicitly reject enormous outlines. * src/raster/ftrend1.c (ft_raster1_render): Reject enormous bitmaps and, therefore, outlines that require them. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Ditto. * src/raster/ftraster.c (ft_black_render): Remove outline size checks. * src/smooth/ftgrays.c (gray_raster_render): Ditto. [STANDALONE]: Remove `FT_Outline_Get_CBox' copy. 2018-08-08 Alexei Podtelezhnikov <apodtele@gmail.com> [pcf] Revert massive unsigning. 2018-08-08 Werner Lemberg <wl@gnu.org> [smooth] Improve tracing. * src/smooth/ftgrays.c (gray_convert_glyph_inner): Only use tracing if called the first time. (gray_convert_glyph): Updated. 2018-08-08 Werner Lemberg <wl@gnu.org> Add internal functions `FT_Trace_Disable' and `FT_Trace_Enable'. It sometimes makes sense to suppress tracing informations, for example, if it outputs identical messages again and again. * include/freetype/internal/ftdebug.h: Make `ft_trace_levels' a pointer. (FT_Trace_Disable, FT_Trace_Enable): New declarations. * src/base/ftdebug.c (ft_trace_levels): Rename to... (ft_trace_levels_enabled): ... this. (ft_trace_levels_disabled): New array. (ft_trace_levels): New pointer. (FT_Trace_Disable, FT_Trace_Enable): Implement. (ft_debug_init): Updated. 2018-08-08 Werner Lemberg <wl@gnu.org> Debugging improvements. * src/base/ftobjs.c (pixel_modes): Move this array to top level from ... (FT_Load_Glyph): ... here. (FT_Render_Glyph_Internal): Use `width' x `height' in trace message. Use `pixel_modes'. 2018-08-08 Alexei Podtelezhnikov <apodtele@gmail.com> [pcf] Massive unsigning (part 2). Treat all size related properties as unsigned values. * src/pcf/pcf.h (PCF_ParsePropertyRec): Use unsigned `name' and `value'. * src/pcf/pcfread.c (pcf_get_properties, pcf_load_font): Updated parsing code and handling of AVERAGE_WIDTH, POINT_SIZE, PIXEL_SIZE, RESOLUTION_X and RESOLUTION_Y. 2018-08-08 Alexei Podtelezhnikov <apodtele@gmail.com> [pcf] Massive unsigning (part 1). Unofficial specifications hesitate to use unsigned 32-bit integers. Negative values caused a lot of trouble in the past and it is safer and easier to treat some properties as unsigned. * src/pcf/pcf.h (PCF_AccelRec): Use unsigned values for `fontAscent', `fontDescent', and `maxOverlap'. * src/pcf/pcfread.c (pcf_load_font, pcf_get_accel): Updated. * src/pcf/pcfdrivr.c (PCF_Glyph_Load, PCF_Size_Select, PCF_Size_Request): Updated. 2018-08-07 Alexei Podtelezhnikov <apodtele@gmail.com> * src/pcf/pcfread.c (pcf_get_bitmaps): Unsign `offsets' and `bitmapSizes'. 2018-08-06 Werner Lemberg <wl@gnu.org> * devel/ftoption.h: Synchronize with main `ftoption.h'. 2018-08-06 Alexei Podtelezhnikov <apodtele@gmail.com> [pcf] Use unsigned types. * src/pcf/pcf.h (PCF_Encoding): Use unsigned `enc'. * src/pcf/pcfdrivr.c (pcf_cmap_char_{index,next}): Ditto. * src/pcf/pcfread.c (pcf_get_encodings): Use unsigned types. 2018-08-05 Werner Lemberg <wl@gnu.org> * src/truetype/ttgload.c (compute_glyph_metrics): Fix overflow. Reported as https://bugs.chromium.org/p/chromium/issues/detail?id=777151 2018-08-04 Werner Lemberg <wl@gnu.org> * src/truetype/ttinterp.c (opcode_name): Fix typos. 2018-08-04 Werner Lemberg <wl@gnu.org> Fix clang warnings. * src/base/ftoutln.c (FT_Outline_EmboldenXY): Fix type of `orientation'. * src/gxvalid/gxvcommn.c (gx_lookup_value_read): Fix signature. * src/pcf/pcfread.c (pcf_get_encodings): Fix type of some variables. Add cast. * src/type1/t1load.c (parse_weight_vector): Fix cast. 2018-07-31 Werner Lemberg <wl@gnu.org> * src/cid/cidtoken.h: Handle `XUID' keyword. 2018-07-31 Werner Lemberg <wl@gnu.org> [cid] Trace PostScript dictionaries. * src/cid/cidload.c: Include FT_INTERNAL_POSTSCRIPT_AUX_H. (cid_load_keyword, cid_parse_font_matrix, parse_fd_array, parse_expansion_factor, cid_parse_dict): Add tracing calls. (parse_font_name): New function to trace `/FontName' keywords in /FDArray dict. (cid_field_records): Register `parse_font_name'. 2018-07-30 Werner Lemberg <wl@gnu.org> [cff] Fix typo. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9409 * src/cff/cffdrivr.c (cff_get_cid_from_glyph_index): Fix boundary check. 2018-07-29 Werner Lemberg <wl@gnu.org> * src/pcf/pcfread.c (pcf_get_encodings): Another thinko. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9608 2018-07-28 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Fix Harmony memory management. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9501 * src/smooth/ftgrays.c (ft_smooth_render_generic): Restore buffer after each rendering in case of failure. 2018-07-28 Werner Lemberg <wl@gnu.org> [type1] Avoid segfaults with `FT_Get_PS_Font_Value'. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9610 * src/type1/t1driver.c (t1_ps_get_font_value): Protect against NULL. 2018-07-27 Werner Lemberg <wl@gnu.org> [truetype] Make `TT_Set_MM_Blend' idempotent (#54388). * src/truetype/ttgxvar.c (tt_set_mm_blend): Correctly set `face->doblend' if the current call to the function yields the same blend coordinates as the previous call. 2018-07-27 Werner Lemberg <wl@gnu.org> [psaux, type1]: More tracing improvements. * src/psaux/psintrp.c (cf2_interpT2CharString): Trace skipped outline commands. * src/psaux/t1decode.c (t1_decoder_parse_charstring): Fix missing case. (t1_decoder_parse_metrics): Make tracing output more compact. * src/type1/t1gload.c (T1_Compute_Max_Advance): Be less verbose. (T1_Get_Advances): Add tracing. 2018-07-25 Werner Lemberg <wl@gnu.org> [psaux, type1] Trace PostScript dictionaries and other things. The tracing of /Encoding, /Subrs, and /Charstrings is rudimentary right now. * src/psaux/psobjs.c (ps_parser_load_field, ps_parser_load_field_table): Add tracing calls. * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Make tracing output more compact. * src/type1/t1gload.c (T1_Compute_Max_Advance, T1_Get_Advances): Add tracing messages. * src/type1/t1load.c (parse_blend_axis_types, parse_blend_design_positions, parse_blend_design_map, parse_weight_vector, t1_load_keyword, t1_parse_font_matrix, parse_encoding, parse_subrs, parse_charstrings, T1_Open_Face): Add tracing calls. * src/type1/t1objs.c (T1_Face_Init): Add tracing call. * src/sfnt/sfobjs.c (sfnt_init_face): Make tracing message more verbose. 2018-07-25 Werner Lemberg <wl@gnu.org> Fix minor ASAN run-time warnings. * src/base/ftutil.c (ft_mem_alloc, ft_mem_realloc): Only call `FT_MEM_ZERO' if we actually have a buffer. (ft_mem_dup): Only call `ft_memcpy' if we actually have a buffer. 2018-07-24 Alexei Podtelezhnikov <apodtele@gmail.com> [build] Fortify dllexport/dllimport attributes (#53969,#54330). We no longer use predefined _DLL, which can be defined for static builds too with /MD. We use DLL_EXPORT and DLL_IMPORT instead, following libtool convention. * CMakeLists.txt [WIN32], builds/windows/vc2010/freetype.vcxproj: Define DLL_EXPORT manually. * include/freetype/config/ftconfig.h, builds/unix/ftconfig.in, builds/vms/ftconfig.h, builds/windows/vc2010/index.html, src/base/ftver.rc: /_DLL/d, s/FT2_DLLIMPORT/DLL_IMPORT/. 2018-07-24 Werner Lemberg <wl@gnu.org> [type1] Check relationship between number of axes and designs. For Multiple Masters fonts we don't support intermediate designs; this implies that number_of_designs == 2 ^^ number_of_axes Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9557 * src/type1/t1load.c (T1_Open_Face): Ensure above constraint. (T1_Get_MM_Var): Remove now redundant test. 2018-07-24 Hin-Tak Leung <htl10@users.sourceforge.net> [truetype] Match ttdebug's naming of instruction mnemonics. * src/truetype/ttinterp.c: The form used in ttdebug, "MDRP[G,B,W,?]", etc., is slightly more readable than "MDRP[00,01,02,03]". 2018-07-24 Werner Lemberg <wl@gnu.org> * src/pcf/pcfread.c (pcf_get_encodings): Thinko. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9561 2018-07-22 Werner Lemberg <wl@gnu.org> * src/pcf/pcfread.c (pcf_get_encodings): Check index of defaultChar. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9527 2018-07-22 Werner Lemberg <wl@gnu.org> * src/pcf/pcfread.c (pcf_load_font): Fix number of glyphs. This is an oversight of the module change 2018-07-21. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9524 2018-07-22 Werner Lemberg <wl@gnu.org> [cid] Sanitize `BlueShift' and `BlueFuzz'. This code is taken from the type1 module. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9510 * src/cid/cidload.c (parse_fd_array): Set some private dict default values. (cid_face_open): Do the sanitizing. Fix some tracing messages. 2018-07-21 Werner Lemberg <wl@gnu.org> [pcf] Fix handling of the undefined glyph. This change makes the driver use the `defaultChar' property of PCF files. * src/pcf/pcf.h (PCF_FaceRec): Change type of `defaultChar' to unsigned. * src/pcf/pcfread.c (pcf_get_encodings): Read `defaultChar' as unsigned. Validate `defaultChar'. If `defaultChar' doesn't point to glyph index zero, swap glyphs with index zero and index `defaultChar' and adjust the encodings accordingly. * src/pcf/pcfdrivr.c (pcf_cmap_char_index, pcf_cmap_char_next, PCF_Glyph_Load): Undo change from 2002-06-16 which always enforced the first character in the font to be the default character. 2018-07-20 Armin Hasitzka <prince.cherusker@gmail.com> Move the legacy fuzz target to the `freetype-testing' repository. It can now be found at https://github.com/freetype/freetype2-testing/tree/master/fuzzing/src/legacy * src/tools/ftfuzzer: Remove this folder and its contents from the repository. 2018-07-20 Werner Lemberg <wl@gnu.org> [cff] Avoid left-shift of negative numbers (#54322). * src/cff/cffgload.c (cff_slot_load): Use multiplication. 2018-07-17 Werner Lemberg <wl@gnu.org> Allow FT_ENCODING_NONE for `FT_Select_Charmap'. This is a valid encoding tag for BDF, PCF, and Windows FNT, and there is no reason to disallow it for these formats. * src/base/ftobjs.c (FT_Select_Charmap): Implement it. 2018-07-17 Werner Lemberg <wl@gnu.org> * src/pcf/pcfread.c (pcf_get_encodings): Trace `defaultChar'. 2018-07-16 Armin Hasitzka <prince.cherusker@gmail.com> * include/freetype/internal/ftcalc.h: Add macros for handling harmless over-/underflowing `FT_Int' values. * src/sfnt/sfdriver.c (fixed2float): Fix negation of `(int)(-2147483648)'. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9423 2018-07-16 Werner Lemberg <wl@gnu.org> * src/truetype/ttgxvar.c (tt_set_mm_blend): Fix off-by-one error. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9412 2018-07-12 Werner Lemberg <wl@gnu.org> * src/base/ftoutln.c (FT_Outline_Get_Orientation): Init `cbox'. Taken from patch #9667, written by Steve Langasek <vorlon@debian.org>. This fixes a build failure (most probably a bug in gcc) on ppc64el when building with -O3. 2018-07-05 Werner Lemberg <wl@gnu.org> Fix typo (#54238). * src/base/ftcolor.c (FT_Palette_Set_Foreground_Color) [!TT_CONFIG_OPTION_COLOR_LAYERS]: Add return value. 2018-07-05 Werner Lemberg <wl@gnu.org> Adjust table size comparisons (#54242). * src/sfnt/ttcpal.c (tt_face_load_cpal): Implement it. 2018-07-05 Werner Lemberg <wl@gnu.org> Fix more 32bit issues (#54208). * src/cff/cffload.c (cff_blend_build_vector): Convert assertion into run-time error. * src/truetype/ttgxvar.c (ft_var_to_normalized): Protect against numeric overflow. 2018-07-04 Werner Lemberg <wl@gnu.org> Fix 32bit build warnings (#54239). * src/base/ftbitmap.c (FT_Bitmap_Blend): Add casts to avoid signed vs. unsigned comparisons. * srb/sfnt/ttcolr.c (tt_face_get_colr_layer): Ditto. 2018-07-02 Jeff Carey <Jeff.Carey@monotype.com> * src/psnames/psmodule.c (ps_unicodes_init): Fix alloc debugging. 2018-07-02 Werner Lemberg <wl@gnu.org> s/palette_types/palette_flags/. Suggested by Behdad. 2018-07-02 Werner Lemberg <wl@gnu.org> Make `FT_Get_Color_Glyph_Layer' return FT_Bool. * include/freetype/freetype.h, src/base/ftobjs.c (FT_Get_Color_Glyph_Layer, FT_Render_Glyph_Internal): Updated. * include/freetype/internal/sfnt.h (TT_Get_Colr_Layer_Func), src/sfnt/ttcolr.h, src/sfnt/ttcolr.c (tt_face_get_colr_layer): Updated. 2018-07-01 Werner Lemberg <wl@gnu.org> * src/base/ftobjs.c (FT_Get_Color_Glyph_Layer): Guard SFNT function. Reported by Behdad. 2018-06-28 Alexei Podtelezhnikov <apodtele@gmail.com> * src/base/fttrigon.c (FT_Tan): Improve accuracy. (FT_Vector_Rotate): Simplify. 2018-06-28 Alexei Podtelezhnikov <apodtele@gmail.com> * src/base/ftobjs.c (FT_Set_Charmap): Robustify. 2018-06-25 Werner Lemberg <wl@gnu.org> [truetype] Fix memory leak. * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Add initializers. Fix typo in `goto' destination. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9071 2018-06-25 Werner Lemberg <wl@gnu.org> * src/truetype/ttgxvar.c (tt_face_vary_cvt): Add initializers. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9070 2018-06-24 Werner Lemberg <wl@gnu.org> [truetype] Increase precision while applying VF deltas. It turned out that we incorrectly round CVT and glyph point deltas before accumulation, leading to severe positioning errors if there are many delta values to sum up. Problem reported by Akiem Helmling <akiem@underware.nl> and analyzed by Behdad. * src/truetype/ttgxvar.c (ft_var_readpackeddelta): Return deltas in 16.16 format. (tt_face_var_cvt): Collect deltas in `cvt_deltas', which is a 16.16 format array, and add the accumulated values to the CVT at the end of the function. (TT_Vary_Apply_Glyph_Deltas): Store data in `points_org' and `points_out' in 16.16 format. Collect deltas in `point_deltas_x' and `point_deltas_y', which are 16.16 format arrays, and add the accumulated values to the glyph coordinates at the end of the function. 2018-06-24 Werner Lemberg <wl@gnu.org> New base function `FT_Matrix_Check' (#54019). * src/base/ftcalc.c (FT_Matrix_Check): New base function to properly reject degenerate font matrices. * include/freetype/internal/ftcalc.h: Updated. * src/cff/cffparse.c (cff_parse_font_matrix), src/cid/cidload.c (cid_parse_font_matrix), src/type1/t1load.c (t1_parse_font_matrix), src/type42/t42parse.c (t42_parse_font_matrix): Use `FT_Matrix_Check'. 2018-06-23 Werner Lemberg <wl@gnu.org> Fix typo. Reported by Behdad. * src/base/ftcolor.c (FT_Palette_Data_Get) [!TT_CONFIG_OPTION_COLOR_LAYERS]: s/apalette/apalette_data/. 2018-06-21 Werner Lemberg <wl@gnu.org> s/FT_PALETTE_USABLE_WITH_/FT_PALETTE_FOR_/. * include/freetype/ftcolor.h, include/freetype/internal/sfnt.h, src/sfnt/ttcolr.c: Do it. 2018-06-19 Werner Lemberg <wl@gnu.org> [sfnt] Fix CPAL heap buffer overflow. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8968 * src/sfnt/ttcpal.c (tt_face_load_cpal): Guard CPAL version 1 offsets. 2018-06-19 Werner Lemberg <wl@gnu.org> Doh. Don't use CPAL or COLR data if tables are missing. Reported by Alexei. * src/sfnt/ttcolr.c (tt_face_get_colr_layer): Return immediately if `colr' is NULL. * src/sfnt/ttcpal.c (tt_face_palette_set): Return immediately, if `cpal' is NULL. 2018-06-17 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Introduce `FT_New_Glyph'. This function facilitates access to full capabilities of FreeType rendering engine for custom glyphs. This can be quite useful for consistent rendering of mathematical and chemical formulas, e.g. https://bugs.chromium.org/p/chromium/issues/detail?id=757078 * include/freetype/ftglyph.h, src/base/ftglyph.c (FT_New_Glyph): New function. 2018-06-17 Armin Hasitzka <prince.cherusker@gmail.com> [bdf] Fix underflow of an unsigned value. bdflib.c:1562 could be reached with `font->glyphs_used == 0'. That caused an underflow of the unsigned value which results in undefined behaviour. * src/bdf/bdflib.c (_bdf_parse_glyphs): Bail out earlier than before if the `ENCODING' keyword cannot be found. 2018-06-17 Werner Lemberg <wl@gnu.org> [base] Add tracing for `FT_Bitmap_Blend'. * include/freetype/internal/fttrace.h (trace_bitmap): New enumeration. * src/base/ftbitmap.c (FT_COMPONENT): Define. (FT_Bitmap_Blend): Add `FT_TRACE5' calls. 2018-06-17 Werner Lemberg <wl@gnu.org> s/trace_bitmap/trace_checksum/. * include/freetype/internal/fttrace.h: s/bitmap/checksum/. * src/base/ftobjs.c (FT_COMPONENT): s/trace_bitmap/trace_checksum/. Adjust code. 2018-06-16 Werner Lemberg <wl@gnu.org> [sfnt] Fix color glyph layer loading. * src/sfnt/ttcolr.c (Colr): Add `table_size' field. (tt_face_load_colr): Set it. (tt_face_get_colr_layer): Check pointer limit for layer entries. 2018-06-16 Werner Lemberg <wl@gnu.org> [sfnt] Fix color palette loading. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8933 * src/sfnt/ttcpal.c (Cpal): Add `table_size' field. (tt_face_load_cpal): Set it. (tt_face_palette_set): Check pointer limit for color entries. 2018-06-16 Werner Lemberg <wl@gnu.org> * src/base/ftbitmap.c (FT_Bitmap_Blend): Avoid integer overflow. 2018-06-16 Werner Lemberg <wl@gnu.org> Add `FT_Bitmap_Blend' API. Still missing: Support for negative bitmap pitch and subpixel offset of source bitmap. * include/freetype/ftbitmap.h, src/base/ftbitmap.c (FT_Bitmap_Blend): New function. 2018-06-14 Werner Lemberg <wl@gnu.org> Replace `FT_Get_GlyphLayers' with `FT_Get_Color_Glyph_Layer'. This avoids any additional allocation of COLR related structures in a glyph slot. * include/freetype/freetype.h (FT_Glyph_Layer, FT_Glyph_LayerRec, FT_Get_GlyphLayers): Removed. * include/freetype/internal/ftobjs.h (FT_Colr_InternalRec): Removed. (FT_Slot_InternalRec): Remove `color_layers'. * include/freetype/internal/sfnt.h (TT_Load_Colr_Layer_Func): Removed. (SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): Remove `load_colr_layer'. * src/base/ftobjs.c (ft_glyph_slot_done): Updated. (FT_Render_Glyph_Internal): Use `FT_Get_Color_Glyph_Layer'. (FT_Get_GlyphLayers): Removed. * src/sfnt/sfdriver.c (sfnt_interface): Updated. * src/sfnt/ttcolr.c (tt_face_load_colr_layers): Removed. * src/sfnt/ttcolr.h: Updated. * src/truetype/ttgload.c (TT_Load_Glyph): Updated. 2018-06-14 Werner Lemberg <wl@gnu.org> Provide iterative API to access `COLR' data. This solution doesn't store any data in an `FT_GlyphSlot' object. * include/freetype/freetype.h (FT_LayerIterator): New structure. (FT_Get_Color_Glyph_Layer): New function. * include/freetype/internal/sfnt.h (TT_Get_Colr_Layer_Func): New function type. (SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): Add it. * src/base/ftobjs.c (FT_Get_Color_Glyph_Layer): Implement it. * src/sfnt/ttcolr.c (tt_face_get_colr_layer): New function. * src/sfnt/ttcolr.h: Updated. * src/sfnt/sfdriver.c (sfnt_interface): Updated. 2018-06-14 Werner Lemberg <wl@gnu.org> Add glyph index and glyph load flags to glyph slot. * include/freetype/freetype.h (FT_GlyphSlotRec): Rename unused `reserved' field to `glyph_index'. * include/freetype/internal/ftobjs.h (FT_Slot_InternalRec): Add `load_flags' field. * src/base/ftobjs.c (FT_Load_Glyph): Set new fields. 2018-06-14 Werner Lemberg <wl@gnu.org> [sfnt] Move `CPAL' stuff into separate files. * src/sfnt/sfdriver.c: Include `ttcpal.h'. * src/sfnt/sfnt.c: Include `ttcpal.c'. * src/sfnt/ttcolr.c, src/sfnt/ttcolr.h: Move CPAL stuff to ... * src/sfnt/ttcpal.c, src/sfnt/ttcpal.c: ... these new files. * src/sfnt/Jamfile (_sources), src/sfnt/rules.mk (SFNT_DRV_SRC): Updated. * include/freetype/internal/fttrace.h: Add support for `colr' and `cpal'. Sort entries. 2018-06-13 Werner Lemberg <wl@gnu.org> [sfnt] Separate `CPAL' and `COLR' table handling. Later on we want to support the `SVG' table also, which needs `CPAL' (but not `COLR'). * include/freetype/internal/sfnt.h (SFNT_Interface): Add `load_cpal' and `free_cpal' fields. (FT_DEFINE_SFNT_INTERFACE): Updated. * include/freetype/internal/tttypes.h (TT_FaceRec): Replace `colr_and_cpal' fields with `cpal' and `colr'. * src/sfnt/sfdriver.c (sfnt_interface): Updated. * src/sfnt/sfobjs.c (sfnt_load_face, sfnt_done_face): Updated. * src/sfnt/ttcolr.c (Colr, Cpal): Add `table' field. (ColrCpal): Removed. (tt_face_load_colr): Split off CPAL handling into... (tt_face_load_cpal): ... this new function. (tt_face_free_colr): Split off CPAL handling into... (tt_face_free_cpal): ... this new function. (tt_face_load_colr_layers, tt_face_palette_set): Updated. * src/sfnt/ttcolr.h: Updated. * src/truetype/ttgload.c (TT_Load_Glyph): Updated. 2018-06-12 Werner Lemberg <wl@gnu.org> [sfnt] Fix `sizeof' thinko. * src/sfnt/ttcolr.c (tt_face_load_colr, tt_face_palette_set): Don't use `sizeof' for computing array limit. 2018-06-12 Werner Lemberg <wl@gnu.org> Finish CPAL/COLR support (4/4). * src/sfnt/ttcolr.c (tt_face_find_color): Removed. (tt_face_colr_blend_layer): Use `face->palette' instead of calling `tt_face_find_color'. Use and set text foreground color. 2018-06-12 Werner Lemberg <wl@gnu.org> Finish CPAL/COLR support (3/4). * src/base/ftcolor.c: Include FT_INTERNAL_SFNT_H. (FT_Palette_Select, FT_Palette_Set_Foreground_Color): Implement functions. 2018-06-12 Werner Lemberg <wl@gnu.org> Finish CPAL/COLR support (2/4). * src/sfnt/ttcolr.c (tt_face_palette_set): New function. (tt_face_load_colr): Allocate `face->palette' and call `tt_face_palette_set'. Adjust return error code in case of error. * src/sfnt/ttcolr.h: Updated. * include/freetype/internal/sfnt.h (TT_Set_Palette_Func): New function type. (SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): Add it. * src/sfnt/sfdriver.c (sfnt_interface), src/sfnt/sfobjs.c (sfnt_done_face): Updated. 2018-06-12 Werner Lemberg <wl@gnu.org> Finish CPAL/COLR support (1/4). * include/freetype/internal/tttypes.h (TT_FaceRec): New fields `palette_index', `palette', `have_foreground_color' and `foreground_color'. 2018-06-12 Werner Lemberg <wl@gnu.org> [sfnt] Minor. * src/sfnt/ttcolr.c (tt_face_load_colr_layers): s/palette_index/palette_entry_index/ for consistency. Adjust return error code in case of error. 2018-06-11 Alexei Podtelezhnikov <apodtele@gmail.com> [raster] Clean up. * src/raster/ftraster.c (black_TWorker, SCALED, Set_High_Precision): Clean up after 5-level gray removal (8dc8635874). (Vertical_Sweep_Span): Be brief. 2018-06-10 Werner Lemberg <wl@gnu.org> [sfnt] Fix compiler warnings. * src/sfnt/ttcolr.c (tt_face_load_colr, tt_face_load_colr_layers, tt_face_colr_blend_layer): Add `NULL' initializers. 2018-06-10 Werner Lemberg <wl@gnu.org> s/FT_Palette/FT_Palette_Data/, s/palette/palette_data/. * include/freetype/ftcolor.h, include/freetype/internal/tttypes.h, src/base/ftcolor.c, src/sfnt/sfobjs.c, src/sfnt/ttcolr.c: Updated. 2018-06-10 Nikolaus Waxweiler <madigens@gmail.com> CMakeLists: also accept IOS_PLATFORM=SIMULATOR64 This might be needed to build FreeType for the iOS simulator. See https://savannah.nongnu.org/bugs/index.php?54048. Patch contributed by Steve Robinson. * CMakeLists.txt: Accept IOS_PLATFORM=SIMULATOR64 2018-06-10 Werner Lemberg <wl@gnu.org> Implement `FT_Palette_Get'. * src/base/ftcolor.c: New file. * src/base/Jamefile (_sources), src/base/rules.mk (BASE_SRC), src/base/ftbase.c: Add `ftcolor.c'. 2018-06-10 Werner Lemberg <wl@gnu.org> * src/sfnt/ttcolr.c (tt_face_load_colr): Improve overflow checks. 2018-06-09 Alexei Podtelezhnikov <apodtele@gmail.com> [raster] Deal with pitch sign earlier. * src/raster/ftraster.c (black_TWorker): Remove unused `traceG', s/bTarget/bOrigin/. (Render_Glyph): Set `ras.bOrigin' at the bottom-left corner. (Vertical_Sweep_Init, {Vertical,Horizontal}_Sweep_{Span,Drop}): Updated accordingly. 2018-06-09 Werner Lemberg <wl@gnu.org> [sfnt] Read `CPAL' version 1 tables. * include/freetype/internal.tttypes.h: Include FT_COLOR_H. (TT_FaceRec): Add `palette' field. * src/sfnt/ttcolr.c: Include FT_COLOR_H. (Cpal): Remove all data covered by the new `palette' field in `TT_FaceRec'. (tt_face_load_colr): Updated. Read `CPAL' version 1 data. (tt_face_load_colr_layers, tt_face_find_color): Updated. * src/sfnt/sfobjs.c (sfnt_done_face): Free glyph color palette data. 2018-06-07 Alexei Podtelezhnikov <apodtele@gmail.com> [base] API for Harmony LCD rendering. This introduces `FT_Library_SetLcdGeometry' for setting up arbitrary LCD subpixel geometry including non-striped patterns. * src/base/ftlcdfil.c (FT_Library_SetLcdGeometry): New function. * include/freetype/ftlcdfil.h: Document it. * include/freetype/freetype.h: Minor. * include/freetype/ftchapters.h: Minor. 2018-06-06 Werner Lemberg <wl@gnu.org> ftcolor.h: Redesign API. While going to implement it I noticed that I need access to most of the `CPAL' elements; I thus plan to add a `cpal' field to `TT_FaceRec', which makes most of the previously suggested API functions obsolete because the fields will be directly accessible. 2018-06-06 Parth Wazurkar <parthwazurkar@gmail.com> [bdf, pcf] Remove deprecated FT_FACE_FLAG_FAST_GLYPHS flag. * src/bdf/bdfdrivr.c (BDF_Face_Init): Remove deprecated FT_FACE_FLAG_FAST_GLYPHS flag. * src/pcf/pcfread.c (pcf_load_font): Remove deprecated FT_FACE_FLAG_FAST_GLYPHS flag. 2018-06-06 Werner Lemberg <wl@gnu.org> [smooth, raster] Limit bitmap size (#54019). * src/raster/ftraster.c [STANDALONE] (FT_Outline_Get_CBox): Add function. [!STANDALONE]: Include FT_OUTLINE_H. (ft_black_render): Compute CBox and reject glyphs larger than 0xFFFF x 0xFFFF. * src/smooth/ftgrays.c (gray_raster_render): Reject glyphs larger than 0xFFFF x 0xFFFF. 2018-06-03 Armin Hasitzka <prince.cherusker@gmail.com> * src/smooth/ftgrays.c (gray_convert_glyph): Remove unused variables. 2018-06-03 Werner Lemberg <wl@gnu.org> * src/tools/glnames.py (main): Emit header in `light' comment style. 2018-06-02 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Attempt to mitigate bug #54019. The robust rendering of estra large glyphs came with unbearable cost. The old way of bisecting should fail but fail faster. * src/smooth/ftgrays.c (gray_convert_glyph): Switch back to bisecting in y-direction. 2018-06-02 Werner Lemberg <wl@gnu.org> * src/truetype/ttinterp.c (Ins_MIRP): Use SUB_LONG; avoid FT_ABS. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8706 2018-06-02 Werner Lemberg <wl@gnu.org> * src/autofit/afwarp.h: Use AF_CONFIG_OPTION_USE_WARPER (#54033). 2018-05-31 Werner Lemberg <wl@gnu.org> * src/raster/ftraster.c (black_TWorker_): Remove `gTarget' field. This is no longer used. 2018-05-31 Werner Lemberg <wl@gnu.org> [sfnt] Get colors from `CPAL' table in right order (#54015). * src/sfnt/ttcolr.c (tt_face_find_color): Fix it. 2018-05-30 Werner Lemberg <wl@gnu.org> ftcolor.h: Improve API design, fix typos (#54011, #54014). * include/freetype/ftcolor.h (FT_Palette_Get_Names): Replace with... (FT_Palette_Get_Name_IDs): ... this function. (FT_Palette_Get_Entry_Names): Replace with... (FT_Palette_Get_Entry_Name_IDs): ... this function s/FT_Palette_Set_Foreground_COlor/FT_Palette_Set_Foreground_Color/. 2018-05-30 Armin Hasitzka <prince.cherusker@gmail.com> Beautify a3cfed5e87232c933bdc64f43e8ebebcfd18b41b. * src/autofit/afloader.c (af_loader_load_glyph): Move the initialisationand declaration of variables into the if-block. 2018-05-30 Armin Hasitzka <prince.cherusker@gmail.com> Fix pointer underflow. The declaration of `edge2' can be reached with `edge1 == NULL' and `axis->edges == 0' which results in undefined behaviour. * src/autofit/afloader.c (af_loader_load_glyph): Initialise `edge2' after checking `axis->num_edges > 1'. `edge1 != NULL' can be assumed. 2018-05-30 Werner Lemberg <wl@gnu.org> Various minor color fixes. * include/freetype/config/ftheader.h (FT_COLOR_H): New macro. * include/freetype/internal/ftobjs.h (FT_Colr_Internal): Change type of `load_flags' to `FT_Int32'. * include/freetype/internal/sfnt.h (TT_Load_Colr_Layer_Func): Change type of `idx' to `FT_UInt'. (TT_Blend_Colr_Func): Change type of `color_index' to `FT_UInt'. * src/base/ftobjs.c (FT_Render_Glyph_Internal): Change type of `load_flags' to `FT_Int32'. * src/sfnt/ttcolr.c (find_base_glyph_record, tt_face_load_colr_layers): Change type of `glyph_id' to `FT_UInt'. (tt_face_find_color, tt_face_colr_blend_layer): Change type of `color_index' to `FT_UInt'. Fix signedness and type issues. * src/sfnt/ttcolr.h: Updated. 2018-05-25 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com> [docmaker] Fix missing `Defined in (...)' under Windows/Cygwin. This platform uses backslashes for paths, which docmaker didn't understand correctly. * src/tools/docmaker/tohtml.py (HtmlFormatter::blockEnter): Use `os.path.normpath' to normalize the path for the platform being used. 2018-05-24 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Formalize Harmony LCD rendering. This generalizes magic outline shifts that make Harmony LCD rendering work in terms of precise two-dimensional RGB subpixel positions. These coordinates are now set in time of the `smooth' module initialization and later used to shift a glyph outline for rendering. FT_RENDER_MODE_LCD and FT_RENDER_MODE_LCD_V use the same coordinates. The letter, however, rotates them before using. The LCD bitmap padding is also calculated using these coordinates. * include/freetype/internal/ftobjs.h (FT_LibraryRec): New array field `lcd_geometry'. * src/base/ftlcdfil.c (ft_lcd_padding): Reworked. * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Updated accordingly. * src/smooth/ftsmooth.c [!FT_CONFIG_OPTION_SUBPIXEL_RENDERING] (ft_smooth_init): Initialize `lcd_geometry'. (ft_smooth_render_generic): Formalize outline shifts. 2018-05-22 Werner Lemberg <wl@gnu.org> [truetype] Reject elements of composites with invalid glyph indices. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8413 * src/truetype/ttgload.c (TT_Load_Composite_Glyph): Implement it. 2018-05-22 Werner Lemberg <wl@gnu.org> * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Trace # of points. 2018-05-20 Werner Lemberg <wl@gnu.org> * include/freetype/ftcolor.h: New file. This is an interface to the `CPAL' OpenType table. No implementation yet. 2018-05-18 Alexei Podtelezhnikov <apodtele@gmail.com> * include/freetype/internal/ftcalc.h (FT_MSB): Verified `_MSC_VER'. Actually `_BitScanReverse' is available since VS2005. 2018-05-18 Werner Lemberg <wl@gnu.org> * include/freetype/internal/ftcalc.h (FT_MSB): Use `_MSC_VER' value. Older VC versions don't provide `_BitScanReverse'. We test for VC 2013. Reported by John Emmas <john@creativepost.co.uk>. 2018-05-17 Werner Lemberg <wl@gnu.org> s/inline/__inline/ for MSVC. Reported by John Emmas <john@creativepost.co.uk>. * include/freetype/internal/ftcalc.h (FT_MSB) [_MSC_VER]: Do it. 2018-05-16 Werner Lemberg <wl@gnu.org> Add function `FT_Get_GlyphLayers' to access `COLR' table data. * include/freetype/internal/ftobjs.h (FT_Glyph_LayerRec): Move this structure to... * include/freetype/freetype.h (FT_Glyph_LayerRec): ... this header file. (FT_Glyph_Layer): New typedef. Update code to use it where appropriate. * src/base/ftobjs.c (FT_Get_GlyphLayers): New function. 2018-05-15 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Fix mono bitmap presetting (#53896). It is rather fundamental to set monochrome bitmap based on rounded CBox because the b/w rasterizer turns on pixels when their centers are inside the glyph outline. The dropout control is unpredictable and can distort narrow glyphs if the bitmap is too wide. Reported by Chris Liddell. * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): If BBox boundaries are too close, adjust them before rounding. 2018-05-15 Werner Lemberg <wl@gnu.org> [psaux] Fix compiler warning (#53915). * src/psaux/psft.c (cf2_freeT1SeacComponent): Do it. 2018-05-15 Werner Lemberg <wl@gnu.org> [sfnt] Fix memory leak in handling `COLR' data. * src/truetype/ttgload.c (TT_Load_Glyph): Free old `layers' array before reassigning allocated memory. Only allocate `color_layers' if we don't have one already. 2018-05-15 Werner Lemberg <wl@gnu.org> [sfnt] If `COLR' is present, don't assume that all glyphs use it. * src/sfnt/ttcolr.c (tt_face_load_colr_layers): Return FT_Err_Ok if current glyph is not a `COLR' base glyph. * src/truetype/ttgload.c (TT_Load_Glyph): Don't allocate `color_layers' if there are no color layers. 2018-05-14 Werner Lemberg <wl@gnu.org> * src/base/ftobjs.c (FT_Load_Glyph): Fix signature of `pixel_modes'. 2018-05-14 Werner Lemberg <wl@gnu.org> Provide dummy functions if `TT_CONFIG_OPTION_SFNT_NAMES' is not set. * src/base/ftsnames.c [!TT_CONFIG_OPTION_SFNT_NAMES]: Implement it. 2018-05-13 Werner Lemberg <wl@gnu.org> * src/base/ftobjs.c (FT_Load_Glyph): Improve tracing. 2018-05-13 Shao Yu Zhang <shaozhang@fb.com> Werner Lemberg <wl@gnu.org> [sfnt] Preliminary support of colored layer outlines (#44689). This commit enables OpenType's COLR/CPAL table handling; a typical application are color emojis that can be scaled to any size. If the color palette does not exist or is invalid, the rendering step rasterizes the outline instead. The current implementation assumes that the foreground is black. Enable this by defining option TT_CONFIG_OPTION_COLOR_LAYERS. There are still some issues with metrics; additionally, an API to fetch color layers is missing. * devel/ftoption.h, include/freetype/config/ftoption.h (TT_CONFIG_OPTION_COLOR_LAYERS): New macro. * include/freetype/internal/ftobjs.h (FT_Glyph_LayerRec, FT_Colr_InternalRec): New structures. (FT_Slot_InternalRec): Add `color_layers' field. * include/freetype/internal/sfnt.h (TT_Load_Colr_Layer_Func, TT_Blend_Colr_Func): New function types. (SFNT_Interface): Add `load_colr', `free_colr', `load_colr_layer', and `colr_blend' fields. * include/freetype/internal/tttypes.h (TT_FaceRec): Add `colr_and_cpal' field. * include/freetype/internal/tttags. (TTAG_COLR, TTAG_CPAL): New macros. * src/sfnt/ttcolr.c, src/sfnt/ttcolr.h: New files. * src/base/ftobjs.c (ft_glyphslot_done, FT_Render_Glyph_Internal): Handle glyph color layers. * src/sfnt/Jamfile (_sources), src/sfnt/rules.mk (SFNT_DRV_SRC): Add `ttcolr.c'. * src/sfnt/sfdriver.c: Include `ttcolr.h'. (PUT_COLOR_LAYERS): New macro. Update call to `FT_DEFINE_SFNT_INTERFACE'. * src/sfnt/sfnt.c: Include `ttcolr.c'. * src/sfnt/sfobjs.c (sfnt_load_face): Load `COLR' and `CPAL' tables. (sfnt_done_face): Updated. * src/truetype/ttgload.c (TT_Load_Glyph): Handle color layers. 2018-05-12 Arkady Shapkin <arkady.shapkin@gmail.com> Use MS VC++'s _BitScanReverse to calculate MSB (patch #9636). * include/freetype/internal/ftcalc.h (FT_MSB) [_MSC_VER]: Implement it. 2018-05-10 Alan Coopersmith <alan.coopersmith@oracle.com> Fix DLL compilation on Solaris. AC_COMPILE_IFELSE only tries to compile a `*.c' to a `*.o'. The Solaris Studio 12.1 through 12.5 compilers see the `-fvisibility=hidden' flag, but ignore it with a warning of: cc: Warning: Option -fvisibility=hidden passed to ld, if ld is invoked, ignored otherwise AC_LINK_IFELSE does the compile and then tries to link the result, at which point the Solaris linker will issue an error: ld: fatal: option '-fvisibility=hidden' is incompatible with building a dynamic executable If we don't use AC_LINK_IFELSE to catch the error, then configure will fail further tests which attempt to link, such as those testing dependencies like `libbz2'. Also, don't try adding `-fvisibility' if we have already added `-xldscope', just use one of them, since Sun Studio 12 and earlier compilers only issue a warning, and don't try passing through to the linker to generate an error, so AC_LINK_IFELSE doesn't catch them. Tested on Solaris 11.4 beta with compiler versions: Sun Studio 8 (Sun C 5.5) Sun Studio 10 (Sun C 5.7) Sun Studio 11 (Sun C 5.8) Sun Studio 12 (Sun C 5.9) Sun Studio 12.1 (Sun C 5.10) Oracle Solaris Studio 12.2 (Sun C 5.11) Oracle Solaris Studio 12.3 (Sun C 5.12) Oracle Solaris Studio 12.4 (Sun C 5.13) Oracle Developer Studio 12.5 (Sun C 5.14) Oracle Developer Studio 12.6 (Sun C 5.15) gcc 5.5.0 gcc 7.3.0 and verified the libfreetype.so.6 generated by each of those compilers exported the same set of symbols. * builds/unix/configure.raw: Implement it. 2018-05-08 Werner Lemberg <wl@gnu.org> [autofit] Avoid potential SEGV if running out of memory. Problem reported by Shailesh Mistry <shailesh.mistry@hotmail.co.uk>. * src/autofit/afshaper.c (af_shaper_buf_create, af_shaper_buf_destroy) [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Don't allocate and free a four-byte buffer. Instead, make those functions no-ops; the calling functions will provide a pointer to a buffer instead. * src/autofit/afcjk.c (af_cjk_metrics_init_widths, af_cjk_metrics_init_blues, af_cjk_metrics_check_digits), src/autofit/aflatin.c (af_latin_metrics_init_widths, af_latin_metrics_init_blues, af_latin_metrics_check_digits) [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Use pointer to local variable for `shaper_buf'. 2018-05-07 Nikolaus Waxweiler <madigens@gmail.com> [cmake] Allow using project as subfolder in other project. * CMakeLists.txt: Test for CMake build directory being different from source directory. Provide other parts of the build system access the full include directory. 2018-05-07 Werner Lemberg <wl@gnu.org> [build] Suppress configure's `nothing to be done' message. This is due to calling the configure script via `make' (within the top-level `configure' wrapper script). The same can happen for all other secondary make targets that are used to only modify the primary one, e.g., `make setup devel'. * builds/dos/detect.mk (emx, turboc, watcom, borlandc, borlandc16), builds/os2/detect (visualage, watcom, borlandc, devel), builds/unix/detect.mk (devel, lcc, unix), builds/windows/detect.mk (visualc, watcom, visualage, lcc, mingw32, bcc32, devel-bcc, devel-gcc): Use no-op recipe. 2018-05-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Support symbol visibility features of Sun / Oracle C compilers. Reported by Kiyoshi Kanazawa: https://lists.gnu.org/archive/html/freetype-devel/2018-05/msg00008.html Thanks to the suggestions by Alexei and Alan Coopersmith. * builds/unix/configure.raw: Check if "-xldscope=hidden" is accepted, and if so, it is added to CFLAGS. This is the option making Sun / Oracle C compilers hide the symbols from global scope. * include/freetype/config/ftconfig.h: Use "__global" prefix for FT_EXPORT() macro, if SunPro C is newer than Sun ONE Studio 8 (2003). * builds/unix/ftconfig.in: Ditto. * builds/vms/ftconfig.h: Ditto. 2018-05-02 Nikolaus Waxweiler <madigens@gmail.com> Unbreak CMake Windows installation * CMakeLists.txt: Generate ftconfig.h on non-UNIX. 2018-05-02 Werner Lemberg <wl@gnu.org> Remove FT_CONFIG_OPTION_PIC and related code. */* [FT_CONFIG_OPTION_PIC]: Remove all code guarded by this preprocessor symbol. */*: Replace `XXX_GET' macros (which could be either a function in PIC mode or an array in non-PIC mode) with `xxx' arrays. * include/freetype/internal/ftpic.h, src/autofit/afpic.c, src/autofit/afpic.h, src/base/basepic.c, src/base/basepic.h, src/base/ftpic.c, src/cff/cffpic.c, src/cff/cffpic.h, src/pshinter/pshpic.c, src/pshinter/pshpic.h, src/psnames/pspic.c, src/psnames/pspic.h, src/raster/rastpic.c, src/raster/rastpic.h, src/sfnt/sfntpic.c, src/sfnt/sfntpic.h, src/smooth/ftspic.c, src/smooth/ftspic.h, src/truetype/ttpic.c, src/truetype/ttpic.h: Removed. ---------------------------------------------------------------------------- Copyright (C) 2018-2022 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, and distributed under the terms of the FreeType project license, LICENSE.TXT. By continuing to use, modify, or distribute this file you indicate that you have read the license and understand and accept it fully. Local Variables: version-control: never coding: utf-8 End:
whupdup/frame
real/third_party/freetype-2.12.0/docs/oldlogs/ChangeLog.210
210
gpl-3.0
247,069
2006-05-12 Werner Lemberg <wl@gnu.org> * Version 2.2.1 released. ========================= Tag sources with `VER-2-2-1'. 2006-05-12 Werner Lemberg <wl@gnu.org> * src/tools/docmaker/sources.py (re_source_keywords): Add word boundary markers. * src/tools/docmaker/content.py (re_field): Allow `.' in field names (but not at the beginning or end). * src/tools/docmaker/tohtml.py (html_header_1): Use `utf-8' charset. (block_footer): Split into... (block_footer_start, block_footer_middle, block_footer_end): This to add navigation buttons. (HtmlFormatter::block_exit): Updated. * include/freetype/*: Many minor documentation improvements (adding links, spelling errors, etc.). 2006-05-11 Werner Lemberg <wl@gnu.org> * README: Minor updates. * include/freetype/*: s/scale/scaling value/ where appropriate. Many other minor documentation improvements. * src/tools/docmaker/sources.py (re_italic, re_bold): Handle trailing punctuation. * src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_word): Add warning message for undefined cross references. Update handling of re_italic and re_bold. 2006-05-11 Masatake YAMATO <jet@gyve.org> * builds/unix/ftsystem.c (FT_Stream_Open): Check errno only if read system call returns -1. Remove a redundant parenthesis. 2006-05-10 Werner Lemberg <wl@gnu.org> * builds/unix/ftsystem.c (FT_Stream_Open): Avoid infinite loop if given an empty, un-mmap()able file. Reported and suggested fix in Savannah bug #16555. * builds/freetype.mk (refdoc): Write-protect the `docmaker' directory to suppress generation of .pyc files. According to the Python docs there isn't a more elegant solution (currently). * builds/toplevel.mk (dist): New target which builds .tar.gz, .tar.bz2, and .zip files. Note that the version number is still hard-coded. (do-dist): Sub-target of `dist'. (CONFIG_GUESS, CONFIG_SUB): New variables. (.PHONY): Updated. 2006-05-09 Rajeev Pahuja <rpahuja@esri.com> * builds/win32/visualc/freetype.sln, builds/win32/visualc/freetype.vcproj: Upgraded to VS.NET 2005 from VS.NET 2003 Added files ftbbox.c, fttype1.c, ftwinfnt.c, ftsynth.c. * builds/win32/visualc/index.html: Updated. 2006-05-07 Werner Lemberg <wl@gnu.org> Put version information into the configure script. Reported by Paul Watson <pwatson@redlinepy.com>. * builds/unix/configure.ac: Renamed to... * builds/unix/configure.raw: This which now serves (with appropriate modifications) as a template for configure.ac. * version.sed: New script. * autogen.sh: Generate configure.ac from configure.raw, using FREETYPE_MAJOR, FREETYPE_MINOR, and FREETYPE_PATCH from freetype.h. 2006-05-06 Werner Lemberg <wl@gnu.org> * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1. * builds/unix/configure.ac (version_info): Set to 9:10:3. * builds/win32/visualc/index.html, builds/win32/visualc/freetype.dsp, builds/win32/visualc/freetype.vcproj, builds/freetype.mk (refdoc), Jamfile (RefDoc), README: s/220/221/, s/2.2.0/2.2.1/. Minor updates. * docs/CHANGES, docs/VERSION.DLL, docs/PROBLEMS, README.CVS: Updated. * builds/unix/install-sh: Updated from `texinfo' CVS module at savannah.gnu.org. * devel/ftoption.h: Synchronize with include/freetype/config/ftoption.h. 2006-05-04 Werner Lemberg <wl@gnu.org> * src/lzw/ftlzw2.c: Renamed to... * src/lzw/ftlzw.c: This. * src/lzw/Jamfile, src/lzw/rules.mk: Updated. * builds/mac/FreeType.m68k_cfm.make.txt, builds/mac/FreeType.m68k_far.make.txt, builds/mac/FreeType.ppc_carbon.make.txt, builds/mac/FreeType.ppc_classic.make.txt: Updated. 2006-05-03 David Turner <david@freetype.org> Allow compilation again with C++ compilers. * include/freetype/internal/ftmemory.h (FT_ASSIGNP, FT_ASSIGNP_INNER): New macros which do the actual assignment, and which exist in two variants (for C and C++). Update callers accordingly. 2006-05-03 Werner Lemberg <wl@gnu.org> * include/freetype/config/ftoption.h (FT_STRICT_ALIASING): Removed. 2006-05-02 Werner Lemberg <wl@gnu.org> * include/freetype/internal/ftmemory.h: s/new/newsz/ (for C++). (FT_ALLOC): Remove redundant redefinition. * builds/compiler/gcc-dev.mk (CFLAGS) [g++]: Don't use `-Wstrict-prototypes'. * src/base/ftstream.c (FT_Stream_EnterFrame): Add cast. * include/freetype/config/ftconfig.h (FT_BASE_DEF) [__cplusplus]: Remove `extern'. 2006-05-02 David Turner <david@freetype.org> Update the memory management functions and macros to safely deal with array size buffer overflows. This corresponds to attempts to allocate arrays that are too large. For an example, consider the following code: count = read_uint32_from_file(); array = malloc( sizeof ( Item ) * count ); for ( nn = 0; nn < count; nn++ ) array[nn] = read_item_from_file(); If `count' is larger than `FT_UINT_MAX/sizeof(Item)', the multiplication overflows, and the array allocated os smaller than the data read from the file. In this case, the heap will be trashed, and this can be used as a denial-of-service attack, or make the engine crash later. The FT_ARRAY_NEW and FT_ARRAY_RENEW macros now ensure that the new count is no larger than `FT_INT_MAX/item_size', otherwise a new error code `FT_Err_Array_Too_Large' will be returned. Note that the memory debugger now works again when FT_DEBUG_MEMORY is defined. FT_STRICT_ALIASING has disappeared; the corresponding code is now the default. * include/freetype/config/ftconfig.h (FT_BASE_DEF) [!__cplusplus]: Don't use `extern'. * include/freetype/fterrdef.h (FT_Err_Array_Too_Large): New error code. * include/freetype/internal/ftmemory.h (FT_DEBUG_INNER) [FT_DEBUG_MEMORY]: New macro. (ft_mem_realloc, ft_mem_qrealloc): Pass new object size count also. (ft_mem_alloc_debug, ft_mem_qalloc_debug, ft_mem_realloc_debug, ft_mem_qrealloc_debug, ft_mem_free_debug): Removed. (FT_MEM_ALLOC, FT_MEM_REALLOC, FT_MEM_QALLOC, FT_MEM_QREALLOC, FT_MEM_FREE): Redefine. (FT_MEM_NEW_ARRAY, FT_MEM_RENEW_ARRAY, FT_MEM_QNEW_ARRAY, FT_MEM_QRENEW_ARRAY): Redefine. (FT_ALLOC_MULT, FT_REALLOC_MULT, FT_MEM_QALLOC_MULT, FT_MEM_QREALLOC_MULT): New macros. Update callers where appropriate. (FT_MEM_SET_ERROR): Slightly redefine. * src/base/ftdbgmem.c (_ft_debug_file, _ft_debug_lineno) [FT_DEBUG_MEMORY]: New global variables, replacing... (FT_MemTableRec) [FT_DEBUG_MEMORY]: Remove `filename' and `line_no'. Update all callers. (ft_mem_debug_alloc) [FT_DEBUG_MEMORY]: Avoid possible integer overflow. (ft_mem_alloc_debug, ft_mem_realloc_debug, ft_mem_qalloc_debug, ft_mem_qrealloc_debug, ft_mem_free_debug): Removed. * src/base/ftmac.c (read_lwfn): Catch integer overflow. * src/base/ftrfork.c (raccess_guess_darwin_hfsplus): Ditto. * src/base/ftutil.c: Remove special code for FT_STRICT_ALIASING. (ft_mem_alloc, ft_mem_realloc, ft_mem_qrealloc): Rewrite. * include/freetype/ftstream.h (FT_FRAME_ENTER, FT_FRAME_EXIT, FT_FRAME_EXTRACT, FT_FRAME_RELEASE): Use FT_DEBUG_INNER to report the place where the frames were entered, extracted, exited or released in the memory debugger. * src/base/ftstream.c (FT_Stream_ReleaseFrame) [FT_DEBUG_MEMORY]: Call ft_mem_free. (FT_Stream_EnterFrame) [FT_DEBUG_MEMORY]: Use ft_mem_qalloc. (FT_Stream_ExitFrame) [FT_DEBUG_MEMORY]: Use ft_mem_free. 2006-04-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * src/base/ftobjs.c (Mac_Read_POST_Resource): Correct pfb_pos initialization, remove extra cast to copy to pfb_lenpos. This fixes parsing of PFB fonts with MacOS resource fork (bug introduced 2003-09-11). Patch provided by Huib-Jan Imbens <ft@imbens.nl>. 2006-04-29 Werner Lemberg <wl@gnu.org> Further C library abstraction. Based on a patch from msn2@bidyut.com. * include/freetype/config/ftstdlib.h (FT_CHAR_BIT, FT_FILE, ft_fopen, ft_fclose, ft_fseek, ft_ftell, ft_fread, ft_smalloc, ft_scalloc, ft_srealloc, ft_sfree, ft_labs): New wrapper macros for C library functions. Update all users accordingly (and catch some other places where the C library function was used instead of the wrapper functions). * src/base/ftsystem.c: Don't include stdio.h and stdlib.h. * src/gzip/zutil.h [MSDOS && !(__TURBOC__ || __BORLANDC__)]: Don't include malloc.h. * builds/unix/unix-def.in (datarootdir): Define, for autoconf 2.59c and forthcoming versions. 2006-04-28 Werner Lemberg <wl@gnu.org> * src/lzw/ftlzw.c, src/lzw/zopen.c, src/lzw/zopen.h: Removed, obsolete. 2006-04-27 yi luo <luoyi.ly@gmail.com> * builds/win32/visualc/freetype.vcproj: Updated. 2006-04-26 David Turner <david@freetype.org> * Version 2.2 released. ======================= Tag sources with `VER-2-2-0'. 2006-04-26 Werner Lemberg <wl@gnu.org> * src/psaux/psobjs.c (shift_elements): Don't use FT_Long but FT_PtrDist for `delta'. Reported by Céline PILLET <Celine.Pillet@Tagginfo.com>. 2006-04-21 David Turner <david@freetype.org> * include/freetype/ftincrem.h: Documentation updates. (FT_Incremental_Interface): New typedef. * include/freetype/ftmodapi.h, include/freetype/ftglyph.h: Documentation updates. * include/freetype/freetype.h: Documentation update. (FT_HAS_FAST_GLYPHS): Always set to 0. * include/freetype/ftstroke.h, src/base/ftstroke.c (FT_Stroker_New): Take an FT_Library argument instead of FT_Memory. * src/sfnt/ttcmap.c: Remove compiler warnings (gcc-4.0.2). 2006-04-13 David Turner <david@freetype.org> * src/autofit/afloader.c (af_loader_init, af_loader_load_g): Remove superfluous code in the auto-fitter's loader. 2006-04-05 Detlef Würkner <TetiSoft@apg.lahn.de> * builds/amiga/makefile, builds/amiga/makefile.os4, builds/amiga/smakefile: Added FT2_BUILD_LIBRARY define. 2006-04-03 luoyi <luoyi.ly@gmail.com> * builds/compiler/intelc.mk (TE): New variable. (ANSIFLAGS): Updated. 2006-04-03 Werner Lemberg <wl@gnu.org> * builds/exports.mk (clean_symbols_list, clean_apinames): Removed. (CLEAN): Add $(EXPORTS_LIST) and $(APINAMES_EXE). (.PHONY): Updated. * configure.ac: Minor fixes to improve --help output. * docs/PROBLEMS: New file. 2006-04-01 David Turner <david@freetype.org> * docs/CHANGES: Updated. * include/freetype/ftcache.h, include/freetype/config/ftheader.h: Update documentation comments. 2006-04-01 Werner Lemberg <wl@gnu.org> * builds/unix/install.mk (uninstall): Don't handle `cache' directory which no longer exists. 2006-03-29 Detlef Würkner <TetiSoft@apg.lahn.de> * src/psaux/psconv.c: Changed some variables which are expected to hold negative values from `char' to `FT_Char' to allow building with a compiler where `char' is unsigned by default. 2006-03-27 David Turner <david@freetype.org> * src/sfnt/ttkern.c (tt_face_get_kerning): Fix a serious bug that causes some programs to go into an infinite loop when dealing with fonts that don't have a properly sorted kerning sub-table. 2006-03-26 Werner Lemberg <wl@gnu.org> * src/bdf/bdflib.c (ERRMSG4): New macro. (_bdf_parse_glyphs): Handle invalid BBX values. * include/freetype/fterrdef.h (FT_Err_Bbx_Too_Big): New error macro. 2006-03-23 Werner Lemberg <wl@gnu.org> * docs/CHANGES: Updated. * src/tools/docmaker/tohtml.py (html_header_2): Add horizontal padding between table elements. (html_header_1): The `DOCTYPE' comment must be in uppercase. (make_html_para): Convert `...' quotations into real left and right single quotes. Use `para_header' and `para_footer'. * src/tools/docmaker/sources.py (re_bold, re_italic): Accept "'" also. 2006-03-23 David Turner <david@freetype.org> Add FT_Get_SubGlyph_Info API to retrieve subglyph data. Note that we do not expose the FT_SubGlyphRec structure. * include/freetype/internal/ftgloadr.h (FT_SUBGLYPH_FLAGS_*): Moved to... * include/freetype/freetype.h (FT_SUBGLYPH_FLAGS_*): Here. (FT_Get_SubGlyph_Info): New declaration. * src/base/ftobjs.c (FT_Get_SubGlyph_Info): New function. * src/autofit/afloader.c (af_loader_load_g): Compute lsb_delta and rsb_delta correctly in edge cases. 2006-03-22 Werner Lemberg <wl@gnu.org> * src/cache/ftccache.c, (ftc_node_mru_up, FTC_Cache_Lookup) [!FTC_INLINE]: Compile conditionally. * src/cache/ftccache.h: Updated. * src/cache/ftcglyph.c (FTC_GNode_Init, FTC_GNode_UnselectFamily, FTC_GNode_Done, FTC_GNode_Compare, FTC_Family_Init, FTC_GCache_New): s/FT_EXPORT/FT_LOCAL/. (FTC_GCache_Init, FTC_GCache_Done): Commented out. (FTC_GCache_Lookup) [!FTC_INLINE]: Compile conditionally. s/FT_EXPORT/FT_LOCAL/. * src/cache/ftcglyph.h: Updated. * src/cache/ftcimage.c (FTC_INode_Free, FTC_INode_New): s/FT_EXPORT/FT_LOCAL/. (FTC_INode_Weight): Commented out. * src/cache/ftcimage.h: Updated. * src/cache/ftcmanag.c (FTC_Manager_Compress, FTC_Manager_RegisterCache, FTC_Manager_FlushN): s/FT_EXPORT/FT_LOCAL/. * src/cache/ftcmanag.h: Updated. * src/cache/ftcsbits.c (FTC_SNode_Free, FTC_SNode_New, FTC_SNode_Compare): s/FT_EXPORT/FT_LOCAL/. (FTC_SNode_Weight): Commented out. * src/cache/ftcsbits.h: Updated. 2006-03-22 Werner Lemberg <wl@gnu.org> * src/cache/ftccache.c, src/cache/ftccache.h (FTC_Node_Destroy): Remove, unused. * src/cache/ftccmap.h: Remove, unused. * src/cache/rules.mk (CACHE_DRV_H): Remove ftccmap.h. 2006-03-21 Zhe Su <james.su@gmail.com> * src/base/ftoutln.c (FT_Outline_Get_Orientation): Improve algorithm. 2006-03-21 Werner Lemberg <wl@gnu.org> * src/cff/cfftypes.h (CFF_CharsetRec): Add `max_cid' member. * src/cff/cffload.c (cff_charset_load): Set `charset->max_cid'. * src/cff/cffgload.c (cff_slot_load): Change type of third parameter to `FT_UInt'. Check range of `glyph_index'. * src/cff/cffgload.h: Updated. * src/sfnt/ttcmap.c (tt_face_build_cmaps): Handle invalid offset correctly. * builds/freetype.mk (refdoc), docs/CHANGES, Jamfile (RefDoc), README: s/2.1.10/2.2/. 2006-03-21 David Turner <david@freetype.org> * src/autofit/aflatin.c (af_latin_metrics_scale): Fix small bug that crashes the auto-hinter (introduced by previous patch). 2006-03-20 Werner Lemberg <wl@gnu.org> * builds/freetype.mk (CACHE_DIR, CACHE_H): Remove. (FREETYPE_H): Updated. * src/cache/rules.mk (CACHE_H_DIR): Remove. (CACHE_DRV_H): Updated. 2006-03-20 David Turner <david@freetype.org> * include/freetype/cache/ftccache.h, include/freetype/cache/ftccmap.h, include/freetype/cache/ftcglyph.h include/freetype/cache/ftcimage.h include/freetype/cache/ftcmanag.h include/freetype/cache/ftcmru.h include/freetype/cache/ftcsbits.h: Move to... * src/cache/ftccache.h, src/cache/ftcglyph.h, src/cache/ftcimage.h, src/cache/ftcsbits.h, src/cache/ftcmanag.h, src/cache/ftccmap.h, src/cache/ftcmru.h: This new location. Update declarations according to the changes in the corresponding source files. Note that these files are not used by FreeType clients; all public APIs of the cache module have been already moved to `include/freetype/ftcache.h', and all FT_CACHE_INTERNAL_XXXX_H macros resolve to it. Reason for the move is to allow modifications of the internals without interferences with rogue clients. Note that there are no known clients that access the cache internals at the moment. * builds/unix/install.mk (install): Don't install headers from $(CACHE_H). Remove `freetype/cache' from the target directory. * include/freetype/config/ftheader.h (FT_CACHE_MANAGER_H, FT_CACHE_INTERNAL_MRU_H, FT_CACHE_INTERNAL_MANAGER_H, FT_CACHE_INTERNAL_CACHE_H, FT_CACHE_INTERNAL_GLYPH_H, FT_CACHE_INTERNAL_IMAGE_H, FT_CACHE_INTERNAL_SBITS_H): Point to FT_CACHE_H. * src/cache/ftcbasic.c, src/cache/ftccache.h, src/cache/ftccback.h, src/cache/ftccmap.c, src/cache/ftcglyph.c, src/cache/ftcglyph.h, src/cache/ftcimage.c, src/cache/ftcimage.h, src/cache/ftcmanag.c, src/cache/ftcmanag.h, src/cache/ftcmru.h, src/cache/ftcsbits.c, src/cache/ftcsbits.h: Don't use the FT_CACHE_INTERNAL_XXX_H macros but include the headers directly (which are now in `src/cache'). * src/cache/ftccache.c: Don't use the FT_CACHE_INTERNAL_XXX_H macros but include the headers directly. (FTC_Cache_Init, FTC_Cache_Done, FTC_Cache_NewNode, FTC_Cache_Lookup, FTC_Cache_RemoveFaceID): Declare as FT_LOCAL_DEF. * src/cache/ftccache.c: Don't use the FT_CACHE_INTERNAL_XXX_H macros but include the headers directly. (FTC_MruNode_Prepend, FTC_MruNode_Up, FTC_MruNode_Remove, FTC_MruList_Init, FTC_MruList_Reset, FTC_MruList_Done, FTC_MruList_New, FTC_MruList_Remove, FTC_MruList_RemoveSelection): Declare as FT_LOCAL_DEF. (FTC_MruList_Find, FTC_MruList_Lookup) [!FTC_INLINE]: Compile conditionally. Declare as FT_LOCAL_DEF. * builds/win32/visualc/freetype.dsp: Update project file, add missing base source files (ftstroke.c, ftxf86.c, etc.). * src/autofit/afcjk.c, src/autofit/aflatin.c, src/base/ftobjs.c, src/cff/cffobjs.c, src/cid/cidobjs.c, src/pfr/pfrobjs.c, src/sfnt/sfobjs.c, src/sfnt/ttmtx.c, src/type1/t1afm.c, src/type1/t1objs.c: Remove compiler warnings when building with Visual C++ 6 and /W4. * src/autofit/aflatin.c (af_latin_hints_init): Disable horizontal hinting for italic/oblique fonts. * src/truetype/ttpload.c, src/truetype/ttpload.h (tt_face_get_device_metrics): Change second argument to `FT_UInt'. 2006-03-06 David Turner <david@freetype.org> * src/cache/ftcmanag.c (FTC_Manager_Lookup_Size): Prevent crashes in Mozilla/FireFox print preview in Ubuntu Hoary. 2006-02-28 Chia-I Wu <b90201047@ntu.edu.tw> * src/base/ftutil.c (ft_mem_qalloc) [FT_STRICT_ALIASING]: Do not return error when size == 0. 2006-02-28 Chia-I Wu <b90201047@ntu.edu.tw> * src/base/ftobjs.c (FT_Done_Library): Remove modules in reverse order so that type42 module is removed before truetype module. This avoids double free in some occasions. 2006-02-28 David Turner <david@freetype.org> * Release candidate VER-2-2-0-RC4. ---------------------------------- * docs/CHANGES: Documentation updates. 2006-02-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * modules.cfg (BASE_EXTENSIONS): Compile in ftgxval.c by default to build ftvalid in ft2demos. It works as dummy ABI if gxvalid is not built. 2006-02-27 Werner Lemberg <wl@gnu.org> * include/freetype/cache/ftccache.h [FT_CONFIG_OPTION_OLD_INTERNALS]: Remove declaration of ftc_node_done. * src/cache/ftccache.c (ftc_node_destroy) [!FT_CONFIG_OPTION_OLD_INTERNALS]: Mark as FT_LOCAL_DEF. This should now fix all possible compilation options. 2006-02-27 David Turner <david@freetype.org> * src/base/ftutil.c (ft_mem_alloc, ft_mem_qalloc, ft_mem_realloc, ft_mem_qrealloc): Return an error if a negative size is passed in parameters. * src/cache/ftccache.c (ftc_node_destroy): Mark as FT_BASE_DEF since it needs to be exported for rogue clients. * src/pshinter/pshglob.c (psh_blues_set_zones_0): Prevent problems with malformed fonts which have an odd number of blue values (these are broken according to the specs). * src/cff/cffload.c (cff_subfont_load), src/type1/t1load.c (T1_Open_Face): Modify the loaders to force even-ness of `num_blue_values'. (cff_index_access_element): Ignore invalid entries in index files. 2006-02-27 Chia-I Wu <b90201047@ntu.edu.tw> * src/base/ftobjs.c (FT_Set_Char_Size): Check the case where width or height is 0. 2006-02-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * builds/mac/FreeType.m68k_cfm.make.txt, builds/mac/FreeType.m68k_far.make.txt, builds/mac/FreeType.ppc_carbon.make.txt, builds/mac/FreeType.ppc_classic.make.txt: Update to new header inclusion introduced on 2006-02-16. 2006-02-27 Chia-I Wu <b90201047@ntu.edu.tw> * src/base/ftobjs.c (GRID_FIT_METRICS): New macro. (ft_glyphslot_grid_fit_metrics, FT_Load_Glyph) [GRID_FIT_METRICS]: Re-enable glyph metrics grid-fitting. It is now done in the base layer. (FT_Set_Char_Size, FT_Set_Pixel_Sizes): Make sure the width and height are not too small or too large, just like we were doing in 2.1.10. * src/autofit/afloader.c (af_loader_load_g): The vertical metrics are not scaled. 2006-02-26 Werner Lemberg <wl@gnu.org> * docs/release: Minor additions and clarifications. * docs/CHANGES: Updated to reflect many fixes for backward compatibility. Still incomplete. 2006-02-26 David Turner <david@freetype.org> * src/base/ftobjs.c (ft_recompute_scaled_metrics): Re-enable conservative rounding of metrics to avoid breaking clients like Pango (see https://bugzilla.gnome.org/show_bug.cgi?id=327852). 2006-02-25 Werner Lemberg <wl@gnu.org> * devel/ftoption.h: Synchronize with include/freetype/config/ftoption.h. * src/cache/ftccache.c (ftc_node_destroy): Use FT_LOCAL_DEF (again). 2006-02-25 David Turner <david@freetype.org> Fix compiler warnings as well as C++ compilation problems. Add missing prototypes. * src/autofit/afcjk.c, src/base/ftobjs.c, src/base/ftutil.c, src/bdf/bdfdrivr.c, src/cff/cffcmap.c, src/cff/cffobjs.c, src/psaux/afmparse.c,, src/psaux/t1cmap.c, src/smooth/ftgrays.c src/tools/apinames.c, src/truetype/ttdriver.c: Add various casts, initialize variables, and decorate functions with FT_CALLBACK_DEF, etc., to fix compiler warnings (and C++ compiling errors). * src/cache/ftcbasic.c: Fix `-Wmissing-prototypes' warnings with gcc. * builds/unix/ftsystem.c: Don't include FT_INTERNAL_OBJECTS_H but FT_INTERNAL_STREAM_H. * src/base/ftsystem.c: Include FT_INTERNAL_STREAM_H. * include/freetype/config/ftheader.h (FT_PFR_H): New macro. * include/freetype/config/ftoption.h (FT_STRICT_ALIASING): Don't define for C++. * include/freetype/internal/services/svotval.h: Don't include FT_OPENTYPE_VALIDATE_H but FT_INTERNAL_VALIDATE_H. * include/freetype/internal/services/svpfr.h: Include FT_PFR_H. * src/gzip/ftgzip.c: Include FT_GZIP_H. * src/lzw/ftlzw.c, src/lzw/ftlzw2.c: Include FT_LZW_H. * src/sfnt/ttbdf.c (tt_face_load_bdf_props): Rearrange code. 2006-02-24 Chia-I Wu <b90201047@ntu.edu.tw> * src/base/ftoutln.c (FT_OUTLINE_GET_CONTOUR, ft_contour_has, ft_contour_enclosed, ft_outline_get_orientation): Commented out. We have to wait until `FT_GlyphSlot_Own_Bitmap' is stabilized. (FT_Outline_Embolden): Use `FT_Outline_Get_Orientation'. 2006-02-24 Chia-I Wu <b90201047@ntu.edu.tw> * include/freetype/ftbitmap.h (FT_Bitmap_Embolden): Update documentation. * include/freetype/ftsynth.h (FT_GlyphSlot_Own_Bitmap), src/base/ftsynth.c (FT_GlyphSlot_Own_Bitmap): New function to make sure a glyph slot owns its bitmap. It is also marked experimental and due to change. (FT_GlyphSlot_Embolden): Undo the last change. It turns out that rendering the outline confuses some applications. 2006-02-24 David Turner <david@freetype.org> * Release candidate VER-2-2-0-RC3. ---------------------------------- * src/cache/ftcbasic.c: Correct compatibility hack bug. 2006-02-24 Chia-I Wu <b90201047@ntu.edu.tw> * include/freetype/freetype.h (FT_Size_RequestRec): Change the type of `width' and `height' to `FT_Long'. (enum FT_Size_Request_Type), src/base/ftobjs.c (FT_Request_Metrics): New request type `FT_SIZE_REQUEST_TYPE_SCALES' to specify the scales directly. 2006-02-23 David Turner <david@freetype.org> Two BDF patches from Debian libfreetype6 for 2.1.10. * src/bdf/bdflib.c (_bdf_parse_glyphs): Fix a bug with zero-width glyphs. Fix a problem with large encodings. Fix binary compatibility issues for gnustep-back (GNUstep backend module) which still crashes under Sarge. * src/cache/ftccmap.c (FTC_OldCMapType, FTC_OldCMapIdRec, FTC_OldCMapDesc) [FT_CONFIG_OPTION_OLD_INTERNALS]: New data structures and enumerations. (FTC_CMapCache_Lookup) [FT_CONFIG_OPTION_OLD_INTERNALS]: New compatibility code. * src/cache/ftcbasic.c: Fix a silly bug that prevented our `hack' to support rogue clients compiled against 2.1.7 to work correctly. This probably explains the GNUstep crashes with the second release candidate. 2006-02-23 Chia-I Wu <b90201047@ntu.edu.tw> * include/freetype/ftoutln.h (enum FT_Orientation): New value `FT_ORIENTATION_NONE'. * src/base/ftoutln.c (FT_OUTLINE_GET_CONTOUR, ft_contour_has, ft_contour_enclosed, ft_outline_get_orientation): Another version of `FT_Outline_Get_Orientation'. This version differs from the public one in that each part (contour not enclosed in another contour) of the outline is checked for orientation. (FT_Outline_Embolden): Use `ft_outline_get_orientation'. * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Render the outline and use bitmap's embolden routine when the outline one failed. 2006-02-22 Chia-I Wu <b90201047@ntu.edu.tw> * modules.cfg: Compile in ftotval.c and ftxf86.c by default for ABI compatibility. * src/sfnt/sfobjs.c (sfnt_done_face): Fix a memory leak. * src/sfnt/ttsbit0.c (tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_byte_aligned) [FT_OPTIMIZE_MEMORY]: Fix sbit loading. (Only tested with bit aligned sbit with x_pos == 0.) * src/truetype/ttpload.c (tt_face_load_hdmx, tt_face_get_device_metrics) [FT_OPTIMIZE_MEMORY]: `hdmx' is not actually used. 2006-02-21 David Turner <david@freetype.org> Add a new API named FT_Get_TrueType_Engine_Type to determine whether we have a patented, unpatented, or unimplemented TrueType bytecode interpreter. The FT_Get_Module_Flags API was removed consequently. * include/freetype/ftmodapi.h (FT_Module_Get_Flags): Removed. Replaced with... (FT_Get_TrueType_Engine_Type): This. (FT_TrueTypeEngineType): New enumeration. * include/freetype/internal/ftserv.h (FT_SERVICE_TRUETYPE_ENGINE_H): New macro. * src/base/ftobjs.c: Include FT_SERVICE_TRUETYPE_ENGINE_H. (FT_Module_Get_Flags): Removed. Replaced with... (FT_Get_TrueType_Engine_Type): This. * src/truetype/ttdriver.c: Include FT_SERVICE_TRUETYPE_ENGINE_H. (tt_service_truetype_engine): New service structure. (tt_services): Register it. * include/freetype/internal/services/svtteng.h: New file. * src/sfnt/sfobjs.c (sfnt_load_face): Fix silly bug that prevented embedded bitmaps from being correctly listed and used. * src/sfnt/ttmtx.c (tt_face_load_hmtx): Disable memory optimization if FT_CONFIG_OPTION_OLD_INTERNALS is used. The is necessary because libXfont is directly accessing the HMTX data, unfortunately. Fix some compiler warnings. (tt_face_get_metrics): Ditto. * src/pfr/pfrsbit.c (pfr_slot_load_bitmap): Fix handling of character advances. 2006-02-20 David Turner <david@freetype.org> Support binary compatibility with the X.Org server's Xfont library. Note that this change unfortunately prevents memory optimizations for the embedded bitmap loader. * include/freetype/internal/sfnt.h (SFNT_Interface): Move `set_sbit_strike' and `load_sbit_metrics' fields to the location of version 2.1.8. * src/sfnt/sfdriver.c (tt_face_set_sbit_strike_stub): Call FT_Size_Request. (sfnt_interface): Updated. * src/sfnt/ttsbit.c [FT_CONFIG_OPTION_OLD_INTERNALS]: Don't load ttsbit0.c. (tt_load_sbit_metrics): Make `sbit_small_metrics_fields' static. * src/sfnt/ttsbit.h: Updated. 2006-02-17 David Turner <david@freetype.org> * builds/unix/unix-cc.in (LINK_LIBRARY): Don't filter out exported functions anymore. This ensures that all FT_BASE internal functions are available for dynamic linking. * include/freetype/ftcache.h (FTC_IMAGE_TYPE_COMPARE, FTC_IMAGE_TYPE_HASH), src/cache/ftcbasic.c (FTC_OldFontRec, FTC_OldImageDescRec, FTC_ImageCache_Lookup, FTC_Image_Cache_New, FTC_OldImageDesc, FTC_OLD_IMAGE_FORMAT, ftc_old_image_xxx, ftc_image_type_from_old_desc, FTC_Image_Cache_Lookup, FTC_SBitCache_Lookup, FTC_SBit_Cache_New, FTC_SBit_Cache_Lookup) [FT_CONFIG_OPTION_OLD_INTERNALS]: Try to revive old functions of the cache sub-system. We try to recognize old legacy signatures with a gross hack (hope it works). 2006-02-17 Werner Lemberg <wl@gnu.org> * devel/ftoption.h: Synchronize with include/freetype/config/ftoption.h. 2006-02-16 David Turner <david@freetype.org> Massive changes to the internals to respect the internal object layouts and exported functions of FreeType 2.1.7. Note that the cache sub-system cannot be fully retrofitted, unfortunately. * include/freetype/config/ftoption.h (FT_CONFIG_OPTION_OLD_INTERNALS): New macro. * include/freetype/ftcache.h, include/freetype/cache/ftccache.h, include/freetype/cache/ftccmap.h, include/freetype/internal/ftcalc.h, include/freetype/internal/ftdriver.h, include/freetype/internal/ftmemory.h, include/freetype/internal/ftobjs.h, include/freetype/internal/psaux.h, include/freetype/internal/sfnt.h, include/freetype/internal/t1types.h, include/freetype/internal/tttypes.h, src/base/ftcalc.c, src/base/ftdbgmem.c, src/base/ftobjs.c, src/base/ftutil.c, src/bdf/bdfdrivr.c, src/cache/ftccache.c, src/cache/ftccback.h, src/cache/ftcmanag.c, src/cff/cffdrivr.c, src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/pfr/pfrdrivr.c, src/psaux/psauxmod.c, src/sfnt/sfdriver.c, src/truetype/ttdriver.c, src/type1/t1driver.c, src/type1/t1objs.c, src/type42/t42drivr.c, src/winfonts/winfnt.c: Use FT_CONFIG_OPTION_OLD_INTERNALS to revive old functions and data structures. Move newly added structure elements to the end of the affected structure and add stub fields (if FT_CONFIG_OPTION_OLD_INTERNALS is defined) to assure binary compatibility with older FreeType versions. Use FT_CONFIG_OPTION_OLD_INTERNALS to add function stubs for old functions: ft_stub_set_char_sizes ft_stub_set_pixel_sizes Rename the following internal functions to provide the old function names as stubs: FT_Alloc -> ft_mem_alloc FT_QAlloc -> ft_mem_qalloc FT_Realloc -> ft_mem_realloc FT_QRealloc -> ft_mem_qrealloc FT_Free -> ft_mem_free FT_Alloc_Debug -> ft_mem_alloc_debug FT_QAlloc_Debug -> ft_mem_qalloc_debug FT_Realloc_Debug -> ft_mem_realloc_debug FT_QRealloc_Debug -> ft_mem_qrealloc_debug FT_Free_Debug -> ft_mem_free_debug 2006-02-15 Chia-I Wu <b90201047@ntu.edu.tw> * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): Remove unused `max_points' and `max_contours'. * src/cid/cidobjs.c (cid_face_init), src/type1/t1objs.c (T1_Face_Init), src/type42/t42objs.c (T42_Face_Init): Update. * include/freetype/internal/tttypes.h (TT_FaceRec): Remove unused `max_components'. * src/truetype/ttinterp.h (TT_ExecContextRec): Remove unused `loadSize' and `loadStack'. * src/truetype/ttinterp.c (TT_Done_Context, TT_Load_Context), src/sfnt/ttload.c (tt_face_load_maxp): Update. * src/cff/cffobjs.h (cff_size_select), src/sfnt/sfdriver.c (sfnt_interface), src/truetype/ttdriver.c (tt_size_request): Fix compiler errors/warnings when TT_CONFIG_OPTION_EMBEDDED_BITMAPS is not defined. * src/sfnt/ttmtx.c (tt_face_load_hmtx, tt_face_get_metrics): Fix possible segment faults for the non-FT_OPTIMIZE_MEMORY'ed versions. (finally!) For most OpenType tables, `tt_face_load_xxxx' simply loads the table and `face->root' is set later in `sfnt_load_face'. Here, we try to make this work for _all_ tables. Also improve tracing messages. * src/sfnt/ttsbit.c, src/sfnt/ttsbit0.c, src/sfnt/ttload.c, src/sfnt/ttmtx.c: all `tt_face_load_xxxx' should load the table and then exit. Error handling or setting face->root is done later in `sfnt_load_face'. * src/sfnt/sfobjs.c (sfnt_load_face): Work harder. Mac bitmap-only fonts are not scalable. Check that `face->header.Units_Per_EM' is not zero. (LOAD_, LOADM_): Emit pretty trace messages. * src/sfnt/ttsbit0.c (tt_face_load_strike_metrics): Read metrics from `eblc'. * src/sfnt/ttcmap.c (tt_face_build_cmaps), src/sfnt/ttpost.c (load_format_20, load_format_25, tt_face_get_ps_name): Use face->max_profile.numGlyphs, instead of face->root.num_glyphs. 2006-02-14 Werner Lemberg <wl@gnu.org> * include/freetype/ftoutln.h (FT_Outline_Embolden): Mention in documentation that negative strength values are possible. Give an example call. * include/freetype/freetype.h (FT_GlyphSlotRec): Improve documentation of `outline' field. * src/sfnt/sfobjs.c: Include FT_INTERNAL_DEBUG_H. * src/sfnt/sfdriver.c: Include ttmtx.h. * src/autofit/afcjk.c: Include aftypes.h and aflatin.h. 2006-02-14 Chia-I Wu <b90201047@ntu.edu.tw> * src/sfnt/ttmtx.c (tt_face_get_metrics): Typo. 2006-02-14 Chia-I Wu <b90201047@ntu.edu.tw> * src/sfnt/ttmtx.c (tt_face_load_hhea, tt_face_load_hmtx): Simply return error if table is missing. Check table length in non-FT_OPTIMIZE_MEMORY'ed `tt_face_load_hmtx'. * src/sfnt/sfobjs.c (sfnt_load_face): Take care of missing metrics tables. The last change makes Mac bitmap-only font not load and this fixes it. * src/truetype/ttgload.c (load_truetype_glyph): Fix compilation error when FT_CONFIG_OPTION_INCREMENTAL is defined. 2006-02-13 Chia-I Wu <b90201047@ntu.edu.tw> Clean up the SFNT_Interface. In this final pass, `load_hmtx' is split from `load_hhea'. * include/freetype/internal/sfnt.h, src/sfnt/sfdriver.c, src/sfnt/ttmtx.c, src/sfnt/ttmtx.h: Split `hmtx' from `hhea'. * src/sfnt/sfobjs.c (sfnt_load_face): Update. 2006-02-13 Chia-I Wu <b90201047@ntu.edu.tw> * src/sfnt/ttmtx.h, src/sfnt/ttmtx.c: Why are there two copies of code... 2006-02-13 Chia-I Wu <b90201047@ntu.edu.tw> Clean up the SFNT_Interface. In this pass, we want to treat the font directory (offset table and table directory) as a normal table like the others. This also means that TTCs are no longer recognized there but in `init_face'. * include/freetype/internal/sfnt.h (SFNT_Interface), src/sfnt/sfdriver.c: `load_sfnt_header' and `load_directory' are combined and renamed to `load_font_dir'. * src/sfnt/ttload.h, src/sfnt/ttload.c: s/sfnt_dir_check/check_table_dir/. `sfnt_init' is moved to sfobjs.c and renamed to `sfnt_open_font'. `tt_face_load_sfnt_header' and `tt_face_load_directory' are combined and renamed to `tt_face_load_font_dir'. * src/sfnt/sfobjs.c (sfnt_init_face): Recognize TTC here. 2006-02-13 Chia-I Wu <b90201047@ntu.edu.tw> Clean up the SFNT_Interface. Table loading functions are now named after the tables' tags; `hdmx' is TrueType-specific and thus the code is moved to the truetype module; `get_metrics' is moved here from the truetype module so that the code can be shared with the cff module. This pass involves no real changes. That is, the code is moved verbatim mostly. The only exception is the return value of `tt_face_get_metrics'. * include/freetype/internal/sfnt.h, src/sfnt/rules.mk, src/sfnt/sfdriver.c, src/sfnt/sfnt.c, src/sfnt/sfobjs.c, src/sfnt/ttload.c, src/sfnt/ttload.h, src/sfnt/ttsbit.c, src/sfnt/ttsbit.h, src/sfnt/ttsbit0.c: Clean up the SFNT_Interface. * src/sfnt/ttmtx.c, src/sfnt/ttmtx.h: New files. Metrics-related tables' loading and parsing code is moved to here. Move `tt_face_get_metrics' here from the truetype module. The return value is changed from `void' to `FT_Error'. * include/freetype/internal/fttrace.h: New trace: ttmtx. * src/truetype/ttpload.c, src/truetype/ttpload.h: `hdmx' loading and parsing code is moved here. New function `tt_face_load_prep' split from `tt_face_load_fpgm'. `tt_face_load_fpgm' returns `FT_Err_Ok' if `fpgm' doesn't exist. * src/cff/cffgload.c, src/cff/cffobjs.c: Update. * src/truetype/ttgload.c, src/truetype/ttobjs.c: Update. 2006-02-11 Chia-I Wu <b90201047@ntu.edu.tw> * src/autofit/afcjk.c (af_cjk_metrics_init): Fix a stupid bug... * src/autofit/aflatin.c (af_latin_metrics_init_widths): Use AF_LatinMetricsRec as the dummy metrics because we cast the metrics to it later in `af_latin_hints_link_segments'. 2006-02-11 Chia-I Wu <b90201047@ntu.edu.tw> * include/freetype/config/ftoption.h (AF_CONFIG_OPTION_CJK): #define to enable autofit CJK script support. (#define'd by default.) * src/autofit/aflatin.h (AF_LATIN_CONSTANT): New macro. * src/autofit/aflatin.c (af_latin_metrics_init_widths): Make sure that `edge_distance_threshold' is always set. (af_latin_hints_link_segments): Potential divide-by-zero bug. Use latin constant in the scoring formula. * src/autofit/afcjk.c: Minor updates due to the above three changes. * docs/TODO, docs/CHANGES: Updated. 2006-02-09 Chia-I Wu <b90201047@ntu.edu.tw> Introduce experimental autofit CJK module based on akito's autohint patch. You need to #define AF_MOD_CJK in afcjk.c to enable it. * src/autofit/afglobal.c, src/autofit/afcjk.h, src/autofit/afcjk.c, src/autofit/rules.mk, src/autofit/autofit.c, src/autofit/aftypes.h: Add CJK module based on akito's autohint patch. * src/autofit/afhints.h (AF_SegmentRec): New field `len' for the overlap length of the segments. (AF_SEGMENT_LEN, AF_SEGMENT_DIST): New macros. * src/autofit/aflatin.h (af_latin_metrics_init_widths), src/autofit/aflatin.c (af_latin_metrics_init_widths): Made `FT_LOCAL'. Use the character given by the caller. (af_latin_metrics_init_widths, af_latin_hints_link_segments): Scale the thresholds. * src/autofit/afloader.c (af_loader_load_g): Respect AF_SCALER_FLAG_NO_ADVANCE. 2006-02-09 Werner Lemberg <wl@gnu.org> * src/cid/cidparse.c (cid_parse_new): Remove shadowing variable. 2006-02-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * src/cid/cidparse.c (cid_parse_new): Fix for abnormally short or broken CIDFont. Reported by Taek Kwan(TK) Lee (see ft-devel 2005-11-02). 2006-02-08 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * builds/unix/configure.ac: Fix bug for `--with-old-mac-fonts' option on UNIX platform. It has been broken since 2006-01-11. 2006-02-01 Werner Lemberg <wl@gnu.org> * src/otvalid/module.mk: s/otvalid_module_class/otv_module_class/. * src/gxvalid/module.mk: s/gxvalid_module_class/gxv_module_class/. * builds/unix/unixddef.mk: Actually do define PLATFORM (fixing change from 2006-01-31). (TOP_DIR, OBJ_DIR): Update. * builds/unix/install.mk (install): Fix path for ftmodule.h. * Makefile, *.mk, builds/unix/unix-cc.in, builds/unix-def.in: Use `?=' where appropriate. * builds/detect.mk (TOP_DIR), builds/os2/os2-dev.mk (TOP_DIR), builds/win32/w32-dev.mk (TOP_DIR): Removed. Defined elsewhere. 2006-01-31 Werner Lemberg <wl@gnu.org> Implement new, simplified module selection. With GNU make it is now sufficient to modify a single file, `modules.cfg', to control the inclusion of modules and base extension files. This change also fixes the creation of ftmodule.h; it now depends on `modules.cfg' and thus is rebuilt only if necessary. Finally, a version of `ftoption.h' in OBJ_DIR is preferred over the default location. * modules.cfg: New file. * builds/freetype.mk: Don't include `modules.mk'. Include all `rules.mk' files as specified in `modules.cfg'. (FTOPTION_FLAG, FTOPTION_H): New variables. (FT_CFLAGS): Add macro definition for FT_CONFIG_MODULES_H. Add FTOPTION_FLAG. ($(FT_INIT_OBJ)): Don't use FT_MODULE_LIST. (CONFIG_H): Add FTMODULE_H and FTOPTION_H. (INCLUDES): Add DEVEL_DIR. (INCLUDE_FLAGS, FTSYS_SRC, FTSYS_OBJ, FTDEBUG_SRC, FTDEBUG_OBJ, OBJ_M, OBJ_S): Use `:=', not `='. (remove_ftmodule_h): New phony target to delete `ftmodule.h'. (distclean): Add remove_ftmodule_h. * builds/modules.mk: (MODULE_LIST): Removed. (make_module_list, clean_module_list): Replace targets with... (FTMODULE_H_INIT, FTMODULE_H_CREATE, FTMODULE_H_DONE): New variables. Reason for the change is that it is not possible to have a phony prerequisite which is run only if the target file must be rebuilt (phony prerequisites act like subroutines and are *always* executed). We only want to rebuild `ftmodule.h' if `module.cfg' is changed. Update all callers. ($FTMODULE_H)): Rule to create `ftmodule.h', depending on `modules.cfg'. * builds/toplevel.mk: Rewrite and simplify module handling. (MODULES_CFG, FTMODULE_H): New variables. Include MODULES_CFG. (MODULES): New variable to include all `module.mk' and `rules.mk' files. We no longer use make's `wildcard' function for this. * Makefile (USE_MODULES): Remove. Update all users. (OBJ_DIR): Define it here. * src/*/module.mk: Change make_module_list: foo foo: ... to FTMODULE_H_COMMANDS += FOO define FOO ... endef in all files. `FTMODULE_H_COMMANDS' is used in `FTMODULE_H_CREATE'. * src/base/rules.mk (BASE_EXT_SRC): Use BASE_EXTENSIONS. * builds/unix/detect.mk (setup): Always execute `configure' script. (have_mk): Rename to... (have_Makefile): This. Don't use `strip' function. * builds/unix/unix.mk: Include `install.mk' only if BUILD_PROJECT is defined. (have_mk): Don't use `strip' function. Test for unix-def.mk in OBJ_DIR, not BUILD_DIR (and invert the test accordingly). * builds/unix/install.mk (install, uninstall): Handle `ftmodule.h'. * builds/os2/os2-dev.mk, builds/unix/unix-dev.mk, builds/win32/w32-bccd.mk, builds/win32/w32-dev.mk: Don't define BUILD_DIR but DEVEL_DIR for development header files. * builds/ansi/ansi-def.mk (TOP_DIR, OBJ_DIR), builds/beos/beos-def.mk (TOP_DIR, OBJ_DIR), builds/unix/unix-def.in (TOP_DIR, OBJ_DIR): Removed. Defined elsewhere. * builds/dos/dos-def.mk (OBJ_DIR), builds/os2/os2-def.mk (OBJ_DIR), builds/win32/win32-def.mk (OBJ_DIR): Removed. Defined elsewhere. * builds/unix/unixddef.mk: Don't define BUILD_DIR but DEVEL_DIR for development header files. Don't define PLATFORM. * configure: Copy `modules.cfg' to builddir if builddir != srcdir. Update snippet taken from autoconf's m4sh.m4 to current CVS version. Be more verbose. * include/freetype/config/ftmodule.h: Add comments -- this file is no longer used if FreeType is built with GNU make. * docs/CHANGES, docs/CUSTOMIZE, docs/INSTALL, docs/INSTALL.ANY, docs/INSTALL.GNU, docs/INSTALL.UNX: Document new build mechanism. Other minor updates. * modules.txt: Removed. Contents included in `modules.cfg'. * include/freetype/internal/ftmemory.h (FT_QAlloc_Debug, FT_Free_Debug) [FT_STRICT_ALIASING]: Fix typos. * src/base/ftdbgmem.c (FT_Alloc_Debug, FT_Realloc_Debug, FT_QAlloc_Debug, FT_QRealloc_Debug, FT_Free_Debug) [FT_STRICT_ALIASING]: Implement. 2006-01-31 Chia-I Wu <b90201047@ntu.edu.tw> * src/cff/cffobjs.c (cff_face_init), src/cid/cidobjs.c (cid_face_init), src/pfr/pfrobjs.c (pfr_face_init), src/type1/t1objs.c (T1_Face_Init): Set face->height to MAX(1.2 * units_per_EM, ascender - descender). 2006-01-31 Chia-I Wu <b90201047@ntu.edu.tw> * include/freetype/internal/t1types.h (AFM_FontInfo), src/psaux/afmparse.c, src/tools/test_afm.c: Read `FontBBox', `Ascender', and `Descender' from an AFM. * src/type1/t1afm.c (T1_Read_Metrics): Use the metrics from the AFM. * include/freetype/freetype.h (FT_FaceRec): Mention that fields may be changed after file attachment. 2006-01-28 Werner Lemberg <wl@gnu.org> * src/*/module.mk (.PHONY): Add. 2006-01-27 Werner Lemberg <wl@gnu.org> * README, docs/FTL.TXT: Fix email address for bug reports. Other minor formatting. * devel/ftoption.h: Synchronize with include/freetype/config/ftoption.h. * src/autofit/module.mk (add_autofit_module), src/bdf/module.mk (add_bdf_module), src/type42/module.mk (add_type42_driver): Fix whitespace. * src/smooth/module.mk (add_smooth_renderer): Add lcd and lcdv renderer classes. 2006-01-27 David Turner <david@freetype.org> * builds/unix/configure.ac: Fix build problem on Cygwin. * builds/unix/install.mk (install): Don't install the internal headers, and remove existing ones if found in the target install directory. * src/autofit/afwarp.c: Add simple #ifdef to prevent compilation if the warp hinter isn't active (it shouldn't, still experimental). * Jamfile, include/freetype/config/ftmodule.h: Remove `gxvalid' and `otvalid' from the list of modules that are linked statically to a given FreeType library. Functionality has been moved to the `ftvalid' CVS module. Note also that current Make-based build system still compiles the modules though. * include/freetype/config/ftoption.h (FT_STRICT_ALIASING): New macro which controls the definitions of the memory management functions to avoid warnings with recent versions of GCC. This macro is only here to be disabled, in case we detect problems with the new scheme. NOTE: Disable macro to use the memory debugger -- this will be fixed later! * include/freetype/internal/ftmemory.h, src/base/ftutil.c (FT_Alloc, FT_QAlloc, FT_Realloc, FT_QRealloc, FT_Free) [FT_STRICT_ALIASING]: New versions. * builds/win32/visualc/freetype.dsp: Updating project file to define FT2_BUILD_LIBRARY, and remove gxvalid + otvalid modules from compilation. * builds/freetype.mk (FT_CFLAGS), Jamfile (DEFINES): Define the macro FT2_BUILD_LIBRARY when compiling the library. * include/freetype/config/ftheader.h: Remove inclusions of internal headers except if the macro FT2_BUILD_LIBRARY is defined. * include/freetype/internal/psaux.h (AFM_KernPair, AFM_TrackKern, AFM_FontInfo): Move structure declarations to... * include/freetype/internal/t1types.h: This file. * (many files): Fix compiler warnings. Various minor reorganizations. * src/cff/cffload.c (cff_font_done): Don't free static array `subfonts'. * src/otvalid/otvcommn.c (otv_ClassDef_validate), src/otvalid/otvgpos.c (otv_x_sxy): Fix debugging information. Get rid of writable static variables (i.e., the string table) in afmparse, and fix compilation in FT2_MULTI mode. * src/psaux/afmparse.c: Include ft2build.h and FT_FREETYPE_H. (AFM_MAX_ARGUMENTS): Define... * src/psaux/afmparse.h: Here. * src/psaux/Jamfile (_sources): Add afmparse. * src/psaux/psconv.c: Include psconv.h. * src/type1/t1afm.c: Don't include FT_INTERNAL_TYPE1_TYPES_H but FT_INTERNAL_POSTSCRIPT_AUX_H. * src/type1/t1afm.h: Include FT_INTERNAL_TYPE1_TYPES_H. 2006-01-23 Chia-I Wu <b90201047@ntu.edu.tw> * include/freetype/freetype.h (FT_Select_Size): Rename the second argument from `idx' to `strike_index'. (FT_Size_Request_Type): Add FT_SIZE_REQUEST_TYPE_MAX to the end of this enum. * include/freetype/internal/ftobjs.h (FT_REQUEST_WIDTH, FT_REQUEST_HEIGHT): New macros to get the width and height of a request, in fractional pixels. * include/freetype/internal/ftobjs.h (FT_Select_Metrics, FT_Request_Metrics), src/base/ftobjs.c (FT_Select_Metrics, FT_Request_Metrics): New base functions to set the font metrics. They were part of FT_Select_Size/FT_Request_Size and are made independent functions so that metrics are not set again and again. * src/base/ftobjs.c (FT_Select_Size, FT_Request_Size): Metrics are set only when driver's size_select/size_request is NULL. That is, drivers should set the metrics themselves. (FT_Match_Size): Round before matching. This was what we did and it does cause some problems without rounding. * src/cff/cffobjs.c (cff_size_select), src/truetype/ttdriver.c (tt_size_select): Set the font metrics. s/index/strike_index/. The scaled metrics are always preferred over strikes' metrics, even when some strike is selected. This is done because the strikes' metrics are not reliable, e.g., the sign of the descender is wrong for some fonts. * src/cff/cffobjs.c (cff_size_request), src/truetype/ttdriver.c (tt_size_request): Set the font metrics. Call cff_size_select/tt_size_select when some strike is matched. * src/bdf/bdfdrivr.c, src/cff/cffobjs.c, src/cid/cidobjs.c, src/pcf/pcfdrivr.c, src/truetype/ttdriver.c, src/type1/t1objs.c, src/type1/t1objs.h, src/type42/t42objs.c, src/winfonts/winfnt.c: Set the font metrics. s/index/strike_index/. * src/tools/test_afm.c, src/psaux/psconv.c: Older versions of these files were committed. Just a catch-up. (PS_Conv_ToFixed): Remove the `goto'. (PS_Conv_ASCIIHexDecode, PS_Conv_EexecDecode): Speed up a little. * src/sfnt/ttsbit.c (tt_face_load_sbit_strikes, tt_face_load_strike_metrics), src/sfnt/ttsbit0.c (tt_face_load_sbit_strikes, tt_face_load_strike_metrics): The advertised metrics in `available_sizes' are different from those actually used. 2006-01-23 Chia-I Wu <b90201047@ntu.edu.tw> * src/psaux/psaux.c src/psaux/psauxmod.c src/type1/t1driver.c: Make AFM parser optional, controlled by `T1_CONFIG_OPTION_NO_AFM'. 2006-01-22 Werner Lemberg <wl@gnu.org> * builds/unix/install-sh, builds/unix/mkinstalldirs: Updated from `texinfo' CVS module at savannah.gnu.org. 2006-01-21 Werner Lemberg <wl@gnu.org> * src/autofit/rules.mk (AUTOF_DRV_SRC): Add afwarp.c. * src/autofit/afloader.c (af_loader_load_g): Move AF_USE_WARPER up to avoid compiler warnings. * src/autofit/afwarp.c (af_warper_compute_line_best): Remove shadowing variable declarations. Fix warning parameters and replace printf with AF_LOG. (af_warper_compute): Remove unused variable. 2006-01-20 David Turner <david@freetype.org> Adding experimental implementation of `warp hinting' (new hinting algorithm for gray-level and LCD rendering). It is disabled by default, you need to #define AF_USE_WARPER in aftypes.h. * src/autofit/afhints.c (af_glyph_hints_scale_dim) [AF_USE_WARPER]: New function. * src/autofit/afhints.h: Updated. * src/autofit/aflatin.c [AF_USE_WARPER]: Include afwarp.h. (af_latin_hints_init) [AF_USE_WARPER]: Reset mode to FT_RENDER_MODE_NORMAL if an LCD mode is selected. (af_latin_hints_apply) [AF_USE_WARPER]: Call af_warper_compute appropriately. * src/autofit/afloader.c (af_loader_load_g) [!AF_USER_WARPER]: Isolate code for adjusting metrics. * src/autofit/aftypes.h (AF_USE_WARPER): New macro (commented out by default). * src/autofit/afwarp.c, src/autofit/afwarp.h: New files. * src/autofit/autofit.c [AF_USE_WARPER]: Include afwarp.c. * src/autofit/Jamfile (_sources): Add afwarp. 2006-01-19 David Turner <david@freetype.org> * src/sfnt/ttsbit0.c (tt_face_load_strike_metrics): Fix small bug that prevented compilation when FT_OPTIMIZE_MEMORY is defined. 2006-01-19 Brian Weed <bw@imaginengine.com> * builds/win32/visualc/freetype.dsp: Updated. 2006-01-17 Werner Lemberg <wl@gnu.org> Use pscmap service in CFF module. * src/cff/cffcmap.c (cff_cmap_uni_pair_compare): Removed. (cff_sid_to_glyph_name): New function. (cff_cmap_unicode_init, cff_cmap_unicode_done, cff_cmap_unicode_char_index, cff_cmap_unicode_char next): Use pscmap service. (cff_cmap_unicode_class_rec): Updated. * src/cff/cffcmap.h (CFF_CMapUnicode, CFF_CMap_UniPair): Removed. * src/psnames/psmodule.c (ps_unicodes_char_next): Fix `unicode' return value. * src/psaux/afmparse.c (afm_parser_read_vals): Use double casting to avoid compiler warnings regarding type-punning. 2006-01-16 Chia-I Wu <b90201047@ntu.edu.tw> * src/psaux/afmparse.c, src/psaux/afmparse.h: New files which implement an AFM parser. * src/psaux/psconv.c, src/psaux/psconv.h: New files to provide conversion functions (e.g., PS real number => FT_Fixed) for the PS_Parser and AFM_Parser. Some of the functions are taken, with some modifications, from the file psobjs.c. * src/psaux/psobjs.c: Use functions from psconv.c. * include/freetype/internal/psaux.h, src/psaux/psauxmod.c: Add `AFM_Parser' to the `psaux' service. * src/psaux/psaux.c, src/psaux/rules.mk (PSAUX_DRV_SRC): Include those new files. * src/tools/test_afm.c: A test program for AFM parser. * include/freetype/internal/services/svkern.h: New file providing a `Kerning' service. It is currently only used to get the track kerning information. * include/freetype/internal/ftserv.h (FT_SERVICE_KERNING_H): New macro. * src/type1/t1driver.c, src/type1/t1objs.c, src/type1/t1afm.c, src/type1/t1afm.h: Update to use the AFM parser. Provide the `Kerning' service. * include/freetype/freetype.h, src/base/ftobjs.c: New API `FT_Get_Track_Kerning'. 2006-01-15 Chia-I Wu <b90201047@ntu.edu.tw> * include/freetype/internal/ftobjs.h, src/base/ftobjs.c, src/bdf/bdfdrivr.c, src/cff/cffgload.c, src/cid/cidgload.c, src/pcf/pcfdrivr.c, src/type1/t1gload.c, src/winfonts/winfnt.c: s/ft_fake_vertical_metrics/ft_synthesize_vertical_metrics/. * docs/CHANGES: Mention that vertical metrics are synthesized for fonts not having this info. 2006-01-15 Chia-I Wu <b90201047@ntu.edu.tw> * include/freetype/internal/ftobjs.h (ft_fake_vertical_metrics), src/base/ftobjs.c (ft_fake_vertical_metrics): New function to fake vertical metrics. * src/cff/cffgload.c, src/cid/cidgload.c, src/pcf/pcfdrivr.c, src/type1/t1gload.c, src/winfonts/winfnt.c: Fake vertical metrics, which are monotone. * src/truetype/ttgload.c (compute_glyph_metrics): Some fixes and formattings in vertical metrics faking. There is still room for improvements (and so does the CFF module). 2006-01-15 Chia-I Wu <b90201047@ntu.edu.tw> * src/bdf/bdfdrivr.c (BDF_Glyph_Load), src/pcf/pcfdrivr.c (PCF_Glyph_Load), src/winfonts/winfnt.c (FNT_Load_Glyph): Don't set the linear advance fields as they are only used by the outline glyphs. * include/freetype/freetype.h: Documentation updates and clarifications. The meaning of FT_LOAD_FORCE_AUTOHINT is changed so that no real change need be made to the code. * src/base/ftobjs.c (FT_Load_Glyph): Resolve flag dependencies and decide whether to use the auto-hinter according to documentation. There should to be no real difference. Some checks (e.g., is text height positive?) after the glyph is loaded. (FT_Select_Size, FT_Request_Size): Scales are set to wrong values. Be careful that scales won't be negative. 2006-01-14 Chia-I Wu <b90201047@ntu.edu.tw> * docs/CHANGES: Mention the size selection change. * src/bdf/bdfdrivr.c (BDF_Size_Request, BDF_Size_Select), src/pcf/pcfdrivr.c (PCF_Size_Request, PCF_Size_Select), src/winfonts/winfnt.c (FNT_Size_Request, FNT_Size_Select): Do size matching for requests of type NOMINAL and REAL_DIM. * src/winfonts/winfnt.c (FNT_Face_Init): Print trace message when `pixel_height' is used for nominal height. * src/base/ftobjs.c (FT_Request_Size): Call `FT_Match_Size' if the face is bitmap only and driver doesn't provide `request_size'. This is added merely for completion as no driver satisfies the conditions. 2006-01-13 Chia-I Wu <b90201047@ntu.edu.tw> Introduce new size selection interface. * include/freetype/internal/ftdriver.h (struct FT_Driver_ClassRec): Replace `set_char_sizes' and `set_pixel_sizes' by `request_size' and `select_size'. * include/freetype/freetype.h (FT_Select_Size, FT_Size_Request_Type, FT_Size_Request, FT_Request_Size, FT_Select_Size), src/base/ftobjs.c (FT_Select_Size, FT_Request_Size): API additions to export the new size selection interface. * src/base/ftobjs.c (FT_Set_Char_Size, FT_Set_Pixel_Sizes): Use `FT_Request_Size'. * include/freetype/internal/ftobjs.h (FT_Match_Size), src/base/ftobjs.c (FT_Match_Size): New function to match a size request against `available_sizes'. Drivers supporting bitmap strikes can use this function to implement `request_size'. * src/bdf/bdfdrivr.c, src/cid/cidobjs.c, src/cid/cidobjs.h, src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/type1/t1driver.c, src/type1/t1objs.c, src/type1/t1objs.h, src/type42/t42drivr.c, src/type42/t42objs.c, src/type42/t42objs.h, src/winfonts/winfnt.c: Update to new size selection interface. * src/cff/cffdrivr.c, src/cff/cffgload.c, src/cff/cffobjs.c, src/cff/cffobjs.h, src/truetype/ttdriver.c, src/truetype/ttgload.c, src/truetype/ttobjs.c, src/truetype/ttobjs.h: Update to new size selection interface. Make `strike_index' FT_ULong and always defined. Use `load_strike_metrics' provided by SFNT interface. 2006-01-13 Chia-I Wu <b90201047@ntu.edu.tw> * include/freetype/internal/sfnt.h (SFNT_Interface): New method `load_strike_metrics' used to load the strike's metrics. * src/sfnt/sfdriver.c, src/sfnt/ttsbit.c, src/sfnt/ttsbit.h, src/sfnt/ttsbit0.c: New function `tt_face_load_strike_metrics'. * src/pfr/pfrobjs.c (pfr_face_init): Set FT_Bitmap_Size correctly. * src/winfonts/winfnt.c (FNT_Face_Init): Use `nominal_point_size' for nominal size unless it is obviously incorrect. * include/freetype/freetype.h (FT_Bitmap_Size): Update the comments on FNT driver. 2006-01-12 Werner Lemberg <wl@gnu.org> Prepare use of pscmap service within CFF module. * include/freetype/internal/services/svpscmap.h: Include FT_INTERNAL_OBJECTS_H. (PS_Unicode_Index_Func): Removed. Unused. (PS_Macintosh_Name_Func): Renamed to... (PS_Macintosh_NameFunc): This. Update all callers. (PS_Adobe_Std_Strings_Func): Renamed to... (PS_Adobe_Std_StringsFunc): This. Update all callers. (PS_UnicodesRec): This is the former `PS_Unicodes' structure. Add `cmap' member. Update all callers. (PS_Unicodes): This is now a typedef'd pointer to PS_UnicodesRec. Update all callers. (PS_Glyph_NameFunc): New typedef. (PS_Unicodes_InitFunc): Change arguments to expect a function and generic data pointer which returns a glyph name from a given index. * src/psnames/psmodule.c (ps_unicodes_init, ps_unicodes_char_index, ps_unicodes_char_next, pscmaps_interface): Updated. * include/freetype/internal/t1types.h (T1_FaceRec): Updated. * src/psaux/t1cmap.h (T1_CMapStdRec): Updated. (T1_CMapUnicode, T1_CMapUnicodeRec): Removed. * src/psaux/t1cmap.c (t1_get_glyph_name): New callback function. (t1_cmap_unicode_init, t1_cmap_unicode_done, t1_cmap_unicode_char_index, t1_cmap_unicode_char_next, t1_cmap_unicode_class_rec): Updated. * src/type42/t42types.h (T42_FaceRec): Updated. 2006-01-11 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * include/freetype/ftmac.h: Add declaration of new functions FT_New_Face_From_FSRef and FT_GetFile_From_Mac_ATS_Name that were introduced by the jumbo patch on 2006-01-11. 2006-01-11 Werner Lemberg <wl@gnu.org> Fix Savannah bug #15056 and use pscmap service in psaux module. * include/freetype/internal/services/svpscmap.h (PS_UniMap): Use FT_UInt32 for `glyph_index'. (PS_Unicodes_InitFunc): Use FT_String for `glyph_names'. (PS_Unicodes_CharIndexFunc): Use FT_UInt32 for `unicode'. (PS_Unicodes_CharNextFunc): Make second argument a pointer to FT_UInt32. * src/psnames/psmodule.c (VARIANT_BIT, BASE_GLYPH): New macros. (ps_unicode_value): Set VARIANT_BIT in return value if glyph is a variant glyph (this is, it has non-leading `.' in its name). (compare_uni_maps): Sort base glyphs before variant glyphs. (ps_unicodes_init): Use FT_String for `glyph_names' argument. Reallocate only if number of used entries is much smaller. Updated to handle variant glyphs. (ps_unicodes_char_index, ps_unicodes_char_next): Prefer base glyphs over variant glyphs. Simplify code. * src/psaux/t1cmap.c (t1_cmap_uni_pair_compare): Removed. (t1_cmap_unicode_init, t1_cmap_unicode_char_index, t1_cmap_unicode_char_next): Use pscmap service. (t1_cmap_unicode_done): Updated. * src/psaux/t1cmap.h (T1_CMapUniPair): Removed. (T1_CMapUnicode): Use PS_Unicodes structure. 2006-01-11 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Jumbo patch to fix `deprecated' warning of cross-build for Tiger on Intel, as reported by Sean McBride <sean@rogue-research.com> on 2005-08-24. * src/base/ftmac.c: Heavy change to build without deprecated Carbon functions on Tiger. * builds/unix/configure.ac: Add options and autochecks for Carbon functions availabilities, for MacOS X. * builds/mac/ascii2mpw.py: Add converter for character `\305'. * builds/mac/FreeType.m68k_{far|cfm}.make.txt: Add conditional macros to avoid unavailable functions. ftmac.c must be compiled without `-strict ansi', because it disables cpp macro to use ToolBox system call. * builds/mac/FreeType.ppc_{classic|carbon}.make.txt: Add conditional macros to avoid unavailable functions. * builds/mac/README: Detailed notes on function availabilities. * docs/CHANGES: Notes about (possible) incompatibilities. 2006-01-08 Werner Lemberg <wl@gnu.org> * docs/CHANGES: Updated. 2006-01-08 Huw D M Davies <h.davies1@physics.ox.ac.uk> * include/freetype/ftmodapi.h (FT_Module_Get_Flags): New declaration. * src/base/ftobjs.c (FT_Module_Get_Flags): New function. 2006-01-07 Werner Lemberg <wl@gnu.org> * src/pcf/pcfread.c (pcf_get_bitmaps): Remove unused variable `bitmaps'. Reported by Yu Lei <yulei0@gmail.com>. * src/base/ftutil.c (ft_highpow2): s/FT_BASE/FT_BASE_DEF/. Reported by Niels Boldt <nielsboldt@gmail.com>. 2005-12-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * src/sfnt/sfnt/ttbdf.c: Add newline '\n' to the end of file, for MPW compiler. 2005-12-23 David Turner <david@freetype.org> * Jamfile (RefDoc), docs/reference/README: Fix it so that `jam refdoc' works correctly to generate the API reference in `docs/reference'. * src/tools/docmaker/tohtml.py (print_html_field, print_html_field_list): Update to output nicer fields lists in the API reference. * src/base/ftobjs.c (FT_Load_Glyph): FT_LOAD_TARGET_LIGHT now forces auto-hinting. * freetype/freetype.h: Updating the documentation for FT_LOAD_TARGET_XXX and FT_Render_Mode values. 2005-12-23 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * src/base/ftmac.c (FT_New_Face_From_Suitcase): Count scalable faces in supported formats (sfnt, LWFN) only, and ignore bitmap faces in unsupported formats (fbit, NFNT). The number of available faces are passed via face->num_faces. If bitmap faces are embedded in sfnt resource, face->num_fixed_size is correctly set. In public API, FT_New_Face() and FT_New_Face_From_FSSpec() count the faces as FT_GetFile_From_Mac_Name(), which ignores NFNT resources. * doc/CHANGES: Mention the changes. 2005-12-17 Chia-I Wu <b90201047@ntu.edu.tw> * src/truetype/ttinterp.c (Update_Max): Set current size of buffer correctly (so that memory debug system won't panic). 2005-12-16 Chia-I Wu <b90201047@ntu.edu.tw> * include/freetype/internal/ftobjs.h (ft_glyphslot_grid_fit_metrics), src/base/ftobjs.c (ft_glyphslot_grid_fit_metrics): Removed. * src/base/ftobjs.c (ft_recompute_scaled_metrics): Do not round. * src/cff/cffgload.c (cff_slot_load), src/cid/cidgload.c (cid_slot_load_glyph), src/truetype/ttgload.c (compute_glyph_metrics), src/type1/t1gload.c (T1_Load_Glyph): Do not round glyph metrics. * doc/CHANGES: Mention the changes. 2005-12-13 David Turner <david@freetype.org> Change the implementation of the LIGHT hinting mode to completely disable horizontal hinting. This is an experimental effort to integrate David Chester's latest patch without affecting the other hinting modes as well. Note that this doesn't force auto-hinting for all fonts, however. * src/autofit/afhints.c (af_glyph_hints_reload): Don't set scaler_flags here but... (af_glyph_hints_rescale): Here. * src/autofit/aflatin.c (af_latin_hints_init): Disable horizontal hinting for `light' hinting mode. * Jamfile: Small fix to ensure that ftexport.sym is placed into the same location as other generated objects (i.e., within the `objs' directory of the current directory). Add support for an embedded `BDF ' table within SFNT-based bitmap font files. This is used to store atoms & properties from the original BDF fonts that were used to generate the font file. The feature is controlled by TT_CONFIG_OPTION_BDF within `ftoption.h' and is used to implement FT_Get_BDF_Property for these font files. At the moment, this is still experimental, the BDF table format isn't cast into stone yet. * include/freetype/config/ftoption.h (TT_CONFIG_OPTION_BDF): New macro. * include/freetype/config/ftstdlib.h (ft_memchr): New macro. * include/freetype/internal/tttypes.h (TT_BDFRec, TT_BDF) [TT_CONFIG_OPTION_BDF]: New structure. (TT_FaceRec) [TT_CONFIG_OPTION_BDF]: New member `bdf'. * include/freetype/tttags.h (TTAG_BDF): New macro. * src/sfnt/Jamfile (_sources): Add ttbdf. * src/sfnt/rules.mk (SFNT_DRV_SRC): Add ttbdf.c. * src/sfnt/sfdriver.c [TT_CONFIG_OPTION_BDF]: Include ttbdf.h and FT_SERVICE_BDF_H. (sfnt_get_charset_it) [TT_CONFIG_OPTION_BDF]: New function. (sfnt_service_bdf) [TT_CONFIG_OPTION_BDF]: New service. (sfnt_services) [TT_CONFIG_OPTION_BDF]: Add sfnt_service_bdf. * src/sfnt/sfnt.c [TT_CONFIG_OPTION_BDF]: Include ttbdf.c. * src/sfnt/sfobjs.c [TT_CONFIG_OPTION_BDF]: Include ttbdf.h. (sfnt_done_face) [TT_CONFIG_OPTION_BDF]: Call tt_face_free_bdf_props. * src/sfnt/ttbdf.h, src/sfnt/ttbdf.c: New files. 2005-12-07 Werner Lemberg <wl@gnu.org> * src/sfnt/sfobjs.c (sfnt_init_face): Move tag check to... * src/sfnt/ttload.c (sfnt_init): Here, before handling TTCs. 2005-12-06 Chia-I Wu <b90201047@ntu.edu.tw> * src/truetype/ttobjs.c (tt_size_init): size->ttmetrics.valid is initialized twice. size->strike_index is not initialized. 2005-12-02 Taek Kwan(TK) Lee <taeklee@gmail.com> * src/type42/t42objs.c (T42_Face_Init): Replace call to FT_New_Memory_Face with call to FT_Open_Face to pass `params'. 2005-11-30 Werner Lemberg <wl@gnu.org> * docs/CHANGES: Document ftdump's `-v' option. Document latest charmap code changes. * src/sfnt/ttcmap.c, src/sfnt/ttcmap.h: s/TT_CMAP_FLAG_OVERLAPPED/TT_CMAP_FLAG_OVERLAPPING/. 2005-11-30 Chia-I Wu <b90201047@ntu.edu.tw> * src/sfnt/ttcmap.c (tt_cmap4_char_map_binary, tt_cmap12_char_map_binary): Fix compiler warnings. 2005-11-29 Chia-I Wu <b90201047@ntu.edu.tw> Major update to distinguish between unsorted and overlapping segments for cmap format 4. For overlapping but sorted segments, which is previously considered unsorted, we still use binary search. * src/sfnt/ttcmap.h (TT_CMapRec_): Replace `unsorted' by `flags'. (TT_CMAP_FLAG_UNSORTED, TT_CMAP_FLAG_OVERLAPPED): New macros. * src/sfnt/ttcmap.c (OPT_CMAP4): Removed as it is always defined. (TT_CMap4Rec_): Remove `old_charcode' and `table_length'. (tt_cmap4_reset): Removed. (tt_cmap4_init): Updated accordingly. (tt_cmap4_next): Updated accordingly. Take care of overlapping segments. (tt_cmap4_validate): Make sure the subtable is large enough. Do not check glyph_ids because some fonts set the length wrongly. Also, if all segments have offset 0, glyph_ids is always invalid. It does not cause any problem so far only because the check misses equality. Distinguish between unsorted and overlapping segments. (tt_cmap4_char_map_linear, tt_cmap4_char_map_binary): New functions to do `charcode => glyph index' by linear/binary search. (tt_cmap4_char_index, tt_cmap4_char_next): Use tt_cmap4_char_map_linear and tt_cmap4_char_map_binary. (tt_face_build_cmaps): Treat the return value of validator as flags for cmap. 2005-11-29 Chia-I Wu <b90201047@ntu.edu.tw> * src/sfnt/ttcmap.c (TT_CMap12Rec_, tt_cmap12_init, tt_cmap12_next): New structures and functions for fast `next char'. (tt_cmap12_char_map_binary): New function to do `charcode => glyph index' by binary search. (tt_cmap12_char_index, tt_cmap12_char_next): Use tt_cmap12_char_map_binary. (tt_face_build_cmaps): Check table and offset correctly (equality is missing). 2005-11-15 Detlef Würkner <TetiSoft@apg.lahn.de> * builds/amiga/smakefile: Adjusted the compiler options to the current sources, now really builds the gxvalid, gzip and psnames modules. * builds/amiga/src/base/ftsystem.c: The assumed Seek() position in the file cache was off by one byte which could cause false errors in font files. 2005-11-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * builds/mac/FreeType.m68k_far.make.txt, builds/mac/FreeType.m68k_cfm.make.txt, builds/mac/FreeType.ppc_classic.make.txt, builds/mac/FreeType.ppc_carbon.make.txt: Updated for MPW to build all available modules. 2005-11-21 Håvard Wall <haavardw@ifi.uio.no> * src/bdf/bdfdrivr.c (bdf_interpret_style, BDF_Face_Done): Fix small memory leak. 2005-11-21 Werner Lemberg <wl@gnu.org> * src/sfnt/ttload.c (sfnt_init): Add tracing message. 2005-11-21 Chia-I Wu <b90201047@ntu.edu.tw> * src/sfnt/ttsbit0.c (tt_sbit_decoder_load_image): Image_offset was added twice to image_start if image_format was 2 or 5. 2005-11-21 Chia-I Wu <b90201047@ntu.edu.tw> * src/sfnt/sfobjs.c (sfnt_init_face): Check that format_tag is known before loading the table directory. * src/sfnt/ttload.c (tt_face_load_sfnt_header, tt_face_load_directory): Delay sfnt_dir_check from tt_face_load_sfnt_header to tt_face_load_directory. 2005-11-20 Chia-I Wu <b90201047@ntu.edu.tw> * src/sfnt/ttload.c (sfnt_dir_check): Clean up and return correct error code. (sfnt_init): New function to fill in face->ttc_header. A non-TTC font is synthesized into a TTC font with one offset table. (tt_face_load_sfnt_header): Use sfnt_init. Fix an invalid access if the font is TTC and face_index is -1. 2005-11-18 Werner Lemberg <wl@gnu.org> * src/sfnt/ttload.c (tt_face_load_metrics): Ignore excess number of metrics instead of aborting. Patch suggested by Derek Noonburg. * src/cff/cffgload.c (cff_slot_load), src/cid/cidgload.c (cid_slot_load_glyph), src/type1/t1gload.c (T1_Load_Glyph): Scale the glyph properly if no hinter is available. * docs/CHANGES: Mention scaling bug. 2005-11-18 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * include/freetype/ftgxval.h, src/base/ftgxval.c (FT_TrueTypeGX_Free, FT_ClassicKern_Free): New functions to free buffers allocated by gxvalid module. * include/freetype/ftotval.h, src/base/ftotval.c (FT_OpenType_Free): New function to free buffer allocated by otvalid module. 2005-11-18 Chia-I Wu <b90201047@ntu.edu.tw> * builds/unix/ftsystem.c (FT_Stream_Open, FT_New_Memory, FT_Done_Memory), builds/vms/ftsystem.c (FT_Stream_Open, FT_New_Memory, FT_Done_Memory), builds/win32/ftdebug.c (FT_Message, FT_Panic): s/FT_EXPORT/FT_BASE/. 2005-11-17 Detlef Würkner <TetiSoft@apg.lahn.de> * builds/amiga/src/base/ftdebug.c (FT_Trace_Get_Count, FT_Trace_Get_Name, FT_Message, FT_Panic), builds/amiga/src/base/ftsystem.c (FT_New_Memory, FT_Done_Memory, FT_Stream_Open): s/FT_EXPORT/FT_BASE/. 2005-11-17 Detlef Würkner <TetiSoft@apg.lahn.de> * builds/amiga/makefile, builds/amiga/makefile.os4, builds/amiga/smakefile, builds/amiga/include/freetype/config/ftmodule.h: Updated the Amiga build files (added support for the gxvalid module). 2005-11-17 Werner Lemberg <wl@gnu.org> Add vertical metrics support to OpenType CFF outlines. Based on a patch from Mike Moening <MikeM@RetekSolutions.com>. * src/cff/cffgload.c (cff_face_get_vertical_metrics): New function. (cff_slot_load): Use cff_face_get_vertical_metrics. * docs/CHANGES: Updated. 2005-11-17 Chia-I Wu <b90201047@ntu.edu.tw> * src/base/ftcalc.c (FT_MulTo64): Commented out. * include/freetype/internal/ftcalc.h (FT_SqrtFixed), src/base/ftcalc.c (FT_SqrtFixed), include/freetype/internal/ftdebug.h (FT_Trace_Get_Count, FT_Trace_Get_Name, FT_Message, FT_Panic), src/base/ftdebug.c (FT_Trace_Get_Count, FT_Trace_Get_Name, FT_Message, FT_Panic), include/freetype/internal/ftobjs.h (FT_New_Memory, FT_Done_Memory), include/freetype/internal/ftstream.h (FT_Stream_Open), src/base/ftsystem.c (FT_New_Memory, FT_Done_Memory, FT_Stream_Open): s/FT_EXPORT/FT_BASE/. * builds/exports.mk: Manually add TT_New_Context to EXPORTS_LIST too. 2005-11-15 David Turner <david@freetype.org> * src/base/fttrigon.c (ft_trig_prenorm): Fix a bug that created invalid computations, resulting in very weird bugs in TrueType bytecode hinted fonts. * src/truetype/ttinterp.c (FT_UNUSED_EXEC): Don't perform a structure copy each time. 2005-11-11 Werner Lemberg <wl@gnu.org> * src/cache/ftccache.c (FTC_Cache_Clear), src/cache/ftcmanag.c (FTC_Manager_Check): Remove FT_EXPORT_DEF tag. * src/base/ftcalc.c (FT_Add64): Remove FT_EXPORT_DEF tag. (FT_Div64by32, FT_Sqrt32): Commented out. Unused. * include/freetype/internal/ftcalc.h (SQRT_32): Removed. Unused. (FT_Sqrt32): Commented out. Unused. * include/freetype/cache/ftccache.h: s/ftc_node_destroy/FTC_Node_Destroy/. * src/cache/ftccback.h (ftc_node_destroy): New declaration. * src/cache/ftccache.c (ftc_node_destroy): Use FT_LOCAL_DEF tag. (FTC_Node_Destroy): New exported wrapper function for ftc_node_destroy. * src/cache/ftcmanag.c: Include ftccback.c. 2005-11-10 Werner Lemberg <wl@gnu.org> * src/autofit/afangles.c, src/autofit/aftypes.h (af_angle_diff): Comment out. Unused. * builds/exports.mk ($(EXPORTS_LIST)): Add TT_RunIns. 2005-11-10 Christian Biesinger <cbiesinger@web.de> * builds/beos/beos.mk: Call beos-def.mk before anything else to define the separator. * builds/unix/unix-cc.in (LINK_LIBRARY): Add `-no-undefined' flag. 2005-11-07 Werner Lemberg <wl@gnu.org> * src/type1/t1afm.c (T1_Read_PFM): Zero offset means `no kerning table available'. From Sergey Tolstov <stolstov@esri.com>. 2005-11-03 Ville Syrjälä <syrjala@sci.fi> * src/base/ftobjs.c (FT_Open_Face): Avoid possible memory leak. 2005-11-02 Werner Lemberg <wl@gnu.org> Make compiling instructions in docs/CUSTOMIZE work again. * builds/unix/unix-cc.in (CPPFLAGS): New variable. (CFLAGS): Don't include @CPPFLAGS@. * builds/freetype.mk (FT_CFLAGS): Add CPPFLAGS. 2005-10-28 David Turner <david@freetype.org> Update build system to support the generation of a list of exported symbols or Windows .DEF files by parsing the public headers with the `apinames' tool located in src/tools/apinames.c. Only tested on Unix at the moment. On Windows, the .DEF file is generated but isn't used yet to generate a DLL. * builds/exports.mk: New file. * builds/freetype.mk: Include exports.mk. (dll): New target. (clean_project_dos): Fix rule. * builds/compiler/visualc.mk (TE), builds/dos/dos-def.mk (E), builds/os2/os2-def.mk (E), builds/win32/win32-def.mk (E): New variables for controlling executable extensions. * builds/unix/unix-cc.in (EXPORTS_LIST, CCexe), builds/win32/w32-bcc.mk, builds/win32/w32-gcc.mk, builds/win32/w32-icc.mk, builds/win32/w32-icc.mk, builds/win32/w32-mingw32.mk, builds/win32/w32-vcc, builds/win32/w32-wat.mk (EXPORTS_LIST, EXPORT_OPTIONS, APINAMES_OPTIONS): New targets for controlling the `apinames' tool. * Jamfile (GenExportSymbols): Updated. * src/pfr/pfrtypes.h, src/pfr/pfrload.c, src/pfr/pfrobjs.c [!FT_OPTIMIZE_MEMORY]: Fold memory optimization code into FT_OPTIMIZE_MEMORY chunks for better maintainability and simplicity. * src/base/fttrigon.c (ft_trig_prenorm), src/base/ftcalc.c (FT_MulFix): Performance optimizations. * include/freetype/internal/ftgloadr.h (FT_GLYPHLOADER_CHECK_P, FT_GLYPHLOADER_CHECK_C, FT_GLYPHLOADER_CHECK_POINTS): New macros for checking points and contours. Update callers to use FT_GLYPHLOADER_CHECK_POINTS instead of FT_GlyphLoader_CheckPoints at profile-detected hot-spots. * src/base/ftgloadr.c (FT_GlyphLoader_CheckPoints): Set `adjust' to 0 to not call `AdjustPoints' every time. * src/autofit/aftypes.h (AF_ANGLE_DIFF): New macro to inline FT_Angle_Diff. * src/autofit/afhints.c (af_direction_compute): Re-implement. (af_glyph_hints_compute_inflections, af_glyph_hints_reload): Use AF_ANGLE_DIFF to speed up the detection of inflexions. * src/tools/apinames.c: Include <string.h>. (OutputFormat): New enumeration. (names_dump): Add two parameters to control output format and DLL name. (names_dump_windef): Removed. Code folded into `names_dump'. (read_header_file): Use isalnum, not isalpha. Otherwise function names with digits aren't read correctly. (usage): Updated. (main): New option `-o' to control output file name. New option `-d' to indicate DLL file name. Extend `-w' flag to handle Borland and Watcom compilers and linkers. 2005-10-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * builds/mac/ftlib.prj, builds/mac/freetype.mak: Removed. ftlib.prj is unmaintained and incompatible with current tree. freetype.mak is unrecoverably broken. * builds/mac/ftlib.prj.xml: Added. Generated by Metrowerks CodeWarrior 9.0. * builds/mac/FreeType.m68k_far.make.txt, builds/mac/FreeType.m68k_cfm.make.txt, builds/mac/FreeType.ppc_classic.make.txt, builds/mac/FreeType.ppc_carbon.make.txt: Added. Skeleton files of MPW makefiles. * builds/mac/ascii2mpw.py: Added. Python script to make MPW makefile from skeleton. * builds/mac/README: Updated. Almost rewritten to use new files. 2005-10-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * src/base/ftmac.c: Fix invalid casts from NULL to integer typed variables. Advised by David Turner, Masatake YAMATO, Sean McBride, and George Williams. 2005-10-27 Werner Lemberg <wl@gnu.org> * include/freetype/ftsysmem.h, include/freetype/ftsysio.h: Removed. Obsolete. 2005-10-25 Werner Lemberg <wl@gnu.org> * src/sfnt/sfdriver.c (sfnt_interface): Move out `tt_face_get_kerning' from a #ifdef clause. Reported by Tony J. Ibbs <tibs@sj.co.uk>. 2005-10-23 Werner Lemberg <wl@gnu.org> * src/base/ftdbgmem.c (ft_mem_debug_realloc): Make it compile with C++. 2005-10-21 David Turner <david@freetype.org> * src/base/ftdbgmem.c (ft_mem_table_set, ft_mem_debug_realloc): Another realloc memory counting bug fix. * src/tools/Jamfile: Add missing file. * src/lzw/Jamfile: Fix incorrect source file reference. 2005-10-20 David Turner <david@freetype.org> * src/base/ftdbgmem.c (ft_mem_table_set, ft_mem_table_remove, ft_mem_debug_alloc, ft_mem_debug_free, ft_mem_debug_realloc): Fixes to better account for memory reallocations. * src/lzw/ftlzw2.c, src/lzw/ftzopen.h, src/lzw/ftzopen.c, src/lzw/rules.mk: First version of LZW loader re-implementation. Apparently, this saves about 330 KB of heap memory when loading timR24.pcf.Z. 2005-10-20 Chia-I Wu <b90201047@ntu.edu.tw> * include/freetype/ftbitmap.h (FT_Bitmap_Copy, FT_Bitmap_Embolden), src/base/ftbdf.c (FT_Get_BDF_Property), src/cache/ftcmru.c (FTC_MruList_Reset, FTC_MruList_Done, FTC_MruList_Lookup): Fix FT_EXPORT/FT_EXPORT_DEF tagging. 2005-10-19 Chia-I Wu <b90201047@ntu.edu.tw> * src/truetype/ttgload.c (TT_Load_Glyph): Allow size->ttmetrics to be invalid when FT_LOAD_NO_SCALE is set. 2005-10-17 David Turner <david@freetype.org> * src/base/ftobjs.c (FT_Open_Face): Don't call FT_New_GlyphSlot and FT_New_Size if we are opening a face with face_index < 0 (which is only used for testing the format). * src/gxvalid/gxvmort0.c (gxv_mort_subtable_type0_entry_validate): Remove compiler warning. 2005-10-16 David Turner <david@freetype.org> * src/tools/apinames.c: Add new tool to extract public API function names from header files. 2005-10-05 Werner Lemberg <wl@gnu.org> Add FT_FACE_FLAG_HINTER to indicate that a specific font driver has a hinting engine of its own. * include/freetype/freetype.h (FT_FACE_FLAG_HINTER): New macro. * src/cff/cffobjs.c (cff_face_init), src/cid/cidobjs.c (cid_face_init), src/truetype/ttobjs.c (tt_face_init) [TT_CONFIG_OPTION_BYTECODE_INTERPRETER], src/type1/t1objs.c (T1_Face_Init), src/type42/t42objs.c (T42_Face_Init) [TT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Update face flags. * docs/CHANGES: Document it. 2005-09-27 Werner Lemberg <wl@gnu.org> * builds/unix/freetype2.m4: Add license exception so that the file can be used in any other autoconf script. 2005-09-26 David Turner <david@freetype.org> * src/autofit/aflatin.c (af_latin_compute_stem_width): Fix bad computation of the `vertical' flag, causing ugly things in LCD mode and others. 2005-09-23 David Turner <david@freetype.org> * src/autofit/aflatin.c (af_latin_hints_init): Fix a bug that prevented internal hint mode bitflags from being computed correctly. * src/base/Jamfile: Adding src/base/ftgxval.c. * src/gxvalid/gxvbsln.c, src/gxvalid/gxvcommn.c, src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c, src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmort.c, src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c, src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c, src/gxvalid/gxvmort5.c, src/gxvalid/gxvmorx.c, src/gxvalid/gxvmorx0.c, src/gxvalid/gxvmorx1.c, src/gxvalid/gxvmorx2.c, src/gxvalid/gxvmorx5.c, src/gxvalid/gxvopbd.c, src/gxvalid/gxvprop.c, src/truetype/ttgload.c: Remove _many_ compiler warnings when compiling with Visual C++ at maximum level (/W4). * src/autofit/afangles.c (af_angle_atan): Replaced CORDIC-based implementation with one using lookup tables. This simple thing speeds up glyph loading by 18%, according to ftbench! * src/sfnt/sfdriver.c (sfnt_get_interface): Don't check for `get_sfnt' and `load_sfnt' module interfaces. 2005-09-22 Werner Lemberg <wl@gnu.org> * docs/CHANGES: Mention SING Glyphlet support. 2005-09-22 David Turner <david@freetype.org> * src/base/Jamfile: Disable compilation of ftgxval module temporarily. 2005-09-19 David Somers <dsomers@omz13.com> * src/sfnt/ttload.c (sfnt_dir_check): Modified to allow a font to have no `head' table if tables `SING' and `META' are present; this is to support `SING Glyphlet'. `SING Glyphlet' is an extension to OpenType developed by Adobe primarily to facilitate adding supplemental glyphs to an OpenType font (with emphasis on, but not necessarily limited to, gaiji to a CJK font). A SING Glyphlet Font is an OpenType font that contains the outline(s), either in a `glyf' or `CFF' table, for a glyph; `cmap', `BASE', and `GSUB' tables are present with the same format and functionality as a regular OpenType font; there are no `name', `head', `OS/2', and `post' tables; there are two new tables, `SING' which contains details about the glyphlet, and `META' which contains metadata. Further information on the SING Glyphlet format can be found at: https://www.adobe.com/content/dam/acom/en/devnet/font/pdfs/5148.SING_Tutorial.pdf * include/freetype/tttags.h (TTAG_SING, TTAG_META): New macros for the OpenType tables `SING' and `META'. These two tables are used in SING Glyphlet Format fonts. 2005-09-09 Werner Lemberg <wl@gnu.org> * src/sfnt/sfobjs.c (sfnt_load_face): Reactivate code to set FT_FACE_FLAG_KERNING which has been commented out erroneously. * docs/CHANGES: Document it. 2005-09-05 Werner Lemberg <wl@gnu.org> Fixes for `make multi' and using C++ compiler. * src/gxvalid/gxvcommn.c (gxv_set_length_by_ushort_offset, gxv_set_length_by_ulong_offset, gxv_array_getlimits_byte, gxv_array_getlimits_ushort): Declare with FT_LOCAL_DEF. (gxv_compare_ranges): Make it static. (gxv_LookupTable_fmt0_validate, gxv_LookupTable_fmt2_validate, gxv_LookupTable_fmt4_validate, gxv_LookupTable_fmt6_validate, gxv_LookupTable_fmt8_validate, gxv_LookupTable_validate): Improve trace messages. (gxv_StateArray_validate, gxv_XStateArray_validate): s/class/clazz/. (GXV_STATETABLE_HEADER_SIZE, GXV_STATEHEADER_SIZE, GXV_XSTATETABLE_HEADER_SIZE, GXV_XSTATEHEADER_SIZE): Move to gxvcommn.h. * src/gxvalid/gxvcommn.h: Add prototypes for gxv_StateTable_subtable_setup, gxv_XStateTable_subtable_setup, gxv_XStateTable_validate, gxv_array_getlimits_byte, gxv_array_getlimits_ushort, gxv_set_length_by_ushort_offset, gxv_set_length_by_ulong_offset, gxv_odtect_add_range, gxv_odtect_validate. (GXV_STATETABLE_HEADER_SIZE, GXV_STATEHEADER_SIZE, GXV_XSTATETABLE_HEADER_SIZE, GXV_XSTATEHEADER_SIZE): Moved from gxvcommn.c. * src/gxvalid/gxvbsln.c (gxv_bsln_LookupValue_validate, gxv_bsln_parts_fmt1_validate): Improve trace messages. * src/gxvalid/gxvfeat.c: Split off predefined registry stuff to... * src/gxvalid/gxvfeat.h: New file. * src/gxvalid/gxvjust.c (gxv_just_wdc_entry_validate): Improve trace message. * src/gxvalid/gxvkern.c (GXV_kern_Dialect): Add KERN_DIALECT_UNKNOWN. (gxv_kern_subtable_fmt1_valueTable_load, gxv_kern_subtable_fmt1_subtable_setup, gxv_kern_subtable_fmt1_entry_validate): Fix C++ compiler errors. (gxv_kern_coverage_validate): Use KERN_DIALECT_UNKNOWN. Improve trace message. (gxv_kern_validate_generic): Fix C++ compiler error. Improve trace message. (gxv_kern_validate_classic): Fix C++ compiler error. * src/gxvalid/gxvmort0.c (gxv_mort_subtable_type0_validate): Declare with FT_LOCAL_DEF. * src/gxvalid/gxvmort1.c (gxv_mort_subtable_type1_substitutionTable_load, gxv_mort_subtable_type1_subtable_setup): Fix C++ compiler errors. (gxv_mort_subtable_type1_substTable_validate): Improve trace message. (gxv_mort_subtable_type1_validate): Declare with FT_LOCAL_DEF. * src/gxvalid/gxvmort2.c (gxv_mort_subtable_type2_opttable_load, gxv_mort_subtable_type2_subtable_setup, gxv_mort_subtable_type2_ligActionOffset_validate, gxv_mort_subtable_type2_ligatureTable_validate): Fix C++ compiler errors. (gxv_mort_subtable_type2_validate): Declare with FT_LOCAL_DEF. * src/gxvalid/gxvmort4.c (gxv_mort_subtable_type4_validate): Declare with FT_LOCAL_DEF. * src/gxvalid/gxvmort5.c (gxv_mort_subtable_type5_subtable_setup, gxv_mort_subtable_type5_InsertList_validate): Fix C++ compiler errors. (gxv_mort_subtable_type5_validate): Declare with FT_LOCAL_DEF. * src/gxvalid/gxvmort.c: Include gxvfeat.h. (gxv_mort_featurearray_validate, gxv_mort_coverage_validate): Declare with FT_LOCAL_DEF. (gxv_mort_subtables_validate, gxv_mort_validate): Improve trace messages. * src/gxvalid/gxvmort.h (gxv_mort_feature_validate): Remove. * src/gxvalid/gxvmorx0.c (gxv_morx_subtable_type0_validate): Declare with FT_LOCAL_DEF. * src/gxvalid/gxvmorx1.c (gxv_morx_subtable_type1_substitutionTable_load, gxv_morx_subtable_type1_subtable_setup, gxv_morx_subtable_type1_entry_validate, gxv_morx_subtable_type1_substitutionTable_validate): Fix C++ compiler errors. (gxv_morx_subtable_type1_validate): Declare with FT_LOCAL_DEF. * src/gxvalid/gxvmorx2.c (gxv_morx_subtable_type2_opttable_load, gxv_morx_subtable_type2_subtable_setup, gxv_morx_subtable_type2_ligActionIndex_validate, gxv_morx_subtable_type2_ligatureTable_validate): Fix C++ compiler errors. (gxv_morx_subtable_type2_validate): Declare with FT_LOCAL_DEF. Fix typo. * src/gxvalid/gxvmorx4.c (gxv_morx_subtable_type4_validate): Declare with FT_LOCAL_DEF. * src/gxvalid/gxvmorx5.c (gxv_morx_subtable_type5_insertionGlyph_load, gxv_morx_subtable_type5_subtable_setup): Fix C++ compiler error. (gxv_morx_subtable_type5_validate): Declare with FT_LOCAL_DEF. * src/gxvalid/gxvmorx.c (gxv_morx_subtables_validate, gxv_morx_validate): Improve trace message. * src/gxvalid/gxvopbd.c (gxv_opbd_LookupFmt4_transit): Fix compiler warnings. (gxv_opbd_validate): Improve trace message. * src/gxvalid/gxvprop.c: Decorate constants with `U' and `L' where appropriate. (gxv_prop_zero_advance_validate, gxv_prop_validate): Improve trace message. * src/gxvalid/gxvtrak.c (gxv_trak_trackTable_validate): Remove unused parameter. Update all callers. (gxv_trak_validate): Improve trace message. * rules.mk (GXV_DRV_H): Add gxvfeat.h. 2005-09-01 Werner Lemberg <wl@gnu.org> * src/gxvalid/gxvbsln.c (GXV_BSLN_VALUE_EMPTY): Add `U'. * src/gxvalid/gxvmort1.c (GXV_MORT_SUBTABLE_TYPE1_HEADER_SIZE), src/gxvalid/gxvmort2.c (GXV_MORT_SUBTABLE_TYPE2_HEADER_SIZE): Fix typo. * src/gxvalid/gxvmorx0.c, src/gxvalid/gxvmorx1.c, src/gxvalid/gxvmorx2.c, src/gxvalid/gxvmorx4.c, src/gxvalid/gxvmorx5.c, src/gxvalid/gxvmort.c: Improve trace messages. Decorate constants with `U' and `L' where appropriate. Fix compiler warnings. 2005-08-31 Werner Lemberg <wl@gnu.org> * src/truetype/ttgload.c (load_truetype_glyph): Fix typo. * src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix trace message. * src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'. * src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c, src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c, src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c, src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c, src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve trace messages. Decorate constants with `U' and `L' where appropriate. Fix compiler warnings. 2005-08-30 Werner Lemberg <wl@gnu.org> * src/gxvalid/README: Revised. * src/gxvalid/gxvbsln.c: Fix compiler warnings. * src/gxvalid/gxvcommn.c: Fix compiler warnings. (gxv_XEntryTable_validate, gxv_compare_ranges): Remove unused parameter. Update all callers. Improve trace messages. Some formatting. 2005-08-29 Werner Lemberg <wl@gnu.org> * include/freetype/freetype.h, include/freetype/ftchapters.h: Add a preliminary section with some explanations about user allocation. * src/tools/docmaker/tohtml.py (HtmlFormatter.section_enter): Don't abort if there are no data types, functions, etc., in a section. Print synopsis only if we have a data type, function, etc. * docs/INSTALL.ANY, docs/INSTALL, docs/INSTALL.UNX, docs/CUSTOMIZE, docs/INSTALL.GNU, docs/TRUETYPE, docs/DEBUG, docs/UPGRADE.UNX, docs/VERSION.DLL, docs/formats.txt: Revised, formatted. 2005-08-28 George Williams <gww@silcom.com> * src/truetype/ttgload.c [TT_MAX_COMPOSITE_RECURSE]: Removed. (load_truetype_glyph): Limit recursion depth by `maxComponentDepth'. 2005-08-25 J. Ali Harlow <ali@avrc.city.ac.uk> * builds/unix/freetype2.in (CFlags): Add missing directory. 2005-08-24 Werner Lemberg <wl@gnu.org> * docs/CHANGES: Mention gxvalid module. 2005-08-23 Werner Lemberg <wl@gnu.org> * src/autofit/aflatin.c (af_latin_metrics_scale): Initialize render mode properly. Reported by chris@dokein.co.uk. 2005-08-23 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Add gxvalid module to validate TrueType GX/AAT tables. Modifications on existing files: * Jamfile: Register gxvalid module. * src/base/Jamfile: Register ftgxval.c. * src/base/rule.mk: Register ftgxval.c. * docs/INSTALL.ANY: Register gxvalid/gxvalid.c. * include/freetype/config/ftheader.h (FT_GX_VALIDATE_H): New macro to include gxvalid header file. * include/freetype/config/ftmodule.h: Register gxv_module_class. * include/freetype/ftchapters.h: Add comment about gx_validation. * include/freetype/ftotval.h: Change keyword FT_VALIDATE_XXX to FT_VALIDATE_OTXXX to co-exist with gxvalid. * include/freetype/tttags.h: Add tags for TrueType GX/AAT tables. * include/freetype/internal/ftserv.h (FT_SERVICE_GX_VALIDATE_H): New macro for gxvalid service. * include/freetype/internal/fttrace.h: Add trace facilities for gxvalid. New files on existing directories: * include/freetype/internal/services/svgxval.h: Registration of validation service for TrueType GX/AAT and classic kern table. * include/freetype/ftgxval.h: Public API definition to use gxvalid. * src/base/ftgxval.c: Public API of gxvalid. New files under src/gxvalid/: * src/gxvalid/Jamfile src/gxvalid/README src/gxvalid/module.mk src/gxvalid/rules.mk src/gxvalid/gxvalid.c src/gxvalid/gxvalid.h src/gxvalid/gxvbsln.c src/gxvalid/gxvcommn.c src/gxvalid/gxvcommn.h src/gxvalid/gxverror.h src/gxvalid/gxvfeat.c src/gxvalid/gxvfgen.c src/gxvalid/gxvjust.c src/gxvalid/gxvkern.c src/gxvalid/gxvlcar.c src/gxvalid/gxvmod.c src/gxvalid/gxvmod.h src/gxvalid/gxvmort.c src/gxvalid/gxvmort.h src/gxvalid/gxvmort0.c src/gxvalid/gxvmort1.c src/gxvalid/gxvmort2.c src/gxvalid/gxvmort4.c src/gxvalid/gxvmort5.c src/gxvalid/gxvmorx.c src/gxvalid/gxvmorx.h src/gxvalid/gxvmorx0.c src/gxvalid/gxvmorx1.c src/gxvalid/gxvmorx2.c src/gxvalid/gxvmorx4.c src/gxvalid/gxvmorx5.c src/gxvalid/gxvopbd.c src/gxvalid/gxvprop.c src/gxvalid/gxvtrak.c: New files, gxvalid body. 2005-08-21 Werner Lemberg <wl@gnu.org> * src/truetype/ttgload.c (TT_Load_Glyph): Only translate outline to (0,0) if bit 1 of the `head' table isn't set. This improves rendering of buggy fonts. 2005-08-20 Chia I Wu <b90201047@ntu.edu.tw> * src/truetype/ttdriver.c (Load_Glyph): Don't check the validity of ttmetrics here. TrueType fonts with only sbits always have ttmetrics.valid set to false. * src/truetype/ttgload.c (TT_Load_Glyph): Check that ttmetrics is valid before loading outline glyph. * src/cache/ftcimage.c (FTC_INode_New): Fix a memory leak. 2005-08-20 Werner Lemberg <wl@gnu.org> * src/sfnt/ttload.c (tt_face_load_metrics_header): Ignore missing `hhea' table for SFNT Mac fonts. Change based on a patch by mpsuzuki@hiroshima-u.ac.jp. 2005-08-20 Masatake YAMATO <jet@gyve.org> * src/otvalid/otvmod.c (otv_validate): Use ft_validator_run instead of ft_setjmp. 2005-08-19 Werner Lemberg <wl@gnu.org> * src/truetype/ttgload.c (load_truetype_glyph): Fix compiler warnings. 2005-08-16 Chia I Wu <b90201047@ntu.edu.tw> * src/truetype/ttinterp.c, src/truetype/ttinterp.h: Update copyright messages. 2005-08-16 Chia I Wu <b90201047@ntu.edu.tw> * src/truetype/ttinterp.c, src/truetype/ttinterp.h: Remove original TT_Done_Context and rename TT_Destroy_Context to TT_Done_Context with slight changes. Update all callers. (TT_New_Context): Now takes TT_Driver argument directly. Update all callers. * src/truetype/ttobjs.h (tt_slot_init): New function. * src/truetype/ttobjs.c (tt_driver_init): Initialize execution context here. (tt_slot_init): New function to create extra points for the internal glyph loader. We then use it directly, instead of face's glyph loader, when loading glyph. * src/truetype/ttdriver.c (tt_driver_class): Use tt_slot_init for glyph slot initialization. (Load_Glyph): Load flag dependencies are handled here. Return error if size is NULL. * src/truetype/ttgload.c: Heavy cleanup and refactoring. (org_to_cur): Removed. (TT_Load_Simple_Glyph): Call FT_GlyphLoader_CheckPoints. (TT_Hint_Glyph): New function to hint a zone, prepared by caller. (TT_Process_Simple_Glyph): s/load/loader/. Use loader->pp values instead of recalculation. Use TT_Hint_Glyph. No need to save/restore loader->stream before and after TT_Vary_Get_Glyph_Deltas now. (TT_LOADER_SET_PP): New macro to calculate and set the four phantom points. (load_truetype_glyph): Never set exec->glyphSize to 0. This closes Savannah bug #13107. Forget glyph frame before calling TT_Process_Simple_Glyph. Use TT_LOADER_SET_PP. Scale all four phantom points. Split off some functionality to ... (TT_Process_Composite_Component, TT_Process_Composite_Glyph): These new functions. (TT_Load_Glyph): Set various fields of `glyph' here, not in load_truetype_glyph and compute_glyph_metrics. Split off some functionality to ... (load_sbit_image, tt_loader_init): These new functions. (compute_glyph_metrics): Call FT_Outline_Get_CBox. 2005-08-08 Werner Lemberg <wl@gnu.org> * docs/INSTALL.ANY: Updated. 2005-08-05 Werner Lemberg <wl@gnu.org> * src/cff/cffgload.c (cff_builder_close_contour), src/psaux/psobjs.c (t1_builder_close_contour): Protect against zero `outline' pointer. * src/base/ftgloadr.c (FT_GlyphLoader_Add): Protect against zero `loader' address. 2005-08-03 Werner Lemberg <wl@gnu.org> * src/sfnt/sfdriver.c (sfnt_interface) [FT_OPTIMIZE_MEMORY]: Reactivate pointers to tt_find_sbit_image and tt_load_sbit_metrics to make X work again. 2005-08-02 Werner Lemberg <wl@gnu.org> * src/otvalid/otvcommn.h: Remove dead code. 2005-07-31 Chia I Wu <b90201047@ntu.edu.tw> * src/truetype/ttobjs.h (tt_size_run_fpgm, tt_size_run_prep): New functions. * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): New functions. (tt_size_init): Add 4, instead of 2, (phantom) points to twilight zone. Move code that runs fpgm to tt_size_run_fpgm. (Reset_Outline_Size): Move code that runs prep to tt_size_run_prep. (tt_glyphzone_new): Allocate right size of arrays. Set max_points and max_contours properly. 2005-07-26 Chia I Wu <b90201047@ntu.edu.tw> * src/truetype/ttdriver.c (Set_Char_Sizes): Avoid unnecessary computations and clean up. * src/truetype/ttobjs.h (struct TT_SizeRec_): Comment on the internal copy of metrics. 2005-07-12 Werner Lemberg <wl@gnu.org> * include/freetype/ftoutln.h (FT_Outline_Embolden): Fix prototype. Reported by Xerxes. 2005-07-04 Werner Lemberg <wl@gnu.org> * include/freetype/internal/ftmemory.h (FT_REALLOC_ARRAY): Fix typo. Reported by Brett Hutley. 2005-06-30 David Turner <david@freetype.org> * src/sfnt/ftbitmap.c, src/truetype/ttgload.c, src/sfnt/ttcmap.c: Removing compiler warnings (Visual C++ /W4). Implement a work-around for broken C preprocessor in Visual C++ (it has been confirmed by the MS developers that it is indeed a bug which won't be fixed in the very near future). * Jamfile (FT2_COMPONENTS): Include otvalid (again). * src/otvalid/otvcommn.h (OTV_NAME, OTV_FUNC): New macros. (OTV_NEST1, OTV_NEST2, OTV_NEST3): Use OTV_NAME and OTV_FUNC to avoid argument expansion by argument prescan. Append `Func' to all affected macros and change them to take just a single argument. Example: `AttachList' is renamed to `AttachListFunc'. * src/otvalid/otvgdef.c, src/otvalid/otvgpos.c, src/otvalid/otvgsub.c, src/otvjstf.c: Append `Func' to macros affected by the changes to OTV_NESTx and modify them to take just a single argument. 2005-06-20 Chia I Wu <b90201047@ntu.edu.tw> * include/freetype/internal/ftobjs.h, src/base/ftobjs.c: New function ft_glyphslot_grid_fit_metrics. * src/truetype/ttgload.c (compute_glyph_metrics): Use ft_glyphslot_grid_fit_metrics. * src/cff/cffgload.c (cff_slot_load), src/cid/cidgload.c (cid_slot_load_glyph), src/type1/t1gload.c (T1_Load_Glyph): Use ft_glyphslot_grid_fit_metrics. FT_Outline_Get_CBox is called twice. * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Modify metrics to more reasonable values when emboldening outline glyphs. The theoretic ones are unrealistic. 2005-06-16 Chia I Wu <b90201047@ntu.edu.tw> * src/base/ftoutln.c (FT_Outline_Embolden): Strength should be halved. * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Change the default strength. Don't increase slot->advance.y. 2005-06-16 Werner Lemberg <wl@gnu.org> * include/freetype/freetype.h (FREETYPE_MINOR): Set to 2. (FREETYPE_PATCH): Set to 0. * builds/unix/configure.ac (version_info): Set to 9:9:3. Currently, we are still binary compatible. * builds/win32/visualc/index.html, builds/win32/visualc/freetype.dsp, builds/win32/visualc/freetype.vcproj: s/219/2110/, s/2.1.9/2.1.10/. * builds/freetype.mk (refdoc), README, Jamfile (RefDoc): s/2.1.9/2.1.10/. * docs/CHANGES, docs/VERSION.DLL: Updated. * ChangeLog: Split off older entries into... * ChangeLog.20, ChangeLog.21: These new files. 2005-06-15 Kirill Smelkov <kirr@mns.spb.ru> The next release will be 2.2.0, so don't worry about source code backward compatibility. * include/freetype/ftimage.h (FT_Outline_MoveToFunc, FT_Outline_LineToFunc, FT_Outline_ConicToFunc, FT_Outline_CubicToFunc, FT_SpanFunc, FT_Raster_RenderFunc), include/freetype/ftrender.h (FT_Glyph_TransformFunc, FT_Renderer_RenderFunc, FT_Renderer_TransformFunc): Decorate parameters with `const' where appropriate. 2005-06-15 Chia I Wu <b90201047@ntu.edu.tw> * src/sfnt/ttsbit.c (tt_face_load_sbit_image): Compute vertBearingY to make glyphs centered vertically. * src/truetype/ttgload.c (compute_glyph_metrics): Compute vertBearingY to make glyphs centered vertically. Fix some bugs in vertical metrics: . loader->pp3.y and loader->pp4.y are in 26.6 format, not in font units. . As we use the glyph's cbox to calculate the top bearing now there is no need to adjust `top'. 2005-06-15 Werner Lemberg <wl@gnu.org> * src/otvalid/otvcommn.h (OTV_OPTIONAL_TABLE): Use FT_UShort to be in sync with OTV_OPTIONAL_OFFSET. Reported by YAMATO Masatake. 2005-06-13 Werner Lemberg <wl@gnu.org> * docs/release: Update. ---------------------------------------------------------------------------- Copyright (C) 2005-2022 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, and distributed under the terms of the FreeType project license, LICENSE.TXT. By continuing to use, modify, or distribute this file you indicate that you have read the license and understand and accept it fully. Local Variables: version-control: never coding: utf-8 End:
whupdup/frame
real/third_party/freetype-2.12.0/docs/oldlogs/ChangeLog.22
22
gpl-3.0
99,819
2010-02-13 Werner Lemberg <wl@gnu.org> * Version 2.3.12 released. ========================== Tag sources with `VER-2-3-12'. * docs/CHANGES: Updated. * docs/VERSION.DLL: Update documentation and bump version number to 2.3.12. * README, Jamfile (RefDoc), builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html, builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html, builds/win32/visualc/freetype.dsp, builds/win32/visualc/freetype.vcproj, builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp, builds/win32/visualce/freetype.vcproj, builds/win32/visualce/index.html, builds/wince/vc2005-ce/freetype.vcproj, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/freetype.vcproj, builds/wince/vc2008-ce/index.html: s/2.3.11/2.3.12/, s/2311/2312/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 12. * builds/unix/configure.raw (version_info): Set to 10:0:4. 2010-02-12 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Improve autotool version checking to work with beta releases. * autogen.sh (check_tool_version): Improve the extraction of version number from "tool --version" output. Some beta releases of autotools have extra strings before version number. 2010-02-12 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Fix overallocating bug in FT_Outline_New_Internal(). * src/base/ftoutln.c (FT_Outline_New_Internal): The length of FT_Outline->points[] should be numPoints, not 2 * numPoints. Found by Paul Messmer, see https://lists.gnu.org/archive/html/freetype-devel/2010-02/msg00003.html 2010-02-10 Ken Sharp <ken.sharp@artifex.com> Really fix Savannah bug #28678 (part 2). Since we consider `sbw' for the horizontal direction only, we still have to synthesize vertical metrics if the user wants to use the vertical writing direction. * src/cff/cffgload.c (cff_slot_load), src/cid/cidgload.c (cid_slot_load_glyph), src/type1/t1gload.c (T1_Load_Glyph): Synthesize vertical metrics (only) if FT_LOAD_VERTICAL_LAYOUT is set. 2010-02-10 Ken Sharp <ken.sharp@artifex.com> Really fix Savannah bug #28678 (part 1). After long discussion, we now consider the character width vector (wx,wy) returned by the `sbw' Type 1 operator as being part of *one* direction only. For example, if you are using the horizontal writing direction, you get the horizontal and vertical components of the advance width for this direction. Note that OpenType and CFF fonts don't have such a vertical component; instead, the GPOS table can be used to generate two-dimensional advance widths (but this isn't handled by FreeType). * include/freetype/ftincrem.h (FT_Incremental_MetricsRec): Add `advance_v' field to hold the vertical component of the advance value. * src/truetype/ttgload.c (tt_get_metrics), src/cff/cffgload.c (cff_slot_load), src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String), src/cid/cidgload.c (cid_load_glyph): Use it. 2010-02-08 Werner Lemberg <wl@gnu.org> * devel/ftoption.h [FT_CONFIG_OPTION_PIC]: Define. 2010-02-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Prevent NULL pointer dereference passed to FT_Module_Requester. * src/sfnt/sfdriver.c (sfnt_get_interface): Don't use `module'. * src/psnames/psmodule.c (psnames_get_interface): Ditto. * src/cff/cffdrivr.c (cff_get_interface): Check NULL `driver'. * src/truetype/ttdriver.c (tt_get_interface): Ditto. 2010-01-29 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Fix memory leaks in previous patch. * src/sfnt/sfobjs.c (sfnt_load_face): Don't overwrite the strings allocated for face->root.family_name and style_name. 2010-01-29 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> New parameters for FT_Open_Face() to ignore preferred family names. Preferred family names should be used for legacy systems that can hold only a few faces (<= 4) for a family name. Suggested by Andreas Heinrich. https://lists.gnu.org/archive/html/freetype/2010-01/msg00001.html * include/freetype/ftsnames.h (FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY, FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY): Define. * src/sfnt/sfobjs.c (sfnt_load_face): Check the arguments and ignore preferred family and subfamily names if requested. 2010-01-27 Ken Sharp <ken.sharp@artifex.com> Fix Savannah bug #28678. * src/cff/cffgload.c (cff_slot_load), src/cid/cidgload.c (cid_load_glyph): Handle vertical metrics correctly. * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Handle vertical metrics correctly. (T1_Load_Glyph): Don't synthesize vertical metrics. 2010-01-14 Werner Lemberg <wl@gnu.org> Make FT_Set_Transform work if no renderer is available. * src/base/ftobjs.c (FT_Load_Glyph): Apply `standard' transformation if no renderer is compiled into the library. 2010-01-14 Werner Lemberg <wl@gnu.org> Fix compilation warning. * src/base/ftbase.h: s/LOCAL_DEF/LOCAL/. * src/base/ftobjs.c: Include ftbase.h conditionally. 2010-01-11 Kwang Yul Seo <skyul@company100.net> Provide inline assembly code for RVCT compiler. This is Savannah patch #7059. * include/freetype/config/ftconfig.h (FT_MULFIX_ASSEMBLER, FT_MulFix_arm) [__CC_ARM || __ARM_CC]: Define. 2010-01-08 Ken Sharp <ken.sharp@artifex.com> Fix Savannah bug #28521. Issue #28226 involved a work-around for a font which used the `setcurrentpoint' operator in an invalid way; this operator is only supposed to be used with the result of OtherSubrs, and the font used it directly. The supplied patch removed the block of code which checked this usage entirely. This turns out to be a Bad Thing. If `setcurrentpoint' is being used correctly it should reset the flex flag in the decoder. If we don't do this then the flag never gets reset and we omit any further contours from the glyph (at least until we close the path or similar). * src/psaux/t1decode.c (t1_decoder_parse_charstrings) <op_setcurrentpoint>: Handle `flex_state' correctly. 2010-01-05 Werner Lemberg <wl@gnu.org> Apply reports from clang static analyzer. * src/lzw/ftlzw.c (ft_lzw_file_init), src/base/ftstroke.c (FT_Stroker_ParseOutline), src/base/ftsynth.c (FT_GlyphSlot_Embolden): Remove dead code. * src/base/ftpatent.c (_tt_check_patents_in_table): Initialize `offset_i' and `length_i'. 2010-01-05 Ralph Giles <giles@ghostscript.com> Enable the incremental font interface by default. Ghostscript requires the incremental font interface for handling some Postscript documents. It is moving to using FreeType as its primary renderer; supporting this in the default build makes it Ghostscript to be linked against the system FreeType when one is available. * include/freetype/config/ftoption.h (FT_CONFIG_OPTION_INCREMENTAL): Uncomment. 2010-01-05 Werner Lemberg <wl@gnu.org> Fix Savannah bug #28395. * src/truetype/ttdriver.c (Load_Glyph), src/type1/t1gload.c (T1_Load_Glyph): Don't check `num_glyphs' if incremental interface is used. 2010-01-05 Ken Sharp <ken.sharp@artifex.com> Make Type 1 `seac' operator work with incremental interface. This fixes Savannah bug #28480. * src/psaux/t1decode.c (t1operator_seac): Don't check `glyph_names' if incremental interface is used. 2010-01-04 Ken Sharp <ken.sharp@artifex.com> Make incremental interface work with TrueType fonts. This fixes Savannah bug #28478. * src/truetype/ttgload.c (load_truetype_glyph): Don't check `glyf_offset' if incremental interface is used. 2009-12-31 Lars Abrahamsson <wonko@opera.com> Make compilation with FT_CONFIG_OPTION_PIC work again. * src/base/ftglyph.c (FT_Glyph_To_Bitmap) [FT_CONFIG_OPTION_PIC]: Declare `library' for FT_BITMAP_GLYPH_CLASS_GET. * src/base/ftinit.c (ft_destroy_default_module_classes, ft_create_default_module_classes): Use proper casts (needed for C++ compilation). * src/sfnt/ttcmap.c (tt_cmap13_class_rec): Use FT_DEFINE_TT_CMAP. 2009-12-22 Marc Kleine-Budde <mkl@pengutronix.de> Make freetype-config aware of $SYSROOT. This is Savannah patch #7040. * builds/unix/freetype-config.in: Decorate with ${SYSROOT} where appropriate. 2009-12-20 Werner Lemberg <wl@gnu.org> Fix compiler warning. Reported by Sean. * src/base/ftdbgmem.c [!FT_DEBUG_MEMORY]: ANSI C doesn't like empty source files; however, some compilers warn about an unused variable declaration. This is now replaced with a typedef. 2009-12-18 Werner Lemberg <wl@gnu.org> Fix Savannah bug #28320. There exist corrupt, subsetted fonts (embedded in PDF files) which contain a private dict that ends with an unterminated floating point number (no operator following). We now ignore this error (as acrobat does). * src/cff/cffparse.c (cff_parser_run): Don't emit a syntax error for unterminated floating point numbers. 2009-12-16 Werner Lemberg <wl@gnu.org> Really fix compiler warnings. Reported by Sean. * src/truetype/ttgxvar.c (GX_PT_POINTS_ARE_WORDS, GX_PT_POINT_RUN_COUNT_MASK): Convert enum values to macros. 2009-12-16 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Improve configure.raw to copy some options from CFLAGS to LDFLAGS. The linker of Mac OS X 10.6 is sensitive to the architecture. If the architectures are specified explicitly for the C compiler, the linker requires the architecture specifications too. * builds/unix/configure.raw: Replace `-isysroot' option parser by more generic argument parser. 2009-12-15 Werner Lemberg <wl@gnu.org> Fix compiler warnings. Reported by Sean. * src/truetype/ttgxvar.c (ft_var_readpackeddeltas): Fix counter data type. 2009-12-14 Ken Sharp <ken.sharp@artifex.com> Ignore invalid `setcurrentpoint' operations in Type 1 fonts. This fixes Savannah bug #28226. At least two wild PostScript files of unknown provenance contain Type 1 fonts, apparently converted from TrueType fonts in earlier PDF versions of the files, which use the `setcurrentpoint' operator inappropriately. FreeType currently throws an error in this case, but Ghostscript and Adobe Distiller both accept the fonts and ignore the problem. This commit #ifdefs out the check so PostScript interpreters using FreeType can render these files. The specification says `setcurrentpoint' should only be used to set the point after a `Subr' call, but these fonts use it to set the initial point to (0,0). Unnecessarily so, as they correctly use an `hsbw' operation which implicitly sets the initial point. * src/psaux/t1decode.c (t1_decoder_parse_charstrings) <op_setcurrentpoint>: Comment out code. 2009-12-14 Bram Tassyns <bramt@enfocus.be> Fix parsing of /CIDFontVersion. This fixes Savannah bug #28287. * src/cid/cidtoken.h: `cid_version' in CID_FaceInfoRec (in t1tables.h) is of type FT_Fixed. 2009-12-14 Werner Lemberg <wl@gnu.org> Trace glyph index in CID module. Suggested in Savannah patch #7023. * src/cid/cidgload.c (cid_load_glyph): Add tracing message. 2009-12-03 Werner Lemberg <wl@gnu.org> Fix compiler warnings. * src/truetype/ttgload.c (tt_get_metrics): Put `Exit' label into the proper preprocessor conditional. * src/pfr/pfrobjs.c (pfr_slot_load): Pacify gcc. 2009-11-25 John Tytgat <John.Tytgat@esko.com> Better handling of start of `eexec' section. This fixes Savannah bug #28090. * src/type1/t1parse.c (T1_Get_Private_Dict): Skip all whitespace characters before start of `eexec' section. 2009-11-20 Werner Lemberg <wl@gnu.org> Fix Savannah bug #27742. * src/base/ftstroke.c (ft_stroker_outside): Avoid silent division by zero, using a threshold for `theta'. 2009-11-20 Werner Lemberg <wl@gnu.org> Fix Savannah bug #28036. * src/type1/t1afm.c (t1_get_index): Fix comparison. 2009-11-16 Werner Lemberg <wl@gnu.org> Fix compiler warnings. Reported by Kevin Blenkinsopp <arqon@promode.org>. * src/sfnt/ttload.c (check_table_dir): Use proper data type. 2009-11-15 Werner Lemberg <wl@gnu.org> Really fix FreeDesktop bug #21197. This also fixes Savannah bug #28021. * src/autofit/aflatin.c (af_latin_metrics_check_digits), src/autofit/aflatin2.c (af_latin2_metrics_check_digits): Fix loop. 2009-11-15 Werner Lemberg <wl@gnu.org> Add tracing messages for advance values. * src/base/ftobjs.c (FT_Load_Glyph), src/truetype/ttgload.c (TT_Get_HMetrics, TT_Get_VMetrics): Do it. 2009-11-08 Werner Lemberg <wl@gnu.org> Fix compiler warning. Reported by Jeremy Manson <jeremy.manson@gmail.com>. * src/truetype/ttgload.c (load_truetype_glyph): Initialize `error'. 2009-11-04 Werner Lemberg <wl@gnu.org> Remove compiler warning. Reported by Sean McBride <sean@rogue-research.com>. * src/tools/apinames.c (read_header_file)<STATE_TYPE>: Use a cast to `int', as specified in the printf(3) man page. 2009-11-04 Werner Lemberg <wl@gnu.org> Fix Savannah bug #27921. * src/cff/cffobjs.c (cff_face_init), src/cid/cidobjs.c (cid_face_init), src/type1/t1afm.c (T1_Read_Metrics), src/type1/t1objs.c (T1_Face_Init): Don't use unsigned constant values for rounding if the argument can be negative. 2009-11-03 Bram Tassyns <bramt@enfocus.be> Add basic support for Type1 charstrings in CFF. This fixes Savannah bug #27922. * src/cff/cffgload.c (CFF_Operator, cff_argument_counts): Handle `seac', `sbw', and `setcurrentpoint' opcodes. (cff_compute_bias): Add parameter to indicate the charstring type. Update all callers. (cff_operator_seac): Add parameter for side bearing. (cff_decoder_parse_charstrings): Updated for more Type1 support. 2009-11-03 Werner Lemberg <wl@gnu.org> Return correct `linearHoriAdvance' value for embedded TT bitmaps too. Reported by Jeremy Manson <jeremy.manson@gmail.com>. src/truetype/ttgload.c (load_truetype_glyph): Add parameter to quickly load the glyph header only. Update all callers. (tt_loader_init): Add parameter to quickly load the `glyf' table only. Update all callers. (TT_Load_Glyph): Compute linear advance values for embedded bitmap glyphs too. 2009-11-03 Werner Lemberg <wl@gnu.org> Improve code readability. * src/ttgload.c (load_truetype_glyph): Move metrics calculation to... (tt_get_metrics): This new function. 2009-10-26 Bram Tassyns <bramt@enfocus.be> Fix Savannah bug #27811. * src/truetype/ttxgvar.c (ft_var_readpackeddeltas): Fix signed/unsigned mismatch. 2009-10-19 Ning Dong <flintning@163.com> Fix handling of `get' and `put' CFF instructions. * src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_get, cff_op_put>: Appendix B of Adobe Technote #5177 limits the number of elements for the `get' and `put' operators to 32. * src/cff/cffgload.h (CFF_MAX_TRANS_ELEMENTS): Define. (CFF_Decoder): Use it for `buildchar' and remove `len_buildchar'. 2009-10-18 Werner Lemberg <wl@gnu.org> Fix handling of `dup' CFF instruction. Problem and solution reported by Ning Dong <flintning@163.com>. * src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_dup>: Increase `args' by 2, not 1. 2009-10-10 Werner Lemberg <wl@gnu.org> * Version 2.3.11 released. ========================== Tag sources with `VER-2-3-11'. * docs/VERSION.DLL: Update documentation and bump version number to 2.3.11. * README, Jamfile (RefDoc), builds/win32/visualc/index.html, builds/win32/visualc/freetype.dsp, builds/win32/visualc/freetype.vcproj, builds/win32/visualce/index.html, builds/win32/visualce/freetype.dsp, builds/win32/visualce/freetype.vcproj: s/2.3.10/2.3.11/, s/2310/2311/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 11. * builds/unix/configure.raw (version_info): Set to 9:22:3. 2009-10-10 Werner Lemberg <wl@gnu.org> * docs/CHANGES, docs/release: Updated. 2009-10-10 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * src/pcf/pcfread.c (pcf_get_properties): Fix a bug in the nprops truncation. Reported by Martin von Gagern and Peter Volkov. https://bugs.gentoo.org/288357 and https://bugs.gentoo.org/288256 2009-10-06 Werner Lemberg <wl@gnu.org> * Version 2.3.10 released. ========================== Tag sources with `VER-2-3-10'. * builds/toplevel.mk (major, minor, patch): Fix regexp to allow more than a single digit. (dist): We now use git. * docs/VERSION.DLL: Update documentation and bump version number to 2.3.10. * README, Jamfile (RefDoc), builds/win32/visualc/index.html, builds/win32/visualc/freetype.dsp, builds/win32/visualc/freetype.vcproj, builds/win32/visualce/index.html, builds/win32/visualce/freetype.dsp, builds/win32/visualce/freetype.vcproj: s/2.3.9/2.3.10/, s/239/2310/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 10. * builds/unix/configure.raw (version_info): Set to 9:21:3. 2009-10-06 Werner Lemberg <wl@gnu.org> Fix `make multi'. * src/cache/ftccache.c, src/cache/ftcsbits.c (FT_COMPONENT): Define. * src/sfnt/sfdriver.c: Include FT_INTERNAL_DEBUG_H. 2009-09-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [cache] Fix Savannah bug #27441, clean up Redhat bugzilla #513582. Tricky casts in FTC_{CACHE,GCACHE,MRULIST}_LOOKUP_CMP() are removed. Now these functions should be called with FTC_Node or FTC_MruNode variable, and the caller should cast them to appropriate pointers to concrete data. These tricky casts can GCC-4.4 optimizer (-O2) confused and the crashing binaries are generated. * src/cache/ftcmru.h (FTC_MRULIST_LOOKUP_CMP): Drop tricky cast. Now the 4th argument `node' of this function should be typed as FTC_MruNode. * src/cache/ftcglyph.h (FTC_GCACHE_LOOKUP_CMP): For inline implementation, new temporal variable FTC_MruNode `_mrunode' to take the pointer from FTC_MRULIST_LOOKUP_CMP(). For non-inline implementation, tricky cast is dropped. * src/cache/ftcmanag.c (FTC_SIZE_NODE): New macro casting to FTC_SizeNode. (FTC_Manager_LookupSize): Replace FTC_SizeNode `node' by FTC_MruNode `mrunode', and FTC_SIZE_NODE() is inserted. (FTC_FACE_NODE): New macro casting to FTC_FaceNode. (FTC_Manager_LookupFace) Replace FTC_FaceNode `node' by FTC_MruNode `mrunode', and FTC_FACE_NODE() is inserted. * src/cache/ftcbasic.c (FTC_ImageCache_Lookup): Change the type of `node' from FTC_INode to FTC_Node. Extra casting macro FTC_NODE() is dropped. (FTC_ImageCache_LookupScaler): Ditto. (FTC_SBitCache_Lookup): Change the type of `node' from FTC_SNode to FTC_Node. Extra casting macro FTC_NODE() is dropped. FTC_SNODE() is inserted. (FTC_SBitCache_LookupScaler): Ditto. * src/cache/ftccmap.c (FTC_CMapCache_Lookup): Change the type of `node' from FTC_CMapNode to FTC_Node. Extra casting macro FTC_NODE() is dropped, FTC_CMAP_NODE() is inserted. 2009-09-25 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [cache, psaux, type1] Fix for multi build. In multi build, some cpp functions are left as unresolved symbols. * src/cache/ftcbasic.c: Include FT_INTERNAL_DEBUG_H for FT_TRACE1(). * src/psaux/t1decode.c: Include FT_INTERNAL_CALC_H for FIXED_TO_INT(). * src/type1/t1gload.c: Ditto. * src/type1/t1objs.c: Ditto. 2009-09-25 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [autofit] Fix for multi build. * src/autofit/afmodule.h: Include FT_INTERNAL_OBJECTS_H to use FT_DECLARE_MODULE() macro in multi build. * src/autofit/aflatin.c: Include <ft2build.h> to handle FT_ADVANCES_H correctly in multi build. 2009-09-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [cache] Check the face filled by FTC_Manager_LookupFace(). * src/cache/ftcbasic.c (ftc_basic_family_get_count): Return immediately if FTC_Manager_LookupFace() fills face by NULL. Such case can occur when the code is optimized by GCC-4.2.x. 2009-09-23 Werner Lemberg <wl@gnu.org> * docs/CHANGES: Updated. 2009-09-12 Werner Lemberg <wl@gnu.org> [raster] Fix 5-levels grayscale output. This was broken since version 2.3.0. * src/raster/ftraster.c (count_table): Use pre-2.3.0 values (which were then computed dynamically). (Vertical_Gray_Sweep_Step): Updated. (ft_black_render): Initialize `worker->gray_lines' (problem found by valgrind). (FT_RASTER_OPTION_ANTI_ALIASING, DEBUG_RASTER): Don't #undef, just comment out. 2009-09-12 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Improve configure.raw for cross build. * builds/unix/configure.raw: Remove temporal files created by the suffix checking for CC_BUILD. Set XX_ANSIFLAGS and XX_CFLAGS when cross compiler is GCC. AC_PROG_CC checks whether the cross compiler is GCC, its result is stored in GCC. 2009-09-12 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [BDF] Modify hash API to take size_t value instead of void *. The hash API in BDF driver is designed to be generic, it takes void * typed data. But BDF driver always gives an unsigned long integer (the index to a property). To reduce non-essential casts from unsigned long to void* and from void* to unsigned long, the hash API is changed to take size_t integer. The issue of incompatible cast between unsigned long and void* on LLP64 platform is reported by NightStrike from MinGW-Win64 project. See https://lists.gnu.org/archive/html/freetype/2009-09/msg00000.html * src/bdf/bdf.h: The type of hashnode->data is changed from void* to size_t. * src/bdf/bdflib.c (hash_insert): Get size_t data, instead of void* data. (bdf_create_property): Get the name length of new property by size_t variable, with a cut-off at FT_ULONG_MAX. (_bdf_set_default_spacing): Get the name length of the face by size_t variable, with a cut-off at 256. (bdf_get_property): Get the property id by size_t variable to reduce the casts between 32-bit prop ID & hashnode->data during simple copying. (_bdf_add_property): Ditto. (_bdf_parse_start): Calculate the index to the property array by size_t variable. (bdf_get_font_property): Drop a cast to unsigned long. 2009-09-10 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [Win64] Improve the computation of random seed from stack address. On LLP64 platform, the conversion from pointer to FT_Fixed need to drop higher 32-bit. Explicit casts are required. Reported by NightStrike from MinGW-w64 project. See https://lists.gnu.org/archive/html/freetype/2009-09/msg00000.html * src/cff/cffgload.c: Convert the pointers to FT_Fixed explicitly. * src/psaux/t1decode.c: Ditto. 2009-09-03 Werner Lemberg <wl@gnu.org> [raster] Improvements for stand-alone mode. * src/raster/rules.mk: Don't handle ftmisc.h. It is needed for stand-alone mode only. * src/raster/ftmisc.h (FT_MemoryRec, FT_Alloc_Func, FT_Free_Func, FT_Realloc_Func): Copy declarations from ftsystem.h. 2009-09-02 Bram Tassyns <bramt@enfocus.be> Improve vertical metrics calculation (Savannah bug #27364). The calculation of `vertBearingX' is not defined in the OTF font spec so FreeType does a `best effort' attempt. However, this value is defined in the PDF and PostScript specs, and that algorithm is better than the one FreeType currently uses: FreeType: Use the middle of the bounding box as the X coordinate of the vertical origin. Adobe PDF spec: Use the middle of the horizontal advance vector as the X coordinate of the vertical origin. FreeType's algorithm goes wrong if you have a really small glyph (like the full-width, circle-like dot at the end of the sentence, as used in CJK scripts) with large bearings. With the FreeType algorithm this dot gets centered on the baseline; with the PDF algorithm it gets the correct location (in the top right). Note that this is a serious issue, it's like printing the dot at the end of a Roman sentence at the center of the textline instead of on the baseline like it should. So i believe the PDF spec's algorithm should be used in FreeType as well. The `vertBearingY' value for such small glyphs is also very strange if no `vmtx' information is present, since the height of the bbox is not representable for the height of the glyph visually (the whitespace up to the baseline is part of the glyph). The fix also includes some code for a better estimate of `vertBearingY'. * src/base/ftobjs.c (ft_synthesize_vertical_metrics): `vertBearingX' is now calculated as described by the Adobe PDF Spec. Estimate for `vertBearingY' now works better for small glyphs completely above or below the baseline into account. * src/cff/cffgload.c (cff_slot_load): `vertBearingX' is now calculated as described by the Adobe PDF Spec. Vertical metrics information was always ignored when FT_CONFIG_OPTION_OLD_INTERNALS was not defined. * src/truetype/ttgload.c (compute_glyph_metrics): `vertBearingX' is now calculated as described by the Adobe PDF Spec. 2009-09-01 John Tytgat <John.Tytgat@esko.com> Fix custom cmap for empty Type 1 font (Savannah bug #27294). * include/freetype/internal/t1types.h (T1_EncodingRecRec_): Update comment to reflect revised code_last meaning. * src/type1/t1load.c (T1_Open_Face), src/type42/t42objs.c (T42_Open_Face): Assign max_char as highest character code + 1 and use this for T1_EncodingRecRec_::code_last. * src/psaux/t1cmap.c (t1_cmap_custom_init): Follow revised T1_EncodingRecRec_::code_last meaning. 2009-08-25 Werner Lemberg <wl@gnu.org> Fix rendering of horizontally compressed CFFs. Bug reported by Ivan Nincic <inincic@pdftron.com>. * src/cff/cffgload.c (cff_slot_load): Thinko: Check `xx' element of `font_matrix' also. * docs/CHANGES: Updated. 2009-08-03 suyu0925@gmail.com Don't call `ft_fseek' every time when executing `ft_fread'. * src/base/ftstream.c (FT_Stream_Seek), src/base/ftsystem.c (ft_ansi_stream_io): Implement it. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> sfnt: Cast a charcode to 32-bit in cmap format 14 parser. * src/sfnt/ttcmap.c (tt_cmap14_char_var_index, tt_cmap14_char_var_isdefault, tt_cmap14_char_variants, tt_cmap14_variant_chars): Correct mismatches from FT_CMap_CharVarIndexFunc prototype, FT_ULong arguments are replaced by FT_UInt32 arguments. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> sfnt: Cast a charcode to 32-bit in cmap format 12 parser. * src/sfnt/ttcmap.c (tt_cmap12_char_next): Insert explicit cast from FT_UFast to FT_UInt32 for return value. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> psaux: Fix a few casts to FT_Int32 value. * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Fix a few casts setting `value' from FT_Long to FT_Int32, because `value' is typed as FT_Int32 since 2009-06-22. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> sfnt: Fix a data type mismatching with its source. * src/sfnt/ttcmap.c (tt_cmap13_char_next): Fix the type of `gindex' from FT_ULong to FT_UInt because it is set by FT_UInt tt_cmap13_char_map_binary() or TT_CMap13->cur_gindex. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> sfnt: Extend a few local variables to load 32-bit values. * src/sfnt/ttkern.c (tt_face_load_kern): Extend `count' and `kern' to load 32-bit values. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> pfr: Extend `num_aux' to take 32-bit value. * src/pfr/pfrload.c (pfr_phy_font_load): Extend `num_aux' to load 32-bit value. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> pcf: Truncate FT_ULong `nprops' to fit to int PCF_Face->nprops. * src/pcf/pcfread.c (pcf_get_properties): Load `nprops' as FT_ULong value from PCF file, but truncate it as int to fit PCF_Face->nprops. The number of truncated properties is shown in the trace message. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> gxvalid: Extend a few local variables to reduce the casts. * src/gxvalid/gxvmorx.c (gxv_morx_subtables_validate): Extend `type' and `rest' to take FT_ULong values. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> gxvalid: Extend `settingTable' to take 32-bit offset. * src/gxvalid/gxvfeat.c (gxv_feat_name_validate): Extend `settingTable' to take 32-bit offset. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> autofit: Cast FT_Long glyph_count to compare with FT_UInt GID. * src/autofit/afglobal.c (af_face_globals_is_digit, af_face_globals_compute_script_coverage): Cast FT_Long globals->glyph_count to FT_ULong, to compare with FT_UInt gindex. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> smooth: Exclude 16-bit system in invalid pitch/height check. * src/smooth/ftsmooth.c (ft_smooth_render_generic): pitch and height are typed as FT_UInt but checked to fit 16-bit range, to avoid the overflows. On 16-bit system, this checking inserts a conditional that never occurs. 2009-07-03 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> cff: Type large constants > 0x7FFF as long for 16-bit systems. * src/cff/cffload.c (cff_charset_load): Type large constants > 0x7FFF as long, because normal constants are typed signed integer that is less than 0x8000 on 16-bit systems. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> base: Remove an unused variable. * src/base/ftglyph.c (FT_Glyph_To_Bitmap): Remove an unused variable `library'. glyph->library is used. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> cache: Check higher bits in flags for non ILP32 systems. 4 public functions ought to take FT_ULong flags, but take FT_UInt flags. To keep binary compatibility, we drop higher bits on non ILP32 platforms, ILP64 systems: No drop occurs. LP64 systems: Higher bits are not used. 16-bit systems: Drop can occur. See https://lists.gnu.org/archive/html/freetype-devel/2008-12/msg00065.html These functions will be refined to take FT_ULong flags in next bump with incompatible API change. * src/cache/ftcbasic.c (FTC_ImageCache_Lookup): Check `flags' in `type', the 2nd argument. (FTC_SBitCache_Lookup): Ditto. (FTC_ImageCache_LookupScaler): Check `load_flags', the 3rd argument. (FTC_SBitCache_LookupScaler): Ditto. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> sfnt: Ignore invalid GIDs in glyph name lookup. * include/freetype/internal/fttrace.h: New trace module for sfdriver.c is added. * src/sfnt/sfdriver.c (sfnt_get_name_index): Restrict glyph name lookup to FT_UInt GID. Genuine TrueType can hold 16-bit glyphs. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> pcf: Fix a comparison between FT_Long and FT_ULong. * src/pcf/pcfread.c (pcf_get_bitmaps): Return an error if PCF_Face->nmetrics is negative. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> gxvalid: Guarantee `nFeatureFlags' size up to 32-bit. * src/gxvalid/gxvmort.c (gxv_mort_featurearray_validate): Extend the 3rd argument `nFeatureFlags' to FT_ULong. * src/gxvalid/gxvmort.h: Ditto. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> sfnt: Insert explicit cast for LP64 system. * src/sfnt/ttkern.c (tt_face_load_kern): Insert cast from unsigned long to FT_UInt32. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> gxvalid: Guarantee `just' table size upto 32-bit. * src/gxvalid/gxvjust.c (gxv_just_validate): The type of `offset' is changed from FT_UInt to FT_Offset, for 16-bit platforms. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> gxvalid: Guarantee `trak' table size upto 32-bit. * src/gxvalid/gxvtrak.c (gxv_trak_validate): The type of `offset' is changed from FT_UInt to FT_Offset, for 16-bit platforms. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> type1: Fix a data type mismatching with its source. * include/freetype/internal/t1types.h: The type of T1_Face->buildchar is matched with T1_Decoder->top. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> pfr: Fix a data type mismatching with its source. * src/pfr/pfrtypes.h: The type of PFR_KernItem->offset is extended from FT_UInt32 to FT_Offset, because it is calculated with the pointer difference, in pfr_extra_item_load_kerning_pairs(). 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> pfr: Fix a data type mismatching with its source. * src/pfr/pfrtypes.h: The type of PFR_PhyFont->chars_offset is extended from FT_UInt32 to FT_Offset, because it is calculated with the pointer difference in pfr_phy_font_load(). 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> pfr: Fix a data type mismatching with its source. * src/pfr/pfrtypes.h: The type of PFR_PhyFont->bct_offset is extended from FT_UInt32 to FT_Long, because it is loaded by FT_STREAM_POS() in pfr_phy_font_load(). 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> smooth: Improve the format in debug message. * src/smooth/ftgrays.c (gray_dump_cells): Improve the format specifications to dump variables. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> sfnt: Fix a data type mismatching with its source. * src/sfnt/sfobjs.c (sfnt_load_face): The type of local `flags' is matched with FT_Face->face_flags. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> psaux: Fix a data type mismatching with its source. * include/freetype/internal/psaux.h: The type of T1_DecoderRec.buildchar is matched with T1_DecoderRec.top. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> truetype: Extend TrueType GX packed deltas to FT_Offset. * src/truetype/ttgxvar.c (ft_var_readpackeddeltas): The type of 2nd argument `delta_cnt' is changed from FT_Int to FT_Offset, because its source can be cvt table size calculated from stream position. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> truetype: Extend mmvar_len to hold size_t values. * src/truetype/ttgxvar.h: The type of GX_BlendRec.mmvar_len is changed from FT_Int to FT_Offset, because TT_Get_MM_Var() calculates it by sizeof() results. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> truetype: Check invalid function number in IDEF instruction. * src/truetype/ttinterp.c (Ins_IDEF): Check if the operand fits to 8-bit opcode limitation. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> truetype: Check invalid function number in FDEF instruction. * src/truetype/ttinterp.c (Ins_FDEF): Check if the operand fits 16-bit function number. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> truetype: Truncate the deltas of composite glyph at 16-bit values. * src/truetype/ttgload.c (load_truetype_glyph): Insert cast from FT_Long (deltas[i].{x,y}) to FT_Int16 in the summation of deltas[] for composite glyphs. Because deltas[i] is typed as FT_Pos, its component x, y are typed as FT_Long, but their sources are always FT_Int16 when they are loaded by ft_var_readpackeddeltas(). However, the limitation about the summed deltas is unclear. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> truetype: Truncate the instructions upto 16-bit per a glyph. * src/truetype/ttgload.c (TT_Hint_Glyph): Truncate the instructions upto 16-bit length per a glyph. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> truetype: Cast the numerical operands to 32-bit for LP64 systems. * src/truetype/ttinterp.c (Ins_SPHIX, INS_MIAP, Ins_MIRP): Insert cast from long (args[], the operands passed to TrueType operator) to FT_Int32 (the argument of TT_MulFix14()). 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> truetype: Cast the project vector to 32-bit for LP64 system. * src/truetype/ttinterp.c (Project, DualProject): Insert casts from FT_Pos (the arguments `dx', `dy') to FT_UInt32 (the argument to TT_DotFix14()). 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> truetype: Cast the scaling params to 32-bit for LP64 system. * src/truetype/ttgload.c (TT_Process_Composite_Component): Insert casts from long (return value of FT_MulFix()) to FT_Int32 (the argument to FT_SqrtFixed()). 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> sfnt: Cast a character code to FT_UInt32 for LP64 system. * src/sfnt/ttcmap.c (tt_cmap14_char_map_nondef_binary, tt_cmap14_variants, tt_cmap14_char_variants, tt_cmap14_def_char_count, tt_cmap14_get_def_chars, tt_cmap14_get_nondef_chars, tt_cmap14_variant_chars) Insert casts when FT_UInt32 variable is loaded by TT_NEXT_{UINT24|ULONG}. Because most of them are compared with FT_UInt32 values in public API, replacing FT_UFast is not recommended. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> sfnt: Cast a character code to FT_UInt32 for LP64 system. * src/sfnt/ttcmap.c (tt_cmap4_init, tt_cmap4_next): Insert the casts from unsigned long constant to FT_UInt32. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> sfnt: Extend TT_BDF->strings_size to FT_ULong for huge BDF. * include/freetype/internal/tttypes.h: The type of TT_BDF->string_size is extended from FT_UInt32 to FT_ULong, because BDF specification does not restrict the length of string. * src/sfnt/ttbdf.c: The scratch variable `strings' to load TT_BDF->string_size is matched with TT_BDF->string_size. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> psaux: Handle the string length by FT_Offset variables. * src/psaux/afmparse.c (afm_parser_next_key, afm_tokenize, afm_parse_track_kern, afm_parse_kern_pairs, afm_parse_kern_data, afm_parser_skip_section, afm_parser_parse): The length of key is handled by FT_Offset, instead of FT_UInt. Although the length of PostScript strings or name object is 16-bit, AFM_STREAM_KEY_LEN() calculates the length from the pointer difference. * src/psaux/afmparse.h (afm_parser_next_key): Ditto. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> pcf: Fix some data types mismatching with their sources. * src/pcf/pcfread.c (pcf_get_bitmaps): The types of `nbitmaps', `i', `sizebitmaps' are matched with the type of area FT_Bitmap.pitch * FT_Bitmap.rows. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> pcf: Handle the string length by size_t variables. * src/pcf/pcfread.c (pcf_interpret_style): The types of nn, len, lengths[4] are changed to size_t, because they are loaded by (or compared with) ft_strlen(). * src/pcf/pcfutil.c (BitOrderInvert, TwoByteSwap, FourByteSwap): The type of the 2nd argument `nbytes' is changed to size_t, for similarity with ANSI C string functions. * src/pcf/pcfdrivr.c (PCF_Glyph_Load): The type of `bytes' is changed to FT_Offset, because it is passed to FT_ALLOC(), via ft_glyphslot_alloc_bitmap(). At least, using unsigned type is better. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> pcf: Fix some data types mismatching with their sources. * src/pcf/pcfread.c (pcf_seek_to_table_type, pcf_has_table_type): The type of 3rd argument `ntables' is matched with PCF_Toc->count. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> otvalid: Truncate the glyph index to 16-bit. * src/otvalid/otvalid.c (otv_validate): Checks face->num_glyphs does not exceed 16-bit limit, pass FT_UInt num_glyphs to backend functions otv_{GPOS|GSUB|GDEF|JSTF|MATH}_validate(). 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> cache: Insert explicit casts for LP64 systems. * src/cache/ftcbasic.c (FTC_ImageCache_Lookup, FTC_SBitCache_Lookup): The type of FTC_ImageType->width is FT_Int, so the cast to unsigned larger type FT_ULong is introduced for the comparisons with 0x10000L for LP64 platform. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> cache: Fix some data types mismatching with their sources. * src/cache/ftccache.h: The type of return value by FTC_Node_WeightFunc function is changed to FT_Offset. The type of FTC_CacheClass->cache_size is changed to FT_Offset, too. * src/cache/ftccback.h (ft_inode_weight, ftc_snode_weight): Ditto. * src/cache/ftccmap.c (ftc_cmap_node_weight): Ditto. * src/cache/ftcimage.c (ftc_inode_weight, FTC_INode_Weight): Ditto. * src/cache/ftcsbits.c (ftc_snode_weight, FTC_SNode_Weight): Ditto. * src/cache/ftcmru.h: The type of FTC_MruListClass->node_size is changed to FT_Offset, because it is passed to FT_ALLOC() to specify the size of buffer. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> XXX_cmap_encoding_char_next() return FT_UInt32 values. * include/freetype/internal/services/svpscmap.h: The size of the charcode value returned by the function typed PS_Unicodes_CharNextFunc is matched with its input charcode value. * src/cff/cffmap.c (cff_cmap_encoding_char_next, cff_cmap_unicode_char_next): Ditto. * src/pfr/pfrmap.c (pfr_cmap_encoding_char_next): Ditto. * src/psaux/t1cmap.c (t1_cmap_std_char_next, t1_cmap_custom_char_next, t1_cmap_unicode_char_next): Ditto. * src/psnames/psmodule.c (ps_unicodes_char_next): Ditto. * src/winfonts/winfnt.c (fnt_cmap_char_next): Ditto. * src/sfnt/ttcmap.c (tt_cmap0_char_next, tt_cmap2_char_next, tt_cmap4_char_next, tt_cmap6_char_next, tt_cmap10_char_next, tt_cmap12_char_next, tt_cmap13_char_next): Ditto. (tt_cmap14_char_variants): Handle base unicode codepoint by FT_UInt32 variable to avoid overflow on 16-bit platforms. (tt_cmap14_ensure): The type of `num_results' is extend to FT_UInt32, to cover unsigned 32-bit `numVarSelectorRecords' in cmap14 table header. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> truetype: Extend TT_Face->num_locations for broken TTFs. * include/freetype/internal/tttypes.h: TT_Face->num_locations are extended from FT_UInt to FT_ULong, to stand with broken huge loca table. Some people insists there are broken TTF including the glyphs over 16-bit limitation, in PRC market. * src/truetype/ttpload.c (tt_face_load_loca): Remove unrequired 16-bit truncation for FT_UInt TT_Face->num_locations. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> smooth: Fix some data types mismatching with their sources. * src/smooth/ftgrays.c: The type of `TCoord' is matched to `TPos', because they are mixed in gray_set_cell(). The type of TCell->x is extended to `TPos', because gray_find_cell() sets it by TWorker.ex. The type of TCell->cover is extended to `TCoord', because gray_render_scanline() adds TCoord value to it. The type of TWork.cover is matched with TCell->cover. The types of TWork.{max_cells,num_cells} are changed to FT_PtrDist, because they are calculated from the memory addresses. The type of TWork.ycount is changed to TPos, because it is calculated from TPos variables. (gray_find_cell): The type of `x' is matched with its initial value ras.ex. (gray_render_scanline): The types of `mod', `lift' and `rem' are changed to TCoord, because their values are set with explicit casts to TCoord. When ras.area is updated by the differential values including `delta', they are explicitly cast to TArea, because the type of `delta' is not TArea but TCoord. (gray_render_line): The type of `mod' is extended from int to TCoord, because (TCoord)dy is added to mod. (gray_hline): The argument `acount' is extended to TCoord, to match with the parameters in the callers. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> cff: Fix some data types mismatching with their sources. * src/cff/cffobjs.c (cff_face_init): The type of `scaling' is matched with the scaling parameter in FT_Matrix_Multiply_Scaled() and FT_Vector_Transform_Scaled(). * src/cff/cffparse.c (cff_parse_real): The type of `power_ten', `scaling', `exponent_add', `integer_length', `fraction_length', `new_fraction_length' and `shift' are matched with the type of `exponent' to avoid unexpected truncation. (cff_parse_fixed_scaled): The type of `scaling' is matched with the `scaling' argument to cff_parse_real(). (cff_parse_fixed_dynamic): Ditto. (cff_parse_font_matrix): The type of `scaling' is matched with the `scaling' argument to cff_parse_dynamic(). 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> autofit: Fix some data types mismatching with their sources. * src/autofit/afglobal.c: Correct the type of AF_FaceGlobalsRec.glyph_count to match with FT_Face->num_glyphs. (af_face_globals_compute_script_coverage): Insert explicit cast to compare FT_Long AF_FaceGlobalsRec.glyph_count versus FT_UInt gindex. The type of `nn' is changed to scan glyph index upto AF_FaceGlobalsRec.glyph_count. (af_face_globals_get_metrics): The type of `script_max' is changed to cover size_t value. Insert explicit cast to compare FT_Long AF_FaceGlobalsRec.glyph_count versus FT_UInt gindex. * src/autofit/afhints.c (af_axis_hints_new_segment): Insert explicit cast to calculate `big_max' from integer and size_t values. (af_axis_hints_new_edge): Ditto. * src/autofit/aflatin.c (af_latin_metrics_init_blues): The type of `best_y' is matched to FT_Vector.y. (af_latin_compute_stem_width): The type of `delta' is matched to `dist' and `org_dist'. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> autofit: Count the size of the memory object by ptrdiff_t. * src/autofit/afcjk.c (af_cjk_hint_edges): The number of edges `n_edges' should be counted by FT_PtrDist variable instead of FT_Int. * src/autofit/aflatin.c (af_latin_hint_edges): Ditto. * src/autofit/aftypes.h: In AF_ScriptClassRec, the size of metric `script_metrics_size' should be counted by FT_Offset variable instead of FT_UInt. * src/autofit/afhints.c (af_glyph_hints_align_strong_points): The cursors for the edges `min', `max', `mid' in the memory buffer should be typed FT_PtrDist. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> autofit: Fix for unused variable `first'. * src/autofit/afhints.c (af_glyph_hints_reload): Insert FT_UNUSED() to hide the unused variable warning. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Improve bitmap size or pixel variables for 16-bit systems. * include/freetype/config/ftstdlib.h: Introduce FT_INT_MIN, to use in signed integer overflow in 16-bit and 64-bit platforms. * include/freetype/internal/fttrace.h: Add a tracer to ftsynth.c. * src/base/ftbitmap.c (FT_Bitmap_Embolden): Check invalid strength causing integer overflow on 16-bit platform. * src/base/ftcalc.c (ft_corner_orientation): Change the internal calculation from FT_Int to FT_Long, to avoid an overflow on 16-bit platforms. The caller of this function should use only the sign of result, so the cast to FT_Int is acceptable. * src/base/ftsynth.c: Introduce a tracer for synth module. (FT_GlyphSlot_Embolden): Check invalid strength causing integer overflow on 16-bit platform. * src/bdf/bdfdrivr.c (BDF_Face_Init): The glyph index in FT2 API is typed as FT_UInt, although BDF driver can handle unsigned long glyph index internally. To avoid integer overflow on 16-bit platform, too large glyph index should be excluded. (BDF_Glyph_Load): The glyph pitch in FT2 is typed as FT_UInt, although BDF driver can handle unsigned long glyph pitch internally. To avoid integer overflow on 16-bit platform, too large glyph pitch should not be returned. * src/pfr/pfrsbit.c (pfr_slot_load_bitmap): The glyph pitch in FT2 is typed as FT_UInt, although PFR font format can include huge bitmap glyph with 24-bit pitch (however, a glyph spends 16.7 pixel, it's not realistic). To avoid integer overflow on 16-bit platform, huge bitmap glyph should be excluded. * src/smooth/ftgrays.c (gray_hline): As FT_Span.x is truncated to fit its type (16-bit short), FT_Span.y should be truncated to fit its type (FT_Int). * src/cff/cffdrivr.c (cff_get_ros): CFF specification defines the supplement in ROS as a real number. Truncate it to fit public FT2 API. * src/cff/cffparse.c (cff_parse_cid_ros): Warn the supplement if it is truncated or rounded in cff_get_ros(). * src/cff/cfftypes.h: Change the type of internal variable `supplement' from FT_Long to FT_ULong to fit the signedness to the type in public API. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> psaux: Prevent invalid arguments to afm_parser_read_vals(). * src/psaux/afmparse.c (afm_parser_read_vals): Change the type of `n' to prevent negative number how many arguments should be parsed. * src/psaux/afmparse.h (afm_parser_read_vals): Ditto. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> base: Prevent some overflows on LP64 systems. * src/base/ftadvanc.c (FT_Get_Advances): Cast the unsigned long constant FT_LOAD_ADVANCE_ONLY to FT_UInt32 for LP64 platforms. * src/base/ftcalc.c (FT_Sqrt32): All internal variables are changed to FT_UInt32 from FT_ULong. (FT_MulDiv): Insert casts to FT_Int32 for LP64 platforms. This function is designed for 32-bit integer, although their arguments and return value are FT_Long. * src/base/ftobjs.c (FT_Get_Char_Index): Check `charcode' is within unsigned 32-bit integer for LP64 platforms. (FT_Face_GetCharVariantIndex): Check `charcode' and `variantSelector' are within 32-bit integer for LP64 platforms. (FT_Face_GetCharsOfVariant): Check `variantSelector' is within unsigned 32-bit integer for LP64 platforms. * src/base/fttrigon.c (ft_trig_downscale): The FT_Fixed variable `val' and unsigned long constant FT_TRIG_SCALE are cast to FT_UInt32, when calculates FT_UInt32. (FT_Vector_Rotate): The long constant 1L is cast to FT_Int32 to calculate FT_Int32 `half'. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> cff: Cast the long variables to 32-bit for LP64 systems. * src/cff/cffdrivr.c (cff_get_advances): Insert explicit cast to modify a 32-bit flag by unsigned long constant. * src/cff/cffobjs.c (cff_face_init): Ditto. * src/cff/cffgload.c (cff_decoder_parse_charstrings): Replace the casts to FT_Long by the casts to FT_Int32 for LP64 platforms. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> pcf: Improve PCF_PropertyRec.value names on LP64 platforms. * src/pcf/pcf.h: In PCF_PropertyRec.value, the member `integer' is replaced by `l', `cardinal' is replaced by `ul', to fix the difference between the name and the types on LP64 platforms. * src/pcf/pcfdrivr.c (pcf_get_bdf_property): Reflect PCF_PropertyRec.value change, with appropriate casts to FT_Int32/FT_UInt32. Their destinations BDF_PropertyRec.{integer|cardinal} are public and explicitly defined as FT_Int32/FT_UInt32. * src/pcf/pcfread.c (pcf_get_properties, pcf_load_font): Reflect PCF_PropertyRec.value change. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> pcf: Fix some data types mismatching with their sources. * src/pcf/pcfdrivr.c (pcf_cmap_char_index): The type of `code' is matched to PCF_Encoding->enc. (pcf_cmap_char_next): The type of `charcode' is matched to PCF_Encoding->enc. When *acharcode is set by charcode, an overflow is checked and cast to unsigned 32-bit integer. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> bdf: Improve bdf_property_t.value names for LP64 platforms. * src/bdf/bdf.h: In bdf_property_t.value, the member `int32' is replaced by `l', `card32' is replaced by `ul', to fix the difference between the name and the types on LP64 platforms. * src/bdf/bdfdrivr.c (BDF_Face_Init): Reflect bdf_property_t.value change. (bdf_get_bdf_property): Reflect bdf_property_t.value change, with appropriate casts to FT_Int32/FT_UInt32. Their destinations BDF_PropertyRec.{integer|cardinal} are public and explicitly defined as FT_Int32/FT_UInt32. * src/bdf/bdflib.c (_bdf_add_property): Reflect bdf_property_t.value change. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> bdf: Fix some data types mismatching with their sources. * src/bdf/bdfdrivr.c (bdf_cmap_char_index): The type of `code' is matched with BDF_encoding_el->enc. (bdf_cmap_char_next): The type of `charcode' is matched with BDF_encoding_el->enc. When *acharcode is set by charcode, an overflow is checked and cast to unsigned 32-bit integer. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> autofit: Improve Unicode range definitions. * src/autofit/aftypes.h (AF_UNIRANGE_REC): New macro to declare a range by two unsigned 32-bit integer, to avoid 64-bit range definition on LP64 platforms. * src/autofit/aflatin.c (af_latin_uniranges): Ditto. * src/autofit/aflatin2.c (af_latin2_uniranges): Ditto. * src/autofit/afindic.c (af_indic_uniranges): Ditto. * src/autofit/afcjk.c (af_cjk_uniranges): Declare the ranges by AF_UNIRANGE_REC. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> smooth: Fix a data type mismatching with its source. * src/smooth/ftgrays.c (gray_sweep): The type of `area' is matched with the 3rd argument `area' of gray_hline(). 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> smooth: Fix a data type mismatching with its source. * src/smooth/ftgrays.c (gray_render_line): The type of `area' is matched with TWorker.area. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> cache: Disable the legacy compatibility if 16-bit system. * src/cache/ftcbasic.c (FTC_ImageCache_Lookup): Exclude the legacy behaviour from 16-bit platform, because the current hack cannot detect the caller uses this function via legacy convention. (FTC_SBitCache_Lookup): Ditto. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> cache: Check 32-bit glyph index on 16-bit systems. * src/cache/ftcbasic.c (ftc_basic_family_get_count): Check overflow caused by the face including large number of glyphs > 64k. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> cache: Fix some data types mismatching with their sources. * src/cache/ftccache.c (ftc_cache_resize): The types of `p', `mask', `count' are matched with FTC_Cache->{p,mask}. (FTC_Cache_Clear): The type of `old_index' is matched to FTC_Cache->{p,mask}. * src/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP): The type of `_idx' is matched with FTC_Cache->{p,mask}. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> cache: Fix some data types mismatching with their sources. * src/cache/ftcsbits.c (ftc_snode_load): The types of `xadvance' and `yadvance' are matched with FT_GlyphSlot->advance.{x|y}. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> cache: Cast NULL to a required function type explicitly. * src/cache/ftcmanag.c (FTC_Manager_RemoveFaceID): Insert explicit cast from NULL to function type. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> fttypes.h: Cast FT_MAKE_TAG output to FT_Tag explicitly. * include/freetype/fttypes.h (FT_MAKE_TAG): Cast the result to FT_Tag. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> psnames: Handle Unicode codepoints by FT_UInt32 variables. * src/psnames/psmodule.c (BASE_GLYPH): Cast the result to unsigned 32-bit integer for LP64 platform. (ps_unicode_value): Return the value by unsigned 32-bit integer instead of unsigned long. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> psaux: Use size_t variable to pass the buffer size. * src/psaux/psaux.h (to_bytes): The type of `max_bytes' (the argument to pass the buffer size) is changed to size_t, to match with ANSI C string functions. * src/psaux/psconv.h (PS_Conv_StringDecode, PS_Conv_ASCIIHexDecode, PS_Conv_EexecDecode): Ditto. * src/psaux/psconv.c (PS_Conv_StringDecode, PS_Conv_ASCIIHexDecode, PS_Conv_EexecDecode): Ditto. * src/psaux/psobjs.h (ps_parser_to_bytes): Ditto. * src/psaux/psobjs.c (ps_parser_to_bytes): Ditto. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> type1: Use size_t variable to pass the string length. * psaux.h: The type of `len' (the argument to pass the buffer size to the function in AFM_ParserRec) is changed to size_t, to match with ANSI C string functions. * t1afm.c (t1_get_index): Ditto. * test_afm.c (dummy_get_index): Ditto. * afmparse.c (afm_parser_read_vals): To call AFM_ParserRec.get_index, the length of token `len' is cast to size_t. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> cid: Fix some data types mismatching with their sources. * src/cid/cidparse.c (cid_parser_new): The types of `read_len' and `stream_len' are matched to FT_Stream->size. Unrequired cast is removed. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> cff: Fix for unused variable `rest'. * src/cff/cffparse.c (cff_parse_real): Insert FT_UNUSED() to hide the unused variable warning. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> cff: Fix some data types mismatching with their sources. * src/cff/cffgload.c (cff_slot_load): The types of `top_upm' and `sub_upm' are matched with CFF_FontRecDict->units_per_em. * src/cff/cffobjs.c (cff_size_select): Ditto. (cff_size_request): Ditto. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> bdf: Fix some data types mismatching with their sources. * bdflib.c (_bdf_list_ensure): The type of `num_items' is matched with _bdf_list_t.used. Also the types of `oldsize', `newsize', `bigsize' are matched too. (_bdf_readstream): `cursor' is used as an offset to the pointer, it should be typed as FT_Offset. Also the types of `bytes', `start', `end', `avail' are matched. * bdfdrivr.c: The type of BDF_CMap->num_encodings is matched with FT_CMap->clazz->size. (bdf_cmap_char_index): The types of `min', `max', `mid' are matched with BDF_CMap->num_encodings. The type of `result' is matched with encoding->glyph. (bdf_cmap_char_next): Ditto, the type of `code' is matched with BDF_encoding_el.enc. (bdf_interpret_style): The type of `lengths' is changed to size_t, to take the value by ft_strlen(). Also the types of `len', `nn', `mm' are matched. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> sfnt: Count the size of the memory object by ptrdiff_t. * src/sfnt/ttbdf.c (tt_face_find_bdf_prop): The type of `property_len' is changed from FT_UInt to FT_Offset, to match with size_t, which is appropriate type for the object in the memory buffer. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> lzw: Count the size of the memory object by ptrdiff_t. * src/lzw/ftzopen.h: The types of FT_LzwState->{buf_total, stack_size} are changed from FT_UInt to FT_Offset, to match with size_t, which is appropriate type for the object in the memory buffer. * src/lzw/ftzopen.c (ft_lzwstate_stack_grow): The types of `old_size' and `new_size' are changed from FT_UInt to FT_Offset, to match with size_t, which is appropriate type for the object in the memory buffer. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> otvalid: Count the table size on memory by ptrdiff_t. * src/otvalid/otvgpos.c (otv_ValueRecord_validate): Change the type of table size from FT_UInt to FT_PtrDist because it is calculated by the memory addresses. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> otvalid: Prevent an overflow by GPOS/GSUB 32b-bit offset. * src/otvalid/otvgpos.c (otv_ExtensionPos_validate): Extend ExtensionOffset from FT_UInt to FT_ULong, to cover 32-bit offset on 16-bit platform. * src/otvalid/otvgsub.c (otv_ExtensionSubst_validate): Ditto. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> ftobjs.c: Prevent an overflow in glyph index handling. * src/base/ftobjs.c (FT_Face_GetCharsOfVariant): Improve the cast in comparison to avoid the truncation. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Improve the variable types in raccess_make_file_name(). * src/base/ftrfork.c (raccess_make_file_name): Change the type of cursor variable `tmp' to const char*, to prevent the unexpected modification of original pathname. (raccess_make_file_name): Change the type of new_length to size_t. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> ftpatent.c: Fix for unused variable `error'. * src/base/ftpatent.c (_tt_check_patents_in_range): Fix warning for unused variable `error'. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> type1: Check invalid string longer than PostScript limit. * src/type1/t1afm.c (t1_get_index): Check invalid string which exceeds the limit of PostScript string/name objects. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> gzip: Use FT2 zcalloc() & zfree() in ftgzip.c by default. * src/gzip/ftgzip.c (zcalloc, zcfree): Disable all zcalloc() & zfree() by zlib in zutil.c, those in ftgzip.c by FT2 are enabled by default. To use zlib zcalloc() & zfree(), define USE_ZLIB_ZCALLOC. See discussion: https://lists.gnu.org/archive/html/freetype-devel/2009-02/msg00000.html 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> gzip: Distinguish PureC from TurboC on MSDOS. * src/gzip/zutil.c (zcalloc, zcfree): Enable only for MSDOS platform. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> gxvalid: Insert PureC pragma to allow unevaluated variables. * builds/atari/ATARI.H: Insert PureC pragma not to warn against set-but-unevaluated variable in gxvalid module. 2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> gxvalid: Pass the union by the pointer instead of the value. * src/gxvalid/gxvcommn.h: - Declare new type `GXV_LookupValueCPtr'. - Update the type of the 2nd argument to pass GXV_LookupValueDesc data to the function prototyped as GXV_Lookup_Value_Validate_Func, from GXV_LookupValueDesc to GXV_LookupValueCPtr. - Likewise for the function prototyped as GXV_Lookup_Fmt4_Transit_Func. - Declare new type `GXV_StateTable_GlyphOffsetCPtr'. - Update the type of the 3rd argument to pass GXV_StateTable_GlyphOffsetDesc data to the function prototyped as GXV_StateTable_Entry_Validate_Func, from GXV_StateTable_GlyphOffsetDesc to GXV_StateTable_GlyphOffsetCPtr. - Declare new type `GXV_XStateTable_GlyphOffsetCPtr'. - Update the type of the 3rd argument to pass GXV_XStateTable_GlyphOffsetDesc data to the function prototyped as GXV_XStateTable_Entry_Validate_Func, from GXV_XStateTable_GlyphOffsetDesc to GXV_XStateTable_GlyphOffsetCPtr. * src/gxvalid/gxvcommn.c (gxv_LookupTable_fmt0_validate, gxv_XClassTable_lookupval_validate, gxv_XClassTable_lookupfmt4_transit): Update from GXV_LookupValueDesc to GXV_LookupValueCPtr. * src/gxvalid/gxvbsln.c (gxv_bsln_LookupValue_validate, gxv_bsln_LookupFmt4_transit): Ditto. * src/gxvalid/gxvjust.c (gxv_just_pcTable_LookupValue_entry_validate, gxv_just_classTable_entry_validate, gxv_just_wdcTable_LookupValue_validate): Ditto. * src/gxvalid/gxvkern.c (gxv_kern_subtable_fmt1_entry_validate): Ditto. * src/gxvalid/gxvlcar.c (gxv_lcar_LookupValue_validate, gxv_lcar_LookupFmt4_transit): Ditto. * src/gxvalid/gxvopbd.c (gxv_opbd_LookupValue_validate, gxv_opbd_LookupFmt4_transit): Ditto. * src/gxvalid/gxvprop.c (gxv_prop_LookupValue_validate, gxv_prop_LookupFmt4_transit): Ditto. * src/gxvalid/gxvmort4.c (gxv_mort_subtable_type4_lookupval_validate): Ditto. * src/gxvalid/gxvmort0.c (gxv_mort_subtable_type0_entry_validate): Update from GXV_StateTable_GlyphOffsetDesc to GXV_StateTable_GlyphOffsetCPtr. * src/gxvalid/gxvmort1.c (gxv_mort_subtable_type1_entry_validate): Ditto. * src/gxvalid/gxvmort2.c (gxv_mort_subtable_type2_entry_validate): Ditto. * src/gxvalid/gxvmort5.c (gxv_mort_subtable_type5_entry_validate): Ditto. * src/gxvalid/gxvmorx2.c (gxv_morx_subtable_type2_entry_validate): Ditto. * src/gxvalid/gxvmorx5.c (gxv_morx_subtable_type5_entry_validate): Ditto. * src/gxvalid/gxvmorx1.c (gxv_morx_subtable_type1_entry_validate): Ditto. (gxv_morx_subtable_type1_LookupValue_validate, gxv_morx_subtable_type1_LookupFmt4_transit): Update from GXV_LookupValueDesc to GXV_LookupValueCPtr. * src/gxvalid/gxvmorx0.c (gxv_morx_subtable_type0_entry_validate): Update from GXV_XStateTable_GlyphOffsetDesc to GXV_XStateTable_GlyphOffsetCPtr. 2009-07-29 Fabrice Bellet <fabrice@bellet.info> Fix Redhat bugzilla #513582 and Savannah bug #26849. * src/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP) <FTC_INLINE>: Fix aliasing bug. 2009-07-19 Werner Lemberg <wl@gnu.org> Document recent library changes. * docs/CHANGES: Do it. 2009-07-17 Werner Lemberg <wl@gnu.org> Fix Savannah bug #23786. * src/truetype/ttobjs.c (tt_size_init_bytecode): Don't reset x_ppem and y_ppem. Otherwise the `*_CVT_Stretched' functions in ttinterp.c get never called. An anonymous guy suggested this change on Savannah, and it seems to be the right solution. 2009-07-15 Werner Lemberg <wl@gnu.org> * docs/release: Updated. 2009-07-15 Werner Lemberg <wl@gnu.org> README.CVS -> README.git * README.CVS: Renamed to... * README.git: This. Updated. 2009-07-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Borland C++ compiler patch proposed by Mirco Babin. https://lists.gnu.org/archive/html/freetype/2009-07/msg00016.html. * builds/exports.mk: Delete unused flags, CCexe_{CFLAGS,LDFLAGS}. Fix APINAMES_C and APINAMES_EXE pathnames to reflect the platform specific pathname syntax. * builds/compiler/bcc.mk: Remove unused flag, CCexe_LDFLAGS. Define TE = `-e' separately (bcc32 cannot specify the pathname of binary executable by T = `-o'). Extend the large page size in linking freetype.lib. Add extra CLEAN target to delete bcc specific temporary files. * builds/compiler/bcc-dev.mk: Ditto. 2009-07-14 Werner Lemberg <wl@gnu.org> Fix Savannah bug #27026. * builds/win32/vc2005/freetype.sln: Use correct version number. 2009-07-12 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Add a script to check the undefined and unused trace macros. * src/tools/chktrcmp.py: A script to check trace_XXXX macros that are used in C source but undefined in fttrace.h, or defined in fttrace.h but unused in C sources. See https://lists.gnu.org/archive/html/freetype-devel/2009-07/msg00013.html. * docs/DEBUG: Mention on chktrcmp.py. * docs/release: Ditto. 2009-07-09 Werner Lemberg <wl@gnu.org> [ftraster] Make it compile again with -D_STANDALONE_. * src/raster/ftraster.c [_STANDALONE_]: Define FT_CONFIG_STANDARD_LIBRARY_H. Include `string.h'. Don't include `rastpic.h'. Define FT_DEFINE_RASTER_FUNCS. 2009-07-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> smooth: Check glyph size by width/height, instead of pitch/height. Suggested by der Mouse <mouse@Rodents-Montreal.ORG>. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Improve the check for too large glyph. Replace the pair of `pitch' and `height' by the pair of `width' and `height'. `pitch' cannot be greater than `height'. The required is checking the product `pitch' * `height' <= FT_ULONG_MAX, but we use cheap checks for the realistic case only. 2009-07-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Register 2 missing trace components, t1afm and ttbdf. * include/freetype/internal/fttrace.h: Add FT_TRACE_DEF( t1afm ) and FT_TRACE_DEF( ttbdf ). See https://lists.gnu.org/archive/html/freetype-devel/2009-07/msg00013.html 2009-07-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Register a trace component for ftgloadr.c. * include/freetype/internal/fttrace.h: Add FT_TRACE_DEF( gloader ). The macro `trace_gloader' was already used in the initial version on 2002-02-24. 2009-07-08 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Prevent the overflows by a glyph with too many points or contours. The bug is reported by Boris Letocha <b.letocha@gmc.net>. See https://lists.gnu.org/archive/html/freetype-devel/2009-06/msg00031.html https://lists.gnu.org/archive/html/freetype-devel/2009-07/msg00002.html * include/freetype/ftimage.h (FT_OUTLINE_CONTOURS_MAX, FT_OUTLINE_POINTS_MAX): New macros to declare the maximum values of FT_Outline.{n_contours,n_points}. * src/base/ftgloadr.c (FT_GlyphLoader_CheckPoints): Check the total numbers of points and contours cause no overflows in FT_Outline.{n_contours,n_points}. * include/freetype/internal/ftgloadr.h (FT_GLYPHLOADER_CHECK_P, FT_GLYPHLOADER_CHECK_C): Compare the numbers of points and contours as unsigned long number, instead of signed int, to prevent the overflows on 16-bit systems. 2009-07-05 Bram Tassyns <bramt@enfocus.be> Improve compatibility to Acroread. This fixes Savannah bug #26944. * src/cff/cffload.c (cff_charset_compute_cids): For multiple GID to single CID mappings, make the lowest value win. 2009-06-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> ftpatent: Fix a bug by wrong usage of service->table_info(). https://lists.gnu.org/archive/html/freetype-devel/2008-12/msg00039.html * include/freetype/internal/services/svsfnt.h: Extend FT_SFNT_TableInfoFunc() to take new argument to obtain the offset to the specified table. * src/sfnt/sfdriver.c (sfnt_table_info): Extend to return the table-offset to the caller function. * src/base/ftpatent.c (_tt_check_patents_in_table): Use new service->table_info(). * src/base/ftobjs.c (FT_Sfnt_Table_Info): Synchronize to new service->table_info(). 2009-06-28 Werner Lemberg <wl@gnu.org> [psaux, cff] Protect against nested `seac' calls. * include/freetype/internal/psaux.h (T1_Decoder), src/cff/cffgload.h (CFF_Decoder): Add `seac' boolean variable. * src/cff/cffgload.c (cff_operator_seac), src/psaux/t1decode.c (t1operator_seac): Use it. 2009-06-28 Werner Lemberg <wl@gnu.org> Thinko. * src/psaux/t1decode.c (t1operator_seac) [FT_CONFIG_OPTION_INCREMENTAL]: Test for existence of incremental interface. 2009-06-28 Werner Lemberg <wl@gnu.org> * devel/ftoption.h [FT_CONFIG_OPTION_INCREMENTAL]: Define. 2009-06-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Add tools to preprocess the source files for AtariST PureC. * builds/atari/deflinejoiner.awk: New file to filter C source files for broken C preprocessor of PureC compiler. * builds/atari/gen-purec-patch.sh: New file to generate a patch set for PureC, by using deflinejoiner.awk. 2009-06-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Keep existing modules.cfg in the building tree. * configure: If `configure' is executed outside of the source tree, an existing `modules.cfg' file in the build directory should be kept, not overwritten by the version in the source tree. 2009-06-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Filter --srcdir= option before invoking builds/unix/configure. * configure: If builds/unix/configure is invoked with --srcdir option, the option should take `builds/unix' directory instead of the top source directory. Thus the configure script in the top directory should modify the --srcdir= option if `builds/unix/configure' is invoked. 2009-06-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Improve configure.raw for cross-building on exe-suffixed systems. * builds/unix/configure.raw: Fix a bug in sed script to extract native suffix for binary executables, patch by Peter Breitenlohner. https://lists.gnu.org/archive/html/freetype-devel/2009-04/msg00036.html 2009-06-26 Werner Lemberg <wl@gnu.org> [truetype] Remove TT_SubGlyphRec. * src/truetype/ttobjs.h (TT_SubGlyphRec): Removed, unused. 2009-06-26 Werner Lemberg <wl@gnu.org> * */*: For warning messages, replace FT_ERROR with FT_TRACE0. FT_ERROR is now used only if a function produces a non-zero `error' value. Formatting, improving and harmonizing debug strings. 2009-06-25 Werner Lemberg <wl@gnu.org> Provide version information better. * src/base/ftinit.c (FT_Init_FreeType): Don't set version here but... * src/base/ftobjs.c (FT_New_Library): Here. 2009-06-22 Werner Lemberg <wl@gnu.org> Use 16.16 format while parsing Type 1 charstrings. This fixes Savannah bug #26867. Previously, only integers have been used which can lead to serious rounding errors. However, fractional values are only used internally; after the charstrings (of either Type 1 or 2) have been processed, the resulting coordinates get rounded to integers currently -- before applying scaling. This should be fixed; at the same time a new load flag should be introduced, to be used in combination with FT_LOAD_NO_SCALE, which indicates that font units are returned in 16.16 format. Similarly, the incremental interface should be extended to allow fractional values for metrics. * include/freetype/internal/psaux.h (T1_BuilderRec): Remove `shift' field. * include/freetype/internal/pshints.h (T1_Hints_SetStemFunc, T1_Hints_SetStem3Func): Use FT_Fixed for coordinates. * src/psaux/psobjs.c: Include FT_INTERNAL_CALC_H. (t1_build_add_point): Always convert fixed to integer. * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Use 16.16 format everywhere (except for large integers followed by a `div'). [CAN_HANDLE_NON_INTEGRAL_T1_OPERANDS]: Remove #ifdef and activate code unconditionally. Add support for random numbers and update remaining code accordingly; this should work now. (t1operator_seac): Updated. * src/psaux/pshrec.c: Include FT_INTERNAL_CALC_H. (ps_hints_t1stem3, t1_hints_stem): Updated. * src/cid/cidgload.c: Include FT_INTERNAL_CALC_H. (cid_load_glyph) [FT_CONFIG_OPTION_INCREMENTAL], (cid_face_compute_max_advance, cid_slot_load_glyph): Updated. * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String) [FT_CONFIG_OPTION_INCREMENTAL], (T1_Get_Advances, T1_Load_Glyph): Updated. * src/type1/t1load.c: Include FT_INTERNAL_CALC_H. * src/type1/t1objs.c (T1_Face_Init): Updated. 2009-06-21 Werner Lemberg <wl@gnu.org> * src/pshinter/pshrec.c: Use PSH_Err_Ok. 2009-06-21 Werner Lemberg <wl@gnu.org> Code beautification. * src/type1/t1load.c (FT_INT_TO_FIXED): Removed. Replace everywhere with INT_TO_FIXED. (FT_FIXED_TO_INT): Move to ... * include/freetype/internal/ftcalc.h (FIXED_TO_INT): Here. Update all users. 2009-06-20 Werner Lemberg <wl@gnu.org> Remove unused variables. * include/freetype/internal/psaux.h (T1_BuilderRec), src/cff/cffgload.h (CFF_Builder): Remove `last'. Update all users. 2009-06-20 Werner Lemberg <wl@gnu.org> [psaux] Check large integers while parsing charstrings. * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Large integers must be followed by a `div' operator. 2009-06-20 Werner Lemberg <wl@gnu.org> [cff] Revert last change. * src/cff/cffgload.c (cff_decoder_parse_charstrings): Do it. Next time, don't confuse Type 2 charstring opcodes with TOP DICT values... 2009-06-20 Werner Lemberg <wl@gnu.org> * src/autofit/aflatin.c (af_latin_metrics_check_digits): Fix compiler warning. 2009-06-20 Werner Lemberg <wl@gnu.org> * builds/compiler/gcc.mk (CFLAGS): Use -O3, not -O6. 2009-06-19 Werner Lemberg <wl@gnu.org> [cff] Fix handling of reserved byte 0xFF. * src/cff/cffgload.c (cff_decoder_parse_charstrings): Abort if byte 0xFF is encountered. 2009-06-19 Werner Lemberg <wl@gnu.org> Improve debug messages for Type1 charstrings. * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Emit newlines after instructions. Prettify output. 2009-06-19 Werner Lemberg <wl@gnu.org> More ftgray fixes for FT_STATIC_RASTER. Problems reported by suyu@cooee.cn. * src/smooth/ftgrays.c (gray_move_to, gray_raster_render): Use RAS_VAR. 2009-06-18 Werner Lemberg <wl@gnu.org> * docs/CHANGES: Updated. 2009-06-18 Werner Lemberg <wl@gnu.org> Fix B/W rasterization of subglyphs with different drop-out modes. Normally, the SCANMODE instruction (if present) to set the drop-out mode in a TrueType font is located in the `prep' table only and thus valid for all glyphs. However, there are fonts like `pala.ttf' which additionally contain this instruction in the hinting code of some glyphs (but not all). As a result it can happen that a composite glyph needs multiple drop-out modes for its subglyphs since the rendering state gets reset for each subglyph. FreeType collects the hinted outlines from all subglyphs, then it sends the data to the rasterizer. It also sends the drop-out mode -- after hinting has been applied -- and here is the error: It sends the drop-out mode of the last subglyph only; drop-out modes of all other subglyphs are lost. This patch fixes the problem; it adds a second, alternative mechanism to pass the drop-out mode: For each contour, the rasterizer now checks the first `tags' array element. If bit 2 is set, bits 5-7 contain the contour's drop-out mode, overriding the global drop-out mode. * include/freetype/ftimage.h (FT_CURVE_TAG_HAS_SCANMODE): New macro. * src/truetype/ttgload.c (TT_Hint_Glyph): Store drop-out mode in `tags[0]'. * src/raster/ftraster.c (Flow_Up, Overshoot_Top, Overshoot_Bottom): Use bits 3-5 instead of 0-2. (New_Profile): Set the drop-out mode in the profile's `flags' field. (Decompose_Curve): Check `tags[0]' and set `dropOutControl' if necessary. (Vertical_Sweep_Drop, Horizontal_Sweep_Drop, Horizontal_Gray_Sweep_Drop, Draw_Sweep): Use the profile's drop-out mode. 2009-06-16 Werner Lemberg <wl@gnu.org> Improve scan conversion rules 4 and 6. Two new constraints are introduced to better identify a `stub' -- a concept which is only vaguely described in the OpenType specification. The old code was too rigorous and suppressed more pixel than it should. . The intersection of the two profiles with the scanline is less than a half pixel. Code related to this was already present in the sources but has been commented out. . The endpoint of the original contour forming a profile has a distance (`overshoot') less than half a pixel to the scanline. Note that the two additional conditions fix almost all differences to the Windows rasterizer, but some problematic cases remain. * src/raster/ftraster.c (Overshoot_Top, Overshoot_Bottom): New macros for the `flags' field in the `TProfile' structure. (IS_BOTTOM_OVERSHOOT, IS_TOP_OVERSHOOT): New macros. (New_Profile, End_Profile): Pass overshoot flag as an argument and set it accordingly. Update callers. (Vertical_Sweep_Drop, Horizontal_Sweep_Drop): Implement the two new constraints. 2009-06-11 Werner Lemberg <wl@gnu.org> Increase precision for B/W rasterizer. * src/raster/ftraster.c (Set_High_Precision): Add two more bits to the precision. This corrects rendering of some small glyphs, for example, glyph `xi' in verdana.ttf at 13 ppem. Testing with ftbench on my GNU/Linux box I don't see a performance degradation. 2009-06-08 Michael Zucchi <notzed@gmail.com> Handle FT_STROKER_LINECAP_BUTT. This fixes Savannah bug #26757. * src/base/ftstroke.c (ft_stroker_cap): Implement it. 2009-06-07 Harald Fernengel <harry@kdevelop.org> Fix some potential out-of-memory crashes. * src/base/ftobjs.c (ft_glyphslot_done): Check `slot->internal'. * src/base/ftstream.c (FT_Stream_ReleaseFrame): Check `stream'. * src/truetype/ttinterp.c (TT_New_Context): Avoid double-free of `exec' in case of failure. 2009-06-07 Werner Lemberg <wl@gnu.org> Simplify math. Suggested by Alexei Podtelezhnikov <apodtele@gmail.com>. * src/raster/ftraster.c (Vertical_Sweep_Drop, Horizontal_Sweep_Drop, Horizontal_Gray_Sweep_Drop): Do it. 2009-06-04 Werner Lemberg <wl@gnu.org> Preparation for fixing scan conversion rules 4 and 6. * src/raster/ftraster.c (TFlow): Replace enumeration with... (Flow_Up): This macro. (TProfile): Replace `flow' member with `flags' bit field. Update all affected code. 2009-05-29 James Cloos <cloos@jhcloos.com> Enable autohinting for glyphs rotated by multiples of 90°. * src/base/ftobjs.c (FT_Load_Glyph): Alter check for permitted matrices to allow rotations by multiples of 90°, not only unrotated, possibly slanted matrices. 2009-05-28 Werner Lemberg <wl@gnu.org> Remove compiler warning. Reported by Krzysztof Kowalczyk <kkowalczyk@gmail.com>. * src/autofit/aflatin2.c (af_latin2_hint_edges): Move declaration of `n_edges' into `#if' block. 2009-05-28 Werner Lemberg <wl@gnu.org> Make compilation work with FT_CONFIG_OPTION_USE_ZLIB not defined. Reported by Krzysztof Kowalczyk <kkowalczyk@gmail.com>. * src/pcf/pcfdrivr.c (PCF_Face_Init) [!FT_CONFIG_OPTION_USE_ZLIB]: Make it work. Simplify #ifdef logic. 2009-05-22 Werner Lemberg <wl@gnu.org> Improve b/w rasterizer. Problem reported by Krzysztof Kotlenga <pocek@users.sf.net>. * src/raster/raster.c (Vertical_Sweep_Drop, Horizontal_Sweep_Drop, Horizontal_Gray_Sweep_Drop): For smart drop-out mode, if intersections are equally distant relative to next pixel center, select the left pixel, not the right one. 2009-05-19 Werner Lemberg <wl@gnu.org> Fix Savannah bug #26600. * src/type42/t42parse.c (t42_load_keyword): Handle T1_FIELD_LOCATION_FONT_EXTRA. 2009-04-30 Werner Lemberg <wl@gnu.org> Document recent changes to ftview. * docs/CHANGES: Do it. 2009-04-27 Werner Lemberg <wl@gnu.org> autohinter: Don't change digit widths if all widths are the same. This fixes FreeDesktop bug #21197. * src/autofit/afglobal.c (AF_DIGIT): New macro. (af_face_globals_compute_script_coverage): Mark ASCII digits in `glyph_scripts' array. (af_face_globals_get_metrics): Updated. (af_face_globals_is_digit): New function. * src/autofit/afglobal.h: Updated. (AF_ScriptMetricsRec): Add `digits_have_same_width' flag. * src/autofit/aflatin.c: Include FT_ADVANCES_H. (af_latin_metrics_check_digits): New function. (af_latin_metrics_init): Use it. * src/autofit/aflatin.h: Updated. * src/autofit/afcjk.c (af_cjk_metrics_init): Updated. * src/autofit/aflatin2.c: Similar changes as with aflatin.c. * src/autofit/afloader.c (af_loader_load_g): Test digit width. * docs/CHANGES: Document it. 2009-04-26 Werner Lemberg <wl@gnu.org> Make ftgrays compile with _STANDALONE_ and FT_STATIC_RASTER again. Problems reported by suyu@cooee.cn. * src/smooth/ftgrays.c (FT_DEFINE_OUTLINE_FUNCS, FT_DEFINE_RASTER_FUNCS) [_STANDALONE_]: Define. [!_STANDALONE_]: Include ftspic.h only here. (ras): Define/declare after definition of `TWorker'. Use `RAS_VAR_' where necessary. 2009-04-21 Karl Berry <karl@gnu.org> Fix AC_CHECK_FT2. * builds/unix/freetype2.m4: Only check PATH for freetype-config if we did not already find it from a prefix option. 2009-04-05 Oran Agra <oran@monfort.co.il> Add #error to modules and files that do not support PIC yet. When FT_CONFIG_OPTION_PIC is defined the following files will create #error: * src/bdf/bdfdrivr.h * src/cache/ftcmanag.c * src/cid/cidriver.h * src/gxvalid/gxvmod.h * src/gzip/ftgzip.c * src/lzw/ftlzw.c * src/otvalid/otvmod.h * src/pcf/pcfdrivr.h * src/pfr/pfrdrivr.h * src/psaux/psauxmod.h * src/type1/t1driver.h * src/type42/t42drivr.h * src/winfonts/winfnt.h 2009-04-05 Oran Agra <oran@monfort.co.il> Position Independent Code (PIC) support in autofit module. * include/freetype/internal/autohint.h add macros to init instances of FT_AutoHinter_ServiceRec. * src/autofit/afmodule.h declare autofit_module_class using macros from ftmodapi.h, when FT_CONFIG_OPTION_PIC is defined create and destroy functions will be declared. * src/autofit/afmodule.c when FT_CONFIG_OPTION_PIC is defined af_autofitter_service and autofit_module_class structs will have functions to init or create and destroy them instead of being allocated in the global scope. And macros will be used from afpic.h in order to access them. * src/autofit/aftypes.h add macros to init and declare instances of AF_ScriptClassRec. * src/autofit/afcjk.h declare af_cjk_script_class using macros from aftypes.h, when FT_CONFIG_OPTION_PIC is defined init function will be declared. * src/autofit/afcjk.c when FT_CONFIG_OPTION_PIC is defined af_cjk_script_class struct will have function to init it instead of being allocated in the global scope. * src/autofit/afdummy.h declare af_dummy_script_class using macros from aftypes.h, when FT_CONFIG_OPTION_PIC is defined init function will be declared. * src/autofit/afdummy.c when FT_CONFIG_OPTION_PIC is defined af_dummy_script_class struct will have function to init it instead of being allocated in the global scope. * src/autofit/afindic.h declare af_indic_script_class using macros from aftypes.h, when FT_CONFIG_OPTION_PIC is defined init function will be declared. * src/autofit/afindic.c when FT_CONFIG_OPTION_PIC is defined af_indic_script_class struct will have function to init it instead of being allocated in the global scope. * src/autofit/aflatin.h declare af_latin_script_class using macros from aftypes.h, when FT_CONFIG_OPTION_PIC is defined init function will be declared. * src/autofit/aflatin.c when FT_CONFIG_OPTION_PIC is defined af_latin_script_class struct will have function to init it instead of being allocated in the global scope. Change af_latin_blue_chars to be PIC-compatible by being a two dimensional array rather than array of pointers. * src/autofit/aflatin2.h declare af_latin2_script_class using macros from aftypes.h, when FT_CONFIG_OPTION_PIC is defined init function will be declared. * src/autofit/aflatin2.c when FT_CONFIG_OPTION_PIC is defined af_latin2_script_class struct will have function to init it instead of being allocated in the global scope. Change af_latin2_blue_chars to be PIC-compatible by being a two dimensional array rather than array of pointers. * src/autofit/afglobal.c when FT_CONFIG_OPTION_PIC is defined af_script_classes array initialization was moved to afpic.c and is later referred using macros defined in afpic.h. New Files: * src/autofit/afpic.h declare struct to hold PIC globals for autofit module and macros to access them. * src/autofit/afpic.c implement functions to allocate, destroy and initialize PIC globals for autofit module. * src/autofit/autofit.c add new file to build: afpic.c. * src/autofit/jamfile add new files to FT2_MULTI build: afpic.c. 2009-04-05 Oran Agra <oran@monfort.co.il> Position Independent Code (PIC) support in pshinter module. * include/freetype/internal/pshints.h add macros to init instances of PSHinter_Interface. * src/pshinter/pshmod.h declare pshinter_module_class using macros from ftmodapi.h, when FT_CONFIG_OPTION_PIC is defined create and destroy functions will be declared. * src/pshinter/pshmod.c when FT_CONFIG_OPTION_PIC is defined pshinter_interface and pshinter_module_class structs will have functions to init or create and destroy them instead of being allocated in the global scope. And macros will be used from pshpic.h in order to access them. New Files: * src/pshinter/pshpic.h declare struct to hold PIC globals for pshinter module and macros to access them. * src/pshinter/pshpic.c implement functions to allocate, destroy and initialize PIC globals for pshinter module. * src/pshinter/pshinter.c add new file to build: pshpic.c. * src/pshinter/jamfile add new files to FT2_MULTI build: pshpic.c. 2009-04-05 Oran Agra <oran@monfort.co.il> Position Independent Code (PIC) support in psnames module. * include/freetype/internal/services/svpscmap.h add macros to init instances of FT_Service_PsCMapsRec. * src/psnames/psmodule.h declare psnames_module_class using macros from ftmodapi.h, when FT_CONFIG_OPTION_PIC is defined create and destroy functions will be declared. * src/psnames/psmodule.c when FT_CONFIG_OPTION_PIC is defined pscmaps_interface and pscmaps_services structs and psnames_module_class array will have functions to init or create and destroy them instead of being allocated in the global scope. And macros will be used from pspic.h in order to access them. New Files: * src/psnames/pspic.h declare struct to hold PIC globals for psnames module and macros to access them. * src/psnames/pspic.c implement functions to allocate, destroy and initialize PIC globals for psnames module. * src/psnames/psnames.c add new file to build: pspic.c. * src/psnames/jamfile add new files to FT2_MULTI build: pspic.c. 2009-04-05 Oran Agra <oran@monfort.co.il> Position Independent Code (PIC) support in raster renderer. * src/raster/ftrend1.h declare ft_raster1_renderer_class and ft_raster5_renderer_class using macros from ftrender.h, when FT_CONFIG_OPTION_PIC is defined create and destroy functions will be declared. * src/smooth/ftrend1.c when FT_CONFIG_OPTION_PIC is defined ft_raster1_renderer_class and ft_raster5_renderer_class structs will have functions to init or create and destroy them instead of being allocated in the global scope. Macros will be used from rastpic.h in order to access ft_standard_raster from the pic_container (allocated in ftraster.c). In ft_raster1_render when PIC is enabled, the last letter of module_name is used to verify the renderer class rather than the class pointer. * src/raster/ftraster.c when FT_CONFIG_OPTION_PIC is defined ft_standard_raster struct will have function to init it instead of being allocated in the global scope. New Files: * src/raster/rastpic.h declare struct to hold PIC globals for raster renderer and macros to access them. * src/raster/rastpic.c implement functions to allocate, destroy and initialize PIC globals for raster renderer. * src/raster/raster.c add new file to build: rastpic.c. * src/raster/jamfile add new files to FT2_MULTI build: rastpic.c. 2009-04-05 Oran Agra <oran@monfort.co.il> Position Independent Code (PIC) support in smooth renderer. * src/smooth/ftsmooth.h declare ft_smooth_renderer_class, ft_smooth_lcd_renderer_class and ft_smooth_lcdv_renderer_class using macros from ftrender.h, when FT_CONFIG_OPTION_PIC is defined create and destroy functions will be declared. * src/smooth/ftsmooth.c when FT_CONFIG_OPTION_PIC is defined the following structs: ft_smooth_renderer_class, ft_smooth_lcd_renderer_class and ft_smooth_lcdv_renderer_class will have functions to init or create and destroy them instead of being allocated in the global scope. And macros will be used from ftspic.h in order to access ft_grays_raster from the pic_container (allocated in ftgrays.c). * src/smooth/ftgrays.h include FT_CONFIG_CONFIG_H * src/smooth/ftgrays.c when FT_CONFIG_OPTION_PIC is NOT defined func_interface was moved from gray_convert_glyph_inner function to the global scope. When FT_CONFIG_OPTION_PIC is defined func_interface and ft_grays_raster structs will have functions to init them instead of being allocated in the global scope. And func_interface will be allocated on the stack of gray_convert_glyph_inner. New Files: * src/smooth/ftspic.h declare struct to hold PIC globals for smooth renderer and macros to access them. * src/smooth/ftspic.c implement functions to allocate, destroy and initialize PIC globals for smooth renderer. * src/smooth/smooth.c add new file to build: ftspic.c. * src/smooth/jamfile add new files to FT2_MULTI build: ftspic.c. 2009-04-05 Oran Agra <oran@monfort.co.il> Position Independent Code (PIC) support in cff driver. * include/freetype/internal/services/svcid.h add macros to init instances of FT_Service_CIDRec. * include/freetype/internal/services/svpsinfo.h add macros to init instances of FT_Service_PsInfoRec. * src/cff/cffcmap.h declare cff_cmap_encoding_class_rec and cff_cmap_unicode_class_rec using macros from ftobjs.h, when FT_CONFIG_OPTION_PIC is defined create and destroy functions will be declared. * src/cff/cffcmap.c when FT_CONFIG_OPTION_PIC is defined the following structs: cff_cmap_encoding_class_rec and cff_cmap_unicode_class_rec will have functions to init or create and destroy them instead of being allocated in the global scope. * src/cff/cffdrivr.h declare cff_driver_class using macros from ftdriver.h, when FT_CONFIG_OPTION_PIC is defined create and destroy functions will be declared. * src/cff/cffdrivr.c when FT_CONFIG_OPTION_PIC is defined the following structs: cff_service_glyph_dict, cff_service_ps_info, cff_service_ps_name cff_service_get_cmap_info, cff_service_cid_info, cff_driver_class, and cff_services array will have functions to init or create and destroy them instead of being allocated in the global scope. And macros will be used from cffpic.h in order to access them from the pic_container. Use macros from cffpic.h in order to access the structs allocated in cffcmap.c * src/cff/cffobjs.c Use macros from cffpic.h in order to access the structs allocated in cffcmap.c * src/cff/parser.c when FT_CONFIG_OPTION_PIC is defined implement functions to create and destroy cff_field_handlers array instead of being allocated in the global scope. And macros will be used from cffpic.h in order to access it from the pic_container. New Files: * src/cff/cffpic.h declare struct to hold PIC globals for cff driver and macros to access them. * src/cff/cffpic.c implement functions to allocate, destroy and initialize PIC globals for cff driver. * src/cff/cff.c add new file to build: cffpic.c. * src/cff/jamfile add new files to FT2_MULTI build: cffpic.c. 2009-04-05 Oran Agra <oran@monfort.co.il> Position Independent Code (PIC) support in sfnt driver. * include/freetype/internal/services/svbdf.h add macros to init instances of FT_Service_BDFRec. * include/freetype/internal/services/svgldict.h add macros to init instances of FT_Service_GlyphDictRec. * include/freetype/internal/services/svpostnm.h add macros to init instances of FT_Service_PsFontNameRec. * include/freetype/internal/services/svsfnt.h add macros to init instances of FT_Service_SFNT_TableRec. * include/freetype/internal/services/svttcmap.h add macros to init instances of FT_Service_TTCMapsRec. * include/freetype/internal/sfnt.h add macros to init instances of SFNT_Interface. * src/sfnt/sfdriver.h declare sfnt_module_class using macros from ftmodapi.h, when FT_CONFIG_OPTION_PIC is defined create and destroy functions will be declared. * src/sfnt/sfdriver.c when FT_CONFIG_OPTION_PIC is defined the following structs: sfnt_service_sfnt_table, sfnt_service_glyph_dict, sfnt_service_ps_name tt_service_get_cmap_info, sfnt_service_bdf, sfnt_interface, sfnt_module_class, and sfnt_services array will have functions to init or create and destroy them instead of being allocated in the global scope. And macros will be used from sfntpic.h in order to access them from the pic_container. * src/sfnt/ttcmap.h add macros to init instances of TT_CMap_ClassRec. * src/sfnt/ttcmap.c when FT_CONFIG_OPTION_PIC is defined the following structs: tt_cmap0_class_rec, tt_cmap2_class_rec, tt_cmap4_class_rec tt_cmap6_class_rec, tt_cmap8_class_rec, tt_cmap10_class_rec, tt_cmap12_class_rec, tt_cmap14_class_rec and tt_cmap_classes array will have functions to init or create and destroy them instead of being allocated in the global scope. And macros will be used from sfntpic.h in order to access them from the pic_container. The content of tt_cmap_classes is now described in the new file 'ttcmapc.h'. New Files: * src/sfnt/sfntpic.h declare struct to hold PIC globals for sfnt driver and macros to access them. * src/sfnt/sfntpic.c implement functions to allocate, destroy and initialize PIC globals for sfnt driver. * src/sfnt/ttcmapc.h describing the content of tt_cmap_classes allocated in ttcmap.c * src/sfnt/sfnt.c add new file to build: sfntpic.c. * src/sfnt/jamfile add new files to FT2_MULTI build: sfntpic.c. 2009-04-05 Oran Agra <oran@monfort.co.il> Position Independent Code (PIC) support in truetype driver. * include/freetype/internal/services/svmm.h add macros to init instances of FT_Service_MultiMastersRec. * include/freetype/internal/services/svttglyf.h add macros to init instances of FT_Service_TTGlyfRec. * src/truetype/ttdriver.h declare tt_driver_class using macros from ftdriver.h, when FT_CONFIG_OPTION_PIC is defined create and destroy functions will be declared. * src/truetype/ttdriver.c when FT_CONFIG_OPTION_PIC is defined the following structs: tt_service_gx_multi_masters, tt_service_truetype_glyf, tt_driver_class and tt_services array, will have functions to init or create and destroy them instead of being allocated in the global scope. And macros will be used from ttpic.h in order to access them from the pic_container. * src/truetype/ttobjs.c change trick_names array to be PIC-compatible by being a two dimensional array rather than array of pointers. New Files: * src/truetype/ttpic.h declare struct to hold PIC globals for truetype driver and macros to access them. * src/truetype/ttpic.c implement functions to allocate, destroy and initialize PIC globals for truetype driver. * src/truetype/truetype.c add new file to build: ttpic.c. * src/truetype/jamfile add new files to FT2_MULTI build: ttpic.c. 2009-04-05 Oran Agra <oran@monfort.co.il> Position Independent Code (PIC) support and infrastructure in base. * include/freetype/config/ftoption.h add FT_CONFIG_OPTION_PIC * include/freetype/internal/ftobjs.h Add pic_container member to FT_LibraryRec. Add macros to declare and init instances of FT_CMap_ClassRec. Add macros to init instances of FT_Outline_Funcs and FT_Raster_Funcs. Add macros to declare, allocate and initialize modules (FT_Module_Class). Add macros to declare, allocate and initialize renderers (FT_Renderer_Class). Add macro to init instances of FT_Glyph_Class. Add macros to declare, allocate and initialize drivers (FT_Driver_ClassRec). * include/freetype/internal/ftpic.h new file to declare the FT_PIC_Container struct and the functions to allocate and destroy it. * include/freetype/internal/ftserv.h add macros to allocate and destroy arrays of FT_ServiceDescRec. * include/freetype/internal/internal.h define macro to include ftpic.h. New Files: * src/base/ftpic.c implement functions to allocate and destroy the global pic_container. * src/base/basepic.h declare struct to hold PIC globals for base and macros to access them. * src/base/basepic.c implement functions to allocate, destroy and initialize PIC globals for base. * src/base/ftinit.c when FT_CONFIG_OPTION_PIC is defined implement functions that allocate and destroy ft_default_modules according to FT_CONFIG_MODULES_H in the pic_container instead of the global scope and use macro from basepic.h to access it. * src/base/ftobjs.c add calls to the functions that allocate and destroy the global pic_container when the library is created and destroyed. * src/base/jamfile add new files to FT2_MULTI build: ftpic.c and basepic.c. * src/base/ftbase.c add new files to build: ftpic.c and basepic.c. * src/base/ftglyph.c when FT_CONFIG_OPTION_PIC is defined ft_bitmap_glyph_class and ft_outline_glyph_class will be allocated in the pic_container instead of the global scope and use macros from basepic.h to access them. * src/base/ftbbox.c allocate bbox_interface struct on the stack instead of the global scope when FT_CONFIG_OPTION_PIC is defined. * src/base/ftstroke.c access ft_outline_glyph_class allocated in ftglyph.c via macros from basepic.h 2009-04-05 Oran Agra <oran@monfort.co.il> Preparing changes in cff parser later needed for PIC version. * src/cff/cffload.c, src/cff/cffload.h, src/cff/cffobjs.c, src/cff/cffparse.c, src/cff/cffparse.h: Add library pointer to 'CFF_ParserRec' set by `cff_parser_init'. Route library pointer from 'cff_face_init' to 'cff_subfont_load' for `cff_parser_init'. * src/cff/cffparse.c (CFF_Field_Handler): Move it to... * src/cff/cffparse.h: This file, to be used by other C files. 2009-04-05 Oran Agra <oran@monfort.co.il> Minor change in ftstroke.c. * src/base/ftstroke.c (FT_StrokerRec): Replace `memory' member with `library' needed for PIC version. Update all callers. 2009-04-04 Werner Lemberg <wl@gnu.org> ftnames.c -> ftsnames.c * src/base/ftnames.c: Rename to... * src/base/ftsnames.c: This. * src/base/Jamfile, src/base/rules.mk, src/base/ftbase.c: Updated. 2009-04-04 Werner Lemberg <wl@gnu.org> Add support for cmap type 13. * devel/ftoption.h, include/freetype/config/ftoption.h (TT_CONFIG_CMAP_FORMAT_13): New macro. * src/sfnt/ttcmap.c (TT_CMap13Rec, tt_cmap13_init, tt_cmap13_validate, tt_cmap13_char_index, tt_cmap13_char_next, tt_cmap13_get_info, tt_cmap13_char_map_def_binary, tt_cmap14_class_rec): New functions and structures for cmap 13 support. (tt_cmap_classes): Register tt_cmap13_class_rec. * docs/CHANGES: Mention cmap 13 support. 2009-04-01 Werner Lemberg <wl@gnu.org> Ignore empty contours in CFF glyphs. Problem reported by Albert Astals Cid <aacid@kde.org>. * src/cff/cffgload.c (cff_builder_close_contour): Synchronize with t1_builder_close_contour. 2009-03-21 Werner Lemberg <wl@gnu.org> Another redundant header inclusion. * src/truetype/ttgxvar.c: Fix Ghostscript Coverity issue #4041. 2009-03-21 Werner Lemberg <wl@gnu.org> Remove redundant header inclusions. This covers many Ghostscript Coverity issues. * src/*: Do it. 2009-03-21 Werner Lemberg <wl@gnu.org> Fix Ghostscript Coverity issue #3904. * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Protect against invalid values of `runcnt'. 2009-03-20 Werner Lemberg <wl@gnu.org> Fix `make multi' run. * src/smooth/ftsmooth.h: Include FT_INTERNAL_DEBUG_H. 2009-03-20 Werner Lemberg <wl@gnu.org> Fix Savannah bug #25923. * src/cache/ftccmap.c (FTC_CMAP_HASH): Fix typo. 2009-03-20 Werner Lemberg <wl@gnu.org> Protect against too large glyphs. Problem reported by Tavis Ormandy <taviso@google.com>. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Don't allow `pitch' or `height' to be larger than 0xFFFF. 2009-03-20 Werner Lemberg <wl@gnu.org> Tavis Ormandy <taviso@google.com> Fix validation for various cmap table formats. * src/sfnt/ttcmap.c (tt_cmap8_validate, tt_cmap10_validate, tt_cmap12_validate): Check `length' correctly. (tt_cmap_14_validate): Check `length' and `numMappings' correctly. 2009-03-20 Werner Lemberg <wl@gnu.org> Protect against malformed compressed data. * src/lzw/ftzopen.c (ft_lzwstate_io): Test whether `state->prefix' is zero. 2009-03-20 Werner Lemberg <wl@gnu.org> Protect against invalid SID values in CFFs. Problem reported by Tavis Ormandy <taviso@google.com>. * src/cff/cffload.c (cff_charset_load): Reject SID values larger than 64999. 2009-03-19 Vincent Richomme <richom.v@free.fr> Update WinCE Visual C project files. * builds/wince/vc2005-ce/freetype.vcproj, builds/wince/vc2008-ce/freetype.vcproj: Add missing base extension files. 2009-03-19 Werner Lemberg <wl@gnu.org> Remove unused Win32 code. * builds/wince/ftdebug.c: Remove code guarded with `!_WIN32_WCE'. Since Win32 is handled separately this is no longer needed. 2009-03-19 Vincent Richomme <richom.v@free.fr> Make `gzip' module compile on WinCE. * src/gzip/zconf.h [_WIN32_WCE]: Define NO_ERRNO_H. 2009-03-19 Werner Lemberg <wl@gnu.org> Remove unused WinCE code. * builds/win32/ftdebug.c: Remove code guarded with `_WIN32_WCE'. Since WinCE is handled separately this is no longer needed. 2009-03-16 Werner Lemberg <wl@gnu.org> docmaker: Don't ignore single-line code blocks. * src/tools/docmaker/content.py (DocBlock::_init__): Fix change from 2009-01-31. 2009-03-15 Steve Langasek <steve.langasek@canonical.com> Use __asm__ for declaring assembly instead of asm. * builds/unix/ftconfig.in (FT_MulFix_arm): Use __asm__ instead of asm on arm, fixing a build failure on armel with -pedantic. 2009-03-14 Werner Lemberg <wl@gnu.org> Fix valgrind warning. * src/sfnt/ttsbit0.c (tt_sbit_decoder_load_bit_aligned): Don't read past the end of the frame. 2009-03-12 Werner Lemberg <wl@gnu.org> * Version 2.3.9 released. ========================= Tag sources with `VER-2-3-9'. 2009-03-12 Werner Lemberg <wl@gnu.org> * builds/unix/freetype2.in: Move @FT2_EXTRA_LIBS@ to `Libs.private'. 2009-03-12 Werner Lemberg <wl@gnu.org> Fix some FreeType Coverity issues as reported for Ghostscript. * src/base/ftobjs.c (FT_New_Face, FT_New_Memory_Face): Initialize `args.stream' (#3874, #3875). (open_face_PS_from_sfnt_stream): Improve error management (#3786). * src/base/ftmm.c (ft_face_get_mm_service): Fix check of `aservice' (#3870). * src/base/ftstroke.c (ft_stroke_border_get_counts): Remove dead code (#3790). * src/base/ftrfork.c (raccess_guess_apple_generic): Check error value of `FT_Stream_Skip' (#3784). * src/type1/t1gload.c (T1_Load_Glyph): Check `size' before accessing it (#3872) * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Check `face' before accessing it (#3871). * src/pcf/pcfread.c (pcf_get_metrics): Handle return value of `pcf_get_metric' (#3789, #3782). (pcf_get_properties): Use FT_STREAM_SKIP (#3783). * src/cache/ftcmanag.c (FTC_Manager_RegisterCache): Fix check of `acache' (#3797) * src/cff/cffdrivr.c (cff_ps_get_font_info): Fix check of `cff' (#3796). * src/cff/cffgload.c (cff_decoder_prepare): Check `size' (#3795). * src/cff/cffload.c (cff_index_get_pointers): Add comment (#3794). * src/bdf/bdflib.c (_bdf_add_property): Check `fp->value.atom' (#3793). (_bdf_parse_start): Add comment (#3792). * src/raster/ftraster.c (Finalize_Profile_Table): Check `ras.fProfile' (#3791). * src/sfnt/ttsbit.c (Load_SBit_Image): Use FT_STREAM_SKIP (#3785). * src/gzip/ftgzip.c (ft_gzip_get_uncompressed_size): Properly ignore seek error (#3781). 2009-03-11 Michael Toftdal <toftdal@gmail.com> Extend CID service functions to handle CID-keyed CFFs as CID fonts. * include/freetype/ftcid.h (FT_Get_CID_Is_Internally_CID_keyed, FT_Get_CID_From_Glyph_Index): New functions. * include/freetype/internal/services/svcid.h (FT_CID_GetIsInternallyCIDKeyedFunc, FT_CID_GetCIDFromGlyphIndexFunc): New function typedefs. (CID Service): Use them. * src/base/ftcid.c: Include FT_CID_H. (FT_Get_CID_Is_Internally_CID_keyed, FT_Get_CID_From_Glyph_Index): New functions. * src/cff/cffdrivr.c (cff_get_is_cid, cff_get_cid_from_glyph_index): New functions. (cff_service_cid_info): Add them. * src/cff/cffload.c (cff_font_load): Don't free `font->charset.sids' -- it is needed for access as a CID-keyed font. It gets deleted later on. * src/cid/cidriver.c (cid_get_is_cid, cid_get_cid_from_glyph_index): New functions. (cid_service_cid_info): Add them. * docs/CHANGES: Updated. 2009-03-11 Bram Tassyns <bramt@enfocus.be> Fix Savannah bug #25597. * src/cff/cffparse.c (cff_parse_real): Don't allow fraction_length to become larger than 9. 2009-03-11 Werner Lemberg <wl@gnu.org> Fix Savannah bug #25814. * builds/unix/freetype2.in: As suggested in the bug report, move @LIBZ@ to `Libs.private'. 2009-03-11 Werner Lemberg <wl@gnu.org> Fix Savannah bug #25781. We now simply check for a valid `offset', no longer handling `delta = 1' specially. * src/sfnt/ttcmap.c (tt_cmap4_validate): Don't check `delta' for last segment. (tt_cmap4_set_range, tt_cmap4_char_map_linear, tt_cmap4_char_map_binary): Check offset. 2009-03-11 Werner Lemberg <wl@gnu.org> * src/base/Jamfile: Fix handling of ftadvanc.c. Reported by Oran Agra <oran@monfort.co.il>. 2009-03-10 Vincent Richomme <richom.v@free.fr> Restructure Win32 and Wince compiler support. * src/builds/win32: Remove files for WinCE. Move VC 2005 support to a separate directory. Add directory for VC 2008 support. * src/builds/wince: New directory hierarchy for WinCE compilers (VC 2005 and VC 2008). 2009-03-09 Werner Lemberg <wl@gnu.org> More preparations for 2.3.9 release. * docs/CHANGES: Updated. * Jamfile, README: s/2.3.8/2.3.9/, s/238/239/. 2009-03-09 Werner Lemberg <wl@gnu.org> * src/sfnt/rules.mk (SFNT_DRV_H): Add ttsbit0.c. 2009-03-09 Alexey Kryukov <anagnost@yandex.ru> Fix handling of EBDT formats 8 and 9 (part 2). This patch fixes the following problems in ttsbit0.c: . Bitmaps for compound glyphs were never allocated. . `SBitDecoder' refused to load metrics if some other metrics have already been loaded. This condition certainly makes no sense for recursive calls, so I've just disabled it. Another possibility would be resetting `decoder->metrics_loaded' to false before loading each composite component. However, we must restore the original metrics after finishing the recursion; otherwise we can get a misaligned glyph. . `tt_sbit_decoder_load_bit_aligned' incorrectly handled `x_pos', causing some glyph components to be shifted too far to the right (especially noticeable for small sizes). Note that support for grayscale bitmaps (not necessarily compound) is completely broken in ttsbit0.c. * src/sfnt/tt_sbit_decoder_load_metrics: Always load metrics. (tt_sbit_decoder_load_bit_aligned): Handle `x_pos' correctly in case of `h == height'. (tt_sbit_decoder_load_compound): Reset metrics after loading components. Allocate bitmap. 2009-03-09 Werner Lemberg <wl@gnu.org> * builds/unix/configure.raw (version_info): Set to 9:20:3. 2009-03-03 David Turner <david@freetype.org> Protect SFNT kerning table parser against malformed tables. This closes Savannah BUG #25750. * src/sfnt/ttkern.c (tt_face_load_kern, tt_face_get_kerning): Fix a bug where a malformed table would be successfully loaded but later crash the engine during parsing. 2009-03-03 David Turner <david@freetype.org> Update documentation and bump version number to 2.3.9. * include/freetype/freetype.h: Bump patch version to 9. * docs/CHANGES: Document the ABI break in 2.3.8. * docs/VERSION.DLL: Update version numbers table for 2.3.9. 2009-03-03 David Turner <david@freetype.org> Remove ABI-breaking field in public PS_InfoFontRec definition. Instead, we define a new internal PS_FontExtraRec structure to hold the additional field, then place it in various internal positions of the corresponding FT_Face derived objects. * include/freetype/t1tables.h (PS_FontInfoRec): Remove the `fs_type' field from the public structure. * include/freetype/internal/psaux.h (T1_FieldLocation): New enumeration `T1_FIELD_LOCATION_FONT_EXTRA'. * include/freetype/internal/t1types.h (PS_FontExtraRec): New structure. (T1_FontRec, CID_FaceRec): Add it. * src/cid/cidload.c (cid_load_keyword): Handle T1_FIELD_LOCATION_FONT_EXTRA. * src/cid/cidtoken.h, src/type1/t1tokens.h, src/type42/t42parse.c: Adjust FT_STRUCTURE and T1CODE properly to handle `FSType'. * src/type1/t1load.c (t1_load_keyword): Handle T1_FIELD_LOCATION_FONT_EXTRA. * include/freetype/internal/services/svpsinfo.h (PsInfo service): Add `PS_GetFontExtraFunc' function typedef. * src/base/ftfstype.c: Include FT_INTERNAL_SERVICE_H and FT_SERVICE_POSTSCRIPT_INFO_H. (FT_Get_FSType_Flags): Use POSTSCRIPT_INFO service. * src/cff/cffdrivr.c (cff_service_ps_info): Updated. * src/cid/cidriver.c (cid_ps_get_font_extra): New function. (cid_service_ps_info): Updated. * src/type1/t1driver.c (t1_ps_get_font_extra): New function. (t1_service_ps_info): Updated. * src/type42/t42drivr.c (t42_ps_get_font_extra): New function. (t42_service_ps_info): Updated. 2009-03-02 Alexey Kryukov <anagnost@yandex.ru> Fix handling of EBDT formats 8 and 9. The main cycle in `blit_sbit' makes too many iterations: it actually needs the count of lines in the source bitmap rather than in the target image. * src/sfnt/ttsbit.c (blit_sbit) [FT_CONFIG_OPTION_OLD_INTERNALS]: Add parameter `source_height' and use it for main loop. (Load_SBit_Single) [FT_CONFIG_OPTION_OLD_INTERNALS]: Updated. 2009-02-23 Werner Lemberg <wl@gnu.org> Fix Savannah bug #25669. * src/base/ftadvanc.h (FT_Get_Advances): Fix serious typo. * src/base/ftobjs.c (FT_Select_Metrics, FT_Request_Metrics): Fix scaling factor for non-scalable fonts. * src/cff/cffdrivr.c (cff_get_advances): Use correct advance width value to prevent incorrect scaling. * docs/CHANGES: Document it. 2009-02-15 Matt Godbolt <matt@godbolt.org> Fix Savannah bug #25588. * builds/unix/ftconfig.in (FT_MulFix_arm): Use correct syntax for `orr' instruction. 2009-02-11 Werner Lemberg <wl@gnu.org> * src/truetype/ttobjs.c (tt_check_trickyness): Add `DFKaiShu'. Reported by David Bevan <dbevan@emtex.com>. 2009-02-09 Werner Lemberg <wl@gnu.org> Fix Savannah bug #25495. * src/sfnt/sfobjs.c (sfnt_load_face): Test for bitmap strikes before setting metrics and bbox values. This ensures that the check for a font with neither a `glyf' table nor bitmap strikes can be performed early enough to set metrics and bbox values too. 2009-02-04 Werner Lemberg <wl@gnu.org> Fix Savannah bug #25480. * builds/unix/freetype-config.in: For --ftversion, don't use $prefix but $includedir. 2009-01-31 Werner Lemberg <wl@gnu.org> Minor docmaker improvements. * src/tools/docmaker/content.py (DocBlock::__init__): Ignore empty code blocks. 2009-01-25 Werner Lemberg <wl@gnu.org> Fix SCANCTRL handling in TTFs. Problem reported by Alexey Kryukov <anagnost@yandex.ru>. * src/truetype/ttinterp.c (Ins_SCANCTRL): Fix threshold handling. 2009-01-23 Werner Lemberg <wl@gnu.org> Move FT_Get_FSType_Flags to a separate file. Problem reported by Mickey Gabel <mickey@monfort.co.il>. * src/base/ftobjs.c (FT_Get_FSType_Flags): Move to... * src/base/ftfstype.c: This new file. * modules.cfg (BASE_EXTENSION): Add ftfstype.c. * docs/INSTALL.ANY: Updated. * builds/mac/*.txt, builds/amiga/*makefile*, builds/win32/{visualc,visualce}/freetype.*, builds/symbian/*: Updated. 2009-01-22 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * builds/unix/ftsystem.c (FT_Stream_Open): Fix 2 error messages ending without "\n". 2009-01-22 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Fix Savannah bug #25347. * src/base/ftobjs.c (open_face_PS_from_sfnt_stream): Rewind the stream to the original position passed to this function, when ft_lookup_PS_in_sfnt_stream() failed. (Mac_Read_sfnt_Resource): Rewind the stream to the head of sfnt resource body, when open_face_PS_from_sfnt_stream() failed. 2009-01-19 Michael Lotz <mmlr@mlotz.ch> Fix Savannah bug #25355. * include/freetype/config/ftconfig.h (FT_MulFix_i386): Make assembler code work with gcc 2.95.3 (as used by the Haiku project). Add `cc' register to the clobber list. 2009-01-18 Werner Lemberg <wl@gnu.org> Protect FT_Get_Next_Char. * src/sfnt/ttcmap.c (tt_cmap4_set_range): Apply fix similar to change from 2008-07-22. Patch from Ronen Ghoshal <rghoshal@emtex.com>. 2009-01-18 Werner Lemberg <wl@gnu.org> Implement FT_Get_Name_Index for SFNT driver. * src/sfnt/sfdriver.c (sfnt_get_name_index): New function. (sfnt_service_glyph_dict): Use it. Problem reported by Truc Truong <tructv@necsv.com>. 2009-01-18 Werner Lemberg <wl@gnu.org> * include/freetype/ftstroke.h (FT_Outline_GetInsideBorder): Fix documentation. Problem reported by Truc Truong <tructv@necsv.com>. * docs/CHANGES: Updated. 2009-01-14 Werner Lemberg <wl@gnu.org> * Version 2.3.8 released. ========================= Tag sources with `VER-2-3-8'. * docs/VERSION.DLL: Update documentation and bump version number to 2.3.8. * README, Jamfile (RefDoc), builds/win32/visualc/index.html, builds/win32/visualc/freetype.dsp, builds/win32/visualc/freetype.vcproj, builds/win32/visualce/index.html, builds/win32/visualce/freetype.dsp, builds/win32/visualce/freetype.vcproj: s/2.3.7/2.3.8/, s/237/238/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 8. * builds/unix/configure.raw (version_info): Set to 9:19:3. * docs/release: Updated. 2009-01-14 Werner Lemberg <wl@gnu.org> * builds/toplevel.mk (dist): Compress better. 2009-01-13 Werner Lemberg <wl@gnu.org> * src/base/ftobjs.c (FT_Get_FSType_Flags): Cast for compilation with C++. 2009-01-13 Werner Lemberg <wl@gnu.org> Don't use stdlib.h and friends directly. Reported by Mickey Gabel <mickey@monfort.co.il>. * src/base/ftdbgmem.c: s/<stdlib.h>/FT_CONFIG_STANDARD_LIBRARY_H/. * src/gzip/ftgzip.c, src/lzw/ftlzw.c, src/raster/ftmisc.h: s/<string.h>/FT_CONFIG_STANDARD_LIBRARY_H/. * src/autofit/aftypes.h, src/autofit/afhints.c, src/pshinter/pshalgo.c: s/<stdio.h>/FT_CONFIG_STANDARD_LIBRARY_H/ * src/lzw/ftlzw.c, src/base/ftdbgmem.c: Don't include stdio.h. 2009-01-12 Werner Lemberg <wl@gnu.org> Avoid compiler warnings. * */*: s/do ; while ( 0 )/do { } while ( 0 )/. Reported by Sean McBride <sean@rogue-research.com>. 2009-01-12 Werner Lemberg <wl@gnu.org> Fix stdlib dependencies. Problem reported by Mickey Gabel <mickey@monfort.co.il>. * include/freetype/config/ftstdlib.h (ft_exit): Removed. Unused. * src/autofit/afhints.c, src/base/ftlcdfil.c, src/smooth/ftsmooth.c: s/memcpy/ft_memcpy/. * src/psaux/t1decode.c: s/memset/ft_memset/, s/memcpy/ft_memcpy/. 2009-01-11 Werner Lemberg <wl@gnu.org> * docs/formats.txt: Add link to PCF specification. * include/freetype/ftbdf.h (FT_Get_BDF_Property): Improve documentation. 2009-01-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * src/base/ftadvanc.c (_ft_face_scale_advances, FT_Get_Advance, FT_Get_Advances): Change the type of load_flags from FT_UInt32 to FT_Int32, to match with the flags for FT_Load_Glyph(). * src/cff/cffdrivr.c (cff_get_advances): Ditto. * src/truetype/ttdriver.c (tt_get_advances): Ditto. * include/freetype/ftadvanc.h (FT_Get_Advance, FT_Get_Advances): Ditto. * include/freetype/internal/ftdriver.h (FT_Face_GetAdvancesFunc): Ditto. 2009-01-09 Daniel Zimmermann <netzimme@aol.com> * src/gxvalid/gxvmort.c (gxv_mort_feature_validate): Fix wrong length check. From Savannah patch #6682. 2009-01-09 Werner Lemberg <wl@gnu.org> Fix problem with T1_FIELD_{NUM,FIXED}_TABLE2. * src/psaux/psobjs.c (ps_parser_load_field_table): Don't handle `count_offset' if it is zero (i.e., unused). Otherwise, the first element of the structure which holds the data is erroneously modified. Problem reported by Chi Nguyen <chint@necsv.com>. 2009-01-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * src/base/ftadvanc.c (_ft_face_scale_advances, FT_Get_Advance, FT_Get_Advances): Extend the type of load_flags from FT_UInt to FT_UInt32, to pass 32-bit flags on 16bit platforms. * src/cff/cffdrivr.c (cff_get_advances): Ditto. * src/truetype/ttdriver.c (tt_get_advances): Ditto. * include/freetype/ftadvanc.h (FT_Get_Advance, FT_Get_Advances): Ditto. * include/freetype/internal/ftdriver.h (FT_Face_GetAdvancesFunc): Ditto. 2009-01-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * src/base/ftobjs.c (FT_Done_Library): Issue an error message when FT_Done_Face() cannot free all faces. If the list of the opened faces includes broken face which FT_Done_Face() cannot free, FT_Done_Library() retries FT_Done_Face() and it can fall into an endless loop. See the discussion: https://lists.gnu.org/archive/html/freetype-devel/2008-09/msg00047.html https://lists.gnu.org/archive/html/freetype-devel/2008-10/msg00000.html 2009-01-07 Werner Lemberg <wl@gnu.org> * docs/CHANGES: Document new key `a' in ftdiff. 2009-01-06 Werner Lemberg <wl@gnu.org> * autogen.sh: Don't use GNUisms while calling sed. Problem reported by Sean McBride. 2009-01-06 Werner Lemberg <wl@gnu.org> * src/base/ftbitmap.c (FT_Bitmap_Convert): Handle FT_PIXEL_MODE_LCD and FT_PIXEL_MODE_LCD_V. Problem reported by Chi Nguyen <chint@necsv.com>. 2009-01-06 Diego Pettenò <flameeyes@gmail.com> * builds/unix/configure.raw: Don't call AC_CANONICAL_BUILD and AC_CANONICAL_TARGET and use $host_os only. A nice explanation for this change can be found at https://blog.flameeyes.eu/s/canonical-target. From Savannah patch #6712. 2009-01-06 Sean McBride <sean@rogue-research.com> * src/base/ftdbgmem.c (_debug_mem_dummy): Make it static. * src/base/ftmac.c: Remove some #undefs. 2008-12-26 Werner Lemberg <wl@gnu.org> Set `face_index' field in FT_Face for all font formats. * cff/cffobjs.c (cff_face_init), winfonts/winfnt.c (FNT_Face_Init), sfnt/sfobjs.c (sfnt_init_face): Do it. * docs/CHANGES: Document it. 2008-12-22 Steve Grubb * builds/unix/ftsystem.c (FT_Stream_Open): Reject zero-length files. Patch from Savannah bug #25151. 2008-12-21 Werner Lemberg <wl@gnu.org> * src/pfr/pfrdrivr.c, src/winfonts/winfnt.c, src/cache/ftcmanag.c, src/smooth/ftgrays.c, src/base/ftobjs.c, src/sfobjs.c: s/_Err_Bad_Argument/_Err_Invalid_Argument/. The former is for errors in the bytecode interpreter only. 2008-12-21 Werner Lemberg <wl@gnu.org> * src/base/ftpfr.c (FT_Get_PFR_Metrics): Protect against NULL arguments. Fix return value for non-PFR fonts. Both problems reported by Chi Nguyen <chint@necsv.com>. 2008-12-21 anonymous FT_USE_MODULE declares things as: extern const FT_Module_Class (or similar for C++). However, the actual types of the variables being declared are often different, e.g., FT_Driver_ClassRec or FT_Renderer_Class. (Some are, indeed, FT_Module_Class.) This works with most C compilers (since those structs begin with an FT_Module_Class struct), but technically it's undefined behavior. To quote the ISO/IEC 9899:TC2 final committee draft, section 6.2.7 paragraph 2: All declarations that refer to the same object or function shall have compatible type; otherwise, the behavior is undefined. (And they are not compatible types.) Most C compilers don't reject (or even detect!) code which has this issue, but the GCC LTO development branch compiler does. (It outputs the types of the objects while generating .o files, along with a bunch of other information, then compares them when doing the final link-time code generation pass.) Patch from Savannah bug #25133. * src/base/ftinit.c (FT_USE_MODULE): Include variable type. * builds/amiga/include/freetype/config/ftmodule.h, include/freetype/config/ftmodule.h, */module.mk: Updated to declare pass correct types to FT_USE_MODULE. 2008-12-21 Hongbo Ni <hongbo@njstar.com> * src/autofit/aflatin.c (af_latin_hint_edges), src/autofit/aflatin2.c (af_latin2_hint_edges), src/autofit/afcjk.c (af_cjk_hint_edges): Protect against division by zero. This fixes Savannah bug #25124. 2008-12-18 Werner Lemberg <wl@gnu.org> * docs/CHANGES: Updated. 2008-12-18 David Bevan <dbevan@emtex.com> Provide API for accessing embedding and subsetting restriction information. * include/freetype.h (FT_FSTYPE_INSTALLABLE_EMBEDDING, FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING, FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING, FT_FSTYPE_EDITABLE_EMBEDDING, FT_FSTYPE_NO_SUBSETTING, FT_FSTYPE_BITMAP_EMBEDDING_ONLY): New macros. (FT_Get_FSType_Flags): New function declaration. * src/base/ftobjs.c (FT_Get_FSType_Flags): New function. * src/cid/cidtoken.h, src/type1/t1tokens.h, src/type42/t42parse.c (t42_keywords): Handle `FSType'. * include/freetype/t1tables.h (PS_FontInfoRec): Add `fs_type' field. 2008-12-17 Werner Lemberg <wl@gnu.org> * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Don't use internal macros so that copying the source code into an application works out of the box. 2008-12-17 Werner Lemberg <wl@gnu.org> * include/freetype/ftsynth.h, src/base/ftsynth.c: Move FT_GlyphSlot_Own_Bitmap to... * include/freetype/ftbitmap.h, src/base/ftbitmap.c: These files. * docs/CHANGES: Document it. 2008-12-10 Werner Lemberg <wl@gnu.org> Generalize the concept of `tricky' fonts by introducing FT_FACE_FLAG_TRICKY to indicate that the font format's hinting engine is necessary for correct rendering. At the same time, slightly modify the behaviour of tricky fonts: FT_LOAD_NO_HINTING is now ignored. To really force raw loading of tricky fonts (without hinting), both FT_LOAD_NO_HINTING and FT_LOAD_NO_AUTOHINT must be used. Finally, tricky TrueType fonts always use the bytecode interpreter even if the patented code is used. * include/freetype/freetype.h (FT_FACE_FLAG_TRICKY, FT_IS_TRICKY): New macros. * src/truetype/ttdriver.c (Load_Glyph): Handle new load flags semantics as described above. * src/truetype/ttobjs.c (tt_check_trickyness): New function, using code of ... (tt_face_init): This function, now simplified and updated to new semantics. * src/base/ftobjs.c (FT_Load_Glyph): Don't use autohinter for tricky fonts. * docs/CHANGES: Document it. 2008-12-09 Werner Lemberg <wl@gnu.org> Really fix Savannah bug #25010: An SFNT font with neither outlines nor bitmaps can be considered as containing space `glyphs' only. * src/truetype/ttpload.c (tt_face_load_loca): Handle the case where a `glyf' table is missing. * src/truetype/ttgload.c (load_truetype_glyph): Abort if we have no `glyf' table but a non-zero `loca' entry. (tt_loader_init): Handle missing `glyf' table. * src/base/ftobjs.c (FT_Load_Glyph): Undo change 2008-12-05. * src/sfnt/sfobjs.c (sfnt_load_face): A font with neither outlines nor bitmaps is scalable. 2008-12-05 Werner Lemberg <wl@gnu.org> * src/autofit/aflatin.c (af_latin_uniranges): Add more ranges. This fixes Savannah bug #21190 which also provides a basic patch. 2008-12-05 Werner Lemberg <wl@gnu.org> * include/freetype/freetype.h (FT_LOAD_ADVANCE_ONLY): Use value 0x100 instead of 0x10000; the latter value is already occupied by FT_LOAD_TARGET_LIGHT. Bug reported by James Cloos. Handle SFNT with neither outlines nor bitmaps. This fixes Savannah bug #25010. * src/base/ftobjs.c (FT_Load_Glyph): Reject fonts with neither outlines nor bitmaps. * src/sfnt/sfobjs.c (sfnt_load_face): Don't return an error if there is no table with glyphs. * src/sfnt/ttload.c (tt_face_lookup_table): Improve debugging message. 2008-12-01 Werner Lemberg <wl@gnu.org> GDEF tables need `glyph_count' too for validation. Problem reported by Chi Nguyen <chint@necsv.com>. * src/otvalid/otvgdef.c (otv_GDEF_validate), src/otvalid/otvalid.h (otv_GDEF_validate), src/otvalid/otvmod.c (otv_validate): Pass `glyph_count'. 2008-11-29 Werner Lemberg <wl@gnu.org> * src/autofit/afcjk.c, src/base/ftoutln.c, src/base/ftrfork.c, src/bdf/bdfdrivr.c, src/gxvalid/gxvmorx.c, src/otvalid/otvmath.c, src/pcf/pcfdrivr.c, src/psnames/pstables.h, src/smooth/ftgrays.c, src/tools/glnames.py, src/truetype/ttinterp.c, src/type1/t1load.c, src/type42/t42objs.c, src/winfonts/winfnt.c: Fix compiler warnings (Atari PureC). 2008-11-29 James Cloos <cloos@jhcloos.com> * src/type/t1load.c (mm_axis_unmap): Revert previous patch and fix it correctly by using FT_INT_TO_FIXED (FreeType expects 16.16 values in the /BlendDesignMap space). 2008-11-29 James Cloos <cloos@jhcloos.com> * src/type1/t1load.c (mm_axis_unmap): `blend_points' is FT_Fixed*, whereas `design_points' is FT_Long*. Therefore, return blend rather than design points. 2008-11-27 Werner Lemberg <wl@gnu.org> * src/cff/cffparse.c (cff_parse_real): Handle more than nine significant digits correctly. This fixes Savannah bug #24953. 2008-11-25 Daniel Zimmermann <netzimme@aol.com> * src/base/ftstream.c (FT_Stream_ReadFields): Don't access stream before the NULL check. From Savannah patch #6681. 2008-11-24 Werner Lemberg <wl@gnu.org> Fixes from the gnuwin32 port. * src/base/ftlcdfil.c: s/EXPORT/EXPORT_DEF/. * src/base/ftotval.c: Include FT_OPENTYPE_VALIDATE_H. * src/psaux/psobjs.c (ps_table_add): Check `length'. 2008-11-15 Werner Lemberg <wl@gnu.org> * src/truetype/ttinterp.c (tt_default_graphics_state): The default value for `scan_type' is zero, as confirmed by Greg Hitchcock from Microsoft. Problem reported by Michal Nowakowski <miszka@limes.com.pl>. 2008-11-12 Tor Andersson <tor.andersson@gmail.com> * src/cff/cffdrivr.c (cff_get_cmap_info): Initialize `format' field. This fixes Savannah bug #24819. 2008-11-08 Werner Lemberg <wl@gnu.org> * src/sfnt/sfobjs.c (sfnt_load_face): Remove #if 0/#endif guards since OpenType version 1.5 has been released. * include/ttnameid.h (TT_NAME_ID_WWS_FAMILY, TT_NAME_ID_WWS_SUBFAMILY): New macros for OpenType 1.5. (TT_URC_COPTIC, TT_URC_VAI, TT_URC_NKO, TT_URC_BALINESE, TT_URC_PHAGSPA, TT_URC_NON_PLANE_0, TT_URC_PHOENICIAN, TT_URC_TAI_LE, TT_URC_NEW_TAI_LUE, TT_URC_BUGINESE, TT_URC_GLAGOLITIC, TT_URC_YIJING, TT_URC_SYLOTI_NAGRI, TT_URC_LINEAR_B, TT_URC_ANCIENT_GREEK_NUMBERS, TT_URC_UGARITIC, TT_URC_OLD_PERSIAN, TT_URC_SHAVIAN, TT_URC_OSMANYA, TT_URC_CYPRIOT_SYLLABARY, TT_URC_KHAROSHTHI, TT_URC_TAI_XUAN_JING, TT_URC_CUNEIFORM, TT_URC_COUNTING_ROD_NUMERALS, TT_URC_SUNDANESE, TT_URC_LEPCHA, TT_URC_OL_CHIKI, TT_URC_SAURASHTRA, TT_URC_KAYAH_LI, TT_URC_REJANG, TT_URC_CHAM, TT_URC_ANCIENT_SYMBOLS, TT_URC_PHAISTOS_DISC, TT_URC_OLD_ANATOLIAN, TT_URC_GAME_TILES): New macros for OpenType 1.5. 2008-11-08 Wenlin Institute <wenlin@wenlin.com> * src/base/ftobjs.c (ft_glyphslot_free_bitmap): Protect against slot->internal == NULL. Reported by Graham Asher. 2008-11-08 Werner Lemberg <wl@gnu.org> * src/sfnt/sfobjs.c (tt_face_get_name): Modified to return an error code so that memory allocation problems can be distinguished from missing table entries. Reported by Graham Asher. (GET_NAME): New macro. (sfnt_load_face): Use it. 2008-11-05 Werner Lemberg <wl@gnu.org> * devel/ftoption.h, include/freetype/config/ftoption.h [TT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Undefine TT_CONFIG_OPTION_UNPATENTED_HINTING. This fixes the return value of `FT_Get_TrueType_Engine_Type' (and makes it work as documented). Reported in bug #441638 of bugzilla.novell.com. * docs/CHANGES: Document it. 2008-11-03 Werner Lemberg <wl@gnu.org> * src/type1/t1load.c (parse_subrs): Use an endless loop. There are fonts (like HELVI.PFB version 003.001, used on OS/2) which define some `subrs' elements more than once. Problem reported by Peter Weilbacher <mozilla@weilbacher.org>. 2008-10-15 Graham Asher <graham.asher@btinternet.com> * src/sfnt/ttpost.c (tt_post_default_names): Add `const'. 2008-10-15 David Turner <david@freetype.org> * src/truetype/ttgxvar.c (TT_Set_MM_Blend): Disambiguate for meddlesome compilers' warning against `for ( ...; ...; ...) ;'. 2008-10-14 Werner Lemberg <wl@gnu.org> * src/cff/cffobjs.c (cff_face_init): Remove compiler warning. Suggested by Bram Tassyns in Savannah patch #6651. 2008-10-12 Graham Asher <graham.asher@btinternet.com> * src/sfnt/sfobjs.c (sfnt_load_face): Fix computation of `underline_position'. 2008-10-12 Werner Lemberg <wl@gnu.org> * docs/CHANGES: Updated. 2008-10-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Fix Savannah bug #24468. According to include/freetype/internal/ftobjs.h, the appropriate type to interchange single character codepoint is FT_UInt32. It should be distinguished from FT_UInt which can be 16bit integer. * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Change the type of the second argument `pcharcode' from FT_UInt* to FT_UInt32*. (tt_cmap4_char_map_binary): Ditto. (tt_cmap14_get_nondef_chars): Change the type of return value from FT_UInt* to FT_UInt32*. 2008-10-08 John Tytgat <John.Tytgat@esko.com> Fix Savannah bug #24485. * src/type1/t1load.c (parse_charstrings): Assure that we always have a .notdef glyph. 2008-10-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * src/base/ftmac.c: Include FT_TRUETYPE_TAGS_H for multi build. * builds/mac/ftmac.c: Ditto. 2008-10-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * include/freetype/tttags.h (TTAG_TYP1, TTAG_typ1): Fix definitions. * src/base/ftobjs.c: Include FT_TRUETYPE_TAGS_H. 2008-10-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * src/sfnt/sfobjs.c (sfnt_open_font): Allow `typ1' version tag in the beginning of sfnt container. * src/sfnt/ttload.c (check_table_dir): Return `SFNT_Err_Table_Missing' when sfnt table directory structure is correct but essential tables for TrueType fonts (`head', `bhed' or `SING') are missing. Other errors are returned by SFNT_Err_Unknown_File_Format. * src/base/ftobjs.c (FT_Open_Face): When TrueType driver returns `FT_Err_Table_Missing', try `open_face_PS_from_sfnt_stream'. It is enabled only when old mac font support is configured. 2008-10-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * include/freetype/tttags.h (TTAG_CID, TTAG_FOND, TTAG_LWFN, TTAG_POST, TTAG_sfnt, TTAG_TYP1, TTAG_typ1): New tags to simplify the repeated calculations of these values in ftobjs.c and ftmac.c. * src/base/ftobjs.c: Replace all FT_MAKE_TAG by new tags. * src/base/ftmac.c: Ditto. * builds/mac/ftmac.c: Ditto. 2008-10-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * src/base/ftobjs.c (ft_lookup_PS_in_sfnt_stream): Remove wrong initialization of *is_sfnt_cid. 2008-10-04 Werner Lemberg <wl@gnu.org> * src/base/ftobjs.c (open_face_PS_from_sfnt_stream): Remove compiler warnings. 2008-10-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * src/base/ftobjs.c (ft_lookup_PS_in_sfnt): Replaced by... (ft_lookup_PS_in_sfnt_stream): This. (open_face_PS_from_sfnt_stream): New function. It checks whether the stream is sfnt-wrapped Type1 PS font or sfnt-wrapped CID-keyed font, then try to open a face for given face_index. (Mac_Read_sfnt_Resource): Replace the combination of `ft_lookup_PS_in_sfnt' and `open_face_from_buffer' by `open_face_PS_from_sfnt_stream'. * src/base/ftmac.c (FT_New_Face_From_SFNT): Ditto. * builds/mac/ftmac.c (FT_New_Face_From_SFNT): Ditto. * src/base/ftbase.h: Remove `ft_lookup_PS_in_sfnt' and add `open_face_PS_from_sfnt_stream'. 2008-10-03 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * src/base/ftobjs.c (ft_lookup_PS_in_sfnt): Set *is_sfnt_cid to FALSE if neither `CID ' nor `TYP1' is found in the sfnt container. 2008-10-03 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * include/freetype/config/ftconfig.h: Define FT_MACINTOSH when SC or MrC compiler of MPW is used. These compilers do not define the macro __APPLE__ by themselves. * builds/unix/ftconfig.in: Ditto. * builds/vms/ftconfig.h: Ditto. * src/base/ftbase.c: Use FT_MACINTOSH instead of __APPLE__, to include ftmac.c if FreeType 2 is built by MPW. * src/base/ftobjs.c: Use FT_MACINTOSH instead of __APPLE__, to enable shared functions for ftmac.c if FreeType 2 is built by MPW. * builds/mac/ftmac.c: Include ftbase.h. (memory_stream_close): Removed. (new_memory_stream): Ditto. (open_face_from_buffer): Removed. Use the implementation in ftobjs.c. (ft_lookup_PS_in_sfnt): Ditto. * builds/mac/FreeType.m68k_far.make.txt: Build ftmac.c as an included part of ftbase.c, to share the functions in ftobjs.c. The rule compiling ftmac.c separately is removed and the rule copying ftbase.c from src/base/ftbase.c to builds/mac/ftbase.c is added. * builds/mac/FreeType.m68k_cfm.make.txt: Ditto. * builds/mac/FreeType.ppc_classic.make.txt: Ditto. * builds/mac/FreeType.ppc_carbon.make.txt: Ditto. 2008-10-02 Bram Tassyns <bramt@enfocus.be> * src/cff/cffgload.c (cff_slot_load): Map CID 0 to GID 0. This fixes Savannah bug #24430. 2008-10-02 Werner Lemberg <wl@gnu.org> * builds/freetype.mk (BASE_H): Rename to... (INTERNAL_H): This. (FREETYPE_H): Updated. * src/base/rules.mk: (BASE_OBJ_S, OBJ_DIR/%.$O): Add BASE_H. * src/bdf/rules.mk (BDF_DRV_H): Add bdferror.h. * src/cache/rules.mk (CACHE_DRV_H): Add ftccache.h and ftcsbits.h. * src/pcf/rules.mk (PCF_DRV_H): Add pcfread.h. * src/raster/rules.mk (RASTER_DRV_H): Add ftmisc.h. * src/type42/rules.mk (T42_DRV_H): Add t42types.h. 2008-10-02 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * src/base/ftbase.h: New file to declare the private utility functions shared by the sources of base modules. Currently, `ft_lookup_PS_in_sfnt' and `open_face_from_buffer' are declared to share between ftobjs.c and ftmac.c. * src/base/rule.mk: Add ftbase.h. * src/base/ftobjs.c: Include ftbase.h. (memory_stream_close): Build on any platform when old MacOS font support is enabled. (new_memory_stream): Ditto. (open_face_from_buffer): Build on any platform when old MacOS font support is enabled. The counting of the face in a font file is slightly different between Carbon-dependent parser and Carbon-free parser. They are merged with the platform-specific conditional. (ft_lookup_PS_in_sfnt): Ditto. * src/base/ftmac.c: Include ftbase.h. (memory_stream_close): Removed. (new_memory_stream): Ditto. (open_face_from_buffer): Removed. Use the implementation in ftobjs.c. (ft_lookup_PS_in_sfnt): Ditto. 2008-10-02 Werner Lemberg <wl@gnu.org> * src/sfnt/sfobjs.c (sfnt_load_face): `psnames_error' is only needed if TT_CONFIG_OPTION_POSTSCRIPT_NAMES is defined. 2008-10-01 Werner Lemberg <wl@gnu.org> * src/truetype/ttobjs.c (tt_face_done), src/cff/cffobjs.c (cff_face_done), src/pfr/pfrobjs.c (pfr_face_done), src/pcf/pcfdrivr.c (PCF_Face_Done), src/cid/cidobjs.c (cid_face_done), src/bdf/bdfdrivr. (BDF_Face_Done), src/sfnt/sfobjs.c (sfnt_face_done): Protect against face == 0. Reported by Graham Asher. 2008-09-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * src/base/rules.mk: Add conditional source to BASE_SRC, for `make multi' on Mac OS X. If the macro $(ftmac_c) is defined, $(BASE_DIR)/$(ftmac_c) is added to BASE_SRC. In a normal build, the lack of ftmac.c in BASE_SRC is not serious because ftbase.c includes ftmac.c. * builds/unix/unix-def.in: Add a macro definition of $(ftmac_c). * builds/unix/configure.raw: Add procedure to set up appropriate value of $(ftmac_c) with the consideration of the availability of Carbon framework. 2008-09-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * src/base/Jamfile: Add target for multi build by jam on Mac OS X. * src/base/ftobjs.c (FT_New_Face): Fix the condition to include this function for MPW building. It is synchronized the condition to include ftmac.c source into ftbase.c. 2008-09-22 Werner Lemberg <wl@gnu.org> * src/cff/cffgload.c (CFF_Operator, cff_argument_counts, cff_decoder_parse_charstrings): Handle (invalid) `callothersubr' and `pop' instructions. 2008-09-22 John Tytgat <John.Tytgat@esko.com> Fix Savannah bug #24307. * include/freetype/internal/t1types.h (CID_FaceRec), src/type42/t42types.h (T42_FaceRec): Comment out `afm_data'. 2008-09-21 Werner Lemberg <wl@gnu.org> * src/smooth/ftgrays.c (gray_raster_render): Don't dereference `target_map' if FT_RASTER_FLAG_DIRECT is set. Problem reported by Stephan T. Lavavej <stl@nuwen.net>. 2008-09-21 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * src/otvalid/Jamfile: Add missing target `otvmath' for multi build by jam. * src/sfnt/Jamfile: Add missing target `ttmtx' for multi build by jam. 2008-09-20 Werner Lemberg <wl@gnu.org> * src/smooth/ftgrays.c (gray_find_cell): Fix threshold. The values passed to this function are already `normalized'. Problem reported by Stephan T. Lavavej <stl@nuwen.net>. * docs/CHANGES: Document it. 2008-09-20 Werner Lemberg <wl@gnu.org> * src/base/ftoutln.c: Include FT_INTERNAL_DEBUG_H. (FT_Outline_Decompose): Decorate with tracing messages. * src/smooth/ftgrays.c [DEBUG_GRAYS]: Replace with FT_DEBUG_LEVEL_TRACE. [_STANDALONE_ && FT_DEBUG_LEVEL_TRACE]: Include stdio.h and stdarg.h. (FT_TRACE) [_STANDALONE_]: Remove. (FT_Message) [_STANDALONE_ && FT_DEBUG_LEVEL_TRACE]: New function. (FT_TRACE5, FT_TRACE7) [_STANDALONE_]: New macros. (FT_ERROR) [_STANDALONE_]: Updated. (gray_hline) [FT_DEBUG_LEVEL_TRACE]: Fix condition. Use FT_TRACE7. (gray_dump_cells): Make it `static void'. (gray_convert_glyph): Use FT_TRACE7. (FT_Outline_Decompose) [_STANDALONE_]: Synchronize with version in ftoutln.c. * src/base/ftadvanc.c (FT_Get_Advance, FT_Get_Advances): Use FT_ERROR_BASE. * docs/formats.txt: Updated. 2008-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * src/base/ftmac.c: Import sfnt-wrapped Type1 and sfnt-wrapped CID-keyed font support. * builds/mac/ftmac.c: Ditto. 2008-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Fix double free bug in sfnt-wrapped Type1 and sfnt-wrapped CID-keyed font support code. `open_face_from_buffer' frees the passed buffer if it cannot open a face from the buffer, so the caller must not free it. 2008-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Add initial support for sfnt-wrapped Type1 and sfnt-wrapped CID-keyed font. (ft_lookup_PS_in_sfnt): New function to look up `TYP1' or `CID ' table in sfnt table directory. It is used before loading TrueType font driver. * docs/CHANGES: Add note about the current status of sfnt-wrapped Type1 and sfnt-wrapped CID-keyed font support. 2008-09-18 Werner Lemberg <wl@gnu.org> * src/base/ftsystem.c (FT_Done_Memory): Use ft_sfree directly for orthogonality (ft_free and ft_sfree could belong to different memory pools). This fixes Savannah bug #24297. 2008-09-18 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * src/cff/cffobjs.c (cff_face_init): Use TTAG_OTTO defined in tttags.h instead of numerical value 0x4F54544FL. 2008-09-16 Werner Lemberg <wl@gnu.org> * src/cff/cffgload.h, src/cff/cffgload.c (cff_decoder_set_width_only): Eliminate function call. 2008-09-15 George Williams <gww@silcom.com> Fix Savannah bug #24179, reported by Bram Tassyns. * src/type1/t1load.c (mm_axis_unmap, T1_Get_MM_Var): Fix computation of default values. 2008-09-15 Werner Lemberg <wl@gnu.org> * src/tools/glnames.py (main): Surround `ft_get_adobe_glyph_index' and `ft_adobe_glyph_list' with FT_CONFIG_OPTION_ADOBE_GLYPH_LIST to prevent unconditional definition. This fixes Savannah bug #24241. * src/psnames/pstables.h: Regenerated. 2008-09-13 Werner Lemberg <wl@gnu.org> * autogen.sh, builds/unix/configure.raw, include/freetype/config/ftconfig.h, builds/unix/ftconfig.in: Minor beautifying. * include/freetype/ftadvanc.h, include/freetype/ftgasp.h, include/freetype/ftlcdfil.h: Protect against FreeType 1. Some other minor fixes. * devel/ftoption.h: Synchronize with include/freetype/config/ftoption.h. 2008-09-11 Werner Lemberg <wl@gnu.org> * src/base/ftbase.c: Include ftadvanc.c. 2008-09-11 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * builds/unix/ftconfig.in: Duplicate the cpp computation of FT_SIZEOF_{INT|LONG} from include/freetype/config/ftconfig.h. (FT_USE_AUTOCONF_SIZEOF_TYPES): New macro. If defined, the cpp computation is disabled and the statically configured sizes are used. This fixes Savannah bug #21250. * builds/unix/configure.raw: Add the checks to compare the cpp computation results of the bit length of int and long versus the sizes detected by running `configure'. If the results are different, FT_USE_AUTOCONF_SIZEOF_TYPES is defined to prioritize the results. New option --{enable|disable}-biarch-config is added to define or undefine FT_USE_AUTOCONF_SIZEOF_TYPES manually. 2008-09-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * builds/unix/configure.raw: Clear FT2_EXTRA_LIBS when Carbon or ApplicationServices framework is missing. Although this value is not used in building of FreeType2, it is written in `freetype2.pc' and `freetype-config'. 2008-09-01 David Turner <david@freetype.org> * src/cache/ftccmap.c (FTC_CMapCache_Lookup): Accept a negative cmap index to mean `use default cached FT_Face's charmap'. This fixes Savannah bug #22625. * include/freetype/ftcache.h: Document it. Make FT_MulFix an inlined function. This is done to speed up FreeType a little (on x86 3% when loading+hinting, 10% when rendering, ARM savings are more important though). Disable this by undefining FT_CONFIG_OPTION_INLINE_MULFIX. Use of assembler code can now be controlled with FT_CONFIG_OPTION_NO_ASSEMBLER. * include/freetype/config/ftconfig.h, builds/unix/ftconfig.in [!FT_CONFIG_OPTION_NO_ASSEMBLER] (FT_MulFix_arm): New assembler implementation. [!FT_CONFIG_OPTION_NO_ASSEMBLER] (FT_MulFix_i386): Assembler implementation taken from `ftcalc.c'. [!FT_CONFIG_OPTION_NO_ASSEMBLER] (FT_MULFIX_ASSEMBLER): New macro which is defined to the platform-specific assembler implementation of FT_MulFix. [FT_CONFIG_OPTION_INLINE_MULFIX && FT_MULFIX_ASSEMBLER] (FT_MULFIX_INLINED): New macro. * include/freetype/config/ftoption.h (FT_CONFIG_OPTION_NO_ASSEMBLER, FT_CONFIG_OPTION_INLINE_MULFIX): New macros. * include/freetype/freetype.h: Updated to handle FT_MULFIX_INLINED. * src/base/ftcalc.c: Updated to use FT_MULFIX_ASSEMBLER and FT_MULFIX_INLINED. Add a new header named FT_ADVANCES_H declaring some new APIs to extract the advances of one or more glyphs without necessarily loading their outlines. Also provide `fast loaders' for the TrueType, Type1, and CFF font drivers (more to come later). * src/base/ftadvanc.c, include/freetype/ftadvanc.h: New files. * include/freetype/config/ftheader.h (FT_ADVANCES_H): New macro. * include/freetype/freetype.h (FT_LOAD_ADVANCE_ONLY): New macro. * include/freetype/internal/ftdriver.h (FT_Face_GetAdvancesFunc): `flags' and `advances' are now of type `FT_UInt' and `FT_Fixed', respectively. * src/base/Jamfile (_sources), src/base/rules.mk (BASE_SRC): Add ftadvanc.c. * src/cff/cffdrivr.c (cff_get_advances): New function. (cff_driver_class): Register it. * src/cff/cffgload.c (cff_decoder_set_width_only): New function. (cff_decoder_parse_charstrings): Handle `width_only'. (cff_slot_load): Handle FT_LOAD_ADVANCE_ONLY. * src/cff/cffgload.h (cff_decoder): New element `width_only'. (cff_decoder_set_width_only): New declaration. * src/truetype/ttdriver.c (tt_get_advances): New function. (tt_driver_class): Register it. * src/truetype/ttgload.c (Get_HMetrics, Get_VMetrics): Renamed to... (TT_Get_HMetrics, TT_Get_VMetrics): This. Update callers. * src/truetype/ttgload.h: Declare them. * src/type1/t1gload.h, src/type1/t1gload.c (T1_Get_Advances): New function. * src/type1/t1driver.c (t1_driver_class): Register T1_Get_Advances. Add checks for minimum version of the `autotools' stuff. * autogen.sh: Implement it. (get_major_version, get_minor_version, get_patch_version, compare_to_minimum_version, check_tool_version): New auxiliary functions. * README.CVS: Document it. 2008-08-29 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * src/sfnt/sfobjs.c (sfnt_open_font): Use TTAG_OTTO defined in tttags.h instead of FT_MAKE_TAG( 'O', 'T', 'T', 'O' ). 2008-08-28 Werner Lemberg <wl@gnu.org> * src/type1/t1load.c (parse_encoding): Protect against infinite loop. This fixes Savannah bug #24150 (where a patch has been posted too). 2008-08-23 Werner Lemberg <wl@gnu.org> * src/type/t1afm.c (compare_kern_pairs), src/psaux/afmparse.c (afm_compare_kern_pairs): Fix comparison. This fixes Savannah bug #24119. 2008-08-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * src/base/ftobjs.c (FT_Stream_New): Initialize *astream always, even if passed library or arguments are invalid. This fixes a bug that an uninitialized stream is freed when an invalid library handle is passed. Originally proposed by Mike Fabian, 2008/08/18 on freetype-devel. (FT_Open_Face): Ditto (stream). (load_face_in_embedded_rfork): Ditto (stream2). 2008-08-18 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * src/base/ftmac.c: Add a fallback to guess the availability of the `ResourceIndex' type. It is used when built without configure (e.g., a build with Jam). * builds/mac/ftmac.c: Ditto. * builds/unix/configure.raw: Set HAVE_TYPE_RESOURCE_INDEX to 1 or 0 explicitly, even if `ResourceIndex' is unavailable. 2008-08-18 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * builds/unix/configure.raw: In checking of Mac OS X features, all-in-one header file `Carbon.h' is replaced by the minimum header file `CoreServices.h', similar to current src/base/ftmac.c. 2008-08-18 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * src/sfnt/ttcmap.c (tt_cmap2_validate): Skip the validation of sub-header when its code_count is 0. Many Japanese Dynalab fonts include such an empty sub-header (code_count == 0, first_code == 0 delta == 0, but offset != 0) as the second sub-header in SJIS cmap. 2008-08-04 Werner Lemberg <wl@gnu.org> * src/type1/t1tokens.h: Handle `ForceBold' keyword. This fixes Savannah bug #23995. * src/cid/cidload.c (parse_expansion_factor): New callback function. (cid_field_records): Use it for `ExpansionFactor'. * src/cod/cidtoken.h: Handle `ForceBold' keyword. Don't handle `ExpansionFactor'. 2008-08-04 Bram Tassyns <bramt@enfocus.be> * src/cff/cffparse.c (cff_parse_fixed_scaled): Fix thinko which resulted in incorrect scaling. This fixes Savannah bug #23973. 2008-08-04 Werner Lemberg <wl@gnu.org> Be more tolerant w.r.t. invalid entries in SFNT table directory. * src/sfnt/ttload.c (check_table_dir): Ignore invalid entries and adjust table count. Add more trace messages. (tt_face_load_font_dir): Updated. 2008-07-30 Werner Lemberg <wl@gnu.org> * src/cff/cffgload.c (cff_decoder_parse_charstrings): No longer assume that the first argument on the stack is the bottom-most element. Two reasons: o According to people from Adobe it is missing in the Type 2 specification that pushing of additional, superfluous arguments on the stack is prohibited. o Acroread in general handles fonts differently, namely by popping the number of arguments needed for a particular operand (as a PS interpreter would do). In case of buggy fonts this causes a different interpretation which of the elements on the stack are superfluous and which not. Since there are CFF subfonts (embedded in PDFs) which rely on Acroread's behaviour, FreeType now does the same. 2008-07-27 Werner Lemberg <wl@gnu.org> Add extra mappings for `Tcommaaccent' and `tcommaaccent'. This fixes Savannah bug #23940. * src/psnames/psmodule.c (WGL_EXTRA_LIST_SIZE): Rename to... (EXTRA_GLYPH_LIST_SIZE): This. Increase by 2. (ft_wgl_extra_unicodes): Rename to... (ft_extra_glyph_unicodes): This. Add two code values. (ft_wgl_extra_glyph_names): Rename to... (ft_extra_glyph_names): This. Add two glyphs. (ft_wgl_extra_glyph_name_offsets): Rename to... (ft_extra_glyph_name_offsets): This. Add two offsets. (ps_check_wgl_name, ps_check_wgl_unicode): Rename to... (ps_check_extra_glyph_name, ps_check_extra_glyph_unicode): This. Updated. (ps_unicodes_init): Updated. 2008-07-26 Werner Lemberg <wl@gnu.org> * src/cff/cffgload.c (cff_decoder_prepare, cff_decoder_parse_charstrings): Improve debug output. 2008-07-22 Martin McBride <mmcbride@emtex.com> * src/sfnt/ttcmap.c (tt_cmap4_validate, tt_cmap4_char_map_linear, tt_cmap4_char_map_binary): Handle fonts which treat the last segment specially. According to the specification, such fonts would be invalid but acroread accepts them. 2008-07-16 Jon Foster <Jon.Foster@cabot.co.uk> * src/pfr/pfrdrivr.c (pfr_get_advance): Fix off-by-one error. * src/base/ftcalc.c (FT_MulFix): Fix portability issue. * src/sfnt/ttpost.c (MAC_NAME) [!FT_CONFIG_OPTION_POSTSCRIPT_NAMES]: Fix compiler warning. 2008-07-16 Werner Lemberg <wl@gnu.org> Handle CID-keyed fonts wrapped in an SFNT (with cmaps) correctly. * src/cff/cffload.c (cff_font_load): Pass `pure_cff'. Invert sids table only if `pure_cff' is set. * src/cff/cffload.h: Updated. * src/cff/cffobjs.c (cff_face_init): Updated. Set FT_FACE_FLAG_CID_KEYED only if pure_cff is set. * docs/CHANGES: Updated. 2008-07-09 Werner Lemberg <wl@gnu.org> * src/truetype/ttpload.c (tt_face_load_loca): Handle buggy fonts where num_locations < num_glyphs. Problem reported by Ding Li. 2008-07-05 Werner Lemberg <wl@gnu.org> Since FreeType uses `$(value ...)', we now need GNU make 3.80 or newer. This fixes Savannah bug #23648. * configure: zsh doesn't like ${1+"$@"}. Update needed GNU make version. * builds/toplevel.mk: Check for `$(eval ...)'. * docs/INSTALL.GNU, docs/INSTALL.CROSS, docs/INSTALL.UNIX: Document it. 2008-07-04 Werner Lemberg <wl@gnu.org> * src/raster/ftraster.c (Draw_Sweep): If span is smaller than one pixel, only check for dropouts if neither start nor end point lies on a pixel center. This fixes Savannah bug #23762. 2008-06-29 Werner Lemberg <wl@gnu.org> * Version 2.3.7 released. ========================= Tag sources with `VER-2-3-7'. * docs/CHANGES, docs/VERSION.DLL: Update documentation and bump version number to 2.3.7. * README, Jamfile (RefDoc), builds/win32/visualc/index.html, builds/win32/visualc/freetype.dsp, builds/win32/visualc/freetype.vcproj, builds/win32/visualce/index.html, builds/win32/visualce/freetype.dsp, builds/win32/visualce/freetype.vcproj: s/2.3.6/2.3.7/, s/236/237/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 7. * builds/unix/configure.raw (version_info): Set to 9:18:3. * docs/release: Updated. 2008-06-28 Werner Lemberg <wl@gnu.org> * src/ftglyph.c (FT_Matrix_Multiply, FT_Matrix_Invert): Move to... * src/ftcalc.c: Here. This fixes Savannah bug #23729. 2008-06-27 Werner Lemberg <wl@gnu.org> * src/raster/ftraster.c (Vertical_Sweep_Drop, Horizontal_Sweep_Drop, Horizontal_Gray_Sweep_Drop): Test for intersections which degenerate to a single point can be ignored; this has been confirmed by Greg Hitchcock from Microsoft. (This was commented out code.) 2008-06-26 Werner Lemberg <wl@gnu.org> Improve navigation in API reference. * src/tools/docmaker/tohtml.py (html_header_3): Renamed to... (html_header_6): This. (html_header_3, html_header_3i, html_header_4, html_header_5, html_header_5t): New strings. (toc_footer_start, toc_footer_end): New strings. (HtmlFormatter::html_header): Updated. (HtmlFormatter::html_index_header, HtmlFormatter::html_toc_header): New strings. (HtmlFormatter::index_enter): Use `html_index_header'. (HtmlFormatter::index_exit): Print `html_footer'. (HtmlFormatter::toc_enter): Use `html_toc_header'. (HtmlFormatter::toc_exit): Print proper footer. Convert ~ to non-breakable space. * src/tools/docmaker/tohtml.py (make_html_para): Implement it. Update header files accordingly. 2008-06-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * builds/unix/configure.raw: Check type `ResourceIndex' explicitly and define HAVE_TYPE_RESOURCE_INDEX if it is defined. Mac OS X 10.5 bundles 10.4u SDK with MAC_OS_X_VERSION_10_5 macro but without ResourceIndex type definition. The macro does not inform the type availability. * src/base/ftmac.c: More parentheses are inserted to clarify the conditionals to disable legacy APIs in `10.5 and later' cases. If HAVE_TYPE_RESOURCE_INDEX is not defined, ResourceIndex is defined. 2008-06-24 Werner Lemberg <wl@gnu.org> * src/truetype/ttinterp.c (Ins_SCANTYPE): Don't check rendering mode. * src/raster/ftraster.c (Render_Glyph, Render_Gray_Glyph, Draw_Sweep): No-dropout mode is value 2, not value 0. (Draw_Sweep): Really skip dropout handling for no-dropout mode. 2008-06-24 Werner Lemberg <wl@gnu.org> * src/psaux/psobjs.c (t1_builder_close_contour): Don't add contour if it consists of one point only. Based on a patch from Savannah bug #23683 (from John Tytgat). 2008-06-22 Werner Lemberg <wl@gnu.org> * src/truetype/ttgload.c (TT_Load_Glyph): Protect bytecode stuff with IS_HINTED. * docs/CHANGES: Updated. 2008-06-22 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * builds/unix/configure.raw: If CFLAGS has `-isysroot XXX' option but LDFLAGS does not, import it to LDFLAGS. The option is used to specify non-default SDK on Mac OS X (e.g., universal binary SDK for Mac OS X 10.4 on PowerPC platform). Although Apple TechNote 2137 recommends to add the option only to CFLAGS, LDFLAGS should include it because libfreetype.la is built with -no-undefined. This fixes a bug reported by Ryan Schmidt in MacPorts, https://trac.macports.org/ticket/15331. 2008-06-21 Werner Lemberg <wl@gnu.org> Enable access to the various dropout rules of the B&W rasterizer. Pass dropout rules from the TT bytecode interpreter to the rasterizer. * include/freetype/ftimage.h (FT_OUTLINE_SMART_DROPOUTS, FT_OUTLINE_EXCLUDE_STUBS): New flags for FT_Outline. * src/raster/ftraster.c (Vertical_Sweep_Drop, Horizontal_Sweep_Drop, Horizontal_Gray_Sweep_Drop): Use same mode numbers as given in the OpenType specification. Fix mode 4 computation. (Render_Glyph, Render_Gray_Glyph): Handle new outline flags. * src/truetype/ttgload.c (TT_Load_Glyph) Convert scan conversion mode to FT_OUTLINE_XXX flags. * src/truetype/ttinterp.c (Ins_SCANCTRL): Enable ppem check. 2008-06-19 Werner Lemberg <wl@gnu.org> * src/cff/cffobjs.c (cff_face_init): Compute final `dict->units_per_em' value before assigning it to `cffface->units_per_EM'. Otherwise, CFFs without subfonts are scaled incorrectly if the font matrix is non-standard. This fixes Savannah bug #23630. * docs/CHANGES: Updated. 2008-06-19 Werner Lemberg <wl@gnu.org> * src/type/t1objs.c (T1_Face_Init): Slightly improve algorithm fix from 2008-06-19. 2008-06-18 Werner Lemberg <wl@gnu.org> * src/type/t1objs.c (T1_Face_Init): Fix change from 2008-03-21. Reported by Peter Weilbacher <mozilla@weilbacher.org>. * docs/CHANGES: Updated. 2008-06-15 George Williams <gww@silcom.com> * src/otvalid/otvgpos.c (otv_MarkBasePos_validate): Set `valid->extra2' to 1. This is undocumented in the OpenType 1.5 specification. 2008-06-15 Werner Lemberg <wl@gnu.org> * src/base/ftcalc.c (FT_MulFix) <asm>: Protect registers correctly from clobbering. Patch from Savannah bug report #23556. * docs/CHANGES: Document it. 2008-06-10 Werner Lemberg <wl@gnu.org> * autogen.sh: Add option `--install' to libtoolize. 2008-06-10 Werner Lemberg <wl@gnu.org> * Version 2.3.6 released. ========================= Tag sources with `VER-2-3-6'. * docs/CHANGES, docs/VERSION.DLL: Update documentation and bump version number to 2.3.6. * README, Jamfile (RefDoc), builds/win32/visualc/index.html, builds/win32/visualc/freetype.dsp, builds/win32/visualc/freetype.vcproj, builds/win32/visualce/index.html, builds/win32/visualce/freetype.dsp, builds/win32/visualce/freetype.vcproj: s/2.3.5/2.3.6/, s/235/236/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 6. * builds/unix/configure.raw (version_info): Set to 9:17:3. * include/freetype/internal/psaux.h (T1_BuilderRec): Remove `scale_x' and `scale_y'. * src/cff/cffgload.h (CFF_Builder): Remove `scale_x' and `scale_y'. * src/cff/cffparse.c: Include FT_INTERNAL_DEBUG_H. * src/cff/cffobjs.h: Include FT_INTERNAL_POSTSCRIPT_HINTS_H. 2008-06-10 Werner Lemberg <wl@gnu.org> * src/base/ftobjs.c (open_face): Check `clazz->init_face' and `clazz->done_face'. 2008-06-09 VaDiM <s_sliva@rambler.ru> Support debugging on WinCE. From Savannah patch #6536; this fixes bug #23497. * builds/win32/ftdebug.c (OutputDebugStringEx): New function/macro as a replacement for OutputDebugStringA (which WinCE doesn't have). Update all callers. (ft_debug_init) [_WIN32_CE]: WinCE apparently doesn't have environment variables. 2008-06-09 Werner Lemberg <wl@gnu.org> * README.CVS: Updated. * builds/unix/configure.raw, builds/unix/freetype-config.in: Updated for newer versions of autoconf and friends. 2008-06-08 Werner Lemberg <wl@gnu.org> * src/type1/t1parse.h (T1_ParserRec): Make `base_len' and `private_len' unsigned. * src/type1/t1parse.c (read_pfb_tag): Make `asize' unsigned and read it as such. (T1_New_Parser, T1_Get_Private_Dict): Make `size' unsigned. * src/base/ftstream.c (FT_Stream_Skip): Reject negative values. * src/type1/t1load.c (parse_blend_design_positions): Check `n_axis' for sane value. Fix typo. * src/psaux/psobjs.c (ps_table_add): Check `idx' correctly. * src/truetype/ttinterp (Ins_SHC): Use BOUNDS() to check `last_point'. * src/sfnt/ttload.c (tt_face_load_max_profile): Limit `maxTwilightPoints'. 2008-06-06 Werner Lemberg <wl@gnu.org> * src/truetype/ttinterp.c (Ins_IP): Handle case `org_dist == 0' correctly. This fixes glyphs `t' and `h' of Arial Narrow at 12ppem. 2008-06-03 Werner Lemberg <wl@gnu.org> * include/freetype/ftcache.h (FTC_FaceID): Change type back to FT_Pointer. Reported by Ian Britten <britten@caris.com>. 2008-06-02 Werner Lemberg <wl@gnu.org> Emit header info for defined FreeType objects in reference. * src/tools/docmaker/content.py (re_header_macro): New regexp. (ContentProcessor::__init__): Initialize new dictionary `headers'. (DocBlock::__init__): Collect macro header definitions. * src/tools/docmaker/tohtml.py (header_location_header, header_location_footer): New strings. (HtmlFormatter::__init__): Pass `headers' dictionary. (HtmlFormatter::print_html_field): Don't emit paragraph tags. (HtmlFormatter::print_html_field_list): Emit empty paragraph. (HtmlFormatter::block_enter): Emit header info. 2008-06-01 Werner Lemberg <wl@gnu.org> * include/freetype/config/ftheader.h (FT_UNPATENTED_HINTING_H, FT_INCREMENTAL_H): Added. 2008-05-28 Werner Lemberg <wl@gnu.org> * src/tools/docmaker/sources.py (SourceBlock::__init__): While looking for markup tags, return immediately as soon a single one is found. 2008-05-28 Werner Lemberg <wl@gnu.org> * src/truetype/ttinterp.c (Ins_MD): The MD instruction also uses original, unscaled input values. Confirmed by Greg Hitchcock from Microsoft. 2008-05-27 Werner Lemberg <wl@gnu.org> * src/tools/docmaker/tohtml.py (block_footer_start, block_footer_middle): Beautify output. 2008-05-25 Werner Lemberg <wl@gnu.org> * src/raster/ftraster.c (fc_black_render): Return 0 when we are trying to render into a zero-width/height bitmap, not an error code. * src/truetype/ttgload.c (load_truetype_glyph): Move initialization of the graphics state for subglyphs to... (TT_Hint_Glyph): This function. Hinting instructions for a composite glyph apparently refer to the just hinted subglyphs, not the unhinted, unscaled outline. This seems to fix Savannah bugs #20973 and (at least partially) #23310. 2008-05-20 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * src/base/ftmac.c (FT_New_Face_From_Suitcase): Check if valid `aface' is returned by FT_New_Face_From_FOND(). The patch was proposed by an anonymous reporter of Savannah bug #23204. 2008-05-18 Werner Lemberg <wl@gnu.org> * src/pshinter/pshalgo.c (ps_hints_apply): Reset scale values after correction for pixel boundary. Without this patch, the effect can be cumulative under certain circumstances, making glyphs taller and taller after each call. This fixes Savannah bug #19976. 2008-05-18 Werner Lemberg <wl@gnu.org> * src/base/ftdebug.c (FT_Message, FT_Panic): Send output to stderr. This fixes Savannah bug #23280. * docs/CHANGES: Updated. 2008-05-18 David Turner <david@freetype.org> * src/psnames/psmodule.c (ft_wgl_extra_unicodes, ft_wgl_extra_glyph_names, ft_wgl_extra_glyph_name_offsets, ps_check_wgl_name, ps_check_wgl_unicode): Use `static' to make declarations non-global. * src/type1/t1load.c: Add missing comment. 2008-05-17 Sam Hocevar <samh> * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Handle zero-contour glyphs correctly. Patch from Savannah bug #23277. 2008-05-16 Werner Lemberg <wl@gnu.org> * docs/CHANGES: Updated. 2008-05-16 Sergey Tolstov <stolstov@esri.com> Improve support for WGL4 encoded fonts. * src/psnames/psmodule.c (WGL_EXTRA_LIST_SIZE): New macro. (ft_wgl_extra_unicodes, ft_wgl_extra_glyph_names, ft_wgl_extra_glyph_name_offsets): New arrays. (ps_check_wgl_name, ps_check_wgl_unicode): New functions. (ps_unicodes_init): Use them to add additional Unicode mappings. 2008-05-15 Werner Lemberg <wl@gnu.org> * src/psaux/t1decode.c (t1_decoder_parse_charstrings) <op_closepath>: `closepath' without a path is a no-op, not an error (cf. the PS reference manual). Reported by Martin McBride. 2008-05-15 Werner Lemberg <wl@gnu.org> * builds/toplevel.mk (CONFIG_GUESS, CONFIG_SUB): Updated. 2008-05-15 Werner Lemberg <wl@gnu.org> * src/type1/t1load.c (parse_subrs): Accept fonts with a subrs array which contains a single but empty entry. This is technically invalid (since it must end with `return'), but... Reported by Martin McBride. 2008-05-14 Werner Lemberg <wl@gnu.org> Finish fix of scaling bug of CID-keyed CFF subfonts. * include/freetype/internal/ftcalc.h, src/base/ftcalc.c (FT_Matrix_Multiply_Scaled, FT_Vector_Transform_Scaled): New functions. * src/cff/cffobjs.h (CFF_Internal): New struct. It is used to provide global hinting data for both the top-font and all subfonts (with proper scaling). * src/cff/cffobjs.c (cff_make_private_dict): New function, using code from `cff_size_init'. (cff_size_init, cff_size_done, cff_size_select, cff_size_request): Use CFF_Internal and handle subfonts. (cff_face_init): Handle top-dict and subfont matrices correctly; apply some heuristic in case of unlikely matrix concatenation results. This has been discussed with people from Adobe (thanks goes mainly to David Lemon) who confirm that the CFF specs are fuzzy and not correct. * src/cff/cffgload.h (cff_decoder_prepare): Add `size' argument. * src/cff/cffgload.c (cff_builder_init): Updated. (cff_decoder_prepare): Handle hints globals for subfonts. Update all callers. (cff_slot_load): Handling scaling of subfonts properly. * src/cff/cffparse.c (cff_parse_fixed_dynamic): New function. (cff_parse_font_matrix): Use it. * src/cff/cfftypes.h (CFF_FontDictRec): Make `units_per_em' FT_ULong. * docs/CHANGES: Document it. 2008-05-13 Werner Lemberg <wl@gnu.org> * src/winfonts/winfnt.c (fnt_face_get_dll_font, FNT_Face_Init): Handle case `face_index < 0'. * docs/CHANGES: Document it. 2008-05-04 Werner Lemberg <wl@gnu.org> First steps to fix the scaling bug of CID-keyed CFF subfonts, reported by Ding Li on 2008/03/28 on freetype-devel. * src/base/cff/cffparse.c (power_tens): New array. (cff_parse_real): Rewritten to introduce a fourth parameter which returns the `scaling' of the real number so that we have no precision loss. This is not used yet. Update all callers. (cff_parse_fixed_thousand): Replace with... (cff_parse_fixed_scaled): This function. Update all callers. 2008-05-03 Werner Lemberg <wl@gnu.org> * src/base/ftobjs.c (FT_Load_Glyph): Call the auto-hinter without transformation since it recursively calls FT_Load_Glyph. This fixes Savannah bug #23143. 2008-04-26 Werner Lemberg <wl@gnu.org> * include/freetype/internal/psaux.h (T1_BuilderRec): Mark `scale_x' and `scale_y' as obsolete since they aren't used. * src/psaux/psobjs.c (t1_builder_init): Updated. * src/cff/cffgload.h (CFF_Builder): Mark `scale_x' and `scale_y' as obsolete since they aren't used. * src/cff/cffgload.c (cff_builder_init): Updated. 2008-04-14 Werner Lemberg <wl@gnu.org> * src/pcf/pcfdrivr.c (PCF_Face_Init): Protect call to `FT_Stream_OpenLZW' with `FT_CONFIG_OPTION_USE_LZW'. From Savannah bug #22909. 2008-04-13 Werner Lemberg <wl@gnu.org> * src/psaux/psconv.c (PS_Conv_ToFixed): Increase precision if integer part is zero. 2008-04-01 Werner Lemberg <wl@gnu.org> Fix compilation with g++ 4.1 (with both `single' and `multi' targets). * src/base/ftobjs.c (FT_Open_Face): Don't define a variable in block which is crossed by a `goto'. * src/otvalid/otvalid.h (otv_MATH_validate): Add prototype. 2008-03-31 Werner Lemberg <wl@gnu.org> Fix support for subsetted CID-keyed CFFs. * include/freetype/freetype.h (FT_FACE_FLAG_CID_KEYED, FT_IS_CID_KEYED): New macros. * src/cff/cffobjs.c (cff_face_init): Set number of glyphs to the maximum CID value in CID-keyed CFFs. Handle FT_FACE_FLAG_CID_KEYED flag. * docs/CHANGES: Document it. Fix CFF font matrix calculation and improve precision. * src/cff/cffparse.c (cff_parse_real): Increase precision if integer part is zero. (cff_parse_font_matrix): Simplify computation of `units_per_em'; this prevents overflow also. Support FT_Get_CID_Registry_Ordering_Supplement for PS CID fonts. * src/cid/cidriver.c: Include FT_SERVICE_CID_H. (cid_get_ros): New function. (cid_service_cid_info): New service structure. (cid_services): Register it. 2008-03-23 Werner Lemberg <wl@gnu.org> Adjustments for Visual C++ 8.0, as reported by Rainer Deyke. * builds/compiler/visualc.mk (CFLAGS): Remove /W5. (ANSIFLAGS): Add _CRT_SECURE_NO_DEPRECATE. 2008-03-21 Laurence Darby <ldarby> * src/type1/t1objs.c (T1_Face_Init): Use `/Weight'. Patch from Savannah bug #22675. 2008-03-13 Derek Clegg <dclegg@apple.com> * src/truetype/ttgxvar.c (TT_Get_MM_Var): Fix named style loop. Patch from Savannah bug #22541. 2008-03-03 Masatoshi Kimura <VYV03354@nifty.ne.jp> * src/sfnt/ttcmap.c (tt_cmap14_char_map_nondef_binary, tt_cmap14_find_variant): Return correct value. (tt_cmap14_variant_chars): Fix check for `di'. 2008-02-29 Werner Lemberg <wl@gnu.org> * docs/CHANGES: Updated. 2008-02-29 Wolf Add build support for symbian platform. From Savannah bug #22440. * builds/symbian/*: New files. 2008-02-21 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * src/base/ftmac.c (parse_fond): Fix a bug of PostScript font name synthesis. For any face of a specified FOND, always the name for the first face was used. Except of a FOND that refers multiple Type1 font files, wrong synthesized font names are not used at all, so this is an invisible bug. A few limit checks are added too. * builds/mac/ftmac.c: Ditto. 2008-02-21 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * builds/unix/configure.raw: Split compiler option to link Carbon frameworks to one option for CoreServices framework and another option for ApplicationServices framework. The split options can be managed by GNU libtool to avoid unrequired duplication when FreeType is linked with other applications. Suggested by Daniel Macks, Savannah bug #22366. 2008-02-18 Victor Stinner <victor.stinner@haypocalc.com> * src/truetype/ttinterp.c (Ins_IUP): Check number of points. Fix from Savannah bug #22356. 2008-02-17 Jonathan Blow <jon@number-none.com> * src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph): Check for valid callback pointers. 2008-02-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * src/base/ftmac.c (FT_New_Face_From_SFNT): Check the sfnt resource handle by its value instead of ResError(), fix provided by Deron Kazmaier. According to the Resource Manager Reference, GetResource(), Get1Resource(), GetNamedResource(), Get1NamedResource() and RGetResource() set noErr but return NULL handle when they can not find the requested resource. These functions never return undefined values, so it is sufficient to check if the handle is not NULL. * builds/mac/ftmac.c (FT_New_Face_From_SFNT): Ditto. 2008-02-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * src/base/ftbase.c: <ftmac.c> is replaced by "ftmac.c" as other inclusion styles. Now it always includes src/base/ftmac.c; builds/mac/ftmac.c is never included in any configuration. * builds/unix/configure.raw: Print warning if configure is executed with options to specify Carbon functionalities explicitly. * docs/INSTALL.MAC: Note that legacy builds/mac/ftmac.c is not included automatically and manual replacement is required. 2008-02-11 Werner Lemberg <wl@gnu.org> * builds/modules.mk (CLOSE_MODULE, REMOVE_MODULE), builds/detect.mk (dos_setup), builds/freetype.mk (clean_project_dos, distclean_project_dos): Don't use \ but $(SEP). Reported by Duncan Murdoch. 2008-01-18 Sylvain Pasche <sylvain.pasche@gmail.com> * src/base/ftlcdfil.c (_ft_lcd_filter_legacy): Updated comment to mention intra-pixel algorithm. * include/freetype/freetype.h (FT_Render_Mode): Mention that FT_Library_SetLcdFilter can be used to reduce fringes. 2008-01-16 Werner Lemberg <wl@gnu.org> * src/raster/ftraster.c (ft_black_render): Check `outline' before using it. Reported by Allan Yang. 2008-01-12 Werner Lemberg <wl@gnu.org> * src/raster/ftraster.c (FT_CONFIG_OPTION_5_GRAY_LEVELS): Remove. 2008-01-12 Allan Yang, Jian Hua - SH <Allan.Yang@fmc.fujitsu.com> * src/raster/ftraster.c (ft_black_init) [FT_RASTER_OPTION_ANTI_ALIASING]: Fix compilation. 2008-01-10 Werner Lemberg <wl@gnu.org> * src/truetype/ttgload.c (load_truetype_glyph): Handle the case where the number of contours in a simple glyph is zero (and which does contain an entry in the `glyf' table). This fixes Savannah bug #21990. 2008-01-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Formatting suggested by Sean McBride. * builds/mac/ftmac.c: Formatting (tab expanded). * src/autofit/afindic.c: Ditto. * src/base/ftcid.c: Ditto. * src/base/ftmac.c: Ditto. 2007-12-30 Werner Lemberg <wl@gnu.org> * src/smooth/ftgrays.c (gray_raster_render): Check `outline' correctly. 2007-12-21 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Improvement of POSIX resource-fork accessor to load unsorted references in a resource. In HelveLTMM (resource-fork PostScript Type1 font bundled with Mac OS X since 10.3.x), the appearance order of PFB chunks is not sorted; sorting the chunks by reference IDs is required. * include/freetype/internal/ftrfork.h (FT_RFork_Ref): New structure type to store a pair of reference ID and offset to the chunk. * src/base/ftrfork.c (ft_raccess_sort_ref_by_id): New function to sort FT_RFork_Ref by their reference IDs. (FT_Raccess_Get_DataOffsets): Returns an array of offsets that is sorted by reference ID. 2007-12-14 Werner Lemberg <wl@gnu.org> * src/cff/cffparse.c (cff_parse_real): Don't apply `power_ten' division too early; otherwise the most significant digit(s) of the final result are lost as the value is truncated to an integer. This fixes Savannah bug #21794 (where the patch has been posted too). 2007-12-06 Fix <4d876b82@gmail.com> Pass options from one configure script to another as-is (not expanded). This is needed for options like --includedir='${prefix}/include'. * builds/unix/detect.mk, configure: Prevent argument expansion in call to the (real) `configure' script. 2007-12-06 Werner Lemberg <wl@gnu.org> * src/truetype/ttgload.c (load_truetype_glyph): Fix compilation if TT_USE_BYTECODE_INTERPRETER isn't defined. 2007-12-06 Werner Lemberg <wl@gnu.org> There exist CFFs which contain opcodes for the Type 1 operators `hsbw' and `closepath' which are both invalid in Type 2 charstrings. However, it doesn't harm to support them. * src/cff/cffgload.c (CFF_Operator): Add `cff_op_hsbw' and `cff_op_closepath.' (cff_argument_counts): Ditto. (cff_decoder_parse_charstrings): Handle Type 1 opcodes 9 (closepath) and 13 (hsbw) which are invalid in Type 2 charstrings. 2007-12-06 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * src/base/ftrfork.c (raccess_guess_darwin_newvfs): New function to support new pathname syntax `..namedfork/rsrc' to access a resource fork on Mac OS X. The legacy syntax `/rsrc' does not work on case-sensitive HFS+. (raccess_guess_darwin_hfsplus): Fix a bug in the calculation of buffer size to store a pathname. * include/freetype/internal/ftrfork.h: Increment the number of resource fork guessing rule. 2007-12-06 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * builds/unix/configure.raw: Improve the compile tests to search Carbon functions. * builds/mac/ftmac.c: Import fixes for Carbon incompatibilities proposed by Sean McBride from src/base/ftmac.c (see 2007-11-16). 2007-12-06 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> The documents and comments for Mac OS X are improved by Sean McBride. * src/base/ftmac.c: Fix a comment. * include/freetype/ftmac.h: Ditto. * docs/INSTALL.MAC: Improve English and add comment on lowest system version specified by MACOSX_DEPLOYMENT_TARGET. 2007-12-04 Werner Lemberg <wl@gnu.org> * src/cff/cffload.c (cff_subfont_load): Don't use logical OR to concatenate error codes. * src/sfnt/ttsbit.c (Load_SBit_Range): Ditto. 2007-12-04 Graham Asher <graham.asher@btinternet.com> * src/truetype/ttobjs.c (tt_face_init): Don't use logical OR to concatenate error codes. 2007-12-04 Sean McBride <sean@rogue-research.com> * src/pfr/pfrgload.c (pfr_glyph_load_compound): Remove compiler warning. 2007-11-20 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Fix MacOS legacy font support by Masatake Yamato on Mac OS X. It is not working since 2.3.5. In FT_Open_New(), if FT_New_Stream() cannot mmap() the specified file and cannot seek to head of the specified file, it returns NULL stream and FT_Open_New() returns the error immediately. On MacOS, most legacy MacOS fonts fall into such a scenario because their data forks are zero-sized and cannot be sought. To proceed to guessing of resource fork fonts, the functions for legacy MacOS font must properly handle the NULL stream returned by FT_New_Stream(). * src/base/ftobjs.c (IsMacBinary): Return error FT_Err_Invalid_Stream_Operation immediately when NULL stream is passed. (FT_Open_Face): Even when FT_New_Stream() returns an error, proceed to fallback. Originally, legacy MacOS font is tested in the cases of FT_Err_Invalid_Stream_Operation (occurs when data fork is empty) or FT_Err_Unknown_File_Format (occurs when AppleSingle header or .dfont header is combined). Now the case of FT_Err_Cannot_Open_Stream is included. * src/base/ftrfork.c (FT_Raccess_Guess): When passed stream is NULL, skip FT_Stream_Seek(), which seeks to the head of stream, and proceed to unit testing of raccess_guess_XXX(). FT_Stream_Seek() for a NULL stream causes a Bus error on Mac OS X. (raccess_guess_apple_double): Return FT_Err_Cannot_Open_Stream immediately if passed stream is NULL. (raccess_guess_apple_single): Ditto. 2007-11-16 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Fix for Carbon incompatibilities since Mac OS X 10.5, proposed by Sean McBride. * doc/INSTALL.MAC: Comment on MACOSX_DEPLOYMENT_TARGET. * include/freetype/ftmac.h: Deprecate FT_New_Face_From_FOND and FT_GetFilePath_From_Mac_ATS_Name. Since Mac OS X 10.5, calling Carbon functions from a forked process is classified as unsafe by Apple. All Carbon-dependent functions should be deprecated. * src/base/ftmac.c: Use essential header files <CoreServices/CoreServices.h> and <ApplicationServices/ApplicationServices.h> instead of all-in-one header file <Carbon/Carbon.h>. Include <sys/syslimits.h> and replace HFS_MAXPATHLEN by Apple genuine macro PATH_MAX. Add fallback macro for kATSOptionFlagsUnRestrictedScope which is not found in Mac OS X 10.0. Multi-character constants ('POST', 'sfnt' etc) are replaced by 64bit constants calculated by FT_MAKE_TAG() macro. For the index in the segment of resource fork, new portable type ResourceIndex is introduced for better compatibility. This type is since Mac OS X 10.5, so it is defined as short when built on older platforms. (FT_ATSFontGetFileReference): If build target is only the systems 10.5 and newer, it calls Apple genuine ATSFontGetFileReference(). (FT_GetFile_From_Mac_ATS_Name): Return an error if system is 10.5 and newer or 64bit platform, because legacy type FSSpec type is removed completely. (FT_New_Face_From_FSSpec): Ditto. 2007-11-01 Werner Lemberg <wl@gnu.org> * src/sfnt/sfobjs.c (sfnt_done_face): Check `sfnt' everywhere. This fixes Savannah bug #21485. 2007-10-29 Daniel Svoboda <dasvo@planeta@cz> * src/winfonts/winfnt.c (FNT_Face_Init): Check first that the driver can handle the font at all, then check `face_index'. Otherwise, the driver might return the wrong error code. This fixes Savannah bug #21468. 2007-10-21 Werner Lemberg <wl@gnu.org> * src/sfnt/sfobjs.c (sfnt_load_face): Support bit 9 and prepare support for bit 8 of the `fsSelection' field in the `OS/2' table. MS is already using this; hopefully, this becomes part of OpenType 1.5. Prepare also support for `name' IDs 21 (WWS_FAMILY) and 22 (WWS_SUBFAMILY). 2007-10-20 Werner Lemberg <wl@gnu.org> * src/tools/docmaker/tohtml.py (html_header_2): Fix typo. Add `td.left' element to CSS. (toc_section_enter): Use it. 2007-10-18 David Turner <david@freetype.org> * include/freetype/freetype.h, src/base/ftobjs.c: Rename API functions related to cmap type 14 support to the `FT_Object_ActionName' scheme: FT_Get_Char_Variant_Index -> FT_Face_GetCharVariantIndex FT_Get_Char_Variant_IsDefault -> FT_Face_GetCharVariantIsDefault FT_Get_Variant_Selectors -> FT_Face_GetVariantSelectors FT_Get_Variants_Of_Char -> FT_Face_GetVariantsOfChar FT_Get_Chars_Of_Variant -> FT_Face_GetCharsOfVariant Update documentation accordingly. * src/sfnt/ttcmap.c: Stronger cmap 14 validation. Make the code a little more consistent with FreeType coding conventions and modify the cmap14 functions that returned a newly allocated array to use a persistent vector from the TT_CMap14 object instead. (TT_CMap14Rec): Provide array and auxiliary data for result. (tt_cmap14_done, tt_cmap14_ensure): New functions. (tt_cmap14_init, tt_cmap14_validate, tt_cmap14_char_map_def_binary, tt_cmap14_char_map_nondef_binary, tt_cmap14_find_variant, tt_cmap14_char_var_index, tt_cmap14_variants, tt_cmap14_char_variants, tt_cmap14_def_char_count, tt_cmap14_get_def_chars, tt_cmap14_get_nondef_chars, tt_cmap14_variant_chars, tt_cmap14_class_rec): Updated and improved. 2007-10-15 George Williams <gww@silcom.com> Add support for cmap type 14. * devel/ftoption.h, include/freetype/config/ftoption.h (TT_CONFIG_CMAP_FORMAT_14): New macro. * include/freetype/internal/ftobjs.h (FT_CMap_CharVarIndexFunc, FT_CMap_CharVarIsDefaultFunc, FT_CMap_VariantListFunc, FT_CMap_CharVariantListFunc, FT_CMap_VariantCharListFunc): New support function prototypes. (FT_CMap_ClassRec): Add them. Update all users. * include/freetype/ttnameid.h (TT_APPLE_ID_VARIANT_SELECTOR): New macro. * include/freetype/freetype.h (FT_Get_Char_Variant_Index, FT_Get_Char_Variant_IsDefault, FT_Get_Variant_Selectors, FT_Get_Variants_Of_Char, FT_Get_Chars_Of_Variant): New API functions. * src/base/ftobjs.c (find_variant_selector_charmap): New auxiliary function. (FT_Set_Charmap): Disallow cmaps of type 14. (FT_Get_Char_Variant_Index, FT_Get_Char_Variant_IsDefault, FT_Get_Variant_Selectors, FT_Get_Variants_Of_Char, FT_Get_Chars_Of_Variant): New API functions. * src/sfnt/ttcmap.c (TT_PEEK_UINT24, TT_NEXT_UINT24): New macros. (TT_CMap14Rec, tt_cmap14_init, tt_cmap14_validate, tt_cmap14_char_index, tt_cmap14_char_next, tt_cmap14_get_info, tt_cmap14_char_map_def_binary, tt_cmap14_char_map_nondef_binary, tt_cmap14_find_variant, tt_cmap14_char_var_index, tt_cmap14_char_var_isdefault, tt_cmap14_variants, tt_cmap14_char_variants, tt_cmap14_def_char_count, tt_cmap14_get_def_chars, tt_cmap14_get_nondef_chars, tt_cmap14_variant_chars, tt_cmap14_class_rec): New functions and structures for cmap 14 support. (tt_cmap_classes): Register tt_cmap14_class_rec. (tt_face_build_cmaps): One more error message. * docs/CHANGES: Mention cmap 14 support. 2007-10-01 Werner Lemberg <wl@gnu.org> * src/base/ftobjs.c (find_unicode_charmap): If search for a UCS-4 charmap fails, do the loop again while searching a UCS-2 charmap. This favours MS charmaps over Apple ones. 2007-08-29 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * src/base/ftmac.c: Introduction of abstract `short' data types, ResFileRefNum and ResID. These types were introduced for Copland, then backported to MPW. The variables exchanged with FileManager QuickDraw frameworks are redefined by these data types. Patch was proposed by Sean McBride. * builds/mac/ftmac.c: Ditto. 2007-08-18 Werner Lemberg <wl@gnu.org> * src/otvalid/otvcommn.c (otv_x_y_ux_sy): Skip context glyphs. Found by Imran Yousaf. Fixes Savannah bug #20773. (otv_Lookup_validate): Correct handling of LookupType. Found by Imran Yousaf. Fixes Savannah bug #20782. 2007-08-17 George Williams <gww@silcom.com> * src/otvalid/otvgsub.c (otv_SingleSubst_validate): Fix handling of SingleSubstFormat1. 2007-08-11 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * builds/unix/configure.raw: Fix a bug which sets CC_BUILD by ${build-gcc} (unchecked) instead of by ${build}-gcc (checked). Found by Ryan Hill. 2007-08-11 George Williams <gww@silcom.com> * src/otvalid/otvcommn.c, src/otvalid/otvcommn.h (otv_Coverage_validate): Add fourth argument to pass an expected count value. Update all users. Check glyph IDs. (otv_ClassDef_validate): Check `StartGlyph'. * src/otvalid/otvgsub.c (otv_SingleSubst_validate): More glyph ID checks. * src/otvalid/otvmath.c (otv_MathConstants_validate): There are only 56 constants. (otv_GlyphAssembly_validate, otv_MathGlyphConstruction_validate): Check glyph IDs. 2007-08-08 Werner Lemberg <wl@gnu.org> * src/otvalid/otvbase.c, src/otvalid/otvcommn.c, src/otvalid/otvgdef.c, src/otvalid/otvgpos.c, src/otvalid/otvgsub.c, src/otvalid/otvjstf.c: s/FT_INVALID_DATA/FT_INVALID_FORMAT/ where appropriate. Reported by George. * include/freetype/internal/fttrace.h: Define `trace_otvmath'. * src/otvalid/rules.mk (OTV_DRV_SRC): Add otvmath.c. * docs/CHANGES: Updated. 2007-08-08 George Williams <gww@silcom.com> Add `MATH' validating support to otvalid module. * include/freetype/tttags.h (TTAG_MATH): New macro. * include/freetype/ftotval.h (FT_VALIDATE_MATH): New macro. (FT_VALIDATE_OT): Updated. * src/otvalid/otvmath.c: New file. * src/otvalid/otvalid.c: Include otvmath.c. * src/otvalid/otvmod.c (otv_validate): Handle `MATH' table. 2007-08-04 Werner Lemberg <wl@gnu.org> * builds/unix/configure.raw: Add call to AC_LIBTOOL_WIN32_DLL. Fixes Savannah bug #20686. 2007-08-03 Werner Lemberg <wl@gnu.org> * src/psnames/psmodule.c: Fix usage of FT_CONFIG_OPTION_POSTSCRIPT_NAMES macro. Reported by Graham Asher. 2007-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * src/base/ftmac.c (open_face_from_buffer): The argument `driver_name' is typed as `const char*' to match with the callers in FT_New_Face_From_LWFN and FT_New_Face_From_SFNT. This is same with open_face_from_buffer in src/base/ftobjs.c. Found and fixed by Sean McBride. 2007-07-28 Werner Lemberg <wl@gnu.org> * src/raster/ftraster.c (count_table): Make it conditional. * src/base/ftobjs.c (FT_New_Library): Check FT_RENDER_POOL_SIZE with a preprocessor statement. 2007-07-27 Werner Lemberg <wl@gnu.org> * src/base/ftoutln.c (FT_Outline_Translate): Check `outline' before first usage. From Savannah patch #6115. 2007-07-16 Werner Lemberg <wl@gnu.org> * docs/CHANGES: Updated. 2007-07-16 Derek Clegg <dclegg@apple.com> Add new service for getting the ROS from a CID font. * include/freetype/config/ftheader.h (FT_CID_H): New macro. * include/freetype/ftcid.h: New file. * include/freetype/internal/ftserv.h (FT_SERVICE_CID_H): New macro. * include/freetype/internal/services/svcid.h: New file. * src/base/ftcid.c: New file. * src/cff/cffdrivr.c: Include FT_SERVICE_CID_H. (cff_get_ros): New function. (cff_service_cid_info): New service structure. (cff_services): Register it. * src/cff/cffload.c (cff_font_done): Free registry and ordering. * src/cff/cfftypes.h (CFF_FontRec): Add `registry' and `ordering'. * modules.cfg (BASE_EXTENSIONS): Add ftcid.c. 2007-07-11 Derek Clegg <dclegg@apple.com> Add support for postscript name service to CFF driver. * src/cff/cffdrivr.c: Include FT_SERVICE_POSTSCRIPT_NAME_H. (cff_get_ps_name): New function. (cff_service_ps_name): New service structure. (cff_services): Register it. 2007-07-07 Werner Lemberg <wl@gnu.org> * src/base/ftglyph.c (FT_Glyph_Copy): Fix initialization of `target'. Reported by Sean McBride. 2007-07-06 Werner Lemberg <wl@gnu.org> * src/pfr/pfrcmap.c: Include pfrerror.h. * src/autofit/afindic.c: Add some external declarations to pacify `make multi' compilation. * src/cid/cidgload.c (cid_load_glyph): Pacify compiler. * src/cff/cffdrivr.c (cff_ps_get_font_info), src/cff/cffobjs.c (cff_strcpy), include/freetype/internal/ftmemory.h (FT_MEM_STRDUP), src/autofit/aflatin.c (af_latin_hints_compute_edges), src/autofit/afcjk.c (af_cjk_hints_compute_edges), src/sfnt/ttmtx.c (tt_face_get_metrics), src/base/ftobjs.c (open_face) [FT_CONFIG_OPTION_INCREMENTAL]: Fix compilation with C++ compiler. * docs/release: Mention test compilation targets. 2007-07-04 Werner Lemberg <wl@gnu.org> * docs/PROBLEMS: Mention that some PS based fonts can't be handled correctly by FreeType. * src/truetype/ttgload.c (load_truetype_glyph): Always allow a recursion depth of 1. This was the maximum value in TrueType 1.0, and some older fonts don't set this field correctly. * src/gxvalid/gxvmort1.c (gxv_mort_subtable_type1_substTable_validate): Fix tracing message. 2007-07-03 Werner Lemberg <wl@gnu.org> * src/autofit/aflatin.c (af_latin_metrics_init_blues): Initialize `round' to pacify compiler. 2007-07-02 Werner Lemberg <wl@gnu.org> * Version 2.3.5 released. ========================= Tag sources with `VER-2-3-5'. * docs/CHANGES, docs/VERSION.DLL: Update documentation and bump version number to 2.3.5. * README, Jamfile (RefDoc), builds/win32/visualc/index.html, builds/win32/visualc/freetype.dsp, builds/win32/visualc/freetype.vcproj, builds/win32/visualce/index.html, builds/win32/visualce/freetype.dsp, builds/win32/visualce/freetype.vcproj: s/2.3.4/2.3.5/, s/234/235/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 5. * builds/unix/configure.raw (version_info): Set to 9:16:3. 2007-07-01 David Turner <david@freetype.org> * include/freetype/freetype.h, src/base/ftpatent.c (FT_Face_SetUnpatentedHinting): New function to dynamically change the setting after a face is created. * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Fix a small bug that created distortions in the bytecode interpreter results. 2007-06-30 David Turner <david@freetype.org> * src/truetype/ttinterp.c (Ins_IUP): Add missing variable initialization. * src/autofit/aflatin.c (af_latin_metrics_init_blues): Get rid of an infinite loop in the case of degenerate fonts. 2007-06-26 Rahul Bhalerao <b.rahul.pm@gmail.com> Add autofit module for Indic scripts. This currently just reuses the CJK-specific functions. * include/freetype/config/ftoption.h (AF_CONFIG_OPTION_INDIC): New macro. * devel/ftoption.h: Synchronize with include/freetype/config/ftoption.h. * src/autofit/afindic.c, src/autofit/afindic.h: New files. * src/autofit/afglobal.c, src/autofit/aftypes.h, src/autofit/autofit.c: Updated. * src/autofit/Jamfile (_sources), * src/autofit/rules.mk (AUTOF_DRV_SRC): Updated. 2007-06-23 David Turner <david@freetype.org> * src/truetype/ttgload.c (TT_Load_Simple): Fix change from 2007-06-16 that prevented the TrueType module from loading most glyphs. 2007-06-20 Werner Lemberg <wl@gnu.org> * src/cff/cffgload.c (cff_slot_load): Fix logic of 2007-05-28 change. 2007-06-19 Werner Lemberg <wl@gnu.org> * src/type1/t1load.c (parse_encoding): Handle one more error. 2007-06-19 Dmitry Timoshkov <dmitry@codeweavers.com> * src/winfonts/winfnt.c (fnt_face_get_dll_font): Return error FNT_Err_Invalid_File_Format if file format was recognized but the file doesn't contain any FNT(NE) or RT_FONT(PE) resources. Add verbose debug logs to make it easier to debug failing load attempts. (FNT_Face_Init): A single FNT font can't contain more than 1 face, so return an error if requested face index is > 0. Do not do further attempt to load fonts if a previous attempt has failed but returned error FNT_Err_Invalid_File_Format, i.e., the file format has been recognized but no fonts found in the file. 2007-07-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * src/base/ftmac.c: Apply patches proposed by Sean McBride. (FT_GetFile_From_Mac_Name): Insert FT_UNUSED macros to fix the compiler warnings against unused arguments. (FT_ATSFontGetFileReference): Ditto. (FT_GetFile_From_Mac_ATS_Name): Ditto. (FT_New_Face_From_FSSpec): Ditto. (lookup_lwfn_by_fond): Fix wrong comment. Replace `const StringPtr' by more appropriate type `ConstStr255Param'. FSRefMakePathPath always returns UTF8 POSIX pathname in Mach-O, thus HFS pathname support is dropped. (count_faces): Remove HLock and HUnlock which is not required on Mac OS X anymore. (FT_New_Face_From_SFNT): Ditto. (FT_New_Face_From_FOND): Ditto. * builds/mac/ftmac.c: Synchronize to src/base/ftmac.c, except of HFS pathname support and HLock/HUnlock. They are required on classic CFM environment. 2007-06-18 Werner Lemberg <wl@gnu.org> * src/psaux/psobjs.c (ps_parser_skip_PS_token): Remove incorrect assertion. (ps_parser_to_bytes): Fix error message. * src/type42/t42objs.c (T42_Open_Face): Handle one more error. * src/type42/t42parse.c (t42_parse_sfnts): s/alloc/allocated/. Don't allow mixed binary and hex strings. Handle string_size == 0 and string_buf == 0. (t42_parse_encoding): Handle one more error. 2007-06-18 Werner Lemberg <wl@gnu.org> * src/psaux/psobjs.c (ps_tofixedarray, ps_tocoordarray): Fix exit logic. (ps_parser_load_field) <T1_FIELD_TYPE_BBOX>: Skip delimiters correctly. (ps_parser_load_field_table): Use `fields->array_max' instead of T1_MAX_TABLE_ELEMENTS to limit the number of arguments. * src/cff/cffgload.c (cff_decoder_prepare): Fix change from 2007-06-06. 2007-06-17 Werner Lemberg <wl@gnu.org> * src/tools/ftrandom.c (font_size): New global variable. (TestFace): Use it. (main): Handle new option `--size' to set `font_size'. (Usage): Updated. * src/winfonts/winfnt.c (fnt_face_get_dll_font): Exit in case of invalid font. (FNT_Load_Glyph): Protect against invalid bitmap width. 2007-06-16 David Turner <david@freetype.org> * src/smooth/ftgrays.c (gray_find_cell, gray_set_cell, gray_hline): Prevent integer overflows when rendering very large outlines. * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Check the well-formedness of the contours array when loading a glyph. * src/truetype/ttinterp.c (TT_Load_Context): Initialize `zp0', `zp1', and `zp2'. (Ins_IP): Check argument ranges to reject bogus operations properly. (IUP_WorkerRec): Add `max_points' member. (_iup_worker_interpolate): Check argument ranges. (Ins_IUP): Ignore empty outlines. 2007-06-16 Dmitry Timoshkov <dmitry@codeweavers.com> * src/winfonts/winfnt.h: Add necessary structures for PE resource parsing. (WinPE32_HeaderRec): New structure. (WinPE32_SectionRec): New structure. (WinPE_RsrcDirRec): New structure. (WinPE_RsrcDirEntryRec): New structure. (WinPE_RsrcDataEntryRec): New structure. (FNT_FontRec): Remove unused `size_shift' field. * src/winfonts/winfnt.c (fnt_face_get_dll_font): Add support for loading bitmap .fon files in PE format. 2007-06-15 Dmitry Timoshkov <dmitry@codeweavers.com> * builds/win32/ftdebug.c: Unify debug level handling with other platforms. 2007-06-14 Dmitry Timoshkov <dmitry@codeweavers.com> * builds/win32/ftdebug.c (FT_Message): Send debug output to the console as well as to the debugger. 2007-06-14 Werner Lemberg <wl@gnu.org> * src/autofit/aflatin.c (af_latin_uniranges): Expand structure to cover all ranges which could possibly be handled by the aflatin module (since the default fallback for unknown ranges is now the afcjk module). It might be necessary to fine-tune this further by splitting off modules for Greek, Cyrillic, or other blocks. 2007-06-11 David Turner <david@freetype.org> * src/autofit/aflatin.c (af_latin_hints_link_segments): Fix incorrect segment linking computation. This was the root cause of Savannah bug #19565. * src/autofit/* [FT_OPTION_AUTOFIT2]: Some very experimental changes to improve the Latin auto-hinter. Note that the new code is disabled by default since it is not stabilized yet. * src/autofit/aflatin2.c, src/autofit/aflatin2.h: New files (disabled currently). * src/autofit/afhints.c: Remove dead code. (af_axis_hints_new_edge): Add argument to handle segment directions. (af_edge_flags_to_string): New function. (af_glyph_hints_dump_segments, af_glyph_hints_dump_edges): Handle option flags. (af_glyph_hints_reload): Add argument to handle inflections. Simplify. (af_direction_compute): Fine tuning. (af_glyph_hints_align_edge_points): Fix logic. (af_glyph_hints_align_strong_points): Do linear search for small edge counts. (af_glyph_hints_align_weak_points): Skip any touched neighbors. (af_iup_shift): Handle zero `delta'. * src/autofit/afhints.h: Updated. (AF_SORT_SEGMENTS): New macro (disabled). (AF_AxisHintsRec) [AF_SORT_SEGMENTS]: New member `mid_segments'. * src/autofit/afglobal.c (af_face_globals_get_metrics): Add argument to pass option flags for handling scripts. * src/autofit/afglobal.h: Updated. * src/autofit/afcjk.c: Updated. * src/autofit/aflatin.c: Updated. (af_latin_metrics_scale_dim): Don't reduce scale by 2%. (af_latin_hints_compute_segments) [AF_HINT_METRICS]: Remove dead code. (af_latin_hints_compute_edges) [AF_HINT_METRICS]: Remove dead code. Don't set `edge->dir' (af_latin_hint_edges): Add more logging. * src/autofit/afloader.c: Updated. 2007-06-11 Werner Lemberg <wl@gnu.org> * docs/CHANGES: Document FT_Face_CheckTrueTypePatents. 2007-06-10 David Turner <david@freetype.org> * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Slight speed-up to the TrueType glyph loader. * include/freetype/config/ftoption.h: Clarify documentation regarding unpatented hinting. Add new `FT_Face_CheckTrueTypePatents' API. * include/freetype/freetype.h (FT_Face_CheckTrueTypePatents): New declaration. * include/freetype/internal/services/svttglyf.h, src/base/ftpatent.c: New files. * include/freetype/internal/ftserv.h (FT_SERVICE_TRUETYPE_GLYF_H): New macro. * src/truetype/ttdriver.c: Include FT_SERVICE_TRUETYPE_GLYF_H and `ttpload.h'. (tt_service_truetype_glyf): New service structure. (tt_services): Register it. * modules.cfg (BASE_EXTENSIONS), src/base/Jamfile (_sources): Add `ftpatent.c'. 2007-06-08 Werner Lemberg <wl@gnu.org> * src/sfnt/sfobjs.c (sfnt_load_face): Undo change from 2007-04-28. Fonts without a cmap must be handled correctly by FreeType (anything else would be a bug). * src/psaux/t1decode.c (t1_decoder_parse_charstrings) [FT_DEBUG_LEVEL_TRACE]: Improve tracing message. 2007-06-07 Werner Lemberg <wl@gnu.org> * src/sfnt/ttsbit0.c (tt_sbit_decoder_init, tt_sbit_decoder_load_image): Protect against integer overflows. * src/pfr/pfrgload.c (pfr_glyph_load_simple): More bounding checks for `x_control' and `y_control'. 2007-06-06 Werner Lemberg <wl@gnu.org> * src/base/ftoutln.c (FT_Outline_Decompose): Check `last'. * src/pfr/pfrcmap.c (pfr_cmap_init): Convert assertion into normal FreeType error. * src/winfonts/winfnt.c (fnt_face_get_dll_font): Do a rough check of `font_count'. * src/type1/t1load.c (parse_font_matrix): Check `temp_scale'. * src/cff/cffgload.c (cff_decoder_prepare): Change return type to `FT_Error'. Check `fd_index'. (cff_slot_load): Updated. * src/cff/cffgload.h: Updated. 2007-06-05 Werner Lemberg <wl@gnu.org> * src/pfr/pfrgload.c (pfr_glyph_done): Comment out unused code. (pfr_glyph_load_simple): Convert assertion into normal FreeType error. Check `idx'. (pfr_glyph_load_compound, pfr_glyph_curve_to, pfr_glyph_line_to): Convert assertion into normal FreeType error. * src/pfr/pfrtypes.h (PFR_GlyphRec): Comment out unused code. * src/winfonts/winfnt.c (FNT_Face_Init): Check `family_size'. * src/psaux/psobjs.c (ps_tocoordarray, ps_tofixedarray): Return -1 in case of parsing error. (ps_parser_load_field): Updated. * src/type1/t1load.c (parse_font_matrix): Updated. 2007-06-04 Werner Lemberg <wl@gnu.org> * src/cid/cidgload.c (cid_load_glyph): Check `fd_select'. * src/tools/ftrandom/Makefile: Depend on `libfreetype.a'. 2007-06-03 Werner Lemberg <wl@gnu.org> * src/tools/ftrandom/*: Add the `ftrandom' test program written by George Williams (with some modifications). 2007-06-03 Werner Lemberg <wl@gnu.org> * src/base/ftobjs.c (destroy_charmaps), src/type1/t1objs.c (T1_Face_Done), src/winfonts/winfnt.c (FNT_Face_Done): Check for face == NULL. Suggested by Graham Asher. 2007-06-03 Ismail Dönmez <ismail@pardus.org.tr> * src/base/ftobjs.c (FT_Request_Metrics): Fix compiler warning. 2007-06-02 Werner Lemberg <wl@gnu.org> * include/freetype/fterrdef.h (FT_Err_Corrupted_Font_Header, FT_Err_Corrupted_Font_Glyphs): New error codes for BDF files. * src/bdf/bdflib.c (bdf_load_font): Use them. * src/bdf/bdflib.c (_bdf_parse_start): Check `FONT' better. 2007-06-01 Werner Lemberg <wl@gnu.org> * src/base/ftobjs.c (FT_Request_Metrics), src/cache/ftccmap.c (FTC_CMapCache_Lookup): Remove unused code. 2007-06-01 Sean McBride <sean@rogue-research.com> * src/truetype/ttinterp.c (Null_Vector, NULL_Vector): Removed, unused. 2007-06-01 Werner Lemberg <wl@gnu.org> * src/cid/cidparse.c (cid_parser_new): Don't continue second search pass for `StartData' if an error has occurred. Exit properly if no `StartData' has been seen at all. * builds/unix/ftsystem.c (FT_Stream_Open): Don't use ULONG_MAX but LONG_MAX to avoid compiler warning. Suggested by Sean McBride. 2007-05-30 Werner Lemberg <wl@gnu.org> * src/type1/t1load.c (parse_subrs, parse_charstrings): Protect against too small binary data strings. * src/bdf/bdflib.c (_bdf_parse_glyphs): Check `STARTCHAR' better. 2007-05-28 David Turner <david@freetype.org> * src/cff/cffgload.c (cff_slot_load): Do not apply the identity transformation. This significantly reduces the loading time of CFF glyphs. * docs/CHANGES: Updated. * src/autofit/afglobal.c (AF_SCRIPT_LIST_DEFAULT): Change default hinting script to CJK, since it works well with more scripts than latin. Thanks to Rahul Bhalerao <b.rahul.pm@gmail.com> for pointing this out! 2007-05-25 Werner Lemberg <wl@gnu.org> * docs/CHANGES: Updated. 2007-05-24 Werner Lemberg <wl@gnu.org> * src/truetype/ttobjs.h (tt_size_ready_bytecode): Move declaration into TT_USE_BYTECODE_INTERPRETER preprocessor block. 2007-05-24 Graham Asher <graham.asher@btinternet.com> * src/truetype/ttobjs.c (tt_size_ready_bytecode) [!TT_USE_BYTECODE_INTERPRETER]: Removed. Unused. 2007-05-22 David Turner <david@freetype.org> * src/truetype/ttgload.c (load_truetype_glyph): Fix last change to avoid crashes in case the bytecode interpreter is not used. Avoid heap blowup with very large .Z font files. This fixes Savannah bug #19910. * src/lzw/ftzopen.h (FT_LzwStateRec): Remove `in_cursor', `in_limit', `pad', `pad_bits', and `in_buff' members. Add `buf_tab', `buf_offset', `buf_size', `buf_clear', and `buf_total' members. * src/lzw/ftzopen.c (ft_lzwstate_get_code): Rewritten. It now takes only one argument. (ft_lzwstate_refill, ft_lzwstate_reset, ft_lzwstate_io): Updated. 2007-05-20 Ismail Dönmez <ismail@pardus.org.tr> * src/pshinter/pshrec.c (ps_mask_table_set_bits): Add `const'. (ps_dimension_set_mask_bits): Remove `const'. 2007-05-19 Werner Lemberg <wl@gnu.org> * src/sfnt/ttmtx.c (tt_face_get_metrics) [!FT_CONFIG_OPTION_OLD_INTERNALS]: Another type-punning fix. 2007-05-19 Derek Clegg <dclegg@apple.com> Savannah patch #5929. * include/freetype/tttables.h, src/base/ftobjs.c (FT_Get_CMap_Format): New function. * include/freetype/internal/services/svttcmap.c (TT_CMapInfo): Add `format' member. * src/sfnt/ttcmap.c (tt_cmap{0,2,4,6,8,10,12}_get_info): Set cmap_info->format. 2007-05-19 Werner Lemberg <wl@gnu.org> * src/truetype/ttgload.c (load_truetype_glyph): Save graphics state before handling subglyphs so that it can be reinitialized each time. This fixes Savannah bug #19859. 2007-05-16 Werner Lemberg <wl@gnu.org> * src/cache/ftccache.c (ftc_node_mru_link, ftc_node_mru_unlink), src/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP), src/cache/ftcglyph.h (FTC_GCACHE_LOOKUP_CMP), src/pshinter/pshmod.c (ps_hinter_init), src/sfnt/ttmtx.c (tt_face_load_hmtx, tt_face_load_hhea, tt_face_get_metrics): Fix type-punning issues. 2007-05-15 David Turner <david@freetype.org> * include/freetype/config/ftstdlib.h, include/freetype/internal/ftobjs.h: As suggested by Graham Asher, ensure that ft_isalnum, ft_isdigit, etc., use hard-coded values instead of relying on the locale-dependent functions provided by <ctypes.h>. 2007-05-15 Graham Asher <graham.asher@btinternet.com> * src/autofit/afcjk.c (af_cjk_hints_compute_edges): Remove unused variable. * src/autofit/afloader.c (af_loader_load_g): Ditto. * src/base/ftobjs.c (ft_validator_error): Use `ft_jmp_buf'. (open_face_from_buffer): Initialize `stream'. (FT_Request_Metrics): Remove unused variable. Remove redundant `break' statements. (FT_Get_Track_Kerning): Remove unused variable. * src/psaux/afmparse.c (afm_parse_track_kern, afm_parse_kern_pairs, afm_parse_kern_data): Remove redundant `break' statements. (afm_parser_parse): Ditto. Don't use uninitialized variables. * src/psnames/psmodule.c (VARIANT_BIT): Define as unsigned long. Use `|' operator instead of `^' to set it. Update all users. * src/sfnt/ttcmap.c (tt_face_build_cmaps): Use `ft_jmp_buf'. * src/sfnt/ttkern.c (tt_face_load_kern): Remove unused variable. * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Remove redundant comparison. (TT_Process_Simple_Glyph): Use FT_UInt for `n_points' and `i'. (TT_Load_Glyph): Remove unused variable. 2007-05-13 Derek Clegg <dclegg@apple.com> * src/base/ftobjs.c (FT_New_Library): Only allocate rendering pool if FT_RENDER_POOL_SIZE is > 0. From Savannah patch #5928. 2007-05-11 David Turner <david@freetype.org> * src/cache/ftcbasic.c, include/freetype/ftcache.h (FTC_ImageCache_LookupScaler, FTC_SBit_Cache_LookupScaler): Two new functions that allow us to look up glyphs using an FTC_Scaler object to specify the size, making it possible to use fractional pixel sizes. * src/truetype/ttobjs.c (tt_size_ready_bytecode): Set `size->cvt_ready'. Reported by Boris Letocha. 2007-05-09 Graham Asher <graham.asher@btinternet.com> * src/truetype/ttinterp.c (Ins_IP), src/autofit/aflatin.c (af_latin_metrics_scale_dim): Fix compiler warnings. 2007-05-06 Werner Lemberg <wl@gnu.org> * builds/win32/visualce/freetype.sln: Removed, as requested by Vincent. 2007-05-04 Vincent RICHOMME <richom.v@free.fr> * builds/win32/visualce/*: Add Visual C++ project files for Pocket PC targets. * docs/CHANGES: Document them. 2007-05-04 <harry@kdevelop.org> * builds/unix/ftsystem.c (FT_Stream_Open): Handle return value 0 of mmap (which might happen on some RTOS). From Savannah patch #5909. 2007-05-03 Werner Lemberg <wl@gnu.org> * src/base/ftobjs.c (FT_Set_Char_Size): Simplify code. * include/freetype/freetype.h (FT_Set_Char_Size): Update documentation. 2007-04-28 Victor Stinner <victor.stinner@inl.fr> * src/sfnt/sfobjs.c (sfnt_load_face): Check error code after loading `cmap'. 2007-04-27 Werner Lemberg <wl@gnu.org> * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Check for negative number of points in contours. Problem reported by Victor Stinner <victor.stinner@haypocalc.com>. (TT_Process_Simple_Glyph): Synchronize variable types. 2007-04-26 Werner Lemberg <wl@gnu.org> * src/base/ftglyph.c (FT_Glyph_Copy): Always set second argument to zero in case of error. This fixes Savannah bug #19689. 2007-04-25 Boris Letocha <b.letocha@cz.gmc.net> * src/truetype/ttobjs.c: Fix a typo that created a speed regression in the TrueType bytecode loader. 2007-04-10 Martin Horak <horakm@centrum.cz> * src/sfnt/sfobjs.c (sfnt_load_face) [FT_CONFIG_OPTION_INCREMENTAL]: Ignore `hhea' table. This fixes Savannah bug #19261. 2007-04-09 Werner Lemberg <wl@gnu.org> * Version 2.3.4 released. ========================= Tag sources with `VER-2-3-4'. * docs/CHANGES, docs/VERSION.DLL: Update documentation and bump version number to 2.3.4. * README, Jamfile (RefDoc), builds/win32/visualc/index.html, builds/win32/visualc/freetype.dsp, builds/win32/visualc/freetype.vcproj: s/2.3.3/2.3.4/, s/233/234/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 4. * builds/unix/configure.raw (version_info): Set to 9:15:3. 2007-04-09 Martin Horak <horakm@centrum.cz> * src/truetype/ttgload.c (load_truetype_glyph): Save and restore memory stream to avoid a crash with the incremental memory interface (Savannah bug #19260). 2007-04-06 David Turner <david@freetype.org> * src/base/ftbitmap.c (ft_bitmap_assure_buffer): Fix buffer-overwrite bug (Savannah bug #19536). 2007-04-04 Werner Lemberg <wl@gnu.org> * Version 2.3.3 released. ========================= Tag sources with `VER-2-3-3'. * docs/CHANGES: Mention CVE-2007-1351. 2007-04-03 David Turner <david@freetype.org> * src/base/ftobjs.c (FT_Set_Char_Size): As suggested by James Cloos, if one of the resolution values is 0, treat it as if it were the same as the other value. 2007-04-02 David Turner <david@freetype.org> Add special code to detect `extra-light' fonts and do not snap their stem widths too much to avoid bizarre hinting effects. * src/autofit/aflatin.h (AF_LatinAxisRec): Add `standard_width' and `extra_light' members. * src/autofit/aflatin.c (af_latin_metrics_init_widths): Initialize them. (af_latin_metrics_scale_dim): Set `extra_light'. (af_latin_compute_stem_width): Use `extra_light'. 2007-03-28 David Turner <david@freetype.org> * src/base/ftbitmap.c (ft_bitmap_assure_buffer): Fix zero-ing of the padding. 2007-03-28 Werner Lemberg <wl@gnu.org> * src/bdf/bdflib.c (setsbit, sbitset): Handle values >= 128 gracefully. (_bdf_set_default_spacing): Increase `name' buffer size to 256 and issue an error for longer names. This fixes CVE-2007-1351. (_bdf_parse_glyphs): Limit allowed number of glyphs in font to the number of code points in Unicode. * builds/win32/visualc/index.html, builds/win32/visualc/freetype.dsp, builds/win32/visualc/freetype.vcproj, README: s/2.3.2/2.3.3/, s/232/233/. * docs/CHANGES: Mention ftdiff. 2007-03-26 David Turner <david@freetype.org> * src/truetype/ttinterp.c [FIX_BYTECODE]: Remove it and corresponding code. (Ins_MD): Last regression fix. * src/autofit/aflatin.c (af_latin_metrics_init_blues): Fix blues computations in order to ignore single-point contours. These are never rasterized and correspond in certain fonts to mark-attach points that are very far from the glyph's real outline, ruining the computation. * src/autofit/afloader.c (af_loader_load_g): In the case of monospaced fonts, always set `rsb_delta' and `lsb_delta' to 0. Otherwise code that uses them will most certainly ruin the fixed advance property. * docs/CHANGES, docs/VERSION.DLL, README, Jamfile (RefDoc): Update documentation and bump version number to 2.3.3. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3. * builds/unix/configure.raw (version_info): Set to 9:14:3. 2007-03-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * builds/unix/ftconfig.in: Disable Carbon framework dependency on 64bit ABI on Mac OS X 10.4.x (ppc & i386). Found by Sean McBride. * builds/vms/ftconfig.h: Ditto. * include/freetype/config/ftconfig.h: Ditto. 2007-03-22 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * builds/unix/ftsystem.c (FT_Stream_Open): Temporary fix to prevent 32bit unsigned long overflow by 64bit filesize on LP64 platform, as proposed by Sean McBride: https://lists.gnu.org/archive/html/freetype-devel/2007-03/msg00032.html 2007-03-22 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * builds/unix/ftconfig.in: Suppress SGI compiler's warning against setjmp, proposed by Sean McBride: https://lists.gnu.org/archive/html/freetype-devel/2007-03/msg00032.html 2007-03-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * builds/unix/configure.raw: Dequote `OS_INLINE' in comment of conftest.c, to avoid unexpected shell evaluation. Possibly it is a bug or undocumented behaviour of autoconf. 2007-03-18 David Turner <david@freetype.org> * src/truetype/ttinterp.c (Ins_MDRP): Another bytecode regression fix; testing still needed. * src/truetype/ttinterp.c (Ins_MD): Another bytecode regression fix. 2007-03-17 David Turner <david@freetype.org> * src/truetype/ttinterp.c (Ins_IP): Fix wrong handling of the (undocumented) twilight zone special case. 2007-03-09 Werner Lemberg <wl@gnu.org> * Version 2.3.2 released. ========================= Tag sources with `VER-2-3-2'. * builds/win32/visualc/index.html, builds/win32/visualc/freetype.dsp, builds/win32/visualc/freetype.vcproj, README: s/2.3.1/2.3.2/, s/231/232/. 2007-03-08 David Turner <david@freetype.org> * docs/CHANGES, docs/VERSION.DLL: Updated for upcoming release. * builds/unix/configure.raw (version_info): Set to 9:13:3. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 2. * README, Jamfile (RefDoc): s/2.3.1/2.3.2/. * src/base/ftutil.c (ft_mem_strcpyn): Fix a bug that prevented the function to work properly, over-writing user-provided buffers in some cases. Reported by James Cloos <cloos@jhcloos.com>. 2007-03-05 Werner Lemberg <wl@gnu.org> * include/freetype/config/ftstdlib.h (ft_strstr): New wrapper macro for `strstr'. * src/truetype/ttobjs.c (tt_face_init): Use ft_strstr for scanning `trick_names', as suggested by Ivan Nincic. 2007-03-05 David Turner <david@freetype.org> * src/base/ftinit.c (FT_Init_FreeType): Fix a small memory leak in case FT_Init_FreeType fails for some reason. Problem reported by Maximilian Schwerin <maximilian.schwerin@buelowssiege.de>. * src/truetype/ttobjs.c (tt_size_init_bytecode): Clear the `x_ppem' and `y_ppem' fields of the `TT_Size.metrics' structure, not those of `TT_Size.root.metrics'. Problem reported by Daniel Glöckner <daniel-gl@gmx.net>. * src/type1/t1afm.c (T1_Read_PFM): Read kerning values as 16-bit signed values, not unsigned ones. Problem reported by Johannes Walther <joh_walt@yahoo.de>. 2007-02-21 David Turner <david@freetype.org> * src/pshinter/pshalgo.c (psh_hint_align): Fix a bug in the hinting of small and ghost stems in the Postscript interpreter. 2007-02-20 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * src/base/ftmac.c (FT_GetFileRef_From_Mac_ATS_Name): Fix memory leak, patch by "Jjgod Jiang" <gzjjgod@gmail.com>. * builds/mac/ftmac.c (FT_GetFileRef_From_Mac_ATS_Name): Ditto. 2007-02-16 Werner Lemberg <wl@gnu.org> * src/truetype/ttinterp.c (Ins_MD): Remove unused variable. * src/autofit/aflatin.c (af_latin_hints_link_segments): Ditto. 2007-02-14 David Turner <david@freetype.org> It seems that the following changes fix most of the known interpreter problems with my fonts, but more testing is needed, though. * src/truetype/ttinterp.c (FIX_BYTECODE): Activate. (TT_MulFix14): Rewrite. (Ins_MD, Ins_MDRP, Ins_IP) [FIX_BYTECODE]: Improved and updated. (Ins_MIRP): Ditto. 2007-02-12 Werner Lemberg <wl@gnu.org> * src/truetype/ttinterp.c (Project_x, Project_y): Remove compiler warnings. * src/pcf/pcfread.c (pcf_interpret_style), src/bdf/bdfdrivr.c (bdf_interpret_style): Ditto. 2007-02-12 David Turner <david@freetype.org> Simplify projection and dual-projection code interface. * src/truetype/ttinterp.h (TT_Project_Func): Use `FT_Pos', not FT_Vector' as argument type. * src/truetype/ttinterp.c (CUR_Func_project, CUR_Func_dualproj): Updated. (CUR_fast_project, CUR_fast_dualproj): New macros. (Project, Dual_Project, Project_x, Project_y): Updated. (Ins_GC, Ins_SCFS, Ins_MDAP, Ins_MIAP, Ins_IP): Use new `fast' macros. * src/autofit/afloader.c (af_loader_load_g): Improve spacing adjustments for the non-light auto-hinted modes. Gets rid of `inter-letter spacing is too wide' problems. * src/autofit/aflatin.c (af_latin_hints_link_segments, af_latin_hints_compute_edges): Slight optimization of the segment linker and better handling of serif segments to get rid of broken `9' in Arial at 9pt (96dpi). Introduce new string functions and the corresponding macros to get rid of various uses of strcpy and other `evil' functions, as well as to simplify a few things. * include/freetype/internal/ftmemory.h (ft_mem_strdup, ft_mem_dup, ft_mem_strcpyn): New declarations. (FT_MEM_STRDUP, FT_STRDUP, FT_MEM_DUP, FT_DUP, FT_STRCPYN): New macros. * src/base/ftutil.c (ft_mem_dup, ft_mem_strdup, ft_mem_strcpyn): New functions. * src/bdf/bdfdrivr.c (bdf_interpret_style, BDF_Face_Init), src/bdf/bdflib.c (_bdf_add_property), src/pcf/pcfread.c (pcf_get_properties, pcf_interpret_style, pcf_load_font), src/cff/cffdrivr.c (cff_get_glyph_name), src/cff/cffload.c (cff_index_get_sid_string), src/cff/cffobjs.c (cff_strcpy), src/sfnt/sfdriver.c (sfnt_get_glyph_name), src/type1/t1driver.c (t1_get_glyph_name), src/type42/t42drivr.c (t42_get_glyph_name, t42_get_name_index): Use new functions and simplify code. * builds/mac/ftmac.c (FT_FSPathMakeSpec): Don't use FT_MIN. 2007-02-11 Werner Lemberg <wl@gnu.org> * src/autofit/afloader.c (af_loader_load_g): Don't change width for non-spacing glyphs. 2007-02-07 Tom Parker <palfrey@tevp.net> * src/cff/cffdrivr.c (cff_get_name_index): Protect against NULL pointer. 2007-02-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * include/freetype/ftmac.h (FT_DEPRECATED_ATTRIBUTE): Introduce __attribute((deprecated))__ to warn functions which use non-ANSI data types in its interfaces. (FT_GetFile_From_Mac_Name): Deprecated, using FSSpec. (FT_GetFile_From_Mac_ATS_Name): Deprecated, using FSSpec. (FT_New_Face_From_FSSpec): Deprecated, using FSSpec. (FT_New_Face_From_FSRef): Deprecated, using FSRef. * src/base/ftmac.c: Predefine FT_DEPRECATED_ATTRIBUTE as void to avoid warning in building FreeType. * builds/mac/ftmac.c: Ditto. 2007-02-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * src/base/ftbase.c: Fix to use builds/mac/ftmac.c, if configured `--with-fsspec' etc. Replace #include "ftmac.c" with #include <ftmac.c>. 2007-02-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * include/freetype/ftmac.h (FT_GetFilePath_From_Mac_ATS_Name): Introduced as replacement of FT_GetFile_From_Mac_ATS_Name. * src/base/ftmac.c (FT_GetFilePath_From_Mac_ATS_Name): Ditto. (FT_GetFile_From_Mac_ATS_Name): Rewritten as wrapper of FT_GetFilePath_From_Mac_ATS_Name. * builds/mac/ftmac.c: Ditto. 2007-02-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * include/freetype/ftmac.h: Fixed wrong comment: FSSpec of FT_GetFile_From_Mac_Name, FT_GetFile_From_Mac_ATS_Name are for passing to FT_New_Face_From_FSSpec. 2007-02-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * builds/unix/configure.raw: Check whether Mac OS X system headers can be built under ANSI C mode. * src/base/ftmac.c (OS_INLINE): Redefine OS_INLINE by a version compatible to ANSI C in case system headers are ANSI C incompatible. * builds/mac/ftmac.c (OS_INLINE): Ditto. 2007-02-01 Werner Lemberg <wl@gnu.org> * include/freetype/ttnameid.h (TT_MS_LANGID_DZONGHKA_BHUTAN): Explain why applications shouldn't use it. Found by Alexei. 2007-02-01 Alexei Podtelezhnikov <apodtele@gmail.com> * builds/unix/freetype2.m4 (AC_CHECK_FT2): Fix spelling of warning message. * src/gxvalid/gxvmort1.c (gxv_mort_subtable_type1_substTable_validate): Fix debugging message. 2007-01-31 Werner Lemberg <wl@gnu.org> * Version 2.3.1 released. ========================= Tag sources with `VER-2-3-1-FINAL'. * builds/win32/visualc/freetype.dsp, builds/win32/visualc/freetype.vcproj: s/230/231/. * builds/win32/visualc/index.html: s/221/231/. * vms_make.com: Add `ftgasp'. 2007-01-30 David Turner <david@freetype.org> Tag sources with VER-2-3-1 to prepare release. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1. * docs/VERSION.DLL, docs/release, README, Jamfile (RefDoc): s/2.3.0/2.3.1/. * builds/unix/configure.raw (version_info): Set to 9:12:3. * src/autofit/aftypes.h (AF_USE_WARPER), src/autofit/afloader.c (af_loader_load_g): Disable the warper (i.e., the light hinting improvements) to make a 2.3.1 bugfix release before introducing a new feature. This should give us more time to tune and improve the warper for the next release. * docs/CHANGES: Update accordingly. 2007-01-25 David Turner <david@freetype.org> For light auto-hinting, improve glyph advance widths and resurrect normal/full hinting to its normal quality. * src/autofit/afhints.h (AF_GlyphHintsRec): New members `xmin_delta' and `xmax_delta'. * src/autofit/afhints.c (af_glyph_hints_reload): Reset `xmin_delta' and `xmax_delta'. * src/autofit/afloader.c (af_loader_load_g) <AF_USE_WARPER>: Replace preprocessor conditional with if-clause, handling both light and normal mode. * src/autofit/afwarp.c (AF_WarpScore): Fine-tune again. (af_warper_compute): Handle `xmin_delta' and `xmax_delta'. 2007-01-25 Werner Lemberg <wl@gnu.org> * docs/release: Updated -- Savannah uses a new uploading scheme. 2007-01-25 David Turner <david@freetype.org> * src/cff/cffload.c (cff_index_get_pointers): Improve previous fix. * src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_callsubr, cff_op_callgsubr>: Fix sanity check for empty functions. * docs/CHANGES: Document light auto-hinting improvement. 2007-01-25 Werner Lemberg <wl@gnu.org> * src/cff/cffload.c (cff_index_get_pointers): Handle last entry correctly in a sanity check. Since this function is only used to load local and global functions, any charstring that called the last local/global function would fail otherwise. This fixes Savannah bug #18867. * docs/CHANGES: Document it. 2007-01-23 David Turner <david@freetype.org> * src/truetype/ttobjs.c (tt_size_ready_bytecode): Fix typo that prevented compilation when disabling both the unpatented and the bytecode interpreter in the TrueType font driver. Fix and enable the warper to improve `light' hinting mode. This is not necessarily a final version, but it seems to work well. * src/autofit/aflatin.c (af_latin_hints_init) [AF_USE_WARPER]: Disable code. (af_latin_hints_apply) [AF_USE_WARPER]: Handle FT_RENDER_MODE_LIGHT. * src/autofit/aftypes.h: Activate AF_USE_WARPER. * src/autofit/afwarp.c (AF_WarpScore): Tune table. (af_warper_compute_line_best): Fix array size of `scores'. (af_warper_compute): Better handling of border cases. * src/autofit/afwarp.h (AF_WarperRec): Remove unused members `X1' and `X2'. 2007-01-21 Werner Lemberg <wl@gnu.org> * ChangeLog: Split off older entries into... * ChangeLog.22: This new file. 2007-01-21 Werner Lemberg <wl@gnu.org> * docs/CHANGES: Document SHZ fix. 2007-01-21 George Williams <gww@silcom.com> * src/truetype/ttinterp.c (Ins_SHZ): SHZ doesn't move phantom points. 2007-01-21 Werner Lemberg <wl@gnu.org> * src/sfnt/ttmtx.c (tt_face_get_metrics) [!FT_CONFIG_OPTION_OLD_INTERNALS]: Fix limit check. 2007-01-17 Werner Lemberg <wl@gnu.org> * Version 2.3.0 released. ========================= Tag sources with `VER-2-3-0-FINAL'. 2007-01-17 Werner Lemberg <wl@gnu.org> * docs/release: Updated. 2007-01-16 David Turner <david@freetype.org> * src/autofit/aflatin.c (af_latin_hints_compute_segments), src/cff/cffdrivr.c (cff_ps_get_font_info), src/truetype/ttobjs.c (tt_face_init), src/truetype/ttinterp.c (Ins_SHC): Fix compiler warnings. 2007-01-15 Detlef Würkner <TetiSoft@apg.lahn.de> * builds/amiga/makefile, builds/amiga/makefile.os4, builds/amiga/smakefile: Add `ftgasp.c' and `ftlcdfil.c'. * builds/amiga/include/freetype/config/ftconfig.h: Synchronize. 2007-01-14 Detlef Würkner <TetiSoft@apg.lahn.de> Fix various compiler warnings. * src/truetype/ttdriver.c (tt_size_select), src/cff/cffobjs.h, src/cff/cffobjs.c (cff_size_request), src/type42/t42objs.h: s/index/strike_index/. * src/base/ftobjs.c (FT_Match_Size): s/index/size_index/. * src/gxvalid/gxvmorx5.c (gxv_morx_subtable_type5_InsertList_validate): s/index/table_index/. * src/truetype/ttinterp.c (Compute_Point_Displacement), src/pcf/pcfread.c (pcf_seek_to_table_type): Avoid possibly uninitialized variables. 2007-01-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * docs/CHANGES, docs/INSTALL.MAC: Improvements. 2007-01-13 Werner Lemberg <wl@gnu.org> * src/type1/t1afm.c (T1_Read_Metrics): MS Windows allows PFM versions up to 0x3FF without complaining. 2007-01-13 Derek Clegg <dclegg@apple.com> Add FT_Get_PS_Font_Info interface to CFF driver. * src/cff/cfftypes.h: Include FT_TYPE1_TABLES_H. (CFF_FontRec): Add `font_info' field. * src/cff/cffload.c: Include FT_TYPE1_TABLES_H. (cff_font_done): Free font->font_info if necessary. * src/cff/cffdrivr.c (cff_ps_get_font_info): New function. (cff_service_ps_info): Register cff_ps_get_font_info. 2007-01-13 Werner Lemberg <wl@gnu.org> * src/base/ftoutln.c (FT_Outline_Get_Orientation): Fix compilation with C++ compiler. * src/autofit/afhints.c (af_glyph_hints_dump_segments, af_glyph_hints_dump_edges): Ditto. * src/base/rules.mk (BASE_SRC): Remove ftgasp.c (it's already in `modules.cfg'). * src/sfnt/ttsbit0.h: Remove. * src/sfnt/rules.mk (SFNT_DRV_SRC): Don't include ttsbit0.c. 2007-01-12 David Turner <david@freetype.org> * src/base/ftbitmap.c (ft_bitmap_assure_buffer): Fix memory stomping bug in the bitmap emboldener if the pitch of the source bitmap is much larger than its width. * src/truetype/ttinterp.c (Update_Max): Fix aliasing-related compilation warning. 2007-01-12 Werner Lemberg <wl@gnu.org> * builds/unix/install-sh, builds/unix/mkinstalldirs: Updated from `automake' CVS module from sources.redhat.com. 2007-01-11 Werner Lemberg <wl@gnu.org> * src/type1/t1load.c (is_space): Removed. (parse_encoding, parse_charstrings): Use IS_PS_DELIM. (parse_charstrings): Use IS_PS_TOKEN. * autogen.sh: Avoid bash specific syntax. 2007-01-11 David Turner <david@freetype.org> * docs/CHANGES: Small update. * builds/unix/configure.raw (version_info): Set to 9:11:3. * src/base/ftobjs.c (IsMacResource): Fix a small bug that caused a crash with some Mac OS X .dfont files. Submitted by Masatake Yamato. * autogen.sh: Small fix to get it working on Mac OS X properly: The issue is that GNU libtool is called `glibtool' on this platform, and we must call `glibtoolize', since `libtoolize' doesn't exist. 2007-01-10 David Turner <david@freetype.org> * all-sources: Tag all sources with VER-2-3-0-RC1 and VER-2-3-0. * Jamfile (RefDoc), README, builds/win32/visualc/freetype.dsp, builds/win32/visualc/freetype.vcproj, docs/VERSION.DLL: Update version number to 2.3.0. * include/freetype/freetype.h (FREETYPE_MINOR): Set to 3. (FREETYPE_PATCH): Set to 0. * include/freetype/ftchapters.h, include/freetype/ftgasp.h, include/freetype/ftlcdfil.h: Update reference documentation with GASP support and LCD filtering sections. * src/pshinter/pshalgo.c (psh_glyph_compute_inflections): Fix a typo which created an endless loop with some malformed font files. 2007-01-10 Derek Clegg <dclegg@apple.com> * src/type1/t1load.c (T1_Get_MM_Var): Always return fixed-point values. 2007-01-08 David Turner <david@freetype.org> * docs/CHANGES: Updated. * include/freetype/ftgasp.h, src/base/ftgasp.c: New files which add a new API `FT_Get_Gasp' to return entries of the `gasp' table corresponding to a given character pixel size. * src/sfnt/ttload.c (tt_face_load_gasp): Add version check for the `gasp' table, in order to avoid potential problems with later versions. * include/freetype/config/ftheader.h (FT_GASP_H): New macro for <freetype/ftgasp.h>. * src/base/rules.mk (BASE_SRC), src/base/Jamfile (_sources), modules.cfg (BASE_EXTENSIONS), builds/win32/visualc/freetype.dsp, builds/win32/visualc/freetype.vcproj: Add src/base/ftgasp.c to the default build. 2007-01-07 Werner Lemberg <wl@gnu.org> * src/cid/cidparse.c (cid_parser_new): Improve error message for Type 11 fonts. Scan for `/sfnts' token. 2007-01-07 Werner Lemberg <wl@gnu.org> * src/cid/cidparse.c (cid_parser_new): Reject Type 11 fonts. 2007-01-06 Werner Lemberg <wl@gnu.org> * src/cff/cffload.c (cff_index_init): Remove unused variable. (cff_index_read_offset): s/perror/errorp/ to avoid global shadowing. 2007-01-04 David Turner <david@freetype.org> * src/pfr/pfrobjs.c (pfr_face_init): Detect non-scalable fonts correctly. This fixes Savannah bug #17876. Do not allocate interpreter-specific tables in memory if we are not going to load glyphs with the bytecode interpreter anyway. * src/truetype/ttgload.c (tt_loader_init): Load execution context only if glyph is hinted. Updated. * src/truetype/ttobjs.h (TT_SizeRec): Add members `bytecode_ready' and `cvs_ready'. Add `tt_size_ready_bytecode' declaration. * src/truetype/ttobjs.c (tt_size_done_bytecode, tt_size_init_bytecode, tt_size_ready_bytecode): New functions. (tt_size_init): Move most code into `tt_size_init_bytecode'. (tt_size_done): Move most code into `tt_size_done_bytecode'. (tt_size_reset): Move some code to `tt_size_ready_bytecode'. Don't extract the metrics table from the SFNT font file. Instead, reparse it on each glyph load. The runtime difference is not noticeable, and it can save a lot of heap memory when memory-mapped files are not used. * include/freetype/internal/tttypes.h (TT_FaceRec): Add members `horz_metrics_offset' and `vert_metrics_offset'. * src/sfnt/ttmtx.c (tt_face_load_hmtx, tt_face_get_metrics): Updated. * src/sfnt/ttcmap.c (tt_cmap4_validate): Slight optimization. Do not load the CFF index offsets into memory, since this wastes a *lot* of heap memory with large Asian CFF fonts. There is no significant performance loss. * src/cff/cffload.h: Add `cff_charset_cid_to_gindex' declaration. * src/cff/cfftypes.h (CFF_IndexRec): Add fields `start' and `data_size'. (CFF_CharsetRec): Add field `num_glyphs'. * src/cff/cffload.c (cff_index_read_offset, cff_index_load_offsets, cff_charset_cid_to_gindex): New functions. (cff_new_index): Renamed to... (cff_index_init): This. Update all callers. Updated -- some code has been moved to `cff_index_load_offsets'. (cff_done_index): Renamed to... (cff_index_done): This. Update all callers. (cff_index_get_pointers, cff_index_access_element): Updated to use stream offsets. (cff_charset_compute_cids): Set `num_glyphs' field. (cff_encoding_load): Updated. * src/cff/cffgload.c (cff_slot_load): Updated. 2007-01-04 David Turner <david@freetype.org> * docs/INSTALL.UNIX: Simplify some parts, add reference to autogen.sh and pointer to README.CVS. * README.CVS: Add common problem description and solution when running autogen.sh. * docs/INSTALL: Add reference to MacOS X. * docs/MAKEPP, docs/INSTALL.MAC: New documentation files. * docs/TODO: Remove obsolete items. * src/raster/ftraster.c: (TRaster_Instance): Replace it with... (TWorker): This. Remove `count_table' and `memory'. Make `grays' a pointer. (TRaster): New structure. (count_table): New static array. (RAS_ARGS, RAS_ARG, RAS_VARS, RAS_VAR, FT_UNUSED_RASTER, cur_ras, Vertical_Gray_Sweep_Step, ft_black_new, ft_black_done, ft_black_set_mode, ft_black_render): Updated. (ft_black_init): Don't initialize `count_table'. (ft_black_reset): Use the render pool. This saves about 6KB of heap space for each FT_Library instance. * src/smooth/ftgrays.c (TRaster): Replaced with... (TWorker): This. Remove `memory'. (TRaster): New structure. (RAS_ARG_, RAS_ARG, RAS_VAR_, RAS_VAR, ras, gray_render_line, gray_move_to, gray_line_to, gray_conic_to, gray_cubic_to, gray_render_span, gray_raster_render): Updated. (gray_raster_reset): Use the render pool. This saves about 6KB of heap space for each FT_Library instance. * src/sfnt/sfobjs.c, src/sfnt/ttkern.c, src/sfnt/ttkern.h, src/sfnt/ttmtx.c, src/sfnt/ttsbit.c, src/sfnt/ttsbit.h, src/truetype/ttpload.c, include/freetype/config/ftoption.h: Remove FT_OPTIMIZE_MEMORY macro (and code for !FT_OPTIMIZE_MEMORY) since the optimization is no longer experimental. * src/pshinter/pshalgo.c (psh_glyph_interpolate_normal_points): Remove a typo that results in no hinting and a memory leak with some large Asian CFF fonts. * src/base/ftobjs.c (FT_Done_Library): Remove a subtle memory leak which happens when FT_Done_Library is called with still opened CFF_Faces in it. We need to close all faces before destroying the modules, or else some bad things (memory leaks) may happen. 2007-01-02 Werner Lemberg <wl@gnu.org> * src/gxvalid/gxvkern.c (gxv_kern_subtable_fmt0_pairs_validate): Remove compiler warning. 2007-01-02 David Turner <david@freetype.org> * src/sfnt/sfobjs.c: Add documentation comment. 2006-12-31 Masatake YAMATO <jet@gyve.org> * src/gxvalid/gxvkern.c (gxv_kern_subtable_fmt0_pairs_validate): New function. Check uniqueness of the gid pairs. (gxv_kern_subtable_fmt0_validate): Move some code to `gxv_kern_subtable_fmt0_pairs_validate'. 2006-12-22 David Turner <david@freetype.org> * src/autofit/aflatin.c, src/truetype/ttgload.c: Remove compiler warnings. * builds/win32/visualc/freetype.vcproj: Add _CRT_SECURE_NO_DEPRECATE to avoid deprecation warnings with Visual C++ 8. 2006-12-16 Anders Kaseorg <anders@kaseorg.com> * src/base/ftlcdfil.c (FT_Library_SetLcdFilter) [FT_FORCE_LIGHT_LCD_FILTER]: Fix typo. 2006-12-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * include/freetype/internal/services/svotval.h: Add `volatile' to sync with the modification by Jens Claudius on 2006-08-22; cf. https://cvs.savannah.gnu.org/viewcvs/freetype/freetype2/src/otvalid/otvmod.c?r1=1.4&r2=1.5 2006-12-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * src/base/ftmac.c: Specialized for Mac OS X only. * builds/unix/ftconfig.in: Fixed for ppc64 missing Carbon framework. * builds/unix/configure.raw: Ditto. When explicit switches for FSSpec/FSRef/QuickDraw/ATS availability are given to configure, builds/mac/ftmac.c is used instead of default src/base/ftmac.c. 2006-12-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * builds/mac/ftmac.c: Copied src/base/ftmac.c for legacy system. * builds/mac/FreeType.m68k_cfm.make.txt: Fix to use builds/mac/ftmac.c instead of src/base/ftmac.c * builds/mac/FreeType.ppc_carbon.make.txt: Ditto. * builds/mac/FreeType.ppc_classic.make.txt: Ditto. * builds/mac/FreeType.m68k_far.make.txt: Ditto, and exclude gxvalid.c that cannot be built at present. 2006-12-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * src/base/ftobjs.c: Improvement of resource fork handler for POSIX, cf. https://lists.gnu.org/archive/html/freetype-devel/2006-10/msg00025.html (Mac_Read_sfnt_Resource): Count only `sfnt' resource of suitcase font format or .dfont, to simulate the face index number counted by ftmac.c. (IsMacResource): Return the number of scalable faces correctly. 2006-12-10 Werner Lemberg <wl@gnu.org> * builds/toplevel.mk (version): Protect against `distclean' target. 2006-12-09 Werner Lemberg <wl@gnu.org> * builds/*/*def.mk, builds/*/detect.mk (CAT): Define to either `cat' or `type'. * builds/freetype.mk (version): Extracted from freetype.h, using GNU make's built-in string functions. (refdoc): Use $(version) instead of static version number. 2006-12-08 Werner Lemberg <wl@gnu.org> * builds/toplevel.mk (dist): Extract version number from freetype.h. 2006-12-08 Vladimir Volovich <vvv@vsu.ru> * src/tools/apinames.c (State): Remove final comma in structure -- xlc v5 under AIX 4.3 doesn't like this. 2006-12-07 David Turner <david@freetype.org> * src/autofit/afloader.c (af_loader_load_g): Small adjustment to the spacing of auto-fitted glyphs. This only impacts rare cases (e.g., Arial Bold at rather small character sizes). 2006-12-03 Werner Lemberg <wl@gnu.org> * src/sfnt/rules.mk (SFNT_DRV_SRC): Add ttsbit0.c. 2006-12-01 Werner Lemberg <wl@gnu.org> * src/sfnt/sfobjs.c (tt_face_get_name): All Unicode strings are encoded in UTF-16BE. Patch from Rajeev Pahuja <rpahuja@esri.com>. (tt_name_entry_ascii_from_ucs4): Removed. * include/freetype/ftxf86.h: Fix and extend comment so that it appears in the documentation. * include/freetype/ftchapters.h: Add `font_format' section. * src/tools/docmaker/tohtml.py (HtmlFormatter::index_exit): Add link to TOC in index page. 2006-11-28 David Turner <david@freetype.org> * src/smooth/ftgrays.c (gray_raster_render): Return 0 when we are trying to render into a zero-width/height bitmap, not an error code. * src/truetype/ttobjs.c (tt_face_init): Fix typo in previous patch. * src/smooth/ftgrays.c: Remove hard-coded error values; use FreeType ones instead. * src/autofit/afhints.c (af_glyph_hints_dump_segments): Remove unused variable. 2006-11-26 Pierre Hanser <hanser@club-internet.fr> * src/truetype/ttobjs.c (tt_face_init): Protect against NULL pointer. 2006-11-25 David Turner <david@freetype.org> * src/autofit/afhints.c (af_glyph_hints_dump_points, af_glyph_hints_dump_segments, af_glyph_hints_dumpedges) [!AF_DEBUG]: Add stubs to link the `ftgrid' test program when debugging is disabled in the auto-hinter. 2006-11-23 David Turner <david@freetype.org> * src/autofit/afhints.c, src/autofit/afhints.h, src/autofit/aflatin.c, src/autofit/aftypes.h: Miscellaneous auto-hinter improvements. * src/autofit/afhints.c (af_glyph_hints_dump_segments) [AF_DEBUG]: Emit more sensible information. * src/autofit/afhints.h (AF_SegmentRec): Add `height' member. * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Improve rounding of blue values. (af_latin_hints_compute_segments): Hint segment heights. (af_latin_hints_link_segments): Reduce `len_score' value. (af_latin_hints_compute_edges): Increase `segment_length_threshold' value and use `height' member for comparisons. (af_latin_hint_edges): Extend logging message. Improve handling of remaining edges. 2006-11-22 Werner Lemberg <wl@gnu.org> Fix Savannah bug #15553. * src/truetype/ttgload.c (tt_loader_init): Re-execute the CVT program after a change from mono to grayscaling (and vice versa). Use correct constant for comparison to get `exec->grayscale'. 2006-11-18 Werner Lemberg <wl@gnu.org> Because FT_Load_Glyph expects CID values for CID-keyed fonts, the test for a valid glyph index must be deferred to the font drivers. This patch fixes Savannah bug #18301. * src/base/ftobjs.c (FT_Load_Glyph): Don't check `glyph_index'. * src/bdf/bdfdrivr.c (BDF_Glyph_Load), src/cff/cffgload.c (cff_slot_load), src/cid/cidgload.c (cid_slot_load_glyph), src/pcf/pcfdrivr.c (PCF_Glyph_Load), src/pfr/pfrobjs.c (pfr_slot_load), src/truetype/ttdriver.c (Load_Glyph), src/type1/t1gload.c (T1_Load_Glyph), src/winfonts/winfnt.c (FNT_Load_Glyph): Check validity of `glyph_index'. 2006-11-13 David Turner <david@freetype.org> * src/truetype/ttinterp.c (FIX_BYTECODE): Undefine. The interpreter `enhancements' are still too buggy for general use. * src/base/ftlcdfil.c: Add support for FT_FORCE_LIGHT_LCD_FILTER and FT_FORCE_LEGACY_LCD_FILTER at compile time. Define these macros when building the library to change the default LCD filter to be used. This is only useful for experimentation. * include/freetype/ftlcdfil.h: Update documentation. 2006-11-10 David Turner <david@freetype.org> * src/smooth/ftsmooth.c: API change for the LCD filter. The FT_LcdFilter value is an enumeration describing which filter to apply, with new values FT_LCD_FILTER_LIGHT and FT_LCD_FILTER_LEGACY (the latter implements the LibXft original algorithm which produces strong color fringes for everything except very-well hinted text). * include/freetype/ftlcdfil.h (FT_Library_SetLcdFilter): Change second parameter to an enum type. * src/base/ftlcdfil.c (USE_LEGACY): Define. (_ft_lcd_filter): Rename to... (_ft_lcd_filter_fir): This. Update parameters. (_ft_lcd_filter_legacy) [USE_LEGACY]: New filter function. (FT_Library_SetLcdFilter): Update parameters. Handle new filter modes. * include/internal/ftobjs.h: Include FT_LCD_FILTER_H. (FT_Bitmap_LcdFilterFunc): Change third argument to `FT_Library'. (FT_LibraryRec) [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Add filtering callback and update other fields. * src/smooth/ftsmooth.c (ft_smooth_render_generic) [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Update. Other minor improvements. * src/autofit/aflatin.c: Various tiny improvements that drastically improve the handling of serif fonts and of LCD/LCD_V hinting modes. (af_latin_hints_compute_edges): Fix typo. (af_latin_compute_stem_width): Take better care of diagonal stems. 2006-11-09 David Turner <david@freetype.org> * src/pshinter/pshalgo.c (psh_glyph_compute_inflections): Fix typo which created a variable-used-before-initialized bug. 2006-11-07 Zhe Su <james.su@gmail.com> * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Handle vertical layout also. 2006-11-03 Werner Lemberg <wl@gnu.org> * src/base/ftcalc.c: Don't use `long long' but `FT_Int64'. 2006-11-02 David Turner <david@freetype.org> Add a few tweaks to better handle serif fonts. Add more debugging messages. * src/autofit/aflatin.c (af_latin_hints_compute_edges): Ignore segments that are less than 1.5 pixels high. This gets rid of *many* corner cases with serifs. (af_latin_align_linked_edge): Add logging message. (af_latin_hint_edges): Use AF_HINTS_DO_BLUES. Add logging messages. Handle AF_EDGE_FLAG flag specially. * src/autofit/afmodule.c [AF_DEBUG]: Add _af_debug, _af_debug_disable_blue_hints, and _af_debug_hints variables. * src/autofit/aftypes.h (AF_LOG) [AF_DEBUG]: Use _af_debug. Update external declarations. (af_corner_orientation, af_corner_is_flat): Replaced by... * include/freetype/internal/ftcalc.h (ft_corner_orientation, ft_corner_is_flat): These declarations. * src/autofit/afangles.c (af_corner_orientation, af_corner_is_flat): Comment out. Replaced by... * src/base/ftcalc.h (ft_corner_orientation, ft_corner_is_flat): These functions. Update all callers. (FT_Add64) [!FT_LONG64]: Simplify. * src/autofit/afhints.c: Include FT_INTERNAL_CALC_H. (af_direction_compute): Add a missing FT_ABS call. This bug caused production of garbage by missing lots of segments. * src/autofit/afhints.h (AF_HINTS_DO_BLUES): New macro. * src/autofit/afloader.c (af_loader_init, af_loader_done) [AF_DEBUG]: Set _af_debug_hints. * src/pshinter/pshalgo.c: Include FT_INTERNAL_CALC_H. (psh_corner_is_flat, psh_corner_orientation): Use ft_corner_is_flat and ft_corner_orientation. * src/gzip/inftrees.c (huft_build): Remove compiler warning. 2006-10-24 Werner Lemberg <wl@gnu.org> * src/cff/cffload.c (cff_encoding_load): Remove unused variable. * src/base/ftobjs.c (FT_Select_Charmap): Disallow FT_ENCODING_NONE as argument. 2006-10-23 Zhe Su <zsu@novell.com> * src/base/ftoutln.c (FT_Outline_Get_Orientation): Re-implement to better deal with broken Asian fonts with strange glyphs, having self-intersections and other peculiarities. The used algorithm is based on the nonzero winding rule. 2006-10-23 David Turner <david@freetype.org> Speed up the CFF font loader. With some large CFF fonts, FT_Open_Face is now more than three times faster. * src/cff/cffload.c (cff_get_offset): Removed. (cff_new_index): Inline functionality of `cff_get_offset'. (cff_charset_compute_cids, cff_charset_free_cids): New functions. (cff_charset_done): Call `cff_charset_free_cids'. (cff_charset_load): Call `cff_charset_compute_cids'. (cff_encoding_load) <Populate>: Ditto, to replace inefficient loop. * src/sfnt/ttmtx.c (tt_face_load_hmtx): Replace calls to FT_GET_XXX with FT_NEXT_XXX. Speed up the Postscript hinter, with more than 100% speed increase on my machine. * src/pshinter/pshalgo.c (psh_corner_is_flat, psh_corner_orientation): New functions. (psh_glyph_compute_inflections): Merge loops for efficiency. Use `psh_corner_orientation'. (psh_glyph_init): Use `psh_corner_is_flat'. (psh_hint_table_find_strong_point): Renamed to... (psh_hint_table_find_strong_points): This. Rewrite, adding argument to handle all points at once. Update all callers. (PSH_MAX_STRONG_INTERNAL): New macro. (psh_glyph_interpolate_normal_points): Rewrite for efficiency. 2006-10-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * src/base/ftmac.c (FT_New_Face_From_FOND): Initialize variable `error' with FT_Err_Ok. 2006-10-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * docs/INSTALL.CROSS: New document file for cross-building. * builds/unix/configure.raw: Preliminary cross-building support. Find native C compiler and pass it by CC_BUILD, and find suffix for native executable and pass it by EXEEXT_BUILD. Also suffix for target executable is passed by EXEEXT. * builds/unix/unix-cc.in (CCraw_build, E_BUILD): New variables to build `apinames' which runs on building system. They are set by CC_BUILD and EXEEXT_BUILD. * builds/exports.mk (APINAMES_EXE): Change the extension for apinames from the suffix for target (E) to that for building host (E_BUILD). 2006-10-12 Werner Lemberg <wl@gnu.org> * docs/INSTALL.UNX, docs/UPGRADE.UNX: Renamed to... * docs/INSTALL.UNIX, docs/UPGRADE.UNIX: This. Update all documents which reference those files. 2006-10-12 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * builds/unix/configure.raw (FT2_EXTRA_LIBS): New variable. It is embedded in freetype2.pc and freetype-config. Use it to record Carbon dependency of MacOSX. * builds/unix/freetype2.in: Embed FT2_EXTRA_LIBS. * builds/unix/freetype-config.in: Ditto. 2006-10-11 Werner Lemberg <wl@gnu.org> * devel/ftoption.h (FT_CONFIG_OPTION_SUBPIXEL_RENDERING): Define for development. 2006-10-03 Jens Claudius <jens.claudius@yahoo.com> * include/freetype/config/ftstdlib.h: Cast away volatileness from argument to ft_setjmp. * include/freetype/internal/ftvalid.h: Add comment that ft_validator_run must not be used. 2006-10-01 Werner Lemberg <wl@gnu.org> * src/base/ftbase.c: Undo change from 2006-09-30. * src/base/rules.mk (BASE_SRC): Remove `ftlcdfil.c'. 2006-09-30 David Turner <david@freetype.org> * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): s/unpatented_hinting/ignore_unpatented_hinter/. Update all callers. * src/base/ftobjs.c (FT_Load_Glyph): Refine the algorithm whether auto-hinting shall be used or not. * src/truetype/ttobjs.c (tt_face_init): Ditto. 2006-09-30 Werner Lemberg <wl@gnu.org> * src/base/rules.mk (BASE_SRC): Remove `ftapi.c' (which is no longer in use). * src/base/ftbase.c: Include `ftlcdfil.c'. 2006-09-29 Werner Lemberg <wl@gnu.org> * src/sfnt/ttcmap.c (tt_cmap4_char_map_binary): Fix algorithm for overlapping segments. Bug reported by Stefan Koch. 2006-09-28 David Turner <david@freetype.org> Fix a bug in the automatic unpatented hinting support which prevents normal bytecode hinting to work properly. * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): s/force_autohint/unpatented_hinting/. Update all callers. * src/base/ftobjs.c (FT_Load_Glyph): Updated code. * src/autofit/aftypes.h (AF_DEBUG): Undefine to get rid of traces. 2006-09-27 David Turner <david@freetype.org> * include/freetype/freetype.h (FT_FREETYPE_PATCH): Set to 2. Add a new API to support color filtering of subpixel glyph bitmaps. In a default build, the function `FT_Library_SetLcdFilter' returns `FT_Err_Unimplemented_Feature'; you need to #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING in ftoption.h to compile the real implementation. * include/freetype/ftlcdfil.h, src/base/ftlcdfil.c: New files. * include/freetype/internal/ftobjs.h (FT_Bitmap_LcdFilterFunc): New typedef. (FT_LibraryRec) [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: New members `lcd_filter_weights' and `lcd_filter'. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Remove arguments `hmul' and `vmul'. Handle subpixel rendering. Simplify function. (ft_smooth_render_lcd): Use `FT_RENDER_MODE_LCD'. (ft_smooth_render_lcd_v): Use `FT_RENDER_MODE_LCD_V'. * include/freetype/config/ftheader.h (FT_LCD_FILTER_H): New macro, pointing to <freetype/ftlcdfil.h>. * src/base/Jamfile (_sources), src/base/rules.mk (BASE_SRC), vms_make.com: Add `ftlcdfil.c' to the list of compiled source files. * modules.cfg (BASE_EXTENSIONS): Add ftlcdfil.c. 2006-09-26 David Bustin * src/pfr/pfrobjs.c (pfr_face_get_kerning): Skip adjustment bytes correctly. Reported as Savannah bug #17843. 2006-09-26 David Turner <david@freetype.org> * src/autofit/afhints.h (AF_HINTS_DO_HORIZONTAL, AF_HINTS_DO_VERTICAL, AF_HINTS_DO_ADVANCE): New macros to disable horizontal and vertical hinting for the purpose of debugging the auto-fitter. * src/autofit/afmodule.c (_af_debug_disable_horz_hints, _af_debug_disable_vert_hints) [AF_DEBUG]: New global variables. * src/autofit/aftypes.h [AF_DEBUG]: Declare above variables. * include/freetype/config/ftoption.h, devel/ftoption.h (FT_CONFIG_OPTION_SUBPIXEL_RENDERING): New macro to control whether we want to compile LCD-optimized rendering code (à la ClearType) or not. The macro *must* be disabled in default builds of the library for patent reasons. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Disable LCD-specific rendering when FT_CONFIG_OPTION_SUBPIXEL_RENDERING isn't defined at compile time. This only changes the content of the rendered glyph to match the one of normal gray-level rendering, hence clients should not need to be modified. * docs/CHANGES: Updated. 2006-09-18 Garrick Meeker <garrick@digitalanarchy.com> * src/base/ftmac.c (FT_New_Face_From_FOND): Fall back to SFNT if LWFN fails and both are available. 2006-09-11 David Turner <david@freetype.org> * src/sfnt/sfobjs.c (tt_face_get_name): Support some fonts which report their English names through an Apple Roman (platform,encoding) pair, with language_id != English. If the font uses another name entry with language_id == English, it will be selected correctly, though. * src/truetype/ttobjs.c (tt_face_init): Add unpatented hinting selection for `mingli.ttf'. 2006-09-05 Werner Lemberg <wl@gnu.org> * src/truetype/ttpload.c (tt_face_load_hdmx): Handle `record_size' values which have the upper two bytes set to 0xFF instead of 0x00 (as it happens in at least two CJKV fonts, `HAN NOM A.ttf' and `HAN NOM B.ttf'). * src/smooth/ftgrays.c [GRAYS_USE_GAMMA]: Really remove all code. 2006-09-05 David Turner <david@freetype.org> Minor source cleanups and optimizations. * src/smooth/ftgrays.c (GRAYS_COMPACT): Removed. (TRaster): Remove `count_ex' and `count_ey'. (gray_find_cell): Remove 2nd and 3rd argument. (gray_alloc_cell): Merged with `gray_find_cell'. (gray_record_cell): Simplify. (gray_set_cell): Rewrite. (gray_start_cell): Apply offsets to `ras.ex' and `ras.ey'. (gray_render_span): Don't use FT_MEM_SET for small values. (gray_dump_cells) [DEBUG_GRAYS]: New function. (gray_sweep): Avoid buffer overwrites when to drawing the end of a bitmap scanline. (gray_convert_glyph): Fix speed-up. 2006-09-04 David Turner <david@freetype.org> * src/smooth/ftgrays.c (gray_convert_glyphs): Make it work with 64bit processors. 2006-09-03 Werner Lemberg <wl@gnu.org> * devel/ftoption.h: Synchronize with include/freetype/config/ftoption.h. * src/smooth/ftgrays.c (gray_record_cell): Remove shadowing variable declaration. (gray_convert_glyph): Fix compiler warnings. 2006-09-01 David Turner <david@freetype.org> * src/truetype/ttobjs.c (tt_face_init): Update the TrueType loader to recognize a few fonts that require the automatic unpatented loader. * src/smooth/ftgrays.c: Optimize the performance of the anti-aliased rasterizer. The speed improvement is between 15% and 25%, depending on the font data. (GRAYS_USE_GAMMA, GRAYS_COMPACT): Removed, and all associated code. (TCell): Redefine. (TRaster): New members `buffer', `buffer_size', `ycells', `ycount'. (gray_init_cells): Updated. (gray_find_cell, gray_alloc_cell): New functions. (gray_record_cell): Rewritten to use `gray_find_cell' and `gray_alloc_cell'. (PACK, LESS_THAN, SWAP_CELLS, DEBUG_SORT, QUICK_SORT, SHELL_SORT, QSORT_THRESHOLD): Removed. (gray_shell_sort, gray_quick_sort, gray_check_sort, gray_dump_cells): Removed. (gray_sweep): Rewritten. (gray_convert_glyph): Rewrite code which used one of the sorting functions. (gray_raster_render): Updated. 2006-08-29 Dr. Werner Fink <werner@suse.de> * configure: Make it possible to handle configure options which have strings containing spaces. 2006-08-27 David Turner <david@freetype.org> * include/freetype/config/ftoption.h (TT_USE_BYTECODE_INTERPRETER): New macro, defined if either TT_CONFIG_OPTION_BYTECODE_INTERPRETER or TT_CONFIG_OPTION_UNPATENTED_HINTING is defined. * include/freetype/internal/ftcalc.h, src/base/ftcalc.c, src/truetype/truetype.c, src/truetype/ttdriver.c, src/truetype/ttgload.c, src/truetype/ttgload.h, src/truetype/ttinterp.c, src/truetype/ttobjs.c, src/truetype/ttobjs.h, src/truetype/ttpload.c, src/type42/t42drivr.c: s/TT_CONFIG_OPTION_BYTECODE_INTERPRETER/TT_USE_BYTECODE_INTERPRETER/. * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): New member `force_autohint'. * src/base/ftobjs.c (FT_Load_Glyph): Use `force_autohint'. * src/truetype/ttobjs.c (tt_face_init): Prepare code for testing against a list of font names which need the bytecode interpreter. 2006-08-27 Jens Claudius <jens.claudius@yahoo.com> Fix miscellaneous compiler warnings. * include/freetype/internal/ftobjs.h: Close comment with `*/' to avoid `/* in comment' compiler warning. * src/base/ftdbgmem.c (ft_mem_table_get_source): Turn cast `(FT_UInt32)(void*)' into `(FT_UInt32)(FT_PtrDist)(void*)' since on 64-bit platforms void* is larger than FT_UInt32. * src/base/ftobjs.c (t_validator_error): Cast away volatileness of argument to ft_longjmp. Spotted by Werner `Putzfrau' Lemberg. * src/bdf/bdflib.c (bdf_load_font): Initialize local variable `lineno'. * src/gxvalid/gxvmod.c (classic_kern_validate): Mark local variable `error' as volatile. 2006-08-27 Werner Lemberg <wl@gnu.org> * builds/unix/ftconfig.in: Synchronize with main ftconfig.h. Reported by Jens. 2006-08-22 Jens Claudius <jens.claudius@yahoo.com> Fix for previous commit, which caused many compiler warnings/errors about addresses of volatile objects passed as function arguments as non-volatile pointers. * include/freetype/internal/ftvalid.h: Make FT_Validator typedef a pointer to a volatile object. * src/gxvalid/gxvmod.c (gxv_load_table): Make function argument `table' a pointer to a volatile object. * src/otvalid/otvmod.c (otv_load_table): Make function argument `table' a pointer to a volatile object. 2006-08-18 Jens Claudius <jens.claudius@yahoo.com> * src/gxvalid/gxvmod.c (GXV_TABLE_DECL): Mark local variable `_sfnt' as volatile since it must keep its value across a call to ft_setjmp. (gxv_validate): Same for local variables `memory' and `valid'. (classic_kern_validate): Same for local variables `memory', `ckern', and `valid'. * src/otvalid/otvmod.c (otv_validate): Same for function parameter `face' and local variables `base', `gdef', `gpos', `gsub', `jstf', and 'valid'. * src/sfnt/ttcmap.c (tt_face_build_cmaps): Same for local variable `cmap'. 2006-08-16 David Turner <david@freetype.org> * src/cid/cidgload.c (cid_slot_load_glyph): Remove compiler warnings. * src/base/ftobjs.c (ft_validator_run): Disable function; it is buggy by design. Always return -1. Improvements to native TrueType hinting. This is a first try, controlled by the FIX_BYTECODE macro in src/truetype/ttinterp.c. * include/freetype/internal/ftgloadr.h (FT_GlyphLoadRec): Add member `extra_points2'. * include/freetype/internal/tttypes.h (TT_GlyphZoneRec): Add member `orus'. * src/base/ftgloadr.c (FT_GlyphLoader_Reset, FT_GlyphLoader_Adjust_Points, FT_GlyphLoader_CreateExtra, FT_GlyphLoader_CheckPoints, FT_GlyphLoader_CopyPoints): Updated to handle `extra_points2'. * src/truetype/ttgload.c (tt_prepare_zone): Handle `orus'. Remove compiler warning. (cur_to_arg): Remove macro. (TT_Hint_Glyph): Updated. (TT_Process_Simple_Glyph): Handle `orus'. * src/truetype/ttinterp.c (FIX_BYTECODE): New macro. (Ins_MD, Ins_MDRP, Ins_IP) [FIX_BYTECODE]: Handle `orus'. (LOC_Ins_IUP): Renamed to... (IUP_WorkerRec): This. Add `orus' member. (Shift): Renamed to... (_iup_worker_shift): This. Updated. (Interp): Renamed to... (_iup_worker_interpolate): This. Updated to handle `orus'. (Ins_IUP): Updated. * src/truetype/ttobjs.c (tt_glyphzone_done, tt_glyphzone_new): Handle `orus'. 2006-08-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * modules.cfg (BASE_EXTENSIONS): Compile in ftgxval.c by default to build ftvalid in ft2demos. This has been inadvertently changed 2006-08-13. 2006-08-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> `ft_validator_run' wrapping `setjmp' can cause a crash, as found by Jens: https://lists.gnu.org/archive/html/freetype-devel/2006-08/msg00004.htm. * src/otvalid/otvmod.c: Replace `ft_validator_run' by `ft_setjmp'. It reverts the change introduced on 2005-08-20. * src/gxvalid/gxvmod.c: Ditto. 2006-08-13 Jens Claudius <jens.claudius@yahoo.com> * finclude/freetype/internal/psaux.h: (T1_TokenType): Add T1_TOKEN_TYPE_KEY. (T1_FieldRec): Add `dict'. (T1_FIELD_DICT_FONTDICT, T1_FIELD_DICT_PRIVATE): New macros. (T1_NEW_XXX, T1_FIELD_XXX): Update to take the dictionary where a PS keyword is expected as an additional argument. * src/cid/cidload.c: (cid_field_records): Adjust invocations of T1_FIELD_XXX. * src/cid/cidtoken.h: Adjust invocations of T1_FIELD_XXX. * src/psaux/psobjs.c: Add macro FT_COMPONENT for tracing. (ps_parser_to_token): Report a PostScript key as T1_TOKEN_TYPE_KEY, not T1_TOKEN_TYPE_ANY. (ps_parser_load_field): Make sure a token that should be a string or name is really a string or name. Avoid memory leak if a keyword has been already encountered and its value is overwritten. * src/type1/t1load.c: (t1_keywords): Adjust invocations of T1_FIELD_XXX. (parse_dict): Ignore keywords that occur in the wrong dictionary (e.g., in `Private' instead of `FontDict'). * src/type1/t1tokens.h: Adjust invocations of T1_FIELD_XXX. * src/type42/t42parse.c: (t42_keywords): Adjust invocations of T1_FIELD_XXX. 2006-07-18 Jens Claudius <jens.claudius@yahoo.com> Move creation of field `buildchar' of T1_DecoderRec out of `t1_decoder_init' and let the caller of `t1_decoder_init' take care of it. Call the finisher for T1_Decoder in `cid_face_compute_max_advance' and `T1_Compute_Max_Advance'. * include/freetype/internal/psaux.h (T1_DecoderRec): Remove field `face', add `len_buildchar'. * include/freetype/internal/t1types.h (T1_FaceRec): Add field `buildchar'. * src/cid/cidgload.c (cid_face_compute_max_advance): Call finisher for T1_Decoder. (cid_slot_load_glyph): Do not ignore failure when initializing the T1_Decoder. * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Updated. (t1_decoder_init): Remove initialization of fields `buildchar' and `len_buildchar'. (t1_decoder_done): Remove deallocation of field `buildchar'. * freetype/src/type1/t1gload.c (T1_Compute_Max_Advance): Initialize T1_Decoder's `buildchar' and `len_buildchar'; call finisher for T1_Decoder. (T1_Load_Glyph): Initialize T1_Decoder's `buildchar' and `len_buildchar'; make sure to call finisher for T1_Decoder even in case of error. * src/type1/t1load.c (T1_Open_Face): Allocate new field `buildchar' of T1_FaceRec. * src/type1/t1objs.c (T1_Face_Done): Free new field `buildchar' of T1_FaceRec. 2006-07-14 Jens Claudius <jens.claudius@yahoo.com> * include/freetype/internal/psaux.h: New macros IS_PS_NEWLINE, IS_PS_SPACE, IS_PS_SPECIAL, IS_PS_DELIM, IS_PS_DIGIT, IS_PS_XDIGIT, and IS_PS_BASE85 (from src/psaux/psconv.h). (T1_FieldLocation): Add T1_FIELD_LOCATION_LOADER, T1_FIELD_LOCATION_FACE, and T1_FIELD_LOCATION_BLEND. (T1_DecoderRec): New fields `buildchar' and `face'. (IS_PS_TOKEN): New macro. * include/freetype/internal/t1types.h (T1_FaceRec): New fields `ndv_idx', `cdv_idx', and `len_buildchar'. * include/freetype/t1tables.h (PS_BlendRec): New fields `default_design_vector' and `num_default_design_vector'. * src/psaux/psconv.h: Move macros IS_PS_NEWLINE, IS_PS_SPACE, IS_PS_SPECIAL, IS_PS_DELIM, IS_PS_DIGIT, IS_PS_XDIGIT, and IS_PS_BASE85 to include/freetype/internal/psaux.h. * src/psaux/psobjs.c (ps_parser_to_token_array): Allow `token' argument to be NULL if we want only to count the number of tokens. (ps_tocoordarray): Allow `coords' argument to be NULL if we just want to skip the array. (ps_tofixedarray): Allow `values' argument to be NULL if we just want to skip the array. * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Add support for (partially commented out) othersubrs 19-25, 27, and 28. (t1_decoder_init): Initialize new fields `face' and `buildchar'. (t1_decoder_done): Release new field `buildchar'. * src/type1/t1load.c (parse_buildchar, parse_private): New functions. (t1_keywords): Register them. (t1_allocate_blend): Updated. (t1_load_keyword): Handle field types T1_FIELD_LOCATION_LOADER, T1_FIELD_LOCATION_FACE and T1_FIELD_LOCATION_BLEND. (parse_dict): Remove `keyword_flags' argument. Use new macro IS_PS_TOKEN. Changed function so that later PostScript definitions override earlier ones. (t1_init_loader): Initialize new field `keywords_encountered'. (T1_Open_Face): Initialize new fields `ndv_idx', `cdv_idx', and `len_buildchar'. Remove `keywords_flags'. * src/type1/t1load.h (T1_LoaderRec): New field `keywords_encountered'. (T1_PRIVATE, T1_FONTDIR_AFTER_PRIVATE): New macros. * src/type1/t1tokens.h [!T1_CONFIG_OPTION_NO_MM_SUPPORT]: New entries for parsing /NDV, /CDV, and /DesignVector. 2006-07-07 Werner Lemberg <wl@gnu.org> Add many checks to protect against malformed PCF files. * src/pcf/pcfdrivr.c (PCF_Face_Done): Protect against NULL pointers. (PCF_Face_Init): Add calls to PCF_Face_Done in case of errors. * src/pcf/pcfread.c (pcf_read_TOC): Protect against malformed table data and check that tables don't overlap (using a simple bubblesort). (PCF_METRIC_SIZE, PCF_COMPRESSED_METRIC_SIZE, PCF_PROPERTY_SIZE): New macros which give the size of data structures in the data stream. (pcf_get_properties): Use rough estimates to get array size limits. Assign `face->nprops' and `face->properties' earlier so that a call to PCF_Face_Done can do the clean-up in case of error. Protect against invalid string offsets. (pcf_get_metrics): Clean up code. Adjust tracing message levels. Use rough estimate to get array size limit. (pcf_get_bitmaps): Clean up code. Adjust tracing message levels. Use rough estimates to get offset limits. (pcf_get_encodings): Adjust tracing message level. (pcf_get_accel): Clean up code. 2006-06-26 Werner Lemberg <wl@gnu.org> * src/bdf/bdfdrivr.c (BDF_Face_Init): Handle fonts correctly which don't have a POINT_SIZE property. This fixes Savannah bug #16914. 2006-06-26 Jens Claudius <jens.claudius@yahoo.com> * src/psaux/t1decode.c (T1_Operator, t1_args_count): Add opcode 15. (t1_decoder_parse_charstrings): Operator with opcode 15 pops its two arguments. Handle the case where the pops of an othersubr may be part of a subroutine. Handle unknown othersubrs gracefully: count their operands and let the following pop operators push the operands as the results onto the Type1 stack. Improve handling of setcurrentpoint opcode. 2006-06-25 Jens Claudius <jens.claudius@yahoo.com> The Type 1 parser now skips over top-level procedures as required for a `Simplified Parser'. This makes the parser more robust as it doesn't poke around in PostScript code. Additionally, it makes the FontDirectory hackery in src/type1/t1load.c unnecessary. * src/psaux/psobjs.c (IS_OCTAL_DIGIT): New macro. (skip_literal_string): Add FT_Error as return value. Handle escapes better. (skip_string): Add FT_Error as return value. Don't set `parser->error' but return error code directly. (skip_procedure): New function. (ps_parser_skip_PS_token): Handle procedures. Update code. (ps_parser_to_token): Update code. (ps_parser_load_field_table): Handle bbox entries also. * src/type1/t1load.c (parse_dict): Remove FontDirectory hackery. Add commented-out code for synthetic fonts. 2006-06-24 Eugeniy Meshcheryakov <eugen@univ.kiev.ua> Fix two hinting bugs as reported in https://lists.gnu.org/archive/html/freetype-devel/2006-06/msg00057.html. * include/freetype/internal/tttypes.h (TT_GlyphZoneRec): Add `first_point' member. * src/truetype/ttgload.c (tt_prepare_zone): Initialize `first_point'. (TT_Process_Composite_Glyph): Always untouch points. * src/truetype/ttinterp.c (Ins_SHC): Fix computation of `first_point' and `last_point' in case of composite glyphs. (Ins_IUP): Fix computation of `end_point'. 2006-06-22 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Insert EndianS16_BtoN and EndianS32_BtoN as workaround for Intel Mac. The original patch was written by David Sachitano and Lawrence Coopet, and modified by Sean McBride for MPW compatibility. Only required data are converted; unused data are left in big endian. * src/base/ftmac.c: Include <Endian.h> for byteorder macros for non Mac OS X platforms. (OS_INLINE): Undefine before definition. (count_faces_sfnt): Insert EndianS16_BtoN to parse the header of FontAssociation table in FOND resource. (count_faces_scalable): Insert EndianS16_BtoN to parse the header and fontSize at each entry of FontAssociation table in FOND resource. (parse_fond): Insert EndianS16_BtoN and EndianS32_BtoN to parse ffStylOff of FamilyRecord header of FOND resource, the header, fontSize, fontID at each entry of FontAssociation table, and StyleMapping table. (count_faces): Call `HUnlock' after all FOND utilization. 2006-06-08 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Public API of TrueTypeGX, OpenType, and classic kern table validator should return `FT_Err_Unimplemented_Feature' if validation service is unavailable (disabled in `modules.cfg'). It is originally suggested by David Turner, cf. https://lists.gnu.org/archive/html/freetype-devel/2005-11/msg00078.html * src/base/ftgxval.c (FT_TrueTypeGX_Validate): Return FT_Err_Unimplemented_Feature if TrueTypeGX validation service is unavailable. (FT_ClassicKern_Validate): Return FT_Err_Unimplemented_Feature if classic kern table validation service is unavailable. * src/base/ftotval.c (FT_OpenType_Validate): Return FT_Err_Unimplemented_Feature if OpenType validation service is unavailable. 2006-06-08 Werner Lemberg <wl@gnu.org> * src/bdf/bdflib.c (bdf_load_font): Fix memory leaks in case of errors. 2006-06-07 David Turner <david@freetype.org> * src/type1/t1afm.c (KERN_INDEX): Make it more robust. (T1_Read_Metrics): Fix memory leak which happened when the metrics file doesn't have kerning pairs. This fixes Savannah bug #16768. 2006-06-06 David Turner <david@freetype.org> Fix memory leak described in Savannah bug #16759. We change `ps_unicodes_init' so that it also takes a `free_glyph_name' callback to release the glyph names returned by `get_glyph_name' * include/freetype/internal/services/svpscmap.h (PS_Glyph_NameFunc): Renamed to ... (PS_GetGlyphNameFunc): This. (PS_FreeGlyphNameFunc): New typedef. (PS_Unicodes_InitFunc): Add variable for PS_FreeGlyphNameFunc. * src/cff/cffcmap.c (cff_sid_to_glyph_name): Use `TT_Face' for first argument. (cff_sid_free_glyph_name): New function. (cff_cmap_unicode_init): Updated. * src/psaux/t1cmap.c (t1_cmap_unicode_init): Updated. * src/psnames/psmodule.c (ps_unicodes_init): Add variable for PS_FreeGlyphNameFunc and use it. 2006-06-04 David Turner <david@freetype.org> * src/base/ftutil.c (ft_mem_qrealloc): Fix the function to accept `item_size == 0' as well -- though this sounds weird, it can theoretically happen. This fixes Savannah bug #16669. * src/pfr/pfrobjs.c (pfr_face_init): Fix the computation of `face->num_glyphs' which missed the last glyph, due to the offset-by-1 computation, since the PFR format doesn't guarantee that glyph index 0 corresponds to the `missing glyph. This fixes Savannah bug #16668. 2006-05-25 Werner Lemberg <wl@gnu.org> * builds/unix/unix-cc.in (LINK_LIBRARY): Don't comment out `-no-undefined'. Reported by Christian Biesinger. 2006-05-19 Brian Weed <bw@imaginengine.com> * builds/win32/visualc/freetype.dsp: Release libraries no longer have debug information, and debug libraries use `C7 compatible' debug info. 2006-05-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Apply patch by Derek Clegg to fix two memory leaks in the MacOS resource fork handler. This fixes Savannah bug #16631. * src/base/ftobjs.c (load_face_in_embedded_rfork): Replace `FT_Stream_Close' by `FT_Stream_Free' to fix memory leak. * src/base/ftrfork.c (raccess_guess_linux_double_from_file_name): Replace `FT_Stream_Close' by `FT_Stream_Free' to fix memory leak. 2006-05-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * build/unix/configure.raw: Add a fallback to disable Carbon dependency, if configured with no options on Mac OS X. 2006-05-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * src/base/ftmac.c (open_face_from_buffer): Deallocate stream when its content cannot be parsed as supported font. This fixes the second part of Savannah bug #16590. 2006-05-18 Werner Lemberg <wl@gnu.org> * src/truetype/ttgload.c (TT_Load_Composite_Glyph) [TT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Make it compilable again. 2006-05-17 David Turner <david@freetype.org> This is a major patch used to drastically improve the performance of loading glyphs. This both speeds up loading the glyph vectors themselves and the auto-fitter module. We now use inline assembler code with GCC to implement `FT_MulFix', which is probably the most important function related to the engine's performance. The resulting speed-up is about 25%. * include/freetype/internal/tttypes.h (TT_LoaderRec): Add fields `cursor' and `limit'. * src/autofit/afangles.c (af_corner_is_flat, af_corner_orientation): New functions. (AF_ATAN_BITS, af_arctan, af_angle_atan): Comment out. [TEST]: Remove. * src/autofit/afcjk.c (AF_Script_UniRangeRec): Comment out test code. * src/autofit/afhints.c (af_axis_hints_new_segment): Don't call `FT_ZERO' (af_direction_compute, af_glyph_hints_compute_inflections): Rewritten. (af_glyph_hints_reload: Rewrite recognition of weak points. * src/autofit/aflatin.c (af_latin_hints_compute_segments): Move constant values out of the loops. * src/autofit/aftypes.h: Updated. * src/base/ftcalc.c (FT_MulFix): Use inline assembler code. * src/base/ftoutln.c (FT_Outline_Get_Orientation): Use vector product to get orientation. * src/gzip/ftgzip.c (ft_get_uncompressed_size): New function. (FT_Stream_OpenGzip): Use it to handle small files directly in memory. * src/psaux/psconv.c (PS_Conv_ASCIIHexDecode, PS_Conv_EexecDecode): Improve performance. * src/truetype/ttgload.c (TT_Access_Glyph_Frame): Set `cursor' and `limit'. (TT_Load_Glyph_Header, TT_Load_Simple_Glyph, TT_Load_Composite_Glyph): Updated. Add threshold to protect against exceedingly large values of number of contours. Speed up by reducing the number of loops. * src/type1/t1gload.c (T1_Load_Glyph): Don't apply unit matrix. * src/cache/ftccmap.c (FTC_CMapCache_Lookup): Change the threshold used to detect rogue clients from 4 to 16. This is to prevent some segmentation faults with fonts like `KozMinProVI-Regular.otf' which comes from the Japanese Adobe Reader Asian Font pack. 2007-05-17 Werner Lemberg <wl@gnu.org> * src/cff/cffload.c (cff_font_done): Deallocate subfont array. This fixes the first part of Savannah bug #16590. 2006-05-16 Werner Lemberg <wl@gnu.org> * docs/PROBLEMS: Updated icl issues. ---------------------------------------------------------------------------- Copyright (C) 2006-2022 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, and distributed under the terms of the FreeType project license, LICENSE.TXT. By continuing to use, modify, or distribute this file you indicate that you have read the license and understand and accept it fully. Local Variables: version-control: never coding: utf-8 End:
whupdup/frame
real/third_party/freetype-2.12.0/docs/oldlogs/ChangeLog.23
23
gpl-3.0
272,330
2013-05-08 Werner Lemberg <wl@gnu.org> * Version 2.4.12 released. ========================== Tag sources with `VER-2-4-12'. * docs/VERSION.DLL: Update documentation and bump version number to 2.4.12. * README, Jamfile (RefDoc), builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html, builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html, builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html, builds/win32/visualc/freetype.dsp, builds/win32/visualc/freetype.vcproj, builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp, builds/win32/visualce/freetype.vcproj, builds/win32/visualce/index.html, builds/wince/vc2005-ce/freetype.vcproj, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/freetype.vcproj, builds/wince/vc2008-ce/index.html: s/2.4.11/2.4.12/, s/2411/2412/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 12. * builds/unix/configure.raw (version_info): Set to 16:1:10. 2013-05-08 Werner Lemberg <wl@gnu.org> * docs/CHANGES: Updated. 2013-05-08 Werner Lemberg <wl@gnu.org> * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Typo. 2013-05-05 Werner Lemberg <wl@gnu.org> Synchronize `ftconfig.h'. * builds/unix/ftconfig.in: Updated. 2013-05-05 Werner Lemberg <wl@gnu.org> Fix compilation with C++. * src/base/md5.c (body): Use proper cast. 2013-05-05 Werner Lemberg <wl@gnu.org> Fix 64bit compilation issues. * include/freetype/config/ftconfig.h [FT_LONG64]: Typedef `FT_Int64' here. * src/base/ftcalc.c: Remove typedef of `FT_Int64'. (FT_DivFix): Fix cast. * src/base/fttrigon.c: Remove typedef of `FT_Int64'. 2013-05-05 Werner Lemberg <wl@gnu.org> [raster] Fix clang issues. Fix suggested by <octoploid@yandex.com>. * src/raster/ftraster.c (ULong): New typedef. (SCALED): Add proper cast. 2013-05-04 Werner Lemberg <wl@gnu.org> Fix clang fixes. * src/base/fttrigon.c (ft_trig_prenorm, FT_Vector_Rotate): Use correct types. * src/cff/cf2intrp.c (cf2_interpT2CharString) <default>: Force unsigned for computations. * src/cff/cffgload.c (cff_decoder_parse_charstrings): Ditto. * src/cff/cffparse.c (cff_parse_integer): Ditto. * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Ditto. 2013-05-04 Werner Lemberg <wl@gnu.org> [cff] Make Adobe CFF engine work correctly on 64bit hosts. Reported by numerous people on the `freetype-devel' list. Without this fix, glyphs aren't properly aligned on a common baseline. On 64bit systems, `FT_Pos' expands to `long int', having a width of 64bit. `CF2_Fixed' expands to `int' which is normally 32bit wide on 64bit hosts also. Wrong casts filled up the blues arrays with incorrect values. Note that all blues values are accessed with the `cf2_blueToFixed' macro which handles the 64bit to 32bit conversion. * src/cff/cf2ft.h (cf2_getBlueValues, cf2_getOtherBlues, cf2_getFamilyBlues, cf2_getFamilyOtherBlues): Use `FT_Pos' for `data', not `CF2_Fixed'. * src/cff/cf2ft.c (cf2_getBlueValues, cf2_getOtherBlues, cf2_getFamilyBlues, cf2_getFamilyOtherBlues): Updated. * src/cff/cf2blues.c (cf2_blues_init): Updated. 2013-05-04 Werner Lemberg <wl@gnu.org> More fixes for clang's `sanitize' feature. * src/base/ftcalc.c (FT_DivFix): Use unsigned values for computations which use the left shift operator and convert to signed as the last step. * src/base/fttrigon.c (ft_trig_prenorm, FT_Vector_Rotate, FT_Vector_Length, FT_Vector_Polarize): Ditto. * src/cff/cffgload.c (cff_decoder_parse_charstrings): Simplify. * src/cff/cffload.c (cff_subfont_load): Fix constant. * src/cff/cffparse.c (cff_parse_integer, cff_parse_real, do_fixed, cff_parse_fixed_dynamic): Use unsigned values for computations which use the left shift operator and convert to signed as the last step. * src/cid/cidload.c (cid_get_offset): Ditto. * src/psaux/psconv.c (PS_Conv_ToFixed): Ditto. * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Ditto. * src/truetype/ttinterp.c (TT_MulFix14, TT_DotFix14): Ditto. 2013-05-04 Werner Lemberg <wl@gnu.org> Fix errors reported by clang's `sanitize' feature. * include/freetype/internal/ftstream.h: Simplify and fix integer extraction macros. (FT_INT8_, FT_BYTE_I16, FT_BYTE_I32, FT_INT8_I16, FT_INT8_I32, FT_INT8_I32, FT_INT8_U32): Removed. (FT_PEEK_SHORT, FT_PEEK_LONG, FT_PEEK_OFF3, FT_PEEK_SHORT_LE, FT_PEEK_LONG_LE, FT_PEEK_OFF3_LE): Use unsigned values for computations and convert to signed as the last step. * src/cff/cf2fixed.h (cf2_intToFixed, cf2_fixedToInt, cf2_fracToFixed): Avoid shifts of negative values. (cf2_intToFrac, cf2_fixedToFrac, cf2_fixedTo26Dot6): Removed, unused. * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdEXTENDEDNMBR, default>: Use unsigned values for computations and convert to signed as the last step. Use proper types in tracing messages. * src/cff/cffgload.c (cff_decoder_parse_charstrings): Use unsigned values for computation of operands and convert to signed as the last step. Use proper type in tracing message. 2013-05-03 Werner Lemberg <wl@gnu.org> * src/cff/cf2blues.c: Remove dead code. 2013-05-02 Chris Liddell <chris.liddell@artifex.com> * src/cff/cffgload.c: Include FT_CFF_DRIVER_H. 2013-04-27 Werner Lemberg <wl@gnu.org> * docs/CHANGES: Updated. * README: Improved. 2013-04-13 Werner Lemberg <wl@gnu.org> [cff] Add a new Type 2 interpreter and hinter. This work, written by Dave Arnold <darnold@adobe.com> and fully integrated into FreeType by me, is a donation by Adobe in collaboration with Google. It is vastly superior to the old CFF engine, and it will replace it soon. Right now, it is still off by default, and you have to explicitly select it using the new `hinting-engine' property of the cff driver. For convenience, (most of) the new files are committed separately. * include/freetype/config/ftheader.h (FT_CFF_DRIVER_H): New macro. * include/freetype/ftcffdrv.h: New file to access CFF driver properties. * include/freetype/fterrdef.h (FT_Err_Glyph_Too_Big): New error code. * include/freetype/internal/fttrace.h: Add `cf2blues', `cf2hints', and `cf2interp'. * src/cff/cffgload.h (CFF_SubFont): New member `current_subfont'. * src/cff/cffobjs.h (CFF_DriverRec): New members `hinting_engine' and `no_stem_darkening'. * src/cff/cfftypes.h (CFF_FontRec): New member `cf2_instance'. * src/cff/cff.c: Include new files. * src/cff/cffdrivr.c (cff_property_set, cff_property_get): Handle `hinting-engine' and `no-stem-darkening' properties (only the Adobe engine listens to them). * src/cff/cffgload.c: Include `cf2ft.h'. (cff_decoder_prepare): Initialize `current_subfont'. (cff_build_add_point): Handle Adobe engine which uses 16.16 coordinates. (cff_slot_load): Handle FT_LOAD_NO_SCALE and FT_LOAD_NO_HINTING separately. Choose rendering engine based on `hinting_engine' property. * src/cff/cffload.c (cff_font_done): Call finalizer of the Adobe engine. * src/cff/cffobjs.c: Include FT_CFF_DRIVER_H. (cff_driver_init): Set default property values. * src/cff/rules.mk (CFF_DRV_SRC, CFF_DRV_H): Add new files. * src/cff/cf2*.*: New files, containing the Adobe engine. 2013-04-12 Werner Lemberg <wl@gnu.org> [cff] Minor code administration issues. * src/cff/cffgload.c (check_points): Rename to... (cff_check_points): ...this and make it FT_LOCAL. (cff_builder_add_point, cff_builder_add_point1, cff_builder_start_point, cff_builder_close_contour, cff_lookup_glyph_by_stdcharcode, cff_get_glyph_data, cff_free_glyph_data): Make them FT_LOCAL. * src/cff/cffgload.h: Updated. 2013-04-12 Werner Lemberg <wl@gnu.org> Add output bitmap checksums. Use `FT2_DEBUG=bitmap:3' for tracing. * src/base/md5.c, src/base/md5.h: New files, taken from https://openwall.info/wiki/people/solar/software/public-domain-source-code/md5 * include/freetype/internal/fttrace.h: Add `bitmap'. * src/base/ftobjs.c [FT_DEBUG_LEVEL_TRACE]: Include `md5.c' (FT_Render_Glyph_Internal) [FT_DEBUG_LEVEL_TRACE]: For tracing, convert resulting bitmap to a uniform format and compute a checksum. Use `bitmap' category for the tracing message. * src/base/rules.mk (BASE_H): Updated. * docs/LICENSE.TXT: Updated. 2013-04-12 Werner Lemberg <wl@gnu.org> [cff] Add framework for CFF properties. * include/freetype/internal/ftserv.h (FT_DEFINE_SERVICEDESCREC7): New macro. * src/cff/cffdrivr.c: Include FT_SERVICE_PROPERTIES_H. (cff_property_set, cff_property_get): New functions, still empty. Define `cff_service_properties' service. Update `cff_services'. * src/cff/cffpic.h: Include FT_SERVICE_PROPERTIES_H. (CFF_SERVICE_PROPERTIES_GET): New macro. (CffModulePIC): Add `cff_service_properties'. 2013-04-03 Werner Lemberg <wl@gnu.org> [bdf] Fix Savannah bug #38589. * src/bdf/bdflib.c (_bdf_readstream): Thinko. 2013-03-31 Werner Lemberg <wl@gnu.org> * configure: Use egrep, not grep. Problem reported Mojca Miklavec <mojca.miklavec.lists@gmail.com>. 2013-03-29 Werner Lemberg <wl@gnu.org> * include/freetype/ftlcdfil.h: Add description of color filtering. Based on a contribution from Antti S. Lankila <alankila@bel.fi> (Savannah bug #38607). 2013-03-23 Werner Lemberg <wl@gnu.org> [autofit] Minor. * src/autofit/afmodule.c (af_property_set): Typo. (af_autofitter_init, af_autofitter_done): Use cast. 2013-03-21 Werner Lemberg <wl@gnu.org> * configure: Automatically test for `gmake' also. Suggested by Mojca Miklavec <mojca.miklavec.lists@gmail.com>. 2013-03-21 Peter Breitenlohner <peb@mppmu.mpg.de> Respect CONFIG_SHELL from the environment. Some large packages using FreeType have to use a broken (deficient) /bin/sh. The configure scripts (as generated by Autoconf) are clever enough to find a better shell and put that one into the environment variable CONFIG_SHELL. If that environment variable is already set the script skips the test and assumes to be already running under a good shell. * builds/unix/detect.mk: Honour CONFIG_SHELL. * builds/unix/unix-def.in (SHELL): Define. 2013-03-21 Werner Lemberg <wl@gnu.org> Fix Savannah patch #7971. * configure: Handle MAKE environment variable also. 2013-03-17 Werner Lemberg <wl@gnu.org> Fix Savannah bug #38538. * builds/amiga/src/base/ftdebug.c, builds/win32/ftdebug.c, builds/wince/ftdebug.c (FT_Throw): Add function. 2013-03-17 Werner Lemberg <wl@gnu.org> [raster] Remove dead code. * src/raster/rastpic.c (ft_raster1_renderer_class_pic_init) src/smooth/ftspic.c (ft_smooth_renderer_class_pic_init): Do it. 2013-03-17 Werner Lemberg <wl@gnu.org> * src/pshinter/pshpic.h (GET_PIC): Use correct container. 2013-03-15 Werner Lemberg <wl@gnu.org> * include/freetype/ftmoderr.h: Fix commit from 2013-03-11. The previous version was not backward compatible. Reported by Behdad. 2013-03-14 Werner Lemberg <wl@gnu.org> */*: Use FT_ERR_EQ, FT_ERR_NEQ, and FT_ERR where appropriate. FT_Err_XXX and friends are no longer directly used in the source code. 2013-03-14 Werner Lemberg <wl@gnu.org> New error management macros. * include/freetype/fterrors.h (FT_ERR_XCAT, FT_ERR_CAT): Move to... * include/freetype/fttypes.h: ... this file. (FT_ERR, FT_ERR_EQ, FT_ERR_NEQ, FT_MODERR_EQ, FT_MODERR_NEQ): New macros. * include/freetype/freetype.h: Updated. 2013-03-14 Werner Lemberg <wl@gnu.org> */*: Use FT_Err_Ok only. This is a purely mechanical conversion. 2013-03-14 Werner Lemberg <wl@gnu.org> */*: Use `FT_THROW'. This is essentially a mechanical conversion, adding inclusion of `FT_INTERNAL_DEBUG_H' where necessary, and providing the macros for stand-alone compiling modes of the rasterizer modules. To convert the remaining occurrences of FT_Err_XXX and friends it is necessary to rewrite the code. Note, however, that it doesn't harm if some cases are not handled since FT_THROW is a no-op. 2013-03-13 Werner Lemberg <wl@gnu.org> Introduce `FT_THROW' macro. The idea is to replace code like return FT_Err_Foo_Bar; or return CFF_Err_Foo_Bar; with return FT_THROW( Foo_Bar ); The FT_THROW macro has two functions: . It hides the module specific prefix. . In debug mode, it calls the empty function `FT_Throw' which can be thus used to set a breakpoint. * include/freetype/internal/ftdebug.h (FT_THROW): New macro. (FT_Throw): New prototype. * src/base/ftdebug.c (FT_Throw): New function. 2013-03-12 Werner Lemberg <wl@gnu.org> Remove `FT_KEEP_ERR_PREFIX'. The idea is to always have FT_ERR_PREFIX available internally. * include/freetype/fterrors.h: Use FT2_BUILD_LIBRARY to guard undefinition of FT_ERR_PREFIX * src/gxvalid/gxverror.h, src/otvalid/otverror.h, src/sfnt/sferrors.h: Updated. 2013-03-11 Werner Lemberg <wl@gnu.org> [gxvalid] Fix module error. * src/gxvalid/gxverror.h (FT_ERR_BASE): Define as FT_Mod_Err_GXvalid. * include/freetype/ftmoderr.h: Add module error for `GXvalid'. 2013-03-11 Werner Lemberg <wl@gnu.org> Always use module related error codes. * src/cff/cffobjs.c (cff_face_init), src/type1/t1objs.c (T1_Face_Init), src/type42/t42objs.c (T42_Face_Init): Use `FT_ERROR_BASE'. * src/type1/t1load.c (parse_encoding): Use T1_Err_Unknown_File_Format. 2013-03-08 Werner Lemberg <wl@gnu.org> [cff] Set `linear{Hori,Vert}Advance' for embedded bitmaps also. Problem reported by Khaled Hosny <khaledhosny@eglug.org>. * src/cff/cffgload.c (cff_slot_load): Implement it. 2013-02-23 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Fix commit ab02d9e8. * src/base/ftbbox.c (BBox_Cubic_Check): Change scaling to msb of 22. 2013-02-19 Alexei Podtelezhnikov <apodtele@gmail.com> [base] New bisecting BBox_Cubic_Check (disabled). * src/base/ftbbox.c (BBox_Cubic_Check): New bisecting algorithm for extremum search built around simple condition that defines which half contains the extremum. 2013-02-18 Alexei Podtelezhnikov <apodtele@gmail.com> [tools] Update BBox testing tool. * src/tools/test_bbox.c: Add another cubic outline with exact BBox. (REPEAT): Increase the number of benchmarking cycles. (profile_outline): Tweak output formatting. 2013-02-02 Werner Lemberg <wl@gnu.org> Fix Savannah bug #38235. * builds/unix/configure.raw: Don't generate `freetype-config' and `freetype.pc'. * builds/unix/unix-def.in (FT2_EXTRA_LIBS, LIBBZ2, LIBZ, build_libtool_libs, ft_version): New variables to be substituted. (freetype-config, freetype.pc): New rules to generate those files. * builds/unix/freetype-config.in: Remove code for handling `rpath'. The use of $rpath has been accidentally removed in a patch from 2009-12-22, and apparently noone has missed it since. Use `%' instead of `@' as a variable substitution marker. Use quotes. * builds/unix/freetype.in: Use `%' instead of `@' as a variable substitution marker. Use quotes. 2013-02-07 Werner Lemberg <wl@gnu.org> * src/truetype/ttobjs.c (tt_size_run_prep): Reset more GS variables. BTW, Greg agrees that the OpenType specification is missing the list of GS variables which will always be reset to the default values after the `prep' table has been executed. 2013-02-06 Werner Lemberg <wl@gnu.org> * src/truetype/ttobjs.c (tt_size_run_prep): Reset reference points. Up to now, we simply took a snapshot of the Graphics State after the `prep' table has been executed, and right before a glyph's bytecode was run it got reloaded. However, as Greg Hitchcock has told us in private communication, reference points get reset to zero in the MS rasterizer and we follow in due course. While reasonable, this is undocumented behaviour. Most notably, this fixes the rendering of Arial's `x' glyph in subpixel hinting mode. 2013-02-05 Werner Lemberg <wl@gnu.org> [truetype] A better fix for Savannah bug #38211. * src/truetype/ttinterp.c (Ins_IP): Implement identical behaviour to MS rasterizer if rp1 == rp2 (confirmed by Greg Hitchcock). 2013-02-01 Alexei Podtelezhnikov <apodtele@gmail.com> [pcf] Streamline parsing of PCF encoding table. * src/pcf/pcfread.c (pcf_get_encodings): Use simpler double for-loop. Reallocate array instead of using temporary storage. 2013-02-01 Werner Lemberg <wl@gnu.org> Fix Savannah bug #38227. * builds/unix/freetype-config.in: Set LC_ALL. 2013-02-01 Werner Lemberg <wl@gnu.org> Fix Savannah bug #38221. This complements commit 83c0ebab. * src/base/ftcalc.c (FT_MulDiv_No_Round): Don't enclose with `TT_USE_BYTECODE_INTERPRETER'. 2013-02-01 Werner Lemberg <wl@gnu.org> [truetype] Fix Savannah bug #38211. * src/truetype/ttinterp.c (Ins_IP): Make FreeType behave identical to other interpreters if rp1 == rp2 (which is invalid). 2013-01-28 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Small optimization of BBox calculation. * src/base/ftbbox.c (BBox_Cubic_Check): Use FT_MSB function in scaling algorithm. 2013-01-26 Infinality <infinality@infinality.net> [truetype] Minor formatting fix. * src/truetype/ttinterp.c: Updated. (DO_RS): Fix indentation. 2013-01-26 Infinality <infinality@infinality.net> [truetype] Fix rasterizer_version logic in sph. * src/truetype/ttsubpix.c: Updated. (ALWAYS_SKIP_DELTAP_Rules): Remove rule for Trebuchet MS. (sph_set_tweaks): Fix `rasterizer_version' logic. 2013-01-26 Infinality <infinality@infinality.net> [truetype] Align more to ClearType whitepaper for sph. * include/freetype/internal/tttypes.h (TT_FaceRec): Add flags for detected opcode patterns and compatibility mode. * src/truetype/ttgload.c (tt_loader_init): Complete conditional. * src/truetype/ttinterp.c: Updated. Remove SPH_DEBUG and replace with FT_TRACE7. (DO_RS): More conditions. (Ins_FDEF): Add more opcode detection patterns. More specific conditions when flagging an fdef. Make compatibility mode only turn on when delta fdefs are found. (Ins_CALL, Ins_LOOPCALL): Set flags for currently executed fdef. (Ins_SHPIX): Remove logic to handle ttfautohinted fonts. Simplify conditionals where possible. Use `&' instead of `%' operator for dumb compilers. (Ins_MIAP): Adjust twilight zone conditional. Ensure `ignore_x_mode' is on when testing sph conditionals. (Ins_MIRP): Ensure `ignore_x_mode' is on when testing sph conditionals. Do cvt cutin always when `ignore_x_mode' is active. Remove test for ttfautohinted fonts. (Ins_DELTAP): Ensure `ignore_x_mode' is on when testing sph conditionals. Do cvt cutin always when `ignore_x_mode' is active. Remove test for ttfautohinted fonts. Use `&' instead of `%' operator for dumb compilers. (Ins_GETINFO): Remove SPH_DEBUG and replace with FT_TRACE7. * src/truetype/ttinterp.h: Updated. (TT_ExecContextRec): Remove compatibility_mode variable. Add variable to indicate when executing in special fdefs for sph. * src/truetype/ttobjs.h: Updated. (TT_DefRecord): Add flags to identify special fdefs for sph. (TT_SizeRec): Remove unnecessary ttfautohinted variable. * src/truetype/ttsubpix.c: Updated. (COMPATIBILITY_MODE_Rules): Remove all. Auto-detected now. (PIXEL_HINTING_Rules): Remove all. Unnecessary after fixes. (SKIP_NONPIXEL_Y_MOVES_Rules): Remove Ubuntu. (SKIP_NONPIXEL_Y_MOVES_Rules_Exceptions): Add Arial Bold `N'. (SKIP_OFFPIXEL_Y_MOVES_Rules): Remove all. Happens automatically now. (ROUND_NONPIXEL_Y_MOVES_Rules): Remove Ubuntu. (ROUND_NONPIXEL_Y_MOVES_Rules_Exceptions): Remove all. (NORMAL_ROUND_Rules): Remove Verdana. (NO_DELTAP_AFTER_IUP_Rules): Remove all. (sph_set_tweaks): Performance fix. Don't run prep always. Adjust conditional for sph_compatibility_mode. * src/truetype/ttsubpix.h: Add new fdef flags for sph. 2013-01-23 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Fix broken emboldening at small sizes. * src/base/ftoutln.c (FT_Outline_EmboldenXY): Do not attempt to normalize zero-length vectors. 2013-01-25 Werner Lemberg <wl@gnu.org> Fix Savannah bug #38167. This fixes commit 83c0ebab from 2012-06-27. * src/truetype/ttinterp.h: s/TT_CONFIG_OPTION_BYTECODE_INTERPRETER/TT_USE_BYTECODE_INTERPRETER/. 2013-01-25 Xi Wang <xi.wang@gmail.com> [sfnt] Fix broken pointer overflow checks. Many compilers such as gcc and clang optimize away pointer overflow checks `p + n < p', because pointer overflow is undefined behavior. Use a safe form `n > p_limit - p' instead. Also avoid possible integer overflow issues, for example, using `num_glyphs > ( p_limit - p ) / 2' rather than `num_glyphs * 2' given a large `num_glyphs'. * src/sfnt/ttsbit0.c (tt_sbit_decoder_load_image): Implement it. 2013-01-25 Werner Lemberg <wl@gnu.org> [base] Fix `make multi'. * src/base/ftoutln.c, src/base/fttrigon.c: Include FT_INTERNAL_CALC_H. 2013-01-25 David 'Digit' Turner <digit@google.com> [truetype] Fix C++ compilation. * src/truetype/ttsubpix.h: Updated. (SPH_X_SCALING_RULES_SIZE): Moved and renamed to... * src/truetype/ttsubpix.c (X_SCALING_RULES_SIZE): This. (sph_X_SCALING_Rules): Removed. (scale_test_tweak): Make function static. (sph_test_tweak_x_scaling): New function. * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Updated. 2013-01-23 Werner Lemberg <wl@gnu.org> [base] Make `FT_Hypot' really internal. * include/freetype/fttrigon.h (FT_Hypot): Move to... * include/freetype/internal/ftcalc.h: This file. * src/base/fttrigon.c (FT_Hypot): Move to... * src/base/ftcalc.c: This file. Include FT_TRIGONOMETRY_H. * src/truetype/ttgload.c: Don't include FT_TRIGONOMETRY_H. 2013-01-23 Werner Lemberg <wl@gnu.org> [truetype] Revert change from 2013-01-22. FreeType's `height' value is the baseline-to-baseline distance... * src/truetype/ttobjs.c (tt_size_reset): Undo. 2013-01-23 Alexei Podtelezhnikov <apodtele@gmail.com> [base, truetype] New internal `FT_Hypot' function. * include/freetype/fttrigon.h (FT_Hypot): Declare it. * src/base/fttrigon.c (FT_Hypot): Define it. * src/truetype/ttgload.c (TT_Process_Composite_Component): Use it instead of explicit expressions. * src/truetype/ttinterp.c (Current_Ratio, Normalize): Use it instead of TT_VecLen. (TT_VecLen): Removed. 2013-01-23 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Fix integer overflow. * src/base/ftoutln.c (FT_Outline_EmboldenXY): Normalize incoming and outgoing vectors and use fixed point arithmetic. 2013-01-23 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Fix integer overflow. * src/base/ftoutln.c (FT_Outline_Get_Orientation): Scale the coordinates down to avoid overflow. 2013-01-23 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Split out MSB function. * src/base/fttrigon.c (ft_trig_prenorm): Borrow from here. * include/freetype/internal/ftcalc.h (FT_MSB): Declare here. * src/base/ftcalc.c (FT_MSB): Define here. 2013-01-22 Werner Lemberg <wl@gnu.org> [truetype] Fix font height. * src/truetype/ttobjs.c (tt_size_reset): The Windows rendering engine uses rounded values of the ascender and descender to compute the TrueType font height. 2013-01-16 Behdad Esfahbod <behdad@behdad.org> [sfnt] Fix optimized sbit loader. It was not taking bit_depth into consideration when blitting! * src/sfnt/ttsbit0.c (tt_sbit_decoder_load_byte_aligned, * tt_sbit_decoder_load_bit_aligned): Handle bit depth. 2013-01-16 David 'Digit' Turner <digit@google.com> [truetype] Improve subpixel code. This patches fixes many issues with the ttsubpix implementation. 1. Data tables are defined, instead of declared, in the header, and thus copied into each source file that includes it. 2. These tables were defined as global, mutable, visible variables, and thus costing private RAM to every process that loads the library (> 50 KB / process, this is huge!). Additionally, this also made the library export the symbols completely needlessly. 3. Missing `sph_' and `SPH_' prefixes to some of the definitions. Note that this doesn't try to fix the incredibly inefficient storage format for the data tables used by the code. This one will require another pass in the future. * src/truetype/ttinterp.h (MAX_NAME_SIZE, MAX_CLASS_MEMBERS): Renamed to... (SPH_MAX_NAME_SIZE, SPH_MAX_CLASS_MEMBERS): This. Update all users. (SPH_TweakRule, SPH_ScaleRule): Decorate with `const' where appropriate. (Font_Class): Rename to... (SPH_Font_Class): This. Decorate with `const' where appropriate. * src/truetype/ttsubpix.h (scale_test_tweak, sph_test_tweak): Decorate arguments with `const' where appropriate. Move font tweaking tables to... * src/truetype/ttsubpix.c: This file and decorate them with `static' and `const' where appropriate. (X_SCALING_Rules, X_SCALING_RULES_SIZE): Renamed to... (sph_X_SCALING_Rules, SPH_X_SCALING_RULES_SIZE): This. Update all users. 2013-01-12 Alexei Podtelezhnikov <apodtele@gmail.com> [truetype] Improve accuracy of normalization of short vectors. Unit vector components are stored as 2.14 fixed-point numbers. In order to calculate all 14 bits accurately, a short vector to be normalized has to be upscaled to at least 14 bits before its length is calculated. This has been safe since accurate CORDIC algorithms were adopted. * src/truetype/ttinterp.c (Normalize): Scale short vectors by 0x4000. 2013-01-12 Alexei Podtelezhnikov <apodtele@gmail.com> [truetype] Kill very old vector normalization hacks. Back in the days, vector length calculations were not very accurate and the vector normalization function, Normalize, had to meticulously correct the errors for long vectors [commit b7ef2b096867]. It was no longer necessary after accurate CORDIC algorithms were adopted, but the code remained. It is time to kill it. * src/truetype/ttinterp.c (Normalize): Remove error compensation. (TT_VecLen): Remove any mention of old less accurate implementation. 2013-01-11 Werner Lemberg <wl@gnu.org> Disable FT_CONFIG_OPTION_OLD_INTERNALS. After the next release we are going to remove the code completely. * devel/ftoption.h, include/freetype/config/ftoption.h (FT_CONFIG_OPTION_OLD_INTERNALS): Comment out. * docs/CHANGES: Document it. 2013-01-10 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Update the overflow protection bit. The recent optimizations of CORDIC iterations drastically reduce the expansion factor. Vector components with MSB of 29 are now safe from overflow. * src/base/fttrigon.c (FT_TRIG_SAFE_MSB): New macro. (ft_trig_prenorm): Use it and remove dead code. 2013-01-09 Alexei Podtelezhnikov <apodtele@gmail.com> [base, pshinter] Use FT_ABS, FT_MIN, and FT_MAX for readability. * src/base/ftbbox.c: Updated. * src/base/ftobjs.c: Updated. * src/base/fttrigon.c: Updated. * src/pshinter/pshalgo.c: Updated. * src/pshinter/pshrec.c: Updated. 2013-01-08 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Clean up trigonometric core. * src/base/fttrigon.c: Document the algorithm in a large comment. (FT_TRIG_COSCALE): Remove macro. (FT_Tan: Use `FT_TRIG_SCALE' instead. (FT_Cos, FT_Vector_Unit): Ditto and round the return values. 2013-01-02 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Use rounding in CORDIC iterations. * src/base/fttrigon.c (ft_trig_pseudo_rotate, ft_trig_pseudo_polarize): Improve accuracy by rounding. 2013-01-02 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Reduce trigonometric algorithms. After we get within 45 degrees by means of true 90-degree rotations, we can remove initial 45-degree CORDIC iteration and start from atan(1/2) pseudorotation, reducing expansion factor thereby. * src/base/fttrigon.c (FT_TRIG_SCALE, FT_TRIG_COSCALE): Update macros. (ft_trig_pseudo_rotate, ft_trig_pseudo_polarize): Update. * src/tools/cordic.py: Bring up to date with trigonometric core. * docs/CHANGES: Old typo. 2013-01-02 Alexei Podtelezhnikov <apodtele@gmail.com> * src/pshinter/pshalgo.h: Remove unused code. 2012-12-27 Werner Lemberg <wl@gnu.org> * src/truetype/ttgload.c (tt_loader_init): Add more tracing. 2012-12-23 Werner Lemberg <wl@gnu.org> [type1] Fix handling of /FontBBox in MM fonts. Problem reported by Del Merritt <del@alum.mit.edu> If we have /FontBBox { { 11 12 13 14 15 16 17 18 } { 21 22 23 24 25 26 27 28 } { 31 32 33 34 35 36 37 38 } { 41 42 43 44 45 46 47 48 } } in the /Blend dictionary, then the first BBox is { 11 21 31 41 }, the second { 12 22 32 42 }, etc. * include/freetype/internal/psaux.h (T1_FieldType): Add `T1_FIELD_TYPE_MM_BBOX' (for temporary use). * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_MM_BBOX>: Implement it. 2012-12-21 Alexei Podtelezhnikov <apodtele@gmail.com> * src/tools/cordic.py: Bring up to date with trigonometric core. 2012-12-21 Werner Lemberg <wl@gnu.org> Check parameters of `FT_Outline_New'. Problem reported by Robin Watts <robin.watts@artifex.com>. * src/base/ftoutln.c (FT_Outline_New_Internal): Ensure that `numContours' and `numPoints' fit into FT_Outline's `n_points' and `n_contours', respectively. 2012-12-20 Werner Lemberg <wl@gnu.org> * Version 2.4.11 released. ========================== Tag sources with `VER-2-4-11'. * docs/CHANGES, docs/release: Updated. * docs/VERSION.DLL: Update documentation and bump version number to 2.4.11. * README, Jamfile (RefDoc), builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html, builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html, builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html, builds/win32/visualc/freetype.dsp, builds/win32/visualc/freetype.vcproj, builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp, builds/win32/visualce/freetype.vcproj, builds/win32/visualce/index.html, builds/wince/vc2005-ce/freetype.vcproj, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/freetype.vcproj, builds/wince/vc2008-ce/index.html: s/2.4.10/2.4.11/, s/2410/2411/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 11. * builds/unix/configure.raw (version_info): Set to 16:0:10. * builds/toplevel.mk (dist): Don't include `.mailmap'. 2012-12-20 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Improve trigonometric core. FreeType used to rely on a 24-step iteration CORDIC algorithm to calculate trigonometric functions and rotate vectors. It turns out that once the vector is in the right half-plane, the initial rotation by 63 degrees is not necessary. The algorithm is perfectly capable to converge to any angle starting from the second 45 degree rotation. This patch removes the first rotation and makes it a 23-step CORDIC algorithm. * src/base/fttrigon.c (FT_TRIG_SCALE, FT_TRIG_COSCALE): Update macro values. (ft_trig_pseudo_rotate, ft_trig_pseudo_polarize): Remove initial rotation. 2012-12-19 Werner Lemberg <wl@gnu.org> * src/base/ftobjs.c (ft_property_do): Fix compiler warning. 2012-12-19 Alexei Podtelezhnikov <apodtele@gmail.com> * src/base/ftrfork.c (FT_Raccess_Guess): Switch to FT_Int counters. 2012-12-19 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Clean up trigonometric core. * src/base/fttrigon.c (ft_trig_pseudo_polarize): Align algorithm with `ft_trig_pseudo_rotate'. 2012-12-18 Infinality <infinality@infinality.net> [truetype] Minor performance enhancement. * src/truetype/ttgload.c: (TT_Process_Simple_Glyph): Use FT_MulFix instead of FT_MulDiv. 2012-12-17 Infinality <infinality@infinality.net> [truetype] Remove unused code and variables. * src/truetype/ttinterp.c: Updated. (Ins_FDEF): Remove opcode patterns that are not being used. 2012-12-16 Werner Lemberg <wl@gnu.org> Various compiler warning fixes. * include/freetype/internal/ftserv.h (FT_SERVICE_UNAVAILABLE): Use `logical not' operator instead of negation. The idea is that `~' returns exactly the data type enforced by the cast to a pointer (be it 32bit or 64bit or whatever), while a negative integer has not this flexibility. * src/cache/ftccmap.c (FTC_CMAP_UNKNOWN): Ditto. * src/truetype/ttgxvar.c (ALL_POINTS, TT_Get_MM_Var): Ditto. * src/type/t1load.c (T1_Get_MM_Var): Ditto. (parse_blend_axis_types): Use cast. * src/bdf/bdflib.c (_bdf_readstream): Use cast. 2012-12-16 Infinality <infinality@infinality.net> [truetype] Remove unused code and variables. Add minor fixes. * src/truetype/ttsubpix.h: Updated. (SKIP_NONPIXEL_Y_MOVES_Rules_Exceptions): Add Trebuchet MS. (ALLOW_X_DMOVEX_Rules): Remove Arial characters. (ALLOW_X_DMOVE_Rules): Remove Arial characters. (RASTERIZER_35_Rules): Verdana no longer needs to be here. (SKIP_IUP_Rules): Formatting fix. (DELTAP_SKIP_EXAGGERATED_VALUES_Rules): Remove Segoe UI. (COMPATIBLE_WIDTHS_Rules): Add Monaco and Trebuchet MS. (X_SCALING_Rules): Add misc. corrective fixes. * src/truetype/ttgload.c: (TT_Process_Simple_Glyph): Adjust correction factor for emboldening during scaling. * src/truetype/ttinterp.h: Updated. (TT_ExecContextRec): Remove unused variables. * src/truetype/ttobjs.h: Updated. (TT_SizeRec): Add ttfautohinted variable. * src/truetype/ttinterp.c: Updated. (Ins_FDEF): Rework code to fix bugs and add more detection. (Ins_CALL): Remove unused code. (Ins_LOOPCALL): Remove unused code. (TT_RunIns): Remove unused code. (Ins_SHPIX): Add logic to handle ttfautohinted fonts. (Ins_MIRP): Don't round x in cut-in calculation. Add logic to handle ttfautohinted fonts. 2012-12-16 Werner Lemberg <wl@gnu.org> [sfnt] Fix Savannah bug #37936. * src/sfnt/ttload.c (tt_face_load_gasp): Avoid memory leak. 2012-12-15 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Fix 11-year old bug. Since the initial commit (ebe85f59) the value of FT_TRIG_SCALE has always been slightly less than the correct value, which has been given in the comment as a hexadecimal. As a result, vector lengths were underestimated and rotated vectors were shortened. * src/base/fttrigon.c (FT_TRIG_SCALE): Fix macro value. 2012-12-15 Werner Lemberg <wl@gnu.org> [bdf] Fix Savannah bug #37907. * src/bdf/bdflib.c (_bdf_parse_glyphs) <ENCODING>: Normalize negative second parameter of `ENCODING' field also. 2012-12-15 Werner Lemberg <wl@gnu.org> [bdf] Fix Savannah bug #37906. * src/bdf/bdflib.c (_bdf_parse_glyphs) <ENCODING>: Use correct array size for checking `glyph_enc'. 2012-12-15 Werner Lemberg <wl@gnu.org> [bdf] Fix Savannah bug #37905. * src/bdf/bdflib.c (_bdf_parse_start) <STARTPROPERTIES>: Reset `props_size' to zero in case of allocation error; this value gets used in a loop in `bdf_free_font'. 2012-12-10 Alexei Podtelezhnikov <apodtele@gmail.com> [truetype] Scale F_dot_P down. The dot product between freeVector and projVector or cosine of the angle between these FT_F2Dot14 unit vectors used to be scaled up by 4 and routinely occupied 32 bits in an FT_Long field F_dot_P. This patch scales the value down by 2^14 instead, which simplifies its use throughout the bytecode interpreter. This does not lead to the loss of precision because the lower bits are unreliable anyway. Consider two unit vectors (1,0) and (.6,.8) for which the true value of F_dot_P is .6 * 0x40000000 = 0x26666666. These vectors are stored as (0x4000,0) and (0x2666,0x3333) after rounding and F_dot_P is assigned 0x26660000. The lower bits were already lost while rounding the unit vector components. Besides code simplification, this change can lead to better performance when FT_MulDiv with the scaled-down F_dot_P is less likely to use the costly 64-bit path. We are not changing the type of F_dot_P to FT_F2Dot14 at this point. * src/truetype/ttinterp.c (Compute_Funcs): Scale F_dot_P down by 14 bits and modify its use accordingly. (Direct_Move, Direct_Move_Orig, Compute_Point_Displacement): Modify the use of F_dot_P field. * src/truetype/ttobjs.c (tt_size_run_fpgm): Change arbitrary assignment of F_dot_P to its theoretical maximum in case we decide to scale back its type later. 2012-12-09 Johnson Y. Yan <yinsen_yan@foxitsoftware.com> [type1] Another fix for 2012-09-17 commit. * src/type1/t1parse.c (T1_Get_Private_Dict) <found>: Correctly set `limit' value. 2012-12-06 Alexei Podtelezhnikov <apodtele@gmail.com> [truetype] Tweak the previous commit. * src/truetype/ttinterp.c (Current_Ratio): Put unit vector components as the second TT_MulFix14 arguments. This is required on 16-bit systems. 2012-12-06 Alexei Podtelezhnikov <apodtele@gmail.com> [truetype] Microoptimizations in bytecode interpreter. * src/truetype/ttinterp.c (TT_DivFix14): New macro. (Normalize): Use it here. (Current_Ratio): Use TT_MulFix14 instead of FT_MulDiv. (Ins_SHPIX): Cancel out two TT_MulFix14 calls. 2012-12-05 Alexei Podtelezhnikov <apodtele@gmail.com> [truetype] Cosmetic improvement in bytecode interpreter. * src/truetype/ttinterp.c: Use explicit calls to FT_MulDiv, FT_MulFix, and FT_DivFix instead of macros. 2012-12-03 John Tytgat <John.Tytgat@esko.com> [pshinter] Clamp BlueScale value. This is Savannah bug #37856. * src/pshinter/pshglob.c (psh_calc_max_height): New function. (psh_globals_new): Use it to limit BlueScale value to `1 / max_of_blue_zone_heights'. 2012-12-01 Alexei Podtelezhnikov <apodtele@gmail.com> [truetype, type1] Revise the use of FT_MulDiv. * src/truetype/ttgxvar.c: Updated. * src/truetype/ttobjs.c: Updated. * src/type1/t1load.c: Updated. 2012-11-30 Werner Lemberg <wl@gnu.org> [configure] Preserve customized `ftoption.h'. Problem reported by Del Merritt <del@alum.mit.edu>. * builds/unix/configure.raw <cpp computation of bit length>: Don't remove existing FreeType configuration files. 2012-11-29 John Tytgat <John.Tytgat@esko.com> [type1] Fix Savannah bug #37831. The bug report also contains a patch. * src/type1/t1parse.c (T1_Get_Private_Dict) <found>: Really fix change from 2012-09-17. 2012-11-28 Alexei Podtelezhnikov <apodtele@gmail.com> [truetype] Fix formatting and typo. 2012-11-27 Alexei Podtelezhnikov <apodtele@gmail.com> [cid, type1, type42] Clean up units_per_EM calculations. * src/cid/cidload.c (cid_parse_font_matrix): Updated. * src/type1/t1load.c (t1_parse_font_matrix): Updated. * src/type42/t42parse.c (t42_parse_font_matrix): Updated. 2012-11-27 Alexei Podtelezhnikov <apodtele@gmail.com> [ftstroke] Minor improvement. * src/base/ftstroke.c: Replace nested FT_DivFix and FT_MulFix with FT_MulDiv. 2012-11-17 Werner Lemberg <wl@gnu.org> * src/base/fttrigon.c (ft_trig_downscale): Make 64bit version work. 2012-11-15 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Fix integer overflows in dd5718c7d67a. * src/base/ftoutln.c (FT_Outline_EmboldenXY): Use FT_MulDiv. 2012-11-15 Werner Lemberg <wl@gnu.org> [autofit] Trace stem widths. * src/autofit/aflatin.c (af_latin_metrics_init_widths): Add some FT_TRACE calls. 2012-11-13 Werner Lemberg <wl@gnu.org> [cff] Add support for OpenType Collections (OTC). * src/cff/cffload.c (cff_font_load): Separate subfont and face index handling to load both pure CFFs with multiple subfonts and OTCs (with multiple faces where each face holds exactly one subfont). * src/cff/cffobjs.c (cff_face_init): Updated. 2012-11-12 Werner Lemberg <wl@gnu.org> [autofit] Minor improvement. * src/autofit/aflatin.c (af_latin_hints_compute_blue_edges): Fix loop. 2012-11-10 Werner Lemberg <wl@gnu.org> [autofit] Improve tracing. * src/autofit/aflatin.c (af_latin_hint_edges) [FT_DEBUG_LEVEL_TRACE]: Count number of actions and emit something if there weren't any. 2012-11-04 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Fortify emboldening code against egregious distortions. * src/base/ftoutln.c (FT_Outline_EmboldenXY): Threshold emboldening strength when it leads to segment collapse. 2012-11-03 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Clean up emboldening code and improve comments there. * src/base/ftoutln.c (FT_Outline_EmboldenXY): Replace sequential calls to FT_MulFix and FT_DivFix with FT_MulDiv. Mention that bisectors are used to figure out the shift direction. 2012-10-24 Werner Lemberg <wl@gnu.org> [autofit] Add standard character to `AF_ScriptClassRec' structure. * src/autofit/aftypes.h (AF_ScriptClassRec): Add `standard_char' member. (AF_DEFINE_SCRIPT_CLASS): Updated. * src/autofit/aflatin.c (af_latin_metrics_init_widths): Use it. (af_latin_metrics_init, af_latin_script_class): Updated. * src/autofit/aflatin.c (af_latin2_metrics_init_widths): Use it. (af_latin2_metrics_init, af_latin2_script_class): Updated. * src/autofit/afcjk.c (af_cjk_metrics_init_widths): Use it. (af_cjk_metrics_init, af_cjk_script_class): Updated. * src/autofit/afindic.c (af_indic_metrics_init, af_indic_script_class): Updated. * src/autofit/afcjk.h, src/autofit/aflatin.h: Updated. * src/autofit/afdummy.c: Updated. 2012-10-24 Werner Lemberg <wl@gnu.org> [autofit] Only use Unicode CMap. * src/autofit/aflatin.c (af_latin_metrics_init): Implement it, to be in sync with `af_face_globals_compute_script_coverage'. 2012-10-21 Werner Lemberg <wl@gnu.org> [psaux] Improve parsing of invalid numbers. * src/psaux/psconv.c (PS_Conv_Strtol): Always parse complete number, even in case of overflow. (PS_Conv_ToInt): Only increase cursor if parsing was successful. (PS_Conv_ToFixed): Ditto. Trace underflow and data error. 2012-10-21 Werner Lemberg <wl@gnu.org> [smooth] Improve tracing. * src/smooth/ftgrays.c (gray_sweep): Trace last sweep line of current band also. 2012-10-20 Alexei Podtelezhnikov <apodtele@gmail.com> [truetype] Cheaper way to threshold angles between vectors. * src/truetype/ttinterp.c (Ins_ISECT): Thresholding tangent is a lot cheaper than thresholding sine. 2012-10-20 Werner Lemberg <wl@gnu.org> [cff] Improve parsing of invalid real numbers. * src/cff/cffparse.c (cff_parse_real): Always parse complete number, even in case of overflow or underflow. Also trace one more underflow. 2012-10-20 Andreas Pehnack <andreas.pehnack@me.com> [sfnt] Load pure CFF fonts wrapped in SFNT container. Such fonts only have a `cmap' and a `CFF' table. * src/sfnt/ttload.c (tt_face_load_font_dir): Don't call `check_table_dir' if font signature is `OTTO'. 2012-10-20 Werner Lemberg <wl@gnu.org> [psaux] Fix some value overflows and improve tracing. * src/psaux/psconv.c: Include FT_INTERNAL_DEBUG_H. (FT_COMPONENT): Define. (PS_Conv_Strtol): Return FT_Long. Handle bad data and overflow. Emit some tracing messages in case of error. (PS_Conv_ToInt): Return FT_Long. (PS_Conv_ToFixed): Updated. * src/psaux/psconv.h: Updated. * include/freetype/internal/fttrace.h: Add `psconv'. 2012-10-20 Werner Lemberg <wl@gnu.org> [autofit] Fix `make multi CC=c++'. * src/autofit/aflatin.c, src/autofit/aflatin2.c: Include `afglobal.h'. * src/autofit/afloader.c: Fix order of header files. * src/autofit/afmodule.c: Include `afglobal.h' and `aferrors.h'. 2012-10-19 Werner Lemberg <wl@gnu.org> [cff] Fix more value errors and improve tracing. * src/cff/cffparse.c (cff_parse_integer): Emit tracing message in case of error. (cff_parse_real): Handle and trace overflow, underflow, and bad data consistently. (do_fixed): New helper function, handling and tracing overflow. (cff_parse_fixed, cff_parse_fixed_scaled): Use `do_fixed'. 2012-10-17 Werner Lemberg <wl@gnu.org> [psaux] Fix some value overflows. * src/psaux/psconv.c (PS_Conv_ToFixed): Implement it. 2012-10-17 Bram Tassyns <BramT@enfocus.com> [cff] Fix value overflow. * src/cff/cffparse.c (cff_parse_fixed_scaled): Implement it. 2012-10-17 Werner Lemberg <wl@gnu.org> [truetype] Fix Savannah bug #37572. * src/truetype/ttinterp.c (Ins_ISECT): Use angle between vectors to avoid grazing intersections. The previous threshold was too coarse, incorrectly rejecting short but valid vectors. 2012-09-30 Gilles Espinasse <g.esp@free.fr> Remove useless `rm' detection. `rm -f' is directly used in the `configure' script created by autoconf, thus no availability test is necessary. * builds/unix/configure.raw (RMF): Remove test. * builds/unix/unix-def.in (DELETE): Updated. 2012-09-29 Werner Lemberg <wl@gnu.org> [autofit] Minor optimization. * src/autofit/afglobal.c (af_face_globals_compute_script_coverage): Add loop condition. 2012-09-29 Werner Lemberg <wl@gnu.org> [autofit] Fix thinko. * src/autofit/aftypes.h (AF_SCRIPT): s/AF_SCRIPT_NONE/AF_SCRIPT_DUMMY/. We already use `AF_SCRIPT_NONE' as a bit mask. * src/autofit/afdummy.c: Updated. 2012-09-18 Werner Lemberg <wl@gnu.org> [autofit] Implement `increase-x-height' property. * include/freetype/ftautoh.h (FT_Prop_IncreaseXHeight): New structure. * include/autofit/afmodule.c (af_property_get_face_globals): New function, re-using code from `af_property_get'. (af_property_set, af_property_get): Handle `increase-x-height'. Updated. 2012-09-18 Werner Lemberg <wl@gnu.org> [autofit] Implement Infinality's `increase glyph heights'. This is an improved version of a similar fix contained in the so-called `Infinality patch', taken from http://www.infinality.net/fedora/linux/zips/freetype-infinality-2.4.10-20120616_01-x86_64.tar.bz2 which addresses various enhancements of the auto-hinter. Without properties to control a module's metadata it wasn't possible to adapt the patches because everything was originally controlled by environment variables which I consider not suitable in general. A patch to control `increase_x_height' follows. * src/autofit/afglobal.h (AF_PROP_INCREASE_X_HEIGHT_MIN, AF_PROP_INCREASE_X_HEIGHT_MAX): New macros. (AF_FaceGlobalsRec): Add `increase_x_height' member. * src/autofit/afglobal.c (af_face_globals_new): Initialize it. * src/autofit/aflatin.c (af_latin_metrics_scale_dim), * src/autofit/aflatin2.c (af_latin2_metrics_scale_dim): Implement handling of `increase_x_height'. 2012-09-18 Werner Lemberg <wl@gnu.org> [autofit] Add hierarchical property access to some structures. * src/autofit/afglobal.h: Include `afmodule.h'. (AF_FaceGlobalsRec): Add `module' member. (AF_FaceGlobals): Typedef moved to... * src/autofit/aftypes.h: Here. (AF_ScriptMetricsRec): Add `globals' member. * src/autofit/afglobal.c (af_face_globals_new, af_face_globals_compute_script_coverage, af_face_globals_get_metrics): Updated. * src/autofit/afloader.c (af_loader_reset), src/autofit/afmodule.c (af_property_get): Updated. 2012-09-17 Werner Lemberg <wl@gnu.org> [type1] Fix Savannah bug #37350. * src/type1/t1parse.c (T1_Get_Private_Dict) <found>: Check for ASCII storage only if we actually have at least four bytes. 2012-09-15 Werner Lemberg <wl@gnu.org> [autofit] Implement `fallback-script' property. * src/autofit/afglobal.c: s/default_script/fallback_script/. * src/autofit/afglobal.h: s/AF_SCRIPT_DEFAULT/AF_SCRIPT_FALLBACK/. * src/autofit/afmodule.c: s/default_script/fallback_script/. (af_property_set, af_property_get): Implement `fallback-script'. * src/autofit/afmodule.h: s/default_script/fallback_script/. * include/freetype/ftautoh.h: Document it. 2012-09-15 Werner Lemberg <wl@gnu.org> [autofit] Correct previous Unicode 6.1.0 change. The auto-hinter's latin module only handles latin ligatures in the `Alphabetical Presentation Forms' block. * src/autofit/aflatin.c (af_latin_uniranges): Fix it. 2012-09-15 Werner Lemberg <wl@gnu.org> * src/autofit/afmodule.c: s/FT_Err_/AF_Err_/. 2012-09-15 Werner Lemberg <wl@gnu.org> [autofit] Make default script a global property. * src/autofit/afmodule.h (AF_ModuleRec): Add `default_script' field. * src/autofit/afglobal.c (af_face_globals_compute_script_coverage, af_face_globals_new), src/autofit/afloader.c (af_loader_reset), src/autofit/afmodule.c (af_property_get) <glyph-to-script-map>, af_autofitter_init: Handle default script. * src/autofit/afglobal.h: Updated. 2012-09-15 Werner Lemberg <wl@gnu.org> Use `FT_Module' instead of `FT_Library' argument in property funcs. This internal change simplifies access to global module data. * include/freetype/internal/services/svprop.h (FT_Properties_SetFunc, FT_Properties_GetFunc): Change accordingly. * src/base/ftobjs.c (ft_property_do), src/autofit/afmodule.c (af_property_set, af_property_get): Updated. 2012-09-14 Werner Lemberg <wl@gnu.org> [autofit] Update to Unicode 6.1.0. * src/autofit/afcjk.c (af_cjk_uniranges), src/autofit/aflatin.c (af_latin_uniranges): Add and fix ranges. 2012-09-14 Werner Lemberg <wl@gnu.org> [autofit] Pass `AF_Module' instead of `AF_Loader'. We want to access the (not yet existing) module's global data later on. * src/autofit/afloader.c: Include `afmodule.h'. (af_loader_init, af_loader_reset, af_loader_done, af_loader_load_glyph): Change accordingly. * src/autofit/afmodule.c (AF_ModuleRec): Move to `afmodule.h'. Updated. * src/autofit/afmodule.h: Include `afloader.h'. (AF_ModuleRec): Define here. * src/autofit/afloader.h (AF_Module): Define here. Updated. 2012-09-14 Werner Lemberg <wl@gnu.org> [autofit] Fix `make multi'. * include/freetype/internal/fttrace.h: Add `afmodule'. * src/autofit/afmodule.c: Include FT_INTERNAL_DEBUG_H. (FT_COMPONENT): Define. 2012-09-14 Werner Lemberg <wl@gnu.org> * src/autofit/afmodule.c: s/FT_Autofitter/AF_Module/. 2012-09-12 Werner Lemberg <wl@gnu.org> [autofit] Minor reorganization. * src/autofit/afglobal.c (AF_SCRIPT_LIST_DEFAULT, AF_SCRIPT_LIST_NONE, AF_DIGIT): Move to... * src/autofit/afglobal.h (AF_SCRIPT_DEFAULT, AF_SCRIPT_LIST_NONE, AF_DIGIT): This and update code. 2012-09-01 Werner Lemberg <wl@gnu.org> [autofit] Implement `glyph-to-script-map' property. * include/freetype/ftautoh.h: New public header file. * include/freetype/config/ftheader.h (FT_AUTOHINTER_H): New macro. * src/autofit/afglobal.c (AF_FaceGlobalsRec): Move structure to... * src/autofit/afglobal.h: This header file. * src/autofit/afmodule.c: Include FT_AUTOHINTER_H. (af_property_get): Handle `glyph-to-script-map'. 2012-08-31 Werner Lemberg <wl@gnu.org> [autofit] Implement properties service framework. No properties are added yet. * src/autofit/afmodule.c: Include FT_SERVICE_PROPERTIES_H. (af_property_set, af_property_get): New dummy functions. (af_service_properties, af_services, af_get_interface): Provide service setup. (autofit_moduleclass): Add service interface. * src/autofit/afpic.c: Add necessary forward declarations. (autofit_module_class_pic_init): Add code for service addition. (autofit_module_pic_free): Add code for service removal. * src/autofit/afpic.h (AF_SERVICES_GET, AF_SERVICE_PROPERTIES_GET): New macros which provide necessary syntactical sugar for PIC support. 2012-08-30 Werner Lemberg <wl@gnu.org> Implement properties to control FreeType modules. * include/freetype/fterrdef.h (FT_Err_Missing_Property): New error code. * include/freetype/ftmodapi.h (FT_Property_Set, FT_Property_Get): New API. * include/freetype/internal/services/svprop.h: New file. * include/freetype/internal/ftserv.h (FT_SERVICE_PROPERTIES_H): New macro. * src/base/ftobjs.c: Include FT_SERVICE_PROPERTIES_H. (ft_property_do, FT_Property_Set, FT_Property_Get): New functions. 2012-08-29 Werner Lemberg <wl@gnu.org> [docmaker] Allow `-' in tags and identifiers. * src/tools/docmaker/content.py (re_identifier), src/tools/docmaker/sources.py (re_markup_tag1, re_markup_tag2, re_crossref): Add `-' in patterns. 2012-08-27 Werner Lemberg <wl@gnu.org> [FT_CONFIG_OPTION_PIC] Fix g++ 4.6.2 compiler warnings. * include/freetype/internal/ftdriver.h (FT_DEFINE_DRIVER), include/freetype/internal/ftobjs.h (FT_DEFINE_RENDERER, FT_DEFINE_MODULE), include/freetype/internal/ftserv.h (FT_DEFINE_SERVICEDESCREC1, FT_DEFINE_SERVICEDESCREC2, FT_DEFINE_SERVICEDESCREC3, FT_DEFINE_SERVICEDESCREC4, FT_DEFINE_SERVICEDESCREC5, FT_DEFINE_SERVICEDESCREC6), src/autofit/afpic.c (autofit_module_class_pic_init), src/base/basepic.c (ft_base_pic_init), src/base/ftinit.c (ft_create_default_module_classes), src/cff/cffparse.c (FT_Create_Class_cff_field_handlers), src/cff/cffpic.c (cff_driver_class_pic_init), src/pshinter/pshpic.c (pshinter_module_class_pic_init), src/psnames/pspic.c (psnames_module_class_pic_init), src/raster/rastpic.c (ft_raster1_renderer_class_pic_init), src/sfnt/sfntpic.c (sfnt_module_class_pic_init), src/sfnt/ttcmap.c (FT_Create_Class_tt_cmap_classes), src/smooth/ftspic.c (ft_smooth_renderer_class_pic_init), src/truetype/ttpic.c (tt_driver_class_pic_init): Initialize allocation variable. 2012-08-27 Werner Lemberg <wl@gnu.org> [truetype] Fix compilation warning. * src/truetype/ttgload.c (IS_HINTED): Move macro to... * src/truetype/ttobjs.h: This header file. 2012-08-27 Werner Lemberg <wl@gnu.org> [autofit, cff, pshinter, psnames] More renamings for orthogonality. * src/autofit/afmodule.c, src/autofit/afpic.h: s/AF_AUTOFITTER_/AF_/. * src/cff/cffdrivr.c, src/cff/cffobjs.c, src/cff/cffparse.c, src/cff/cffpic.h: s/FT_CFF_/CFF_/. * src/pshinter/pshmod.c, src/pshinter/pshpic.h: s/FT_PSHINTER_/PSHINTER_/. * src/psnames/psmodule.c, src/psnames/pspic.h: s/FT_PSCMAPS/PSCMAPS_/. 2012-08-27 Werner Lemberg <wl@gnu.org> [sfnt, truetype] More renamings for orthogonality. * src/sfnt/sfdriver.c, src/sfnt/sfntpic.h, src/sfnt/ttcmap.c, src/truetype/ttdriver.c, src/truetype/ttpic.h: s/FT_SFNT_/SFNT_/, s/FT_TT_/TT_/, s/GET_CMAP_INFO_GET/CMAP_INFO_GET/. 2012-08-27 Werner Lemberg <wl@gnu.org> [autofit] Some macro and variable renamings for orthogonality. * include/freetype/internal/autohint.h, src/base/ftobjs.c, src/autofit/afmodule.c, src/autofit/afpic.c, src/autofit/afpic.h: s/SERVICE/INTERFACE/, s/service/interface/, s/Service/Interface/. 2012-08-26 Werner Lemberg <wl@gnu.org> Fix Savannah bug #37178. * src/base/ftobjs.c (FT_Open_Face): Initialize `error' with `FT_Err_Missing_Module' before loop to indicate `no valid drivers'. 2012-08-17 Werner Lemberg <wl@gnu.org> * src/base/ftsynth.c (FT_GlyphSlot_Oblique): Fix shear angle. The old value was far too large (more than 20°). The new one corresponds to 12°, quite common in typography. 2012-08-12 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Fix Savannah bug #37017. * src/smooth/ftgrays.c (gray_render_cubic): Use a different set of checks when detecting super curvy splines to be split. 2012-08-05 Werner Lemberg <wl@gnu.org> [autofit] Improve recognition of flat segments. Problem reported by Brad Dunzer <BDunzer@extensis.com>. * src/autofit/aflatin.c (af_latin_metrics_init_blues): We have a flat segment if the horizontal distance of best on-points is larger than a given threshold. 2012-08-05 Werner Lemberg <wl@gnu.org> [autofit] Variable renamings. * src/autofit/aflatin.c (af_latin_metrics_init_blues): Replace `glyph' with `outline'. s/best_first/best_contour_first/. s/best_last/best_contour_last/. 2012-07-31 Werner Lemberg <wl@gnu.org> [type1] Fix Savannah bug #37000. * src/type1/t1load.c (parse_encoding): Fix order of checks. 2012-07-17 Werner Lemberg <wl@gnu.org> [psaux] Fix Savannah bug #36833. * src/psaux/t1decode.c (t1operator_seac): `seac' is not a valid operator if we want metrics only. 2012-07-16 Werner Lemberg <wl@gnu.org> [type1] Fix Savannah bug #36832. * src/type1/t1load.c (parse_charstrings): Reject negative number of glyphs. 2012-07-13 Werner Lemberg <wl@gnu.org> [type1] Fix Savannah bug #36829. * src/type1/t1load.c (parse_encoding): Check cursor position after call to T1_Skip_PS_Token. 2012-07-12 Alexei Podtelezhnikov <apodtele@gmail.com> Revert the last commit 45337b07. * src/base/ftstroke.c (FT_Stroker_New): Revert the previous change. 2012-07-11 Alexei Podtelezhnikov <apodtele@gmail.com> [ftstroke] Fix uninitialized return value. * src/base/ftstroke.c (FT_Stroker_New): Return FT_Err_Ok instead. 2012-07-11 Werner Lemberg <wl@gnu.org> [smooth] Avoid memory leak in case of failure. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Use flags to indicate what to clean up after finishing the function, with and without errors. 2012-07-09 Werner Lemberg <wl@gnu.org> Fix compilation with MSVC 5.0. Problem reported by Peter Breitenlohner and Akira Kakuto. * include/freetype/config/ftstdlib.h (ft_setjmp): Updated. * src/sfnt/ttcmap.c (tt_face_build_cmaps): Remove cast. 2012-07-09 Werner Lemberg <wl@gnu.org> [autofit] Improve debugging messages; do some code cleanup. * src/autofit/aflatin.c (af_latin_align_linked_edge, af_latin_hint_edges): Synchronize with formatting used in the ttfautohint project. 2012-07-07 Gilles Espinasse <g.esp@free.fr> Fix strict-aliasing warning. * src/base/ftglyph.c (FT_Glyph_To_Bitmap): Avoid double cast. 2012-07-07 Dave Thomas <dave.thomas@metaforic.com> [ARM] Fix FT_MulFix_arm. * include/freetype/config/ftconfig.h (FT_MulFix_arm) [__arm__]: Avoid ADDS instruction to clobber condition codes. 2012-07-06 Werner Lemberg <wl@gnu.org> [autofit] Do some code cleanup. * src/autofit/afglobal.c (af_face_globals_new): Simplify. * src/autofit/afhints.c: Use `FT_TRACE7' instead of `printf' everywhere. (FT_COMPONENT): New macro. (af_glyph_hints_done): Simplify. * include/freetype/internal/fttrace.h: Updated. 2012-07-05 Werner Lemberg <wl@gnu.org> [autofit] Improve output of debugging information. * src/autofit/afhints.c (af_glyph_hints_dump_segments): Print more data; report no data. (af_glyph_hints_dump_edges): Report no data. 2012-07-04 Werner Lemberg <wl@gnu.org> [autofit] Fix Savannah bug #36091. * src/autofit/aflatin.c (af_latin_metrics_init_blues), src/autofit/aflatin2.c (af_latin2_metrics_init_blues): Change the constraint for testing round vs. flat segment: Accept either a small distance or a small angle. 2012-07-04 Werner Lemberg <wl@gnu.org> [autofit] Beautify blue zone tracing. * src/autofit/aflatin.c (af_latin_metrics_init_blues), src/autofit/aflatin2.c (af_latin2_metrics_init_blues): Implement it. 2012-07-03 Werner Lemberg <wl@gnu.org> [autofit] Quantize stem widths. * src/autofit/afangles.c (af_sort_widths): Rename to... (af_sort_and_quantize_widths): This. Add code to avoid stem widths which are almost identical. * src/autofit/aftypes.h, src/autofit/aflatin.c, src/autofit/afcjk.c: Updated. 2012-07-03 Werner Lemberg <wl@gnu.org> [autofit] Minor speed-up. * src/autofit/afangles (af_sort_pos, af_sort_widths): Don't swap elements if they are equal. 2012-06-30 Gilles Espinasse <g.esp@free.fr> Fix `checking if gcc static flag -static works' test. On my linux build tree, I receive yes answer in every package I build except FreeType for this test checking if gcc static flag `-static' works In FreeType, no is received, unless bzip2 and zlib are disabled using ./configure --without-bzip2 --without-zlib The reason is that bzip2 and zlib tests add `-lz' and `-lbz2' to LDFLAGS and this broke static flag test. * builds/unix/configure.raw: Update CFLAGS and LDFLAGS only after LT_INIT has run. 2012-06-28 Infinality <infinality@infinality.net> [truetype] Fix various artifacts. Verdana was broken in the original Infinality commit. Also includes other minor fixes. * src/truetype/ttsubpix.h: Updated. Removed unused macros. (RASTERIZER_35_Rules): Add Verdana. (SKIP_NONPIXEL_Y_MOVES_Rules): Add Tahoma `s'. (MIRP_CVT_ZERO_Rules): Remove Verdana. (ALWAYS_SKIP_DELTAP_Rules): Add Russian char 0x438. (COMPATIBLE_WIDTHS_Rules): Rearrange some rules. (X_SCALING_Rules): Adjust Verdana `a' at 12 and 13 ppem. * src/truetype/ttsubpix.c: Updated. (sph_set_tweaks): Re-execute fpgm always. 2012-06-28 Gilles Espinasse <g.esp@free.fr> Fix CFLAGS and LDFLAGS share configure test. * builds/unix/configure.raw: Fix typo. 2012-06-28 Werner Lemberg <wl@gnu.org> [truetype] Set the `subpixel_positioned' flag unconditionally. This is how the code currently behaves. * src/truetype/ttgload.c (tt_loader_init): Do it. 2012-06-27 Werner Lemberg <wl@gnu.org> Fix conditional compilation. * src/base/basepic.c: Use FT_CONFIG_OPTION_MAC_FONTS. 2012-06-27 Werner Lemberg <wl@gnu.org> Fix conditional compilation. * include/freetype/internal/ftcalc.h (FT_MulDiv_No_Round): Don't enclose with `TT_USE_BYTECODE_INTERPRETER'; we now need the function elsewhere also. * src/autofit/afcjk.h: Use AF_CONFIG_OPTION_CJK. * src/truetype/ttgload.c (tt_loader_init): Fix compiler warning. * src/truetype/ttinterp.c (Ins_MSIRP): Fix compiler warning. * src/truetype/ttinterp.h: Use TT_CONFIG_OPTION_BYTECODE_INTERPRETER. 2012-06-26 Infinality <infinality@infinality.net> [truetype] Remove unused rounding functionality. The subpixel hinting patch contained the concept of an adjustable number of gridlines per pixel. This is no longer used due to x being completely ignored instead. This will return some of the code to its existing state prior to the original Infinality commit. * include/freetype/internal/ftobjs.h (FT_PIX_FLOOR_GRID, FT_PIX_ROUND_GRID, FT_PIX_CEIL_GRID): Removed. * src/truetype/ttinterp.c: Updated. (Round_None, Round_To_Grid, Round_To_Half_Grid, Round_Down_To_Grid, Round_Up_To_Grid, Round_To_Double_Grid, Round_Super, Round_Super_45, SetSuperRound): Remove parameter to handle the number of grid lines per pixel. (SET_SuperRound, ROUND_None, CUR_Func_round): Updated. (DO_SROUND, DOS45ROUND, DO_ODD, DO_EVEN): Updated. (DO_ROUND, DO_NROUND): Updated. (Move_Zp2_Point, Ins_SHPIX, Ins_MSIRP, Ins_MDAP, Ins_MIAP, Ins_MDRP, Ins_MIRP): Perform Round_None instead of calling a modified rounding function. Remove gridlines_per_pixel. Create a local variable to store control value cutin. Simplify the conditional for ignore_x_mode. Adjust rounding calls to pass only two values. 2012-06-25 Werner Lemberg <wl@gnu.org> [cff] Fix Savannah bug #36705. Handle numbers like 2.001 correctly. * src/cff/cffparse.c (cff_parse_real): Avoid negative values for `shift'. 2012-06-18 Infinality <infinality@infinality.net> [truetype] Support subpixel hinting. This is the large, famous `Infinality' patch to support ClearType bytecode which has been available from http://www.infinality.net/blog/ for some time, and which has been refined over the last years. While still experimental, it is now mature enough to be included directly into FreeType. Most of the code is based on the ClearType whitepaper written by Greg Hitchcock https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx which gives a detailed overview of the necessary changes to the Microsoft rasterizer so that older fonts are supported. However, a lot of details are still missing, and this patches provides a framework to easily handle rendering issues down to the glyph level of certain fonts. Note that ClearType support is not completely implemented! In particular, full support for the options `compatible_widths', `symmetrical_smoothing, and `bgr' (via the GETINFO bytecode instruction) is missing. * src/truetype/ttsubpix.c: New file, providing code to handle `tweaks', this is, rules for certain glyphs in certain fonts (including wildcards) which need a special treatment. * src/truetype/ttsubpix.h: New file, holding the tweaking rules. * include/freetype/config/ftoption.h, src/devel/ftoption.h (TT_CONFIG_OPTION_SUBPIXEL_HINTING): New macro. * include/freetype/internal/ftobjs.h (FT_PIX_FLOOR_GRID, FT_PIX_ROUND_GRID, FT_PIX_CEIL_GRID): New macros. * src/truetype/truetype.c [TT_USE_BYTECODE_INTERPRETER]: Include `ttsubpix.c'. * src/truetype/ttgload.c: Include `ttsubpix.h'. [All changes below are guarded by TT_CONFIG_OPTION_SUBPIXEL_HINTING.] (tt_get_metrics): Set tweak flags. (TT_Hint_Glyph): Call `FT_Outline_EmboldenXY' if necessary. (TT_Process_Simple_Glyph): Compensate emboldening if necessary. (compute_glyph_metrics): Handle `compatible widths' option. (tt_loader_init): Handle ClearType GETINFO information bits. * src/truetype/rules.mk (TT_DRV_SRC): Updated. * src/truetype/ttinterp.c: Include `ttsubpix.h'. [Where necessary, changes below are guarded by TT_CONFIG_OPTION_SUBPIXEL_HINTING.] (Direct_Move, Direct_Move_X): Extended. (Round_None, Round_To_Grid, Round_To_Half_Grid, Round_Down_To_Grid, Round_Up_To_Grid, Round_To_Double_Grid, Round_Super, Round_Super_45, SetSuperRound): Add parameter to handle the number of grid lines per pixel. (SET_SuperRound, ROUND_None, CUR_Func_round): Updated. (DO_SROUND, DOS45ROUND, DO_ODD, DO_EVEN): Updated. (DO_ROUND, DO_NROUND): Updated. (DO_RS): Take care of `Typeman' bytecode patterns. (Ins_FDEF): Add some debugging code. Commented out. (Ins_ENDF): Restore state. (Ins_CALL, Ins_LOOPCALL): Handle inline delta functions. (Ins_MD): Handle `Vacuform' rounds. (Move_Zp2_Point, Ins_SHPIX, Ins_MSIRP, Ins_MDAP, Ins_MIAP, Ins_MDRP, Ins_MIRP): Handle tweaks. (Ins_ALIGNRP): Add tweak guard. (Ins_IUP, Ins_DELTAP): Handle tweaks. (Ins_GETINFO): Handle new ClearType bits. (TT_RunIns): Handle tweaks. * src/truetype/ttinterp.h: Updated. (SPH_TweakRule, SPH_ScaleRule): New structures for tweaks. (TT_ExecContextRec): Add members for subpixel hinting support. * src/truetype/ttobjs.h (TT_DefRecord): Add `inline_delta' member. 2012-06-15 Werner Lemberg <wl@gnu.org> * Version 2.4.10 released. ========================= Tag sources with `VER-2-4-10'. * docs/VERSION.DLL: Update documentation and bump version number to 2.4.10. * README, Jamfile (RefDoc), builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html, builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html, builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html, builds/win32/visualc/freetype.dsp, builds/win32/visualc/freetype.vcproj, builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp, builds/win32/visualce/freetype.vcproj, builds/win32/visualce/index.html, builds/wince/vc2005-ce/freetype.vcproj, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/freetype.vcproj, builds/wince/vc2008-ce/index.html: s/2.4.9/2.4.10/, s/249/2410/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 10. * builds/unix/configure.raw (version_info): Set to 15:0:9. 2012-06-15 Alexei Podtelezhnikov <apodtele@gmail.com> * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Improve spacing. * docs/CHANGES: Updated. 2012-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * builds/exports.mk: Add CCexe_CFLAGS and CCexe_LDFLAGS. to pass special compiler/linker flags under cross development. Suggested by Savannah bug #36367. ChangeLog on 2010-07-15 saying as they were removed was wrong for the official trunk of FreeType2. This commit is the first introduction of them. 2012-06-14 Werner Lemberg <wl@gnu.org> * docs/CHANGES: Updated. 2012-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [truetype] Add new versions of NEC FA family to tricky font list. NEC FA family dated in 1996 have different checksum. Reported by Johnson Y. Yan <yinsen_yan@foxitsoftware.com>; see https://lists.gnu.org/archive/html/freetype-devel/2012-06/msg00023.html * src/truetype/ttobjs.c (tt_check_trickyness_sfnt_ids): 4 sets of fpgm & prep table checksums for FA-Gothic, FA-Minchou, FA-RoundedGothicM, FA-RoundedGothicB are added. The family names in sample PDF are truncated, thus the list of the family names in tt_check_trickyness_family() is not updated yet. 2012-06-06 Werner Lemberg <wl@gnu.org> [ftraster] Fix rounding issue causing visual artifacts. Problem reported by jola <hans-jochen.lau@lhsystems.com>; see https://lists.gnu.org/archive/html/freetype-devel/2012-05/msg00036.html * src/raster/ftraster.c (SMulDiv_No_Round): New macro. (Line_Up): Use it. * src/raster/ftmisc.h (FT_MulDiv_No_Round): Copied from `ftcalc.c'. 2012-05-28 Alexei Podtelezhnikov <apodtele@gmail.com> * src/base/ftoutln.c (FT_Outline_Get_Orientation): Simplify. We now use the cross product of the direction vectors to compute the outline's orientation. 2012-05-28 Werner Lemberg <wl@gnu.org> * docs/CHANGES: Updated. 2012-05-28 Alexei Podtelezhnikov <apodtele@gmail.com> New function FT_Outline_EmboldenXY. * include/freetype/ftoutln.h (FT_Outline_EmboldenXY): Define it. * src/base/ftoutln.c (FT_Outline_EmboldenXY): Implement it, using a simplified emboldening algorithm. (FT_Outline_Embolden): Make it a special case of `FT_Outline_EmboldenXY' 2012-05-07 Werner Lemberg <wl@gnu.org> [type1] Fix Savannah bug #36386. * src/type1/t1load.c (t1_load_keyword): Ignore keyword if context is not valid. 2012-04-07 Werner Lemberg <wl@gnu.org> Remove compiler warning. * src/truetype/ttgload.c (TT_Load_Glyph) [!TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: Access `glyph->face' directly. 2012-03-28 Werner Lemberg <wl@gnu.org> [autofit] Properly copy scaler flags to script metrics object. Without this patch, only the dummy and cjk autohinter modules get them (since they copy the whole scaler object). * src/autofit/aflatin.c (af_latin_metrics_scale), src/autofit/aflatin2.c (af_latin2_metrics_scale): Implement it. 2012-03-22 Alexei Podtelezhnikov <apodtele@gmail.com> [bdflib] Remove redundant macro. * src/bdf/bdflib.c (isdigok): Remove and replace with sbitset, which is exactly the same. 2012-03-20 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [configure] Fix Savannah bug #35644. * builds/unix/configure.raw: Check `-ansi' flag works even if gcc is used. Bionic libc headers for Android lose the consistency when they are parsed with __STDC_VERSION__ older than 199901L or __STRICT_ANSI__. 2012-03-20 Werner Lemberg <wl@gnu.org> [bdf] Improvement to Savannah bug #35656. * src/bdf/bdflib.c (isdigok): Add cast, as suggested in report. 2012-03-17 Chris Liddell <chris.liddell@artifex.com> [type1] Fix Savannah bug #35847. * src/type1/t1load.c (parse_subrs): Fix the loop exit condition; we want to exit when we have run out of data. 2012-03-16 Werner Lemberg <wl@gnu.org> [bdf] Really fix Savannah bug #35658. * src/bdf/bdflib.c (_bdf_list_split): Add one more `field' initializer. 2012-03-14 Yann Droneaud <yann@droneaud.fr> [sfnt] Make arrays static like all others. * src/sfnt/ttload.c (tt_face_load_maxp, tt_face_load_os2), src/sfnt/ttmtx.c (tt_face_load_hhea): Add `static' keyword to frame fields. 2012-03-14 Huw Davies <huw@codeweavers.com> [sfnt] A refinement of the previous commit. * src/sfnt/sfobjs.c (tt_name_entry_ascii_from_utf16, tt_name_entry_ascii_from_other): Stop at null byte. 2012-03-14 Huw Davies <huw@codeweavers.com> [sfnt] Add `name' table compatibility to MS Windows. * src/sfnt/sfobjs.c (tt_name_entry_ascii_from_utf16, tt_name_entry_ascii_from_other): Don't replace `\0' with question marks when converting strings. 2012-03-14 Werner Lemberg <wl@gnu.org> [type1] Fix Savannah bug #35833. Based on the patch given in the bug report. * src/type1/t1load.c (IS_INCREMENTAL): New macro. (read_binary_data): Add parameter `incremental'. Update all callers using `IS_INCREMENTAL'. 2012-03-11 Werner Lemberg <wl@gnu.org> [autofit] Return correct linear advance width values. This was quite a subtle bug which accidentally showed up with glyph `afii10023' of arial.ttf (version 2.76). This glyph is a composite; the first component, `E', has an advance width of 1366 font units, while the advance width of the composite itself (which looks like uppercase `E' with dieresis) is 1367 font units. I think this is actually a bug in the font itself, because there is no reason that this glyph has not the same width as uppercase `E' without the dieresis. Anyway, it helped identify this problem. Using the TrueType hinter, the correct value (1367) of `afii10023' was returned, but the autohinter mysteriously returned 1366. Digging in the code showed that the autohinter recursively calls FT_Load_Glyph to load the glyph, adding the FT_LOAD_NO_SCALE load flag. However, the `linearHoriAdvance' field is still returned as a scaled value. To avoid scaling twice, the old code in autofit reset `linearHoriAdvance', using the `horiAdvance' field. This seemed to work since FT_LOAD_NO_SCALE was in use, but it failed actually, because `horiAdvance' is defined as the distance of the first subglyph's phantom points, which in turn are initialized using the advance width of the first subglyph. And as the given example shows, these widths can differ. * src/autofit/afloader.c (af_loader_load_g): Temporarily set FT_LOAD_LINEAR_DESIGN while calling FT_Load_Glyph to get unscaled values for the linear advance widths. 2012-03-10 Werner Lemberg <wl@gnu.org> [truetype] Fix SSW instruction. * src/truetype/ttinterp.c (DO_SSW): SSW *does* use font units. For verification, it took some time to find a font which actually uses this instruction. 2012-03-09 Vinnie Falco <vinnie.falco@gmail.com> Prepare source code for amalgamation. * include/freetype/freetype.h: Swap order of preprocessor blocks. 2012-03-08 Werner Lemberg <wl@gnu.org> * Version 2.4.9 released. ========================= Tag sources with `VER-2-4-9'. * docs/CHANGES: Updated. * docs/VERSION.DLL: Update documentation and bump version number to 2.4.9. * README, Jamfile (RefDoc), builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html, builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html, builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html, builds/win32/visualc/freetype.dsp, builds/win32/visualc/freetype.vcproj, builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp, builds/win32/visualce/freetype.vcproj, builds/win32/visualce/index.html, builds/wince/vc2005-ce/freetype.vcproj, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/freetype.vcproj, builds/wince/vc2008-ce/index.html: s/2.4.8/2.4.9/, s/248/249/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 9. * builds/unix/configure.raw (version_info): Set to 14:1:8. 2012-03-08 Werner Lemberg <wl@gnu.org> [bdf] Add missing overflow check. * src/bdf/bdflib.c (_bdf_parse_glyphs) <BITMAP>: Add threshold for `glyph->bpr'. 2012-03-07 Vinnie Falco <vinnie.falco@gmail.com> Prepare source code for amalgamation. * src/autofit/aferrors.h, src/bdf/bdferror.h, src/bzip2/ftbzip2.c, src/cache/ftcerror.h, src/cff/cfferrs.h, src/cid/ciderrs.h, src/gxvalid/gxverror.h, src/gzip/ftgzip.c, src/lzw/ftlzw.c, src/otvalid/otverror.h, src/pcf/pcferror.h, src/pfr/pfrerror.h, src/psaux/psauxerr.h, src/pshinter/pshnterr.h, src/psnames/psnamerr.h, src/raster/rasterrs.h, src/sfnt/sferrors.h, src/smooth/ftsmerrs.h, src/truetype/tterrors.h, src/type1/t1errors.h, src/type42/t42error.h, src/winfonts/fnterrs.h: Add #undef FT_ERR_PREFIX before #define FT_ERR_PREFIX. 2012-03-03 Werner Lemberg <wl@gnu.org> Fix Savannah bug #35660. For some divisions, we use casts to 32bit entities. Always guard against division by zero with these casts also. * src/base/ftcalc.c (ft_div64by32): Remove redundant cast. (FT_MulDiv, FT_MulDiv_No_Round): Add 32bit cast. (FT_DivFix): Add 32bit cast (this omission triggered the bug). 2012-03-03 Werner Lemberg <wl@gnu.org> [psaux] Fix handling of track kerning. * src/psaux/afmparse.c (afm_parse_track_kern): Don't inverse sign for `min_kern'. It is indeed quite common that track kerning *increases* spacing for very small sizes. 2012-03-02 Werner Lemberg <wl@gnu.org> [truetype] Fix Savannah bug #35689. * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Check first outline point. 2012-03-01 Werner Lemberg <wl@gnu.org> [bdf] Fix Savannah bug #35656. * src/bdf/bdflib.c (_bdf_parse_glyphs) <_BDF_BITMAP>: Check validity of nibble characters instead of accessing `a2i' array. 2012-03-01 Werner Lemberg <wl@gnu.org> [winfonts] Fix Savannah bug #35659. * src/winfonts/winfnt.c (FNT_Face_Init): Check number of glyphs. 2012-03-01 Werner Lemberg <wl@gnu.org> [bdf] Fix Savannah bug #35658. * src/bdf/bdflib.c (_bdf_list_split): Initialize `field' elements properly. 2012-03-01 Werner Lemberg <wl@gnu.org> [psaux] Fix Savannah bug #35657. If in function `skip_spaces' the routine `skip_comment' comes to the end of buffer, `cur' is still increased by one, so we need to check for `p >= limit' and not `p == limit'. * src/psaux/psconv.c (PS_Conv_Strtol, PS_Conv_ToFixed, PS_Conv_ASCIIHexDecode, PS_Conv_EexecDecode): Fix boundary checking. 2012-03-01 Werner Lemberg <wl@gnu.org> [truetype] Fix Savannah bug #35646. * src/truetype/ttinterp.c (Ins_MIRP): Typo, present since ages. The code is now in sync with the other operators (e.g. MSIRP) which modify twilight points. 2012-03-01 Werner Lemberg <wl@gnu.org> [bdf] Fix Savannah bug #35643. * src/bdf/bdflib.c (_bdf_list_ensure): Bring code in sync with comment before `_bdf_list_split', this is, really allocate at least five `field' elements. 2012-03-01 Werner Lemberg <wl@gnu.org> [bdf] Fix Savannah bug #35641. * src/bdf/bdflib.c (_bdf_parse_glyphs) <DWIDTH, BBX>: Abort if _BDF_ENCODING isn't set. We need this because access to the `glyph' variable might be undefined otherwise. 2012-03-01 Werner Lemberg <wl@gnu.org> [truetype] Fix Savannah bug #35640. * src/truetype/ttinterp.c (SkipCode, TT_RunIns): Fix boundary check for NPUSHB and NPUSHW instructions. 2012-02-29 Werner Lemberg <wl@gnu.org> [truetype] Fix Savannah bug #35601. * src/truetype/ttinterp.c (Ins_SHZ): Use number of points instead of last point for loop. Also remove redundant boundary check. 2012-02-29 Werner Lemberg <wl@gnu.org> [truetype] Remove redundant check. * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Remove redundant second check for ordered contour start points. 2012-02-29 Werner Lemberg <wl@gnu.org> [truetype] Make SHC instruction behave similar to MS rasterizer. * src/truetype/ttinterp.c (Ins_SHC): Handle virtual contour in twilight zone. 2012-02-29 Alexei Podtelezhnikov <apodtele@gmail.com> Avoid modulo operators against a power-of-two denominator. * src/afcjk.c (af_hint_normal_stem), src/base/ftoutln.c (ft_contour_has), src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_vvcurveto, cff_op_hhcurveto, cff_op_hvcurveto>, src/gxvalid/gxvcommn.c (GXV_32BIT_ALIGNMENT_VALIDATE), src/gxvalid/gxvfeat.c (gxv_feat_setting_validate): Replace `%' with `&' operator. 2012-02-29 Werner Lemberg <wl@gnu.org> [autofit] Don't synchronize digit widths for light rendering mode. We don't hint horizontally in this mode. * src/autofit/afloader.c (af_loader_load_g) <Hint_Metrics>: Implement it. 2012-02-26 Alexei Podtelezhnikov <apodtele@gmail.com> [type42] Minor code optimization (again). * src/type42/t42parse.c (t42_parse_sfnts): Simplify previous change. 2012-02-26 Mateusz Jurczyk <mjurczyk@google.com> Werner Lemberg <wl@gnu.org> [smooth] Fix Savannah bug #35604. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Use `FT_Pos' instead of `FT_UInt' for some variables and update comparisons accordingly. A detailed analysis can be found in the bug report. 2012-02-26 Alexei Podtelezhnikov <apodtele@gmail.com> [type42] Minor code optimization. * src/type42/t42parse.c (t42_parse_sfnts): Use bitmask instead of modulo operator. 2012-02-26 Werner Lemberg <wl@gnu.org> * docs/CHANGES: Updated. 2012-02-26 Werner Lemberg <wl@gnu.org> [type1] Fix Savannah bug #35608. * src/type1/t1parse.c (T1_Get_Private_Dict): Reject too short dictionaries. 2012-02-26 Werner Lemberg <wl@gnu.org> [bdf] Support `ENCODING -1 <n>' format. * src/bdf/bdflib.c (_bdf_parse_glyphs) <ENCODING>: Implement it. 2012-02-26 Werner Lemberg <wl@gnu.org> [bdf] Fix Savannah bug #35607. * src/bdf/bdflib.c (_bdf_parse_glyphs) <ENCODING>: Normalize negative encoding values. 2012-02-26 Werner Lemberg <wl@gnu.org> [type1] Fix Savannah bug #35606. * src/type1/t1load.c (parse_subrs): Add proper guards for `strncmp'. * src/psaux/psobjs.c (ps_parser_skip_PS_token): Emit error message only if cur < limit. 2012-02-25 Werner Lemberg <wl@gnu.org> [pcf] Fix Savannah bug #35603. * src/pcf/pcfread.c (pcf_get_properties): Assure final zero byte in `strings' array. 2012-02-25 Werner Lemberg <wl@gnu.org> [type42] Fix Savannah bug #35602. * src/type42/t42parse.c (t42_parse_sfnts): Check `string_size' more thoroughly. 2012-02-25 Werner Lemberg <wl@gnu.org> [bdf] Fix Savannah bugs #35599 and #35600. * src/bdf/bdflib.c (ACMSG16): New warning message. (_bdf_parse_glyphs) <_BDF_BITMAP>: Check line length. 2012-02-24 Werner Lemberg <wl@gnu.org> [bdf] Fix Savannah bugs #35597 and #35598. * src/bdf/bdflib.c (_bdf_is_atom): Fix handling of property value. 2012-02-24 Vinnie Falco <vinnie.falco@gmail.com> Prepare source code for amalgamation (6/6). * src/cff/cffdrivr.c: s/Load_Glyph/cff_glyph_load/. * src/cid/cidload.c: s/parse_font_matrix/cid_parse_font_matrix/. s/t1_init_loader/cid_init_loader/. s/t1_done_loader/cid_done_loader/. * src/psaux/t1cmap.c: s/t1_get_glyph_name/psaux_get_glyph_name/. * src/truetype/ttdriver.c: s/Load_Glyph/tt_glyph_load/. * src/type1/t1load.c: s/parse_font_matrix/t1_parse_font_matrix/. 2012-02-24 Vinnie Falco <vinnie.falco@gmail.com> Prepare source code for amalgamation (5/6). * include/freetype/fterrors.h: Undefine FT_KEEP_ERR_PREFIX after using it. 2012-02-22 Vinnie Falco <vinnie.falco@gmail.com> Prepare source code for amalgamation (4/6). * src/smooth/ftgrays.c, src/raster/ftraster.c: Undefine RAS_ARG, RAS_ARGS, RAS_VAR, and RAS_VARS before defining it. * src/smooth/ftgrays.c: s/TRaster/black_TRaster/, s/PRaster/black_PRaster/. * src/raster/ftraster.c: s/TRaster/gray_TRaster/, s/PRaster/gray_PRaster/. 2012-02-20 Vinnie Falco <vinnie.falco@gmail.com> Prepare source code for amalgamation (3/6). * src/smooth/ftgrays.c: s/TWorker/black_TWorker/, s/PWorker/black_PWorker/. * src/raster/ftraster.c: s/TWorker/gray_TWorker/, s/PWorker/gray_PWorker/. 2012-02-20 Vinnie Falco <vinnie.falco@gmail.com> Prepare source code for amalgamation (2/6). * src/smooth/ftgrays.c, src/raster/ftraster.c: Undefine FLOOR, CEILING, TRUNC, and SCALED before defining it. 2012-02-20 Vinnie Falco <vinnie.falco@gmail.com> Prepare source code for amalgamation (1/6). See discussion starting at https://lists.gnu.org/archive/html/freetype-devel/2012-01/msg00037.html * src/smooth/ftgrays.c: s/TBand/gray_TBand/. * src/raster/ftraster.c: s/TBand/black_TBand/. 2012-02-17 Alexei Podtelezhnikov <apodtele@gmail.com> [autofit] Fix outline flags. * src/autofit/afloader.c (af_loader_load_g): Don't reassign `outline.flags' so that this information is preserved. See discussion starting at https://lists.gnu.org/archive/html/freetype-devel/2012-02/msg00046.html 2012-02-11 Werner Lemberg <wl@gnu.org> [truetype] Fix Savannah bug #35466. Jump instructions are now bound to the current function. The MS Windows rasterizer behaves the same, as confirmed by Greg Hitchcock. * src/truetype/ttinterp.h (TT_CallRec): Add `Cur_End' element. * src/truetype/ttobjs.h (TT_DefRecord): Add `end' element. * src/truetype/ttinterp.c (DO_JROT, DO_JMPR, DO_JROF): Check upper bound of jump address. (Ins_FDEF, Ins_CALL, Ins_LOOPCALL, Ins_UNKNOWN, TT_RunIns): Updated. 2012-02-11 Werner Lemberg <wl@gnu.org> We don't use `extensions'. * include/freetype/internal/ftobjs.h (FT_DriverRec): Remove `extensions' field. 2012-02-11 Werner Lemberg <wl@gnu.org> Clean up `generic' fields. * include/freetype/internal/ftobjs.h (FT_ModuleRec, FT_LibraryRec): Remove `generic' field since users can't access it. * src/base/ftobjs.c (FT_Done_GlyphSlot): Call `generic.finalizer' as advertised in the documentation of FT_Generic. (Destroy_Module, FT_Done_Library): Updated to changes in `ftobjs.h'. 2012-02-07 Werner Lemberg <wl@gnu.org> [autofit] Harmonize function arguments. * src/autofit/afloader.c, src/autofit/afloader.h: Use `FT_Int32' for `load_flags'. 2012-02-07 Werner Lemberg <wl@gnu.org> * src/cff/cffobjs.c (cff_face_init): Remove unnecessary casts. 2012-01-17 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [gxvalid] Fix Savannah bug #35286. Patch submitted by anonymous reporter. * src/gxvalid/gxvcommn.c (gxv_XStateTable_subtable_setup): gxv_set_length_by_ulong_offset() must be called with 3, not 4, the number of the subtables in the state tables; classTable, stateArray, entryTable. 2012-01-17 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [raccess] Modify for PIC build. Based on the patch provided by Erik Dahlstrom <ed@opera.com>, https://lists.gnu.org/archive/html/freetype-devel/2012-01/msg00010.html Also `raccess_guess_table[]' and `raccess_rule_by_darwin_vfs()' are renamed with `ft_' suffixes. * src/base/ftbase.h: `raccess_rule_by_darwin_vfs()' is renamed to `ft_raccess_rule_by_darwin_vfs()'. * src/base/ftobjs.c: Ditto. * src/base/ftrfork.c: Declarations of FT_RFork_Rule, raccess_guess_rec, are moved to... * include/freetype/internal/ftrfork.h: Here. * include/freetype/internal/ftrfork.h: FT_RFORK_RULE_ARRAY_{BEGIN,ENTRY,END} macros are defined to replace raccess_guess_table[] in both of PIC and non-PIC modes. * src/base/ftrfork.c: raccess_guess_table[] array is rewritten by FT_RFORK_RULE_ARRAY_{BEGIN,ENTRY,END}. * src/base/basepic.h (BasePIC): Add `ft_raccess_guess_table' storage. (FT_RACCESS_GUESS_TABLE_GET): New macro to retrieve the function pointer from `ft_raccess_guess_table' storage in `BasePIC' structure. * src/base/ftrfork.c (FT_Raccess_Guess): Rewritten with FT_RACCESS_GUESS_TABLE_GET. (raccess_get_rule_type_from_rule_index): Add `library' as the first argument to the function, to retrieve the storage of `ft_raccess_guess_table' from it. Also `raccess_guess_table' is replaced by FT_RACCESS_GUESS_TABLE_GET. (ft_raccess_rule_by_darwin_vfs): Ditto. 2012-01-16 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Remove trailing spaces. 2012-01-16 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Formatting PIC related sources. * src/autofit/afpic.c: Harmonize to FT2 coding conventions. * src/base/basepic.c: Ditto. * src/base/ftpic.c: Ditto. * src/cff/cffpic.c: Ditto. * src/pshinter/pshpic.c: Ditto. * src/psnames/pspic.c: Ditto. * src/raster/rastpic.c: Ditto. * src/sfnt/sfntpic.c: Ditto. * src/smooth/ftspic.c: Ditto. * src/truetype/ttpic.c: Ditto. 2012-01-16 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [autofit] Fix the inclusion of `aflatin2.h' in PIC file. * src/autofit/afpic.c: Include `aflatin2.h' when FT_OPTION_AUTOFIT2 is defined, as afglobal.c does so. Unconditionally inclusion causes declared but unimplemented warning by GCC 4.6. 2012-01-16 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [cff] Remove redundant declarations of cff_cmap_XXX_class_rec. * src/cff/cffpic.c: The declarations of FT_Init_Class_cff_cmap_encoding_class_rec() and FT_Init_Class_cff_cmap_unicode_class_rec() are removed. They can be obtained by the inclusion of cffcmap.h. cffcmap.h invokes FT_DECLARE_CMAP_CLASS() and it declares FT_Init_Class_cff_cmap_encoding_class_rec() etc in PIC mode. 2012-01-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Fix redundant declaration warning in PIC mode. Originally FT_DEFINE_{DRIVER,MODULE,RENDERER}() macros were designed to declare xxx_pic_{free,init} by themselves. Because these macros are used at the end of the module interface (e.g. ttdriver.c) and the wrapper source to build a module as a single object (e.g. truetype.c) includes the PIC file (e.g. ttpic.c) before the module interface, these macros are expanded AFTER xxx_pic_{free,init} body when the modules are built as single object. The declaration after the implementation causes the redundant declaration warnings, so the declarations are moved to module PIC headers (e.g. ttpic.h). Separating to other header files are needed for multi build. * include/freetype/internal/ftdriver.h (FT_DEFINE_DRIVER): Remove class_##_pic_free and class_##_pic_init declarations. * include/freetype/internal/ftobjs.h (FT_DEFINE_RENDERER, FT_DEFINE_MODULE): Ditto. * src/base/basepic.h: Insert a comment and fix coding style. * src/autofit/afpic.h: Declare autofit_module_class_pic_{free, init}. * src/cff/cffpic.h: Declare cff_driver_class_pic_{free,init}. * src/pshinter/pshpic.h: Declare pshinter_module_class_pic_{free, init}. * src/psnames/pspic.h: Declare psnames_module_class_pic_{free, init}. * src/raster/rastpic.h: Declare ft_raster{1,5}_renderer_class_pic_{free,init} * src/sfnt/sfntpic.h: Declare sfnt_module_class_pic_{free,init}. * src/smooth/ftspic.h: Declare ft_smooth_{,lcd_,lcdv_}renderer_class_pic_{free,init}. * src/truetype/ttpic.h: Declare tt_driver_class_pic_{free,init}. 2012-01-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Make pspic.c to include module error header to fix multi build. * src/psnames/pspic.c: Include `psnamerr.h'. 2012-01-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [base] Fix a dereference of uninitialized variable in PIC mode. * src/base/ftglyph.c (FT_Glyph_To_Bitmap): `glyph' must be set before dereferring to obtain `library'. The initialization of `clazz', `glyph', `library' and NULL pointer check are reordered to minimize PIC conditionals. 2012-01-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [base] Insert explicit cast for GCC 4.6 in PIC mode. * src/base/ftinit.c (FT_Add_Default_Modules): Under PIC configuration, FT_DEFAULT_MODULES_GET returns FT_Module_Class** pointer, GCC 4.6 warns that const FT_Module_Class* const* variable is warned as inappropriate to store it. To calm it, explicit cast is inserted. Also `library' is checked to prevent the NULL pointer dereference in FT_DEFAULT_MODULES_GET. 2012-01-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Fix PIC build broken by d9145241fe378104ba4c12a42534549faacc92e6. Under PIC configuration, FT_{CFF,PSCMAPS,SFNT,TT}_SERVICES_GET take no arguments but derefer the variable named `library' internally. * src/cff/cffdrivr.c (cff_get_interface): Declare `library' and set it if non-NULL driver is passed. * src/truetype/ttdriver.c (tt_get_interface): Ditto. * src/sfnt/sfdriver.c (sfnt_get_interface): Declare `library' under PIC configuration, and set it if non-NULL module is given. * src/psnames/psmodule.c (psnames_get_interface): Ditto. 2012-01-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Make PIC files include module error headers, to use the error codes with per-module prefix. * src/autofit/afpic.c: Include `aferrors.h'. * src/cff/cffpic.c: Include `cfferrs.h'. * src/pshinter/pshpic.c: Include `pshnterr.h'. * src/raster/rastpic.c: Include `rasterrs.h'. * src/sfnt/sfntpic.c: Include `sferrors.h'. * src/smooth/ftspic.c: Include `ftsmerrs.h'. * src/truetype/ttpic.c: Include `tterrors.h'. 2012-01-04 Tobias Ringström <tobias@ringis.se> [truetype] Fix IP instruction if x_ppem != y_ppem. * src/truetype/ttinterp.c (Ins_IP): Scale `orus' coordinates properly. 2012-01-02 Werner Lemberg <wl@gnu.org> Fix tracing message for `loca' table. * src/truetype/ttpload.c (tt_face_get_location): Don't emit a warning message if the last `loca' entry references an empty glyph. 2011-12-10 Werner Lemberg <wl@gnu.org> Add some variable initializations. Reported by Richard COOK <rscook@unicode.org>. * src/type1/t1driver.c (t1_ps_get_font_value): Initialize `val'. * src/smooth/ftgrays.c (gray_render_conic): Initialize `levels' earlier. 2011-12-08 Werner Lemberg <wl@gnu.org> Fix serious scaling bug in `FT_Get_Advances'. * src/base/ftadvanc.c (FT_Get_Advances): Advance values returned by `FT_Load_Glyph' must be simply multiplied by 1024. 2011-12-08 Werner Lemberg <wl@gnu.org> * src/bdf/bdflib.c (_bdf_parse_start): Drop redundant error tracing. 2011-12-02 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [mac] Unify DARWIN_NO_CARBON with FT_MACINTOSH. Originally FT_MACINTOSH was a pure auto macro and DARWIN_NO_CARBON was a configurable macro to disable Carbon-dependent code. Because now configure script sets DARWIN_NO_CARBON by default and disables Darwin & Carbon-dependent codes, these macros can be unified. FT_MACINTOSH (undefined by default) is kept and DARWIN_NO_CARBON (defined by default) is removed, because DARWIN_NO_CARBON violates FT_XXX naming convention of public macros, and a macro configured by default is not portable for the building without configure (e.g. make devel). * builds/unix/configure.raw: Define FT_MACINTOSH if Carbon-based old Mac font support is requested and Carbon is available. * builds/unix/ftconfig.in: Undefine FT_MACINTOSH when the support for Mac OS X without Carbon (e.g. Mac OS X 10.4 for ppc64) is requested. * include/freetype/config/ftconfig.in: Ditto. * builds/vms/ftconfig.h: Ditto. * src/base/ftbase.h: Remove DARWIN_NO_CARBON. * src/base/ftbase.c: Ditto. * src/base/ftobjs.c: Ditto. * src/base/ftrfork.c: Ditto. * src/base/ftmac.c: Compile the body if FT_MACINTOSH is defined (same with TT_USE_BYTECODE_INTERPRETER in ttinterp.c). * builds/mac/ftmac.c: Ditto. * builds/mac/FreeType.m68k_cfm.make.txt: Define FT_MACINTOSH. * builds/mac/FreeType.m68k_far.make.txt: Ditto. * builds/mac/FreeType.ppc_classic.make.txt: Ditto. * builds/mac/FreeType.ppc_carbon.make.txt: Ditto. 2011-11-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Fix Savannah bug #34728 (`make devel' on Mac OS X). * builds/toplevel.mk: Check `/dev/null' to identify the Unix- like systems without `init' nor `hurd' (e.g. Mac OS X >= 10.4). * builds/unix/detect.mk: Ditto. 2011-11-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [apinames] Fix the overflow of signed integer hash. * src/tools/apinames.c (names_add): Change the type of `h' from int to unsigned int, to prevent undefined behaviour in the overflow of signed integers (overflow of unsigned int is defined to be wrap around). Found by clang test suggested by Sean McBride. 2011-11-30 Werner Lemberg <wl@gnu.org> [winfonts] Remove casts. * src/winfonts/winfnt.c (winfnt_driver_class): Remove all casts and update affected functions. (FNT_Size_Select): Fix number of arguments. 2011-11-30 Werner Lemberg <wl@gnu.org> [type42] Remove casts. * src/type42/t42drivr.c (t42_driver_class): Remove all casts and update affected functions. * src/type42/t42objs.c, src/type42/t42objs.h: Updated for t42 driver changes. 2011-11-30 Werner Lemberg <wl@gnu.org> [type1] Remove casts. * src/type1/t1driver.c (t1_driver_class): Remove all casts and update affected functions. * src/type1/t1gload.c, src/type1/t1gload.h, src/type1/t1objs.c: Updated for t1driver changes. src/type1/t1objs.h (T1_Driver): Remove unused typedef. Updated for t1driver changes. 2011-11-27 Werner Lemberg <wl@gnu.org> [bdf] Fix Savannah bug #34896. ENCODING now covers the whole Unicode range. Note, however, that this change is quite expensive since it increases the size of three arrays by almost 400kByte in total. The right fix is to replace the logic with something smarter. Additionally, there exist very old BDFs for three-byte CCCII encoding which exceeds the range of Unicode (another reason to have a smarter logic). * src/bdf/bdf.h (bdf_font_t): Increase size of `nmod' and `umod' arrays. * src/bdf/bdflib.c (bdf_parse_t): Increase size of `have' array. 2011-11-27 Werner Lemberg <wl@gnu.org> [bdf] Improve tracing. * src/bdf/bdflib.c (DBGMSG1, DBGMSG2): New macros. (_bdf_parse_glyphs): Use them. 2011-11-26 Werner Lemberg <wl@gnu.org> Improve tracing. * src/bdf/bdfdrivr.c (BDF_Face_Done), src/pcf/pcfdrivr.c (PCF_Face_Done): Remove tracing message. * src/bdf/bdfdrivr.c (BDF_Face_Init), src/cff/cffobjs.c (cff_face_init), src/cid/cidobjs.c (cid_face_init), src/pfr/pfrobjs.c (pfr_face_init), src/sfnt/sfobjs.c (sfnt_init_face), src/truetype/ttobjs.c (tt_face_init), src/type1/t1objs.c (T1_Face_Init), src/type42/t42objs.c (T42_Face_Init), src/winfonts/winfnt.c (FNT_Face_Init): Add `greeting' message. * src/sfnt/sfobjs.c (sfnt_open_font), src/type42/t42objs.c (T42_Open_Face): Improve tracing. 2011-11-26 Werner Lemberg <wl@gnu.org> [cid] Fix error code. * src/cid/cidparse.c (cid_parser_new): Do it. 2011-11-26 Werner Lemberg <wl@gnu.org> [cff] Fix error code. * src/cff/cffload.c (cff_font_load): Do it. 2011-11-26 Werner Lemberg <wl@gnu.org> Add new error code FT_Err_Missing_Module. Previously, FreeType misleadingly returned FT_Err_Unknown_File_Format if a module was missing (or a test was missing completely). * include/freetype/fterrdef.h (FT_Err_Missing_Module): Define. * src/cff/cffobjs.c (cff_face_init), src/cff/cffdrivr.c (cff_get_glyph_name), src/cid/cidobjs.c (cid_face_init), src/sfnt/sfobjs.c (sfnt_init_face), src/truetype/ttobjs.c (tt_face_init), src/type1/t1objs.c (T1_Face_Init), src/type42/t42objs.c (T42_Face_Init, T42_Driver_Init): Updated. * src/type1/t1afm.c (T1_Read_Metrics), src/type/t1objs.c (T1_Face_Init), src/type42/t42objs.c (T42_Face_Init): Remove now redundant test for `psaux'. 2011-11-25 Werner Lemberg <wl@gnu.org> [bdf] Add more error messages. * src/bdf/bdflib.c (_bdf_set_default_spacing, _bdf_add_property): Add line number argument. Update all callers. (ERRMSG5, ERRMSG6, ERRMSG7, ERRMSG8, ERRMSG9): New macros. (_bdf_readstream, _bdf_set_default_spacing, _bdf_add_property, _bdf_parse_glyphs, _bdf_parse_start): Add error messages. 2011-11-24 Werner Lemberg <wl@gnu.org> * include/freetype/fterrors.h: Remove dead code. 2011-11-15 Werner Lemberg <wl@gnu.org> * docs/releases: Updated. 2011-11-15 Werner Lemberg <wl@gnu.org> * Version 2.4.8 released. ========================= Tag sources with `VER-2-4-8'. * docs/CHANGES: Updated. * docs/VERSION.DLL: Update documentation and bump version number to 2.4.8. * README, Jamfile (RefDoc), builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html, builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html, builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html, builds/win32/visualc/freetype.dsp, builds/win32/visualc/freetype.vcproj, builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp, builds/win32/visualce/freetype.vcproj, builds/win32/visualce/index.html, builds/wince/vc2005-ce/freetype.vcproj, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/freetype.vcproj, builds/wince/vc2008-ce/index.html: s/2.4.7/2.4.8/, s/247/248/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 8. * builds/unix/configure.raw (version_info): Set to 14:0:8. 2011-11-13 Chris Liddell <chris.liddell@artifex.com> Add FT_Get_PS_Font_Value() API. This allows a Type 1 font face to be interrogated to retrieve most of the dictionary keys (keys not relevant to FreeType's Type 1 interpreter are not available). * include/freetype/internal/services/svpsinfo.h (PS_GetFontValueFunc): New typedef. (PSInfo): Add `ps_get_font_value'. (FT_DEFINE_SERVICE_PSINFOREC): Updated. * include/freetype/internal/t1types.h (T1_EncodingType): Moved to... * include/freetype/t1tables.h: Here. (PS_Dict_Keys): New enumeration. (FT_Get_PS_Font_Value): New declaration. * src/base/fttype1.c (FT_Get_PS_Font_Value): New function. * src/type1/t1driver.c (t1_ps_get_font_value): This new function does the real job. (t1_service_ps_info): Add it. * src/cff/cffdrivr.c (cff_service_ps_info), src/cid/cidriver.c (cid_service_ps_info), src/type42/t42drivr.c (t42_service_ps_info): Updated. 2011-11-08 Braden Thomas <bthomas@apple.com> [cid] Various loading fixes. * src/cid/cidload.c (cid_load_keyword) <default>, (parse_font_matrix, parse_expansion_factor): Correctly check number of dictionaries. (cid_read_subrs): Protect against invalid values of `num_subrs'. Assure that the elements of the `offsets' array are ascending. 2011-11-05 Werner Lemberg <wl@gnu.org> * README: We use copyright ranges also. According to https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html this should be mentioned explicitly. 2011-10-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [raccess] Supplement for previous fix. * src/base/ftbase.h (raccess_rule_by_darwin_vfs): Do not declare it on native Mac OS X. * src/base/ftrfork.c (raccess_get_rule_type_from_rule_index): Hide raccess_get_rule_type_from_rule_index() on native Mac OS X too. 2011-10-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [raccess] Hide raccess_rule_by_darwin_vfs() on native Mac OS X. * src/base/ftrfork.c (raccess_rule_by_darwin_vfs): Do not compile on native Mac OS X because it is not used. 2011-10-25 Werner Lemberg <wl@gnu.org> [truetype] Fix MD instruction for twilight zone. * src/truetype/ttinterp.c (Ins_MD): Without this fix, the MD instruction applied to original coordinates of twilight points always returns zero. 2011-10-18 Werner Lemberg <wl@gnu.org> * Version 2.4.7 released. ========================= Tag sources with `VER-2-4-7'. * docs/CHANGES: Updated. * docs/VERSION.DLL: Update documentation and bump version number to 2.4.7. * README, Jamfile (RefDoc), builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html, builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html, builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html, builds/win32/visualc/freetype.dsp, builds/win32/visualc/freetype.vcproj, builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp, builds/win32/visualce/freetype.vcproj, builds/win32/visualce/index.html, builds/wince/vc2005-ce/freetype.vcproj, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/freetype.vcproj, builds/wince/vc2008-ce/index.html: s/2.4.6/2.4.7/, s/246/247/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 7. * builds/unix/configure.raw (version_info): Set to 13:2:7. 2011-10-15 Kal Conley <kcconley@gmail.com> Fix handling of transformations if no renderer is present. * src/base/ftobjs.c (FT_Load_Glyph): Thinko. 2011-10-15 Kal Conley <kcconley@gmail.com> Fix conditions for autohinting. * src/base/ftobjs.c (FT_Load_Glyph): Handle FT_LOAD_IGNORE_TRANSFORM. 2011-10-07 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [gxvalid] Fix a bug to detect too large offset in morx table. * src/gxvalid/gxvmorx2.c (gxv_morx_subtable_type2_ligActionIndex_validate): Fix a bug that too large positive offset cannot be detected. 2011-10-01 Braden Thomas <bthomas@apple.com> Handle some border cases. * include/freetype/config/ftstdlib.h (FT_USHORT_MAX): New macro. * src/base/ftbitmap.c (FT_Bitmap_Convert): Protect against invalid value of `target->rows'. * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Add check for flex start. * src/raster/ftrend1.c (ft_raster1_render): Check `width' and `height'. * src/truetype/ttgxvar.c (TT_Vary_Get_Glyph_Deltas): Protect against invalid values in `localpoints' array. 2011-10-01 Werner Lemberg <wl@gnu.org> [psnames] Handle zapfdingbats. Problem reported by Nicolas Rougier <Nicolas.Rougier@inria.fr>. * src/tools/glnames.py (adobe_glyph_list): Add data from AGL's `zapfdingbats.txt' file. * src/psnames/pstables.h: Regenerated. 2011-09-27 Simon Bünzli <zeniko@gmail.com> [type1] Fix Savannah bug #34189. * src/type1/t1load.c (T1_Open_Face): Initialize `face->len_buildchar'. 2011-09-26 Werner Lemberg <wl@gnu.org> [cff] Dump SIDs while tracing. * src/cff/cffobjs.c (cff_face_init): Do it. * src/cff/cffparse.c (cff_parser_run) [FT_DEBUG_LEVEL_TRACE] <cff_kind_string>: Identify as SID. 2011-09-17 Werner Lemberg <wl@gnu.org> Remove unused FT_ALIGNMENT macro. * builds/unix/ftconfig.in, builds/vms/ftconfig.h, include/freetype/config/ftconfig.h: Do it. 2011-09-17 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Slightly optimize conic and cubic flatteners. * src/smooth/ftgrays.c (gray_render_conic, gray_render_cubic): Move out some code from the main loop to speed it up. 2011-09-11 Tomas Hoger <thoger@redhat.com> Slightly improve LZW_CLEAR handling. * src/lzw/ftzopen.c (ft_lzwstate_io) <FT_LZW_PHASE_CODE>: Ensure that subsequent (modulo garbage byte(s)) LZW_CLEAR codes are handled as clear codes. This also re-sets old_code and old_char to predictable values, which is a little better than using `random' ones if the code following LZW_CLEAR is invalid. 2011-09-11 Tomas Hoger <thoger@redhat.com> Add explicit LZW decompression stack size limit. Stack larger than 1<<LZW_MAX_BITS is never needed if prefix table is constructed correctly. It's even less than that, see e.g. libarchive code comment for a better size upper bound: http://code.google.com/p/libarchive/source/browse/trunk/libarchive/archive_read_support_filter_compress.c?r=3635#121 This patch adds explicit stack size limit, enforced when stack is realloced. An alternative is to ensure that code < state->prefix[code - 256] when traversing prefix table. Such check is less efficient and should not be required if prefix table is constructed correctly in the first place. * src/lzw/ftzopen.c (ft_lzwstate_stack_grow): Implement it. 2011-09-11 Tomas Hoger <thoger@redhat.com> Protect against loops in the prefix table. LZW decompressor did not sufficiently check codes read from the input LZW stream. A specially-crafted or corrupted input could create a loop in the prefix table, which leads to memory usage spikes, as there's no decompression stack size limit. * src/lzw/ftzopen.c (ft_lzwstate_io) <FT_LZW_PHASE_START>: First code in valid LZW stream must be 0..255. <FT_LZW_PHASE_CODE>: In the special KwKwK case, code == free_ent, code > free_ent is invalid. 2011-09-09 Werner Lemberg <wl@gnu.org> Better tracing of metrics. * src/base/ftobjs.c (FT_Request_Size, FT_Select_Size): Decorate with FT_TRACE. 2011-09-07 Werner Lemberg <wl@gnu.org> [cff] Fix Savannah bug #33816. * src/cff/cfftypes.h (CFF_FontRecDictRec): New member `has_font_matrix'. * src/cff/cffparse.c (cff_parse_font_matrix): Set it. Update tracing output. * src/cff/cffobjs.c (cff_face_init): Use it so that the heuristics can be removed. 2011-08-30 Werner Lemberg <wl@gnu.org> Better tracing of metrics. * src/base/ftobjs.c (FT_Select_Metrics, FT_Request_Metrics): Decorate with FT_TRACE. 2011-08-25 Werner Lemberg <wl@gnu.org> [cff] Better tracing of the parsing process. * src/cff/cffload.c (cff_subfont_load, cff_font_load): Decorate with FT_TRACE. * src/cff/cffparse.c (cff_parse_font_matrix, cff_parse_font_bbox, cff_parse_private_dict, cff_parse_cid_ros): Updated. (CFF_FIELD_NUM, CFF_FIELD_FIXED, CFF_FIELD_FIXED_1000, CFF_FIELD_STRING, CFF_FIELD_BOOL, CFF_FIELD_CALLBACK, CFF_FIELD, CFF_FIELD_DELTA): Add argument for ID. (cff_parser_run): Decorate with FT_TRACE. * src/cff/cffparse.h (CFF_Field_Handler) [FT_DEBUG_LEVEL_TRACE]: Add `id' member. * src/cff/cfftoken.h: Add IDs to all fields. 2011-08-16 Werner Lemberg <wl@gnu.org> Fix Savannah bug #34022. * README, docs/INSTALL: Remove references to UPGRADE.UNIX. 2011-08-15 Werner Lemberg <wl@gnu.org> Fix Savannah bug #34018. * docs/UPGRADE.UNIX: Removed. Obsolete. 2011-08-15 David Bevan <david.bevan@pb.com> Fix Savannah bug #33992. * src/base/ftstroke.c (FT_Stroker_ParseOutline): Fix border case. 2011-08-12 Werner Lemberg <wl@gnu.org [truetype] Fix degenerate case in S{P,F,DP}VTL opcodes. * src/truetype/ttinterp.c (Ins_SxVTL): Handle p1 == p2 specially. (Ins_SDPVTL): Handle v1 == v2 specially. 2011-08-09 Werner Lemberg <wl@gnu.org> [cff] Fix Savannah bug #33975. * src/cff/cffparse.c (cff_parse_font_matrix): Fix typo. 2011-07-29 Werner Lemberg <wl@gnu.org> * Version 2.4.6 released. ========================= Tag sources with `VER-2-4-6'. * docs/CHANGES: Updated. * docs/VERSION.DLL: Update documentation and bump version number to 2.4.6. * README, Jamfile (RefDoc), builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html, builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html, builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html, builds/win32/visualc/freetype.dsp, builds/win32/visualc/freetype.vcproj, builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp, builds/win32/visualce/freetype.vcproj, builds/win32/visualce/index.html, builds/wince/vc2005-ce/freetype.vcproj, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/freetype.vcproj, builds/wince/vc2008-ce/index.html: s/2.4.5/2.4.6/, s/245/246/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 6. * builds/unix/configure.raw (version_info): Set to 13:1:7. 2011-07-29 Werner Lemberg <wl@gnu.org> [cff] Add some more tracing infos. * src/cff/cffparse.c (cff_parse_font_matrix, cff_parse_font_bbox, cff_parse_cid_ros): Add tracing. 2011-07-22 Dirk Müller <dmueller@suse.de> [psaux, type1] Fix null pointer dereferences. Found with font fuzzying. * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Check `decoder->buildchar'. * src/type1/t1load.c (t1_load_keyword): Check `blend->num_designs'. 2011-07-20 Chris Morgan <cmorgan@cybexintl.com> Add FT_CONFIG_OPTION_DISABLE_STREAM_SUPPORT. Useful for embedded systems which don't need file stream support. * src/base/ftsystem.c, src/base/ftobjs.c (FT_Stream_New): Implement it. 2011-07-20 Elton Chung <elton328@gmail.com> * src/base/ftpatent.c (FT_Face_SetUnpatentedHinting): Fix typo. 2011-07-16 Steven Chu <steven.f.chu@gmail.com> [truetype] Fix metrics on size request for scalable fonts. * src/truetype/ttdriver.c (tt_size_request): Fix copying metrics from TT_Size to FT_Size if scalable font. See https://lists.gnu.org/archive/html/freetype-devel/2011-07/msg00049.html for some comparison images. 2011-07-14 Matthias Drochner <M.Drochner@fz-juelich.de>. [psaux] Fix potential sign extension problems. When shifting right a signed value, it is not defined by the C standard whether one gets a sign extension or not. Use a macro to do an explicit cast from a signed short (assuming that this is 16bit) to an int. * src/psaux/t1decode.c (Fix2Int): New macro. Use it where appropriate. 2011-07-14 Werner Lemberg <wl@gnu.org> * src/psaux/t1decode.c (t1_decoder_parse_charstrings) <op_callothersubr>: Better handling of subroutine index 0. From Matthias Drochner <M.Drochner@fz-juelich.de>. 2011-07-10 Алексей Подтележников <apodtele@gmail.com> [psaux] Optimize previous commit. * src/psaux/t1decode.c (t1_decoder_parse_charstrings) <op_callothersubr>: Move error check down to avoid testing twice for good cases. 2011-07-08 Werner Lemberg <wl@gnu.org> [psaux] Add better argument check for `callothersubr'. * src/psaux/t1decode.c (t1_decoder_parse_charstrings) <op_callothersubr>: Reject negative arguments. 2011-07-07 Werner Lemberg <wl@gnu.org> [sfnt] Try harder to find non-zero values for ascender and descender. * src/sfnt/sfobjs.c (sfnt_load_face): Consult `OS/2' table in case the `hhea' table's values are zero. 2011-07-03 Werner Lemberg <wl@gnu.org> Fix previous commit. We want to unset FT_FACE_FLAG_SCALABLE only if there are bitmap strikes in the font. * src/truetype/ttobjs.c (tt_face_init): Implement it. * docs/CHANGES: Updated. 2011-07-02 Just Fill Bugs <mozbugbox@yahoo.com.au> [truetype] Fix Savannah bug #33246. * src/truetype/ttobjs.c (tt_check_single_notdef): New function. (tt_face_init): Use it to test FT_FACE_FLAG_SCALABLE. 2011-07-02 Werner Lemberg <wl@gnu.org> * docs/CHANGES: Updated. 2011-07-02 David Bevan <david.bevan@pb.com> [ftstroke] Major revision. The main problems ----------------- o If FT_STROKER_LINEJOIN_BEVEL was specified, unlimited miter joins (not bevel joins) were generated. Indeed, the meanings of `miter' and `bevel' were incorrectly reversed (consistently) in both the code and comments. o The way bevel joins were constructed (whether specified explicitly, or created as a result of exceeding the miter limit) did not match what is required for stroked text in PostScript or PDF. The main fixes -------------- o The behaviour of FT_STROKER_LINEJOIN_BEVEL has been corrected. o A new line join style, FT_STROKER_LINEJOIN_MITER_FIXED, has been introduced to support PostScript and PDF miter joins. o FT_STROKER_LINEJOIN_MITER_VARIABLE has been introduced as an alias for FT_STROKER_LINEJOIN_MITER. Additionally, a variety of stroking errors have been fixed. These would cause various artifacts (including points `at infinity'), especially when stroking poor quality fonts. See https://lists.gnu.org/archive/html/freetype-devel/2011-07/msg00001.html for example documents. The FreeType stroker now produces results very similar to that produced by GhostScript and Distiller for these fonts. Other problems -------------- The following problems have been resolved: o Inside corners could be generated incorrectly. Intersecting the inside corner could cause a missing triangular area and other effects. The intersection point can only be used if the join is between two lines and both lines are long enough. The `optimization' condition in `ft_stroker_inside' has been corrected; this requires the line length to be passed into various functions and stored in `FT_StrokerRec'. o Incorrect cubic curves could be generated. The angle calculations in `FT_Stroker_CubicTo' have been corrected to handle the case of the curve crossing the +/-PI direction. o If the border radius was greater than the radius of curvature of a curve, then the negative sector would end up outside (not inside) the border. This situation is now recognized and the negative sector is circumnavigated in the opposite direction. (If round line joins are being used, this code is disabled because the line join will always cover the negative sector.) o When a curve is split, the arcs may not join smoothly (especially if the curve turns sharply back on itself). Changes in direction between adjacent arcs were not handled. A round corner is now added if the deviation from one arc to the next is greater than a suitable threshold. o The current direction wasn't retained if a the outline contained a zero length lineto or a curve that was determined to be `basically a point'. This could cause a spurious join to be added. o Cubics with close control points could be mishandled. All eight cases are now distinguished correctly. Other improvements ------------------ o Borders for cubic curves could be too `flat'. FT_SMALL_CUBIC_THRESHOLD has been reduced a little to prevent this. o The handling and use of movable points has been simplified a little. o Various values are now computed only if the results are actually needed. o The directions of the outer and inner borders have been swapped, as recommended by Graham Asher. * src/base/ftstroke.c: Revised. * include/freetype/ftstroke.h: Updated. 2011-06-30 İsmail Dönmez <ismail@namtrac.org> * builds/toplevel.mk: We use git, not CVS, thus skip `.gitignore'. 2011-06-29 Werner Lemberg <wl@gnu.org> [bdf] Fix Savannah bug #33663. * src/bdf/bdflib.c (_bdf_parse_glyphs): Handle negative values for ENCODING correctly. * docs/CHANGES: Document it. 2011-06-24 Werner Lemberg <wl@gnu.org> * Version 2.4.5 released. ========================= Tag sources with `VER-2-4-5'. * docs/CHANGES: Updated. * docs/VERSION.DLL: Update documentation and bump version number to 2.4.5 * README, Jamfile (RefDoc), builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html, builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html, builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html, builds/win32/visualc/freetype.dsp, builds/win32/visualc/freetype.vcproj, builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp, builds/win32/visualce/freetype.vcproj, builds/win32/visualce/index.html, builds/wince/vc2005-ce/freetype.vcproj, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/freetype.vcproj, builds/wince/vc2008-ce/index.html: s/2.4.4/2.4.5/, s/244/245/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 5. * builds/unix/configure.raw (version_info): Set to 13:0:7. 2011-06-20 Werner Lemberg <wl@gnu.org> * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Fix change from 2011-05-04. 2011-06-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [gxvalid] make the `prop' validation tracing verbose. * src/gxvalid/gxvprop.c: Add tracing messages for errors. 2011-06-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [autogen.sh] Reflect environment variable LIBTOOLIZE. 2011-06-18 Werner Lemberg <wl@gnu.org> Update license documentation. * docs/GPL.TXT: Renamed to... * docs/GPLv2.TXT: This. * docs/LICENSE.TXT: Updated. 2011-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Fix g++4.6 compiler warnings in module drivers. The background is same with previous commit. * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Init `points'. (TT_Vary_Get_Glyph_Deltas): Init `delta_xy'. (TT_Get_MM_Var): Init `mmvar'. * src/type1/t1load.c (T1_Get_MM_Var): Ditto. * src/cff/cffdrivr.c (cff_ps_get_font_info): Init `font_info'. * src/cff/cffload.c (cff_index_get_pointers): Init `t'. (cff_font_load): Init `sub'. * src/cff/cffobjs.c (cff_size_init): Init `internal'. (cff_face_init): Init `cff'. * src/pfr/pfrload.c (pfr_extra_item_load_stem_snaps): Init `snaps'. * src/pcf/pcfread.c (pcf_get_properties): Init `properties'. (pcf_get_bitmaps): Init `offsets'. (pcf_get_encodings): Init `tmpEncoding'. * src/sfnt/ttload.c (tt_face_load_gasp): Init `gaspranges'. * src/sfnt/ttsbit.c (Load_SBit_Image): Init `components'. * src/cache/ftcmru.c (FTC_MruList_New): Init `node'. * src/gzip/ftgzip.c (FT_Stream_OpenGzip): Init `zip' and `zip_buff'. * src/lzw/ftlzw.c (FT_Stream_OpenLZW): Init `zip'. * src/bzip2/ftbzip2.c (FT_Stream_OpenBzip2): Init `zip'. 2011-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [base] Fix g++4.6 compiler warnings in src/base/*.c. Passing uninitialized pointer to FT_NEW() families is not problematic theoretically (as far as the returned pointer is checked before writing), but g++4.6 dislikes it and warns by -Wuninitialized. Initialize them by NULL. * src/base/ftobjs.c (FT_Stream_New): Init `stream'. (new_memory_stream): Ditto. (FT_New_GlyphSlot): Init `slot'. (FT_CMap_New): Init `cmap'. (open_face_PS_from_sfnt_stream): Init `sfnt_ps'. (Mac_Read_POST_Resource): Init `pfb_data'. (Mac_Read_sfnt_Resource): Init `sfnt_data'. * src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Init `offsets_internal' and `ref'. (raccess_guess_darwin_hfsplus): Init `newpath'. (raccess_guess_darwin_newvfs): Ditto. * src/base/ftbitmap.c (ft_bitmap_assure_buffer): Init `buffer'. * src/base/ftstroke.c (FT_Stroker_New): Init `stroker'. 2011-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [gxvalid] Cleanup. Some invalid, overrunning, unrecommended non-zero values are cared in paranoid validation mode only. There are many lines looking like: if ( valid->root->level >= FT_VALIDATE_PARANOID ) FT_INVALID_xxx; To simplify them, GXV_SET_ERR_IF_PARANOID( err ) is introduced for more paranoid validation in future. * src/gxvalid/gxvcommn.h (IS_PARANOID_VALIDATION): New macro to assure valid->root->level is more or equal to FT_VALIDATE_PARANOID. (GXV_SET_ERR_IF_PARANOID): New macro to raise an error if in paranoid validation. * src/gxvalid/gxvcommn.c: Use GXV_SET_ERR_IF_PARANOID(). * src/gxvalid/gxvfeat.c: Ditto. * src/gxvalid/gxvjust.c: Ditto. * src/gxvalid/gxvkern.c: Ditto. * src/gxvalid/gxvmort.c: Ditto. * src/gxvalid/gxvmort0.c: Ditto. * src/gxvalid/gxvmort1.c: Ditto. * src/gxvalid/gxvmort2.c: Ditto. * src/gxvalid/gxvmorx1.c: Ditto. * src/gxvalid/gxvmorx2.c: Ditto. 2011-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [gxvalid] Fix gcc4.6 compiler warnings in gxvtrak.c. * src/gxvalid/gxvtrak.c (gxv_trak_trackTable_validate): Check different entries pointing same tracking value. (gxv_trak_validate): Remove unused variable `table_size'. 2011-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [gxvalid] Fix gcc4.6 compiler warnings in gxvmorx*.c. * src/gxvalid/gxvmorx.c (gxv_morx_subtables_validate): Conditionalize unvalidated variable `subFeatureFlags'. (gxv_morx_chain_validate): Conditionalize unvalidated variable `defaultFlags'. * src/gxvalid/gxvmorx0.c (gxv_morx_subtable_type0_entry_validate): Conditionalize unvalidated variables; `markFirst', `dontAdvance', `markLast', `verb'. * src/gxvalid/gxvmorx1.c (gxv_morx_subtable_type1_entry_validate): Conditionalize unvalidated variables; `setMark', `dontAdvance'. * src/gxvalid/gxvmorx2.c (gxv_morx_subtable_type2_ligActionOffset_validate): Conditionalize unvalidated variables; `last', `store'. Checking for overrunning offset is added. (gxv_morx_subtable_type2_entry_validate): Conditionalize unvalidated variables; `setComponent', `dontAdvance', `performAction'. (gxv_morx_subtable_type2_ligatureTable_validate): Check if the GID for ligature does not exceed the max GID in `maxp' table. * src/gxvalid/gxvmort5.c (gxv_morx_subtable_type5_InsertList_validate): Conditionalize unvalidated loading of `insert_glyphID' array. (gxv_morx_subtable_type5_entry_validate): Conditionalize unvalidated variables; `setMark', `dontAdvance', `currentIsKashidaLike', `markedIsKashidaLike', `currentInsertBefore', `markedInsertBefore'. 2011-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [gxvalid] Fix gcc4.6 compiler warnings in gxvmort*.c. * src/gxvalid/gxvmort.c (gxv_mort_subtables_validate): Conditionalize unvalidated variable `subFeatureFlags'. (gxv_mort_chain_validate): Conditionalize unvalidated variable `defaultFlags'. * src/gxvalid/gxvmort0.c (gxv_mort_subtable_type0_entry_validate): Check the conflict of the marks for the glyphs. * src/gxvalid/gxvmort1.c (gxv_mort_subtable_type1_offset_to_subst_validate): Local variables `min_gid', `max_gid' are replaced by variables in the validator. (gxv_mort_subtable_type1_entry_validate): Conditionalize unvalidated variables; `setMark', `dontAdvance'. (gxv_mort_subtable_type1_substTable_validate): Validate the GID by the min/max GIDs in the validator. * src/gxvalid/gxvmort2.c (gxv_mort_subtable_type2_ligActionOffset_validate): Conditionalize unvalidated variables; `last', `store'. Checking for overrunning offset is added. (gxv_mort_subtable_type2_entry_validate): Conditionalize unvalidated variables; `setComponent', `dontAdvance'. (gxv_mort_subtable_type2_ligatureTable_validate): Check if the GID for ligature does not exceed the max GID in `maxp' table. * src/gxvalid/gxvmort5.c (gxv_mort_subtable_type5_InsertList_validate): Conditionalize unvalidated loading of `insert_glyphID' array. (gxv_mort_subtable_type5_entry_validate): Conditionalize unvalidated variables; `setMark', `dontAdvance', `currentIsKashidaLike', `markedIsKashidaLike', `currentInsertBefore', `markedInsertBefore'. 2011-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [gxvalid] Fix gcc4.6 compiler warnings in gxvkern.c. * src/gxvalid/gxvkern.c (gxv_kern_subtable_fmt0_pairs_validate): Conditionalize unvalidated variable `kernValue'. (gxv_kern_subtable_fmt1_entry_validate): Conditionalize unvalidated variables; `push', `dontAdvance', `kernAction', `kernValue'. (gxv_kern_coverage_new_apple_validate): Conditionalize trace-only variables; `kernVertical', `kernCrossStream', `kernVariation'. (gxv_kern_coverage_classic_apple_validate): Conditionalize trace-only variables; `horizontal', `cross_stream'. (gxv_kern_coverage_classic_microsoft_validate): Conditionalize trace-only variables; `horizontal', `minimum', `cross_stream', `override'. (gxv_kern_subtable_validate): Conditionalize trace-only variables; `version', `tupleIndex'. 2011-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [gxvalid] Fix gcc4.6 compiler warnings in gxvjust.c. * src/gxvalid/gxvjust.c (gxv_just_check_max_gid): New function to unify the checks of too large GID. (gxv_just_wdp_entry_validate): Conditionalize unvalidated variables; `beforeGrowLimit', `beforeShrinkGrowLimit', `afterGrowLimit', `afterShrinkGrowLimit', `growFlags', `shrinkFlags'. Additional check for non-zero values in unused storage `justClass' is added. (gxv_just_actSubrecord_type0_validate): Conditionalize unvalidated variable `order'. GID is checked by gxv_just_check_max_gid(). Additional check for upside-down relationship between `lowerLimit' and `upperLimit' is added. (gxv_just_actSubrecord_type1_validate): GID is checked by gxv_just_check_max_gid(). (gxv_just_actSubrecord_type2_validate): Conditionalize unvalidated variable `substThreshhold'. GID is checked by gxv_just_check_max_gid(). (gxv_just_actSubrecord_type5_validate): GID is checked by gxv_just_check_max_gid(). (gxv_just_classTable_entry_validate): Conditionalize unvalidated variables; `setMark', `dontAdvance', `markClass', `currentClass'. 2011-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [gxvalid] Preparation to fix gcc4.6 compiler warnings. * src/gxvalid/gxvcommn.h (GXV_LOAD_TRACE_VARS): New macro to conditionalize the variable which is only used for trace messages. Automatically set by FT_DEBUG_LEVEL_TRACE. (GXV_LOAD_UNUSED_VARS): New macro to conditionalize the loading of unvalidated variables. Undefined by default to calm gcc4.6 warning. (GXV_ValidatorRec.{min_gid,max_gid}): New variables to hold defined GID ranges, for the comparison of GID ranges in different subtables. 2011-06-08 Werner Lemberg <wl@gnu.org> [autofit] Remove unused structure member. * src/autofit/afhints.h (AF_SegmentRec): Remove `contour'. * src/autofit/aflatin.c (af_latin_hints_compute_segments), src/autofit/aflatin2.c (af_latin2_hints_compute_segments): Updated. 2011-05-30 Werner Lemberg <wl@gnu.org> Fix g++ 4.6 compilation. * src/autofit/afhints.c (af_glyph_hints_dump_segments, af_glyph_hints_dump_edges): Use cast. 2011-05-30 Werner Lemberg <wl@gnu.org> Fix gcc 4.6 compiler warnings. * src/autofit/afcjk.c (af_cjk_metrics_init_blues): Use casts and remove unused variables. * src/autofit/aflatin.c (af_latin_hints_compute_edges): Comment out `up_dir'. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Use `height_org' and `width_org' conditionalized. 2011-05-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [mac] Conditionalize the inclusion of `AvailabilityMacros.h'. The native SDK on earliest Mac OS X (10.0-10.1) did not have `AvailabilityMacros.h'. To prevent the inclusion of missing header file, ECANCELED (introduced in 10.2) in POSIX header file <errno.h> is checked to detect the system version. * include/freetype/config/ftconfig.h: Conditionalize the inclusion of `AvailabilityMacros.h'. * builds/unix/ftconfig.in: Ditto. * builds/vms/ftconfig.h: Ditto. 2011-05-27 Werner Lemberg <wl@gnu.org> [autofit] Improve tracing of hinting process. * src/autofit/aflatin.c (af_latin_hint_edges): Add tracing message `ADJUST'. 2011-05-26 Werner Lemberg <wl@gnu.org> [autofit] Fix trace message. * src/autofit/aflatin.c (af_latin_hint_edges): Show correct value in tracing message. 2011-05-24 Daniel Zimmermann <netzimme@googlemail.com> Reduce warnings for MS Visual Studio 2010. * src/autofit/afhints.c (af_glyph_hints_get_num_segments, af_glyph_hints_get_segment_offset) [!FT_DEBUG_AUTOFIT]: Provide return value. * src/cff/cffgload.c (cff_slot_load): Add cast. * src/truetype/ttobjs.c (tt_check_trickyness_sfnt_ids): Use proper loop variable type. 2011-05-16 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Automake component `builds/unix/install-sh' is removed. * builds/unix/install-sh: Removed. It is not needed to include repository, because autogen.sh installs it. * builds/unix/.gitignore: Register install-sh. 2011-05-12 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [autofit] Make trace message for CJK bluezone more verbose. 2011-05-08 Just Fill Bugs <mozbugbox@yahoo.com.au> suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [autofit] Add bluezones for CJK Ideographs. To remove extrema of vertical strokes of CJK Ideographs at low resolution and make the top and bottom horizontal stems aligned, bluezones for CJK Ideographs are calculated from sample glyphs. At present, vertical bluezones (bluezones to align vertical stems) are disabled by default. For detail, see https://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00070.html https://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00092.html https://lists.gnu.org/archive/html/freetype-devel/2011-05/msg00001.html * include/freetype/internal/fttrace.h: New trace component `afcjk'. * src/autofit/afcjk.h (AF_CJK{Blue,Axis,Metric}Rec): Add CJK version for AF_Latin{Blue,Axis,Metric}Rec. (af_cjk_metrics_check_digits): Ditto, shared with Indic module. (af_cjk_metrics_init_widths): Ditto. (af_cjk_metrics_init): Take AF_CJKMetric instead of AF_LatinMetric. (af_cjk_metrics_scale): Ditto (declaration). (af_cjk_hints_init): Ditto (declaration). (af_cjk_hints_apply): Ditto (declaration). * src/autofit/afcjk.c (af_cjk_metrics_scale): Ditto (body). (af_cjk_hints_init): Ditto (body). (af_cjk_hints_apply): Ditto (body). (af_cjk_metrics_init_widths): Duplicate af_latin_metrics_init_widths. (af_cjk_metrics_check_digits): Duplicate af_latin_metrics_check_digits. (af_cjk_metrics_init): Call CJK bluezone initializer. (af_cjk_metrics_scale_dim): Add code to scale bluezones. (af_cjk_hints_compute_blue_edges): New function, CJK version of af_latin_hints_compute_blue_edges. (af_cjk_metrics_init_blues): New function, CJK version of af_latin_metrics_init_blues. (af_cjk_hint_edges): Add code to align the edge stems to blue zones. * src/autofit/afindic.c (af_indic_metrics_init): Take AF_CJKMetric instead of AF_LatinMetric, and initialize as af_cjk_metrics_init. However bluezones are not initialized. (af_indic_metrics_scale): Take AF_CJKMetric instead of AF_LatinMetric. (af_indic_hints_init): Ditto. (af_indic_hints_apply): Ditto. * docs/CHANGES: Note about CJK bluezone support. 2011-05-06 Werner Lemberg <wl@gnu.org> [autofit] Remove unused struct member. * src/autofit/aflatin.h (AF_LatinAxis): Remove `control_overshoot'. 2011-05-04 Werner Lemberg <wl@gnu.org> * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Simplify. 2011-05-01 Just Fill Bugs <mozbugbox@yahoo.com.au> Werner Lemberg <wl@gnu.org> [autofit] Add more debugging functions. * src/autofit/afhints.c (af_glyph_hints_get_num_segments, af_glyph_hints_get_segment_offset): New functions. 2011-05-01 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Add new option `--disable-mmap' to configure script. * builds/unix/configure.raw: New option `--disable-mmap' is added. It is for the developers to simulate the systems without mmap() (like 4.3BSD, minix etc) on POSIX systems. 2011-04-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [truetype] Always recalculate the sfnt table checksum. * src/truetype/ttobjs.c (tt_get_sfnt_checksum): Recalculate the sfnt table checksum even if non-zero value is written in the TrueType font header. Some bad PDF generators write wrong values. For details see examples and benchmark tests of the latency by recalculation: https://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00091.html https://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00096.html 2011-04-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [truetype] Register a set of tricky fonts, NEC FA family. * src/truetype/ttobjs.c (tt_check_trickyness_sfnt_ids): Add 8 checksum sets for NEC FA family. For the tricky fonts without some tables (e.g. NEC FA fonts lack cvt table), extra check is added to assure that a zero-length table in the registry is not included in the font. 2011-04-29 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [truetype] Fix a bug in the sfnt table checksum getter. * src/truetype/ttobjs.c (tt_get_sfnt_checksum): Check the return value of face->goto_table() correctly. 2011-04-28 Werner Lemberg <wl@gnu.org> [autofit] Improve tracing messages. * src/autofit/aflatin.c (af_latin_metrics_init_blues, af_latin_align_linked_edge, af_latin_hint_edges): Do it. 2011-04-25 Kan-Ru Chen <kanru@kanru.info> [truetype] Always check the checksum to identify tricky fonts. Because some PDF generators mangle the family name badly, the trickyness check by the checksum should be invoked always. For sample PDF, see https://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00073.html * src/truetype/ttobjs.c (tt_check_trickyness): Even when tt_check_trickyness_family() finds no trickyness, tt_check_trickyness_sfnt_ids() is invoked. 2011-04-22 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [autofit] Add more Indic scripts with hanging baseline. * src/autofit/afindic.c (af_indic_uniranges): Tibetan, Limbu, Sundanese, Meetei Mayek, Syloti Nagri and Sharada scripts are added. 2011-04-21 Behdad Esfahbod <behdad@behdad.org> Always ignore global advance. This makes FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH redundant, deprecated, and ignored. The new behavior is what every major user of FreeType has been requesting. Global advance is broken in many CJK fonts. Just ignoring it by default makes most sense. * src/truetype/ttdriver.c (tt_get_advances), src/truetype/ttgload.c (TT_Get_HMetrics, TT_Get_VMetrics, tt_get_metrics, compute_glyph_metrics, TT_Load_Glyph), src/truetype/ttgload.h: Implement it. * docs/CHANGES: Updated. 2011-04-21 rainy6144 <rainy6144@gmail.com> [autofit] Blur CJK stems if too many to preserve their gaps. When there are too many stems to preserve their gaps in the rasterization of CJK Ideographs at a low resolution, blur the stems instead of showing clumped stems. See https://lists.gnu.org/archive/html/freetype-devel/2011-02/msg00011.html https://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00046.html for details. * src/autofit/afcjk.c (af_cjk_hint_edges): Store the position of the previous stem by `has_last_stem' and `last_stem_pos', and skip a stem if the current and previous stem are too near to preserve the gap. 2011-04-18 Werner Lemberg <wl@gnu.org> Integrate autofitter debugging stuff. * devel/ftoption.h, include/freetype/config/ftoption.h (FT_DEBUG_AUTOFIT): New macro. * include/freetype/internal/fttrace.h: Add trace components for autofitter. * src/autofit/aftypes.h (AF_LOG): Removed. (_af_debug): Removed. * src/autofit/*: s/AF_DEBUG/FT_DEBUG_AUTOFIT/. s/AF_LOG/FT_TRACE5/. Define FT_COMPONENT where necessary. 2011-04-18 Werner Lemberg <wl@gnu.org> Synchronize config files. * builds/unix/ftconfig.in: Copy missing assembler routines from include/freetype/config/ftconfig.h. 2011-04-13 Werner Lemberg <wl@gnu.org> [psaux] Fix Savannah bug #33047. Patch submitted by anonymous reporter. * src/psaux/psobjs.c (ps_table_add): Use FT_PtrDist for pointer difference. 2011-04-11 Kan-Ru Chen <kanru@kanru.info> Fix reading of signed integers from files on 64bit platforms. Previously, signed integers were converted to unsigned integers, but this can fail because of sign extension. For example, 0xa344a1eb becomes 0xffffffffa344a1eb. We now do the reverse which is always correct because the integer size is the same during the cast from unsigned to signed. * include/freetype/internal/ftstream.h, src/base/ftstream.c (FT_Stream_Get*): Replace with... (FT_Stream_GetU*): Functions which read unsigned integers. Update all macros accordingly. * src/gzip/ftgzip.c (ft_gzip_get_uncompressed_size): Updated. 2011-04-07 Werner Lemberg <wl@gnu.org> Update Unicode ranges for CJK autofitter; in particular, add Hangul. * src/autofit/afcjk.c (af_cjk_uniranges): Update to Unicode 6.0. 2011-04-04 Werner Lemberg <wl@gnu.org> Fix formatting of autofit debug dumps. * src/autofit/afhints.c (af_glyph_hints_dump_points, af_glyph_hints_dump_segments, af_glyph_hints_dump_edges): Adjust column widths. 2011-03-30 Werner Lemberg <wl@gnu.org> * src/autofit/aftypes.h (AF_OutlineRec): Removed, unused. 2011-03-24 Werner Lemberg <wl@gnu.org> * src/cff/cfftypes.h (CFF_MAX_CID_FONTS): Increase to 256. This limit is given on p. 37 of Adobe Technical Note #5014. 2011-03-23 Werner Lemberg <wl@gnu.org> * src/truetype/ttpload.c (tt_face_load_loca): Fix mismatch warning. 2011-03-20 Werner Lemberg <wl@gnu.org> * src/sfnt/sfobjs.c (sfnt_open_font): Check number of TTC subfonts. 2011-03-19 Werner Lemberg <wl@gnu.org> More C++ compilation fixes. * src/autofit/afhints.c (af_glyph_hints_dump_points, af_glyph_hints_dump_segments, af_glyph_hints_dump_edges) [__cplusplus]: Protect with `extern "C"'. 2011-03-18 Werner Lemberg <wl@gnu.org> C++ compilation fixes. * src/autofit/aflatin.c (af_latin_hints_apply), src/autofit/afcjk.c (af_cjk_hints_apply): Use cast for `dim'. 2011-03-17 Alexei Podtelezhnikov <apodtele@gmail.com> A better fix for Savannah bug #32671. * src/smooth/ftgrays.c (gray_render_conic): Clean up code and replace WHILE loop with a more natural DO-WHILE construct. 2011-03-16 Werner Lemberg <wl@gnu.org>. * src/base/ftstroke.c (FT_StrokerRec): Remove unused `valid' field. Suggested by Graham Asher. 2011-03-09 Werner Lemberg <wl@gnu.org> Make FT_Sfnt_Table_Info return the number of SFNT tables. * src/sfnt/sfdriver.c (sfnt_table_info): Implement it. * include/freetype/tttables.h: Update documentation. * docs/CHANGES: Updated. 2011-03-07 Bram Tassyns <bramt@enfocus.be> [cff] Fix Savannah bug #27988. * src/cff/cffobjs.c (remove_style): New function. (cff_face_init): Use it to strip off the style part of the family name. 2011-03-07 Werner Lemberg <wl@gnu.org> * docs/CHANGES: Updated. 2011-03-07 Alexei Podtelezhnikov <apodtele@gmail.com> Quick fix for Savannah bug #32671. This isn't the optimal solution yet, but it restores the previous rendering quality (more or less). * src/smooth/ftgrays.c (gray_render_conic): Do more splitting. 2011-03-06 Werner Lemberg <wl@gnu.org> Fix autohinting fallback. * src/base/ftobjs.c (FT_Load_Glyph): Assure that we only check TTFs, ignoring CFF-based OTFs. 2011-02-27 Werner Lemberg <wl@gnu.org> Add AF_CONFIG_OPTION_USE_WARPER to control the autofit warper. * devel/ftoption.h, include/freetype/config/ftoption.h (AF_CONFIG_OPTION_USE_WARPER): New macro. * src/autofit/aftypes.h (AF_USE_WARPER): Remove. * src/autofit/*: s/AF_USE_WARPER/AF_CONFIG_OPTION_USE_WARPER/. * src/autofit/afwarp.c [!AF_CONFIG_OPTION_USE_WARPER]: Replace dummy variable assignment with a typedef. 2011-02-26 Werner Lemberg <wl@gnu.org> [autofit] Slight simplifications. * src/autofit/aflatin.c (af_latin_hints_link_segments): Remove test which always returns false. (af_latin_hints_compute_blue_edges): Remove redundant assignment. 2011-02-24 Werner Lemberg <wl@gnu.org> * docs/PROBLEMS: Mention rendering differences on different platforms. Suggested and worded by Jason Owen <jason.a.owen@gmail.com>. 2011-02-24 Werner Lemberg <wl@gnu.org> [autofit] Comment out unused code. * src/autofit/aflatin.c, src/autofit/aflatin2.c (af_latin_hints_compute_edges): Do it. 2011-02-24 Werner Lemberg <wl@gnu.org> * src/autofit/afhints.h (AF_GlyphHints): Remove unused field. 2011-02-20 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [cache] Fix an off-by-one bug in `FTC_Manager_RemoveFaceID'. Found by <ychen1392001@yahoo.com.cn>, see detail in https://lists.gnu.org/archive/html/freetype/2011-01/msg00023.html * src/cache/ftccache.c (FTC_Cache_RemoveFaceID): Check the node buckets[cache->p + cache->mask] too. 2011-02-19 Kevin Kofler <kevin.kofler@chello.at> Fall back to autohinting if a TTF/OTF doesn't contain any bytecode. This is Savannah patch #7471. * src/base/ftobjs.c (FT_Load_Glyph): Implement it. 2011-02-19 John Tytgat <John.Tytgat@esko.com> [cff] Fix subset prefix removal. This is Savannah patch #7465. * src/cff/cffobjs.c (remove_subset_prefix): Update length after subset prefix removal. 2011-02-13 Bradley Grainger <bgrainger@logos.com> Add inline assembly version of FT_MulFix for MSVC. * include/freetype/config/ftconfig.h: Ported the FT_MulFix_i386 function from GNU inline assembly syntax (see #ifdef __GNUC__ block above) to MASM syntax for Microsoft Visual C++. 2011-02-13 Bradley Grainger <bgrainger@logos.com> Add project and solution files in Visual Studio 2010 format. * builds/win32/.gitignore: Ignore user-specific cache files. * builds/win32/vc2010/: Add VS2010 project & solution files, created by upgrading builds/win32/vc2008/freetype.vcproj. * objs/.gitignore: Ignore Visual Studio output files. 2011-02-01 Werner Lemberg <wl@gnu.org> * src/autofit/afdummy.c: Include `aferrors.h'. Problem reported by Chris Liddell <chris.liddell@artifex.com>. 2011-02-01 Werner Lemberg <wl@gnu.org> [cff] Ignore unknown operators in charstrings. Patch suggested by Miles.Lau <sunliang_liu@foxitsoftware.com>. * src/cff/cffgload.c (cff_decoder_parse_charstrings): Emit tracing message for unknown operators and continue instead of exiting with a syntax error. 2011-02-01 Werner Lemberg <wl@gnu.org> [truetype] FT_LOAD_PEDANTIC now affects `prep' and `fpgm' also. * src/truetype/ttgload.c (tt_loader_init): Handle `FT_LOAD_PEDANTIC'. * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep, tt_size_init_bytecode, tt_size_ready_bytecode): New argument to handle pedantic mode. * src/truetype/ttobjs.h: Updated. 2011-01-31 Werner Lemberg <wl@gnu.org> [truetype] Protect jump instructions against endless loops. * src/truetype/interp.c (DO_JROT, DO_JMPR, DO_JROF): Exit with error if offset is zero. 2011-01-31 Werner Lemberg <wl@gnu.org> [truetype] Improve handling of invalid references. * src/truetype/interp.c: Set even more TT_Err_Invalid_Reference error codes only if pedantic hinting is active. At the same time, try to provide sane values which hopefully allow useful continuation. Exception to this is CALL and LOOPCALL – due to possible stack corruption it is necessary to bail out. 2011-01-31 Werner Lemberg <wl@gnu.org> [truetype] Improve handling of stack underflow. * src/truetype/ttinterp.c (TT_RunIns, Ins_FLIPPT, Ins_DELTAP, Ins_DELTAC): Exit with error only if `pedantic_hinting' is set. Otherwise, try to do something sane. 2011-01-30 Werner Lemberg <wl@gnu.org> * src/sfnt/ttmtx.c (tt_face_load_hmtx): Fix tracing message. 2011-01-30 LIU Sun-Liang <sunliang_liu@foxitsoftware.com> [truetype]: Fix behaviour of MIAP for invalid arguments. * src/truetype/ttinterp.c (Ins_MIAP): Set reference points even in case of error. 2011-01-18 Werner Lemberg <wl@gnu.org> [truetype] Fix handling of MIRP instruction. Thanks to Greg Hitchcock who explained the issue. * src/truetype/ttinterp.c (Ins_MIRP): Replace a `>=' operator with `>' since the description in the specification is incorrect. This fixes, for example, glyph `two' in font `Helvetica Neue LT Com 65 medium' at 15ppem. 2011-01-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Fix ARM assembly code in include/freetype/config/ftconfig.h. * include/freetype/config/ftconfig.h (FT_MulFix_arm): Copy the maintained code from builds/unix/ftconfig.in. Old GNU binutils could not accept the reduced syntax `orr %0, %2, lsl #16'. Un-omitted syntax like RVCT, `orr %0, %0, %2, lsl #16' is better. Reported by Johnson Y. Yan. The bug report by Qt developers is considered too. https://bugreports.qt.io/browse/QTBUG-6521 2011-01-15 Werner Lemberg <wl@gnu.org> [raster] Make bbox handling the same as with Microsoft's rasterizer. Right before B/W rasterizing, the bbox gets simply rounded to integers. This fixes, for example, glyph `three' in font `Helvetica Neue LT Com 65 Medium' at 11ppem. Thanks to Greg Hitchcock who explained this behaviour. * src/raster/ftrend1.c (ft_raster1_render): Implement it. 2011-01-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Copy -mcpu=* & -march=* options from CFLAGS to LDFLAGS. * builds/unix/configure.raw: Consider recent gcc-standard flags to specify architecture in CFLAGS & LDFLAGS harmonization. Requested by Savannah bug #32114, to support multilib feature of BuildRoot SDK correctly. 2011-01-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Fix off-by-one bug in CFLAGS & LDFLAGS harmonizer. * builds/unix/configure.raw: Some important options that included in CFLAGS but not in LDFLAGS are copied to LDFLAGS, but the last option in CFLAGS was not checked. 2011-01-13 Werner Lemberg <wl@gnu.org> [raster] Add undocumented drop-out rule to the other bbox side also. * src/raster/ftraster.c (Vertical_Sweep_Drop, Horizontal_Sweep_Drop): Implement it. 2011-01-13 Werner Lemberg <wl@gnu.org> [raster] Reduce jitter value. This catches a rendering problem with glyph `x' from Tahoma at 10ppem. It seems that the increase of the precision in the change from 2009-06-11 makes a larger jitter value unnecessary. * src/raster/ftraster.c (Set_High_Precision): Implement it. 2011-01-13 Werner Lemberg <wl@gnu.org> [raster] Handle drop-outs at glyph borders according to Microsoft. If a drop-out rule would switch on a pixel outside of the glyph's bounding box, use the right (or top) pixel instead. This is an undocumented feature, but some fonts like `Helvetica Neue LT Com 65 Medium' heavily rely on it. Thanks to Greg Hitchcock who explained this behaviour. * src/raster/ftraster.c (Vertical_Sweep_Drop, Horizontal_Sweep_Drop): Implement it. 2011-01-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [cache] Fix Savannah bug #31923, patch drafted by Harsha. When a node comparator changes the cached nodes during the search of a node matching with queried properties, the pointers obtained before the function should be updated to prevent the dereference to freed or reallocated nodes. To minimize the rescan of the linked list, the update is executed when the comparator notifies the change of cached nodes. This change depends previous change: 38b272ffbbdaae276d636aec4ef84af407d16181 * src/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP): Rescan the top node if the cached nodes are changed. * src/cache/ftccache.c (FTC_Cache_Lookup): Ditto. 2011-01-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [cache] Notice if a cache query induced the node list change. Some node comparators (comparing the cache node contents and the properties specified by the query) can flush the cache node to prevent the cache inflation. The change may invalidate the pointers to the node obtained before the node comparison, so it should be noticed to the caller. The problem caused by the cache node changing is reported by Harsha, see Savannah bug #31923. * src/cache/ftccache.h (FTC_Node_CompareFunc): Add new argument `FT_Bool* list_changed' to indicate the change of the cached nodes to the caller. (FTC_CACHE_LOOKUP_CMP): Watch the change of the cached nodes by `_list_changed'. (FTC_CACHE_TRYLOOP_END): Take new macro argument `_list_changed' and update it when `FTC_Manager_FlushN' flushes any nodes. * src/cache/ftccback.h (ftc_snode_compare): Updated to fit with new FTC_Node_CompareFunc type. (ftc_gnode_compare): Ditto. * src/cache/ftcbasic.c: Include FT_INTERNAL_OBJECTS_H to use TRUE/FALSE macros. (ftc_basic_gnode_compare_faceid): New argument `FT_Bool* list_changed' to indicate the change of the cache nodes (anyway, it is always FALSE). * src/cache/ftccmap.c: Include FT_INTERNAL_OBJECTS_H to use TRUE/FALSE macros. (ftc_cmap_node_compare): New argument `FT_Bool* list_changed' to indicate the change of the cache nodes (anyway, it is always FALSE). (ftc_cmap_node_remove_faceid): Ditto. * src/cache/ftccache.c (FTC_Cache_NewNode): Pass a NULL pointer to `FTC_CACHE_TRYLOOP_END', because the result is not needed. (FTC_Cache_Lookup): Watch the change of the cache nodes by `list_changed'. (FTC_Cache_RemoveFaceID): Ditto. * src/cache/ftcglyph.c: Include FT_INTERNAL_OBJECTS_H to use TRUE/FALSE macros. (ftc_gnode_compare): New argument `FT_Bool* list_changed' to indicate the change of the cache nodes (anyway, it is always FALSE). (FTC_GNode_Compare): New argument `FT_Bool* list_changed' to be passed to `ftc_gnode_compare'. * src/cache/ftcglyph.h (FTC_GNode_Compare): Ditto. * src/cache/ftcsbits.c (ftc_snode_compare): New argument `FT_Bool* list_changed' to indicate the change of the cache nodes, anyway. It is updated by `FTC_CACHE_TRYLOOP'. (FTC_SNode_Compare): New argument `FT_Bool* list_changed' to be passed to `ftc_snode_compare'. * src/cache/ftcsbits.h (FTC_SNode_Compare): Ditto. 2011-01-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [cache] Fit `FTC_GNode_Compare' to `FTC_Node_CompareFunc'. * src/cache/ftcglyph.h (FTC_GNode_Compare): Add the 3rd argument `FTC_Cache cache' to fit FTC_Node_CompareFunc prototype. * src/cache/ftcglyph.c (FTC_GNode_Compare): Ditto. Anyway, `cache' is not used by its child `ftc_gnode_compare'. 2011-01-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [cache] Deduplicate the code to get the top node by a hash. There are several duplicated code fragments getting the top node from a cache by a given hash, like: idx = hash & cache->mask; if ( idx < cache->p ) idx = hash & ( cache->mask * 2 + 1 ); pnode = cache->buckets + idx; To remove duplication, a cpp-macro to do same work `FTC_NODE__TOP_FOR_HASH' is introduced. For non-inlined configuration, non-`ftc_get_top_node_for_hash' is also introduced. * src/cache/ftccache.h (FTC_NODE__TOP_FOR_HASH): Declare and implement inlined version. (FTC_CACHE_LOOKUP_CMP): Use `FTC_NODE__TOP_FOR_HASH'. * src/cache/ftccache.c (ftc_get_top_node_for_hash): Non-inlined version. (ftc_node_hash_unlink): Use `FTC_NODE__TOP_FOR_HASH'. (ftc_node_hash_link): Ditto. (FTC_Cache_Lookup): Ditto. 2011-01-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [cache] inline-specific functions are conditionalized. * src/cache/ftcglyph.c (FTC_GNode_Compare): Conditionalized for inlined configuration. This function is a thin wrapper of `ftc_gnode_compare' for inlined `FTC_CACHE_LOOKUP_CMP' (see `nodecmp' argument). Under non-inlined configuration, `ftc_gnode_compare' is invoked by `FTC_Cache_Lookup', via `FTC_Cache->clazz.node_compare'. * src/cache/ftcglyph.h (FTC_GNode_Compare): Ditto. * src/cache/ftcsbits.c (FTC_SNode_Compare): Ditto, for `ftc_snode_compare'. * src/cache/ftcsbits.h (FTC_SNode_Compare): Ditto. 2011-01-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [cache] Correct a type mismatch under non-inlined config. * src/cache/ftcglyph.h (FTC_GCACHE_LOOKUP_CMP): `FTC_GCache_Lookup' takes the node via a pointer `FTC_Node*', differently from cpp-macro `FTC_CACHE_LOOKUP_CMP'. 2011-01-06 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Update Jamfile to include Bzip2 support. * Jamfile: Include src/bzip2 to project. Comments for lzw, gzip, bzip2 are changed to clarify that they are for compressed PCF fonts, not others. (e.g. compressed BDF fonts are not supported yet) 2011-01-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Update Symbian project files to include Bzip2 support. Currently, it provides `FT_Stream_OpenBzip2' that returns unimplemented error always, to prevent unresolved symbol error for the applications designed for Unix systems. * builds/symbian/bld.inf: Include ftbzip2.h. * builds/symbian/freetype.mmp: Include ftbzip2.c. 2011-01-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Update classic MacOS makefiles to include Bzip2 support. Currently, it provides `FT_Stream_OpenBzip2' that returns unimplemented error always, to prevent unresolved symbol error for the applications designed for Unix systems. * builds/mac/FreeType.m68k_cfm.make.txt: Include ftbzip2.c.o. * builds/mac/FreeType.m68k_far.make.txt: Ditto. * builds/mac/FreeType.ppc_carbon.make.txt: Include ftbzip2.c.x. * builds/mac/FreeType.ppc_classic.make.txt: Ditto. 2011-01-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Update Amiga makefiles to include Bzip2 support. Currently, it provides `FT_Stream_OpenBzip2' that returns unimplemented error always, to prevent unresolved symbol error for the applications designed for Unix systems. * builds/amiga/makefile: Include bzip2.ppc.o built from ftbzip2.c. * builds/amiga/makefile.os4: Include bzip2.o built from ftbzip2.c. * builds/amiga/smakefile: Ditto. 2011-01-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Update pkg-config tools to reflect Bzip2 support. * builds/unix/freetype-config.in: Include `-lbz2' to --libs output, if built with Bzip2 support. * builds/unix/freetype2.in: Ditto. 2011-01-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * builds/unix/configure.raw: Remove `SYSTEM_BZ2LIB' macro. SYSTEM_ZLIB is used to switch the builtin zlib source or system zlib source out of FreeType2. But ftbzip2 module has no builtin bzip2 library and always requires system bzip2 library. Thus SYSTEM_BZ2LIB is always yes, it is not used. 2011-01-03 Werner Lemberg <wl@gnu.org> */rules.mk: Handle `*pic.c' files. 2010-12-31 Werner Lemberg <wl@gnu.org> * src/cff/cfftypes.h (CFF_MAX_CID_FONTS): Increase to 64. Problem reported by Tom Bishop <wenlin@wenlin.com>. 2010-12-31 Werner Lemberg <wl@gnu.org> Improve bzip2 support. * include/freetype/ftmoderr.h: Add bzip2. * docs/INSTALL.ANY, docs/CHANGES: Updated. * src/pcf/README: Updated. * include/freetype/internal/pcftypes.h: Obsolete, removed. 2010-12-31 Joel Klinghed <the_jk@yahoo.com> Add bzip2 compression support to handle *.pcf.bz2 files. * builds/unix/configure.raw: Test for libbz2 library. * devel/ftoption.h, include/freetype/config/ftoption.h (FT_CONFIG_OPTION_USE_BZIP2): Define. * include/freetype/config/ftheader.h (FT_BZIP2_H): Define. * include/freetype/ftbzip2.h: New file. * src/bzip2/*: New files. * src/pcf/pcf.h: s/gzip_/comp_/. * src/pcf/pcfdrivr.c: Include FT_BZIP2_H. s/gzip_/comp_/. (PCF_Face_Init): Handle bzip2 compressed files. * docs/formats.txt, modules.cfg: Updated. 2010-12-25 Harsha <mm.harsha@gmail.com> Apply Savannah patch #7422. If we encounter a space in a string then the sbit buffer is NULL, height and width are 0s. So the check in ftc_snode_compare will always pass for spaces (comparison with 255). Here the comments above the condition are proper but the implementation is not. When we create an snode I think it is the proper way to initialize the width to 255 and then put a check for being equal to 255 in snode compare function. * src/cache/ftcsbits.c (FTC_SNode_New): Initialize sbit widths with value 255. (ftc_snode_compare): Fix condition. 2010-12-13 Werner Lemberg <wl@gnu.org> Fix parameter handling of `FT_Set_Renderer'. Reported by Kirill Tishin <siege@bk.ru>. * src/base/ftobjs.c (FT_Set_Renderer): Increment `parameters'. 2010-12-09 Werner Lemberg <wl@gnu.org> [cff] Allow `hlineto' and `vlineto' without arguments. We simply ignore such instructions. This is invalid, but it doesn't harm; and indeed, there exist such subsetted fonts in PDFs. Reported by Albert Astals Cid <aacid@kde.org>. * src/cff/cffgload.c (cff_decoder_parse_charstrings) [cff_op_hlineto]: Ignore instruction if there aren't any arguments on the stack. 2010-11-28 Werner Lemberg <wl@gnu.org> * Version 2.4.4 released. ========================= Tag sources with `VER-2-4-4'. * docs/CHANGES: Updated. * docs/VERSION.DLL: Update documentation and bump version number to 2.4.4 * README, Jamfile (RefDoc), builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html, builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html, builds/win32/visualc/freetype.dsp, builds/win32/visualc/freetype.vcproj, builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp, builds/win32/visualce/freetype.vcproj, builds/win32/visualce/index.html, builds/wince/vc2005-ce/freetype.vcproj, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/freetype.vcproj, builds/wince/vc2008-ce/index.html: s/2.4.3/2.4.4/, s/243/244/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 4. * builds/unix/configure.raw (version_info): Set to 12:2:6. 2010-11-28 Alexei Podtelezhnikov <apodtele@gmail.com> [ftsmooth]: Minor code simplification. * src/smooth/ftgrays (gray_render_cubic): Do only one comparison instead of two. 2010-11-26 Johnson Y. Yan <yinsen_yan@foxitsoftware.com> [truetype] Better multi-threading support. * src/truetype/ttinterp.c (TT_Load_Context): Reset glyph zone references. 2010-11-23 John Tytgat <John.Tytgat@esko.com> * src/psaux/t1decode.c (t1_decoder_parse_charstring): Expand start_point, check_points, add_point, add_point1, close_contour macros. Remove add_contour macro. Return error code from t1_builder_start_point and t1_builder_check_points when there was one (instead of returning 0). 2010-11-22 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [truetype] Identify the tricky fonts by cvt/fpgm/prep checksums. Some Latin TrueType fonts are still expected to be unhinted. Fix Savannah bug #31645. * src/truetype/ttobjs.c (tt_check_trickyness): Divided to... (tt_check_trickyness_family): this checking family name, and (tt_check_trickyness_sfnt_ids): this checking cvt/fpgm/prep. (tt_get_sfnt_checksum): Function to retrieve the sfnt checksum for specified subtable even if cleared by lazy PDF generators. (tt_synth_sfnt_checksum): Function to calculate the checksum. 2010-11-18 Werner Lemberg <wl@gnu.org> [truetype] Fix `loca' handling for inconsistent number of glyphs. Reported by Johnson Y. Yan <yinsen_yan@foxitsoftware.com>. * src/truetype/ttpload.c (tt_face_load_loca): While sanitizing, handle case where `loca' is the last table in the font. 2010-11-18 Werner Lemberg <wl@gnu.org> [sfnt] Ignore all errors while loading `OS/2' table. Suggested by Johnson Y. Yan <yinsen_yan@foxitsoftware.com>. * src/sfnt/sfobjs.c (sfnt_load_face): Do it. 2010-11-18 Johnson Y. Yan <yinsen_yan@foxitsoftware.com> [type1] Fix matrix normalization. * src/type1/t1load.c (parse_font_matrix): Handle sign of scaling factor. 2010-11-18 Werner Lemberg <wl@gnu.org> [type1] Improve guard against malformed data. Based on a patch submitted by Johnson Y. Yan <yinsen_yan@foxitsoftware.com> * src/type1/t1load.c (read_binary_data): Check `size'. 2010-11-17 Werner Lemberg <wl@gnu.org> [sfnt] While tracing, output table checksums also. * src/sfnt/ttload.c (tt_face_load_font_dir): Do it. 2010-11-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [UVS] Fix `find_variant_selector_charmap', Savannah bug #31545. Since 2010-07-04, `find_variant_selector_charmap' returns the first cmap subtable always under rogue-compatible configuration, it causes NULL pointer dereference and make UVS-related functions crashed. * src/base/ftobjs.c (Fix find_variant_selector_charmap): Returns UVS cmap correctly. 2010-11-01 Alexei Podtelezhnikov <apodtele@gmail.com> [ftsmooth] Improve rendering. * src/smooth/ftsmooth.c (gray_render_conic): Since version 2.4.3, cubic deviations have been estimated _after_ UPSCALE, whereas conic ones have been evaluated _before_ UPSCALE, which produces inferior rendering results. Fix this. Partially undo change from 2010-10-15 by using ONE_PIXEL/4; this has been tested with demo images sent to the mailing list. See https://lists.gnu.org/archive/html/freetype-devel/2010-10/msg00055.html and later mails in this thread. 2010-10-28 Werner Lemberg <wl@gnu.org> [ftraster] Minor fixes. Reported by Tom Bishop <wenlin@wenlin.com>. * src/raster/ftraster.c (ULong): Remove unused typedef. (TWorker): Remove unused variable `precision_mask'. 2010-10-28 Werner Lemberg <wl@gnu.org> [ftraster] Fix rendering. Problem reported by Tom Bishop <wenlin@wenlin.com>; see thread starting with https://lists.gnu.org/archive/html/freetype/2010-10/msg00049.html * src/raster/ftraster.c (Line_Up): Replace FMulDiv with SMulDiv since the involved multiplication exceeds 32 bits. 2010-10-25 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Revert a change of `_idx' type in `FTC_CACHE_LOOKUP_CMP'. * src/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP): Revert the type of `_idx' from FT_PtrDist (by previous change) to original FT_UFast, to match with FT_CacheRec. 2010-10-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [cache] Change the hash types to FT_PtrDist. On LLP64 platforms (e.g. Win64), FT_ULong (32-bit) variables are inappropriate to calculate hash values from the memory address (64-bit). The hash variables are extended from FT_ULong to FT_PtrDist and new hashing macro functions are introduced. The hash values on 16-bit memory platforms are changed, but ILP32 and LP64 are not changed. The hash value in the cache subsystem is not reverted to the memory address, so using signed type FT_PtrDist is safe. * src/cache/ftccache.h (_FTC_FACE_ID_HASH): New hash function to replace `FTC_FACE_ID_HASH' for portability. * src/cache/ftcmanag.h (FTC_SCALER_HASH): Replace `FTC_FACE_ID_HASH' by `_FTC_FACE_ID_HASH'. * src/cache/ftccmap.c (FTC_CMAP_HASH): Ditto. * src/cache/ftccache.h (FTC_NodeRec): The type of the member `hash' is changed from FT_UInt32 to FT_PtrDist. * src/cache/ftccache.h (FTC_Cache_Lookup): The type of the argument `hash' is changed from FT_UInt32 to FT_PtrDist. (FTC_Cache_NewNode): Ditto. * src/cache/ftccache.c (ftc_cache_add): Ditto. (FTC_Cache_Lookup): Ditto. (FTC_Cache_NewNode): Ditto. * src/cache/ftcglyph.h (FTC_GCache_Lookup): Ditto. * src/cache/ftcglyph.c (FTC_GCache_Lookup): Ditto. * src/cache/ftcbasic.c (FTC_ImageCache_Lookup): The type of the internal variable `hash' is changed to FT_PtrDist from FT_UInt32. (FTC_ImageCache_LookupScaler): Ditto. (FTC_SBitCache_Lookup): Ditto. (FTC_SBitCache_LookupScaler): Ditto. * src/cache/ftccmap.c (FTC_CMapCache_Lookup): Ditto. * src/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP): Ditto. Also the type of the internal variable `_idx' is changed to FT_PtrDist from FT_UFast for better pointer calculation. 2010-10-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [cache] Hide internal macros incompatible with LLP64. `FT_POINTER_TO_ULONG', `FTC_FACE_ID_HASH', and `FTC_IMAGE_TYPE_HASH' are enclosed by FT_CONFIG_OPTION_OLD_INTERNALS and hidden from normal clients. For the history of these macros, see the investigation: https://lists.gnu.org/archive/html/freetype/2010-10/msg00022.html 2010-10-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Change the type of `FT_MEM_VAL' from FT_ULong to FT_PtrDist. On LLP64 platforms (e.g. Win64), unsigned long (32-bit) cannot cover the memory address (64-bit). `FT_MEM_VAL' is used for hashing only and not dereferred, so using signed type FT_PtrDist is safe. * src/base/ftdbgmem.c (FT_MEM_VAL): Change the type of the return value from FT_ULong to FT_PtrDist. (ft_mem_table_resize): The type of hash is changed to FT_PtrDist. (ft_mem_table_get_nodep): Ditto. 2010-10-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Replace "%lx" for memory address by "%p", LLP64 platforms. On LLP64 platforms (e.g. Win64), long (32-bit) cannot cover the memory address (64-bit). Also the casts from the pointer type to long int should be removed to preserve the address correctly. * src/raster/ftraster.c (New_Profile): Replace "%lx" by "%p". (End_Profile) Ditto. * src/truetype/ttinterp.c (Init_Context): Ditto. 2010-10-15 Alexei Podtelezhnikov <apodtele@gmail.com> Fix thinko in spline flattening. FT_MAX_CURVE_DEVIATION is dependent on the value of ONE_PIXEL. * src/smooth/ftgrays.c (FT_MAX_CURVE_DEVIATION): Remove it and replace it everywhere with ONE_PIXEL/8. 2010-10-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [raccess] Skip unrequired resource access rules by Darwin VFS. When a resource fork access rule by Darwin VFS could open the resource fork but no font is found in it, the rest of rules by Darwin VFS are skipped. It reduces the warnings of the deprecated resource fork access method by recent Darwin kernel. Fix MacPorts ticket #18859: https://trac.macports.org/ticket/18859 * src/base/ftobjs.c (load_face_in_embedded_rfork): When `FT_Stream_New' returns FT_Err_Cannot_Open_Stream, it means that the file is possible to be `fopen'-ed but zero-sized. Also there is a case that the resource fork is not zero-sized, but no supported font exists in it. If a rule by Darwin VFS falls into such cases, there is no need to try other Darwin VFS rules anymore. Such cases are marked by vfs_rfork_has_no_font. If it is TRUE, the Darwin VFS rules are skipped. 2010-10-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [raccess] Grouping resource access rules based on Darwin VFS. MacOS X/Darwin kernel supports a few tricky methods to access a resource fork via ANSI C or POSIX interface. Current resource fork accessor tries all possible methods to support all kernels. But if a method could open a resource fork but no font is found, there is no need to try other methods older than tested method. To determine whether the rule index is for Darwin VFS, a local function `ftrfork.c::raccess_rule_by_darwin_vfs' is introduced. To use this function in ftobjs.c etc but it should be inlined, it is exposed by ftbase.h. * src/base/ftrfork.c (FT_RFork_Rule): New enum type to identify the rules to access the resource fork. (raccess_guess_rec): New structure to bind the rule function and rule enum type. (FT_Raccess_Guess): The list of the rule functions is replaced by (raccess_guess_table): This. This is exposed to be used by other intra module functions. (raccess_rule_by_darwin_vfs): A function to return a boolean if the rule specified by the rule index is based on Darwin VFS. 2010-10-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Prevent to open a FT_Stream for zero-sized file on non-Unix. builds/unix/ftsystem.c prevents to open an useless stream from zero-sized file and returns FT_Err_Cannot_Open_Stream, but the stream drivers for ANSI C, Amiga and VMS return useless streams. For cross-platform consistency, all stream drivers should act same. * src/base/ftsystem.c (FT_Stream_Open): If the size of the opened file is zero, FT_Err_Cannot_Open_Stream is returned. * builds/amiga/src/base/ftsystem.c (FT_Stream_Open): Ditto. * src/vms/ftsystem.c (FT_Stream_Open): Ditto. 2010-10-12 Werner Lemberg <wl@gnu.org> [truetype] Fix Savannah bug #31310. * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Protect against invalid `runcnt' values. 2010-10-08 Chris Liddell <chris.liddell@artifex.com> [sfnt] Fix Savannah bug #31275. * src/sfnt/ttpost.c: Include FT_INTERNAL_DEBUG_H. 2010-10-06 Werner Lemberg <wl@gnu.org> [truetype] Improve error handling of `SHZ' bytecode instruction. Problem reported by Chris Evans <scarybeasts@gmail.com>. * src/truetype/ttinterp.c (Ins_SHZ): Check `last_point'. 2010-10-05 Werner Lemberg <wl@gnu.org> Fix Savannah bug #31253. Patch submitted by an anonymous reporter. * configure: Use `awk' instead of `sed' to manipulate output of `ls -id'. 2010-10-03 Werner Lemberg <wl@gnu.org> * Version 2.4.3 released. ========================= Tag sources with `VER-2-4-3'. * docs/CHANGES: Updated. * docs/VERSION.DLL: Update documentation and bump version number to 2.4.3 * README, Jamfile (RefDoc), builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html, builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html, builds/win32/visualc/freetype.dsp, builds/win32/visualc/freetype.vcproj, builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp, builds/win32/visualce/freetype.vcproj, builds/win32/visualce/index.html, builds/wince/vc2005-ce/freetype.vcproj, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/freetype.vcproj, builds/wince/vc2008-ce/index.html: s/2.4.2/2.4.3/, s/242/243/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3. * builds/unix/configure.raw (version_info): Set to 12:1:6. 2010-10-03 Werner Lemberg <wl@gnu.org> Avoid `configure' issues with symbolic links. Based on a patch from Alexander Stohr <Alexander.Stohr@gmx.de>. * configure: Compare directories using `ls -id'. Check existence of `reference' subdirectory before creating it. 2010-10-02 Werner Lemberg <wl@gnu.org> [sfnt] Fix Savannah bug #31088 (sort of). * src/sfnt/ttload.c (tt_face_load_maxp): Always allocate at least 64 function entries. 2010-10-02 Werner Lemberg <wl@gnu.org> [smooth] Fix splitting of cubics for negative values. Reported by Róbert Márki <gsmiko@gmail.com>; see https://lists.gnu.org/archive/html/freetype/2010-09/msg00019.html. * src/smooth/ftgrays.c (gray_render_cubic): Fix thinko. 2010-10-01 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [truetype] Fix Savannah bug #31040. * src/truetype/ttinterp.c (free_buffer_in_size): Remove. (TT_RunIns): Updated. 2010-09-20 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [sfnt] Make error message filling NULL names less verbose. * src/sfnt/ttpost.c (load_format_20): Showing 1 summary message when we fill `post' names by NULL, instead of per-entry message. 2010-09-20 Graham Asher <graham.asher@btinternet.com> David Bevan <david.bevan@pb.com> [smooth] Fix and improve spline flattening. This fixes the flattening of cubic, S-shaped curves and speeds up the handling of both the conic and cubic arcs. See the discussions on the freetype-devel mailing list in late August and September 2010 for details. * src/smooth/ftgrays.c (FT_MAX_CURVE_DEVIATION): New macro. (TWorker): Remove `conic_level' and `cubic_level' elements. (gray_render_conic): Simplify algorithm. (gray_render_cubic): New algorithm; details are given in the code comments. (gray_convert_glyph): Remove heuristics. 2010-09-19 Werner Lemberg <wl@gnu.org> Minor fixes. * src/cff/cffload.c (cff_charset_compute_cids): `charset->sids[i]' is `FT_UShort'. (cff_index_access_element): Don't use additions in comparison. * src/sfnt/ttpost.c (load_format_20): Make `post_limit' of type `FT_Long'. Don't use additions in comparison. Improve tracing messages. (load_format_25, load_post_names): Make `post_limit' of type `FT_Long'. 2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [cff] Truncate the element length at the end of the stream. See Savannah bug #30975. * src/cff/cffload.c (cff_index_access_element): `off2', the offset to the next element is truncated at the end of the stream to prevent invalid I/O. As `off1', the offset to the requested element has been checked by `FT_STREAM_SEEK', `off2' should be checked similarly. 2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [cff] Ignore CID > 0xFFFFU. See Savannah bug #30975. * src/cff/cffload.c (cff_charset_compute_cids): Ignore CID if greater than 0xFFFFU. CFF font spec does not mention maximum CID in the font, but PostScript and PDF spec define that maximum CID is 0xFFFFU. 2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [cff] Make trace message in` cff_charset_load' verbose. See Savannah bug #30975. * src/cff/cffload.c (cff_charset_load): Report the original `nleft' and truncated `nleft'. 2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [cff] Correct `max_cid' from CID array length to max CID. See Savannah bug #30975. * src/cff/cffload.c (cff_charset_compute_cids): Don't increment max_cid after detecting max CID. The array CFF_Charset->cids is allocated by max_cid + 1. (cff_charset_cid_to_gindex): Permit CID is less than or equal to CFF_Charset->max_cid. * src/cff/cffobjs.c (cff_face_init): FT_Face->num_glyphs is calculated as CFF_Charset->max_cid + 1. 2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [truetype] Sanitize the broken offsets in `loca'. See Savannah bug #31040. * src/truetype/ttpload.c (tt_face_get_location): If `pos1', the offset to the requested entry in `glyf' exceeds the end of the table, return offset=0, length=0. If `pos2', the offset to the next entry in `glyf' exceeds the end of the table, truncate the entry length at the end of `glyf' table. 2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [sfnt] Prevent overrunning in `post' table parser. See Savannah bug #31040. * src/sfnt/ttpost.c (load_post_names): Get the length of `post' table and pass the limit of `post' table to `load_format_20' and `load_format_25'. (load_format_20): Stop the parsing when we reached at the limit of `post' table. If more glyph names are required, they are filled by NULL names. 2010-09-17 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [truetype] Don't duplicate size->twilight structure to be freed. See Savannah bug #31040 for detail. * src/truetype/ttinterp.c (free_buffer_in_size): Don't duplicate FT_GlyphZoneRec size->twilight to be freed. If duplicated, `FT_FREE' erases the duplicated pointers only and leave original pointers. They can cause the double-free crash when the burst errors occur in TrueType interpreter and `free_buffer_in_size' is invoked repeatedly. 2010-09-15 Werner Lemberg <wl@gnu.org> Make bytecode debugging with FontForge work again. * src/truetype/ttinterp.c (TT_RunIns): Don't call `free_buffer_in_size' in case of error if a debugger is active. 2010-09-14 Werner Lemberg <wl@gnu.org> Improve tracing messages. * src/truetype/ttinterp.c (TT_RunIns): Improve wording of tracing message. * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Add tracing message. * src/truetype/ttgload.c (tt_loader_init): Add tracing message. * src/cache/ftcsbits.c (ftc_snode_load): Emit tracing message if glyph doesn't fit into a small bitmap container. 2010-09-13 Werner Lemberg <wl@gnu.org> Fix minor issues reported by <muktha.narayan@wipro.com>. * src/autofit/aflatin.c (af_latin_compute_stem_width): Remove redundant conditional check. * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Ditto. * src/cff/cffload.c (cff_encoding_load): Remove conditional check which always evaluates to `true'. * src/pshinter/pshalgo.c (ps_glyph_interpolate_strong_points): Ditto. * src/truetype/ttinterp.c (Ins_IUP): Ditto. * src/cid/cidgload.c (cid_slot_load_glyph): Don't check for NULL if value is already dereferenced. * src/winfonts/winfnt.c (FNT_Load_Glyph): Fix check of `face'. 2010-08-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Ignore the environmental setting of LIBTOOL. Patch is suggested by Adrian Bunk, to prevent unexpected reflection of environmental LIBTOOL. See: https://savannah.nongnu.org/patch/?7290 * builds/unix/unix-cc.in: LIBTOOL is unconditionally set to $(FT_LIBTOOL_DIR)/libtool. FT_LIBTOOL_DIR is set to $(BUILD_DIR) by default. * configure: When configured for the building out of source tee, FT_LIBTOOL_DIR is set to $(OBJ_DIR). 2010-08-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [truetype] Decrease the trace level catching the interpreter error. * src/truetype/ttinterp.c (TT_RunIns): Decrease the trace level showing the error when the interpreter returns with an error, from` FT_TRACE7' to `FT_TRACE1'. 2010-08-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [truetype] Prevent bytecode reuse after the interpretation error. * src/truetype/ttinterp.c (free_buffer_in_size): New function to free the buffer allocated during the interpretation of this glyph. (TT_RunIns): Unset FT_Face->size->{cvt_ready,bytecode_ready} if an error occurs in the bytecode interpretation. The interpretation of invalid bytecode may break the function definitions and referring them in later interpretation is danger. By unsetting these flags, `fpgm' and `prep' tables are executed again in next interpretation. This fixes Savannah bug #30798, reported by Robert Święcki. 2010-08-29 Werner Lemberg <wl@gnu.org> [ftraster] Pacify compiler. * src/raster/ftraster.c (ft_black_new) [_STANDALONE_]: `memory' is not used. 2010-08-29 Werner Lemberg <wl@gnu.org> [cff] Allow SIDs >= 65000. * src/cff/cffload.c (cff_charset_load): Fix change from 2009-03-20: The threshold for SIDs is not applicable here. I misinterpreted the `SID values 65000 and above are available for implementation use' sentence in the CFF specification. Problem reported by Ivan Ninčić <inincic@pdftron.com>. 2010-08-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Force hinting when the font lacks its familyname. In Type42 or Type11 font embedded in PostScript & PDF, TrueType sfnt stream may lack `name' table because they are not required. Hinting for nameless fonts is safer for PDFs including embedded Chinese fonts. Written by David Bevan, see: https://lists.gnu.org/archive/html/freetype-devel/2010-08/msg00021.html https://lists.freedesktop.org/archives/poppler/2010-August/006310.html * src/truetype/ttobjs.c (tt_check_trickyness): If a NULL pointer by nameless font is given, TRUE is returned to enable hinting. 2010-08-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Register yet another tricky TrueType font. * src/truetype/ttobjs.c (tt_check_trickyness): Add `HuaTianKaiTi?', a Kaishu typeface paired with `HuaTianSongTi?' by Huatian Information Industry. 2010-08-17 Teijo Kinnunen <Teijo.Kinnunen@nuance.com> [cache] Fix Savannah bug #30788. * src/cache/ftccache.c (FTC_Cache_Clear): Check `cache->buckets' for NULL too. 2010-08-10 Werner Lemberg <wl@gnu.org> Try to fix Savannah bug #30717 (and probably #30719 too). * src/smooth/ftsmooth.c (ft_smooth_render_generic): Add another overflow test for `width' and `height'. 2010-08-06 Werner Lemberg <wl@gnu.org> * Version 2.4.2 released. ========================= Tag sources with `VER-2-4-2'. * docs/CHANGES: Updated. * docs/VERSION.DLL: Update documentation and bump version number to 2.4.2 * README, Jamfile (RefDoc), builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html, builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html, builds/win32/visualc/freetype.dsp, builds/win32/visualc/freetype.vcproj, builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp, builds/win32/visualce/freetype.vcproj, builds/win32/visualce/index.html, builds/wince/vc2005-ce/freetype.vcproj, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/freetype.vcproj, builds/wince/vc2008-ce/index.html: s/2.4.1/2.4.2/, s/241/242/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 2. * builds/unix/configure.raw (version_info): Set to 12:0:6. 2010-08-06 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Fix Savannah bug #30648. * src/base/ftobjs.c (FT_Done_Library): Specify the order of font drivers during the face closing process. Type42 faces should be closed before TrueType faces, because a Type42 face refers to another internal TrueType face which is created from sfnt[] array on the memory. 2010-08-06 Yuriy Kaminskiy <yumkam@mail.ru> [raster] Fix valgrind warning. * src/raster/ftraster.c (Decompose_Curve) <default>: Access point[0] only if we don't hit `limit'. 2010-08-06 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Fix Savannah bug #30658. * src/base/ftobjs.c (Mac_Read_POST_Resource): Check that the total length of collected POST segments does not overrun the allocated buffer. 2010-08-06 Yuriy Kaminskiy <yumkam@mail.ru> Fix conditional usage of FT_MulFix_i386. With -ansi flag, gcc does not define `i386', only `__i386__'. * include/freetype/config/ftconfig.h, builds/unix/ftconfig.in: s/i386/__i386__/. 2010-08-05 Werner Lemberg <wl@gnu.org> [truetype] Fix Savannah bug #30657. * src/truetype/ttinterp.c (BOUNDSL): New macro. Change `BOUNDS' to `BOUNDSL' where appropriate. * src/truetype/ttinterp.h (TT_ExecContextRec): Fix type of `cvtSize'. 2010-08-05 Werner Lemberg <wl@gnu.org> [type42] Fix Savannah bug #30656. * src/type42/t42parse.c (t42_parse_sfnts): Protect against negative string_size. Fix comparison. 2010-08-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [cff] Don't use any values in decoder after parsing error. * src/cff/cffgload.c (cff_slot_load): Skip the evaluations of the values in decoder, if `cff_decoder_parse_charstrings' returns any error. 2010-08-04 Werner Lemberg <wl@gnu.org> Fix Savannah bug #30644. * src/base/ftstream.c (FT_Stream_EnterFrame): Fix comparison. 2010-08-04 Werner Lemberg <wl@gnu.org> `make devel' fails if FT_CONFIG_OPTION_OLD_INTERNALS is set. * devel/ftoption.h: Synchronize with include/freetype/config/ftoption.h. 2010-08-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [cff] Improve stack overflow test. * src/cff/cffgload.c (cff_decoder_parse_charstrings): Check stack after execution of operations too. 2010-07-18 Werner Lemberg <wl@gnu.org> Add reference counters and to FT_Library and FT_Face objects. * include/freetype/freetype.h (FT_Reference_Face): New function. * include/freetype/ftmodapi.h (FT_Reference_Library): New function. * include/freetype/internal/ftobjs.h (FT_Face_InternalRec, FT_LibraryRec): New field `refcount'. * src/base/ftobjs.c (FT_Open_Face, FT_New_Library): Handle `refcount'. (FT_Reference_Face, FT_Reference_Library): Implement new functions. (FT_Done_Face, FT_Done_Library): Handle `refcount'. * docs/CHANGES: Updated. 2010-07-18 Werner Lemberg <wl@gnu.org> * Version 2.4.1 released. ========================= Tag sources with `VER-2-4-1'. * docs/CHANGES: Updated. * docs/VERSION.DLL: Update documentation and bump version number to 2.4.1. * README, Jamfile (RefDoc), builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html, builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html, builds/win32/visualc/freetype.dsp, builds/win32/visualc/freetype.vcproj, builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp, builds/win32/visualce/freetype.vcproj, builds/win32/visualce/index.html, builds/wince/vc2005-ce/freetype.vcproj, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/freetype.vcproj, builds/wince/vc2008-ce/index.html: s/2.4.0/2.4.1/, s/240/241/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1. * builds/unix/configure.raw (version_info): Set to 11:1:5. 2010-07-17 Werner Lemberg <wl@gnu.org> [cff] Final try to fix `hintmask' and `cntrmask' limit check. Problem reported by Tobias Wolf <towolf@gmail.com>. * src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_hintmask>: Sigh. I'm apparently too silly to fix this correctly in less than three tries. 2010-07-12 Werner Lemberg <wl@gnu.org> * Version 2.4.0 released. ========================= Tag sources with `VER-2-4-0'. * docs/CHANGES: Updated. * docs/VERSION.DLL: Update documentation and bump version number to 2.4.0. * README, Jamfile (RefDoc), builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html, builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html, builds/win32/visualc/freetype.dsp, builds/win32/visualc/freetype.vcproj, builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp, builds/win32/visualce/freetype.vcproj, builds/win32/visualce/index.html, builds/wince/vc2005-ce/freetype.vcproj, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/freetype.vcproj, builds/wince/vc2008-ce/index.html: s/2.3.12/2.4.0/, s/2312/240/. * include/freetype/freetype.h (FREETYPE_MINOR): Set to 4. (FREETYPE_PATCH): Set to 0. * builds/unix/configure.raw (version_info): Set to 11:0:5. 2010-07-12 Werner Lemberg <wl@gnu.org> Remove C++ warnings. */*: Initialize pointers where necessary to make g++ happy. 2010-07-12 malc <av1474@comtv.ru> Richard Henderson <rth@redhat.com> Fix type-punning issues with C++. * include/freetype/internal/ftmemory.h (FT_ASSIGNP) [__cplusplus]: Emulate a `typeof' operator with an inline template which uses `static_cast'. 2010-07-11 Werner Lemberg <wl@gnu.org> Fix C++ compilation issue. * src/tools/apinames.c (names_dump) <OUTPUT_WATCOM_LBC>: Fix type of `dot' variable. 2010-07-10 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Fix another case reported in Savannah bug #30373. Permit a face for Type1, Type42 and CFF without charmap, patch by Tor Andersson. * src/type1/t1objs.c (T1_Face_Init): Reset the error if it is FT_Err_No_Unicode_Glyph_Name. * src/type42/t42objs.c (T42_Face_Init): Ditto. * src/cff/cffobjs.c (cff_face_init): Ditto. 2010-07-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Use defined macros to set {platform,encoding}_id. * src/bdf/bdfdrivr.c: Include ttnameid.h and use macros to set charmap.{platform,encoding}_id. * src/pcf/pcfdrivr.c: Ditto. * src/winfonts/winfnt.c: Ditto. * src/type1/t1objs.c: Ditto. * src/type42/t42objs.c: Ditto. * src/cff/cffobjs.c: Ditto. * src/pfr/pfrobjs.c: Ditto. 2010-07-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Fix Savannah bug #30373. Too serious check of errors by `FT_CMap_New' since 2010-07-04 is fixed. Reported by Tor Andersson. * include/freetype/fterrdef.h (PSnames_Err_No_Unicode_Glyph_Name): New error code to indicate the Unicode charmap synthesis failed because no Unicode glyph name is found. * src/psnames/psmodule.c (ps_unicodes_init): Return PSnames_Err_No_Unicode_Glyph_Name when no Unicode glyph name is found in the font. * src/cff/cffcmap.c (cff_cmap_unicode_init): Return CFF_Err_No_Unicode_Glyph_Name when no SID is available. * src/type1/t1objs.c (T1_Face_Init): Proceed if `FT_CMap_New' is failed by the lack of Unicode glyph name. * src/type42/t42objs.c (T42_Face_Init): Ditto. * src/cff/cffobjs.c (cff_face_init): Ditto. 2010-07-09 Ken Sharp <ken.sharp@artifex.com> Make ftraster.c compile in stand-alone mode with MSVC compiler. * src/raster/ftmisc.h (FT_Int64) [_WIN32, _WIN64]: Fix typedef since there is no `inttypes.h' for MSVC. 2010-07-08 Werner Lemberg <wl@gnu.org> [truetype] Fix Savannah bug #30361. * src/truetype/ttinterp.c (Ins_IUP): Fix bounds check. 2010-07-06 Werner Lemberg <wl@gnu.org> Pacify compiler. * src/cff/cffload.c (cff_index_get_pointers): Initialize `new_bytes'. 2010-07-05 Eugene A. Shatokhin <spectre@ispras.ru> Fix Savannah bug #27648. * src/base/ftobjs.c (ft_remove_renderer, FT_Add_Module): Call `raster_done' only if we have an outline glyph format. 2010-07-05 Werner Lemberg <wl@gnu.org> Fix Savannah bug #30030. * builds/win32/*/freetype.vcproj: Add ftxf86.c. 2010-07-05 Werner Lemberg <wl@gnu.org> [cff] Next try to fix `hintmask' and `cntrmask' limit check. Problem reported by malc <av1474@comtv.ru>. * src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_hintmask>: It is possible that there is just a single byte after the `hintmask' or `cntrmask', e.g., a `return' instruction. 2010-07-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Restrict the number of the charmaps in a rogue-compatible mode. Fix for Savannah bug #30059. * src/cache/ftccmap.c (FTC_CMapCache_Lookup): Replace `16' the minimum character code passed by a legacy rogue client by... * include/freetype/config/ftoption.h (FT_MAX_CHARMAP_CACHEABLE): This. It is undefined when FT_CONFIG_OPTION_OLD_INTERNALS is undefined (thus the rogue client compatibility is not required). * src/cff/cffobjs.c (cff_face_init): Abort the automatic selection or synthesis of Unicode cmap subtable when the charmap index exceeds FT_MAX_CHARMAP_CACHEABLE. * src/sfnt/ttcmap.c (tt_face_build_cmaps): Issue error message when the charmap index exceeds FT_MAX_CHARMAP_CACHEABLE. * src/base/ftobjs.c (find_unicode_charmap): When Unicode charmap is found after FT_MAX_CHARMAP_CACHEABLE, ignore it and search earlier one. (find_variant_selector_charmap): When UVS charmap is found after FT_MAX_CHARMAP_CACHEABLE, ignore it and search earlier one. (FT_Select_Charmap): When a charmap matching with requested encoding but after FT_MAX_CHARMAP_CACHEABLE, ignore and search earlier one. (FT_Set_Charmap): When a charmap matching with requested charmap but after FT_MAX_CHARMAP_CACHEABLE, ignore and search earlier one. (FT_Get_Charmap_Index): When a requested charmap is found after FT_MAX_CHARMAP_CACHEABLE, return the inverted charmap index. 2010-07-04 Werner Lemberg <wl@gnu.org> TrueType hinting is no longer patented. * include/freetype/config/ftoption.h, devel/ftoption.h (TT_CONFIG_OPTION_BYTECODE_INTERPRETER): Define. (TT_CONFIG_OPTION_UNPATENTED_HINTING): Undefine. * docs/CHANGES, docs/INSTALL, include/freetype/freetype.h: Updated. * docs/TRUETYPE, docs/PATENTS: Removed. 2010-07-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Check error value by `FT_CMap_New'. * src/cff/cffobjs.c (cff_face_init): Check error value by `FT_CMap_New'. * src/pfr/pfrobjs.c (pfr_face_init): Ditto. * src/type1/t1objs.c (T1_Face_Init): Ditto. * src/type42/t42objs.c (T42_Face_Init): Ditto. 2010-07-03 Werner Lemberg <wl@gnu.org> Make ftgrays.c compile stand-alone again. * src/smooth/ftgrays.c [_STANDALONE_]: Include `stddef.h'. (FT_INT_MAX, FT_PtrDist)[_STANDALONE_]: Define. 2010-07-02 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Additional fix for Savannah bug #30306. * src/base/ftobjs.c (Mac_Read_POST_Resource): If the type of the POST fragment is 0, the segment is completely ignored. The declared length of the segment is not cared at all. According to Adobe Technical Note 5040, type 0 segment is a comment only and should not be loaded for the interpreter. Reported by Robert Święcki. 2010-07-01 Werner Lemberg <wl@gnu.org> [truetype] Protect against code range underflow. * src/truetype/ttinterp.c (DO_JROT, DO_JMPR, DO_JROF): Don't allow negative IP values. 2010-07-01 Werner Lemberg <wl@gnu.org> [truetype] Add rudimentary tracing for bytecode instructions. * src/truetype/ttinterp.c (opcode_name) [FT_DEBUG_LEVEL_TRACE]: New array. (TT_RunIns): Trace opcodes. 2010-06-30 Werner Lemberg <wl@gnu.org> [smooth] Fix Savannah bug #30263. * src/smooth/ftgrays.c (gray_render_span): Use cast to `unsigned int' to avoid integer overflow. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Use smaller threshold values for `width' and `height'. This is not directly related to the bug fix but makes sense anyway. 2010-07-01 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Initial fix for Savannah bug #30306. * src/base/ftobjs.c (Mac_Read_POST_Resource): Check `rlen', the length of fragment declared in the POST fragment header, and prevent an underflow in length calculation. Some fonts set the length to zero in spite of the existence of a following 16bit `type'. Reported by Robert Święcki. 2010-07-01 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Additional fix for Savannah bug #30248 and #30249. * src/base/ftobjs.c (Mac_Read_POST_Resource): Check the buffer size during gathering PFB fragments embedded in LaserWriter PS font for Macintosh. Reported by Robert Święcki. 2010-06-30 Alexei Podtelezhnikov <apodtele@gmail.com> Minor optimizations by avoiding divisions. * src/sfnt/ttkern.c (tt_face_load_kern, tt_face_get_kerning): Replace divisions with multiplication in comparisons. 2010-06-29 Werner Lemberg <wl@gnu.org> Fix minor tracing issues. * src/cff/cffgload.c, src/truetype/ttgload.c: Adjust tracing levels. 2010-06-27 Werner Lemberg <wl@gnu.org> [cff] Really fix `hintmask' and `cntrmask' limit check. * src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_hintmask>: Fix thinko and handle tracing also. 2010-06-27 Werner Lemberg <wl@gnu.org> Fix valgrind warning. * src/base/ftoutln.c (FT_Outline_Get_Orientation): Initialize `result' array. 2010-06-27 Werner Lemberg <wl@gnu.org> [cff] Fix memory leak. * src/cff/cffgload.c (cff_operator_seac): Free charstrings even in case of errors. 2010-06-27 Werner Lemberg <wl@gnu.org> [cff] Protect against invalid `hintmask' and `cntrmask' operators. * src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_hintmask>: Ensure that we don't exceed `limit' while parsing the bit masks of the `hintmask' and `cntrmask' operators. 2010-06-26 Werner Lemberg <wl@gnu.org> Fix PFR change 2010-06-24. * src/pfr/pfrgload.c (pfr_glyph_load_simple): Really protect against invalid indices. 2010-06-26 Werner Lemberg <wl@gnu.org> Improve PFR tracing messages. * src/pfr/pfrgload.c (pfr_glyph_load_rec): Emit tracing messages for simple and compound glyph offsets. 2010-06-26 Werner Lemberg <wl@gnu.org> Fix last PFR change. * src/pfr/pfrobjs.c (pfr_face_init): Fix rejection logic. 2010-06-26 Werner Lemberg <wl@gnu.org> [sfnt] Fix Savannah bug #30262. * src/sfnt/ttload.c (tt_face_load_maxp): Limit `maxComponentDepth' arbitrarily to 100 to avoid stack exhaustion. 2010-06-26 Werner Lemberg <wl@gnu.org> Add some memory checks (mainly for debugging). * src/base/ftstream.c (FT_Stream_EnterFrame): Exit with error if the frame size is larger than the stream size. * src/base/ftsystem.c (ft_ansi_stream_io): Exit with error if seeking a position larger than the stream size. 2010-06-25 Werner Lemberg <wl@gnu.org> [pfr] Fix Savannah bug #30261. * src/pfr/pfrobjs.c (pfr_face_init): Reject fonts which contain neither outline nor bitmap glyphs. 2010-06-25 Werner Lemberg <wl@gnu.org> [cff] Fix Savannah bug #30254. * src/cff/cffload.c (cff_index_get_pointers): Do sanity check for first offset also. 2010-06-25 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Initial fix for Savannah bug #30248 and #30249. * src/base/ftobjs.c (Mac_Read_POST_Resource): Check the error during reading a PFB fragment embedded in LaserWriter PS font for Macintosh. Reported by Robert Święcki. 2010-06-24 Werner Lemberg <wl@gnu.org> [pcf] Fix Savannah bug #30247. * src/pcf/pcfread.c (pcf_get_metrics): Disallow (invalid) fonts with zero metrics. 2010-06-24 Graham Asher <graham.asher@btinternet.com> * src/smooth/ftgrays.c (gray_render_cubic): Fix algorithm. The previous version was too aggressive, as demonstrated in https://lists.gnu.org/archive/html/freetype-devel/2010-06/msg00020.html. 2010-06-24 Werner Lemberg <wl@gnu.org> */*: Use module specific error names where appropriate. 2010-06-24 Werner Lemberg <wl@gnu.org> [sfnt] Fix Savannah bug #30236. * src/sfnt/ttcmap.c (tt_face_build_cmaps): Improve check for pointer to `cmap_table'. 2010-06-24 Werner Lemberg <wl@gnu.org> [pfr] Fix Savannah bug #30235. * src/pfr/pfrgload.c (pfr_glyph_load_simple): Protect against invalid indices if there aren't any coordinates for indexing. 2010-06-24 Werner Lemberg <wl@gnu.org> [bdf]: Font properties are optional. * src/bdf/bdflib.c (_bdf_readstream): Use special error code to indicate a redo operation. (_bdf_parse_start): Handle `CHARS' keyword here too and pass current input line to `_bdf_parse_glyph'. 2010-06-23 Werner Lemberg <wl@gnu.org> [bdf] Fix Savannah bug #30220. * include/freetype/fterrdef.h (BDF_Err_Missing_Fontboundingbox_Field): New error code. * src/bdf/bdflib.c (_bdf_parse_start): Check for missing `FONTBOUNDINGBOX' field. Avoid memory leak if there are multiple `FONT' lines (which is invalid but doesn't hurt). 2010-06-21 Werner Lemberg <wl@gnu.org> [pfr] Fix Savannah bug #30168. * src/pfr/pfrgload.c (pfr_glyph_load_compound): Limit the number of subglyphs to avoid endless recursion. 2010-06-20 Werner Lemberg <wl@gnu.org> [psaux] Fix Savannah bug #30145. * src/psaux/psobjs.c (t1_builder_add_contour): Protect against `outline == NULL' which might happen in invalid fonts. 2010-06-19 Werner Lemberg <wl@gnu.org> [bdf] Fix Savannah bug #30135. * src/bdf/bdflib.c (_bdf_list_join): Don't modify value in static string `empty'. (_bdf_parse_glyph): Avoid memory leak in case of error. 2010-06-15 Werner Lemberg <wl@gnu.org> [autofit] Fix Savannah bug #30108. * src/autofit/afglobal.c (af_face_globals_compute_script_coverage): Properly mask AF_DIGIT bit in comparison. 2010-06-11 Werner Lemberg <wl@gnu.org> [pshinter] Fix Savannah bug #30106. Point numbers for FreeType's implementation of hinting masks are collected before the final number of points of a glyph has been determined; in particular, the code for handling the `endchar' opcode can reduce the number of points. * src/pshinter/pshalgo.c (psh_glyph_find_strong_points): Assure that `end_point' is not larger than `glyph->num_points'. 2010-06-11 Werner Lemberg <wl@gnu.org> [cff]: Improve debugging output. * src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_hintmask>: Implement it. 2010-06-10 Graham Asher <graham.asher@btinternet.com> ftgrays: Speed up rendering of small cubic splines. * src/smooth/ftgrays.c (gray_render_cubic): Implement new, simplified algorithm to find out whether the spline can be replaced with two straight lines. See this thread for more: https://lists.gnu.org/archive/html/freetype-devel/2010-06/msg00000.html 2010-06-09 Werner Lemberg <wl@gnu.org> [cff] Fix Savannah bug #30082. * src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_callothersubr>: Protect against stack underflow. 2010-06-08 Werner Lemberg <wl@gnu.org> [cff] Fix Savannah bug #30053. * src/cff/cffparse.c (cff_parse_real): Handle border case where `fraction_length' has value 10. 2010-06-07 Werner Lemberg <wl@gnu.org> Fix Savannah bug #30052. This bug has been introduced with commit 2415cbf3. * src/base/ftobjs.c (FT_Get_First_Char, FT_Get_Next_Char): Protect against endless loop in case of corrupted font header data. 2010-05-26 Werner Lemberg <wl@gnu.org> Remove unused variable. Found by Graham. * src/autofit/afhints.c (af_glyph_hints_reload): Remove unused variable `first' in first block. 2010-05-22 Werner Lemberg <wl@gnu.org> Fix various memory problems found by linuxtesting.org. * src/base/ftgxval.c (FT_TrueTypeGX_Free, FT_ClassicKern_Free), src/base/ftotval.c (FT_OpenType_Free), src/base/ftpfr.c (ft_pfr_check): Check `face'. * src/base/ftobjs.c (FT_Get_Charmap_Index): Check `charmap' and `charmap->face'. (FT_Render_Glyph): Check `slot->face'. (FT_Get_SubGlyph_Info): Check `glyph->subglyphs'. 2010-05-22 Werner Lemberg <wl@gnu.org> autofit: Remove dead code. Suggested by Graham. * src/autofit/afhints.c (af_glyph_hints_compute_inflections): Removed. (af_glyph_hints_reload): Remove third argument. Update all callers. 2010-05-21 Bram Tassyns <bramt@enfocus.be> [cff] Fix Savannah bug #27987. * src/cff/cffobjs.c (remove_subset_prefix): New function. (cff_face_init): Use it to adjust `cffface->family_name'. 2010-05-20 Werner Lemberg <wl@gnu.org> TrueType: Make FreeType ignore maxSizeOfInstructions in `maxp'. Acroread does the same. * src/truetype/ttgload.c (TT_Process_Composite_Glyph): Call `Update_Max' to adjust size of instructions array if necessary and add a rough safety check. (load_truetype_glyph): Save `loader->byte_len' before recursive call. * src/truetype/ttinterp.h, src/truetype/ttinterp.c (Update_Max): Declare it as FT_LOCAL. 2010-05-18 Hongbo Ni <hongbo@njstar.com> Apply Savannah patch #7196. * src/cff/cffgload.c (cff_slot_load): Prevent crash if CFF subfont index is out of range. 2010-05-11 Werner Lemberg <wl@gnu.org> * docs/formats.txt: Give pointer to PCF documentation. Information provided by Alan Coopersmith <alan.coopersmith@oracle.com>. 2010-05-10 Ken Sharp <ken.sharp@artifex.com> [psaux] Fix Savannah bug #29846. Previously we discovered fonts which used `setcurrentpoint' to set the initial point of a contour to 0,0. This caused FreeType to raise an error, because the `setcurrentpoint' operator is only supposed to be used with the results from an OtherSubr subroutine. This was fixed by simply ignoring the error and carrying on. Now we have found a font which uses setcurrentpoint to actually establish a non-zero point for a contour during the course of a glyph program. FWIW, these files may be produced by an application called `Intaglio' on the Mac, when converting TrueType fonts to Type 1. The fix allows the new invalid behaviour, the old invalid behaviour and real proper usage of the operator to work the same way as Adobe interpreters apparently do. * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Make `setcurrentpoint' use the top two elements of the stack to establish unconditionally the current x and y coordinates. Make the `flex' subroutine handling (OtherSubr 0) put the current x,y coordinates onto the stack, instead of two dummy uninitialised values. 2010-04-14 Ken Sharp <ken.sharp@artifex.com> [psaux] Fix Savannah bug #29444. * src/psaux/psobjs.c (t1_builder_start_point): Accept (invalid) `lineto' immediately after `hsbw', in accordance with Acrobat, GS, and others. 2010-04-14 Michał Cichoń <thedmd@artifexmundi.com> [psaux] Fix Savannah bug #27999. * src/cache/ftcmanag.c (FTC_Manager_RemoveFaceID): Only remove selected entry, not all. 2010-04-06 Jonathan Kew <jfkthame@gmail.com> [truetype] Add overflow check to `fvar' table. * src/truetype/ttgxvar.c (TT_Get_MM_Var): Check axis and instance count. 2010-04-05 Ken Sharp <ken.sharp@artifex.com> [raster] Fix Savannah bug #29335. * src/raster/ftraster.c (Line_Up): Use slow multiplication to prevent overflow. This shouldn't have any serious impact on speed, however. 2010-04-05 Werner Lemberg <wl@gnu.org> Add new function `FT_Library_SetLcdFilterWeights'. This is based on code written by Lifter <https://unixforum.org/index.php?showuser=11691>. It fixes FreeDesktop bug #27386. * src/base/ftlcdfil.c (FT_Library_SetLcdFilterWeights): New function. * include/freetype/ftlcdfil.h: Updated. * docs/CHANGES: Updated. 2010-04-01 John Tytgat <John.Tytgat@esko.com> [truetype] Fix Savannah bug #29404. * src/truetype/ttgload.c: Revert change 2752bd1a (check on bit 1 of `head' table of TrueType fonts). 2010-03-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Fix `multi build' for Tytgat's CFF driver improvement. * src/base/cffload.h (cff_index_get_name): Added. 2010-03-12 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Remove duplicated inclusion of `FT_OUTLINE_H' in ftobjs.c. * src/base/ftobjs.c: Remove 2nd inclusion of `FT_OUTLINE_H'. 2010-03-11 Chris Liddell <chris.liddell@artifex.com> [raster] Fix Savannah bug #27442. * src/raster/ftraster.c (ft_black_reset): Fix `buffer_size'. 2010-03-09 Werner Lemberg <wl@gnu.org> [cff] Remove unused variable. Reported by Graham. * src/cff/cffparse.c (cff_parse_real): Remove `rest'. 2010-03-02 John Tytgat <John.Tytgat@esko.com> [cff] Improve CFF string (especially glyphname) lookup performance. We do this by avoiding memory allocation and file I/O. This is Savannah patch #7104. * src/cff/cfftypes.h: Include PS cmaps service and FT_INTERNAL_POSTSCRIPT_HINTS_H. (CFF_SubFontRec): Remove `num_local_subrs'. (CFF_FontRec): Add `num_strings', `strings', and `string_pool' fields. Remove `string_index' and `num_global_subrs' fields. Use real types instead of `void' for `pshinter' and `psnames' fields. * src/cff/cffload.c: Don't include PS cmaps service. (cff_index_get_pointers): Add `pool' parameter which allows inserting an extra NUL character for each String INDEX entry. (cff_index_get_name): Make it a local function. (cff_index_get_string): New function. (cff_subfont_load): Updated. (cff_font_load): Initialize `num_strings', `strings', and `string_pool' fields in the `CFF_FontRec' structure. (cff_index_get_sid_string): Use `cff_index_get_string' instead of `cff_index_get_name'. (cff_font_done): Updated. * src/cff/cffload.h: Don't include PS cmaps service. (cff_index_get_string): Added. (cff_index_get_sid_string): Updated. * src/cff/cffobjs.c: Don't include PS cmaps service and FT_INTERNAL_POSTSCRIPT_HINTS_H. (cff_size_get_globals_funcs, cff_slot_init): Updated. (cff_face_init): Follow `cff_index_get_name', `cff_index_get_string', and `cff_index_get_sid_string' changes. * src/cff/cffcmap.c (cff_sid_free_glyph_name): Removed. (cff_sid_to_glyph_name): Use `cff_index_get_cid_string'. (cff_cmap_unicode_init): Updated. * src/cff/cffdrivr.c: Don't include PS cmap service. (cff_get_glyph_name): Avoid unnecessary lookup for POSTSCRIPT_CMAPS service. (cff_get_glyph_name, cff_ps_get_font_info, cff_get_ros): Follow API `cff_index_get_sid_string' change. (cff_get_name_index): Use `cff_index_get_string' instead of `cff_index_get_name'. * src/cff/cffgload.c: Don't include FT_INTERNAL_POSTSCRIPT_HINTS_H. (cff_decoder_init, cff_decoder_prepare): Updated. 2010-02-27 Werner Lemberg <wl@gnu.org> Simplify code. Suggested by Behdad. * src/base/ftobjs.c (FT_Get_First_Char): Don't use a loop since we call FT_Get_Next_Char anyway if necessary. 2010-02-26 Behdad Esfahbod <behdad@behdad.org> Improve handling of invalid glyph indices in char->index functions. * src/base/ftobjs.c (FT_Get_First_Char, FT_Get_Next_Char): Use a loop. 2010-02-18 Chris Liddell <chris.liddell@artifex.com> [truetype] Fix Savannah bug #28905. Initialize phantom points before calling the incremental interface to update glyph metrics. * src/truetype/ttgload.c (tt_get_metrics_incr_overrides) [FT_CONFIG_OPTION_INCREMENTAL]: New function, split off from... (tt_get_metrics): This. Updated. (load_truetype_glyph): Use tt_get_metrics_incr_overrides. ---------------------------------------------------------------------------- Copyright (C) 2010-2022 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, and distributed under the terms of the FreeType project license, LICENSE.TXT. By continuing to use, modify, or distribute this file you indicate that you have read the license and understand and accept it fully. Local Variables: version-control: never coding: utf-8 End:
whupdup/frame
real/third_party/freetype-2.12.0/docs/oldlogs/ChangeLog.24
24
gpl-3.0
207,336
2014-12-30 Werner Lemberg <wl@gnu.org> * Version 2.5.5 released. ========================= Tag sources with `VER-2-5-5'. * docs/VERSION.DLL: Update documentation and bump version number to 2.5.5. * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj, builds/windows/vc2005/index.html, builds/windows/vc2008/freetype.vcproj, builds/windows/vc2008/index.html, builds/windows/vc2010/freetype.vcxproj, builds/windows/vc2010/index.html, builds/windows/visualc/freetype.dsp, builds/windows/visualc/freetype.vcproj, builds/windows/visualc/index.html, builds/windows/visualce/freetype.dsp, builds/windows/visualce/freetype.vcproj, builds/windows/visualce/index.html, builds/wince/vc2005-ce/freetype.vcproj, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/freetype.vcproj, builds/wince/vc2008-ce/index.html: s/2.5.4/2.5.5/, s/254/255/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 5. * builds/unix/configure.raw (version_info): Set to 17:4:11. * CMakeLists.txt (VERSION_PATCH): Set to 5. * docs/CHANGES: Updated. * builds/toplevel.mk (dist): Fix typos. 2014-12-24 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Formatting and nanooptimizations. * src/base/ftcalc.c, * src/base/fttrigon.c: Revise sign restoration. 2014-12-13 Werner Lemberg <wl@gnu.org> * src/pcf/pcfread.c (pcf_read_TOC): Improve fix from 2014-12-08. 2014-12-11 Werner Lemberg <wl@gnu.org> * builds/toplevel.mk (dist): Use older POSIX standard for `tar'. Apparently, BSD tar isn't capable yet of handling POSIX-1.2001 (contrary to GNU tar), so force the POSIX-1.1988 format. Problem reported by Stephen Fisher <sfisher@SDF.ORG>. 2014-12-11 Werner Lemberg <wl@gnu.org> * src/type42/t42parse.c (t42_parse_sfnts): Reject invalid TTF size. 2014-12-11 Werner Lemberg <wl@gnu.org> * src/base/ftobjs.c (FT_Get_Glyph_Name): Fix off-by-one check. Problem reported by Dennis Felsing <dennis@felsin9.de>. 2014-12-11 Werner Lemberg <wl@gnu.org> * src/type42/t42parse.c (t42_parse_sfnts): Check `string_size'. Problem reported by Dennis Felsing <dennis@felsin9.de>. 2014-12-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [gxvalid] Fix a naming convention conflicting with ftvalid. See previous changeset for otvalid. * src/gxvalid/{gxvcommn.h, gxvmort.h, gxvmorx.h}: Replace `valid' by `gxvalid'. * src/gxvalid/{gxvbsln.c, gxvcommn.c, gxvfeat.c, gxvjust.c, gxvkern.c, gxvlcar.c, gxvmort.c, gxvmort0.c, gxvmort1.c, gxvmort2.c, gxvmort4.c, gxvmort5.c, gxvmorx.c, gxvmorx0.c, gxvmorx1.c, gxvmorx2.c, gxvmorx4.c, gxvmorx5.c, gxvopbd.c, gxvprop.c, gxvtrak.c}: Replace `valid' by `gxvalid' if it is typed as GXV_Validator. 2014-12-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [otvalid] Fix a naming convention conflicting with ftvalid. Some prototypes in ftvalid.h use `valid' for the variables typed as FT_Validator. Their implementations in src/base/ ftobjs.c and utilizations in src/sfnt/ttcmap.c do similar. Some macros in otvcommn.h assume the exist of the variable `valid' typed as OTV_Validator in the caller. Mixing these two conventions cause invalid pointer conversion and unexpected SEGV in longjmp. To prevent it, all variables typed as OTV_Validator are renamed to `otvalid'. * src/otvalid/otvcommn.h: Replace `valid' by `otvalid'. * src/otvalid/{otvcommn.c, otvbase.c, otvgdef.c, otvgpos.c, otvgsub.c, otvjstf.c, otvmath.c}: Replace `valid' by `otvalid' if it is typed as OTV_Validator. 2014-12-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [ftvalid] Introduce FT_THROW() in FT_INVALID_XXX macros. Original patch is designed by Werner Lemberg. Extra part for otvalid and gxvalid are added by suzuki toshiya, see discussion: https://lists.nongnu.org/archive/html/freetype-devel/2014-12/msg00002.html https://lists.nongnu.org/archive/html/freetype-devel/2014-12/msg00007.html * include/internal/ftvalid.h: Introduce FT_THROW() in FT_INVALID_(). * src/gxvalid/gxvcommn.h: Ditto. * src/otvalid/otvcommn.h: Ditto. 2014-12-08 Werner Lemberg <wl@gnu.org> [pcf] Fix Savannah bug #43774. Work around `features' of X11's `pcfWriteFont' and `pcfReadFont' functions. Since the PCF format doesn't have an official specification, we have to exactly follow these functions' behaviour. The problem was unveiled with a patch from 2014-11-06, fixing issue #43547. * src/pcf/pcfread.c (pcf_read_TOC): Don't check table size for last element. Instead, assign real size. 2014-12-07 Werner Lemberg <wl@gnu.org> Work around a bug in Borland's C++ compiler. See http://qc.embarcadero.com/wc/qcmain.aspx?d=118998 for Borland's bug tracker entry. Reported by Yuliana Zigangirova <zigangirova@inbox.ru>, https://lists.gnu.org/archive/html/freetype-devel/2014-04/msg00001.html. * include/internal/ftvalid.h (FT_ValidatorRec), src/smooth/ftgrays.c (gray_TWorker_): Move `ft_jmp_buf' field to be the first element. 2014-12-07 Werner Lemberg <wl@gnu.org> */*: Decorate hex constants with `U' and `L' where appropriate. 2014-12-07 Werner Lemberg <wl@gnu.org> [truetype] Prevent memory leak for buggy fonts. * src/truetype/ttobjs.c (tt_size_done): Unconditionally call `tt_size_done_bytecode'. 2014-12-06 Werner Lemberg <wl@gnu.org> * Version 2.5.4 released. ========================= Tag sources with `VER-2-5-4'. * docs/VERSION.DLL: Update documentation and bump version number to 2.5.4. * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj, builds/windows/vc2005/index.html, builds/windows/vc2008/freetype.vcproj, builds/windows/vc2008/index.html, builds/windows/vc2010/freetype.vcxproj, builds/windows/vc2010/index.html, builds/windows/visualc/freetype.dsp, builds/windows/visualc/freetype.vcproj, builds/windows/visualc/index.html, builds/windows/visualce/freetype.dsp, builds/windows/visualce/freetype.vcproj, builds/windows/visualce/index.html, builds/wince/vc2005-ce/freetype.vcproj, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/freetype.vcproj, builds/wince/vc2008-ce/index.html: s/2.5.3/2.5.4/, s/253/254/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 4. * builds/unix/configure.raw (version_info): Set to 17:3:11. * CMakeLists.txt (VERSION_PATCH): Set to 4. * docs/CHANGES: Updated. 2014-12-04 Werner Lemberg <wl@gnu.org> docs/CHANGES: Updated, formatted. 2014-12-04 Dave Arnold <darnold@adobe.com> [cff] Modify an FT_ASSERT. * src/cff/cf2hints.c (cf2_hintmap_map): After the fix for Savannah bug #43661, the test font `...aspartam.otf' still triggers an FT_ASSERT. Since hintmap still works with count==0, ... (cf2_glyphpath_lineTo, cf2_glyphpath_curveTo): ... add that term to suppress the assert. 2014-12-04 Dave Arnold <darnold@adobe.com> [cff] Fix Savannah bug #43661. * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdHSTEM, cf2_cmdVSTEM, cf2_cmdHINTMASK>: Don't append to stem arrays after hintmask is constructed. * src/cff/cf2hints.c (cf2_hintmap_build): Add defensive code to avoid reading past end of hintmask. 2014-12-03 Werner Lemberg <wl@gnu.org> docs/CHANGES: Updated. 2014-12-03 Werner Lemberg <wl@gnu.org> [autofit] Better fix for conversion specifiers in debug messages. Using `%ld' for pointer differences causes warnings on 32bit platforms. The correct type would be (the relatively new) `%td', however, this is missing on some important platforms. This patch improves the change from 2014-11-28. * src/autofit/afhints.c (AF_INDEX_NUM): Use `int' typecast. Our pointer differences are always sufficiently small. (af_glyph_hints_dump_points, af_glyph_hints_dump_segments, af_glyph_hints_dump_edge): Revert to `%d' and use `AF_INDEX_NUM'. 2014-12-03 Werner Lemberg <wl@gnu.org> FT_Sfnt_Tag: s/ft_sfnt_xxx/FT_SFNT_XXX/ for orthogonality. All public FreeType enumeration and flag values are uppercase... * include/tttables.h (FT_Sfnt_Tag): Implement it. For backward compatibility, retain the old values as macros. * src/base/ftfstype.c (FT_Get_FSType_Flags), src/sfnt/sfdriver.c (get_sfnt_table): Updated. 2014-12-02 Werner Lemberg <wl@gnu.org> * include/*: Improve structure of documentation. . Add and update many `<Order>' tags. . Apply various documentation fixes. . Remove details to deprecated (or never implemented) data. 2014-12-02 Werner Lemberg <wl@gnu.org> [docmaker] Always handle `<Order>' section elements. Previously, those elements were handled only for sections present in a `<Sections>' chapter element. * src/tools/docmaker/content.py (ContentProcessor::finish): Implement it. 2014-12-02 Werner Lemberg <wl@gnu.org> [docmaker] Properly handle empty rows in Synopsis. * src/tools/docmaker/tohtml.py (HtmlFormatter::section_enter): Emit `&nbsp;' for empty fields. 2014-12-02 Werner Lemberg <wl@gnu.org> [docmaker] Thinko. * src/tools/docmaker/content.py (DocBlock::get_markup_words_all): Emit `/empty/' string for first element also. 2014-12-02 Werner Lemberg <wl@gnu.org> [docmaker] Honour empty lines in `<Order>' section element. This greatly improves the readability of the `Synopsis' links. * src/tools/docmaker/content.py (DocBlock::get_markup_words_all): Insert string `/empty/' between items. * src/tools/docmaker/formatter.py (Formatter::section_dump): Make it robust against nonexistent keys. * src/tools/docmaker/tohtml.py (HtmlFormatter::section_enter): Emit empty <td> elements for `/empty/'. 2014-12-02 Werner Lemberg <wl@gnu.org> [docmaker] Ensure Python 3 compatibility. * src/tools/docmaker/content.py (ContentProcessor::set_section, ContentProcessor::finish): Replace `has_key' function with `in' keyword. * src/tools/docmaker/formatter.py (Formatter::__init__): Replace sorting function with a key generator. (Formatter::add_identifier): Replace `has_key' function with `in' keyword. * src/tools/docmaker/tohtml.py (HtmlFormatter::html_source_quote): Replace `has_key' function with `in' keyword. (HtmlFormatter::index_exit, HtmlFormatter::section_enter): Use integer division. s/<>/>/. * src/tools/docmaker/utils.py: Import `itertools'. (index_sort): Replaced by... (index_key): ... this new key generator (doing exactly the same). 2014-11-29 Werner Lemberg <wl@gnu.org> [docmaker] Don't output a block multiple times. This bug was hidden by not processing all lines of `<Order>' blocks. * src/tools/docmaker/formatter.py (Formatter::section_dump): Filter out field names. 2014-11-29 Werner Lemberg <wl@gnu.org> [docmaker] Use field values as HTML link targets where possible. * src/tools/docmaker/tohtml.py (HtmlFormatter::make_block_url): Accept second, optional argument to specify a name. (HtmlFormatter::html_source_quote): Link to field ID if possible. (HtmlFormatter::print_html_field_list): Emit `id' attribute. 2014-11-29 Werner Lemberg <wl@gnu.org> [docmaker] Allow empty lines in `<Order>' blocks. Before this patch, the suggested order of entries stopped at the first empty line. Obviously, nobody noticed that this problem caused a much reduced set of links in the `Synopsis' sections; in particular, the `<Order>' blocks contain a lot of entries that wouldn't be listed otherwise... * src/tools/docmaker/content.py (DocBlock::get_markup_words_all): New function to iterate over all items. (DocSection::process): Use it. 2014-11-29 Werner Lemberg <wl@gnu.org> * src/tools/docmaker/sources.py (column) [Format 2]: Fix regexp. After the single asterisk there must be no other immediately following asterisk. 2014-11-29 Werner Lemberg <wl@gnu.org> * src/tools/docmaker/tohtml.py: Improve CSS for vertical spacing. 2014-11-29 Werner Lemberg <wl@gnu.org> [docmaker] Improve HTML code for table of contents. * src/tools/docmaker/tohtml.py: Introduce a new table class `toc', together with proper CSS. 2014-11-29 Werner Lemberg <wl@gnu.org> [docmaker] Provide higher-level markup and simplify HTML. * src/tools/docmaker/tohtml.py: Instead of using extraneous `<div>' elements, use CSS descendants (of class `section') to format the data. Also remove redundant <p> and <br> elements, replacing them with proper CSS. Globally reduce page width to 75%. (block_header): Rename <div> class to `section'. 2014-11-29 Werner Lemberg <wl@gnu.org> [docmaker] Add `top' links after blocks. * src/tools/docmaker/tohtml.py (block_footer_middle): Implement it. 2014-11-29 Werner Lemberg <wl@gnu.org> * src/tools/docmaker/tohtml.py: Improve CSS for fields. Make fields align horizontally relative to full line width. 2014-11-29 Werner Lemberg <wl@gnu.org> * src/tools/docmaker/tohtml.py: Fix index and TOC templates. This thinko was introduced 2014-11-27. 2014-11-28 Werner Lemberg <wl@gnu.org> [docmaker] Format field lists with CSS. This also simplifies the inserted HTML code. * src/tools/docmaker/tohtml.py (HtmlFormatter::print_html_field_list): Do it. 2014-11-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Fix compiler warning to the comparison between signed and unsigned variable. * src/pfr/pfrsbit.c (pfr_slot_load_bitmap): Fix the comparison between `ypos + ysize' and FT_INT_{MAX,MIN}. 2014-11-28 Werner Lemberg <wl@gnu.org> [docmaker] Replace empty `<td>' with CSS. * src/tools/docmaker/tohtml.py (HtmlFormatter::section_enter): Do it. 2014-11-28 Werner Lemberg <wl@gnu.org> [docmaker] Replace some `<table>' tags with `<h4>' and `<div>'. * src/tools/docmaker/tohtml.py (marker_*): Use `<h4>'. (source_*): Use `<div>'. (HtmlFormatter::block_enter): s/<h4>/<h3>/. 2014-11-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Fix compiler warning to conversion specifiers in debug messages. * src/autofit/afhints.c (af_glyph_hints_dump_points): Add length modifier to dump long integers. (af_glyph_hints_dump_segments, af_glyph_hints_dump_edges): Ditto. 2014-11-27 Werner Lemberg <wl@gnu.org> * src/tools/docmaker/tohtml.py: Use more CSS for index. 2014-11-27 Werner Lemberg <wl@gnu.org> [docmaker] Replace `name' attribute of `<a>' with `id'. * src/tools/docmaker/tohtml.py (HtmlFormatter::block_enter): Do it. 2014-11-27 Werner Lemberg <wl@gnu.org> * src/tools/docmaker/tohtml.py: Remove remaining `width' attributes. For `Index' and `TOC' links, we now simply use the `text-align' CSS property of `<td>' to enforce flush-left and flush-right, eliminating the hack with an empty, full-width `<td>' element inbetween. The change also enforces the same (smaller) size for all index and TOC links. 2014-11-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * src/cff/cf2font.c: Include `ftcalc.h' to use FT_MSB(), cf2font.c could not find it under `make multi' build. 2014-11-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * src/smooth/ftsmooth.c (ft_smooth_render_generic): Remove unrequired negative value check for `width' and `height'. 2014-11-27 Werner Lemberg <wl@gnu.org> * src/tools/docmaker/tohtml.py: More HTML table refactoring. Replace some `<table>' tags with `<div>' to simplify structure. Move `bgcolor' attribute to CSS. Replace most `width' attributes with CSS. The remaining instances (providing a similar effect as LaTeX's `\hfill' command) are removed in a later patch. 2014-11-27 Werner Lemberg <wl@gnu.org> * src/tools/docmaker/tohtml.py: Replace <font> with CSS. 2014-11-27 Werner Lemberg <wl@gnu.org> * src/tools/docmaker/tohtml.py: Center <table> with CSS. 2014-11-27 Werner Lemberg <wl@gnu.org> * src/tools/docmaker/tohtml.py: Replace `<center>' with `<div>'. 2014-11-27 Werner Lemberg <wl@gnu.org> * src/tools/docmaker/tohtml.py: Remove redundant `<center>' tags. This starts a series of commits into the direction of generating valid HTML 5 code, especially using much more CSS. 2014-11-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Prevent too negative values (< FT_INT_MIN) in bitmap metrics, suggested by Alexei. * src/pfr/pfrsbit.c (pfr_slot_load_bitmap): Prevent too negative values in `xpos' and `ypos + ysize'. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Prevent too negative values in `x_left' and `y_top'. Either negative values in `width' and `height' are checked. 2014-11-27 Werner Lemberg <wl@gnu.org> [docmaker] Produce better HTML code. * src/tools/docmaker/tohtml.py: Always use double quotes for attribute values. (source_footer): Close `td' and `tr' groups. 2014-11-27 Werner Lemberg <wl@gnu.org> Use better way to disable creation of .pyc files for `make refdoc'. Python 2.6 was released in 2008... * builds/freetype.mk (refdoc): Use python's `-B' option. * builds/detect.mk (std_setup, dos_setup): Mention required python version for `refdoc' target. 2014-11-27 Werner Lemberg <wl@gnu.org> * src/tools/docmaker/sources.py (re_bold, re_italic): Use non-grouping parentheses. * src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_word): Updated. 2014-11-27 Werner Lemberg <wl@gnu.org> * src/base/ftobjs.c (FT_Get_Glyph_Name): Fix compiler warning. Introduced in previous change. Reported by Alexei. 2014-11-26 Werner Lemberg <wl@gnu.org> * src/*: Add checks for parameters of API functions where missing. `API functions' are functions tagged with `FT_EXPORT_DEF'. Besides trivial fixes, the following changes are included, too. * src/base/ftbdf.c (FT_Get_BDF_Charset_ID, FT_Get_BDF_Property): Set error code if no service is available. * src/base/ftinit.c (FT_Done_FreeType): Change return value for invalid `library' parameter to `Invalid_Library_Handle'. * src/base/ftobjs.c (FT_New_Size): Change return value for invalid `asize' parameter to `Invalid_Argument'. * src/base/ftoutln.c (FT_Outline_Copy): Change return value for invalid `source' and `target' parameters to `Invalid_Outline'. (FT_Outline_Done_Internal): Change return value for invalid `outline' parameter to `Invalid_Outline'. 2014-11-26 Werner Lemberg <wl@gnu.org> * src/cache/ftcbasic.c: Use single calls to `FT_TRACE'. 2014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * src/base/ftobjs.c (Mac_Read_POST_Resource): Additional overflow check in the summation of POST fragment lengths, suggested by Mateusz Jurczyk <mjurczyk@google.com>. 2014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * src/base/ftobjs.c (Mac_Read_POST_Resource): Insert comments and fold too long tracing messages. 2014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Fix Savannah bug #43540. * src/base/ftmac.c (parse_fond): Prevent a buffer overrun caused by a font including too many (> 63) strings to store names[] table. 2014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * src/base/ftobjs.c (Mac_Read_POST_Resource): Use unsigned long variables to read the lengths in POST fragments. Suggested by Mateusz Jurczyk <mjurczyk@google.com>. 2014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Fix Savannah bug #43539. * src/base/ftobjs.c (Mac_Read_POST_Resource): Fix integer overflow by a broken POST table in resource-fork. 2014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Fix Savannah bug #43538. * src/base/ftobjs.c (Mac_Read_POST_Resource): Fix integer overflow by a broken POST table in resource-fork. 2014-11-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> * src/base/ftobjs.c (Mac_Read_POST_Resource): Avoid memory leak by a broken POST table in resource-fork. Return after freeing the buffered POST table when it is found to be broken. 2014-11-25 Werner Lemberg <wl@gnu.org> */*: s/Invalid_Argument/Invalid_Size_Handle/ where appropriate. 2014-11-25 Werner Lemberg <wl@gnu.org> */*: s/Invalid_Argument/Invalid_Stream_Handle/ where appropriate. 2014-11-25 Werner Lemberg <wl@gnu.org> */*: s/Invalid_Argument/Invalid_Library_Handle/ where appropriate. 2014-11-25 Werner Lemberg <wl@gnu.org> */*: s/Invalid_Argument/Invalid_Outline/ where appropriate. 2014-11-25 Werner Lemberg <wl@gnu.org> */*: s/Invalid_Argument/Invalid_Face_Handle/ where appropriate. 2014-11-24 Werner Lemberg <wl@gnu.org> [Savannah bug #43682] Adjust some renderer callbacks. * src/raster/ftraster.c (ft_black_set_mode): Change return type to `int' to stay in sync with `FT_Renderer_SetModeFunc' prototype. * src/smooth/ftgrays.c (gray_raster_set_mode): New dummy function for orthogonality. (ft_grays_raster): Use it. 2014-11-25 Werner Lemberg <wl@gnu.org> [Savannah bug #43682] Properly handle missing return errors. The functions in this patch *do* return non-trivial errors that must be taken care of. * src/autofit/afloader.c (af_loader_load_g), src/base/ftobjs.c (FT_Render_Glyph_Internal), src/base/ftoutln.c (FT_Outline_Render), src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_endchar>, src/psaux/psobjs.c (ps_parser_load_field_table), src/psaux/t1decode (t1_decoder_parse_charstrings) <op_endchar>, src/truetype/ttgload.c (load_truetype_glyph <subglyph loop>, tt_loader_init, TT_Load_Glyph), src/truetype/ttgxvar.c (TT_Set_MM_Blend), src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Do it. 2014-11-25 Werner Lemberg <wl@gnu.org> [Savannah bug #43682] Add/remove `void' casts to some functions. We use a cast to indicate that we intentionally ignore a function's return value. However, this doesn't apply to API functions where errors can only happen for trivially invalid input. * src/base/ftstroke.c (FT_Glyph_Stroke, FT_Glyph_StrokeBorder), src/base/ftsynth.c (FT_GlyphSlot_Embolden), src/cff/cffgload.c (cff_slot_load), src/pfr/pfrdrivr.c (pfr_get_kerning), src/type1/t1load.c (parse_encoding), src/type42/t42parse.c (t42_parse_encoding): Do it. 2014-11-25 Werner Lemberg <wl@gnu.org> [Savannah bug #43682] Change some signatures to `void' return type. * include/internal/pshints.h (PSH_Globals_SetScaleFunc), include/internal/sfnt.h (TT_Get_Metrics_Func), src/pshinter/pshglob.c (psh_globals_set_scale), src/pshinter/pshrec.c (ps_hints_init), src/sfnt/ttmtx.c (tt_face_get_metrics), src/truetype/ttinterp.c (TT_Goto_CodeRange, TT_Set_CodeRange, TT_Clear_CodeRange, TT_Done_Context, TT_Save_Context): Do it. * src/pshinter/pshglob.h, src/pshinter/pshrec.h, src/sfnt/ttmtx.h, src/truetype/ttgload.c (TT_Hint_Glyph), src/truetype/ttinterp.c (TT_Run_Context), src/truetype/ttinterp.h, src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Updated. 2014-11-24 Werner Lemberg <wl@gnu.org> Remove all code related to FT_MAX_CHARMAP_CACHEABLE. This is no longer used. * src/base/ftobjs.c, src/cache/ftccmap.c, src/cff/cffobjs.c, src/sfnt/ttcmap.c: Do it. 2014-11-24 Werner Lemberg <wl@gnu.org> [sfnt] Fix Savannah bug #43680. This adds an additional constraint to make the fix from 2013-01-25 really work. * src/sfnt/ttsbit.c (tt_sbit_decoder_load_image) <index_format==4>: Check `p' before `num_glyphs'. 2014-11-24 Werner Lemberg <wl@gnu.org> [truetype] Fix Savannah bug #43679. * src/truetype/ttpload.c (tt_face_load_hdmx): Check minimum size of `record_size'. 2014-11-24 Jarkko Pöyry <jarkko.poyry@gmail.com> [cff, pfr, psaux, winfonts] Fix Savannah bug #43676. Don't cast cmap init function pointers to an incompatible type. Without this patch, the number of parameters between declaration and the real signature differs. Calling such a function results in undefined behavior. ISO/IEC 9899:TC3 (Committee Draft September 7, 2007) 6.5.2.2 Function calls 9 If the function is defined with a type that is not compatible with the type (of the expression) pointed to by the expression that denotes the called function, the behavior is undefined. On certain platforms (c -> js with emscripten) this causes termination of execution or invalid calls because in the emscripten implementation, function pointers of different types are stored in different pointer arrays. Incorrect pointer type here results in indexing of an incorrect array. * src/cff/cffcmap.c (cff_cmap_encoding_init, cff_cmap_unicode_init), src/pfr/pfrcmap.c (pfr_cmap_init), src/psaux/t1cmap.c t1_cmap_standard_init, t1_cmap_expert_init, t1_cmap_custom_init, t1_cmap_unicode_init), src/winfonts/winfnt.c (fnt_cmap_init): Fix signature. 2014-11-24 Werner Lemberg <wl@gnu.org> [sfnt] Fix Savannah bug #43672. * src/sfnt/ttkern.c (tt_face_load_kern): Use correct value for minimum table length test. 2014-11-24 Werner Lemberg <wl@gnu.org> [type1, type42] Another fix for Savannah bug #43655. * src/type1/t1load.c (parse_charstrings), src/type42/t42parse.c (t42_parse_charstrings): Add another boundary testing. 2014-11-24 Werner Lemberg <wl@gnu.org> [docmaker] Formatting, copyright, improved documentation. * src/tools/docmaker/*: No code changes besides trivial modifications. 2014-11-22 Werner Lemberg <wl@gnu.org> [bdf] Fix Savannah bug #43660. * src/bdf/bdflib.c (_bdf_parse_glyphs) <"ENDFONT">: Check `_BDF_GLYPH_BITS'. 2014-11-22 Werner Lemberg <wl@gnu.org> [type42] Allow only embedded TrueType fonts. This is a follow-up to Savannah bug #43659. * src/type42/t42objs.c (T42_Face_Init): Exclusively use the `truetype' font driver for loading the font contained in the `sfnts' array. 2014-11-22 Werner Lemberg <wl@gnu.org> [type42] Fix Savannah bug #43659. * src/type42/t42objs.c (T42_Open_Face): Initialize `face->ttf_size'. * src/type42/t42parse.c (t42_parse_sfnts): Always set `face->ttf_size' directly. This ensures a correct stream size in the call to `FT_Open_Face', which follows after parsing, even for buggy input data. Fix error messages. 2014-11-22 Werner Lemberg <wl@gnu.org> [cff] Fix Savannah bug #43658. * src/cff/cf2ft.c (cf2_builder_lineTo, cf2_builder_cubeTo): Handle return values of point allocation routines. 2014-11-22 Werner Lemberg <wl@gnu.org> [sfnt] Fix Savannah bug #43656. * src/sfnt/ttcmap.c (tt_cmap4_validate): Fix order of validity tests. 2014-11-21 Werner Lemberg <wl@gnu.org> [type1, type42] Fix Savannah bug #43655. * src/type1/t1load.c (parse_charstrings), src/type42/t42parse.c (t42_parse_charstrings): Fix boundary testing. 2014-11-21 Werner Lemberg <wl@gnu.org> * src/pcf/pcfread.c (pcf_get_metrics): Sanitize invalid metrics. 2014-11-21 Werner Lemberg <wl@gnu.org> [ftlcdfil] Obey flow direction. * src/base/ftlcdfil.c (_ft_lcd_filter_fir, _ft_lcd_filter_legacy): Handle `up' flow. 2014-11-21 Werner Lemberg <wl@gnu.org> * src/base/ftbitmap.c (FT_Bitmap_Convert): Improve. This commit completes argument checks and adds support for different flow directions. 2014-11-21 Werner Lemberg <wl@gnu.org> * src/base/ftbitmap.c (FT_Bitmap_Copy): Improve. This commit adds argument checks and support for different flow directions. 2014-11-20 Werner Lemberg <wl@gnu.org> * src/base/ftbitmap.c (FT_Bitmap_New): Check argument. 2014-11-19 Werner Lemberg <wl@gnu.org> Change some fields in `FT_Bitmap' to unsigned type. This doesn't break ABI. * include/ftimage.h (FT_Bitmap): Make `rows', `width', `num_grays', `pixel_mode', and `palette_mode' unsigned types. * src/base/ftbitmap.c: Updated. (FT_Bitmap_Copy): Fix casts. * src/cache/ftcsbits.c, src/raster/ftraster.c, src/sfnt/pngshim.c: Updated. 2014-11-19 Werner Lemberg <wl@gnu.org> Make `FT_Bitmap_Convert' correctly handle negative `pitch' values. * src/base/ftbitmap.c (FT_Bitmap_Convert): Always use positive value for the pitch while copying data. Correctly set pitch sign in target bitmap. 2014-11-19 Werner Lemberg <wl@gnu.org> Minor code improvement in `FT_Bitmap_Embolden'. * src/base/ftbitmap.c (FT_Bitmap_Embolden) <FT_PIXEL_MODE_GRAY[24]>: Fix thinko. 2014-11-19 Alexei Podtelezhnikov <apodtele@gmail.com> * src/base/fttrigon.c: Use dedicated `FT_Angle' for arctan table. 2014-11-19 Behdad Esfahbod <behdad@behdad.org> Avoid compiler warnings on x86-64 for `FT_MulFix'. `FT_MulFix' takes `FT_Long' parameters as defined in `freetype.h', but several inline implementations of it in `ftcalc.h' take `FT_Int32' arguments. This is causing compiler warnings on x86-64: If parameters of type `FT_Fixed' (= `FT_Long') are passed to the inline implementation of this function, integer values are truncated from 64bit to 32bit. * include/internal/ftcalc.h (FT_MulFix) [FT_MULFIX_ASSEMBLER]: Add casts. 2014-11-15 Werner Lemberg <wl@gnu.org> [sfnt] Fix Savannah bug #43597. * src/sfnt/pngshim.c (Load_SBit_Png): Protect against too large bitmaps. 2014-11-12 Werner Lemberg <wl@gnu.org> [sfnt] Fix Savannah bug #43591. * src/sfnt/ttsbit.c (tt_sbit_decoder_init): Protect against addition and multiplication overflow. 2014-11-12 Werner Lemberg <wl@gnu.org> [sfnt] Fix Savannah bug #43590. * src/sfnt/ttload.c (check_table_dir, tt_face_load_font_dir): Protect against addition overflow. 2014-11-12 Werner Lemberg <wl@gnu.org> [sfnt] Fix Savannah bug #43589. * src/sfnt/sfobjs.c (woff_open_font): Protect against addition overflow. 2014-11-12 Werner Lemberg <wl@gnu.org> [sfnt] Fix Savannah bug #43588. * src/sfnt/ttcmap.c (tt_cmap8_validate, tt_cmap10_validate, tt_cmap12_validate, tt_cmap13_validate, tt_cmap14_validate): Protect against overflow in additions and multiplications. 2014-11-10 Alexei Podtelezhnikov <apodtele@gmail.com> [base] CORDIC improvements. The scaling between the hypotenuse and its CORDIC approximation is based on regression analysis. The smaller padding for `theta' is justified by its maximum error of less than 6. * src/base/fttrigon.c (ft_trig_downscale): Borrow code from ./ftcalc.c (ft_multo64), change linear intercept. (ft_trig_pseudo_polarize): Decrease `theta' padding. 2014-11-09 Werner Lemberg <wl@gnu.org> * src/base/ftstroke.c (ft_stroker_inside): Fix border intersections. One more place to check whether `radius' is zero. Problem reported by Marco Wertz <marco.wertz@gmx.de>. 2014-11-07 Werner Lemberg <wl@gnu.org> [bdf] Fix Savannah bug #43535. * src/bdf/bdflib.c (_bdf_strncmp): New macro that checks one character more than `strncmp'. s/ft_strncmp/_bdf_strncmp/ everywhere. 2014-11-06 Werner Lemberg <wl@gnu.org> [pcf] Fix Savannah bug #43548. * src/pcf/pcfread.c (pcf_get_encodings): Add sanity checks for row and column values. 2014-11-06 Werner Lemberg <wl@gnu.org> [pcf] Fix Savannah bug #43547. * src/pcf/pcfread.c (pcf_read_TOC): Check `size' and `offset' values. 2014-11-06 Werner Lemberg <wl@gnu.org> * src/pcf/pcfread.c (pcf_read_TOC): Avoid memory leak. 2014-11-03 Infinality <infinality@infinality.net> * src/truetype/ttsubpix.c (COMPATIBILITY_MODE_Rules): Updated. The previous commit deteriorates rendering of DejaVu and similar fonts; this gets compensated with this rule. 2014-11-03 Werner Lemberg <wl@gnu.org> * src/truetype/ttinterp.c (Ins_DELTAP): Fix subpixel hinting. Before this patch, it was impossible to ever call DELTAP[123] in subpixel hinting mode as described in the ClearType whitepaper; it only worked if in `compatibility mode'. However, compatibility mode essentially disables SHPIX, completely ruining hinting of ttfautohint output, for example. We now follow the whitepaper more closely so that DELTAP[123] instructions for touched points in the non-subpixel direction are executed. 2014-10-31 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Improve code readability. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Rearrange code. 2014-10-31 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Reduce outline translations during rendering. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Translate origin virtually by modifying cbox, actually translate outline if cumulative shift is not zero. 2014-10-30 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Fix Savannah bug #35604 (cont'd). * src/smooth/ftsmooth.c (ft_smooth_render_generic): Remove checks and casts that became unnecessary after the variable type upgrades. 2014-10-29 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Improve code readability. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Rearrange code. 2014-10-29 Alexei Podtelezhnikov <apodtele@gmail.com> Unify hypotenuse approximations. * include/internal/ftcalc.h (FT_HYPOT): Move macro from here... * include/internal/ftobjs.h: ... to here, next to required `FT_ABS'. * src/smooth/ftgrays.c (gray_render_cubic): Use it here. 2014-10-25 Werner Lemberg <wl@gnu.org> [cff] Test valid darkening parameter macros in `ftoption.h'. We no longer need an otherwise unused typedef that can cause a gcc warning. Problem reported by Alexei. * src/cff/cffobjs.c (cff_driver_init): Use `CFF_CONFIG_OPTION_DARKENING_PARAMETER_XXX' macros directly. (SET_DARKENING_PARAMETERS): Removed. Compile time tests are now ... * devel/ftoption.h, include/config/ftoption.h: ... here. 2014-10-25 Alexei Podtelezhnikov <apodtele@gmail.com> Improve flat corner definition. * include/internal/ftcalc.h (FT_HYPOT): Macro to approximate Euclidean distance with the alpha max plus beta min algorithm. * src/base/ftcalc.c (ft_corner_is_flat): Use it instead of Taxicab metric. 2014-10-23 David Weiß <David.Weiss@ptvgroup.com> [build] Improve property file for vc2010. User-defined properties should be empty by default to prevent linker failures. * builds/windows/vc2010/freetype.user.props, builds/windows/vc2010/freetype.vcxproj: s/OptionsDirectory/UserOptionDirectory/. Comment out all user options. 2014-10-23 Werner Lemberg <wl@gnu.org> [cff] Work around bug in preprocessor of MSVC 2010. We have been hit by https://connect.microsoft.com/VisualStudio/feedback/details/718976/msvc-pr * devel/ftoption.h, include/config/ftoption.h: Replace `CFF_CONFIG_OPTION_DARKENING_PARAMETERS' with eight macros `CFF_CONFIG_OPTION_DARKENING_PARAMETER_{X,Y}{1,2,3,4}'. * src/cff/cffobjs.c (SET_DARKENING_PARAMETERS): Removed. We no longer need double expansion. (SET_DARKENING_PARAMETERS_0): Renamed to ... (SET_DARKENING_PARAMETERS): ... this. Update call. 2014-10-20 Werner Lemberg <wl@gnu.org> [sbit] Minor fixes. * src/sfnt/ttsbit.c (tt_face_load_sbit) [TT_SBIT_TABLE_TYPE_SBIX]: Accept overlay format also, but emit warning message in that case. (tt_sbit_decoder_load_metrics): Add missing newline to error message. (tt_sbit_load_sbix_image): Add `rgbl' graphic type (as used on iOS 7.1) to the list of unsupported formats. 2014-10-19 Alexei Podtelezhnikov <apodtele@gmail.com> [truetype] Clean up bytecode rounding. Zero distance does not have to be treated specially if you follow specifications and check the sign as the very last step of rounding. * src/truetype/ttinterp.c (Round_None, Round_To_Grid, Round_Down_To_Grid, Round_Up_To_Grid, Round_To_Double_Grid): Use macros when available, do not check for non-zero distance. (Round_To_Half_Grid, Round_Super, Round_Super_45): Ditto, return phase if sign changed. 2014-10-18 Alexei Podtelezhnikov <apodtele@gmail.com> [truetype] Unwrap engine compensation settings. * src/truetype/ttobjs.c (tt_size_init_bytecode): Updated. 2014-10-18 David Weiß <David.Weiss@ptvgroup.com> [build] Add property file to vc2010 project. This simplifies custom build configurations, especially for automated build environments. * builds/windows/vc2010/freetype.user.props: New configuration file. * builds/windows/vc2010/freetype.vcxproj: Include `freetype.user.props' and use its data fields. * builds/windows/vc2010/index.html: Updated. 2014-10-18 Werner Lemberg <wl@gnu.org> [autofit] Add blue-zone support for Telugu. This essentially moves the Telugu script from the `Indic' hinter to the `Latin' hinter. Note that this is a first shot and quite certainly needs refinements. * src/autofit/afblue.dat: Add blue zone data for Telugu. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Telugu standard characters and move data out of AF_CONFIG_OPTION_INDIC block. * src/autofit/afranges.c: Move Telugu data out of AF_CONFIG_OPTION_INDIC block. * src/autofit/afstyles.h: Update Telugu data; in particular, use AF_WRITING_SYSTEM_LATIN. 2014-10-18 David Wimsey <david@wimsey.us> [cmake] Add iOS build support. From Savannah patch #8497. * builds/cmake/iOS.cmake: New file. Universal binaries are built with both 32 and 64 bit arm architectures. * CMakeLists.txt (IOS_PLATFORM): New variable for running the iOS toolchain. Possible values are `OS' to build on iOS, or `SIMULATOR' to build on APPLE. 2014-10-16 Behdad Esfahbod <behdad@behdad.org> Werner Lemberg <wl@gnu.org> [cff] Add `CFF_CONFIG_OPTION_DARKENING_PARAMETERS' config macro. * devel/ftoption.h, include/config/ftoption.h (CFF_CONFIG_OPTION_DARKENING_PARAMETERS): New macro. * src/cff/cffobjs.c (SET_DARKENING_PARAMETERS, SET_DARKENING_PARAMETERS_0): New macros. (cff_driver_init): Use new macros. 2014-10-14 Alexei Podtelezhnikov <apodtele@gmail.com> [truetype] Limit delta shift range. The valid range for delta shift is zero through six. Negative values are invalid according to https://developer.apple.com/fonts/TrueType-Reference-Manual/RM04/Chap4.html#delta%20shift * src/truetype/ttobjs.h (delta_shift, delta_base): Make unsigned. * src/truetype/ttinterp.h (DO_SDS): Throw an error if `delta_shift' is out of range. (Ins_DELTAP, Ins_DELTAC): Optimize for valid `delta_shift'. 2014-10-16 Werner Lemberg <wl@gnu.org> A better fix for Savannah bug #43392. Suggested by Doug Felt <dougfelt@gmail.com>. * src/sfnt/ttsbit.c (tt_sbit_decoder_load_metrics): Set `vertAdvance' to zero... * src/truetype/ttgload.c (TT_Load_Glyph): ... and set here a default value for `vertAdvance' based on `linearVertAdvance' in case `vertAdvance' is zero. Note that the previous computed ad-hoc value for `linearVertAdvance' was apparently not tested in a real-life situation. 2014-10-14 David Weiß <David.Weiss@ptvgroup.com> [build] Better optimization settings for vc2010 solution file. * builds/windows/vc2010/freetype.sln, builds/windows/vc2010/freetype.vcxproj: Updated. 2014-10-14 Werner Lemberg <wl@gnu.org> [autofit] Adjust Devanagari character range. * src/autofit/afranges.c (af_deva_uniranges): Omit characters that are common to all other Indic scripts. 2014-10-12 Werner Lemberg <wl@gnu.org> [sfnt] Fix Savannah bug #43392. * src/sfnt/ttsbit.c (tt_sbit_decoder_load_metrics): Don't let vertical metrics uninitialized. 2014-10-11 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Small bbox correction. * src/base/ftbbox.c (FT_Outline_Get_BBox): Start from nonsense bbox instead of initial point that could be `off' in conic outlines. 2014-10-08 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Fix Savannah bug #43356. * src/base/ftbbox.c (BBox_Move_To, BBox_Conic_To): Update bbox in case of implicit `to'. (BBox_Line_To): New emitter that does not update bbox. 2014-10-08 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Introduce and use new macro `FT_UPDATE_BBOX' * src/base/ftbbox.c (FT_UPDATE_BBOX): New macro. (FT_Outline_Get_BBox): Use it here. 2014-10-02 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Significant optimization of `ft_div64by32' We shift as many bits as we can into the high register, perform 32-bit division with modulo there, then work through the remaining bits with long division. This optimization is especially noticeable for smaller dividends that barely use the high register. * src/base/ftcalc.c (ft_div64by32): Updated. 2014-10-02 Dave Arnold <darnold@adobe.com> [cff] Fix Savannah bug #43271. * src/cff/cf2font.c (cf2_computeDarkening): Change overflow detection to use logarithms and clamp `scaledStem'. 2014-10-01 Alexei Podtelezhnikov <apodtele@gmail.com> * src/base/ftcalc.c: Remove miscellaneous type casts. 2014-10-01 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Use more common `FT_MSB' implementation with masks. * src/base/ftcalc.c (FT_MSB): Updated. 2014-09-30 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Clean up. * src/base/ftcalc.c (FT_MOVE_SIGN): New macro for frequently used code. 2014-09-25 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Avoid unnecessary long division. This applies to `FT_MulDiv' but not to `FT_DivFix', where overflows or lack thereof are predicted accurately. * src/base/ftcalc.c (ft_div64by32): Improve readability. (FT_MulDiv, FT_MulDiv_No_Round) [!FT_LONG64]: Use straight division when multiplication stayed within 32 bits. 2014-09-24 Werner Lemberg <wl@gnu.org> [autofit] Minor clean-ups. * src/autofit/afhints.c (AF_FLAGS): Remove obsolete values. * src/autofit/afhints.c (af_glyph_hints_dump_points, af_glyph_hints_align_strong_points): Updated. * src/autofit/aflatin.c (af_latin_hints_link_segments, af_latin_hints_compute_segments), src/autofit/afcjk.c (af_cjk_hints_link_segments), src/autofit/aflatin2.c (af_latin2_hints_link_segments, af_latin2_hints_compute_segments): There are no longer fake segments since more than 10 years... 2014-09-22 Werner Lemberg <wl@gnu.org> [autofit] Minor code streamlining. * src/autofit/afhints.c (af_axis_hints_new_edge): Remove redundant initialization. 2014-09-19 Alexei Podtelezhnikov <apodtele@gmail.com> * src/base/ftcalc.c: Harmonize code. 2014-09-15 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Tighten the overflow check in `FT_MulDiv'. * src/base/ftcalc.c (FT_MulDiv) [!FT_LONG64]: Updated. 2014-09-08 Alexei Podtelezhnikov <apodtele@gmail.com> Fix Savannah bug #43153. * src/psaux/psconv.c (PS_Conv_ToFixed): Add protection against overflow in `divider'. 2014-09-03 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Tighten the overflow check in `FT_DivFix'. This fixes a 13-year old bug. The original overflow check should have been updated when rounding was introduced into this function (c2cd00443b). * src/base/ftcalc.c (FT_DivFix) [!FT_LONG64]: Updated. * include/freetype.h (FT_DivFix): Updated documentation. 2014-09-03 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Tighten the overflow check in `FT_MulFix'. * src/base/ftcalc.c (FT_MulFix) [!FT_LONG64]: Updated. 2014-09-02 Alexei Podtelezhnikov <apodtele@gmail.com> [truetype] Shortcut ppem calculations for square pixels. * src/truetype/ttinterp.h (TT_ExecContextRec): New field `cur_ppem_func' with a function pointer. * src/truetype/ttinterp.c (TT_RunIns): Initialize `cur_ppem_func' depending on the pixel geometry to either... (Current_Ppem_Stretched): ... this for stretched pixels. (Current_Ppem): ... or this for square pixels. (DO_MPPEM, DO_MPS, Ins_DELTAP, Ins_DELTAC): Use `cur_ppem_func'. 2014-08-31 Behdad Esfahbod <behdad@behdad.org> Don't use `register' keyword. Fixes compiler warnings. * src/base/ftcalc.c (FT_Add64) [!FT_LONG64]: Do it. * src/gzip/inftrees.c (huft_build): Ditto. * src/truetype/ttinterp.c (TT_MulFix14_arm): Ditto. 2014-08-24 Alexei Podtelezhnikov <apodtele@gmail.com> [truetype] Optimize DELTAP and DELTAC. * src/truetype/ttinterp.c (Ins_DELTAP, Ins_DELTAC): Move ppem calculations outside of the loop. 2014-08-21 Alexei Podtelezhnikov <apodtele@gmail.com> Fix Savannah bug #43033. * include/config/ftconfig.h, builds/unix/ftconfig.in, builds/vms/ftconfig.h [FT_LONG64]: Do not disable the macro when 64-bit type is `long'. 2014-08-20 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Small optimization of `FT_MulFix'. * src/base/ftcalc.c (FT_MulFix): Loosen up the condition for direct 32-bit calculations. 2014-08-19 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Use unsigned calculation in `FT_MulDiv'. * src/base/ftcalc.c (FT_MulDiv): Updated to expand 32-bit range. 2014-08-18 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Remove truncation in `FT_DivFix'. * src/base/ftcalc.c (FT_DivFix): Updated. 2014-08-14 Alexei Podtelezhnikov <apodtele@gmail.com> Minor refactoring. * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round): Updated. 2014-08-14 Alexei Podtelezhnikov <apodtele@gmail.com> Turn FT_MSB into a macro when using gcc builtins. * src/base/ftcalc.c, include/internal/ftcalc.h: Updated. 2014-08-12 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Avoid undefined FT_MSB in `BBox_Cubic_Check'. * src/base/ftbbox.c (BBox_Cubic_Check): Update. (update_cubic_max): Replace with... (cubic_peak): ... this, which now handles upscaling. 2014-08-11 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Handle collapsed outlines to avoid undefined FT_MSB. * src/base/ftoutln.c (FT_Outline_Get_Orientation): Update. 2014-08-11 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Restore FT_MulFix inlining. * include/freetype.h (FT_MulFix): Unconditionally defined. * src/base/ftcalc.c [FT_MULFIX_ASSEMBLER]: Move code from here... * include/internal/ftcalc.h [FT_MULFIX_ASSEMBLER]: ... to here, which conditionally replaces the function with an inline version through the macro. 2014-08-08 Alexei Podtelezhnikov <apodtele@gmail.com> * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Refactor. 2014-07-26 Werner Lemberg <wl@gnu.org> [cff] Fix typo. * src/cff/cf2hints.c (cf2_glyphpath_computeOffset): Use correct offsets in third quadrant. Reported by maks <maksqwe1@ukr.net>. 2014-07-17 Werner Lemberg <wl@gnu.org> Fix Savannah bug #42788. * src/pfr/pfrobjs.c: Include `ftcalc.h'. 2014-07-16 Alexei Podtelezhnikov <apodtele@gmail.com> Replace `ft_highpow2' function. * src/pfr/pfrobjs.c (pfr_face_get_kerning): Use `FT_MSB' instead of `ft_highpow2'. * src/base/ftutil.c, include/internal/ftobjs.h (ft_highpow2): Remove it. 2014-07-15 Alexei Podtelezhnikov <apodtele@gmail.com> * src/base/ftcalc.c (FT_MSB): Utilize gcc builtins. 2014-07-15 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Move assembler code back in the source file. FT_MulFix assembler used to reside in ftcalc.c before f47d263f1b. * include/config/ftconfig.h, builds/unix/ftconfig.in, builds/vms/ftconfig.h [FT_MULFIX_ASSEMBLER]: Move code from here... * src/base/ftcalc.c [FT_MULFIX_ASSEMBLER]: ... to here. 2014-07-14 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Further clean up color bitmap conversion. * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Stop using FT_MulFix and FT_DivFix since all calculations fit into 32 bits. 2014-07-13 Werner Lemberg <wl@gnu.org> [truetype] Improve handling of buggy `prep' tables. In case of an error in the `prep' table, no longer try to execute it again and again. This makes FreeType handle endless loops in buggy fonts much faster. * src/truetype/ttobjs.h (TT_SizeRec): The fields `bytecode_ready' and `cvt_ready' are now negative if not initialized yet, otherwise they indicate the error code of the last run. * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep, tt_size_done_bytecode, tt_size_init_bytecode, tt_size_ready_bytecode, tt_size_init, tt_size_done, tt_size_reset): Updated. * src/truetype/ttgload.c (tt_loader_init): Updated. * src/truetype/ttinterp.c (TT_RunIns): Force reexecution of `fpgm' and `prep' only if we are in the `glyf' table. 2014-07-12 Werner Lemberg <wl@gnu.org> * builds/vms/ftconfig.h: Synchronize. Problem reported by Alexei. 2014-07-11 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Clean up bitmap conversion. * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Use appropriate FT_DivFix and remove superfluous upscaling. 2014-07-04 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Small optimization of the ancient code. * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round): Loosen up the condition for direct 32-bit calculations. 2014-06-27 Werner Lemberg <wl@gnu.org> Fix Apple standard glyph names. * src/sfnt/ttpost.c (tt_post_default_names): Synchronize with `tools/glnames.py' Problem reported by Adam Twardoch <adam@fontlab.com>. 2014-06-17 Werner Lemberg <wl@gnu.org> Partially revert commit from 2014-06-13. * src/autofit/aflatin.c (af_latin_metrics_init_blues): Move declaration of `p_first' and `p_last' out of the loop. 2014-06-17 Werner Lemberg <wl@gnu.org> * builds/unix/freetype2.m4: s/AC_PATH_PROG/AC_PATH_TOOL/. This simplifies cross-compiling. 2014-06-13 Werner Lemberg <wl@gnu.org> Fix more compiler warnings. Reported by Wojciech Mamrak <wmamrak@gmail.com>. * src/autofit/afglobal.c (af_face_globals_compute_style_coverage): Make integer constant unsigned. * src/sfnt/ttsbit.c (tt_face_load_strike_metrics) <TT_SBIT_TABLE_TYPE_SBIX>: Fix types. (tt_sbit_decoder_load_compound, tt_face_load_sbix_image): Add proper casts. 2014-06-13 Werner Lemberg <wl@gnu.org> Fix compiler warnings. Reported by Wojciech Mamrak <wmamrak@gmail.com>. * src/autofit/afglobal.c (af_face_globals_compute_style_coverage), src/autofit/afmodule.c (af_property_set): Fix `signed' vs. `unsigned' issues. * src/autofit/aflatin.c (af_latin_metrics_init_blues): Make compiler happy. * src/base/ftlcdfil.c (_ft_lcd_filter_fir): Use only four elements for `fir'. Fix `signed' vs. `unsigned' issues. * src/sfnt/sfobjs.c (WRITE_BYTE): Removed, unused. (WRITE_USHORT, WRITE_ULONG): Add proper casts. * src/truetype/ttgload.c (TT_Get_VMetrics): Add proper casts. * src/truetype/ttinterp.c (Ins_DELTAP): Add proper casts for `B1' and `B2'. 2014-05-16 Alexey Petruchik <alexey.petruchik@gmail.com> [cmake] Add option to build OS X framework. * CMakeLists.txt: Update accordingly. * builds/mac/freetype-Info.plist: New file. 2014-05-13 Pavel Koshevoy <pkoshevoy@gmail.com> * CMakeLists.txt (BASE_SRCS): Add missing `ftbdf.c'. 2014-05-11 Werner Lemberg <wl@gnu.org> [autofit] Fix variable initializations. * src/autofit/afhints.c (af_glyph_hints_reload): Assign default values to `in_dir' and `out_dir' for all points. 2014-05-11 Werner Lemberg <wl@gnu.org> [autofit] Fix crash with font `CabinSketch-Bold.ttf'. Problem reported by Ralf S. Engelschall <rse@engelschall.com>. * src/autofit/afhints.c (af_glyph_hints_reload): Fix threshold for finding first non-near point. Properly initialize non-near point deltas. 2014-05-01 Werner Lemberg <wl@gnu.org> [autofit] Add blue-zone support for Devanagari. This essentially moves the Devanagari script from the `Indic' hinter to the `Latin' hinter. Thanks to Girish Dalvi <girish.dalvi@gmail.com> for guidance with blue zone characters! * src/autofit/afblue.dat: Add blue zone data for Devanagari. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Devanagari standard characters and move data out of AF_CONFIG_OPTION_INDIC block. * src/autofit/afranges.c: Move Devanagari data out of AF_CONFIG_OPTION_INDIC block. Move U+20B9, (new) Rupee sign, from Latin to Devanagari. * src/autofit/afstyles.h: Update Devanagari data; in particular, use AF_WRITING_SYSTEM_LATIN. 2014-05-01 Werner Lemberg <wl@gnu.org> [autofit] Fix handling of neutral blue zones in stems. * src/autofit/afhints.h (AF_Edge_Flags): New value `AF_EDGE_NEUTRAL'. * src/autofit/aflatin.c (af_latin_hints_compute_blue_edges): Trace neutral blue zones with AF_EDGE_NEUTRAL. (af_latin_hint_edges): Skip neutral blue zones if necessary. 2014-04-28 Werner Lemberg <wl@gnu.org> [autofit] Introduce neutral blue zones to the latin module. Such blue zones match either the top or the bottom of a contour. We need them for scripts where accent-like elements directly touch the base character (for example, some vowel signs in Devanagari, cf. U+0913 or U+0914). * src/autofit/afblue.hin (AF_BLUE_PROPERTY_LATIN_NEUTRAL): New property. * src/autofit/afblue.h: Regenerated. * src/autofit/aflatin.h (AF_LATIN_IS_NEUTRAL_BLUE): New macro. (AF_LATIN_BLUE_NEUTRAL): New enumeration value. * src/autofit/aflatin.c (af_latin_metrics_init_blues, af_latin_hints_compute_blue_edges): Handle neutral blue zones. 2014-04-25 Werner Lemberg <wl@gnu.org> * src/autofit/hbshim.c: Partially revert commit from 2014-04-17. Using input glyph coverage data is simply wrong. Problem reported by Nikolaus Waxweiler <madigens@gmail.com> and Mantas Mikulėnas <grawity@gmail.com>. 2014-04-23 Werner Lemberg <wl@gnu.org> * src/raster/ftraster.c (Vertical_Sweep_Span): Use drop-out mode. This spot has been missed while introducing support for various drop-out modes years ago (including no drop-out mode, which this commit fixes). Problem reported by Patrick Thomas <pthomas505@gmail.com>. 2014-04-22 Werner Lemberg <wl@gnu.org> * src/sfnt/pngshim.c (error_callback): s/longjmp/ft_longjmp/. 2014-04-20 Werner Lemberg <wl@gnu.org> [autofit] Fix Savannah bug #42148. The adaptation of the cjk auto-hinter module to blue stringsets in 2013-08-25 had three severe bugs. Mea culpa. 1. Contrary to the latin auto-hinter, characters for reference and overshoot values of a blue zone are specified separately. Due to the screwed-up change it didn't work at all. 2. A boolean comparison was erroneously replaced with a cast, causing invalid results with the `^' operator later on. The visual artifact caused by this problem is the topic of the bug report. 3. Two flag values were inverted, causing incorrect assignment of reference and overshoot values. * src/autofit/afblue.dat: Fix CJK bluestrings, introducing a new syntax to have both reference and overshoot characters in a single string. This is error #1. Add extensive comments. * src/autofit/afblue.hin (AF_BLUE_PROPERTY_CJK_FILL): Removed, no longer used. (AF_BLUE_PROPERTY_CJK_TOP, AF_BLUE_PROPERTY_CJK_HORIZ): Fix values. This is error #3. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afcjk.c (af_cjk_metrics_init_blues): Correct error #1. Use character `|' to separate characters for reference and overshoot values. Improve tracing messages, synchronizing them with the latin auto-hinter. (af_cjk_hints_compute_blue_edges): Fix value of `is_top_right_blue'. This is error #2. (af_cjk_align_linked_edge): Add tracing message. * src/autofit/afcjk.h (AF_CJK_IS_FILLED_BLUE): Removed, no longer used. 2014-04-17 Werner Lemberg <wl@gnu.org> [autofit] More coverage fixes for complex scripts. * src/autofit/hbshim.c (af_get_coverage): Merge input glyph coverage of GSUB lookups into output coverage. Otherwise, ligatures are not handled properly. Don't check blue zone characters for default coverage. 2014-04-17 Werner Lemberg <wl@gnu.org> Make `FT_Get_SubGlyph_Info' actually work. * src/base/ftobjs.c (FT_Get_SubGlyph_Info): Return FT_Err_Ok if there is no error. 2014-04-15 Werner Lemberg <wl@gnu.org> [afblue.pl]: Minor improvements. * src/tools/afblue.pl: Allow whitespace before comments. Ignore whitespace in strings. 2014-04-14 Werner Lemberg <wl@gnu.org> [autofit] Improve coverage handling. * src/autofit/hbshim.c (af_get_coverage): Don't exclude glyphs appearing in the GPOS table if we are processing the default coverage. 2014-04-13 David Weber <weber.aulendorf@googlemail.com> [smooth] Fix stand-alone compilation. * src/smooth/ftgrays.c (FT_BEGIN_STMNT, FT_END_STMNT): Define. 2014-04-12 Werner Lemberg <wl@gnu.org> [autofit] Redesign the recognition algorithm of strong points. In particular, local extrema without horizontal or vertical segments are better recognized: + A + D \ / \ / \ / \ / \ + C \ / B +/ If the distances AB and CD are large, point B wasn't previously detected as an extremum since the `ft_corner_is_flat' function `swallowed' BC regardless of its direction, tagging point B as weak. The next iteration started at B and made `ft_corner_is_flat' swallow point C, tagging it as weak also, et voilà. To improve that, another pass gets now performed before calling `ft_corner_is_flat' to improve the `topology' of an outline: A sequence of non-horizontal or non-vertical vectors that point into the same quadrant are handled as a single, large vector. Additionally, distances of near points are now accumulated, which makes the auto-hinter handle them as if they were prepended to the next non-near vector. This generally improves the auto-hinter's rendering results. * src/autofit/afhints.c (af_glyph_hints_reload): Implement it. * src/autofit/afhints.h (AF_FLAGS): Remove no longer used flag `AF_FLAG_NEAR'. 2014-04-05 Werner Lemberg <wl@gnu.org> [autofit] Improve scoring algorithm for identifying stems. Problem reported by Karsten Lücke <karsten.luecke@kltf.de>. The new algorithm takes care of the width of stems: If the distance between two segments is larger than the largest stem width, the demerits quickly increase for larger distances. This improves hinting of slanted fonts (especially if the inner parts of serifs have non-horizontal `shoulders'), avoiding false stem links. * src/autofit/aflatin.c (af_latin_hints_link_segments): Use largest stem width (if available) to compute better demerits for distances between stems. (af_latin_hints_detect_features): Pass stem width array and array size. (af_latin_metrics_init_widths): Updated to use original algorithm. (af_latin_hints_apply): Updated to use new algorithm. * src/autofit/aflatin.h: Updated. * src/autofit/afcjk.c: Updated. 2014-04-03 Werner Lemberg <wl@gnu.org> Don't require `gzip' module for `sfnt'. Reported by Preet <prismatic.project@gmail.com>. * src/sfnt/sfobjs.c (woff_open_font): Guard use of FT_Gzip_Uncompress with FT_CONFIG_OPTION_USE_ZLIB. 2014-03-27 Werner Lemberg <wl@gnu.org> Fix Savannah bug #38235. Work around a bug in pkg-config version 0.28 and earlier: If a variable value gets surrounded by doublequotes (in particular values for the `prefix' variable), the prefix override mechanism fails. * builds/unix/freetype2.in: Don't use doublequotes. * builds/unix/unix-def.in (freetype.pc): Escape spaces in directory names with backslashes. 2014-03-24 Werner Lemberg <wl@gnu.org> Fix Savannah bug #41946. Based on a patch from Marek Kašík <mkasik@redhat.com>. * builds/unix/configure.raw (LIBS_CONFIG): Remove. * builds/unix/freetype-config.in (libs): Hard-code value. * builds/unix/unix-def.in: Updated. 2014-03-22 Werner Lemberg <wl@gnu.org> Another revert for the change from 2014-03-18. Problem reported by Nikolaus Waxweiler <madigens@gmail.com>. * src/base/ftcalc.c (FT_MulFix): Ensure that an `FT_MulFix' symbol gets always exported. 2014-03-20 Werner Lemberg <wl@gnu.org> CMakeLists.txt: Another fix for include directories. Problem reported by Taylor Holberton <taylorcholberton@gmail.com>. 2014-03-19 Werner Lemberg <wl@gnu.org> CMakeLists.txt: Fix include directories. Problem reported by Taylor Holberton <taylorcholberton@gmail.com>. 2014-03-19 Werner Lemberg <wl@gnu.org> Partially revert last commit. Found by Alexei. * src/autofit/aflatin.c (af_latin_metrics_init_blues): Initializing those variables is plain wrong, since we are in a loop. 2014-03-18 Sean McBride <sean@rogue-research.com> Werner Lemberg <wl@gnu.org> Fix clang warnings. * src/autofit/aflatin.c (af_latin_metrics_init_blues): Initialize some variables. * src/base/ftcalc.c (FT_MulFix): Only use code if `FT_MULFIX_INLINED' is not defined. * src/bdf/bdfdrivr.c (bdf_cmap_class), src/cache/ftcbasic.c (ftc_basic_image_family_class, ftc_basic_image_cache_class, ftc_basic_sbit_family_class, ftc_basic_sbit_cache_class), src/cache/ftccmap.c (ftc_cmap_cache_class), src/cache/ftcmanag.c (ftc_size_list_class, ftc_face_list_class), src/pcf/pcfdrivr.c (pcf_cmap_class), src/pfr/pfrdrivr.c (pfr_metrics_service_rec): Make function static. * src/type1/t1driver.c (t1_ps_get_font_value): Remove redundant code. 2014-03-17 Werner Lemberg <wl@gnu.org> Fix Savannah bug #41869. This works around a problem with HarfBuzz (<= 0.9.26), which doesn't validate glyph indices returned by `hb_ot_layout_lookup_collect_glyphs'. * src/autofit/hbshim.c (af_get_coverage): Guard `idx'. * docs/CHANGES: Updated. 2014-03-14 Werner Lemberg <wl@gnu.org> * builds/unix/configure.raw: Don't show error messages of `which'. 2014-03-09 Alan Coopersmith <alan.coopersmith@oracle.com> Fix cppcheck 1.64 warning. * src/autofit/afglobal.c (af_face_globals_new): Catch NULL pointer dereference in case of error. 2014-03-09 Sean McBride <sean@rogue-research.com> * src/sfnt/ttcmap.c (tt_face_build_cmaps): Remove clang warning. 2014-03-06 Werner Lemberg <wl@gnu.org> * Version 2.5.3 released. ========================= Tag sources with `VER-2-5-3'. * docs/VERSION.DLL: Update documentation and bump version number to 2.5.3. * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj, builds/windows/vc2005/index.html, builds/windows/vc2008/freetype.vcproj, builds/windows/vc2008/index.html, builds/windows/vc2010/freetype.vcxproj, builds/windows/vc2010/index.html, builds/windows/visualc/freetype.dsp, builds/windows/visualc/freetype.vcproj, builds/windows/visualc/index.html, builds/windows/visualce/freetype.dsp, builds/windows/visualce/freetype.vcproj, builds/windows/visualce/index.html, builds/wince/vc2005-ce/freetype.vcproj, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/freetype.vcproj, builds/wince/vc2008-ce/index.html: s/2.5.2/2.5.3/, s/252/253/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3. * builds/unix/configure.raw (version_info): Set to 17:2:11. * CMakeLists.txt (VERSION_PATCH): Set to 3. * docs/CHANGES: Updated. 2014-03-06 Werner Lemberg <wl@gnu.org> Fixes for compilation with C++. * src/autofit/hbshim.c (scripts): Change type to `hb_script_t'. (af_get_coverage): Updated. (COVERAGE): Add cast. 2014-03-06 Sean McBride <sean@rogue-research.com> Remove more clang analyzer warnings. * src/bdf/bdflib.c (_bdf_readstream), src/truetype/ttgload.c (TT_Load_Glyph): Remove dead stores. 2014-03-05 Werner Lemberg <wl@gnu.org> * builds/unix/configure.raw: Simplify. 2014-03-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Fix a bug in configure in library dependency setting Reported in https://bugs.freedesktop.org/show_bug.cgi?id=75652. * builds/unix/configure.raw: Use `x"${xxx}" != xno' style. 2014-03-04 Werner Lemberg <wl@gnu.org> Minor fix for `make devel'. * builds/freetype.mk (INCLUDE_FLAGS) [DEVEL_DIR]: Don't use pkg-config for bzip2 since not all GNU/Linux distributions have `bzip2.pc' (and the header file `bzlib.h' is located in /usr/include normally). 2014-03-04 Sean McBride <sean@rogue-research.com> Fix several clang static analyzer dead store warnings. * src/autofit/afhints.c (af_glyph_hints_reload, af_glyph_hints_align_weak_points): Remove unnecessary assignments. * src/bdf/bdflib.c (bdf_font_load): Ditto. * src/pshinter/pshalgo.c (psh_glyph_compute_extrema, psh_glyph_interpolate_other_points): Ditto. * src/type1/t1load.c (T1_Set_MM_Blend): Ditto. 2014-03-03 Werner Lemberg <wl@gnu.org> Rewrite library option handling in `configure'. o Introduce `auto' value for `--with-XXX' library options; this is now the default. o First use `pkg-config' for library detection, then fall back to other tests. * builds/unix/configure.raw (--with-zlib, --with-bzip2, --with-png, --with-harfbuzz): Rewrite. Use new `xxx_reqpriv', `xxx_libpriv', and `xxx_libstaticconf' variables to collect data for `freetype2.pc' and `freetype-config'. (FT2_EXTRA_LIBS): Renamed to ... (ft2_extra_libs): This since it gets no longer substituted. (REQUIRES_PRIVATE, LIBS_PRIVATE, LIBS_CONFIG, LIBSSTATIC_CONFIG): New output variables, replacing `XXX_PKG' and `LIBXXX'. Add notice at the end of `configure' showing the library configuration. * builds/unix/freetype-config.in (--static): New command line option. (libs): Updated. (staticlibs): New variable, to be used if `--static' is given. * docs/freetype-config.1: Document `--static'. * builds/unix/freetype2.in, builds/unix/unix-def.in: Updated. 2014-03-01 Werner Lemberg <wl@gnu.org> Avoid `long long' warnings with older gcc compilers. Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>. * builds/unix/configure.raw: Don't use gcc's `-pedantic' flag for versions < 4.6. This is especially needed for Max OS X since this OS runs a gcc variant (or emulation) based on version 4.2.1. 2014-03-01 Werner Lemberg <wl@gnu.org> * docs/INSTALL.CROSS: Revised and updated. 2014-03-01 Werner Lemberg <wl@gnu.org> Make `make clean' remove `freetype2.pc'. This is a generated file at build time, not configure time. * builds/unix/unix-def.in (DISTCLEAN): Move `freetype2.pc' to ... (CLEAN): This variable. 2014-03-01 Werner Lemberg <wl@gnu.org> Use pkg-config for detecting libpng and libbz2 also. * builds/unix/configure.raw (HAVE_PKG): New variable. Search for libbz2 using `pkg-config'; s/BZ2/BZIP2/. Search for libpng using `pkg-config'. Fix definition of `LIBHARFBUZZ' variable. * builds/unix/freetype-config.in ($libs): Updated. * builds/unix/freetype2.in: Add `URL' field. Update `Requires.private' and `Libs.private'. * builds/unix/unix-def.in: Updated. 2014-03-01 Werner Lemberg <wl@gnu.org> Add configure support for HarfBuzz. * builds/unix/pkg.m4: New file. * builds/unix/configure.raw: Search for libharfbuzz using `pkg-config'. Add `--without-harfbuzz' option. * builds/unix/freetype-config.in, builds/unix/freetype2.in, builds/unix/unix-def.in (freetype-config, freetype2.pc): Handle HarfBuzz. * docs/INSTALL.UNIX: Document interdependency of FreeType with HarfBuzz. 2014-02-28 Alexei Podtelezhnikov <apodtele@gmail.com> [cff] Math simplifications. * src/cf2blues.c (cf2_blues_init): Use `FT_MulDiv'. * src/cf2ft.c (cf2_getScaleAndHintFlag): Use simple division. 2014-02-28 Dave Arnold <darnold@adobe.com> [cff] Fix Savannah bug #41697, part 2. * src/cff/cf2ft.c (cf2_initLocalRegionBuffer, cf2_initGlobalRegionBuffer): It is possible for a charstring to call a subroutine if no subroutines exist. This is an error but should not trigger an assert. Split the assert to account for this. 2014-02-28 Dave Arnold <darnold@adobe.com> [cff] Fix Savannah bug #41697, part 1. * src/cff/cf2hints.c (cf2_hintmap_build): Return when `hintMask' is invalid. In this case, it is not safe to use the length of `hStemHintArray'; the exception has already been recorded in `hintMask'. 2014-02-26 Werner Lemberg <wl@gnu.org> [sfnt] Fix Savannah bug #41696. * src/sfnt/ttcmap.c (tt_cmap0_validate, tt_cmap2_validate, tt_cmap4_validate, tt_cmap14_validate): Fix limit tests. 2014-02-26 Werner Lemberg <wl@gnu.org> [winfnt] Fix Savannah bug #41694. * src/winfonts/winfnt.c (FNT_Load_Glyph): Check glyph offset. 2014-02-26 Werner Lemberg <wl@gnu.org> [cff] Fix Savannah bug #41693. * src/cff/cffload.c (CFF_Load_FD_Select): Reject empty array. 2014-02-26 Werner Lemberg <wl@gnu.org> [bdf] Fix Savannah bug #41692. bdflib puts data from the input stream into a buffer in chunks of 1024 bytes. The data itself gets then parsed line by line, simply increasing the current pointer into the buffer; if the search for the final newline character exceeds the buffer size, more data gets read. However, in case the current line's end is very near to the buffer end, and the keyword to compare with is longer than the current line's length, an out-of-bounds read might happen since `memcmp' doesn't stop properly at the string end. * src/bdf/bdflib.c: s/ft_memcmp/ft_strncmp/ to make comparisons stop at string ends. 2014-02-17 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [autofit] Fix `make multi' compilation. * src/autofit/hbshim.c: Include `afglobal.h' and `aftypes.h'. 2014-02-19 Werner Lemberg <wl@gnu.org> Simon Bünzli <zeniko@gmail.com> Fix Savannah bug #32902. Patch taken from https://code.google.com/p/sumatrapdf/source/browse/trunk/ext/_patches/freetype2.patch?spec=svn8620&r=8620#87 with slight modifications. * src/type1/t1parse.c (T1_Get_Private_Dict): Add heuristic test to handle fonts that incorrectly use \r at the beginning of an eexec block. 2014-02-19 Simon Bünzli <zeniko@gmail.com> Fix Savannah bug #41590. * src/type1/t1load.c (parse_encoding): Protect against invalid number. 2014-02-12 Dave Arnold <darnold@adobe.com> [cff] Optimize by using `FT_MulDiv'. Suggested by Alexei. * src/cff/cf2font.c (cf2_computeDarkening): Do it. 2014-02-12 Werner Lemberg <wl@gnu.org> Fix Savannah bug #41465. * builds/unix/unix-def.in (CLEAN): Add `freetype-config'. (DISTCLEAN): Remove `freetype-config'. 2014-02-08 Sean McBride <sean@rogue-research.com> Fix clang static analyzer and compiler warnings. * src/autofit/afhints.c (af_glyph_hints_align_weak_points), src/autofit/afloader (af_loader_load_g) <FT_GLYPH_FORMAT_COMPOSITE>, src/base/ftcalc.c (FT_MSB), src/base/ftoutln.c (FT_Outline_Decompose), src/bdf/bdfdrivr.c (bdf_interpret_style), src/cff/cffparse.c (cff_parse_integer), src/cid/cidparse.c (cid_parser_new), src/pfr/pfrload.c (pfr_phy_font_load), src/raster/ftraster.c (Decompose_Curve), src/sfnt/sfdriver.c (sfnt_get_ps_name), src/sfnt/ttcmap.c (tt_cmap12_next, tt_cmap13_next), src/smooth/ftgrays.c (gray_hline): Remove dead code. * src/autofit/afmodule.c (af_property_get_face_globals, af_property_set, af_property_get), src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Make functions static. * src/base/ftobjs.c (ft_remove_renderer): Protect against library == NULL. (ft_property_do): Make function static. * src/base/ftrfork.c: Include `ftbase.h'. * src/sfnt/ttsbit.c (tt_face_load_sbix_image) [!FT_CONFIG_OPTION_USE_PNG], src/type1/t1gload.c (T1_Compute_Max_Advance): Avoid compiler warning. * src/truetype/ttinterp.c (TT_New_Context): Reduce scope of variable. 2014-02-08 Werner Lemberg <wl@gnu.org> Fix Windows build directories. The build target is now `windows' instead of `win32'. Problem reported by Nickolas George <darknova.clan@gmail.com>. * builds/modules.mk: Don't use `win32' and `win16' (!) but `windows'. * builds/windows/detect.mk, builds/windows/win32-def.mk: s/win32/windows/. 2014-02-08 Eugen Sawin <esawin@mozilla.com> Fix Savannah bug #41507. * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap) [!FT_CONFIG_OPTION_USE_PNG] <17, 17, 19>: Fix error handling. 2014-02-08 Dave Arnold <darnold@adobe.com> [cff] Fix minor performance bug. * src/cff/cf2font.c (cf2_font_setup): Darkening amount and blue zone calculations are now cached and not recomputed on each glyph. 2014-02-05 Werner Lemberg <wl@gnu.org> Fix problems with perl 5.8.8 as distributed with current MinGW. * src/tools/afblue.pl: Work-around for Perl bug #63402. (string_re): Avoid `possessive quantifiers', which have been introduced in Perl version 5.10. 2014-02-04 Werner Lemberg <wl@gnu.org> Fix compilation with MinGW. Right now, compilation out of the box with latest MinGW is broken due to bugs in header files of mingwrt 4.0.3 in strict ANSI mode, cf. https://sourceforge.net/p/mingw/bugs/2024/ https://sourceforge.net/p/mingw/bugs/2046/ * builds/unix/configure.raw: Don't set `-ansi' flag for MinGW. 2014-02-04 Werner Lemberg <wl@gnu.org> [autofit] Minor fix. * src/autofit/afcjk.c (af_cjk_metrics_init_widths), src/autofit/aflatin.c (af_latin_metrics_init_widths): Fix handling of alternative standard characters. This also fixes a compilation warning in non-debug mode. 2014-02-03 Werner Lemberg <wl@gnu.org> [cff] Fix Savannah bug #41363. * src/cff/cf2ft.c (cf2_checkTransform): Convert assertion into parameter check. (cf2_decoder_parse_charstrings): Call `cf2_checkTransform' only if we are scaling the outline. (cf2_getPpemY): Remove problematic assertion. 2014-01-26 Werner Lemberg <wl@gnu.org> [autofit] Introduce two more slots for standard characters. This is useful for OpenType features like `c2sc' (caps to small caps) that don't have lowercase letters by definition, or other features that mainly operate on numerals. * src/autofit/afscript.h: Add more standard characters. * src/autofit/aftypes.h: Update use of `SCRIPT' macro. (AF_ScriptClassRec): Add members to hold two more standard characters. (AF_DEFINE_SCRIPT_CLASS): Updated. * src/autofit/afglobal.c, src/autofit/afglobal.h, * src/autofit/afpic.c, src/autofit/afranges.h, src/autofit/hbshim.c: Update use of `SCRIPT' macro. * src/autofit/afcjk.c (af_cjk_metrics_init_widths), src/autofit/aflatin.c (af_latin_metrics_init_widths): Scan two more standard characters. 2014-01-24 Werner Lemberg <wl@gnu.org> Fix Savannah bug #41320. * src/autofit/aflatin.c (af_latin_metrics_init_blues) <AF_LATIN_IS_LONG_BLUE>: Avoid negative index of `last'. 2014-01-23 Werner Lemberg <wl@gnu.org> Fix Savannah bug #41310. * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap) <glyph_format==5>: Don't check metrics, which this format doesn't have. This is another correction to the commit from 2013-11-21. 2014-01-23 Werner Lemberg <wl@gnu.org> Fix Savannah bug #41309. * src/type1/t1load.c (t1_parse_font_matrix): Properly handle result of `T1_ToFixedArray'. * src/cid/cidload.c (cid_parse_font_matrix): Synchronize with `t1_parse_font_matrix'. * src/type42/t42parse.c (t42_parse_font_matrix): Synchronize with `t1_parse_font_matrix'. (t42_parse_encoding): Synchronize with `t1_parse_encoding'. * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_BBOX>, <T1_FIELD_TYPE_MMOX>: Properly handle result of `ps_tofixedarray'. 2014-01-22 Werner Lemberg <wl@gnu.org> * src/autofit/hbshim.c (af_get_coverage): Fix memory leaks. 2014-01-16 Werner Lemberg <wl@gnu.org> [autofit] Improve tracing of style coverages. * include/internal/fttrace.h: Add `afglobal' for tracing style coverages. * src/autofit/afglobal.c: Include FT_INTERNAL_DEBUG_H. (FT_COMPONENT): Define. (af_face_globals_compute_style_coverage): Trace `gstyles' array data. 2014-01-09 Werner Lemberg <wl@gnu.org> Fix Savannah bug #41158. * builds/unix/install.mk (install): Create man page directory. 2014-01-08 Chongyu Zhu <lembacon@gmail.com> [arm] Fix Savannah bug #41138, part 2. * builds/unix/ftconfig.in (FT_MulFix_arm), include/config/ftconfig.h (FT_MulFix_arm), src/truetype/ttinterp.c (TT_MulFix14_arm): Fix preprocessor conditionals for `add.w'. 2014-01-08 Werner Lemberg <wl@gnu.org> [autofit] Fix Savannah bug #41138, part 1. * src/tools/afblue.pl <Handling #endif>: Produce correct auxiliary enumeration names for generated `#else'. * src/autofit/afblue.h: Regenerated. 2014-01-06 Werner Lemberg <wl@gnu.org> Add manual page for `freetype-config'. Contributed by Nis Martensen <nis.martensen@web.de>. * docs/freetype-config.1: New file. * builds/unix/unix-def.in (mandir): Define. * builds/unix/install.mk (install, uninstall): Handle manpage. 2014-01-05 Werner Lemberg <wl@gnu.org> [autofit] Minor fixes for `afblue.pl'. * src/tools/afblue.pl (aux_name): Don't use `reverse'. <Handling #endif>: Use proper indentation for generated `#else'. * src/autofit/afblue.h: Regenerated. 2014-01-04 Werner Lemberg <wl@gnu.org> [autofit] Fix Indic scripts. Split the single, incorrect Indic entry into separate scripts so that the covered ranges are the same: Bengali, Devanagari, Gujarati, Gurmukhi, Kannada, Limbu, Malayalam, Oriya, Sinhala, Sundanese, Syloti Nagri, Tamil, Telugu, and Tibetan. At the same time, remove entries for Meetei Mayek and Sharada – the Unicode ranges were incorrect (and nobody has complained about that), fonts are scarce for those scripts, and the Indic auto-hinter support is rudimentary anyways. * src/autofit/afscript.h: Updated, using AF_CONFIG_OPTION_INDIC and AF_CONFIG_OPTION_CJK. * src/autofit/afstyles.h (STYLE_DEFAULT_INDIC): New auxiliary macro. Use it, together with AF_CONFIG_OPTION_INDIC and AF_CONFIG_OPTION_CJK, to update. * src/autofit/afranges.c [AF_CONFIG_OPTION_INDIC]: Updated. [!AF_CONFIG_OPTION_INDIC, !AF_CONFIG_OPTION_CJK]: Removed. Sort entries by tags. 2014-01-03 Werner Lemberg <wl@gnu.org> [autofit] Thinko. * src/autofit/hbshim.c (af_get_char_index): Similar to `af_get_coverage', reject glyphs which are not substituted. 2014-01-03 Werner Lemberg <wl@gnu.org> [autofit] Fix handling of default coverages. With this commit, the implementation of coverage handling is completed. * src/autofit/hbshim.c (af_get_coverage): Exit early if nothing to do. Reject coverages which don't contain appropriate glyphs for blue zones. 2014-01-03 Werner Lemberg <wl@gnu.org> [autofit] Fix handling of default coverages. * src/autofit/afglobal.c (af_face_globals_compute_style_coverage): First handle non-default coverages, then the default coverage of the default script, and finally the other default coverages. 2014-01-03 Werner Lemberg <wl@gnu.org> [autofit] Fix scaling of HarfBuzz shaping. * src/autofit/hbshim.c (af_get_char_index): Scale to units per EM. 2014-01-03 Werner Lemberg <wl@gnu.org> [autofit] Better ftgrid support. * src/autofit/afhints.c (af_glyph_hints_get_segment_offset): Add parameters `is_blue' and `blue_offset'. 2014-01-01 Werner Lemberg <wl@gnu.org> [autofit] Remove some styles. * src/autofit/afcover.h: Remove coverages for alternative fractions, denominators, numerators, and fractions. * src/autofit/afstyles.h (META_STYLE_LATIN): Updated. 2014-01-01 Werner Lemberg <wl@gnu.org> [autofit] Add more styles. * src/autofit/afstyles.h (STYLE_LATIN, META_STYLE_LATIN): New auxiliary macros; use them to define styles for Cyrillic, Greek, and Latin. * src/autofit/afcover.h: Remove coverage for oldstyle figures. Since those digits are used in combination with ordinary letters, it makes no sense to handle them separately. * src/autofit/afglobal.c (af_face_globals_get_metrics): Don't limit `options' parameter to 4 bits. 2014-01-01 Werner Lemberg <wl@gnu.org> [autofit] Fix style assignments to glyphs. * src/autofit/hbshim.c (af_get_coverage) [FT_CONFIG_OPTION_USE_HARFBUZZ]: Scan GPOS coverage of features also so that we can skip glyphs that have both GSUB and GPOS data. 2014-01-01 Werner Lemberg <wl@gnu.org> * src/autofit/hbshim.c: s/{lookups,glyphs}/gsub_{lookups,glyphs}/. 2014-01-01 Werner Lemberg <wl@gnu.org> [autofit] Implement and use `af_get_char_index' with HarfBuzz. * src/autofit/hbshim.c (COVERAGE) [FT_CONFIG_OPTION_USE_HARFBUZZ]: Redefine to construct HarfBuzz features. (af_get_char_index) [FT_CONFIG_OPTION_USE_HARFBUZZ]: Rewritten. * src/autofit/aflatin.c (af_latin_metrics_init_blues): Use `y_offset' to adjust `best_y'. 2013-12-31 Werner Lemberg <wl@gnu.org> [autofit] s/AF_STYLE_...._DEFAULT/AF_STYLE_...._DFLT/i. 2013-12-31 Werner Lemberg <wl@gnu.org> [autofit] Fix interface of `af_get_char_index'. * src/autofit/hbshim.c (af_get_char_index): Return error value. Add argument for y offset (to be used in a yet-to-come patch). * src/autofit/hbshim.h, src/autofit/afcjk.c, src/autofit/aflatin.c: Updated. 2013-12-30 Werner Lemberg <wl@gnu.org> [autofit] Don't combine multiple features into one set. Combining them, as originally envisioned, would lead to much more complicated code, as investigations have shown meanwhile. The major drawback is that we run out of available style slots much earlier. However, this is only a theoretical issue since we don't support a large number of scripts currently. * src/autofit/afcover.h: Replace `COVERAGE_{1,2,3}' macros with a single-element `COVERAGE' macro, sort the elements by the feature tags, and add entry for `ruby'. * src/autofit/aftypes.h: Updated. * src/autofit/hbshim.c: Updated. 2013-12-28 Werner Lemberg <wl@gnu.org> [autofit] Code shuffling to reduce use of cpp macros. * src/autofit/afglobal.c (af_face_globals_compute_style_coverage): Call `af_get_coverage' unconditionally. * src/autofit/autofit.c: Include `hbshim.c' unconditionally. * src/autofit/hbshim.c (af_get_coverage) [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Provide dummy function. * src/autofit/hbshim.h: Provide function declarations unconditionally. 2013-12-28 Werner Lemberg <wl@gnu.org> [autofit] Add wrapper function for `FT_Get_Char_Index'. Yet-to-come changes will provide HarfBuzz functionality for the new function. * src/autofit/hbshim.c (af_get_char_index): New function. * src/autofit/hbshim.h: Updated. * src/autofit/afcjk.c (af_cjk_metrics_init_widths, af_cjk_metrics_init_blues, af_cjk_metrics_check_digits): Updated. * src/autofit/aflatin.c (af_latin_metrics_init_widths, af_latin_metrics_init_blues, af_latin_metrics_check_digits): Updated. 2013-12-28 Werner Lemberg <wl@gnu.org> [autofit] Use `global' HarfBuzz font object. We now use `hb_font' instead of `hb_face' since yet-to-come changes need this. * src/autofit/afglobal.h: Include `hbshim.h'. (AF_FaceGlobalsRec) [FT_CONFIG_OPTION_USE_HARFBUZZ]: New member `hb_font'. * src/autofit/afglobal.c (af_face_globals_new) [FT_CONFIG_OPTION_USE_HARFBUZZ]: Create `hb_font'. (af_face_globals_free) [FT_CONFIG_OPTION_USE_HARFBUZZ]: Destroy `hb_font'. * src/autofit/hbshim.h: Include HarfBuzz headers. * src/autofit/hbshim.c: Include `hbshim.h' instead of HarfBuzz headers. (af_get_coverage): Updated. 2013-12-27 Werner Lemberg <wl@gnu.org> [autofit] Handle `DFLT' OpenType script for coverages. * include/ftautoh.h: Document new `default-script' property. * src/autofit/hbshim.c (af_get_coverage): Use `AF_FaceGlobals' for type of first parameter. (script_tags): Add one more element. (af_get_coverage): Adjust `script_tags' to handle `DFLT' script tag. * src/autofit/hbshim.h: Updated. * src/autofit/afglobal.c (af_face_globals_compute_style_coverage): Updated. * src/autofit/afglobal.h (AF_SCRIPT_DEFAULT): New macro. * src/autofit/afmodule.h (AF_ModuleRec): New `default_script' member. * src/autofit/afmodule.c (af_property_set, af_property_get): Handle `default-script' property. (af_autofitter_init): Updated. 2013-12-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [ftrfork] Fix the face order difference between POSIX and Carbon. The fragmented resources in Suitcase and .dfont should be reordered when `POST' resource for Type1 is being restored, but reordering of sfnt resources induces the different face order. Now the ordering is restricted to `POST' resource only, to prevent the different order issue (e.g. the face index in the fontconfig cache generated with Carbon framework is incompatible with that by FreeType 2 without Carbon framework.) Found by Khaled Hosny and Hin-Tak Leung. https://lists.gnu.org/archive/html/freetype-devel/2013-02/msg00035.html https://lists.gnu.org/archive/html/freetype-devel/2013-12/msg00027.html * src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Add a switch `sort_by_res_id' to control the fragmented resource ordering. * include/internal/ftrfork.h: Declare new switch. * src/base/ftobjs.c (IsMacResource): Enable the sorting for `POST' resource, and disable the sorting for `sfnt' resource. 2013-12-25 Werner Lemberg <wl@gnu.org> Fix Savannah bug #40997. * src/bdf/bdfdrivr.c (BDF_Face_Init): Only use OR operator to adjust face flags since FT_FACE_FLAG_EXTERNAL_STREAM might already be set. * src/cff/cffobjs.c (cff_face_init): Ditto. * src/cid/cidobjs.c (cid_face_init): Ditto. * src/pcf/pcfread.c (pcf_load_font): Ditto. * src/pfr/pfrobjs.c (pfr_face_init): Ditto. * src/type1/t1objs.c (T1_Face_Init): Ditto. * src/type42/t42objs.c (T42_Face_Init): Ditto. * src/winfonts/winfnt.c (FNT_Face_Init): Ditto. 2013-12-21 Werner Lemberg <wl@gnu.org> [autofit] Introduce `coverages'. Coverages are the interface to the HarfBuzz library to access OpenType features for handling glyphs not addressable by the cmap. Right now, compilation of HarfBuzz is only added to the development build. A solution for standard build mode will be delayed until HarfBuzz gets split into two libraries to avoid mutual dependencies between FreeType and HarfBuzz. Note that this is only a first step in handling coverages, basically providing the framework only. Code for handling selected OpenType features (this is, actually using the data in `afcover.h') will follow. * devel/ftoption.h, include/config/ftoption.h (FT_CONFIG_OPTION_USE_HARFBUZZ): New macro. * src/autofit/hbshim.c, src/autofit/hbshim.h, src/autofit/afcover.h: New files. * src/autofit/afscript.h: Add HarfBuzz script name tags. * src/autofit/afstyles.h: Add default coverage enumeration values. * src/autofit/aftypes.h: Update use of `SCRIPT' and `STYLE' macros. (AF_Coverage): New enumeration (generated by `afcover.h'). (AF_StyleClassRec): New member `coverage'. (AF_DEFINE_STYLE_CLASS): Updated. * include/internal/fttrace.h: Add `afharfbuzz' for tracing coverage data. * src/autofit/afglobal.h: Update use of `SCRIPT' and `STYLE' macros. (AF_SCRIPT_FALLBACK): Renamed to ... (AF_STYLE_FALLBACK): ... this. * src/autofit/afglobal.c: Include `hbshim.c'. Update use of `SCRIPT' and `STYLE' macros. (af_face_globals_compute_style_coverage) [FT_CONFIG_OPTION_USE_HARFBUZZ]: Call `af_get_coverage'. Update. * src/autofit/afmodule.h (AF_ModuleRec): s/fallback_script/fallback_style/. * src/autofit/afmodule.c (af_property_set): Adapt handling of `fallback-script' property to set a fallback style. (af_property_get, af_autofitter_init): Updated. * src/autofit/afpic.c: Update use of `SCRIPT' and `STYLE' macros. * src/autofit/afranges.h: Update use of `SCRIPT' macro. * src/autofit/autofit.c [FT_CONFIG_OPTION_USE_HARFBUZZ]: Include `hbshim.c'. * src/autofit/rules.mk (AUTOF_DRV_SRC): Add `hbshim.c'. (AUTOF_DRV_H): Add `afcover.h'. * builds/freetype.mk (INCLUDE_FLAGS) [DEVEL_DIR]: Use pkg-config for all libraries needed by FreeType. 2013-12-21 Werner Lemberg <wl@gnu.org> Fix Savannah bug #40975 (sort of). * src/truetype/ttinterp.c (Ins_IP): Fix sign typo to make FreeType behave the same as the Windows TrueType engine for the invalid case. 2013-12-21 Werner Lemberg <wl@gnu.org> [autofit] Make PIC mode work actually. * src/autofit/afpic.h (AFModulePIC): Fix array sizes to fit the enumeration values automatically generated by including `afscript.h' and friends. * src/autofit/afpic.c (autofit_module_class_pic_init): Updated. 2013-12-21 Werner Lemberg <wl@gnu.org> Fix PIC linking. * include/internal/ftrfork.h (CONST_FT_RFORK_RULE_ARRAY_BEGIN): Fix generated function name. * src/base/basepic.c (FT_Init_Table_raccess_guess_table): Rename to ... (FT_Init_Table_ft_raccess_guess_table): ... this so that the function name correctly corresponds to what the macro framework expects. * src/psnames/rules.mk (PSNAMES_DRV_SRC_S): Use correct file name so that PIC functions are compiled also. 2013-12-21 Werner Lemberg <wl@gnu.org> [base] Add missing dependencies to Makefile. * src/base/rules.mk (BASE_SRC): Add `basepic.c' and `ftpic.c'. (BASE_H): Add `basepic.h'. 2013-12-20 Werner Lemberg <wl@gnu.org> [autofit] Fix PIC compilation. * src/autofit/afcjk.c (af_cjk_metrics_init_widths), src/autofit/aflatin.c (af_latin_metrics_init_widths) [FT_CONFIG_OPTION_PIC]: Declare `globals'. * src/autofit/afglobal.c: Always call AF_DEFINE_SCRIPT_CLASS, and AF_DEFINE_STYLE_CLASS. * src/autofit/afpic.c: Include `afglobal.h'. (autofit_module_class_pic_init): Typo. * src/autofit/aftypes.h (AF_DEFINE_SCRIPT_CLASS, AF_DEFINE_STYLE_CLASS): Don't use the same identifier for macro parameter and structure member. 2013-12-20 Werner Lemberg <wl@gnu.org> [autofit] Introduce `styles'. This is the new top-level structure for handling glyph input data; scripts are now defined separately. * src/autofit/aftypes.h (SCRIPT): Updated. (AF_ScriptClassRec): Move `blue_stringset' and `writing_system' members to ... (AF_Style_ClassRec): ... this new structure. (AF_Style): New enumeration. (AF_StyleMetricsRec): Replace `script' enumeration with `style_class' pointer. (AF_DEFINE_SCRIPT_CLASS, AF_DECLARE_SCRIPT_CLASS): Updated. (AF_DEFINE_STYLE_CLASS, AF_DECLARE_STYLE_CLASS): New macros. * src/autofit/afstyles.h: New file, using data from `afscript.h'. * src/autofit/afscript.h: Updated. * src/autofit/afcjk.c (af_cjk_metrics_init_widths, af_cjk_metrics_init_blues, af_cjk_hint_edges): Updated. * src/autofit/afglobal.c (SCRIPT): Updated. (STYLE): Redefine macro to load `afstyles.h'. (af_script_names) [FT_DEBUG_LEVEL_TRACE]: Replace with... (af_style_names): ... this array. (af_face_globals_compute_script_coverage): Renamed to... (af_face_globals_compute_style_coverage): ... this. Updated. (af_face_globals_new, af_face_globals_free, af_face_globals_get_metrics): Updated. * src/autofit/afglobal.h (SCRIPT): Updated. (STYLE): Redefine macro to load `afstyles.h'. (AF_SCRIPT_FALLBACK): Update definition. This will get more refinements with later on. (AF_SCRIPT_UNASSIGNED): Replace with... (AF_STYLE_UNASSIGNED): ... this macro. (AF_FaceGlobalsRec): Updated. * src/autofit/aflatin.c (af_latin_metrics_init_widths, af_latin_metrics_init_blues, af_latin_metrics_scale_dim, af_latin_hint_edges): Updated. * src/autofit/aflatin2.c (af_latin2_metrics_init_widths): Updated. (af_ltn2_uniranges): Removed. * src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph): Updated. * src/autofit/afpic.c (autofit_module_class_pic_init): Updated. * src/autofit/afpic.h (AF_STYLE_CLASSES_GET): New macro. (AFModulePIC): Add `af_style_classes' and `af_style_classes_rec' members. * src/autofit/afranges.h: Updated. * src/autofit/rules.mk (AUTOF_DRV_H): Add `afstyles.h'. 2013-12-19 Werner Lemberg <wl@gnu.org> [autofit] Factor scripts and uniranges out of writing system files. * src/autofit/afranges.c, src/autofit/afranges.h: New files. * src/autofit/afscript.h: Extend `SCRIPT' macro with more parameters, taking data from the writing system files. * src/autofit/aftypes.h: Updated. * src/autofit/afglobal.c: Include `afranges.h'. Load `afscript.h' to call AF_DEFINE_SCRIPT_CLASS. * src/autofit/afglobal.c: Include `afranges.h'. Load `afscript.h' to call AF_DECLARE_SCRIPT_CLASS. * src/autofit/afcjk.c, src/autofit/afcjk.h: Updated. * src/autofit/afdummy.c, src/autofit/afdummy.h: Updated. * src/autofit/afindic.c, src/autofit/afindic.h: Updated. * src/autofit/aflatin.c, src/autofit/aflatin.h: Updated. * src/autofit/aflatin2.c, src/autofit/aflatin2.h: Updated. * src/autofit/afpic.c: Updated. * src/autofit/autofit.c: Include `afranges.c'. * src/autofit/rules.mk (AUTOF_DRV_SRC): Add `afranges.c'. 2013-12-18 Werner Lemberg <wl@gnu.org> [autofit] More code orthogonality. * src/autofit/aftypes.h (AF_StyleMetrics): Replace `script_class' pointer to an `AF_ScriptClass' structure with `script' index of type `AF_Script'. Move some code around. * src/autofit/afcjk.c: Include `afpic.h'. (af_cjk_metrics_init_widths, af_cjk_metrics_init_blues, af_cjk_hint_edges): Updated. * src/autofit/aflatin.c: Include `afpic.h'. (af_latin_metrics_init_widths, af_latin_metrics_init_blues, af_latin_metrics_scale_dim, af_latin_hint_edges): Updated. * src/autofit/afglobal.c (af_face_globals_get_metrics): Updated. * src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph): Updated. 2013-12-18 Werner Lemberg <wl@gnu.org> [autofit] s/ScriptMetrics/StyleMetrics/. 2013-12-18 Werner Lemberg <wl@gnu.org> [autofit] s/script_{metrics,hints}/style_{metrics,hints}/ 2013-12-18 Werner Lemberg <wl@gnu.org> [autofit] s/gscripts/gstyles/. 2013-12-18 Werner Lemberg <wl@gnu.org> [autofit] s/glyph_scripts/glyph_styles/. This is the first commit of a series to create a new top-level structure (a `style') for handling scripts, writing_systems, and soon-to-be-added coverages. 2013-12-17 Werner Lemberg <wl@gnu.org> [autofit] s/AF_Script_/AF_WritingSystem_/ where appropriate. 2013-12-11 Infinality <infinality@infinality.net> [truetype] Simplify logic of rendering modes. This patch unifies the subpixel and non-subpixel cases. * src/truetype/ttinterp.h (TT_ExecContextRec): Remove `grayscale_hinting'; all code should refer to `grayscale' instead. Remove unused `native_hinting' member. Rename `subpixel_hinting' member to `subpixel. * src/truetype/ttgload.c (TT_LOADER_SET_PP): Updated. (tt_loader_init): Updated. * src/truetype/ttinterp.c (Ins_GETINFO): Simplify. Updated. 2013-12-11 Werner Lemberg <wl@gnu.org> [documentation] Add section how to include FreeType header files. Problem reported by David Kastrup <dak@gnu.org>. Surprisingly, a description how to do that was completely missing in the API reference. * include/freetype.h, include/ftchapters.h: New documentation section `header_inclusion'. 2013-12-10 Werner Lemberg <wl@gnu.org> [autofit] s/DFLT/NONE/, s/dflt/none/. 2013-12-10 Werner Lemberg <wl@gnu.org> [autofit] s/AF_SCRIPT_NONE/AF_SCRIPT_UNASSIGNED/. 2013-12-10 Werner Lemberg <wl@gnu.org> [truetype] Fix scaling of vertical phantom points. * src/truetype/ttgload.c (load_truetype_glyph): Scale pp3.x and pp4.x also. 2013-12-10 Werner Lemberg <wl@gnu.org> [truetype] Fix positioning of composite glyphs. Problem reported by Nigel Tao <nigeltao@golang.org>. * src/truetype/ttgload.c (TT_Hint_Glyph): Remove code that shifts the glyph (component) by a fractional value computed from the LSB phantom point. This is wrong, since the horizontal phantom points get rounded horizontally later on. 2013-12-08 Werner Lemberg <wl@gnu.org> * Version 2.5.2 released. ========================= Tag sources with `VER-2-5-2'. * docs/VERSION.DLL: Update documentation and bump version number to 2.5.2. * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj, builds/windows/vc2005/index.html, builds/windows/vc2008/freetype.vcproj, builds/windows/vc2008/index.html, builds/windows/vc2010/freetype.vcxproj, builds/windows/vc2010/index.html, builds/windows/visualc/freetype.dsp, builds/windows/visualc/freetype.vcproj, builds/windows/visualc/index.html, builds/windows/visualce/freetype.dsp, builds/windows/visualce/freetype.vcproj, builds/windows/visualce/index.html, builds/wince/vc2005-ce/freetype.vcproj, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/freetype.vcproj, builds/wince/vc2008-ce/index.html: s/2.5.1/2.5.2/, s/251/252/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 2. * builds/unix/configure.raw (version_info): Set to 17:1:11. * CMakeLists.txt (VERSION_PATCH): Set to 2. * docs/CHANGES: Updated. 2013-12-07 Werner Lemberg <wl@gnu.org> [truetype] Next round in phantom point handling. Greg Hitchcock provided very interesting insights into the complicated history of the horizontal positions of the TSB and BSB phantom points. * src/truetype/ttgload.c (TT_LOADER_SET_PP) [TT_CONFIG_OPTION_SUBPIXEL_HINTING]: Use `subpixel_hinting' and `grayscale_hinting' flags as conditionals for the x position of TSB and BSB. 2013-12-05 Werner Lemberg <wl@gnu.org> * builds/freetype.mk (FT_CC): Removed. Unused. 2013-12-04 Werner Lemberg <wl@gnu.org> [sfnt] Fix handling of embedded bitmap strikes. This corrects the commit from 2013-11-21. Problem reported by Andrey Panov <panov@canopus.iacp.dvo.ru>. * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Fix logic to detect excessive bytes for bit-aligned bitmaps. 2013-12-03 Werner Lemberg <wl@gnu.org> [truetype] Remove dead code. Reported by Nigel Tao <nigeltao@golang.org>. * include/internal/tttypes.h (TT_LoaderRec): Remove unused `preserve_pps' field. * src/truetype/ttgload.c (TT_Hint_Glyph): Updated. 2013-12-03 Werner Lemberg <wl@gnu.org> [truetype] Fix phantom point handling. This is a further improvement to the changes from 2013-11-06. * src/truetype/ttgload.c (TT_Hint_Glyph): Horizontal phantom points are rounded horizontally, vertical ones are rounded vertically. (TT_LOADER_SET_PP): The horizontal position of vertical phantom points in pre-ClearType mode is zero, as shown in the OpenType specification. 2013-12-02 Werner Lemberg <wl@gnu.org> [truetype] Fix change from 2013-11-20. Problem reported by Akira Kakuto <kakuto@fuk.kindai.ac.jp>. * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Protect call to `Update_Max' with both a TT_USE_BYTECODE_INTERPRETER guard and a `IS_HINTED' clause. Also remove redundant check using `maxSizeOfInstructions' – in simple glyphs, the bytecode data comes before the outline data, and a validity test for this is already present. 2013-11-27 Werner Lemberg <wl@gnu.org> [autofit] Fix use of dumping functions in `ftgrid' demo program. * src/autofit/afhints.c (AF_DUMP) [FT_DEBUG_AUTOFIT]: New macro. (af_glyph_hints_dump_points, af_glyph_hints_dump_segments, af_glyph_hints_dump_edges) [FT_DEBUG_AUTOFIT]: Add parameter to handle output to stdout. Use AF_DUMP. (af_glyph_hints_dump_points, af_glyph_hints_dump_segments, af_glyph_hints_dump_edges) [!FT_DEBUG_AUTOFIT]: Removed. 2013-11-25 Werner Lemberg <wl@gnu.org> * Version 2.5.1 released. ========================= Tag sources with `VER-2-5-1'. * docs/VERSION.DLL: Update documentation and bump version number to 2.5.1. * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj, builds/windows/vc2005/index.html, builds/windows/vc2008/freetype.vcproj, builds/windows/vc2008/index.html, builds/windows/vc2010/freetype.vcxproj, builds/windows/vc2010/index.html, builds/windows/visualc/freetype.dsp, builds/windows/visualc/freetype.vcproj, builds/windows/visualc/index.html, builds/windows/visualce/freetype.dsp, builds/windows/visualce/freetype.vcproj, builds/windows/visualce/index.html, builds/wince/vc2005-ce/freetype.vcproj, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/freetype.vcproj, builds/wince/vc2008-ce/index.html: s/2.5.0/2.5.1/, s/250/251/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1. * builds/unix/configure.raw (version_info): Set to 17:0:11. * CMakeLists.txt (VERSION_PATCH): Set to 1. * docs/CHANGES, docs/release: Updated. 2013-11-23 Werner Lemberg <wl@gnu.org> [truetype]: Add tricky font names `hkscsiic.ttf' and `iicore.ttf'. * src/truetype/ttobjs.c (TRICK_NAMES_MAX_CHARACTERS, TRICK_NAMES_COUNT): Updated. (trick_names): Add family name for the two fonts. 2013-11-23 Werner Lemberg <wl@gnu.org> * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Typo. 2013-11-21 Werner Lemberg <wl@gnu.org> [sfnt] Typo. Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>. * src/sfnt/sfobjs.c (sfnt_load_face): Return correct `bsize->width' value if the font lacks an `OS/2' table. 2013-11-21 Werner Lemberg <wl@gnu.org> [sfnt] Improve handling of buggy embedded bitmap strikes. We are now able to successfully load `AppleMyoungJo.ttf'. Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>. * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Don't trust glyph format. 2013-11-20 Werner Lemberg <wl@gnu.org> [truetype] Don't trust `maxp's `maxSizeOfInstructions'. Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>; see https://lists.nongnu.org/archive/html/freetype-devel/2013-08/msg00005.html for details. * src/base/ftobjs.c (FT_Load_Glyph): Check size of `fpgm' and `prep' tables also for setting `autohint'. * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Use code from `TT_Process_Composite_Glyph' for handling unreliable values of `maxSizeOfInstructions'. 2013-11-16 Werner Lemberg <wl@gnu.org> [sfnt] Fix `OS/2' table version 5 support. We now follow the `official' announcement from Microsoft (on the OpenType mailing list, which unfortunately hasn't a public archive). * include/freetype/tttables.h (TT_OS2): s/usLowerPointSize/usLowerOpticalPointSize/, s/usUpperPointSize/usUpperOpticalPointSize/. * src/sfnt/ttload.c (tt_face_load_os2): Update, and set correct default values. 2013-11-13 Werner Lemberg <wl@gnu.org> * builds/unix/ft2unix.h: Remove. No longer necessary. * builds/unix/install.mk (install): Updated. 2013-11-13 Werner Lemberg <wl@gnu.org> Simplify header file hierarchy. This large patch changes the header file directory layout from `include/freetype/...' to `include/...', effectively removing one level. Since the file `ft2build.h' is also located in `include' (and it stays there even after installation), all FreeType header files are now in a single directory. Applications that use (a) `freetype-config' or FreeType's `pkg-config' file to get the include directory for the compiler, and (b) the documented way for header inclusion like #include <ft2build.h> #include FT_FREETYPE_H ... don't need any change to the source code. * include/freetype/*: Move up to... * include/*: ... this directory. * builds/amiga/include/freetype/*: Move up to... * builds/amiga/include/*: ... this directory. */*: Essentially do `s@/freetype/@/@' where appropriate. * CMakeLists.txt: Simplify. * builds/unix/freetype-config.in, builds/unix/freetype2.in: For `--cflags', return a single directory. * builds/unix/install.mk (install): No longer try to remove `cache' and `internal' subdirectories; instead, remove the `freetype' subdirectory. 2013-11-12 Werner Lemberg <wl@gnu.org> [truetype] Fix last `truetype' commit. * src/truetype/ttgload.c (tt_get_metrics): Preserve stream position. Return error value. (load_truetype_glyph): Updated. 2013-11-10 Werner Lemberg <wl@gnu.org> * docs/CMAKE: New dummy file. 2013-11-08 Dave Arnold <darnold@adobe.com> [cff] Fix for hints that touch. * src/cff/cf2hints.c (cf2_hintmap_insertHint): Fix condition for finding index value of insertion point. 2013-11-06 Werner Lemberg <wl@gnu.org> [truetype] Fix handling of phantom points in composite glyphs. Problem reported by Nigel Tao <nigeltao@golang.org>. This is a follow-up commit to the previous one. * src/truetype/ttgload.c (load_truetype_glyph): Call `tt_get_metrics' after loading the glyph header. 2013-11-06 Werner Lemberg <wl@gnu.org> [truetype] Improve emulation of vertical metrics. This commit also improves the start values of vertical phantom points. Kudos to Greg Hitchcock for help. * src/truetype/ttgload.c (TT_Get_VMetrics): Add parameter to pass `yMax' value. Replace code with fixed Microsoft definition. (tt_get_metrics): Updated. (TT_LOADER_SET_PP): Add explanation how to initialize phantom points, taken from both the OpenType specification and private communication with Greg (which will eventually be added to the standard). Fix horizontal position of `pp3' and `pp4'. * src/truetype/ttgload.h: Updated. * src/truetype/ttdriver.c (tt_get_advances): Updated. * docs/CHANGES: Updated. 2013-11-05 Werner Lemberg <wl@gnu.org> * builds/windows/vc2010/freetype.vcxproj: s/v110/v100/. PlatformToolSet version 110 is for VC2012. Problem reported (with solution) by Dave Arnold <darnold@adobe.com>. 2013-11-05 Werner Lemberg <wl@gnu.org> [truetype] Correctly reset point tags for glyph components. Problem reported by Nigel Tao <nigeltao@golang.org>. * src/truetype/ttgload.c (TT_Process_Composite_Glyph): Fix loop. 2013-11-02 Werner Lemberg <wl@gnu.org> [truetype] Fix GETINFO opcode handling of subpixel hinting bits. * src/truetype/ttinterp.c (Ins_GETINFO): Don't request bit 6 set to get info on subpixel hinting. * docs/CHANGES: Updated. 2013-11-02 Werner Lemberg <wl@gnu.org> Fix Savannah bug #40451. Simply apply the patch from the bug report. * builds/unix/ftconfig.in, builds/vms/ftconfig.h, include/freetype/config/ftconfig.h: The used #pragma directives only work with gcc versions 4.6 and higher. 2013-11-01 Werner Lemberg <wl@gnu.org> * docs/CHANGES: Updated. 2013-11-01 Werner Lemberg <wl@gnu.org> [truetype] Minor code refactoring. Two benefits: The allocated FDEF (and IDEF) array gets slightly smaller, and the `ttdebug' demo program has access to function numbers without additional costs. Fortunately, no changes to FontForge are necessary – this is the only external TrueType debugger I know of, but others may exist and should check the code accordingly. * src/truetype/ttinterp.h (TT_CallRec): Replace `Cur_Restart' and `Cur_End' with a pointer to the corresponding `TT_DefRecord' structure. * src/truetype/ttinterp.c (DO_JROT, DO_JMPR, DO_JROF, Ins_ENDF, Ins_CALL, Ins_LOOPCALL, Ins_UNKNOWN, TT_RunIns <Invalid_Opcode>): Updated. 2013-10-27 Werner Lemberg <wl@gnu.org> [sfnt] Implement support for `OS/2' table version 5. See http://typedrawers.com/discussion/470/new-microsoft-size-specific-design-selection-mechanism for the announcement. * include/freetype/tttables.h (TT_OS2): Add fields `usLowerPointSize' and `usUpperPointSize'. Since FreeType returns this structure only as a pointer through `FT_Get_Sfnt_Table', there shouldn't be any ABI problems. * src/sfnt/ttload.c (tt_face_load_os2): Implement it. * docs/CHANGES: Updated. 2013-10-24 Werner Lemberg <wl@gnu.org> * README.git, docs/CHANGES, docs/INSTALL: Updated. 2013-10-24 John Cary <cary@txcorp.com> Provide cmake support. * CMakeLists.txt: New file. 2013-10-23 Kenneth Miller <kennethadammiller@yahoo.com> Werner Lemberg <wl@gnu.org> Provide support for x64 builds in Visual C++ project files. * src/builds/win32: Renamed to... * src/builds/windows: This. * src/builds/windows/vc2010/*: Updated to handle x64 target. * src/builds/windows/*.mk, docs/INSTALL.GNU: s/win32/windows/ where appropriate. 2013-10-22 Werner Lemberg <wl@gnu.org> * src/base/md5.c, src/base/md5.h: Updated to recent version. * src/base/ftobjs.c: Updated; `md5.c' no longer uses `free'. The canonical URL to get updates for this file is https://cvsweb.openwall.com/cgi/cvsweb.cgi/Owl/packages/popa3d/popa3d/md5/ as the author told me in private communication. 2013-10-19 Werner Lemberg <wl@gnu.org> [autofit] s/SMALL_TOP/X_HEIGHT/. * src/autofit/afblue.dat: Updated. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/aflatin.c, src/autofit/aflatin.h, src/autofit/aflatin2.c: Updated. 2013-10-19 Werner Lemberg <wl@gnu.org> * src/autofit/afblue.dat: s/MINOR/DESCENDER/. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. 2013-10-16 Werner Lemberg <wl@gnu.org> [autofit] Add description strings to script entries. Currently, this is unused. * src/autofit/afscript.h: Do it. * src/autofit/afglobal.c, src/autofit/afpic.c, src/autofit/aftypes.h: Updated. 2013-10-16 Werner Lemberg <wl@gnu.org> [autofit] Improve tracing message for extra light flag. * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Do it. 2013-10-15 Chongyu Zhu <lembacon@gmail.com> [arm] Fix thumb2 inline assembly under LLVM. When using `ADD' with an immediate operand, the instruction is actually `ADD Rd, Rn, #<imm12>', that is, the maximum of the immediate operand cannot exceed 4095. It will fail to compile with LLVM. However, in GCC, due to some legacy compatibility considerations, `ADD.W' will be automatically emitted when the immediate operand is larger than 4095. * builds/unix/ftconfig.in, include/freetype/config/ftconfig.h (FT_MulFix_arm) [__GNUC__]: Support clang compiler. * src/truetype/ttinterp.c (TT_MulFix14_arm) [__GNUC__]: Ditto. 2013-10-12 Werner Lemberg <wl@gnu.org> [autofit] Improve tracing of `latin' hinter. * src/autofit/aflatin.c (af_latin_metrics_init_blues): Report blue zone types. (af_latin_metrics_scale_dim): Report scaling changes due to x height alignment. Report scaled stroke width and blue zone values. 2013-10-03 Dave Arnold <darnold@adobe.com> * src/cff/cf2font.c (cf2_computeDarkening): Avoid division by zero. Note that the old code avoided using a region of the piecewise linear function where the slope was zero. The recovery was to use a different section of the function, which produced a different, incorrect amount of darkening. 2013-10-02 Darrell Bellert <darrell.bellert@hl.konicaminolta.us> * src/sfnt/ttload.c (tt_face_load_pclt): Fix `pclt_fields'. 2013-10-02 Dave Arnold <darnold@adobe.com> * src/cff/cf2font.c (cf2_computeDarkening): Initialize darkenAmount. This line was lost in commit 89ca1fd6 (from 2013-06-25). The effect is to use a previous darkening amount when producing an unhinted, unscaled outline. This can cause autohint samples in ftgrid and ftview to be based on darkened CFF outlines instead of unhinted, undarkened ones. 2013-09-29 Dave Arnold <darnold@adobe.com> Fix Savannah bug #39295. The bug was caused by switching to the initial hintmap (the one in effect when `moveto' executes) just before drawing the final element in the charstring. This ensured that the path was closed (in both Character Space and Device Space). But if the final element was a curve and if the final hintmap was different enough from the initial one, then the curve was visibly distorted. The first part of the fix is to draw the final curve using the final hintmap as specified by the charstring. This corrects the distortion but does not ensure closing in Device Space. It may require the rasterizer to automatically generate an extra closing line. Depending on the hintmap differences, this line could be from zero to a couple pixels in length. The second part of the fix covers the case where the charstring subpath is closed with an explicit line. We now modify that line's end point to avoid the distortion. Some glyphs in the bug report font (TexGyreHeros-Regular) that show the change are: 25ppem S (98) 24ppem eight (52) 25.5ppem p (85) Curves at the *end* of a subpath are no longer distorted. However, some of these glyphs have bad hint substitutions in the middle of a subpath, and these are not affected. The patch has been tested with a set of 106 fonts that shipped with Adobe Creative Suite 4, together with 756 Open Source CFF fonts from Google Fonts. There are 1.5 million glyphs, of which some 20k are changed with the fix. A sampling of a few hundred of these changes have been examined more closely, and the changes look good (or at least acceptable). * src/cff/cf2hints.h (CF2_GlyphPathRec): New element `pathIsClosing' to indicate that we synthesize a closepath line. * src/cff/cf2hints.c (cf2_glyphpath_init): Updated. (cf2_glyphpath_pushPrevElem): If closing, use first hint map (for `lineto' operator) and adjust hint zone. For synthesized closing lines, use end point in first hint zone. (cf2_glyphpath_lineTo): Take care of synthesized closing lines. In particular, shift the detection of zero-length lines from character space to device space. (cf2_glyphpath_closeOpenPath): Remove assertion. Updated. 2013-09-25 Werner Lemberg <wl@gnu.org> * src/autofit/aflatin.c (af_{grek,cyrl}_uniranges): Fix arrays. 2013-09-25 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [bdf, pcf] Refuse non-zero face_index. Suggested by Akira Tagoh, see https://lists.gnu.org/archive/html/freetype/2013-09/msg00030.html * src/bdf/bdfdrivr.c (BDF_Face_Init): Return `Invalid_Argument' error if the font could be opened but non-zero `face_index' is given. * src/pcf/pcfdrivr.c (PCF_Face_Init): Ditto. * src/type42/t42objs.c (T42_Face_Init): Remove unrequired FT_UNUSED macro for `face_index' because it is validated later. 2013-09-23 Werner Lemberg <wl@gnu.org> Fix Savannah bug #40090. * src/autofit/afcjk.c (af_cjk_metrics_scale): Revert commit 306f8c5d (from 2013-08-25) affecting this function. 2013-09-22 Werner Lemberg <wl@gnu.org> [autofit] Disunify Cyrillic and Greek handling from Latin. * src/autofit/afscript.h: Add Cyrillic and Greek. * src/autofit/afblue.dat (AF_BLUE_STRINGSET_GREK, AF_BLUE_STRINGSET_CYRL): Add blue zones for Greek and Cyrillic. (AF_BLUE_STRINGSET_LATN): Fix typo. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/aflatin.c (af_grek_uniranges, af_cyrl_uniranges): New arrays. (af_grek_script_class, af_cyrl_script_class): New scripts. * src/autofit/aflatin.h: Updated. 2013-09-20 Werner Lemberg <wl@gnu.org> * docs/CHANGES: Updated. 2013-09-20 Behdad Esfahbod <behdad@behdad.org> Fix vertical size of emboldened glyphs. Cf. https://bugzilla.gnome.org/show_bug.cgi?id=686709 * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Adjust `horiBearingY' also. 2013-09-11 Alexei Podtelezhnikov <apodtele@gmail.com> * include/freetype/ftoutln.h: Correct FT_Outline_Get_Orientation algorithm description. 2013-09-11 Werner Lemberg <wl@gnu.org> [autofit] Improve Hebrew rendering. This change introduces a new blue zone property `AF_BLUE_PROPERTY_LATIN_LONG' to make the auto-hinter ignore short top segments. * src/autofit/afblue.dat: Fix Hebrew blue strings. Use AF_BLUE_PROPERTY_LATIN_LONG for AF_BLUE_STRING_HEBREW_TOP. * src/autofit/afblue.hin (AF_BLUE_PROPERTY_LATIN_LONG): New macro. * src/autofit/afblue.c, src/autofit/afblue.h: Updated. * src/autofit/aflatin.c (af_latin_metrics_init_blues): Handle `AF_LATIN_IS_LONG_BLUE'. * src/autofit/aflatin.h (AF_LATIN_IS_LONG_BLUE): New macro. 2013-08-28 Behdad Esfahbod <behdad@google.com> [sfnt] Fix frame access while reading WOFF table directory. * src/sfnt/sfobjs.c (woff_open_font): Using single memory frame while reading the directory entries for the whole loop. 2013-08-29 Werner Lemberg <wl@gnu.org> Behdad Esfahbod <behdad@google.com> Implement support for WOFF containers. We simply synthesize a SFNT from the WOFF, create a memory stream for the new data, and load the SFNT as usual. Does NOT add any API to access WOFF metadata or private blocks. * include/freetype/internal/tttypes.h (WOFF_HeaderRec, WOFF_TableRec): New structures. * include/freetype/tttags.h (TTAG_wOFF): New macro. * src/base/ftobjs.c (FT_Open_Face): Set `stream' after calling `open_face'. * src/sfnt/sfobjs.c [FT_CONFIG_OPTION_SYSTEM_ZLIB]: Include `FT_GZIP_H'. (WRITE_BYTE, WRITE_USHORT, WRITE_ULONG): New temporary macros for writing to a stream. (sfnt_stream_close, compare_offsets, woff_open_font): New functions. (sfnt_open_font): Handle `TTAG_wOFF'. (sfnt_init_face): Set `stream' after calling `sfnt_open_font'. * src/truetype/ttobjs.c (tt_face_init): Set `stream' after calling `sfnt->init_face'. * src/base/ftobjs.c (open_face): Use a pointer to FT_Stream as an argument so that a changed stream survives. Update callers. 2013-08-28 Werner Lemberg <wl@gnu.org> [gzip] New function `FT_Gzip_Uncompress'. This is modeled after zlib's `uncompress' function. We need this for WOFF support. * include/freetype/ftgzip.h, src/gzip/ftgzip.c (FT_Gzip_Uncompress): New function. * src/gzip/rules.mk: Rewrite to better reflect dependencies. 2013-08-28 Werner Lemberg <wl@gnu.org> [autofit] Fix `make multi' compilation. * src/autofit/afblue.cin, src/autofit/afblue.c: Don't include `afblue.h' but `aftypes.h'. * src/autofit/afcjk.c: Don't include `aftypes.h' but `afglobal.h'. 2013-08-28 Werner Lemberg <wl@gnu.org> [autofit] Fix C++ compilation. * src/autofit/afglobal.c (af_face_globals_get_metrics), src/autofit/afdummy.c (af_dflt_script_class), src/autofit/afindic.c (af_deva_script_class): Use proper casts. 2013-08-27 Behdad Esfahbod <behdad@google.com> * src/sfnt/ttload.c (tt_face_load_font_dir): Fix sign typos. 2013-08-27 Behdad Esfahbod <behdad@google.com> FT_Open_Face: Improve external stream handling. If the font's `clazz->init_face' function wants to swap to new stream, handling of whether original stream was external could result to either memory leak or double free. Mark externality into face flags before calling `init_face' such that the clazz can handle external streams properly. * src/base/ftobjs.c (FT_Open_Face): Move code to set FT_FACE_FLAG_EXTERNAL_STREAM to... (open_face): This function. 2013-08-27 Werner Lemberg <wl@gnu.org> Remove `FT_SqrtFixed' function. It's no longer used. * include/freetype/internal/ftcalc.h, src/base/ftcalc.c: Do it. 2013-08-27 Werner Lemberg <wl@gnu.org> [autofit] While tracing, report script names instead of ID values. * src/autofit/afglobal.c (af_script_names) [FT_DEBUG_LEVEL_TRACE]: New array. * src/autofit/afglobal.h: Updated. * src/autofit/afcjk.c (af_cjk_metrics_init_widths, af_cjk_hint_edges): Use `af_script_names'. * src/autofit/aflatin.c (af_latin_metrics_init_widths, af_latin_hint_edges): Ditto. 2013-08-26 Werner Lemberg <wl@gnu.org> [autofit] Report used script while hinting a glyph. * src/autofit/afcjk.c (af_cjk_hint_edges), src/autofit/aflatin.c (af_latin_hint_edges): Implement it. 2013-08-26 Werner Lemberg <wl@gnu.org> [autofit] Add support for Hebrew script. * src/autofit/afblue.dat: Add blue strings for Hebrew. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/aflatin.c (af_hebr_uniranges): New array. (af_hebr_script_class): New script. * src/autofit/aflatin.h, src/autofit/afscript.h: Updated. 2013-08-26 Werner Lemberg <wl@gnu.org> [autofit] Improve tracing messages. * src/autofit/afcjk.c (af_cjk_metrics_init_widths): Mention script ID in tracing message. (af_cjk_metrics_init_blues): Initialize `axis' outside of the inner loop. Improve tracing messages. (af_cjk_hint_edges) [FT_DEBUG_LEVEL_TRACE]: New variable `num_actions' to count hinting actions. Improve tracing messages. * src/autofit/aflatin.c (af_latin_metrics_init_widths): Mention script ID in tracing message. (af_latin_metrics_init_blues, af_latin_hint_edges): Improve tracing messages. 2013-08-26 Werner Lemberg <wl@gnu.org> Better tracing of loaded glyphs. Previously, the loading of a glyph was traced at level 4, if at all. With this change, all font loading routines emit a tracing message at level 1, making it easier to select tracing output (for example using F2_DEBUG="any:1 afhints:7 aflatin:7"). * src/bdf/bdfdrivr.c (BDF_Glyph_Load): Add tracing message. * src/cff/cffdrivr.c (cff_glyph_load): Ditto. * src/cff/cffgload.c (cff_decoder_prepare): Improve tracing messages. * src/cid/cidgload.c (cid_load_glyph): Use level 1 for tracing message. * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Ditto. * src/pfr/pfrobjs.c (pfr_slot_load): Add tracing message. * src/truetype/ttgload.c (TT_Load_Glyph): Ditto. * src/type1/t1gload.c (T1_Load_Glyph): Ditto. * src/type42/t42objs.c (T42_GlyphSlot_Load): Ditto. * src/winfonts/winfnt.c (FNT_Load_Glyph): Ditto. 2013-08-26 Werner Lemberg <wl@gnu.org> [autofit] Fix script selection. * src/autofit/afglobal.c (af_face_globals_get_metrics): Use `AF_SCRIPT_DFLT', not value 0. Simplify code. * src/autofit/afscript.h: Sort by script name. 2013-08-26 Werner Lemberg <wl@gnu.org> [autofit] Make `dummy' hinter work as expected. * src/autofit/afdummy.c (af_dummy_hints_init): Properly set scaling information. (af_dummy_hints_apply): Scale the glyphs. 2013-08-25 Werner Lemberg <wl@gnu.org> [autofit] Make `cjk' module use blue stringsets. * src/autofit/afcjk.c (AF_CJK_MAX_TEST_CHARACTERS): Removed. (af_cjk_hani_blue_chars): Removed. (AF_CJK_BLUE_TYPE_*): Removed. (af_cjk_metrics_init_blues): Replace AF_CJK_MAX_TEST_CHARACTERS with AF_BLUE_STRING_MAX_LEN. Change loops to use offsets (in file `afblue.h') into the new arrays `af_blue_stringsets' and `af_blue_strings' (in file `afblue.c'). Instead of three dimensions (as used in the old blue string array) we now use properties to do the same, saving one loop nesting level. * src/autofit/afcjk.h: Remove old enumeration values superseded by the new data in `afblue.h'. (AF_CJK_IS_TOP_BLUE, AF_CJK_IS_HORIZ_BLUE, AF_CJK_IS_FILLED_BLUE, AF_CJK_IS_RIGHT_BLUE): New macros, to be used in `af_cjk_metrics_init_blues'. (AF_CJK_BLUE_IS_RIGHT): Remove this now redundant enum value. (AF_CJK_BLUE_IS_TOP): Renamed to... (AF_CJK_BLUE_TOP): This. (AF_CJK_MAX_BLUES): Remove. (AF_CJKAxisRec): Updated. 2013-08-25 Werner Lemberg <wl@gnu.org> [autofit] Typo. * src/autofit/afblue.hin, src/autofit/afblue.c (GET_UTF8_CHAR): Use cast. 2013-08-25 Werner Lemberg <wl@gnu.org> [autofit] Synchronize `cjk' with `latin' module (and vice versa). * src/autofit/afcjk.c (af_cjk_metrics_init_widths): Add tracing messages. (af_cjk_metrics_init_blues): Don't pass blue string array as argument but use the global array directly. Use `outline' directly. Update and add tracing messages. (af_cjk_metrics_init): Simplify code. (af_cjk_metrics_scale_dim): Improve tracing message. (af_cjk_metrics_scale): Synchronize. * src/autofit/aflatin.c (af_latin_metrics_init_widths, af_latin_metrics_init_blues): Improve and add tracing messages. 2013-08-25 Werner Lemberg <wl@gnu.org> [autofit] Make `latin' module use blue stringsets. * src/autofit/aflatin.c (AF_LATIN_MAX_TEST_CHARACTERS): Removed. (af_latin_blue_chars): Removed. (af_latin_metrics_init_blues): Replace AF_LATIN_MAX_TEST_CHARACTERS with AF_BLUE_STRING_MAX_LEN. Change loops to use offsets (in file `afblue.h') into the new arrays `af_blue_stringsets' and `af_blue_strings' (in file `afblue.c'). Use `AF_LATIN_IS_SMALL_TOP_BLUE' macro. * src/autofit/aflatin.h: Remove old enumeration values superseded by the new data in `afblue.h'. (AF_LATIN_IS_TOP_BLUE): Updated definition. (AF_LATIN_IS_SMALL_TOP_BLUE): New macro. (AF_LATIN_MAX_BLUES): Remove. (AF_LatinAxisRec): Updated. 2013-08-25 Werner Lemberg <wl@gnu.org> [autofit] Add blue stringsets. * src/autofit/aftypes.h: Include `afblue.h'. (AF_ScriptClassRec): Add `blue_stringset' field. (AF_DEFINE_SCRIPT_CLASS): Updated. * src/autofit/autofit.c: Include `afblue.c'. * src/autofit/afcjk.c (af_hani_script_class), src/autofit/afdummy.c (af_dflt_script_class), src/autofit/afindic.c (af_deva_script_class), src/autofit/aflatin.c (af_latn_script_class), src/autofit/aflatin2.c (af_ltn2_script_class): Updated. * src/autofit/rules.mk (AUTOF_DRV_SRC): Add `afblue.c'. 2013-08-25 Werner Lemberg <wl@gnu.org> [autofit] Introduce data file for blue strings. The idea is to have a central file which gets processed by a Perl script to create proper `.c' and `.h' files using templates. There are two other reasons to do that: . The data file should be easily readable. We use UTF-8 encoding which then gets converted to single bytes. . Since the number of supported scripts will increase soon, the current usage of blue string arrays is a waste of space. Using the Perl script it is possible to imitate jagged arrays, defining enumeration constants as offsets into the arrays. This commit only adds files without changing any functionality. * src/autofit/afblue.dat: New data file. * src/tools/afblue.pl: New Perl script for processing `afblue.dat'. * src/autofit/afblue.cin, src/autofit/afblue.hin: New template files for... * src/autofit/afblue.c, src/autofit/afblue.c: New source files. To avoid a dependency on Perl, we add them too. 2013-08-19 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Enable new algorithm for `BBox_Cubic_Check'. * src/base/ftbbox.c: Enable new BBox_Cubic_Check algorithm, remove the old one. Improve comments. 2013-08-18 Werner Lemberg <wl@gnu.org> * builds/unix/unix-def.in (freetype2.pc): Don't set executable bit. 2013-08-18 Werner Lemberg <wl@gnu.org> Fix Savannah bug #39804. * builds/unix/configure.raw (LIBPNG): Define and export. * builds/unix/freetype-config.in, builds/unix/freetype2.in: Handle libpng. 2013-08-17 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Clean up BBox_Conic_Check. * src/base/ftbbox.c (BBox_Conic_Check): Remove redundant checks for extremum at the segment ends, which are already within the bbox. Slightly modify calculations. 2013-08-15 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Finish experimental (disabled) BBox_Cubic_Check implementation. * src/base/ftbbox.c (BBox_Cubic_Check): Scale arguments to improve accuracy and avoid overflows. 2013-08-13 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Refactor experimental (disabled) BBox_Cubic_Check. * src/base/ftbbox.c (BBox_Cubic_Check): Implement the minimum search as the mirror image of the maximum search implemented here... (update_max): New function. 2013-08-06 John Tytgat <John.Tytgat@esko.com> Fix Savannah bug #39702. * src/cff/cffload.c (cff_index_get_pointers): Check for `cur_offset != 0'; this stronger test is mandated by the CFF specification. Fix test for INDEX structures which have one or more empty entries at the end. 2013-08-05 Werner Lemberg <wl@gnu.org> Fix gcc pragmas, part 2. * src/truetype/ttinterp.c (TT_MulFix14_long_long, TT_DotFix14_long_long): `#pragma gcc diagnostic {push,pop}' has been introduced with gcc version 4.6. 2013-08-05 Werner Lemberg <wl@gnu.org> Fix gcc pragmas. * src/truetype/ttinterp.c (TT_MulFix14_long_long, TT_DotFix14_long_long): Older gcc versions don't accept diagnostic pragmas within a function body. 2013-08-05 Werner Lemberg <wl@gnu.org> Fix Savannah bug #39700. * builds/unix/ftconfig.h: Synchronize with `include/freetype/config/ftconfig.h'. * builds/vms/ftconfig.h: Ditto. Make the differences to the master `ftconfig.h' file as small as possible for easier maintenance. 2013-08-05 Werner Lemberg <wl@gnu.org> [autofit] Improve handling of `near' points. Points which are very near to each other are now marked as such. The `weak' flag is then computed by using the `in' vector of the first and the `out' vector of the last point of a group of near points. For example, this fixes the rendering of glyph `Oslash' in `Roboto-Thin.ttf'. * src/autofit/afhints.h (AF_Flags): New value `AF_FLAGS_NEAR'. * src/autofit/afhints.c (af_glyph_hints_reload): Introduce the heuristic value `near_limit' to decide whether the current point is near to the previous one, then set `AF_FLAG_NEAR' accordingly. Store good `in' vector (of last non-near point) in `last_good_in_{x,y}' and use it as an argument to `ft_corner_is_flat' if necessary. 2013-08-02 Werner Lemberg <wl@gnu.org> * include/freetype/ftcffdrv.h: Improve documentation. This is based on blog entries from David Lemon and Dave Arnold (both from Adobe) with kind permission. Dave also helped in proof-reading. 2013-08-02 Werner Lemberg <wl@gnu.org> [autofit] Move declaration of scripts into separate file. This has the benefit that we don't need to duplicate the data at different places. * src/autofit/afscript.h: New file. * src/autofit/aftypes.h (AF_Script): Include `afscript.h' to define the enumeration values. * src/autofit/afglobal.c: Include `afscript.h' to get the script specific header files. (af_script_classes): Include `afscript.h' to fill this array. * src/autofit/afpic.c: Include `afscript.h' to get the script specific header files. (autofit_module_class_pic_init): Include `afscript.h' for initialization. * src/autofit/afpic.h (AF_SCRIPT_CLASSES_COUNT, AF_SCRIPT_CLASSES_REC_COUNT): Removed. Use `AF_SCRIPT_MAX' instead. * src/autofit/rules.mk (AUTOF_DRV_H): Updated. 2013-08-02 Werner Lemberg <wl@gnu.org> [autofit] Move declaration of writing systems into separate file. This has the benefit that we don't need to duplicate the data at different places. * src/autofit/afwrtsys.h: New file. * src/autofit/aftypes.h (AF_WritingSystem): Include `afwrtsys.h' to define the enumeration values. * src/autofit/afglobal.c: Include `afwrtsys.h' to get the writing system specific header files. Include `afpic.h'. (af_writing_system_classes): Include `afwrtsys.h' to fill this array. * src/autofit/afpic.c: Include `afwrtsys.h' to get the writing system specific header files. (autofit_module_class_pic_init): Include `afwrtsys.h' for initialization. * src/autofit/afpic.h (AF_WRITING_SYSTEM_CLASSES_COUNT, AF_WRITING_SYSTEM_CLASSES_REC_COUNT): Removed. Use `AF_WRITING_SYSTEM_MAX' instead. 2013-08-02 Werner Lemberg <wl@gnu.org> [sfnt] Fix compilation with g++. * src/sfnt/pngshim.c (error_callback, read_data_from_FT_stream): Use cast. (Load_SBit_Png): Pacify compiler. 2013-08-02 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Werner Lemberg <wl@gnu.org> [autofit] Fix `make multi'. * include/freetype/config/ftconfig.h (FT_LOCAL_ARRAY, FT_LOCAL_ARRAY_DEF): New macros. * src/autofit/afglobal.c (af_writing_system_classes, af_script_classes): Use FT_LOCAL_ARRAY_DEF. * src/autofit/afglobal.h: Declare `af_writing_system_classes' and `af_script_classes'. * src/autofit/afloader.c: Include `afpic.h'. 2013-08-01 Werner Lemberg <wl@gnu.org> Another round of cppcheck nitpicks. The call was (from the top-level of the FreeType tree): cppcheck --force \ --enable=all \ -I /usr/include \ -I /usr/local/include \ -I /usr/lib/gcc/i586-suse-linux/4.7/include \ -I include \ -I include/freetype \ -I include/freetype/config \ -I include/freetype/internal \ -DFT2_BUILD_LIBRARY \ . &> cppcheck.log using cppcheck git commit f7e93f99. Note that cppcheck still can't handle `#include FOO' (with `FOO' a macro). */* Improve variable scopes. */* Remove redundant initializations which get overwritten. * src/gxvalid/*: Comment out redundant code or guard it with FT_DEBUG_LEVEL_TRACE. 2013-07-30 Werner Lemberg <wl@gnu.org> [autofit] Introduce `writing systems'. This patch adds a new top level to the auto-hinter's script class hierarchy. It defines `writing systems' which can contain multiple scripts. For example, the `latin' writing system (in file `aflatin.c') is able to support scripts like Latin, Cyrillic, Armenian, etc., which can be handled similarly. Scripts are now named using four-letter OpenType tags. * src/autofit/aftypes.h (AF_ScriptClassRec): Move relevant members to... (AF_WritingSystemClassRec): This new structure. It holds pointers to functions which can be shared among related scripts. (AF_WritingSystem): New enumeration. (AF_Script): Revised values using four-letter tags. (AF_DEFINE_WRITING_SYSTEM_CLASS): New macro. (AF_DEFINE_SCRIPT_CLASS): Updated. * src/autofit/afglobal.c (af_writing_system_classes): New global, constant array. (af_script_classes): Updated. (af_face_globals_free): Updated. Remove assertion. (af_face_globals_get_metrics): Updated. * src/autofit/afglobal.h (AF_SCRIPT_FALLBACK) [!AF_CONFIG_OPTION_CJK]: Handle this case. * src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph): Updated. * src/autofit/afpic.c (autofit_module_class_pic_init): Updated; initialize structures for both writing systems and scripts. * src/autofit/afpic.h: Updated. (AF_WRITING_SYSTEM_CLASSES_GET): New macro. * src/autofit/afcjk.c (af_cjk_writing_system_class): New writing system. (af_cjk_uniranges): Renamed to... (af_hani_uniranges): This. (af_cjk_script_class): Reduced and renamed to... (af_hani_script_class): This. * src/autofit/afcjk.h: Updated. * src/autofit/afdummy.c (af_dummy_writing_system_class): New writing system. (af_dummy_script_class): Reduced and renamed to... (af_dflt_script_class): This. * src/autofit/afdummy.h: Updated. * src/autofit/afindic.c (af_indic_writing_system_class): New writing system. (af_indic_uniranges): Renamed to... (af_deva_uniranges): This. (af_indic_script_class): Reduced and renamed to... (af_deva_script_class): This. * src/autofit/afcjk.h: Updated. * src/autofit/aflatin.c (af_latin_writing_system_class): New writing system. (af_latin_uniranges): Renamed to... (af_latn_uniranges): This. (af_latin_script_class): Reduced and renamed to... (af_latn_script_class): This. * src/autofit/aflatin.h: Updated. * src/autofit/aflatin2.c (af_latin2_writing_system_class): New writing system. (af_latin2_uniranges): Renamed to... (af_ltn2_uniranges): This. Synchronize ranges with `latin'. (af_latin2_script_class): Reduced and renamed to... (af_ltn2_script_class): This. * src/autofit/aflatin2.h: Updated. 2013-07-30 Werner Lemberg <wl@gnu.org> [autofit] Variable renaming. * src/autofit/aftypes.h (AF_ScriptMetricsRec): s/clazz/script_class/. Update all users. 2013-07-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> Ignore libpng-config under cross-building configuration, because it will return the flags for the hosting environment. * builds/unix/configure.raw: Ignore libpng-config when `cross_compiling' == yes. 2013-07-30 Behdad Esfahbod <behdad@google.com> Prevent division by zero by a transparent color. * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Return 0 immediately, when alpha channel is zero. 2013-07-25 Behdad Esfahbod <behdad@google.com> Add FT_FACE_FLAG_COLOR and FT_HAS_COLOR. Also disambiguate Google's color bitmap tables. * include/freetype/freetype.h (FT_FACE_FLAG_COLOR, FT_HAS_COLOR): New macros. * include/freetype/internal/tttypes.h (TT_SbitTableType): Add TT_SBIT_TABLE_TYPE_CBLC. * src/sfnt/sfobjs.c (sfnt_load_face): Handle FT_FACE_FLAG_COLOR. * src/sfnt/ttsbit.c (tt_face_load_sbit, tt_face_load_strike_metrics, tt_face_load_sbit_image): Handle TT_SBIT_TABLE_TYPE_CBLC. 2013-07-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [sfnt] Fix for `make multi' target. * src/sfnt/pngshim.c (Load_SBit_Png): Use FT_LOCAL_DEF(). 2013-07-20 Werner Lemberg <wl@gnu.org> * docs/INSTALL.GNU: Updated. 2013-07-20 Behdad Esfahbod <behdad@google.com> [sfnt] Fix `sbix' table version handling. * src/sfnt/ttsbit.c (tt_face_load_sbit) [TT_SBIT_TABLE_TYPE_SBIX]: USHORT version numbers are to be considered as `minor'. 2013-07-19 Werner Lemberg <wl@gnu.org> [autofit] Fix segment classification for blue zones. The old code (essentially unchanged since the very beginning) incorrectly handled this configuration x -o- x / \ / \ / \ o o as flat and this o o / / x| x| | | o---------------o as round. (`o' and `x' are on and off points, respectively). This is a major change which should improve the rendering results enormously for many TrueType fonts, especially in the range approx. 20-40ppem, fixing the appearance of many overshoots. * src/autofit/aflatin.c (af_latin_metrics_init_blues): Look at the first and last points of the segment, not the points right before and after. 2013-07-19 Behdad Esfahbod <behdad@google.com> [sfnt] `sbix' fix-ups. * src/sfnt/sfobjs.c (sfnt_load_face): Apple's `sbix' color bitmaps are rendered scaled and then the `glyf' outline rendered on top. We don't support that yet, so just ignore the `glyf' outline and advertise it as a bitmap-only font. * src/sfnt/ttsbit.c (tt_face_load_strike_metrics) [TT_SBIT_TABLE_TYPE_SBIX]: Return metrics in 26.6 units. (tt_face_load_sbix_image): Typo. 2013-07-18 Behdad Esfahbod <behdad@google.com> [sfnt] Add support for Apple's `sbix' color bitmap table. * include/freetype/internal/tttypes.h (TT_SBit_MetricsRec): Widen fields to FT_Short and FT_UShort, respectively. (TT_SbitTableType): New enumeration. (TT_FaceRec): Add `sbit_table_type' field. * include/freetype/tttags.h (TTAG_sbix): New macro. * src/sfnt/pngshim.c (Load_SBit_Png): Pass a more generic FT_GlyphSlot argument instead FT_Bitmap. Add flag to control map and metrics handling. Update all users. * src/sfnt/ttsbit.c: Include `ttmtx.h'. (tt_face_load_eblc): Renamed to... (tt_face_load_sbit): This. Handle `sbix' bitmaps. (tt_face_free_eblc): Renamed to... (tt_face_load_sbit): This. Updated. (tt_face_load_strike_metrics): Handle `sbix' bitmaps. (tt_face_load_sbix_image): New function. (tt_sbit_decoder_alloc_bitmap, tt_sbit_decoder_load_image, tt_sbit_decoder_load_byte_aligned, tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_compound, tt_sbit_decoder_load_png, tt_sbit_decoder_load_image, tt_sbit_decoder_load_bitmap): Don't pass and handle load flags. (tt_sbit_decoder_load_bitmap) [!FT_CONFIG_OPTION_USE_PNG]: Better handle formats 17-19. Move color to grayscale conversion to... (tt_face_load_sbit_image): Here. Handle `sbix' bitmaps. * src/sfnt/pngshim.h: Updated. * src/sfnt/ttsbit.h: Updated. * src/sfnt/sfdriver.c: Updated. 2013-07-18 Werner Lemberg <wl@gnu.org> [sfnt] Ignore invalid magic number in `head' or `bhed'. Other font engines seem to ignore it also. Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>. * src/sfnt/ttload.c (check_table_dir): Don't abort but warn only if we have an invalid magic number. 2013-07-16 Werner Lemberg <wl@gnu.org> [smooth] Fix segfault caused by previous commit. * src/smooth/ftgrays.c (gray_set_cell): Always compute `ras.invalid'. 2013-07-16 David Turner <digit@google.com> [smooth] Improve performance. Provide a work-around for an ARM-specific performance bug in GCC. This speeds up the rasterizer by more than 5%. Also slightly optimize `set_gray_cell' and `gray_record_cell' (which also improves performance on other platforms by a tiny bit (<1%). * src/smooth/ftgrays.c (FT_DIV_MOD): New macro. Use it where appropriate. (gray_record_cell, gray_set_cell, gray_move_to, gray_convert_glyph_inner): Streamline condition handling. 2013-07-16 David Turner <digit@google.com> [truetype] Add assembler code for TT_MulFix14 and TT_DotFix14. This patch provides slightly optimized versions for ARM, x86, and x86_64 CPUs if built with GCC. Also remove some dead code. * src/truetype/ttinterp.c (TT_MulFix14_arm, TT_MulFix14_long_long, TT_DotFix14_long_long): New functions. 2013-07-16 David Turner <digit@google.com> Optimize FT_MulFix for x86_64 GCC builds. This patch provides an optimized `FT_MulFix' implementation for x86_64 machines when FreeType is built with GCC, or compatible compilers like Clang. Example: bin/ftbench -p -t 5 -s 14 -f 0008 Arial.ttf Before: Load 4.863 us/op Load_Advances (Normal) 4.816 us/op Load_Advances (Fast) 0.028 us/op Render 2.753 us/op Get_Glyph 0.463 us/op Get_CBox 0.077 us/op Get_Char_Index 0.023 us/op Iterate CMap 13.898 us/op New_Face 12.368 us/op Embolden 0.028 us/op Get_BBox 0.302 us/op After: Load 4.617 us/op Load_Advances (Normal) 4.645 us/op Load_Advances (Fast) 0.027 us/op Render 2.789 us/op Get_Glyph 0.460 us/op Get_CBox 0.077 us/op Get_Char_Index 0.024 us/op Iterate CMap 13.403 us/op New_Face 12.278 us/op Embolden 0.028 us/op Get_BBox 0.301 us/op * builds/unix/ftconfig.in, include/freetype/config/ftconfig.h (FT_MulFix_x86_64): New function. 2013-07-16 David Turner <digit@google.com> Speed up ARMv7 support. When building for ARMv7 with thumb2 instructions, the optimized `FT_MulFix_arm' assembly routine was not being used. The reason for this is in the `ftconfig.h' header, namely: - The assembly routine uses the `smull' instruction which is not available when generating Thumb-1 machine code. It is available in Thumb-2 mode, though. - The header was written a long time ago before Thumb-2 became widely popular (e.g. with Android). So it simply doesn't use the assembly routine if the `__thumb__' built-in macro is defined. - When compiling in Thumb-2 mode, the compiler will define both `__thumb__' and `__thumb2__'. By checking for `(__thumb2__ || !__thumb__)', we ensure that the assembly routine is only avoided when generating Thumb-1 code. Given that this is performance-sensitive function, this improves `ftbench' as follows on a Galaxy Nexus: Before (us/op) After (us/op) - loading Arial.ttf glyphs at 14 ppem [1] Load 34.285 33.098 - same operation with the light auto-hinter [2] Load 31.317 29.590 - same operation without hinting [3] Load 6.143 5.376 - loading Arial.ttf advances at 14 ppem [4] Load_Advances (normal) 34.216 33.016 Load_Advances (fast) 0.176 0.176 [1] ftbench -t 5 -p -s 14 -b a -f 0008 Arial.ttf [2] ftbench -t 5 -p -s 14 -b a -r 1 -f 0028 Arial.ttf [3] ftbench -t 5 -p -s 14 -b a -f 000a Arial.ttf [4] ftbench -t 5 -p -s 14 -b b -f 0008 Arial.ttf * builds/unix/ftconfig.in, include/freetype/config/ftconfig.h (FT_MULFIX_ASSEMBLER): Fix handling for ARMv7. 2013-06-28 Werner Lemberg <wl@gnu.org> * docs/CHANGES: Updated. 2013-06-27 Werner Lemberg <wl@gnu.org> * src/winfonts/winfnt.c (FNT_Load_Glyph): Fix bitmap width guard. 2013-06-25 Werner Lemberg <wl@gnu.org> [cff] Add darkening limit to `darkening-parameters'. * src/cff/cffdrivr.c (cff_property_set): Add check. 2013-06-25 Werner Lemberg <wl@gnu.org> [cff] Add `darkening-parameters' property. * include/freetype/ftcffdrv.h: Document it. * src/cff/cffdrivr.c (cff_property_set, cff_property_get): Handle `darkening-parameters' property. * src/cff/cf2font.h (CF2_FontRec): Add `darkenParams' array. * src/cff/cf2font.c (cf2_computeDarkening): Add `darkenParams' argument and use it. Update all callers. * src/cff/cf2ft.c (cf2_decoder_parse_charstrings): Copy `darken_params' values. * src/cff/cffobjs.h (CFF_DriverRec): Add `darken_params' array. * src/cff/cffobjs.c (cff_driver_init): Set default values for `darken_params'. 2013-06-25 Werner Lemberg <wl@gnu.org> [docmaker] Code shuffling. * src/tools/docmaker/tohtml.py (re_url): Move regexp... * src/tools/docmaker/sources.py: ... to this file. 2013-06-25 Werner Lemberg <wl@gnu.org> [docmaker] Remove unused functions. * src/tools/docmaker/content.py (DocMarkup.get_start, DocBlock.get_markup_name): Removed. * src/tools/docmaker/tohtml.py (html_quote0, dump_html_code, HtmlFormatter.make_html_words): Removed. 2013-06-25 Werner Lemberg <wl@gnu.org> * builds/freetype.mk (dll): Remove target. Problem reported by Jörg Günnewig <joerg.guennewig@googlemail.com>. 2013-06-25 Werner Lemberg <wl@gnu.org> [docmaker] Recognise URLs. * src/tools/docmaker/tohtml.py (re_url): New regular expression. (make_html_para): Use it. 2013-06-19 Werner Lemberg <wl@gnu.org> * Version 2.5.0.1 released. =========================== Tag sources with `VER-2-5-0-1'. * include/freetype/config/ftoption.h: Undefine CFF_CONFIG_OPTION_OLD_ENGINE. * devel/ftoption.h: Define CFF_CONFIG_OPTION_OLD_ENGINE. 2013-06-19 Werner Lemberg <wl@gnu.org> * builds/unix/install.mk (install): Don't create `cache' directory. Found by Peter Breitenlohner <peb@mppmu.mpg.de>. 2013-06-19 Werner Lemberg <wl@gnu.org> * Version 2.5.0 released. ========================= Tag sources with `VER-2-5-0'. * docs/VERSION.DLL: Update documentation and bump version number to 2.5.0. * README, Jamfile (RefDoc), builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html, builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html, builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html, builds/win32/visualc/freetype.dsp, builds/win32/visualc/freetype.vcproj, builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp, builds/win32/visualce/freetype.vcproj, builds/win32/visualce/index.html, builds/wince/vc2005-ce/freetype.vcproj, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/freetype.vcproj, builds/wince/vc2008-ce/index.html: s/2.4.12/2.5.0/, s/2412/250/. * include/freetype/freetype.h (FREETYPE_MINOR): Set to 5. (FREETYPE_PATCH): Set to 0. * builds/unix/configure.raw (version_info): Set to 16:2:10. * src/base/ftobjs.c (FT_Open_Face): Pacify compiler. * src/truetype/ttinterp.c (Ins_MSIRP, Ins_MIRP): Ditto. 2013-06-18 Werner Lemberg <wl@gnu.org> Fix Savannah bug #39269. * src/base/ftgloadr.c (FT_GlyphLoader_CheckPoints): Free memory in case of reallocation failures. 2013-06-18 Andrew Church <achurch+savannah@achurch.org> Fix Savannah bug #39266. If memory allocations fail at certain points while opening a font, FreeType can either crash due to a NULL dereference or leak memory. * include/freetype/internal/ftobjs.c (FT_Face_InternalRec, FT_LibraryRec): Make `refcount' a signed integer. If, for example, FT_Open_Face() fails in a memory allocation before the face's reference count is set to 1, a subsequent `FT_Done_Library' call would otherwise loop over `FT_Done_Face' 2^32 times before freeing the face. * src/base/ftobjs.c (open_face): Initialize `stream' and friends earlier. (FT_Open_Face) <Fail>: Behave correctly if `node' is NULL. (FT_Destroy_Module) <Fail>: Check that `renderer_clazz' is valid. 2013-06-14 Werner Lemberg <wl@gnu.org> * src/smooth/ftgrays.c One final pragma to silence 64-bit MSVC. 2013-06-06 Dave Arnold <darnold@adobe.com> Werner Lemberg <wl@gnu.org> [cff] Add code to Adobe's engine to handle ppem > 2000. * src/cff/cffgload.c (cff_slot_load): If we get FT_Err_Glyph_Too_Big, retry unhinted and scale up later on. 2013-06-12 Werner Lemberg <wl@gnu.org> Another try on pragmas. * include/freetype/internal/ftdebug.h: Move pragmas to... * include/freetype/internal/internal.h: ... this file since it gets included by all source files. * include/freetype/internal/ftserv.h: Remove pragma which has no effect. 2013-06-12 Werner Lemberg <wl@gnu.org> * include/freetype/internal/ftdebug.h: Disable MSVC warning C4127. This partially undoes commit 3f6e0e0c. 2013-06-12 Werner Lemberg <wl@gnu.org> More compiler warning fixes. */*: Use cast to `FT_Bool' (or `Bool') where appropriate. 2013-06-10 Werner Lemberg <wl@gnu.org> [truetype] Improve handling of broken sbit advance widths. * src/truetype/ttgload.c (TT_Load_Glyph): Use the glyph's (scaled) `linearHoriAdvance' if the sbit's `horiAdvance' value is zero. Cf. font `Fixedsys Excelsior' v3.01 (FSEX300.ttf), glyph A, 16ppem. 2013-06-10 Werner Lemberg <wl@gnu.org> [sfnt] Improve embedded bitmap tracing. * src/base/ftobjs.c (FT_Request_Size): Move trace message regarding bitmap strike match to... (FT_Match_Size): This function. * src/sfnt/ttsbit.c (tt_sbit_decoder_load_metrics, tt_sbit_decoder_load_byte_aligned, tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_compound, tt_sbit_decoder_load_png, tt_sbit_decoder_load_image): Decorate with tracing messages. 2013-06-10 Werner Lemberg <wl@gnu.org> Fix Savannah bug #39160. * src/truetype/ttinterp.c (Ins_SDPVTL): Set projection vector too for the degenerate case. 2013-06-09 David Turner <digit@google.com> * src/cache/ftcmanag.c (FTC_Manager_Reset): Add missing cache flush. This code, present since eight(!) years in the unused `CACHE' branch, has been forgotten to apply to the master branch. It's really amazing that noone has ever complained since `FTC_Manager_Reset' is pretty useless without flushing the cache. 2013-06-07 Werner Lemberg <wl@gnu.org> Add and improve pragmas for MSVC compiler. * include/freetype/internal/ftdebug.h: Remove pragmas. * include/freetype/internal/ftserv.h: Use push and pop for pragmas. * include/freetype/internal/ftvalid.h: Handle warning C4324. * src/base/ftobjs.c: Use push and pop for pragmas. * src/gzip/ftgzip.c: Handle warning C4244. 2013-06-07 Werner Lemberg <wl@gnu.org> [cff] s/cf2_getGlyphWidth/cf2_getGlyphOutline/. * src/cff/cf2font.c, src/cff/cf2font.h, src/cff/cf2ft.c: Do it. 2013-06-06 Dave Arnold <darnold@adobe.com> [cff] Add early exit feature for width-only calls. This is for `FT_Get_Advance'. There are 7 places where the spec says the width can be defined: hstem/hstemhm vstem/vstemhm cntrmask/hintmask hmoveto vmoveto rmoveto endchar * src/cff/cf2intrp.c (cf2_doStems): Exit early for width-only calls, if possible. (cf2_interpT2CharString) <cf2_cmdHSTEM>, <cf2_cmdVSTEM>, <cf2_cmdVMOVETO>, <cf2_cmdENDCHAR>, <cf2_cmdHINTMASK>, <cf2_cmdRMOVETO>, <cf2_cmdHMOVETO>: Exit early for width-only calls. 2013-06-06 Werner Lemberg <wl@gnu.org> Next round of compiler fixes. * builds/win32/ftdebug.c, builds/wince/ftdebug.c (ft_debug_init): Add proper cast. * include/freetype/internal/ftserv.h (FT_SERVICE_UNAVAILABLE): Fix cast. * include/freetype/internal/ftstream.h: Decorate stream and frame macros with `FT_Long' and `FT_ULong' as appropriate. * src/base/ftrfork.c (raccess_guess_darwin_hfsplus, raccess_guess_darwin_newvfs): Use cast. * src/bdf/bdflib.c (_bdf_set_default_spacing): Use cast. * src/cache/ftcmanag.c (FTC_Manager_Check): Fix cast. * src/cache/ftcmanag.h (FTC_ManagerRec): Ditto. * src/cff/cf2arrst.c (cf2_arrstack_setNumElements): Use cast. * src/cff/cf2ft.c (cf2_freeSeacComponent): Ditto. * src/cff/cffobjs.c (remove_subset_prefix, remove_style): Ditto. * src/cid/cidparse.c (cid_parser_new): Use cast. * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Use cast. * src/psaux/psobjs.c (reallocate_t1_table): Fix argument type. * src/raster/ftraster.c (ft_black_reset): Use cast. * src/truetype/ttgxvar.c (FT_Stream_FTell): Use cast. (ALL_POINTS): Fix cast. * src/type1/t1driver.c (t1_ps_get_font_value): Add casts. * src/type1/t1parse.c (T1_Get_Private_Dict): Add cast. 2013-06-05 Dave Arnold <darnold@adobe.com> Fix more MSVC Win32 compiler warnings. * src/base/ftobjs.c: Fix typo in MS pragma. * src/base/bdflib.c (_bdf_set_default_spacing, _bdf_add_property): `lineno' is only used in debug mode. * src/cff/cf2ft.c (cf2_builder_moveTo): `params' is only used in debug mode. 2013-06-05 Werner Lemberg <wl@gnu.org> Fix compiler warnings. * include/freetype/internal/ftmemory.h: Decorate memory allocation macros with `FT_Long' where appropriate. Remove duplicate of FT_MEM_QRENEW_ARRAY definition. * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Use cast. * src/base/ftobjs.c: Add warning disabling pragma for MSVC while including `md5.c'. * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdESC>: Add cast. * src/sfnt/ttsbit.c (tt_sbit_decoder_load_compound): Fix casts. (tt_sbit_decoder_load_bitmap): Beautification. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Initialize variables (earlier). * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Pacify compiler. * src/truetype/ttgxvar.c (TT_Get_MM_Var): Use unsigned constants where appropriate. * src/type1/t1load.c (T1_Get_MM_Var): Ditto. 2013-06-04 Werner Lemberg <wl@gnu.org> * src/cff/cf2font.c (cf2_getGlyphWidth): Initialize `advWidth'. Problem reported by Ingmar Sittl <ingmar.sittl@elektrobit.com>. 2013-06-04 Werner Lemberg <wl@gnu.org> Apply fixes for cppcheck nitpicks. https://cppcheck.sourceforge.net/ The call was (from the top-level of the FreeType tree): cppcheck --force \ --enable=all \ -I include \ -I include/freetype/ \ -I include/freetype/config/ \ -I include/freetype/internal/ \ . &> cppcheck.log Note that the current version heavily chokes on FreeType, delivering many wrong results. I will report those issues to the cppcheck team so that a newer version gives improved results hopefully. */* Improve variable scopes. */* Remove redundant initializations which get overwritten. * src/base/ftmac.c, builds/mac/ftmac.c (count_faces_scalable): Remove unused variable. * src/base/ftdbgmem.c (ft_mem_table_destroy): `table' can't be zero. * src/gxvalid/gxvkern.c (gxv_kern_subtable_fmt1_entry_validate): Remove functionless code. * src/tools/ftrandom.c (main): Fix memory leak. 2013-06-03 Werner Lemberg <wl@gnu.org> Add CFF_CONFIG_OPTION_OLD_ENGINE configuration option. This controls whether the old FreeType CFF engine gets compiled into FreeType. It is now disabled by default. * devel/ftoption.h, include/freetype/config/ftoption.h (CFF_CONFIG_OPTION_OLD_ENGINE): New macro. * src/cff/cffdrivr.c (cff_property_set), src/cff/cffgload.c (CFF_Operator, cff_argument_counts, cff_builder_add_point, cff_operator_seac, cff_decoder_parse_charstrings, cff_slot_load), src/cff/cffgload.h, src/cff/cffobjs.c (cff_driver_init): Use CFF_CONFIG_OPTION_OLD_ENGINE to guard the affected code. * docs/CHANGES: Updated. 2013-06-02 Werner Lemberg <wl@gnu.org> Fix PNG library handling. * builds/unix/configure.raw: Don't use LIBPNG_LIBS but LIBPNG_LDFLAGS. 2013-05-23 Behdad Esfahbod <behdad@google.com> Add support for color embedded bitmaps (eg. color emoji). A new load flag, FT_LOAD_COLOR, makes FreeType load color embedded-bitmaps, following this draft specification https://color-emoji.googlecode.com/git/specification/v1.html which defines two new SFNT tables, `CBDT' and `CBLC' (named and modeled after `EBDT' and `EBLC', respectively). The color bitmaps are stored in the new FT_PIXEL_MODE_BGRA format to represent BGRA pre-multiplied sRGB images. If PNG support is available, PNG color images as defined in the same proposed specification are supported also. Note that color bitmaps are converted to grayscale if client didn't ask for color. * builds/unix/configure.raw: Search for libpng. Add `--without-png' option. * devel/ftoption.h, include/freetype/config/ftoption.h (FT_CONFIG_OPTION_USE_PNG): New macro. * include/freetype/freetype.h (FT_LOAD_COLOR): New load flag. * include/freetype/ftimage.h (FT_Pixel_Mode): Add `FT_PIXEL_MODE_BGRA'. * include/freetype/tttags.h (TTAG_CBDT, TTAG_CBLC): New tags. * src/base/ftbitmap.c (FT_Bitmap_Embolden): Updated. (ft_gray_for_premultiplied_srgb_bgra): New function. (FT_Bitmap_Convert): Handle FT_PIXEL_MODE_BGRA. * src/sfnt/pngshim.c, src/sfnt/pngshim.h: New files. * src/sfnt/sfnt.c: Include `pngshim.c'. * src/sfnt/ttsbit.c: Include FT_BITMAP_H and `pngshim.h' (tt_face_load_eblc): Load `CBLC'. (tt_sbit_decoder_init): Load `CBDT'. (tt_sbit_decoder_alloc_bitmap): Pass load flags to select between color and grayscale bitmaps. Set `num_grays'. This is used by `ftview' to choose the blending algorithm. (tt_sbit_decoder_load_byte_aligned, tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_compound, tt_sbit_decoder_load_image): Pass load flag. s/write/pwrite/. Don't call `tt_sbit_decoder_alloc_bitmap'. Updated. (tt_sbit_decoder_load_png) [FT_CONFIG_OPTION_USE_PNG]: New function. (tt_sbit_decoder_load_bitmap): Pass load flag. Handle new glyph formats 17, 18, and 19. Call `tt_sbit_decoder_alloc_bitmap'. Flatten color bitmaps if necessary. (tt_face_load_sbit_image): Updated. * src/sfnt/rules.mk (SFNT_DRV_SRC): Add `pngshim.c'. * docs/CHANGES: Updated. 2013-05-24 Guenter <info@gknw.net> Apply Savannah patch #8055. Make `apinames' create an import file for NetWare. * src/tools/apinames.c (PROGRAM_VERSION): Set to 0.2. (OutputFormat): Add `OUTPUT_NETWARE_IMP'. (names_dump): Handle it. (usage): Updated. (main): Handle new command line flag `-wN'. 2013-05-23 Behdad Esfahbod <behdad@behdad.org> Compilation fix. * src/truetype/ttinterp.c (TT_RunIns) [!TT_CONFIG_OPTION_SUBPIXEL_HINTING]: Make it work. 2013-05-22 Infinality <infinality@infinality.net> [truetype] Formatting and an additional subpixel tweak. * src/truetype/ttinterp.c (Ins_SHPIX): Formatting fix. * src/truetype/ttsubpix.c (SKIP_NONPIXEL_Y_MOVES_Rules): Revert previous modification for Verdana clones. 2013-05-22 Infinality <infinality@infinality.net> [truetype] Adjust subpixel zp2 moves and tweak rules. These modifications fix thin diagonal stems in some legacy fonts. * src/truetype/ttinterp.c (Direct_Move_X): Remove unused macro. (Move_Zp2_Point): Don't always disable x moves for subpixel rendering. (Ins_SHP): Disable x moves here for subpixel rendering. (Ins_SHPIX): Only disable x moves in compatibility mode. Split out zp2 move reversals and reorder conditional respectively. * src/truetype/ttsubpix.c (SKIP_NONPIXEL_Y_MOVES_Rules): Fix oversight. Only adjust Verdana clones for 17 ppem. (SKIP_NONPIXEL_Y_MOVES_Rules_Exceptions): Add Courier New. (ALWAYS_SKIP_DELTAP_Rules): Found additional cases for Arial `s'. 2013-05-20 Infinality <infinality@infinality.net> [truetype] Simplify and improve subpixel function detection. Some small enhancements have allowed the removal of many macros and the simplification of existing rules in `ttsubpix.c'. * src/truetype/ttsubpix.h (SPH_TWEAK_ALLOW_X_DMOVEX, SPH_TWEAK_ALLOW_X_MOVE_ZP2, SPH_TWEAK_DELTAP_SKIP_EXAGGERATED_VALUES, SPH_TWEAK_SKIP_INLINE_DELTAS, SPH_TWEAK_MIRP_CVT_ZERO): Removed. (SPH_TWEAK_SKIP_NONPIXEL_Y_MOVES_DELTAP): New rule macro. * src/truetype/ttsubpix.c: Updated affected rules. * src/truetype/ttinterp.c (Direct_Move_X): Updated. (INS_FDEF): Add additional function detection. (INS_ENDF): Set runtime flag. (Ins_CALL): Skip the call under certain conditions. Remove bad code. (Ins_LOOPCALL): Skip the call under certain conditions. Remove bad code. (Move_Zp2_Point): Updated. (Ins_SHPIX): Updated. Skip the move under some situations. (Ins_MIAP): Improve conditions. (Ins_MIRP): Updated. (Ins_DELTAP): Skip move under certain conditions. Simplify conditions. (TT_RunIns): Updated. Add code to handle new function detection. Trace messages. 2013-05-17 Werner Lemberg <wl@gnu.org> Update more FT_Err_XXX macros using FT_ERR and FT_THROW; * builds/amiga/src/base/ftsystem.c, builds/mac/ftmac.c, builds/unix/ftsystem.c, builds/vms/ftsystem.c: Do it. 2013-05-15 Werner Lemberg <wl@gnu.org> [truetype] Add `interpreter-version' property. This makes the option TT_CONFIG_OPTION_SUBPIXEL_HINTING controllable at runtime. * include/freetype/ftttdrv.h: New file. * include/freetype/config/ftheader.h (FT_TRUETYPE_DRIVER_H): New macro. * src/truetype/ttdriver.c: Include FT_TRUETYPE_DRIVER_H. (tt_property_set, tt_property_get): Fill templates. * src/truetype/ttobjs.h (TT_DriverRec): Add `interpreter_version' member. Remove unused `extension_component' member. * src/truetype/ttgload.c: Include FT_TRUETYPE_DRIVER_H. (tt_get_metrics, TT_Hint_Glyph, TT_Process_Simple_Glyph, compute_glyph_metrics, tt_loader_init): Use `interpreter_version'. * src/truetype/ttinterp.c: Include FT_TRUETYPE_DRIVER_H. (SUBPIXEL_HINTING): New macro to check `interpreter_version' flag. Update all affected functions to use it. Use TT_INTERPRETER_VERSION_XXX where appropriate. * src/truetype/ttobjs.c: Include FT_TRUETYPE_DRIVER_H. (tt_driver_init): Initialize `interpreter_version'. * src/truetype/ttsubpix.c: Include FT_TRUETYPE_DRIVER_H. Use TT_INTERPRETER_VERSION_XXX where appropriate. 2013-05-13 Werner Lemberg <wl@gnu.org> [truetype] Avoid empty source file. * src/truetype/ttsubpix.c [!TT_CONFIG_OPTION_SUBPIXEL_HINTING]: Provide dummy typedef. 2013-05-13 Werner Lemberg <wl@gnu.org> * src/cff/cf2font.c (cf2_getGlyphWidth): Fix uninitialized variable. Fix suggested by Vaibhav Nagarnaik <vnagarnaik@gmail.com>. 2013-05-13 Brian Nixon <bnixon@yahoo.com> Fix Savannah bug #38970. * src/base/ftdebug.c, builds/win32/ftdebug.c, builds/wince/ftdebug.c, builds/amiga/src/base/ftdebug.c (ft_debug_init): Don't read past the environment variable FT2_DEBUG. 2013-05-12 Werner Lemberg <wl@gnu.org> [truetype] Add framework for TrueType properties. * src/truetype/ttdriver.c: Include FT_SERVICE_PROPERTIES_H. (tt_property_set, tt_property_get): New functions, still empty. Define `tt_service_properties' service. Update `tt_services'. * src/truetype/ttpic.h: Include FT_SERVICE_PROPERTIES_H. (TT_SERVICE_PROPERTIES_GET): New macro. (TTModulePIC): Add `tt_service_properties'. 2013-05-12 Werner Lemberg <wl@gnu.org> Fix Savannah bug #38967. * src/base/ftcalc.c (FT_DivFix) [FT_LONG64]: Fix cast. 2013-05-12 Werner Lemberg <wl@gnu.org> Introduce unsigned 64bit type (if available). * include/freetype/config/ftconfig.h: Define FT_UINT64 if available. [FT_LONG64]: Provide FT_UInt64. * builds/unix/ftconfig.in: Synchronized. 2013-05-12 Werner Lemberg <wl@gnu.org> Fix Savannah bug #38968. * include/freetype/ftmodapi.h: Add `FT_EXPORT' to FT_Property_{Set,Get}. * src/base/ftobjs.c: Add `FT_EXPORT_DEF' to FT_Property_{Set,Get}. 2013-05-10 Werner Lemberg <wl@gnu.org> [sfnt] Clean up bitmap code. * src/sfnt/ttsbit.c: Deleted. * src/sfnt/ttsbit0.c: Renamed to `ttsbit.c'. * rules.mk (SFNT_DRV_H): Updated. 2013-05-10 Werner Lemberg <wl@gnu.org> */* [FT_CONFIG_OPTION_OLD_INTERNALS]: Remove macro and guarded code. ---------------------------------------------------------------------------- Copyright (C) 2013-2022 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, and distributed under the terms of the FreeType project license, LICENSE.TXT. By continuing to use, modify, or distribute this file you indicate that you have read the license and understand and accept it fully. Local Variables: version-control: never coding: utf-8 End:
whupdup/frame
real/third_party/freetype-2.12.0/docs/oldlogs/ChangeLog.25
25
gpl-3.0
162,296
2016-07-12 Werner Lemberg <wl@gnu.org> * Version 2.6.5 released. ========================= Tag sources with `VER-2-6-5'. This commit immediately follows `[mac] Fix ftexport.sym target in Jamfile.' on a separate branch, which was then merged with master after the release. * include/freetype/config/ftoption.h (TT_CONFIG_OPTION_SUBPIXEL_HINTING): Comment out. * docs/VERSION.TXT: Add entry for version 2.6.5. * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj, builds/windows/vc2005/index.html, builds/windows/vc2008/freetype.vcproj, builds/windows/vc2008/index.html, builds/windows/vc2010/freetype.vcxproj, builds/windows/vc2010/index.html, builds/windows/visualc/freetype.dsp, builds/windows/visualc/freetype.vcproj, builds/windows/visualc/index.html, builds/windows/visualce/freetype.dsp, builds/windows/visualce/freetype.vcproj, builds/windows/visualce/index.html, builds/wince/vc2005-ce/freetype.vcproj, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/freetype.vcproj, builds/wince/vc2008-ce/index.html: s/2.6.4/2.6.5/, s/264/265/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 5. * builds/unix/configure.raw (version_info): Set to 18:5:12. * CMakeLists.txt (VERSION_PATCH): Set to 5. * docs/CHANGES: Updated. 2016-07-11 Werner Lemberg <wl@gnu.org> Conditionally compile environment support. * include/freetype/internal/ftobjs.h, src/autofit/afmodule.c, src/base/ftobjs.c, src/cff/cffdrivr.c, src/truetype/ttdriver.c: Decorate with `FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES' where necessary. 2016-07-11 Werner Lemberg <wl@gnu.org> Handle properties in `FREETYPE_PROPERTIES' environment variable. This commit covers the most important one. * src/autofit/afmodule.c (af_property_set): Handle `warping', `darkening-parameters', and `no-stem-darkening'. * src/cff/cffdrivr.c (cff_property_set): Handle `darkening-parameters', `hinting-engine', and `no-stem-darkening'. * src/truetype/ttdriver.c (tt_property_set): Handle `interpreter-version'. 2016-07-11 Werner Lemberg <wl@gnu.org> Replace calls to `atol' with `strtol'. We later on need strtol's `endptr' feature. * include/freetype/config/ftstdlib.h (ft_atol): Replace with... (ft_strtol): ... this. * src/base/ftdbgmem.c (ft_mem_debug_init): Updated. * src/cid/cidparse.c (cid_parser_new): Ditto. * src/type42/t42drivr.c (t42_get_name_index), src/type42/t42objs.c (T42_GlyphSlot_Load): Ditto. 2016-07-10 Werner Lemberg <wl@gnu.org> Implement handling of `FREETYPE_PROPERTIES' environment variable. Recognizing properties follows in another commit. * devel/ftoption.h, include/freetype/config/ftoption.h (FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES): New macro. * include/freetype/config/ftstdlib.h (ft_getenv): New macro. * src/base/ftinit.c (ft_set_default_properties): New function to parse `FREETYPE_PROPERTIES' and calling `ft_property_string_set'. (FT_Init_FreeType): Updated. 2016-07-09 Werner Lemberg <wl@gnu.org> Add function `ft_property_string_set'. This is a preparation for handling an `FREETYPE_PROPERTIES' environment variable to control (some) driver properties. No change in functionality. * src/base/ftobjs.c (ft_property_do): Add `value_is_string' parameter. (ft_property_string_set): New function. (FT_Property_Set, FT_Property_Get): Updated. * include/freetype/internal/ftobjs.h: Updated. * include/freetype/internal/services/svprop.h (FT_Properties_SetFunc): Add `value_is_string' parameter. * src/autofit/afmodule.c (af_property_set), src/cff/cffdrivr.c (cff_property_set), src/truetype/ttdriver.c (tt_property_set): Updated, emitting an error currently if `value_is_string' is set. 2016-07-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [mac] Fix ftexport.sym target in Jamfile. * Jamfile: Update the directories of the header files scanned for ftexport.sym. They were incorrect since the migration of the header files, on 2015-06-22. Either inexisting include/cache (removed on 2006-03-20) is not needed to be listed explicitly. Now ftmac.h is scanned only in the case of Mac OS & Mac OS X. 2016-07-08 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Sub-banding protocol revision. Rasterization sub-banding is utilized at large sizes while using a rather small fixed memory pool. Indeed it is possible to make an educated guess how much memory is necessary at a given size for a given glyph. It turns out that, for a large majority of European glyphs, you should store about 8 times more boundary pixels than their height. Or, vice versa, if your memory pool can hold 800 pixels the band height should be 100 and you should sub-band anything larger than that. Should you still run out of memory, FreeType bisects the band but you have wasted some time. This is what has been implemented in FreeType since the beginning. It was overlooked, however, that the top band could grow to twice the default band size leading to unnecessary memory overflows there. This commit fixes that. Now the bands are distributed more evenly and cannot exceed the default size. Now the magic number 8 is really suitable for rather simple European scripts. For complex Chinese logograms the magic number should be 13 but that is subject for another day. * src/smooth/ftgrays.c (gray_convert_glyph): Revise sub-banding protocol. 2016-07-07 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [mac] Fix Savannah bug #48417. Mac OS X linker throws errors when `-exported_symbol_list' input file includes non-existing symbols. Reported by Ryan Schmidt. * builds/exports.mk: Exclude ftmac.h from the headers for apinames by default. Include it when ftmac.c would be compiled. 2016-07-06 Werner Lemberg <wl@gnu.org> * src/truetype/ttinterp.c (TInstruction_Function): Removed, unused. 2016-07-05 Werner Lemberg <wl@gnu.org> * Version 2.6.4 released. ========================= Tag sources with `VER-2-6-4'. * docs/VERSION.TXT: Update documentation and bump version number to 2.6.4. * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj, builds/windows/vc2005/index.html, builds/windows/vc2008/freetype.vcproj, builds/windows/vc2008/index.html, builds/windows/vc2010/freetype.vcxproj, builds/windows/vc2010/index.html, builds/windows/visualc/freetype.dsp, builds/windows/visualc/freetype.vcproj, builds/windows/visualc/index.html, builds/windows/visualce/freetype.dsp, builds/windows/visualce/freetype.vcproj, builds/windows/visualce/index.html, builds/wince/vc2005-ce/freetype.vcproj, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/freetype.vcproj, builds/wince/vc2008-ce/index.html: s/2.6.3/2.6.4/, s/263/264/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 4. * builds/unix/configure.raw (version_info): Set to 18:4:12. * CMakeLists.txt (VERSION_PATCH): Set to 4. * docs/CHANGES: Updated. 2016-07-05 Werner Lemberg <wl@gnu.org> * src/pfr/pfrsbit.c (pfr_lookup_bitmap_data): Fix compiler warning. 2016-07-04 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Variable type revision (part 2). * src/smooth/ftgrays.c (TArea): Restore original definition as `int'. (gray_render_line) [FT_LONG64]: Updated. (gray_convert_glyph): 32-bit band bisection stack should be 32 bands. (gray_convert_glyph_inner): Trace successes and failures. 2016-07-04 Werner Lemberg <wl@gnu.org> [autofit] Handle single-point contours as segments. Doing so allows us to link them to edges – some fonts like `NotoSansGurmukhi-Regular' have such isolated points sitting exactly on other outlines. * src/autofit/aflatin.c (af_latin_hints_compute_segments): Don't ignore one-point contours but handle them specially as one-point segments. (af_latin_hints_compute_edges): Append one-point segments to edges if possible. 2016-07-02 Werner Lemberg <wl@gnu.org> [autofit] Remove unused structure members. * src/autofit/afhints.h (AF_SegmentRec, AF_EdgeRec): Remove `num_linked'. * src/autofit/afcjk.c (af_cjk_hints_link_segments): Updated. 2016-07-02 Werner Lemberg <wl@gnu.org> [autofit] Update to Unicode 9.0.0. * src/autofit/afranges.c (af_arab_nonbase_uniranges, af_cyrl_uniranges): Add new data. 2016-07-01 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Variable type revision (part 1). This patch restores original `TCoord' definition as `int' so that the rendering pool is used more efficiently on LP64 platforms (unix). * src/smooth/ftgrays.c (gray_TWorker, TCell, gray_TBand): Switch some fields to `TCoord'. (gray_find_cell, gray_render_scanline, gray_render_line, gray_hline, gray_sweep, gray_convert_glyph): Updated. 2016-06-28 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Minor clean-ups. * src/smooth/ftgrays.c (gray_TWorker): Remove redundant `ycount'. (gray_sweep, gray_convert_glyph, gray_dump_cells): Updated. 2016-06-27 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Minor clean-ups. * src/smooth/ftgrays.c (gray_convert_glyph): Do not use volatile qualifier. (gray_raster_render): Move span initializations from here. (gray_sweep): ... to here and remove unused `target' argument. 2016-06-26 Alexei Podtelezhnikov <apodtele@gmail.com> [pcf] Fix handling of very large fonts (#47708). * src/pcf/pcfread.c (pcf_get_encodings): Make `encodingOffset' an unsigned short. Only reject `0xFFFF' as an invalid encoding offset. 2016-06-25 Werner Lemberg <wl@gnu.org> [truetype] Really fix deallocation in case of error (#47726). * src/truetype/ttgload.c (load_truetype_glyph): Thinko; initialize `outline.points' also. 2016-06-23 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Consolidate memory management. * src/smooth/ftgrays.c (gray_init_cells): Remove function. (gray_TWorker): Remove fields that become local variables. (gray_raster_render): Move rendering buffer declaration from here. (gray_convert_glyph): ... to here and update accordingly. 2016-06-22 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Consolidate boundary checks. Removing the checks from `gray_hline' shaves 1% off rendering speed. * src/smooth/ftgrays.c [STANDALONE_]: Duplicate `FT_MIN' and `FT_MAX'. (gray_TWorker): No need to store `clip_box'. (gray_hline): Remove unnecessary boundary checks. (gray_convert_glyph): Move boundary checks from here. (gray_raster_render): ... to here and consolidate. 2016-06-21 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Use `FT_Outline_Get_CBox'. * src/smooth/ftgrays.c [STANDALONE_]: Duplicate `FT_Outline_Get_CBox'. (gray_compute_cbox): Remove this function. (gray_convert_glyph): Update to use `FT_Outline_Get_CBox'. 2016-06-20 Werner Lemberg <wl@gnu.org> [smooth] Remove compiler warnings. * src/smooth/ftgrays.c (gray_convert_glyph): Fix reports from clang. 2016-06-20 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Sanitize memory management. * src/smooth/ftgrays.c (gray_convert_glyph): Cleaned up. 2016-06-18 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Remove `band_shoot' that never worked. * src/smooth/ftgrays.c (gray_TWorker): Remove `band_shoot'. (gray_convert_glyph): Updated. 2016-06-17 Alexei Podtelezhnikov <apodtele@gmail.com> [raster, smooth] Handle FT_RENDER_POOL_SIZE better. * src/raster/ftraster.c (FT_MAX_BLACK_POOL): New macro. (ft_black_render): Updated. * src/smooth/ftgrays.c (FT_MAX_GRAY_POOL): New macro. (gray_raster_render): Updated. 2016-06-16 Werner Lemberg <wl@gnu.org> * src/base/md5.c: Updated to recent version. 2016-06-14 Alexei Podtelezhnikov <apodtele@gmail.com> * src/smooth/ftgrays.c (gray_hline): Optimize if-condition. 2016-06-13 Werner Lemberg <wl@gnu.org> [autofit] Add support for Cherokee script. * src/autofit/afblue.dat: Add blue zone data for Cherokee. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Cherokee standard characters. * src/autofit/afranges.c: Add Cherokee data. * src/autofit/afstyles.h: Add Cherokee data. 2016-06-09 David Capello <davidcapello@gmail.com> [cmake] Avoid modifying `ftconfig.h' and `ftoption.h' files. * CMakeLists.txt: Each time cmake is run those files are modified and the whole FreeType library is recompiled. With this change we change the files only if there are real modifications, so we can avoid recompilations. 2016-06-09 Werner Lemberg <wl@gnu.org> [bdf] Check number of properties (#48166). * src/bdf/bdflib.c (_bdf_parse_start): Implement. 2016-06-08 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Re-enable new line renderer on 64-bit archs. * src/smooth/ftgrays.c (gray_render_line): Conditionally re-enable new implementation, where it is safe from overflows. 2016-06-08 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Minor clean-ups. * src/smooth/ftgrays.c (gray_dump_cells): Move out of the way. (gray_render_span): Remove spurious casts and streamline. 2016-06-07 Werner Lemberg <wl@gnu.org> [autofit] Add support for Ethiopic script. * src/autofit/afblue.dat: Add blue zone data for Ethiopic. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Ethiopic standard characters. * src/autofit/afranges.c: Add Ethiopic data. * src/autofit/afstyles.h: Add Ethiopic data. 2016-06-07 Werner Lemberg <wl@gnu.org> [autofit] Fix compilation with VS2016 (#48126). This compiler doesn't recognize the end-of-comment sequence `*/' if it immediately follows non-ASCII characters. * src/autofit/afscript.h: Ensure whitespace before `*/'. 2016-06-04 Werner Lemberg <wl@gnu.org> Fix a test for named instances (#48122). This was missed while giving negative face indices an extended meaning. * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Implement. 2016-05-31 Nikolaus Waxweiler <madigens@gmail.com> [truetype] Let SHPIX move points in the twilight zone in v40. * src/truetype/ttinterp.c (Ins_SHPIX): Allow SHPIX to move points in the twilight zone. Otherwise, treat SHPIX the same as DELTAP. Unbreaks various fonts such as older versions of Rokkitt and DTL Argo T Light that would glitch severely after calling ALIGNRP after a blocked SHPIX. 2016-05-30 Werner Lemberg <wl@gnu.org> [type42] Support `CharStrings' entry format as created by LilyPond. * src/type42/t42parse.c (t42_parse_charstrings): Handle entries having the format (foo) cvn 12345 def 2016-05-28 Werner Lemberg <wl@gnu.org> * src/autofit/afranges.c: Remove `UL' postfix from hex numbers. Suggested by Alexei. `UL' is only needed for 16bit compilers, but it seems noone is using this anymore (and we no longer test whether FreeType compiles in such an environment). Otherwise, it is easy to add the postfix to the `AF_UNICODE_RANGE' macro. 2016-05-26 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Shrink bisection stack. The convergence of Bézier flatteners is fast with the deviation from straight line being asymptotically cut 4-fold on each bisection. This justifies smaller bisection stack size. * src/smooth/ftgrays.c (gray_TWorker): Remove common `bez_stack'. (gray_render_conic): Create and use conic `bez_stack'. Move back the band analysis from... (gray_conic_to): ... here. (gray_render_cubic): Create and use cubic `bez_stack'. Move back the band analysis from... (gray_cubic_to): ... here. (gray_move_to): Updated. 2016-05-25 Werner Lemberg <wl@gnu.org> [autofit] Fixes for Armenian and Gujarati ranges. * src/autofit/afranges.c (af_armn_uniranges): Corrected. (af_guru_nonbase_uniranges): Make U+0A3E a base character. 2016-05-24 Werner Lemberg <wl@gnu.org> [autofit] Add support for Armenian script. * src/autofit/afblue.dat: Add blue zone data for Armenian. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Armenian standard characters. * src/autofit/afranges.c: Add Armenian data. * src/autofit/afstyles.h: Add Armenian data. 2016-05-23 Werner Lemberg <wl@gnu.org> * builds/unix/unix-cc.in (LINK_LIBRARY): Use `-export-symbols'. This was commented about 10 years ago – I think the reason then to disable libtool's `-export-symbols' option was to give some badly programmed applications access to internal FreeType functions. I believe that we should no longer take care of such programs; the number of symbols exported should be rather restricted as much as possible. 2016-05-22 Werner Lemberg <wl@gnu.org> [autofit] Add blue-zone support for Gurmukhi script. This essentially moves the Gurmukhi script from the `Indic' hinter to the `Latin' hinter. * src/autofit/afblue.dat: Add blue zone data for Gurmukhi. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Gurmukhi standard characters and move data out of AF_CONFIG_OPTION_INDIC block. * src/autofit/afranges.c: Move Gurmukhi data out of AF_CONFIG_OPTION_INDIC block. * src/autofit/afstyles.h: Update Gurmukhi data; in particular, use AF_WRITING_SYSTEM_LATIN. 2016-05-21 Werner Lemberg <wl@gnu.org> Minor clang++ fixes. * src/base/ftobjs.c (FT_Add_Module), src/psaux/psobjs.c (ps_parser_load_field), src/type1/t1load.c (parse_subrs): Add initializer. * src/cache/ftccache.h (FTC_CACHE_TRYLOOP_END): Avoid implicit conversion from NULL to boolean. 2016-05-21 Werner Lemberg <wl@gnu.org> Work around a bug of the C 8.0.0.1 compiler on AIX 5.3 (#47955). * include/freetype/internal/ftmemory.h (cplusplus_typeof): Use braces for `extern "C++"'. 2016-05-17 Nikolaus Waxweiler <madigens@gmail.com> [truetype] Make TT_LOADER_SET_PP support subpixel hinting [3/3]. * src/truetype/ttgload.c (TT_LOADER_SET_PP): Replace macro with... (tt_loader_set_pp): ... this new function. Update all callers. 2016-05-17 Nikolaus Waxweiler <madigens@gmail.com> [truetype] New implementation of v38 bytecode interpreter [2/3]. This patch actually modifies the bytecode interpreter. See added comments in `ttinterp.h' for more information on this and the following commit in the series. * src/truetype/ttinterp.c (SUBPIXEL_HINTING): Replaced by... (NO_SUBPIXEL_HINTING, SUBPIXEL_HINTING_INFINALITY, SUBPIXEL_HINTING_MINIMAL): ...new macros. (Direct_Move, Direct_Move_X, Direct_Move_Y): Handle backward compatibility. Updated. (Ins_RS, Ins_FDEF, Ins_ENDF, Ins_CALL, Ins_LOOPCALL, Ins_MD): Updated. (Ins_INSTCTRL): Handle native ClearType mode flag. Updated. (Ins_FLIPPT, Ins_FLIPRGON, Ins_FLIPRGOFF): Handle backward compatibility. (Move_Zp2_Point): Ditto. (Ins_SHP): Updated. (Ins_SHPIX): Handle backward compatibility. Updated. (Ins_MSIRP, Ins_MDAP, Ins_MIAP, Ins_MDRP, Ins_MIRP): Updated. (Ins_ALIGNRP): Updated. (Ins_IUP, Ins_DELTAP): Handle backward compatibility. Updated. (Ins_GETINFO): Handle v38 flags. Updated. (TT_RunIns): Handle backward compatibility mode. Updated. 2016-05-17 Nikolaus Waxweiler <madigens@gmail.com> [truetype] New implementation of v38 bytecode interpreter [1/3]. This patch prepares data structures and the like. See added comments in `ttinterp.h' for more information on this and the following commits in the series. * devel/ftoption.h, include/freetype/config/ftoption.h (TT_CONFIG_OPTION_SUBPIXEL_HINTING): Assign values to differentiate between subpixel versions. (TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY, TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL): New macros. * include/freetype/ftttdrv.h (TT_INTERPRETER_VERSION_40): New macro. * include/freetype/internal/tttypes.h (TT_FaceRec): Updated. * src/truetype/ttinterp.h (TT_ExecContextRec): Define new fields `subpixel_hinting_lean', `vertical_lcd_lean', `backward_compatibility', `iupx_called', iupy_called', and `grayscale_cleartype' for new hinting mode. * src/truetype/ttdriver.c (tt_property_set): Handle v38 and v40 interpreters conditionally. * src/truetype/ttgload.c (TT_Hint_Glyph): Save phantom points unless in v38 backward compatibility mode. Updated. (compute_glyph_metrics): Add v38 backward compatibility mode constraint for adjusting advance widths. Updated. (tt_loader_init): Handle new flags `subpixel_hinting_lean', `grayscale_cleartype', and `vertical_lcd_lean'. Updated. (tt_get_metrics, TT_Process_Simple_Glyph, TT_LOADER_SET_PP): Updated. * src/truetype/ttobjs.c (tt_driver_init): Conditionally set default interpreter version number. * src/truetype/ttsubpix.c, src/truetype/ttsubpix.h: Updated. 2016-05-17 Werner Lemberg <wl@gnu.org> [cff] Fix matrix scaling (#47848). * include/freetype/config/ftstdlib.h (FT_LONG_MIN): New macro. * src/cff/cffparse.c (cff_parse_font_matrix): Use largest scaling value of all matrix coefficients to scale matrix. * src/cff/cffobjs.c (cff_face_init): Use `matrix->yx' member for matrix normalization if `matrix->yy' is zero. 2016-05-16 Werner Lemberg <wl@gnu.org> [base] Reject invalid sfnt Mac resource (#47891). * src/base/ftobjs.c (open_face_PS_from_sfnt_stream): Check validity of `CID ' and `TYPE1' table offset and length. 2016-05-16 Werner Lemberg <wl@gnu.org> [cid] Fix scanning for `StartData' and `/sfnts' (#47892). * src/cid/cidparse.c (STARTDATA, STARTDATA_LEN, SFNTS, SFNTS_LEN): New macros. (cid_parser_new): Fix and document algorithm. 2016-05-16 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [truetype] Improve the recursive reference detector. The previous fix for #46372 misunderstood a composite glyph referring same component twice as a recursive reference. See the discussion https://lists.gnu.org/archive/html/freetype/2016-05/msg00000.html Thanks to Khaled Hosny for finding this issue. * src/truetype/ttgload.c (ft_list_get_node_at): A function to get the i-th node from FT_List. (load_truetype_glyph): In the traversal scan of the reference tree in the composite glyph, we clear the nodes filled by previous sibling chain. 2016-05-07 Werner Lemberg <wl@gnu.org> [cache] Allow value 0 for face ID. We never dereference `face_id', and some implementations might use a running number instead of a pointer. Additionally, disallowing value zero was undocumented. * src/cache/ftccmap.c (FTC_CMapCache_Lookup), src/cache/ftcmanag.c (FTC_Manager_LookupFace, FTC_Manager_RemoveFaceID): Remove test for `face_id'. 2016-05-05 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] More efficient accounting of conic splits and draws. A single decrement counter of segments to draw, instead of an array, contains all the information necessary to decide when to split and when to draw a conic segment. The number of splits before each draw is equal to the number of trailing zeros in the counter. * src/smooth/ftgrays.c (gray_TWorker): Remove `lev_stack'. (gray_render_conic): Updated to use decrement counter of segments. 2016-05-05 Werner Lemberg <wl@gnu.org> [cff, truetype] Fix logic for `FT_Property_Set'. Otherwise some properties could be set to arbitrary values, which is harmless, but querying could give wrong positive results. * src/cff/cffdrivr.c (cff_property_set) [hinting-engine], * src/truetype/ttdriver.c (tt_property_set) [interpreter-version]: Only allow defined values. 2016-04-25 Werner Lemberg <wl@gnu.org> [autofit] Add blue-zone support for Gujarati script. This essentially moves the Gujarati script from the `Indic' hinter to the `Latin' hinter. * src/autofit/afblue.dat: Add blue zone data for Gujarati. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Gujarati standard characters and move data out of AF_CONFIG_OPTION_INDIC block. * src/autofit/afranges.c: Move Gujarati data out of AF_CONFIG_OPTION_INDIC block. * src/autofit/afstyles.h: Update Gujarati data; in particular, use AF_WRITING_SYSTEM_LATIN. 2016-04-24 Werner Lemberg <wl@gnu.org> Minor. * include/freetype/freetype.h (FT_HAS_*, FT_IS_*): Protect macro argument with parentheses. 2016-04-24 Werner Lemberg <wl@gnu.org> [truetype] Fix deallocation in case of error (#47726). * src/truetype/ttgload.c (load_truetype_glyph): Initialize fields in `outline' that are going to be deallocated in case of error. 2016-04-23 Werner Lemberg <wl@gnu.org> [autofit] Improve Georgian blue zone characters. Suggested by Akaki Razmadze <razmadzekoko@gmail.com>. * src/autofit/afblue.dat (AF_BLUE_STRING_GEORGIAN_MKHEDRULI_BOTTOM): Updated. * src/autofit/afblue.c: Regenerated. 2016-04-16 David Capello <davidcapello@gmail.com> [cmake] Honor SKIP_INSTALL_* settings (as used in zlib). As FreeType depends on zlib, if we don't install zlib (e.g., because we defined SKIP_INSTALL_ALL), FreeType cannot be installed, too (cmake triggers an error saying that FreeType cannot be installed because zlib target isn't in the export set). * CMakeLists.txt: Honor `SKIP_INSTALL_HEADERS', `SKIP_INSTALL_LIBRARIES', and `SKIP_INSTALL_ALL' settings. 2016-04-16 Behdad Esfahbod <behdad@behdad.org> [truetype] Another fix for non-intermediate GX tuples. * src/truetype/ttgxvar.c (ft_var_apply_tuple): Add some missing cases. 2016-04-12 Alexei Podtelezhnikov <apodtele@gmail.com> Remove forgotten macro. * include/freetype/internal/internal.h [FT_INTERNAL_POSTSCRIPT_GLOBALS_H]: Remove. 2016-04-09 Werner Lemberg <wl@gnu.org> [autofit] Add support for Georgian scripts. Georgian is problematic, since `uppercase' forms of Mkhedruli (called Mtavruli) are not yet defined in Unicode, which means that proper blue zones can't be defined. However, there is already a proposal submitted to Unicode; see https://www.unicode.org/L2/L2016/16034-n4707-georgian.pdf Additionally, due to historical reasons, Unicode treats Khutsuri as the same script as Mkhedruli, and so does OpenType. However, since the two scripts have completely different shapes it can happen that blue zones differ considerably. The tag `geok' used here (derived from ISO 15924) to differentiate the two scripts is not an OpenType tag in use. If we now have a font that contains both glyphs for Mkhedruli and Khutsuri, and it uses OpenType features for both also, HarfBuzz unavoidably treats all glyphs as `geor'. As a consequence, blue zones for `geok' are not used for glyphs involved in the OpenType features. An issue not yet resolved is which OpenType feature should be used to access Mtavruli glyph shapes; right now, FreeType doesn't set up support for them, but it is easy to add them later on as soon as more information is available. * src/autofit/afblue.dat: Add blue zone data for Georgian. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Georgian standard characters. * src/autofit/afranges.c: Add Georgian data. * src/autofit/afstyles.h: Add Georgian data. 2016-04-05 Werner Lemberg <wl@gnu.org> [autofit] Provide dummy blue zone for pseudo script `none'. Even if the dummy hinter is used as the handler for `none' (which doesn't use blue zones), it is more consistent than the old value (which was 0), pointing to Arabic... * src/autofit/afblue.dat: Add `AF_BLUE_STRINGSET_NONE'. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afstyles.h (none_dflt): Use AF_BLUE_STRINGSET_NONE. 2016-03-30 Werner Lemberg <wl@gnu.org> * src/pfr/pfrload.c (pfr_aux_name_load): Thinko (#47567). 2016-03-30 Werner Lemberg <wl@gnu.org> * src/pfr/pfrload.c (pfr_log_font_count): Better font size estimate. 2016-03-30 Werner Lemberg <wl@gnu.org> * src/pfr/pfrload.c (pfr_aux_name_load): Fix memory leak (#47567). 2016-03-29 Werner Lemberg <wl@gnu.org> * src/base/ftadvanc.c (FT_Get_Advances): Fix invalid left shift. 2016-03-29 Werner Lemberg <wl@gnu.org> [pfr] Fix binary search (#47514). * src/pfr/pfrsbit.c (pfr_lookup_bitmap_data): Handle border conditions correctly. 2016-03-29 Werner Lemberg <wl@gnu.org> [pfr] Minor. * src/pfr/pfrsbit.c (pfr_lookup_bitmap_data): Replace `left', `right', and `middle' with `min', `max', and `mid' as used in other FreeType binary search code. (pfr_load_bitmap_metrics): Fix invalid left shift. 2016-03-29 Werner Lemberg <wl@gnu.org> * src/pfr/pfrtypes.h: Replace all enums with macros. We need `~FOO' to unset bits, and only with unsigned values (which `enum' isn't normally) this works cleanly. 2016-03-26 Werner Lemberg <wl@gnu.org> [pfr] Robustify bitmap strike handling (#47514). We did a binary search for a charcode without ensuring that the searched data is ordered. Validating the order is now done lazily, this is, the first access to a bitmap glyph triggers the order check in the corresponding bitmap strike. * src/pfr/pfrtypes.h (PFR_BitmapFlags): New values `PFR_BITMAP_VALID_CHARCODES' and `PFR_BITMAP_CHARCODES_VALIDATED'. * src/pfr/pfrsbit.c (pfr_lookup_bitmap_data): Make `flags' argument a pointer. Handle new PFR_BITMAP_XXX flags. (pfr_slot_load_bitmap): Updated. 2016-03-26 Werner Lemberg <wl@gnu.org> [pfr] Fix handling of compound glyphs. Extra items are indicated with different bit positions. * src/pfr/pfrtypes.h (PFR_GlyphFlags): Replace `PFR_GLYPH_EXTRA_ITEMS' with `PFR_GLYPH_SIMPLE_EXTRA_ITEMS' and `PFR_GLYPH_COMPOUND_EXTRA_ITEMS'. * src/pfr/pfrgload.c (pfr_glyph_load_simple, pfr_glyph_load_compound): Use them. 2016-03-25 Werner Lemberg <wl@gnu.org> [pfr] Minor. * src/pfr/pfrsbit.c, src/pfr/pfrobjs.c: Use flag names instead of bare numbers. 2016-03-25 Werner Lemberg <wl@gnu.org> [pfr] Various clang sanitizer fixes. * src/pfr/pfrsbit.c (pfr_load_bitmap_metrics): Correctly handle signed nibbles. (pfr_slot_load_bitmap): Correctly exit frame in case of error. Fix invalid left shifts. 2016-03-23 Werner Lemberg <wl@gnu.org> Rename `VERSION.DLL' (#47472). * docs/VERSION.DLL: Renamed to... * docs/VERSIONS.TXT: ...this. 2016-03-23 Werner Lemberg <wl@gnu.org> [raster, smooth] Directly test outline size (#47500). This improves stand-alone compilation. * src/base/ftoutln.c (FT_Outline_Render): Move cbox size test to... * src/raster/ftraster.c (ft_black_render), src/smooth/ftgrays.c (gray_raster_render): ...these functions. 2016-03-23 Werner Lemberg <wl@gnu.org> [raster, smooth] Fix some clang sanitizer runtime issues. * src/raster/ftraster.c (ft_black_reset, ft_black_set_mode, ft_black_render): Harmonize signatures with `ftimage.h'. * src/smooth/ftgrays.c (gray_raster_render, gray_raster_reset): Ditto. 2016-03-22 Werner Lemberg <wl@gnu.org> * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Minor. This fixes an AddressSanitizer issue: ttgload.c:430:7: runtime error: null pointer passed as argument 1, which is declared to never be null 2016-03-21 Werner Lemberg <wl@gnu.org> * src/autofit/afhints.c (af_glyph_hints_reload): Thinko. This fixes the previous commit to this file. 2016-03-21 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Partly revert recent changes. * src/smooth/ftgrays.c (gray_conic_to, gray_cubic_to): Rework conditions to fix rendering issues. 2016-03-20 Werner Lemberg <wl@gnu.org> [autofit] Show `near' points in tracing. * src/autofit/afhints.h (AF_FLAG_NEAR): New macro. * src/autofit/afhints.c (af_glyph_hints_dump_points): Implement it. (af_glyph_hints_reload): Handle AF_FLAG_NEAR. 2016-03-18 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Minor refactoring and microoptimizations. * src/smooth/ftgrays.c (gray_render_conic, gray_render_cubic): Move band clipping from here. (gray_conic_to, gray_cubic_to): ... to here. (gray_render_line, gray_render_scanline): Initialize variables closer to their use. 2016-03-17 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Minor refactoring. * src/smooth/ftgrays.c (gray_render_conic, gray_render_cubic): Move upscaling from here. (gray_conic_to, gray_cubic_to): ... to here. 2016-03-15 Werner Lemberg <wl@gnu.org> * src/autofit/aflatin.c (af_latin_compute_stem_width): Optimize. 2016-03-14 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Temporarily revert 6eb6158dd787 (#47114). * src/smooth/ftgrays.c (gray_render_line): Old implementation. 2016-03-12 Werner Lemberg <wl@gnu.org> [ftfuzzer] Improve coverage of rasterfuzzer. * src/tools/ftfuzzer/rasterfuzzer.cc (LLVMFuzzerTestOneInput): Use input data for `tags' array also. Trim input data to get more positive hits. 2016-03-11 Pavlo Denysov <paul.kiev+savannah@gmail.com> Fix CMake issues for iOS (patch #8941). * CMakeLists.txt (CMAKE_TOOLCHAIN_FILE): Fix directory. * builds/cmake/iOS.cmake: No longer enforce gcc. 2016-03-09 Behdad Esfahbod <behdad@behdad.org> [truetype] Fix handling of non-intermediate GX tuples. We probably did not notice this as all fonts we tested had only tuple_coords[i] be +1 or -1 for non-intermediate tuples. * src/truetype/ttgxvar.c (ft_var_apply_tuple): Implement it. 2016-03-06 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Refuse to render enormous outlines (#47114). The goal is to avoid integer overflows in the rendering algorithms. The limit is chosen arbitrarily at some 2^18 pixels, which should be enough for modern devices including printers. * src/base/ftoutln.c (FT_Outline_Render): Check CBox and reject enormous outlines. 2016-03-06 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Replace left shifts with multiplications (#47114). * src/smooth/ftgrays.c (SUBPIXELS, UPSCALE, DOWNSCALE): Do it. 2016-03-05 Werner Lemberg <wl@gnu.org> [autofit] Avoid excessive stem length rounding (#25392). * src/autofit/aflatin.c (af_latin_compute_stem_width): Add argument to pass difference between hinted and unhinted position of base point; use this to adjust the stem width depending on the PPEM so that it doesn't become too large under certain circumstances. Update all callers using value 0 for this argument except... (af_latin_align_linked_edge): Pass position delta of base point to `af_latin_compute_stem_width'. 2016-03-05 J Raynor <jxraynor@gmail.com> Make FreeType compile on AIX out of the box. * builds/unix/configure.raw (XX_ANSIFLAGS): Don't use `-ansi' on AIX. 2016-03-01 Werner Lemberg <wl@gnu.org> Kostya Serebryany <kcc@google.com> [ftfuzzer] Add unit for testing smooth and black rasterizers. * src/tools/ftfuzzer/rasterfuzzer.cc: New file. 2016-03-01 Werner Lemberg <wl@gnu.org> [autofit] Fix reallocation error introduced in 2016-02-27 (#47310). * src/autofit/aflatin.c (af_latin_hints_compute_segments): Reassign `prev_segment' after reallocation. 2016-03-01 Werner Lemberg <wl@gnu.org> Fix clang warnings. * src/autofit/aflatin.c (af_latin_hints_compute_segments): Use FT_UShort for `min_flags' and `max_flags'. Initialize `prev_*' variables. * src/cff/cffobjs.c (cff_face_init) [FT_DEBUG_LEVEL_TRACE]: Fix types of local variables. * src/smooth/ftgrays.c (gray_dump_cells) [FT_DEBUG_LEVEL_TRACE]: Update `printf' format string. * src/tools/ftfuzzer/ftfuzzer.cc (setIntermediateAxis): Add cast. (LLVMFuzzerTestOneInput): Fix loop type. 2016-02-29 Werner Lemberg <wl@gnu.org> [autofit] Add blue-zone support for Sinhala script. This essentially moves the Sinhala script from the `Indic' hinter to the `Latin' hinter. * src/autofit/afblue.dat: Add blue zone data for Sinhala. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Sinhala standard character and move data out of AF_CONFIG_OPTION_INDIC block. * src/autofit/afranges.c: Move Sinhala data out of AF_CONFIG_OPTION_INDIC block. * src/autofit/afstyles.h: Update Sinhala data; in particular, use AF_WRITING_SYSTEM_LATIN. 2016-02-27 Werner Lemberg <wl@gnu.org> [autofit] Properly handle spikes pointing to the x-axis. An example that gets better rendered is glyph `uusignTaml' (glyph index 2286) in font `FreeSerif.ttf' (Version 0412.2263) at 22ppem. * src/autofit/aflatin.c (af_latin_hints_compute_segments): Properly handle segments where the last point of the first segment is identical to the first point in the second one. This can happen for malformed fonts or spikes. We either merge the new segment with the previous one (both segments point into the same direction), or we discard the shorter segment if they point into different directions. 2016-02-27 Werner Lemberg <wl@gnu.org> [autofit] Minor code clean-up. * src/autofit/aflatin.c (af_latin_hints_compute_segments): Change some local variable names to better differentiate between values along a segment and values orthogonal to it. 2016-02-26 Werner Lemberg <wl@gnu.org> [autofit] Improve BOUND action. In complex glyph shapes, the original logic was too simple to cater for situations that would actually need something similar to PS Hint masks. This fix should alleviate the worst cases. * src/autofit/aflatin.c (af_latin_hint_edges): Don't allow complete disappearance of stems. 2016-02-25 Werner Lemberg <wl@gnu.org> [autofit] Add blue-zone support for Tamil script. This essentially moves the Tamil script from the `Indic' hinter to the `Latin' hinter. * src/autofit/afblue.dat: Add blue zone data for Tamil. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Tamil standard character and move data out of AF_CONFIG_OPTION_INDIC block. * src/autofit/afranges.c: Move Tamil data out of AF_CONFIG_OPTION_INDIC block. * src/autofit/afstyles.h: Update Tamil data; in particular, use AF_WRITING_SYSTEM_LATIN. 2016-02-18 Werner Lemberg <wl@gnu.org> [autofit] Add blue-zone support for Malayalam script. This essentially moves the Malayalam script from the `Indic' hinter to the `Latin' hinter. * src/autofit/afblue.dat: Add blue zone data for Malayalam. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Malayalam standard characters and move data out of AF_CONFIG_OPTION_INDIC block. * src/autofit/afranges.c: Move Malayalam data out of AF_CONFIG_OPTION_INDIC block. * src/autofit/afstyles.h: Update Malayalam data; in particular, use AF_WRITING_SYSTEM_LATIN. 2016-02-16 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Fix integer overflow (#47114). * src/smooth/ftgrays.c (TArea): Make it unconditionally `long'. 2016-02-15 Werner Lemberg <wl@gnu.org> * src/cff/cffparse.c (cff_parse_multiple_master): Improve tracing. 2016-02-15 Werner Lemberg <wl@gnu.org> [cff] Handle T2 operator only with old CFF engine (#47157). * src/cff/cffparse.c (cff_parser_run) <opcode 31>: Enclose with #ifdef CFF_CONFIG_OPTION_OLD_ENGINE...#endif. 2016-02-15 Werner Lemberg <wl@gnu.org> [cff] Partially handle `load' and `store' ops in old CFF engine. Now all glyphs of MM CFFs like `ITCGaramondMM-It.otf' can be displayed. * src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_store, cff_op_load>: Partially implement it. * src/cff/cffparse.c (cff_parser_init): Add new parameter to pass the number of Multiple Master axes. Update all callers. (cff_parse_multiple_master): Get number of axes. (cff_parser_run) <opcode 31>: Updated. * src/cff/cffparse.h: Updated. (CFF_ParserRec): Add `num_axes' field. * src/cff/cffload.c: Updated. * src/cff/cfftypes.h (CFF_FontRecDictRec): Add `num_axes' field. 2016-02-15 Werner Lemberg <wl@gnu.org> [cff] Correctly trace SIDs that contain NULL bytes. We need this to properly trace Multiple Master CFFs, which contain two SIDs that are charstrings. This commit makes FreeType also show the last SID, omitted previously due to a bug. * src/cff/cfftypes.h (CFF_FontRec): Add `string_pool_size' field. * src/cff/cffload.c (cff_index_get_pointers): Add argument to return the pool size. Update all callers. * src/cff/cffobjs.c (cff_face_init) [FT_DEBUG_LEVEL_TRACE]: Directly access `cff->strings' to display the non-default strings. 2016-02-14 Werner Lemberg <wl@gnu.org> * src/base/fthash.c: Include FT_INTERNAL_MEMORY_H. 2016-02-14 Werner Lemberg <wl@gnu.org> * src/cff/cffparse.c: Include `cffgload.h'. Problem reported by Colin Walters <walters@verbum.org>. 2016-02-14 Werner Lemberg <wl@gnu.org> [cff] Make old CFF engine show MM CFFs (without variations). The new code only displays the first master in the font. * src/cff/cffgload.c (cff_decode_parse_charstrings): Add new parameter to allow function calls from dictionaries also. <cff_op_blend>: Partially implement it. Update all callers. * src/cff/cffgload.h: Updated. * src/cff/cffparse.c (cff_parser_init): Add new parameter to pass the number of Multiple Master designs. Update all callers. (cff_parse_multiple_master): New function to rudimentarily parse operator. (cff_parser_run): Handle `T2' operator. * src/cff/cffparse.h: Updated. (CFF_ParserRec): Add `num_designs' field. * src/cff/cffload.c: Updated. * src/cff/cfftoken.h: Handle `MultipleMaster' operator. * src/cff/cfftypes.h (CFF_FontRecDictRec): Add `num_designs' field. * src/sfnt/sfobjs.c (sfnt_init_face): Don't handle `fvar' table for MM CFFs. 2016-02-09 Werner Lemberg <wl@gnu.org> [docmaker] Don't emit trailing newlines. * src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_code): Use `rstrip'. 2016-02-07 Werner Lemberg <wl@gnu.org> * Version 2.6.3 released. ========================= Tag sources with `VER-2-6-3'. * docs/VERSION.DLL: Update documentation and bump version number to 2.6.3. * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj, builds/windows/vc2005/index.html, builds/windows/vc2008/freetype.vcproj, builds/windows/vc2008/index.html, builds/windows/vc2010/freetype.vcxproj, builds/windows/vc2010/index.html, builds/windows/visualc/freetype.dsp, builds/windows/visualc/freetype.vcproj, builds/windows/visualc/index.html, builds/windows/visualce/freetype.dsp, builds/windows/visualce/freetype.vcproj, builds/windows/visualce/index.html, builds/wince/vc2005-ce/freetype.vcproj, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/freetype.vcproj, builds/wince/vc2008-ce/index.html: s/2.6.2/2.6.3/, s/262/263/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3. * builds/unix/configure.raw (version_info): Set to 18:3:12. * CMakeLists.txt (VERSION_PATCH): Set to 3. * docs/CHANGES: Updated. 2016-02-07 Werner Lemberg <wl@gnu.org> Fix another runtime error found by clang's sanitizer (#47082). * src/base/ftstroke.c (ft_stroke_border_export): Properly handle empty input buffer. 2016-02-07 Werner Lemberg <wl@gnu.org> Fix runtime errors found by clang's sanitizer (#47082). * src/base/ftobjs.c (FT_Render_Glyph_Internal), src/base/ftoutln.c (FT_Outline_Copy), src/cache/ftcsbits.c (ftc_sbit_copy_bitmap): Properly handle empty input buffer. 2016-02-07 Werner Lemberg <wl@gnu.org> [cff] Minor. * src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_sqrt>: Remove dead code. 2016-02-07 Werner Lemberg <wl@gnu.org> [cff] Implement missing operators in new engine (except `random'). * src/cff/cf2font.h (CF2_STORAGE_SIZE): New macro. * src/cff/cf2intrp.c (cf2_interpT2CharString): Implement the following operators: abs, add, and, div, drop, dup, eq, exch, get, ifelse, index, mul, neg, not, or, put, roll, sqrt, sub. * src/cff/cf2stack.h, src/cff/cf2stack.c (cf2_stack_roll): New auxiliary function for `roll' operator. 2016-02-06 Werner Lemberg <wl@gnu.org> [cff] Fix some Type 2 operators in old CFF engine. * src/cff/cffgload.c (cff_decoder_parse_charstrings): Fix `eq' operator, add `not' and (unsupported) `blend' operators. 2016-02-05 Sebastian Rasmussen <sebras@gmail.com> Make direct call of `make install' work (#47072). * builds/unix/unix-def.in (freetype-config): Make sure `freetype-config' is generated for both make targets (`all' and `install'). 2016-02-05 Werner Lemberg <wl@gnu.org> [base] Fix advance width loading for MM and GX fonts (#47064). * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Return false for MM and GX fonts. Update callers. 2016-02-03 Werner Lemberg <wl@gnu.org> [cff] Fix handling of face_index == -1 for pure CFF. * src/cff/cffobjs.c (cff_face_init): Return correct number of faces. 2016-01-30 Werner Lemberg <wl@gnu.org> [autofit] Minor tracing improvement. * src/autofit/afhints.c (af_glyph_hints_dump_points): Insert newline at the start of a new contour. 2016-01-28 Nikolaus Waxweiler <madigens@gmail.com> Remove unpatented hinter (3/3). * include/freetype/config/ftoption.h (TT_CONFIG_OPTION_UNPATENTED_HINTING): Remove. * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): Remove `ignore_unpatented_hinter' field. Update users. (FT_DEBUG_HOOK_UNPATENTED_HINTING): Remove. Update users. * include/freetype/internal/tttypes.h (TT_FaceRec): Remove `unpatented_hinting' field. Update users. * src/base/ftpatent.c (_tt_check_patents_in_range, _tt_check_patents_in_table, _tt_face_check_patents): Remove. (FT_Face_CheckTrueTypePatents, FT_Face_SetUnpatentedHinting): Replace code with dummies. * src/truetype/ttobjs.c (tt_face_init): Remove now defunct code. * src/truetype/ttobjs.h (TT_GraphicsState): Remove `both_x_axis' field. 2016-01-28 Nikolaus Waxweiler <madigens@gmail.com> Remove unpatented hinter (2/3). * devel/ftoption.h (TT_CONFIG_OPTION_UNPATENTED_HINTING): Remove. 2016-01-28 Nikolaus Waxweiler <madigens@gmail.com> Remove unpatented hinter (1/3). * src/truetype/ttinterp.c [TT_CONFIG_OPTION_UNPATENTED_HINTING]: Remove all code related to this macro. 2016-01-28 Werner Lemberg <wl@gnu.org> [autofit] Add blue-zone support for Kannada script. This essentially moves the Kannada script from the `Indic' hinter to the `Latin' hinter. * src/autofit/afblue.dat: Add blue zone data for Kannada. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Kannada standard characters and move data out of AF_CONFIG_OPTION_INDIC block. * src/autofit/afranges.c: Move Kannada data out of AF_CONFIG_OPTION_INDIC block. * src/autofit/afstyles.h: Update Kannada data; in particular, use AF_WRITING_SYSTEM_LATIN. 2016-01-22 Alexei Podtelezhnikov <apodtele@gmail.com> Better access to 64-bit integers for C99 compilers. * include/freetype/config/ftconfig.h [FT_LONG64]: Use __STDC_VERSION__ to define 64-bit integers. * builds/unix/ftconfig.in [FT_LONG64]: Ditto. * builds/vms/ftconfig.h [FT_LONG64]: Ditto. 2016-01-21 Werner Lemberg <wl@gnu.org> [gxvalid] Remove commented out code. * src/gxvalid/gxvcommn.c (gxv_EntryTable_validate): Do it. 2016-01-20 Werner Lemberg <wl@gnu.org> [autofit] Complete last autofit commit. Problem reported by Kostya Serebryany <kcc@google.com>. * src/autofit/afshaper.c (af_shaper_get_coverage) [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Update signature. 2016-01-20 Werner Lemberg <wl@gnu.org> Still handle `__FTERRORS_H__'. We need this for backward compatibility. Problem reported by John Emmas <johne53@tiscali.co.uk>. * include/freetype/fterrors.h: Fix inclusion guard so that undefining either `FTERRORS_H_' or `__FTERRORS_H__' works as expected. 2016-01-19 Werner Lemberg <wl@gnu.org> [autofit] Fix handling of default script. Patch taken from ttfautohint, commit 071ae2c00e0d67f9d19418f4fade1c23d27dc185. There were two bugs. - We now use non-standard script tags like `khms' for special purposes. However, HarfBuzz maps such tags to `DFLT', and without this commit the associated lookups were incorrectly assigned to the non-standard tags. - Let's assume we have a Bengali font, and the font's `DFLT' script tag handles the necessary lookups for Bengali, too. Without this commit, the `DFLT' lookups were assigned to ttfautohint's default script (usually `latn') before the standard lookups for Bengali were handled. We now have the following order while searching for covered glyph indices. special features of scripts (e.g. `sups' for Cyrillic) Unicode mappings of scripts remaining features of scripts (especially important for Indic scripts) default features of default script * src/autofit/afshaper.c, src/autofit/afshaper.h (af_shaper_get_coverage): Add boolean parameter to indicate default script. Update all callers. * src/autofit/afglobal.c (af_face_globals_compute_style_coverage): Fix search order for coverages. 2016-01-19 Werner Lemberg <wl@gnu.org> Various minor clang fixes. * src/autofit/afcjk.c (af_cjk_metrics_init_widths), src/autofit/aflatin.c (af_latin_metrics_init_widths): Initialize `ch'. * src/base/ftcalc.c (FT_MulFix) [FT_LONG64]: Add cast. * src/base/ftdbgmem.c (ft_mem_table_destroy): Add cast. * src/base/fthash.c (hash_num_lookup): Add cast. * src/base/fttrigon.c (ft_trig_downscale) [FT_LONG64]: Fix cast. * src/gxvalid/gxvcommn.c (gxv_EntryTable_validate): Comment out redundant code. * src/type1/t1driver.c (t1_get_ps_font_value) <PS_DICT_SUBR>: Add cast. * src/type1/t1load.c (parse_subrs): Fix type of `count'. 2016-01-19 Derek B. Noonburg <derekn@glyphandcog.com> [truetype] Add another tricky font. * src/truetype/ttobjs.c (TRICK_SFNT_IDS_NUM_FACES): Increase. (sfnt_id): Add variant of `DFKaiShu'. 2016-01-14 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Empower `FT_Library_SetLcdFilterWeights'. * src/base/ftlcdfil.c (FT_Library_SetLcdFilterWeights): Enable filter in addition to setting weights. (FT_Library_SetLcdFilter): Clean out FT_FORCE_LIGHT_LCD_FILTER and FT_FORCE_LEGACY_LCD_FILTER. * include/freetype/ftlcdfil.h: Documentation update. 2016-01-12 Werner Lemberg <wl@gnu.org> Don't use macro names that start with `_[A-Z]' [3/3]. Such macro names are reserved for both C and C++. * src/cache/ftccache.h: s/_FTC_FACE_ID_HASH/FTC_FACE_ID_HASH/. Update all callers. (FTC_CACHE_LOOKUP_CMP): Replace `_XXX' with `XXX_'. * src/cache/ftcmru.c (FTC_MRULIST_LOOKUP_CMP): Ditto. 2016-01-12 Werner Lemberg <wl@gnu.org> Don't use macro names that start with `_[A-Z]' [2/3]. Such macro names are reserved for both C and C++. * include/freetype/ftimage.h, src/raster/ftraster.c, src/smooth/ftgrays.c, src/smooth/ftgrays.h: s/_STANDALONE_/STANDALONE_/. 2016-01-12 Werner Lemberg <wl@gnu.org> Don't use macro names that start with `_[A-Z]' [1/3]. Such macro names are reserved for both C and C++. * src/bdf/bdflib.c: Replace macros of the form `_BDF_XXX' with `BDF_XXX_'. 2016-01-12 Werner Lemberg <wl@gnu.org> Don't use macro names that contain `__' [2/2]. Such macro names are reserved for both C and C++. * src/cache/*: s/__/_/. 2016-01-12 Werner Lemberg <wl@gnu.org> Don't use macro names that contain `__' [1/2]. Such macro names are reserved for both C and C++. * */*: Replace macros of the form `__XXX_H__' with `XXX_H_'. 2016-01-10 Jered Gray <jegray@google.com> [cff] Fix usage of `|' operator. * src/cff/cf2intrp.c (cf2_interpT2CharString) [cf2_cmdEXTENDEDNMBR, default]: `|' is not guaranteed to be processed from left to right by the compiler. However, the code repeatedly calls `cf2_buf_readByte' to get the arguments to `|' ... Fix this. 2015-12-25 Werner Lemberg <wl@gnu.org> [autofit] Make top-to-bottom hinting work in latin auto-hinter. This improves rendering of scripts like Bengali or Devanagari. * src/autofit/afhints.c (af_axis_hints_new_edge): Add parameter to pass top-to-bottom hinting flag. This makes the function sort edges in descending vertical position. * src/autofit/afhints.c: Updated. * src/autofit/aflatin.c (af_latin_hints_compute_edges, af_latin_hint_edges): Use `top_to_bottom_hinting' flag. * src/autofit/afcjk.c (af_cjk_hints_compute_edges), src/autofit/aflatin2.c (af_latin2_hints_compute_edges): Updated. 2015-12-24 Werner Lemberg <wl@gnu.org> [autofit] Add hinting direction to `AF_ScriptClassRec'. Still unused. * src/autofit/afglobal.c (SCRIPT): Handle hinting direction. * src/autofit/aftypes.h (AF_ScriptClassRec): Add `top_to_bottom_hinting' field. (AF_HINTING_BOTTOM_TO_TOP, AF_HINTING_TOP_TO_BOTTOM): New macros. (AF_DEFINE_SCRIPT_CLASS): Updated. 2015-12-23 Werner Lemberg <wl@gnu.org> [autofit] Start implementing hinting direction (up/down, down/up). Right now, it does nothing. * src/autofit/afscript.h: Add another parameter to `SCRIPT', specifying hinting direction. * src/autofit/afglobal.c, src/autofit/afglobal.h, src/autofit/afpic.c, src/autofit/afranges.h, src/autofit/afshaper.c, src/autofit/aftypes.h: Extend `SCRIPT' definitions. 2015-12-22 Werner Lemberg <wl@gnu.org> * src/type1/t1load.c (parse_subrs): Fix memory leak (#46744). 2015-12-22 Werner Lemberg <wl@gnu.org> [base] Make hash interface symmetric. Use `num' and `str' infixes everywhere. * src/base/fthash.c (ft_hash_init): Renamed to... (hash_init): ... This. (ft_hash_str_init, ft_hash_num_init): New functions. (ft_hash_free): Renamed to... (ft_hash_str_free): ... This. * include/freetype/internal/fthash.h: Updated. * src/bdf/bdflib.c, src/type1/t1load.c, src/type1/t1objs.c: Updated. 2015-12-21 Werner Lemberg <wl@gnu.org> [type1] Avoid shift of negative numbers (#46732). * src/type1/t1load.c (parse_subrs): Do it. 2015-12-20 Werner Lemberg <wl@gnu.org> [type1, psaux] Handle large values of num_subrs correctly (#46692). We now use a hash to map from subr indices to array elements holding the subroutines, if necessary. * include/freetype/internal/t1types.h: Include FT_INTERNAL_HASH_H. (T1_FontRec): Add `subrs_hash' field. * include/freetype/internal/psaux.h: Include FT_INTERNAL_HASH_H. (T1_DecoderRec): Add `subrs_hash' field. * src/type1/t1load.h (T1_LoaderRec): Add `subrs_hash' field. * src/type1/t1driver.c: Include FT_INTERNAL_HASH_H. (t1_ps_get_font_value) [PS_DICT_SUBR]: Look up hash if necessary. * src/type1/t1load.c: Include FT_INTERNAL_HASH_H. (parse_subrs): Use hash for subr indices that exceed the allocated number of subr slots. (t1_init_loader): Remove unnecessary code. (t1_done_loader, T1_Open_Face): Updated. * src/type1/t1gload.c (T1_Compute_Max_Advance, T1_Get_Advances, T1_Load_Glyph): Updated. * src/type1/t1objs.c (T1_Face_Done): Updated. * src/psaux/t1decode.c: Include FT_INTERNAL_HASH_H. (t1_decoder_parse_charstrings) [op_callsubr]: Look up hash if necessary. * src/cid/cidgload.c (cid_load_glyph): Updated. 2015-12-20 Werner Lemberg <wl@gnu.org> [base] Thinko: Remove free function pointer. We don't copy keys or values while hashing. * include/freetype/internal/fthash.h (FT_Hash_FreeFunc): Removed. (FT_HashRec): Remove `free' field. * src/base/fthash.c (hash_str_free): Removed. (ft_hash_init, ft_hash_free): Updated. 2015-12-20 Werner Lemberg <wl@gnu.org> [base, bdf] Don't expose `FT_Hashnode' in hash functions. * src/base/fthash.c (hash_lookup, ft_hash_str_lookup, ft_hash_num_lookup): Return pointer to `size_t' instead of `FT_Hashnode'. * include/freetype/internal/fthash.h: Updated. * src/bdf/bdflib.c (bdf_get_property, _bdf_add_property, bdf_get_font_property): Updated. 2015-12-20 Werner Lemberg <wl@gnu.org> [base, bdf] Add number hashing. * src/base/fthash.c (hash_num_lookup, hash_num_compare): New functions. (ft_hash_init): Add argument to select between number and string hashing. (ft_hash_num_insert, ft_hash_num_lookup): New functions. * include/freetype/internal/fthash.h: Updated. * src/bdf/bdflib.c (_bdf_parse_start): Updated. 2015-12-20 Werner Lemberg <wl@gnu.org> [base] Introduce hash lookup, compare, and free function pointers. * include/freetype/internal/fthash.c (FT_Hash_LookupFunc, FT_Hash_CompareFunc, FT_Hash_FreeFunc): New typedefs. (FT_HashRec): Add `lookup', `compare', and `free' fields. * src/base/fthash.c (hash_str_lookup, hash_str_compare, hash_str_free): New functions. (ft_hash_init): Set function pointers. (hash_bucket, ft_hash_free): Use them. 2015-12-20 Werner Lemberg <wl@gnu.org> [base, bdf] Use a union as a hash key. We want to support both an integer and a string key later on. * include/freetype/internal/fthash.h (FT_Hashkey): New union. (FT_HashnodeRec): Updated. (ft_hash_insert, ft_hash_lookup): Renamed to ... (ft_hash_str_insert, ft_hash_str_lookup): ... this. * src/base/fthash.c (hash_bucket): Updated. (ft_hash_insert, ft_hash_lookup): Renamed to ... (hash_insert, hash_lookup): ... this. (ft_hash_str_insert, ft_hash_str_lookup): New wrapper functions. * src/bdf/bdflib.c: Updated. 2015-12-19 Werner Lemberg <wl@gnu.org> [bdf] Use new hash functions. * src/bdf/bdf.h: Include FT_INTERNAL_HASH_H. (hashnode, hashtable): Removed. (bdf_font_t): Use `FT_HashRec' type for `proptbl'. * src/bdf/bdflib.c: Remove all hash functions. Update code for new hash structure and function names. 2015-12-19 Werner Lemberg <wl@gnu.org> [bdf, base] Lift hash functions from bdf driver to base module. * src/base/fthash.c, include/freetype/internal/fthash.h: New files, containing (massaged) code from `bdflib.c' and `bdf.h'. * include/freetype/internal/internal.h (FT_INTERNAL_HASH_H): New macro. * src/base/ftbase.c: Include `fthash.c'. * src/base/Jamfile (_sources): Add `fthash'. * src/base/rules.mk (BASE_SRC): Add `fthash.c'. * docs/LICENSE.TXT: Updated. 2015-12-15 Werner Lemberg <wl@gnu.org> [autofit] Add blue-zone support for Bengali script. This essentially moves the Bengali script from the `Indic' hinter to the `Latin' hinter. * src/autofit/afblue.dat: Add blue zone data for Bengali. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Bengali standard characters and move data out of AF_CONFIG_OPTION_INDIC block. * src/autofit/afranges.c: Move Bengali data out of AF_CONFIG_OPTION_INDIC block. * src/autofit/afstyles.h: Update Bengali data; in particular, use AF_WRITING_SYSTEM_LATIN. 2015-12-14 Ben Wagner <bungeman@gmail.com> [bdf] Remove dead code (#46625). The BDF specification only allows decimal numbers, no octal or hexadecimal decoding is needed. * src/bdf/bdflib.c (_bdf_atoul, _bdf_atol, _bdf_atous, _bdf_atos): Remove unused code and parameters. Update all callers. (odigits): Remove. 2015-12-14 Werner Lemberg <wl@gnu.org> [base] Fix calls to `FT_Stream_Seek'. * src/base/ftobjs.c (Mac_Read_sfnt_Resource, FT_Open_Face): Set `error'. 2015-12-14 Ben Wagner <bungeman@gmail.com> [base] Check error when seeking to data supplied offset (#46635). * src/base/ftobjs.c (open_face_PS_from_sfnt_stream): `ft_lookup_PS_in_sfnt_stream' returns offset and length from user supplied data. Use of this these values must be checked. 2015-12-13 Werner Lemberg <wl@gnu.org> [autofit] Add support for Myanmar script. * src/autofit/afblue.dat: Add blue zone data for Myanmar. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Myanmar standard characters. * src/autofit/afranges.c: Add Myanmar data. * src/autofit/afstyles.h: Add Myanmar data. 2015-12-12 Werner Lemberg <wl@gnu.org> * src/autofit/aflatin.c (af_latin_metrics_init_blues): Minor. 2015-12-12 Werner Lemberg <wl@gnu.org> * src/autofit/afscript.h: Avoid potential crash. 2015-12-10 Werner Lemberg <wl@gnu.org> [autofit] Restore OpenType feature check. This was removed while rewriting the HarfBuzz interface. * src/autofit/afglobal.h (AF_FaceGlobalsRec): Add `hb_buf' field to hold internal HarfBuzz buffer, needed for feature comparison. * src/autofit/afglobal.c (af_face_globals_new, af_face_globals_free): Initialize and destroy `hb_buf'. * src/autofit/afshaper.c (af_shaper_get_cluster): Compare character (cluster) with and without applied feature. * src/autofit/aflatin.c (af_latin_metrics_init_blues): Fix tracing message. 2015-12-10 Werner Lemberg <wl@gnu.org> [autofit] Remove redundant code. * src/autofit/aflatin.c (af_latin_metrics_init_widths): Do it. 2015-12-09 Werner Lemberg <wl@gnu.org> [autofit] Thinko. * src/autofit/aflatin.c (af_latin_metrics_init_blues): Don't count empty blue zones (bug introduced 2015-12-06). 2015-12-09 Werner Lemberg <wl@gnu.org> [autofit] Introduce subscript top blue zones. This feature is mainly for Khmer: The idea is to avoid a clash between the top of subscript glyphs and the bottom of normal baseline glyphs. This only works for character clusters mapped to multiple glyphs. * src/autofit/afblue.dat: Add subscript top blue zone for Khmer. * src/autofit/afblue.hin (AF_BLUE_PROPERTY_LATIN_SUB_TOP): New macro. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/aflatin.h (AF_LATIN_IS_SUB_TOP_BLUE, AF_LATIN_BLUE_SUB_TOP): New macros. * src/autofit/aflatin.c (af_latin_metrics_init_blues): Handle new blue zone property. Update tracing messages. (af_latin_metrics_scale_dim): Handle new blue zone property. (af_latin_hints_compute_blue_edges): Updated. 2015-12-09 Werner Lemberg <wl@gnu.org> [autofit] Fix tracing message. * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Display inactive blue zones also. 2015-12-06 Werner Lemberg <wl@gnu.org> * src/autofit/afblue.dat: Add more Khmer clusters. Some fonts have incorrect ligatures; we need more samples to get a good mean value. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. 2015-12-06 Werner Lemberg <wl@gnu.org> [autofit] Typos. * src/autofit/afshaper.c (af_shaper_buf_create, af_shaper_get_elem) [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Make it compile. 2015-12-06 Werner Lemberg <wl@gnu.org> [autofit] Add support for Khmer script. We split Khmer into two auto-hinter scripts: `Khmer' (`khmr') and `Khmer symbols' (`khms', U+19E0-U+19FF). * src/autofit/afblue.dat: Add blue zone data for Khmer. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Khmer standard characters. * src/autofit/afranges.c: Add Khmer data. * src/autofit/afstyles.h: Add Khmer data. 2015-12-06 Werner Lemberg <wl@gnu.org> [autofit] Rewrite HarfBuzz interface to support character clusters. Scripts like Khmer have blue zones that can't be directly represented by Unicode characters. Instead, it is necessary to let HarfBuzz convert character clusters into proper glyph representation forms, then deriving the blue zone information from the resulting glyphs. * src/autofit/hbshim.c, src/autofit/hbshim.h: Replaced by... * src/autofit/afshaper.c, src/autofit/afshaper.h: ... these two new files, providing a new API to access HarfBuzz. The new API manages a HarfBuzz buffer with `af_shaper_buf_create' and `af_shaper_buf_destroy'. The buffer receives a UTF8 encoded string with function `af_shaper_get_cluster', and the resulting glyph data (indices, advance widths, vertical offsets) can be iteratively accessed with function `af_shaper_get_elem'. * src/autofit/afcjk.c (af_cjk_metrics_init_widths, af_cjk_metrics_init_blues, af_cjk_metrics_check_digits): Updated. * src/autofit/aflatin.c (af_latin_metrics_init_widths, af_latin_metrics_init_blues, af_latin_metrics_check_digits): Updated. * include/freetype/internal/fttrace.h: s/afharfbuzz/afshaper/. * src/autofit/afglobal.c: s/hbshim.h/afshaper.h/. (af_face_globals_compute_style_coverage): Updated. * src/autofit/afglobal.h: s/hbshim.h/afshaper.h/. * src/autofit/autofit.c: s/hbshim.c/afshaper.c/. * src/autofit/Jamfile, src/autofit/rules.mk (AUTOF_DRV_SRC): Updated. 2015-12-06 Werner Lemberg <wl@gnu.org> [autofit] Prepare forthcoming changes. This makes it easier to control the commits. * src/autofit/aflatin.c (af_latin_metrics_init_blues): Add dummy loop. No functional change. 2015-12-06 Werner Lemberg <wl@gnu.org> [autofit] Use string of standard characters. This is more flexible; additionally, it would allow character clusters. * src/autofit/aftypes.h (SCRIPT, AF_DEFINE_SCRIPT_CLASS): Updated. (AF_ScriptClassRec): Replace `standard_char[123]' with `standard_charstring'. * src/autofit/afscript.h: Replace last three character arguments of the `SCRIPT' calls with a string parameter, holding the standard characters (in UTF-8 encoding) separated with spaces. * src/autofit/afglobal.c, src/autofit/afglobal.h, src/autofit/afpic.c, src/autofit/afranges.c, src/autofit/hbshim.c (SCRIPT): Updated. * src/autofit/afcjk.c (af_cjk_metrics_init_widths), src/autofit/aflatin.c (af_latin_metrics_init_widths): Updated. 2015-12-05 Werner Lemberg <wl@gnu.org> * src/autofit/afblue.dat: Separate blue zone characters with spaces. Another preparation for character cluster support. * src/autofit/afblue.c, src/autofit.afblue.h: Regenerated. 2015-12-05 Werner Lemberg <wl@gnu.org> * src/tools/afblue.pl (convert_ascii_chars): Don't ignore spaces. Instead, reduce multiple spaces to a single one. We need this later for supporting character clusters in `afblue.dat'. 2015-12-05 Werner Lemberg <wl@gnu.org> * src/autofit/afblue.hin (GET_UTF8_CHAR): Use `do...while(0)'. * src/autofit/afblue.h: Regenerated. 2015-12-05 Werner Lemberg <wl@gnu.org> * src/autofit/afwarp.c: s/INT_MIN/FT_INT_MIN/. 2015-12-03 Werner Lemberg <wl@gnu.org> * builds/unix/install.mk (install): Remove stale `ft2build.h'. 2015-12-01 Werner Lemberg <wl@gnu.org> [type1] Avoid dangling pointer (#46572). * src/type1/t1afm.c (T1_Read_Metrics): Properly reset `face->afm_data'. 2015-11-28 Alexei Podtelezhnikov <apodtele@gmail.com> * include/freetype/ftlcdfil.h: Documentation tweak. 2015-11-28 Werner Lemberg <wl@gnu.org> * Version 2.6.2 released. ========================= Tag sources with `VER-2-6-2'. * docs/VERSION.DLL: Update documentation and bump version number to 2.6.2. * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj, builds/windows/vc2005/index.html, builds/windows/vc2008/freetype.vcproj, builds/windows/vc2008/index.html, builds/windows/vc2010/freetype.vcxproj, builds/windows/vc2010/index.html, builds/windows/visualc/freetype.dsp, builds/windows/visualc/freetype.vcproj, builds/windows/visualc/index.html, builds/windows/visualce/freetype.dsp, builds/windows/visualce/freetype.vcproj, builds/windows/visualce/index.html, builds/wince/vc2005-ce/freetype.vcproj, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/freetype.vcproj, builds/wince/vc2008-ce/index.html: s/2.6.1/2.6.2/, s/261/262/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 2. * builds/unix/configure.raw (version_info): Set to 18:2:12. * CMakeLists.txt (VERSION_PATCH): Set to 2. * docs/CHANGES: Updated. 2015-11-28 Werner Lemberg <wl@gnu.org> Fix C++ compilation. * src/autofit/afloader.c: Include FT_INTERNAL_CALC_H. * src/truetype/ttgload.c (load_truetype_glyph): Pacify compiler. 2015-11-28 Nikolaus Waxweiler <madigens@gmail.com> Change default LCD filter to be normalized and color-balanced. * src/base/ftlcdfil.c (FT_Library_SetLcdFilter): Update `default_filter'. 2015-11-28 Werner Lemberg <wl@gnu.org> [docmaker] Allow references to section names. In the reference, we show the section's title enclosed in single quotes. * src/tools/docmaker/formatter.py (Formatter::__init__): Collect section names as identifiers. * src/tools/docmaker/tohtml.py (section_title_header): Split into... (section_title_header1, section_title_header2): ... these two strings. (HtmlFormatter::make_block_url, make_html_word, html_source_quote): Handle sections. (HtmlFormatter::section_enter): Updated to add `id' HTML attribute. 2015-11-27 Tamas Kenez <tamas.kenez@adasworks.com> [cmake] Add script to test the config module. * builds/cmake/testbuild.sh: New file. 2015-11-27 Tamas Kenez <tamas.kenez@adasworks.com> * CMakeLists.txt: Create `freetype-config.cmake' config module. 2015-11-27 Tamas Kenez <tamas.kenez@adasworks.com> * CMakeLists.txt: Set CMAKE_DEBUG_POSTFIX to `d'. 2015-11-27 Tamas Kenez <tamas.kenez@adasworks.com> [cmake] Add better control of library dependencies. * CMakeLists.txt: Add `WITH_*' variables to force/auto/omit ZLIB/BZip2/PNG/HarfBuzz. 2015-11-27 Tamas Kenez <tamas.kenez@adasworks.com> [cmake] Make `FindHarfBuzz' observe the REQUIRED option. * builds/cmake/FindHarfBuzz.cmake: Implement it. 2015-11-27 Werner Lemberg <wl@gnu.org> [cmake] Collect files specific to cmake in `builds/cmake'. * builds/FindHarfBuzz.cmake: Move to ... * builds/cmake/FindHarfBuzz.cmake: ... this place. * CMakeLists.txt (CMAKE_MODULE_PATH): Updated. 2015-11-27 Alexander Bock <alexander.j.bock@nasa.gov> CMakeLists.txt: Honour new command line flag `FREETYPE_NO_DIST'. 2015-11-26 Werner Lemberg <wl@gnu.org> [docmaker] Allow `foo[bar]' as identifier. We need this to handle equally named properties in different modules. * src/tools/docmaker/content.py (re_identifier), src/tools/docmaker/sources.py (re_crossref): Allow `foo[bar]'. * src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_word, HtmlFormatter::index_exit, HtmlFormatter::section_enter, HtmlFormatter::block_enter): Handle `foo[bar]'. 2015-11-25 Werner Lemberg <wl@gnu.org> * src/bdf/bdflib.c (bdf_load_font): Fix small memory leak (#46480). (_bdf_parse_glyphs): Always reset `p->glyph_name' after moving its contents. 2015-11-21 Werner Lemberg <wl@gnu.org> * include/freetype/internal/ftcalc.h: Don't use `register' keyword. This fixes compiler warnings. Reported by Behdad. 2015-11-20 Werner Lemberg <wl@gnu.org> Add `FT_LCD_FILTER_LEGACY1' enum value. This does the same as `FT_LCD_FILTER_LEGACY'. See https://bugs.freedesktop.org/show_bug.cgi?id=92981 for the reasoning. * include/freetype/ftlcdfil.h (FT_LcdFilter): New value `FT_LCD_FILTER_LEGACY1'. * src/base/ftlcdfil.c (FT_Library_SetLcdFilter): Use it. 2015-11-15 Werner Lemberg <wl@gnu.org> * src/autofit/afhints.c (af_get_segment_index): Fix it. The old code was too simple, returning invalid values in most cases where a segment crosses the contour start. 2015-11-15 Werner Lemberg <wl@gnu.org> * src/bdf/bdflib.c (bdf_load_font): Fix small memory leak (#46439). 2015-11-11 Werner Lemberg <wl@gnu.org> [cff, autofit] Switch off stem darkening by default. * src/autofit/afmodule.c (af_autofitter_init), src/cff/cffobjs.c (cff_driver_init): Do it. 2015-11-10 Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> Allow native CFF hinter in FT_RENDER_MODE_LIGHT. Both the native CFF hinter and the auto-hinter now have a very similar rendering style. * include/freetype/freetype.h: Mention that FT_LOAD_TARGET_LIGHT no longer implies FT_LOAD_FORCE_AUTOHINT. * include/freetype/ftmodapi.h (FT_MODULE_DRIVER_HINTS_LIGHTLY): New macro. * include/freetype/internal/ftobjs.h (FT_DRIVER_HINTS_LIGHTLY): New macro. * src/cff/cffdrivr.c (cff_driver_class): Use it. * src/base/ftobjs.c (FT_Load_Glyph): Update auto-hinter selection logic. 2015-11-09 Werner Lemberg <wl@gnu.org> * src/cid/cidload.c (cid_face_open): Fix GDBytes guard (#46408). 2015-11-09 Werner Lemberg <wl@gnu.org> [truetype] Remove integer to pointer conversion compiler warning. Problem reported by Alexei. * src/truetype/ttgload.c (load_truetype_glyph): Use a solution found in the glib library to fix the issue. 2015-11-08 Behdad Esfahbod <behdad@behdad.org> [sfnt] Accept version 3 of `EBLC' and `CBLC' tables also. * src/sfnt/ttsbit.c (tt_face_load_sbit): Implement it. 2015-11-08 Philipp Knechtges <philipp-dev@knechtges.com> [autofit] Don't distort (latin) glyphs too much (#46195). * src/autofit/aflatin.h (AF_LatinBlueRec): Add `ascender' and `descender' fields. * src/autofit/aflatin.c (af_latin_metrics_init_blues): Collect ascender and descender data for blue zones. (af_latin_metrics_scale_dim): Reject vertical scaling values that change the result by more than two pixels. 2015-11-05 Werner Lemberg <wl@gnu.org> [sfnt] Ignore embedded bitmaps with zero size (#46379). * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bit_aligned): Implement it. 2015-11-04 Werner Lemberg <wl@gnu.org> [truetype] Catch infinite recursion in subglyphs (#46372). * include/freetype/internal/tttypes.h (TT_LoaderRec): New field `composites'. * src/truetype/ttgload.c: Include FT_LIST_H. (load_truetype_glyph): Add composite subglyph index to a list; abort if index is already in list. (tt_loader_init): Updated. (tt_loader_done): New function. (TT_Load_Glyph): Call `tt_loader_done'. 2015-11-04 Werner Lemberg <wl@gnu.org> [truetype] Better tracing of composite glyphs. * src/truetype/ttgload.c (TT_Load_Composite_Glyph, load_truetype_glyph): Implement it. 2015-11-03 Werner Lemberg <wl@gnu.org> [sfnt] Protect against zero-size bitmaps (#46345). * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Check `glyph_size'. 2015-11-02 Nikolaus Waxweiler <madigens@gmail.com> * src/autofit/afloader.c (af_loader_load_g): Implement emboldening. 2015-11-02 Nikolaus Waxweiler <madigens@gmail.com> [autofit] Implement darkening computation function. This is a crude adaption of the original `cf2_computeDarkening' function. * src/autofit/afloader.c (af_intToFixed, af_fixedToInt, af_floatToFixed): New macros, taken from `cf2fixed.h'. (af_loader_compute_darkening): New function. * src/autofit/afloader.h: Updated. 2015-11-02 Nikolaus Waxweiler <madigens@gmail.com> [autofit] Add functions to get standard widths for writing systems. We need the computed standard horizontal and vertical widths for the emboldening calculation. This method provides a convenient way to extract it from writing-system-specific metrics structures, which all script definitions must implement. * src/autofit/aftypes.h (AF_WritingSystem_GetStdWidthsFunc): New function type. (AF_WritingSystemClassRec): New member `style_metrics_getstdw'. (AF_DEFINE_WRITING_SYSTEM_CLASS): Updated. * src/autofit/afcjk.c (af_cjk_get_standard_width): New function. (af_cjk_writing_system_class): Updated. * src/autofit/afdummy.c (af_dummy_writing_system_class): Updated. * src/autofit/afindic.c (af_cjk_get_standard_width): New function. (af_indic_writing_system_class): Updated. * src/autofit/aflatin.c (af_latin_get_standard_width): New function. (af_indic_writing_system_class): Updated. * src/autofit/aflatin.c (af_latin_get_standard_width): New function. (af_indic_writing_system_class): Updated. 2015-11-02 Nikolaus Waxweiler <madigens@gmail.com> [autofit] Extend `AF_FaceGlobalsRec' to hold emboldening data. * src/autofit/afglobal.h (AF_FaceGlobalsRec): Add fields. * src/autofit/afglobal.c (af_face_globals_new): Initialize new fields. (af_face_globals_free): Reset new fields. 2015-11-02 Nikolaus Waxweiler <madigens@gmail.com> [autofit] Add stem-darkening properties. Actual code follows in a later commit. * include/freetype/ftautoh.h: Document `no-stem-darkening' and `darkening-parameters'. * src/autofit/afmodule.h: New fields `no_stem_darkening' and `darken_params'. * src/autofit/afmodule.c (af_property_set, af_property_get): Handle them. (af_autofitter_init): Initialize them. 2015-11-02 Ben Wagner <bungeman@gmail.com> [ftfuzzer] Add support for multiple files (patch #8779). Currently, libFuzzer only supports mutation of a single file. We circumvent this problem by using an uncompressed tar archive as multiple-file input for the fuzzer. This patch enables tests of `FT_Attach_Stream' and AFM/PFM parsing; a constructed tarball should contain a font file as the first element, and files to be attached as further elements. * src/tools/ftfuzzer/ftfuzzer.cc: Include libarchive headers. (archive_read_entry_data, parse_data): New functions. (LLVMFuzzerTestOneInput): Updated. * src/tools/ftfuzzer/ftmutator.cc: New file, providing a custom mutator for libFuzzer that can mutate tarballs in a sensible way. 2015-10-31 Werner Lemberg <wl@gnu.org> [sfnt] Fix cmap 14 validation (#46346). * src/sfnt/ttcmap.c (tt_cmap14_validate): Check limit before accessing `numRanges' and `numMappings'. Fix size check for non-default UVS table. 2015-10-31 Werner Lemberg <wl@gnu.org> [sfnt] Handle infinite recursion in bitmap strikes (#46344). * src/sfnt/ttsbit.c (TT_SBitDecoder_LoadFunc, tt_sbit_decoder_load_bitmap, tt_sbit_decoder_load_byte_aligned, tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_png): Add argument for recursion depth. (tt_sbit_decoder_load_compound): Add argument for recursion depth. Increase recursion counter for recursive call. (tt_sbit_decoder_load_image): Add argument for recursion depth. Check recurse depth. (tt_face_load_sbit_image): Updated. 2015-10-29 Werner Lemberg <wl@gnu.org> * src/autofit/afhints.c (af_glyph_hints_dump_points): Minor. 2015-10-29 Werner Lemberg <wl@gnu.org> * CMakeLists.txt: Remove code to set MSVC's /FD compiler switch. Problem reported by David Capello <davidcapello@gmail.com>; see https://lists.nongnu.org/archive/html/freetype-devel/2015-10/msg00108.html for details. 2015-10-27 Werner Lemberg <wl@gnu.org> [pfr] Add some safety guards (#46302). * src/pfr/pfrload.h (PFR_CHECK): Rename to... (PFR_CHECK_SIZE): ... this. (PFR_SIZE): [!PFR_CONFIG_NO_CHECKS]: Define to PFR_CHECK_SIZE. * src/pfr/pfrload.c (pfr_log_font_count): Check `count'. (pfr_extra_item_load_kerning_pairs): Remove tracing message. (pfr_phy_font_load): Use PFR_CHECK_SIZE where appropriate. Allocate `chars' after doing a size checks. * src/pfr/pfrsbit.c (pfr_load_bitmap_bits): Move test for invalid bitmap format to... (pfr_slot_load_bitmap): ... this function. Check bitmap size. 2015-10-26 Werner Lemberg <wl@gnu.org> [truetype] Fix sanitizing logic for `loca' (#46223). * src/truetype/ttpload.c (tt_face_load_loca): A thinko caused an incorrect adjustment of the number of glyphs, most often using far too large values. 2015-10-25 Werner Lemberg <wl@gnu.org> [autofit] Improve tracing. * src/autofit/afhints.c (af_print_idx, af_get_segment_index, af_get_edge_index): New functions. (af_glyph_hints_dump_points): Remove unnecessary `|', `[', and `]'. Add segment and edge index for each point. Slightly change printing order of some elements. Don't print `-1' but `--' for missing elements. (af_glyph_hints_dump_segments, af_glyph_hints_dump_edges): Remove unnecessary `|', `[', and `]'. Don't print `-1' but `--' for missing elements. 2015-10-24 Werner Lemberg <wl@gnu.org> [sfnt] Sanitize bitmap strike glyph height. Problem reported by Nikolay Sivov <bunglehead@gmail.com>. * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Avoid zero value for `metrics->height' by applying some heuristics. 2015-10-22 Werner Lemberg <wl@gnu.org> [sfnt, type42] Fix clang compiler warnings. * src/sfnt/sfobjs.c (sfnt_init_face): Initialize `offset'. * src/type42/t42parse.c (t42_parse_sfnts): Use proper cast. 2015-10-22 Dave Arnold <darnold@adobe.com> Werner Lemberg <wl@gnu.org> [cff] Avoid overflow/module arithmetic. This modifies the addition of subroutine number to subroutine bias from unsigned to signed, but does not change any results. * src/cff/cf2ft.c (cf2_initGlobalRegionBuffer, cf2_initLocalRegionBuffer): Change variable names from (unsigned) `idx' to (signed) `subrNum', since it is not an index until after the bias is added. * src/cff/cf2ft.h: Updated. * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdCALLSUBR>: Updated similarly. 2015-10-22 Werner Lemberg <wl@gnu.org> [cid] Better check of `SubrCount' dictionary entry (#46272). * src/cid/cidload.c (cid_face_open): Add more sanity tests for `fd_bytes', `gd_bytes', `sd_bytes', and `num_subrs'. 2015-10-21 Werner Lemberg <wl@gnu.org> [base] Pacify compiler (#46266). * src/base/ftoutln.c (FT_Outline_EmboldenXY): Initialize `in' and `anchor'. 2015-10-21 Werner Lemberg <wl@gnu.org> [type42] Fix heap buffer overflow (#46269). * src/type42/t42parse.c (t42_parse_sfnts): Fix off-by-one error in bounds checking. 2015-10-21 Dave Arnold <darnold@adobe.com> [cff] Fix limit in assert for max hints. * src/cff/cf2interp.c (cf2_hintmask_setAll): Allow mask equal to the limit (96 bits). 2015-10-21 Dave Arnold <darnold@adobe.com> [cff] Remove an assert (#46107). * src/cff/cf2hints.c (cf2_hintmap_insertHint): Ignore paired edges in wrong order. 2015-10-21 Werner Lemberg <wl@gnu.org> [sfnt] Avoid unnecessarily large allocation for WOFFs (#46257). * src/sfnt/sfobjs.c (woff_open_font): Use WOFF's `totalSfntSize' only after thorough checks. Add tracing messages. 2015-10-21 Werner Lemberg <wl@gnu.org> [type42] Better check invalid `sfnts' array data (#46255). * src/type42/t42parse.c (t42_parse_sfnts): Table lengths must be checked individually against available data size. 2015-10-20 Werner Lemberg <wl@gnu.org> [cid] Add a bunch of safety checks. * src/cid/cidload.c (parse_fd_array): Check `num_dicts' against stream size. (cid_read_subrs): Check largest offset against stream size. (cid_parse_dict): Move safety check to ... (cid_face_open): ... this function. Also test length of binary data and values of `SDBytes', `SubrMapOffset', `SubrCount', `CIDMapOffset', and `CIDCount'. 2015-10-20 Werner Lemberg <wl@gnu.org> [cid] Avoid segfault with malformed input (#46250). * src/cid/cidload.c (cid_read_subrs): Return a proper error code for unsorted offsets. 2015-10-20 StudioEtrange <nomorgan@gmail.com> * CMakeLists.txt: Enable shared library builds on MinGW (#46233). 2015-10-20 Werner Lemberg <wl@gnu.org> * src/type1/t1afm.c (T1_Read_Metrics): Fix memory leak (#46229). 2015-10-19 Ben Wagner <bungeman@gmail.com> [cid] Better handle invalid glyph stream offsets (#46221). * src/cid/cidgload.c (cid_load_glyph): Check minimum size of glyph length. 2015-10-18 Werner Lemberg <wl@gnu.org> [psaux] Fix tracing of negative numbers. Due to incorrect casting negative numbers were shown as very large (positive) integers on 64bit systems. * src/psaux/t1decode.c (t1_decoder_parse_charstrings) <op_none>: Use division instead of shift. 2015-10-18 Werner Lemberg <wl@gnu.org> [truetype] Improve TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES (#46223). * devel/ftoption.h, include/freetype/config/ftoption.h: Surround it with #ifndef ... #endif, as suggested in the tracker issue. 2015-10-18 Werner Lemberg <wl@gnu.org> [truetype] Better protection against malformed `fpgm' (#46223). * src/truetype/ttobjs.c (tt_size_init_bytecode): Don't execute a malformed `fpgm' table more than once. 2015-10-17 Werner Lemberg <wl@gnu.org> * src/cid/cidgload.c (cid_load_glyph): Fix memory leak. Reported by Kostya Serebryany <kcc@google.com>. 2015-10-17 Werner Lemberg <wl@gnu.org> [bdf] Prevent memory leak (#46217). * src/bdf/bdflib.c (_bdf_parse_glyphs) <STARTCHAR>: Check _BDF_GLYPH_BITS. 2015-10-17 Werner Lemberg <wl@gnu.org> [bdf] Use stream size to adjust number of glyphs. * src/bdf/bdflib.c (ACMSG17): New message macro. (_bdf_parse_t): Add member `size'. (bdf_load_font): Set `size'. (_bdf_parse_glyphs): Adjust `cnt' if necessary. 2015-10-17 Werner Lemberg <wl@gnu.org> * src/cid/cidload.c (cid_parse_dict): Check `[FG]DBytes' size. 2015-10-17 Werner Lemberg <wl@gnu.org> * src/cid/cidgload.c (cid_glyph_load): Check file offsets (#46222). 2015-10-17 Werner Lemberg <wl@gnu.org> [psaux] Fix heap buffer overflow (#46221). * src/psaux/t1decode.c (t1_decoder_parse_charstring) <operator 12>: Fix limit check. 2015-10-17 Werner Lemberg <wl@gnu.org> * src/cid/cidload.c (cid_parse_dict): Handle invalid input (#46220). 2015-10-15 Kostya Serebryany <kcc@google.com> [ftfuzzer] Add README. * src/tools/ftfuzzer/README: New file. 2015-10-15 Ben Wagner <bungeman@gmail.com> [bdf] Fix memory leak (#46213). * src/bdf/bdflib.c (bdf_load_font): Always go to label `Fail' in case of error. 2015-10-15 Werner Lemberg <wl@gnu.org> [truetype] Add TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES (#46208). * devel/ftoption.h, include/freetype/config/ftoption.h (TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES): New configuration macro. * src/truetype/ttinterp.c (MAX_RUNNABLE_OPCODES): Removed. (TT_RunIns): Updated. 2015-10-15 Werner Lemberg <wl@gnu.org> * src/truetype/ttinterp.c (TT_RunIns): Fix bytecode stack tracing. The used indices were off by 1. 2015-10-15 Ben Wagner <bungeman@gmail.com> Werner Lemberg <wl@gnu.org> * src/tools/ftfuzzer/ftfuzzer.cc: Handle fixed sizes (#46211). 2015-10-15 Werner Lemberg <wl@gnu.org> [base] Compute MD5 checksums only if explicitly requested. This improves profiling accuracy. * src/base/ftobjs.c (FT_Render_Glyph_Internal): Implement it. 2015-10-14 Werner Lemberg <wl@gnu.org> [base] Use `FT_' namespace for MD5 functions (#42366). * src/base/ftobjs.c (MD5_*): Define as `FT_MD5_*'. Undefine HAVE_OPENSSL. 2015-10-13 Werner Lemberg <wl@gnu.org> [type1] Correctly handle missing MM axis names (#46202). * src/type1/t1load.c (T1_Get_MM_Var): Implement it. 2015-10-13 Werner Lemberg <wl@gnu.org> [pcf] Quickly exit if font index < 0. Similar to other font formats, this commit makes the parser no longer check the whole PCF file but only the header and the TOC if we just want to get the number of available faces (and a proper recognition of the font format). * src/pcf/pcfdrivr.c (PCF_Face_Init): Updated. Exit quickly if face_index < 0. * src/pcfread.c (pcf_load_font): Add `face_index' argument. Exit quickly if face_index < 0. * src/pcf/pcf.h: Updated. 2015-10-13 Werner Lemberg <wl@gnu.org> [ftfuzzer] Handle TTCs and MM/GX variations. This patch also contains various other improvements. * src/tools/ftfuzzer/ftfuzzer.cc: Add preprocessor guard to reject pre-C++11 compilers. (FT_Global): New class. Use it to provide a global constructor and destructor for the `FT_Library' object. (setIntermediateAxis): New function to select an (arbitrary) instance. (LLVMFuzzerTestOneInput): Loop over all faces and named instances. Also call `FT_Set_Char_Size'. 2015-10-13 Werner Lemberg <wl@gnu.org> [truetype] Refine some GX sanity tests. Use the `gvar' table size instead of the remaining bytes in the stream. * src/truetype/ttgxvar.h (GX_BlendRec): New field `gvar_size'. * src/truetype/ttgxvar.c (ft_var_load_gvar): Set `gvar_size'. (ft_var_readpackedpoints, ft_var_readpackeddeltas: New argument `size'. (tt_face_vary_cvt, TT_Vary_Apply_Glyph_Deltas): Updated. 2015-10-13 Werner Lemberg <wl@gnu.org> [truetype] Another GX sanity test. * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Check `tupleCount'. Add tracing message. 2015-10-13 Werner Lemberg <wl@gnu.org> [truetype] Fix memory leak for broken GX fonts (#46188). * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix scope of deallocation. 2015-10-13 Werner Lemberg <wl@gnu.org> [truetype] Fix commit from 2015-10-10. * src/truetype/ttgxvar.c (ft_var_load_gvar): Add missing error handling body to condition. 2015-10-12 Werner Lemberg <wl@gnu.org> [unix] Make MKDIR_P actually work. * builds/unix/configure.raw: Fix underquoting of `INSTALL' and `MKDIR_P'. Problem reported by Dan Liddell <lddll@yahoo.com>. 2015-10-11 Werner Lemberg <wl@gnu.org> [sfnt] Improve extraction of number of named instances. * src/sfnt/sfobjs.c (sfnt_init_face) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Check number of instances against `fvar' table size. 2015-10-10 Alexei Podtelezhnikov <apodtele@gmail.com> * src/base/ftoutln.c (FT_Outline_Get_Orientation): Fix overflow (#46149). 2015-10-10 Werner Lemberg <wl@gnu.org> [sfnt] Fix infinite loops with broken cmaps (#46167). * src/sfnt/ttcmap.c (tt_cmap8_char_next, tt_cmap12_next): Take care of border conditions (i.e., if the loops exit naturally). 2015-10-10 Werner Lemberg <wl@gnu.org> [truetype] More sanity tests for GX handling. These tests should mainly help avoid unnecessarily large memory allocations in case of malformed fonts. * src/truetype/ttgxvar.c (ft_var_readpackedpoints, ft_var_readpackeddeltas): Check number of points against stream size. (ft_var_load_avar): Check `pairCount' against table length. (ft_var_load_gvar): Check `globalCoordCount' and `glyphCount' against table length. (tt_face_vary_cvt): Check `tupleCount' and `offsetToData'. Fix trace. (TT_Vary_Apply_Glyph_Deltas): Fix trace. Free `sharedpoints' to avoid memory leak. 2015-10-10 Werner Lemberg <wl@gnu.org> [truetype] Better protection against malformed GX data (#46166). * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Correctly handle empty `localpoints' array. 2015-10-10 Werner Lemberg <wl@gnu.org> * src/pcf/pcfread.c (pcf_read_TOC): Check stream size (#46162). 2015-10-09 Werner Lemberg <wl@gnu.org> * src/gzip/ftgzip.c (FT_Stream_OpenGzip): Use real stream size. 2015-10-08 Werner Lemberg <wl@gnu.org> [pcf] Protect against invalid number of TOC entries (#46159). * src/pcf/pcfread.c (pcf_read_TOC): Check number of TOC entries against size of data stream. 2015-10-08 Werner Lemberg <wl@gnu.org> [type42] Protect against invalid number of glyphs (#46159). * src/type42/t42parse.c (t42_parse_charstrings): Check number of `CharStrings' dictionary entries against size of data stream. 2015-10-08 Werner Lemberg <wl@gnu.org> [sfnt] Fix some signed overflows (#46149). * src/sfnt/ttsbit.c (tt_face_load_strike_metrics) <TT_SBIT_TABLE_TYPE_SBIX>: Use `FT_MulDiv'. 2015-10-08 Werner Lemberg <wl@gnu.org> [type1] Protect against invalid number of subroutines (#46150). * src/type1/t1load.c (parse_subrs): Check number of `Subrs' dictionary entries against size of data stream. 2015-10-07 Kostya Serebryany <kcc@google.com> [ftfuzzer] Add support for LLVM's LibFuzzer. * src/tools/ftfuzzer/ftfuzzer.cc, src/tools/runinput.cc: New files. 2015-10-06 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Faster alternative line renderer. This implementation renders the entire line segment at once without subdividing it into scanlines. The main speed improvement comes from reducing the number of divisions to just two per line segment, which is a bare minimum to calculate cell coverage in a smooth rasterizer. Notably, the progression from cell to cell does not itself require any divisions at all. The speed improvement is more noticeable at larger sizes. * src/smooth/ftgrays.c (gray_render_line): New implementation. 2015-10-06 Werner Lemberg <wl@gnu.org> [cff] Return correct PS names from pure CFF (#46130). * src/cff/cffdrivr.c (cff_get_ps_name): Use SFNT service only for SFNT. 2015-10-04 Werner Lemberg <wl@gnu.org> [base] Replace left shifts with multiplication (#46118). * src/base/ftglyph.c (ft_bitmap_glyph_bbox, FT_Get_Glyph): Do it. 2015-10-04 Werner Lemberg <wl@gnu.org> * Version 2.6.1 released. ========================= Tag sources with `VER-2-6-1'. * docs/VERSION.DLL: Update documentation and bump version number to 2.6.1. * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj, builds/windows/vc2005/index.html, builds/windows/vc2008/freetype.vcproj, builds/windows/vc2008/index.html, builds/windows/vc2010/freetype.vcxproj, builds/windows/vc2010/index.html, builds/windows/visualc/freetype.dsp, builds/windows/visualc/freetype.vcproj, builds/windows/visualc/index.html, builds/windows/visualce/freetype.dsp, builds/windows/visualce/freetype.vcproj, builds/windows/visualce/index.html, builds/wince/vc2005-ce/freetype.vcproj, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/freetype.vcproj, builds/wince/vc2008-ce/index.html: s/2.6/2.6.1/, s/26/261/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1. * builds/unix/configure.raw (version_info): Set to 18:1:12. * CMakeLists.txt (VERSION_PATCH): Set to 1. * src/autofit/afmodule.c [AF_DEBUG_AUTOFIT]: Ensure C linking for dumping functions. 2015-10-04 Werner Lemberg <wl@gnu.org> [bzip2, gzip] Avoid access of uninitialized memory (#46109). * src/bzip2/ftbzip2.c (ft_bzip2_file_fill_input), src/gzip/ftgzip.c (ft_gzip_file_fill_input): In case of an error, adjust the limit to avoid copying uninitialized memory. 2015-10-03 Werner Lemberg <wl@gnu.org> [bzip2, gzip] Avoid access of uninitialized memory (#46109). * src/bzip2/ftbzip2.c (ft_bzip2_file_fill_output), src/gzip/ftgzip.c (ft_gzip_file_fill_output): In case of an error, adjust the limit to avoid copying uninitialized memory. 2015-10-01 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Clean up worker. * src/smooth/ftgrays.c (gray_TWorker): Remove never used fields. 2015-10-01 Werner Lemberg <wl@gnu.org> [sfnt] Make `tt_cmap4_char_map_linear' more robust (#46078). * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Take care of border conditions (i.e., if the loop exits naturally). 2015-10-01 Werner Lemberg <wl@gnu.org> * src/autofit/afranges.c (af_deva_nonbase_uniranges): Fix ranges. They should be a subset of `af_deva_uniranges'. 2015-10-01 Werner Lemberg <wl@gnu.org> [sfnt] Make `tt_cmap4_char_map_linear' faster (#46078). * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Use inner loop to reject too large glyph indices. 2015-09-30 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Clean up worker. * src/smooth/ftgrays.c (gray_TWorker): Remove lightly used `last_ey'. (gray_start_cell, gray_render_line): Update. 2015-09-30 Werner Lemberg <wl@gnu.org> [autofit] Replace `no-base' with `non-base'. * src/autofit/*: Do it. 2015-09-30 Werner Lemberg <wl@gnu.org> [sfnt] Rewrite `tt_cmap4_char_map_linear' (#46078). * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Add code to better skip invalid segments. If searching the next character, provide a more efficient logic to speed up the code. 2015-09-30 Werner Lemberg <wl@gnu.org> [truetype] Adjust number of glyphs for malformed `loca' tables. * src/truetype/ttpload.c (tt_face_load_loca): Implement it. 2015-09-29 Werner Lemberg <wl@gnu.org> [pshinter] Avoid harmless overflow (#45984). * src/pshinter/pshglob.c (psh_blues_set_zones): Fix it. 2015-09-28 Werner Lemberg <wl@gnu.org> [autofit] Add support for Lao script. Thanks to Danh Hong <danhhong@gmail.com> for guidance with blue zone characters! * src/autofit/afblue.dat: Add blue zone data for Lao. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Lao standard characters. * src/autofit/afranges.c: Add Lao data. * src/autofit/afstyles.h: Add Lao data. 2015-09-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [base] Fix a leak by broken sfnt-PS or resource fork (#46028). open_face_from_buffer() frees passed buffer if valid font is not found. But if copying to the buffer is failed, the allocated buffer should be freed within the caller. * src/base/ftobjs.c (open_face_PS_from_sfnt_stream): Free the buffer `sfnt_ps' if an error caused before calling open_face_from_buffer(). (Mac_Read_sfnt_Resource): Free the buffer `sfnt_data' if an error caused before calling open_face_from_buffer(); 2015-09-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [mac] Fix buffer size calculation for LWFN font. * src/base/ftmac.c (read_lwfn): Cast post_size to FT_ULong to prevent confused copy by too large chunk size. 2015-09-26 Alexei Podtelezhnikov <apodtele@gmail.com> * src/smooth/ftgrays.c (PIXEL_MASK): Remove unused macro. 2015-09-26 Werner Lemberg <wl@gnu.org> [autofit] Minor tracing improvement. * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Don't emit blue zones header line if there are no blue zones. 2015-09-26 Werner Lemberg <wl@gnu.org> [bzip2, gzip, lzw] Harmonize function signatures with prototype. Suggested by Hin-Tak Leung. * src/bzip2/ftbzip2.c (ft_bzip2_stream_io), src/gzip/ftgzip.c (ft_gzip_stream_io), src/lzw/ftlzw.c (ft_lzw_stream_io): Do it. 2015-09-26 Hin-Tak Leung <htl10@users.sourceforge.net> Add new FT_LOAD_COMPUTE_METRICS load flag. * include/freetype/freetype.h (FT_LOAD_COMPUTE_METRICS): New macro. * src/truetype/ttgload.c (compute_glyph_metrics): Usage. 2015-09-26 Werner Lemberg <wl@gnu.org> * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Add cast. 2015-09-25 Werner Lemberg <wl@gnu.org> [type1] Protect against invalid number of glyphs (#46029). * src/type1/t1load.c (parse_charstrings): Check number of `CharStrings' dictionary entries against size of data stream. 2015-09-23 Werner Lemberg <wl@gnu.org> [sfnt] Better checks for invalid cmaps (2/2) (#46019). While the current code in `FT_Get_Next_Char' correctly rejects out-of-bounds glyph indices, it can be extremely slow for malformed cmaps that use 32bit values. This commit tries to improve that. * src/sfnt/ttcmap.c (tt_cmap8_char_next, tt_cmap12_next, tt_cmap12_char_map_binary, tt_cmap13_next, tt_cmap13_char_map_binary): Reject glyph indices larger than or equal to the number of glyphs. 2015-09-23 Werner Lemberg <wl@gnu.org> [base, sfnt] Better checks for invalid cmaps (1/2). * src/base/ftobjs.c (FT_Get_Char_Index): Don't return out-of-bounds glyph indices. (FT_Get_First_Char): Updated. * src/sfnt/ttcmap.c (tt_cmap6_char_next): Don't return character codes greater than 0xFFFF. (tt_cmap8_char_index): Avoid integer overflow in computation of glyph index. (tt_cmap8_char_next): Avoid integer overflows in computation of both next character code and glyph index. (tt_cmap10_char_index): Fix unsigned integer logic. (tt_cmap10_char_next): Avoid integer overflow in computation of next character code. (tt_cmap12_next): Avoid integer overflows in computation of both next character code and glyph index. (tt_cmap12_char_map_binary): Ditto. (tt_cmap12_char_next): Simplify. (tt_cmap13_char_map_binary): Avoid integer overflow in computation of next character code. (tt_cmap13_char_next): Simplify. 2015-09-21 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [base] Check too long POST and sfnt resource (#45919). * src/base/ftbase.h (FT_MAC_RFORK_MAX_LEN): Maximum length of the resource fork for Mac OS. Resource forks larger than 16 MB can be written but can't be handled correctly, at least in Carbon routine. See https://support.microsoft.com/en-us/kb/130437. * src/base/ftobjs.c (Mac_Read_POST_Resource): No need to use `0x' prefix for `%p' formatter. * src/base/ftbase.c (Mac_Read_POST_Resource): Check the fragment and total size of the concatenated POST resource before buffer allocation. (Mac_Read_sfnt_Resource): Check the declared size of sfnt resource before buffer allocation. * src/base/ftmac.c (read_lwfn, FT_New_Face_From_SFNT): Check the total resource size before buffer allocation. 2015-09-19 Werner Lemberg <wl@gnu.org> [sfnt] Improve handling of invalid SFNT table entries (#45987). This patch fixes weaknesses in function `tt_face_load_font_dir'. - It incorrectly assumed that valid tables are always at the beginning. As a consequence, some valid tables after invalid entries (which are ignored) were never seen. - Duplicate table entries (this is, having the same tag) were not rejected. - The number of valid tables was sometimes too large, leading to access of invalid tables. * src/sfnt/ttload.c (check_table_dir): Add argument to return number of valid tables. Add another tracing message. (tt_face_load_font_dir): Only allocate table array for valid entries as returned by `check_table_dir'. Reject duplicate tables and adjust number of valid tables accordingly. 2015-09-19 Werner Lemberg <wl@gnu.org> [pcf] Improve `FT_ABS' fix from 2015-09-17 (#45999). * src/pcf/pcfread.c (pcf_load_font): Do first the cast to FT_Short, then take the absolute value. Also apply FT_ABS to `height'. 2015-09-17 Werner Lemberg <wl@gnu.org> [type42] Fix memory leak (#45989). * src/type42/t42parse.c (t42_parse_charstrings): Allow only a single `CharStrings' array. 2015-09-17 Werner Lemberg <wl@gnu.org> [psaux] Fix memory leak (#45986). * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_MM_BBOX>: Free `temp' in case of error. 2015-09-17 Werner Lemberg <wl@gnu.org> [psaux] Improve tracing message. * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_MM_BBOX>: Handle plural correctly. 2015-09-17 Werner Lemberg <wl@gnu.org> [pcf] Fix integer overflows (#45985). * src/pcf/pcfread.c (pcf_load_font): Use FT_MulDiv. 2015-09-17 Werner Lemberg <wl@gnu.org> [pcf] Use FT_ABS for some property values (#45893). * src/pcf/pcfread.c (pcf_load_font): Take absolute values for AVERAGE_WIDTH, POINT_SIZE, PIXEL_SIZE, RESOLUTION_X, and RESOLUTION_Y. In tracing mode, add warnings. 2015-09-16 Werner Lemberg <wl@gnu.org> Minor fixes for some clang warnings. * src/base/ftoutln.c (FT_Outline_EmboldenXY): Cast, possible missing initialization. * src/truetype/ttgload.c (TT_Process_Composite_Component): Cast. 2015-09-15 Werner Lemberg <wl@gnu.org> [type1, type42] Fix memory leaks (#45966). * src/type1/t1load.c (parse_blend_axis_types): Handle multiple axis names. (parse_blend_design_map): Allow only a single design map. (parse_encoding): Handle multiple encoding vectors. * src/type42/t42parse.c (t42_parse_encoding): Handle multiple encoding vectors. 2015-09-15 Werner Lemberg <wl@gnu.org> [truetype] Fix integer type (#45965). * src/truetype/ttobjs.c (tt_synth_sfnt_checksum): Implement it. 2015-09-15 Werner Lemberg <wl@gnu.org> * src/pcf/pcfread.c (pcf_load_font): Fix integer overflow (#45964). 2015-09-15 Werner Lemberg <wl@gnu.org> [type1, type42] Check encoding array size (#45961). * src/type1/t1load.c (parse_encoding), src/type42/t42parse.c (t42_parse_encoding): Do it. 2015-09-14 Alexei Podtelezhnikov <apodtele@gmail.com> * src/base/ftcalc.c (FT_MulFix) [FT_LONG64]: Improve. 2015-09-14 Werner Lemberg <wl@gnu.org> [type1] Fix another potential buffer overflow (#45955). * src/type1/t1parse (T1_Get_Private_Dict): Assure that check for `eexec' doesn't exceed `limit'. 2015-09-13 Werner Lemberg <wl@gnu.org> Replace `mkinstalldirs' with AC_PROG_MKDIR_P. * builds/unix/mkinstalldirs: Removed, no longer needed. * builds/unix/configure.raw: Call `AC_PROG_MKDIR_P'. Update pwd call for `$INSTALL'. * builds/unix/unix-def.in (MKINSTALLDIRS): Use `@MKDIR_P@'. * autogen.sh: Updated. 2015-09-13 Werner Lemberg <wl@gnu.org> [winfonts] Check alignment shift count for resource data (#45938). * src/winfonts/winfnt.c (fnt_face_get_dll_font): Implement it. 2015-09-13 Werner Lemberg <wl@gnu.org> [type1] Fix potential buffer overflow (#45923). * src/type1/t1parse.c (T1_Get_Private_Dict): Assure `cur' doesn't point to end of file buffer. 2015-09-13 Werner Lemberg <wl@gnu.org> [gzip] Fix access of small compressed files (#45937). * src/gzip/ftgzip.c (ft_gzip_stream_close): Avoid memory leak. (ft_gzip_get_uncompressed_file): Correct byte order while reading unsigned long value. Without this change, the whole optimization of accessing small files in `FT_Stream_OpenGzip' is never executed! As a consequence, access to PCF files in general (which are normally small files) should be much improved now as originally intended. 2015-09-11 Werner Lemberg <wl@gnu.org> [psaux] Fix potential buffer overflow (#45922). * src/psaux/psobjs.c (ps_parser_skip_PS_token): If a token is enclosed in balanced expressions, ensure that the cursor position doesn't get larger than the current limit. 2015-09-11 Werner Lemberg <wl@gnu.org> [base] Avoid crash while tracing `load_mac_face'. Reported in Savannah bug #45919. * src/base/ftobjs.c (load_mac_face): Honour FT_OPEN_MEMORY while tracing. 2015-09-11 Werner Lemberg <wl@gnu.org> [type42] Fix endless loop (#45920). * src/type42/t42parse.c (t42_parse_encoding): Synchronize with type1's `parse_encoding'. 2015-09-10 Werner Lemberg <wl@gnu.org> [docmaker] Allow `-' in bold and italic markup. * src/tools/docmaker/sources.py (re_italic, re_bold): Adjust accordingly. 2015-09-09 Alexei Podtelezhnikov <apodtele@gmail.com> * src/base/ftcalc.c (FT_RoundFix): Improve. 2015-09-09 Wojciech Mamrak <wmamrak@gmail.com> * src/base/ftcalc.c (FT_CeilFix, FT_FloorFix): Normalize. This commit makes the functions behave as expected, this is, rounding towards plus or minus infinity. 2015-09-07 Alexei Podtelezhnikov <apodtele@gmail.com> * src/smooth/ftgrays.c (gray_render_line): Simplify clipping. 2015-09-04 Alexei Podtelezhnikov <apodtele@gmail.com> [raster,smooth] Microoptimizations. * src/raster/ftraster.c (Insert_Y_Turn, Finalize_Profile_Table, Bezier_Up): Use do-while loops. * src/smooth/ftgrays.c (gray_render_scanline, gray_render_line, gray_convert_glyph): Ditto. 2015-09-04 Werner Lemberg <wl@gnu.org> [autofit] Redesign code ranges (2/2). This commit adds two fallback scripts (`latb', `latp') and implements support for the no-base character ranges introduced in the previous commit. * src/autofit/aftypes.h (AF_ScriptClassRec): Add `script_uni_nobase_ranges' field. (AF_DEFINE_SCRIPT_CLASS): Updated. * src/autofit/afscript.h, src/autofit/afstyles.h: Add `latb' and `latp' fallback scripts. * src/autofit/afblue.dat: Add blue zones for Latin subscript and superscript fallback scripts. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afglobal.h (AF_NOBASE): New style flag for no-base characters. (AF_STYLE_MASK): Updated. * src/autofit/afglobal.c (SCRIPT): Updated. (af_face_globals_compute_style_coverage): Handle new style flag. * src/autofit/aflatin.c (af_latin_hints_apply): Handle new style flag. * src/autofit/afranges.h (SCRIPT): Use it to export no-base ranges. 2015-09-04 Werner Lemberg <wl@gnu.org> [autofit] Redesign code ranges (1/2). This patch introduces auxiliary code ranges that identify no-base characters; they refer to glyphs of a script that should be hinted without alignments to blue zones (mostly diacritics). It also splits off ranges for fallback scripts that handle subscript and superscript characters not covered by OpenType features. For example, this greatly helps improve the hinting of various phonetic alphabets, which contain a large amount characters that look like superscript glyphs. Finally, code ranges are updated to Unicode 8.0, and enclosed characters are removed in general since they normally look better if they stay unhinted. * src/autofit/afranges.c (af_latn_uniranges): Updated to Unicode 8.0. Split off superscript-like and subscript-like glyphs into... (af_latb_uniranges, af_latp_uniranges): ... these two new arrays. (af_xxxx_nobase_uniranges): New arrays that hold no-base characters of the corresponding character ranges. 2015-09-03 Werner Lemberg <wl@gnu.org> [autofit] Pass glyph index to hinting function. No functionality change yet. * src/autofit/aftypes.h (AF_WritingSystem_ApplyHintsFunc): Pass glyph index. * src/autofit/afcjk.c, src/autofit/afcjk.h (af_cjk_hints_apply), src/autofit/afdummy.c (af_dummy_hints_apply), src/autofit/afindic.c (af_indic_hints_apply), src/autofit/aflatin.c (af_latin_hints_apply), src/autofit/aflatin2.c (af_latin2_hints_apply), src/autofit/afloader.c (af_loader_load_g): Updated. 2015-08-30 Werner Lemberg <wl@gnu.org> [autofit] Code clean-up. * src/autofit/afglobal.h (AF_STYLE_MASK): New macro. (AF_STYLE_UNASSIGNED): Use AF_STYLE_MASK for definition. * src/autofit/afglobal.c (af_face_globals_compute_style_coverage): Updated. 2015-08-30 Werner Lemberg <wl@gnu.org> [autofit] Make glyph style array use 16bit values. * include/freetype/ftautoh.h (FT_Prop_GlyphToScriptMap): Use `FT_UShort' for `map' field. * src/autofit/afglobal.c (af_face_globals_compute_style_coverage, af_face_globals_new), src/autofit/hbshim.c, src/autofit/hbshim.h (af_get_coverage): Use FT_UShort for `glyph_styles' array. * src/autofit/afglobal.h (AF_STYLE_UNASSIGNED, AF_DIGIT): Extend to 16 bits. (AF_FaceGlobalsRec): Use `FT_UShort' for `glyph_styles' field. 2015-08-26 Werner Lemberg <wl@gnu.org> * builds/unix/configure.raw: Need harfbuzz >= 0.9.21 (#45828). 2015-08-25 Werner Lemberg <wl@gnu.org> [base] Improve kerning tracing and documentation. * src/base/ftobjs.c (FT_Get_Kerning): Emit tracing message if scaled-down kerning values differ. 2015-08-18 Werner Lemberg <wl@gnu.org> [raster] Remove last remnants of `raster5' driver. * src/raster/ftrend1.h (ft_raster5_renderer_class): Removed. * src/raster/rastpic.c, src/raster/rastpic.h (ft_raster5_renderer_class_pic_init, ft_raster5_renderer_class_pic_free): Removed. 2015-08-17 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Improve emboldener (#45596). * src/base/ftoutln.c (FT_Outline_EmboldenXY): Correct displacement of zero-length segments. 2015-08-16 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Reoptimize arithmetic. * src/base/ftcalc.c (FT_MulDiv, FT_MulFix) [!FT_LONG64]: Remove special cases that slow down the general use. 2015-08-15 pazer <ibemad@gmail.com> Fix C++ compilation (#45762). * src/base/ftstroke.c (ft_outline_glyph_class): Use FT_CALLBACK_TABLE. 2015-08-14 Alexei Podtelezhnikov <apodtele@gmail.com> [truetype] Clean up. * src/truetype/ttgload.c (TT_Process_Composite_Component): Use `FT_Outline_Transform' and `FT_Outline_Translate'. (translate_array): Dropped. 2015-08-14 Andreas Enge <andreas.enge@inria.fr> * builds/unix/detect.mk (CONFIG_SHELL): Don't handle it (#44261). 2015-08-13 Werner Lemberg <wl@gnu.org> [truetype] Introduce named instance access to GX fonts. For functions querying a face, bits 16-30 of the face index can hold the named instance index if we have a GX font. The indices start with value 1; value 0 indicates font access without GX variation data. * include/freetype/freetype.h (FT_FaceRec): Update documentation. * include/freetype/internal/sfnt.h: Ditto. * src/sfnt/sfobjs.c (sfnt_init_face) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Get number of named instances and do argument checks. (sfnt_load_face): Updated. * src/truetype/ttobjs.c (tt_face_init) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Use named instance, overwriting the style name. * src/base/ftobjs.c (open_face_from_buffer, open_face_PS_from_sfnt_stream): Updated. * src/bdf/bdfdrivr.c (BDF_Face_Init): Updated. * src/cff/cffload.c (cff_font_load): Updated. * src/cff/cffobjs.c (cff_face_init): Make function exit early for pure CFF fonts if `font_index < 0'. Updated. * src/cid/cidobjs.c (cid_face_init): Updated. * src/pcf/pcfdrivr.c (PCF_Face_Init): Updated. * src/pfr/pfrobjs.c (pfr_face_init): Updated. * src/type1/t1objs.c (T1_Face_Init): Updated. * src/type42/t42objs.c (T42_Face_Init): Updated. * src/winfonts/winfnt.c (fnt_face_get_dll_font, FNT_Face_Init): Updated. * docs/CHANGES: Updated. 2015-08-12 Alexei Podtelezhnikov <apodtele@gmail.com> [type1,cff,cid] Streamline font matrix application. * src/type1/t1gload.c (T1_Load_Glyph): Directly modify advances only if font matrix is not trivial. * src/cff/cffgload.c (cff_slot_load): Ditto. * src/cid/cidgload.c (cid_slot_load_glyph): Ditto for advances and the entire outline. 2015-08-11 Werner Lemberg <wl@gnu.org> [builds/unix] Minor. * builds/unix/configure.raw: s/lib{priv,staticconf}/libs{priv,staticconf}/ for orthogonality with similarly named uppercase variables. 2015-08-10 Alexei Podtelezhnikov <apodtele@gmail.com> [type1,cid,type42] Minor improvements. * src/type1/t1load.c (t1_parse_font_matrix): Scale units per EM only when necessary. Refresh comments. * src/cid/cidload.c (cid_parse_font_matrix): Ditto. * src/type42/t42parse.c (t42_parse_font_matrix): Refresh comments. 2015-08-08 Werner Lemberg <wl@gnu.org> [type42] Fix glyph access. This is a severe bug: We've missed one level of indirection, as described in the Type 42 specification. As a result, ftview sometimes showed incorrect glyphs for given glyph names, and even displayed `error 0x0006' (invalid argument!) in case the number of glyph indices differed between the Type 42 font and the embedded TTF. Apparently, noone ever noticed it; this shows how much Type 42 fonts are in use... * src/type42/t42objs.c (T42_GlyphSlot_Load): Map Type 42 glyph index to embedded TTF's glyph index. 2015-08-08 Werner Lemberg <wl@gnu.org> [type42] Minor clean-up. * src/type42/t42parse.c (t42_parse_font_matrix): Remove unused variable. 2015-08-06 Alexei Podtelezhnikov <apodtele@gmail.com> [type42] Parse FontMatrix according to specifications. * src/type42/t42parse.c (t42_parse_font_matrix): Type 42 FontMatrix does not need scaling by 1000. Units_per_EM are taken from the embedded TrueType. 2015-08-06 Werner Lemberg <wl@gnu.org> [autofit] Improve Arabic hinting. Problem reported by Titus Nemeth <tn@tntypography.eu> (by using ttfautohint). * src/autofit/afblue.dat: Add neutral blue zone for the tatweel character. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. 2015-08-05 Alexei Podtelezhnikov <apodtele@gmail.com> [truetype] Clean up types. * src/truetype/ttobjs.c (TT_Size): Move declaration from here. * include/freetype/internal/tttypes.h (TT_Size): ... to here. (TT_LoaderRec): Switch to appropriate types for `face' and `size'. * src/truetype/ttgload.c: Remove corresponding type casts. * src/truetype/ttsubpix.c: Ditto. 2015-08-05 Werner Lemberg <wl@gnu.org> [autofit] Improve recognition of flat vs. rounded segments. Lower the flatness threshold from upem/8 to upem/14, making the auto-hinter accept shorter elements. Synchronize flat/round stem selection algorithm with blue zone code. * src/autofit/aflatin.c (FLAT_THRESHOLD): New macro. (af_latin_metrics_init_blues): Use it. (af_latin_hints_compute_segments): Collect information on maximum and minimum coordinates of `on' points; use this to add a constraint for the flat/round decision similar to `af_latin_metrics_init_blues'. 2015-08-04 Werner Lemberg <wl@gnu.org> Another left-shift bug (#45681). * src/base/ftobjs.c (IsMacBinary): Only accept positive values for `dlen'. 2015-08-03 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Fix `ft_corner_orientation'. Remove casting from `FT_Long' to `FT_Int' that might change the sign of the return value and make it faster too. * src/base/ftcalc.c (ft_corner_orientation): On 32-bit systems, stay with 32-bit arithmetic when safe. Use plain math on 64-bit systems. * src/pshinter/pshalgo.c: Remove old unused code. 2015-08-03 Werner Lemberg <wl@gnu.org> * src/truetype/ttgload.c (load_truetype_glyph) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Fix crash for composite glyphs having a depth greater than 1. 2015-08-03 Werner Lemberg <wl@gnu.org> Fix typo in clang bug from 2015-07-31 (#45678). * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Fix inequality. 2015-08-02 Werner Lemberg <wl@gnu.org> * CMakeLists.txt: Improve shared library support. Based on a patch from John Cary <cary@txcorp.com>. 2015-08-02 Werner Lemberg <wl@gnu.org> * builds/unix/freetype-config.in (enable_shared): Remove. Unused. 2015-08-02 Werner Lemberg <wl@gnu.org> Fix more invalid left-shifts. * src/pfr/pfrgload.c (pfr_glyph_load_compound): Use multiplication, not left-shift. * src/truetype/ttgxvar.c (ft_var_load_avar, ft_var_load_gvar, tt_face_vary_cvt, TT_Vary_Apply_Glyph_Deltas): Use multiplication, not left-shift. 2015-07-31 Werner Lemberg <wl@gnu.org> Fix some bugs found by clang's `-fsanitize=undefined' (#45661). * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Only accept positive values from header. Check overflow. * src/base/ftoutln.c (SCALED): Correctly handle left-shift of negative values. * src/bdf/bdf.h (_bdf_glyph_modified, _bdf_set_glyph_modified, _bdf_clear_glyph_modified): Use unsigned long constant. * src/bdf/bdfdrivr.c (BDF_Size_Select, BDF_Glyph_Load): Don't left-shift values that can be negative. * src/pcf/pcfdrivr.c (PCF_Size_Select, PCF_Glyph_Load): Don't left-shift values that can be negative. * src/raster/ftraster.c (SCALED): Correctly handle left-shift of negative values. * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Don't left-shift values that can be negative. * src/truetype/ttgload.c (TT_Load_Composite_Glyph, compute_glyph_metrics, load_sbit_image): Don't left-shift values that can be negative. 2015-07-31 Werner Lemberg <wl@gnu.org> Define FT_LONG_MAX. * include/freetype/config/ftstdlib.h (FT_LONG_MAX): New macro. * src/cff/cf2arrst.c (cf2_arrstack_setNumElements): Use it. 2015-07-28 Alexei Podtelezhnikov <apodtele@gmail.com> * src/base/ftcalc.c (FT_Vector_NormLen): Clarify. 2015-07-27 Alexei Podtelezhnikov <apodtele@gmail.com> * src/base/ftcalc.c (FT_Vector_NormLen): Explicate type conversions. 2015-07-26 Matthias Clasen <matthias.clasen@gmail.com> [cff] Don't use `hmtx' table for LSB (#45520). * src/cff/cffgload.c (cff_slot_load): Use `htmx' table for advance width only. Bug introduced 2015-04-10. 2015-07-09 Werner Lemberg <wl@gnu.org> Better support of user-supplied C++ namespaces. See https://lists.nongnu.org/archive/html/freetype-devel/2015-07/msg00008.html for a rationale. * src/autofit/afpic.h, src/base/basepic.h, src/cff/cffpic.h, src/pshinter/pshpic.h, src/psnames/pspic.h, src/raster/rastpic.h, src/sfnt/sfntpic.h, src/smooth/ftspic.h, src/truetype/ttpic.h (FT_BEGIN_HEADER, FT_END_HEADER): Move macro calls to not enclose header files that contain FT_{BEGIN,END}_HEADER macros by themselves. * src/autofit/aftypes.h [FT_DEBUG_AUTOFIT]: Include FT_CONFIG_STANDARD_LIBRARY_H earlier. * src/truetype/ttpic.h: Include FT_INTERNAL_PIC_H. 2015-07-07 Werner Lemberg <wl@gnu.org> [sfnt] Make `tt_face_get_name' member of the SFNT interface. * include/freetype/internal/sfnt.h (TT_Get_Name_Func): New prototype. (SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): New member `get_name'. * src/sfnt/sfdriver.c (sfnt_interface): Updated. * src/sfnt/sfobjs.c (tt_face_get_name): Tag it with `LOCAL_DEF'. * src/sfnt/sfobjs.h: Add prototype for it. 2015-06-30 Werner Lemberg <wl@gnu.org> Fix some clang compiler warnings. * src/base/ftoutln.c (FT_Outline_EmboldenXY), src/cff/cf2intrp.c (cf2_interpT2CharString), src/truetype/ttgload.c (load_truetype_glyph), src/truetype/ttgxvar.c (tt_handle_deltas), src/truetype/ttinterp.c (Ins_INSTCTRL): Fix signedness issues. 2015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com> [truetype] Speed up bytecode interpreter. * src/truetype/ttinterp.c (Normalize): Use `FT_Vector_NormLen'. 2015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Speed up emboldening. * src/base/ftoutln.c (FT_Outline_EmboldenXY): Use `FT_Vector_NormLen'. 2015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Implement fast vector normalization. The function uses Newton's iterations instead of dividing vector components by its length, which needs a square root. This is, literally, a bit less accurate but a lot faster. * src/base/ftcalc.c (FT_Vector_NormLen): New function. 2015-06-28 Werner Lemberg <wl@gnu.org> * CMakeLists.txt: Always create `ftconfig.h'. For non-UNIX builds, the file stays unmodified. However, it's better to have the main configuration files at the same place regardless of the OS. 2015-06-28 Werner Lemberg <wl@gnu.org> * CMakeLists.txt: Improve MSVC support (#43737). 2015-06-28 Werner Lemberg <wl@gnu.org> [cmake] Check for libraries and create `ftoption.h'. * builds/FindHarfBuzz.cmake: New file, taken from https://trac.webkit.org/browser/trunk/Source/cmake/FindHarfBuzz.cmake * CMakeLists.Txt: Add path to local cmake modules. Find dependencies for zlib, bzip2, libpng, and harfbuzz. Create `ftoption.h' file. Set up include and linker stuff for libraries. 2015-06-28 Werner Lemberg <wl@gnu.org> * CMakeLists.txt: Fix creation of `ftconfig.h'. Check for UNIX header files using `check_include_file'. Set up correct header include directories. 2015-06-28 Werner Lemberg <wl@gnu.org> * CMakeLists.txt: Disallow in-source builds. 2015-06-27 Werner Lemberg <wl@gnu.org> * src/tools/docmaker/utils.py (check_output): Add missing `\n'. 2015-06-26 Werner Lemberg <wl@gnu.org> * CMakeLists.txt: Select platform-dependent `ftdebug.c'. 2015-06-25 Werner Lemberg <wl@gnu.org> * CMakeLists.txt: Use cmake functions for generating `ftconfig.h'. Additionally, do this for UNIX only. 2015-06-25 Werner Lemberg <wl@gnu.org> * CMakeLists.txt (BASE_SRCS): Use `ftbase.c' and `psnames.c'. 2015-06-25 Werner Lemberg <wl@gnu.org> Another adjustment to header locations. This change is a result of a discussion thread on freetype-devel https://lists.nongnu.org/archive/html/freetype-devel/2015-06/msg00041.html Re-introduce the `freetype2' subdirectory for all FreeType header files after installation, and rename the `freetype2' subdirectory in the git repository to `freetype'. * include/freetype2: Renamed to... * include/freetype: This. * CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS, PRIVATE_HEADERS): Updated. Update creation of `ftconfig.h'. Install generated `ftconfig.h'. * Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated. * builds/amiga/include/config/ftconfig.h, builds/freetype.mk (PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work), builds/unix/freetype2.in: Updated. * builds/unix/freetype-config.in: Updated. * builds/unix/configure.raw: Don't check for `rmdir'. * builds/unix/unix-def.in (DELDIR): Use `rm -rf', which is portable according to the autoconf info manual. * builds/unix/install.mk (install, uninstall, distclean_project_unix): Update and simplify. * builds/wince/*, builds/windows/*: Updated. * devel/ft2build.h, include/ft2build.h: Updated. * include/freetype2/config/ftheader.h, include/freetype2/internal/ftserv.h, include/freetype2/internal/internal.h: Update all header file macros. * src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated. * docs/*: Updated. 2015-06-24 Alexei Podtelezhnikov <apodtele@gmail.com> * src/bdf/bdflib.c (_bdf_parse_start): Disallow 0 bpp. 2015-06-24 Alexei Podtelezhnikov <apodtele@gmail.com> * src/bdf/bdflib.c (_bdf_parse_start): Simplify bpp parsing. 2015-06-23 Werner Lemberg <wl@gnu.org> s/TYPEOF/FT_TYPEOF/ (#45376). * builds/unix/ftconfig.in, builds/vms/ftconfig.in, include/freetype2/config/ftconfig.h, include/freetype2/internal/ftobjs.h, src/autofit/afwarp.h: Do it. 2015-06-22 Werner Lemberg <wl@gnu.org> Fix Savannah bug #45097. We no longer `pollute' the namespace of possible header file names; instead we move `ft2build.h' up by one level so that it gets installed in the default include directory (e.g., /usr/local/include). After this commit, only `ft2build.h' stays in the compiler's include path. No visible changes for the user who follows the standard FreeType header inclusion rules. * include/*: Move to ... * include/freetype2/*: This directory, except `ft2build.h'. * CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS, PRIVATE_HEADERS), Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated. * builds/amiga/include/config/ftconfig.h, builds/freetype.mk (PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work), builds/unix/install.mk (install, uninstall), builds/unix/freetype2.in: Updated. * builds/unix/freetype-config.in: Updated. Emit -I directory only if it is not `/usr/include'. * builds/wince/*, builds/windows/*: Updated. * devel/ft2build.h, include/ft2build.h: Updated. * include/freetype2/config/ftheader.h, include/freetype2/internal/ftserv.h, include/freetype2/internal/internal.h: Update all header file macros. * src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated. 2015-06-21 Werner Lemberg <wl@gnu.org> Make Jam support work again. This is just very basic stuff and just a little bit tested on GNU/Linux only. I won't delve into this since I'm not a Jam user. * Jamfile: Call `HDRMACRO' for `ftserv.h' also. (DEFINES): Replace with... (CCFLAGS): ... this. * src/Jamfile: Don't call `HDRMACRO' for `internal.h'; this is already handled in the top-level Jamfile. * src/autofit/Jamfile (DEFINES): Replace with... (CCFLAGS): ... this. (_sources): Add missing files. * src/cache/Jamfile: Don't call `HDRMACRO' for `ftcache.h'; it no longer contains macro header definitions. * src/base/Jamfile, src/cff/Jamfile, src/sfnt/Jamfile, src/truetype/Jamfile (_sources): Add missing files. 2015-06-16 Werner Lemberg <wl@gnu.org> Fix Savannah bug #45326. * src/sfnt/sfntpic.h (SFNT_SERVICES_GET): Remove duplicate definitions. 2015-06-07 Werner Lemberg <wl@gnu.org> * Version 2.6 released. ======================= Tag sources with `VER-2-6'. * docs/VERSION.DLL: Update documentation and bump version number to 2.6. * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj, builds/windows/vc2005/index.html, builds/windows/vc2008/freetype.vcproj, builds/windows/vc2008/index.html, builds/windows/vc2010/freetype.vcxproj, builds/windows/vc2010/index.html, builds/windows/visualc/freetype.dsp, builds/windows/visualc/freetype.vcproj, builds/windows/visualc/index.html, builds/windows/visualce/freetype.dsp, builds/windows/visualce/freetype.vcproj, builds/windows/visualce/index.html, builds/wince/vc2005-ce/freetype.vcproj, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/freetype.vcproj, builds/wince/vc2008-ce/index.html: s/2.5.5/2.6/, s/255/26/. * include/freetype/freetype.h (FREETYPE_MINOR): Set to 6. (FREETYPE_PATCH): Set to 0. * builds/unix/configure.raw (version_info): Set to 18:0:12. * CMakeLists.txt (VERSION_MINOR): Set to 6. (VERSION_PATCH): Set to 0. * src/autofit/afmodule.c [!FT_MAKE_OPTION_SINGLE_OBJECT]: Add declarations for dumping functions. * src/truetype/ttinterp.c (TT_New_Context): Pacify compiler. * builds/toplevel.mk: Use `freetype.mk's code to compute the version string. Don't include a zero patch level in version string. * builds/freetype.mk: Remove code for computing the version string. 2015-06-06 Ashish Azad <ashish.azad@samsung.com> Fix Savannah bug #45260. * src/pfr/pfrdrivr.c (pfr_get_kerning): Fix typo. 2015-06-03 Werner Lemberg <wl@gnu.org> [truetype] Fix memory leak. Problem reported by Grissiom <chaos.proton@gmail.com>; in https://lists.nongnu.org/archive/html/freetype/2015-05/msg00013.html there is an example code to trigger the bug. * src/truetype/ttobjs.c (tt_size_init_bytecode): Free old `size' data before allocating again. Bug most probably introduced four years ago in version 2.4.3. 2015-06-02 Werner Lemberg <wl@gnu.org> [raster] Add more tracing. * src/raster/ftraster.c (FT_TRACE7) [_STANDALONE_]: Define. (Vertical_Sweep_Span, Vertical_Sweep_Drop, Horizontal_Sweep_Span, Horizontal_Sweep_Drop, Render_Glyph): Add tracing calls. 2015-06-01 Werner Lemberg <wl@gnu.org> [truetype] While tracing opcodes, show code position and stack. * src/truetype/ttinterp.c: Change all existing TRACE7 calls to TRACE6. (opcode_name): Add string lengths. (TT_RunIns): Implement display of code position and stack. 2015-05-31 Werner Lemberg <wl@gnu.org> [truetype] In GX, make private point numbers work correctly. This is completely missing in Apple's documentation: If a `gvar' tuple uses private point numbers (this is, deltas are specified for some points only), the uncovered points must be interpolated for this tuple similar to the IUP bytecode instruction. Examples that need this functionality are glyphs `Oslash' and `Q' in Skia.ttf. * src/truetype/ttgxvar.c (tt_delta_shift, tt_delta_interpolate, tt_handle_deltas): New functions. (TT_Vary_Get_Glyph_Deltas): Renamed to... (TT_Vary_Apply_Glyph_Deltas): ... this; it directly processes the points and does no longer return an array of deltas. Add tracing information. Call `tt_handle_deltas' to interpolate missing deltas. Also fix a minor memory leak in case of error. * src/truetype/ttgxvar.h: Updated. * src/truetype/ttgload.c (TT_Process_Simple_Glyph, load_truetype_glyph): Updated. 2015-05-31 Werner Lemberg <wl@gnu.org> [truetype] In GX, make intermediate tuplets work at extrema. * src/truetype/ttgxvar.c (ft_var_apply_tuple): Fix range condition. 2015-05-31 Werner Lemberg <wl@gnu.org> [truetype] Add tracing information to GX code. * src/truetype/ttgxvar.c (ft_var_load_avar, ft_var_load_gvar, ft_var_apply_tuple, TT_Get_MM_Var, TT_Set_MM_Blend, TT_Set_Var_Design, tt_face_vary_cvt): Do it. 2015-05-28 Werner Lemberg <wl@gnu.org> * src/tools/apinames.c (names_dump): Fix invalid reference. Problem reported by Guzman Mosqueda, Jose R <jose.r.guzman.mosqueda@intel.com>. 2015-05-24 Werner Lemberg <wl@gnu.org> [truetype] Fix commit from 2015-05-22. * src/truetype/ttgload.c, src/truetype/ttinterp.c: Guard new code with `TT_CONFIG_OPTION_SUBPIXEL_HINTING'. Problem reported by Nikolaus Waxweiler <madigens@gmail.com>. 2015-05-23 Werner Lemberg <wl@gnu.org> [truetype] Fix return values of GETINFO bytecode instruction. * src/truetype/ttinterp.h (TT_ExecContextRec): New fields `vertical_lcd' and `gray_cleartype'. * src/truetype/ttgload.c (tt_loader_init): Initialize new fields. Change `symmetrical smoothing' to TRUE, since FreeType produces exactly this. * src/truetype/ttinterp.c (Ins_GETINFO): Fix selector/return bit values for symmetrical smoothing, namely 11/18. Handle bits for vertical LCD subpixels (8/15) and Gray ClearType (12/19). 2015-05-23 Werner Lemberg <wl@gnu.org> [truetype] Minor. * src/truetype/ttinterp.h (TT_ExecContext): s/subpixel/subpixel_hinting. * src/truetype/ttgload.c, src/truetype/ttgload.h: Updated. 2015-05-22 Werner Lemberg <wl@gnu.org> [truetype] Support selector index 3 of the INSTCTRL instruction. This flag activates `native ClearType hinting', disabling backward compatibility mode as described in Greg Hitchcocks whitepaper. In other words, it enables unrestricted functionality of all TrueType instructions in ClearType. * src/truetype/ttgload.c (tt_get_metrics): Call `sph_set_tweaks' unconditionally. (tt_loader_init): Unset `ignore_x_mode' flag if bit 2 of `GS.instruct_control' is active. * src/truetype/ttinterp.c (Ins_INSTCTRL): Handle selector index 3. (Ins_GETINFO): Updated. * docs/CHANGES: Document it. 2015-05-20 Werner Lemberg <wl@gnu.org> [truetype] Minor. * src/truetype/ttinterp.h (SetSuperRound): Fix type of `GridPeriod' argument. 2015-05-17 Werner Lemberg <wl@gnu.org> [truetype] Fix loading of composite glyphs. * src/truetype/ttgload.c (TT_Load_Composite_Glyph): If the ARGS_ARE_XY_VALUES flag is not set, handle argument values as unsigned. I trust `ttx' (which has exactly such code) that it does the right thing here... The reason that noone has ever noticed this bug is probably the fact that point-aligned subglyphs are rare, as are subglyphs with a number of points in the range [128;255], which is quite large (or even in the range [32768;65535], which is extremely unlikely). 2015-05-12 Chris Liddell <chris.liddell@artifex.com> [cff] Make the `*curveto' operators more tolerant. * src/cff/cf2intrp.c (cf2_interpT2CharString): The opcodes `vvcurveto', `hhcurveto', `vhcurveto', and `hvcurveto' all iterate, pulling values off the stack until the stack is exhausted. Implicitly the stack must be a multiple (or for subtly different behaviour) a multiple plus a specific number of extra values deep. If that's not the case, enforce it (as the old code did). 2015-05-12 Chris Liddell <chris.liddell@artifex.com> [cff] fix incremental interface with new cff code. * src/cff/cf2ft.c (cf2_getSeacComponent): When using the incremental interface to retrieve glyph data for a SEAC, it be left to the incremental interface callback to apply the encoding to raw character index (as it was in the previous code). 2015-04-29 Alexei Podtelezhnikov <apodtele@gmail.com> [autofit] Speed up IUP. * src/autofit/afhints.c (af_iup_interp): Separate trivial snapping to the same position from true interpolation, use `scale' to reduce divisions. 2015-04-28 Werner Lemberg <wl@gnu.org> [cff] Use `name' table for PS name if we have a SFNT-CFF. This follows the OpenType 1.7 specification. See https://tug.org/pipermail/tex-live/2015-April/036634.html for a discussion. * src/cff/cffdrivr.c (cff_get_ps_name): Use the `sfnt' service if we have an SFNT. 2015-04-27 Alexei Podtelezhnikov <apodtele@gmail.com> [truetype] Speed up IUP. * src/truetype/ttinterp.c (_iup_worker_interpolate): Separate trivial snapping to the same position from true interpolation. 2015-04-21 Werner Lemberg <wl@gnu.org> [autofit] By default, enable warping code but switch off warping. Suggested by Behdad. * include/config/ftoption.h: Define AF_CONFIG_OPTION_USE_WARPER. * src/autofit/afmodule.c (af_autofitter_init): Initialize `warping' with `false'. 2015-04-21 Werner Lemberg <wl@gnu.org> * docs/CHANGES: Updated. 2015-04-21 Werner Lemberg <wl@gnu.org> [autofit] Introduce `warping' property. This code replaces the debugging hook from the previous commit with a better, more generic solution. * include/ftautoh.h: Document it. * src/autofit/afmodule.h (AF_ModuleRec) [AF_CONFIG_OPTION_USE_WARPER]: Add `warping' field. * src/autofit/afmodule.c (_af_debug_disable_warper): Remove. (af_property_set, af_property_get, af_autofitter_init) [AF_CONFIG_OPTION_USE_WARPER]: Handle `warping' option. * src/autofit/afhints.h (AF_HINTS_DO_WARP): Remove use of the no longer existing `_af_debug_disable_warper'. * src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c (af_latin_hints_init), src/autofit/aflatin2.c (af_latin2_hints_init) [AF_CONFIG_OPTION_USE_WARPER]: Add `AF_SCALER_FLAG_NO_WARPER' to the scaler flags if warping is off. * src/autofit/aftypes.h: Updated. 2015-04-16 Werner Lemberg <wl@gnu.org> [autofit] Add debugging hook to disable warper. * src/autofit/afmodule.c (_af_debug_disable_warper) [FT_DEBUG_AUTOFIT]: New global variable. * src/autofit/aftypes.h: Updated. (AF_SCALER_FLAG_NO_WARPER): New macro (not actively used yet). * src/autofit/afhints.h (AF_HINTS_DO_WARP): New macro. * src/autofit/aflatin.c (af_latin_hints_apply) [AF_CONFIG_OPTION_USE_WARPER]: Use `AF_HINTS_DO_WARP' to control use of warper. * src/autofit/afcjk.c (af_cjk_hints_init, af_cjk_hints_apply) [AF_CONFIG_OPTION_USE_WARPER]: Synchronize with `aflatin.c'. * src/autofit/aflatin2.c (af_latin2_hints_apply) [AF_CONFIG_OPTION_USE_WARPER]: Synchronize with `aflatin.c'. 2015-04-10 Werner Lemberg <wl@gnu.org> [cff] Update advance width handling to OpenType 1.7. Problem reported by Behdad. * src/cff/cffdrivr.c (cff_get_advances): Handle SFNT case separately. * src/cff/cffgload.c (cff_slot_load): Use advance width and side bearing values from `hmtx' table if present. 2015-04-03 Alexei Podtelezhnikov <apodtele@gmail.com> * src/autofit/afhints.c (af_glyph_hints_reload): Use do-while loop. 2015-04-02 Alexei Podtelezhnikov <apodtele@gmail.com> * src/autofit/aflatin.c (af_latin_hint_edges): Reduce logic. 2015-04-01 Alexei Podtelezhnikov <apodtele@gmail.com> [autofit] Finish the thought. * src/autofit/afhints.c (af_direction_compute): make sure the long arm is never negative so that its `FT_ABS' is not necessary. 2015-04-01 Werner Lemberg <wl@gnu.org> [autofit] Call dumper functions for tracing. * src/autofit/afcjk.c (af_cjk_hints_apply): Remove dead code. * src/autofit/afhints.c (af_glyph_hints_dump_points): Minor improvement. * src/autofit/afmodule.c (af_autofitter_load_glyph): Implement it. 2015-04-01 Werner Lemberg <wl@gnu.org> [autofit] Make debugging stuff work again. The interface to ftgrid was broken in the series of commits starting with [autofit] Allocate AF_Loader on the stack instead of AF_Module. from 2015-01-14. * src/autofit/afmodule.c (_af_debug_hints_rec) [FT_DEBUG_AUTOFIT]: Use a global AF_GlyphHintsRec object for debugging. (af_autofitter_done, af_autofitter_load_glyph): Updated. * src/autofit/afloader.c (af_loader_init, af_loader_done): Updated. 2015-04-01 Werner Lemberg <wl@gnu.org> * src/autofit/afhints.c (af_glyph_hints_done): Fix minor thinko. 2015-03-29 Werner Lemberg <wl@gnu.org> [cff] Fix Savannah bug #44629. * src/cff/cf2font.h (CF2_MAX_SUBR), src/cff/cffgload.h (CFF_MAX_SUBRS_CALLS): Set to 16. 2015-03-29 Werner Lemberg <wl@gnu.org> [type1, truetype] Make the MM API more flexible w.r.t. `num_coords'. This commit allows `num_coords' to be larger or smaller than the number of available axes while selecting a design instance, either ignoring excess data or using defaults if data is missing. * src/truetype/ttgxvar.c (TT_Set_MM_Blend, TT_Set_Var_Design): Implement it. * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design, T1_Set_Var_Design): Ditto. 2015-03-29 Werner Lemberg <wl@gnu.org> [type1] Minor. * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design): Use FT_THROW. (T1_Set_Var_Design): Use T1_MAX_MM_AXIS and FT_THROW. 2015-03-27 Werner Lemberg <wl@gnu.org> [cff] Trace charstring nesting levels. * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdCALLGSUBR, cf2_cmdCALLSUBR, cf2_cmdRETURN>: Implement it. * src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_callsubr, cff_op_callgsubr, cff_op_return>: Ditto. 2015-03-21 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Optimize `FT_Angle_Diff'. Under normal circumstances we are usually close to the desired range of angle values, so that the remainder is not really necessary. * src/base/fttrigon.c (FT_Angle_Diff): Use loops instead of remainder. * src/autofit/aftypes.h (AF_ANGLE_DIFF): Ditto in the unused macro. 2015-03-21 Werner Lemberg <wl@gnu.org> [truetype] Improve `gvar' handling. * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Correctly handle single-element runs. Cf. glyph `Q' in Skia.ttf with weights larger than the default. 2015-03-20 Alexei Podtelezhnikov <apodtele@gmail.com> * src/base/fttrigon.c (FT_Vector_Rotate): Minor refactoring. 2015-03-17 Alexei Podtelezhnikov <apodtele@gmail.com> Fix Savannah bug #44412 (part 2). * src/base/fttrigon.c (FT_Sin, FT_Cos, FT_Tan): Call `FT_Vector_Unit'. 2015-03-11 Werner Lemberg <wl@gnu.org> [autofit] Add support for Arabic script. Thanks to Titus Nemeth <tn@tntypography.eu> for guidance! * src/autofit/afblue.dat: Add blue zone data for Arabic. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Arabic standard characters. * src/autofit/afranges.c: Add Arabic data. * src/autofit/afstyles.h: Add Arabic data. * docs/CHANGES: Document it. 2015-03-11 Werner Lemberg <wl@gnu.org> Rename `svxf86nm.h' to `svfntfmt.h'; update related symbols. * include/internal/ftserv.h (FT_SERVICE_XFREE86_NAME_H): Renamed to... (FT_SERVICE_FONT_FORMAT_H): This. * include/internal/services/svfntfmt.h (FT_XF86_FORMAT_*): Renamed to ... (FT_FONT_FORMAT_*): This. src/base/ftfntfmt.c, src/bdf/bdfdrivr.c, src/cff/cffdrivr.c, src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/pfr/pfrdrivr.c, src/truetype/ttdriver.c, src/type1/t1driver.c, src/type42/t42drivr.c, src/winfonts/winfnt.c: Updated. 2015-03-11 Werner Lemberg <wl@gnu.org> [base] Rename `FT_XFREE86_H' to `FT_FONT_FORMATS_H'. * include/config/ftheader.h: Implement it. * src/base/ftfntfmt.c, docs/CHANGES: Updated. 2015-03-11 Werner Lemberg <wl@gnu.org> [base] Rename `FT_Get_X11_Font_Format' to `FT_Get_Font_Format'. * include/ftfntfmt.h, src/base/ftfntfmt.c: Implement it. * docs/CHANGES: Updated. 2015-03-11 Werner Lemberg <wl@gnu.org> Fix automatic copyright updating. * src/tools/update-copyright: Make scanning of `no-copyright' actually work. * src/tools/no-copyright: Don't include README in general. 2015-03-11 Werner Lemberg <wl@gnu.org> Rename `ftxf86.[ch]' to `ftfntfmt.[ch]'. CMakeLists.txt, builds/amiga/makefile, builds/amiga/makefile.os4, builds/amiga/smakefile, builds/mac/FreeType.m68k_cfm.make.txt, builds/mac/FreeType.m68k_far.make.txt, builds/mac/FreeType.ppc_carbon.make.txt, builds/mac/FreeType.ppc_classic.make.txt, builds/symbian/bld.inf, builds/symbian/freetype.mmp, builds/wince/vc2005-ce/freetype.vcproj, builds/wince/vc2008-ce/freetype.vcproj, builds/windows/vc2005/freetype.vcproj, builds/windows/vc2008/freetype.vcproj, builds/windows/vc2010/freetype.vcxproj, builds/windows/vc2010/freetype.vcxproj.filters, builds/windows/visualc/freetype.dsp, builds/windows/visualc/freetype.vcproj, builds/windows/visualce/freetype.dsp, builds/windows/visualce/freetype.vcproj, docs/INSTALL.ANY, include/config/ftheader.h, include/ftfntfmt.h, modules.cfg, src/base/ftfntfmt.c, vms_make.com: Updated. 2015-03-10 Alexei Podtelezhnikov <apodtele@gmail.com> Fix Savannah bug #44412 (part 1). * src/base/ftstroke.c (ft_stroker_inside): Handle near U-turns. 2015-03-10 Werner Lemberg <wl@gnu.org> [base] Rename `FT_Bitmap_New' to `FT_Bitmap_Init'. * include/ftbitmap.h, src/base/ftbitmap.c: Implement it. Update all callers. * docs/CHANGES: Updated. 2015-03-06 Werner Lemberg <wl@gnu.org> * src/sfnt/ttload.c (tt_face_load_font_dir): Fix compiler warning. Found by Alexei. 2015-03-05 Alexei Podtelezhnikov <apodtele@gmail.com> * src/base/ftstroke.c: Simplify. 2015-03-04 Werner Lemberg <wl@gnu.org> [truetype] Some fixes and code refactoring in `ttgxvar.c'. * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix return value of `point_cnt' if two bytes are read. Use a more vertical coding style. (ft_var_readpackeddeltas): Use FT_UInt for `delta_cnt' parameter. Use a more vertical coding style. 2015-03-03 Werner Lemberg <wl@gnu.org> [autofit] Fix Savannah bug #44241. * src/autofit/aflatin.c (af_latin_metrics_init_blues): Reject glyphs with less than 3 points. 2015-03-02 Werner Lemberg <wl@gnu.org> Simplify `TYPEOF' macro. No need for two arguments. * include/config/ftconfig.h, builds/unix/ftconfig.in, builds/vms/ftconfig.h (TYPEOF): Updated. * include/internal/ftobjs.h (FT_PAD_FLOOR, FT_PIX_FLOOR), src/autofit/afwarp.h (AF_WARPER_FLOOR): Updated. 2015-03-01 Werner Lemberg <wl@gnu.org> Various compiler warning fixes for `make multi'. * src/autofit/afcjk.c (af_cjk_hints_compute_blue_edges), src/autofit/aflatin.c (af_latin_hint_compute_blue_edges, af_latin_hint_edges), src/autofit/aflatin2.c (af_latin2_hints_compute_blue_edges, af_latin2_hint_edges): Declare as `static'. * src/cache/ftccmap.c (FTC_CMAP_QUERY_HASH, FTC_CMAP_NODE_HASH): Removed. Unused. * src/cache/ftcimage.c: Include FT_INTERNAL_OBJECTS_H. * src/cache/ftcmanag.c (FTC_LRU_GET_MANAGER): Removed. Unused. * src/cff/cf2intrp.c: Include `cf2intrp.h'. * src/cff/cffdrivr.c (PAIR_TAG): Removed. Unused. * src/gzip/ftgzip.c (NO_DUMMY_DECL): Removed. Unused. * src/psaux/afmparse.c (afm_parser_read_int): Declare as `static'. * src/pshinter/pshalgo.c (STRONGER, PSH_ZONE_MIN, PSH_ZONE_MAX): Removed. Unused. * src/raster/ftraster.c (Render_Glyph): Declare as `static'. * src/sfnt/ttpost.c (load_format_20): Fix signedness warning. * src/truetype/ttdriver.c (PAIR_TAG): Removed. Unused. * src/truetype/ttsubpix.c (is_member_of_family_class, is_member_of_style_class): Declare as `static'. * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Declare as `static'. * src/type1/t1load.c (mm_axis_unmap, mm_weights_unmap): Declare as `static'. (T1_FIELD_COUNT): Removed. Unused. * src/type1/t1parse.h (T1_Done_Table): Removed. Unused. * src/type42/t42parse.c (T1_Done_Table): Removed. Unused. 2015-02-25 Werner Lemberg <wl@gnu.org> [psaux] Signedness fixes. * include/internal/psaux.h, src/psaux/afmparse.c, src/psaux/afmparse.h, src/psaux/psconv.c, src/psaux/psobjs.c, src/psaux/t1cmap.c, src/psaux/t1decode.c: Apply. 2015-02-25 Werner Lemberg <wl@gnu.org> [otvalid] Signedness fixes. * src/otvalid/otvcommn.c, src/otvalid/otvgdef.c, src/otvalid/otvgpos.c, src/otvalid/otvgsub.c, src/otvalid/otvmath.c: Apply. 2015-02-25 Werner Lemberg <wl@gnu.org> * src/bzip2/ftbzip2.c (ft_bzip2_alloc): Signedness fix. 2015-02-25 Werner Lemberg <wl@gnu.org> [lzw] Signedness fixes. * src/lzw/ftzopen.c, src/lzw/ftzopen.h: Apply. 2015-02-25 Werner Lemberg <wl@gnu.org> [gxvalid] Signedness fixes. * src/gxvalid/gxvbsln.c, src/gxvalid/gxvcommn.c, src/gxvalid/gxvcommn.h, src/gxvalid/gxvjust.c, src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmort.c, src/gxvalid/gxvmort1.c, src/gxvalid/gxvmort2.c, src/gxvalid/gxvmorx.c, src/gxvalid/gxvmorx1.c, src/gxvalid/gxvmorx2.c, src/gxvalid/gxvopbd.c, src/gxvalid/gxvprop.c, src/gxvalid/gxvtrak.c: Apply. 2015-02-25 Werner Lemberg <wl@gnu.org> [cache] Signedness fixes. * src/cache/ftcbasic.c, src/cache/ftccmap.c, src/cache/ftcimage.c, src/cache/ftcmanag.c, src/cache/ftcsbits.c: Apply. 2015-02-25 Werner Lemberg <wl@gnu.org> Change dimension fields in `FTC_ImageTypeRec' to unsigned type. This doesn't break ABI. * include/ftcache.h (FTC_ImageTypeRec): Use unsigned types for `width' and `height'. * docs/CHANGES: Document it. 2015-02-25 Werner Lemberg <wl@gnu.org> [cache] Don't use `labs'. This is the only place in FreeType where this function was used. * include/config/ftstdlib.h (ft_labs): Remove. * src/cache/ftcimage.c (ftc_inode_weight): Replace `ft_labs' with `FT_ABS'. 2015-02-23 Werner Lemberg <wl@gnu.org> [cache] Replace `FT_PtrDist' with `FT_Offset'. * src/cache/ftccache.h (FTC_NodeRec): `FT_Offset' (a.k.a. `size_t') is a better choice for `hash' to hold a pointer than `FT_PtrDist' (a.k.a. `ptrdiff_t'), especially since the latter is signed, causing zillions of signedness warnings. [Note that `hash' was of type `FT_UInt32' before the change to `FT_PtrDist'.] Update all users. * src/cache/ftcbasic.c, src/cache/ftccache.c, src/cache/ftccmap.c, src/cache/ftcglyph.c, src/cache/ftcglyph.h: Updated. 2015-02-23 Werner Lemberg <wl@gnu.org> [smooth, raster] Re-enable standalone compilation. * src/raster/ftraster.c (FT_RENDER_POOL_SIZE, FT_MAX) [_STANDALONE_]: Define macros. * src/smooth/ftgrays.c (FT_RENDER_POOL_SIZE, FT_MAX, FT_ABS, FT_HYPOT) [_STANDALONE_]: Define macros. 2015-02-22 Werner Lemberg <wl@gnu.org> [smooth] Signedness fixes. * src/smooth/ftgrays.c, src/smooth/ftsmooth.c: Apply. 2015-02-22 Werner Lemberg <wl@gnu.org> * src/raster/ftraster.c: Use the file's typedefs everywhere. 2015-02-22 Werner Lemberg <wl@gnu.org> * src/sfnt/ttpost.c (load_format_20): Fix error tracing message. Bug introduced 6 commits earlier. 2015-02-22 Werner Lemberg <wl@gnu.org> [pshinter] Fix thinko. * src/pshinter/pshalgo.c (psh_glyph_find_strong_points): Correctly check `count'. Bug introduced two commits earlier. 2015-02-22 Werner Lemberg <wl@gnu.org> [raster] Signedness fixes. * src/raster/ftraster.c, src/raster/ftrend1.c: Apply. 2015-02-22 Werner Lemberg <wl@gnu.org> [pshinter] Signedness fixes. * src/pshinter/pshalgo.c, src/pshinter/pshglob.c, src/pshinter/pshrec.c: Apply. 2015-02-22 Werner Lemberg <wl@gnu.org> [pshinter] Use macros for (unsigned) flags, not enumerations. * src/pshinter/pshalgo.h (PSH_Hint_Flags): Replace with macros. Updated. * src/pshinter/pshrec.h (PS_Hint_Flags): Replace with macros. 2015-02-22 Werner Lemberg <wl@gnu.org> * src/pshinter/pshrec.c: Simplify. (ps_hints_open, ps_hints_stem): Remove switch statement. 2015-02-22 Werner Lemberg <wl@gnu.org> [sfnt] Signedness fixes. * src/sfnt/pngshim.c, src/sfnt/sfobjs.c, src/sfnt/ttcmap.c, src/sfnt/ttkern.c, src/sfnt/ttload.c, src/sfnt/ttpost.c, src/sfnt/ttsbit.c: Apply. * src/sfnt/sfdriver.c: Apply. (sfnt_get_ps_name): Simplify. 2015-02-22 Werner Lemberg <wl@gnu.org> [bdf] Signedness fixes. * src/bdf/bdf.h, src/bdf/bdfdrivr.c, src/bdf/bdfdrivr.h, src/bdf/bdflib.c: Apply. 2015-02-22 Werner Lemberg <wl@gnu.org> * src/bdf/bdflib.c (_bdf_atous): New function. (_bdf_parse_glyphs, _bdf_parse_start): Use it. 2015-02-22 Werner Lemberg <wl@gnu.org> [pcf] Signedness fixes. * src/pcf/pcf.h, src/pcf/pcfdrivr.c: Apply. * src/pcf/pcfread.c: Apply. (pcf_get_encodings): Ignore invalid negative encoding offsets. 2015-02-21 Werner Lemberg <wl@gnu.org> * src/winfonts/winfnt.c: Signedness fixes. 2015-02-21 Werner Lemberg <wl@gnu.org> [type42] Signedness fixes. * src/type42/t42parse.c, src/type42/t42parse.h, src/type42/t42types.h: Apply. 2015-02-21 Werner Lemberg <wl@gnu.org> [pfr] Signedness fixes. * src/pfr/pfrdrivr.c, src/pfr/pfrgload.c, src/pfr/pfrload.c, src/pfr/pfrload.h, src/pfr/pfrobjs.c, src/pfr/pfrsbit.c, src/pfr/pfrtypes.h: Apply. 2015-02-21 Werner Lemberg <wl@gnu.org> [cff] Minor signedness fixes related to last commit. * src/cff/cf2ft.c, src/cff/cf2intrp.c, src/cff/cffgload.c: Apply. 2015-02-20 Werner Lemberg <wl@gnu.org> [cff] Thinkos in bias handling. Only the final result is always positive. Bug introduced three commits earlier. * src/cff/cffgload.c, src/cff/cffgload.h: Apply. 2015-02-20 Werner Lemberg <wl@gnu.org> [cid] Fix signedness issues and emit some better error codes. * src/cid/cidgload.c, src/cid/cidload.h, src/cid/cidobjs.c, src/cid/cidparse.h: Apply. * src/cid/cidload.c: Apply. (parse_fd_array): Reject negative values for number of dictionaries. * src/cid/cidparse.c: Apply. (cid_parser_new): Reject negative values for hex data length. 2015-02-20 Werner Lemberg <wl@gnu.org> [cff] Signedness fixes for new engine. * src/cff/cf2arrst.c, src/cff/cf2fixed.h, src/cff/cf2ft.c, src/cff/cf2ft.h, src/cff/cf2hints.c, src/cff/cf2intrp.c: Apply. 2015-02-20 Werner Lemberg <wl@gnu.org> [cff] Signedness fixes for basic infrastructure and old engine. * include/internal/pshints.h, src/cff/cffdrivr.c, src/cff/cffgload.c, src/cff/cffgload.h, src/cff/cffload.c, src/cff/cffobjs.c, src/cff/cffparse.c, src/pshinter/pshrec.c: Apply. 2015-02-19 Werner Lemberg <wl@gnu.org> * src/truetype/ttgxvar.c (TT_Get_MM_Var): Ignore `countSizePairs'. This is hard-coded to value 2 in `fvar' version 1.0 (and no newer version exists), but some fonts set it incorrectly. Problem reported by Adam Twardoch <adam@fontlab.com>. 2015-02-19 Werner Lemberg <wl@gnu.org> [cff] Emit better error code for invalid private dict size. * src/cff/cffparse.c (cff_parse_private_dict): Reject negative values for size and offset. 2015-02-19 Werner Lemberg <wl@gnu.org> [autofit] Fix signedness issues. * src/autofit/afangles.c, src/autofit/afcjk.c, src/autofit/afglobal.c, src/autofit/afhints.c, src/autofit/aflatin.c, src/autofit/aflatin2.c, src/autofit/afwarp.c, src/autofit/hbshim.c: Apply. 2015-02-19 Werner Lemberg <wl@gnu.org> [autofit] Use macros for (unsigned) flags, not enumerations. This harmonizes with other code in FreeType (and reduces the number of necessary casts to avoid compiler warnings). * src/autofit/afblue.hin: Make flag macros unsigned. * src/autofit/afblue.h: Regenerated. * src/autofit/afcjk.h: Replace flag enumeration with macros. * src/autofit/afcjk.c: Updated. * src/autofit/afhints.h (AF_Flags, AF_Edge_Flags): Replace with macros. * src/autofit/afhints.c: Updated. * src/autofit/aflatin.h: Replace flag enumerations with macros. * src/autofit/aflatin.c, src/autofit/aflatin2.c: Updated. * src/autofit/aftypes.h (AF_ScalerFlags): Replace with macros. 2015-02-18 Werner Lemberg <wl@gnu.org> [type1] Fix signedness issues. * include/internal/psaux.h, include/internal/t1types.h, src/psaux/psobjs.c, src/psaux/psobjs.h, src/psaux/t1decode.c, src/type1/t1gload.c, src/type1/t1load.c, src/type1/t1parse.c: Apply. 2015-02-18 Werner Lemberg <wl@gnu.org> [psaux, type1] Fix minor AFM issues. * include/internal/t1types.h (AFM_KernPairRec): Make indices unsigned. Update users. (AFM_FontInfoRec): Make element counters unsigned. Update users. * src/psaux/afmparse.h (AFM_ValueRec): Add union member for unsigned int. * src/psaux/afmparse.c (afm_parse_track_kern, afm_parse_kern_pairs): Reject negative values for number of kerning elements. * src/type1/t1afm.c, src/tools/test_afm.c: Updated. 2015-02-18 Werner Lemberg <wl@gnu.org> Don't use `FT_PtrDist' for lengths. Use FT_UInt instead. * include/internal/psaux.h (PS_Table_FuncsRec, PS_TableRec, T1_DecoderRec): Do it. * include/internal/t1types.h (T1_FontRec): Ditto. * src/cid/cidload.c (cid_parse_dict): Updated. * src/pfr/pfrload.c (pfr_extra_item_load_font_id): Ditto. * src/psaux/psobjs.c (ps_table_add), src/psaux/psobjs.h: Ditto. * src/type1/t1load.c (parse_blend_axis_types, parse_encoding, parse_charstrings, parse_dict): Ditto. * src/type42/t42parse.c (t42_parse_encoding, t42_parse_charstrings, t42_parse_dict): Ditto. 2015-02-18 Werner Lemberg <wl@gnu.org> * src/type1/t1driver.c (t1_ps_get_font_value): Clean up. This handles negative values better, avoiding many casts. 2015-02-17 Werner Lemberg <wl@gnu.org> [base] Fix Savannah bug #44284. * src/base/ftcalc.c (FT_MulFix): Typos. 2015-02-17 Werner Lemberg <wl@gnu.org> [truetype] Finish compiler warning fixes for signedness issues. * src/truetype/ttgxvar.c, src/truetype/ttsubpix.c, src/truetype/ttsubpix.h: Apply. 2015-02-17 Werner Lemberg <wl@gnu.org> * src/truetype/ttsubpix.c: Adding missing `static' keywords. 2015-02-17 Werner Lemberg <wl@gnu.org> [truetype] More signedness fixes. * include/internal/tttypes.h, src/truetype/ttinterp.h, src/truetype/ttobjs.h, src/truetype/ttinterp.c, src/truetype/ttobjs.c: Apply. 2015-02-17 Werner Lemberg <wl@gnu.org> [truetype] Various signedness fixes. * include/internal/ftgloadr.h, src/truetype/ttpload.c: Apply. * src/truetype/ttgload.c: Apply. (TT_Get_VMetrics): Protect against invalid ascenders and descenders while constructing advance height. 2015-02-16 Werner Lemberg <wl@gnu.org> [base] Finish compiler warning fixes for signedness issues. * src/base/ftglyph.c, src/base/ftlcdfil.c, src/base/ftstroke.c: Apply. 2015-02-16 Werner Lemberg <wl@gnu.org> * include/tttables.h (TT_OS2): `fsType' must be FT_UShort. 2015-02-16 Werner Lemberg <wl@gnu.org> More minor signedness warning fixes. * src/base/ftbbox.c, src/base/ftbitmap.c, src/base/fttrigon.c, src/base/ftutil.c: Apply. 2015-02-16 Werner Lemberg <wl@gnu.org> Next round of minor compiler warning fixes. * include/internal/ftrfork.h (FT_RFork_Ref): Change `offset' member type to `FT_Long'. (CONST_FT_RFORK_RULE_ARRAY_BEGIN): Add `static' keyword. * include/internal/ftstream.h (FT_Stream_Pos): Return `FT_ULong'. * src/base/ftoutln.c, src/base/ftrfork.c, src/base/ftstream.c: Signedness fixes. 2015-02-16 Werner Lemberg <wl@gnu.org> Various minor signedness fixes. * include/ftadvanc.h, include/internal/ftobjs.h, src/base/ftgloadr.c, src/base/ftobjs.c: Apply. 2015-02-16 Werner Lemberg <wl@gnu.org> New `TYPEOF' macro. This helps suppress signedness warnings, avoiding issues with implicit conversion changes. * include/config/ftconfig.h, builds/unix/ftconfig.in, builds/vms/ftconfig.h (TYPEOF): Define. * include/internal/ftobjs.h (FT_PAD_FLOOR, FT_PIX_FLOOR), src/autofit/afwarp.h (AF_WARPER_FLOOR): Use it. 2015-02-16 Werner Lemberg <wl@gnu.org> * src/base/ftsystem.c: Use casts in standard C function wrappers. (ft_alloc, ft_realloc, ft_ansi_stream_io, FT_Stream_Open): Do it. 2015-02-16 Werner Lemberg <wl@gnu.org> Fix Savannah bug #44261. * builds/unix/detect.mk (setup) [unix]: Set `CONFIG_SHELL' in the environment also while calling the configure script. 2015-02-16 Werner Lemberg <wl@gnu.org> * include/internal/ftmemory.h: Add some `FT_Offset' casts. (FT_MEM_SET, FT_MEM_COPY, FT_MEM_MOVE, FT_ARRAY_ZERO, FT_ARRAY_COPY, FT_MEM_MOVE): Do it. 2015-02-15 Werner Lemberg <wl@gnu.org> [base] Clean up signedness issues in `ftdbgmem.c'. Also fix other minor issues. * src/base/ftdbgmem.c (FT_MemTableRec): Replace all FT_ULong types with FT_Long for consistency. (ft_mem_primes): Change type to `FT_Int'. (ft_mem_closest_prime, ft_mem_table_set): Updated. (ft_mem_debug_panic, ft_mem_debug_alloc, ft_mem_debug_free, ft_mem_debug_realloc): Use `static' keyword and fix signedness warnings where necessary. (ft_mem_table_resize, ft_mem_table_new, ft_mem_table_destroy, ft_mem_table_get_nodep, ft_mem_debug_init, FT_DumpMemory): Fix types and add or remove casts to avoid signedness warnings. 2015-02-15 Werner Lemberg <wl@gnu.org> [base] Clean up signedness in arithmetic functions. This makes the code more readable and reduces compiler warnings. * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round, FT_MulFix, FT_DivFix): Convert input parameters to unsigned, do the computation, then convert the result back to signed. (ft_corner_orientation): Fix casts. 2015-02-07 Werner Lemberg <wl@gnu.org> [sfnt] Fix Savannah bug #44184. * src/sfnt/ttload.c (check_table_dir, tt_face_load_font_dir): No longer reject `htmx' and `vmtx' tables with invalid length but sanitize them. 2015-02-06 Jon Anderson <jon@websupergoo.com> [truetype] Fix regression in the incremental glyph loader. * src/truetype/ttgload.c (load_truetype_glyph): For incremental fonts, the glyph index may be greater than the number of glyphs indicated, so guard the check with a preprocessor conditional. 2015-02-06 Werner Lemberg <wl@gnu.org> [autofit] Fix potential memory leak. While this doesn't show up with FreeType, exactly the same code leaks with ttfautohint's modified auto-hinter code (which gets used in a slightly different way). It certainly doesn't harm since it is similar to already existing checks in the code for embedded arrays. * src/autofit/afhints.c (af_glyph_hints_reload): Set `max_contours' and `max_points' for all cases. 2015-01-31 Werner Lemberg <wl@gnu.org> [autofit] Add support for Thai script. Thanks to Ben Mitchell <ben@rosettatype.com> for guidance with blue zone characters! * src/autofit/afblue.dat: Add blue zone data for Thai. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Thai standard characters. * src/autofit/afranges.c: Add Thai data. * src/autofit/afstyles.h: Add Thai data. 2015-01-23 Behdad Esfahbod <behdad@behdad.org> [raster] Handle `FT_RASTER_FLAG_AA' correctly. This fixes a breakage caused by the commit `[raster] Remove 5-level gray AA mode from monochrome rasterizer.'. Problem reported by Markus Trippelsdorf <markus@trippelsdorf.de>. * src/raster/ftraster.c (ft_black_render): Handle `FT_RASTER_FLAG_AA'. * src/raster/ftrend1.c (ft_raster1_render): Remove gray AA mode remnants. 2015-01-18 Werner Lemberg <wl@gnu.org> * src/base/ftobjs.c (FT_New_Library): Fix compiler warning. 2015-01-18 Chris Liddell <chris.liddell@artifex.com> [raster] Fix Savannah bug #44022. Add fallback for glyphs with degenerate bounding boxes. If a glyph has only one very narrow feature, the bbox can end up with either the width or height of the bbox being 0, in which case no raster memory is allocated and no attempt is made to render the glyph. This is less than ideal when the drop-out compensation in the rendering code would actually result in the glyph being rendered. This problem can be observed with the `I' glyph (gid 47) in the Autodesk RomanS TrueType font. * src/raster/ftrend1.c (ft_raster1_render): Add a fallback if either dimension is zero to explicitly round up/down (instead of simply round). 2015-01-17 Werner Lemberg <wl@gnu.org> Add some tools to handle yearly copyright notice updates. We are now following the GNU guidelines: A new release automatically means that the copyright year of all affected files gets updated; it is no longer used to track years of modification changes. * src/tools/update-copyright-year: New Perl script. * src/tools/update-copyright: New shell script that calls `update-copyright-year' on all files. * src/tools/no-copyright: Exceptions that should not be handled by `update-copyright' 2015-01-14 Werner Lemberg <wl@gnu.org> * docs/CHANGES: Updated, using a description from Behdad. 2015-01-14 Behdad Esfahbod <behdad@behdad.org> * src/autofit/afmodule.c (af_autofitter_done): Fix compiler warning. 2015-01-14 Behdad Esfahbod <behdad@behdad.org> [autofit] Add embedded array of segments and edges. Avoids multiple mallocs per typical glyphs. With this and recent changes to avoid mallocs, the thread-safe stack-based loader is now as fast as the previous model that had one cached singleton. * src/autofit/afhints.h (AF_SEGMENTS_EMBEDDED, AF_EDGES_EMBEDDED): New macros. (AF_AxisHintsRec): Add two arrays for segments and edges. * src/autofit/afhints.c (af_axis_hints_new_segment): Only allocate data if number of segments exceeds given threshold value. (af_axis_hints_new_edge): Only allocate data if number of edges exceeds given threshold value. (af_glyph_hints_done): Updated. 2015-01-14 Behdad Esfahbod <behdad@behdad.org> [autofit] Add embedded arrays for points and contours. This avoids at least two malloc calls for typical glyphs. * src/autofit/afhints.h (AF_POINTS_EMBEDDED, AF_CONTOURS_EMBEDDED): New macros. (AF_GlyphHintsRec): Add two arrays for contours and points. * src/autofit/afhints.c (af_glyph_hints_init, af_glyph_hints_done): Updated. (af_glyph_hints_reload): Only allocate data if number of contours or points exceeds given threshold values. 2015-01-14 Behdad Esfahbod <behdad@behdad.org> [autofit] Allocate hints object on the stack. This avoids one malloc per load. * src/autofit/afloader.h (AF_LoaderRec): Change type of `hints' to `AF_GlyphHints'. Update prototype. * src/autofit/afloader.c (af_loader_init): Use `AF_GlyphHints' parameter instead of `FT_Memory'. (af_loader_done): Directly reset `load_hints'. (af_loader_load_g): Updated. * src/autofit/afmodule.c (af_autofitter_load_glyph): Use local `hints' object. 2015-01-14 Behdad Esfahbod <behdad@behdad.org> [autofit] Reuse slot glyph loader. No need to create a new glyph loader; we can reuse the one from `slot->internal->loader'. It's hard to tell why it was written that way originally, but new code looks sound and correct to me, and avoids lots of allocations. * src/autofit/afloader.c (af_loader_init): Change return type to `void'. Don't call `FT_GlyphLoader_New'. (af_loader_reset): Don't call `FT_GlyphLoader_Rewind'. (af_loader_load_g): Update code to use `internal->loader', which doesn't need copying of data. * src/autofit/afloader.h (AF_LoaderRec): Remove `gloader' member. Update prototype. * src/autofit/afmodule.c (af_autofitter_load_glyph): Updated. 2015-01-14 Behdad Esfahbod <behdad@behdad.org> [autofit] Remove (unused) support for composite glyphs. We never have to deal with composite glyphs in the autohinter, as those will be loaded into FORMAT_OUTLINE by the recursed `FT_Load_Glyph' function. In the rare cases that FT_LOAD_NO_RECURSE is set, it will imply FT_LOAD_NO_SCALE as per `FT_Load_Glyph', which then implies FT_LOAD_NO_HINTING: /* resolve load flags dependencies */ if ( load_flags & FT_LOAD_NO_RECURSE ) load_flags |= FT_LOAD_NO_SCALE | FT_LOAD_IGNORE_TRANSFORM; if ( load_flags & FT_LOAD_NO_SCALE ) { load_flags |= FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP; load_flags &= ~FT_LOAD_RENDER; } and as such the auto-hinter is never called. Thus, the recursion in `af_loader_load_g' never actually happens. So remove the depth counter as well. * src/autofit/afloader.c (af_loader_load_g): Remove `depth' parameter. <FT_GLYPH_FORMAT_COMPOSITE>: Remove associated code. (af_loader_load_glyph): Updated. 2015-01-14 Behdad Esfahbod <behdad@behdad.org> [raster] Fix uninitialized memory access. Apparently `ras.cProfile' might be uninitialized. This will be the case if `ras.top == ras.cProfile->offset', as can be seen in `End_Profile'. The overshoot code introduced in a change `Fix B/W rasterization of subglyphs with different drop-out modes.' (from 2009-06-18) violated this, accessing `ras.cProfile->flags' unconditionally just before calling `End_Profile' (which then detected that `cProfile' is uninitialized and didn't touch it). This was harmless, and was not detected by valgrind before because the objects were allocated on the `raster_pool', which was always initialized. With recent change to allocate raster buffers on the stack, valgrind now reported this invalid access. * src/raster/ftraster.c (Convert_Glyph): Don't access an uninitialized `cProfile'. 2015-01-14 Behdad Esfahbod <behdad@behdad.org> [smooth] Fix uninitialized memory access. Looks like `ras.span_y' could always be used without initialization. This was never detected by valgrind before because the library-wide `raster_pool' was used for the worker object and `raster_pool' was originally zero'ed. But subsequent reuses of it were using `span_y' uninitialized. With the recent change to not use `render_pool' and allocate worker and buffer on the stack, valgrind now detects this uninitialized access. * src/smooth/ftgrays.c (gray_raster_render): Initialize `ras.span_y'. 2015-01-14 Behdad Esfahbod <behdad@behdad.org> [base] Don't initialize unused `driver->glyph_loader'. * src/base/ftobjs.c (Destroy_Driver): Don't call `FT_GlyphLoader_Done'. (FT_Add_Module): Don't call `FT_GlyphLoader_New'. 2015-01-14 Behdad Esfahbod <behdad@behdad.org> [base] Don't allocate `library->raster_pool' anymore. It's unused after the following commits: [raster] Allocate render pool for mono rasterizer on the stack. [raster] Remove 5-level gray AA mode from monochrome rasterizer. The value of FT_RENDER_POOL_SIZE still serves the purpose it used to serve, which is, to adjust the pool size. But the pool is now allocated on the stack on demand. * src/base/ftobjs.c (FT_New_Library, FT_Done_Library): Implement. 2015-01-14 Behdad Esfahbod <behdad@behdad.org> [base] Do not reorder library->renderers upon use. Instead of keeping `library->renderers' in a MRU order, just leave it as-is. The MRU machinery wasn't thread-safe. With this patch, rasterizing glyphs from different faces from different threads doesn't fail choosing rasterizer (FT_Err_Cannot_Render_Glyph). Easiest to see that crash was to add a `printf' (or otherwise let thread yield in FT_Throw with debugging enabled). * src/base/ftobjs.c (FT_Render_Glyph_Internal), src/base/ftoutln.c (FT_Outline_Render): Don't call `FT_Set_Renderer'. 2015-01-14 Behdad Esfahbod <behdad@behdad.org> [raster] Allocate render pool for mono rasterizer on the stack. Instead of using the `render_pool' member of `FT_Library' that is provided down to the rasterizer, completely ignore that and allocate needed objects on the stack instead. With this patch, rasterizing glyphs from different faces from different threads doesn't crash in the monochrome rasterizer. * src/raster/ftraster.c (black_TRaster): Remove `buffer', `buffer_size', and `worker' members. (ft_black_render): Create `buffer' locally. (ft_black_reset): Updated. 2015-01-14 Behdad Esfahbod <behdad@behdad.org> [raster] Remove 5-level gray AA mode from monochrome rasterizer. It was off by default and couldn't be turned on at runtime. And the smooth rasterizer superseded it over ten years ago. No point in keeping. Comments suggested that it was there for compatibility with FreeType 1. 550 lines down. * src/raster/ftraster.c (FT_RASTER_OPTION_ANTI_ALIASING, RASTER_GRAY_LINES): Remove macros and all associated code. (black_TWorker): Remove `gray_min_x' and `gray_max_x'. (black_TRaster): Remove `grays' and `gray_width'. (Vertical_Sweep_Init, Vertical_Sweep_Span, Vertical_Sweep_Drop, ft_black_render): Updated. * src/raster/ftrend1.c (ft_raster1_render): Simplify code. (ft_raster5_renderer_class): Removed. 2015-01-14 Behdad Esfahbod <behdad@behdad.org> [smooth] Allocate render pool for smooth rasterizer on the stack. Instead of using the `render_pool' member of `FT_Library' that is provided down to the rasterizer, completely ignore that and allocate needed objects on the stack instead. With this patch, rasterizing glyphs from different faces from different threads doesn't crash in the smooth rasterizer. Bugs: https://bugzilla.redhat.com/show_bug.cgi?id=678397 https://bugzilla.redhat.com/show_bug.cgi?id=1004315 https://bugzilla.redhat.com/show_bug.cgi?id=1165471 https://bugs.freedesktop.org/show_bug.cgi?id=69034 * src/smooth/ftgrays.c (gray_TRaster): Remove `buffer', `buffer_size', `band_size', and `worker' members. (gray_raster_render): Create `buffer', `buffer_size', and `band_size' locally. (gray_raster_reset): Updated. 2015-01-14 Behdad Esfahbod <behdad@behdad.org> [truetype] Allocate TT_ExecContext in TT_Size instead of TT_Driver. Previously the code had stipulation for using a per-TT_Size exec context if `size->debug' was true. But there was no way that `size->debug' could *ever* be true. As such, the code was always using the singleton `TT_ExecContext' that was stored in `TT_Driver'. This was, clearly, not threadsafe. With this patch, loading glyphs from different faces from different threads doesn't crash in the bytecode loader code. * src/truetype/ttobjs.h (TT_SizeRec): Remove `debug' member. (TT_DriverRec): Remove `context' member. * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Remove `TT_ExecContext' code related to a global `TT_Driver' object. (tt_driver_done): Don't remove `TT_ExecContext' object here but ... (tt_size_done_bytecode): ... here. (tt_driver_init): Don't create `TT_ExecContext' object here but ... (tt_size_init_bytecode): ... here, only on demand. * src/truetype/ttinterp.c (TT_Run_Context): Remove defunct debug code. (TT_New_Context): Remove `TT_ExecContext' code related to a global `TT_Driver' object. * src/truetype/ttinterp.h: Updated. * src/truetype/ttgload.c (TT_Hint_Glyph, tt_loader_init): Updated. 2015-01-14 Behdad Esfahbod <behdad@behdad.org> [autofit] Allocate AF_Loader on the stack instead of AF_Module. Stop sharing a global `AF_Loader'. Allocate one on the stack during glyph load. Right now this results in about 25% slowdown, to be fixed in a following commit. With this patch loading glyphs from different faces from different threads doesn't immediately crash in the autohinting loader code. Bugs: https://bugzilla.redhat.com/show_bug.cgi?id=1164941 * src/autofit/afloader.c (af_loader_init): Pass `AF_Loader' and `FT_Memory' instead of `AF_Module' as arguments. (af_loader_reset, af_loader_load_glyph): Also pass `loader' as argument. (af_loader_done): Use `AF_Loader' instead of `AF_Module' as argument. * src/autofit/afmodule.c (af_autofitter_init): Don't call `af_loader_init'. (af_autofitter_done): Don't call `af_loader_done'. (af_autofitter_load_glyph): Use a local `AF_Loader' object. * src/autofit/afloader.h: Include `afmodule.h'. Update prototypes. Move typedef for `AF_Module' to... * src/autofit/afmodule.h: ... this place. No longer include `afloader.h'. 2015-01-14 Behdad Esfahbod <behdad@behdad.org> * src/type42/t42objs.h (T42_DriverRec): Remove unused member. 2015-01-12 Werner Lemberg <wl@gnu.org> Fix Savannah bug #43976. Assure that FreeType's internal include directories are found before `CPPFLAGS' (which might be set by the user in the environment), and `CPPFLAGS' before `CFLAGS'. * builds/freetype.mk (FT_CFLAGS): Don't add `INCLUDE_FLAGS'. (FT_COMPILE): Make this a special variable for compiling only the files handled in `freetype.mk'. (.c.$O): Removed, unused. * src/*/rules.mk (*_COMPILE): Fix order of include directories. 2015-01-11 Werner Lemberg <wl@gnu.org> [truetype] Prettifying. * src/truetype/ttinterp.c (project, dualproj, fast_project, fast_dualproj): Rename to... (PROJECT, DUALPROJ, FAST_PROJECT, FAST_DUALPROJ): ... this. 2015-01-11 Werner Lemberg <wl@gnu.org> * src/truetype/ttinterp.c (Ins_JROT, Ins_JROF): Simplify. Based on a patch from Behdad. 2015-01-11 Werner Lemberg <wl@gnu.org> * src/truetype/ttinterp.c (Ins_SxVTL): Simplify function call. 2015-01-11 Werner Lemberg <wl@gnu.org> * src/truetype/ttinterp.c (Normalize): Remove unused argument. 2015-01-11 Werner Lemberg <wl@gnu.org> [truetype] More macro expansions. * src/truetype/ttinterp.c (FT_UNUSED_EXEC): Remove macro by expansion. 2015-01-11 Werner Lemberg <wl@gnu.org> [truetype] More macro expansions. * src/truetype/ttinterp.c (INS_ARG): Remove macro by expansion, adjusting function calls where necessary. (FT_UNUSED_ARG): Removed, no longer needed. 2015-01-10 Werner Lemberg <wl@gnu.org> [truetype] More macro expansions. Based on a patch from Behdad. * src/truetype/ttinterp.c (DO_*): Expand macros into corresponding `Ins_*' functions. (TT_RunIns): Replace `DO_*' macros with `Ins_*' function calls. (ARRAY_BOUND_ERROR): Remove second definition, which is no longer needed. (Ins_SVTCA, Ins_SPVTCA, Ins_SFVTCA): Replaced with... (Ins_SxyTCA): New function. 2015-01-10 Werner Lemberg <wl@gnu.org> [truetype] Remove TT_CONFIG_OPTION_INTERPRETER_SWITCH. Behdad suggested this code simplification, and nobody objected... * include/config/ftoption.h, devel/ftoption.h (TT_CONFIG_OPTION_INTERPRETER_SWITCH): Remove. * src/truetype/ttinterp.c [TT_CONFIG_OPTION_INTERPRETER_SWITCH]: Remove related code. (ARRAY_BOUND_ERROR): Use do-while loop. 2015-01-10 Werner Lemberg <wl@gnu.org> [truetype] More macro expansions. * src/truetype/ttinterp.c, src/truetype/ttinterp.h (EXEC_ARG_, EXEC_ARG): Remove by replacing with expansion. 2015-01-10 Werner Lemberg <wl@gnu.org> [truetype] More macro expansions. Based on a patch from Behdad. * src/truetype/ttinterp.c (SKIP_Code, GET_ShortIns, NORMalize, SET_SuperRound, ROUND_None, INS_Goto_CodeRange, CUR_Func_move, CUR_Func_move_orig, CUR_Func_round, CUR_Func_cur_ppem, CUR_Func_read_cvt, CUR_Func_write_cvt, CUR_Func_move_cvt, CURRENT_Ratio, INS_SxVTL, COMPUTE_Funcs, COMPUTE_Round, COMPUTE_Point_Displacement, MOVE_Zp2_Point): Remove by replacing with expansion. (Cur_Func_project, CUR_Func_dualproj, CUR_fast_project, CUR_fast_dualproj): Replace with macros `project', `dualproj', `fast_project', `fast_dualproj'. 2015-01-10 Werner Lemberg <wl@gnu.org> [truetype] More macro expansions. * src/truetype/ttinterp.c (EXEC_OP_, EXEC_OP): Remove by replacing with expansion. 2015-01-10 Werner Lemberg <wl@gnu.org> [truetype] Remove code for static TrueType interpreter. This is a follow-up patch. * src/truetype/ttinterp.c, src/truetype/ttinterp.h [TT_CONFIG_OPTION_STATIC_INTERPRETER, TT_CONFIG_OPTION_STATIC_RASTER]: Remove macros and related code. 2015-01-10 Werner Lemberg <wl@gnu.org> * src/truetype/ttinterp.c (CUR): Remove by replacing with expansion. This starts a series of patches that simplifies the code of the bytecode interpreter. ---------------------------------------------------------------------------- Copyright (C) 2015-2022 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, and distributed under the terms of the FreeType project license, LICENSE.TXT. By continuing to use, modify, or distribute this file you indicate that you have read the license and understand and accept it fully. Local Variables: version-control: never coding: utf-8 End:
whupdup/frame
real/third_party/freetype-2.12.0/docs/oldlogs/ChangeLog.26
26
gpl-3.0
176,364
2016-12-30 Werner Lemberg <wl@gnu.org> * Version 2.7.1 released. ========================= Tag sources with `VER-2-7-1'. * docs/VERSION.TXT: Add entry for version 2.7.1. * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj, builds/windows/vc2005/index.html, builds/windows/vc2008/freetype.vcproj, builds/windows/vc2008/index.html, builds/windows/vc2010/freetype.vcxproj, builds/windows/vc2010/index.html, builds/windows/visualc/freetype.dsp, builds/windows/visualc/freetype.vcproj, builds/windows/visualc/index.html, builds/windows/visualce/freetype.dsp, builds/windows/visualce/freetype.vcproj, builds/windows/visualce/index.html, builds/wince/vc2005-ce/freetype.vcproj, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/freetype.vcproj, builds/wince/vc2008-ce/index.html: s/2.7/2.7.1/, s/27/271/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1. * builds/unix/configure.raw (version_info): Set to 19:0:13. * CMakeLists.txt (VERSION_PATCH): Set to 1. 2016-12-30 Werner Lemberg <wl@gnu.org> [ftfuzzer] Replace `rand' with an xorshift algorithm. * src/tools/ftfuzzer/ftfuzzer.cc: Don't include `stdlib.h'. (Random): Implement and use a 32bit `xorshift' algorithm. 2016-12-30 Werner Lemberg <wl@gnu.org> [ftfuzzer] Restrict number of tested bitmap strikes. Malformed fonts often have large values for the number of bitmap strikes, and FreeType doesn't check the validity of all bitmap strikes in advance. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=353 * src/tools/ftfuzzer/ftfuzzer.cc: Include `stdlib.h' for `rand'. (Random): Small class to provide n randomly selected numbers (without repetition) out of the value set [1,N]. (LLVMFuzzerTestOneInput): Use it to test only up to 10 bitmap strikes. 2016-12-29 Werner Lemberg <wl@gnu.org> [truetype] Variation font API stability issues. Make some functions work before a call to `TT_Set_MM_Blend'. * src/truetype/ttgxvar.c (tt_hadvance_adjust): Exit immediately if we don't blend. (TT_Get_MM_Blend, TT_Get_Var_Design): Return default values if we don't blend. 2016-12-29 Werner Lemberg <wl@gnu.org> * src/truetype/ttgxvar.c (TT_Get_MM_Var): Check axis data. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=348 2016-12-29 Werner Lemberg <wl@gnu.org> [truetype] Tracing fixes. * src/truetype/ttgxvar.c (tt_hadvance_adjust): Emit correct information. (TT_Set_Var_Design): Fix typo. (TT_Get_Var_Design): Fix typos. 2016-12-29 Werner Lemberg <wl@gnu.org> */*: Use `0.5f' for tracing 16.16 numbers. 2016-12-29 Werner Lemberg <wl@gnu.org> [pcf] Protect against gzip bombs. Fix suggested by Kostya; reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=345 * src/pcf/pcfread.c (pcf_read_TOC): Limit number of TOC entries to 1024. 2016-12-28 Werner Lemberg <wl@gnu.org> [psnames] Only declare, not define, data in `pstables.h' (#49949). Pdfium includes `pstables.h' a second time; moving the definition from `pstables.h' to `psmodule.c' saves more than 60kByte data segment space for this case. * src/tools/glnames.py (StringTable::dump, StringTable::dump_sublist, dump_encoding, dump_array): Emit additional code to only define tables if `DEFINE_PS_TABLES' is set. * src/psnames/pstables.h: Regenerated. * src/psnames/psmodule.c (DEFINE_PS_TABLES): Define. 2016-12-28 Werner Lemberg <wl@gnu.org> [cff] Catch `blend' op in non-variant fonts. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=334 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdBLEND>: Don't allow `blend' op for non-variant fonts. 2016-12-28 Werner Lemberg <wl@gnu.org> [cff] Better check of number of blends. * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdBLEND>, src/cff/cffparse.c (cff_parse_blend): Compare number of blends with stack size. 2016-12-27 Werner Lemberg <wl@gnu.org> Documentation updates. * docs/CHANGES: Add missing information. * docs/formats.txt: Rewritten and updated. 2016-12-27 Werner Lemberg <wl@gnu.org> [truetype, type1] Implement `FT_Get_Var_Design_Coordinates'. * src/truetype/ttgxvar.c (TT_Get_Var_Design): Implement. (TT_Set_Var_Design): Fix tracing. * src/type1/t1load.c (T1_Get_Var_Design): Implement. 2016-12-24 Werner Lemberg <wl@gnu.org> * src/truetype/ttpload.c (tt_face_load_hdmx): Ignore `version'. Problem reported by 張俊芝 <418092625@qq.com>. 2016-12-24 Werner Lemberg <wl@gnu.org> * src/sfnt/ttsbit.c (tt_face_load_sbit): Allow more version values. Some fonts seem to have the `version' field in the wrong byte order. Problem reported by 張俊芝 <418092625@qq.com>. 2016-12-24 Werner Lemberg <wl@gnu.org> * src/truetype/ttpload.c (tt_face_load_loca): Sanitize table length. This trivial fix allows us to accept more fonts. Problem reported by 張俊芝 <418092625@qq.com>. 2016-12-24 Werner Lemberg <wl@gnu.org> * src/sfnt/sfobjs.c (sfnt_init_face): Fix tracing. 2016-12-22 Werner Lemberg <wl@gnu.org> * CMakeLists.txt: Make it work with cmake 2.8.11.2 (#49909). 2016-12-22 Werner Lemberg <wl@gnu.org> Ensure used preprocessor symbols are defined (#49790). * builds/unix/ftconfig.in, builds/vms/ftconfig.h, include/freetype/config/ftconfig.h: Check `__GNUC__', `__IBMC__', and `__SUNPRO_C' correctly. 2016-12-22 Werner Lemberg <wl@gnu.org> * src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Check `count'. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=308 2016-12-22 Werner Lemberg <wl@gnu.org> [cff] Protect against invalid `vsindex' and `blend' values. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=305 * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdVSINDEX, cf2_cmdBLEND>: Implement it. 2016-12-22 Werner Lemberg <wl@gnu.org> [ftfuzzer] Always use Adobe CFF engine. * src/tools/ftfuzzer/ftfuzzer.cc (FT_Global::FT_Global): Implement it. 2016-12-21 Werner Lemberg <wl@gnu.org> * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Thinko. I should really stop coding late in the evening... Thanks again to Ben for checking. 2016-12-21 Werner Lemberg <wl@gnu.org> [autofit] Support variation fonts. (This ChangeLog entry was added later on.) * src/autofit/afglobal.c (af_face_globals_free): Remove useless code. * src/base/ftmm.c (FT_Set_MM_Design_Coordinates, * FT_Set_Var_Design_Coordinates, FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): Finalize auto-hinter data to enforce recomputation. Note that this is a brute-force method which should be improved. 2016-12-21 Werner Lemberg <wl@gnu.org> * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Thinko. Don't apply deltas twice for non-phantom points. Spotted by Ben Wagner. 2016-12-21 Werner Lemberg <wl@gnu.org> [cff, truetype] Another try for #49829. * src/cff/cffdrivr.c: Don't include `FT_SERVICE_METRICS_VARIATIONS_H'. (cff_get_advances): Use `ttface->variation_support'. * src/truetype/ttdriver.c (tt_get_advances): Use `ttface->variation_support'. * src/truetype/ttgload.c (TT_Process_Simple_Glyph, load_truetype_glyph): Use `ttface->variation_support'. 2016-12-21 Werner Lemberg <wl@gnu.org> [truetype, sfnt] Introduce font variation flags to `TT_Face'. * include/freetype/internal/tttypes.h (TT_FACE_FLAG_VAR_XXX): New macros describing available functionality of various OpenType tables related to font variation. (TT_Face): New fields `variation_support' and `mvar_support', replacing and extending `use_fvar'. * src/sfnt/sfobjs.c (sfnt_init_face, sfnt_load_face): Use `variation_support'. * src/truetype/ttgxvar.c (ft_var_load_hvar): Set `variation_support' field. (TT_Vary_Apply_Glyph_Deltas): Updated. 2016-12-21 Werner Lemberg <wl@gnu.org> [base] Improve sanity check for Mac resources (#49888). * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Abort if `rlen' is not positive. 2016-12-20 Werner Lemberg <wl@gnu.org> [base] More sanity checks for Mac resources. We use https://github.com/kreativekorp/ksfl/wiki/Macintosh-Resource-File-Format and https://developer.apple.com/legacy/library/documentation/mac/pdf/MoreMacintoshToolbox.pdf#page=151 as references. * include/freetype/internal/ftrfork.h (FT_RFork_Ref): Use FT_Short for `res_id'. * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Extract map length and use it to improve sanity checks. Follow the specification more closely;in particular, all data types are signed, not unsigned. (FT_Raccess_Get_DataOffsets): Follow the specification more closely; in particular, all data types are signed, not unsigned. Add some sanity checks. 2016-12-20 Werner Lemberg <wl@gnu.org> [truetype] Improve logic for getting fast advance widths. * src/cff/cffdrivr.c (cff_get_advances), src/truetype/ttdriver.c (tt_get_advances): Use `is_default_instance' for test; this gets recomputed after changing blend coordinates. 2016-12-20 Ben Wagner <bungeman@google.com> Werner Lemberg <wl@gnu.org> [truetype] Fix linear metrics of GX variation fonts (#49829). When asking for an unhinted non-default variations, `linearVertAdvance' is currently the value from the `hmtx' table instead of the actual value after applying the variation. `HVAR' support fixes this, but fonts will exist without that table and will need sane fallback. Problem also reported as https://bugs.chromium.org/p/skia/issues/detail?id=5917 * src/truetype/ttgload.c (TT_Process_Simple_Glyph, load_truetype_glyph): Implement linear advance adjustments if `HVAR' or `VVAR' tables are missing. 2016-12-20 Werner Lemberg <wl@gnu.org> [cff, truetype] Fast advance width retrieval for fonts with HVAR. Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Don't handle MM. * src/cff/cffdrivr.c: Include FT_SERVICE_METRICS_VARIATIONS_H. (cff_get_advances): Test for HVAR and VVAR. * src/truetype/ttdriver.c (tt_get_advances): Test for HVAR and VVAR. 2016-12-18 Werner Lemberg <wl@gnu.org> [base] Fix invalid mac font recursion. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=304 * src/base/ftobjs.c (FT_Open_Face): Code moved to... (ft_open_face_internal): ... this function. Add a parameter to control whether we try special Mac font handling in case of failure. (FT_Open_Face, FT_New_Face, FT_New_Memory_Face, open_face_from_buffer): Use `ft_open_face_internal'. 2016-12-18 Werner Lemberg <wl@gnu.org> * src/cff/cffobjs.c (cff_face_init): Make named instances work. 2016-12-18 Werner Lemberg <wl@gnu.org> [truetype, cff] Extend `get_var_blend' function of MM service. In particular, we need access to named instance data. * include/freetype/internal/services/svmm.h (FT_Get_Var_Blend_Func): Add argument for `FT_MM_Var'. * src/cff/cffload.c (cff_get_var_blend): Updated. * src/cff/cffload.h: Updated. * src/cff/cf2ft.c (cf2_getNormalizedVector): Updated. * src/truetype/ttgxvar.c (tt_get_var_blend): Updated. Accept value `NULL' for arguments. * src/truetype/ttgxvar.h: Updated. 2016-12-18 Werner Lemberg <wl@gnu.org> [sfnt] Handle `fvar' with zero axes as a non-MM font. This is better behaviour than exiting with an error. * include/freetype/internal/tttypes.h (TT_Face): Add `use_fvar' field. * src/sfnt/sfobjs.c (sfnt_init_face): Compute `use_fvar', also updating the validation code. Use `use_fvar' to compute FT_FACE_FLAG_MULTIPLE_MASTERS. * src/truetype/ttgxvar.c (TT_Get_MM_Var): Remove `fvar' validation code. 2016-12-18 Werner Lemberg <wl@gnu.org> Minor GX code shuffling. * include/freetype/internal/tttypes.h (TT_Face): Move `is_default_instance' into TT_CONFIG_OPTION_GX_VAR_SUPPORT block. * src/sfnt/sfobjs.c (sfnt_init_face): Updated. * src/truetype/ttgload.c (IS_DEFAULT_INSTANCE): New macro. (TT_Load_Glyph): Use it. 2016-12-18 Werner Lemberg <wl@gnu.org> [cff] Better handling of non-CFF font formats. * src/cff/cffload.c (cff_font_load): Pure CFFs don't have a signature, so return `FT_Err_Unknown_File_Format' more often. 2016-12-17 Werner Lemberg <wl@gnu.org> * src/cff/cffload.c (cff_build_blend_vector): Remove redundant code. 2016-12-17 Werner Lemberg <wl@gnu.org> * src/truetype/ttobjs.c (tt_face_init): Simplify conditional code. 2016-12-17 Werner Lemberg <wl@gnu.org> [sfnt, truetype] Various sanitizing fixes. * src/sfnt/sfobjs.c (sfnt_init_face): If the axis count in `fvar' is zero, set `num_instances' to zero. * src/truetype/ttgxvar.c (TT_Get_MM_Var): Handle `fvar' table with zero axes as invalid. * src/truetype/ttobjs.c (tt_face_init): Improve logic of loading `loca', `cvt', `fpgm', and `prep' table. 2016-12-17 Werner Lemberg <wl@gnu.org> Improve tracing of `FT_Open_Face'. * src/base/ftobjs.c (FT_Open_Face): Return info on number of available faces and numbered instances, or the indices of the requested face and numbered instance. * src/sfnt/sfobjs. (sfnt_open_font): Trace number of subfonts. 2016-12-17 Werner Lemberg <wl@gnu.org> * src/cff/cffload.c (cff_load_private_dict): Always init `blend'. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=295 2016-12-16 Werner Lemberg <wl@gnu.org> [truetype] Fix `cvar' sanity test. Reported by Dave Arnold. * src/truetype/ttgxvar.c (tt_face_vary_cvt): Use tuple count mask. 2016-12-16 Werner Lemberg <wl@gnu.org> [cff, truetype] Remove compiler warnings; fix `make multi'. * src/cff/cf2font.h: Include `cffload.h'. * src/cff/cffload.c: Include FT_MULTIPLE_MASTERS_H and FT_SERVICE_MULTIPLE_MASTERS_H. (cff_vstore_load): Eliminate `vsSize'. (cff_load_private_dict): Tag as `FT_LOCAL_DEF'. * src/cff/cffload.h: Include `cffobjs.h'. Provide declaration for `cff_load_private_dict'. * src/truetype/ttgxvar.c (ft_var_load_hvar): Eliminate `minorVersion' and `map_offset'. 2016-12-16 Werner Lemberg <wl@gnu.org> [cff] Fix heap buffer overflow (#49858). * src/cff/cffparse.c (cff_parser_run): Add one more stack size check. 2016-12-15 Werner Lemberg <wl@gnu.org> Fix clang warnings. * src/cff/cffload.c (cff_blend_doBlend): Add cast. (cff_subfont_load): Set `error' correctly. * src/sfnt/ttmtx.c (tt_face_get_metrics): Typo. 2016-12-15 Dave Arnold <darnold@adobe.com> Werner Lemberg <wl@gnu.org> [cff] Implement CFF2 support (2/2). The font variation code. All parts dependent on the GX code in the `truetype' module are guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. In other words, you can still compile the `cff' module without defining TT_CONFIG_OPTION_GX_VAR_SUPPORT (which brings you CFF2 support without font variation). * src/cff/cf2font.c (cf2_font_setup): Add support for font variation. * src/cff/cf2font.h (CF2_Font): Add fields for variation data. * src/cff/cf2ft.c (cf2_free_instance): Free blend data. (cf2_getVStore, cf2_getNormalizedVector): New functions. * src/cff/cf2ft.h: Updated. * src/cff/cf2intrp.c: Include `cffload.h'. (cf2_cmdRESERVED_15, cf2_cmdRESERVED_16): Replace with... (cf2_cmdVSINDEX, cf2_cmdBLEND): ... this new enum values. (cf2_doBlend): New function. (cf2_interpT2CharString): Handle `vsindex' and `blend' opcodes. * src/cff/cffload.c (FT_fdot14ToFixed): New macro. (cff_vstore_done, cff_vstore_load): New functions. (cff_blend_clear, cff_blend_doBlend, cff_blend_build_vector, cff_blend_check_vector): New functions. (cff_load_private_dict): Add arguments for blend vector. Handle blend data. (cff_subfont_load, cff_subfont_done): Updated. (cff_font_load): Handle CFF2 variation store data. (cff_font_done): Updated. * src/cff/cffload.h: Include `cffparse.h'. Updated. * src/cff/cffobjs.c (cff_face_done): Updated. * src/cff/cffparse.c: Include `cffload.h'. (cff_parse_num): Handle internal value 255. (cff_parse_vsindex, cff_parse_blend): New functions. (CFF_FIELD_BLEND): New macro. (cff_parser_run): Updated. * src/cff/cffparse.h (cff_kind_blend): New enum value. * src/cff/cfftoken.h: Handle `vstore', `vsindex', and `blend' dictionary values. * src/cff/cfftypes.h (CFF_VarData, CFF_AxisCoords, CFF_VarRegion, CFF_VStore, CFF_Blend): New structures. (CFF_FontRecDict): Add `vstore_offset' field. (CFF_Private): Add `vsindex' field. (CFF_SubFont): Add fields for blend data. (CFF_Font): Add `vstore' field. * src/truetype/ttgxvar.c (TT_Get_MM_Var): `CFF2' is equal to `gvar', since glyph variation data is directly embedded. (TT_Set_MM_Blend): Don't load `gvar' table for CFF2 fonts. 2016-12-15 Dave Arnold <darnold@adobe.com> Werner Lemberg <wl@gnu.org> [cff] Implement CFF2 support (1/2). This commit does not contain the blend code for font variation support, which follows in another commit. You should ignore whitespace while inspecting this commit. * include/freetype/internal/tttypes.h (TT_Face): Add `isCFF2' member. * src/cff/cf2font.h (CF2_Font): Add `isCFF2' member. * src/cff/cf2ft.c (cf2_decoder_parse_charstrings): Handle `isCFF2' flag. (cf2_getMaxstack): New function. * src/cff/cf2ft.h: Updated. * src/cff/cf2intrp.c (cf2_escRESERVED_38): New enum. (cf2_interpT2CharString): Handle CFF2 differences. Add tracing message for errors. * src/cff/cffdrivr.c (cff_get_glyph_name, cff_get_name_index): Update for CFF2. * src/cff/cffload.c (FT_FIXED_ONE): New macro. (cff_index_init, cff_index_load_offsets, cff_index_access_element, cff_index_get_name, cff_ft_select_get, cff_load_private_dict, cff_subfont_load, cff_font_load): Handle CFF2. * src/cff/cffload.h: Updated. * src/cff/cffobjs.c (cff_face_init): Handle CFF2. * src/cff/cffparse.c (cff_parse_maxstack): New function. (CFFCODE_TOPDICT, CFFCODE_PRIVATE): Removed * src/cff/cffparse.h (CFF2_MAX_STACK, CFF2_DEFAULT_STACK): New macros. (CFF2_CODE_TOPDICT, CFF2_CODE_FONTDICT, CFF2_CODE_PRIVATE): New macros. * src/cff/cfftoken.h: Add fields for CFF2 dictionaries (but no blend stuff). * src/cff/cfftypes.h (CFF_Index): Add `hdr_size' field. (CFF_FontRecDict): Add `maxstack' field. (CFF_Private): Add `subfont' field. (CFF_Font): Add `top_dict_length' and `cff2' fields. * src/sfnt/sfobjs.c (sfnt_load_face): Handle `CFF2' table. 2016-12-15 Werner Lemberg <wl@gnu.org> Dave Arnold <darnold@adobe.com> [truetype] Provide HVAR advance width variation as a service. Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. * src/truetype/ttdriver.c (tt_service_metrics_variations): Updated. * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Prevent double adjustment of advance width. * src/sfnt/ttmtx.c: Include FT_SERVICE_METRICS_VARIATIONS_H. (tt_face_get_metrics): Apply metrics variations. 2016-12-15 Dave Arnold <darnold@adobe.com> Werner Lemberg <wl@gnu.org> [truetype] Provide function to apply `HVAR' advance width variation. Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. * src/truetype/ttgxvar.c (tt_hadvance_adjust): New function. * src/truetype/ttgxvar.h: Updated. 2016-12-15 Dave Arnold <darnold@adobe.com> Werner Lemberg <wl@gnu.org> [truetype] Add `HVAR' table parsing. Note that this is not complete yet; it only handles advance width variation. Activation of the code follows in another commit. Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. * include/freetype/ftmm.h (FT_Var_Named_Style): Add `psid' member. * src/truetype/ttgxvar.h (GX_HVarData, GX_AxisCoords, GX_HVarRegion, GX_HVStore, GX_WidthMap): New auxiliary structures for... (GX_HVarTable): ... HVAR main structure. (GX_BlendRec): Add data for HVAR loading. * src/truetype/ttgxvar.c (FT_FIXED_ONE, FT_fdot14ToFixed, FT_intToFixed, FT_fixedToInt): New macros. (ft_var_load_hvar): New function. (TT_Get_MM_Var): Updated. (tt_done_blend): Deallocate HVAR data. 2016-12-15 Dave Arnold <darnold@adobe.com> [cff] Extend number parsing. The forthcoming CFF2 support needs a dynamic parsing limit. * src/cff/cffparse.c (cff_parse_num, do_fixed, cff_parse_fixed, cff_parse_fixed_scaled, cff_parse_fixed_dynamic): Add argument for parser. (cff_parse_font_matrix, cff_parse_font_bbox, cff_parse_private_dict, cff_parse_multiple_master, cff_parse_cid_ros, cff_parser_run): Updated. * src/cff/cffparse.h (cff_parse_num): Export locally. 2016-12-15 Dave Arnold <darnold@adobe.com> [cff] Implement dynamic stack size for Adobe engine. This also adds `cf2_stack_setReal' and `cf2_stack_pop', needed for the forthcoming CFF2 support. * src/cff/cf2stack.c (cf2_stack_init): Add argument for stack size. (cf2_stack_free): Deallocate stack. (cf2_stack_count, cf2_stack_pushInt, cf2_stack_pushFixed, cf2_stack_popInt, cf2_stack_popFixed, cf2_stack_getReal, cf2_stack_clear): Updated. (cf2_stack_setReal, cf2_stack_pop): New functions. * src/cff/cf2stack.h (CF2_Stack): Add `stackSize' member. Update function declarations. * src/cff/cf2intrp.c (cf2_interpT2CharString): Updated. * src/cff/cffparse.c (cff_parser_init): Add parameter for stack size; return error code. (cff_parser_done): New function. (cff_parser_run): Updated. * src/cff/cffparse.h (CFF_Parser): Add `stackSize' member and make `stack' a pointer. Update function declarations. * src/cff/cffload.c (cff_load_private_dict, cff_subfont_load): Updated. 2016-12-15 Dave Arnold <darnold@adobe.com> Werner Lemberg <wl@gnu.org> [cff] Code shuffling. * src/cff/cfftypes.h (CFF_Font): Add `library' and `base_offset' fields. * src/cff/cffload.c (cff_subfont_load): Change last argument to `CFF_Font' Split off parsing of private dictionary into... (cff_load_private_dict): ...this new function. (cff_font_load): Updated. 2016-12-14 Werner Lemberg <wl@gnu.org> [sfnt, truetype] Add framework for Metrics Variations service. No effect yet; service functions will be implemented later on. Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. * include/freetype/internal/services/svmetric.h: New file. * include/freetype/internal/ftserv.h (FT_SERVICE_METRICS_VARIATIONS_H): New macro. * include/freetype/internal/tttypes.h (TT_Face): New field `var'. * src/sfnt/sfobjs.c: Include FT_SERVICE_METRICS_VARIATIONS_H. (sfnt_init_face): Initialize `face->var'. * src/truetype/ttdriver.c: Include FT_SERVICE_METRICS_VARIATIONS_H. (tt_service_metrics_variations): New service. (tt_services): Updated. * src/truetype/ttpic.h: Updated. 2016-12-14 Werner Lemberg <wl@gnu.org> [cff] Add Multiple Masters service. The code simply uses the MM functions from the `truetype' module. Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. * include/freetype/internal/tttypes.h (TT_Face): New field `mm'. * src/cff/cffdrivr.c: Include FT_SERVICE_MULTIPLE_MASTERS_H. (cff_set_mm_blend, cff_get_mm_blend, cff_get_mm_var, cff_set_var_design, cff_get_var_design): New functions. (cff_service_multi_masters): New service. (cff_services): Updated. * src/cff/cffload.c (cff_get_var_blend, cff_done_blend): New functions. * src/cff/cffload.h: Updated. * src/cff/cffpic.h (CFF_SERVICE_MULTI_MASTERS_GET): New macro. * src/sfnt/sfobjs.c: Include FT_SERVICE_MULTIPLE_MASTERS_H. (sfnt_init_face): Initialize `face->mm'. 2016-12-14 Werner Lemberg <wl@gnu.org> Extend functionality of `ft_module_get_service'. It can now differentiate between local and global searches. * src/base/ftobjs.c (ft_module_get_service): Add `global' argument. (FT_Get_TrueType_Engine_Type): Updated. * src/cff/cffdrivr.c (cff_get_ps_name, cff_get_cmap_info): Updated. * include/freetype/internal/ftobjs.h: Updated. * include/freetype/internal/ftserv.h (FT_FACE_FIND_GLOBAL_SERVICE): Updated. 2016-12-14 Werner Lemberg <wl@gnu.org> * src/truetype/ttgxvar.c (tt_get_var_blend): Fix compiler warning. 2016-12-14 Dave Arnold <darnold@adobe.com> Werner Lemberg <wl@gnu.org> [sfnt, cff] Minor preparations. * include/freetype/tttags.h (TTAG_CFF2, TTAG_HVAR, TTAG_MVAR, TTAG_VVAR): New SFNT table tags. * src/cff/cf2fixed.h (CF2_FIXED_ONE, CF2_FIXED_EPSILON): Add cast. 2016-12-10 Werner Lemberg <wl@gnu.org> [truetype, type1] Add `get_var_blend' to MM service. For internal use; we want to share code between the forthcoming CFF2 support and TrueType. * include/freetype/internal/services/svmm.h (FT_Get_Var_Blend_Func): New typedef. (MultiMasters): Add `get_var_blend'. (FT_Service_MultiMasters): Updated. * src/truetype/ttgxvar.c (tt_get_var_blend): New function. * src/truetype/ttgxvar.h: Updated. * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated. * src/type1/t1driver.c (t1_service_multi_masters): Updated. 2016-12-10 Werner Lemberg <wl@gnu.org> [truetype, type1] Add `done_blend' to MM service. For internal use; we want to share code between the forthcoming CFF2 support and TrueType. * include/freetype/internal/services/svmm.h (FT_Done_Blend_Func): New typedef. (MultiMasters): Add `done_blend'. (FT_Service_MultiMasters): Updated. * src/truetype/ttgxvar.c (tt_done_blend): Use `TT_Face' as argument. * src/truetype/ttgxvar.h: Updated. * src/truetype/ttobjs.c (TT_Face_Done): Updated. * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated. * src/type1/t1driver.c (t1_service_multi_masters): Updated. 2016-12-09 Werner Lemberg <wl@gnu.org> [sfnt] Revert change from 2016-12-08. I missed the functionality of `ft_module_get_service', which makes the change unnecessary. 2016-12-08 Werner Lemberg <wl@gnu.org> Add framework to support services with 8 functions. We will need this for CFF variation font support. * include/freetype/internal/ftserv.h (FT_DEFINE_SERVICEDESCREC8): New macro. 2016-12-08 Werner Lemberg <wl@gnu.org> [sfnt] Add `get_glyph_name' and `get_name_index' to SFNT interface. CFF2 fonts will need access to those two functions. * include/freetype/internal/sfnt.h: Include FT_SERVICE_GLYPH_DICT_H. (SFNT_Interface): Add `get_glyph_name' and `get_name_index' members. (FT_DEFINE_SFNT_INTERFACE): Updated. * src/sfnt/sfdriver.c (sfnt_get_glyph_name, sfnt_get_name_index): Fix signatures to exactly correspond to the glyph dict service function typedefs. (sfnt_interface): Updated. 2016-12-06 Dave Arnold <darnold@adobe.com> Add `FT_Get_Var_Design_Coordinates' function. Note that the low-level functions aren't implemented yet. * include/freetype/ftmm.h: Declare. * include/freetype/internal/services/svmm.h (FT_Get_Var_Design_Func): New typedef. (MultiMasters): New MM service function `get_var_design'. (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated. Update all callers. * src/base/ftmm.c (FT_Get_Var_Design_Coordinates): Implement. * src/truetype/ttdriver.c: Updated. * src/truetype/ttgxvar.c (TT_Get_Var_Design): New dummy function to handle `get_var_design' service. * src/truetype/ttgxvar.h: Updated. * src/type1/t1driver.c: Updated. * src/type1/t1load.c (T1_Get_Var_Design): New dump function to handle `get_var_design' service. * src/type1/t1load.h: Updated. 2016-12-06 Werner Lemberg <wl@gnu.org> * src/type1/t1load.c (parse_subrs): Fix memory leak. The `subrs' keyword might erroneously occur multiple times. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=231 2016-12-01 Werner Lemberg <wl@gnu.org> [gzip] Improve building with external zlib (#49673). Building FreeType with external zlib 1.2.8 makes msvc 14 stop with the following error. ftgzip.c zlib-1.2.8\zlib.h(86): error C2061: syntax error: identifier 'z_const' zlib-1.2.8\zlib.h(94): error C2054: expected '(' to follow 'z_const' zlib-1.2.8\zlib.h(94): error C2085: 'msg': not in formal parameter list ... zlib-1.2.8\zlib.h(877): fatal error C1003: error count exceeds 100; stopping compilation The error happens because FreeType keeps an own copy of zlib-1.1.4 under `src/gzip'. When building `src/gzip/ftgzip.c' with FT_CONFIG_OPTION_SYSTEM_ZLIB defined, it uses #include <zlib.h> which correctly finds an external `zlib.h', but `zlib.h' itself has a line #include "zconf.h" which makes Visual Studio 2015 find `src/gzip/zconf.h' while compiling the files in `src/gzip'. * src/gzip/zconf.h: Rename to... * src/gzip/ftzconf.h: ... this. * src/gzip/zlib.h, src/gzip/rules.mk (GZIP_DRV_SRCS): Updated. 2016-12-01 Oleksandr Chekhovskyi <oleksandr.chekhovskyi@gmail.com> [autofit] Fix Emscripten crash (patch #9180). Function calls through pointers must use a matching signature to work on Emscripten, since such calls are dispatched through lookup tables grouped by signature. * src/autofit/aftypes.h (AF_WritingSystem_ApplyHintsFunc): Fix typedef. 2016-11-29 Werner Lemberg <wl@gnu.org> [smooth] Revert previous commit. Already fixed with 6ca54c64. 2016-11-29 Werner Lemberg <wl@gnu.org> [smooth] Avoid conditional jump on uninitialized value (#49711). * src/smooth/ftgrays.c (gray_raster_render): Initialize `worker'. 2016-11-27 Nikolaus Waxweiler <madigens@gmail.com> [autofit] Code shuffling. Also improve some comments and remove unused code. No functional change. * src/autofit/afloader.c (af_loader_load_g): Merged with... (af_loader_load_glyph): ...this function. Split off emboldening code into... (af_loader_embolden_glyph_in_slot): ... this function. 2016-11-17 Werner Lemberg <wl@gnu.org> Better support of LLP64 systems with gcc (and clang). * builds/unix/configure.raw: Call `AC_TYPE_LONG_LONG_INT'. * builds/unix/ftconfig.in (FT_LONG64): Enable for LLP64 systems (and suppress warnings) even without `FT_CONFIG_OPTION_FORCE_INT64'. 2016-11-10 Werner Lemberg <wl@gnu.org> Fix `lcd_weights' array size. * include/freetype/internal/ftobjs.h (FT_LibraryRec): Do it. Reported by Nikolaus. 2016-11-06 Werner Lemberg <wl@gnu.org> * src/base/ftobjs.c (FT_Render_Glyph_Internal): Fix tracing. 2016-11-06 Werner Lemberg <wl@gnu.org> [sfnt] Improve FT_LOAD_BITMAP_METRICS_ONLY for `sbix' format. It's unavoidable to call the PNG engine, but to get the metrics it is sufficient to read the PNG image's header only. * src/sfnt/pngshim.c (Load_SBit_Png): Add argument to control the allocation of the glyph slot. * src/sfnt/pngshim.h: Updated. * src/sfnt/ttsbit.c (tt_sbit_decoder_load_png, tt_face_load_sbix_image, tt_face_load_sbit_image): Updated. 2016-11-06 Werner Lemberg <wl@gnu.org> [sfnt] Speed up `sbix' lookup. This also fixes a bug introduced in 2016-10-01 which prevents display of embedded bitmap fonts that use the `sbix' format. * src/sfnt/ttsbit.c (tt_face_load_sbit): Store `sbix' size and offset also in `ebdt_size' and `ebdt_start', respectively. This makes the test for an embedded bitmap data table succeed for this format. (tt_face_load_strike_metrics) <TT_SBIT_TABLE_TYPE_SBIX>: Use `ebdt_size' and `ebdt_start' (tt_face_load_sbix_image): Ditto. 2016-11-06 Seigo Nonaka <nona@google.com> Werner Lemberg <wl@gnu.org> Introduce a way of quickly retrieving (embedded) bitmap metrics. `FT_Load_Glyph' doesn't generate a bitmap for a non-bitmap glyph until the user calls `FT_Render_Glyph'. However, it always allocates memory for bitmaps and copies or decodes the contents of a bitmap glyph, which can be quite slow for PNG data. * include/freetype/freetype.h (FT_LOAD_BITMAP_METRICS_ONLY): New macro. * src/base/ftobjs.c (FT_Load_Glyph): Unset FT_LOAD_RENDER if FT_LOAD_BITMAP_METRICS_ONLY is used. * src/sfnt/ttsbit.c (tt_sbit_decoder_alloc_bitmap, tt_sbit_decoder_load_bitmap): Add argument to control allocation of the glyph slot. (tt_sbit_decoder_load_image, tt_sbit_decoder_load_compound, tt_face_load_sbit_image): Updated. * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Quickly exit if `FT_LOAD_BITMAP_METRICS_ONLY' is set. * src/pfr/pfrsbit.c, src/pfr/pfrsbit.h (pfr_slot_load_bitmap): Add argument to control allocation of the glyph slot. * src/pfr/pfrobjs (pfr_slot_load): Updated. * src/winfonts/winfnt.c (FNT_Load_Glyph): Ditto. * docs/CHANGES: Updated. 2016-11-06 Werner Lemberg <wl@gnu.org> Synchronize with gnulib (#49448). * include/freetype/config/ftconfig.h, builds/unix/ftconfig.in, builds/vms/ftconfig.h (FT_TYPEOF): Update code to use definition in current version of `intprops.h'. Other minor synchronization to reduce code differences between the three files. 2016-11-03 Behdad Esfahbod <behdad@behdad.org> [truetype] Clamp variation requests to valid range. This is required by OpenType 1.8; it also avoids rounding surprises. * src/truetype/ttgxvar.c (TT_Set_Var_Design): Clamp design coordinates outside of the allowed range to always stay within the range instead of producing an error. 2016-10-29 Werner Lemberg <wl@gnu.org> [truetype] Remove clang warnings. * src/truetype/ttinterp.h (TT_ExecContextRec): Using `FT_ULong' for loop counter handling. * src/truetype/ttinterp.c: Updated. (Ins_SCANTYPE): Use signed constant. (TT_RunIns): Ensure `num_twilight_points' is 16bit. 2016-10-27 Werner Lemberg <wl@gnu.org> [truetype] Fix commit from 2014-11-24. Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>. * src/truetype/ttpload.c (tt_face_load_hdmx): Fix file checking logic. 2016-10-26 Werner Lemberg <wl@gnu.org> Add `FT_Get_{MM,Var}_Blend_Coordinates' functions. * include/freetype/ftmm.h: Declare. * include/freetype/internal/services/svmm.h (FT_Get_MM_Blend_Func): New typedef. (MultiMasters): New MM service function `get_mm_blend'. (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated. Update all callers. * src/base/ftmm.c (FT_Get_MM_Blend_Coordinates, FT_Get_Var_Blend_Coordinates): Implement. * src/truetype/ttdriver.c: Updated. * src/truetype/ttgxvar.c (TT_Get_MM_Blend): New function to handle `get_mm_blend' service. * src/truetype/ttgxvar.h: Updated. * src/type1/t1driver.c: Updated. * src/type1/t1load.c (T1_Get_MM_Blend): New function to handle `get_mm_blend' service. * src/type1/t1load.h: Updated. * docs/CHANGES: Document. 2016-10-26 Werner Lemberg <wl@gnu.org> * src/type1/t1load.c (parse_subrs): Fix limit check. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=81 2016-10-25 Alexei Podtelezhnikov <apodtele@gmail.com> [cff] Correct cmap format reporting (#24819). * src/cff/cffdrivr.c (cff_get_cmap_info): Throw an error on synthetic charmap instead of guessing its format and language. 2016-10-22 Werner Lemberg <wl@gnu.org> [truetype] Fix SCANTYPE instruction (#49394). * src/truetype/ttinterp.c (Ins_SCANTYPE): Only use lower 16bits. 2016-10-22 Werner Lemberg <wl@gnu.org> [sfnt] Improve handling of invalid post 2.5 tables [#49393]. * src/sfnt/ttpost.c (load_format_25): We need at least a single table entry. 2016-10-14 Werner Lemberg <wl@gnu.org> [truetype] Fix handling of `cvar' table data. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53 * src/truetype/ttgxvar.c (tt_face_vary_cvt): Ignore invalid CVT indices. 2016-10-11 Werner Lemberg <wl@gnu.org> [psaux] Fix handling of invalid flex subrs. Problem reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=52 * src/psaux/t1decode.c (t1_decoder_parse_charstrings) <op_callothersubr>: Set `flex_state' after error checking. 2016-10-11 Werner Lemberg <wl@gnu.org> * src/truetype/ttgxvar.c (tt_done_blend): Fix deallocation. 2016-10-08 Werner Lemberg <wl@gnu.org> * src/cid/cidload.c (cid_face_open): Properly propagate `error'. 2016-10-08 Werner Lemberg <wl@gnu.org> [cid] Fix parsing of subr offsets. Bug introduced 2016-05-16. * src/cid/cidparse.c (cid_parser_new): Fix off-by-one error. 2016-10-01 Werner Lemberg <wl@gnu.org> [sfnt] Disable bitmap strikes if we don't have a bitmap data table. * src/sfnt/ttsbit.c (tt_face_load_sbit): Check whether we have a bitmap data table. 2016-10-01 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Remove impossibility. * src/smooth/ftgrays.c (TWorker): Rearrange fields. (gray_convert_glyph): Remove impossible condition and clean up. 2016-09-29 Werner Lemberg <wl@gnu.org> [pcf] Enrich family name with foundry name and glyph width info. This is a very old patch from openSuSE (from 2006, submitted to FreeType in 2011) that I forgot to apply. https://build.opensuse.org/package/view_file/openSUSE:Factory/freetype2/freetype2-bitmap-foundry.patch Prepend the foundry name plus a space to the family name. There are many fonts just called `Fixed' which look completely different, and which have nothing to do with each other. When selecting `Fixed' in KDE or Gnome one gets results that appear rather random, the style changes often if one changes the size and one cannot select some fonts at all. We also check whether we have `wide' characters; all put together, we get family names like `Sony Fixed' or `Misc Fixed Wide'. * src/pcf/pcfread.c (pcf_load_font): Implement it. * docs/CHANGES: Document it. 2016-09-29 Werner Lemberg <wl@gnu.org> [ftfuzzer] Speed up. * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Don't check for embedded bitmaps if we have a non-default instance. 2016-09-29 Werner Lemberg <wl@gnu.org> [truetype] Disallow bitmap strikes for non-default instances. Also speed up access of default instances if GX variations are active. * include/freetype/internal/tttypes.h (TT_FaceRec): Add `is_default_instance' member. * src/sfnt/sfobjs.c (sfnt_init_face): Initialize `is_default_instance'. * src/truetype/ttgload.c (TT_Process_Simple_Glyph, load_truetype_glyph): Add test for default instance. (TT_Load_Glyph): Load embedded bitmaps for default instance only. * src/truetype/ttgxvar.c (TT_Set_MM_Blend): Compute `is_default_instance'. 2016-09-29 Werner Lemberg <wl@gnu.org> [truetype] Clean up `TT_Face' structure. * include/freetype/internal/tttypes.h (TT_FaceRec): Remove unused fields `horz_metrics' and `vert_metrics'. Update documentation. * src/sfnt/sfobjs.c (sfnt_done_face): Updated. 2016-09-28 Werner Lemberg <wl@gnu.org> More FT_ZERO usage. * src/gxvalid/gxvcommn.c (gxv_ClassTable_validate): s/ft_memset/FT_MEM_ZERO/. * src/psaux/t1decode.c (t1_decoder_parse_charstrings): s/ft_memset/FT_ARRAY_ZERO/. * src/raster/ftraster.c (FT_ZERO): Define. (ft_black_new): Use it. * src/raster/ftrend1.c (ft_raster1_get_cbox): s/FT_MEM_ZERO/FT_ZERO/. * src/smooth/ftgrays.c (FT_ZERO): Define. (gray_raster_new): Use it. * src/smooth/ftsmooth.c (ft_smooth_get_cbox): s/FT_MEM_ZERO/FT_ZERO/. 2016-09-28 Werner Lemberg <wl@gnu.org> */*: s/FT_MEM_ZERO/FT_ZERO/ where appropriate. 2016-09-27 Werner Lemberg <wl@gnu.org> [truetype] Trace number of executed opcodes. * src/truetype/ttinterp.c (TT_RunIns): Implement it. 2016-09-27 Werner Lemberg <wl@gnu.org> [truetype] Speed up `TT_Load_Glyph'. This avoids additional calls to `tt_face_lookup_table' for the `glyf' table, which can be expensive. * include/freetype/internal/tttypes.h (TT_LoaderRec): Move `glyf_offset' field to ... (TT_FaceRec): ... this structure. * src/truetype/ttgload.c (load_truetype_glyph): Updated. (tt_loader_init): Move initialization of `glyf_offset' to ... * src/truetype/ttpload.c (tt_face_load_loca): ... this function. 2016-09-27 Werner Lemberg <wl@gnu.org> [truetype] Introduce dynamic limits for some bytecode opcodes. This speeds up FreeType's handling of malformed fonts. * src/truetype/ttinterp.c (TT_RunIns): Set up limits for the number of twilight points, the total number of negative jumps, and the total number of loops in LOOPCALL opcodes. The values are based on the number of points and entries in the CVT table. (Ins_JMPR): Test negative jump counter. (Ins_LOOPCALL): Test loopcall counter. * src/truetype/ttinterp.h (TT_ExecContext): Updated. * docs/CHANGES: Updated. 2016-09-25 Werner Lemberg <wl@gnu.org> [truetype] Sanitize only last entry of `loca' table. Without this patch, a loca sequence like `0 100000 0 100000 ...', where value 100000 is larger than the `glyf' table size, makes FreeType handle the whole `glyf' table as a single glyph again and again, which is certainly invalid (and can be very slow, too). * src/truetype/ttpload.c (tt_face_get_location): Implement. Improve tracing messages. 2016-09-25 Werner Lemberg <wl@gnu.org> * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Fix typo. 2016-09-24 Werner Lemberg <wl@gnu.org> [autofit] Tracing fixes. * src/autofit/afmodule.c (af_autofitter_load_glyph): Call dumping functions only if we actually do tracing. 2016-09-22 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Reduce divisions in the line renderer. We don't need some divisions if a line segments stays within a single row or a single column of pixels. * src/smooth/ftgrays.c (gray_render_line) [FT_LONG64]: Make divisions conditional. 2016-09-15 Alexei Podtelezhnikov <apodtele@gmail.com> * src/smooth/ftgrays.c (gray_sweep): Remove check for empty table. 2016-09-14 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Another tiny speed-up. * src/smooth/ftgrays.c (gray_find_cell): Merge into... (gray_record_cell): ... this function. 2016-09-11 Alexei Podtelezhnikov <apodtele@gmail.com> * src/smooth/ftgrays.c (gray_{find,set}_cell): Remove dubious code. 2016-09-11 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Fix valgrind warning and reoptimize. The algorithm calls `gray_set_cell' at the start of each new contour or when the contours cross the cell boundaries. Double-checking for that is wasteful. * src/smooth/ftgrays.c (gray_set_cell): Remove check for a new cell. (gray_convert_glyph): Remove initialization introduced by 44b172e88. 2016-09-10 Werner Lemberg <wl@gnu.org> [sfnt] Fix previous commit. Problems reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40 We now map the strike index right before accessing the physical data, not earlier. * src/sfnt/sfobjs.c (sfnt_load_face): Set `face->sbit_strike_map' after creating the map so that... * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): ... this function can be used before and after setting up `sbit_strike_map'. (tt_face_set_sbit_strike): Revert change. (tt_sbit_decoder_init, tt_face_load_sbix_image): Map strike index. * src/truetype/ttdriver.c (tt_size_select): Revert change. 2016-09-09 Werner Lemberg <wl@gnu.org> [ftfuzzer] Minor improvements. * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Ignore invalid strikes. Use better values for call to `FT_Set_Char_Size'. 2016-09-09 Werner Lemberg <wl@gnu.org> [sfnt] Don't provide (completely) broken strike data. FreeType tries to sanitize strike header data; we now reject completely broken ones. * include/freetype/internal/tttypes.h (TT_FaceRec): New `sbit_strike_map' array pointer. * src/base/ftobjs.c (FT_Match_Size): Reject matches where either width or height would be zero. Add tracing message in case of error. * src/sfnt/sfobjs.c (sfnt_load_face): Populate `sbit_strike_map', only using (more or less) valid strike header data for FT_Face's `available_sizes' array. (sfnt_done_face): Updated. * src/sfnt/ttsbit.c (tt_face_set_sbit_strike): Use `sbit_strike_map'. (tt_face_load_strike_metrics): Improve tracing. * src/truetype/ttdriver.c (tt_size_select): Use `sbit_strike_map'. 2016-09-08 Werner Lemberg <wl@gnu.org> * Version 2.7 released. ======================= Tag sources with `VER-2-7'. * docs/VERSION.TXT: Add entry for version 2.7. * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj, builds/windows/vc2005/index.html, builds/windows/vc2008/freetype.vcproj, builds/windows/vc2008/index.html, builds/windows/vc2010/freetype.vcxproj, builds/windows/vc2010/index.html, builds/windows/visualc/freetype.dsp, builds/windows/visualc/freetype.vcproj, builds/windows/visualc/index.html, builds/windows/visualce/freetype.dsp, builds/windows/visualce/freetype.vcproj, builds/windows/visualce/index.html, builds/wince/vc2005-ce/freetype.vcproj, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/freetype.vcproj, builds/wince/vc2008-ce/index.html: s/2.6.5/2.7/, s/265/27/. * include/freetype/freetype.h (FREETYPE_MINOR): Set to 7. (FREETYPE_PATCH): Set to 0. * builds/unix/configure.raw (version_info): Set to 18:6:12. * CMakeLists.txt (VERSION_MINOR): Set to 7. (VERSION_PATCH): Set to 0. * docs/CHANGES: Updated. 2016-09-08 Werner Lemberg <wl@gnu.org> * src/truetype/ttinterp.c: Include `ttgxvar.h'. This fixes the `multi' build. 2016-09-08 Werner Lemberg <wl@gnu.org> [autofit] Another improvement to Armenian support. Suggested by Hrant H Papazian <hpapazian@gmail.com>. * src/autofit/afscript.h: Use better suited characters to derive default stem widths. 2016-09-07 Alexei Podtelezhnikov <apodtele@gmail.com> * src/smooth/ftgrays.c (gray_hline): Micro-optimize. 2016-09-06 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Operate in absolute bitmap coordinates. Simpler bitmap addressing improves performance by 1.5%. * src/smooth/ftgrays.c (gray_TWorker): Remove count fields. (gray_dump_cells, gray_find_cell, gray_set_cell, gray_hline, gray_sweep, gray_convert_glyph, gray_raster_render): Updated. 2016-09-06 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Improve contour start (take 2). * src/smooth/ftgrays.c (gray_move_to): Call `gray_set_cell' directly instead of... (gray_start_cell): ... this function, which is removed. (gray_convert_glyph): Make initial y-coordinate invalid. 2016-09-06 Werner Lemberg <wl@gnu.org> [type1] MM fonts support exactly zero named instances (#48748). * src/type1/t1load.c (T1_Get_MM_Var): Set `num_namedstyles' to zero. 2016-09-06 Jonathan Kew <jfkthame@gmail.com> [cff] Fix uninitialized memory. Problem reported as https://bugzilla.mozilla.org/show_bug.cgi?id=1270288 * src/cff/cf2intrp.c (cf2_interpT2CharString): Initialize `storage' array to handle a `get' opcode without a previous `put'. 2016-09-05 Alexei Podtelezhnikov <apodtele@gmail.com> * src/smooth/ftgrays.c (gray_move_to, gray_start_cell): Revert. 2016-09-05 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Improve contour start. * src/smooth/ftgrays.c (gray_move_to): Call `gray_set_cell' directly instead of... (gray_start_cell): ... this function, which is removed. 2016-09-05 Werner Lemberg <wl@gnu.org> [cff] Fix memory initialization. * src/cff/cf2stack.c (cf2_stack_init): Use `FT_NEW'. The `Q' variants of FreeType's memory allocation macros don't do zeroing. 2016-09-05 Werner Lemberg <wl@gnu.org> [ftrandom] Minor improvements. * src/tools/ftrandom/ftrandom.c (_XOPEN_SOURCE): New macro, set to 500. * src/tools/ftrandom/Makefile (CFLAGS): Split off include directories to ... (INCLUDES): ... this new variable. (LDFLAGS): New variable. (ftrandom.o, ftrandom): Updated. 2016-09-05 Werner Lemberg <wl@gnu.org> [autofit] Improve Armenian support. Thanks to Hrant H Papazian <hpapazian@gmail.com> for help. * src/autofit/afblue.dat (AF_BLUE_STRING_ARMENIAN_*): Improve selection of characters. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. 2016-09-04 Werner Lemberg <wl@gnu.org> [ftrandom] Improve Makefile. It now supports both a normal build (`./configure && make') and a development build (`make devel'). * src/tools/ftrandom/Makefile (VPATH): Set it so that `libfreetype.a' gets searched in both `objs' (for the development build) and `objs/.libs' (for a normal build which uses libtool). (LIBS): Add missing libraries. (ftrandom.o): New rule. (ftrandom): Use automatic variables. 2016-09-03 Werner Lemberg <wl@gnu.org> [truetype] More fixes for handling of GX deltas. Problems reported by Bob Taylor <Bob.Taylor@monotype.com>. * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix rough sanity test for glyph variation array header size. Always set stream position before reading packed x and y deltas. Fix thinko w.r.t. `localpoints' array. 2016-09-03 Werner Lemberg <wl@gnu.org> [ftrandom] Various fixes. * src/tools/ftrandom/ftrandom.c (GOOD_FONTS_DIR): Provide better default. (error_fraction): Make it of type `double' to work as advertized – this was completely broken. Update all related code. (error_count, fcnt): Make it unsigned to fix compiler warnings. Update all related code. (fontlist): Change `len' member to `long' to fix compiler warnings. (FT_MoveTo, FT_LineTo, FT_ConicTo, FT_CubicTo, abort_test): Tag unused variables. (TestFace, FindFonts, copyfont, do_test): Fix compiler warnings. (ExecuteTest): Ditto. Call `FT_Done_FreeType'. (getErrorCnt): Replace `ceil' with an ordinary cast to `unsigned int'. (usage): Improve output. (main): Fix compiler warnings. * src/tools/ftrandom/README: Updated. 2016-09-03 Werner Lemberg <wl@gnu.org> [base] Avoid negative bitmap strike dimensions (#48985). * src/base/ftobjs.c (FT_Open_Face): Check whether negation was actually successful. For example, this can fail for value -32768 if the type is `signed short'. If there are problems, disable the strike. 2016-09-03 Werner Lemberg <wl@gnu.org> [cff] Avoid null pointer passed to FT_MEM_COPY (#48984). * src/cff/cffload.c (cff_index_get_name): Check `byte_len'. 2016-09-02 Werner Lemberg <wl@gnu.org> [unix] Enable 64bit support in file system access (#48962). * builds/unix/configure.raw: Call `AC_SYS_LARGEFILE'. 2016-09-02 Werner Lemberg <wl@gnu.org> [sfnt] Avoid left shift of negative value (#48980). * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bit_aligned): Use unsigned constant. 2016-09-02 Werner Lemberg <wl@gnu.org> * src/smooth/ftgrays.c (gray_hline): Fix clang compiler warnings. 2016-09-02 Werner Lemberg <wl@gnu.org> Some preparations for the next release. * include/freetype/config/ftoption.h (TT_CONFIG_OPTION_SUBPIXEL_HINTING): Enable. * docs/CHANGES: Updated. 2016-09-01 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Simplify span rendering more. It turns out that there is significant cost associated with `FT_Span' creation and calls to `gray_render_span' because it happens so frequently. This removes these steps from our internal use but leaves it alone for `FT_RASTER_FLAG_DIRECT" to preserve API. The speed gain is about 5%. * src/smooth/ftgrays.c (gray_render_span): Removed. The code is migrated to... (gray_hline): ... here. 2016-08-30 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Streamline pixmap drawing a bit more. Zero coverage is unlikely (1 out of 256) to warrant checking. This gives 0.5% speed improvement in rendering simple glyphs. * src/smooth/ftgrays.c (gray_hline, gray_render_span): Remove checks. 2016-08-29 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Streamline pixmap drawing. This gives 2% speed improvement in rendering simple glyphs. * src/smooth/ftgrays.c (TPixmap): Reduced pixmap descriptor with a pointer to its bottom-left and pitch to be used in... (gray_TWorker): ... here. (gray_render_span): Move pixmap flow check from here... (gray_raster_render): .. to here. 2016-08-27 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Reduce stack of band boundaries. * src/smooth/ftgrays.c (gray_TBand): Removed. (gray_convert_glyph): Updated to stack band boundaries concisely. 2016-08-26 Werner Lemberg <wl@gnu.org> * src/cid/cidload.c (cid_face_open): Improve handling of `SDBytes'. 2016-08-26 Werner Lemberg <wl@gnu.org> [cid] Fix commit from 2016-05-16. * src/cid/cidparse.c (cid_parser_new): Fix off-by-one errors. 2016-08-26 Werner Lemberg <wl@gnu.org> [sfnt] Cache offset and size to bitmap data table. This commit avoids `EBDT' and friends being looked up again and again while loading a single embedded bitmap. * include/freetype/internal/tttypes.h (TT_FaceRec) [TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: New fields `ebdt_start' and `ebdt_size'. * src/sfnt/ttsbit.c (tt_sbit_decoder_init): Move table lookup to ... (tt_face_load_sbit): ... this function; also store the table size and offset. 2016-08-26 Alexei Podtelezhnikov <apodtele@gmail.com> * src/smooth/ftgrays.c (gray_raster_render): Minor tweaks. 2016-08-26 Werner Lemberg <wl@gnu.org> [type1] Fix heap buffer overflow. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36 * src/type1/t1load.c (parse_charstrings): Reject fonts that don't contain glyph names. 2016-08-25 Werner Lemberg <wl@gnu.org> [sfnt] Fix previous commit (#48901). * src/sfnt/ttcmap.c (tt_cmap4_char_map_binary): Thinkos. 2016-08-25 Werner Lemberg <wl@gnu.org> [sfnt] Speed up handling of invalid format 4 cmaps. * src/sfnt/ttcmap.c (tt_cmap4_next, tt_cmap4_char_map_binary): Add tests for `num_glyph' from `tt_cmap4_char_map_linear'. 2016-08-25 Werner Lemberg <wl@gnu.org> * include/freetype/internal/ftdriver.h: Remove unused typedefs. 2016-08-22 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Simplify span rendering. This removes unnecessary complexity of span merging and buffering. Instead, the spans are rendered as they come, speeding up the rendering by about 5% as a result. * src/smooth/ftgrays.c [FT_MAX_GRAY_SPANS]: Macro removed. (gray_TWorker): Remove span buffer and related fields. (gray_sweep, gray_hline): Updated. * include/freetype/ftimage.h: Remove documentation note about `FT_MAX_GRAY_SPANS', which was never in `ftoption.h' and is now gone. 2016-08-16 Werner Lemberg <wl@gnu.org> [truetype] Fix `MPS' instruction. According to Greg Hitchcock, MPS in DWrite really returns the point size. * src/truetype/ttobjs.h (TT_SizeRec): Add `point_size' member. * src/truetype/ttdriver.c (tt_size_request): Set `point_size'. * src/truetype/ttinterp.h (TT_ExecContextRec): Add `pointSize' member. * src/truetype/ttinterp.c (TT_Load_Context): Updated. (Ins_MPS): Fix instruction. 2016-08-16 Werner Lemberg <wl@gnu.org> [lzw] Optimize last commit. * src/lzw/ftzopen.c (ft_lzwstate_get_code): Move check into conditional clause. 2016-08-16 Werner Lemberg <wl@gnu.org> [lzw] Avoid invalid left shift. Reported as https://bugzilla.mozilla.org/show_bug.cgi?id=1295366 * src/lzw/ftzopen.c (ft_lzwstate_get_code): Limit `num_bits'. 2016-08-16 Werner Lemberg <wl@gnu.org> [lzw] Avoid buffer overrun. Reported as https://bugzilla.mozilla.org/show_bug.cgi?id=1273283 * src/lzw/ftzopen.c (ft_lzwstate_refill): Ensure `buf_size' doesn't underflow. 2016-08-16 Werner Lemberg <wl@gnu.org> [truetype] Fix compiler warning. * src/truetype/ttgload.c (load_truetype_glyph): Add cast. 2016-08-13 Werner Lemberg <wl@gnu.org> [winfonts] Avoid zero bitmap width and height. Reported as https://bugzilla.mozilla.org/show_bug.cgi?id=1272173 * src/winfonts/winfnt.c (FNT_Face_Init): Check zero pixel height. (FNT_Load_Glyph): Check for zero pitch. 2016-08-11 Alexei Podtelezhnikov <apodtele@gmail.com> * src/truetype/ttinterp.c (Pop_Push_Count): Revert changes. 2016-08-11 Alexei Podtelezhnikov <apodtele@gmail.com> * src/truetype/ttinterp.c (TT_RunIns): Minor and formatting. 2016-08-11 Alexei Podtelezhnikov <apodtele@gmail.com> * src/truetype/ttinterp.c (Pop_Push_Count): Fix some entries. 2016-08-10 Peter Klotz <Peter.Klotz@ith-icoserve.com> * src/smooth/ftgrays.c (gray_hline): Fix uninitialized access. 2016-08-10 Werner Lemberg <wl@gnu.org> [sfnt] Use correct type for `italicAngle' field (#48732). * src/sfnt/ttload.c (tt_face_load_post): Fix types. 2016-08-06 Jon Spencer <jon@jonspencer.ca> [sfnt] Fix `FT_Get_Advance' for bitmap strikes. `FT_Get_Advance' returns 0 for bitmap fonts. It first gets the advance value from the font table and then scales it by the `font->size->metrics->x_scale' field. But `FT_Select_Size' doesn't set that value for bitmap fonts and the advance gets scaled to zero. Taken from https://github.com/behdad/harfbuzz/issues/252 * src/sfnt/ttsbit.c (tt_face_load_strike_metrics) <TT_SBIT_TABLE_TYPE_EBLC>: Set scale values. 2016-08-06 Behdad Esfahbod <behdad@behdad.org> [truetype] Fix GX variation handling of composites. * src/truetype/ttgload.c (load_truetype_glyph) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Check `ARGS_ARE_XY_VALUES' flag. 2016-08-05 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Minor refactoring. * src/smooth/ftgrays.c (gray_render_scanline, gray_render_line): Updated. 2016-07-29 Werner Lemberg <wl@gnu.org> [sfnt, truetype] Don't abort on invalid `maxComponentDepth'. Since 2016-05-16 we detect infinite recursion directly. * src/sfnt/ttload.c (tt_face_load_maxp): Don't adjust `maxComponentDepth'. * src/truetype/ttgload.c (load_truetype_glyph): Don't abort if `maxComponentDepth' is not valid. Instead, simply adjust its value and emit a tracing message. 2016-07-26 Werner Lemberg <wl@gnu.org> * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Minor. No functional change. 2016-07-22 Hin-Tak Leung <htl10@users.sourceforge.net> [truetype] Record the end of IDEFs. To match the logic in FDEF. The value of the end is only used for bound-checking in `Ins_JMPR', so it may not have been obvious that it was not recorded. Tested (as part of Font Validator 2.0) all the fonts on Fedora and did not see any change. * src/truetype/ttinterp.c (Ins_IDEF): Updated. 2016-07-19 Werner Lemberg <wl@gnu.org> [truetype] Sanitizer fix, second try. * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix boundary tests and use only one slot more. 2016-07-19 Werner Lemberg <wl@gnu.org> [truetype] Sanitizer fix. * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Increase array to fix nested loops. 2016-07-18 Werner Lemberg <wl@gnu.org> [truetype] Make GETDATA work only for GX fonts. * src/truetype/ttinterp.c (opcode_name): Updated. (Ins_GETDATA): Only define for `TT_CONFIG_OPTION_GX_VAR_SUPPORT'. (TT_RunIns): Updated. 2016-07-17 Werner Lemberg <wl@gnu.org> [truetype] Add support for Apple's GETDATA[], opcode 0x92 bytecode instruction. It always returns 17, and we have absolutely no idea what it is good for... * src/truetype/ttinterp.c (Pop_Push_Count, opcode_name): Updated. (Ins_GETDATA): New function. (TT_RunIns): Add it. 2016-07-16 Werner Lemberg <wl@gnu.org> [truetype] Add bytecode support for GX variation fonts. This commit implements undocumented (but confirmed) stuff from Apple's old bytecode engine. GETVARIATION[], opcode 0x91 This opcode pushes normalized variation coordinates for all axes onto the stack (in 2.14 format). Coordinate of first axis gets pushed first. GETINFO[], selector bit 3 If GX variation support is enabled, bit 10 of the result is set to 1. * src/truetype/ttinterp.c: Include FT_MULTIPLE_MASTERS_H. (opcode_name) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Updated. (Ins_GETINFO) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Handle selector bit 3, checking support for variation glyph hinting. (Ins_GETVARIATION) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: New function to implement opcode 0x91. (TT_RunIns) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Handle opcode 0x91. 2016-07-16 Werner Lemberg <wl@gnu.org> [truetype] Fix GETINFO bytecode instruction. * src/truetype/ttinterp.c (Ins_GETINFO): Fix return value for stretching information. 2016-07-16 Behdad Esfahbod <behdad@behdad.org> [truetype] Make all glyphs in `Zycon' GX font work. * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix boundary tests. 2016-07-16 Werner Lemberg <wl@gnu.org> [truetype] Fix GX delta tracing. * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Trace relative point movements. 2016-07-16 Behdad Esfahbod <behdad@behdad.org> [truetype] More fixes for GX. This finally fixes the rendering of the cyclist and the lizard in the `Zycon' font. * src/truetype/ttgxvar.c (ft_var_readpackedpoints): `first' point index is always cumulative. (tt_handle_deltas): Rename to... (tt_interpolate_deltas): ... This. Add new parameter for output point array. Update caller. (TT_Vary_Apply_Glyph_Deltas): Add `points_out' array; it now holds the intermediate results of `tt_interpolate_deltas' that are to be added to `outline->points'. 2016-07-15 Werner Lemberg <wl@gnu.org> * src/autofit/aflatin.c (af_latin_hints_compute_segments): Thinko. `max_pos' is always larger than `min_pos' so `FT_ABS' is not needed. Reported by Alexei. 2016-07-16 Nikolaus Waxweiler <madigens@gmail.com> * src/truetype/ttinterp.c (Ins_MIRP): Fix copy-and-paste error. Problem reported by Hin-Tak Leung. 2016-07-15 Werner Lemberg <wl@gnu.org> [autofit] Update and improve segment and edge tracing. * src/autofit/afhints.c (af_glyph_hints_dump_segments): Trace `delta' also. Don't show first point of segment as a replacement for `pos'; this is (a) misleading, since the difference to `pos' can be almost arbitrarily large in corner cases, and (b) it is better to have all segment data in font units instead of a single value given in output space coordinates. Improve layout. (af_glyph_hints_dump_edges): Show px->units and units->px conversion values for convenience. Improve layout. 2016-07-15 Werner Lemberg <wl@gnu.org> [autofit] For edges, reject segments wider than 1px (#41334). * src/autofit/afhints.h (AF_SegmentRec): New member `delta'. * src/autofit/aflatin.c (af_latin_hints_compute_segments): Compute `delta'. (af_latin_hints_compute_edges): Reject segments with a delta larger than 0.5px. 2016-07-14 Werner Lemberg <wl@gnu.org> * include/freetype/freetype.h (FT_IS_NAMED_INSTANCE): New macro. 2016-07-14 Werner Lemberg <wl@gnu.org> [sfnt] Fix `face_index' value in `FT_Face' for named instances. * src/sfnt/sfobjs.c (sfnt_init_face): Don't strip off higher 16bits. 2016-07-14 Werner Lemberg <wl@gnu.org> * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix tracing. 2016-07-14 Behdad Esfahbod <behdad@behdad.org> [truetype] Fix gxvar delta interpolation. The coordinates of the base font should be used for interpolation purposes, NOT the current points (i.e., the result of accumulation of previous deltas). * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Initialize `points_org' before looping over all tuples. ---------------------------------------------------------------------------- Copyright (C) 2016-2022 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, and distributed under the terms of the FreeType project license, LICENSE.TXT. By continuing to use, modify, or distribute this file you indicate that you have read the license and understand and accept it fully. Local Variables: version-control: never coding: utf-8 End:
whupdup/frame
real/third_party/freetype-2.12.0/docs/oldlogs/ChangeLog.27
27
gpl-3.0
63,133
2017-09-16 Werner Lemberg <wl@gnu.org> * Version 2.8.1 released. ========================= Tag sources with `VER-2-8-1'. * docs/VERSION.TXT: Add entry for version 2.8.1. * docs/CHANGES: Updated. * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj, builds/windows/vc2005/index.html, builds/windows/vc2008/freetype.vcproj, builds/windows/vc2008/index.html, builds/windows/vc2010/freetype.vcxproj, builds/windows/vc2010/index.html, builds/windows/visualc/freetype.dsp, builds/windows/visualc/freetype.vcproj, builds/windows/visualc/index.html, builds/windows/visualce/freetype.dsp, builds/windows/visualce/freetype.vcproj, builds/windows/visualce/index.html, builds/wince/vc2005-ce/freetype.vcproj, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/freetype.vcproj, builds/wince/vc2008-ce/index.html: s/2.8/2.8.1/, s/28/281/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1. * builds/unix/configure.raw (version_info): Set to 21:0:15. * CMakeLists.txt (VERSION_PATCH): Set to 1. 2017-09-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [sfnt] lowest gcc for vectors (e1d0249e) is changed to 4.7. __builtin_shuffle() was introduced in gcc-4.7. The lowest gcc to enable vector operation is delayed from 4.6 to 4.7. * src/sfnt/pngshim.c (premultiply_data): Fix cpp-macro to enable the vector operation, to change the lowest gcc version from 4.6 to 4.7. 2017-09-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [cache] Fix a possible overflow by signed integer comparison. Improve the code by 5d3ff05615dda6d1325ed612381a17a0df04c975 , issues are found by Behdad Esfahbod and Werner Lemberg. * src/cache/ftcbasic.c (FTC_ImageCache_Lookup): Replace a subtraction to check higher bit by a bit operation, and cpp-conditionalize for appropriate systems. Add better documentation to the comment. (FTC_ImageCache_LookupScaler): Ditto. (FTC_SBitCache_Lookup): Ditto. (FTC_SBitCache_LookupScaler): Ditto. 2017-09-13 Werner Lemberg <wl@gnu.org> [autofit] Really fix #41334 (#52000). * src/autofit/aflatin.c (af_latin_hints_compute_segments): Set `segment->delta' everywhere. 2017-09-12 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [autofit, sfnt] Fix for `make multi'. * src/autofit/afshaper.c: Include FT_ADVANCE_H, to use FT_Get_Advance() in it. * src/sfnt/ttcmap.c: Include FT_SERVICE_POSTSCRIPT_CMAPS_H to use PS_Unicodes in it, also include `ttpost.h' to use tt_face_get_ps_name() in it. 2017-09-11 Azzuro <azzuro@team-mediaportal.com> [build] Improve builds with different MS Visual Studio versions. * builds/windows/vc2010/freetype.vcxproj: Switch platform toolset according to the Visual Studio version. 2017-09-11 Werner Lemberg <wl@gnu.org> * src/sfnt/ttkern.c (tt_face_load_kern): Reject format 2 tables. Reported by Behdad. 2017-09-09 Werner Lemberg <wl@gnu.org> [autofit] Improve communication with ftgrid. * src/autofit/afhints.c (af_glyph_hints_get_segment_offset): Provide values in font units. 2017-09-08 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [base] Remove a check for resource ID in the resource fork driver. LastResort.dfont has a marginal resource ID 0xFFFF for sfnt resource. Inside Macintosh: More Macintosh Toolbox, `Resource IDs' (1-46), tells that some IDs are reserved and should not be used. FreeType2 just uses resource ID to sort the fragmented resource. To accept the marginal fonts, the checking is removed. * src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Remove res_id validity check, fix a trace message format. 2017-09-08 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [sfnt, truetype] Register the tags for marginal fonts. The first 32bit of standard TrueType variants is 0x00010000, `OTTO', `ttcf', `true' or `typ1'. 2 marginal dfonts on legacy Mac OS X, Keyboard.dfont and LastResort.dfont, have the sfnt resources starting 0xA5 followed by `kbd' or `lst'. Considering the following data could be parsed as conventional TrueType fonts, the header checking is updated to allow these tags. It seems that recent Mac OS X has already switched to normal TTF for these fonts. See the discussion at http://u88.n24.queensu.ca/exiftool/forum/index.php?topic=3931.0 * include/freetype/tttags.h (TTAG_0xA5kbd, TTAG_0xA5lst): New header tags for Keyboard.dfont and LastResort.dfont. * src/sfnt/sfobjs.c (sfnt_open_font): Accept the sfnt resource starts with TTAG_0xA5kbd or TTAG_0xA5lst. * src/truetype/ttobjs.c (tt_face_init): Accept the face with the format tag is TTAG_0xA5kbd or TTAG_0xA5lst. 2017-09-05 Werner Lemberg <wl@gnu.org> Fix multiple calls of `FT_Bitmap_Convert'. The documentation of `FT_Bitmap_Convert' says that multiple calls do proper reallocation of the target FT_Bitmap object. However, this failed for the sequence non-empty bitmap empty bitmap non-empty bitmap Reason was that `FT_Bitmap_Convert' only reallocated the bitmap buffer if it became too small; it didn't make the buffer smaller. For an empty bitmap following a non-empty one, only the buffer dimension got set to zero, without deallocation. If the next call was a non-empty buffer again, an assertion in `ft_mem_qrealloc' was triggered. * src/base/ftbitmap.c (FT_Bitmap_Convert): Always reallocate target buffer to the correct size. * docs/CHANGES: Document it. 2017-09-05 Werner Lemberg <wl@gnu.org> [bdf] Fix size and resolution handling. * src/bdf/bdfdrivr.c (BDF_Face_Init): Use `SIZE' values if `POINT_SIZE', `RESOLUTION_X', or `RESOLUTION_Y' properties are missing. * docs/CHANGES: Document it. 2017-08-25 Alexei Podtelezhnikov <apodtele@gmail.com> Swap `ALLOC_MULT' arguments (#51833). * src/base/ftbitmap.c (ft_bitmap_assure_buffer): Updated. * src/winfonts/winfnt.c (FNT_Load_Glyph): Updated. * src/raster/ftrend1.c (ft_raster1_render): Updated. 2017-08-23 Werner Lemberg <wl@gnu.org> [sfnt] Fix clang compilation (#51788). * src/sfnt/pngshim.c (premultiply_data): Use vectors instead of scalars. (vector_shuffle): New macro to take care of a different built-in function name on clang. 2017-08-22 Werner Lemberg <wl@gnu.org> [base] Don't zero out allocated memory twice (#51816). Patch applied from bug report. * src/base/ftutil.c (ft_mem_qrealloc): Use low-level allocation to avoid unnecessary overhead. 2017-08-22 Werner Lemberg <wl@gnu.org> [truetype] Integer overflow. Changes triggered by https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3107 * src/truetype/ttinterp.c (Ins_MDRP, Ins_MIRP, Ins_ALIGNPTS): Use NEG_LONG. 2017-08-17 Alexei Podtelezhnikov <apodtele@gmail.com> [sfnt] Avoid synthetic unicode for symbol fonts with PUA. Reported as https://bugs.chromium.org/p/chromium/issues/detail?id=754574 * src/sfnt/sfobjs.c (sfnt_load_face): Check for FT_ENCODING_MS_SYMBOL. 2017-08-16 Werner Lemberg <wl@gnu.org> * src/sfnt/pngshim.c (premultiply_data): Fix compiler warnings. 2017-08-15 Behdad Esfahbod <behdad@behdad.org> [sfnt] Speed up PNG image loading. This reduces the overhead of `premultiply_data' by 60%. * src/sfnt/pngshim.c (premultiply_data): Provide code which uses gcc's (and clang's) `vector_byte' attribute to process 4 pixels at a time. 2017-08-11 Werner Lemberg <wl@gnu.org> [sfnt, truetype] Improve handling of missing sbits. Requested by Behdad. Modern bitmap-only SFNTs like `NotoColorEmoji.ttf' don't contain entries in the bitmap strike(s) for empty glyphs. Instead, they rely that a space glyph gets created from the font's metrics data. This commit makes FreeType behave accordingly. * include/freetype/fterrdef.h (FT_Err_Missing_Bitmap): New error code. * src/sfnt/ttsbit.c (tt_sbit_decoder_load_image): Change error codes to make a distinction between a missing bitmap in a composite and a simple missing bitmap. * src/truetype/ttgload.c (TT_Load_Glyph): For a missing bitmap (in a bitmap-only font), synthesize an empty bitmap glyph if metrics are available. 2017-08-10 Werner Lemberg <wl@gnu.org> [base] Minor API improvement for default variation axis setting. * src/base/ftmm.c (FT_Set_MM_Design_Coordinates, FT_Set_Var_Design_Coordinates, FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): Allow coords==NULL if num_coords==0. * docs/CHANGES: Updated. 2017-08-08 Werner Lemberg <wl@gnu.org> [psnames] Really fix issue #49949. We now use a separate preprocessor macro to handle both definition and declaration of the glyph name arrays. * src/psnames/psmodule.c (DEFINE_PS_TABLE_DATA): New macro. * src/tools/glnames.py (StringTable::dump, StringTable::dump_sublist): Use `DEFINE_PS_TABLE_DATA'. (dump_encoding): Ditto. (main): Use `wb' mode for writing the output file, which works on Windows also. * src/psnames/pstables.h: Regenerated. 2017-08-08 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Harmony LCD rendering. This is a new technology for LCD-optimized rendering. It capitalizes on the fact that each color channel grid is shifted by a third of a pixel. Therefore it is logical to render 3 separate monochrome bitmaps shifting the outline by 1/3 pixel, and then combine them. Importantly, the resulting output does not require additional LCD filtering. * src/smooth/ftsmooth.c (ft_smooth_render_generic) [!FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Implement new LCD-optimized rendering. * include/freetype/ftlcdfil.h, include/freetype/freetype.h, include/freetype/config/ftoption.h, devel/ftoption.h: Updated documentation. 2017-08-08 Alexei Podtelezhnikov <apodtele@gmail.com> * src/smooth/ftsmooth.c (ft_smooth_render_generic): Clean up. 2017-08-08 Alexei Podtelezhnikov <apodtele@gmail.com> * src/sfnt/ttpost.c (format): Use otspec-compliant versions. 2017-08-05 Werner Lemberg <wl@gnu.org> [truetype] Integer overflow. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2868 * src/truetype/ttinterp.c (Ins_ALIGNRP): Use NEG_LONG. 2017-08-05 Werner Lemberg <wl@gnu.org> [base, truetype] New function `FT_Get_Var_Axis_Flags'. The reserved `flags' field got a value in OpenType version 1.8.2; unfortunately, the public `FT_Var_Axis' structure misses the corresponding element. Since we can't add a new field, we add an access function. * src/base/ftmm.c (FT_Get_Var_Axis_Flags): New function. * include/freetype/ftmm.h (FT_VAR_AXIS_FLAG_HIDDEN): New macro. Updated. * src/truetype/ttgxvar.c (TT_Get_MM_Var): Increase allocated memory of `mmvar' to hold axis flags. Fill the axis flags array. * docs/CHANGES: Updated. 2017-08-03 Nikolaus Waxweiler <madigens@gmail.com> [truetype] Fix metrics of B/W hinting in v40 mode. Phantom points are now saved outside v40 backwards compatibility mode. This fixes the jumping glyphs when switching between v35 and v40 monochrome mode. * src/truetype/ttgload.c (TT_Hint_Glyph): Fix inversed bool logic. 2017-08-03 Nikolaus Waxweiler <madigens@gmail.com> [truetype] Do not set any ClearType flags in v40 monochrome mode. This fixes weird behavior of instructions that resulted in rendering differences between v35 and v40 in monochrome mode, e.g., in `timesbi.ttf'. * src/truetype/ttinterp.c (Ins_GETINFO) [TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL]: Check `subpixel_hinting_lean'. 2017-08-01 Werner Lemberg <wl@gnu.org> * src/truetype/ttgxvar.c (TT_Get_MM_Var): Fix thinko. 2017-08-01 Behdad Esfahbod <behdad@behdad.org> [truetype] Fix loading of named instances. * src/truetype/ttgxvar.c (TT_Get_MM_Var): Preserve file position while loading the `avar' table. 2017-08-01 Werner Lemberg <wl@gnu.org> [sfnt, truetype] Minor adjustments for OpenType 1.8.2. * src/sfnt/sfobjs.c (sfnt_load_face): The units per EM value has now (tighter) limits. * src/truetype/ttgload.c (load_truetype_glyph): The new OpenType version explicitly allows all negative values for the number of contours if we have a composite glyph (this is for better backwards compatibility I guess), but it still recommends value -1. 2017-07-26 Werner Lemberg <wl@gnu.org> [cff] Integer overflow. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2738 * src/cff/cf2hints.c (cf2_glyphpath_computeOffset, cf2_glyphpath_curveTo): Use ADD_INT32. 2017-07-13 Werner Lemberg <wl@gnu.org> [base] Fix memory leak. Reported as https://bugs.chromium.org/p/chromium/issues/detail?id=738362 * src/base/ftglyph.c (FT_Get_Glyph): Do proper deallocation in case of error. 2017-07-12 Werner Lemberg <wl@gnu.org> [base] Integer overflow. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2573 * src/base/ftobjs.c (ft_glyphslot_grid_fit_metrics): Use FT_PIX_CEIL_LONG and FT_PIX_ROUND_LONG. 2017-07-12 Werner Lemberg <wl@gnu.org> * src/truetype/ttpload.c (tt_face_get_location): Off-by-one typo. Also improve tracing message. Problem reported as https://bugs.chromium.org/p/chromium/issues/detail?id=738919 2017-07-07 Werner Lemberg <wl@gnu.org> [cff] Integer overflow. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2517 * src/cff/cf2blues.c (cf2_blues_capture): Use SUB_INT32. 2017-07-05 Werner Lemberg <wl@gnu.org> * src/sfnt/ttcmap.c (tt_cmap_unicode_class_rec): Fix warning. 2017-07-05 Werner Lemberg <wl@gnu.org> * src/truetype/ttgxvar.c (FT_Stream_SeekSet): Fix warning (#51395). 2017-07-04 Werner Lemberg <wl@gnu.org> [truetype] Prevent address overflow (#51365). * src/truetype/ttgxvar.c (FT_Stream_SeekSet): Add guard. 2017-07-03 Alexei Podtelezhnikov <apodtele@gmail.com> * src/base/ftlcdfil.c (ft_lcd_filter_fir): Improve code. 2017-07-03 Werner Lemberg <wl@gnu.org> [truetype] Integer overflow. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2455 * src/truetype/ttinterp.c (Ins_SCFS): Use SUB_LONG. 2017-07-01 Alexei Podtelezhnikov <apodtele@gmail.com> * src/sfnt/sfobjs.c (sfnt_load_face): Ignore No_Unicode_Glyph_Name. 2017-06-28 Ben Wagner <bungeman@google.com> Avoid Microsoft compiler warnings (#51331). While clang's sanitizer recommends a cast to unsigned for safe negation (to handle -INT_MIN), both MSVC and Visualc emit warning C4146 if an unsigned value gets negated. * include/freetype/internal/ftcalc.h (NEG_LONG, NEG_INT32), src/base/ftcalc.c (FT_MOVE_SIGN): Replace negation with a subtraction. 2017-06-27 Werner Lemberg <wl@gnu.org> * src/cff/cffparse.c (do_fixed): Fix typo. Spotted by chris <chris@gcjd.org>. 2017-06-27 Werner Lemberg <wl@gnu.org> [truetype] Integer overflows. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2384 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2391 * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round, FT_DivFix): Use NEG_LONG. * src/truetype/ttinterp.c (Ins_SxVTL): Use NEG_LONG. 2017-06-24 Werner Lemberg <wl@gnu.org> [truetype] Integer overflows. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2364 * src/truetype/ttinterp.c (Ins_ISECT): Use NEG_LONG. 2017-06-22 Werner Lemberg <wl@gnu.org> [cff, truetype] Integer overflows. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2323 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2328 * src/cff/cf2blues.c (cf2_blues_capture): Use ADD_INT32 and SUB_INT32. * src/truetype/ttinterp.c (Ins_SDPVTL): Use SUB_LONG and NEG_LONG. 2017-06-21 Alexei Podtelezhnikov <apodtele@gmail.com> [sfnt] Synthesize a Unicode charmap if one is missing. * src/sfnt/ttcmap.h (tt_cmap_unicode_class_rec): Declare it. * src/sfnt/ttcmap.c (tt_get_glyph_name, tt_cmap_unicode_init, tt_cmap_unicode_done, tt_cmap_unicode_char_index, tt_cmap_unicode_char_next, tt_cmap_unicode_class_rec): Implement synthetic Unicode charmap class. (tt_get_cmap_info): Make sure the callback is available. * src/sfnt/sfobjs.c (sfnt_load_face) [FT_CONFIG_OPTION_POSTSCRIPT_NAMES]: If Unicode charmap is missing, synthesize one. * include/freetype/config/ftoption.h: Document it. * devel/ftoption.h: Ditto. 2017-06-20 Tony Theodore <tonyt@logyst.com> Fix pkg-config in freetype-config for cross-compiling (#51274). * builds/unix/unix-def.in (PKG_CONFIG): New variable. (freetype-config): Use it in sed expression. * builds/unix/freetype-config.in: s/pkg-config/%PKG_CONFIG%/. 2017-06-20 Werner Lemberg <wl@gnu.org> [cff, truetype] Integer overflows. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2300 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2313 * src/cff/cf2hints.c (cf2_hintmap_adjustHints): Use ADD_INT32. * src/truetype/ttinterp.c (Ins_ABS): Avoid FT_ABS. 2017-06-17 Alexei Podtelezhnikov <apodtele@gmail.com> [base, smooth] LCD filtering cleanups. * src/base/ftlcdfil.c (ft_lcd_filter_fir, _ft_lcd_filter_legacy): Clean up, start filtering from the bottom-left origin. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Updated. 2017-06-16 Werner Lemberg <wl@gnu.org> [truetype] Integer overflows. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2270 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2276 * src/truetype/ttinterp.c (Ins_MDRP, _iup_worker_interpolate): Use ADD_LONG and SUB_LONG. 2017-06-15 Werner Lemberg <wl@gnu.org> [bdf, cff] Integer overflows. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2244 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2261 * src/bdf/bdfdrivr.c (BDF_Face_Init): Replace calls to FT_ABS with direct code to avoid value negation. * src/cff/cf2blues.c (cf2_blues_capture): Use SUB_INT32 and ADD_INT32. 2017-06-13 Werner Lemberg <wl@gnu.org> * src/winfonts/winfnt.c (FNT_Face_Init): Don't set active encoding. FreeType only sets a default active encoding for Unicode. 2017-06-13 Werner Lemberg <wl@gnu.org> [cff, truetype] Integer overflows. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2216 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2218 * src/cff/cf2fixed.h (cf2_fixedAbs): Use NEG_INT32. * src/truetype/ttinterp.c (Ins_IP): Use SUB_LONG. 2017-06-11 Werner Lemberg <wl@gnu.org> [cff] Integer overflows. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2200 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2210 * src/cff/cf2hints.c (cf2_hintmap_insertHint): Use SUB_INT32 and ADD_INT32. * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdVMOVETO>: Use ADD_INT32. 2017-06-10 Werner Lemberg <wl@gnu.org> [truetype] Fix TT_Set_Var_Design. Reported by Nikolaus Waxweiler <madigens@gmail.com>. * src/truetype/ttgxvar.c (TT_Set_Var_Design): Correctly handle the case where we have less input coordinates than axes. 2017-06-10 Werner Lemberg <wl@gnu.org> * src/base/ftcalc.c (FT_DivFix): Fix embarrassing typo. Bug introduced 2017-05-28. 2017-06-09 Werner Lemberg <wl@gnu.org> [cff, truetype] Integer overflows. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2144 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2151 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2153 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2173 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2186 * src/cff/cf2blues.c (cf2_blues_init): Use SUB_INT32. * src/truetype/ttinterp.c (Round_None, Round_To_Grid, Round_To_Half_Grid, Round_Down_To_Grid, Round_Up_To_Grid, Round_To_Double_Grid, Round_Super, Round_Super_45): Use ADD_LONG, SUB_LONG, NEG_LONG, FT_PIX_ROUND_LONG, FT_PIX_CEIL_LONG, FT_PAD_ROUND_LONG (Ins_SxVTL, Ins_MIRP): Use SUB_LONG. (_iup_worker_shift): Use SUB_LONG and ADD_LONG. 2017-06-09 Werner Lemberg <wl@gnu.org> Provide more macros for flooring, ceiling, and rounding. These versions don't produce run-time errors due to integer overflow. * include/freetype/internal/ftobjs.h: Include FT_INTERNAL_CALC_H. (FT_PAD_ROUND_LONG, FT_PAD_CEIL_LONG, FT_PIX_ROUND_LONG, FT_PIX_CEIL_LONG): New macros. (FT_PAD_ROUND_INT32, FT_PAD_CEIL_INT32, FT_PIX_ROUND_INT32, FT_PIX_CEIL_INT32): New macros. 2017-06-09 Werner Lemberg <wl@gnu.org> Remove unused macros. * include/freetype/internal/ftcalc.h (ADD_INT, SUB_INT, MUL_INT, NEG_INT): Deleted. 2017-06-09 Werner Lemberg <wl@gnu.org> */*: Remove `OVERFLOW_' prefix. This increases readability. 2017-06-07 Werner Lemberg <wl@gnu.org> [cff, truetype] Integer overflows. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2133 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2137 * src/cff/cf2hints.c (cf2_hint_init): Use OVERFLOW_SUB_INT32. * src/truetype/ttinterp.c (PROJECT, DUALPROJ): Use OVERFLOW_SUB_LONG. 2017-06-06 Werner Lemberg <wl@gnu.org> [cff] Integer overflows. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2109 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2110 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2122 * src/cff/cf2blues.c (cf2_blues_init): Use OVERFLOW_SUB_INT32. * src/cff/cf2hints.c (cf2_hintmap_map): Synchronize if-else branches. 2017-06-05 Werner Lemberg <wl@gnu.org> [cff] Integer overflow. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2089 * src/cff/cffload.c (cff_blend_doBlend): User OVERFLOW_ADD_INT32. 2017-06-04 Werner Lemberg <wl@gnu.org> [cff, truetype] Integer overflows. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2075 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2088 * src/cff/cf2font.c (cf2_font_setup): Use OVERFLOW_MUL_INT32. * src/truetype/ttinterp.c (Ins_ISECT): Use OVERFLOW_MUL_LONG, OVERFLOW_ADD_LONG, and OVERFLOW_SUB_LONG. 2017-06-03 Werner Lemberg <wl@gnu.org> [base, cff, truetype] Integer overflows. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2060 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2062 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2063 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2068 * src/base/ftobjs.c (ft_glyphslot_grid_fit_metrics): Use OVERFLOW_ADD_LONG and OVERFLOW_SUB_LONG. * src/cff/cf2blues.c (cf2_blues_capture), src/cff/cf2hints.c (cf2_hintmap_adjustHints): Use OVERFLOW_SUB_INT32. * src/truetype/ttgload.c (compute_glyph_metrics): User OVERFLOW_SUB_LONG. * src/truetype/ttinterp.c (Direct_Move, Direct_Move_Orig, Direct_Move_X, Direct_Move_Y, Direct_Move_Orig_X, Direct_Move_Orig_Y, Move_Zp2_Point, Ins_MSIRP): Use OVERFLOW_ADD_LONG and OVERFLOW_SUB_LONG. 2017-06-03 Werner Lemberg <wl@gnu.org> * builds/unix/freetype-config.in: Fix pkg-config test (#51162). Patch directly taken from bug report. 2017-06-03 Werner Lemberg <wl@gnu.org> [bdf] Synchronize sanity checks with pcf driver. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2054 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2058 * src/bdf/bdfdrivr.c (BDF_Face_Init): Check font ascent and descent. Check AVERAGE_WIDTH, POINT_SIZE, PIXEL_SIZE, RESOLUTION_X, and RESOLUTION_Y properties. 2017-06-03 Werner Lemberg <wl@gnu.org> [cff, truetype] Integer overflows. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2047 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2057 * src/cff/cf2hints.c (cf2_hintmap_map): Use OVERFLOW_SUB_INT32. * src/truetype/ttinterp.c (Ins_ADD): Use OVERFLOW_ADD_LONG. (Ins_SUB): Use OVERFLOW_SUB_LONG. (Ins_NEG): Use NEG_LONG. 2017-06-03 Werner Lemberg <wl@gnu.org> ftcalc.h: Avoid left-shift of negative numbers. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2055 * include/freetype/internal/ftcalc.h (INT_TO_F26DOT6, INT_TO_F2DOT14, INT_TO_FIXED, F2DOT14_TO_FIXED): Use multiplication. 2017-06-02 Werner Lemberg <wl@gnu.org> [cff] Even more integer overflows. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2046 * src/cff/cf2intrp.c (cf2_doStems, cf2_interpT2CharString): Use OVERFLOW_ADD_INT32. 2017-06-02 Werner Lemberg <wl@gnu.org> [cff] More integer overflows. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2032 * src/cff/cf2blues.c (cf2_blues_init): Use OVERFLOW_SUB_INT32. 2017-06-02 Werner Lemberg <wl@gnu.org> [bdf] Don't left-shift negative numbers. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2031 * src/bdf/bdfdrivr.c (BDF_Face_Init): Use multiplication. 2017-06-02 Werner Lemberg <wl@gnu.org> [bdf] Fix integer scanning routines. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2029 * src/bdf/bdflib.c (_bdf_atoul, _bdf_atol, _bdf_atous, _bdf_atos): Stop scanning if result would overflow. 2017-06-02 Werner Lemberg <wl@gnu.org> [cff] Fix integer overflows. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2027 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2028 * src/cff/cf2hints.c (cf2_hintmap_insertHint), src/cff/cf2intrp.c (cf2_doFlex): Use OVERFLOW_ADD_INT32 and OVERFLOW_SUB_INT32. 2017-06-01 Werner Lemberg <wl@gnu.org> [smooth] Some 32bit integer overflow run-time errors. * src/smooth/ftgrays.c [STANDALONE] (OVERFLOW_ADD_LONG, OVERFLOW_SUB_LONG, OVERFLOW_MUL_LONG, NEG_LONG): New macros. [!STANDALONE]: Include FT_INTERNAL_CALC_H. (gray_render_cubic): Use those macros where appropriate. 2017-06-01 Werner Lemberg <wl@gnu.org> * src/base/ftglyph.c (FT_Get_Glyph): Check `slot->advance'. 2017-06-01 Werner Lemberg <wl@gnu.org> [psaux] 32bit integer overflow tun-time errors (#46149). * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Use OVERFLOW_ADD_LONG and OVERFLOW_SUB_LONG where appropriate. 2017-06-01 Werner Lemberg <wl@gnu.org> * src/truetype/ttinterp.c (TT_RunIns): Adjust loop counter again. Problem reported by Marek Kašík <mkasik@redhat.com>. The problematic font that exceeds the old limit is Padauk-Bold, version 3.002, containing bytecode generated by a buggy version of ttfautohint. 2017-05-31 Werner Lemberg <wl@gnu.org> [cff] 32bit integer overflow run-time errors 2/2 (#46149). This commit handles the new engine. * include/freetype/internal/ftcalc.h (OVERFLOW_ADD_INT32, OVERFLOW_SUB_INT32, OVERFLOW_MUL_INT32, NEG_INT, NEG_LONG, NEG_INT32): New macros. * src/cff/cf2ft.c (cf2_getScaleAndHintFlag): Use OVERFLOW_ADD_INT32. * src/cff/cf2hints.c (cf2_getWindingMomentum, cf2_hint_init, cf2_hintmap_map, cf2_glyphpath_hintPoint, cf2_glyphpath_computeIntersection, cf2_glyphpath_computeOffset, cf2_glyphpath_lineTo, cf2_glyphpath_curveTo): Use OVERFLOW_ADD_INT32, OVERFLOW_SUB_INT32, OVERFLOW_MUL_INT32, and NEG_INT32 where appropriate. * src/cff/cf2intrp.c (cf2_doFlex, cf2_doBlend, cf2_interpT2CharString): Ditto. Also add some other code where needed to avoid overflow. 2017-05-30 Werner Lemberg <wl@gnu.org> [cff] 32bit integer overflow run-time errors 1/2 (#46149). This commit handles the old engine. * src/cff/cffgload.c: Include FT_INTERNAL_CALC_H. (cff_decoder_parse_charstrings): Use OVERFLOW_ADD_LONG and OVERFLOW_SUB_LONG where needed. * src/cff/cffparse.c: Include FT_INTERNAL_CALC_H. (power_ten_limits): New static array. (do_fixed): Use it to prevent multiplication overflow. (cff_parser_run): Use OVERFLOW_ADD_LONG. 2017-05-30 Werner Lemberg <wl@gnu.org> [psaux] Correctly handle sequences of multiple number signs. * src/psaux/psconv.c (PS_Conv_Strtol, PS_Conv_ToFixed): Return zero if we encounter more than a single sign. 2017-05-29 Werner Lemberg <wl@gnu.org> [pcf] 32bit integer overflow run-time errors (#46149). * src/pcf/pcfread.c (pcf_get_accel): Add sanity checks for `fontAscent' and `fontDescent'. (pcf_load_font): Add sanity checks for global height. Add sanity checks for AVERAGE_WIDTH, POINT_SIZE, PIXEL_SIZE, RESOLUTION_X, and RESOLUTION_Y properties. 2017-05-29 Werner Lemberg <wl@gnu.org> Handle some integer overflow run-time errors (#46149, #48979). This commit (mainly for 32bit CPUs) is the first of a series of similar commits to handle known integer overflows. Basically, all of them are harmless, since they affect rendering of glyphs only, not posing security threats. It is expected that fuzzying will show up more overflows, to be fixed in due course. The idea is to mark places where overflows can occur, using macros that simply cast to unsigned integers, because overflow arithmetic is well defined in this case. Doing so suppresses run-time errors of sanitizers without adding computational overhead. * include/freetype/internal/ftcalc.h (OVERFLOW_ADD_INT, OVERFLOW_SUB_INT, OVERFLOW_MUL_INT, OVERFLOW_ADD_LONG, OVERFLOW_SUB_LONG, OVERFLOW_MUL_LONG): New macros. * src/base/ftcalc.c (FT_RoundFix, FT_CeilFix, FT_Matrix_Multiply, FT_Matrix_Multiply_Scaled, FT_Vector_Transform_Scaled, ft_corner_orientation): Use new macros. * src/base/ftoutln.c (FT_Outline_Get_Orientation): Use new macros. 2017-05-28 Werner Lemberg <wl@gnu.org> * include/freetype/internal/ftcalc.h (FLOAT_TO_FIXED): Remove. This macro is not used. 2017-05-28 Werner Lemberg <wl@gnu.org> [cff] s/cf2_floatToFixed/cf2_doubleToFixed/. The new name better describes what the macro actually does; additionally, we don't need a trailing `f' for literals (there was only a single such instance in the code, but this caused a clang warning because the macro itself uses `double' literals). * src/cff/cf2blues.c, src/cff/cf2blues.h, src/cff/cf2fixed.h, src/cff/cf2font.c, src/cff/cf2hints.c: Updated. 2017-05-28 Werner Lemberg <wl@gnu.org> Fix negation of INT_MIN and LONG_MIN (#46149). * src/base/ftcalc.c (FT_MOVE_SIGN): Add argument to pass unsigned value, to be used as the result. (FT_MulDiv, FT_MulDiv_No_Round, FT_DivFix, FT_MulFix, FT_Vector_NormLen): Updated. 2017-05-27 Werner Lemberg <wl@gnu.org> [truetype] Fix handling of design coordinates (#51127). * src/truetype/ttgxvar.c (tt_set_mm_blend): Compute all design coordinates if we have to create the `blends->coord' array. (TT_Get_MM_Blend, TT_Get_Var_Design): Select default instance coordinates if no instance is selected yet. 2017-05-24 Werner Lemberg <wl@gnu.org> [bdf, pcf] Support ISO646.1991-IRV character encoding (aka ASCII). Problem reported by Marek Kašík <mkasik@redhat.com>, cf. https://bugzilla.redhat.com/show_bug.cgi?id=1451795 * src/bdf/bdfdrivr.c (BDF_Face_Init), src/pcf/pcfdrivr.c (PCF_Face_Init): Implement it. 2017-05-20 Nikolaus Waxweiler <madigens@gmail.com> [truetype] Always use interpreter v35 for B/W rendering (#51051). * src/truetype/ttgload.c (tt_loader_init) [TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL]: Adjust `subpixel_hinting_lean', `grayscale_cleartype', and `vertical_lcd_lean' accordingly. * src/truetype/ttinterp.c (Ins_GETINFO): Updated. (TT_RunIns): Update `backward_compatibility' flag. 2017-05-20 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Implement minimal dynamic padding for LCD filtering. Extra bitmap padding for LCD filtering depends on the filter. The default 5-tap filter needs 2 extra subpixels. The light 3-tap filter needs only 1 extra subpixel. This space could be already available due to rounding. In order to optimize the padding, we now expand CBox for the given filter weights before rounding. This change breaks current Skia (and Firefox). * include/freetype/internal/ftobjs.h (FT_LibraryRec) [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Remove `lcd_extra' field. * src/base/ftlcdfil.c (FT_Library_SetLcdFilterWeights, FT_Library_SetLcdFilter): Remove `lcd_extra' initializations. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Implement dymanic LCD padding. 2017-05-15 Werner Lemberg <wl@gnu.org> [sfnt] Return proper scaling values for SBIX bitmaps. Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>. * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Implement it. 2017-05-15 Werner Lemberg <wl@gnu.org> [truetype] Fix error handling for embedded bitmaps. Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>. * src/truetype/ttgload.c (TT_Load_Glyph) [TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: Handle error if font is not scalable. 2017-05-15 Alexei Podtelezhnikov <apodtele@gmail.com> [autofit] Make autohint warping NORMAL option. This moves warping option from LIGHT to NORMAL mode. This makes LIGHT truly void of hinting in x-direction, with left side bearing never changed and right side bearing only altered by advance rounding. Therefore, LIGHT is now ready to return fractional advance. As a NORMAL option, warping substitutes normal hinting. * src/autofit/afcjk.c (af_cjk_hints_apply): Updated. * src/autofit/aflatin.c (af_latin_hints_apply): Updated. * src/autofit/aflatin2.c (af_latin2_hints_apply): Updated. * src/autofit/afloader.c (af_loader_load_glyph): Handle warping phantom points as normal. 2017-05-14 Werner Lemberg <wl@gnu.org> Remove remnants of raster pool. * include/freetype/internal/ftobjs.h (FT_LibraryRec): Remove `raster_pool' and `raster_pool_size' fields. * src/base/ftobjs.c (FT_New_Library), src/raster/ftrend1.c (ft_raster1_init), src/smooth/ftsmooth.c (ft_smooth_init): Updated. 2017-05-13 Werner Lemberg <wl@gnu.org> * Version 2.8 released. ======================= Tag sources with `VER-2-8'. * docs/VERSION.TXT: Add entry for version 2.8. * docs/CHANGES: Updated. * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj, builds/windows/vc2005/index.html, builds/windows/vc2008/freetype.vcproj, builds/windows/vc2008/index.html, builds/windows/vc2010/freetype.vcxproj, builds/windows/vc2010/index.html, builds/windows/visualc/freetype.dsp, builds/windows/visualc/freetype.vcproj, builds/windows/visualc/index.html, builds/windows/visualce/freetype.dsp, builds/windows/visualce/freetype.vcproj, builds/windows/visualce/index.html, builds/wince/vc2005-ce/freetype.vcproj, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/freetype.vcproj, builds/wince/vc2008-ce/index.html: s/2.7.1/2.8/, s/271/28/. * include/freetype/freetype.h (FREETYPE_MINOR): Set to 8. (FREETYPE_PATCH): Set to 0. * builds/unix/configure.raw (version_info): Set to 20:0:14. * CMakeLists.txt (VERSION_MINOR): Set to 8. (VERSION_PATCH): Set to 0. 2017-05-12 Hin-Tak Leung <htl10@users.sourceforge.net> Fix `FT_UINT_TO_POINTER' macro for Windows. * builds/unix/ftconfig.in, builds/vms/ftconfig.h, include/freetype/config/ftconfig.h (FT_UINT_TO_POINTER) [_WIN64]: Fix definition. 2017-05-11 Sascha Brawer <sascha@google.com> Werner Lemberg <wl@gnu.org [autofit] Add support for Chakma script. * src/autofit/afblue.dat: Add blue zone data for Chakma. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Chakma standard character. * src/autofit/afranges.c, src/autofit/afstyles.h: Add Chakma data. 2017-05-10 Sascha Brawer <sascha@google.com> Werner Lemberg <wl@gnu.org [autofit] Add support for Kayah Li script. * src/autofit/afblue.dat: Add blue zone data for Kayah Li. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Kayah Li standard character. * src/autofit/afranges.c, src/autofit/afstyles.h: Add Kayah Li data. 2017-05-10 Sascha Brawer <sascha@google.com> Werner Lemberg <wl@gnu.org [autofit] Add support for Bamum script. * src/autofit/afblue.dat: Add blue zone data for Bamum. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Bamum standard character. * src/autofit/afranges.c, src/autofit/afstyles.h: Add Bamum data. 2017-05-10 Sascha Brawer <sascha@google.com> Werner Lemberg <wl@gnu.org [autofit] Add support for Saurashtra script. * src/autofit/afblue.dat: Add blue zone data for Saurashtra. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Saurashtra standard character. * src/autofit/afranges.c, src/autofit/afstyles.h: Add Saurashtra data. 2017-05-10 Sascha Brawer <sascha@google.com> Werner Lemberg <wl@gnu.org [autofit] Add support for Buhid script. * src/autofit/afblue.dat: Add blue zone data for Buhid. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Buhid standard character. * src/autofit/afranges.c, src/autofit/afstyles.h: Add Buhid data. 2017-05-08 Sascha Brawer <sascha@google.com> Werner Lemberg <wl@gnu.org [autofit] Add support for Shavian script. * src/autofit/afblue.dat: Add blue zone data for Shavian. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Shavian standard character. * src/autofit/afranges.c, src/autofit/afstyles.h: Add Shavian data. 2017-05-08 Sascha Brawer <sascha@google.com> Werner Lemberg <wl@gnu.org [autofit] Add support for Vai script. * src/autofit/afblue.dat: Add blue zone data for Vai. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Vai standard character. * src/autofit/afranges.c, src/autofit/afstyles.h: Add Vai data. 2017-05-08 Sascha Brawer <sascha@google.com> Werner Lemberg <wl@gnu.org [autofit] Add support for Osmanya script. * src/autofit/afblue.dat: Add blue zone data for Osmanya. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Osmanya standard character. * src/autofit/afranges.c, src/autofit/afstyles.h: Add Osmanya data. 2017-05-08 Sascha Brawer <sascha@google.com> Werner Lemberg <wl@gnu.org [autofit] Add support for Coptic script. * src/autofit/afblue.dat: Add blue zone data for Coptic. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Coptic standard character. * src/autofit/afranges.c, src/autofit/afstyles.h: Add Coptic data. 2017-05-08 Sascha Brawer <sascha@google.com> Werner Lemberg <wl@gnu.org [autofit] Add support for Carian script. * src/autofit/afblue.dat: Add blue zone data for Carian. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Carian standard character. * src/autofit/afranges.c, src/autofit/afstyles.h: Add Carian data. 2017-05-07 Werner Lemberg <wl@gnu.org> [truetype] Add tricky font `DFGirl-W6-WIN-BF' (from Dynalab). Reported by Roy Tam <roytam@gmail.com>. * src/truetype/ttobjs.c (tt_check_trickyness_family): Implement it. 2017-05-07 Roy Tam <roytam@gmail.com> Werner Lemberg <wl@gnu.org> [truetype] More tricky fonts (mainly from Dynalab). * src/truetype/ttobjs.c (tt_check_trickyness_family, tt_check_trickyness_sfnt_ids): Add them. 2017-05-07 Werner Lemberg <wl@gnu.org> [truetype] Add tricky font `DLCHayMedium' (from Dynalab). Reported by Roy Tam <roytam@gmail.com>. * src/truetype/ttobjs.c (tt_check_trickyness_family): Implement it. 2017-05-03 Werner Lemberg <wl@gnu.org> */*: s/backwards compatibility/backward compatibility/. 2017-05-03 Sascha Brawer <sascha@google.com> Werner Lemberg <wl@gnu.org [autofit] Add support for Unified Canadian Syllabics script. * src/autofit/afblue.dat: Add blue zone data for Unified Canadian Syllabics. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Unified Canadian Syllabics standard character. * src/autofit/afranges.c, src/autofit/afstyles.h: Add Unified Canadian Syllabics data. 2017-05-03 Sascha Brawer <sascha@google.com> Werner Lemberg <wl@gnu.org> [autofit] Add blue-zone support for Sundanese script. This essentially moves the Sundanese script from the `Indic' hinter to the `Latin' hinter. * src/autofit/afblue.dat: Add blue zone data for Sundanese. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Sundanese standard character and move data out of AF_CONFIG_OPTION_INDIC block. * src/autofit/afranges.c: Move Sundanese data out of AF_CONFIG_OPTION_INDIC block. * src/autofit/afstyles.h: Update Sundanese data; in particular, use AF_WRITING_SYSTEM_LATIN. 2017-05-03 Sascha Brawer <sascha@google.com> Werner Lemberg <wl@gnu.org [autofit] Add support for Avestan script. * src/autofit/afblue.dat: Add blue zone data for Avestan. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Avestan standard character. * src/autofit/afranges.c, src/autofit/afstyles.h: Add Avestan data. 2017-05-02 Behdad Esfahbod <behdad@behdad.org> [truetype] Make `IUP' gvar deltas do the same as Apple (#50832). When points are not touched by gvar interpolation deltas, FreeType gave a slightly different result than Apple's CoreText. The OpenType working group will update the specification to document the following behaviour: If the two points with deltas to the `left' and `right' of the untouched point have the same coordinate, then the inferred delta for the untouched point should be zero. * src/truetype/ttgxvar.c (tt_delta_interpolate): Implement new behaviour. 2017-05-02 Werner Lemberg <wl@gnu.org> [autofit] Remove `slight' auto-hint mode again. A poll on freetype-devel favoured changes directly applied to `light'. * include/freetype/freetype.h (FT_LOAD_TARGET_SLIGHT, FT_RENDER_MODE_SLIGHT): Removed. * src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c (af_latin_hints_init), src/autofit/aflatin2.c (af_latin2_hints_init): Revert change from 2017-04-22. * src/autofit/afloader.c (af_loader_load_glyph) Remove references to FT_RENDER_MODE_SLIGHT. [AF_CONFIG_OPTION_TT_SIZE_METRICS]: Enable TrueType-like metrics unconditionally. * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Revert change from 2017-04-22. * src/base/ftobjs.c (FT_Load_Glyph): Revert change from 2017-04-22. * src/pshinter/pshalgo.c (ps_hints_apply): Revert change from 2017-04-22. * src/smooth/ftsmooth.c (ft_smooth_render): Revert change from 2017-04-22. * docs/CHANGES: Updated. 2017-04-30 Werner Lemberg <wl@gnu.org> [autofit] Fix metrics computation. Problem reported by Markus Trippelsdorf <markus@trippelsdorf.de> and Nikolaus Waxweiler <madigens@gmail.com>. * src/base/ftobjs.c (FT_Request_Size): Trigger recomputation of auto-hinter metrics. Without this change, multiple size changing calls for a single face fail. 2017-04-29 Werner Lemberg <wl@gnu.org> * src/truetype/ttdriver.c (tt_size_request): Properly check `error'. Reported by Earnestly <zibeon@googlemail.com> in https://lists.nongnu.org/archive/html/freetype/2017-04/msg00031.html 2017-04-27 Werner Lemberg <wl@gnu.org> Introduce AF_CONFIG_OPTION_TT_SIZE_METRICS configuration option. * include/freetype/config/ftoption.h (AF_CONFIG_OPTION_TT_SIZE_METRICS): New option, commented out by default. * src/autofit/afloader.c (af_loader_load_glyph): Use AF_CONFIG_OPTION_TT_SIZE_METRICS to guard the corresponding code. 2017-04-26 Werner Lemberg <wl@gnu.org> * include/freetype/freetype.h (FT_Render_Mode): Fix order. This retains backward compatibility. Noted by Alexei. 2017-04-22 Werner Lemberg <wl@gnu.org> [truetype] Do linear scaling for FT_LOAD_NO_HINTING (#50470). * src/truetype/ttobjs.h (TT_SizeRec): Add field `hinted_metrics' to hold hinted metrics. Make `metrics' a pointer so that `tt_glyph_load' can easily switch between metrics. * src/truetype/ttdriver.c (tt_size_request): Updated. (tt_glyph_load): Use top-level metrics if FT_LOAD_NO_HINTING is used. * src/truetype/ttgload.c (TT_Hint_Glyph, TT_Process_Simple_Glyph, TT_Process_Composite_Component, load_truetype_glyph, compute_glyph_metrics, TT_Load_Glyph): Updated. * src/truetype/ttinterp.c (TT_Load_Context): Updated. * src/truetype/ttobjs.c (tt_size_reset): Updated. * src/truetype/ttsubpix.c (sph_set_tweaks): Updated. 2017-04-22 Werner Lemberg <wl@gnu.org> Add new `slight' auto-hinting mode. This mode uses fractional advance widths and doesn't scale glyphs horizontally, only applying vertical scaling and hinting. At the same time, the behaviour of the `light' auto-hinter gets restored for backward compatibility: Both vertical and horizontal scaling is again based on rounded metrics values (this was changed in a commit from 2017-03-30 as a side effect). To be more precise, the behaviour is restored for TrueType fonts only; for other font formats like Type 1, this is a new feature of the `light' hinting mode. * include/freetype/freetype.h (FT_LOAD_TARGET_SLIGHT): New macro. (FT_RENDER_MODE_SLIGHT): New render mode. * include/freetype/internal/ftobjs.h (FT_Size_InternalRec): Add `autohint_mode' and `autohint_metrics' fields. * src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c (af_latin_hints_init), src/autofit/aflatin2 (af_latin2_hints_init): Updated. * src/autofit/afloader.c (af_loader_embolden_glyph_in_slot): Use `autohint_metrics'. (af_loader_load_glyph): s/internal/slot_internal/. Initialize `autohint_metrics' and `autohint_mode' depending on current auto-hint mode. Use `autohint_metrics'. Updated. * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Updated. * src/base/ftobjs.c (FT_Load_Glyph): Updated. (FT_New_Size): Allocate `internal' object. * src/pshinter/pshalgo.c (ps_hints_apply): Updated. * src/smooth/ftsmooth.c (ft_smooth_render): Updated. 2017-04-22 Werner Lemberg <wl@gnu.org> Introduce `FT_Size_InternalRec' structure. We are going to extend this later on. * include/freetype/internal/ftobjs.h (FT_Size_InternalRec): New structure with a single field `module_data'. * src/base/ftobjs.c (FT_New_Size): Allocate `internal' field of `FT_Size' structure. * src/cff/cffgload.c (cff_builder_init, cff_decoder_prepare): Use `size->internal->module_data' instead of `size->internal'. * src/cff/cffobjs.c (cff_size_done): Deallocate `module_data'. (cff_size_init, cff_size_select, cff_size_request): Use `size->internal->module_data' instead of `size->internal'. * src/cif/cidobjs.c (cid_size_done, cid_size_init, cid_size_request): Use `size->internal->module_data' instead of `size->internal'. * src/psaux/psobjs.c (t1_builder_ini): Use `size->internal->module_data' instead of `size->internal'. * src/type1/t1objs.c (T1_Size_Done, T1_Size_Init, T1_Size_Request): Use `size->internal->module_data' instead of `size->internal'. 2017-04-21 Alexei Podtelezhnikov <apodtele@gmail.com> * src/smooth/ftsmooth.h: Remove unused guards and declaration. 2017-04-16 Hin-Tak Leung <htl10@users.sourceforge.net> Fix tracing messages. * src/base/ftobjs.c (FT_Face_GetCharVariantIndex, FT_Face_GetCharVariantIsDefault, FT_Face_GetVariantsOfChar): Print correct function name. 2017-04-08 Sascha Brawer <sascha@google.com> Werner Lemberg <wl@gnu.org [autofit] Add support for Old Turkic script. * src/autofit/afblue.dat: Add blue zone data for Old Turkic. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Old Turkic standard characters. * src/autofit/afranges.c, src/autofit/afstyles.h: Add Old Turkic data. 2017-04-08 Sascha Brawer <sascha@google.com> Werner Lemberg <wl@gnu.org [autofit] Add support for Gothic script. * src/autofit/afblue.dat: Add blue zone data for Gothic. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Gothic standard characters. * src/autofit/afranges.c, src/autofit/afstyles.h: Add Gothic data. 2017-04-08 Sascha Brawer <sascha@google.com> Werner Lemberg <wl@gnu.org [autofit] Add support for Cypriot script. * src/autofit/afblue.dat: Add blue zone data for Cypriot. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Cypriot standard characters. * src/autofit/afranges.c, src/autofit/afstyles.h: Add Cypriot data. 2017-04-08 Sascha Brawer <sascha@google.com> Werner Lemberg <wl@gnu.org [autofit] Add support for Deseret script. * src/autofit/afblue.dat: Add blue zone data for Deseret. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Deseret standard characters. * src/autofit/afranges.c, src/autofit/afstyles.h: Add Deseret data. 2017-04-07 Werner Lemberg <wl@gnu.org> [autofit] Fix invalid character range description (#50745). Also reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1034 * src/autofit/afranges.c (af_glag_nonbase_uniranges): Fix typo in recent commit. 2017-04-07 Werner Lemberg <wl@gnu.org> [ftfuzzer] Fix clang warnings. * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Add casts. 2017-04-06 Sascha Brawer <sascha@google.com> Werner Lemberg <wl@gnu.org [autofit] Add support for Lisu script. * src/autofit/afblue.dat: Add blue zone data for Lisu. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Lisu standard characters. * src/autofit/afranges.c, src/autofit/afstyles.h: Add Lisu data. 2017-04-06 Sascha Brawer <sascha@google.com> Werner Lemberg <wl@gnu.org [autofit] Add support for Osage script. * src/autofit/afblue.dat: Add blue zone data for Osage. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Osage standard characters. * src/autofit/afranges.c, src/autofit/afstyles.h: Add Osage data. 2017-04-06 Sascha Brawer <sascha@google.com> Werner Lemberg <wl@gnu.org [autofit] Add support for Glagolitic script. * src/autofit/afblue.dat: Add blue zone data for Glagolitic. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Glagolitic standard characters. * src/autofit/afranges.c, src/autofit/afstyles.h: Add Glagolitic data. 2017-04-06 Sascha Brawer <sascha@google.com> Werner Lemberg <wl@gnu.org [autofit] Add support for Tai Viet script. * src/autofit/afblue.dat: Add blue zone data for Tai Viet. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Tai Viet standard characters. * src/autofit/afranges.c, src/autofit/afstyles.h: Add Tai Viet data. 2017-04-06 Sascha Brawer <sascha@google.com> Werner Lemberg <wl@gnu.org [autofit] Add support for Tifinagh script. * src/autofit/afblue.dat: Add blue zone data for Tifinagh. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Tifinagh standard characters. * src/autofit/afranges.c, src/autofit/afstyles.h: Add Tifinagh data. 2017-04-06 Sascha Brawer <sascha@google.com> Werner Lemberg <wl@gnu.org [autofit] Add support for N'Ko script. * src/autofit/afblue.dat: Add blue zone data for N'Ko. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add N'Ko standard characters. * src/autofit/afranges.c, src/autofit/afstyles.h: Add N'Ko data. 2017-04-06 Sascha Brawer <sascha@google.com> [autofit] Add support for Adlam script. * src/autofit/afblue.dat: Add blue zone data for Adlam. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Adlam standard characters. * src/autofit/afranges.c, src/autofit/afstyles.h: Add Adlam data. 2017-04-06 Sascha Brawer <sascha@google.com> [autofit] Add support for Ol Chiki script. * src/autofit/afblue.dat: Add blue zone data for Ol Chiki. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Ol Chiki standard character. * src/autofit/afranges.c, src/autofit/afstyles.h: Add Ol Chiki data. 2017-04-03 Werner Lemberg <wl@gnu.org> [truetype] Avoid reexecution of `fpgm' and `prep' in case of error. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=981 * include/freetype/fterrdef.h (FT_Err_DEF_In_Glyf_Bytecode): New error code. * src/truetype/ttinterp.c (Ins_FDEF, Ins_IDEF): Prohibit execution of these two opcodes in `glyf' bytecode. (TT_RunIns): Don't enforce reexecution of `fpgm' and `prep' bytecode in case of error since function tables can no longer be modified (due to the changes in `Ins_FDEF' and `Ins_IDEF'). This change can enormously speed up handling of broken fonts. 2017-04-02 Alexei Podtelezhnikov <apodtele@gmail.com> [autofit] Disable metrics adjustment for `FT_LOAD_TARGET_LCD'. * src/autofit/aflatin.c (af_latin_hints_init): Updated. * src/autofit/aflatin2.c (af_latin2_hints_init): Ditto. 2017-04-01 Werner Lemberg <wl@gnu.org> * src/truetype/ttgload.c: Include FT_CONFIG_CONFIG_H. Otherwise FT_UINT_TO_POINTER might not be defined. Problem reported by Alexei. 2017-03-31 Alexei Podtelezhnikov <apodtele@gmail.com> [autofit] Disable stem adjustment for `FT_LOAD_TARGET_LCD'. * include/freetype/freetype.h (FT_LOAD_TARGET_LCD): Document it. * src/autofit/afcjk.c (af_cjk_hints_init): Updated. * src/autofit/aflatin.c (af_latin_hints_init): Ditto. * src/autofit/aflatin2.c (af_latin2_hints_init): Ditto. 2017-03-31 Werner Lemberg <wl@gnu.org> * src/cff/cffload.c (cff_font_load): Improve fix from 2017-01-04. Allow CFFs containing a single font to have an empty font name. Problem reported by 張俊芝 <418092625@qq.com> in https://lists.nongnu.org/archive/html/freetype-devel/2017-03/msg00074.html 2017-03-30 Werner Lemberg <wl@gnu.org> * src/cff/cffparse.h (CFF2_DEFAULT_STACK): Set to 513 also. Requested by Dave Arnold. 2017-03-30 Werner Lemberg <wl@gnu.org> [truetype] Fix HVAR and VVAR handling (#50678). * src/truetype/ttgxvar.c (tt_hvadvance_adjust): Handle glyph indices larger than `mapCount' as described in the specification. 2017-03-30 Werner Lemberg <wl@gnu.org> [truetype] Allow linear scaling for unhinted rendering (#50470). * src/truetype/ttdriver.c (tt_size_request): Revert change from 2011-07-16; the intended metrics fix seems now to be implemented in a different way, making the patch unnecessary. Note that this change was usually patched out by all major GNU/Linux distributions due to heavy side effects. * src/truetype/ttgload.c (compute_glyph_metrics, TT_Load_Glyph): Refer to the metrics of the `TT_Size' object. 2017-03-29 Werner Lemberg <wl@gnu.org> [truetype] Fix thinko related to PS name of default named instance. * src/truetype/ttgxvar.c (TT_Get_MM_Var): `strid' and `psid' are name ID values, not indices into the array of name entries. 2017-03-27 Werner Lemberg <wl@gnu.org> [cid, truetype] Don't use `index' as a variable name. At least on FreeBSD there is a global declaration of `index' in file `/usr/include/strings.h'. * src/cff/cf2intrp.c, src/truetype/ttgload.c: s/index/idx/ where appropriate. 2017-03-27 Wojciech Mamrak <wmamrak@gmail.com> [sfnt] Minor improvement for handling kern tables. * src/sfnt/ttkern.c (tt_face_load_kern): Don't check for cross-stream kerning tables since we reject format 2 tables later on anyways. Modify code for limit test... (tt_face_get_kerning): ... to avoid a limit test here. 2017-03-27 Werner Lemberg <wl@gnu.org> [pcf] Fix compiler warnings. Reported by Alexander Hedges <ahedges@student.ethz.ch>. * src/pcf/pcfdrivr.c (pcf_property_set, pcf_property_get): Tag `property_name' with `FT_UNUSED' where necessary. 2017-03-26 Werner Lemberg <wl@gnu.org> * src/psaux/psobjs.c (t1_builder_close_contour): Add safety guard. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=941 2017-03-23 Werner Lemberg <wl@gnu.org> [psaux] Better protect `flex' handling. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=935 * src/psaux/t1decode.c (t1_decoder_parse_charstrings) <callothersubr>: Since there is not a single flex operator but a series of subroutine calls, malformed fonts can call arbitrary other operators after the start of a flex, possibly adding points. For this reason we have to check the available number of points before inserting a point. 2017-03-23 Werner Lemberg <wl@gnu.org> [sfnt] Fix check for default named instance. * src/sfnt/sfobjs.c (sfnt_init_face): A `fixed' number needs four bytes, not two... 2017-03-23 Werner Lemberg <wl@gnu.org> Make MM fonts work (again). * src/base/ftmm.c (FT_Set_Var_Design_Coordinates, FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): Ignore return value of `ft_face_get_mvar_service'; instead, check whether a service is actually returned. 2017-03-20 Werner Lemberg <wl@gnu.org> [truetype] Some variable renamings. Too much local variables holding different structures were called `metrics'. * src/truetype/ttdriver.c (tt_size_select): s/metrics/size_metrics/. * src/truetype/ttgload.c (tt_get_metrics_incr_overrides, compute_glyph_metrics): s/metrics/incr_metrics/. (load_sbit_image): s/metrics/sbit_metrics/. * src/truetype/ttobjs.c (tt_size_run_fpgm): s/metrics/size_metrics/. (tt_size_init_bytecode): s/metrics/tt_metrics/. (tt_size_reset): s/metrics/size_metrics/. 2017-03-20 Werner Lemberg <wl@gnu.org> [sfnt] Don't add instances to non-variation fonts. * src/sfnt/sfobjs.c (sfnt_init_face): Fix it. 2017-03-20 Werner Lemberg <wl@gnu.org> * src/cff/cffgload.c (cff_builder_init): Add safety guard (#50578). 2017-03-18 Werner Lemberg <wl@gnu.org> Introduce FT_UINT_TO_POINTER macro (#50560). We have to make a separate case for Windows 64's LLP64 data model. * builds/unix/ftconfig.in, builds/vms/ftconfig.h, include/freetype/config/ftconfig.h (FT_UINT_TO_POINTER): New macro. * src/truetype/ttgload.c (load_truetype_glyph): Use it. 2017-03-18 Werner Lemberg <wl@gnu.org> * src/truetype/ttinterp.c (TT_RunIns): Adjust loop counter (#50573). The problematic font that exceeds the old limit is Lato-Regular, version 2.007, containing bytecode generated by a buggy version of ttfautohint. 2017-03-18 Werner Lemberg <wl@gnu.org> [truetype] Another limitation for bytecode loop count maximum. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=900 * src/truetype/ttinterp.c (TT_RunIns): Limit `loopcall_counter_max' by number of glyphs also. 2017-03-18 Werner Lemberg <wl@gnu.org> [ftfuzzer] Minor improvement. * src/tools/ftfuzzer/ftfuzzer.cc: Don't set intermediate axis if bitmap strikes are active. 2017-03-18 Werner Lemberg <wl@gnu.org> Improve `make multi'. * src/autofit/aflatin2.c: Guard file with FT_OPTION_AUTOFIT2. * src/base/ftmac.c: Guard more parts of the file with FT_MACINTOSH. * src/psaux/afmparse.c: Guard file with T1_CONFIG_OPTION_NO_AFM. * src/sfnt/pngshim.c: Guard file with TT_CONFIG_OPTION_EMBEDDED_BITMAPS also. * src/sfnt/ttbdf.c: Avoid empty source file. * src/sfnt/ttpost.c: Guard file with TT_CONFIG_OPTION_POSTSCRIPT_NAMES. * src/sfnt/ttsbit.c: Guard file with TT_CONFIG_OPTION_EMBEDDED_BITMAPS. * src/truetype/ttgxvar.c, src/truetype/ttinterp.c: Avoid empty source file. * src/truetype/ttsubpix.c: Guard file with TT_USE_BYTECODE_INTERPRETER also. * src/type1/t1afm.c: Guard file with T1_CONFIG_OPTION_NO_AFM. * src/autofit/autofit.c, src/base/ftbase.c, src/cache/ftcache.c, src/cff/cff.c, src/cid/type1cid.c, src/gxvalid/gxvalid.c, src/pcf/pcf.c, src/pfr/pfr.c, src/psaux/psaux.c, src/pshinter/pshinter.c, src/psnames/psnames.c, src/raster/raster.c, src/sfnt/sfnt.c, src/smooth/smooth.c, src/truetype/truetype.c, src/type1/type1.c, src/type42/type42.c: Remove conditionals; sort entries. 2017-03-17 Werner Lemberg <wl@gnu.org> Fixes for conditional compilation. * src/autofit/afcjk.c, src/autofit/afindic.c: Include `afcjk.h' earlier. * src/sfnt/sfobjs.c (sfnt_init_face): Put `memory' variable into TT_CONFIG_OPTION_GX_VAR_SUPPORT block. (sfnt_done_face): Protect some code with TT_CONFIG_OPTION_GX_VAR_SUPPORT. * src/sfnt/ttsbit.c (tt_face_load_sbix_image): Remove compiler warning. * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Put `tmp' variable into TT_USE_BYTECODE_INTERPRETER block. (tt_loader_init): Put `error' variable into TT_USE_BYTECODE_INTERPRETER block. 2017-03-17 Werner Lemberg <wl@gnu.org> Fix preprocessor warning. * devel/ftoption.h, include/freetype/config/ftoption.h: Test whether TT_CONFIG_OPTION_SUBPIXEL_HINTING is defined before checking its value. 2017-03-17 Werner Lemberg <wl@gnu.org> `make multi' fixes; compiler warnings. * src/base/ftsnames.c: Include FT_INTERNAL_DEBUG_H. * src/cff/cffobjs.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include FT_MULTIPLE_MASTERS_H and FT_SERVICE_MULTIPLE_MASTERS_H. * src/sfnt/sfdriver.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include FT_MULTIPLE_MASTERS_H and FT_SERVICE_MULTIPLE_MASTERS_H. (get_win_string, get_apple_string): Initialize `result'. 2017-03-17 Dave Arnold <darnold@adobe.com> [cff] Fix potential bugs in default NDV for CFF2. * src/cff/cffload.c (cff_blend_build_vector): Explicitly build blend vector when `lenNDV' is zero; don't rely on zero-init. Save `lenNDV' as part of cache key even when `lenNDV' is zero. 2017-03-17 Dave Arnold <darnold@adobe.com> [cff] Fix CFF2 stack allocation. * src/cff/cffparse.c (cff_parser_init) add 1 for operator. 2017-03-16 Werner Lemberg <wl@gnu.org> * src/truetype/ttgxvar.c (tt_done_blend): Free `vvar_table'. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=883 2017-03-15 Werner Lemberg <wl@gnu.org> Remove clang compiler warnings (#50548). * include/freetype/internal/tttypes.h (TT_FaceRec): Make `var_postscript_prefix_len' unsigned. * src/autofit/afwarp.c (af_warper_compute_line_best): Remove redundant assignment. * src/cff/cffload.c (cff_subfont_load): Add casts. * src/cff/cffparse.c (cff_parse_blend): Remove redundant assignment. * src/sfnt/sfdriver.c (fmix32, murmur_hash_3_128): Add `static' keyword. Add casts. (fixed2float): Add cast. (sfnt_get_var_ps_name): Make `p' always initialized. Add casts. * src/truetype/ttgxvar.c (TT_Get_MM_Var): Add casts. 2017-03-15 Werner Lemberg <wl@gnu.org> [ftfuzzer] Limit number of tested faces and instances. This is inspired by the discussion in and analysis of https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=859 * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Use only up to 20 face indices. Use only up to 20 instance indices. 2017-03-15 Werner Lemberg <wl@gnu.org> * src/tools/ftfuzzer/ftfuzzer.cc: Improve readability; formatting. 2017-03-14 Werner Lemberg <wl@gnu.org> [sfnt] Implement PS names for font instances [3/3]. Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. * include/freetype/internal/tttypes.h (TT_FaceRec): New fields `var_postscript_prefix' and `var_postscript_prefix_len'. * src/sfnt/sfdriver.c: Include FT_TRUETYPE_IDS_H. (sfnt_is_alphanumeric): New wrapperfunction for `ft_isalnum'. (get_win_string, get_apple_string): Remove `const' from return value. (MAX_VALUE_DESCRIPTOR_LEN, MAX_PS_NAME_LEN): New macros. (hexdigits): New array. (sfnt_get_var_ps_name): New function, implementing Adobe TechNote 5902 to construct a PS name for a variation font instance. (sfnt_get_ps_name): Call `sfnt_get_var_ps_name' for font instances. * src/sfnt/sfobjs.c (sfnt_done_face): Updated. * src/truetype/ttgxvar.c (tt_set_mm_blend): Reset `face->postscript_name' to trigger recalculation for new instance parameters. 2017-03-14 Werner Lemberg <wl@gnu.org> [sfnt] Implement PS names for font instances [2/3]. * src/sfnt/sfdriver.c (fix2float) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: New function to find the shortest representation of a 16.16 fractional number. 2017-03-14 Werner Lemberg <wl@gnu.org> [sfnt] Implement PS names for font instances [1/3]. Add 128bit MurmurHash 3 function. Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. * src/sfnt/sfdriver.c (ROTL32): New macro. (fmix32, murmur_hash_3_128): New functions. 2017-03-13 Werner Lemberg <wl@gnu.org> [truetype] Ignore invalid MVAR tags. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=838 * src/truetype/ttgxvar.c (ft_var_load_mvar): Ignore value and emit warning for invalid tags. (tt_apply_mvar): Ignore invalid tags. 2017-03-12 Werner Lemberg <wl@gnu.org> [truetype] Store and use design coordinates also. * include/freetype/internal/services/svmm.h (FT_Get_Var_Blend_Func): Add `normalizedcoords' argument. * src/truetype/ttgxvar.h (GX_BlendRec): Add `coords' field to store the design coordinates of the current instance. Updated. * src/truetype/ttgxvar.c (TT_Set_MM_Blend): Move functionality to... (tt_set_mm_blend): ... New function. Convert data in `normalizedcoords' array to `coords' array on demand. (TT_Set_Var_Design): Store argument data in `coords' array. (TT_Get_Var_Design): Get data from `coords' array. (tt_get_var_blend): Updated. (tt_done_blend): Updated. * src/cff/cffload.c, src/cff/cffload.h (cff_get_var_blend): Updated. * src/cff/cf2ft.c (cf2_getNormalizedVector): Updated. * src/cff/cffobjs.c (cff_face_init): Updated. 2017-03-12 Werner Lemberg <wl@gnu.org> src/truetype/ttgxvar.[ch]: s/avar_checked/avar_loaded/. 2017-03-08 Werner Lemberg <wl@gnu.org> [sfnt] Another fix for buggy variation fonts. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=759 * src/sfnt/sfobjs.c (sfnt_init_face): While setting number of instances to zero for `CFF' fonts table, ensure that there is no `CFF2' present also (which gets priority). 2017-03-07 Werner Lemberg <wl@gnu.org> [sfnt] Improve handling for buggy variation fonts. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=738 * src/sfnt/sfobjs.c (sfnt_init_face): While setting number of instances to zero for `CFF' fonts table, ensure that there is no `glyf' table present also (which gets priority). 2017-03-06 Werner Lemberg <wl@gnu.org> [sfnt, truetype] Always provide default instance. As documented in the OpenType specification, an entry for the default instance may be omitted in the named instance table. In particular this means that even if there is no named instance table in the font we actually do have a named instance, namely the default instance. For consistency, we always want the default instance in our list of named instances. If it is missing, we try to synthesize it. * src/sfnt/sfobjs.c (sfnt_init_face): Check whether the default instance is in the table of named instances. Otherwise adjust number of instances. * src/truetype/ttgxvar.c: Include FT_TRUETYPE_IDS_H. (TT_Get_MM_Var): Use `face->root.style_flags' as the number of named instances. Sythesize a named instance entry if necessary. (tt_done_blend): Free `normalized_stylecoords'. 2017-03-05 Werner Lemberg <wl@gnu.org> [sfnt] Remove redundant code. * src/sfnt/sfobjs.c (sfnt_init_face): Remove second test for `num_instances', which will always succeed. 2017-03-04 Werner Lemberg <wl@gnu.org> [sfnt] Add `get_name_id' service. * include/freetype/internal/sfnt.h (TT_Get_Name_ID_Func): New typedef. (SFNT_Interface): Add `get_name_id' field. (FT_DEFINE_SFNT_INTERFACE): Updated. * src/sfnt/sfdriver.c (search_name_id): Rename to... (sfnt_get_name_id): ... this. (sfnt_get_ps_name, sfnt_interface): Updated. 2017-03-04 Werner Lemberg <wl@gnu.org> [truetype] Make `TT_Set_MM_Blend' set named instance index. * src/truetype/ttgxvar.h (GX_Blend): New array `normalized_stylecoords'. * src/truetype/ttgxvar.c (TT_Get_MM_Var): Allocate and fill `normalized_stylecoords'. (TT_Set_MM_Blend): Check instance tuple and adjust `face_index' accordingly. 2017-03-02 Werner Lemberg <wl@gnu.org> [truetype] Split off designer/normalized conversion routines. * src/truetype/ttgxvar.c (TT_Set_Var_Design): Split off conversion code designer->normalized coordinates to... (ft_var_to_normalized): ... New function. (TT_Get_Var_Design): Split off conversion code normalized->designer coordinates to... (ft_var_to_design): ... New function. 2017-02-28 Werner Lemberg <wl@gnu.org> [sfnt] Further generalize `sfnt_get_ps_name'; report invalid data. * src/sfnt/sfdriver.c (sfnt_ps_map): New array. (sfnt_is_postscript): New function. (char_type_func): New typedef. (get_win_string, get_apple_string): Add argument to specify character checking function. Add argument whether argument checking failures should be reported. Update callers. (search_name_id): Fix return value. 2017-02-23 Werner Lemberg <wl@gnu.org> [sfnt] Split off another bit of `sfnt_get_ps_name'. * src/sfnt/sfdriver.c (sfnt_get_ps_name): Split off some functionality into... (search_name_id): ... New function. 2017-02-23 Werner Lemberg <wl@gnu.org> [sfnt] Modularize `sfnt_get_ps_name'. * src/sfnt/sfdriver.c (sfnt_get_ps_name): Split off some functionality into... (IS_WIN, IS_APPLE): ... New macros. (get_win_string, get_apple_string): ... New functions. 2017-02-23 Werner Lemberg <wl@gnu.org> [truetype] Minor improvement. * src/truetype/ttgload.c (TT_Process_Simple_Glyph, load_truetype_glyph): Remove unnecessary tests. 2017-02-23 Werner Lemberg <wl@gnu.org> * include/freetype/internal/tttypes.h (TT_Face): s/isCFF2/is_cff2/. For orthogonality with other structure field names. Update all users. 2017-02-22 Alexei Podtelezhnikov <apodtele@gmail.com> * src/smooth/ftgrays.c (gray_hline): Improve code. 2017-02-20 Dominik Röttsches <drott@google.com> Fix some `ttnameid.h' entries (#50313). * include/freetype/ttnameid.h: s/TT_MS_LANGID_SPANISH_INTERNATIONAL_SORT/TT_MS_LANGID_SPANISH_SPAIN_INTERNATIONAL_SORT/, s/TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIA/TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIAN/. 2017-02-20 Werner Lemberg <wl@gnu.org> [cff] Finish support for `random' operator. * src/cff/cfftypes.h (CFF_SubFontRec): Add `random' field. * src/cff/cffobjs.c: Updated. (cff_driver_init): Initialize random seed value. * src/cff/cffload.c (cff_random): New function. (cff_subfont_load): Add `face' argument. Update all callers. Initialize random number generator with a proper seed value. (cff_font_load): Add `face' argument. Update all callers. * src/cff/cffload.h: Updated. * src/cff/cf2intrp.c (CF2_FIXME): Removed. (cf2_interpT2CharString) <cf2_escRANDOM>: Implement opcode. * src/cff/cffgload.c (cff_decoder_parse_charstrings): Don't initialize random seed value. <cff_op_random>: Use new random seed framework. 2017-02-20 Werner Lemberg <wl@gnu.org> [cff] Sanitize `initialRandomSeed'. * src/cff/cffload.c (cff_load_private_dict): Make `initial_random_seed' value always positive. 2017-02-20 Werner Lemberg <wl@gnu.org> [cff] Introduce `random-seed' property (2/2). * src/base/ftobjs.c: Include `FT_CFF_DRIVER_H'. (open_face): Initialize `face->internal->random_seed'. (FT_Face_Properties): Handle `FT_PARAM_TAG_RANDOM_SEED'. * src/cff/cffdrivr.c (cff_property_set): Handle `random-seed' property. 2017-02-20 Werner Lemberg <wl@gnu.org> [cff] Introduce `random-seed' property (1/2). We need this for support of the `random' operator. * include/freetype/ftcffdrv.h (FT_PARAM_TAG_RANDOM_SEED): New macro. * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): New field `random_seed'. * src/cff/cffobjs.h (CFF_DriverRec): New field `random_seed'. 2017-02-17 Werner Lemberg <wl@gnu.org> Remove clang warnings. * src/autofit/aflatin.c (af_latin_sort_blue): Add missing `static' keyword. * src/base/ftmm.c (FT_Set_Var_Design_Coordinates, FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): Initialize some variables. 2017-02-16 Nikolaus Waxweiler <madigens@gmail.com> Werner Lemberg <wl@gnu.org> Add face property for stem darkening. * include/freetype/ftautoh.h (FT_PARAM_TAG_STEM_DARKENING): New macro. * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): Add `no_stem_darkening' field. * src/autofit/afloader.c (af_loader_load_glyph), src/autofit/afmodule.c (af_property_set): Updated. * src/base/ftobjs.c: Include FT_AUTOHINTER_H. (ft_open_face_internal): Updated. (FT_Face_Properties): Handle FT_PARAM_TAG_STEM_DARKENING. * src/cff/cf2ft.c (cf2_decoder_parse_charstrings): Updated. * src/cff/cffdrivr.c (cff_property_set): Updated. 2017-02-16 Nikolaus Waxweiler <madigens@gmail.com> Werner Lemberg <wl@gnu.org> Add face property for LCD filter weights. * include/freetype/ftlcdfil.h (FT_PARAM_TAG_LCD_FILTER_WEIGHTS, FT_LCD_FILTER_FIVE_TAPS): New macros. (FT_LcdFiveTapFilter): New typedef. * include/freetype/ftobjs.h (FT_Face_InternalRec) [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Add `lcd_weights' field. (FT_Bitmap_LcdFilterFunc): Change third argument to weights array. (ft_lcd_filter_fir): New prototype. (FT_LibraryRec): Updated. * src/base/ftlcdfil.c (_ft_lcd_filter_fir): Renamed to... (ft_lcd_filter_fir): ... this base function. Updated. (_ft_lcd_filter_legacy): Updated. (FT_Library_SetLcdFilterWeights, FT_Library_SetLcdFilter): Updated. * src/base/ftobjs.c (ft_open_face_internal): Updated. (FT_Face_Properties): Handle FT_PARAM_TAG_LCD_FILTER_WEIGHTS. * src/smooth/ftsmooth.c (ft_smooth_render_generic) [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Handle LCD weights from `FT_Face_Internal'. 2017-02-14 Nikolaus Waxweiler <madigens@gmail.com> Werner Lemberg <wl@gnu.org> Add new function `FT_Face_Properties'. This commit provides the framework, to be filled with something useful in the next commits. * include/freetype/freetype.h (FT_Face_Properties): Declare. * src/base/ftobjs.c (FT_Face_Properties): New function. 2017-02-13 Werner Lemberg <wl@gnu.org> [autofit] Prevent overlapping blue zones. Problem reported as https://github.com/google/fonts/issues/632 The font in question (Nunito) has values 705 and 713 for the reference and overshoot values, respectively, of the first blue zone. Blue zone 2, however, has value 710 for both the reference and overshoot. At 12ppem, reference and overshoot of blue zone 0 becomes 8px, while blue zone 2 becomes 9px. A peculiarity of this font is that the tops of isolated vertical stems like `N' have a slight overshoot also. The auto-hinter tries to find the nearest blue zone using the *original* coordinates. For vertical stems, this is value 713. For normal horizontal tops like in character `E', this is value 710. Since value 713 is mapped to 8px but value 710 to 9px, `N' and similar characters are one pixel higher than `E', which looks very bad. This commit sanitizes blue zones to avoid such a behaviour. * src/autofit/aflatin.c (af_latin_sort_blue): New function. (af_latin_metrics_init_blues): Sort blue values and remove overlaps. 2017-02-12 Alexei Podtelezhnikov <apodtele@gmail.com> * src/smooth/ftgrays.c (gray_sweep): Improve code. 2017-02-06 Werner Lemberg <wl@gnu.org> [truetype] Implement `VVAR' table support. * src/truetype/ttgxvar.h (GX_HVarTable): Renamed to... (GX_HVVarTable): ...This. (GX_Blend): Add fields for `VVAR' table handling. Other minor updates. * src/truetype/ttgxvar.c (ft_var_load_hvar): Renamed to... (ft_var_load_hvvar): ...This. Handle VVAR loading also (controlled by an additional parameter). (tt_hadvance_adjust): Renamed to... (tt_hvadvance_adjust): ...This. Handle application of advance height also (controlled by an additional parameter). (tt_hadvance_adjust, tt_vadvance_adjust): Wrappers for `tt_hvadvance_adjust'. * src/truetype/ttdriver.c (tt_service_metrics_variations): Updated. 2017-02-05 Werner Lemberg <wl@gnu.org> [autofit] Use better blue zone characters for lowercase latin. The number of lowercase characters for computing the top flat blue zone value was too small (in most cases only `x' and `z'). If one of the two characters has a large serif, say, it can happen that FreeType must select between two different values, having a 50% chance to use the wrong one. As a result, rendering at larger PPEM values could yield uneven lowercase glyph heights. Problem reported by Christoph Koeberlin <christoph@koe.berlin>. * src/autofit/afblue.dat (AF_BLUE_STRING_LATIN_SMALL): Replaced with... (AF_BLUE_STRING_LATIN_SMALL_TOP, AF_BLUE_STRING_LATIN_SMALL_BOTTOM): ... New, extended sets. (AF_BLUE_STRINGSET_LATN): Updated. * src/autofit/afblue.c, scr/autofit/afblue.h: Regenerated. 2017-02-04 Werner Lemberg <wl@gnu.org> Make `freetype-config' a wrapper of `pkg-config' if possible. Based on ideas taken from https://pkgs.fedoraproject.org/cgit/rpms/freetype.git/tree/freetype-multilib.patch https://pkgs.fedoraproject.org/cgit/rpms/freetype.git/tree/freetype-2.5.3-freetype-config-prefix.patch * builds/unix/freetype-config.in: Rewritten. Use `pkg-config' to set output variables if program is available. * docs/CHANGES, docs/freetype-config.1: Updated. 2017-02-04 Werner Lemberg <wl@gnu.org> * builds/unix/unix-def.in (freetype-config): Fix permissions. 2017-02-03 Werner Lemberg <wl@gnu.org> * src/autofit/afglobal.c (af_face_globals_free): Erase useless code. 2017-02-03 Werner Lemberg <wl@gnu.org> * include/freetype/ftgasp.h (FT_GASP_SYMMETRIC_GRIDFIT): Fix value. Reported by Behdad. 2017-02-02 Werner Lemberg <wl@gnu.org> [truetype] Fix MVAR post-action handling. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=509 * src/truetype/ttobjs.c (tt_size_reset): Do nothing for CFF2. This is important to make `tt_size_reset_iterator' (called in `tt_apply_mvar') always work. 2017-02-02 Werner Lemberg <wl@gnu.org> Make compilation with FT_CONFIG_OPTION_PIC work again. All code committed here is guarded with `FT_CONFIG_OPTION_PIC'. * include/freetype/internal/services/svmetric.h (FT_DEFINE_SERVICE_METRICSVARIATIONSREC): Remove trailing semicolon. * src/autofit/aflatin.c (af_latin_hints_compute_edges, af_latin_hint_edges): Provide `globals' variable. * src/autofit/afloader.c (af_loader_load_glyph): Remove shadowing variable. * src/autofit/afmodule.c (AF_SCRIPT_CLASSES_GET, AF_STYLE_CLASSES_GET): Redefine. * src/autofit/aftypes.h (AF_DEFINE_WRITING_SYSTEM_CLASS): Fix typo. * src/cff/cffparse.c (CFF_FIELD_BLEND): Provide it. * src/cff/cffpic.h (CffModulePIC): Fix typo. 2017-01-31 Alexei Podtelezhnikov <apodtele@gmail.com> * src/smooth/ftgrays.c (gray_render_scanline): Improve code. 2017-01-31 Werner Lemberg <wl@gnu.org> [cff] Provide metrics variation service interface (#50196). Only now I've got an OTF with an HVAR table for testing... The code in `ftmm.c' uses `FT_FACE_LOOKUP_SERVICE' to get the metrics variations interface. However, this didn't work with `FT_FACE_FIND_GLOBAL_SERVICE' used in `sfnt_init_face'. * src/cff/cffdrivr.c: Include FT_SERVICE_METRICS_VARIATIONS_H. (cff_hadvance_adjust, cff_metrics_adjust): Wrapper functions for metric service functions from the `truetype' module. (cff_service_metrics_variations): New service. (cff_services): Updated. * src/cff/cffpic.h (CFF_SERVICE_METRICS_VAR_GET): New macro. [FT_CONFIG_OPTION_PIC]: Synchronize code. * src/sfnt/sfobjs.c (sfnt_init_face): Replace call to FT_FACE_FIND_GLOBAL_SERVICE with `ft_module_get_service' to always load the service from the `truetype' module. 2017-01-31 Werner Lemberg <wl@gnu.org> Add framework to support services with 9 functions. * include/freetype/internal/ftserv.h (FT_DEFINE_SERVICEDESCREC9): New macro. 2017-01-31 Werner Lemberg <wl@gnu.org> [base] Fix error handing in MM functions. * src/base/ftmm.c (FT_Set_Var_Design_Coordinates, FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): Implement it. 2017-01-31 Werner Lemberg <wl@gnu.org> [truetype] Fix sanity check for `gvar' table (#50184). * src/truetype/ttgxvar.c (ft_var_load_gvar): There might be missing variation data for some glyphs. 2017-01-31 Werner Lemberg <wl@gnu.org> [autofit] Avoid uninitialized jumps (#50191). * src/autofit/afcjk.c (af_cjk_metrics_check_digits), src/autofit/aflatin.c (af_latin_metrics_check_digits): Initialize `advance'. 2017-01-27 Werner Lemberg <wl@gnu.org> s/GB2312/PRC/. * include/freetype/freetype.h (FT_ENCODING_PRC): New enum value. (FT_ENCODING_GB2312): Deprecated. * include/freetype/ttnameid.h (TT_MS_ID_PRC): New macro. (TT_MS_ID_GB2312): Deprecated. * src/sfnt/sfobjs.c (sfnt_find_encoding): Updated. * docs/CHANGES: Updated. 2017-01-26 Werner Lemberg <wl@gnu.org> [base] Add `FT_Get_Sfnt_LangTag' function. * include/freetype/ftsnames.h (FT_SfntLangTag): New structure. (FT_Get_Sfnt_LangTag): New declaration. * src/base/ftsnames.c (FT_Get_Sfnt_LangTag): New function. * docs/CHANGES: Updated. 2017-01-26 Werner Lemberg <wl@gnu.org> [sfnt] Support `name' table format 1. * include/freetype/internal/tttypes.h (TT_LangTagRec): New structure. (TT_NameTableRec): Add fields `numLangTagRecords' and `langTags'. * src/sfnt/ttload.c (tt_face_load_name): Add support for language tags. Reduce array size of name strings in case of invalid entries. (tt_face_free_name): Updated. * docs/CHANGES: Updated. 2017-01-25 Werner Lemberg <wl@gnu.org> [sfnt] s/TT_NameEntry/TT_Name/. * include/freetype/internal/tttypes.h (TT_NameEntryRec): Renamed to... (TT_NameRec): This. (TT_NameTableRec): Updated. * src/base/ftsnames.c (FT_Get_Sfnt_Name): Updated. * src/sfnt/sfdriver.c (sfnt_get_ps_name): Updated. * src/sfnt/sfobjs.c (tt_name_entry_ascii_from_utf16, tt_name_entry_ascii_from_other): Renamed to... (tt_name_ascii_from_utf16, tt_name_entry_ascii_from_other): This, respectively. (TT_NameEntry_ConvertFunc): Renamed to... (TT_Name_ConvertFunc): This. (tt_face_get_name): Updated. * src/sfnt/ttload.c (tt_face_load_name, tt_face_free_name): Updated. 2017-01-24 Werner Lemberg <wl@gnu.org> [sfnt] Fix Postscript name service for symbol fonts. * src/sfnt/sfdriver.c (sfnt_get_ps_name): Accept PID/EID=3/0 entries also. 2017-01-24 Werner Lemberg <wl@gnu.org> [truetype] For OpenType 1.7: s/preferred/typographic/ (sub)family. * include/freetype/ftsnames.h (FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY, FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY): New macros. (FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY, FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY): Deprecated. * include/freetype/ttnameid.h (TT_NAME_ID_TYPOGRAPHIC_FAMILY, TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY): New macros. (TT_NAME_ID_PREFERRED_FAMILY, TT_NAME_ID_PREFERRED_SUBFAMILY): Deprecated. * src/sfnt/sfobjs.c (sfnt_load_face): Updated. * docs/CHANGES: Updated. 2017-01-23 Werner Lemberg <wl@gnu.org> [base] Add `FT_Set_Default_Properties' (#49187). * include/freetype/ftmodapi.h: Add declaration. * src/base/ftinit.c (ft_set_default_properties): Renamed to... (FT_Set_Default_Properties): ... this. (FT_Init_FreeType): Updated. * docs/CHANGES: Updated. 2017-01-23 Werner Lemberg <wl@gnu.org> [truetype] Minor updates for OpenType 1.8.1. * src/truetype/ttgxvar.h (GX_MVarTable): `axisCount' has been removed from the specification; it is now reserved. * src/truetype/ttgxvar.c (ft_var_load_mvar): Updated. (GX_FVar_Head): Remove `countSizePairs'; the corresponding data field in the `MVAR' table is now reserved. (fvar_fields): Updated. 2017-01-23 Werner Lemberg <wl@gnu.org> [truetype] Avoid segfault for invalid variation data. * src/truetype/ttgxvar.c (ft_var_load_item_variation_store): Assure `itemCount' is not zero. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=441 2017-01-20 Werner Lemberg <wl@gnu.org> * src/truetype/ttinterp.c (TT_RunIns): Adjust loop detector limits. 2017-01-17 Werner Lemberg <wl@gnu.org> * include/freetype/ttnameid.h: Updated to OpenType 1.8.1. (TT_APPLE_ID_FULL_UNICODE): New macro. (TT_MS_LANGID_BOSNIAN_BOSNIA_HERZ_CYRILLIC, TT_MS_LANGID_UPPER_SORBIAN_GERMANY, TT_MS_LANGID_LOWER_SORBIAN_GERMANY, TT_MS_LANGID_IRISH_IRELAND, TT_MS_LANGID_INUKTITUT_CANADA_LATIN, TT_MS_LANGID_BASHKIR_RUSSIA, TT_MS_LANGID_LUXEMBOURGISH_LUXEMBOURG, TT_MS_LANGID_GREENLANDIC_GREENLAND, TT_MS_LANGID_MAPUDUNGUN_CHILE, TT_MS_LANGID_MOHAWK_MOHAWK, TT_MS_LANGID_BRETON_FRANCE, TT_MS_LANGID_OCCITAN_FRANCE, TT_MS_LANGID_CORSICAN_FRANCE, TT_MS_LANGID_ALSATIAN_FRANCE, TT_MS_LANGID_YAKUT_RUSSIA, TT_MS_LANGID_KICHE_GUATEMALA, TT_MS_LANGID_KINYARWANDA_RWANDA, TT_MS_LANGID_WOLOF_SENEGAL, TT_MS_LANGID_DARI_AFGHANISTAN): New macros. (TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_CYRILLIC): Fix value. (TT_MS_LANGID_GERMAN_LIECHTENSTEIN, TT_MS_LANGID_CATALAN_CATALAN, TT_MS_LANGID_CHINESE_MACAO, TT_MS_LANGID_SPANISH_SPAIN_MODERN_SORT, TT_MS_LANGID_KOREAN_KOREA, TT_MS_LANGID_ROMANSH_SWITZERLAND, TT_MS_LANGID_SLOVENIAN_SLOVENIA, TT_MS_LANGID_BASQUE_BASQUE, TT_MS_LANGID_SETSWANA_SOUTH_AFRICA, TT_MS_LANGID_ISIXHOSA_SOUTH_AFRICA, TT_MS_LANGID_ISIZULU_SOUTH_AFRICA, TT_MS_LANGID_KAZAKH_KAZAKHSTAN, TT_MS_LANGID_KYRGYZ_KYRGYZSTAN, TT_MS_LANGID_KISWAHILI_KENYA, TT_MS_LANGID_TATAR_RUSSIA, TT_MS_LANGID_ODIA_INDIA, TT_MS_LANGID_MONGOLIAN_PRC, TT_MS_LANGID_TIBETAN_PRC, TT_MS_LANGID_WELSH_UNITED_KINGDOM, TT_MS_LANGID_GALICIAN_GALICIAN, TT_MS_LANGID_SINHALA_SRI_LANKA, TT_MS_LANGID_TAMAZIGHT_ALGERIA, TT_MS_LANGID_SESOTHO_SA_LEBOA_SOUTH_AFRICA, TT_MS_LANGID_YI_PRC, TT_MS_LANGID_UIGHUR_PRC): New aliases. Remove commented out code. (TT_NAME_ID_LIGHT_BACKGROUND, TT_NAME_ID_DARK_BACKGROUND, TT_NAME_ID_VARIATIONS_PREFIX): New macros. (HAVE_LIMIT_ON_IDENTS): Remove macro (which was useless since many years), use guarded long macros by default and define short versions as aliases for the long ones. 2017-01-15 Werner Lemberg <wl@gnu.org> * src/truetype/ttgxvar.c (tt_apply_var): Handle underline parameters also. 2017-01-11 Werner Lemberg <wl@gnu.org> * src/base/ftobjs.c (ft_open_face_internal): Improve tracing. 2017-01-11 Werner Lemberg <wl@gnu.org> [truetype] Actually use metrics variation service. * src/base/ftmm.c: Include FT_SERVICE_METRICS_VARIATIONS_H. (ft_face_get_mvar_service): New auxiliary function to look up metrics variation service. (FT_Set_Var_Design_Coordinates, FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): Call metrics variation service. * src/truetype/ttobjs.c (tt_face_init): Use metrics variations for named instances. 2017-01-11 Werner Lemberg <wl@gnu.org> [truetype] Provide metrics variation service. * include/freetype/internal/services/svmetric.h (FT_Metrics_Adjust_Func): Reduce number of necessary parameters. * src/truetype/ttgxvar.c: Include FT_LIST_H. (tt_size_reset_iterator): New auxiliary function for... (tt_apply_var): New function. * src/truetype/ttgxvar.h: Updated. * src/truetype/ttdriver.c (tt_service_metrics_variations): Add `tt_apply_mvar'. * include/freetype/internal/ftserv.h (FT_ServiceCache): Add metrics variation service. 2017-01-11 Werner Lemberg <wl@gnu.org> [truetype] Parse `MVAR' table. * src/truetype/ttgxvar.h (MVAR_TAG_XXX): New macros for MVAR tags. (GX_Value, GX_MVarTable): New structures. (GX_Blend): Add it. * src/truetype/ttgxvar.c (GX_VALUE_SIZE, GX_VALUE_CASE, GX_GASP_CASE): New macros. (ft_var_get_value_pointer): New auxiliary function to get a pointer to a value from various SFNT tables already stored in `TT_Face'. (ft_var_load_mvar): New function. (TT_Get_MM_Var): Call it. (tt_done_blend): Updated. 2017-01-11 Werner Lemberg <wl@gnu.org> [truetype] More preparations for MVAR support. * src/truetype/ttobjs.c (tt_size_reset): Add argument to make function only recompute ascender, descender, and height. * src/truetype/ttobjs.h: Updated. * src/truetype/ttdriver.c (tt_size_select, tt_size_request): Updated. 2017-01-09 Werner Lemberg <wl@gnu.org> [pcf] Disable long family names by default. * include/freetype/config/ftoption.h (PCF_CONFIG_OPTION_LONG_FAMILY_NAMES): Comment out. 2017-01-09 Werner Lemberg <wl@gnu.org> [pcf] Make long family names configurable. The change from 2016-09-29 was too radical (except for people using the openSuSE GNU/Linux distribution). To ameliorate the situation, PCF_CONFIG_OPTION_LONG_FAMILY_NAMES gets introduced which controls the feature; if set, a new PCF property option `no-long-family-names' can be used to switch this feature off. * include/freetype/config/ftoption.h, devel/ftoption.h (PCF_CONFIG_OPTION_LONG_FAMILY_NAMES): New option. * include/freetype/ftpcfdrv.h: New header file (only containing comments currently, used for building the documentation). * include/freetype/config/ftheader.h (FT_PCF_DRIVER_H): New macro. * src/pcf/pcf.h (PCF_Driver): Add `no_long_family_names' field. * src/pcf/pcfdrivr.c: Include FT_SERVICE_PROPERTIES_H and FT_PCF_DRIVER_H. (pcf_property_set, pcf_property_get): New functions. (pcf_service_properties): New service. (pcf_services): Updated. (pcf_driver_init) [PCF_CONFIG_OPTION_LONG_FAMILY_NAMES]: Handle `no_long_family_names'. * src/pcf/pcfread.c (pcf_load_font): Handle `no_long_family_names' and PCF_CONFIG_OPTION_LONG_FAMILY_NAMES. * docs/CHANGES: Updated. 2017-01-09 Werner Lemberg <wl@gnu.org> [pcf] Introduce a driver structure. To be filled later on with something useful. * src/pcf/pcf.h (PCF_Driver): New structure. * src/pcf/pcfdrivr.c (pcf_driver_init, pcf_driver_done): New dummy functions. (pcf_driver_class): Updated. 2017-01-08 Werner Lemberg <wl@gnu.org> [truetype] Again some GX code shuffling. We need this later on for MVAR also. * src/truetype/ttgxvar.c (tt_hadvance_adjust): Split off computing an item store variation delta into... (ft_var_get_item_delta): ...new function. 2017-01-08 Werner Lemberg <wl@gnu.org> [truetype] Adjust font variation flags for MVAR. * include/freetype/internal/tttypes.h (TT_FACE_FLAG_VAR_XXX): Remove all flags related to MVAR; replace it with... (TT_FACE_FLAG_VAR_MVAR): ...this new macro. (TT_Face): Remove `mvar_support' field (which was still unused). 2017-01-06 Werner Lemberg <wl@gnu.org> [truetype] More GX code shuffling. We need this later on for MVAR also. * src/truetype/ttgxvar.c (tt_done_blend): Split off handling of item variation store into... (ft_var_done_item_variation_store): ...new function. 2017-01-06 Werner Lemberg <wl@gnu.org> [truetype] More generalization of GX stuff. We need this later on for MVAR also. * src/truetype/ttgxvar.c (ft_var_load_delta_set_index_mapping): Add parameters for delta-set index mapping and item variation store. (ft_var_load_item_variation_store): Add parameter for item variation store. s/hvarData/varData/. Move allocation of `hvar_table' to... (ft_var_load_hvar): ...this function. Updated. 2017-01-06 Werner Lemberg <wl@gnu.org> [truetype] Some GX structure renames for generalization. We need this later on for MVAR also. * src/truetype/ttgxvar.h (GX_HVarData): Renamed to... (GX_ItemVarData): ...this. (GX_HVarRegion): Renamed to... (GX_VarRegion): ...this. (GX_HVStore): Renamed to... (GX_ItemVarStore): ...this. (GX_WidthMap): Renamed to... (GX_DeltaSetIdxMap): ...this. (GX_HVarTable): Updated. * src/truetype/ttgxvar.c: Updated. 2017-01-06 Werner Lemberg <wl@gnu.org> [truetype] Code shuffling. * src/truetype/ttgxvar.c (ft_var_load_hvar): Split off loading of item variation store and delta set index mapping into... (ft_var_load_item_variation_store, ft_var_load_delta_set_index_mapping): ...new functions. 2017-01-06 Werner Lemberg <wl@gnu.org> [truetype] Add HVAR access without advance width map. * src/truetype/ttgxvar.c (ft_var_load_hvar): Handle case where `offsetToAdvanceWidthMapping' is zero. (tt_hadvance_adjust): Implement direct deltaSet access by glyph index. 2017-01-06 Werner Lemberg <wl@gnu.org> [pcf] Revise driver. This commit improves tracing and handling of malformed fonts. In particular, the changes to `pcf_get_properties' fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=379 * src/pcf/pcfread.c (tableNames): Use long names for better readability. (pcf_read_TOC): Allow at most 9 tables. (pcf_get_properties): Allow at most 256 properties. Limit strings array length to 256 * (65536 + 1) bytes. Better tracing. (pcf_get_metric): Trace metric data. (pcf_get_metrics): Allow at most 65536 metrics. Fix comparison of `metrics->ascent' and `metrics->descent' to avoid potential overflow. Better tracing. (pcf_get_bitmaps): Allow at most 65536 bitmaps. Better tracing. (pcf_get_encodings, pcf_get_accel): Better tracing. * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Don't trace `format' details. These are now shown by `pcf_get_bitmaps'. 2017-01-04 Werner Lemberg <wl@gnu.org> * src/pcf/pcfdrivr.c (PCF_Face_Init): Trace compression format. 2017-01-04 Werner Lemberg <wl@gnu.org> [cff] More consistency checks for pure CFFs. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=378 * src/cff/cffload.c (cff_font_load): Check element number and size of Name and Top DICT indices. 2017-01-04 Werner Lemberg <wl@gnu.org> [cff, truetype] Minor tracing improvement. * src/cff/cffobjs.c (cff_face_init), src/truetype/ttobjs.c (tt_face_init): Indent first tracing message from SFNT driver. 2017-01-03 Werner Lemberg <wl@gnu.org> [truetype] Various minor fixes. * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Check instruction size only if we do native hinting. (TT_Load_Glyph): Trace returned error code. * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Trace returned error code. (tt_size_ready_bytecode): Don't run `prep' table if `fpgm' table is invalid. 2017-01-03 Werner Lemberg <wl@gnu.org> [sfnt] Don't fail if PCLT, EBLC (and similar tables) are invalid. These tables are optional. * src/sfnt/sfobjs.c (sfnt_load_face): Implement it. 2017-01-03 Werner Lemberg <wl@gnu.org> * src/cff/cffparse.c (cff_parse_num): Simplify. 2017-01-03 Werner Lemberg <wl@gnu.org> Various fixes for clang's undefined behaviour sanitizer. * src/cff/cffload.c (FT_fdot14ToFixed): Fix casting. (cff_blend_doBlend): Don't left-shift negative numbers. Handle 5-byte numbers byte by byte to avoid alignment issues. * src/cff/cffparse.c (cff_parse_num): Handle 5-byte numbers byte by byte to avoid alignment issues. * src/cid/cidload (cid_read_subrs): Do nothing if we don't have any subrs. * src/psaux/t1decode.c (t1_decode_parse_charstring): Fix tracing. * src/tools/glnames.py (main): Put `DEFINE_PSTABLES' guard around definition of `ft_get_adobe_glyph_index'. * src/psnames/pstables.h: Regenerated. * src/psnames/psmodule.c: Include `pstables.h' twice to get both declaration and definition. * src/truetype/ttgxvar.c (FT_fdot14ToFixed, FT_intToFixed): Fix casting. 2017-01-01 Werner Lemberg <wl@gnu.org> [cff] Handle multiple `blend' operators in a row correctly. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=368 * src/cff/cffload.c (cff_blend_doBlend): Adjust `parser->stack' pointers into `subFont->blend_stack' after reallocation. 2017-01-01 Werner Lemberg <wl@gnu.org> [sfnt] Return correct number of named instances for TTCs. Without this patch, requesting information for face index N returned the data for face index N+1 (or index 0). * src/sfnt/sfobjs.c (sfnt_init_face): Correctly adjust `face_index' for negative `face_instance_index' values. 2016-12-31 Werner Lemberg <wl@gnu.org> */*: Use hex numbers for errors in tracing messages. 2016-12-31 Werner Lemberg <wl@gnu.org> [truetype] Check axis count in HVAR table. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=362 * src/truetype/ttgxvar.c (ft_var_load_hvar): Check axis count. (ft_var_load_avar): Fix tracing message. ---------------------------------------------------------------------------- Copyright (C) 2016-2022 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, and distributed under the terms of the FreeType project license, LICENSE.TXT. By continuing to use, modify, or distribute this file you indicate that you have read the license and understand and accept it fully. Local Variables: version-control: never coding: utf-8 End:
whupdup/frame
real/third_party/freetype-2.12.0/docs/oldlogs/ChangeLog.28
28
gpl-3.0
96,385
2018-05-01 Werner Lemberg <wl@gnu.org> * Version 2.9.1 released. ========================= Tag sources with `VER-2-9-1'. * docs/VERSION.TXT: Add entry for version 2.9.1. * docs/CHANGES: Updated. * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj, src/base/ftver.rc, builds/windows/vc2005/index.html, builds/windows/vc2008/freetype.vcproj, builds/windows/vc2008/index.html, builds/windows/vc2010/freetype.vcxproj, builds/windows/vc2010/index.html, builds/windows/visualc/freetype.dsp, builds/windows/visualc/freetype.vcproj, builds/windows/visualc/index.html, builds/windows/visualce/freetype.dsp, builds/windows/visualce/freetype.vcproj, builds/windows/visualce/index.html, builds/wince/vc2005-ce/freetype.vcproj, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/freetype.vcproj, builds/wince/vc2008-ce/index.html: s/2.9/2.9.1/, s/29/291/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1. * builds/unix/configure.raw (version_info): Set to 22:1:16. * CMakeLists.txt (VERSION_PATCH): Set to 1. * include/freetype/ftgasp.h: Use FT_BEGIN_HEADER and FT_END_HEADER. 2018-04-26 Werner Lemberg <wl@gnu.org> Another fix for handling invalid format 2 cmaps. Sigh. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8003 * src/sfnt/ttcmap.c (tt_cmap2_char_next): Adjust condition to avoid an endless loop. 2018-04-24 Ben Wagner <bungeman@google.com> [base] Avoid undefined behaviour in lcd filtering code (#53727). * src/base/ftlcdfil.c (ft_lcd_filter_fir, _ft_lcd_filter_legacy): Ensure `height > 0'. 2018-04-22 Werner Lemberg <wl@gnu.org> * src/base/ftoutln.c (FT_Outline_Decompose): Improve error tracing. 2018-04-22 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Fix bitmap emboldening. Bug introduced after release 2.8. * src/base/ftbitmap.c (ft_bitmap_assure_buffer): We use `FT_QALLOC_MULT', which doesn't zero out the buffer. Adjust the bitmap copying code to take care of this fact. 2018-04-22 Werner Lemberg <wl@gnu.org> Another fix for handling invalid format 2 cmaps. The previous commit was incomplete. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7928 * src/sfnt/ttcmap.c (tt_cmap2_char_next): Adjust condition to avoid an endless loop. 2018-04-19 Werner Lemberg <wl@gnu.org [autofit] Add support for Georgian Mtavruli characters. This will be part of the forthcoming Unicode 11.0. * src/autofit/afblue.dat: Add blue zone data for Mtavruli. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Mtavruli standard character. 2018-04-18 Werner Lemberg <wl@gnu.org> Fix handling of invalid format 2 cmaps. The problem was introduced after the last release. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7828 * src/sfnt/ttcmap.c (tt_cmap2_char_next): Avoid endless loop. 2018-04-17 Werner Lemberg <wl@gnu.org> [truetype] Integer overflow issues. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7739 * src/truetype/ttinterp.c (Ins_CEILING): Use FT_PIX_CEIL_LONG. 2018-04-16 Werner Lemberg <wl@gnu.org> [truetype] Integer overflow issues. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7718 * src/truetype/ttinterp.c (Ins_MIRP): Use ADD_LONG. 2018-04-15 Alexei Podtelezhnikov <apodtele@gmail.com> [build] Use `info' function of make 3.81. * configure, docs/INSTALL, docs/INSTALL.CROSS, docs/INSTALL.GNU, docs/INSTALL.UNIX, docs/MAKEPP: Bump make version requirements. * builds/detect.mk (std_setup): Replace `echo' with `info'. (dos_setup): Removed. * builds/unix/install.mk, builds/modules.mk, builds/dos/detect.mk, builds/windows/detect.mk, builds/os2/detect.mk: Updated. * builds/newline: No longer needed. 2018-04-15 Werner Lemberg <wl@gnu.org> [truetype]: Limit `SLOOP' bytecode argument to 16 bits. This fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7707 * src/truetype/ttinterp.c (Ins_SLOOP): Do it. 2018-04-14 Werner Lemberg <wl@gnu.org> [truetype] Integer overflow issues. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7652 * src/truetype/ttinterp.c (Ins_MDAP): Use SUB_LONG. 2018-04-14 Werner Lemberg <wl@gnu.org> [autofit] Update to Unicode 11.0.0. But no support new scripts (volunteers welcomed). * src/autofit/afranges.c (af_arab_nonbase_uniranges, af_beng_nonbase_uniranges, af_cakm_nonbase_uniranges, af_deva_nonbase_uniranges, af_geor_uniranges, af_gujr_nonbase_uniranges, af_mlym_nonbase_uniranges, af_nkoo_nonbase_uniranges, af_telu_nonbase_uniranges, af_hani_uniranges): Add new data. 2018-04-10 Nikolaus Waxweiler <madigens@gmail.com> * CMakeLists.txt, builds/cmake/FindHarfBuzz.cmake: Extensive modernization measures. This brings up the minimum required CMake version to 2.8.12. The installation paths follow the GNU defaults now, e.g. installing on a 64 bit host will place binaries into the lib64/ folder on e.g. Fedora. Symbols are hidden by default (e.g. `-fvisibility=hidden' on GCC). CMake will no longer look for a C++ compiler. Library and .so version now match the Autotools build. Comments in the build file and informational messages now use platform agnostic example commands. ftoption.h and ftconfig.h are written directly without a redundant `-new' copy. External dependencies are expressed as option()s and will turn up as such in cmake-gui. Internal: Properties such as dependencies and include directories are now privately set on the freetype library instead of globally. The CPack definitions have been cleaned up, the `make dist' has been removed. Source packages generated with CPack don't contain Autotools files and aren't used by the maintainers anyway. On Windows, src/base/ftver.rc is compiled to decorate the library with version and copyright information. A pkg-config file is now generated and installed. 2018-04-09 Werner Lemberg <wl@gnu.org> [truetype] Integer overflow issues. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7453 * src/truetype/ttinterp.c (Round_Super, Round_Super_45): Use ADD_LONG and SUB_LONG. 2018-04-06 Alexei Podtelezhnikov <apodtele@gmail.com> [windows, wince] Clean up legacy project files. * builds/wince/vc2005-ce/freetype.vcproj, builds/wince/vc2008-ce/freetype.vcproj, builds/windows/vc2005/freetype.vcproj, builds/windows/vc2008/freetype.vcproj, builds/windows/visualce/freetype.vcproj, builds/windows/visualce/freetype.dsp, builds/windows/visualc/freetype.vcproj, builds/windows/visualc/freetype.dsp: Remove per-file compile flags. 2018-04-04 Werner Lemberg <wl@gnu.org> [cff, type1] Sanitize `BlueFuzz' and `BlueShift'. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7371 * src/cff/cffload.c (cff_load_private_dict): Sanitize `priv->blue_shift' and `priv->blue_fuzz' to avoid overflows later on. * src/type1/t1load.c (T1_Open_Face): Ditto. 2018-04-04 Ben Wagner <bungeman@google.com> * src/truetype/ttobjs.c (trick_names): Add 3 tricky fonts (#53554), `DFHei-Md-HK-BF', `DFKaiShu-Md-HK-BF' and `DFMing-Bd-HK-BF'. (tt_check_trickyness_sfnt_ids): Add checksums for 3 tricky fonts in above. 2018-04-01 Werner Lemberg <wl@gnu.org> * builds/toplevel.mk (work): Use $(SEP). This fixes the `make refdoc' using Cygwin: $(CAT) is `type' on this platform, and this program only understands backslashes in paths. Reported by Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>. 2018-03-30 Werner Lemberg <wl@gnu.org> [truetype] Fix memory leak (only if tracing is on). * src/truetype/ttgxvar.c (TT_Get_MM_Var) [FT_DEBUG_LEVEL_TRACE}: Fix it. 2018-03-23 Ben Wagner <bungeman@google.com> [sfnt] Correctly handle missing bitmaps in sbix format (#53404). * src/sfnt/ttfsbit.c (tt_face_load_sbix_image): Fix return value. 2018-03-23 Ben Wagner <bungeman@google.com> [truetype] Fix advance of empty glyphs in bitmap fonts (#53393). * src/truetype/ttgload.c (TT_Load_Glyph): Apply scaling to metrics for empty bitmaps. 2018-03-22 Werner Lemberg <wl@gnu.org> Remove `ftlcdfil.c' and `ftfntfmt.c' from build files (#53415). builds/amiga/makefile, builds/amiga/makefile.os4, builds/amiga/smakefile, builds/mac/FreeType.m68k_cfm.make.txt, builds/mac/FreeType.m68k_far.make.txt, builds/mac/FreeType.ppc_carbon.make.txt, builds/mac/FreeType.ppc_classic.make.txt, builds/symbian/freetype.mmp, builds/wince/vc2005-ce/freetype.vcproj, builds/wince/vc2008-ce/freetype.vcproj, builds/windows/vc2005/freetype.vcproj, builds/windows/vc2008/freetype.vcproj, builds/windows/vc2010/freetype.vcxproj, builds/windows/vc2010/freetype.vcxproj.filters, builds/windows/visualc/freetype.dsp, builds/windows/visualc/freetype.vcproj, builds/windows/visualce/freetype.dsp, builds/windows/visualce/freetype.vcproj, vms_make.com: Do it. 2018-03-13 Werner Lemberg <wl@gnu.org> * src/sfnt/ttcmap.c (tt_cmap2_validate): Fix potential numeric overflow. 2018-03-13 Werner Lemberg <wl@gnu.org> Fix cmap format 2 handling (#53320). The patch introduced for #52646 was not correct. * src/sfnt/ttcmap.c (tt_cmap2_char_next): Adjust condition. 2018-03-10 Nikolaus Waxweiler <madigens@gmail.com> * CMakeLists.txt (BASE_SRCS): Update to changes from 2018-03-05. 2018-03-09 Chun-wei Fan <fanc999@yahoo.com.tw> * CMakeLists.txt [win32]: Allow MSVC DLL builds (#53287). Do not limit DLL builds to MinGW, since we already have `__declspec(dllexport)' directives in `ftconfig.h'. Also suppress more warnings for POSIX functions. 2018-03-08 Hugh McMaster <hugh.mcmaster@outlook.com> Make installation of `freetype-config' optional (#53093). * builds/unix/configure.raw: Add option `--enable-freetype-config' and set `INSTALL_FT2_CONFIG'. * builds/unix/unix-def.in (INSTALL_FT2_CONFIG): Define. * builds/unix/install.mk (install): Handle it. 2018-03-05 Werner Lemberg <wl@gnu.org> Make `ftlcdfil.c' part of the `base' module. `ftobjs.c' needs `ft_lcd_padding'. Problem reported by duhuanpeng <548708880@qq.com>. * modules.cfg (BASE_EXTENSIONS): Don't include `ftlcdfil.c'. * src/base/ftbase.c: Include `ftlcdfil.c'. * src/base/rules.mk (BASE_SRC): Add `ftlcdfil.c'. * src/base/Jamfile (_sources): Adjusted. * docs/INSTALL.ANY: Updated. 2018-03-05 Werner Lemberg <wl@gnu.org> Make `ftfntfmt.c' part of the `base' module. `ftobjs.c' needs `FT_Get_Font_Format'. Problem reported by duhuanpeng <548708880@qq.com>. * modules.cfg (BASE_EXTENSIONS): Don't include `ftfntfmt.c'. * src/base/ftbase.c: Include `ftfntfmt.c'. * src/base/rules.mk (BASE_SRC): Add `ftfntfmt.c'. * src/base/Jamfile (_sources): Adjusted. * docs/INSTALL.ANY: Updated. 2018-03-01 Werner Lemberg <wl@gnu.org> * src/truetype/ttinterp.c (TT_RunIns): Fix tracing arguments. 2018-02-23 Werner Lemberg <wl@gnu.org> * builds/unix/configure.raw: Need HarfBuzz 1.3.0 or newer. Problem reported by Alan Coopersmith <alan.coopersmith@oracle.com>. 2018-02-17 Werner Lemberg <wl@gnu.org> [sfnt] Prefer `CBDT'/`CBLC' over `glyf' table (#53154). 2018-02-06 Werner Lemberg <wl@gnu.org> [truetype] Integer overflow issues. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6027 * src/truetype/ttinterp.c (Ins_MSIRP, Ins_MIAP, Ins_MIRP): Use SUB_LONG; avoid FT_ABS. 2018-02-04 Alexei Podtelezhnikov <apodtele@gmail.com> [unix] Use -fvisibility=hidden. It is now widely recommended that ELF shared libraries hide symbols except those with explicit __attribute__((visibility("default"))). This is supported by all major compilers and should rather be an option in libtool. * builds/unix/configure.raw: Add -fvisibility=hidden to CFLAGS. * builds/unix/ftconfig.in, builds/vms/ftconfig.h, include/freetype/config/ftconfig.h (FT_EXPORT): Use visibility attribute. 2018-01-27 Werner Lemberg <wl@gnu.org> [truetype] Better protection against invalid VF data. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5739 Bug introduced in commit 08cd62deedefe217f2ea50e392923ce8b5bc7ac7. * src/truetype/ttgxvar.c (TT_Set_Var_Design): Always initialize `normalizedcoords'. 2018-01-27 Werner Lemberg <wl@gnu.org> * src/truetype/ttinterp.c (Ins_GETVARIATION): Avoid NULL reference. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5736 2018-01-27 Werner Lemberg <wl@gnu.org> * src/truetype/ttgxvar.c (tt_set_mm_blend): Minor. 2018-01-27 Werner Lemberg <wl@gnu.org> [truetype] Better trace VF instances. * src/truetype/ttgxvar.c (ft_var_to_normalized): Don't emit number of coordinates. (TT_Get_MM_Var): Trace instance indices names. (TT_Set_Var_Design): Updated. 2018-01-27 Werner Lemberg <wl@gnu.org> [truetype] Beautify tracing of VF axis records. * src/truetype/ttgxvar.c (TT_Get_MM_Var): Show axis records in a table-like manner. 2018-01-26 Ben Wagner <bungeman@google.com> [truetype] Fix multiple calls of `FT_Get_MM_Var' (#52955). * src/truetype/ttgxvar.c (TT_Get_MM_Var): Set `face->blend->num_axis' in case we have to initialize the `face->blend'. 2018-01-23 Alexei Podtelezhnikov <apodtele@gmail.com> [apinames] Anonymous version map for GNU linker. * src/tools/apinames.c (PROGRAM_VERSION): Set to 0.3. (OutputFormat): Add `OUTPUT_GNU_VERMAP'. (names_dump): Handle it. (usage): Updated. (main): Handle new command line flag `-wL'. 2018-01-21 Alexei Podtelezhnikov <apodtele@gmail.com> [unix] Call libtool to clean up. * builds/unix/install.mk (clean_project_unix, distclean_project_unix): Use libtool. * builds/freetype.mk: Minor. 2018-01-18 Alexei Podtelezhnikov <apodtele@gmail.com> * src/base/ftver.rc: Fix mingw-w64 compilation. 2018-01-18 Alexei Podtelezhnikov <apodtele@gmail.com> [build] Enable VERSIONINFO resource for Cygwin/MinGW. * builds/unix/configure.raw: Check for resource compiler. * builds/unix/unix-cc.in: Conditionally set up resource compiler. * builds/freetype.mk: Add conditional rule for `ftver.rc'. * src/base/ftver.rc: Copyright notice and year update. 2018-01-18 Alexei Podtelezhnikov <apodtele@gmail.com> [build] Move VERSIONINFO resource. * builds/windows/vc2010/freetype.vcxproj: Updated. * builds/windows/ftver.rc: Move file from here... * src/base/ftver.rc: ... to here. 2018-01-12 Alexei Podtelezhnikov <apodtele@gmail.com> [build] Expand dllexport/dllimport to Cygwin/MinGW. * include/freetype/config/ftconfig.h: Respect DLL_EXPORT, s/_MSC_VER/_WIN32/. * builds/unix/ftconfig.in: Replicate here. * builds/vms/ftconfig.h: Replicate here. 2018-01-12 Alexei Podtelezhnikov <apodtele@gmail.com> [build] Improve and document MSVC build. * include/freetype/config/ftconfig.h: Guard dllexport/dllimport attributes with _DLL and FT2_DLLIMPORT. * builds/windows/vc2010/index.html: Update documentation. 2018-01-10 Steve Robinson <ssrobins@gmail.com> * CMakeLists.txt [win32]: Suppress warnings for POSIX functions. 2018-01-10 Ewald Hew <ewaldhew@gmail.com> [psaux] Correctly handle Flex features (#52846). * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_cmdVMOVETO, cf2_cmdHMOVETO>: Do not move if doing Flex. 2018-01-09 Alexei Podtelezhnikov <apodtele@gmail.com> * builds/windows/vc2010/freetype.sln: Synchronize with the project. 2018-01-08 Werner Lemberg <wl@gnu.org> * Version 2.9 released. ======================= Tag sources with `VER-2-9'. * docs/VERSION.TXT: Add entry for version 2.9. * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj, builds/windows/vc2005/index.html, builds/windows/vc2008/freetype.vcproj, builds/windows/vc2008/index.html, builds/windows/vc2010/freetype.vcxproj, builds/windows/vc2010/index.html, builds/windows/visualc/freetype.dsp, builds/windows/visualc/freetype.vcproj, builds/windows/visualc/index.html, builds/windows/visualce/freetype.dsp, builds/windows/visualce/freetype.vcproj, builds/windows/visualce/index.html, builds/windows/ftver.rc, builds/wince/vc2005-ce/freetype.vcproj, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/freetype.vcproj, builds/wince/vc2008-ce/index.html: s/2.8.1/2.9/, s/281/29/. * include/freetype/freetype.h (FREETYPE_MINOR): Set to 9. (FREETYPE_PATCH): Set to 0. * builds/unix/configure.raw (version_info): Set to 22:0:16. * CMakeLists.txt (VERSION_PATCH): Set to 0. 2018-01-07 Werner Lemberg <wl@gnu.org> Add check for librt, needed for `ftbench' (#52824). * builds/unix/configure.raw (LIB_CLOCK_GETTIME): Define; this will hold `-lrt' if necessary. * builds/unix/unix-cc.in (LIB_CLOCK_GETTIME): New variable. 2018-01-07 Ewald Hew <ewaldhew@gmail.com> [psaux] Fix Type 1 glyphs with too many stem hints. According to the CFF specification, charstrings can have up to 96 stem hints. Due to hint replacement routines in Type 1 charstrings, some glyphs are rejected by the Adobe engine, which implements the above limit. This fix turns off hinting for such glyphs. * src/psaux/pshints.c (cf2_hintmap_build): Reset the error from calling `cf2_hintmask_setAll' on a problematic Type 1 charstring and turn off hinting. 2018-01-06 Werner Lemberg <wl@gnu.org> Add `FT_Done_MM_Var'. This is necessary in case the application's memory routines differ from FreeType. A typical example is a Python application on Windows that calls FreeType compiled as a DLL via the `ctypes' interface. * include/freetype/ftmm.h, src/base/ftmm.c (FT_Done_MM_Var): Declare and define. * docs/CHANGES: Updated. 2018-01-03 Werner Lemberg <wl@gnu.org> [truetype] Round offsets of glyph components only if hinting is on. * src/truetype/ttgload.c (TT_Process_Composite_Component): Implement it. 2018-01-03 Werner Lemberg <wl@gnu.org> * src/truetype/ttgxvar.c (ft_var_to_design): Remove dead code. This is a better fix than the previous commit, which is now reverted. 2018-01-03 Alexei Podtelezhnikov <apodtele@gmail.com> Move internal LCD-related declarations. * include/freetype/ftlcdfil.h (ft_lcd_padding, ft_lcd_filter_fir): Move from here... * include/freetype/internal/ftobjs.h: ... to here. 2018-01-03 Alexei Podtelezhnikov <apodtele@gmail.com> * include/freetype/config/ftconfig.h (FT_EXPORT, FT_EXPORT_DEF) [_MSC_VER]: Limit Visual C++ attributes. 2018-01-03 Werner Lemberg <wl@gnu.org> [truetype] Make blend/design coordinate round-tripping work. Behdad reported that setting blend coordinates, then getting design coordinates did incorrectly return the default instance's coordinates. * src/truetype/ttgxvar.c (tt_set_mm_blend): Fix it. 2017-12-31 Werner Lemberg <wl@gnu.org> * src/sfnt/ttcmap.c (tt_cmap2_char_next): Fix endless loop. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4838 2017-12-31 Werner Lemberg <wl@gnu.org> Synchronize other Windows project files. * builds/windows/*: Add missing files. 2017-12-31 Werner Lemberg <wl@gnu.org> Update Visual C 2010 project files. Problem reported by Hin-Tak. * builds/windows/vc2010/freetype.vcxproj: Add files `ftbdf.c' and `ftcid.c'. Sort entries. * builds/windows/vc2010/freetype.vcxproj.filter: Ditto. Fix members of `FT_MODULE' group. 2017-12-30 Werner Lemberg <wl@gnu.org> * builds/vms/ftconfig.h: Synchronize with unix `ftconfig.in' file. 2017-12-28 Werner Lemberg <wl@gnu.org> * builds/unix/ftconfig.in: Synchronize with main `ftconfig.h' file. Reported by Nikolaus. 2017-12-27 Werner Lemberg <wl@gnu.org> Fix compiler warnings. * src/base/ftbitmap.c (ft_bitmap_assure_buffer): Make `pitch' and `new_pitch' unsigned. * src/base/ftpsprop.c: Include FT_INTERNAL_POSTSCRIPT_PROPS_H. 2017-12-27 Werner Lemberg <wl@gnu.org> Fixes for `make multi'. * include/freetype/internal/ftpsprop.h: Use `FT_BASE_CALLBACK'. (ps_property_get): Harmonize declaration with corresponding function typedef. * include/freety[e/internal/fttrace.h: Add `trace_psprops'. * src/base/ftpsprop.c: Include necessary header files. (FT_COMPONENT): Define. (ps_property_set): Tag with `FT_BASE_CALLBACK_DEF'. (ps_property_get): Tag with `FT_BASE_CALLBACK_DEF'. Harmonize declaration with corresponding function typedef. 2017-12-27 Werner Lemberg <wl@gnu.org> Provide support for intra-module callback functions. This is needed especially for `make multi' with C++. * include/freetype/config/ftconfig.h (FT_BASE_CALLBACK, FT_BASE_CALLBACK_DEF): New macros. 2017-12-25 Ewald Hew <ewaldhew@gmail.com> Move PostScript drivers' property handlers to `base'. This reduces the amount of duplicated code across PostScript drivers. * src/cff/cffdrivr.c, src/cid/cidriver.c, src/type1/t1driver.c ({cff,cid,t1}_property_{get,set}): Moved to... * include/freetype/internal/ftpsprop.h: ...this new file. (ps_property_{get,set}): New functions to replace moved ones. * src/base/ftpsprop.c: New file that implements above functions. * include/freetype/internal/internal.h (FT_INTERNAL_POSTSCRIPT_PROPS_H): New macro. * src/cff/cffdrivr.c, src/cid/cidriver.c, src/type1/t1driver.c: Updated. * src/base/Jamfile, src/base/rules.mk (BASE_SRC), src/base/ftbase.c: Updated. 2017-12-20 Werner Lemberg <wl@gnu.org> Speed up FT_Set_Var_{Design,Blend}_Coordinates if curr == new. We exit early if the current design or blend coordinates are identical to the new ones. * src/truetype/ttgxvar.c (tt_set_mm_blend, TT_Set_Var_Design): Implement it, returning internal error code -1 if there will be no variation change. * src/type1/t1load.c (t1_set_mm_blend): Ditto. * src/base/ftmm.c (FT_Set_Var_Design_Coordinates, FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): Updated. 2017-12-18 Werner Lemberg <wl@gnu.org> [sfnt] Fix charmap type 2 iterator (#52646). The subsetted demo font of the report that exhibits the bug has a very unusual type 2 cmap for Unicode(!): It contains only two sub-headers, one for one-byte characters (covering the range 0x20 to 0xFA), and a second one for higher byte 0x01 (just for character code U+0131). Before this commit, the iterator wasn't able to correctly handle a sub-header for higher byte 0x01. * src/sfnt/ttcmap.c (tt_cmap2_char_next): Fix character increment for outer loop. 2017-12-18 Matthias Clasen <matthias.clasen@gmail.com> [truetype] Fix clamping, minor tracing code beautification. * src/truetype/ttgxvar.c (ft_var_to_normalized): Trace number of design coordinates. Use clamped value. 2017-12-18 Werner Lemberg <wl@gnu.org> * src/*/*: Only use `ft_' and `FT_' variants of stdc library stuff. 2017-12-18 Werner Lemberg <wl@gnu.org> * src/truetype/ttgxvar.c (tt_face_vary_cvt): Add size guard (#52688). 2017-12-18 Werner Lemberg <wl@gnu.org> [truetype] Fix previous commit. * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Correctly handle unhinted phantom points, which must be properly scaled. 2017-12-18 Werner Lemberg <wl@gnu.org> [truetype] Don't apply HVAR and VVAR deltas twice (#52683). * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Always adjust `pp1' to `pp4', except if we have an HVAR and/or VVAR table. * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Handle alternative code branch identically w.r.t. presence of an HVAR and/or VVAR table. 2017-12-17 Jonathan Kew <jfkthame@gmail.com> [truetype] Correctly handle variation font phantom points (#52683). * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix phantom point indices. 2017-12-17 Jonathan Kew <jfkthame@gmail.com> Fix incorrect advance width scaling (#52683). * src/base/ftadvance.c (FT_Get_Advances): Always respect the FT_LOAD_NO_SCALE flag if present. 2017-12-16 Alexei Podtelezhnikov <apodtele@gmail.com> * builds/windows/vc2010/freetype.vcxproj: AfterBuild copy. * objs/.gitignore: Ignore almost everything. 2017-12-11 Werner Lemberg <wl@gnu.org> Fix compiler warning (#52640). * src/base/ftbitmap.c (ft_bitmap_assure_buffer): Remove unused variable. 2017-12-08 Azzuro <azzuro@team-mediaportal.com> * builds/windows/vc2010/freetype.vcxproj: Adjust output directory. This allows builds with different configurations in parallel. 2017-12-08 Werner Lemberg <wl@gnu.org> Fix `make setup dos', second try (#52622). * builds/detect.mk (dos_setup): Don't use literal `>' character at all. Mixing the different escaping rules from make, dos, and windows is too fragile. 2017-12-08 Werner Lemberg <wl@gnu.org> [docmaker] Fix code section parsing. Stuff like { <bla> } confused the parser, which incorrectly treated `<bla>' as a markup tag. * src/tools/docmaker/content.py (ContentProcessor::process_content): Apply `re_markup_tags' only outside of code sections. 2017-12-08 Werner Lemberg <wl@gnu.org> New `ftdriver.h' file, covering all driver modules. This reduces redundancy and increases synergy; it also reduces the number of header files. * include/freetype/config/ftheader.h (FT_DRIVER_H): New macro. (FT_AUTOHINTER_H, FT_CFF_DRIVER_H, FT_TRUETYPE_DRIVER_H, FT_PCF_DRIVER_H, FT_TYPE1_DRIVER_H): Make them aliases to FT_DRIVER_H. * include/freetype/ftautoh.h, include/freetype/ftcffdrv.h, include/freetype/ftpcfdrv.h, include/freetype/ftt1drv.h, include/freetype/ftttdrv.h: Replaced with... * include/freetype/ftdriver.h: ...this new file. (FT_CFF_HINTING_ADOBE, FT_T1_HINTING_ADOBE): Renamed to... (FT_HINTING_ADOBE): ... this new macro. (FT_CFF_HINTING_FREETYPE, FT_T1_HINTING_FREETYPE): Renamed to... (FT_HINTING_FREETYPE): ... this new macro. * src/*/*: Updated accordingly. 2017-12-08 Werner Lemberg <wl@gnu.org> Move `ftdriver.h' to `ftdrv.h'. * include/freetype/internal/ftdriver.h: Renamed to... * include/freetype/internal/ftdrv.h: ... this name. * include/freetype/internal/internal.h (FT_INTERNAL_DRIVER_H): Updated. 2017-12-08 Werner Lemberg <wl@gnu.org> Fix access to uninitalized memory (#52613). Also reported as https://bugs.chromium.org/p/chromium/issues/detail?id=791317 * src/base/ftbitmap.c (ft_bitmap_assure_buffer): If increasing the bitmap size needs a larger bitmap buffer, assure that the new memory areas are initialized also. 2017-12-08 Werner Lemberg <wl@gnu.org> Fix `make setup dos' (#52622). * builds/detect.mk (dos_setup): Properly escape literal `>' character. 2017-12-07 Werner Lemberg <wl@gnu.org> Fix C++ compilation. * src/psaux/psauxmod.h: Use FT_CALLBACK_TABLE macro where necessary. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Fix warning. 2017-12-07 Werner Lemberg <wl@gnu.org> Fix `make multi'. * include/freetype/internal/fttrace.h: Remove unused tracing macros. s/pshalgo2/pshalgo/. Add `trace_cffdecode'. * src/pshinter/pshalgo.c (FT_COMPONENT): Updated. * src/cff/cffload.c: Include FT_INTERNAL_POSTSCRIPT_AUX_H. * src/cff/cffobjs.c: Include FT_SERVICE_METRICS_VARIATIONS_H and FT_SERVICE_CFF_TABLE_LOAD_H. * src/cid/cidriver.c: Include FT_INTERNAL_POSTSCRIPT_AUX_H. * src/psaux/cffdecode.c: Include FT_FREETYPE_H and FT_INTERNAL_DEBUG_H. (FT_COMPONENT): Define. * src/psaux/cffdecode.h: Include FT_INTERNAL_POSTSCRIPT_AUX_H. * src/psaux/psauxmod.h: Include FT_INTERNAL_POSTSCRIPT_AUX_H. Declare `cff_builder_funcs' and `ps_builder_funcs'. * src/psaux/psft.c: Include `psobjs.h' and `cffdecode.h'. * src/psaux/psobjs.c : Include `psauxmod.h'. 2017-12-07 Werner Lemberg <wl@gnu.org> * include/freetype/config/ftheader.h: Some clean-up. This commit removes documentation of deprecated macros and does some minor streamlining. 2017-12-06 Werner Lemberg <wl@gnu.org> * builds/symbian/bld.inf: Updated. 2017-12-06 Werner Lemberg <wl@gnu.org> New header file `ftparams.h' that collects all parameter tags. * include/freetype/config/ftheader.h (FT_PARAMETER_TAGS_H): New macro. (FT_TRUETYPE_UNPATENTED_H, FT_UNPATENTED_HINTING_H): Define it to `ftparams.h'. * include/freetype/ftautoh.h, include/freetype/ftcffdrv.h, include/freetype/ftincrem.h, include/freetype/ftlcdfil.h, include/freetype/ftsnames.h, include/freetype/ftt1drv.h: Include FT_PARAMETER_TAGS_H. Move FT_PARAM_TAG_XXX definitions to... * include/freetype/ftparams.h: ...this new file. * include/freetype/ttunpat.h: Remove. No longer needed. 2017-12-05 Werner Lemberg <wl@gnu.org> Improve tracing messages by using singular and plural forms. * src/*/*.c: Implement it. 2017-12-04 Werner Lemberg <wl@gnu.org> [truetype] Allow shared points in `cvar' table (#52532). * src/truetype/ttgxvar.c (tt_face_vary_cvt): Implement it by copying and adjusting the corresponding code from `TT_Vary_Apply_Glyph_Deltas'. 2017-11-28 Werner Lemberg <wl@gnu.org> [truetype] Improving tracing of composite glyphs. * src/truetype/ttgload.c (TT_Load_Composite_Glyph) [FT_DEBUG_LEVEL_TRACE]: Show composite glyph information. 2017-11-27 Werner Lemberg <wl@gnu.org> [type1] Allow (again) `/Encoding' with >256 elements (#52464). In version 2.6.1, this has been disallowed to better reject malformed fonts; however, this restriction was too strong. This time, we only take the first 256 elements into account, since encoding arrays are always accessed with a 8bit integer, according to the PostScript Language Reference. * src/type1/t1load.c (parse_encoding): Implement it. 2017-11-27 Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> Fix last commit (#52522). * builds/freetype.mk: Set `FT_OPTION_H' and `FTOPTION_FLAG' properly if we have `ftoption.h' in `BUILD_DIR'. 2017-11-24 Werner Lemberg <wl@gnu.org> [unix] Install a massaged `ftoption.h' file (#51780). * builds/unix/configure.raw (ftoption_set, ftoption_unset): New auxiliary functions to construct... (FTOPTION_H_SED): ... this new variable. Apply it as a sed argument while copying `ftoption.h' to the `builds/unix' directory (using `AC_CONFIG_FILES'). Simplify code of test that checks cpp's computation of bit length (the test previously created an empty `ftoption.h' file and deleted it immediately afterwards); without this change, it can happen on my GNU/Linux box that `configure's execution of `config.status' doesn't create `ftoption.h' (no idea why this happens). * builds/unix/install.mk (install): Install `builds/unix/ftoption.h'. * builds/unix/unix-def.in (DISTCLEAN): Updated. * builds/unix/.gitignore: Updated. 2017-11-23 Tor Andersson <tor.andersson@artifex.com> Silence unused function warnings (#52465). Some static function declarations cause unused function warnings if certain config options are turned off via `ftoption.h'. * src/base/ftbase.h, src/base/ftrfork.c, src/sfnt/ttbdf.h, src/truetype/ttgxvar.h: Add #ifdef guards around these sections. 2017-11-22 Ewald Hew <ewaldhew@gmail.com> * src/psaux/psft.c (cf2_setGlyphWidth): Check format before setting. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4377 2017-11-22 Ewald Hew <ewaldhew@gmail.com> [psaux] Fix CFF advance widths. (#52466) Glyph advance widths were being written to the new `PS_Decoder' but not saved to the underlying format specific decoder. This caused pure CFF fonts to have bad advance width. * include/freetype/internal/psaux.h (PS_Decoder): Change `glyph_width' field to pointer. Remove unused fields. * src/psaux/psobjs.c (ps_decoder_init): Change `glyph_width' from copy to reference. Remove unused. * src/psaux/psft.c (cf2_setGlyphWidth): Update code. 2017-11-15 Vlad Tsyrklevich <vtsyrklevich@google.com> * include/freetype/ftrender.h: Fix `FT_Renderer_RenderFunc' type. 2017-11-14 Nikolaus Waxweiler <madigens@gmail.com> Use Adobe hinting engine for `light' hinting of both CFF and Type 1. Since Ewald Hew factored the Adobe hinting engine out of the CFF driver code, we can now use it on Type 1 (and CID) font formats, as both have the same hinting philosophy. This change activates the Adobe hinter when in LIGHT mode, and therefore always unless explicitly asking for the auto-hinter. This makes LIGHT behavior consistent with CFF fonts. As of this commit, the hinting engine table looks as follows. LIGHT NORMAL ------------------------- TrueType Auto v40 CFF Adobe Adobe Type 1 Adobe Adobe 2017-11-10 Yuri Levchenko <yuri_levchenko@boolat.com> * CMakeLists.txt: Add `DISABLE_FORCE_DEBUG_PREFIX' option. 2017-11-06 Alexei Podtelezhnikov <apodtele@gmail.com> * src/base/ftobjs.c (FT_Load_Glyph): Relocate condition. 2017-11-06 Alexei Podtelezhnikov <apodtele@gmail.com> * src/smooth/ftgrays.c (gray_set_cell): Fix uninitialized variables. 2017-11-03 Ewald Hew <ewaldhew@gmail.com> [psaux] Fix PostScript interpreter rewinding in Type 1 mode. (#52251) The interpreter in Type 1 mode rewinds the charstring after collecting all hints for building the initial hintmap (commit d52dd7f). However, some charstrings use `endchar' in a final subroutine call, rewinding to the start of that subroutine, and only a small section of the actual glyph is drawn. * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_cmdENDCHAR>: Ensure we are on the top level charstring before rewinding. 2017-11-03 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> [truetype] Add more tricky fonts. See the report by Yang Yinsen. https://lists.gnu.org/archive/html/freetype-devel/2017-11/msg00000.html * src/truetype/ttobjs.c (trick_names): Add `DFGothic-EB', `DFGyoSho-Lt', `DFHSGothic-W5', `DFHSMincho-W3' and `DFHSMincho-W7'. (tt_check_trickyness_sfnt_ids): Add checksums for DFGothic-EB, DFGyoSho-Lt, DFHSGothic-W5, DFHSMincho-W3 and DFHSMincho-W7. Also add checksums for DLCLiShu and DLCHayBold which their family names were already listed but their checksums were previously unknown. 2017-11-01 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Fix complex rendering at high ppem. We used to split large glyphs into horizontal bands and continue bisecting them still horizontally if that was not enough. This is guaranteed to fail when a single scanline cannot fit into the rendering memory pool. Now we bisect the bands vertically so that the smallest unit is a column of the band height, which is guranteed to fit into memory. * src/smooth/ftgrays.c (gray_convert_glyph): Implement it. 2017-10-20 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth] Improve complex rendering at high ppem. At large sizes almost but not exactly horizontal segments can quickly drain the rendering pool. This patch at least avoids filling the pool with trivial cells. Beyond this, we can only increase the pool size. Reported, analyzed, and tested by Colin Fahey. * src/smooth/ftgrays.c (gray_set_cell): Do not record trivial cells. 2017-10-20 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Improve tracing in FT_Load_Glyph, FT_*_Size. * src/base/ftobjs.c (FT_Load_Glyph): Tag tracing messages with function name, glyph index, and load flags. (FT_Select_Metrics, FT_Request_Metrics): Remove all tracing. (FT_Select_Size, FT_Request_Size): Improve tracing. 2017-10-18 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Improve tracing in FT_Render_Glyph. * src/base/ftobjs.c (FT_Render_Glyph_Internal): Add total coverage calculations and downgrade Netpbm dump to bitmap:7. 2017-10-15 Ewald Hew <ewaldhew@gmail.com> [cff] Fix segfault on missing `psaux' (#52218) * src/cff/cffload.c (cff_done_blend): Add a check for possible nullptr. * modules.cfg: Update dependency list. 2017-10-15 Alexei Podtelezhnikov <apodtele@gmail.com> [base, cff] Fix MSVC warnings. * src/base/ftobjs.c (FT_New_Library): C4702: unreachable code. (ft_glyphslot_preset_bitmap): C4244: possible loss of data. * src/cff/cffload.c (cff_blend_doBlend): C4244: possible loss of data. Turn `sum' into unsigned. 2017-10-14 Alexei Podtelezhnikov <apodtele@gmail.com> [base] Netpbm image tracing. * src/base/ftobjs.c (FT_Load_Glyph): Trace bitmap size. (FT_Render_Glyph_Internal): Trace bitmap in Netpbm format. * src/smooth/ftgrays.c (gray_sweep): Sweep remnants of span tracing. 2017-10-14 Alexei Podtelezhnikov <apodtele@gmail.com> * builds/windows/ftdebug.c (FT_Message): Print to stderr. * builds/wince/ftdebug.c (FT_Message): Ditto. 2017-10-14 Behdad Esfahbod <behdad@behdad.org> [afshaper] Delay creating `hb_set' objects until needed. In runs on Noto Naskh Arabic, this results in 89 sets created instead of 340 before. Makes auto-hinter setup with HarfBuzz enabled 20% to 30% faster. * src/autofit/afshaper.c (af_shaper_get_coverage): Implement it. 2017-10-12 Ewald Hew <ewaldhew@gmail.com> [type1, cid] Add hinting engine switch. Implement property service in `type1' and `cid' drivers to allow switching between FreeType or Adobe hinting engine when both are available. * src/cid/cidriver.c (cid_property_{set,get}, cid_services), src/type1/t1driver.c (t1_property_{set,get}, t1_services): Add Properties service. * src/cid/cidobjs.c (cid_driver_init), src/type1/t1objs.c (T1_Driver_Init): Add default property values. 2017-10-12 Ewald Hew <ewaldhew@gmail.com> Add T1_CONFIG_OPTION_OLD_ENGINE configuration option. This controls whether the old Type 1 engine gets compiled into FreeType. It is disabled by default. * devel/ftoption.h, include/freetype/config/ftoption.h (T1_CONFIG_OPTION_OLD_ENGINE): New macro. * include/freetype/internal/psaux.h (PS_Decoder): Remove unused field. * include/freetype/internal/psaux.h, src/cid/cidgload.c (cid_load_glyph), src/psaux/psauxmod.c, src/psaux/psobjs.c (ps_builder_add_point), src/psaux/t1decode.c (t1_lookup_glyph_by_stdcharcode, t1_decoder_parse_glyph, t1operator_seac, t1_decoder_parse_charstrings), src/psaux/t1decode.h, src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Surround relevant code with macro. Minor code changes. 2017-10-12 Ewald Hew <ewaldhew@gmail.com> Extract width parsing from Type 1 parser. Duplicate the fast advance width calculations from the old parser. This is to facilitate adding options for compiling out the old parser. * src/psaux/t1decode.{c,h} (t1_decoder_parse_metrics): New function. * include/freetype/internal/psaux.h (T1_Decoder_Funcs): New entry `parse_metrics'. * src/psaux/psauxmod.c: Set the new entry. * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String), src/cid/cidgload.c (cid_load_glyph): Separate conditional for selecting engine. 2017-10-09 Werner Lemberg <wl@gnu.org> * src/base/ftoutln.c (FT_Outline_Translate): Fix integer overflow. Reported as https://bugs.chromium.org/p/chromium/issues/detail?id=772775 2017-10-08 Werner Lemberg <wl@gnu.org> * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Integer overflows. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3579 2017-10-07 Werner Lemberg <wl@gnu.org> [sfnt] Adjust behaviour of PS font names for variation fonts. * src/sfnt/sfdriver.c (sfnt_get_var_ps_name): Use a named instance's PS name only if no variation is applied. 2017-10-07 Werner Lemberg <wl@gnu.org> [cff, truetype] Adjust behaviour of named instances. This commit completely separates the interaction between named instances and variation functions. In particular, resetting the variation returns to the current named instance (if set) and not to the base font. As a side effect, variation functions no longer change the named instance index. * src/cff/cffobjs.c (cff_face_init): Use MM service's `set_instance' function. Also apply `MVAR' table to named instances. * src/truetype/ttgxvar.c (TT_Get_MM_Var): Add cast. (tt_set_mm_blend): No longer check whether requested variation coincides with a named instance. (TT_Set_Var_Design): Use current named instance for default coordinates. * src/truetype/ttobjs.c (tt_face_init): Use `TT_Set_Named_Instance'. 2017-10-07 Werner Lemberg <wl@gnu.org> Make `FT_Set_Named_Instance' work. * src/cff/cffdrivr.c (cff_set_instance): New function. (cff_service_multi_masters): Register it. * src/truetype/ttgxvar.c (TT_Set_Named_Instance): New function. * src/truetype/ttgxvar.h: Updated. * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Register it. * src/type1/t1load.c (T1_Reset_MM_Blend): New function. * src/type1/t1load.h: Updated. * src/type1/t1driver.c (t1_service_multi_masters): Register it. 2017-10-07 Werner Lemberg <wl@gnu.org> Make `FT_FACE_FLAG_VARIATION' work. * include/freetype/internal/tttypes.h (TT_Face): Remove `is_default_instance'; this can be replaced with a combination of `FT_IS_VARIATION' and `FT_IS_INSTANCE'. * src/cff/cffdrivr.c (cff_get_advances): Updated. * src/sfnt/sfdriver.c (sfnt_get_ps_name), src/sfnt/sfobjs.c (sfnt_init_face): Updated. * src/truetype/ttdriver.c (tt_get_advances), src/truetype/ttgload.c (TT_Process_Simple_Glyph, load_truetype_glyph, IS_DEFAULT_INSTANCE), src/truetype/ttgxvar.c (tt_set_mm_blend): Updated. * src/truetype/ttgxvar.c (TT_Set_MM_Blend, TT_Set_Var_Design): Handle `FT_FACE_FLAG_VARIATION'. * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design): Handle `FT_FACE_FLAG_VARIATION'. 2017-10-07 Werner Lemberg <wl@gnu.org> New function `FT_Set_Named_Instance'. No effect yet. * src/base/ftmm.c (FT_Set_Named_Instance): New function. * include/freetype/ftmm.h: Updated. 2017-10-07 Werner Lemberg <wl@gnu.org> Add macros for checking whether a font variation is active. * include/freetype/freetype.h (FT_FACE_FLAG_VARIATION, FT_IS_VARIATION): New macros. No effect yet. 2017-10-07 Werner Lemberg <wl@gnu.org> Add framework for setting named instance in MM service. * include/freetype/internal/services/svmm.h (FT_Set_Instance_Func): New function typedef. (MultiMasters): Add `set_instance' member. (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated. * src/cff/cffdrivr.c (cff_service_multi_masters), src/truetype/ttdriver (tt_service_gx_multi_masters), src/type1/t1driver.c (t1_service_multi_masters): Updated. 2017-10-07 Werner Lemberg <wl@gnu.org> [type1] Minor code shuffling. * src/type1/t1load.c (T1_Set_MM_Blend): Make it a wrapper of... (t1_set_mm_blend): ...this new function. (T1_Set_MM_Design): Use `t1_set_mm_blend'. 2017-10-05 Werner Lemberg <wl@gnu.org> * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Fix integer overflow. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3539 2017-10-05 Werner Lemberg <wl@gnu.org> Fix compiler warnings. * src/cff/cffdrivr.c (cff_ps_get_font_extra): Avoid code that relies on numeric overflow. Add cast. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Fix variable types, add cast. 2017-10-04 John Tytgat <John.Tytgat@esko.com> [cff] Add support for `FSType'. * include/freetype/internal/cfftypes.h (CFF_FontRec): Add `font_extra' entry. * src/cff/cffdrivr.c (cff_ps_get_font_extra): New function to retrieve FSType info from the embedded PostScript data. (cff_service_ps_info): Register function. * src/cff/cffload.c (cff_font_done): Free `font_extra'. 2017-09-30 Alexei Podtelezhnikov <apodtele@gmail.com> Signedness fixes in bitmap presetting. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3514. * src/raster/ftrend1.c (ft_raster1_render): Explicitly signed height. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Ditto. * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Explicitly unsigned subtraction. 2017-09-29 Alexei Podtelezhnikov <apodtele@gmail.com> Bitmap metrics presetting [2/2]. * src/base/ftobjs.c (FT_Load_Glyph): Preset the bitmap metrics when appropriate but `FT_Render_Glyph' is not called. * include/freetype/freetype.h (FT_GlyphSlotRec): Document the change. 2017-09-28 Alexei Podtelezhnikov <apodtele@gmail.com> [smooth, raster] Miscellaneous cleanups. * src/raster/ftrend1.c (ft_raster1_render): Clean up the exit. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Reduce translations and clean up the exit. (ft_smooth_render_lcd, ft_smooth_render_lcd): Remove unused `error'. 2017-09-28 Ben Wagner <bungeman@google.com> [truetype] Really, really fix #52082. * src/truetype/ttinterp.c (Ins_MDRP): Correct conditional. 2017-09-28 Werner Lemberg <wl@gnu.org> * src/psaux/psintrp.c (cf2_doStems): Fix integer overflow. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3510 2017-09-28 Ewald Hew <ewaldhew@gmail.com> * src/cid/cidgload.c (cid_slot_load_glyph): Fix memory leak. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3489 2017-09-28 Alexei Podtelezhnikov <apodtele@gmail.com> Bitmap metrics presetting [1/2]. This mainly just extracts the code for presetting the bitmap metrics from the monochrome, grayscale, and LCD renderers into a separate function. * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): New function that calculates prospective bitmap metrics for the given rendering mode. * include/freetype/internal/ftobjs.h (ft_glyphslot_preset_bitmap): Declare it. * src/base/ftlcdfil.c (ft_lcd_padding): New helper function that adds padding to CBox taking into account pecularities of LCD rendering. * include/freetype/ftlcdfil.h (ft_lcd_padding): Declare it. * src/raster/ftrend1.c (ft_raster1_render): Reworked to use `ft_glyphslot_preset_bitmap'. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Ditto. (ft_smooth_render_lcd, ft_smooth_render_lcd): The pixel_mode setting is moved to `ft_glyphslot_preset_bitmap'. 2017-09-28 Ewald Hew <ewaldhew@gmail.com> [psaux] Fix compiler warning. * src/psaux/pshints.c (cf2_hintmap_dump): Add switch for tracing code. 2017-09-27 Werner Lemberg <wl@gnu.org> * src/sfnt/ttload.c (tt_face_load_font_dir): Fix compiler warning. 2017-09-25 Werner Lemberg <wl@gnu.org> [psaux] Fix compiler warnings. * src/psaux/psft.c (cf2_initLocalRegionBuffer): Remove redundant test. * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_escCALLOTHERSUBR>: Add casts. * src/psaux/psobjs.c (ps_decoder_init): Add cast. 2017-09-25 Ewald Hew <ewaldhew@gmail.com> [psaux] Minor fixes. * include/freetype/internal/psaux.h, src/psaux/psobjs.{c,h}: Rearrange `ps_builder_init' arguments to conventional order. * src/psaux/psft.c (cf2_decoder_parse_charstrings): Add a check and notice for `SubFont' in Type 1 mode. 2017-09-25 Ewald Hew <ewaldhew@gmail.com> [psaux] Move `psdecode' into `psobjs'. As the former only contains a single procedure, move it into `psobjs' for simplicity. Also change the parameter order to the conventional one. * src/psaux/psdecode.c (ps_decoder_init): Moved to... * src/psaux/psobjs.c: ...Here. * src/psaux/psdecode.h, src/psaux/psobjs.h: Ditto. * include/freetype/internal/psaux.h (PSAux_ServiceRec): Update `ps_decoder_init' function signature. * src/cff/cffgload.c, src/cid/cidgload.c, src/type1/t1gload.c: Update calls. * src/psaux/psaux.c, src/psaux/psauxmod.c: Update includes. * src/psaux/Jamfile (_sources), src/psaux/rules.mk (PSAUX_DRV_SRC): Update file references. 2017-09-25 Ewald Hew <ewaldhew@gmail.com> [psaux] Fix Type 1 hinting. Type 1 hinting breaks sometimes when mid-charstring hints should have been in the initial hintmap. This fix adds a preprocessing pass that reads all hints and builds the correct initial hintmap first, before proceeding to build the glyph outline. * src/psaux/psintrp.c (cf2_interpT2CharString): New `initial_map_ready' boolean flag. Ignore outline commands and hint changes on first pass. <cf2_cmdENDCHAR>: Add section to build hintmap and rewind. 2017-09-25 Ewald Hew <ewaldhew@gmail.com> [psaux] Add tracing for hints. * src/psaux/pshints.c (cf2_hintmap_dump): New function. (cf2_hintmap_insertHint): Trace incoming and inserted hints. (cf2_hintmap_build): Dump hintmap before and after hint adjustment. 2017-09-25 Ewald Hew <ewaldhew@gmail.com> [psaux] Minor fixes. * src/psaux/psintrp.c (cf2_interpT2CharString): Fix check for pop results. s/font->decoder/decoder/ where necessary. <cf2_cmdHSTEM, cf2_cmdVSTEM, cf2_escHSTEM3, cf2_escVSTEM3>: Use offset parameter in `cf2_doStems' instead of doing correction for left-sidebearing. 2017-09-25 Ewald Hew <ewaldhew@gmail.com> [cid] Use the new engine. * src/cid/cidgload.c: Update includes. (cid_load_glyph, cid_slot_load_glyph): Implement changes to glyph loading code as with `type1' module. 2017-09-25 Ewald Hew <ewaldhew@gmail.com> [cid] Add Adobe engine configuration. This is similar to what was done in the `type1' module. * src/cid/cidriver.c (t1cid_driver_class): Update declaration. * src/cid/cidobjs.c: Include FT_TYPE1_DRIVER_H. (cid_driver_init): Update code. 2017-09-25 Ewald Hew <ewaldhew@gmail.com> [psaux] Change subfont synthesis for CID fonts. Change `t1_make_subfont' to take in the Private dict record as an argument. This is because Type 1 and CID font records in FreeType have this in different places. * src/psaux/psobjs.c (t1_make_subfont): Change `T1_Face' to `FT_Face' so that CID is also accepted. Take `PS_Private' as an argument and let caller figure out where the Private dict actually is. Update references. * include/freetype/internal/psaux.h, src/psaux/psobjs.h: Update declaration. * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Update call. 2017-09-25 Ewald Hew <ewaldhew@gmail.com> [type1] Switch to Adobe engine. * src/type1/t1objs.c (T1_Driver_Init): Set default to Adobe engine. 2017-09-25 Ewald Hew <ewaldhew@gmail.com> [psaux] Extend Adobe interpreter (seac). This concludes the changes needed to add Type 1 support. * src/psaux/psintrp.c: Update includes. (cf2_interpT2CharString) <cf2_escSEAC>: Implement this similarly to implied seac for CFF. * src/psaux/t1decode.c (t1_lookup_glyph_by_stdcharcode_ps): New function to look up the glyph index. * src/psaux/psft.c (cf2_getT1SeacComponent, cf2_freeT1SeacComponent): New functions to get the charstrings for seac components. * src/psaux/t1decode.h, src/psaux/psft.h: Update declarations. 2017-09-25 Ewald Hew <ewaldhew@gmail.com> [psaux] Extend Adobe interpreter (flex in callothersubr). * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_escCALLOTHERSUBR>: Fix Flex feature handling (OtherSubrs 0, 1, 2). <cf2_cmdRMOVETO>: Do not actually move the `glyphPath' while doing flex. This is to avoid closing the current contour. 2017-09-25 Ewald Hew <ewaldhew@gmail.com> [psaux] Extend Adobe interpreter (callothersubr). * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_escCALLOTHERSUBR>: Copy code from `t1_decoder_parse_charstrings' (in `t1decode.c'). OtherSubr 3 (change hints) should reset the hintmask, so that the new hints are applied. Fix function calls and stack access. 2017-09-25 Ewald Hew <ewaldhew@gmail.com> [psaux] Extend Adobe interpreter (pop). * src/psaux/psintrp.c (cf2_interpT2CharString): Change how unhandled OtherSubr results are stored. Implement the PostScript stack using an array. <cf2_escPOP>: Ensure that the stack is not cleared after getting `OtherSubr' results. Fix stack access. 2017-09-25 Ewald Hew <ewaldhew@gmail.com> [psaux] Extend Adobe interpreter (callsubr). * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_cmdCALLSUBR>: Type 1 mode. * src/psaux/psft.c (cf2_initLocalRegionBuffer): Add Type 1 mode. 2017-09-25 Ewald Hew <ewaldhew@gmail.com> [psaux] Extend Adobe interpreter (div, four-byte numbers). * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_escDIV>: Add Type 1 mode. Type 1 requires large integers to be followed by `div'; cf. `Adobe Type 1 Font Format', section 6.2. <op == 255>: Push Type 1 four-byte numbers as `Int' always. This is to ensure `div' and `callsubr' get values they can use. 2017-09-25 Ewald Hew <ewaldhew@gmail.com> [psaux] Extend Adobe interpreter (hints). * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_cmdHSTEM, cf2_cmdVSTEM>: Add correction for left sidebearing in Type 1 mode. Allow adding hints mid-charstring. <cf2_escVSTEM3, cf2_escHSTEM3>: Translate into equivalent commands for three normal stem hints. This requires some recalculation of stem positions. Correction for left sidebearing. 2017-09-25 Ewald Hew <ewaldhew@gmail.com> [psaux] Extend Adobe interpreter (hsbw, sbw). * src/psaux/psintrp.c (cf2_doStems): `hsbw' or `sbw' must be the first operation in a Type 1 charstring. (cf2_interpT2CharString): Remove unused variables. <cf2_cmdHMOVETO, cf2_cmdVMOVETO, cf2_cmdRMOVETO>: `hsbw' or `sbw' must be the first operation in a Type 1 charstring. <cf2_cmdHSBW, cf2_escSBW>: Fix data access and add correction for left sidebearing. 2017-09-25 Ewald Hew <ewaldhew@gmail.com> [psaux] Extend Adobe interpreter (setcurrentpoint). * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_escSETCURRENTPT>: Fix stack access. 2017-09-25 Ewald Hew <ewaldhew@gmail.com> [psaux] Extend Adobe interpreter (closepath). * src/psaux/psintrp.c (cf2_interpT2CharString) <c2f_cmdCLOSEPATH>: Use the right builder function. We can use the `haveWidth' boolean already present, instead of implementing `parse_state'. 2017-09-25 Ewald Hew <ewaldhew@gmail.com> [psaux] Add Type 1 operations to Adobe CFF interpreter. The following Type 1 specific ops have been added (copied from `t1decode'): closepath vstem3 hstem3 seac sbw callothersubr pop setcurrentpoint hsbw The following require a Type 1 mode, because of differences in specification: hstem vstem vmoveto callsubr div rmoveto hmoveto Numbers The subsequent commits will implement these changes and adapt accesses of data and objects to the new interpreter. NOTE: Will not compile in the meantime! * src/psaux/psintrp.c: Add opcodes to enum. (cf2_interpT2CharString): Copy relevant code over from `t1_decoder_parse_charstrings' (in `t1decode.c'). 2017-09-25 Ewald Hew <ewaldhew@gmail.com> [type1] Fixes for rendering. The Type 1 advance width calculation passes null for glyph slot, etc, which can cause null pointer access in the new interpreter. Fall back to the old one for now. Fix the large glyph retry code and ensure hinting and scaling flags are set properly. * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Add a check for metrics_only. Set the `force_scaling' flag. (T1_Parse_Glyph): Updated. (T1_Load_Glyph): Add `hinting' and `scaled' flags. 2017-09-25 Ewald Hew <ewaldhew@gmail.com> [psaux] Add missing objects (2/2). Synthesize a `SubFont' object for Type 1 fonts. This is used in the interpreter to access Private dict data, which are stored in different places for Type 1 and CFF. This allows the same data to be used in either mode. * src/psaux/psobjs.c (t1_make_subfont): New procedure to copy required values to a dummy `CFF_SubFont' object. This is similar to `cff_make_private_dict'. * src/psaux/psobjs.h: Add the new declaration. * include/freetype/internal/psaux.h, src/psaux/psauxmod.c: Ditto. Add this to the PSAux Service for future use with CID fonts. * src/type1/t1gload.c: Include FT_INTERNAL_CFF_TYPES_H. (T1_Parse_Glyph_And_Get_Char_String): Add the call. 2017-09-25 Ewald Hew <ewaldhew@gmail.com> [psaux] Add missing objects for Type 1 (1/2). Move `CF2_Font' instance to `PS_Decoder'. This is the context for the interpreter and since it is currently stored in `CFF_Font', is unavailable in Type 1 mode. * include/freetype/internal/psaux.h (T1_Decoder, PS_Decoder): New `cf2_instance' field. * src/psaux/psdecode.c (ps_decoder_init): Copy `cf2_instance' to `PS_Decoder'. * src/psaux/t1decode.c (t1_decoder_done): Add finalization code. * src/psaux/psft.c (cf2_decoder_parse_charstrings): Update accesses. 2017-09-25 Ewald Hew <ewaldhew@gmail.com> Allow `type1' module to use the Adobe engine. Add the callback and some conditionals to switch between the two engines. * include/freetype/internal/psaux.h (T1_Decoder_FuncsRec): Change function declarations. * src/psaux/psauxmod.c (T1_Decoder_FuncsRec): Register the callbacks. * src/psaux/psobjs.c (ps_builder_add_point): Add conditionals for number conversion. * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Add code to choose which renderer to use. * src/cid/cidgload.c (cid_load_glyph): Update call. * src/base/ftobjs.c, src/psaux/psobjs.c, src/type1/t1gload.c: Update includes. 2017-09-25 Ewald Hew <ewaldhew@gmail.com> [type1] Add Adobe engine configuration. Use the previously changed PS_Driver in type1 module to store hinting engine configuration. * include/freetype/ftt1drv.h: New file. Duplicate and rename config options from CFF. * include/freetype/config/ftheader.h (FT_TYPE1_DRIVER_H): New macro. * src/type1/t1driver.c (t1_driver_class): Update declaration. * src/type1/t1objs.c: Include FT_TYPE1_DRIVER_H. (T1_Driver_Init): Update code. 2017-09-25 Ewald Hew <ewaldhew@gmail.com> [cff] Move and rename `CFF_Driver'. This is so that we can use the same hinting engine parameters for Type 1. * include/freetype/internal/cffotypes.h (CFF_Driver): Rename and move to... * include/freetype/internal/psaux.h (PS_Driver): ...here. * src/cff/cffdrivr.c, src/cff/cffgload.c, src/cff/cffload.c, src/cff/cffobjs.c, src/cff/cffobjs.h, src/psaux/psft.c, src/psaux/psobjs.c: Update references. 2017-09-25 Ewald Hew <ewaldhew@gmail.com> [psaux, type1] Reorganize object fields. Make some fields more generic, so that we can access them the same way regardless of Type 1 or CFF. * include/freetype/internal/psaux.h (PS_Builder): Change `TT_Face' to `FT_Face'. Remove unused fields. * src/psaux/psft.c: Update all accesses of `PS_Builder.face'. Add some asserts to guard against casting `T1_Face' as `TT_Face'. * src/type1/t1objs.h (T1_GlyphSlot): Reorder fields to follow `CFF_GlyphSlot', so that we can pretend they are the same in the interpreter. * src/psaux/psobjs.c (ps_builder_init, ps_builder_add_point): Updated with above changes. 2017-09-25 Ewald Hew <ewaldhew@gmail.com> [psaux] Prepare for Type 1 mode. Add some checks for Type 1 data passing through. * src/psaux/psfont.h (CF2_Font): Add `isT1' flag. * src/psaux/psfont.c (cf2_font_setup): Skip the variations and blend code which is not applicable for Type 1. * src/psaux/psft.c (cf2_decoder_parse_charstrings): Avoid accessing `decoder->cff' in Type 1 mode. Copy `is_t1' flag to `CF2_Font'. 2017-09-25 Ewald Hew <ewaldhew@gmail.com> [psaux, cff] Use the new objects. * include/freetype/internal/psaux.h, src/psaux/psauxmod.c: Fix switching between new and old engines. * src/cff/cffgload.c, src/cff/cffparse.c: Update calls. * src/psaux/psblues.c, src/psaux/psfont.c, src/psaux/psfont.h, src/psaux/psft.c, src/psaux/psft.h, src/psaux/psintrp.c: Update all to use new objects. 2017-09-24 Ewald Hew <ewaldhew@gmail.com> [psaux] Objects for new interpreter (part 2). Make the new objects copy over values. They are essentially wrapper types for the different decoders/builders. * include/freetype/internal/psaux.h: Update declarations. (PS_Builder): Add `is_t1' flag. (PS_Decoder_{Get,Free}_Glyph_Callback): Renamed to... (CFF_Decoder_{Get,Free}_Glyph_Callback: ... this. (PS_Decoder): Updated. Add `t1_parse_callback' member. (PSAux_ServiceRec): Add `ps_decoder_init' member. * src/psaux/psdecode.h, src/psaux/psobjs.h: Update declarations. * src/psaux/psdecode.c, src/psaux/psobjs.c: Implement copy with two modes. * src/psaux/psauxmod.c: Add builder and decoder functions to `PSAux' service. 2017-09-24 Ewald Hew <ewaldhew@gmail.com> [psaux] Add objects for new interpreter. Introduce `PS_Decoder' and `PS_Builder' which include all fields from either Type 1 or CFF decoders/builders. * include/freetype/internal/psaux.h (PS_Builder, PS_Decoder): New structs. * src/psaux/psobjs.c, src/psaux/psobjs.h: Add `PS_Builder' functions. * src/psaux/psdecode.c, src/psaux/psdecode.h: New files to hold `PS_Decoder' initialization functions. * src/psaux/psaux.c, src/psaux/Jamfile (_sources), src/psaux/rules.mk (PSAUX_DRV_SRC): Updated. 2017-09-24 Ewald Hew <ewaldhew@gmail.com> [psaux] Rename files. Replace the `cf2' file name prefix with `ps' as the Adobe engine will be used for both PostScript Types 1 and 2 (CFF) instead of just CFF. s/cf2/ps/ for all following. * src/psaux/cf2*: Rename files. * src/psaux/*: Update includes. * src/psaux/Jamfile (_sources), src/psaux/rules.mk (PSAUX_DRC_SRC, PSAUX_DRV_H): Update file references. 2017-09-24 Ewald Hew <ewaldhew@gmail.com> [psaux] Minor fix. Use `MultiMasters' service in `psaux' instead of a call to `cff'. The project builds if CFF_CONFIG_OPTION_OLD_ENGINE is not defined. * src/psaux/cf2ft.c: Update includes. (cf2_getNormalizedVector): Use `mm->get_var_blend' instead of `cff_get_var_blend'. 2017-09-24 Ewald Hew <ewaldhew@gmail.com> [psaux, cff] Move `cff_random' into `psaux' service. NOTE: Does not compile! Minor fix to allow both `cff' and `psaux' to use `cff_random'. * src/cff/cffload.c (cff_random): Move to... * src/psaux/psobjs.c: Here. * src/cff/cffload.h: Move corresponding declaration to `src/psaux/psobjs.h'. * include/freetype/internal/psaux.h (PSAux_ServiceRec): Register the function here... * src/psaux/psauxmod.c: And here. * src/cff/cffload.c, src/psaux/cf2intrp.c: Update code. 2017-09-24 Ewald Hew <ewaldhew@gmail.com> [cff] Move struct declarations to `freetype/internal'. NOTE: Does not compile! This is so that the CFF functions moved to `psaux' can access the same structs that they need. * src/cff/cfftypes.h: Moved to... * include/freetype/internal/cfftypes.h: ...Here. * src/cff/cffobjs.h: Moved the struct declarations to... * include/freetype/internal/cffotypes.h: ... this new file. * include/freetype/internal/internal.h (FT_INTERNAL_CFF_TYPES_H, FT_INTERNAL_CFF_OBJECT_TYPES_H): New macros. * src/cff/cffcmap.h, src/cff/cffdrivr.c, src/cff/cffgload.c, src/cff/cffgload.h, src/cff/cffload.h, src/cff/cffobjs.c, src/cff/cffobjs.h, src/cff/cffparse.h, src/psaux/psobjs.h, include/freetype/internal/psaux.h, include/freetype/internal/services/svcfftl.h: Update includes. * src/cff/rules.mk (CFF_DRV_H): Updated. 2017-09-24 Ewald Hew <ewaldhew@gmail.com> [psaux, cff] Add new service for inter-module calls. NOTE: Does not compile! This is to allow CFF functions moved to `psaux' to call functions declared in `src/cff/cffload.h'. * include/freetype/internal/services/svcfftl.h: New file, setting up a `CFFLoad' service. * include/freetype/internal/ftserv.h (FT_DEFINE_SERVICEDESCREC10, FT_DEFINE_SERVICEDESCREC): New macros. (FT_SERVICE_CFF_TABLE_LOAD_H): New macro. * src/cff/cffdrivr.c, src/cff/cffpic.h: Register the new service. * src/cff/cfftypes.h (CFF_FontRec), src/psaux/cf2font.h (CF2_FontRec): Add service interface. * src/cff/cffobjs.c, src/psaux/cf2font.c, src/psaux/cf2ft.c, src/psaux/cf2intrp.c, src/psaux/cffdecode.c: Use the new service. 2017-09-24 Ewald Hew <ewaldhew@gmail.com> [psaux, cff] Add callbacks for inter-module calls. NOTE: Does not compile! * include/freetype/internal/psaux.h: Add function pointer declarations. * src/psaux/cffdecode.c (cff_decoder_init): Update to take in callbacks. * src/psaux/cffdecode.h: Ditto. * src/cff/cffgload.c (cff_compute_max_advance, cff_slot_load): Update calls to pass in callbacks. * src/psaux/cf2ft.c, src/psaux/cffdecode.c: Use them. 2017-09-24 Ewald Hew <ewaldhew@gmail.com> [psaux, cff] Create new `PSAux' service interface entries. NOTE: Does not compile! * include/freetype/internal/psaux.h: Include FT_INTERNAL_TRUETYPE_TYPES_H. (CFF_Builder_FuncsRec, CFF_Decocer_FuncsRec): New function tables. (CFF_Builder): Updated. Fix for forward declaration. (PSAux_ServiceRec): New field `cff_decoder_funcs'. * src/psaux/psauxmod.c (cff_builder_funcs, cff_decoder_funcs): New function tables. (PSAux_Interface): Updated. * include/freetype/internal/tttypes.h (TT_FaceRec): Add `psaux' service interface. * src/cff/cffgload.c, src/cff/cffobjs.c, src/cff/cffparse.c: Update function calls to use psaux service. 2017-09-24 Ewald Hew <ewaldhew@gmail.com> [psaux, cff] Move CFF builder components into `psaux' module. NOTE: Does not compile! * src/cff/cffgload.c (cff_builder_{init,done,add_point,add_point1,add_contour,start_point,close_contour}, cff_check_points): Move to... * src/psaux/psobjs.c: Here. * src/cff/cffgload.h: Move corresponding declarations to `src/psaux/psobjs.h'. * src/cff/cffgload.h (CFF_Builder): Move struct declaration to... * include/freetype/internal/psaux.h: Here. 2017-09-24 Ewald Hew <ewaldhew@gmail.com> [psaux, cff] Move CFF decoder components into `psaux' module. NOTE: Does not compile! * src/cff/cffgload.c (CFF_Operator, CFF_COUNT_{CHECK_WIDTH,EXACT,CLEAR_STACK}, cff_argument_counts, cff_operator_seac, cff_compute_bias, cff_lookup_glyph_by_stdcharcode, cff_decoder_{parse_charstrings,init,prepare}): Move to... * src/psaux/cffdecode.c: This new file. * src/cff/cffgload.h: Move corresponding declarations to... * src/psaux/cffdecode.h: This new file. * src/cff/cffgload.h (CFF_MAX_{OPERANDS,SUBRS_CALLS,TRANS_ELEMENTS}, CFF_Decoder_Zone, CFF_Decoder): Move declarations to... * include/freetype/internal/psaux.h: Here. * src/psaux/cf2ft.h: Update include. * src/psaux/psaux.c, src/psaux/rules.mk (PSAUX_DRV_SRC): Update with the new file. 2017-09-24 Ewald Hew <ewaldhew@gmail.com> [psaux, cff] Move Adobe's engine components into `psaux' module. This is the first patch of a sequence to move the Type 2 charstring processing capability from the `cff' module to the `psaux' module. NOTE: Does not compile! * src/cff/cf2*: Move these files to... * src/psaux/cf2*: Here. * src/cff/Jamfile (_sources), src/cff/rules.mk (CFF_DRV_SRC, CFF_DRV_H), src/cff/cff.c, src/cff/cffgload.c: Remove file references. * src/psaux/Jamfile (_sources), src/psaux/rules.mk, src/psaux/psaux.c (PSAUX_DRV_SRC, PSAUX_DRV_H): Add file references. 2017-09-24 Alexei Podtelezhnikov <apodtele@gmail.com> Tweak per-face LCD filtering controls. Thing are simpler with a NULL-function pointer. * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): New pointer to the filter function. (FT_LibraryRec): Remove unused `lcd_filter'. (FT_Bitmap_LcdFilterFunc, ft_lcd_filter_fir): Move from here... * include/freetype/ftlcdfil.h (FT_Bitmap_LcdFilterFunc, ft_lcd_filter_fir): ... to here. * src/base/ftobjs.c (ft_open_face_internal): NULL-initialize the per-face filter. (FT_Face_Properties): Set it. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Simplify. * src/base/ftlcdfil.c (ft_lcd_filter_fir, FT_Libary_SetLcdFilter): Minor. 2017-09-24 Jonathan Kew <jfkthame@gmail.com> [sfnt] Fix `premultiply_data' (#52092). * src/sfnt/pngshim.c (premultiply_data): Don't use vector extension if we have less than 16 bytes of data. 2017-09-24 Werner Lemberg <wl@gnu.org> [otvalid] Fix handling of ValueRecords. For GPOS pair positioning format 1 the description of ValueRecords in the OpenType specification (1.8.2, from today) is wrong – the offset has to be taken from the parent structure; in this case the `PairSet' table. * src/otvalid/otvgpos.c (otv_PairSet_validate): Set `extra3'. (otv_PairPos_validate): Adjust. 2017-09-23 Werner Lemberg <wl@gnu.org> [otvalid] Handle `GSUB' and `GPOS' v1.1 tables. * src/otvalid/otvgsub.c (otv_GSUB_validate), src/otvalid/otvgpos.c (otv_GPOS_validate): Implement it. 2017-09-23 Werner Lemberg <wl@gnu.org> [otvalid] Update common table handling to OpenType 1.8.2. * src/otvalid/otvcommn.c (otv_Device_validate): Handle VariationIndex subtable. (otv_Lookup_validate): Handle MarkFilteringSet. 2017-09-23 Alexei Podtelezhnikov <apodtele@gmail.com> [build] Windows-style DLL versioning. * build/windows/ftver.rc: New VERSIONINFO resource. * build/windows/vc2010/freetype.vcxproj: Further improvements. 2017-09-23 Ben Wagner <bungeman@google.com> [truetype] Really fix #52082. * src/truetype/ttinterp.c (Ins_MDRP): Correct conditional. 2017-09-23 Werner Lemberg <wl@gnu.org> [otvalid] Handle `GDEF' v1.2 and v1.3 tables. No validation of variation stuff yet. * src/otvalid/otvgdef.c (otv_MarkGlyphSets_validate): New function. (otv_GDEF_validate): Implement it. 2017-09-22 Werner Lemberg <wl@gnu.org> [otvalid] Handle `BASE' v1.1 table. No validation of variation stuff yet. * src/otvalid/otvbase.c (otv_BASE_validate): Implement it. 2017-09-22 Werner Lemberg <wl@gnu.org> [otvalid] Macros for 32bit offset support. * src/otvalid/otvcommn.h (OTV_OPTIONAL_TABLE32, OTV_OPTIONAL_OFFSET32, OTV_SIZE_CHECK32): New macros. 2017-09-21 Alexei Podtelezhnikov <apodtele@gmail.com> [build] Simplify Visual C++ 2010 project. * build/windows/vc2010/freetype.vcxproj: Remove fake singlethreaded configurations and tweak. 2017-09-21 Werner Lemberg <wl@gnu.org> [truetype] Integer overflow (#52082). * src/truetype/ttinterp.c (Ins_MDRP): Avoid FT_ABS. 2017-09-21 Werner Lemberg <wl@gnu.org> [sfnt] Fix postscript name for default instance of variation fonts. Problem reported by Behdad. * src/sfnt/sfdriver.c (sfnt_get_ps_name): Test `is_default_instance'. 2017-09-21 Werner Lemberg <wl@gnu.org> [truetype] Fix `mmvar' array pointers, part 2. The previous commit was incomplete. * src/truetype/ttgxvar.c: Properly initialize sub-array offsets for `master' also. 2017-09-21 Werner Lemberg <wl@gnu.org> [truetype] Fix `mmvar' array pointers. Without this change, clang's AddressSanitizer reports many runtime errors due to misaligned addresses. * src/truetype/ttgxvar.c (TT_Get_MM_Var): Use multiples of pointer size for sub-array offsets into `mmvar'. 2017-09-20 Werner Lemberg <wl@gnu.org> [truetype] Integer overflows. Changes triggered by https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3429 * src/truetype/ttinterp.c (Ins_SHPIX, Ins_DELTAP): Use NEG_LONG. (Ins_MIAP): Use SUB_LONG. 2017-09-19 Alexei Podtelezhnikov <apodtele@gmail.com> [build] Fix DLL builds in Visual C++ project. * build/windows/vc2010/freetype.vcxproj: Use DynamicLibrary in Debug and Release configurations. * include/freetype/config/ftconfig.h (FT_EXPORT, FT_EXPORT_DEF) [_DLL]: Use Visual C++ extensions. 2017-09-19 John Tytgat <John.Tytgat@esko.com> [cff] Fix family name logic of pure CFF fontdata (#52056). 1. If `FamilyName' is present in the CFF font, use this for FT_Face's `family_name'. 2. Otherwise, use the face name and chop off any subset prefix. 3. If at this point FT_Face's `family_name' is set, use this together with the full name to determine the style. 4. Otherwise, use `CIDFontName' as FT_Face's `family_name'. 5. If we don't have a valid style, use "Regular". Previously, FT_Face's `family_name' entry for pure CFF fontdata nearly always was the fontname itself, instead of the `FamilyName' entry in the CFF font (assuming there is one). * src/cff/cffobjs.c (cff_face_init) [pure_cff]: Implement it. 2017-09-18 Alexei Podtelezhnikov <apodtele@gmail.com> [build] Declutter Visual C++ 2010-2017 project. * build/windows/vc2010/freetype.vcxproj: Use MaxSpeed (/02) optimization for Release configuration throughout the project. ---------------------------------------------------------------------------- Copyright (C) 2017-2022 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, and distributed under the terms of the FreeType project license, LICENSE.TXT. By continuing to use, modify, or distribute this file you indicate that you have read the license and understand and accept it fully. Local Variables: version-control: never coding: utf-8 End:
whupdup/frame
real/third_party/freetype-2.12.0/docs/oldlogs/ChangeLog.29
29
gpl-3.0
72,091
How FreeType's rasterizer work by David Turner Revised 2007-Feb-01 This file is an attempt to explain the internals of the FreeType rasterizer. The rasterizer is of quite general purpose and could easily be integrated into other programs. I. Introduction II. Rendering Technology 1. Requirements 2. Profiles and Spans a. Sweeping the Shape b. Decomposing Outlines into Profiles c. The Render Pool d. Computing Profiles Extents e. Computing Profiles Coordinates f. Sweeping and Sorting the Spans I. Introduction =============== A rasterizer is a library in charge of converting a vectorial representation of a shape into a bitmap. The FreeType rasterizer has been originally developed to render the glyphs found in TrueType files, made up of segments and second-order Béziers. Meanwhile it has been extended to render third-order Bézier curves also. This document is an explanation of its design and implementation. While these explanations start from the basics, a knowledge of common rasterization techniques is assumed. II. Rendering Technology ======================== 1. Requirements --------------- We assume that all scaling, rotating, hinting, etc., has been already done. The glyph is thus described by a list of points in the device space. - All point coordinates are in the 26.6 fixed float format. The used orientation is: ^ y | reference orientation | *----> x 0 `26.6' means that 26 bits are used for the integer part of a value and 6 bits are used for the fractional part. Consequently, the `distance' between two neighbouring pixels is 64 `units' (1 unit = 1/64th of a pixel). Note that, for the rasterizer, pixel centers are located at integer coordinates. The TrueType bytecode interpreter, however, assumes that the lower left edge of a pixel (which is taken to be a square with a length of 1 unit) has integer coordinates. ^ y ^ y | | | (1,1) | (0.5,0.5) +-----------+ +-----+-----+ | | | | | | | | | | | | | o-----+-----> x | | | (0,0) | | | | | o-----------+-----> x +-----------+ (0,0) (-0.5,-0.5) TrueType bytecode interpreter FreeType rasterizer A pixel line in the target bitmap is called a `scanline'. - A glyph is usually made of several contours, also called `outlines'. A contour is simply a closed curve that delimits an outer or inner region of the glyph. It is described by a series of successive points of the points table. Each point of the glyph has an associated flag that indicates whether it is `on' or `off' the curve. Two successive `on' points indicate a line segment joining the two points. One `off' point amidst two `on' points indicates a second-degree (conic) Bézier parametric arc, defined by these three points (the `off' point being the control point, and the `on' ones the start and end points). Similarly, a third-degree (cubic) Bézier curve is described by four points (two `off' control points between two `on' points). Finally, for second-order curves only, two successive `off' points forces the rasterizer to create, during rendering, an `on' point amidst them, at their exact middle. This greatly facilitates the definition of successive Bézier arcs. The parametric form of a second-order Bézier curve is: P(t) = (1-t)^2*P1 + 2*t*(1-t)*P2 + t^2*P3 (P1 and P3 are the end points, P2 the control point.) The parametric form of a third-order Bézier curve is: P(t) = (1-t)^3*P1 + 3*t*(1-t)^2*P2 + 3*t^2*(1-t)*P3 + t^3*P4 (P1 and P4 are the end points, P2 and P3 the control points.) For both formulae, t is a real number in the range [0..1]. Note that the rasterizer does not use these formulae directly. They exhibit, however, one very useful property of Bézier arcs: Each point of the curve is a weighted average of the control points. As all weights are positive and always sum up to 1, whatever the value of t, each arc point lies within the triangle (polygon) defined by the arc's three (four) control points. In the following, only second-order curves are discussed since rasterization of third-order curves is completely identical. Here some samples for second-order curves. * # on curve * off curve __---__ #-__ _-- -_ --__ _- - --__ # \ --__ # -# Two `on' points Two `on' points and one `off' point between them * # __ Two `on' points with two `off' \ - - points between them. The point \ / \ marked `0' is the middle of the - 0 \ `off' points, and is a `virtual -_ _- # on' point where the curve passes. -- It does not appear in the point * list. 2. Profiles and Spans --------------------- The following is a basic explanation of the _kind_ of computations made by the rasterizer to build a bitmap from a vector representation. Note that the actual implementation is slightly different, due to performance tuning and other factors. However, the following ideas remain in the same category, and are more convenient to understand. a. Sweeping the Shape The best way to fill a shape is to decompose it into a number of simple horizontal segments, then turn them on in the target bitmap. These segments are called `spans'. __---__ _-- -_ _- - - \ / \ / \ | \ __---__ Example: filling a shape _----------_ with spans. _-------------- ----------------\ /-----------------\ This is typically done from the top / \ to the bottom of the shape, in a | | \ movement called a `sweep'. V __---__ _----------_ _-------------- ----------------\ /-----------------\ /-------------------\ |---------------------\ In order to draw a span, the rasterizer must compute its coordinates, which are simply the x coordinates of the shape's contours, taken on the y scanlines. /---/ |---| Note that there are usually /---/ |---| several spans per scanline. | /---/ |---| | /---/_______|---| When rendering this shape to the V /----------------| current scanline y, we must /-----------------| compute the x values of the a /----| |---| points a, b, c, and d. - - - * * - - - - * * - - y - / / b c| |d /---/ |---| /---/ |---| And then turn on the spans a-b /---/ |---| and c-d. /---/_______|---| /----------------| /-----------------| a /----| |---| - - - ####### - - - - ##### - - y - / / b c| |d b. Decomposing Outlines into Profiles For each scanline during the sweep, we need the following information: o The number of spans on the current scanline, given by the number of shape points intersecting the scanline (these are the points a, b, c, and d in the above example). o The x coordinates of these points. x coordinates are computed before the sweep, in a phase called `decomposition' which converts the glyph into *profiles*. Put it simply, a `profile' is a contour's portion that can only be either ascending or descending, i.e., it is monotonic in the vertical direction (we also say y-monotonic). There is no such thing as a horizontal profile, as we shall see. Here are a few examples: this square 1 2 ---->---- is made of two | | | | | | profiles | | ^ v ^ + v | | | | | | | | ----<---- up down this triangle P2 1 2 |\ is made of two | \ ^ | \ \ | \ | | \ \ profiles | \ | | | \ v ^ | \ | | \ | | + \ v | \ | | \ P1 ---___ \ ---___ \ ---_\ ---_ \ <--__ P3 up down A more general contour can be made of more than two profiles: __ ^ / | / ___ / | / | / | / | / | | | / / => | v / / | | | | | | ^ | ^ | |___| | | ^ + | + | + v | | | v | | | | | up | |___________| | down | <-- up down Successive profiles are always joined by horizontal segments that are not part of the profiles themselves. For the rasterizer, a profile is simply an *array* that associates one horizontal *pixel* coordinate to each bitmap *scanline* crossed by the contour's section containing the profile. Note that profiles are *oriented* up or down along the glyph's original flow orientation. In other graphics libraries, profiles are also called `edges' or `edgelists'. c. The Render Pool FreeType has been designed to be able to run well on _very_ light systems, including embedded systems with very few memory. A render pool will be allocated once; the rasterizer uses this pool for all its needs by managing this memory directly in it. The algorithms that are used for profile computation make it possible to use the pool as a simple growing heap. This means that this memory management is actually quite easy and faster than any kind of malloc()/free() combination. Moreover, we'll see later that the rasterizer is able, when dealing with profiles too large and numerous to lie all at once in the render pool, to immediately decompose recursively the rendering process into independent sub-tasks, each taking less memory to be performed (see `sub-banding' below). The render pool doesn't need to be large. A 4KByte pool is enough for nearly all renditions, though nearly 100% slower than a more comfortable 16KByte or 32KByte pool (that was tested with complex glyphs at sizes over 500 pixels). d. Computing Profiles Extents Remember that a profile is an array, associating a _scanline_ to the x pixel coordinate of its intersection with a contour. Though it's not exactly how the FreeType rasterizer works, it is convenient to think that we need a profile's height before allocating it in the pool and computing its coordinates. The profile's height is the number of scanlines crossed by the y-monotonic section of a contour. We thus need to compute these sections from the vectorial description. In order to do that, we are obliged to compute all (local and global) y extrema of the glyph (minima and maxima). P2 For instance, this triangle has only two y-extrema, which are simply |\ | \ P2.y as a vertical maximum | \ P3.y as a vertical minimum | \ | \ P1.y is not a vertical extremum (though | \ it is a horizontal minimum, which we P1 ---___ \ don't need). ---_\ P3 Note that the extrema are expressed in pixel units, not in scanlines. The triangle's height is certainly (P3.y-P2.y+1) pixel units, but its profiles' heights are computed in scanlines. The exact conversion is simple: - min scanline = FLOOR ( min y ) - max scanline = CEILING( max y ) A problem arises with Bézier Arcs. While a segment is always necessarily y-monotonic (i.e., flat, ascending, or descending), which makes extrema computations easy, the ascent of an arc can vary between its control points. P2 * # on curve * off curve __-x--_ _-- -_ P1 _- - A non y-monotonic Bézier arc. # \ - The arc goes from P1 to P3. \ \ P3 # We first need to be able to easily detect non-monotonic arcs, according to their control points. I will state here, without proof, that the monotony condition can be expressed as: P1.y <= P2.y <= P3.y for an ever-ascending arc P1.y >= P2.y >= P3.y for an ever-descending arc with the special case of P1.y = P2.y = P3.y where the arc is said to be `flat'. As you can see, these conditions can be very easily tested. They are, however, extremely important, as any arc that does not satisfy them necessarily contains an extremum. Note also that a monotonic arc can contain an extremum too, which is then one of its `on' points: P1 P2 #---__ * P1P2P3 is ever-descending, but P1 -_ is an y-extremum. - ---_ \ -> \ \ P3 # Let's go back to our previous example: P2 * # on curve * off curve __-x--_ _-- -_ P1 _- - A non-y-monotonic Bézier arc. # \ - Here we have \ P2.y >= P1.y && \ P3 P2.y >= P3.y (!) # We need to compute the vertical maximum of this arc to be able to compute a profile's height (the point marked by an `x'). The arc's equation indicates that a direct computation is possible, but we rely on a different technique, which use will become apparent soon. Bézier arcs have the special property of being very easily decomposed into two sub-arcs, which are themselves Bézier arcs. Moreover, it is easy to prove that there is at most one vertical extremum on each Bézier arc (for second-degree curves; similar conditions can be found for third-order arcs). For instance, the following arc P1P2P3 can be decomposed into two sub-arcs Q1Q2Q3 and R1R2R3: P2 * # on curve * off curve original Bézier arc P1P2P3. __---__ _-- --_ _- -_ - - / \ / \ # # P1 P3 P2 * Q3 Decomposed into two subarcs Q2 R2 Q1Q2Q3 and R1R2R3 * __-#-__ * _-- --_ _- R1 -_ Q1 = P1 R3 = P3 - - Q2 = (P1+P2)/2 R2 = (P2+P3)/2 / \ / \ Q3 = R1 = (Q2+R2)/2 # # Q1 R3 Note that Q2, R2, and Q3=R1 are on a single line which is tangent to the curve. We have then decomposed a non-y-monotonic Bézier curve into two smaller sub-arcs. Note that in the above drawing, both sub-arcs are monotonic, and that the extremum is then Q3=R1. However, in a more general case, only one sub-arc is guaranteed to be monotonic. Getting back to our former example: Q2 * __-x--_ R1 _-- #_ Q1 _- Q3 - R2 # \ * - \ \ R3 # Here, we see that, though Q1Q2Q3 is still non-monotonic, R1R2R3 is ever descending: We thus know that it doesn't contain the extremum. We can then re-subdivide Q1Q2Q3 into two sub-arcs and go on recursively, stopping when we encounter two monotonic subarcs, or when the subarcs become simply too small. We will finally find the vertical extremum. Note that the iterative process of finding an extremum is called `flattening'. e. Computing Profiles Coordinates Once we have the height of each profile, we are able to allocate it in the render pool. The next task is to compute coordinates for each scanline. In the case of segments, the computation is straightforward, using the Euclidean algorithm (also known as Bresenham). However, for Bézier arcs, the job is a little more complicated. We assume that all Béziers that are part of a profile are the result of flattening the curve, which means that they are all y-monotonic (ascending or descending, and never flat). We now have to compute the intersections of arcs with the profile's scanlines. One way is to use a similar scheme to flattening called `stepping'. Consider this arc, going from P1 to --------------------- P3. Suppose that we need to compute its intersections with the drawn scanlines. As already --------------------- mentioned this can be done directly, but the involved * P2 _---# P3 algorithm is far too slow. ------------- _-- -- _- _/ Instead, it is still possible to ---------/----------- use the decomposition property in / the same recursive way, i.e., | subdivide the arc into subarcs ------|-------------- until these get too small to cross | more than one scanline! | -----|--------------- This is very easily done using a | rasterizer-managed stack of | subarcs. # P1 f. Sweeping and Sorting the Spans Once all our profiles have been computed, we begin the sweep to build (and fill) the spans. As both the TrueType and Type 1 specifications use the winding fill rule (but with opposite directions), we place, on each scanline, the present profiles in two separate lists. One list, called the `left' one, only contains ascending profiles, while the other `right' list contains the descending profiles. As each glyph is made of closed curves, a simple geometric property ensures that the two lists contain the same number of elements. Creating spans is thus straightforward: 1. We sort each list in increasing horizontal order. 2. We pair each value of the left list with its corresponding value in the right list. / / | | For example, we have here / / | | four profiles. Two of >/ / | | | them are ascending (1 & 1// / ^ | | | 2 3), while the two others // // 3| | | v are descending (2 & 4). / //4 | | | On the given scanline, a / /< | | the left list is (1,3), - - - *-----* - - - - *---* - - y - and the right one is / / b c| |d (4,2) (sorted). There are then two spans, joining 1 to 4 (i.e. a-b) and 3 to 2 (i.e. c-d)! Sorting doesn't necessarily take much time, as in 99 cases out of 100, the lists' order is kept from one scanline to the next. We can thus implement it with two simple singly-linked lists, sorted by a classic bubble-sort, which takes a minimum amount of time when the lists are already sorted. A previous version of the rasterizer used more elaborate structures, like arrays to perform `faster' sorting. It turned out that this old scheme is not faster than the one described above. Once the spans have been `created', we can simply draw them in the target bitmap. ------------------------------------------------------------------------ Copyright (C) 2003-2022 by David Turner, Robert Wilhelm, and Werner Lemberg. This file is part of the FreeType project, and may only be used, modified, and distributed under the terms of the FreeType project license, LICENSE.TXT. By continuing to use, modify, or distribute this file you indicate that you have read the license and understand and accept it fully. --- end of raster.txt --- Local Variables: coding: utf-8 End:
whupdup/frame
real/third_party/freetype-2.12.0/docs/raster.txt
Text
gpl-3.0
24,021
<!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="description" content="API Reference Documentation for FreeType-2.12.0"> <meta name="author" content="FreeType Contributors"> <link rel="icon" href="/images/favico.ico"> <meta name="generator" content="mkdocs-1.2.1, mkdocs-material-7.1.9"> <title>FreeType-2.12.0 API Reference</title> <link rel="stylesheet" href="/assets/stylesheets/main.ca7ac06f.min.css"> <link rel="stylesheet" href="/assets/stylesheets/palette.f1a3b89f.min.css"> <meta name="theme-color" content="#4cae4f"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback"> <style>:root{--md-text-font-family:"Noto Serif";--md-code-font-family:"Roboto Mono"}</style> <link rel="stylesheet" href="/stylesheets/extra.css"> </head> <body dir="ltr" data-md-color-scheme="" data-md-color-primary="green" data-md-color-accent="green"> <script>function __prefix(e){return new URL("/",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <label class="md-overlay" for="__drawer"></label> <div data-md-component="skip"> </div> <div data-md-component="announce"> </div> <header class="md-header" data-md-component="header"> <nav class="md-header__inner md-grid" aria-label="Header"> <a href="/index.html" title="FreeType-2.12.0 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="/images/favico.ico" alt="logo"> </a> <label class="md-header__button md-icon" for="__drawer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg> </label> <div class="md-header__title" data-md-component="header-title"> <div class="md-header__ellipsis"> <div class="md-header__topic"> <span class="md-ellipsis"> FreeType-2.12.0 API Reference </span> </div> <div class="md-header__topic" data-md-component="header-topic"> <span class="md-ellipsis"> </span> </div> </div> </div> <label class="md-header__button md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> </label> <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required> <label class="md-search__icon md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </label> <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg> </button> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" data-md-scrollfix> <div class="md-search-result" data-md-component="search-result"> <div class="md-search-result__meta"> Initializing search </div> <ol class="md-search-result__list"></ol> </div> </div> </div> </div> </div> </nav> </header> <div class="md-container" data-md-component="container"> <main class="md-main" data-md-component="main"> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <label class="md-nav__title" for="__drawer"> <a href="/index.html" title="FreeType-2.12.0 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="/images/favico.ico" alt="logo"> </a> FreeType-2.12.0 API Reference </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="/index.html" class="md-nav__link"> TOC </a> </li> <li class="md-nav__item"> <a href="/ft2-index.html" class="md-nav__link"> Index </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" > <label class="md-nav__link" for="__nav_3"> General Remarks <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="General Remarks" data-md-level="1"> <label class="md-nav__title" for="__nav_3"> <span class="md-nav__icon md-icon"></span> General Remarks </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="/ft2-preamble.html" class="md-nav__link"> Preamble </a> </li> <li class="md-nav__item"> <a href="/ft2-header_inclusion.html" class="md-nav__link"> FreeType's header inclusion scheme </a> </li> <li class="md-nav__item"> <a href="/ft2-user_allocation.html" class="md-nav__link"> User allocation </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" > <label class="md-nav__link" for="__nav_4"> Core API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Core API" data-md-level="1"> <label class="md-nav__title" for="__nav_4"> <span class="md-nav__icon md-icon"></span> Core API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="/ft2-version.html" class="md-nav__link"> FreeType Version </a> </li> <li class="md-nav__item"> <a href="/ft2-basic_types.html" class="md-nav__link"> Basic Data Types </a> </li> <li class="md-nav__item"> <a href="/ft2-base_interface.html" class="md-nav__link"> Base Interface </a> </li> <li class="md-nav__item"> <a href="/ft2-glyph_variants.html" class="md-nav__link"> Unicode Variation Sequences </a> </li> <li class="md-nav__item"> <a href="/ft2-color_management.html" class="md-nav__link"> Glyph Color Management </a> </li> <li class="md-nav__item"> <a href="/ft2-layer_management.html" class="md-nav__link"> Glyph Layer Management </a> </li> <li class="md-nav__item"> <a href="/ft2-glyph_management.html" class="md-nav__link"> Glyph Management </a> </li> <li class="md-nav__item"> <a href="/ft2-mac_specific.html" class="md-nav__link"> Mac Specific Interface </a> </li> <li class="md-nav__item"> <a href="/ft2-sizes_management.html" class="md-nav__link"> Size Management </a> </li> <li class="md-nav__item"> <a href="/ft2-header_file_macros.html" class="md-nav__link"> Header File Macros </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" > <label class="md-nav__link" for="__nav_5"> Format-Specific API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Format-Specific API" data-md-level="1"> <label class="md-nav__title" for="__nav_5"> <span class="md-nav__icon md-icon"></span> Format-Specific API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="/ft2-multiple_masters.html" class="md-nav__link"> Multiple Masters </a> </li> <li class="md-nav__item"> <a href="/ft2-truetype_tables.html" class="md-nav__link"> TrueType Tables </a> </li> <li class="md-nav__item"> <a href="/ft2-type1_tables.html" class="md-nav__link"> Type 1 Tables </a> </li> <li class="md-nav__item"> <a href="/ft2-sfnt_names.html" class="md-nav__link"> SFNT Names </a> </li> <li class="md-nav__item"> <a href="/ft2-bdf_fonts.html" class="md-nav__link"> BDF and PCF Files </a> </li> <li class="md-nav__item"> <a href="/ft2-cid_fonts.html" class="md-nav__link"> CID Fonts </a> </li> <li class="md-nav__item"> <a href="/ft2-pfr_fonts.html" class="md-nav__link"> PFR Fonts </a> </li> <li class="md-nav__item"> <a href="/ft2-winfnt_fonts.html" class="md-nav__link"> Window FNT Files </a> </li> <li class="md-nav__item"> <a href="/ft2-svg_fonts.html" class="md-nav__link"> OpenType SVG Fonts </a> </li> <li class="md-nav__item"> <a href="/ft2-font_formats.html" class="md-nav__link"> Font Formats </a> </li> <li class="md-nav__item"> <a href="/ft2-gasp_table.html" class="md-nav__link"> Gasp Table </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" > <label class="md-nav__link" for="__nav_6"> Controlling FreeType Modules <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Controlling FreeType Modules" data-md-level="1"> <label class="md-nav__title" for="__nav_6"> <span class="md-nav__icon md-icon"></span> Controlling FreeType Modules </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="/ft2-auto_hinter.html" class="md-nav__link"> The auto-hinter </a> </li> <li class="md-nav__item"> <a href="/ft2-cff_driver.html" class="md-nav__link"> The CFF driver </a> </li> <li class="md-nav__item"> <a href="/ft2-t1_cid_driver.html" class="md-nav__link"> The Type 1 and CID drivers </a> </li> <li class="md-nav__item"> <a href="/ft2-tt_driver.html" class="md-nav__link"> The TrueType driver </a> </li> <li class="md-nav__item"> <a href="/ft2-pcf_driver.html" class="md-nav__link"> The PCF driver </a> </li> <li class="md-nav__item"> <a href="/ft2-ot_svg_driver.html" class="md-nav__link"> The SVG driver </a> </li> <li class="md-nav__item"> <a href="/ft2-properties.html" class="md-nav__link"> Driver properties </a> </li> <li class="md-nav__item"> <a href="/ft2-parameter_tags.html" class="md-nav__link"> Parameter Tags </a> </li> <li class="md-nav__item"> <a href="/ft2-lcd_rendering.html" class="md-nav__link"> Subpixel Rendering </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" > <label class="md-nav__link" for="__nav_7"> Cache Sub-System <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1"> <label class="md-nav__title" for="__nav_7"> <span class="md-nav__icon md-icon"></span> Cache Sub-System </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="/ft2-cache_subsystem.html" class="md-nav__link"> Cache Sub-System </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" > <label class="md-nav__link" for="__nav_8"> Support API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Support API" data-md-level="1"> <label class="md-nav__title" for="__nav_8"> <span class="md-nav__icon md-icon"></span> Support API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="/ft2-computations.html" class="md-nav__link"> Computations </a> </li> <li class="md-nav__item"> <a href="/ft2-list_processing.html" class="md-nav__link"> List Processing </a> </li> <li class="md-nav__item"> <a href="/ft2-outline_processing.html" class="md-nav__link"> Outline Processing </a> </li> <li class="md-nav__item"> <a href="/ft2-quick_advance.html" class="md-nav__link"> Quick retrieval of advance values </a> </li> <li class="md-nav__item"> <a href="/ft2-bitmap_handling.html" class="md-nav__link"> Bitmap Handling </a> </li> <li class="md-nav__item"> <a href="/ft2-raster.html" class="md-nav__link"> Scanline Converter </a> </li> <li class="md-nav__item"> <a href="/ft2-glyph_stroker.html" class="md-nav__link"> Glyph Stroker </a> </li> <li class="md-nav__item"> <a href="/ft2-system_interface.html" class="md-nav__link"> System Interface </a> </li> <li class="md-nav__item"> <a href="/ft2-module_management.html" class="md-nav__link"> Module Management </a> </li> <li class="md-nav__item"> <a href="/ft2-gzip.html" class="md-nav__link"> GZIP Streams </a> </li> <li class="md-nav__item"> <a href="/ft2-lzw.html" class="md-nav__link"> LZW Streams </a> </li> <li class="md-nav__item"> <a href="/ft2-bzip2.html" class="md-nav__link"> BZIP2 Streams </a> </li> <li class="md-nav__item"> <a href="/ft2-debugging_apis.html" class="md-nav__link"> External Debugging APIs </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" > <label class="md-nav__link" for="__nav_9"> Error Codes <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Error Codes" data-md-level="1"> <label class="md-nav__title" for="__nav_9"> <span class="md-nav__icon md-icon"></span> Error Codes </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="/ft2-error_enumerations.html" class="md-nav__link"> Error Enumerations </a> </li> <li class="md-nav__item"> <a href="/ft2-error_code_values.html" class="md-nav__link"> Error Code Values </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" > <label class="md-nav__link" for="__nav_10"> Miscellaneous <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1"> <label class="md-nav__title" for="__nav_10"> <span class="md-nav__icon md-icon"></span> Miscellaneous </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="/ft2-gx_validation.html" class="md-nav__link"> TrueTypeGX/AAT Validation </a> </li> <li class="md-nav__item"> <a href="/ft2-incremental.html" class="md-nav__link"> Incremental Loading </a> </li> <li class="md-nav__item"> <a href="/ft2-truetype_engine.html" class="md-nav__link"> The TrueType Engine </a> </li> <li class="md-nav__item"> <a href="/ft2-ot_validation.html" class="md-nav__link"> OpenType Validation </a> </li> </ul> </nav> </li> </ul> </nav> </div> </div> </div> <div class="md-content" data-md-component="content"> <article class="md-content__inner md-typeset"> <h1>404 - Not found</h1> </article> </div> </div> </main> <footer class="md-footer"> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-footer-copyright"> <div class="md-footer-copyright__highlight"> Copyright 2022 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>. </div> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"base": "/", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "/assets/javascripts/workers/search.477d984a.min.js", "version": null}</script> <script src="/assets/javascripts/bundle.82b56eb2.min.js"></script> <script src="/javascripts/extra.js"></script> </body> </html>
whupdup/frame
real/third_party/freetype-2.12.0/docs/reference/404.html
HTML
gpl-3.0
23,195
module.exports=require("./lunr.ja");
whupdup/frame
real/third_party/freetype-2.12.0/docs/reference/assets/javascripts/lunr/min/lunr.jp.min.js
JavaScript
gpl-3.0
36
!function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():t()(e.lunr)}(this,function(){return function(e){e.multiLanguage=function(){for(var t=Array.prototype.slice.call(arguments),i=t.join("-"),r="",n=[],s=[],p=0;p<t.length;++p)"en"==t[p]?(r+="\\w",n.unshift(e.stopWordFilter),n.push(e.stemmer),s.push(e.stemmer)):(r+=e[t[p]].wordCharacters,e[t[p]].stopWordFilter&&n.unshift(e[t[p]].stopWordFilter),e[t[p]].stemmer&&(n.push(e[t[p]].stemmer),s.push(e[t[p]].stemmer)));var o=e.trimmerSupport.generateTrimmer(r);return e.Pipeline.registerFunction(o,"lunr-multi-trimmer-"+i),n.unshift(o),function(){this.pipeline.reset(),this.pipeline.add.apply(this.pipeline,n),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add.apply(this.searchPipeline,s))}}}});
whupdup/frame
real/third_party/freetype-2.12.0/docs/reference/assets/javascripts/lunr/min/lunr.multi.min.js
JavaScript
gpl-3.0
817
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");e.vi=function(){this.pipeline.reset(),this.pipeline.add(e.vi.stopWordFilter,e.vi.trimmer)},e.vi.wordCharacters="[A-Za-ẓ̀͐́͑̉̃̓ÂâÊêÔôĂ-ăĐ-đƠ-ơƯ-ư]",e.vi.trimmer=e.trimmerSupport.generateTrimmer(e.vi.wordCharacters),e.Pipeline.registerFunction(e.vi.trimmer,"trimmer-vi"),e.vi.stopWordFilter=e.generateStopWordFilter("là cái nhưng mà".split(" "))}});
whupdup/frame
real/third_party/freetype-2.12.0/docs/reference/assets/javascripts/lunr/min/lunr.vi.min.js
JavaScript
gpl-3.0
784
<!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="description" content="API Reference Documentation for FreeType-2.12.0"> <meta name="author" content="FreeType Contributors"> <link rel="icon" href="images/favico.ico"> <meta name="generator" content="mkdocs-1.2.1, mkdocs-material-7.1.9"> <title>The auto-hinter - FreeType-2.12.0 API Reference</title> <link rel="stylesheet" href="assets/stylesheets/main.ca7ac06f.min.css"> <link rel="stylesheet" href="assets/stylesheets/palette.f1a3b89f.min.css"> <meta name="theme-color" content="#4cae4f"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback"> <style>:root{--md-text-font-family:"Noto Serif";--md-code-font-family:"Roboto Mono"}</style> <link rel="stylesheet" href="stylesheets/extra.css"> </head> <body dir="ltr" data-md-color-scheme="" data-md-color-primary="green" data-md-color-accent="green"> <script>function __prefix(e){return new URL(".",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <label class="md-overlay" for="__drawer"></label> <div data-md-component="skip"> <a href="#the-auto-hinter" class="md-skip"> Skip to content </a> </div> <div data-md-component="announce"> </div> <header class="md-header" data-md-component="header"> <nav class="md-header__inner md-grid" aria-label="Header"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> <label class="md-header__button md-icon" for="__drawer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg> </label> <div class="md-header__title" data-md-component="header-title"> <div class="md-header__ellipsis"> <div class="md-header__topic"> <span class="md-ellipsis"> FreeType-2.12.0 API Reference </span> </div> <div class="md-header__topic" data-md-component="header-topic"> <span class="md-ellipsis"> The auto-hinter </span> </div> </div> </div> <label class="md-header__button md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> </label> <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required> <label class="md-search__icon md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </label> <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg> </button> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" data-md-scrollfix> <div class="md-search-result" data-md-component="search-result"> <div class="md-search-result__meta"> Initializing search </div> <ol class="md-search-result__list"></ol> </div> </div> </div> </div> </div> </nav> </header> <div class="md-container" data-md-component="container"> <main class="md-main" data-md-component="main"> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <label class="md-nav__title" for="__drawer"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> FreeType-2.12.0 API Reference </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="index.html" class="md-nav__link"> TOC </a> </li> <li class="md-nav__item"> <a href="ft2-index.html" class="md-nav__link"> Index </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" > <label class="md-nav__link" for="__nav_3"> General Remarks <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="General Remarks" data-md-level="1"> <label class="md-nav__title" for="__nav_3"> <span class="md-nav__icon md-icon"></span> General Remarks </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-preamble.html" class="md-nav__link"> Preamble </a> </li> <li class="md-nav__item"> <a href="ft2-header_inclusion.html" class="md-nav__link"> FreeType's header inclusion scheme </a> </li> <li class="md-nav__item"> <a href="ft2-user_allocation.html" class="md-nav__link"> User allocation </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" > <label class="md-nav__link" for="__nav_4"> Core API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Core API" data-md-level="1"> <label class="md-nav__title" for="__nav_4"> <span class="md-nav__icon md-icon"></span> Core API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-version.html" class="md-nav__link"> FreeType Version </a> </li> <li class="md-nav__item"> <a href="ft2-basic_types.html" class="md-nav__link"> Basic Data Types </a> </li> <li class="md-nav__item"> <a href="ft2-base_interface.html" class="md-nav__link"> Base Interface </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_variants.html" class="md-nav__link"> Unicode Variation Sequences </a> </li> <li class="md-nav__item"> <a href="ft2-color_management.html" class="md-nav__link"> Glyph Color Management </a> </li> <li class="md-nav__item"> <a href="ft2-layer_management.html" class="md-nav__link"> Glyph Layer Management </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_management.html" class="md-nav__link"> Glyph Management </a> </li> <li class="md-nav__item"> <a href="ft2-mac_specific.html" class="md-nav__link"> Mac Specific Interface </a> </li> <li class="md-nav__item"> <a href="ft2-sizes_management.html" class="md-nav__link"> Size Management </a> </li> <li class="md-nav__item"> <a href="ft2-header_file_macros.html" class="md-nav__link"> Header File Macros </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" > <label class="md-nav__link" for="__nav_5"> Format-Specific API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Format-Specific API" data-md-level="1"> <label class="md-nav__title" for="__nav_5"> <span class="md-nav__icon md-icon"></span> Format-Specific API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-multiple_masters.html" class="md-nav__link"> Multiple Masters </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_tables.html" class="md-nav__link"> TrueType Tables </a> </li> <li class="md-nav__item"> <a href="ft2-type1_tables.html" class="md-nav__link"> Type 1 Tables </a> </li> <li class="md-nav__item"> <a href="ft2-sfnt_names.html" class="md-nav__link"> SFNT Names </a> </li> <li class="md-nav__item"> <a href="ft2-bdf_fonts.html" class="md-nav__link"> BDF and PCF Files </a> </li> <li class="md-nav__item"> <a href="ft2-cid_fonts.html" class="md-nav__link"> CID Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-pfr_fonts.html" class="md-nav__link"> PFR Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-winfnt_fonts.html" class="md-nav__link"> Window FNT Files </a> </li> <li class="md-nav__item"> <a href="ft2-svg_fonts.html" class="md-nav__link"> OpenType SVG Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-font_formats.html" class="md-nav__link"> Font Formats </a> </li> <li class="md-nav__item"> <a href="ft2-gasp_table.html" class="md-nav__link"> Gasp Table </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--active md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" checked> <label class="md-nav__link" for="__nav_6"> Controlling FreeType Modules <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Controlling FreeType Modules" data-md-level="1"> <label class="md-nav__title" for="__nav_6"> <span class="md-nav__icon md-icon"></span> Controlling FreeType Modules </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item md-nav__item--active"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <label class="md-nav__link md-nav__link--active" for="__toc"> The auto-hinter <span class="md-nav__icon md-icon"></span> </label> <a href="ft2-auto_hinter.html" class="md-nav__link md-nav__link--active"> The auto-hinter </a> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> </ul> </nav> </li> <li class="md-nav__item"> <a href="ft2-cff_driver.html" class="md-nav__link"> The CFF driver </a> </li> <li class="md-nav__item"> <a href="ft2-t1_cid_driver.html" class="md-nav__link"> The Type 1 and CID drivers </a> </li> <li class="md-nav__item"> <a href="ft2-tt_driver.html" class="md-nav__link"> The TrueType driver </a> </li> <li class="md-nav__item"> <a href="ft2-pcf_driver.html" class="md-nav__link"> The PCF driver </a> </li> <li class="md-nav__item"> <a href="ft2-ot_svg_driver.html" class="md-nav__link"> The SVG driver </a> </li> <li class="md-nav__item"> <a href="ft2-properties.html" class="md-nav__link"> Driver properties </a> </li> <li class="md-nav__item"> <a href="ft2-parameter_tags.html" class="md-nav__link"> Parameter Tags </a> </li> <li class="md-nav__item"> <a href="ft2-lcd_rendering.html" class="md-nav__link"> Subpixel Rendering </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" > <label class="md-nav__link" for="__nav_7"> Cache Sub-System <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1"> <label class="md-nav__title" for="__nav_7"> <span class="md-nav__icon md-icon"></span> Cache Sub-System </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-cache_subsystem.html" class="md-nav__link"> Cache Sub-System </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" > <label class="md-nav__link" for="__nav_8"> Support API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Support API" data-md-level="1"> <label class="md-nav__title" for="__nav_8"> <span class="md-nav__icon md-icon"></span> Support API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-computations.html" class="md-nav__link"> Computations </a> </li> <li class="md-nav__item"> <a href="ft2-list_processing.html" class="md-nav__link"> List Processing </a> </li> <li class="md-nav__item"> <a href="ft2-outline_processing.html" class="md-nav__link"> Outline Processing </a> </li> <li class="md-nav__item"> <a href="ft2-quick_advance.html" class="md-nav__link"> Quick retrieval of advance values </a> </li> <li class="md-nav__item"> <a href="ft2-bitmap_handling.html" class="md-nav__link"> Bitmap Handling </a> </li> <li class="md-nav__item"> <a href="ft2-raster.html" class="md-nav__link"> Scanline Converter </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_stroker.html" class="md-nav__link"> Glyph Stroker </a> </li> <li class="md-nav__item"> <a href="ft2-system_interface.html" class="md-nav__link"> System Interface </a> </li> <li class="md-nav__item"> <a href="ft2-module_management.html" class="md-nav__link"> Module Management </a> </li> <li class="md-nav__item"> <a href="ft2-gzip.html" class="md-nav__link"> GZIP Streams </a> </li> <li class="md-nav__item"> <a href="ft2-lzw.html" class="md-nav__link"> LZW Streams </a> </li> <li class="md-nav__item"> <a href="ft2-bzip2.html" class="md-nav__link"> BZIP2 Streams </a> </li> <li class="md-nav__item"> <a href="ft2-debugging_apis.html" class="md-nav__link"> External Debugging APIs </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" > <label class="md-nav__link" for="__nav_9"> Error Codes <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Error Codes" data-md-level="1"> <label class="md-nav__title" for="__nav_9"> <span class="md-nav__icon md-icon"></span> Error Codes </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-error_enumerations.html" class="md-nav__link"> Error Enumerations </a> </li> <li class="md-nav__item"> <a href="ft2-error_code_values.html" class="md-nav__link"> Error Code Values </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" > <label class="md-nav__link" for="__nav_10"> Miscellaneous <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1"> <label class="md-nav__title" for="__nav_10"> <span class="md-nav__icon md-icon"></span> Miscellaneous </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-gx_validation.html" class="md-nav__link"> TrueTypeGX/AAT Validation </a> </li> <li class="md-nav__item"> <a href="ft2-incremental.html" class="md-nav__link"> Incremental Loading </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_engine.html" class="md-nav__link"> The TrueType Engine </a> </li> <li class="md-nav__item"> <a href="ft2-ot_validation.html" class="md-nav__link"> OpenType Validation </a> </li> </ul> </nav> </li> </ul> </nav> </div> </div> </div> <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> </ul> </nav> </div> </div> </div> <div class="md-content" data-md-component="content"> <article class="md-content__inner md-typeset"> <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; <a href="index.html#controlling-freetype-modules">Controlling FreeType Modules</a> &raquo; The auto-hinter</p> <hr /> <h1 id="the-auto-hinter">The auto-hinter<a class="headerlink" href="#the-auto-hinter" title="Permanent link">&para;</a></h1> <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2> <p>While FreeType's auto-hinter doesn't expose API functions by itself, it is possible to control its behaviour with <code><a href="ft2-module_management.html#ft_property_set">FT_Property_Set</a></code> and <code><a href="ft2-module_management.html#ft_property_get">FT_Property_Get</a></code>. The following lists the available properties together with the necessary macros and structures.</p> <p>Note that the auto-hinter's module name is &lsquo;autofitter&rsquo; for historical reasons.</p> <p>Available properties are <code><a href="ft2-properties.html#increase-x-height">increase-x-height</a></code>, <code><a href="ft2-properties.html#no-stem-darkening">no-stem-darkening</a></code> (experimental), <code><a href="ft2-properties.html#darkening-parameters">darkening-parameters</a></code> (experimental), <code><a href="ft2-properties.html#glyph-to-script-map">glyph-to-script-map</a></code> (experimental), <code><a href="ft2-properties.html#fallback-script">fallback-script</a></code> (experimental), and <code><a href="ft2-properties.html#default-script">default-script</a></code> (experimental), as documented in the &lsquo;<a href="ft2-properties.html#properties">Driver properties</a>&rsquo; section.</p> </article> </div> </div> </main> <footer class="md-footer"> <nav class="md-footer__inner md-grid" aria-label="Footer"> <a href="ft2-gasp_table.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: Gasp Table" rel="prev"> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Previous </span> Gasp Table </div> </div> </a> <a href="ft2-cff_driver.html" class="md-footer__link md-footer__link--next" aria-label="Next: The CFF driver" rel="next"> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Next </span> The CFF driver </div> </div> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg> </div> </a> </nav> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-footer-copyright"> <div class="md-footer-copyright__highlight"> Copyright 2022 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>. </div> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"base": ".", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "assets/javascripts/workers/search.477d984a.min.js", "version": null}</script> <script src="assets/javascripts/bundle.82b56eb2.min.js"></script> <script src="javascripts/extra.js"></script> </body> </html>
whupdup/frame
real/third_party/freetype-2.12.0/docs/reference/ft2-auto_hinter.html
HTML
gpl-3.0
27,960
<!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="description" content="API Reference Documentation for FreeType-2.12.0"> <meta name="author" content="FreeType Contributors"> <link rel="icon" href="images/favico.ico"> <meta name="generator" content="mkdocs-1.2.1, mkdocs-material-7.1.9"> <title>Basic Data Types - FreeType-2.12.0 API Reference</title> <link rel="stylesheet" href="assets/stylesheets/main.ca7ac06f.min.css"> <link rel="stylesheet" href="assets/stylesheets/palette.f1a3b89f.min.css"> <meta name="theme-color" content="#4cae4f"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback"> <style>:root{--md-text-font-family:"Noto Serif";--md-code-font-family:"Roboto Mono"}</style> <link rel="stylesheet" href="stylesheets/extra.css"> </head> <body dir="ltr" data-md-color-scheme="" data-md-color-primary="green" data-md-color-accent="green"> <script>function __prefix(e){return new URL(".",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <label class="md-overlay" for="__drawer"></label> <div data-md-component="skip"> <a href="#basic-data-types" class="md-skip"> Skip to content </a> </div> <div data-md-component="announce"> </div> <header class="md-header" data-md-component="header"> <nav class="md-header__inner md-grid" aria-label="Header"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> <label class="md-header__button md-icon" for="__drawer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg> </label> <div class="md-header__title" data-md-component="header-title"> <div class="md-header__ellipsis"> <div class="md-header__topic"> <span class="md-ellipsis"> FreeType-2.12.0 API Reference </span> </div> <div class="md-header__topic" data-md-component="header-topic"> <span class="md-ellipsis"> Basic Data Types </span> </div> </div> </div> <label class="md-header__button md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> </label> <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required> <label class="md-search__icon md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </label> <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg> </button> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" data-md-scrollfix> <div class="md-search-result" data-md-component="search-result"> <div class="md-search-result__meta"> Initializing search </div> <ol class="md-search-result__list"></ol> </div> </div> </div> </div> </div> </nav> </header> <div class="md-container" data-md-component="container"> <main class="md-main" data-md-component="main"> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <label class="md-nav__title" for="__drawer"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> FreeType-2.12.0 API Reference </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="index.html" class="md-nav__link"> TOC </a> </li> <li class="md-nav__item"> <a href="ft2-index.html" class="md-nav__link"> Index </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" > <label class="md-nav__link" for="__nav_3"> General Remarks <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="General Remarks" data-md-level="1"> <label class="md-nav__title" for="__nav_3"> <span class="md-nav__icon md-icon"></span> General Remarks </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-preamble.html" class="md-nav__link"> Preamble </a> </li> <li class="md-nav__item"> <a href="ft2-header_inclusion.html" class="md-nav__link"> FreeType's header inclusion scheme </a> </li> <li class="md-nav__item"> <a href="ft2-user_allocation.html" class="md-nav__link"> User allocation </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--active md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" checked> <label class="md-nav__link" for="__nav_4"> Core API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Core API" data-md-level="1"> <label class="md-nav__title" for="__nav_4"> <span class="md-nav__icon md-icon"></span> Core API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-version.html" class="md-nav__link"> FreeType Version </a> </li> <li class="md-nav__item md-nav__item--active"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <label class="md-nav__link md-nav__link--active" for="__toc"> Basic Data Types <span class="md-nav__icon md-icon"></span> </label> <a href="ft2-basic_types.html" class="md-nav__link md-nav__link--active"> Basic Data Types </a> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_byte" class="md-nav__link"> FT_Byte </a> </li> <li class="md-nav__item"> <a href="#ft_bytes" class="md-nav__link"> FT_Bytes </a> </li> <li class="md-nav__item"> <a href="#ft_char" class="md-nav__link"> FT_Char </a> </li> <li class="md-nav__item"> <a href="#ft_int" class="md-nav__link"> FT_Int </a> </li> <li class="md-nav__item"> <a href="#ft_uint" class="md-nav__link"> FT_UInt </a> </li> <li class="md-nav__item"> <a href="#ft_int16" class="md-nav__link"> FT_Int16 </a> </li> <li class="md-nav__item"> <a href="#ft_uint16" class="md-nav__link"> FT_UInt16 </a> </li> <li class="md-nav__item"> <a href="#ft_int32" class="md-nav__link"> FT_Int32 </a> </li> <li class="md-nav__item"> <a href="#ft_uint32" class="md-nav__link"> FT_UInt32 </a> </li> <li class="md-nav__item"> <a href="#ft_int64" class="md-nav__link"> FT_Int64 </a> </li> <li class="md-nav__item"> <a href="#ft_uint64" class="md-nav__link"> FT_UInt64 </a> </li> <li class="md-nav__item"> <a href="#ft_short" class="md-nav__link"> FT_Short </a> </li> <li class="md-nav__item"> <a href="#ft_ushort" class="md-nav__link"> FT_UShort </a> </li> <li class="md-nav__item"> <a href="#ft_long" class="md-nav__link"> FT_Long </a> </li> <li class="md-nav__item"> <a href="#ft_ulong" class="md-nav__link"> FT_ULong </a> </li> <li class="md-nav__item"> <a href="#ft_bool" class="md-nav__link"> FT_Bool </a> </li> <li class="md-nav__item"> <a href="#ft_offset" class="md-nav__link"> FT_Offset </a> </li> <li class="md-nav__item"> <a href="#ft_ptrdist" class="md-nav__link"> FT_PtrDist </a> </li> <li class="md-nav__item"> <a href="#ft_string" class="md-nav__link"> FT_String </a> </li> <li class="md-nav__item"> <a href="#ft_tag" class="md-nav__link"> FT_Tag </a> </li> <li class="md-nav__item"> <a href="#ft_error" class="md-nav__link"> FT_Error </a> </li> <li class="md-nav__item"> <a href="#ft_fixed" class="md-nav__link"> FT_Fixed </a> </li> <li class="md-nav__item"> <a href="#ft_pointer" class="md-nav__link"> FT_Pointer </a> </li> <li class="md-nav__item"> <a href="#ft_pos" class="md-nav__link"> FT_Pos </a> </li> <li class="md-nav__item"> <a href="#ft_vector" class="md-nav__link"> FT_Vector </a> </li> <li class="md-nav__item"> <a href="#ft_bbox" class="md-nav__link"> FT_BBox </a> </li> <li class="md-nav__item"> <a href="#ft_matrix" class="md-nav__link"> FT_Matrix </a> </li> <li class="md-nav__item"> <a href="#ft_fword" class="md-nav__link"> FT_FWord </a> </li> <li class="md-nav__item"> <a href="#ft_ufword" class="md-nav__link"> FT_UFWord </a> </li> <li class="md-nav__item"> <a href="#ft_f2dot14" class="md-nav__link"> FT_F2Dot14 </a> </li> <li class="md-nav__item"> <a href="#ft_unitvector" class="md-nav__link"> FT_UnitVector </a> </li> <li class="md-nav__item"> <a href="#ft_f26dot6" class="md-nav__link"> FT_F26Dot6 </a> </li> <li class="md-nav__item"> <a href="#ft_data" class="md-nav__link"> FT_Data </a> </li> <li class="md-nav__item"> <a href="#ft_make_tag" class="md-nav__link"> FT_MAKE_TAG </a> </li> <li class="md-nav__item"> <a href="#ft_generic" class="md-nav__link"> FT_Generic </a> </li> <li class="md-nav__item"> <a href="#ft_generic_finalizer" class="md-nav__link"> FT_Generic_Finalizer </a> </li> <li class="md-nav__item"> <a href="#ft_bitmap" class="md-nav__link"> FT_Bitmap </a> </li> <li class="md-nav__item"> <a href="#ft_pixel_mode" class="md-nav__link"> FT_Pixel_Mode </a> </li> <li class="md-nav__item"> <a href="#ft_glyph_format" class="md-nav__link"> FT_Glyph_Format </a> </li> <li class="md-nav__item"> <a href="#ft_image_tag" class="md-nav__link"> FT_IMAGE_TAG </a> </li> </ul> </nav> </li> <li class="md-nav__item"> <a href="ft2-base_interface.html" class="md-nav__link"> Base Interface </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_variants.html" class="md-nav__link"> Unicode Variation Sequences </a> </li> <li class="md-nav__item"> <a href="ft2-color_management.html" class="md-nav__link"> Glyph Color Management </a> </li> <li class="md-nav__item"> <a href="ft2-layer_management.html" class="md-nav__link"> Glyph Layer Management </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_management.html" class="md-nav__link"> Glyph Management </a> </li> <li class="md-nav__item"> <a href="ft2-mac_specific.html" class="md-nav__link"> Mac Specific Interface </a> </li> <li class="md-nav__item"> <a href="ft2-sizes_management.html" class="md-nav__link"> Size Management </a> </li> <li class="md-nav__item"> <a href="ft2-header_file_macros.html" class="md-nav__link"> Header File Macros </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" > <label class="md-nav__link" for="__nav_5"> Format-Specific API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Format-Specific API" data-md-level="1"> <label class="md-nav__title" for="__nav_5"> <span class="md-nav__icon md-icon"></span> Format-Specific API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-multiple_masters.html" class="md-nav__link"> Multiple Masters </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_tables.html" class="md-nav__link"> TrueType Tables </a> </li> <li class="md-nav__item"> <a href="ft2-type1_tables.html" class="md-nav__link"> Type 1 Tables </a> </li> <li class="md-nav__item"> <a href="ft2-sfnt_names.html" class="md-nav__link"> SFNT Names </a> </li> <li class="md-nav__item"> <a href="ft2-bdf_fonts.html" class="md-nav__link"> BDF and PCF Files </a> </li> <li class="md-nav__item"> <a href="ft2-cid_fonts.html" class="md-nav__link"> CID Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-pfr_fonts.html" class="md-nav__link"> PFR Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-winfnt_fonts.html" class="md-nav__link"> Window FNT Files </a> </li> <li class="md-nav__item"> <a href="ft2-svg_fonts.html" class="md-nav__link"> OpenType SVG Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-font_formats.html" class="md-nav__link"> Font Formats </a> </li> <li class="md-nav__item"> <a href="ft2-gasp_table.html" class="md-nav__link"> Gasp Table </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" > <label class="md-nav__link" for="__nav_6"> Controlling FreeType Modules <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Controlling FreeType Modules" data-md-level="1"> <label class="md-nav__title" for="__nav_6"> <span class="md-nav__icon md-icon"></span> Controlling FreeType Modules </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-auto_hinter.html" class="md-nav__link"> The auto-hinter </a> </li> <li class="md-nav__item"> <a href="ft2-cff_driver.html" class="md-nav__link"> The CFF driver </a> </li> <li class="md-nav__item"> <a href="ft2-t1_cid_driver.html" class="md-nav__link"> The Type 1 and CID drivers </a> </li> <li class="md-nav__item"> <a href="ft2-tt_driver.html" class="md-nav__link"> The TrueType driver </a> </li> <li class="md-nav__item"> <a href="ft2-pcf_driver.html" class="md-nav__link"> The PCF driver </a> </li> <li class="md-nav__item"> <a href="ft2-ot_svg_driver.html" class="md-nav__link"> The SVG driver </a> </li> <li class="md-nav__item"> <a href="ft2-properties.html" class="md-nav__link"> Driver properties </a> </li> <li class="md-nav__item"> <a href="ft2-parameter_tags.html" class="md-nav__link"> Parameter Tags </a> </li> <li class="md-nav__item"> <a href="ft2-lcd_rendering.html" class="md-nav__link"> Subpixel Rendering </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" > <label class="md-nav__link" for="__nav_7"> Cache Sub-System <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1"> <label class="md-nav__title" for="__nav_7"> <span class="md-nav__icon md-icon"></span> Cache Sub-System </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-cache_subsystem.html" class="md-nav__link"> Cache Sub-System </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" > <label class="md-nav__link" for="__nav_8"> Support API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Support API" data-md-level="1"> <label class="md-nav__title" for="__nav_8"> <span class="md-nav__icon md-icon"></span> Support API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-computations.html" class="md-nav__link"> Computations </a> </li> <li class="md-nav__item"> <a href="ft2-list_processing.html" class="md-nav__link"> List Processing </a> </li> <li class="md-nav__item"> <a href="ft2-outline_processing.html" class="md-nav__link"> Outline Processing </a> </li> <li class="md-nav__item"> <a href="ft2-quick_advance.html" class="md-nav__link"> Quick retrieval of advance values </a> </li> <li class="md-nav__item"> <a href="ft2-bitmap_handling.html" class="md-nav__link"> Bitmap Handling </a> </li> <li class="md-nav__item"> <a href="ft2-raster.html" class="md-nav__link"> Scanline Converter </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_stroker.html" class="md-nav__link"> Glyph Stroker </a> </li> <li class="md-nav__item"> <a href="ft2-system_interface.html" class="md-nav__link"> System Interface </a> </li> <li class="md-nav__item"> <a href="ft2-module_management.html" class="md-nav__link"> Module Management </a> </li> <li class="md-nav__item"> <a href="ft2-gzip.html" class="md-nav__link"> GZIP Streams </a> </li> <li class="md-nav__item"> <a href="ft2-lzw.html" class="md-nav__link"> LZW Streams </a> </li> <li class="md-nav__item"> <a href="ft2-bzip2.html" class="md-nav__link"> BZIP2 Streams </a> </li> <li class="md-nav__item"> <a href="ft2-debugging_apis.html" class="md-nav__link"> External Debugging APIs </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" > <label class="md-nav__link" for="__nav_9"> Error Codes <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Error Codes" data-md-level="1"> <label class="md-nav__title" for="__nav_9"> <span class="md-nav__icon md-icon"></span> Error Codes </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-error_enumerations.html" class="md-nav__link"> Error Enumerations </a> </li> <li class="md-nav__item"> <a href="ft2-error_code_values.html" class="md-nav__link"> Error Code Values </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" > <label class="md-nav__link" for="__nav_10"> Miscellaneous <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1"> <label class="md-nav__title" for="__nav_10"> <span class="md-nav__icon md-icon"></span> Miscellaneous </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-gx_validation.html" class="md-nav__link"> TrueTypeGX/AAT Validation </a> </li> <li class="md-nav__item"> <a href="ft2-incremental.html" class="md-nav__link"> Incremental Loading </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_engine.html" class="md-nav__link"> The TrueType Engine </a> </li> <li class="md-nav__item"> <a href="ft2-ot_validation.html" class="md-nav__link"> OpenType Validation </a> </li> </ul> </nav> </li> </ul> </nav> </div> </div> </div> <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_byte" class="md-nav__link"> FT_Byte </a> </li> <li class="md-nav__item"> <a href="#ft_bytes" class="md-nav__link"> FT_Bytes </a> </li> <li class="md-nav__item"> <a href="#ft_char" class="md-nav__link"> FT_Char </a> </li> <li class="md-nav__item"> <a href="#ft_int" class="md-nav__link"> FT_Int </a> </li> <li class="md-nav__item"> <a href="#ft_uint" class="md-nav__link"> FT_UInt </a> </li> <li class="md-nav__item"> <a href="#ft_int16" class="md-nav__link"> FT_Int16 </a> </li> <li class="md-nav__item"> <a href="#ft_uint16" class="md-nav__link"> FT_UInt16 </a> </li> <li class="md-nav__item"> <a href="#ft_int32" class="md-nav__link"> FT_Int32 </a> </li> <li class="md-nav__item"> <a href="#ft_uint32" class="md-nav__link"> FT_UInt32 </a> </li> <li class="md-nav__item"> <a href="#ft_int64" class="md-nav__link"> FT_Int64 </a> </li> <li class="md-nav__item"> <a href="#ft_uint64" class="md-nav__link"> FT_UInt64 </a> </li> <li class="md-nav__item"> <a href="#ft_short" class="md-nav__link"> FT_Short </a> </li> <li class="md-nav__item"> <a href="#ft_ushort" class="md-nav__link"> FT_UShort </a> </li> <li class="md-nav__item"> <a href="#ft_long" class="md-nav__link"> FT_Long </a> </li> <li class="md-nav__item"> <a href="#ft_ulong" class="md-nav__link"> FT_ULong </a> </li> <li class="md-nav__item"> <a href="#ft_bool" class="md-nav__link"> FT_Bool </a> </li> <li class="md-nav__item"> <a href="#ft_offset" class="md-nav__link"> FT_Offset </a> </li> <li class="md-nav__item"> <a href="#ft_ptrdist" class="md-nav__link"> FT_PtrDist </a> </li> <li class="md-nav__item"> <a href="#ft_string" class="md-nav__link"> FT_String </a> </li> <li class="md-nav__item"> <a href="#ft_tag" class="md-nav__link"> FT_Tag </a> </li> <li class="md-nav__item"> <a href="#ft_error" class="md-nav__link"> FT_Error </a> </li> <li class="md-nav__item"> <a href="#ft_fixed" class="md-nav__link"> FT_Fixed </a> </li> <li class="md-nav__item"> <a href="#ft_pointer" class="md-nav__link"> FT_Pointer </a> </li> <li class="md-nav__item"> <a href="#ft_pos" class="md-nav__link"> FT_Pos </a> </li> <li class="md-nav__item"> <a href="#ft_vector" class="md-nav__link"> FT_Vector </a> </li> <li class="md-nav__item"> <a href="#ft_bbox" class="md-nav__link"> FT_BBox </a> </li> <li class="md-nav__item"> <a href="#ft_matrix" class="md-nav__link"> FT_Matrix </a> </li> <li class="md-nav__item"> <a href="#ft_fword" class="md-nav__link"> FT_FWord </a> </li> <li class="md-nav__item"> <a href="#ft_ufword" class="md-nav__link"> FT_UFWord </a> </li> <li class="md-nav__item"> <a href="#ft_f2dot14" class="md-nav__link"> FT_F2Dot14 </a> </li> <li class="md-nav__item"> <a href="#ft_unitvector" class="md-nav__link"> FT_UnitVector </a> </li> <li class="md-nav__item"> <a href="#ft_f26dot6" class="md-nav__link"> FT_F26Dot6 </a> </li> <li class="md-nav__item"> <a href="#ft_data" class="md-nav__link"> FT_Data </a> </li> <li class="md-nav__item"> <a href="#ft_make_tag" class="md-nav__link"> FT_MAKE_TAG </a> </li> <li class="md-nav__item"> <a href="#ft_generic" class="md-nav__link"> FT_Generic </a> </li> <li class="md-nav__item"> <a href="#ft_generic_finalizer" class="md-nav__link"> FT_Generic_Finalizer </a> </li> <li class="md-nav__item"> <a href="#ft_bitmap" class="md-nav__link"> FT_Bitmap </a> </li> <li class="md-nav__item"> <a href="#ft_pixel_mode" class="md-nav__link"> FT_Pixel_Mode </a> </li> <li class="md-nav__item"> <a href="#ft_glyph_format" class="md-nav__link"> FT_Glyph_Format </a> </li> <li class="md-nav__item"> <a href="#ft_image_tag" class="md-nav__link"> FT_IMAGE_TAG </a> </li> </ul> </nav> </div> </div> </div> <div class="md-content" data-md-component="content"> <article class="md-content__inner md-typeset"> <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; <a href="index.html#core-api">Core API</a> &raquo; Basic Data Types</p> <hr /> <h1 id="basic-data-types">Basic Data Types<a class="headerlink" href="#basic-data-types" title="Permanent link">&para;</a></h1> <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2> <p>This section contains the basic data types defined by FreeType&nbsp;2, ranging from simple scalar types to bitmap descriptors. More font-specific structures are defined in a different section.</p> <h2 id="ft_byte">FT_Byte<a class="headerlink" href="#ft_byte" title="Permanent link">&para;</a></h2> <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">unsigned</span> <span class="keyword">char</span> <b>FT_Byte</b>; </code></pre></div> <p>A simple typedef for the <em>unsigned</em> char type.</p> <hr> <h2 id="ft_bytes">FT_Bytes<a class="headerlink" href="#ft_bytes" title="Permanent link">&para;</a></h2> <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_byte">FT_Byte</a>* <b>FT_Bytes</b>; </code></pre></div> <p>A typedef for constant memory areas.</p> <hr> <h2 id="ft_char">FT_Char<a class="headerlink" href="#ft_char" title="Permanent link">&para;</a></h2> <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="keyword">char</span> <b>FT_Char</b>; </code></pre></div> <p>A simple typedef for the <em>signed</em> char type.</p> <hr> <h2 id="ft_int">FT_Int<a class="headerlink" href="#ft_int" title="Permanent link">&para;</a></h2> <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="keyword">int</span> <b>FT_Int</b>; </code></pre></div> <p>A typedef for the int type.</p> <hr> <h2 id="ft_uint">FT_UInt<a class="headerlink" href="#ft_uint" title="Permanent link">&para;</a></h2> <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> <b>FT_UInt</b>; </code></pre></div> <p>A typedef for the unsigned int type.</p> <hr> <h2 id="ft_int16">FT_Int16<a class="headerlink" href="#ft_int16" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="keyword">short</span> <b>FT_Int16</b>; </code></pre></div> <p>A typedef for a 16bit signed integer type.</p> <hr> <h2 id="ft_uint16">FT_UInt16<a class="headerlink" href="#ft_uint16" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">unsigned</span> <span class="keyword">short</span> <b>FT_UInt16</b>; </code></pre></div> <p>A typedef for a 16bit unsigned integer type.</p> <hr> <h2 id="ft_int32">FT_Int32<a class="headerlink" href="#ft_int32" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">signed</span> XXX <b>FT_Int32</b>; </code></pre></div> <p>A typedef for a 32bit signed integer type. The size depends on the configuration.</p> <hr> <h2 id="ft_uint32">FT_UInt32<a class="headerlink" href="#ft_uint32" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">unsigned</span> XXX <b>FT_UInt32</b>; </code></pre></div> <hr> <h2 id="ft_int64">FT_Int64<a class="headerlink" href="#ft_int64" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">signed</span> XXX <b>FT_Int64</b>; </code></pre></div> <hr> <h2 id="ft_uint64">FT_UInt64<a class="headerlink" href="#ft_uint64" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">unsigned</span> XXX <b>FT_UInt64</b>; </code></pre></div> <hr> <h2 id="ft_short">FT_Short<a class="headerlink" href="#ft_short" title="Permanent link">&para;</a></h2> <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="keyword">short</span> <b>FT_Short</b>; </code></pre></div> <p>A typedef for signed short.</p> <hr> <h2 id="ft_ushort">FT_UShort<a class="headerlink" href="#ft_ushort" title="Permanent link">&para;</a></h2> <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">unsigned</span> <span class="keyword">short</span> <b>FT_UShort</b>; </code></pre></div> <p>A typedef for unsigned short.</p> <hr> <h2 id="ft_long">FT_Long<a class="headerlink" href="#ft_long" title="Permanent link">&para;</a></h2> <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="keyword">long</span> <b>FT_Long</b>; </code></pre></div> <p>A typedef for signed long.</p> <hr> <h2 id="ft_ulong">FT_ULong<a class="headerlink" href="#ft_ulong" title="Permanent link">&para;</a></h2> <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">unsigned</span> <span class="keyword">long</span> <b>FT_ULong</b>; </code></pre></div> <p>A typedef for unsigned long.</p> <hr> <h2 id="ft_bool">FT_Bool<a class="headerlink" href="#ft_bool" title="Permanent link">&para;</a></h2> <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">unsigned</span> <span class="keyword">char</span> <b>FT_Bool</b>; </code></pre></div> <p>A typedef of unsigned char, used for simple booleans. As usual, values 1 and&nbsp;0 represent true and false, respectively.</p> <hr> <h2 id="ft_offset">FT_Offset<a class="headerlink" href="#ft_offset" title="Permanent link">&para;</a></h2> <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> size_t <b>FT_Offset</b>; </code></pre></div> <p>This is equivalent to the ANSI&nbsp;C <code>size_t</code> type, i.e., the largest <em>unsigned</em> integer type used to express a file size or position, or a memory block size.</p> <hr> <h2 id="ft_ptrdist">FT_PtrDist<a class="headerlink" href="#ft_ptrdist" title="Permanent link">&para;</a></h2> <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> ft_ptrdiff_t <b>FT_PtrDist</b>; </code></pre></div> <p>This is equivalent to the ANSI&nbsp;C <code>ptrdiff_t</code> type, i.e., the largest <em>signed</em> integer type used to express the distance between two pointers.</p> <hr> <h2 id="ft_string">FT_String<a class="headerlink" href="#ft_string" title="Permanent link">&para;</a></h2> <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">char</span> <b>FT_String</b>; </code></pre></div> <p>A simple typedef for the char type, usually used for strings.</p> <hr> <h2 id="ft_tag">FT_Tag<a class="headerlink" href="#ft_tag" title="Permanent link">&para;</a></h2> <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <a href="ft2-basic_types.html#ft_uint32">FT_UInt32</a> <b>FT_Tag</b>; </code></pre></div> <p>A typedef for 32-bit tags (as used in the SFNT format).</p> <hr> <h2 id="ft_error">FT_Error<a class="headerlink" href="#ft_error" title="Permanent link">&para;</a></h2> <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">int</span> <b>FT_Error</b>; </code></pre></div> <p>The FreeType error code type. A value of&nbsp;0 is always interpreted as a successful operation.</p> <hr> <h2 id="ft_fixed">FT_Fixed<a class="headerlink" href="#ft_fixed" title="Permanent link">&para;</a></h2> <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="keyword">long</span> <b>FT_Fixed</b>; </code></pre></div> <p>This type is used to store 16.16 fixed-point values, like scaling values or matrix coefficients.</p> <hr> <h2 id="ft_pointer">FT_Pointer<a class="headerlink" href="#ft_pointer" title="Permanent link">&para;</a></h2> <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">void</span>* <b>FT_Pointer</b>; </code></pre></div> <p>A simple typedef for a typeless pointer.</p> <hr> <h2 id="ft_pos">FT_Pos<a class="headerlink" href="#ft_pos" title="Permanent link">&para;</a></h2> <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="keyword">long</span> <b>FT_Pos</b>; </code></pre></div> <p>The type FT_Pos is used to store vectorial coordinates. Depending on the context, these can represent distances in integer font units, or 16.16, or 26.6 fixed-point pixel coordinates.</p> <hr> <h2 id="ft_vector">FT_Vector<a class="headerlink" href="#ft_vector" title="Permanent link">&para;</a></h2> <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Vector_ { <a href="ft2-basic_types.html#ft_pos">FT_Pos</a> x; <a href="ft2-basic_types.html#ft_pos">FT_Pos</a> y; } <b>FT_Vector</b>; </code></pre></div> <p>A simple structure used to store a 2D vector; coordinates are of the FT_Pos type.</p> <h4>fields</h4> <table class="fields"> <tr><td class="val" id="x">x</td><td class="desc"> <p>The horizontal coordinate.</p> </td></tr> <tr><td class="val" id="y">y</td><td class="desc"> <p>The vertical coordinate.</p> </td></tr> </table> <hr> <h2 id="ft_bbox">FT_BBox<a class="headerlink" href="#ft_bbox" title="Permanent link">&para;</a></h2> <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_BBox_ { <a href="ft2-basic_types.html#ft_pos">FT_Pos</a> xMin, yMin; <a href="ft2-basic_types.html#ft_pos">FT_Pos</a> xMax, yMax; } <b>FT_BBox</b>; </code></pre></div> <p>A structure used to hold an outline's bounding box, i.e., the coordinates of its extrema in the horizontal and vertical directions.</p> <h4>fields</h4> <table class="fields"> <tr><td class="val" id="xmin">xMin</td><td class="desc"> <p>The horizontal minimum (left-most).</p> </td></tr> <tr><td class="val" id="ymin">yMin</td><td class="desc"> <p>The vertical minimum (bottom-most).</p> </td></tr> <tr><td class="val" id="xmax">xMax</td><td class="desc"> <p>The horizontal maximum (right-most).</p> </td></tr> <tr><td class="val" id="ymax">yMax</td><td class="desc"> <p>The vertical maximum (top-most).</p> </td></tr> </table> <h4>note</h4> <p>The bounding box is specified with the coordinates of the lower left and the upper right corner. In PostScript, those values are often called (llx,lly) and (urx,ury), respectively.</p> <p>If <code>yMin</code> is negative, this value gives the glyph's descender. Otherwise, the glyph doesn't descend below the baseline. Similarly, if <code>ymax</code> is positive, this value gives the glyph's ascender.</p> <p><code>xMin</code> gives the horizontal distance from the glyph's origin to the left edge of the glyph's bounding box. If <code>xMin</code> is negative, the glyph extends to the left of the origin.</p> <hr> <h2 id="ft_matrix">FT_Matrix<a class="headerlink" href="#ft_matrix" title="Permanent link">&para;</a></h2> <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Matrix_ { <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a> xx, xy; <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a> yx, yy; } <b>FT_Matrix</b>; </code></pre></div> <p>A simple structure used to store a 2x2 matrix. Coefficients are in 16.16 fixed-point format. The computation performed is: <div class="highlight"><pre><span></span><code> x&#39; = x*xx + y*xy y&#39; = x*yx + y*yy </code></pre></div></p> <h4>fields</h4> <table class="fields"> <tr><td class="val" id="xx">xx</td><td class="desc"> <p>Matrix coefficient.</p> </td></tr> <tr><td class="val" id="xy">xy</td><td class="desc"> <p>Matrix coefficient.</p> </td></tr> <tr><td class="val" id="yx">yx</td><td class="desc"> <p>Matrix coefficient.</p> </td></tr> <tr><td class="val" id="yy">yy</td><td class="desc"> <p>Matrix coefficient.</p> </td></tr> </table> <hr> <h2 id="ft_fword">FT_FWord<a class="headerlink" href="#ft_fword" title="Permanent link">&para;</a></h2> <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="keyword">short</span> <b>FT_FWord</b>; /* distance in FUnits */ </code></pre></div> <p>A signed 16-bit integer used to store a distance in original font units.</p> <hr> <h2 id="ft_ufword">FT_UFWord<a class="headerlink" href="#ft_ufword" title="Permanent link">&para;</a></h2> <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">unsigned</span> <span class="keyword">short</span> <b>FT_UFWord</b>; /* <span class="keyword">unsigned</span> distance */ </code></pre></div> <p>An unsigned 16-bit integer used to store a distance in original font units.</p> <hr> <h2 id="ft_f2dot14">FT_F2Dot14<a class="headerlink" href="#ft_f2dot14" title="Permanent link">&para;</a></h2> <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="keyword">short</span> <b>FT_F2Dot14</b>; </code></pre></div> <p>A signed 2.14 fixed-point type used for unit vectors.</p> <hr> <h2 id="ft_unitvector">FT_UnitVector<a class="headerlink" href="#ft_unitvector" title="Permanent link">&para;</a></h2> <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_UnitVector_ { <a href="ft2-basic_types.html#ft_f2dot14">FT_F2Dot14</a> x; <a href="ft2-basic_types.html#ft_f2dot14">FT_F2Dot14</a> y; } <b>FT_UnitVector</b>; </code></pre></div> <p>A simple structure used to store a 2D vector unit vector. Uses FT_F2Dot14 types.</p> <h4>fields</h4> <table class="fields"> <tr><td class="val" id="x">x</td><td class="desc"> <p>Horizontal coordinate.</p> </td></tr> <tr><td class="val" id="y">y</td><td class="desc"> <p>Vertical coordinate.</p> </td></tr> </table> <hr> <h2 id="ft_f26dot6">FT_F26Dot6<a class="headerlink" href="#ft_f26dot6" title="Permanent link">&para;</a></h2> <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">signed</span> <span class="keyword">long</span> <b>FT_F26Dot6</b>; </code></pre></div> <p>A signed 26.6 fixed-point type used for vectorial pixel coordinates.</p> <hr> <h2 id="ft_data">FT_Data<a class="headerlink" href="#ft_data" title="Permanent link">&para;</a></h2> <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Data_ { <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_byte">FT_Byte</a>* pointer; <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> length; } <b>FT_Data</b>; </code></pre></div> <p>Read-only binary data represented as a pointer and a length.</p> <h4>fields</h4> <table class="fields"> <tr><td class="val" id="pointer">pointer</td><td class="desc"> <p>The data.</p> </td></tr> <tr><td class="val" id="length">length</td><td class="desc"> <p>The length of the data in bytes.</p> </td></tr> </table> <hr> <h2 id="ft_make_tag">FT_MAKE_TAG<a class="headerlink" href="#ft_make_tag" title="Permanent link">&para;</a></h2> <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_MAKE_TAG</b>( _x1, _x2, _x3, _x4 ) \ ( ( FT_STATIC_BYTE_CAST( <a href="ft2-basic_types.html#ft_tag">FT_Tag</a>, _x1 ) &lt;&lt; 24 ) | \ ( FT_STATIC_BYTE_CAST( <a href="ft2-basic_types.html#ft_tag">FT_Tag</a>, _x2 ) &lt;&lt; 16 ) | \ ( FT_STATIC_BYTE_CAST( <a href="ft2-basic_types.html#ft_tag">FT_Tag</a>, _x3 ) &lt;&lt; 8 ) | \ FT_STATIC_BYTE_CAST( <a href="ft2-basic_types.html#ft_tag">FT_Tag</a>, _x4 ) ) </code></pre></div> <p>This macro converts four-letter tags that are used to label TrueType tables into an <code>FT_Tag</code> type, to be used within FreeType.</p> <h4>note</h4> <p>The produced values <strong>must</strong> be 32-bit integers. Don't redefine this macro.</p> <hr> <h2 id="ft_generic">FT_Generic<a class="headerlink" href="#ft_generic" title="Permanent link">&para;</a></h2> <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Generic_ { <span class="keyword">void</span>* data; <a href="ft2-basic_types.html#ft_generic_finalizer">FT_Generic_Finalizer</a> finalizer; } <b>FT_Generic</b>; </code></pre></div> <p>Client applications often need to associate their own data to a variety of FreeType core objects. For example, a text layout API might want to associate a glyph cache to a given size object.</p> <p>Some FreeType object contains a <code>generic</code> field, of type <code>FT_Generic</code>, which usage is left to client applications and font servers.</p> <p>It can be used to store a pointer to client-specific data, as well as the address of a &lsquo;finalizer&rsquo; function, which will be called by FreeType when the object is destroyed (for example, the previous client example would put the address of the glyph cache destructor in the <code>finalizer</code> field).</p> <h4>fields</h4> <table class="fields"> <tr><td class="val" id="data">data</td><td class="desc"> <p>A typeless pointer to any client-specified data. This field is completely ignored by the FreeType library.</p> </td></tr> <tr><td class="val" id="finalizer">finalizer</td><td class="desc"> <p>A pointer to a &lsquo;generic finalizer&rsquo; function, which will be called when the object is destroyed. If this field is set to <code>NULL</code>, no code will be called.</p> </td></tr> </table> <hr> <h2 id="ft_generic_finalizer">FT_Generic_Finalizer<a class="headerlink" href="#ft_generic_finalizer" title="Permanent link">&para;</a></h2> <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">void</span> (*<b>FT_Generic_Finalizer</b>)( <span class="keyword">void</span>* object ); </code></pre></div> <p>Describe a function used to destroy the &lsquo;client&rsquo; data of any FreeType object. See the description of the <code><a href="ft2-basic_types.html#ft_generic">FT_Generic</a></code> type for details of usage.</p> <h4>input</h4> <p>The address of the FreeType object that is under finalization. Its client data is accessed through its <code>generic</code> field.</p> <hr> <h2 id="ft_bitmap">FT_Bitmap<a class="headerlink" href="#ft_bitmap" title="Permanent link">&para;</a></h2> <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Bitmap_ { <span class="keyword">unsigned</span> <span class="keyword">int</span> rows; <span class="keyword">unsigned</span> <span class="keyword">int</span> width; <span class="keyword">int</span> pitch; <span class="keyword">unsigned</span> <span class="keyword">char</span>* buffer; <span class="keyword">unsigned</span> <span class="keyword">short</span> num_grays; <span class="keyword">unsigned</span> <span class="keyword">char</span> pixel_mode; <span class="keyword">unsigned</span> <span class="keyword">char</span> palette_mode; <span class="keyword">void</span>* palette; } <b>FT_Bitmap</b>; </code></pre></div> <p>A structure used to describe a bitmap or pixmap to the raster. Note that we now manage pixmaps of various depths through the <code>pixel_mode</code> field.</p> <h4>fields</h4> <table class="fields"> <tr><td class="val" id="rows">rows</td><td class="desc"> <p>The number of bitmap rows.</p> </td></tr> <tr><td class="val" id="width">width</td><td class="desc"> <p>The number of pixels in bitmap row.</p> </td></tr> <tr><td class="val" id="pitch">pitch</td><td class="desc"> <p>The pitch's absolute value is the number of bytes taken by one bitmap row, including padding. However, the pitch is positive when the bitmap has a &lsquo;down&rsquo; flow, and negative when it has an &lsquo;up&rsquo; flow. In all cases, the pitch is an offset to add to a bitmap pointer in order to go down one row.</p> <p>Note that &lsquo;padding&rsquo; means the alignment of a bitmap to a byte border, and FreeType functions normally align to the smallest possible integer value.</p> <p>For the B/W rasterizer, <code>pitch</code> is always an even number.</p> <p>To change the pitch of a bitmap (say, to make it a multiple of 4), use <code><a href="ft2-bitmap_handling.html#ft_bitmap_convert">FT_Bitmap_Convert</a></code>. Alternatively, you might use callback functions to directly render to the application's surface; see the file <code>example2.cpp</code> in the tutorial for a demonstration.</p> </td></tr> <tr><td class="val" id="buffer">buffer</td><td class="desc"> <p>A typeless pointer to the bitmap buffer. This value should be aligned on 32-bit boundaries in most cases.</p> </td></tr> <tr><td class="val" id="num_grays">num_grays</td><td class="desc"> <p>This field is only used with <code><a href="ft2-basic_types.html#ft_pixel_mode">FT_PIXEL_MODE_GRAY</a></code>; it gives the number of gray levels used in the bitmap.</p> </td></tr> <tr><td class="val" id="pixel_mode">pixel_mode</td><td class="desc"> <p>The pixel mode, i.e., how pixel bits are stored. See <code><a href="ft2-basic_types.html#ft_pixel_mode">FT_Pixel_Mode</a></code> for possible values.</p> </td></tr> <tr><td class="val" id="palette_mode">palette_mode</td><td class="desc"> <p>This field is intended for paletted pixel modes; it indicates how the palette is stored. Not used currently.</p> </td></tr> <tr><td class="val" id="palette">palette</td><td class="desc"> <p>A typeless pointer to the bitmap palette; this field is intended for paletted pixel modes. Not used currently.</p> </td></tr> </table> <hr> <h2 id="ft_pixel_mode">FT_Pixel_Mode<a class="headerlink" href="#ft_pixel_mode" title="Permanent link">&para;</a></h2> <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">enum</span> FT_Pixel_Mode_ { <a href="ft2-basic_types.html#ft_pixel_mode_none">FT_PIXEL_MODE_NONE</a> = 0, <a href="ft2-basic_types.html#ft_pixel_mode_mono">FT_PIXEL_MODE_MONO</a>, <a href="ft2-basic_types.html#ft_pixel_mode_gray">FT_PIXEL_MODE_GRAY</a>, <a href="ft2-basic_types.html#ft_pixel_mode_gray2">FT_PIXEL_MODE_GRAY2</a>, <a href="ft2-basic_types.html#ft_pixel_mode_gray4">FT_PIXEL_MODE_GRAY4</a>, <a href="ft2-basic_types.html#ft_pixel_mode_lcd">FT_PIXEL_MODE_LCD</a>, <a href="ft2-basic_types.html#ft_pixel_mode_lcd_v">FT_PIXEL_MODE_LCD_V</a>, <a href="ft2-basic_types.html#ft_pixel_mode_bgra">FT_PIXEL_MODE_BGRA</a>, FT_PIXEL_MODE_MAX /* do not remove */ } <b>FT_Pixel_Mode</b>; /* these constants are deprecated; use the corresponding `<b>FT_Pixel_Mode</b>` */ /* values instead. */ #<span class="keyword">define</span> ft_pixel_mode_none <a href="ft2-basic_types.html#ft_pixel_mode_none">FT_PIXEL_MODE_NONE</a> #<span class="keyword">define</span> ft_pixel_mode_mono <a href="ft2-basic_types.html#ft_pixel_mode_mono">FT_PIXEL_MODE_MONO</a> #<span class="keyword">define</span> ft_pixel_mode_grays <a href="ft2-basic_types.html#ft_pixel_mode_gray">FT_PIXEL_MODE_GRAY</a> #<span class="keyword">define</span> ft_pixel_mode_pal2 <a href="ft2-basic_types.html#ft_pixel_mode_gray2">FT_PIXEL_MODE_GRAY2</a> #<span class="keyword">define</span> ft_pixel_mode_pal4 <a href="ft2-basic_types.html#ft_pixel_mode_gray4">FT_PIXEL_MODE_GRAY4</a> </code></pre></div> <p>An enumeration type used to describe the format of pixels in a given bitmap. Note that additional formats may be added in the future.</p> <h4>values</h4> <table class="fields"> <tr><td class="val" id="ft_pixel_mode_none">FT_PIXEL_MODE_NONE</td><td class="desc"> <p>Value&nbsp;0 is reserved.</p> </td></tr> <tr><td class="val" id="ft_pixel_mode_mono">FT_PIXEL_MODE_MONO</td><td class="desc"> <p>A monochrome bitmap, using 1&nbsp;bit per pixel. Note that pixels are stored in most-significant order (MSB), which means that the left-most pixel in a byte has value 128.</p> </td></tr> <tr><td class="val" id="ft_pixel_mode_gray">FT_PIXEL_MODE_GRAY</td><td class="desc"> <p>An 8-bit bitmap, generally used to represent anti-aliased glyph images. Each pixel is stored in one byte. Note that the number of &lsquo;gray&rsquo; levels is stored in the <code>num_grays</code> field of the <code><a href="ft2-basic_types.html#ft_bitmap">FT_Bitmap</a></code> structure (it generally is 256).</p> </td></tr> <tr><td class="val" id="ft_pixel_mode_gray2">FT_PIXEL_MODE_GRAY2</td><td class="desc"> <p>A 2-bit per pixel bitmap, used to represent embedded anti-aliased bitmaps in font files according to the OpenType specification. We haven't found a single font using this format, however.</p> </td></tr> <tr><td class="val" id="ft_pixel_mode_gray4">FT_PIXEL_MODE_GRAY4</td><td class="desc"> <p>A 4-bit per pixel bitmap, representing embedded anti-aliased bitmaps in font files according to the OpenType specification. We haven't found a single font using this format, however.</p> </td></tr> <tr><td class="val" id="ft_pixel_mode_lcd">FT_PIXEL_MODE_LCD</td><td class="desc"> <p>An 8-bit bitmap, representing RGB or BGR decimated glyph images used for display on LCD displays; the bitmap is three times wider than the original glyph image. See also <code><a href="ft2-base_interface.html#ft_render_mode">FT_RENDER_MODE_LCD</a></code>.</p> </td></tr> <tr><td class="val" id="ft_pixel_mode_lcd_v">FT_PIXEL_MODE_LCD_V</td><td class="desc"> <p>An 8-bit bitmap, representing RGB or BGR decimated glyph images used for display on rotated LCD displays; the bitmap is three times taller than the original glyph image. See also <code><a href="ft2-base_interface.html#ft_render_mode">FT_RENDER_MODE_LCD_V</a></code>.</p> </td></tr> <tr><td class="val" id="ft_pixel_mode_bgra">FT_PIXEL_MODE_BGRA</td><td class="desc"> <p>[Since 2.5] An image with four 8-bit channels per pixel, representing a color image (such as emoticons) with alpha channel. For each pixel, the format is BGRA, which means, the blue channel comes first in memory. The color channels are pre-multiplied and in the sRGB colorspace. For example, full red at half-translucent opacity will be represented as &lsquo;00,00,80,80&rsquo;, not &lsquo;00,00,FF,80&rsquo;. See also <code><a href="ft2-base_interface.html#ft_load_xxx">FT_LOAD_COLOR</a></code>.</p> </td></tr> </table> <hr> <h2 id="ft_glyph_format">FT_Glyph_Format<a class="headerlink" href="#ft_glyph_format" title="Permanent link">&para;</a></h2> <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">enum</span> FT_Glyph_Format_ { <a href="ft2-basic_types.html#ft_image_tag">FT_IMAGE_TAG</a>( <a href="ft2-basic_types.html#ft_glyph_format_none">FT_GLYPH_FORMAT_NONE</a>, 0, 0, 0, 0 ), <a href="ft2-basic_types.html#ft_image_tag">FT_IMAGE_TAG</a>( <a href="ft2-basic_types.html#ft_glyph_format_composite">FT_GLYPH_FORMAT_COMPOSITE</a>, 'c', 'o', 'm', 'p' ), <a href="ft2-basic_types.html#ft_image_tag">FT_IMAGE_TAG</a>( <a href="ft2-basic_types.html#ft_glyph_format_bitmap">FT_GLYPH_FORMAT_BITMAP</a>, 'b', 'i', 't', 's' ), <a href="ft2-basic_types.html#ft_image_tag">FT_IMAGE_TAG</a>( <a href="ft2-basic_types.html#ft_glyph_format_outline">FT_GLYPH_FORMAT_OUTLINE</a>, 'o', 'u', 't', 'l' ), <a href="ft2-basic_types.html#ft_image_tag">FT_IMAGE_TAG</a>( <a href="ft2-basic_types.html#ft_glyph_format_plotter">FT_GLYPH_FORMAT_PLOTTER</a>, 'p', 'l', 'o', 't' ), <a href="ft2-basic_types.html#ft_image_tag">FT_IMAGE_TAG</a>( <a href="ft2-basic_types.html#ft_glyph_format_svg">FT_GLYPH_FORMAT_SVG</a>, 'S', 'V', 'G', ' ' ) } <b>FT_Glyph_Format</b>; /* these constants are deprecated; use the corresponding */ /* `<b>FT_Glyph_Format</b>` values instead. */ #<span class="keyword">define</span> ft_glyph_format_none <a href="ft2-basic_types.html#ft_glyph_format_none">FT_GLYPH_FORMAT_NONE</a> #<span class="keyword">define</span> ft_glyph_format_composite <a href="ft2-basic_types.html#ft_glyph_format_composite">FT_GLYPH_FORMAT_COMPOSITE</a> #<span class="keyword">define</span> ft_glyph_format_bitmap <a href="ft2-basic_types.html#ft_glyph_format_bitmap">FT_GLYPH_FORMAT_BITMAP</a> #<span class="keyword">define</span> ft_glyph_format_outline <a href="ft2-basic_types.html#ft_glyph_format_outline">FT_GLYPH_FORMAT_OUTLINE</a> #<span class="keyword">define</span> ft_glyph_format_plotter <a href="ft2-basic_types.html#ft_glyph_format_plotter">FT_GLYPH_FORMAT_PLOTTER</a> </code></pre></div> <p>An enumeration type used to describe the format of a given glyph image. Note that this version of FreeType only supports two image formats, even though future font drivers will be able to register their own format.</p> <h4>values</h4> <table class="fields"> <tr><td class="val" id="ft_glyph_format_none">FT_GLYPH_FORMAT_NONE</td><td class="desc"> <p>The value&nbsp;0 is reserved.</p> </td></tr> <tr><td class="val" id="ft_glyph_format_composite">FT_GLYPH_FORMAT_COMPOSITE</td><td class="desc"> <p>The glyph image is a composite of several other images. This format is <em>only</em> used with <code><a href="ft2-base_interface.html#ft_load_xxx">FT_LOAD_NO_RECURSE</a></code>, and is used to report compound glyphs (like accented characters).</p> </td></tr> <tr><td class="val" id="ft_glyph_format_bitmap">FT_GLYPH_FORMAT_BITMAP</td><td class="desc"> <p>The glyph image is a bitmap, and can be described as an <code><a href="ft2-basic_types.html#ft_bitmap">FT_Bitmap</a></code>. You generally need to access the <code>bitmap</code> field of the <code><a href="ft2-base_interface.html#ft_glyphslotrec">FT_GlyphSlotRec</a></code> structure to read it.</p> </td></tr> <tr><td class="val" id="ft_glyph_format_outline">FT_GLYPH_FORMAT_OUTLINE</td><td class="desc"> <p>The glyph image is a vectorial outline made of line segments and Bezier arcs; it can be described as an <code><a href="ft2-outline_processing.html#ft_outline">FT_Outline</a></code>; you generally want to access the <code>outline</code> field of the <code><a href="ft2-base_interface.html#ft_glyphslotrec">FT_GlyphSlotRec</a></code> structure to read it.</p> </td></tr> <tr><td class="val" id="ft_glyph_format_plotter">FT_GLYPH_FORMAT_PLOTTER</td><td class="desc"> <p>The glyph image is a vectorial path with no inside and outside contours. Some Type&nbsp;1 fonts, like those in the Hershey family, contain glyphs in this format. These are described as <code><a href="ft2-outline_processing.html#ft_outline">FT_Outline</a></code>, but FreeType isn't currently capable of rendering them correctly.</p> </td></tr> <tr><td class="val" id="ft_glyph_format_svg">FT_GLYPH_FORMAT_SVG</td><td class="desc"> <p>[Since 2.12] The glyph is represented by an SVG document in the &lsquo;SVG&nbsp;&rsquo; table.</p> </td></tr> </table> <hr> <h2 id="ft_image_tag">FT_IMAGE_TAG<a class="headerlink" href="#ft_image_tag" title="Permanent link">&para;</a></h2> <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p> <div class = "codehilite"><pre><code>#<span class="keyword">ifndef</span> <b>FT_IMAGE_TAG</b> #<span class="keyword">define</span> <b>FT_IMAGE_TAG</b>( value, _x1, _x2, _x3, _x4 ) \ value = ( ( FT_STATIC_BYTE_CAST( <span class="keyword">unsigned</span> <span class="keyword">long</span>, _x1 ) &lt;&lt; 24 ) | \ ( FT_STATIC_BYTE_CAST( <span class="keyword">unsigned</span> <span class="keyword">long</span>, _x2 ) &lt;&lt; 16 ) | \ ( FT_STATIC_BYTE_CAST( <span class="keyword">unsigned</span> <span class="keyword">long</span>, _x3 ) &lt;&lt; 8 ) | \ FT_STATIC_BYTE_CAST( <span class="keyword">unsigned</span> <span class="keyword">long</span>, _x4 ) ) #<span class="keyword">endif</span> /* <b>FT_IMAGE_TAG</b> */ </code></pre></div> <p>This macro converts four-letter tags to an unsigned long type.</p> <h4>note</h4> <p>Since many 16-bit compilers don't like 32-bit enumerations, you should redefine this macro in case of problems to something like this: <div class="highlight"><pre><span></span><code> #define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 ) value </code></pre></div></p> <p>to get a simple enumeration without assigning special numbers.</p> <hr> </article> </div> </div> </main> <footer class="md-footer"> <nav class="md-footer__inner md-grid" aria-label="Footer"> <a href="ft2-version.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: FreeType Version" rel="prev"> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Previous </span> FreeType Version </div> </div> </a> <a href="ft2-base_interface.html" class="md-footer__link md-footer__link--next" aria-label="Next: Base Interface" rel="next"> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Next </span> Base Interface </div> </div> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg> </div> </a> </nav> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-footer-copyright"> <div class="md-footer-copyright__highlight"> Copyright 2022 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>. </div> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"base": ".", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "assets/javascripts/workers/search.477d984a.min.js", "version": null}</script> <script src="assets/javascripts/bundle.82b56eb2.min.js"></script> <script src="javascripts/extra.js"></script> </body> </html>
whupdup/frame
real/third_party/freetype-2.12.0/docs/reference/ft2-basic_types.html
HTML
gpl-3.0
70,209
<!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="description" content="API Reference Documentation for FreeType-2.12.0"> <meta name="author" content="FreeType Contributors"> <link rel="icon" href="images/favico.ico"> <meta name="generator" content="mkdocs-1.2.1, mkdocs-material-7.1.9"> <title>BDF and PCF Files - FreeType-2.12.0 API Reference</title> <link rel="stylesheet" href="assets/stylesheets/main.ca7ac06f.min.css"> <link rel="stylesheet" href="assets/stylesheets/palette.f1a3b89f.min.css"> <meta name="theme-color" content="#4cae4f"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback"> <style>:root{--md-text-font-family:"Noto Serif";--md-code-font-family:"Roboto Mono"}</style> <link rel="stylesheet" href="stylesheets/extra.css"> </head> <body dir="ltr" data-md-color-scheme="" data-md-color-primary="green" data-md-color-accent="green"> <script>function __prefix(e){return new URL(".",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <label class="md-overlay" for="__drawer"></label> <div data-md-component="skip"> <a href="#bdf-and-pcf-files" class="md-skip"> Skip to content </a> </div> <div data-md-component="announce"> </div> <header class="md-header" data-md-component="header"> <nav class="md-header__inner md-grid" aria-label="Header"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> <label class="md-header__button md-icon" for="__drawer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg> </label> <div class="md-header__title" data-md-component="header-title"> <div class="md-header__ellipsis"> <div class="md-header__topic"> <span class="md-ellipsis"> FreeType-2.12.0 API Reference </span> </div> <div class="md-header__topic" data-md-component="header-topic"> <span class="md-ellipsis"> BDF and PCF Files </span> </div> </div> </div> <label class="md-header__button md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> </label> <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required> <label class="md-search__icon md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </label> <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg> </button> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" data-md-scrollfix> <div class="md-search-result" data-md-component="search-result"> <div class="md-search-result__meta"> Initializing search </div> <ol class="md-search-result__list"></ol> </div> </div> </div> </div> </div> </nav> </header> <div class="md-container" data-md-component="container"> <main class="md-main" data-md-component="main"> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <label class="md-nav__title" for="__drawer"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> FreeType-2.12.0 API Reference </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="index.html" class="md-nav__link"> TOC </a> </li> <li class="md-nav__item"> <a href="ft2-index.html" class="md-nav__link"> Index </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" > <label class="md-nav__link" for="__nav_3"> General Remarks <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="General Remarks" data-md-level="1"> <label class="md-nav__title" for="__nav_3"> <span class="md-nav__icon md-icon"></span> General Remarks </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-preamble.html" class="md-nav__link"> Preamble </a> </li> <li class="md-nav__item"> <a href="ft2-header_inclusion.html" class="md-nav__link"> FreeType's header inclusion scheme </a> </li> <li class="md-nav__item"> <a href="ft2-user_allocation.html" class="md-nav__link"> User allocation </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" > <label class="md-nav__link" for="__nav_4"> Core API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Core API" data-md-level="1"> <label class="md-nav__title" for="__nav_4"> <span class="md-nav__icon md-icon"></span> Core API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-version.html" class="md-nav__link"> FreeType Version </a> </li> <li class="md-nav__item"> <a href="ft2-basic_types.html" class="md-nav__link"> Basic Data Types </a> </li> <li class="md-nav__item"> <a href="ft2-base_interface.html" class="md-nav__link"> Base Interface </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_variants.html" class="md-nav__link"> Unicode Variation Sequences </a> </li> <li class="md-nav__item"> <a href="ft2-color_management.html" class="md-nav__link"> Glyph Color Management </a> </li> <li class="md-nav__item"> <a href="ft2-layer_management.html" class="md-nav__link"> Glyph Layer Management </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_management.html" class="md-nav__link"> Glyph Management </a> </li> <li class="md-nav__item"> <a href="ft2-mac_specific.html" class="md-nav__link"> Mac Specific Interface </a> </li> <li class="md-nav__item"> <a href="ft2-sizes_management.html" class="md-nav__link"> Size Management </a> </li> <li class="md-nav__item"> <a href="ft2-header_file_macros.html" class="md-nav__link"> Header File Macros </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--active md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" checked> <label class="md-nav__link" for="__nav_5"> Format-Specific API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Format-Specific API" data-md-level="1"> <label class="md-nav__title" for="__nav_5"> <span class="md-nav__icon md-icon"></span> Format-Specific API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-multiple_masters.html" class="md-nav__link"> Multiple Masters </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_tables.html" class="md-nav__link"> TrueType Tables </a> </li> <li class="md-nav__item"> <a href="ft2-type1_tables.html" class="md-nav__link"> Type 1 Tables </a> </li> <li class="md-nav__item"> <a href="ft2-sfnt_names.html" class="md-nav__link"> SFNT Names </a> </li> <li class="md-nav__item md-nav__item--active"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <label class="md-nav__link md-nav__link--active" for="__toc"> BDF and PCF Files <span class="md-nav__icon md-icon"></span> </label> <a href="ft2-bdf_fonts.html" class="md-nav__link md-nav__link--active"> BDF and PCF Files </a> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#bdf_propertytype" class="md-nav__link"> BDF_PropertyType </a> </li> <li class="md-nav__item"> <a href="#bdf_property" class="md-nav__link"> BDF_Property </a> </li> <li class="md-nav__item"> <a href="#bdf_propertyrec" class="md-nav__link"> BDF_PropertyRec </a> </li> <li class="md-nav__item"> <a href="#ft_get_bdf_charset_id" class="md-nav__link"> FT_Get_BDF_Charset_ID </a> </li> <li class="md-nav__item"> <a href="#ft_get_bdf_property" class="md-nav__link"> FT_Get_BDF_Property </a> </li> </ul> </nav> </li> <li class="md-nav__item"> <a href="ft2-cid_fonts.html" class="md-nav__link"> CID Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-pfr_fonts.html" class="md-nav__link"> PFR Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-winfnt_fonts.html" class="md-nav__link"> Window FNT Files </a> </li> <li class="md-nav__item"> <a href="ft2-svg_fonts.html" class="md-nav__link"> OpenType SVG Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-font_formats.html" class="md-nav__link"> Font Formats </a> </li> <li class="md-nav__item"> <a href="ft2-gasp_table.html" class="md-nav__link"> Gasp Table </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" > <label class="md-nav__link" for="__nav_6"> Controlling FreeType Modules <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Controlling FreeType Modules" data-md-level="1"> <label class="md-nav__title" for="__nav_6"> <span class="md-nav__icon md-icon"></span> Controlling FreeType Modules </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-auto_hinter.html" class="md-nav__link"> The auto-hinter </a> </li> <li class="md-nav__item"> <a href="ft2-cff_driver.html" class="md-nav__link"> The CFF driver </a> </li> <li class="md-nav__item"> <a href="ft2-t1_cid_driver.html" class="md-nav__link"> The Type 1 and CID drivers </a> </li> <li class="md-nav__item"> <a href="ft2-tt_driver.html" class="md-nav__link"> The TrueType driver </a> </li> <li class="md-nav__item"> <a href="ft2-pcf_driver.html" class="md-nav__link"> The PCF driver </a> </li> <li class="md-nav__item"> <a href="ft2-ot_svg_driver.html" class="md-nav__link"> The SVG driver </a> </li> <li class="md-nav__item"> <a href="ft2-properties.html" class="md-nav__link"> Driver properties </a> </li> <li class="md-nav__item"> <a href="ft2-parameter_tags.html" class="md-nav__link"> Parameter Tags </a> </li> <li class="md-nav__item"> <a href="ft2-lcd_rendering.html" class="md-nav__link"> Subpixel Rendering </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" > <label class="md-nav__link" for="__nav_7"> Cache Sub-System <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1"> <label class="md-nav__title" for="__nav_7"> <span class="md-nav__icon md-icon"></span> Cache Sub-System </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-cache_subsystem.html" class="md-nav__link"> Cache Sub-System </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" > <label class="md-nav__link" for="__nav_8"> Support API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Support API" data-md-level="1"> <label class="md-nav__title" for="__nav_8"> <span class="md-nav__icon md-icon"></span> Support API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-computations.html" class="md-nav__link"> Computations </a> </li> <li class="md-nav__item"> <a href="ft2-list_processing.html" class="md-nav__link"> List Processing </a> </li> <li class="md-nav__item"> <a href="ft2-outline_processing.html" class="md-nav__link"> Outline Processing </a> </li> <li class="md-nav__item"> <a href="ft2-quick_advance.html" class="md-nav__link"> Quick retrieval of advance values </a> </li> <li class="md-nav__item"> <a href="ft2-bitmap_handling.html" class="md-nav__link"> Bitmap Handling </a> </li> <li class="md-nav__item"> <a href="ft2-raster.html" class="md-nav__link"> Scanline Converter </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_stroker.html" class="md-nav__link"> Glyph Stroker </a> </li> <li class="md-nav__item"> <a href="ft2-system_interface.html" class="md-nav__link"> System Interface </a> </li> <li class="md-nav__item"> <a href="ft2-module_management.html" class="md-nav__link"> Module Management </a> </li> <li class="md-nav__item"> <a href="ft2-gzip.html" class="md-nav__link"> GZIP Streams </a> </li> <li class="md-nav__item"> <a href="ft2-lzw.html" class="md-nav__link"> LZW Streams </a> </li> <li class="md-nav__item"> <a href="ft2-bzip2.html" class="md-nav__link"> BZIP2 Streams </a> </li> <li class="md-nav__item"> <a href="ft2-debugging_apis.html" class="md-nav__link"> External Debugging APIs </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" > <label class="md-nav__link" for="__nav_9"> Error Codes <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Error Codes" data-md-level="1"> <label class="md-nav__title" for="__nav_9"> <span class="md-nav__icon md-icon"></span> Error Codes </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-error_enumerations.html" class="md-nav__link"> Error Enumerations </a> </li> <li class="md-nav__item"> <a href="ft2-error_code_values.html" class="md-nav__link"> Error Code Values </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" > <label class="md-nav__link" for="__nav_10"> Miscellaneous <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1"> <label class="md-nav__title" for="__nav_10"> <span class="md-nav__icon md-icon"></span> Miscellaneous </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-gx_validation.html" class="md-nav__link"> TrueTypeGX/AAT Validation </a> </li> <li class="md-nav__item"> <a href="ft2-incremental.html" class="md-nav__link"> Incremental Loading </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_engine.html" class="md-nav__link"> The TrueType Engine </a> </li> <li class="md-nav__item"> <a href="ft2-ot_validation.html" class="md-nav__link"> OpenType Validation </a> </li> </ul> </nav> </li> </ul> </nav> </div> </div> </div> <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#bdf_propertytype" class="md-nav__link"> BDF_PropertyType </a> </li> <li class="md-nav__item"> <a href="#bdf_property" class="md-nav__link"> BDF_Property </a> </li> <li class="md-nav__item"> <a href="#bdf_propertyrec" class="md-nav__link"> BDF_PropertyRec </a> </li> <li class="md-nav__item"> <a href="#ft_get_bdf_charset_id" class="md-nav__link"> FT_Get_BDF_Charset_ID </a> </li> <li class="md-nav__item"> <a href="#ft_get_bdf_property" class="md-nav__link"> FT_Get_BDF_Property </a> </li> </ul> </nav> </div> </div> </div> <div class="md-content" data-md-component="content"> <article class="md-content__inner md-typeset"> <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; <a href="index.html#format-specific-api">Format-Specific API</a> &raquo; BDF and PCF Files</p> <hr /> <h1 id="bdf-and-pcf-files">BDF and PCF Files<a class="headerlink" href="#bdf-and-pcf-files" title="Permanent link">&para;</a></h1> <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2> <p>This section contains the declaration of functions specific to BDF and PCF fonts.</p> <h2 id="bdf_propertytype">BDF_PropertyType<a class="headerlink" href="#bdf_propertytype" title="Permanent link">&para;</a></h2> <p>Defined in FT_BDF_H (freetype/ftbdf.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">enum</span> BDF_PropertyType_ { <a href="ft2-bdf_fonts.html#bdf_property_type_none">BDF_PROPERTY_TYPE_NONE</a> = 0, <a href="ft2-bdf_fonts.html#bdf_property_type_atom">BDF_PROPERTY_TYPE_ATOM</a> = 1, <a href="ft2-bdf_fonts.html#bdf_property_type_integer">BDF_PROPERTY_TYPE_INTEGER</a> = 2, <a href="ft2-bdf_fonts.html#bdf_property_type_cardinal">BDF_PROPERTY_TYPE_CARDINAL</a> = 3 } <b>BDF_PropertyType</b>; </code></pre></div> <p>A list of BDF property types.</p> <h4>values</h4> <table class="fields long"> <tr><td class="val" id="bdf_property_type_none">BDF_PROPERTY_TYPE_NONE</td><td class="desc"> <p>Value&nbsp;0 is used to indicate a missing property.</p> </td></tr> <tr><td class="val" id="bdf_property_type_atom">BDF_PROPERTY_TYPE_ATOM</td><td class="desc"> <p>Property is a string atom.</p> </td></tr> <tr><td class="val" id="bdf_property_type_integer">BDF_PROPERTY_TYPE_INTEGER</td><td class="desc"> <p>Property is a 32-bit signed integer.</p> </td></tr> <tr><td class="val" id="bdf_property_type_cardinal">BDF_PROPERTY_TYPE_CARDINAL</td><td class="desc"> <p>Property is a 32-bit unsigned integer.</p> </td></tr> </table> <hr> <h2 id="bdf_property">BDF_Property<a class="headerlink" href="#bdf_property" title="Permanent link">&para;</a></h2> <p>Defined in FT_BDF_H (freetype/ftbdf.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> BDF_PropertyRec_* <b>BDF_Property</b>; </code></pre></div> <p>A handle to a <code><a href="ft2-bdf_fonts.html#bdf_propertyrec">BDF_PropertyRec</a></code> structure to model a given BDF/PCF property.</p> <hr> <h2 id="bdf_propertyrec">BDF_PropertyRec<a class="headerlink" href="#bdf_propertyrec" title="Permanent link">&para;</a></h2> <p>Defined in FT_BDF_H (freetype/ftbdf.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> BDF_PropertyRec_ { <a href="ft2-bdf_fonts.html#bdf_propertytype">BDF_PropertyType</a> type; <span class="keyword">union</span> { <span class="keyword">const</span> <span class="keyword">char</span>* atom; <a href="ft2-basic_types.html#ft_int32">FT_Int32</a> integer; <a href="ft2-basic_types.html#ft_uint32">FT_UInt32</a> cardinal; } u; } <b>BDF_PropertyRec</b>; </code></pre></div> <p>This structure models a given BDF/PCF property.</p> <h4>fields</h4> <table class="fields"> <tr><td class="val" id="type">type</td><td class="desc"> <p>The property type.</p> </td></tr> <tr><td class="val" id="u.atom">u.atom</td><td class="desc"> <p>The atom string, if type is <code><a href="ft2-bdf_fonts.html#bdf_propertytype">BDF_PROPERTY_TYPE_ATOM</a></code>. May be <code>NULL</code>, indicating an empty string.</p> </td></tr> <tr><td class="val" id="u.integer">u.integer</td><td class="desc"> <p>A signed integer, if type is <code><a href="ft2-bdf_fonts.html#bdf_propertytype">BDF_PROPERTY_TYPE_INTEGER</a></code>.</p> </td></tr> <tr><td class="val" id="u.cardinal">u.cardinal</td><td class="desc"> <p>An unsigned integer, if type is <code><a href="ft2-bdf_fonts.html#bdf_propertytype">BDF_PROPERTY_TYPE_CARDINAL</a></code>.</p> </td></tr> </table> <hr> <h2 id="ft_get_bdf_charset_id">FT_Get_BDF_Charset_ID<a class="headerlink" href="#ft_get_bdf_charset_id" title="Permanent link">&para;</a></h2> <p>Defined in FT_BDF_H (freetype/ftbdf.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Get_BDF_Charset_ID</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a> face, <span class="keyword">const</span> <span class="keyword">char</span>* *acharset_encoding, <span class="keyword">const</span> <span class="keyword">char</span>* *acharset_registry ); </code></pre></div> <p>Retrieve a BDF font character set identity, according to the BDF specification.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="face">face</td><td class="desc"> <p>A handle to the input face.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="acharset_encoding">acharset_encoding</td><td class="desc"> <p>Charset encoding, as a C&nbsp;string, owned by the face.</p> </td></tr> <tr><td class="val" id="acharset_registry">acharset_registry</td><td class="desc"> <p>Charset registry, as a C&nbsp;string, owned by the face.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>This function only works with BDF faces, returning an error otherwise.</p> <hr> <h2 id="ft_get_bdf_property">FT_Get_BDF_Property<a class="headerlink" href="#ft_get_bdf_property" title="Permanent link">&para;</a></h2> <p>Defined in FT_BDF_H (freetype/ftbdf.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Get_BDF_Property</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a> face, <span class="keyword">const</span> <span class="keyword">char</span>* prop_name, <a href="ft2-bdf_fonts.html#bdf_propertyrec">BDF_PropertyRec</a> *aproperty ); </code></pre></div> <p>Retrieve a BDF property from a BDF or PCF font file.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="face">face</td><td class="desc"> <p>A handle to the input face.</p> </td></tr> <tr><td class="val" id="name">name</td><td class="desc"> <p>The property name.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="aproperty">aproperty</td><td class="desc"> <p>The property.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>This function works with BDF <em>and</em> PCF fonts. It returns an error otherwise. It also returns an error if the property is not in the font.</p> <p>A &lsquo;property&rsquo; is a either key-value pair within the STARTPROPERTIES &hellip; ENDPROPERTIES block of a BDF font or a key-value pair from the <code>info-&gt;props</code> array within a <code>FontRec</code> structure of a PCF font.</p> <p>Integer properties are always stored as &lsquo;signed&rsquo; within PCF fonts; consequently, <code><a href="ft2-bdf_fonts.html#bdf_propertytype">BDF_PROPERTY_TYPE_CARDINAL</a></code> is a possible return value for BDF fonts only.</p> <p>In case of error, <code>aproperty-&gt;type</code> is always set to <code><a href="ft2-bdf_fonts.html#bdf_propertytype">BDF_PROPERTY_TYPE_NONE</a></code>.</p> <hr> </article> </div> </div> </main> <footer class="md-footer"> <nav class="md-footer__inner md-grid" aria-label="Footer"> <a href="ft2-sfnt_names.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: SFNT Names" rel="prev"> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Previous </span> SFNT Names </div> </div> </a> <a href="ft2-cid_fonts.html" class="md-footer__link md-footer__link--next" aria-label="Next: CID Fonts" rel="next"> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Next </span> CID Fonts </div> </div> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg> </div> </a> </nav> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-footer-copyright"> <div class="md-footer-copyright__highlight"> Copyright 2022 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>. </div> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"base": ".", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "assets/javascripts/workers/search.477d984a.min.js", "version": null}</script> <script src="assets/javascripts/bundle.82b56eb2.min.js"></script> <script src="javascripts/extra.js"></script> </body> </html>
whupdup/frame
real/third_party/freetype-2.12.0/docs/reference/ft2-bdf_fonts.html
HTML
gpl-3.0
35,029
<!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="description" content="API Reference Documentation for FreeType-2.12.0"> <meta name="author" content="FreeType Contributors"> <link rel="icon" href="images/favico.ico"> <meta name="generator" content="mkdocs-1.2.1, mkdocs-material-7.1.9"> <title>Bitmap Handling - FreeType-2.12.0 API Reference</title> <link rel="stylesheet" href="assets/stylesheets/main.ca7ac06f.min.css"> <link rel="stylesheet" href="assets/stylesheets/palette.f1a3b89f.min.css"> <meta name="theme-color" content="#4cae4f"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback"> <style>:root{--md-text-font-family:"Noto Serif";--md-code-font-family:"Roboto Mono"}</style> <link rel="stylesheet" href="stylesheets/extra.css"> </head> <body dir="ltr" data-md-color-scheme="" data-md-color-primary="green" data-md-color-accent="green"> <script>function __prefix(e){return new URL(".",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <label class="md-overlay" for="__drawer"></label> <div data-md-component="skip"> <a href="#bitmap-handling" class="md-skip"> Skip to content </a> </div> <div data-md-component="announce"> </div> <header class="md-header" data-md-component="header"> <nav class="md-header__inner md-grid" aria-label="Header"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> <label class="md-header__button md-icon" for="__drawer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg> </label> <div class="md-header__title" data-md-component="header-title"> <div class="md-header__ellipsis"> <div class="md-header__topic"> <span class="md-ellipsis"> FreeType-2.12.0 API Reference </span> </div> <div class="md-header__topic" data-md-component="header-topic"> <span class="md-ellipsis"> Bitmap Handling </span> </div> </div> </div> <label class="md-header__button md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> </label> <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required> <label class="md-search__icon md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </label> <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg> </button> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" data-md-scrollfix> <div class="md-search-result" data-md-component="search-result"> <div class="md-search-result__meta"> Initializing search </div> <ol class="md-search-result__list"></ol> </div> </div> </div> </div> </div> </nav> </header> <div class="md-container" data-md-component="container"> <main class="md-main" data-md-component="main"> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <label class="md-nav__title" for="__drawer"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> FreeType-2.12.0 API Reference </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="index.html" class="md-nav__link"> TOC </a> </li> <li class="md-nav__item"> <a href="ft2-index.html" class="md-nav__link"> Index </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" > <label class="md-nav__link" for="__nav_3"> General Remarks <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="General Remarks" data-md-level="1"> <label class="md-nav__title" for="__nav_3"> <span class="md-nav__icon md-icon"></span> General Remarks </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-preamble.html" class="md-nav__link"> Preamble </a> </li> <li class="md-nav__item"> <a href="ft2-header_inclusion.html" class="md-nav__link"> FreeType's header inclusion scheme </a> </li> <li class="md-nav__item"> <a href="ft2-user_allocation.html" class="md-nav__link"> User allocation </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" > <label class="md-nav__link" for="__nav_4"> Core API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Core API" data-md-level="1"> <label class="md-nav__title" for="__nav_4"> <span class="md-nav__icon md-icon"></span> Core API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-version.html" class="md-nav__link"> FreeType Version </a> </li> <li class="md-nav__item"> <a href="ft2-basic_types.html" class="md-nav__link"> Basic Data Types </a> </li> <li class="md-nav__item"> <a href="ft2-base_interface.html" class="md-nav__link"> Base Interface </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_variants.html" class="md-nav__link"> Unicode Variation Sequences </a> </li> <li class="md-nav__item"> <a href="ft2-color_management.html" class="md-nav__link"> Glyph Color Management </a> </li> <li class="md-nav__item"> <a href="ft2-layer_management.html" class="md-nav__link"> Glyph Layer Management </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_management.html" class="md-nav__link"> Glyph Management </a> </li> <li class="md-nav__item"> <a href="ft2-mac_specific.html" class="md-nav__link"> Mac Specific Interface </a> </li> <li class="md-nav__item"> <a href="ft2-sizes_management.html" class="md-nav__link"> Size Management </a> </li> <li class="md-nav__item"> <a href="ft2-header_file_macros.html" class="md-nav__link"> Header File Macros </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" > <label class="md-nav__link" for="__nav_5"> Format-Specific API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Format-Specific API" data-md-level="1"> <label class="md-nav__title" for="__nav_5"> <span class="md-nav__icon md-icon"></span> Format-Specific API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-multiple_masters.html" class="md-nav__link"> Multiple Masters </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_tables.html" class="md-nav__link"> TrueType Tables </a> </li> <li class="md-nav__item"> <a href="ft2-type1_tables.html" class="md-nav__link"> Type 1 Tables </a> </li> <li class="md-nav__item"> <a href="ft2-sfnt_names.html" class="md-nav__link"> SFNT Names </a> </li> <li class="md-nav__item"> <a href="ft2-bdf_fonts.html" class="md-nav__link"> BDF and PCF Files </a> </li> <li class="md-nav__item"> <a href="ft2-cid_fonts.html" class="md-nav__link"> CID Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-pfr_fonts.html" class="md-nav__link"> PFR Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-winfnt_fonts.html" class="md-nav__link"> Window FNT Files </a> </li> <li class="md-nav__item"> <a href="ft2-svg_fonts.html" class="md-nav__link"> OpenType SVG Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-font_formats.html" class="md-nav__link"> Font Formats </a> </li> <li class="md-nav__item"> <a href="ft2-gasp_table.html" class="md-nav__link"> Gasp Table </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" > <label class="md-nav__link" for="__nav_6"> Controlling FreeType Modules <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Controlling FreeType Modules" data-md-level="1"> <label class="md-nav__title" for="__nav_6"> <span class="md-nav__icon md-icon"></span> Controlling FreeType Modules </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-auto_hinter.html" class="md-nav__link"> The auto-hinter </a> </li> <li class="md-nav__item"> <a href="ft2-cff_driver.html" class="md-nav__link"> The CFF driver </a> </li> <li class="md-nav__item"> <a href="ft2-t1_cid_driver.html" class="md-nav__link"> The Type 1 and CID drivers </a> </li> <li class="md-nav__item"> <a href="ft2-tt_driver.html" class="md-nav__link"> The TrueType driver </a> </li> <li class="md-nav__item"> <a href="ft2-pcf_driver.html" class="md-nav__link"> The PCF driver </a> </li> <li class="md-nav__item"> <a href="ft2-ot_svg_driver.html" class="md-nav__link"> The SVG driver </a> </li> <li class="md-nav__item"> <a href="ft2-properties.html" class="md-nav__link"> Driver properties </a> </li> <li class="md-nav__item"> <a href="ft2-parameter_tags.html" class="md-nav__link"> Parameter Tags </a> </li> <li class="md-nav__item"> <a href="ft2-lcd_rendering.html" class="md-nav__link"> Subpixel Rendering </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" > <label class="md-nav__link" for="__nav_7"> Cache Sub-System <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1"> <label class="md-nav__title" for="__nav_7"> <span class="md-nav__icon md-icon"></span> Cache Sub-System </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-cache_subsystem.html" class="md-nav__link"> Cache Sub-System </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--active md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" checked> <label class="md-nav__link" for="__nav_8"> Support API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Support API" data-md-level="1"> <label class="md-nav__title" for="__nav_8"> <span class="md-nav__icon md-icon"></span> Support API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-computations.html" class="md-nav__link"> Computations </a> </li> <li class="md-nav__item"> <a href="ft2-list_processing.html" class="md-nav__link"> List Processing </a> </li> <li class="md-nav__item"> <a href="ft2-outline_processing.html" class="md-nav__link"> Outline Processing </a> </li> <li class="md-nav__item"> <a href="ft2-quick_advance.html" class="md-nav__link"> Quick retrieval of advance values </a> </li> <li class="md-nav__item md-nav__item--active"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <label class="md-nav__link md-nav__link--active" for="__toc"> Bitmap Handling <span class="md-nav__icon md-icon"></span> </label> <a href="ft2-bitmap_handling.html" class="md-nav__link md-nav__link--active"> Bitmap Handling </a> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_bitmap_init" class="md-nav__link"> FT_Bitmap_Init </a> </li> <li class="md-nav__item"> <a href="#ft_bitmap_copy" class="md-nav__link"> FT_Bitmap_Copy </a> </li> <li class="md-nav__item"> <a href="#ft_bitmap_embolden" class="md-nav__link"> FT_Bitmap_Embolden </a> </li> <li class="md-nav__item"> <a href="#ft_bitmap_convert" class="md-nav__link"> FT_Bitmap_Convert </a> </li> <li class="md-nav__item"> <a href="#ft_bitmap_blend" class="md-nav__link"> FT_Bitmap_Blend </a> </li> <li class="md-nav__item"> <a href="#ft_glyphslot_own_bitmap" class="md-nav__link"> FT_GlyphSlot_Own_Bitmap </a> </li> <li class="md-nav__item"> <a href="#ft_bitmap_done" class="md-nav__link"> FT_Bitmap_Done </a> </li> </ul> </nav> </li> <li class="md-nav__item"> <a href="ft2-raster.html" class="md-nav__link"> Scanline Converter </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_stroker.html" class="md-nav__link"> Glyph Stroker </a> </li> <li class="md-nav__item"> <a href="ft2-system_interface.html" class="md-nav__link"> System Interface </a> </li> <li class="md-nav__item"> <a href="ft2-module_management.html" class="md-nav__link"> Module Management </a> </li> <li class="md-nav__item"> <a href="ft2-gzip.html" class="md-nav__link"> GZIP Streams </a> </li> <li class="md-nav__item"> <a href="ft2-lzw.html" class="md-nav__link"> LZW Streams </a> </li> <li class="md-nav__item"> <a href="ft2-bzip2.html" class="md-nav__link"> BZIP2 Streams </a> </li> <li class="md-nav__item"> <a href="ft2-debugging_apis.html" class="md-nav__link"> External Debugging APIs </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" > <label class="md-nav__link" for="__nav_9"> Error Codes <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Error Codes" data-md-level="1"> <label class="md-nav__title" for="__nav_9"> <span class="md-nav__icon md-icon"></span> Error Codes </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-error_enumerations.html" class="md-nav__link"> Error Enumerations </a> </li> <li class="md-nav__item"> <a href="ft2-error_code_values.html" class="md-nav__link"> Error Code Values </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" > <label class="md-nav__link" for="__nav_10"> Miscellaneous <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1"> <label class="md-nav__title" for="__nav_10"> <span class="md-nav__icon md-icon"></span> Miscellaneous </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-gx_validation.html" class="md-nav__link"> TrueTypeGX/AAT Validation </a> </li> <li class="md-nav__item"> <a href="ft2-incremental.html" class="md-nav__link"> Incremental Loading </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_engine.html" class="md-nav__link"> The TrueType Engine </a> </li> <li class="md-nav__item"> <a href="ft2-ot_validation.html" class="md-nav__link"> OpenType Validation </a> </li> </ul> </nav> </li> </ul> </nav> </div> </div> </div> <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_bitmap_init" class="md-nav__link"> FT_Bitmap_Init </a> </li> <li class="md-nav__item"> <a href="#ft_bitmap_copy" class="md-nav__link"> FT_Bitmap_Copy </a> </li> <li class="md-nav__item"> <a href="#ft_bitmap_embolden" class="md-nav__link"> FT_Bitmap_Embolden </a> </li> <li class="md-nav__item"> <a href="#ft_bitmap_convert" class="md-nav__link"> FT_Bitmap_Convert </a> </li> <li class="md-nav__item"> <a href="#ft_bitmap_blend" class="md-nav__link"> FT_Bitmap_Blend </a> </li> <li class="md-nav__item"> <a href="#ft_glyphslot_own_bitmap" class="md-nav__link"> FT_GlyphSlot_Own_Bitmap </a> </li> <li class="md-nav__item"> <a href="#ft_bitmap_done" class="md-nav__link"> FT_Bitmap_Done </a> </li> </ul> </nav> </div> </div> </div> <div class="md-content" data-md-component="content"> <article class="md-content__inner md-typeset"> <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; <a href="index.html#support-api">Support API</a> &raquo; Bitmap Handling</p> <hr /> <h1 id="bitmap-handling">Bitmap Handling<a class="headerlink" href="#bitmap-handling" title="Permanent link">&para;</a></h1> <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2> <p>This section contains functions for handling <code><a href="ft2-basic_types.html#ft_bitmap">FT_Bitmap</a></code> objects, automatically adjusting the target's bitmap buffer size as needed.</p> <p>Note that none of the functions changes the bitmap's &lsquo;flow&rsquo; (as indicated by the sign of the <code>pitch</code> field in <code><a href="ft2-basic_types.html#ft_bitmap">FT_Bitmap</a></code>).</p> <p>To set the flow, assign an appropriate positive or negative value to the <code>pitch</code> field of the target <code><a href="ft2-basic_types.html#ft_bitmap">FT_Bitmap</a></code> object after calling <code><a href="ft2-bitmap_handling.html#ft_bitmap_init">FT_Bitmap_Init</a></code> but before calling any of the other functions described here.</p> <h2 id="ft_bitmap_init">FT_Bitmap_Init<a class="headerlink" href="#ft_bitmap_init" title="Permanent link">&para;</a></h2> <p>Defined in FT_BITMAP_H (freetype/ftbitmap.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> ) <b>FT_Bitmap_Init</b>( <a href="ft2-basic_types.html#ft_bitmap">FT_Bitmap</a> *abitmap ); /* deprecated */ FT_EXPORT( <span class="keyword">void</span> ) FT_Bitmap_New( <a href="ft2-basic_types.html#ft_bitmap">FT_Bitmap</a> *abitmap ); </code></pre></div> <p>Initialize a pointer to an <code><a href="ft2-basic_types.html#ft_bitmap">FT_Bitmap</a></code> structure.</p> <h4>inout</h4> <table class="fields"> <tr><td class="val" id="abitmap">abitmap</td><td class="desc"> <p>A pointer to the bitmap structure.</p> </td></tr> </table> <h4>note</h4> <p>A deprecated name for the same function is <code>FT_Bitmap_New</code>.</p> <hr> <h2 id="ft_bitmap_copy">FT_Bitmap_Copy<a class="headerlink" href="#ft_bitmap_copy" title="Permanent link">&para;</a></h2> <p>Defined in FT_BITMAP_H (freetype/ftbitmap.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Bitmap_Copy</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library, <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_bitmap">FT_Bitmap</a> *source, <a href="ft2-basic_types.html#ft_bitmap">FT_Bitmap</a> *target ); </code></pre></div> <p>Copy a bitmap into another one.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="library">library</td><td class="desc"> <p>A handle to a library object.</p> </td></tr> <tr><td class="val" id="source">source</td><td class="desc"> <p>A handle to the source bitmap.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="target">target</td><td class="desc"> <p>A handle to the target bitmap.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p><code>source-&gt;buffer</code> and <code>target-&gt;buffer</code> must neither be equal nor overlap.</p> <hr> <h2 id="ft_bitmap_embolden">FT_Bitmap_Embolden<a class="headerlink" href="#ft_bitmap_embolden" title="Permanent link">&para;</a></h2> <p>Defined in FT_BITMAP_H (freetype/ftbitmap.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Bitmap_Embolden</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library, <a href="ft2-basic_types.html#ft_bitmap">FT_Bitmap</a>* bitmap, <a href="ft2-basic_types.html#ft_pos">FT_Pos</a> xStrength, <a href="ft2-basic_types.html#ft_pos">FT_Pos</a> yStrength ); </code></pre></div> <p>Embolden a bitmap. The new bitmap will be about <code>xStrength</code> pixels wider and <code>yStrength</code> pixels higher. The left and bottom borders are kept unchanged.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="library">library</td><td class="desc"> <p>A handle to a library object.</p> </td></tr> <tr><td class="val" id="xstrength">xStrength</td><td class="desc"> <p>How strong the glyph is emboldened horizontally. Expressed in 26.6 pixel format.</p> </td></tr> <tr><td class="val" id="ystrength">yStrength</td><td class="desc"> <p>How strong the glyph is emboldened vertically. Expressed in 26.6 pixel format.</p> </td></tr> </table> <h4>inout</h4> <table class="fields"> <tr><td class="val" id="bitmap">bitmap</td><td class="desc"> <p>A handle to the target bitmap.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>The current implementation restricts <code>xStrength</code> to be less than or equal to&nbsp;8 if bitmap is of pixel_mode <code><a href="ft2-basic_types.html#ft_pixel_mode">FT_PIXEL_MODE_MONO</a></code>.</p> <p>If you want to embolden the bitmap owned by a <code><a href="ft2-base_interface.html#ft_glyphslotrec">FT_GlyphSlotRec</a></code>, you should call <code><a href="ft2-bitmap_handling.html#ft_glyphslot_own_bitmap">FT_GlyphSlot_Own_Bitmap</a></code> on the slot first.</p> <p>Bitmaps in <code><a href="ft2-basic_types.html#ft_pixel_mode">FT_PIXEL_MODE_GRAY2</a></code> and <code><a href="ft2-basic_types.html#ft_pixel_mode">FT_PIXEL_MODE_GRAY</a></code>@ format are converted to <code><a href="ft2-basic_types.html#ft_pixel_mode">FT_PIXEL_MODE_GRAY</a></code> format (i.e., 8bpp).</p> <hr> <h2 id="ft_bitmap_convert">FT_Bitmap_Convert<a class="headerlink" href="#ft_bitmap_convert" title="Permanent link">&para;</a></h2> <p>Defined in FT_BITMAP_H (freetype/ftbitmap.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Bitmap_Convert</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library, <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_bitmap">FT_Bitmap</a> *source, <a href="ft2-basic_types.html#ft_bitmap">FT_Bitmap</a> *target, <a href="ft2-basic_types.html#ft_int">FT_Int</a> alignment ); </code></pre></div> <p>Convert a bitmap object with depth 1bpp, 2bpp, 4bpp, 8bpp or 32bpp to a bitmap object with depth 8bpp, making the number of used bytes per line (a.k.a. the &lsquo;pitch&rsquo;) a multiple of <code>alignment</code>.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="library">library</td><td class="desc"> <p>A handle to a library object.</p> </td></tr> <tr><td class="val" id="source">source</td><td class="desc"> <p>The source bitmap.</p> </td></tr> <tr><td class="val" id="alignment">alignment</td><td class="desc"> <p>The pitch of the bitmap is a multiple of this argument. Common values are 1, 2, or 4.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="target">target</td><td class="desc"> <p>The target bitmap.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>It is possible to call <code><a href="ft2-bitmap_handling.html#ft_bitmap_convert">FT_Bitmap_Convert</a></code> multiple times without calling <code><a href="ft2-bitmap_handling.html#ft_bitmap_done">FT_Bitmap_Done</a></code> (the memory is simply reallocated).</p> <p>Use <code><a href="ft2-bitmap_handling.html#ft_bitmap_done">FT_Bitmap_Done</a></code> to finally remove the bitmap object.</p> <p>The <code>library</code> argument is taken to have access to FreeType's memory handling functions.</p> <p><code>source-&gt;buffer</code> and <code>target-&gt;buffer</code> must neither be equal nor overlap.</p> <hr> <h2 id="ft_bitmap_blend">FT_Bitmap_Blend<a class="headerlink" href="#ft_bitmap_blend" title="Permanent link">&para;</a></h2> <p>Defined in FT_BITMAP_H (freetype/ftbitmap.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Bitmap_Blend</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library, <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_bitmap">FT_Bitmap</a>* source, <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_vector">FT_Vector</a> source_offset, <a href="ft2-basic_types.html#ft_bitmap">FT_Bitmap</a>* target, <a href="ft2-basic_types.html#ft_vector">FT_Vector</a> *atarget_offset, <a href="ft2-color_management.html#ft_color">FT_Color</a> color ); </code></pre></div> <p>Blend a bitmap onto another bitmap, using a given color.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="library">library</td><td class="desc"> <p>A handle to a library object.</p> </td></tr> <tr><td class="val" id="source">source</td><td class="desc"> <p>The source bitmap, which can have any <code><a href="ft2-basic_types.html#ft_pixel_mode">FT_Pixel_Mode</a></code> format.</p> </td></tr> <tr><td class="val" id="source_offset">source_offset</td><td class="desc"> <p>The offset vector to the upper left corner of the source bitmap in 26.6 pixel format. It should represent an integer offset; the function will set the lowest six bits to zero to enforce that.</p> </td></tr> <tr><td class="val" id="color">color</td><td class="desc"> <p>The color used to draw <code>source</code> onto <code>target</code>.</p> </td></tr> </table> <h4>inout</h4> <table class="fields"> <tr><td class="val" id="target">target</td><td class="desc"> <p>A handle to an <code>FT_Bitmap</code> object. It should be either initialized as empty with a call to <code><a href="ft2-bitmap_handling.html#ft_bitmap_init">FT_Bitmap_Init</a></code>, or it should be of type <code><a href="ft2-basic_types.html#ft_pixel_mode">FT_PIXEL_MODE_BGRA</a></code>.</p> </td></tr> <tr><td class="val" id="atarget_offset">atarget_offset</td><td class="desc"> <p>The offset vector to the upper left corner of the target bitmap in 26.6 pixel format. It should represent an integer offset; the function will set the lowest six bits to zero to enforce that.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>This function doesn't perform clipping.</p> <p>The bitmap in <code>target</code> gets allocated or reallocated as needed; the vector <code>atarget_offset</code> is updated accordingly.</p> <p>In case of allocation or reallocation, the bitmap's pitch is set to <code>4 * width</code>. Both <code>source</code> and <code>target</code> must have the same bitmap flow (as indicated by the sign of the <code>pitch</code> field).</p> <p><code>source-&gt;buffer</code> and <code>target-&gt;buffer</code> must neither be equal nor overlap.</p> <h4>since</h4> <p>2.10</p> <hr> <h2 id="ft_glyphslot_own_bitmap">FT_GlyphSlot_Own_Bitmap<a class="headerlink" href="#ft_glyphslot_own_bitmap" title="Permanent link">&para;</a></h2> <p>Defined in FT_BITMAP_H (freetype/ftbitmap.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_GlyphSlot_Own_Bitmap</b>( <a href="ft2-base_interface.html#ft_glyphslot">FT_GlyphSlot</a> slot ); </code></pre></div> <p>Make sure that a glyph slot owns <code>slot-&gt;bitmap</code>.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="slot">slot</td><td class="desc"> <p>The glyph slot.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>This function is to be used in combination with <code><a href="ft2-bitmap_handling.html#ft_bitmap_embolden">FT_Bitmap_Embolden</a></code>.</p> <hr> <h2 id="ft_bitmap_done">FT_Bitmap_Done<a class="headerlink" href="#ft_bitmap_done" title="Permanent link">&para;</a></h2> <p>Defined in FT_BITMAP_H (freetype/ftbitmap.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Bitmap_Done</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library, <a href="ft2-basic_types.html#ft_bitmap">FT_Bitmap</a> *bitmap ); </code></pre></div> <p>Destroy a bitmap object initialized with <code><a href="ft2-bitmap_handling.html#ft_bitmap_init">FT_Bitmap_Init</a></code>.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="library">library</td><td class="desc"> <p>A handle to a library object.</p> </td></tr> <tr><td class="val" id="bitmap">bitmap</td><td class="desc"> <p>The bitmap object to be freed.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>The <code>library</code> argument is taken to have access to FreeType's memory handling functions.</p> <hr> </article> </div> </div> </main> <footer class="md-footer"> <nav class="md-footer__inner md-grid" aria-label="Footer"> <a href="ft2-quick_advance.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: Quick retrieval of advance values" rel="prev"> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Previous </span> Quick retrieval of advance values </div> </div> </a> <a href="ft2-raster.html" class="md-footer__link md-footer__link--next" aria-label="Next: Scanline Converter" rel="next"> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Next </span> Scanline Converter </div> </div> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg> </div> </a> </nav> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-footer-copyright"> <div class="md-footer-copyright__highlight"> Copyright 2022 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>. </div> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"base": ".", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "assets/javascripts/workers/search.477d984a.min.js", "version": null}</script> <script src="assets/javascripts/bundle.82b56eb2.min.js"></script> <script src="javascripts/extra.js"></script> </body> </html>
whupdup/frame
real/third_party/freetype-2.12.0/docs/reference/ft2-bitmap_handling.html
HTML
gpl-3.0
41,244
<!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="description" content="API Reference Documentation for FreeType-2.12.0"> <meta name="author" content="FreeType Contributors"> <link rel="icon" href="images/favico.ico"> <meta name="generator" content="mkdocs-1.2.1, mkdocs-material-7.1.9"> <title>BZIP2 Streams - FreeType-2.12.0 API Reference</title> <link rel="stylesheet" href="assets/stylesheets/main.ca7ac06f.min.css"> <link rel="stylesheet" href="assets/stylesheets/palette.f1a3b89f.min.css"> <meta name="theme-color" content="#4cae4f"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback"> <style>:root{--md-text-font-family:"Noto Serif";--md-code-font-family:"Roboto Mono"}</style> <link rel="stylesheet" href="stylesheets/extra.css"> </head> <body dir="ltr" data-md-color-scheme="" data-md-color-primary="green" data-md-color-accent="green"> <script>function __prefix(e){return new URL(".",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <label class="md-overlay" for="__drawer"></label> <div data-md-component="skip"> <a href="#bzip2-streams" class="md-skip"> Skip to content </a> </div> <div data-md-component="announce"> </div> <header class="md-header" data-md-component="header"> <nav class="md-header__inner md-grid" aria-label="Header"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> <label class="md-header__button md-icon" for="__drawer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg> </label> <div class="md-header__title" data-md-component="header-title"> <div class="md-header__ellipsis"> <div class="md-header__topic"> <span class="md-ellipsis"> FreeType-2.12.0 API Reference </span> </div> <div class="md-header__topic" data-md-component="header-topic"> <span class="md-ellipsis"> BZIP2 Streams </span> </div> </div> </div> <label class="md-header__button md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> </label> <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required> <label class="md-search__icon md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </label> <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg> </button> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" data-md-scrollfix> <div class="md-search-result" data-md-component="search-result"> <div class="md-search-result__meta"> Initializing search </div> <ol class="md-search-result__list"></ol> </div> </div> </div> </div> </div> </nav> </header> <div class="md-container" data-md-component="container"> <main class="md-main" data-md-component="main"> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <label class="md-nav__title" for="__drawer"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> FreeType-2.12.0 API Reference </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="index.html" class="md-nav__link"> TOC </a> </li> <li class="md-nav__item"> <a href="ft2-index.html" class="md-nav__link"> Index </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" > <label class="md-nav__link" for="__nav_3"> General Remarks <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="General Remarks" data-md-level="1"> <label class="md-nav__title" for="__nav_3"> <span class="md-nav__icon md-icon"></span> General Remarks </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-preamble.html" class="md-nav__link"> Preamble </a> </li> <li class="md-nav__item"> <a href="ft2-header_inclusion.html" class="md-nav__link"> FreeType's header inclusion scheme </a> </li> <li class="md-nav__item"> <a href="ft2-user_allocation.html" class="md-nav__link"> User allocation </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" > <label class="md-nav__link" for="__nav_4"> Core API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Core API" data-md-level="1"> <label class="md-nav__title" for="__nav_4"> <span class="md-nav__icon md-icon"></span> Core API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-version.html" class="md-nav__link"> FreeType Version </a> </li> <li class="md-nav__item"> <a href="ft2-basic_types.html" class="md-nav__link"> Basic Data Types </a> </li> <li class="md-nav__item"> <a href="ft2-base_interface.html" class="md-nav__link"> Base Interface </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_variants.html" class="md-nav__link"> Unicode Variation Sequences </a> </li> <li class="md-nav__item"> <a href="ft2-color_management.html" class="md-nav__link"> Glyph Color Management </a> </li> <li class="md-nav__item"> <a href="ft2-layer_management.html" class="md-nav__link"> Glyph Layer Management </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_management.html" class="md-nav__link"> Glyph Management </a> </li> <li class="md-nav__item"> <a href="ft2-mac_specific.html" class="md-nav__link"> Mac Specific Interface </a> </li> <li class="md-nav__item"> <a href="ft2-sizes_management.html" class="md-nav__link"> Size Management </a> </li> <li class="md-nav__item"> <a href="ft2-header_file_macros.html" class="md-nav__link"> Header File Macros </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" > <label class="md-nav__link" for="__nav_5"> Format-Specific API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Format-Specific API" data-md-level="1"> <label class="md-nav__title" for="__nav_5"> <span class="md-nav__icon md-icon"></span> Format-Specific API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-multiple_masters.html" class="md-nav__link"> Multiple Masters </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_tables.html" class="md-nav__link"> TrueType Tables </a> </li> <li class="md-nav__item"> <a href="ft2-type1_tables.html" class="md-nav__link"> Type 1 Tables </a> </li> <li class="md-nav__item"> <a href="ft2-sfnt_names.html" class="md-nav__link"> SFNT Names </a> </li> <li class="md-nav__item"> <a href="ft2-bdf_fonts.html" class="md-nav__link"> BDF and PCF Files </a> </li> <li class="md-nav__item"> <a href="ft2-cid_fonts.html" class="md-nav__link"> CID Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-pfr_fonts.html" class="md-nav__link"> PFR Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-winfnt_fonts.html" class="md-nav__link"> Window FNT Files </a> </li> <li class="md-nav__item"> <a href="ft2-svg_fonts.html" class="md-nav__link"> OpenType SVG Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-font_formats.html" class="md-nav__link"> Font Formats </a> </li> <li class="md-nav__item"> <a href="ft2-gasp_table.html" class="md-nav__link"> Gasp Table </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" > <label class="md-nav__link" for="__nav_6"> Controlling FreeType Modules <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Controlling FreeType Modules" data-md-level="1"> <label class="md-nav__title" for="__nav_6"> <span class="md-nav__icon md-icon"></span> Controlling FreeType Modules </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-auto_hinter.html" class="md-nav__link"> The auto-hinter </a> </li> <li class="md-nav__item"> <a href="ft2-cff_driver.html" class="md-nav__link"> The CFF driver </a> </li> <li class="md-nav__item"> <a href="ft2-t1_cid_driver.html" class="md-nav__link"> The Type 1 and CID drivers </a> </li> <li class="md-nav__item"> <a href="ft2-tt_driver.html" class="md-nav__link"> The TrueType driver </a> </li> <li class="md-nav__item"> <a href="ft2-pcf_driver.html" class="md-nav__link"> The PCF driver </a> </li> <li class="md-nav__item"> <a href="ft2-ot_svg_driver.html" class="md-nav__link"> The SVG driver </a> </li> <li class="md-nav__item"> <a href="ft2-properties.html" class="md-nav__link"> Driver properties </a> </li> <li class="md-nav__item"> <a href="ft2-parameter_tags.html" class="md-nav__link"> Parameter Tags </a> </li> <li class="md-nav__item"> <a href="ft2-lcd_rendering.html" class="md-nav__link"> Subpixel Rendering </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" > <label class="md-nav__link" for="__nav_7"> Cache Sub-System <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1"> <label class="md-nav__title" for="__nav_7"> <span class="md-nav__icon md-icon"></span> Cache Sub-System </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-cache_subsystem.html" class="md-nav__link"> Cache Sub-System </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--active md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" checked> <label class="md-nav__link" for="__nav_8"> Support API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Support API" data-md-level="1"> <label class="md-nav__title" for="__nav_8"> <span class="md-nav__icon md-icon"></span> Support API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-computations.html" class="md-nav__link"> Computations </a> </li> <li class="md-nav__item"> <a href="ft2-list_processing.html" class="md-nav__link"> List Processing </a> </li> <li class="md-nav__item"> <a href="ft2-outline_processing.html" class="md-nav__link"> Outline Processing </a> </li> <li class="md-nav__item"> <a href="ft2-quick_advance.html" class="md-nav__link"> Quick retrieval of advance values </a> </li> <li class="md-nav__item"> <a href="ft2-bitmap_handling.html" class="md-nav__link"> Bitmap Handling </a> </li> <li class="md-nav__item"> <a href="ft2-raster.html" class="md-nav__link"> Scanline Converter </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_stroker.html" class="md-nav__link"> Glyph Stroker </a> </li> <li class="md-nav__item"> <a href="ft2-system_interface.html" class="md-nav__link"> System Interface </a> </li> <li class="md-nav__item"> <a href="ft2-module_management.html" class="md-nav__link"> Module Management </a> </li> <li class="md-nav__item"> <a href="ft2-gzip.html" class="md-nav__link"> GZIP Streams </a> </li> <li class="md-nav__item"> <a href="ft2-lzw.html" class="md-nav__link"> LZW Streams </a> </li> <li class="md-nav__item md-nav__item--active"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <label class="md-nav__link md-nav__link--active" for="__toc"> BZIP2 Streams <span class="md-nav__icon md-icon"></span> </label> <a href="ft2-bzip2.html" class="md-nav__link md-nav__link--active"> BZIP2 Streams </a> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_stream_openbzip2" class="md-nav__link"> FT_Stream_OpenBzip2 </a> </li> </ul> </nav> </li> <li class="md-nav__item"> <a href="ft2-debugging_apis.html" class="md-nav__link"> External Debugging APIs </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" > <label class="md-nav__link" for="__nav_9"> Error Codes <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Error Codes" data-md-level="1"> <label class="md-nav__title" for="__nav_9"> <span class="md-nav__icon md-icon"></span> Error Codes </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-error_enumerations.html" class="md-nav__link"> Error Enumerations </a> </li> <li class="md-nav__item"> <a href="ft2-error_code_values.html" class="md-nav__link"> Error Code Values </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" > <label class="md-nav__link" for="__nav_10"> Miscellaneous <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1"> <label class="md-nav__title" for="__nav_10"> <span class="md-nav__icon md-icon"></span> Miscellaneous </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-gx_validation.html" class="md-nav__link"> TrueTypeGX/AAT Validation </a> </li> <li class="md-nav__item"> <a href="ft2-incremental.html" class="md-nav__link"> Incremental Loading </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_engine.html" class="md-nav__link"> The TrueType Engine </a> </li> <li class="md-nav__item"> <a href="ft2-ot_validation.html" class="md-nav__link"> OpenType Validation </a> </li> </ul> </nav> </li> </ul> </nav> </div> </div> </div> <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_stream_openbzip2" class="md-nav__link"> FT_Stream_OpenBzip2 </a> </li> </ul> </nav> </div> </div> </div> <div class="md-content" data-md-component="content"> <article class="md-content__inner md-typeset"> <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; <a href="index.html#support-api">Support API</a> &raquo; BZIP2 Streams</p> <hr /> <h1 id="bzip2-streams">BZIP2 Streams<a class="headerlink" href="#bzip2-streams" title="Permanent link">&para;</a></h1> <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2> <p>In certain builds of the library, bzip2 compression recognition is automatically handled when calling <code><a href="ft2-base_interface.html#ft_new_face">FT_New_Face</a></code> or <code><a href="ft2-base_interface.html#ft_open_face">FT_Open_Face</a></code>. This means that if no font driver is capable of handling the raw compressed file, the library will try to open a bzip2 compressed stream from it and re-open the face with it.</p> <p>The stream implementation is very basic and resets the decompression process each time seeking backwards is needed within the stream, which significantly undermines the performance.</p> <p>This section contains the declaration of Bzip2-specific functions.</p> <h2 id="ft_stream_openbzip2">FT_Stream_OpenBzip2<a class="headerlink" href="#ft_stream_openbzip2" title="Permanent link">&para;</a></h2> <p>Defined in FT_BZIP2_H (freetype/ftbzip2.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Stream_OpenBzip2</b>( <a href="ft2-system_interface.html#ft_stream">FT_Stream</a> stream, <a href="ft2-system_interface.html#ft_stream">FT_Stream</a> source ); </code></pre></div> <p>Open a new stream to parse bzip2-compressed font files. This is mainly used to support the compressed <code>*.pcf.bz2</code> fonts that come with XFree86.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="stream">stream</td><td class="desc"> <p>The target embedding stream.</p> </td></tr> <tr><td class="val" id="source">source</td><td class="desc"> <p>The source stream.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>The source stream must be opened <em>before</em> calling this function.</p> <p>Calling the internal function <code>FT_Stream_Close</code> on the new stream will <strong>not</strong> call <code>FT_Stream_Close</code> on the source stream. None of the stream objects will be released to the heap.</p> <p>This function may return <code>FT_Err_Unimplemented_Feature</code> if your build of FreeType was not compiled with bzip2 support.</p> <hr> </article> </div> </div> </main> <footer class="md-footer"> <nav class="md-footer__inner md-grid" aria-label="Footer"> <a href="ft2-lzw.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: LZW Streams" rel="prev"> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Previous </span> LZW Streams </div> </div> </a> <a href="ft2-debugging_apis.html" class="md-footer__link md-footer__link--next" aria-label="Next: External Debugging APIs" rel="next"> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Next </span> External Debugging APIs </div> </div> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg> </div> </a> </nav> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-footer-copyright"> <div class="md-footer-copyright__highlight"> Copyright 2022 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>. </div> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"base": ".", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "assets/javascripts/workers/search.477d984a.min.js", "version": null}</script> <script src="assets/javascripts/bundle.82b56eb2.min.js"></script> <script src="javascripts/extra.js"></script> </body> </html>
whupdup/frame
real/third_party/freetype-2.12.0/docs/reference/ft2-bzip2.html
HTML
gpl-3.0
29,136
<!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="description" content="API Reference Documentation for FreeType-2.12.0"> <meta name="author" content="FreeType Contributors"> <link rel="icon" href="images/favico.ico"> <meta name="generator" content="mkdocs-1.2.1, mkdocs-material-7.1.9"> <title>Cache Sub-System - FreeType-2.12.0 API Reference</title> <link rel="stylesheet" href="assets/stylesheets/main.ca7ac06f.min.css"> <link rel="stylesheet" href="assets/stylesheets/palette.f1a3b89f.min.css"> <meta name="theme-color" content="#4cae4f"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback"> <style>:root{--md-text-font-family:"Noto Serif";--md-code-font-family:"Roboto Mono"}</style> <link rel="stylesheet" href="stylesheets/extra.css"> </head> <body dir="ltr" data-md-color-scheme="" data-md-color-primary="green" data-md-color-accent="green"> <script>function __prefix(e){return new URL(".",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <label class="md-overlay" for="__drawer"></label> <div data-md-component="skip"> <a href="#cache-sub-system" class="md-skip"> Skip to content </a> </div> <div data-md-component="announce"> </div> <header class="md-header" data-md-component="header"> <nav class="md-header__inner md-grid" aria-label="Header"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> <label class="md-header__button md-icon" for="__drawer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg> </label> <div class="md-header__title" data-md-component="header-title"> <div class="md-header__ellipsis"> <div class="md-header__topic"> <span class="md-ellipsis"> FreeType-2.12.0 API Reference </span> </div> <div class="md-header__topic" data-md-component="header-topic"> <span class="md-ellipsis"> Cache Sub-System </span> </div> </div> </div> <label class="md-header__button md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> </label> <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required> <label class="md-search__icon md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </label> <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg> </button> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" data-md-scrollfix> <div class="md-search-result" data-md-component="search-result"> <div class="md-search-result__meta"> Initializing search </div> <ol class="md-search-result__list"></ol> </div> </div> </div> </div> </div> </nav> </header> <div class="md-container" data-md-component="container"> <main class="md-main" data-md-component="main"> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <label class="md-nav__title" for="__drawer"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> FreeType-2.12.0 API Reference </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="index.html" class="md-nav__link"> TOC </a> </li> <li class="md-nav__item"> <a href="ft2-index.html" class="md-nav__link"> Index </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" > <label class="md-nav__link" for="__nav_3"> General Remarks <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="General Remarks" data-md-level="1"> <label class="md-nav__title" for="__nav_3"> <span class="md-nav__icon md-icon"></span> General Remarks </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-preamble.html" class="md-nav__link"> Preamble </a> </li> <li class="md-nav__item"> <a href="ft2-header_inclusion.html" class="md-nav__link"> FreeType's header inclusion scheme </a> </li> <li class="md-nav__item"> <a href="ft2-user_allocation.html" class="md-nav__link"> User allocation </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" > <label class="md-nav__link" for="__nav_4"> Core API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Core API" data-md-level="1"> <label class="md-nav__title" for="__nav_4"> <span class="md-nav__icon md-icon"></span> Core API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-version.html" class="md-nav__link"> FreeType Version </a> </li> <li class="md-nav__item"> <a href="ft2-basic_types.html" class="md-nav__link"> Basic Data Types </a> </li> <li class="md-nav__item"> <a href="ft2-base_interface.html" class="md-nav__link"> Base Interface </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_variants.html" class="md-nav__link"> Unicode Variation Sequences </a> </li> <li class="md-nav__item"> <a href="ft2-color_management.html" class="md-nav__link"> Glyph Color Management </a> </li> <li class="md-nav__item"> <a href="ft2-layer_management.html" class="md-nav__link"> Glyph Layer Management </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_management.html" class="md-nav__link"> Glyph Management </a> </li> <li class="md-nav__item"> <a href="ft2-mac_specific.html" class="md-nav__link"> Mac Specific Interface </a> </li> <li class="md-nav__item"> <a href="ft2-sizes_management.html" class="md-nav__link"> Size Management </a> </li> <li class="md-nav__item"> <a href="ft2-header_file_macros.html" class="md-nav__link"> Header File Macros </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" > <label class="md-nav__link" for="__nav_5"> Format-Specific API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Format-Specific API" data-md-level="1"> <label class="md-nav__title" for="__nav_5"> <span class="md-nav__icon md-icon"></span> Format-Specific API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-multiple_masters.html" class="md-nav__link"> Multiple Masters </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_tables.html" class="md-nav__link"> TrueType Tables </a> </li> <li class="md-nav__item"> <a href="ft2-type1_tables.html" class="md-nav__link"> Type 1 Tables </a> </li> <li class="md-nav__item"> <a href="ft2-sfnt_names.html" class="md-nav__link"> SFNT Names </a> </li> <li class="md-nav__item"> <a href="ft2-bdf_fonts.html" class="md-nav__link"> BDF and PCF Files </a> </li> <li class="md-nav__item"> <a href="ft2-cid_fonts.html" class="md-nav__link"> CID Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-pfr_fonts.html" class="md-nav__link"> PFR Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-winfnt_fonts.html" class="md-nav__link"> Window FNT Files </a> </li> <li class="md-nav__item"> <a href="ft2-svg_fonts.html" class="md-nav__link"> OpenType SVG Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-font_formats.html" class="md-nav__link"> Font Formats </a> </li> <li class="md-nav__item"> <a href="ft2-gasp_table.html" class="md-nav__link"> Gasp Table </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" > <label class="md-nav__link" for="__nav_6"> Controlling FreeType Modules <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Controlling FreeType Modules" data-md-level="1"> <label class="md-nav__title" for="__nav_6"> <span class="md-nav__icon md-icon"></span> Controlling FreeType Modules </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-auto_hinter.html" class="md-nav__link"> The auto-hinter </a> </li> <li class="md-nav__item"> <a href="ft2-cff_driver.html" class="md-nav__link"> The CFF driver </a> </li> <li class="md-nav__item"> <a href="ft2-t1_cid_driver.html" class="md-nav__link"> The Type 1 and CID drivers </a> </li> <li class="md-nav__item"> <a href="ft2-tt_driver.html" class="md-nav__link"> The TrueType driver </a> </li> <li class="md-nav__item"> <a href="ft2-pcf_driver.html" class="md-nav__link"> The PCF driver </a> </li> <li class="md-nav__item"> <a href="ft2-ot_svg_driver.html" class="md-nav__link"> The SVG driver </a> </li> <li class="md-nav__item"> <a href="ft2-properties.html" class="md-nav__link"> Driver properties </a> </li> <li class="md-nav__item"> <a href="ft2-parameter_tags.html" class="md-nav__link"> Parameter Tags </a> </li> <li class="md-nav__item"> <a href="ft2-lcd_rendering.html" class="md-nav__link"> Subpixel Rendering </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--active md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" checked> <label class="md-nav__link" for="__nav_7"> Cache Sub-System <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1"> <label class="md-nav__title" for="__nav_7"> <span class="md-nav__icon md-icon"></span> Cache Sub-System </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item md-nav__item--active"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <label class="md-nav__link md-nav__link--active" for="__toc"> Cache Sub-System <span class="md-nav__icon md-icon"></span> </label> <a href="ft2-cache_subsystem.html" class="md-nav__link md-nav__link--active"> Cache Sub-System </a> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ftc_manager" class="md-nav__link"> FTC_Manager </a> </li> <li class="md-nav__item"> <a href="#ftc_faceid" class="md-nav__link"> FTC_FaceID </a> </li> <li class="md-nav__item"> <a href="#ftc_face_requester" class="md-nav__link"> FTC_Face_Requester </a> </li> <li class="md-nav__item"> <a href="#ftc_manager_new" class="md-nav__link"> FTC_Manager_New </a> </li> <li class="md-nav__item"> <a href="#ftc_manager_reset" class="md-nav__link"> FTC_Manager_Reset </a> </li> <li class="md-nav__item"> <a href="#ftc_manager_done" class="md-nav__link"> FTC_Manager_Done </a> </li> <li class="md-nav__item"> <a href="#ftc_manager_lookupface" class="md-nav__link"> FTC_Manager_LookupFace </a> </li> <li class="md-nav__item"> <a href="#ftc_manager_lookupsize" class="md-nav__link"> FTC_Manager_LookupSize </a> </li> <li class="md-nav__item"> <a href="#ftc_manager_removefaceid" class="md-nav__link"> FTC_Manager_RemoveFaceID </a> </li> <li class="md-nav__item"> <a href="#ftc_node" class="md-nav__link"> FTC_Node </a> </li> <li class="md-nav__item"> <a href="#ftc_node_unref" class="md-nav__link"> FTC_Node_Unref </a> </li> <li class="md-nav__item"> <a href="#ftc_imagecache" class="md-nav__link"> FTC_ImageCache </a> </li> <li class="md-nav__item"> <a href="#ftc_imagecache_new" class="md-nav__link"> FTC_ImageCache_New </a> </li> <li class="md-nav__item"> <a href="#ftc_imagecache_lookup" class="md-nav__link"> FTC_ImageCache_Lookup </a> </li> <li class="md-nav__item"> <a href="#ftc_sbit" class="md-nav__link"> FTC_SBit </a> </li> <li class="md-nav__item"> <a href="#ftc_sbitcache" class="md-nav__link"> FTC_SBitCache </a> </li> <li class="md-nav__item"> <a href="#ftc_sbitcache_new" class="md-nav__link"> FTC_SBitCache_New </a> </li> <li class="md-nav__item"> <a href="#ftc_sbitcache_lookup" class="md-nav__link"> FTC_SBitCache_Lookup </a> </li> <li class="md-nav__item"> <a href="#ftc_cmapcache" class="md-nav__link"> FTC_CMapCache </a> </li> <li class="md-nav__item"> <a href="#ftc_cmapcache_new" class="md-nav__link"> FTC_CMapCache_New </a> </li> <li class="md-nav__item"> <a href="#ftc_cmapcache_lookup" class="md-nav__link"> FTC_CMapCache_Lookup </a> </li> <li class="md-nav__item"> <a href="#ftc_scalerrec" class="md-nav__link"> FTC_ScalerRec </a> </li> <li class="md-nav__item"> <a href="#ftc_scaler" class="md-nav__link"> FTC_Scaler </a> </li> <li class="md-nav__item"> <a href="#ftc_imagetyperec" class="md-nav__link"> FTC_ImageTypeRec </a> </li> <li class="md-nav__item"> <a href="#ftc_imagetype" class="md-nav__link"> FTC_ImageType </a> </li> <li class="md-nav__item"> <a href="#ftc_imagecache_lookupscaler" class="md-nav__link"> FTC_ImageCache_LookupScaler </a> </li> <li class="md-nav__item"> <a href="#ftc_sbitrec" class="md-nav__link"> FTC_SBitRec </a> </li> <li class="md-nav__item"> <a href="#ftc_sbitcache_lookupscaler" class="md-nav__link"> FTC_SBitCache_LookupScaler </a> </li> </ul> </nav> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" > <label class="md-nav__link" for="__nav_8"> Support API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Support API" data-md-level="1"> <label class="md-nav__title" for="__nav_8"> <span class="md-nav__icon md-icon"></span> Support API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-computations.html" class="md-nav__link"> Computations </a> </li> <li class="md-nav__item"> <a href="ft2-list_processing.html" class="md-nav__link"> List Processing </a> </li> <li class="md-nav__item"> <a href="ft2-outline_processing.html" class="md-nav__link"> Outline Processing </a> </li> <li class="md-nav__item"> <a href="ft2-quick_advance.html" class="md-nav__link"> Quick retrieval of advance values </a> </li> <li class="md-nav__item"> <a href="ft2-bitmap_handling.html" class="md-nav__link"> Bitmap Handling </a> </li> <li class="md-nav__item"> <a href="ft2-raster.html" class="md-nav__link"> Scanline Converter </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_stroker.html" class="md-nav__link"> Glyph Stroker </a> </li> <li class="md-nav__item"> <a href="ft2-system_interface.html" class="md-nav__link"> System Interface </a> </li> <li class="md-nav__item"> <a href="ft2-module_management.html" class="md-nav__link"> Module Management </a> </li> <li class="md-nav__item"> <a href="ft2-gzip.html" class="md-nav__link"> GZIP Streams </a> </li> <li class="md-nav__item"> <a href="ft2-lzw.html" class="md-nav__link"> LZW Streams </a> </li> <li class="md-nav__item"> <a href="ft2-bzip2.html" class="md-nav__link"> BZIP2 Streams </a> </li> <li class="md-nav__item"> <a href="ft2-debugging_apis.html" class="md-nav__link"> External Debugging APIs </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" > <label class="md-nav__link" for="__nav_9"> Error Codes <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Error Codes" data-md-level="1"> <label class="md-nav__title" for="__nav_9"> <span class="md-nav__icon md-icon"></span> Error Codes </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-error_enumerations.html" class="md-nav__link"> Error Enumerations </a> </li> <li class="md-nav__item"> <a href="ft2-error_code_values.html" class="md-nav__link"> Error Code Values </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" > <label class="md-nav__link" for="__nav_10"> Miscellaneous <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1"> <label class="md-nav__title" for="__nav_10"> <span class="md-nav__icon md-icon"></span> Miscellaneous </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-gx_validation.html" class="md-nav__link"> TrueTypeGX/AAT Validation </a> </li> <li class="md-nav__item"> <a href="ft2-incremental.html" class="md-nav__link"> Incremental Loading </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_engine.html" class="md-nav__link"> The TrueType Engine </a> </li> <li class="md-nav__item"> <a href="ft2-ot_validation.html" class="md-nav__link"> OpenType Validation </a> </li> </ul> </nav> </li> </ul> </nav> </div> </div> </div> <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ftc_manager" class="md-nav__link"> FTC_Manager </a> </li> <li class="md-nav__item"> <a href="#ftc_faceid" class="md-nav__link"> FTC_FaceID </a> </li> <li class="md-nav__item"> <a href="#ftc_face_requester" class="md-nav__link"> FTC_Face_Requester </a> </li> <li class="md-nav__item"> <a href="#ftc_manager_new" class="md-nav__link"> FTC_Manager_New </a> </li> <li class="md-nav__item"> <a href="#ftc_manager_reset" class="md-nav__link"> FTC_Manager_Reset </a> </li> <li class="md-nav__item"> <a href="#ftc_manager_done" class="md-nav__link"> FTC_Manager_Done </a> </li> <li class="md-nav__item"> <a href="#ftc_manager_lookupface" class="md-nav__link"> FTC_Manager_LookupFace </a> </li> <li class="md-nav__item"> <a href="#ftc_manager_lookupsize" class="md-nav__link"> FTC_Manager_LookupSize </a> </li> <li class="md-nav__item"> <a href="#ftc_manager_removefaceid" class="md-nav__link"> FTC_Manager_RemoveFaceID </a> </li> <li class="md-nav__item"> <a href="#ftc_node" class="md-nav__link"> FTC_Node </a> </li> <li class="md-nav__item"> <a href="#ftc_node_unref" class="md-nav__link"> FTC_Node_Unref </a> </li> <li class="md-nav__item"> <a href="#ftc_imagecache" class="md-nav__link"> FTC_ImageCache </a> </li> <li class="md-nav__item"> <a href="#ftc_imagecache_new" class="md-nav__link"> FTC_ImageCache_New </a> </li> <li class="md-nav__item"> <a href="#ftc_imagecache_lookup" class="md-nav__link"> FTC_ImageCache_Lookup </a> </li> <li class="md-nav__item"> <a href="#ftc_sbit" class="md-nav__link"> FTC_SBit </a> </li> <li class="md-nav__item"> <a href="#ftc_sbitcache" class="md-nav__link"> FTC_SBitCache </a> </li> <li class="md-nav__item"> <a href="#ftc_sbitcache_new" class="md-nav__link"> FTC_SBitCache_New </a> </li> <li class="md-nav__item"> <a href="#ftc_sbitcache_lookup" class="md-nav__link"> FTC_SBitCache_Lookup </a> </li> <li class="md-nav__item"> <a href="#ftc_cmapcache" class="md-nav__link"> FTC_CMapCache </a> </li> <li class="md-nav__item"> <a href="#ftc_cmapcache_new" class="md-nav__link"> FTC_CMapCache_New </a> </li> <li class="md-nav__item"> <a href="#ftc_cmapcache_lookup" class="md-nav__link"> FTC_CMapCache_Lookup </a> </li> <li class="md-nav__item"> <a href="#ftc_scalerrec" class="md-nav__link"> FTC_ScalerRec </a> </li> <li class="md-nav__item"> <a href="#ftc_scaler" class="md-nav__link"> FTC_Scaler </a> </li> <li class="md-nav__item"> <a href="#ftc_imagetyperec" class="md-nav__link"> FTC_ImageTypeRec </a> </li> <li class="md-nav__item"> <a href="#ftc_imagetype" class="md-nav__link"> FTC_ImageType </a> </li> <li class="md-nav__item"> <a href="#ftc_imagecache_lookupscaler" class="md-nav__link"> FTC_ImageCache_LookupScaler </a> </li> <li class="md-nav__item"> <a href="#ftc_sbitrec" class="md-nav__link"> FTC_SBitRec </a> </li> <li class="md-nav__item"> <a href="#ftc_sbitcache_lookupscaler" class="md-nav__link"> FTC_SBitCache_LookupScaler </a> </li> </ul> </nav> </div> </div> </div> <div class="md-content" data-md-component="content"> <article class="md-content__inner md-typeset"> <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; <a href="index.html#cache-sub-system">Cache Sub-System</a> &raquo; Cache Sub-System</p> <hr /> <h1 id="cache-sub-system">Cache Sub-System<a class="headerlink" href="#cache-sub-system" title="Permanent link">&para;</a></h1> <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2> <p>This section describes the FreeType&nbsp;2 cache sub-system, which is used to limit the number of concurrently opened <code><a href="ft2-base_interface.html#ft_face">FT_Face</a></code> and <code><a href="ft2-base_interface.html#ft_size">FT_Size</a></code> objects, as well as caching information like character maps and glyph images while limiting their maximum memory usage.</p> <p>Note that all types and functions begin with the <code>FTC_</code> prefix.</p> <p>The cache is highly portable and thus doesn't know anything about the fonts installed on your system, or how to access them. This implies the following scheme:</p> <p>First, available or installed font faces are uniquely identified by <code><a href="ft2-cache_subsystem.html#ftc_faceid">FTC_FaceID</a></code> values, provided to the cache by the client. Note that the cache only stores and compares these values, and doesn't try to interpret them in any way.</p> <p>Second, the cache calls, only when needed, a client-provided function to convert an <code><a href="ft2-cache_subsystem.html#ftc_faceid">FTC_FaceID</a></code> into a new <code><a href="ft2-base_interface.html#ft_face">FT_Face</a></code> object. The latter is then completely managed by the cache, including its termination through <code><a href="ft2-base_interface.html#ft_done_face">FT_Done_Face</a></code>. To monitor termination of face objects, the finalizer callback in the <code>generic</code> field of the <code><a href="ft2-base_interface.html#ft_face">FT_Face</a></code> object can be used, which might also be used to store the <code><a href="ft2-cache_subsystem.html#ftc_faceid">FTC_FaceID</a></code> of the face.</p> <p>Clients are free to map face IDs to anything else. The most simple usage is to associate them to a (pathname,face_index) pair that is used to call <code><a href="ft2-base_interface.html#ft_new_face">FT_New_Face</a></code>. However, more complex schemes are also possible.</p> <p>Note that for the cache to work correctly, the face ID values must be <strong>persistent</strong>, which means that the contents they point to should not change at runtime, or that their value should not become invalid.</p> <p>If this is unavoidable (e.g., when a font is uninstalled at runtime), you should call <code><a href="ft2-cache_subsystem.html#ftc_manager_removefaceid">FTC_Manager_RemoveFaceID</a></code> as soon as possible, to let the cache get rid of any references to the old <code><a href="ft2-cache_subsystem.html#ftc_faceid">FTC_FaceID</a></code> it may keep internally. Failure to do so will lead to incorrect behaviour or even crashes.</p> <p>To use the cache, start with calling <code><a href="ft2-cache_subsystem.html#ftc_manager_new">FTC_Manager_New</a></code> to create a new <code><a href="ft2-cache_subsystem.html#ftc_manager">FTC_Manager</a></code> object, which models a single cache instance. You can then look up <code><a href="ft2-base_interface.html#ft_face">FT_Face</a></code> and <code><a href="ft2-base_interface.html#ft_size">FT_Size</a></code> objects with <code><a href="ft2-cache_subsystem.html#ftc_manager_lookupface">FTC_Manager_LookupFace</a></code> and <code><a href="ft2-cache_subsystem.html#ftc_manager_lookupsize">FTC_Manager_LookupSize</a></code>, respectively.</p> <p>If you want to use the charmap caching, call <code><a href="ft2-cache_subsystem.html#ftc_cmapcache_new">FTC_CMapCache_New</a></code>, then later use <code><a href="ft2-cache_subsystem.html#ftc_cmapcache_lookup">FTC_CMapCache_Lookup</a></code> to perform the equivalent of <code><a href="ft2-base_interface.html#ft_get_char_index">FT_Get_Char_Index</a></code>, only much faster.</p> <p>If you want to use the <code><a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a></code> caching, call <code><a href="ft2-cache_subsystem.html#ftc_imagecache_new">FTC_ImageCache_New</a></code>, then later use <code><a href="ft2-cache_subsystem.html#ftc_imagecache_lookup">FTC_ImageCache_Lookup</a></code> to retrieve the corresponding <code><a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a></code> objects from the cache.</p> <p>If you need lots of small bitmaps, it is much more memory efficient to call <code><a href="ft2-cache_subsystem.html#ftc_sbitcache_new">FTC_SBitCache_New</a></code> followed by <code><a href="ft2-cache_subsystem.html#ftc_sbitcache_lookup">FTC_SBitCache_Lookup</a></code>. This returns <code><a href="ft2-cache_subsystem.html#ftc_sbitrec">FTC_SBitRec</a></code> structures, which are used to store small bitmaps directly. (A small bitmap is one whose metrics and dimensions all fit into 8-bit integers).</p> <p>We hope to also provide a kerning cache in the near future.</p> <h2 id="ftc_manager">FTC_Manager<a class="headerlink" href="#ftc_manager" title="Permanent link">&para;</a></h2> <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_ManagerRec_* <b>FTC_Manager</b>; </code></pre></div> <p>This object corresponds to one instance of the cache-subsystem. It is used to cache one or more <code><a href="ft2-base_interface.html#ft_face">FT_Face</a></code> objects, along with corresponding <code><a href="ft2-base_interface.html#ft_size">FT_Size</a></code> objects.</p> <p>The manager intentionally limits the total number of opened <code><a href="ft2-base_interface.html#ft_face">FT_Face</a></code> and <code><a href="ft2-base_interface.html#ft_size">FT_Size</a></code> objects to control memory usage. See the <code>max_faces</code> and <code>max_sizes</code> parameters of <code><a href="ft2-cache_subsystem.html#ftc_manager_new">FTC_Manager_New</a></code>.</p> <p>The manager is also used to cache &lsquo;nodes&rsquo; of various types while limiting their total memory usage.</p> <p>All limitations are enforced by keeping lists of managed objects in most-recently-used order, and flushing old nodes to make room for new ones.</p> <hr> <h2 id="ftc_faceid">FTC_FaceID<a class="headerlink" href="#ftc_faceid" title="Permanent link">&para;</a></h2> <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <a href="ft2-basic_types.html#ft_pointer">FT_Pointer</a> <b>FTC_FaceID</b>; </code></pre></div> <p>An opaque pointer type that is used to identity face objects. The contents of such objects is application-dependent.</p> <p>These pointers are typically used to point to a user-defined structure containing a font file path, and face index.</p> <h4>note</h4> <p>Never use <code>NULL</code> as a valid <code><a href="ft2-cache_subsystem.html#ftc_faceid">FTC_FaceID</a></code>.</p> <p>Face IDs are passed by the client to the cache manager that calls, when needed, the <code><a href="ft2-cache_subsystem.html#ftc_face_requester">FTC_Face_Requester</a></code> to translate them into new <code><a href="ft2-base_interface.html#ft_face">FT_Face</a></code> objects.</p> <p>If the content of a given face ID changes at runtime, or if the value becomes invalid (e.g., when uninstalling a font), you should immediately call <code><a href="ft2-cache_subsystem.html#ftc_manager_removefaceid">FTC_Manager_RemoveFaceID</a></code> before any other cache function.</p> <p>Failure to do so will result in incorrect behaviour or even memory leaks and crashes.</p> <hr> <h2 id="ftc_face_requester">FTC_Face_Requester<a class="headerlink" href="#ftc_face_requester" title="Permanent link">&para;</a></h2> <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <a href="ft2-basic_types.html#ft_error">FT_Error</a> (*<b>FTC_Face_Requester</b>)( <a href="ft2-cache_subsystem.html#ftc_faceid">FTC_FaceID</a> face_id, <a href="ft2-base_interface.html#ft_library">FT_Library</a> library, <a href="ft2-basic_types.html#ft_pointer">FT_Pointer</a> req_data, <a href="ft2-base_interface.html#ft_face">FT_Face</a>* aface ); </code></pre></div> <p>A callback function provided by client applications. It is used by the cache manager to translate a given <code><a href="ft2-cache_subsystem.html#ftc_faceid">FTC_FaceID</a></code> into a new valid <code><a href="ft2-base_interface.html#ft_face">FT_Face</a></code> object, on demand.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="face_id">face_id</td><td class="desc"> <p>The face ID to resolve.</p> </td></tr> <tr><td class="val" id="library">library</td><td class="desc"> <p>A handle to a FreeType library object.</p> </td></tr> <tr><td class="val" id="req_data">req_data</td><td class="desc"> <p>Application-provided request data (see note below).</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="aface">aface</td><td class="desc"> <p>A new <code><a href="ft2-base_interface.html#ft_face">FT_Face</a></code> handle.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>The third parameter <code>req_data</code> is the same as the one passed by the client when <code><a href="ft2-cache_subsystem.html#ftc_manager_new">FTC_Manager_New</a></code> is called.</p> <p>The face requester should not perform funny things on the returned face object, like creating a new <code><a href="ft2-base_interface.html#ft_size">FT_Size</a></code> for it, or setting a transformation through <code><a href="ft2-base_interface.html#ft_set_transform">FT_Set_Transform</a></code>!</p> <hr> <h2 id="ftc_manager_new">FTC_Manager_New<a class="headerlink" href="#ftc_manager_new" title="Permanent link">&para;</a></h2> <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FTC_Manager_New</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library, <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> max_faces, <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> max_sizes, <a href="ft2-basic_types.html#ft_ulong">FT_ULong</a> max_bytes, <a href="ft2-cache_subsystem.html#ftc_face_requester">FTC_Face_Requester</a> requester, <a href="ft2-basic_types.html#ft_pointer">FT_Pointer</a> req_data, <a href="ft2-cache_subsystem.html#ftc_manager">FTC_Manager</a> *amanager ); </code></pre></div> <p>Create a new cache manager.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="library">library</td><td class="desc"> <p>The parent FreeType library handle to use.</p> </td></tr> <tr><td class="val" id="max_faces">max_faces</td><td class="desc"> <p>Maximum number of opened <code><a href="ft2-base_interface.html#ft_face">FT_Face</a></code> objects managed by this cache instance. Use&nbsp;0 for defaults.</p> </td></tr> <tr><td class="val" id="max_sizes">max_sizes</td><td class="desc"> <p>Maximum number of opened <code><a href="ft2-base_interface.html#ft_size">FT_Size</a></code> objects managed by this cache instance. Use&nbsp;0 for defaults.</p> </td></tr> <tr><td class="val" id="max_bytes">max_bytes</td><td class="desc"> <p>Maximum number of bytes to use for cached data nodes. Use&nbsp;0 for defaults. Note that this value does not account for managed <code><a href="ft2-base_interface.html#ft_face">FT_Face</a></code> and <code><a href="ft2-base_interface.html#ft_size">FT_Size</a></code> objects.</p> </td></tr> <tr><td class="val" id="requester">requester</td><td class="desc"> <p>An application-provided callback used to translate face IDs into real <code><a href="ft2-base_interface.html#ft_face">FT_Face</a></code> objects.</p> </td></tr> <tr><td class="val" id="req_data">req_data</td><td class="desc"> <p>A generic pointer that is passed to the requester each time it is called (see <code><a href="ft2-cache_subsystem.html#ftc_face_requester">FTC_Face_Requester</a></code>).</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="amanager">amanager</td><td class="desc"> <p>A handle to a new manager object. 0&nbsp;in case of failure.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <hr> <h2 id="ftc_manager_reset">FTC_Manager_Reset<a class="headerlink" href="#ftc_manager_reset" title="Permanent link">&para;</a></h2> <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> ) <b>FTC_Manager_Reset</b>( <a href="ft2-cache_subsystem.html#ftc_manager">FTC_Manager</a> manager ); </code></pre></div> <p>Empty a given cache manager. This simply gets rid of all the currently cached <code><a href="ft2-base_interface.html#ft_face">FT_Face</a></code> and <code><a href="ft2-base_interface.html#ft_size">FT_Size</a></code> objects within the manager.</p> <h4>inout</h4> <table class="fields"> <tr><td class="val" id="manager">manager</td><td class="desc"> <p>A handle to the manager.</p> </td></tr> </table> <hr> <h2 id="ftc_manager_done">FTC_Manager_Done<a class="headerlink" href="#ftc_manager_done" title="Permanent link">&para;</a></h2> <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> ) <b>FTC_Manager_Done</b>( <a href="ft2-cache_subsystem.html#ftc_manager">FTC_Manager</a> manager ); </code></pre></div> <p>Destroy a given manager after emptying it.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="manager">manager</td><td class="desc"> <p>A handle to the target cache manager object.</p> </td></tr> </table> <hr> <h2 id="ftc_manager_lookupface">FTC_Manager_LookupFace<a class="headerlink" href="#ftc_manager_lookupface" title="Permanent link">&para;</a></h2> <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FTC_Manager_LookupFace</b>( <a href="ft2-cache_subsystem.html#ftc_manager">FTC_Manager</a> manager, <a href="ft2-cache_subsystem.html#ftc_faceid">FTC_FaceID</a> face_id, <a href="ft2-base_interface.html#ft_face">FT_Face</a> *aface ); </code></pre></div> <p>Retrieve the <code><a href="ft2-base_interface.html#ft_face">FT_Face</a></code> object that corresponds to a given face ID through a cache manager.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="manager">manager</td><td class="desc"> <p>A handle to the cache manager.</p> </td></tr> <tr><td class="val" id="face_id">face_id</td><td class="desc"> <p>The ID of the face object.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="aface">aface</td><td class="desc"> <p>A handle to the face object.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>The returned <code><a href="ft2-base_interface.html#ft_face">FT_Face</a></code> object is always owned by the manager. You should never try to discard it yourself.</p> <p>The <code><a href="ft2-base_interface.html#ft_face">FT_Face</a></code> object doesn't necessarily have a current size object (i.e., face-&gt;size can be&nbsp;0). If you need a specific &lsquo;font size&rsquo;, use <code><a href="ft2-cache_subsystem.html#ftc_manager_lookupsize">FTC_Manager_LookupSize</a></code> instead.</p> <p>Never change the face's transformation matrix (i.e., never call the <code><a href="ft2-base_interface.html#ft_set_transform">FT_Set_Transform</a></code> function) on a returned face! If you need to transform glyphs, do it yourself after glyph loading.</p> <p>When you perform a lookup, out-of-memory errors are detected <em>within</em> the lookup and force incremental flushes of the cache until enough memory is released for the lookup to succeed.</p> <p>If a lookup fails with <code>FT_Err_Out_Of_Memory</code> the cache has already been completely flushed, and still no memory was available for the operation.</p> <hr> <h2 id="ftc_manager_lookupsize">FTC_Manager_LookupSize<a class="headerlink" href="#ftc_manager_lookupsize" title="Permanent link">&para;</a></h2> <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FTC_Manager_LookupSize</b>( <a href="ft2-cache_subsystem.html#ftc_manager">FTC_Manager</a> manager, <a href="ft2-cache_subsystem.html#ftc_scaler">FTC_Scaler</a> scaler, <a href="ft2-base_interface.html#ft_size">FT_Size</a> *asize ); </code></pre></div> <p>Retrieve the <code><a href="ft2-base_interface.html#ft_size">FT_Size</a></code> object that corresponds to a given <code><a href="ft2-cache_subsystem.html#ftc_scalerrec">FTC_ScalerRec</a></code> pointer through a cache manager.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="manager">manager</td><td class="desc"> <p>A handle to the cache manager.</p> </td></tr> <tr><td class="val" id="scaler">scaler</td><td class="desc"> <p>A scaler handle.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="asize">asize</td><td class="desc"> <p>A handle to the size object.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>The returned <code><a href="ft2-base_interface.html#ft_size">FT_Size</a></code> object is always owned by the manager. You should never try to discard it by yourself.</p> <p>You can access the parent <code><a href="ft2-base_interface.html#ft_face">FT_Face</a></code> object simply as <code>size-&gt;face</code> if you need it. Note that this object is also owned by the manager.</p> <h4>note</h4> <p>When you perform a lookup, out-of-memory errors are detected <em>within</em> the lookup and force incremental flushes of the cache until enough memory is released for the lookup to succeed.</p> <p>If a lookup fails with <code>FT_Err_Out_Of_Memory</code> the cache has already been completely flushed, and still no memory is available for the operation.</p> <hr> <h2 id="ftc_manager_removefaceid">FTC_Manager_RemoveFaceID<a class="headerlink" href="#ftc_manager_removefaceid" title="Permanent link">&para;</a></h2> <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> ) <b>FTC_Manager_RemoveFaceID</b>( <a href="ft2-cache_subsystem.html#ftc_manager">FTC_Manager</a> manager, <a href="ft2-cache_subsystem.html#ftc_faceid">FTC_FaceID</a> face_id ); </code></pre></div> <p>A special function used to indicate to the cache manager that a given <code><a href="ft2-cache_subsystem.html#ftc_faceid">FTC_FaceID</a></code> is no longer valid, either because its content changed, or because it was deallocated or uninstalled.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="manager">manager</td><td class="desc"> <p>The cache manager handle.</p> </td></tr> <tr><td class="val" id="face_id">face_id</td><td class="desc"> <p>The <code><a href="ft2-cache_subsystem.html#ftc_faceid">FTC_FaceID</a></code> to be removed.</p> </td></tr> </table> <h4>note</h4> <p>This function flushes all nodes from the cache corresponding to this <code>face_id</code>, with the exception of nodes with a non-null reference count.</p> <p>Such nodes are however modified internally so as to never appear in later lookups with the same <code>face_id</code> value, and to be immediately destroyed when released by all their users.</p> <hr> <h2 id="ftc_node">FTC_Node<a class="headerlink" href="#ftc_node" title="Permanent link">&para;</a></h2> <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_NodeRec_* <b>FTC_Node</b>; </code></pre></div> <p>An opaque handle to a cache node object. Each cache node is reference-counted. A node with a count of&nbsp;0 might be flushed out of a full cache whenever a lookup request is performed.</p> <p>If you look up nodes, you have the ability to &lsquo;acquire&rsquo; them, i.e., to increment their reference count. This will prevent the node from being flushed out of the cache until you explicitly &lsquo;release&rsquo; it (see <code><a href="ft2-cache_subsystem.html#ftc_node_unref">FTC_Node_Unref</a></code>).</p> <p>See also <code><a href="ft2-cache_subsystem.html#ftc_sbitcache_lookup">FTC_SBitCache_Lookup</a></code> and <code><a href="ft2-cache_subsystem.html#ftc_imagecache_lookup">FTC_ImageCache_Lookup</a></code>.</p> <hr> <h2 id="ftc_node_unref">FTC_Node_Unref<a class="headerlink" href="#ftc_node_unref" title="Permanent link">&para;</a></h2> <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> ) <b>FTC_Node_Unref</b>( <a href="ft2-cache_subsystem.html#ftc_node">FTC_Node</a> node, <a href="ft2-cache_subsystem.html#ftc_manager">FTC_Manager</a> manager ); </code></pre></div> <p>Decrement a cache node's internal reference count. When the count reaches 0, it is not destroyed but becomes eligible for subsequent cache flushes.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="node">node</td><td class="desc"> <p>The cache node handle.</p> </td></tr> <tr><td class="val" id="manager">manager</td><td class="desc"> <p>The cache manager handle.</p> </td></tr> </table> <hr> <h2 id="ftc_imagecache">FTC_ImageCache<a class="headerlink" href="#ftc_imagecache" title="Permanent link">&para;</a></h2> <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_ImageCacheRec_* <b>FTC_ImageCache</b>; </code></pre></div> <p>A handle to a glyph image cache object. They are designed to hold many distinct glyph images while not exceeding a certain memory threshold.</p> <hr> <h2 id="ftc_imagecache_new">FTC_ImageCache_New<a class="headerlink" href="#ftc_imagecache_new" title="Permanent link">&para;</a></h2> <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FTC_ImageCache_New</b>( <a href="ft2-cache_subsystem.html#ftc_manager">FTC_Manager</a> manager, <a href="ft2-cache_subsystem.html#ftc_imagecache">FTC_ImageCache</a> *acache ); </code></pre></div> <p>Create a new glyph image cache.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="manager">manager</td><td class="desc"> <p>The parent manager for the image cache.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="acache">acache</td><td class="desc"> <p>A handle to the new glyph image cache object.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <hr> <h2 id="ftc_imagecache_lookup">FTC_ImageCache_Lookup<a class="headerlink" href="#ftc_imagecache_lookup" title="Permanent link">&para;</a></h2> <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FTC_ImageCache_Lookup</b>( <a href="ft2-cache_subsystem.html#ftc_imagecache">FTC_ImageCache</a> cache, <a href="ft2-cache_subsystem.html#ftc_imagetype">FTC_ImageType</a> type, <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> gindex, <a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a> *aglyph, <a href="ft2-cache_subsystem.html#ftc_node">FTC_Node</a> *anode ); </code></pre></div> <p>Retrieve a given glyph image from a glyph image cache.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="cache">cache</td><td class="desc"> <p>A handle to the source glyph image cache.</p> </td></tr> <tr><td class="val" id="type">type</td><td class="desc"> <p>A pointer to a glyph image type descriptor.</p> </td></tr> <tr><td class="val" id="gindex">gindex</td><td class="desc"> <p>The glyph index to retrieve.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="aglyph">aglyph</td><td class="desc"> <p>The corresponding <code><a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a></code> object. 0&nbsp;in case of failure.</p> </td></tr> <tr><td class="val" id="anode">anode</td><td class="desc"> <p>Used to return the address of the corresponding cache node after incrementing its reference count (see note below).</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>The returned glyph is owned and managed by the glyph image cache. Never try to transform or discard it manually! You can however create a copy with <code><a href="ft2-glyph_management.html#ft_glyph_copy">FT_Glyph_Copy</a></code> and modify the new one.</p> <p>If <code>anode</code> is <em>not</em> <code>NULL</code>, it receives the address of the cache node containing the glyph image, after increasing its reference count. This ensures that the node (as well as the <code><a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a></code>) will always be kept in the cache until you call <code><a href="ft2-cache_subsystem.html#ftc_node_unref">FTC_Node_Unref</a></code> to &lsquo;release&rsquo; it.</p> <p>If <code>anode</code> is <code>NULL</code>, the cache node is left unchanged, which means that the <code><a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a></code> could be flushed out of the cache on the next call to one of the caching sub-system APIs. Don't assume that it is persistent!</p> <hr> <h2 id="ftc_sbit">FTC_SBit<a class="headerlink" href="#ftc_sbit" title="Permanent link">&para;</a></h2> <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_SBitRec_* <b>FTC_SBit</b>; </code></pre></div> <p>A handle to a small bitmap descriptor. See the <code><a href="ft2-cache_subsystem.html#ftc_sbitrec">FTC_SBitRec</a></code> structure for details.</p> <hr> <h2 id="ftc_sbitcache">FTC_SBitCache<a class="headerlink" href="#ftc_sbitcache" title="Permanent link">&para;</a></h2> <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_SBitCacheRec_* <b>FTC_SBitCache</b>; </code></pre></div> <p>A handle to a small bitmap cache. These are special cache objects used to store small glyph bitmaps (and anti-aliased pixmaps) in a much more efficient way than the traditional glyph image cache implemented by <code><a href="ft2-cache_subsystem.html#ftc_imagecache">FTC_ImageCache</a></code>.</p> <hr> <h2 id="ftc_sbitcache_new">FTC_SBitCache_New<a class="headerlink" href="#ftc_sbitcache_new" title="Permanent link">&para;</a></h2> <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FTC_SBitCache_New</b>( <a href="ft2-cache_subsystem.html#ftc_manager">FTC_Manager</a> manager, <a href="ft2-cache_subsystem.html#ftc_sbitcache">FTC_SBitCache</a> *acache ); </code></pre></div> <p>Create a new cache to store small glyph bitmaps.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="manager">manager</td><td class="desc"> <p>A handle to the source cache manager.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="acache">acache</td><td class="desc"> <p>A handle to the new sbit cache. <code>NULL</code> in case of error.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <hr> <h2 id="ftc_sbitcache_lookup">FTC_SBitCache_Lookup<a class="headerlink" href="#ftc_sbitcache_lookup" title="Permanent link">&para;</a></h2> <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FTC_SBitCache_Lookup</b>( <a href="ft2-cache_subsystem.html#ftc_sbitcache">FTC_SBitCache</a> cache, <a href="ft2-cache_subsystem.html#ftc_imagetype">FTC_ImageType</a> type, <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> gindex, <a href="ft2-cache_subsystem.html#ftc_sbit">FTC_SBit</a> *sbit, <a href="ft2-cache_subsystem.html#ftc_node">FTC_Node</a> *anode ); </code></pre></div> <p>Look up a given small glyph bitmap in a given sbit cache and &lsquo;lock&rsquo; it to prevent its flushing from the cache until needed.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="cache">cache</td><td class="desc"> <p>A handle to the source sbit cache.</p> </td></tr> <tr><td class="val" id="type">type</td><td class="desc"> <p>A pointer to the glyph image type descriptor.</p> </td></tr> <tr><td class="val" id="gindex">gindex</td><td class="desc"> <p>The glyph index.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="sbit">sbit</td><td class="desc"> <p>A handle to a small bitmap descriptor.</p> </td></tr> <tr><td class="val" id="anode">anode</td><td class="desc"> <p>Used to return the address of the corresponding cache node after incrementing its reference count (see note below).</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>The small bitmap descriptor and its bit buffer are owned by the cache and should never be freed by the application. They might as well disappear from memory on the next cache lookup, so don't treat them as persistent data.</p> <p>The descriptor's <code>buffer</code> field is set to&nbsp;0 to indicate a missing glyph bitmap.</p> <p>If <code>anode</code> is <em>not</em> <code>NULL</code>, it receives the address of the cache node containing the bitmap, after increasing its reference count. This ensures that the node (as well as the image) will always be kept in the cache until you call <code><a href="ft2-cache_subsystem.html#ftc_node_unref">FTC_Node_Unref</a></code> to &lsquo;release&rsquo; it.</p> <p>If <code>anode</code> is <code>NULL</code>, the cache node is left unchanged, which means that the bitmap could be flushed out of the cache on the next call to one of the caching sub-system APIs. Don't assume that it is persistent!</p> <hr> <h2 id="ftc_cmapcache">FTC_CMapCache<a class="headerlink" href="#ftc_cmapcache" title="Permanent link">&para;</a></h2> <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_CMapCacheRec_* <b>FTC_CMapCache</b>; </code></pre></div> <p>An opaque handle used to model a charmap cache. This cache is to hold character codes -&gt; glyph indices mappings.</p> <hr> <h2 id="ftc_cmapcache_new">FTC_CMapCache_New<a class="headerlink" href="#ftc_cmapcache_new" title="Permanent link">&para;</a></h2> <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FTC_CMapCache_New</b>( <a href="ft2-cache_subsystem.html#ftc_manager">FTC_Manager</a> manager, <a href="ft2-cache_subsystem.html#ftc_cmapcache">FTC_CMapCache</a> *acache ); </code></pre></div> <p>Create a new charmap cache.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="manager">manager</td><td class="desc"> <p>A handle to the cache manager.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="acache">acache</td><td class="desc"> <p>A new cache handle. <code>NULL</code> in case of error.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>Like all other caches, this one will be destroyed with the cache manager.</p> <hr> <h2 id="ftc_cmapcache_lookup">FTC_CMapCache_Lookup<a class="headerlink" href="#ftc_cmapcache_lookup" title="Permanent link">&para;</a></h2> <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> ) <b>FTC_CMapCache_Lookup</b>( <a href="ft2-cache_subsystem.html#ftc_cmapcache">FTC_CMapCache</a> cache, <a href="ft2-cache_subsystem.html#ftc_faceid">FTC_FaceID</a> face_id, <a href="ft2-basic_types.html#ft_int">FT_Int</a> cmap_index, <a href="ft2-basic_types.html#ft_uint32">FT_UInt32</a> char_code ); </code></pre></div> <p>Translate a character code into a glyph index, using the charmap cache.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="cache">cache</td><td class="desc"> <p>A charmap cache handle.</p> </td></tr> <tr><td class="val" id="face_id">face_id</td><td class="desc"> <p>The source face ID.</p> </td></tr> <tr><td class="val" id="cmap_index">cmap_index</td><td class="desc"> <p>The index of the charmap in the source face. Any negative value means to use the cache <code><a href="ft2-base_interface.html#ft_face">FT_Face</a></code>'s default charmap.</p> </td></tr> <tr><td class="val" id="char_code">char_code</td><td class="desc"> <p>The character code (in the corresponding charmap).</p> </td></tr> </table> <h4>return</h4> <p>Glyph index. 0&nbsp;means &lsquo;no glyph&rsquo;.</p> <hr> <h2 id="ftc_scalerrec">FTC_ScalerRec<a class="headerlink" href="#ftc_scalerrec" title="Permanent link">&para;</a></h2> <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_ScalerRec_ { <a href="ft2-cache_subsystem.html#ftc_faceid">FTC_FaceID</a> face_id; <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> width; <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> height; <a href="ft2-basic_types.html#ft_int">FT_Int</a> pixel; <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> x_res; <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> y_res; } <b>FTC_ScalerRec</b>; </code></pre></div> <p>A structure used to describe a given character size in either pixels or points to the cache manager. See <code><a href="ft2-cache_subsystem.html#ftc_manager_lookupsize">FTC_Manager_LookupSize</a></code>.</p> <h4>fields</h4> <table class="fields"> <tr><td class="val" id="face_id">face_id</td><td class="desc"> <p>The source face ID.</p> </td></tr> <tr><td class="val" id="width">width</td><td class="desc"> <p>The character width.</p> </td></tr> <tr><td class="val" id="height">height</td><td class="desc"> <p>The character height.</p> </td></tr> <tr><td class="val" id="pixel">pixel</td><td class="desc"> <p>A Boolean. If 1, the <code>width</code> and <code>height</code> fields are interpreted as integer pixel character sizes. Otherwise, they are expressed as 1/64th of points.</p> </td></tr> <tr><td class="val" id="x_res">x_res</td><td class="desc"> <p>Only used when <code>pixel</code> is value&nbsp;0 to indicate the horizontal resolution in dpi.</p> </td></tr> <tr><td class="val" id="y_res">y_res</td><td class="desc"> <p>Only used when <code>pixel</code> is value&nbsp;0 to indicate the vertical resolution in dpi.</p> </td></tr> </table> <h4>note</h4> <p>This type is mainly used to retrieve <code><a href="ft2-base_interface.html#ft_size">FT_Size</a></code> objects through the cache manager.</p> <hr> <h2 id="ftc_scaler">FTC_Scaler<a class="headerlink" href="#ftc_scaler" title="Permanent link">&para;</a></h2> <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_ScalerRec_* <b>FTC_Scaler</b>; </code></pre></div> <p>A handle to an <code><a href="ft2-cache_subsystem.html#ftc_scalerrec">FTC_ScalerRec</a></code> structure.</p> <hr> <h2 id="ftc_imagetyperec">FTC_ImageTypeRec<a class="headerlink" href="#ftc_imagetyperec" title="Permanent link">&para;</a></h2> <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_ImageTypeRec_ { <a href="ft2-cache_subsystem.html#ftc_faceid">FTC_FaceID</a> face_id; <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> width; <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> height; <a href="ft2-basic_types.html#ft_int32">FT_Int32</a> flags; } <b>FTC_ImageTypeRec</b>; </code></pre></div> <p>A structure used to model the type of images in a glyph cache.</p> <h4>fields</h4> <table class="fields"> <tr><td class="val" id="face_id">face_id</td><td class="desc"> <p>The face ID.</p> </td></tr> <tr><td class="val" id="width">width</td><td class="desc"> <p>The width in pixels.</p> </td></tr> <tr><td class="val" id="height">height</td><td class="desc"> <p>The height in pixels.</p> </td></tr> <tr><td class="val" id="flags">flags</td><td class="desc"> <p>The load flags, as in <code><a href="ft2-base_interface.html#ft_load_glyph">FT_Load_Glyph</a></code>.</p> </td></tr> </table> <hr> <h2 id="ftc_imagetype">FTC_ImageType<a class="headerlink" href="#ftc_imagetype" title="Permanent link">&para;</a></h2> <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_ImageTypeRec_* <b>FTC_ImageType</b>; </code></pre></div> <p>A handle to an <code><a href="ft2-cache_subsystem.html#ftc_imagetyperec">FTC_ImageTypeRec</a></code> structure.</p> <hr> <h2 id="ftc_imagecache_lookupscaler">FTC_ImageCache_LookupScaler<a class="headerlink" href="#ftc_imagecache_lookupscaler" title="Permanent link">&para;</a></h2> <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FTC_ImageCache_LookupScaler</b>( <a href="ft2-cache_subsystem.html#ftc_imagecache">FTC_ImageCache</a> cache, <a href="ft2-cache_subsystem.html#ftc_scaler">FTC_Scaler</a> scaler, <a href="ft2-basic_types.html#ft_ulong">FT_ULong</a> load_flags, <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> gindex, <a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a> *aglyph, <a href="ft2-cache_subsystem.html#ftc_node">FTC_Node</a> *anode ); </code></pre></div> <p>A variant of <code><a href="ft2-cache_subsystem.html#ftc_imagecache_lookup">FTC_ImageCache_Lookup</a></code> that uses an <code><a href="ft2-cache_subsystem.html#ftc_scalerrec">FTC_ScalerRec</a></code> to specify the face ID and its size.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="cache">cache</td><td class="desc"> <p>A handle to the source glyph image cache.</p> </td></tr> <tr><td class="val" id="scaler">scaler</td><td class="desc"> <p>A pointer to a scaler descriptor.</p> </td></tr> <tr><td class="val" id="load_flags">load_flags</td><td class="desc"> <p>The corresponding load flags.</p> </td></tr> <tr><td class="val" id="gindex">gindex</td><td class="desc"> <p>The glyph index to retrieve.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="aglyph">aglyph</td><td class="desc"> <p>The corresponding <code><a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a></code> object. 0&nbsp;in case of failure.</p> </td></tr> <tr><td class="val" id="anode">anode</td><td class="desc"> <p>Used to return the address of the corresponding cache node after incrementing its reference count (see note below).</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>The returned glyph is owned and managed by the glyph image cache. Never try to transform or discard it manually! You can however create a copy with <code><a href="ft2-glyph_management.html#ft_glyph_copy">FT_Glyph_Copy</a></code> and modify the new one.</p> <p>If <code>anode</code> is <em>not</em> <code>NULL</code>, it receives the address of the cache node containing the glyph image, after increasing its reference count. This ensures that the node (as well as the <code><a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a></code>) will always be kept in the cache until you call <code><a href="ft2-cache_subsystem.html#ftc_node_unref">FTC_Node_Unref</a></code> to &lsquo;release&rsquo; it.</p> <p>If <code>anode</code> is <code>NULL</code>, the cache node is left unchanged, which means that the <code><a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a></code> could be flushed out of the cache on the next call to one of the caching sub-system APIs. Don't assume that it is persistent!</p> <p>Calls to <code><a href="ft2-base_interface.html#ft_set_char_size">FT_Set_Char_Size</a></code> and friends have no effect on cached glyphs; you should always use the FreeType cache API instead.</p> <hr> <h2 id="ftc_sbitrec">FTC_SBitRec<a class="headerlink" href="#ftc_sbitrec" title="Permanent link">&para;</a></h2> <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_SBitRec_ { <a href="ft2-basic_types.html#ft_byte">FT_Byte</a> width; <a href="ft2-basic_types.html#ft_byte">FT_Byte</a> height; <a href="ft2-basic_types.html#ft_char">FT_Char</a> left; <a href="ft2-basic_types.html#ft_char">FT_Char</a> top; <a href="ft2-basic_types.html#ft_byte">FT_Byte</a> format; <a href="ft2-basic_types.html#ft_byte">FT_Byte</a> max_grays; <a href="ft2-basic_types.html#ft_short">FT_Short</a> pitch; <a href="ft2-basic_types.html#ft_char">FT_Char</a> xadvance; <a href="ft2-basic_types.html#ft_char">FT_Char</a> yadvance; <a href="ft2-basic_types.html#ft_byte">FT_Byte</a>* buffer; } <b>FTC_SBitRec</b>; </code></pre></div> <p>A very compact structure used to describe a small glyph bitmap.</p> <h4>fields</h4> <table class="fields"> <tr><td class="val" id="width">width</td><td class="desc"> <p>The bitmap width in pixels.</p> </td></tr> <tr><td class="val" id="height">height</td><td class="desc"> <p>The bitmap height in pixels.</p> </td></tr> <tr><td class="val" id="left">left</td><td class="desc"> <p>The horizontal distance from the pen position to the left bitmap border (a.k.a. &lsquo;left side bearing&rsquo;, or &lsquo;lsb&rsquo;).</p> </td></tr> <tr><td class="val" id="top">top</td><td class="desc"> <p>The vertical distance from the pen position (on the baseline) to the upper bitmap border (a.k.a. &lsquo;top side bearing&rsquo;). The distance is positive for upwards y&nbsp;coordinates.</p> </td></tr> <tr><td class="val" id="format">format</td><td class="desc"> <p>The format of the glyph bitmap (monochrome or gray).</p> </td></tr> <tr><td class="val" id="max_grays">max_grays</td><td class="desc"> <p>Maximum gray level value (in the range 1 to&nbsp;255).</p> </td></tr> <tr><td class="val" id="pitch">pitch</td><td class="desc"> <p>The number of bytes per bitmap line. May be positive or negative.</p> </td></tr> <tr><td class="val" id="xadvance">xadvance</td><td class="desc"> <p>The horizontal advance width in pixels.</p> </td></tr> <tr><td class="val" id="yadvance">yadvance</td><td class="desc"> <p>The vertical advance height in pixels.</p> </td></tr> <tr><td class="val" id="buffer">buffer</td><td class="desc"> <p>A pointer to the bitmap pixels.</p> </td></tr> </table> <hr> <h2 id="ftc_sbitcache_lookupscaler">FTC_SBitCache_LookupScaler<a class="headerlink" href="#ftc_sbitcache_lookupscaler" title="Permanent link">&para;</a></h2> <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FTC_SBitCache_LookupScaler</b>( <a href="ft2-cache_subsystem.html#ftc_sbitcache">FTC_SBitCache</a> cache, <a href="ft2-cache_subsystem.html#ftc_scaler">FTC_Scaler</a> scaler, <a href="ft2-basic_types.html#ft_ulong">FT_ULong</a> load_flags, <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> gindex, <a href="ft2-cache_subsystem.html#ftc_sbit">FTC_SBit</a> *sbit, <a href="ft2-cache_subsystem.html#ftc_node">FTC_Node</a> *anode ); </code></pre></div> <p>A variant of <code><a href="ft2-cache_subsystem.html#ftc_sbitcache_lookup">FTC_SBitCache_Lookup</a></code> that uses an <code><a href="ft2-cache_subsystem.html#ftc_scalerrec">FTC_ScalerRec</a></code> to specify the face ID and its size.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="cache">cache</td><td class="desc"> <p>A handle to the source sbit cache.</p> </td></tr> <tr><td class="val" id="scaler">scaler</td><td class="desc"> <p>A pointer to the scaler descriptor.</p> </td></tr> <tr><td class="val" id="load_flags">load_flags</td><td class="desc"> <p>The corresponding load flags.</p> </td></tr> <tr><td class="val" id="gindex">gindex</td><td class="desc"> <p>The glyph index.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="sbit">sbit</td><td class="desc"> <p>A handle to a small bitmap descriptor.</p> </td></tr> <tr><td class="val" id="anode">anode</td><td class="desc"> <p>Used to return the address of the corresponding cache node after incrementing its reference count (see note below).</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>The small bitmap descriptor and its bit buffer are owned by the cache and should never be freed by the application. They might as well disappear from memory on the next cache lookup, so don't treat them as persistent data.</p> <p>The descriptor's <code>buffer</code> field is set to&nbsp;0 to indicate a missing glyph bitmap.</p> <p>If <code>anode</code> is <em>not</em> <code>NULL</code>, it receives the address of the cache node containing the bitmap, after increasing its reference count. This ensures that the node (as well as the image) will always be kept in the cache until you call <code><a href="ft2-cache_subsystem.html#ftc_node_unref">FTC_Node_Unref</a></code> to &lsquo;release&rsquo; it.</p> <p>If <code>anode</code> is <code>NULL</code>, the cache node is left unchanged, which means that the bitmap could be flushed out of the cache on the next call to one of the caching sub-system APIs. Don't assume that it is persistent!</p> <hr> </article> </div> </div> </main> <footer class="md-footer"> <nav class="md-footer__inner md-grid" aria-label="Footer"> <a href="ft2-lcd_rendering.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: Subpixel Rendering" rel="prev"> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Previous </span> Subpixel Rendering </div> </div> </a> <a href="ft2-computations.html" class="md-footer__link md-footer__link--next" aria-label="Next: Computations" rel="next"> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Next </span> Computations </div> </div> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg> </div> </a> </nav> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-footer-copyright"> <div class="md-footer-copyright__highlight"> Copyright 2022 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>. </div> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"base": ".", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "assets/javascripts/workers/search.477d984a.min.js", "version": null}</script> <script src="assets/javascripts/bundle.82b56eb2.min.js"></script> <script src="javascripts/extra.js"></script> </body> </html>
whupdup/frame
real/third_party/freetype-2.12.0/docs/reference/ft2-cache_subsystem.html
HTML
gpl-3.0
81,272
<!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="description" content="API Reference Documentation for FreeType-2.12.0"> <meta name="author" content="FreeType Contributors"> <link rel="icon" href="images/favico.ico"> <meta name="generator" content="mkdocs-1.2.1, mkdocs-material-7.1.9"> <title>The CFF driver - FreeType-2.12.0 API Reference</title> <link rel="stylesheet" href="assets/stylesheets/main.ca7ac06f.min.css"> <link rel="stylesheet" href="assets/stylesheets/palette.f1a3b89f.min.css"> <meta name="theme-color" content="#4cae4f"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback"> <style>:root{--md-text-font-family:"Noto Serif";--md-code-font-family:"Roboto Mono"}</style> <link rel="stylesheet" href="stylesheets/extra.css"> </head> <body dir="ltr" data-md-color-scheme="" data-md-color-primary="green" data-md-color-accent="green"> <script>function __prefix(e){return new URL(".",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <label class="md-overlay" for="__drawer"></label> <div data-md-component="skip"> <a href="#the-cff-driver" class="md-skip"> Skip to content </a> </div> <div data-md-component="announce"> </div> <header class="md-header" data-md-component="header"> <nav class="md-header__inner md-grid" aria-label="Header"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> <label class="md-header__button md-icon" for="__drawer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg> </label> <div class="md-header__title" data-md-component="header-title"> <div class="md-header__ellipsis"> <div class="md-header__topic"> <span class="md-ellipsis"> FreeType-2.12.0 API Reference </span> </div> <div class="md-header__topic" data-md-component="header-topic"> <span class="md-ellipsis"> The CFF driver </span> </div> </div> </div> <label class="md-header__button md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> </label> <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required> <label class="md-search__icon md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </label> <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg> </button> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" data-md-scrollfix> <div class="md-search-result" data-md-component="search-result"> <div class="md-search-result__meta"> Initializing search </div> <ol class="md-search-result__list"></ol> </div> </div> </div> </div> </div> </nav> </header> <div class="md-container" data-md-component="container"> <main class="md-main" data-md-component="main"> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <label class="md-nav__title" for="__drawer"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> FreeType-2.12.0 API Reference </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="index.html" class="md-nav__link"> TOC </a> </li> <li class="md-nav__item"> <a href="ft2-index.html" class="md-nav__link"> Index </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" > <label class="md-nav__link" for="__nav_3"> General Remarks <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="General Remarks" data-md-level="1"> <label class="md-nav__title" for="__nav_3"> <span class="md-nav__icon md-icon"></span> General Remarks </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-preamble.html" class="md-nav__link"> Preamble </a> </li> <li class="md-nav__item"> <a href="ft2-header_inclusion.html" class="md-nav__link"> FreeType's header inclusion scheme </a> </li> <li class="md-nav__item"> <a href="ft2-user_allocation.html" class="md-nav__link"> User allocation </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" > <label class="md-nav__link" for="__nav_4"> Core API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Core API" data-md-level="1"> <label class="md-nav__title" for="__nav_4"> <span class="md-nav__icon md-icon"></span> Core API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-version.html" class="md-nav__link"> FreeType Version </a> </li> <li class="md-nav__item"> <a href="ft2-basic_types.html" class="md-nav__link"> Basic Data Types </a> </li> <li class="md-nav__item"> <a href="ft2-base_interface.html" class="md-nav__link"> Base Interface </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_variants.html" class="md-nav__link"> Unicode Variation Sequences </a> </li> <li class="md-nav__item"> <a href="ft2-color_management.html" class="md-nav__link"> Glyph Color Management </a> </li> <li class="md-nav__item"> <a href="ft2-layer_management.html" class="md-nav__link"> Glyph Layer Management </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_management.html" class="md-nav__link"> Glyph Management </a> </li> <li class="md-nav__item"> <a href="ft2-mac_specific.html" class="md-nav__link"> Mac Specific Interface </a> </li> <li class="md-nav__item"> <a href="ft2-sizes_management.html" class="md-nav__link"> Size Management </a> </li> <li class="md-nav__item"> <a href="ft2-header_file_macros.html" class="md-nav__link"> Header File Macros </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" > <label class="md-nav__link" for="__nav_5"> Format-Specific API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Format-Specific API" data-md-level="1"> <label class="md-nav__title" for="__nav_5"> <span class="md-nav__icon md-icon"></span> Format-Specific API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-multiple_masters.html" class="md-nav__link"> Multiple Masters </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_tables.html" class="md-nav__link"> TrueType Tables </a> </li> <li class="md-nav__item"> <a href="ft2-type1_tables.html" class="md-nav__link"> Type 1 Tables </a> </li> <li class="md-nav__item"> <a href="ft2-sfnt_names.html" class="md-nav__link"> SFNT Names </a> </li> <li class="md-nav__item"> <a href="ft2-bdf_fonts.html" class="md-nav__link"> BDF and PCF Files </a> </li> <li class="md-nav__item"> <a href="ft2-cid_fonts.html" class="md-nav__link"> CID Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-pfr_fonts.html" class="md-nav__link"> PFR Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-winfnt_fonts.html" class="md-nav__link"> Window FNT Files </a> </li> <li class="md-nav__item"> <a href="ft2-svg_fonts.html" class="md-nav__link"> OpenType SVG Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-font_formats.html" class="md-nav__link"> Font Formats </a> </li> <li class="md-nav__item"> <a href="ft2-gasp_table.html" class="md-nav__link"> Gasp Table </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--active md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" checked> <label class="md-nav__link" for="__nav_6"> Controlling FreeType Modules <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Controlling FreeType Modules" data-md-level="1"> <label class="md-nav__title" for="__nav_6"> <span class="md-nav__icon md-icon"></span> Controlling FreeType Modules </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-auto_hinter.html" class="md-nav__link"> The auto-hinter </a> </li> <li class="md-nav__item md-nav__item--active"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <label class="md-nav__link md-nav__link--active" for="__toc"> The CFF driver <span class="md-nav__icon md-icon"></span> </label> <a href="ft2-cff_driver.html" class="md-nav__link md-nav__link--active"> The CFF driver </a> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> </ul> </nav> </li> <li class="md-nav__item"> <a href="ft2-t1_cid_driver.html" class="md-nav__link"> The Type 1 and CID drivers </a> </li> <li class="md-nav__item"> <a href="ft2-tt_driver.html" class="md-nav__link"> The TrueType driver </a> </li> <li class="md-nav__item"> <a href="ft2-pcf_driver.html" class="md-nav__link"> The PCF driver </a> </li> <li class="md-nav__item"> <a href="ft2-ot_svg_driver.html" class="md-nav__link"> The SVG driver </a> </li> <li class="md-nav__item"> <a href="ft2-properties.html" class="md-nav__link"> Driver properties </a> </li> <li class="md-nav__item"> <a href="ft2-parameter_tags.html" class="md-nav__link"> Parameter Tags </a> </li> <li class="md-nav__item"> <a href="ft2-lcd_rendering.html" class="md-nav__link"> Subpixel Rendering </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" > <label class="md-nav__link" for="__nav_7"> Cache Sub-System <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1"> <label class="md-nav__title" for="__nav_7"> <span class="md-nav__icon md-icon"></span> Cache Sub-System </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-cache_subsystem.html" class="md-nav__link"> Cache Sub-System </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" > <label class="md-nav__link" for="__nav_8"> Support API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Support API" data-md-level="1"> <label class="md-nav__title" for="__nav_8"> <span class="md-nav__icon md-icon"></span> Support API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-computations.html" class="md-nav__link"> Computations </a> </li> <li class="md-nav__item"> <a href="ft2-list_processing.html" class="md-nav__link"> List Processing </a> </li> <li class="md-nav__item"> <a href="ft2-outline_processing.html" class="md-nav__link"> Outline Processing </a> </li> <li class="md-nav__item"> <a href="ft2-quick_advance.html" class="md-nav__link"> Quick retrieval of advance values </a> </li> <li class="md-nav__item"> <a href="ft2-bitmap_handling.html" class="md-nav__link"> Bitmap Handling </a> </li> <li class="md-nav__item"> <a href="ft2-raster.html" class="md-nav__link"> Scanline Converter </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_stroker.html" class="md-nav__link"> Glyph Stroker </a> </li> <li class="md-nav__item"> <a href="ft2-system_interface.html" class="md-nav__link"> System Interface </a> </li> <li class="md-nav__item"> <a href="ft2-module_management.html" class="md-nav__link"> Module Management </a> </li> <li class="md-nav__item"> <a href="ft2-gzip.html" class="md-nav__link"> GZIP Streams </a> </li> <li class="md-nav__item"> <a href="ft2-lzw.html" class="md-nav__link"> LZW Streams </a> </li> <li class="md-nav__item"> <a href="ft2-bzip2.html" class="md-nav__link"> BZIP2 Streams </a> </li> <li class="md-nav__item"> <a href="ft2-debugging_apis.html" class="md-nav__link"> External Debugging APIs </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" > <label class="md-nav__link" for="__nav_9"> Error Codes <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Error Codes" data-md-level="1"> <label class="md-nav__title" for="__nav_9"> <span class="md-nav__icon md-icon"></span> Error Codes </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-error_enumerations.html" class="md-nav__link"> Error Enumerations </a> </li> <li class="md-nav__item"> <a href="ft2-error_code_values.html" class="md-nav__link"> Error Code Values </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" > <label class="md-nav__link" for="__nav_10"> Miscellaneous <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1"> <label class="md-nav__title" for="__nav_10"> <span class="md-nav__icon md-icon"></span> Miscellaneous </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-gx_validation.html" class="md-nav__link"> TrueTypeGX/AAT Validation </a> </li> <li class="md-nav__item"> <a href="ft2-incremental.html" class="md-nav__link"> Incremental Loading </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_engine.html" class="md-nav__link"> The TrueType Engine </a> </li> <li class="md-nav__item"> <a href="ft2-ot_validation.html" class="md-nav__link"> OpenType Validation </a> </li> </ul> </nav> </li> </ul> </nav> </div> </div> </div> <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> </ul> </nav> </div> </div> </div> <div class="md-content" data-md-component="content"> <article class="md-content__inner md-typeset"> <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; <a href="index.html#controlling-freetype-modules">Controlling FreeType Modules</a> &raquo; The CFF driver</p> <hr /> <h1 id="the-cff-driver">The CFF driver<a class="headerlink" href="#the-cff-driver" title="Permanent link">&para;</a></h1> <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2> <p>While FreeType's CFF driver doesn't expose API functions by itself, it is possible to control its behaviour with <code><a href="ft2-module_management.html#ft_property_set">FT_Property_Set</a></code> and <code><a href="ft2-module_management.html#ft_property_get">FT_Property_Get</a></code>.</p> <p>The CFF driver's module name is &lsquo;cff&rsquo;.</p> <p>Available properties are <code><a href="ft2-properties.html#hinting-engine">hinting-engine</a></code>, <code><a href="ft2-properties.html#no-stem-darkening">no-stem-darkening</a></code>, <code><a href="ft2-properties.html#darkening-parameters">darkening-parameters</a></code>, and <code><a href="ft2-properties.html#random-seed">random-seed</a></code>, as documented in the &lsquo;<a href="ft2-properties.html#properties">Driver properties</a>&rsquo; section.</p> <p><strong>Hinting and anti-aliasing principles of the new engine</strong></p> <p>The rasterizer is positioning horizontal features (e.g., ascender height &amp; x-height, or crossbars) on the pixel grid and minimizing the amount of anti-aliasing applied to them, while placing vertical features (vertical stems) on the pixel grid without hinting, thus representing the stem position and weight accurately. Sometimes the vertical stems may be only partially black. In this context, &lsquo;anti-aliasing&rsquo; means that stems are not positioned exactly on pixel borders, causing a fuzzy appearance.</p> <p>There are two principles behind this approach.</p> <p>1) No hinting in the horizontal direction: Unlike &lsquo;superhinted&rsquo; TrueType, which changes glyph widths to accommodate regular inter-glyph spacing, Adobe's approach is &lsquo;faithful to the design&rsquo; in representing both the glyph width and the inter-glyph spacing designed for the font. This makes the screen display as close as it can be to the result one would get with infinite resolution, while preserving what is considered the key characteristics of each glyph. Note that the distances between unhinted and grid-fitted positions at small sizes are comparable to kerning values and thus would be noticeable (and distracting) while reading if hinting were applied.</p> <p>One of the reasons to not hint horizontally is anti-aliasing for LCD screens: The pixel geometry of modern displays supplies three vertical subpixels as the eye moves horizontally across each visible pixel. On devices where we can be certain this characteristic is present a rasterizer can take advantage of the subpixels to add increments of weight. In Western writing systems this turns out to be the more critical direction anyway; the weights and spacing of vertical stems (see above) are central to Armenian, Cyrillic, Greek, and Latin type designs. Even when the rasterizer uses greyscale anti-aliasing instead of color (a necessary compromise when one doesn't know the screen characteristics), the unhinted vertical features preserve the design's weight and spacing much better than aliased type would.</p> <p>2) Alignment in the vertical direction: Weights and spacing along the y&nbsp;axis are less critical; what is much more important is the visual alignment of related features (like cap-height and x-height). The sense of alignment for these is enhanced by the sharpness of grid-fit edges, while the cruder vertical resolution (full pixels instead of &#8531; pixels) is less of a problem.</p> <p>On the technical side, horizontal alignment zones for ascender, x-height, and other important height values (traditionally called &lsquo;blue zones&rsquo;) as defined in the font are positioned independently, each being rounded to the nearest pixel edge, taking care of overshoot suppression at small sizes, stem darkening, and scaling.</p> <p>Hstems (this is, hint values defined in the font to help align horizontal features) that fall within a blue zone are said to be &lsquo;captured&rsquo; and are aligned to that zone. Uncaptured stems are moved in one of four ways, top edge up or down, bottom edge up or down. Unless there are conflicting hstems, the smallest movement is taken to minimize distortion.</p> </article> </div> </div> </main> <footer class="md-footer"> <nav class="md-footer__inner md-grid" aria-label="Footer"> <a href="ft2-auto_hinter.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: The auto-hinter" rel="prev"> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Previous </span> The auto-hinter </div> </div> </a> <a href="ft2-t1_cid_driver.html" class="md-footer__link md-footer__link--next" aria-label="Next: The Type 1 and CID drivers" rel="next"> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Next </span> The Type 1 and CID drivers </div> </div> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg> </div> </a> </nav> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-footer-copyright"> <div class="md-footer-copyright__highlight"> Copyright 2022 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>. </div> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"base": ".", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "assets/javascripts/workers/search.477d984a.min.js", "version": null}</script> <script src="assets/javascripts/bundle.82b56eb2.min.js"></script> <script src="javascripts/extra.js"></script> </body> </html>
whupdup/frame
real/third_party/freetype-2.12.0/docs/reference/ft2-cff_driver.html
HTML
gpl-3.0
30,871
<!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="description" content="API Reference Documentation for FreeType-2.12.0"> <meta name="author" content="FreeType Contributors"> <link rel="icon" href="images/favico.ico"> <meta name="generator" content="mkdocs-1.2.1, mkdocs-material-7.1.9"> <title>CID Fonts - FreeType-2.12.0 API Reference</title> <link rel="stylesheet" href="assets/stylesheets/main.ca7ac06f.min.css"> <link rel="stylesheet" href="assets/stylesheets/palette.f1a3b89f.min.css"> <meta name="theme-color" content="#4cae4f"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback"> <style>:root{--md-text-font-family:"Noto Serif";--md-code-font-family:"Roboto Mono"}</style> <link rel="stylesheet" href="stylesheets/extra.css"> </head> <body dir="ltr" data-md-color-scheme="" data-md-color-primary="green" data-md-color-accent="green"> <script>function __prefix(e){return new URL(".",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <label class="md-overlay" for="__drawer"></label> <div data-md-component="skip"> <a href="#cid-fonts" class="md-skip"> Skip to content </a> </div> <div data-md-component="announce"> </div> <header class="md-header" data-md-component="header"> <nav class="md-header__inner md-grid" aria-label="Header"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> <label class="md-header__button md-icon" for="__drawer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg> </label> <div class="md-header__title" data-md-component="header-title"> <div class="md-header__ellipsis"> <div class="md-header__topic"> <span class="md-ellipsis"> FreeType-2.12.0 API Reference </span> </div> <div class="md-header__topic" data-md-component="header-topic"> <span class="md-ellipsis"> CID Fonts </span> </div> </div> </div> <label class="md-header__button md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> </label> <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required> <label class="md-search__icon md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </label> <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg> </button> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" data-md-scrollfix> <div class="md-search-result" data-md-component="search-result"> <div class="md-search-result__meta"> Initializing search </div> <ol class="md-search-result__list"></ol> </div> </div> </div> </div> </div> </nav> </header> <div class="md-container" data-md-component="container"> <main class="md-main" data-md-component="main"> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <label class="md-nav__title" for="__drawer"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> FreeType-2.12.0 API Reference </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="index.html" class="md-nav__link"> TOC </a> </li> <li class="md-nav__item"> <a href="ft2-index.html" class="md-nav__link"> Index </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" > <label class="md-nav__link" for="__nav_3"> General Remarks <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="General Remarks" data-md-level="1"> <label class="md-nav__title" for="__nav_3"> <span class="md-nav__icon md-icon"></span> General Remarks </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-preamble.html" class="md-nav__link"> Preamble </a> </li> <li class="md-nav__item"> <a href="ft2-header_inclusion.html" class="md-nav__link"> FreeType's header inclusion scheme </a> </li> <li class="md-nav__item"> <a href="ft2-user_allocation.html" class="md-nav__link"> User allocation </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" > <label class="md-nav__link" for="__nav_4"> Core API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Core API" data-md-level="1"> <label class="md-nav__title" for="__nav_4"> <span class="md-nav__icon md-icon"></span> Core API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-version.html" class="md-nav__link"> FreeType Version </a> </li> <li class="md-nav__item"> <a href="ft2-basic_types.html" class="md-nav__link"> Basic Data Types </a> </li> <li class="md-nav__item"> <a href="ft2-base_interface.html" class="md-nav__link"> Base Interface </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_variants.html" class="md-nav__link"> Unicode Variation Sequences </a> </li> <li class="md-nav__item"> <a href="ft2-color_management.html" class="md-nav__link"> Glyph Color Management </a> </li> <li class="md-nav__item"> <a href="ft2-layer_management.html" class="md-nav__link"> Glyph Layer Management </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_management.html" class="md-nav__link"> Glyph Management </a> </li> <li class="md-nav__item"> <a href="ft2-mac_specific.html" class="md-nav__link"> Mac Specific Interface </a> </li> <li class="md-nav__item"> <a href="ft2-sizes_management.html" class="md-nav__link"> Size Management </a> </li> <li class="md-nav__item"> <a href="ft2-header_file_macros.html" class="md-nav__link"> Header File Macros </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--active md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" checked> <label class="md-nav__link" for="__nav_5"> Format-Specific API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Format-Specific API" data-md-level="1"> <label class="md-nav__title" for="__nav_5"> <span class="md-nav__icon md-icon"></span> Format-Specific API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-multiple_masters.html" class="md-nav__link"> Multiple Masters </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_tables.html" class="md-nav__link"> TrueType Tables </a> </li> <li class="md-nav__item"> <a href="ft2-type1_tables.html" class="md-nav__link"> Type 1 Tables </a> </li> <li class="md-nav__item"> <a href="ft2-sfnt_names.html" class="md-nav__link"> SFNT Names </a> </li> <li class="md-nav__item"> <a href="ft2-bdf_fonts.html" class="md-nav__link"> BDF and PCF Files </a> </li> <li class="md-nav__item md-nav__item--active"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <label class="md-nav__link md-nav__link--active" for="__toc"> CID Fonts <span class="md-nav__icon md-icon"></span> </label> <a href="ft2-cid_fonts.html" class="md-nav__link md-nav__link--active"> CID Fonts </a> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_get_cid_registry_ordering_supplement" class="md-nav__link"> FT_Get_CID_Registry_Ordering_Supplement </a> </li> <li class="md-nav__item"> <a href="#ft_get_cid_is_internally_cid_keyed" class="md-nav__link"> FT_Get_CID_Is_Internally_CID_Keyed </a> </li> <li class="md-nav__item"> <a href="#ft_get_cid_from_glyph_index" class="md-nav__link"> FT_Get_CID_From_Glyph_Index </a> </li> </ul> </nav> </li> <li class="md-nav__item"> <a href="ft2-pfr_fonts.html" class="md-nav__link"> PFR Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-winfnt_fonts.html" class="md-nav__link"> Window FNT Files </a> </li> <li class="md-nav__item"> <a href="ft2-svg_fonts.html" class="md-nav__link"> OpenType SVG Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-font_formats.html" class="md-nav__link"> Font Formats </a> </li> <li class="md-nav__item"> <a href="ft2-gasp_table.html" class="md-nav__link"> Gasp Table </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" > <label class="md-nav__link" for="__nav_6"> Controlling FreeType Modules <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Controlling FreeType Modules" data-md-level="1"> <label class="md-nav__title" for="__nav_6"> <span class="md-nav__icon md-icon"></span> Controlling FreeType Modules </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-auto_hinter.html" class="md-nav__link"> The auto-hinter </a> </li> <li class="md-nav__item"> <a href="ft2-cff_driver.html" class="md-nav__link"> The CFF driver </a> </li> <li class="md-nav__item"> <a href="ft2-t1_cid_driver.html" class="md-nav__link"> The Type 1 and CID drivers </a> </li> <li class="md-nav__item"> <a href="ft2-tt_driver.html" class="md-nav__link"> The TrueType driver </a> </li> <li class="md-nav__item"> <a href="ft2-pcf_driver.html" class="md-nav__link"> The PCF driver </a> </li> <li class="md-nav__item"> <a href="ft2-ot_svg_driver.html" class="md-nav__link"> The SVG driver </a> </li> <li class="md-nav__item"> <a href="ft2-properties.html" class="md-nav__link"> Driver properties </a> </li> <li class="md-nav__item"> <a href="ft2-parameter_tags.html" class="md-nav__link"> Parameter Tags </a> </li> <li class="md-nav__item"> <a href="ft2-lcd_rendering.html" class="md-nav__link"> Subpixel Rendering </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" > <label class="md-nav__link" for="__nav_7"> Cache Sub-System <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1"> <label class="md-nav__title" for="__nav_7"> <span class="md-nav__icon md-icon"></span> Cache Sub-System </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-cache_subsystem.html" class="md-nav__link"> Cache Sub-System </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" > <label class="md-nav__link" for="__nav_8"> Support API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Support API" data-md-level="1"> <label class="md-nav__title" for="__nav_8"> <span class="md-nav__icon md-icon"></span> Support API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-computations.html" class="md-nav__link"> Computations </a> </li> <li class="md-nav__item"> <a href="ft2-list_processing.html" class="md-nav__link"> List Processing </a> </li> <li class="md-nav__item"> <a href="ft2-outline_processing.html" class="md-nav__link"> Outline Processing </a> </li> <li class="md-nav__item"> <a href="ft2-quick_advance.html" class="md-nav__link"> Quick retrieval of advance values </a> </li> <li class="md-nav__item"> <a href="ft2-bitmap_handling.html" class="md-nav__link"> Bitmap Handling </a> </li> <li class="md-nav__item"> <a href="ft2-raster.html" class="md-nav__link"> Scanline Converter </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_stroker.html" class="md-nav__link"> Glyph Stroker </a> </li> <li class="md-nav__item"> <a href="ft2-system_interface.html" class="md-nav__link"> System Interface </a> </li> <li class="md-nav__item"> <a href="ft2-module_management.html" class="md-nav__link"> Module Management </a> </li> <li class="md-nav__item"> <a href="ft2-gzip.html" class="md-nav__link"> GZIP Streams </a> </li> <li class="md-nav__item"> <a href="ft2-lzw.html" class="md-nav__link"> LZW Streams </a> </li> <li class="md-nav__item"> <a href="ft2-bzip2.html" class="md-nav__link"> BZIP2 Streams </a> </li> <li class="md-nav__item"> <a href="ft2-debugging_apis.html" class="md-nav__link"> External Debugging APIs </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" > <label class="md-nav__link" for="__nav_9"> Error Codes <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Error Codes" data-md-level="1"> <label class="md-nav__title" for="__nav_9"> <span class="md-nav__icon md-icon"></span> Error Codes </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-error_enumerations.html" class="md-nav__link"> Error Enumerations </a> </li> <li class="md-nav__item"> <a href="ft2-error_code_values.html" class="md-nav__link"> Error Code Values </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" > <label class="md-nav__link" for="__nav_10"> Miscellaneous <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1"> <label class="md-nav__title" for="__nav_10"> <span class="md-nav__icon md-icon"></span> Miscellaneous </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-gx_validation.html" class="md-nav__link"> TrueTypeGX/AAT Validation </a> </li> <li class="md-nav__item"> <a href="ft2-incremental.html" class="md-nav__link"> Incremental Loading </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_engine.html" class="md-nav__link"> The TrueType Engine </a> </li> <li class="md-nav__item"> <a href="ft2-ot_validation.html" class="md-nav__link"> OpenType Validation </a> </li> </ul> </nav> </li> </ul> </nav> </div> </div> </div> <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_get_cid_registry_ordering_supplement" class="md-nav__link"> FT_Get_CID_Registry_Ordering_Supplement </a> </li> <li class="md-nav__item"> <a href="#ft_get_cid_is_internally_cid_keyed" class="md-nav__link"> FT_Get_CID_Is_Internally_CID_Keyed </a> </li> <li class="md-nav__item"> <a href="#ft_get_cid_from_glyph_index" class="md-nav__link"> FT_Get_CID_From_Glyph_Index </a> </li> </ul> </nav> </div> </div> </div> <div class="md-content" data-md-component="content"> <article class="md-content__inner md-typeset"> <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; <a href="index.html#format-specific-api">Format-Specific API</a> &raquo; CID Fonts</p> <hr /> <h1 id="cid-fonts">CID Fonts<a class="headerlink" href="#cid-fonts" title="Permanent link">&para;</a></h1> <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2> <p>This section contains the declaration of CID-keyed font-specific functions.</p> <h2 id="ft_get_cid_registry_ordering_supplement">FT_Get_CID_Registry_Ordering_Supplement<a class="headerlink" href="#ft_get_cid_registry_ordering_supplement" title="Permanent link">&para;</a></h2> <p>Defined in FT_CID_H (freetype/ftcid.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Get_CID_Registry_Ordering_Supplement</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a> face, <span class="keyword">const</span> <span class="keyword">char</span>* *registry, <span class="keyword">const</span> <span class="keyword">char</span>* *ordering, <a href="ft2-basic_types.html#ft_int">FT_Int</a> *supplement ); </code></pre></div> <p>Retrieve the Registry/Ordering/Supplement triple (also known as the "R/O/S") from a CID-keyed font.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="face">face</td><td class="desc"> <p>A handle to the input face.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="registry">registry</td><td class="desc"> <p>The registry, as a C&nbsp;string, owned by the face.</p> </td></tr> <tr><td class="val" id="ordering">ordering</td><td class="desc"> <p>The ordering, as a C&nbsp;string, owned by the face.</p> </td></tr> <tr><td class="val" id="supplement">supplement</td><td class="desc"> <p>The supplement.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>This function only works with CID faces, returning an error otherwise.</p> <h4>since</h4> <p>2.3.6</p> <hr> <h2 id="ft_get_cid_is_internally_cid_keyed">FT_Get_CID_Is_Internally_CID_Keyed<a class="headerlink" href="#ft_get_cid_is_internally_cid_keyed" title="Permanent link">&para;</a></h2> <p>Defined in FT_CID_H (freetype/ftcid.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Get_CID_Is_Internally_CID_Keyed</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a> face, <a href="ft2-basic_types.html#ft_bool">FT_Bool</a> *is_cid ); </code></pre></div> <p>Retrieve the type of the input face, CID keyed or not. In contrast to the <code><a href="ft2-base_interface.html#ft_is_cid_keyed">FT_IS_CID_KEYED</a></code> macro this function returns successfully also for CID-keyed fonts in an SFNT wrapper.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="face">face</td><td class="desc"> <p>A handle to the input face.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="is_cid">is_cid</td><td class="desc"> <p>The type of the face as an <code><a href="ft2-basic_types.html#ft_bool">FT_Bool</a></code>.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>This function only works with CID faces and OpenType fonts, returning an error otherwise.</p> <h4>since</h4> <p>2.3.9</p> <hr> <h2 id="ft_get_cid_from_glyph_index">FT_Get_CID_From_Glyph_Index<a class="headerlink" href="#ft_get_cid_from_glyph_index" title="Permanent link">&para;</a></h2> <p>Defined in FT_CID_H (freetype/ftcid.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Get_CID_From_Glyph_Index</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a> face, <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> glyph_index, <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> *cid ); </code></pre></div> <p>Retrieve the CID of the input glyph index.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="face">face</td><td class="desc"> <p>A handle to the input face.</p> </td></tr> <tr><td class="val" id="glyph_index">glyph_index</td><td class="desc"> <p>The input glyph index.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="cid">cid</td><td class="desc"> <p>The CID as an <code><a href="ft2-basic_types.html#ft_uint">FT_UInt</a></code>.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>This function only works with CID faces and OpenType fonts, returning an error otherwise.</p> <h4>since</h4> <p>2.3.9</p> <hr> </article> </div> </div> </main> <footer class="md-footer"> <nav class="md-footer__inner md-grid" aria-label="Footer"> <a href="ft2-bdf_fonts.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: BDF and PCF Files" rel="prev"> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Previous </span> BDF and PCF Files </div> </div> </a> <a href="ft2-pfr_fonts.html" class="md-footer__link md-footer__link--next" aria-label="Next: PFR Fonts" rel="next"> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Next </span> PFR Fonts </div> </div> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg> </div> </a> </nav> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-footer-copyright"> <div class="md-footer-copyright__highlight"> Copyright 2022 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>. </div> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"base": ".", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "assets/javascripts/workers/search.477d984a.min.js", "version": null}</script> <script src="assets/javascripts/bundle.82b56eb2.min.js"></script> <script src="javascripts/extra.js"></script> </body> </html>
whupdup/frame
real/third_party/freetype-2.12.0/docs/reference/ft2-cid_fonts.html
HTML
gpl-3.0
32,225
<!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="description" content="API Reference Documentation for FreeType-2.12.0"> <meta name="author" content="FreeType Contributors"> <link rel="icon" href="images/favico.ico"> <meta name="generator" content="mkdocs-1.2.1, mkdocs-material-7.1.9"> <title>Glyph Color Management - FreeType-2.12.0 API Reference</title> <link rel="stylesheet" href="assets/stylesheets/main.ca7ac06f.min.css"> <link rel="stylesheet" href="assets/stylesheets/palette.f1a3b89f.min.css"> <meta name="theme-color" content="#4cae4f"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback"> <style>:root{--md-text-font-family:"Noto Serif";--md-code-font-family:"Roboto Mono"}</style> <link rel="stylesheet" href="stylesheets/extra.css"> </head> <body dir="ltr" data-md-color-scheme="" data-md-color-primary="green" data-md-color-accent="green"> <script>function __prefix(e){return new URL(".",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <label class="md-overlay" for="__drawer"></label> <div data-md-component="skip"> <a href="#glyph-color-management" class="md-skip"> Skip to content </a> </div> <div data-md-component="announce"> </div> <header class="md-header" data-md-component="header"> <nav class="md-header__inner md-grid" aria-label="Header"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> <label class="md-header__button md-icon" for="__drawer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg> </label> <div class="md-header__title" data-md-component="header-title"> <div class="md-header__ellipsis"> <div class="md-header__topic"> <span class="md-ellipsis"> FreeType-2.12.0 API Reference </span> </div> <div class="md-header__topic" data-md-component="header-topic"> <span class="md-ellipsis"> Glyph Color Management </span> </div> </div> </div> <label class="md-header__button md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> </label> <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required> <label class="md-search__icon md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </label> <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg> </button> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" data-md-scrollfix> <div class="md-search-result" data-md-component="search-result"> <div class="md-search-result__meta"> Initializing search </div> <ol class="md-search-result__list"></ol> </div> </div> </div> </div> </div> </nav> </header> <div class="md-container" data-md-component="container"> <main class="md-main" data-md-component="main"> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <label class="md-nav__title" for="__drawer"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> FreeType-2.12.0 API Reference </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="index.html" class="md-nav__link"> TOC </a> </li> <li class="md-nav__item"> <a href="ft2-index.html" class="md-nav__link"> Index </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" > <label class="md-nav__link" for="__nav_3"> General Remarks <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="General Remarks" data-md-level="1"> <label class="md-nav__title" for="__nav_3"> <span class="md-nav__icon md-icon"></span> General Remarks </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-preamble.html" class="md-nav__link"> Preamble </a> </li> <li class="md-nav__item"> <a href="ft2-header_inclusion.html" class="md-nav__link"> FreeType's header inclusion scheme </a> </li> <li class="md-nav__item"> <a href="ft2-user_allocation.html" class="md-nav__link"> User allocation </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--active md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" checked> <label class="md-nav__link" for="__nav_4"> Core API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Core API" data-md-level="1"> <label class="md-nav__title" for="__nav_4"> <span class="md-nav__icon md-icon"></span> Core API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-version.html" class="md-nav__link"> FreeType Version </a> </li> <li class="md-nav__item"> <a href="ft2-basic_types.html" class="md-nav__link"> Basic Data Types </a> </li> <li class="md-nav__item"> <a href="ft2-base_interface.html" class="md-nav__link"> Base Interface </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_variants.html" class="md-nav__link"> Unicode Variation Sequences </a> </li> <li class="md-nav__item md-nav__item--active"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <label class="md-nav__link md-nav__link--active" for="__toc"> Glyph Color Management <span class="md-nav__icon md-icon"></span> </label> <a href="ft2-color_management.html" class="md-nav__link md-nav__link--active"> Glyph Color Management </a> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_color" class="md-nav__link"> FT_Color </a> </li> <li class="md-nav__item"> <a href="#ft_palette_xxx" class="md-nav__link"> FT_PALETTE_XXX </a> </li> <li class="md-nav__item"> <a href="#ft_palette_data" class="md-nav__link"> FT_Palette_Data </a> </li> <li class="md-nav__item"> <a href="#ft_palette_data_get" class="md-nav__link"> FT_Palette_Data_Get </a> </li> <li class="md-nav__item"> <a href="#ft_palette_select" class="md-nav__link"> FT_Palette_Select </a> </li> <li class="md-nav__item"> <a href="#ft_palette_set_foreground_color" class="md-nav__link"> FT_Palette_Set_Foreground_Color </a> </li> </ul> </nav> </li> <li class="md-nav__item"> <a href="ft2-layer_management.html" class="md-nav__link"> Glyph Layer Management </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_management.html" class="md-nav__link"> Glyph Management </a> </li> <li class="md-nav__item"> <a href="ft2-mac_specific.html" class="md-nav__link"> Mac Specific Interface </a> </li> <li class="md-nav__item"> <a href="ft2-sizes_management.html" class="md-nav__link"> Size Management </a> </li> <li class="md-nav__item"> <a href="ft2-header_file_macros.html" class="md-nav__link"> Header File Macros </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" > <label class="md-nav__link" for="__nav_5"> Format-Specific API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Format-Specific API" data-md-level="1"> <label class="md-nav__title" for="__nav_5"> <span class="md-nav__icon md-icon"></span> Format-Specific API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-multiple_masters.html" class="md-nav__link"> Multiple Masters </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_tables.html" class="md-nav__link"> TrueType Tables </a> </li> <li class="md-nav__item"> <a href="ft2-type1_tables.html" class="md-nav__link"> Type 1 Tables </a> </li> <li class="md-nav__item"> <a href="ft2-sfnt_names.html" class="md-nav__link"> SFNT Names </a> </li> <li class="md-nav__item"> <a href="ft2-bdf_fonts.html" class="md-nav__link"> BDF and PCF Files </a> </li> <li class="md-nav__item"> <a href="ft2-cid_fonts.html" class="md-nav__link"> CID Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-pfr_fonts.html" class="md-nav__link"> PFR Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-winfnt_fonts.html" class="md-nav__link"> Window FNT Files </a> </li> <li class="md-nav__item"> <a href="ft2-svg_fonts.html" class="md-nav__link"> OpenType SVG Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-font_formats.html" class="md-nav__link"> Font Formats </a> </li> <li class="md-nav__item"> <a href="ft2-gasp_table.html" class="md-nav__link"> Gasp Table </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" > <label class="md-nav__link" for="__nav_6"> Controlling FreeType Modules <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Controlling FreeType Modules" data-md-level="1"> <label class="md-nav__title" for="__nav_6"> <span class="md-nav__icon md-icon"></span> Controlling FreeType Modules </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-auto_hinter.html" class="md-nav__link"> The auto-hinter </a> </li> <li class="md-nav__item"> <a href="ft2-cff_driver.html" class="md-nav__link"> The CFF driver </a> </li> <li class="md-nav__item"> <a href="ft2-t1_cid_driver.html" class="md-nav__link"> The Type 1 and CID drivers </a> </li> <li class="md-nav__item"> <a href="ft2-tt_driver.html" class="md-nav__link"> The TrueType driver </a> </li> <li class="md-nav__item"> <a href="ft2-pcf_driver.html" class="md-nav__link"> The PCF driver </a> </li> <li class="md-nav__item"> <a href="ft2-ot_svg_driver.html" class="md-nav__link"> The SVG driver </a> </li> <li class="md-nav__item"> <a href="ft2-properties.html" class="md-nav__link"> Driver properties </a> </li> <li class="md-nav__item"> <a href="ft2-parameter_tags.html" class="md-nav__link"> Parameter Tags </a> </li> <li class="md-nav__item"> <a href="ft2-lcd_rendering.html" class="md-nav__link"> Subpixel Rendering </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" > <label class="md-nav__link" for="__nav_7"> Cache Sub-System <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1"> <label class="md-nav__title" for="__nav_7"> <span class="md-nav__icon md-icon"></span> Cache Sub-System </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-cache_subsystem.html" class="md-nav__link"> Cache Sub-System </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" > <label class="md-nav__link" for="__nav_8"> Support API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Support API" data-md-level="1"> <label class="md-nav__title" for="__nav_8"> <span class="md-nav__icon md-icon"></span> Support API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-computations.html" class="md-nav__link"> Computations </a> </li> <li class="md-nav__item"> <a href="ft2-list_processing.html" class="md-nav__link"> List Processing </a> </li> <li class="md-nav__item"> <a href="ft2-outline_processing.html" class="md-nav__link"> Outline Processing </a> </li> <li class="md-nav__item"> <a href="ft2-quick_advance.html" class="md-nav__link"> Quick retrieval of advance values </a> </li> <li class="md-nav__item"> <a href="ft2-bitmap_handling.html" class="md-nav__link"> Bitmap Handling </a> </li> <li class="md-nav__item"> <a href="ft2-raster.html" class="md-nav__link"> Scanline Converter </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_stroker.html" class="md-nav__link"> Glyph Stroker </a> </li> <li class="md-nav__item"> <a href="ft2-system_interface.html" class="md-nav__link"> System Interface </a> </li> <li class="md-nav__item"> <a href="ft2-module_management.html" class="md-nav__link"> Module Management </a> </li> <li class="md-nav__item"> <a href="ft2-gzip.html" class="md-nav__link"> GZIP Streams </a> </li> <li class="md-nav__item"> <a href="ft2-lzw.html" class="md-nav__link"> LZW Streams </a> </li> <li class="md-nav__item"> <a href="ft2-bzip2.html" class="md-nav__link"> BZIP2 Streams </a> </li> <li class="md-nav__item"> <a href="ft2-debugging_apis.html" class="md-nav__link"> External Debugging APIs </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" > <label class="md-nav__link" for="__nav_9"> Error Codes <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Error Codes" data-md-level="1"> <label class="md-nav__title" for="__nav_9"> <span class="md-nav__icon md-icon"></span> Error Codes </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-error_enumerations.html" class="md-nav__link"> Error Enumerations </a> </li> <li class="md-nav__item"> <a href="ft2-error_code_values.html" class="md-nav__link"> Error Code Values </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" > <label class="md-nav__link" for="__nav_10"> Miscellaneous <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1"> <label class="md-nav__title" for="__nav_10"> <span class="md-nav__icon md-icon"></span> Miscellaneous </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-gx_validation.html" class="md-nav__link"> TrueTypeGX/AAT Validation </a> </li> <li class="md-nav__item"> <a href="ft2-incremental.html" class="md-nav__link"> Incremental Loading </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_engine.html" class="md-nav__link"> The TrueType Engine </a> </li> <li class="md-nav__item"> <a href="ft2-ot_validation.html" class="md-nav__link"> OpenType Validation </a> </li> </ul> </nav> </li> </ul> </nav> </div> </div> </div> <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_color" class="md-nav__link"> FT_Color </a> </li> <li class="md-nav__item"> <a href="#ft_palette_xxx" class="md-nav__link"> FT_PALETTE_XXX </a> </li> <li class="md-nav__item"> <a href="#ft_palette_data" class="md-nav__link"> FT_Palette_Data </a> </li> <li class="md-nav__item"> <a href="#ft_palette_data_get" class="md-nav__link"> FT_Palette_Data_Get </a> </li> <li class="md-nav__item"> <a href="#ft_palette_select" class="md-nav__link"> FT_Palette_Select </a> </li> <li class="md-nav__item"> <a href="#ft_palette_set_foreground_color" class="md-nav__link"> FT_Palette_Set_Foreground_Color </a> </li> </ul> </nav> </div> </div> </div> <div class="md-content" data-md-component="content"> <article class="md-content__inner md-typeset"> <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; <a href="index.html#core-api">Core API</a> &raquo; Glyph Color Management</p> <hr /> <h1 id="glyph-color-management">Glyph Color Management<a class="headerlink" href="#glyph-color-management" title="Permanent link">&para;</a></h1> <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2> <p>The functions described here allow access and manipulation of color palette entries in OpenType's &lsquo;CPAL&rsquo; tables.</p> <h2 id="ft_color">FT_Color<a class="headerlink" href="#ft_color" title="Permanent link">&para;</a></h2> <p>Defined in FT_COLOR_H (freetype/ftcolor.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Color_ { <a href="ft2-basic_types.html#ft_byte">FT_Byte</a> blue; <a href="ft2-basic_types.html#ft_byte">FT_Byte</a> green; <a href="ft2-basic_types.html#ft_byte">FT_Byte</a> red; <a href="ft2-basic_types.html#ft_byte">FT_Byte</a> alpha; } <b>FT_Color</b>; </code></pre></div> <p>This structure models a BGRA color value of a &lsquo;CPAL&rsquo; palette entry.</p> <p>The used color space is sRGB; the colors are not pre-multiplied, and alpha values must be explicitly set.</p> <h4>fields</h4> <table class="fields"> <tr><td class="val" id="blue">blue</td><td class="desc"> <p>Blue value.</p> </td></tr> <tr><td class="val" id="green">green</td><td class="desc"> <p>Green value.</p> </td></tr> <tr><td class="val" id="red">red</td><td class="desc"> <p>Red value.</p> </td></tr> <tr><td class="val" id="alpha">alpha</td><td class="desc"> <p>Alpha value, giving the red, green, and blue color's opacity.</p> </td></tr> </table> <h4>since</h4> <p>2.10</p> <hr> <h2 id="ft_palette_xxx">FT_PALETTE_XXX<a class="headerlink" href="#ft_palette_xxx" title="Permanent link">&para;</a></h2> <p>Defined in FT_COLOR_H (freetype/ftcolor.h).</p> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <a href="ft2-color_management.html#ft_palette_for_light_background">FT_PALETTE_FOR_LIGHT_BACKGROUND</a> 0x01 #<span class="keyword">define</span> <a href="ft2-color_management.html#ft_palette_for_dark_background">FT_PALETTE_FOR_DARK_BACKGROUND</a> 0x02 </code></pre></div> <p>A list of bit field constants used in the <code>palette_flags</code> array of the <code><a href="ft2-color_management.html#ft_palette_data">FT_Palette_Data</a></code> structure to indicate for which background a palette with a given index is usable.</p> <h4>values</h4> <table class="fields long"> <tr><td class="val" id="ft_palette_for_light_background">FT_PALETTE_FOR_LIGHT_BACKGROUND</td><td class="desc"> <p>The palette is appropriate to use when displaying the font on a light background such as white.</p> </td></tr> <tr><td class="val" id="ft_palette_for_dark_background">FT_PALETTE_FOR_DARK_BACKGROUND</td><td class="desc"> <p>The palette is appropriate to use when displaying the font on a dark background such as black.</p> </td></tr> </table> <h4>since</h4> <p>2.10</p> <hr> <h2 id="ft_palette_data">FT_Palette_Data<a class="headerlink" href="#ft_palette_data" title="Permanent link">&para;</a></h2> <p>Defined in FT_COLOR_H (freetype/ftcolor.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Palette_Data_ { <a href="ft2-basic_types.html#ft_ushort">FT_UShort</a> num_palettes; <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_ushort">FT_UShort</a>* palette_name_ids; <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_ushort">FT_UShort</a>* palette_flags; <a href="ft2-basic_types.html#ft_ushort">FT_UShort</a> num_palette_entries; <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_ushort">FT_UShort</a>* palette_entry_name_ids; } <b>FT_Palette_Data</b>; </code></pre></div> <p>This structure holds the data of the &lsquo;CPAL&rsquo; table.</p> <h4>fields</h4> <table class="fields"> <tr><td class="val" id="num_palettes">num_palettes</td><td class="desc"> <p>The number of palettes.</p> </td></tr> <tr><td class="val" id="palette_name_ids">palette_name_ids</td><td class="desc"> <p>An optional read-only array of palette name IDs with <code>num_palettes</code> elements, corresponding to entries like &lsquo;dark&rsquo; or &lsquo;light&rsquo; in the font's &lsquo;name&rsquo; table.</p> <p>An empty name ID in the &lsquo;CPAL&rsquo; table gets represented as value 0xFFFF.</p> <p><code>NULL</code> if the font's &lsquo;CPAL&rsquo; table doesn't contain appropriate data.</p> </td></tr> <tr><td class="val" id="palette_flags">palette_flags</td><td class="desc"> <p>An optional read-only array of palette flags with <code>num_palettes</code> elements. Possible values are an ORed combination of <code><a href="ft2-color_management.html#ft_palette_xxx">FT_PALETTE_FOR_LIGHT_BACKGROUND</a></code> and <code><a href="ft2-color_management.html#ft_palette_xxx">FT_PALETTE_FOR_DARK_BACKGROUND</a></code>.</p> <p><code>NULL</code> if the font's &lsquo;CPAL&rsquo; table doesn't contain appropriate data.</p> </td></tr> <tr><td class="val" id="num_palette_entries">num_palette_entries</td><td class="desc"> <p>The number of entries in a single palette. All palettes have the same size.</p> </td></tr> <tr><td class="val" id="palette_entry_name_ids">palette_entry_name_ids</td><td class="desc"> <p>An optional read-only array of palette entry name IDs with <code>num_palette_entries</code>. In each palette, entries with the same index have the same function. For example, index&nbsp;0 might correspond to string &lsquo;outline&rsquo; in the font's &lsquo;name&rsquo; table to indicate that this palette entry is used for outlines, index&nbsp;1 might correspond to &lsquo;fill&rsquo; to indicate the filling color palette entry, etc.</p> <p>An empty entry name ID in the &lsquo;CPAL&rsquo; table gets represented as value 0xFFFF.</p> <p><code>NULL</code> if the font's &lsquo;CPAL&rsquo; table doesn't contain appropriate data.</p> </td></tr> </table> <h4>note</h4> <p>Use function <code><a href="ft2-sfnt_names.html#ft_get_sfnt_name">FT_Get_Sfnt_Name</a></code> to map name IDs and entry name IDs to name strings.</p> <p>Use function <code><a href="ft2-color_management.html#ft_palette_select">FT_Palette_Select</a></code> to get the colors associated with a palette entry.</p> <h4>since</h4> <p>2.10</p> <hr> <h2 id="ft_palette_data_get">FT_Palette_Data_Get<a class="headerlink" href="#ft_palette_data_get" title="Permanent link">&para;</a></h2> <p>Defined in FT_COLOR_H (freetype/ftcolor.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Palette_Data_Get</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a> face, <a href="ft2-color_management.html#ft_palette_data">FT_Palette_Data</a> *apalette ); </code></pre></div> <p>Retrieve the face's color palette data.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="face">face</td><td class="desc"> <p>The source face handle.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="apalette">apalette</td><td class="desc"> <p>A pointer to an <code><a href="ft2-color_management.html#ft_palette_data">FT_Palette_Data</a></code> structure.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>All arrays in the returned <code><a href="ft2-color_management.html#ft_palette_data">FT_Palette_Data</a></code> structure are read-only.</p> <p>This function always returns an error if the config macro <code>TT_CONFIG_OPTION_COLOR_LAYERS</code> is not defined in <code>ftoption.h</code>.</p> <h4>since</h4> <p>2.10</p> <hr> <h2 id="ft_palette_select">FT_Palette_Select<a class="headerlink" href="#ft_palette_select" title="Permanent link">&para;</a></h2> <p>Defined in FT_COLOR_H (freetype/ftcolor.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Palette_Select</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a> face, <a href="ft2-basic_types.html#ft_ushort">FT_UShort</a> palette_index, <a href="ft2-color_management.html#ft_color">FT_Color</a>* *apalette ); </code></pre></div> <p>This function has two purposes.</p> <p>(1) It activates a palette for rendering color glyphs, and</p> <p>(2) it retrieves all (unmodified) color entries of this palette. This function returns a read-write array, which means that a calling application can modify the palette entries on demand.</p> <p>A corollary of (2) is that calling the function, then modifying some values, then calling the function again with the same arguments resets all color entries to the original &lsquo;CPAL&rsquo; values; all user modifications are lost.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="face">face</td><td class="desc"> <p>The source face handle.</p> </td></tr> <tr><td class="val" id="palette_index">palette_index</td><td class="desc"> <p>The palette index.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="apalette">apalette</td><td class="desc"> <p>An array of color entries for a palette with index <code>palette_index</code>, having <code>num_palette_entries</code> elements (as found in the <code>FT_Palette_Data</code> structure). If <code>apalette</code> is set to <code>NULL</code>, no array gets returned (and no color entries can be modified).</p> <p>In case the font doesn't support color palettes, <code>NULL</code> is returned.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>The array pointed to by <code>apalette_entries</code> is owned and managed by FreeType.</p> <p>This function always returns an error if the config macro <code>TT_CONFIG_OPTION_COLOR_LAYERS</code> is not defined in <code>ftoption.h</code>.</p> <h4>since</h4> <p>2.10</p> <hr> <h2 id="ft_palette_set_foreground_color">FT_Palette_Set_Foreground_Color<a class="headerlink" href="#ft_palette_set_foreground_color" title="Permanent link">&para;</a></h2> <p>Defined in FT_COLOR_H (freetype/ftcolor.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Palette_Set_Foreground_Color</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a> face, <a href="ft2-color_management.html#ft_color">FT_Color</a> foreground_color ); </code></pre></div> <p>&lsquo;COLR&rsquo; uses palette index 0xFFFF to indicate a &lsquo;text foreground color&rsquo;. This function sets this value.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="face">face</td><td class="desc"> <p>The source face handle.</p> </td></tr> <tr><td class="val" id="foreground_color">foreground_color</td><td class="desc"> <p>An <code>FT_Color</code> structure to define the text foreground color.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>If this function isn't called, the text foreground color is set to white opaque (BGRA value 0xFFFFFFFF) if <code><a href="ft2-color_management.html#ft_palette_xxx">FT_PALETTE_FOR_DARK_BACKGROUND</a></code> is present for the current palette, and black opaque (BGRA value 0x000000FF) otherwise, including the case that no palette types are available in the &lsquo;CPAL&rsquo; table.</p> <p>This function always returns an error if the config macro <code>TT_CONFIG_OPTION_COLOR_LAYERS</code> is not defined in <code>ftoption.h</code>.</p> <h4>since</h4> <p>2.10</p> <hr> </article> </div> </div> </main> <footer class="md-footer"> <nav class="md-footer__inner md-grid" aria-label="Footer"> <a href="ft2-glyph_variants.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: Unicode Variation Sequences" rel="prev"> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Previous </span> Unicode Variation Sequences </div> </div> </a> <a href="ft2-layer_management.html" class="md-footer__link md-footer__link--next" aria-label="Next: Glyph Layer Management" rel="next"> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Next </span> Glyph Layer Management </div> </div> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg> </div> </a> </nav> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-footer-copyright"> <div class="md-footer-copyright__highlight"> Copyright 2022 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>. </div> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"base": ".", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "assets/javascripts/workers/search.477d984a.min.js", "version": null}</script> <script src="assets/javascripts/bundle.82b56eb2.min.js"></script> <script src="javascripts/extra.js"></script> </body> </html>
whupdup/frame
real/third_party/freetype-2.12.0/docs/reference/ft2-color_management.html
HTML
gpl-3.0
39,839
<!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="description" content="API Reference Documentation for FreeType-2.12.0"> <meta name="author" content="FreeType Contributors"> <link rel="icon" href="images/favico.ico"> <meta name="generator" content="mkdocs-1.2.1, mkdocs-material-7.1.9"> <title>Computations - FreeType-2.12.0 API Reference</title> <link rel="stylesheet" href="assets/stylesheets/main.ca7ac06f.min.css"> <link rel="stylesheet" href="assets/stylesheets/palette.f1a3b89f.min.css"> <meta name="theme-color" content="#4cae4f"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback"> <style>:root{--md-text-font-family:"Noto Serif";--md-code-font-family:"Roboto Mono"}</style> <link rel="stylesheet" href="stylesheets/extra.css"> </head> <body dir="ltr" data-md-color-scheme="" data-md-color-primary="green" data-md-color-accent="green"> <script>function __prefix(e){return new URL(".",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <label class="md-overlay" for="__drawer"></label> <div data-md-component="skip"> <a href="#computations" class="md-skip"> Skip to content </a> </div> <div data-md-component="announce"> </div> <header class="md-header" data-md-component="header"> <nav class="md-header__inner md-grid" aria-label="Header"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> <label class="md-header__button md-icon" for="__drawer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg> </label> <div class="md-header__title" data-md-component="header-title"> <div class="md-header__ellipsis"> <div class="md-header__topic"> <span class="md-ellipsis"> FreeType-2.12.0 API Reference </span> </div> <div class="md-header__topic" data-md-component="header-topic"> <span class="md-ellipsis"> Computations </span> </div> </div> </div> <label class="md-header__button md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> </label> <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required> <label class="md-search__icon md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </label> <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg> </button> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" data-md-scrollfix> <div class="md-search-result" data-md-component="search-result"> <div class="md-search-result__meta"> Initializing search </div> <ol class="md-search-result__list"></ol> </div> </div> </div> </div> </div> </nav> </header> <div class="md-container" data-md-component="container"> <main class="md-main" data-md-component="main"> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <label class="md-nav__title" for="__drawer"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> FreeType-2.12.0 API Reference </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="index.html" class="md-nav__link"> TOC </a> </li> <li class="md-nav__item"> <a href="ft2-index.html" class="md-nav__link"> Index </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" > <label class="md-nav__link" for="__nav_3"> General Remarks <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="General Remarks" data-md-level="1"> <label class="md-nav__title" for="__nav_3"> <span class="md-nav__icon md-icon"></span> General Remarks </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-preamble.html" class="md-nav__link"> Preamble </a> </li> <li class="md-nav__item"> <a href="ft2-header_inclusion.html" class="md-nav__link"> FreeType's header inclusion scheme </a> </li> <li class="md-nav__item"> <a href="ft2-user_allocation.html" class="md-nav__link"> User allocation </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" > <label class="md-nav__link" for="__nav_4"> Core API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Core API" data-md-level="1"> <label class="md-nav__title" for="__nav_4"> <span class="md-nav__icon md-icon"></span> Core API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-version.html" class="md-nav__link"> FreeType Version </a> </li> <li class="md-nav__item"> <a href="ft2-basic_types.html" class="md-nav__link"> Basic Data Types </a> </li> <li class="md-nav__item"> <a href="ft2-base_interface.html" class="md-nav__link"> Base Interface </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_variants.html" class="md-nav__link"> Unicode Variation Sequences </a> </li> <li class="md-nav__item"> <a href="ft2-color_management.html" class="md-nav__link"> Glyph Color Management </a> </li> <li class="md-nav__item"> <a href="ft2-layer_management.html" class="md-nav__link"> Glyph Layer Management </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_management.html" class="md-nav__link"> Glyph Management </a> </li> <li class="md-nav__item"> <a href="ft2-mac_specific.html" class="md-nav__link"> Mac Specific Interface </a> </li> <li class="md-nav__item"> <a href="ft2-sizes_management.html" class="md-nav__link"> Size Management </a> </li> <li class="md-nav__item"> <a href="ft2-header_file_macros.html" class="md-nav__link"> Header File Macros </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" > <label class="md-nav__link" for="__nav_5"> Format-Specific API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Format-Specific API" data-md-level="1"> <label class="md-nav__title" for="__nav_5"> <span class="md-nav__icon md-icon"></span> Format-Specific API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-multiple_masters.html" class="md-nav__link"> Multiple Masters </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_tables.html" class="md-nav__link"> TrueType Tables </a> </li> <li class="md-nav__item"> <a href="ft2-type1_tables.html" class="md-nav__link"> Type 1 Tables </a> </li> <li class="md-nav__item"> <a href="ft2-sfnt_names.html" class="md-nav__link"> SFNT Names </a> </li> <li class="md-nav__item"> <a href="ft2-bdf_fonts.html" class="md-nav__link"> BDF and PCF Files </a> </li> <li class="md-nav__item"> <a href="ft2-cid_fonts.html" class="md-nav__link"> CID Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-pfr_fonts.html" class="md-nav__link"> PFR Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-winfnt_fonts.html" class="md-nav__link"> Window FNT Files </a> </li> <li class="md-nav__item"> <a href="ft2-svg_fonts.html" class="md-nav__link"> OpenType SVG Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-font_formats.html" class="md-nav__link"> Font Formats </a> </li> <li class="md-nav__item"> <a href="ft2-gasp_table.html" class="md-nav__link"> Gasp Table </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" > <label class="md-nav__link" for="__nav_6"> Controlling FreeType Modules <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Controlling FreeType Modules" data-md-level="1"> <label class="md-nav__title" for="__nav_6"> <span class="md-nav__icon md-icon"></span> Controlling FreeType Modules </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-auto_hinter.html" class="md-nav__link"> The auto-hinter </a> </li> <li class="md-nav__item"> <a href="ft2-cff_driver.html" class="md-nav__link"> The CFF driver </a> </li> <li class="md-nav__item"> <a href="ft2-t1_cid_driver.html" class="md-nav__link"> The Type 1 and CID drivers </a> </li> <li class="md-nav__item"> <a href="ft2-tt_driver.html" class="md-nav__link"> The TrueType driver </a> </li> <li class="md-nav__item"> <a href="ft2-pcf_driver.html" class="md-nav__link"> The PCF driver </a> </li> <li class="md-nav__item"> <a href="ft2-ot_svg_driver.html" class="md-nav__link"> The SVG driver </a> </li> <li class="md-nav__item"> <a href="ft2-properties.html" class="md-nav__link"> Driver properties </a> </li> <li class="md-nav__item"> <a href="ft2-parameter_tags.html" class="md-nav__link"> Parameter Tags </a> </li> <li class="md-nav__item"> <a href="ft2-lcd_rendering.html" class="md-nav__link"> Subpixel Rendering </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" > <label class="md-nav__link" for="__nav_7"> Cache Sub-System <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1"> <label class="md-nav__title" for="__nav_7"> <span class="md-nav__icon md-icon"></span> Cache Sub-System </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-cache_subsystem.html" class="md-nav__link"> Cache Sub-System </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--active md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" checked> <label class="md-nav__link" for="__nav_8"> Support API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Support API" data-md-level="1"> <label class="md-nav__title" for="__nav_8"> <span class="md-nav__icon md-icon"></span> Support API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item md-nav__item--active"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <label class="md-nav__link md-nav__link--active" for="__toc"> Computations <span class="md-nav__icon md-icon"></span> </label> <a href="ft2-computations.html" class="md-nav__link md-nav__link--active"> Computations </a> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_muldiv" class="md-nav__link"> FT_MulDiv </a> </li> <li class="md-nav__item"> <a href="#ft_mulfix" class="md-nav__link"> FT_MulFix </a> </li> <li class="md-nav__item"> <a href="#ft_divfix" class="md-nav__link"> FT_DivFix </a> </li> <li class="md-nav__item"> <a href="#ft_roundfix" class="md-nav__link"> FT_RoundFix </a> </li> <li class="md-nav__item"> <a href="#ft_ceilfix" class="md-nav__link"> FT_CeilFix </a> </li> <li class="md-nav__item"> <a href="#ft_floorfix" class="md-nav__link"> FT_FloorFix </a> </li> <li class="md-nav__item"> <a href="#ft_vector_transform" class="md-nav__link"> FT_Vector_Transform </a> </li> <li class="md-nav__item"> <a href="#ft_matrix_multiply" class="md-nav__link"> FT_Matrix_Multiply </a> </li> <li class="md-nav__item"> <a href="#ft_matrix_invert" class="md-nav__link"> FT_Matrix_Invert </a> </li> <li class="md-nav__item"> <a href="#ft_angle" class="md-nav__link"> FT_Angle </a> </li> <li class="md-nav__item"> <a href="#ft_angle_pi" class="md-nav__link"> FT_ANGLE_PI </a> </li> <li class="md-nav__item"> <a href="#ft_angle_2pi" class="md-nav__link"> FT_ANGLE_2PI </a> </li> <li class="md-nav__item"> <a href="#ft_angle_pi2" class="md-nav__link"> FT_ANGLE_PI2 </a> </li> <li class="md-nav__item"> <a href="#ft_angle_pi4" class="md-nav__link"> FT_ANGLE_PI4 </a> </li> <li class="md-nav__item"> <a href="#ft_sin" class="md-nav__link"> FT_Sin </a> </li> <li class="md-nav__item"> <a href="#ft_cos" class="md-nav__link"> FT_Cos </a> </li> <li class="md-nav__item"> <a href="#ft_tan" class="md-nav__link"> FT_Tan </a> </li> <li class="md-nav__item"> <a href="#ft_atan2" class="md-nav__link"> FT_Atan2 </a> </li> <li class="md-nav__item"> <a href="#ft_angle_diff" class="md-nav__link"> FT_Angle_Diff </a> </li> <li class="md-nav__item"> <a href="#ft_vector_unit" class="md-nav__link"> FT_Vector_Unit </a> </li> <li class="md-nav__item"> <a href="#ft_vector_rotate" class="md-nav__link"> FT_Vector_Rotate </a> </li> <li class="md-nav__item"> <a href="#ft_vector_length" class="md-nav__link"> FT_Vector_Length </a> </li> <li class="md-nav__item"> <a href="#ft_vector_polarize" class="md-nav__link"> FT_Vector_Polarize </a> </li> <li class="md-nav__item"> <a href="#ft_vector_from_polar" class="md-nav__link"> FT_Vector_From_Polar </a> </li> </ul> </nav> </li> <li class="md-nav__item"> <a href="ft2-list_processing.html" class="md-nav__link"> List Processing </a> </li> <li class="md-nav__item"> <a href="ft2-outline_processing.html" class="md-nav__link"> Outline Processing </a> </li> <li class="md-nav__item"> <a href="ft2-quick_advance.html" class="md-nav__link"> Quick retrieval of advance values </a> </li> <li class="md-nav__item"> <a href="ft2-bitmap_handling.html" class="md-nav__link"> Bitmap Handling </a> </li> <li class="md-nav__item"> <a href="ft2-raster.html" class="md-nav__link"> Scanline Converter </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_stroker.html" class="md-nav__link"> Glyph Stroker </a> </li> <li class="md-nav__item"> <a href="ft2-system_interface.html" class="md-nav__link"> System Interface </a> </li> <li class="md-nav__item"> <a href="ft2-module_management.html" class="md-nav__link"> Module Management </a> </li> <li class="md-nav__item"> <a href="ft2-gzip.html" class="md-nav__link"> GZIP Streams </a> </li> <li class="md-nav__item"> <a href="ft2-lzw.html" class="md-nav__link"> LZW Streams </a> </li> <li class="md-nav__item"> <a href="ft2-bzip2.html" class="md-nav__link"> BZIP2 Streams </a> </li> <li class="md-nav__item"> <a href="ft2-debugging_apis.html" class="md-nav__link"> External Debugging APIs </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" > <label class="md-nav__link" for="__nav_9"> Error Codes <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Error Codes" data-md-level="1"> <label class="md-nav__title" for="__nav_9"> <span class="md-nav__icon md-icon"></span> Error Codes </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-error_enumerations.html" class="md-nav__link"> Error Enumerations </a> </li> <li class="md-nav__item"> <a href="ft2-error_code_values.html" class="md-nav__link"> Error Code Values </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" > <label class="md-nav__link" for="__nav_10"> Miscellaneous <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1"> <label class="md-nav__title" for="__nav_10"> <span class="md-nav__icon md-icon"></span> Miscellaneous </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-gx_validation.html" class="md-nav__link"> TrueTypeGX/AAT Validation </a> </li> <li class="md-nav__item"> <a href="ft2-incremental.html" class="md-nav__link"> Incremental Loading </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_engine.html" class="md-nav__link"> The TrueType Engine </a> </li> <li class="md-nav__item"> <a href="ft2-ot_validation.html" class="md-nav__link"> OpenType Validation </a> </li> </ul> </nav> </li> </ul> </nav> </div> </div> </div> <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_muldiv" class="md-nav__link"> FT_MulDiv </a> </li> <li class="md-nav__item"> <a href="#ft_mulfix" class="md-nav__link"> FT_MulFix </a> </li> <li class="md-nav__item"> <a href="#ft_divfix" class="md-nav__link"> FT_DivFix </a> </li> <li class="md-nav__item"> <a href="#ft_roundfix" class="md-nav__link"> FT_RoundFix </a> </li> <li class="md-nav__item"> <a href="#ft_ceilfix" class="md-nav__link"> FT_CeilFix </a> </li> <li class="md-nav__item"> <a href="#ft_floorfix" class="md-nav__link"> FT_FloorFix </a> </li> <li class="md-nav__item"> <a href="#ft_vector_transform" class="md-nav__link"> FT_Vector_Transform </a> </li> <li class="md-nav__item"> <a href="#ft_matrix_multiply" class="md-nav__link"> FT_Matrix_Multiply </a> </li> <li class="md-nav__item"> <a href="#ft_matrix_invert" class="md-nav__link"> FT_Matrix_Invert </a> </li> <li class="md-nav__item"> <a href="#ft_angle" class="md-nav__link"> FT_Angle </a> </li> <li class="md-nav__item"> <a href="#ft_angle_pi" class="md-nav__link"> FT_ANGLE_PI </a> </li> <li class="md-nav__item"> <a href="#ft_angle_2pi" class="md-nav__link"> FT_ANGLE_2PI </a> </li> <li class="md-nav__item"> <a href="#ft_angle_pi2" class="md-nav__link"> FT_ANGLE_PI2 </a> </li> <li class="md-nav__item"> <a href="#ft_angle_pi4" class="md-nav__link"> FT_ANGLE_PI4 </a> </li> <li class="md-nav__item"> <a href="#ft_sin" class="md-nav__link"> FT_Sin </a> </li> <li class="md-nav__item"> <a href="#ft_cos" class="md-nav__link"> FT_Cos </a> </li> <li class="md-nav__item"> <a href="#ft_tan" class="md-nav__link"> FT_Tan </a> </li> <li class="md-nav__item"> <a href="#ft_atan2" class="md-nav__link"> FT_Atan2 </a> </li> <li class="md-nav__item"> <a href="#ft_angle_diff" class="md-nav__link"> FT_Angle_Diff </a> </li> <li class="md-nav__item"> <a href="#ft_vector_unit" class="md-nav__link"> FT_Vector_Unit </a> </li> <li class="md-nav__item"> <a href="#ft_vector_rotate" class="md-nav__link"> FT_Vector_Rotate </a> </li> <li class="md-nav__item"> <a href="#ft_vector_length" class="md-nav__link"> FT_Vector_Length </a> </li> <li class="md-nav__item"> <a href="#ft_vector_polarize" class="md-nav__link"> FT_Vector_Polarize </a> </li> <li class="md-nav__item"> <a href="#ft_vector_from_polar" class="md-nav__link"> FT_Vector_From_Polar </a> </li> </ul> </nav> </div> </div> </div> <div class="md-content" data-md-component="content"> <article class="md-content__inner md-typeset"> <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; <a href="index.html#support-api">Support API</a> &raquo; Computations</p> <hr /> <h1 id="computations">Computations<a class="headerlink" href="#computations" title="Permanent link">&para;</a></h1> <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2> <p>This section contains various functions used to perform computations on 16.16 fixed-float numbers or 2d vectors.</p> <p><strong>Attention</strong>: Most arithmetic functions take <code>FT_Long</code> as arguments. For historical reasons, FreeType was designed under the assumption that <code>FT_Long</code> is a 32-bit integer; results can thus be undefined if the arguments don't fit into 32 bits.</p> <h2 id="ft_muldiv">FT_MulDiv<a class="headerlink" href="#ft_muldiv" title="Permanent link">&para;</a></h2> <p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_long">FT_Long</a> ) <b>FT_MulDiv</b>( <a href="ft2-basic_types.html#ft_long">FT_Long</a> a, <a href="ft2-basic_types.html#ft_long">FT_Long</a> b, <a href="ft2-basic_types.html#ft_long">FT_Long</a> c ); </code></pre></div> <p>Compute <code>(a*b)/c</code> with maximum accuracy, using a 64-bit intermediate integer whenever necessary.</p> <p>This function isn't necessarily as fast as some processor-specific operations, but is at least completely portable.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="a">a</td><td class="desc"> <p>The first multiplier.</p> </td></tr> <tr><td class="val" id="b">b</td><td class="desc"> <p>The second multiplier.</p> </td></tr> <tr><td class="val" id="c">c</td><td class="desc"> <p>The divisor.</p> </td></tr> </table> <h4>return</h4> <p>The result of <code>(a*b)/c</code>. This function never traps when trying to divide by zero; it simply returns &lsquo;MaxInt&rsquo; or &lsquo;MinInt&rsquo; depending on the signs of <code>a</code> and <code>b</code>.</p> <hr> <h2 id="ft_mulfix">FT_MulFix<a class="headerlink" href="#ft_mulfix" title="Permanent link">&para;</a></h2> <p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_long">FT_Long</a> ) <b>FT_MulFix</b>( <a href="ft2-basic_types.html#ft_long">FT_Long</a> a, <a href="ft2-basic_types.html#ft_long">FT_Long</a> b ); </code></pre></div> <p>Compute <code>(a*b)/0x10000</code> with maximum accuracy. Its main use is to multiply a given value by a 16.16 fixed-point factor.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="a">a</td><td class="desc"> <p>The first multiplier.</p> </td></tr> <tr><td class="val" id="b">b</td><td class="desc"> <p>The second multiplier. Use a 16.16 factor here whenever possible (see note below).</p> </td></tr> </table> <h4>return</h4> <p>The result of <code>(a*b)/0x10000</code>.</p> <h4>note</h4> <p>This function has been optimized for the case where the absolute value of <code>a</code> is less than 2048, and <code>b</code> is a 16.16 scaling factor. As this happens mainly when scaling from notional units to fractional pixels in FreeType, it resulted in noticeable speed improvements between versions 2.x and 1.x.</p> <p>As a conclusion, always try to place a 16.16 factor as the <em>second</em> argument of this function; this can make a great difference.</p> <hr> <h2 id="ft_divfix">FT_DivFix<a class="headerlink" href="#ft_divfix" title="Permanent link">&para;</a></h2> <p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_long">FT_Long</a> ) <b>FT_DivFix</b>( <a href="ft2-basic_types.html#ft_long">FT_Long</a> a, <a href="ft2-basic_types.html#ft_long">FT_Long</a> b ); </code></pre></div> <p>Compute <code>(a*0x10000)/b</code> with maximum accuracy. Its main use is to divide a given value by a 16.16 fixed-point factor.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="a">a</td><td class="desc"> <p>The numerator.</p> </td></tr> <tr><td class="val" id="b">b</td><td class="desc"> <p>The denominator. Use a 16.16 factor here.</p> </td></tr> </table> <h4>return</h4> <p>The result of <code>(a*0x10000)/b</code>.</p> <hr> <h2 id="ft_roundfix">FT_RoundFix<a class="headerlink" href="#ft_roundfix" title="Permanent link">&para;</a></h2> <p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a> ) <b>FT_RoundFix</b>( <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a> a ); </code></pre></div> <p>Round a 16.16 fixed number.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="a">a</td><td class="desc"> <p>The number to be rounded.</p> </td></tr> </table> <h4>return</h4> <p><code>a</code> rounded to the nearest 16.16 fixed integer, halfway cases away from zero.</p> <h4>note</h4> <p>The function uses wrap-around arithmetic.</p> <hr> <h2 id="ft_ceilfix">FT_CeilFix<a class="headerlink" href="#ft_ceilfix" title="Permanent link">&para;</a></h2> <p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a> ) <b>FT_CeilFix</b>( <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a> a ); </code></pre></div> <p>Compute the smallest following integer of a 16.16 fixed number.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="a">a</td><td class="desc"> <p>The number for which the ceiling function is to be computed.</p> </td></tr> </table> <h4>return</h4> <p><code>a</code> rounded towards plus infinity.</p> <h4>note</h4> <p>The function uses wrap-around arithmetic.</p> <hr> <h2 id="ft_floorfix">FT_FloorFix<a class="headerlink" href="#ft_floorfix" title="Permanent link">&para;</a></h2> <p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a> ) <b>FT_FloorFix</b>( <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a> a ); </code></pre></div> <p>Compute the largest previous integer of a 16.16 fixed number.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="a">a</td><td class="desc"> <p>The number for which the floor function is to be computed.</p> </td></tr> </table> <h4>return</h4> <p><code>a</code> rounded towards minus infinity.</p> <hr> <h2 id="ft_vector_transform">FT_Vector_Transform<a class="headerlink" href="#ft_vector_transform" title="Permanent link">&para;</a></h2> <p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> ) <b>FT_Vector_Transform</b>( <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>* vector, <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_matrix">FT_Matrix</a>* matrix ); </code></pre></div> <p>Transform a single vector through a 2x2 matrix.</p> <h4>inout</h4> <table class="fields"> <tr><td class="val" id="vector">vector</td><td class="desc"> <p>The target vector to transform.</p> </td></tr> </table> <h4>input</h4> <table class="fields"> <tr><td class="val" id="matrix">matrix</td><td class="desc"> <p>A pointer to the source 2x2 matrix.</p> </td></tr> </table> <h4>note</h4> <p>The result is undefined if either <code>vector</code> or <code>matrix</code> is invalid.</p> <hr> <h2 id="ft_matrix_multiply">FT_Matrix_Multiply<a class="headerlink" href="#ft_matrix_multiply" title="Permanent link">&para;</a></h2> <p>Defined in FT_GLYPH_H (freetype/ftglyph.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> ) <b>FT_Matrix_Multiply</b>( <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_matrix">FT_Matrix</a>* a, <a href="ft2-basic_types.html#ft_matrix">FT_Matrix</a>* b ); </code></pre></div> <p>Perform the matrix operation <code>b = a*b</code>.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="a">a</td><td class="desc"> <p>A pointer to matrix <code>a</code>.</p> </td></tr> </table> <h4>inout</h4> <table class="fields"> <tr><td class="val" id="b">b</td><td class="desc"> <p>A pointer to matrix <code>b</code>.</p> </td></tr> </table> <h4>note</h4> <p>The result is undefined if either <code>a</code> or <code>b</code> is zero.</p> <p>Since the function uses wrap-around arithmetic, results become meaningless if the arguments are very large.</p> <hr> <h2 id="ft_matrix_invert">FT_Matrix_Invert<a class="headerlink" href="#ft_matrix_invert" title="Permanent link">&para;</a></h2> <p>Defined in FT_GLYPH_H (freetype/ftglyph.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Matrix_Invert</b>( <a href="ft2-basic_types.html#ft_matrix">FT_Matrix</a>* matrix ); </code></pre></div> <p>Invert a 2x2 matrix. Return an error if it can't be inverted.</p> <h4>inout</h4> <table class="fields"> <tr><td class="val" id="matrix">matrix</td><td class="desc"> <p>A pointer to the target matrix. Remains untouched in case of error.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <hr> <h2 id="ft_angle">FT_Angle<a class="headerlink" href="#ft_angle" title="Permanent link">&para;</a></h2> <p>Defined in FT_TRIGONOMETRY_H (freetype/fttrigon.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a> <b>FT_Angle</b>; </code></pre></div> <p>This type is used to model angle values in FreeType. Note that the angle is a 16.16 fixed-point value expressed in degrees.</p> <hr> <h2 id="ft_angle_pi">FT_ANGLE_PI<a class="headerlink" href="#ft_angle_pi" title="Permanent link">&para;</a></h2> <p>Defined in FT_TRIGONOMETRY_H (freetype/fttrigon.h).</p> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_ANGLE_PI</b> ( 180L &lt;&lt; 16 ) </code></pre></div> <p>The angle pi expressed in <code><a href="ft2-computations.html#ft_angle">FT_Angle</a></code> units.</p> <hr> <h2 id="ft_angle_2pi">FT_ANGLE_2PI<a class="headerlink" href="#ft_angle_2pi" title="Permanent link">&para;</a></h2> <p>Defined in FT_TRIGONOMETRY_H (freetype/fttrigon.h).</p> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_ANGLE_2PI</b> ( <a href="ft2-computations.html#ft_angle_pi">FT_ANGLE_PI</a> * 2 ) </code></pre></div> <p>The angle 2*pi expressed in <code><a href="ft2-computations.html#ft_angle">FT_Angle</a></code> units.</p> <hr> <h2 id="ft_angle_pi2">FT_ANGLE_PI2<a class="headerlink" href="#ft_angle_pi2" title="Permanent link">&para;</a></h2> <p>Defined in FT_TRIGONOMETRY_H (freetype/fttrigon.h).</p> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_ANGLE_PI2</b> ( <a href="ft2-computations.html#ft_angle_pi">FT_ANGLE_PI</a> / 2 ) </code></pre></div> <p>The angle pi/2 expressed in <code><a href="ft2-computations.html#ft_angle">FT_Angle</a></code> units.</p> <hr> <h2 id="ft_angle_pi4">FT_ANGLE_PI4<a class="headerlink" href="#ft_angle_pi4" title="Permanent link">&para;</a></h2> <p>Defined in FT_TRIGONOMETRY_H (freetype/fttrigon.h).</p> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_ANGLE_PI4</b> ( <a href="ft2-computations.html#ft_angle_pi">FT_ANGLE_PI</a> / 4 ) </code></pre></div> <p>The angle pi/4 expressed in <code><a href="ft2-computations.html#ft_angle">FT_Angle</a></code> units.</p> <hr> <h2 id="ft_sin">FT_Sin<a class="headerlink" href="#ft_sin" title="Permanent link">&para;</a></h2> <p>Defined in FT_TRIGONOMETRY_H (freetype/fttrigon.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a> ) <b>FT_Sin</b>( <a href="ft2-computations.html#ft_angle">FT_Angle</a> angle ); </code></pre></div> <p>Return the sinus of a given angle in fixed-point format.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="angle">angle</td><td class="desc"> <p>The input angle.</p> </td></tr> </table> <h4>return</h4> <p>The sinus value.</p> <h4>note</h4> <p>If you need both the sinus and cosinus for a given angle, use the function <code><a href="ft2-computations.html#ft_vector_unit">FT_Vector_Unit</a></code>.</p> <hr> <h2 id="ft_cos">FT_Cos<a class="headerlink" href="#ft_cos" title="Permanent link">&para;</a></h2> <p>Defined in FT_TRIGONOMETRY_H (freetype/fttrigon.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a> ) <b>FT_Cos</b>( <a href="ft2-computations.html#ft_angle">FT_Angle</a> angle ); </code></pre></div> <p>Return the cosinus of a given angle in fixed-point format.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="angle">angle</td><td class="desc"> <p>The input angle.</p> </td></tr> </table> <h4>return</h4> <p>The cosinus value.</p> <h4>note</h4> <p>If you need both the sinus and cosinus for a given angle, use the function <code><a href="ft2-computations.html#ft_vector_unit">FT_Vector_Unit</a></code>.</p> <hr> <h2 id="ft_tan">FT_Tan<a class="headerlink" href="#ft_tan" title="Permanent link">&para;</a></h2> <p>Defined in FT_TRIGONOMETRY_H (freetype/fttrigon.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a> ) <b>FT_Tan</b>( <a href="ft2-computations.html#ft_angle">FT_Angle</a> angle ); </code></pre></div> <p>Return the tangent of a given angle in fixed-point format.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="angle">angle</td><td class="desc"> <p>The input angle.</p> </td></tr> </table> <h4>return</h4> <p>The tangent value.</p> <hr> <h2 id="ft_atan2">FT_Atan2<a class="headerlink" href="#ft_atan2" title="Permanent link">&para;</a></h2> <p>Defined in FT_TRIGONOMETRY_H (freetype/fttrigon.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-computations.html#ft_angle">FT_Angle</a> ) <b>FT_Atan2</b>( <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a> x, <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a> y ); </code></pre></div> <p>Return the arc-tangent corresponding to a given vector (x,y) in the 2d plane.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="x">x</td><td class="desc"> <p>The horizontal vector coordinate.</p> </td></tr> <tr><td class="val" id="y">y</td><td class="desc"> <p>The vertical vector coordinate.</p> </td></tr> </table> <h4>return</h4> <p>The arc-tangent value (i.e. angle).</p> <hr> <h2 id="ft_angle_diff">FT_Angle_Diff<a class="headerlink" href="#ft_angle_diff" title="Permanent link">&para;</a></h2> <p>Defined in FT_TRIGONOMETRY_H (freetype/fttrigon.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-computations.html#ft_angle">FT_Angle</a> ) <b>FT_Angle_Diff</b>( <a href="ft2-computations.html#ft_angle">FT_Angle</a> angle1, <a href="ft2-computations.html#ft_angle">FT_Angle</a> angle2 ); </code></pre></div> <p>Return the difference between two angles. The result is always constrained to the ]-PI..PI] interval.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="angle1">angle1</td><td class="desc"> <p>First angle.</p> </td></tr> <tr><td class="val" id="angle2">angle2</td><td class="desc"> <p>Second angle.</p> </td></tr> </table> <h4>return</h4> <p>Constrained value of <code>angle2-angle1</code>.</p> <hr> <h2 id="ft_vector_unit">FT_Vector_Unit<a class="headerlink" href="#ft_vector_unit" title="Permanent link">&para;</a></h2> <p>Defined in FT_TRIGONOMETRY_H (freetype/fttrigon.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> ) <b>FT_Vector_Unit</b>( <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>* vec, <a href="ft2-computations.html#ft_angle">FT_Angle</a> angle ); </code></pre></div> <p>Return the unit vector corresponding to a given angle. After the call, the value of <code>vec.x</code> will be <code>cos(angle)</code>, and the value of <code>vec.y</code> will be <code>sin(angle)</code>.</p> <p>This function is useful to retrieve both the sinus and cosinus of a given angle quickly.</p> <h4>output</h4> <table class="fields"> <tr><td class="val" id="vec">vec</td><td class="desc"> <p>The address of target vector.</p> </td></tr> </table> <h4>input</h4> <table class="fields"> <tr><td class="val" id="angle">angle</td><td class="desc"> <p>The input angle.</p> </td></tr> </table> <hr> <h2 id="ft_vector_rotate">FT_Vector_Rotate<a class="headerlink" href="#ft_vector_rotate" title="Permanent link">&para;</a></h2> <p>Defined in FT_TRIGONOMETRY_H (freetype/fttrigon.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> ) <b>FT_Vector_Rotate</b>( <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>* vec, <a href="ft2-computations.html#ft_angle">FT_Angle</a> angle ); </code></pre></div> <p>Rotate a vector by a given angle.</p> <h4>inout</h4> <table class="fields"> <tr><td class="val" id="vec">vec</td><td class="desc"> <p>The address of target vector.</p> </td></tr> </table> <h4>input</h4> <table class="fields"> <tr><td class="val" id="angle">angle</td><td class="desc"> <p>The input angle.</p> </td></tr> </table> <hr> <h2 id="ft_vector_length">FT_Vector_Length<a class="headerlink" href="#ft_vector_length" title="Permanent link">&para;</a></h2> <p>Defined in FT_TRIGONOMETRY_H (freetype/fttrigon.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a> ) <b>FT_Vector_Length</b>( <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>* vec ); </code></pre></div> <p>Return the length of a given vector.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="vec">vec</td><td class="desc"> <p>The address of target vector.</p> </td></tr> </table> <h4>return</h4> <p>The vector length, expressed in the same units that the original vector coordinates.</p> <hr> <h2 id="ft_vector_polarize">FT_Vector_Polarize<a class="headerlink" href="#ft_vector_polarize" title="Permanent link">&para;</a></h2> <p>Defined in FT_TRIGONOMETRY_H (freetype/fttrigon.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> ) <b>FT_Vector_Polarize</b>( <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>* vec, <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a> *length, <a href="ft2-computations.html#ft_angle">FT_Angle</a> *angle ); </code></pre></div> <p>Compute both the length and angle of a given vector.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="vec">vec</td><td class="desc"> <p>The address of source vector.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="length">length</td><td class="desc"> <p>The vector length.</p> </td></tr> <tr><td class="val" id="angle">angle</td><td class="desc"> <p>The vector angle.</p> </td></tr> </table> <hr> <h2 id="ft_vector_from_polar">FT_Vector_From_Polar<a class="headerlink" href="#ft_vector_from_polar" title="Permanent link">&para;</a></h2> <p>Defined in FT_TRIGONOMETRY_H (freetype/fttrigon.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> ) <b>FT_Vector_From_Polar</b>( <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>* vec, <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a> length, <a href="ft2-computations.html#ft_angle">FT_Angle</a> angle ); </code></pre></div> <p>Compute vector coordinates from a length and angle.</p> <h4>output</h4> <table class="fields"> <tr><td class="val" id="vec">vec</td><td class="desc"> <p>The address of source vector.</p> </td></tr> </table> <h4>input</h4> <table class="fields"> <tr><td class="val" id="length">length</td><td class="desc"> <p>The vector length.</p> </td></tr> <tr><td class="val" id="angle">angle</td><td class="desc"> <p>The vector angle.</p> </td></tr> </table> <hr> </article> </div> </div> </main> <footer class="md-footer"> <nav class="md-footer__inner md-grid" aria-label="Footer"> <a href="ft2-cache_subsystem.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: Cache Sub-System" rel="prev"> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Previous </span> Cache Sub-System </div> </div> </a> <a href="ft2-list_processing.html" class="md-footer__link md-footer__link--next" aria-label="Next: List Processing" rel="next"> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Next </span> List Processing </div> </div> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg> </div> </a> </nav> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-footer-copyright"> <div class="md-footer-copyright__highlight"> Copyright 2022 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>. </div> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"base": ".", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "assets/javascripts/workers/search.477d984a.min.js", "version": null}</script> <script src="assets/javascripts/bundle.82b56eb2.min.js"></script> <script src="javascripts/extra.js"></script> </body> </html>
whupdup/frame
real/third_party/freetype-2.12.0/docs/reference/ft2-computations.html
HTML
gpl-3.0
52,520
<!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="description" content="API Reference Documentation for FreeType-2.12.0"> <meta name="author" content="FreeType Contributors"> <link rel="icon" href="images/favico.ico"> <meta name="generator" content="mkdocs-1.2.1, mkdocs-material-7.1.9"> <title>External Debugging APIs - FreeType-2.12.0 API Reference</title> <link rel="stylesheet" href="assets/stylesheets/main.ca7ac06f.min.css"> <link rel="stylesheet" href="assets/stylesheets/palette.f1a3b89f.min.css"> <meta name="theme-color" content="#4cae4f"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback"> <style>:root{--md-text-font-family:"Noto Serif";--md-code-font-family:"Roboto Mono"}</style> <link rel="stylesheet" href="stylesheets/extra.css"> </head> <body dir="ltr" data-md-color-scheme="" data-md-color-primary="green" data-md-color-accent="green"> <script>function __prefix(e){return new URL(".",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <label class="md-overlay" for="__drawer"></label> <div data-md-component="skip"> <a href="#external-debugging-apis" class="md-skip"> Skip to content </a> </div> <div data-md-component="announce"> </div> <header class="md-header" data-md-component="header"> <nav class="md-header__inner md-grid" aria-label="Header"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> <label class="md-header__button md-icon" for="__drawer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg> </label> <div class="md-header__title" data-md-component="header-title"> <div class="md-header__ellipsis"> <div class="md-header__topic"> <span class="md-ellipsis"> FreeType-2.12.0 API Reference </span> </div> <div class="md-header__topic" data-md-component="header-topic"> <span class="md-ellipsis"> External Debugging APIs </span> </div> </div> </div> <label class="md-header__button md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> </label> <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required> <label class="md-search__icon md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </label> <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg> </button> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" data-md-scrollfix> <div class="md-search-result" data-md-component="search-result"> <div class="md-search-result__meta"> Initializing search </div> <ol class="md-search-result__list"></ol> </div> </div> </div> </div> </div> </nav> </header> <div class="md-container" data-md-component="container"> <main class="md-main" data-md-component="main"> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <label class="md-nav__title" for="__drawer"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> FreeType-2.12.0 API Reference </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="index.html" class="md-nav__link"> TOC </a> </li> <li class="md-nav__item"> <a href="ft2-index.html" class="md-nav__link"> Index </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" > <label class="md-nav__link" for="__nav_3"> General Remarks <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="General Remarks" data-md-level="1"> <label class="md-nav__title" for="__nav_3"> <span class="md-nav__icon md-icon"></span> General Remarks </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-preamble.html" class="md-nav__link"> Preamble </a> </li> <li class="md-nav__item"> <a href="ft2-header_inclusion.html" class="md-nav__link"> FreeType's header inclusion scheme </a> </li> <li class="md-nav__item"> <a href="ft2-user_allocation.html" class="md-nav__link"> User allocation </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" > <label class="md-nav__link" for="__nav_4"> Core API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Core API" data-md-level="1"> <label class="md-nav__title" for="__nav_4"> <span class="md-nav__icon md-icon"></span> Core API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-version.html" class="md-nav__link"> FreeType Version </a> </li> <li class="md-nav__item"> <a href="ft2-basic_types.html" class="md-nav__link"> Basic Data Types </a> </li> <li class="md-nav__item"> <a href="ft2-base_interface.html" class="md-nav__link"> Base Interface </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_variants.html" class="md-nav__link"> Unicode Variation Sequences </a> </li> <li class="md-nav__item"> <a href="ft2-color_management.html" class="md-nav__link"> Glyph Color Management </a> </li> <li class="md-nav__item"> <a href="ft2-layer_management.html" class="md-nav__link"> Glyph Layer Management </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_management.html" class="md-nav__link"> Glyph Management </a> </li> <li class="md-nav__item"> <a href="ft2-mac_specific.html" class="md-nav__link"> Mac Specific Interface </a> </li> <li class="md-nav__item"> <a href="ft2-sizes_management.html" class="md-nav__link"> Size Management </a> </li> <li class="md-nav__item"> <a href="ft2-header_file_macros.html" class="md-nav__link"> Header File Macros </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" > <label class="md-nav__link" for="__nav_5"> Format-Specific API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Format-Specific API" data-md-level="1"> <label class="md-nav__title" for="__nav_5"> <span class="md-nav__icon md-icon"></span> Format-Specific API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-multiple_masters.html" class="md-nav__link"> Multiple Masters </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_tables.html" class="md-nav__link"> TrueType Tables </a> </li> <li class="md-nav__item"> <a href="ft2-type1_tables.html" class="md-nav__link"> Type 1 Tables </a> </li> <li class="md-nav__item"> <a href="ft2-sfnt_names.html" class="md-nav__link"> SFNT Names </a> </li> <li class="md-nav__item"> <a href="ft2-bdf_fonts.html" class="md-nav__link"> BDF and PCF Files </a> </li> <li class="md-nav__item"> <a href="ft2-cid_fonts.html" class="md-nav__link"> CID Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-pfr_fonts.html" class="md-nav__link"> PFR Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-winfnt_fonts.html" class="md-nav__link"> Window FNT Files </a> </li> <li class="md-nav__item"> <a href="ft2-svg_fonts.html" class="md-nav__link"> OpenType SVG Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-font_formats.html" class="md-nav__link"> Font Formats </a> </li> <li class="md-nav__item"> <a href="ft2-gasp_table.html" class="md-nav__link"> Gasp Table </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" > <label class="md-nav__link" for="__nav_6"> Controlling FreeType Modules <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Controlling FreeType Modules" data-md-level="1"> <label class="md-nav__title" for="__nav_6"> <span class="md-nav__icon md-icon"></span> Controlling FreeType Modules </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-auto_hinter.html" class="md-nav__link"> The auto-hinter </a> </li> <li class="md-nav__item"> <a href="ft2-cff_driver.html" class="md-nav__link"> The CFF driver </a> </li> <li class="md-nav__item"> <a href="ft2-t1_cid_driver.html" class="md-nav__link"> The Type 1 and CID drivers </a> </li> <li class="md-nav__item"> <a href="ft2-tt_driver.html" class="md-nav__link"> The TrueType driver </a> </li> <li class="md-nav__item"> <a href="ft2-pcf_driver.html" class="md-nav__link"> The PCF driver </a> </li> <li class="md-nav__item"> <a href="ft2-ot_svg_driver.html" class="md-nav__link"> The SVG driver </a> </li> <li class="md-nav__item"> <a href="ft2-properties.html" class="md-nav__link"> Driver properties </a> </li> <li class="md-nav__item"> <a href="ft2-parameter_tags.html" class="md-nav__link"> Parameter Tags </a> </li> <li class="md-nav__item"> <a href="ft2-lcd_rendering.html" class="md-nav__link"> Subpixel Rendering </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" > <label class="md-nav__link" for="__nav_7"> Cache Sub-System <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1"> <label class="md-nav__title" for="__nav_7"> <span class="md-nav__icon md-icon"></span> Cache Sub-System </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-cache_subsystem.html" class="md-nav__link"> Cache Sub-System </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--active md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" checked> <label class="md-nav__link" for="__nav_8"> Support API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Support API" data-md-level="1"> <label class="md-nav__title" for="__nav_8"> <span class="md-nav__icon md-icon"></span> Support API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-computations.html" class="md-nav__link"> Computations </a> </li> <li class="md-nav__item"> <a href="ft2-list_processing.html" class="md-nav__link"> List Processing </a> </li> <li class="md-nav__item"> <a href="ft2-outline_processing.html" class="md-nav__link"> Outline Processing </a> </li> <li class="md-nav__item"> <a href="ft2-quick_advance.html" class="md-nav__link"> Quick retrieval of advance values </a> </li> <li class="md-nav__item"> <a href="ft2-bitmap_handling.html" class="md-nav__link"> Bitmap Handling </a> </li> <li class="md-nav__item"> <a href="ft2-raster.html" class="md-nav__link"> Scanline Converter </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_stroker.html" class="md-nav__link"> Glyph Stroker </a> </li> <li class="md-nav__item"> <a href="ft2-system_interface.html" class="md-nav__link"> System Interface </a> </li> <li class="md-nav__item"> <a href="ft2-module_management.html" class="md-nav__link"> Module Management </a> </li> <li class="md-nav__item"> <a href="ft2-gzip.html" class="md-nav__link"> GZIP Streams </a> </li> <li class="md-nav__item"> <a href="ft2-lzw.html" class="md-nav__link"> LZW Streams </a> </li> <li class="md-nav__item"> <a href="ft2-bzip2.html" class="md-nav__link"> BZIP2 Streams </a> </li> <li class="md-nav__item md-nav__item--active"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <label class="md-nav__link md-nav__link--active" for="__toc"> External Debugging APIs <span class="md-nav__icon md-icon"></span> </label> <a href="ft2-debugging_apis.html" class="md-nav__link md-nav__link--active"> External Debugging APIs </a> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_trace_set_level" class="md-nav__link"> FT_Trace_Set_Level </a> </li> <li class="md-nav__item"> <a href="#ft_trace_set_default_level" class="md-nav__link"> FT_Trace_Set_Default_Level </a> </li> <li class="md-nav__item"> <a href="#ft_custom_log_handler" class="md-nav__link"> FT_Custom_Log_Handler </a> </li> <li class="md-nav__item"> <a href="#ft_set_log_handler" class="md-nav__link"> FT_Set_Log_Handler </a> </li> <li class="md-nav__item"> <a href="#ft_set_default_log_handler" class="md-nav__link"> FT_Set_Default_Log_Handler </a> </li> </ul> </nav> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" > <label class="md-nav__link" for="__nav_9"> Error Codes <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Error Codes" data-md-level="1"> <label class="md-nav__title" for="__nav_9"> <span class="md-nav__icon md-icon"></span> Error Codes </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-error_enumerations.html" class="md-nav__link"> Error Enumerations </a> </li> <li class="md-nav__item"> <a href="ft2-error_code_values.html" class="md-nav__link"> Error Code Values </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" > <label class="md-nav__link" for="__nav_10"> Miscellaneous <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1"> <label class="md-nav__title" for="__nav_10"> <span class="md-nav__icon md-icon"></span> Miscellaneous </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-gx_validation.html" class="md-nav__link"> TrueTypeGX/AAT Validation </a> </li> <li class="md-nav__item"> <a href="ft2-incremental.html" class="md-nav__link"> Incremental Loading </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_engine.html" class="md-nav__link"> The TrueType Engine </a> </li> <li class="md-nav__item"> <a href="ft2-ot_validation.html" class="md-nav__link"> OpenType Validation </a> </li> </ul> </nav> </li> </ul> </nav> </div> </div> </div> <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_trace_set_level" class="md-nav__link"> FT_Trace_Set_Level </a> </li> <li class="md-nav__item"> <a href="#ft_trace_set_default_level" class="md-nav__link"> FT_Trace_Set_Default_Level </a> </li> <li class="md-nav__item"> <a href="#ft_custom_log_handler" class="md-nav__link"> FT_Custom_Log_Handler </a> </li> <li class="md-nav__item"> <a href="#ft_set_log_handler" class="md-nav__link"> FT_Set_Log_Handler </a> </li> <li class="md-nav__item"> <a href="#ft_set_default_log_handler" class="md-nav__link"> FT_Set_Default_Log_Handler </a> </li> </ul> </nav> </div> </div> </div> <div class="md-content" data-md-component="content"> <article class="md-content__inner md-typeset"> <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; <a href="index.html#support-api">Support API</a> &raquo; External Debugging APIs</p> <hr /> <h1 id="external-debugging-apis">External Debugging APIs<a class="headerlink" href="#external-debugging-apis" title="Permanent link">&para;</a></h1> <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2> <p>This section contains the declarations of public functions that enables fine control of what the <code>FT_DEBUG_LOGGING</code> macro outputs.</p> <h2 id="ft_trace_set_level">FT_Trace_Set_Level<a class="headerlink" href="#ft_trace_set_level" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> ) <b>FT_Trace_Set_Level</b>( <span class="keyword">const</span> <span class="keyword">char</span>* tracing_level ); </code></pre></div> <p>Change the levels of tracing components of FreeType at run time.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="tracing_level">tracing_level</td><td class="desc"> <p>New tracing value.</p> </td></tr> </table> <h4>example</h4> <p>The following call makes FreeType trace everything but the &lsquo;memory&rsquo; component. <div class="highlight"><pre><span></span><code>FT_Trace_Set_Level( &quot;any:7 memory:0 ); </code></pre></div></p> <h4>note</h4> <p>This function does nothing if compilation option <code>FT_DEBUG_LOGGING</code> isn't set.</p> <h4>since</h4> <p>2.11</p> <hr> <h2 id="ft_trace_set_default_level">FT_Trace_Set_Default_Level<a class="headerlink" href="#ft_trace_set_default_level" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> ) <b>FT_Trace_Set_Default_Level</b>( <span class="keyword">void</span> ); </code></pre></div> <p>Reset tracing value of FreeType's components to the default value (i.e., to the value of the <code>FT2_DEBUG</code> environment value or to NULL if <code>FT2_DEBUG</code> is not set).</p> <h4>note</h4> <p>This function does nothing if compilation option <code>FT_DEBUG_LOGGING</code> isn't set.</p> <h4>since</h4> <p>2.11</p> <hr> <h2 id="ft_custom_log_handler">FT_Custom_Log_Handler<a class="headerlink" href="#ft_custom_log_handler" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">void</span> (*<b>FT_Custom_Log_Handler</b>)( <span class="keyword">const</span> <span class="keyword">char</span>* ft_component, <span class="keyword">const</span> <span class="keyword">char</span>* fmt, va_list args ); </code></pre></div> <p>A function typedef that is used to handle the logging of tracing and debug messages on a file system.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="ft_component">ft_component</td><td class="desc"> <p>The name of <code>FT_COMPONENT</code> from which the current debug or error message is produced.</p> </td></tr> <tr><td class="val" id="fmt">fmt</td><td class="desc"> <p>Actual debug or tracing message.</p> </td></tr> <tr><td class="val" id="args">args</td><td class="desc"> <p>Arguments of debug or tracing messages.</p> </td></tr> </table> <h4>since</h4> <p>2.11</p> <hr> <h2 id="ft_set_log_handler">FT_Set_Log_Handler<a class="headerlink" href="#ft_set_log_handler" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> ) <b>FT_Set_Log_Handler</b>( <a href="ft2-debugging_apis.html#ft_custom_log_handler">FT_Custom_Log_Handler</a> handler ); </code></pre></div> <p>A function to set a custom log handler.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="handler">handler</td><td class="desc"> <p>New logging function.</p> </td></tr> </table> <h4>note</h4> <p>This function does nothing if compilation option <code>FT_DEBUG_LOGGING</code> isn't set.</p> <h4>since</h4> <p>2.11</p> <hr> <h2 id="ft_set_default_log_handler">FT_Set_Default_Log_Handler<a class="headerlink" href="#ft_set_default_log_handler" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> ) <b>FT_Set_Default_Log_Handler</b>( <span class="keyword">void</span> ); </code></pre></div> <p>A function to undo the effect of <code><a href="ft2-debugging_apis.html#ft_set_log_handler">FT_Set_Log_Handler</a></code>, resetting the log handler to FreeType's built-in version.</p> <h4>note</h4> <p>This function does nothing if compilation option <code>FT_DEBUG_LOGGING</code> isn't set.</p> <h4>since</h4> <p>2.11</p> <hr> </article> </div> </div> </main> <footer class="md-footer"> <nav class="md-footer__inner md-grid" aria-label="Footer"> <a href="ft2-bzip2.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: BZIP2 Streams" rel="prev"> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Previous </span> BZIP2 Streams </div> </div> </a> <a href="ft2-error_enumerations.html" class="md-footer__link md-footer__link--next" aria-label="Next: Error Enumerations" rel="next"> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Next </span> Error Enumerations </div> </div> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg> </div> </a> </nav> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-footer-copyright"> <div class="md-footer-copyright__highlight"> Copyright 2022 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>. </div> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"base": ".", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "assets/javascripts/workers/search.477d984a.min.js", "version": null}</script> <script src="assets/javascripts/bundle.82b56eb2.min.js"></script> <script src="javascripts/extra.js"></script> </body> </html>
whupdup/frame
real/third_party/freetype-2.12.0/docs/reference/ft2-debugging_apis.html
HTML
gpl-3.0
32,523
<!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="description" content="API Reference Documentation for FreeType-2.12.0"> <meta name="author" content="FreeType Contributors"> <link rel="icon" href="images/favico.ico"> <meta name="generator" content="mkdocs-1.2.1, mkdocs-material-7.1.9"> <title>Error Code Values - FreeType-2.12.0 API Reference</title> <link rel="stylesheet" href="assets/stylesheets/main.ca7ac06f.min.css"> <link rel="stylesheet" href="assets/stylesheets/palette.f1a3b89f.min.css"> <meta name="theme-color" content="#4cae4f"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback"> <style>:root{--md-text-font-family:"Noto Serif";--md-code-font-family:"Roboto Mono"}</style> <link rel="stylesheet" href="stylesheets/extra.css"> </head> <body dir="ltr" data-md-color-scheme="" data-md-color-primary="green" data-md-color-accent="green"> <script>function __prefix(e){return new URL(".",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <label class="md-overlay" for="__drawer"></label> <div data-md-component="skip"> <a href="#error-code-values" class="md-skip"> Skip to content </a> </div> <div data-md-component="announce"> </div> <header class="md-header" data-md-component="header"> <nav class="md-header__inner md-grid" aria-label="Header"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> <label class="md-header__button md-icon" for="__drawer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg> </label> <div class="md-header__title" data-md-component="header-title"> <div class="md-header__ellipsis"> <div class="md-header__topic"> <span class="md-ellipsis"> FreeType-2.12.0 API Reference </span> </div> <div class="md-header__topic" data-md-component="header-topic"> <span class="md-ellipsis"> Error Code Values </span> </div> </div> </div> <label class="md-header__button md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> </label> <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required> <label class="md-search__icon md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </label> <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg> </button> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" data-md-scrollfix> <div class="md-search-result" data-md-component="search-result"> <div class="md-search-result__meta"> Initializing search </div> <ol class="md-search-result__list"></ol> </div> </div> </div> </div> </div> </nav> </header> <div class="md-container" data-md-component="container"> <main class="md-main" data-md-component="main"> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <label class="md-nav__title" for="__drawer"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> FreeType-2.12.0 API Reference </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="index.html" class="md-nav__link"> TOC </a> </li> <li class="md-nav__item"> <a href="ft2-index.html" class="md-nav__link"> Index </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" > <label class="md-nav__link" for="__nav_3"> General Remarks <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="General Remarks" data-md-level="1"> <label class="md-nav__title" for="__nav_3"> <span class="md-nav__icon md-icon"></span> General Remarks </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-preamble.html" class="md-nav__link"> Preamble </a> </li> <li class="md-nav__item"> <a href="ft2-header_inclusion.html" class="md-nav__link"> FreeType's header inclusion scheme </a> </li> <li class="md-nav__item"> <a href="ft2-user_allocation.html" class="md-nav__link"> User allocation </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" > <label class="md-nav__link" for="__nav_4"> Core API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Core API" data-md-level="1"> <label class="md-nav__title" for="__nav_4"> <span class="md-nav__icon md-icon"></span> Core API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-version.html" class="md-nav__link"> FreeType Version </a> </li> <li class="md-nav__item"> <a href="ft2-basic_types.html" class="md-nav__link"> Basic Data Types </a> </li> <li class="md-nav__item"> <a href="ft2-base_interface.html" class="md-nav__link"> Base Interface </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_variants.html" class="md-nav__link"> Unicode Variation Sequences </a> </li> <li class="md-nav__item"> <a href="ft2-color_management.html" class="md-nav__link"> Glyph Color Management </a> </li> <li class="md-nav__item"> <a href="ft2-layer_management.html" class="md-nav__link"> Glyph Layer Management </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_management.html" class="md-nav__link"> Glyph Management </a> </li> <li class="md-nav__item"> <a href="ft2-mac_specific.html" class="md-nav__link"> Mac Specific Interface </a> </li> <li class="md-nav__item"> <a href="ft2-sizes_management.html" class="md-nav__link"> Size Management </a> </li> <li class="md-nav__item"> <a href="ft2-header_file_macros.html" class="md-nav__link"> Header File Macros </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" > <label class="md-nav__link" for="__nav_5"> Format-Specific API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Format-Specific API" data-md-level="1"> <label class="md-nav__title" for="__nav_5"> <span class="md-nav__icon md-icon"></span> Format-Specific API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-multiple_masters.html" class="md-nav__link"> Multiple Masters </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_tables.html" class="md-nav__link"> TrueType Tables </a> </li> <li class="md-nav__item"> <a href="ft2-type1_tables.html" class="md-nav__link"> Type 1 Tables </a> </li> <li class="md-nav__item"> <a href="ft2-sfnt_names.html" class="md-nav__link"> SFNT Names </a> </li> <li class="md-nav__item"> <a href="ft2-bdf_fonts.html" class="md-nav__link"> BDF and PCF Files </a> </li> <li class="md-nav__item"> <a href="ft2-cid_fonts.html" class="md-nav__link"> CID Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-pfr_fonts.html" class="md-nav__link"> PFR Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-winfnt_fonts.html" class="md-nav__link"> Window FNT Files </a> </li> <li class="md-nav__item"> <a href="ft2-svg_fonts.html" class="md-nav__link"> OpenType SVG Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-font_formats.html" class="md-nav__link"> Font Formats </a> </li> <li class="md-nav__item"> <a href="ft2-gasp_table.html" class="md-nav__link"> Gasp Table </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" > <label class="md-nav__link" for="__nav_6"> Controlling FreeType Modules <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Controlling FreeType Modules" data-md-level="1"> <label class="md-nav__title" for="__nav_6"> <span class="md-nav__icon md-icon"></span> Controlling FreeType Modules </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-auto_hinter.html" class="md-nav__link"> The auto-hinter </a> </li> <li class="md-nav__item"> <a href="ft2-cff_driver.html" class="md-nav__link"> The CFF driver </a> </li> <li class="md-nav__item"> <a href="ft2-t1_cid_driver.html" class="md-nav__link"> The Type 1 and CID drivers </a> </li> <li class="md-nav__item"> <a href="ft2-tt_driver.html" class="md-nav__link"> The TrueType driver </a> </li> <li class="md-nav__item"> <a href="ft2-pcf_driver.html" class="md-nav__link"> The PCF driver </a> </li> <li class="md-nav__item"> <a href="ft2-ot_svg_driver.html" class="md-nav__link"> The SVG driver </a> </li> <li class="md-nav__item"> <a href="ft2-properties.html" class="md-nav__link"> Driver properties </a> </li> <li class="md-nav__item"> <a href="ft2-parameter_tags.html" class="md-nav__link"> Parameter Tags </a> </li> <li class="md-nav__item"> <a href="ft2-lcd_rendering.html" class="md-nav__link"> Subpixel Rendering </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" > <label class="md-nav__link" for="__nav_7"> Cache Sub-System <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1"> <label class="md-nav__title" for="__nav_7"> <span class="md-nav__icon md-icon"></span> Cache Sub-System </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-cache_subsystem.html" class="md-nav__link"> Cache Sub-System </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" > <label class="md-nav__link" for="__nav_8"> Support API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Support API" data-md-level="1"> <label class="md-nav__title" for="__nav_8"> <span class="md-nav__icon md-icon"></span> Support API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-computations.html" class="md-nav__link"> Computations </a> </li> <li class="md-nav__item"> <a href="ft2-list_processing.html" class="md-nav__link"> List Processing </a> </li> <li class="md-nav__item"> <a href="ft2-outline_processing.html" class="md-nav__link"> Outline Processing </a> </li> <li class="md-nav__item"> <a href="ft2-quick_advance.html" class="md-nav__link"> Quick retrieval of advance values </a> </li> <li class="md-nav__item"> <a href="ft2-bitmap_handling.html" class="md-nav__link"> Bitmap Handling </a> </li> <li class="md-nav__item"> <a href="ft2-raster.html" class="md-nav__link"> Scanline Converter </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_stroker.html" class="md-nav__link"> Glyph Stroker </a> </li> <li class="md-nav__item"> <a href="ft2-system_interface.html" class="md-nav__link"> System Interface </a> </li> <li class="md-nav__item"> <a href="ft2-module_management.html" class="md-nav__link"> Module Management </a> </li> <li class="md-nav__item"> <a href="ft2-gzip.html" class="md-nav__link"> GZIP Streams </a> </li> <li class="md-nav__item"> <a href="ft2-lzw.html" class="md-nav__link"> LZW Streams </a> </li> <li class="md-nav__item"> <a href="ft2-bzip2.html" class="md-nav__link"> BZIP2 Streams </a> </li> <li class="md-nav__item"> <a href="ft2-debugging_apis.html" class="md-nav__link"> External Debugging APIs </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--active md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" checked> <label class="md-nav__link" for="__nav_9"> Error Codes <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Error Codes" data-md-level="1"> <label class="md-nav__title" for="__nav_9"> <span class="md-nav__icon md-icon"></span> Error Codes </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-error_enumerations.html" class="md-nav__link"> Error Enumerations </a> </li> <li class="md-nav__item md-nav__item--active"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <label class="md-nav__link md-nav__link--active" for="__toc"> Error Code Values <span class="md-nav__icon md-icon"></span> </label> <a href="ft2-error_code_values.html" class="md-nav__link md-nav__link--active"> Error Code Values </a> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_err_xxx" class="md-nav__link"> FT_Err_XXX </a> </li> </ul> </nav> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" > <label class="md-nav__link" for="__nav_10"> Miscellaneous <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1"> <label class="md-nav__title" for="__nav_10"> <span class="md-nav__icon md-icon"></span> Miscellaneous </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-gx_validation.html" class="md-nav__link"> TrueTypeGX/AAT Validation </a> </li> <li class="md-nav__item"> <a href="ft2-incremental.html" class="md-nav__link"> Incremental Loading </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_engine.html" class="md-nav__link"> The TrueType Engine </a> </li> <li class="md-nav__item"> <a href="ft2-ot_validation.html" class="md-nav__link"> OpenType Validation </a> </li> </ul> </nav> </li> </ul> </nav> </div> </div> </div> <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_err_xxx" class="md-nav__link"> FT_Err_XXX </a> </li> </ul> </nav> </div> </div> </div> <div class="md-content" data-md-component="content"> <article class="md-content__inner md-typeset"> <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; <a href="index.html#error-codes">Error Codes</a> &raquo; Error Code Values</p> <hr /> <h1 id="error-code-values">Error Code Values<a class="headerlink" href="#error-code-values" title="Permanent link">&para;</a></h1> <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2> <p>The list below is taken verbatim from the file <code>fterrdef.h</code> (loaded automatically by including <code>FT_FREETYPE_H</code>). The first argument of the <code>FT_ERROR_DEF_</code> macro is the error label; by default, the prefix <code>FT_Err_</code> gets added so that you get error names like <code>FT_Err_Cannot_Open_Resource</code>. The second argument is the error code, and the last argument an error string, which is not used by FreeType.</p> <p>Within your application you should <strong>only</strong> use error names and <strong>never</strong> its numeric values! The latter might (and actually do) change in forthcoming FreeType versions.</p> <p>Macro <code>FT_NOERRORDEF_</code> defines <code>FT_Err_Ok</code>, which is always zero. See the &lsquo;Error Enumerations&rsquo; subsection how to automatically generate a list of error strings.</p> <h2 id="ft_err_xxx">FT_Err_XXX<a class="headerlink" href="#ft_err_xxx" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code> /* generic errors */ FT_NOERRORDEF_( Ok, 0x00, "no error" ) FT_ERRORDEF_( Cannot_Open_Resource, 0x01, "cannot open resource" ) FT_ERRORDEF_( Unknown_File_Format, 0x02, "unknown file format" ) FT_ERRORDEF_( Invalid_File_Format, 0x03, "broken file" ) FT_ERRORDEF_( Invalid_Version, 0x04, "invalid FreeType version" ) FT_ERRORDEF_( Lower_Module_Version, 0x05, "module version is too low" ) FT_ERRORDEF_( Invalid_Argument, 0x06, "invalid argument" ) FT_ERRORDEF_( Unimplemented_Feature, 0x07, "unimplemented feature" ) FT_ERRORDEF_( Invalid_Table, 0x08, "broken table" ) FT_ERRORDEF_( Invalid_Offset, 0x09, "broken offset within table" ) FT_ERRORDEF_( Array_Too_Large, 0x0A, "array allocation size too large" ) FT_ERRORDEF_( Missing_Module, 0x0B, "missing module" ) FT_ERRORDEF_( Missing_Property, 0x0C, "missing property" ) /* glyph/character errors */ FT_ERRORDEF_( Invalid_Glyph_Index, 0x10, "invalid glyph index" ) FT_ERRORDEF_( Invalid_Character_Code, 0x11, "invalid character code" ) FT_ERRORDEF_( Invalid_Glyph_Format, 0x12, "unsupported glyph image format" ) FT_ERRORDEF_( Cannot_Render_Glyph, 0x13, "cannot render this glyph format" ) FT_ERRORDEF_( Invalid_Outline, 0x14, "invalid outline" ) FT_ERRORDEF_( Invalid_Composite, 0x15, "invalid composite glyph" ) FT_ERRORDEF_( Too_Many_Hints, 0x16, "too many hints" ) FT_ERRORDEF_( Invalid_Pixel_Size, 0x17, "invalid pixel size" ) FT_ERRORDEF_( Invalid_SVG_Document, 0x18, "invalid SVG document" ) /* handle errors */ FT_ERRORDEF_( Invalid_Handle, 0x20, "invalid object handle" ) FT_ERRORDEF_( Invalid_Library_Handle, 0x21, "invalid library handle" ) FT_ERRORDEF_( Invalid_Driver_Handle, 0x22, "invalid module handle" ) FT_ERRORDEF_( Invalid_Face_Handle, 0x23, "invalid face handle" ) FT_ERRORDEF_( Invalid_Size_Handle, 0x24, "invalid size handle" ) FT_ERRORDEF_( Invalid_Slot_Handle, 0x25, "invalid glyph slot handle" ) FT_ERRORDEF_( Invalid_CharMap_Handle, 0x26, "invalid charmap handle" ) FT_ERRORDEF_( Invalid_Cache_Handle, 0x27, "invalid cache manager handle" ) FT_ERRORDEF_( Invalid_Stream_Handle, 0x28, "invalid stream handle" ) /* driver errors */ FT_ERRORDEF_( Too_Many_Drivers, 0x30, "too many modules" ) FT_ERRORDEF_( Too_Many_Extensions, 0x31, "too many extensions" ) /* memory errors */ FT_ERRORDEF_( Out_Of_Memory, 0x40, "out of memory" ) FT_ERRORDEF_( Unlisted_Object, 0x41, "unlisted object" ) /* stream errors */ FT_ERRORDEF_( Cannot_Open_Stream, 0x51, "cannot open stream" ) FT_ERRORDEF_( Invalid_Stream_Seek, 0x52, "invalid stream seek" ) FT_ERRORDEF_( Invalid_Stream_Skip, 0x53, "invalid stream skip" ) FT_ERRORDEF_( Invalid_Stream_Read, 0x54, "invalid stream read" ) FT_ERRORDEF_( Invalid_Stream_Operation, 0x55, "invalid stream operation" ) FT_ERRORDEF_( Invalid_Frame_Operation, 0x56, "invalid frame operation" ) FT_ERRORDEF_( Nested_Frame_Access, 0x57, "nested frame access" ) FT_ERRORDEF_( Invalid_Frame_Read, 0x58, "invalid frame read" ) /* raster errors */ FT_ERRORDEF_( Raster_Uninitialized, 0x60, "raster uninitialized" ) FT_ERRORDEF_( Raster_Corrupted, 0x61, "raster corrupted" ) FT_ERRORDEF_( Raster_Overflow, 0x62, "raster overflow" ) FT_ERRORDEF_( Raster_Negative_Height, 0x63, "negative height while rastering" ) /* cache errors */ FT_ERRORDEF_( Too_Many_Caches, 0x70, "too many registered caches" ) /* TrueType and SFNT errors */ FT_ERRORDEF_( Invalid_Opcode, 0x80, "invalid opcode" ) FT_ERRORDEF_( Too_Few_Arguments, 0x81, "too few arguments" ) FT_ERRORDEF_( Stack_Overflow, 0x82, "stack overflow" ) FT_ERRORDEF_( Code_Overflow, 0x83, "code overflow" ) FT_ERRORDEF_( Bad_Argument, 0x84, "bad argument" ) FT_ERRORDEF_( Divide_By_Zero, 0x85, "division by zero" ) FT_ERRORDEF_( Invalid_Reference, 0x86, "invalid reference" ) FT_ERRORDEF_( Debug_OpCode, 0x87, "found debug opcode" ) FT_ERRORDEF_( ENDF_In_Exec_Stream, 0x88, "found ENDF opcode in execution stream" ) FT_ERRORDEF_( Nested_DEFS, 0x89, "nested DEFS" ) FT_ERRORDEF_( Invalid_CodeRange, 0x8A, "invalid code range" ) FT_ERRORDEF_( Execution_Too_Long, 0x8B, "execution context too <span class="keyword">long</span>" ) FT_ERRORDEF_( Too_Many_Function_Defs, 0x8C, "too many function definitions" ) FT_ERRORDEF_( Too_Many_Instruction_Defs, 0x8D, "too many instruction definitions" ) FT_ERRORDEF_( Table_Missing, 0x8E, "SFNT font table missing" ) FT_ERRORDEF_( Horiz_Header_Missing, 0x8F, "horizontal header (hhea) table missing" ) FT_ERRORDEF_( Locations_Missing, 0x90, "locations (loca) table missing" ) FT_ERRORDEF_( Name_Table_Missing, 0x91, "name table missing" ) FT_ERRORDEF_( CMap_Table_Missing, 0x92, "character map (cmap) table missing" ) FT_ERRORDEF_( Hmtx_Table_Missing, 0x93, "horizontal metrics (hmtx) table missing" ) FT_ERRORDEF_( Post_Table_Missing, 0x94, "PostScript (post) table missing" ) FT_ERRORDEF_( Invalid_Horiz_Metrics, 0x95, "invalid horizontal metrics" ) FT_ERRORDEF_( Invalid_CharMap_Format, 0x96, "invalid character map (cmap) format" ) FT_ERRORDEF_( Invalid_PPem, 0x97, "invalid ppem value" ) FT_ERRORDEF_( Invalid_Vert_Metrics, 0x98, "invalid vertical metrics" ) FT_ERRORDEF_( Could_Not_Find_Context, 0x99, "could not find context" ) FT_ERRORDEF_( Invalid_Post_Table_Format, 0x9A, "invalid PostScript (post) table format" ) FT_ERRORDEF_( Invalid_Post_Table, 0x9B, "invalid PostScript (post) table" ) FT_ERRORDEF_( DEF_In_Glyf_Bytecode, 0x9C, "found FDEF or IDEF opcode in glyf bytecode" ) FT_ERRORDEF_( Missing_Bitmap, 0x9D, "missing bitmap in strike" ) FT_ERRORDEF_( Missing_SVG_Hooks, 0x9E, "SVG hooks have not been set" ) /* CFF, CID, and Type 1 errors */ FT_ERRORDEF_( Syntax_Error, 0xA0, "opcode syntax error" ) FT_ERRORDEF_( Stack_Underflow, 0xA1, "argument stack underflow" ) FT_ERRORDEF_( Ignore, 0xA2, "ignore" ) FT_ERRORDEF_( No_Unicode_Glyph_Name, 0xA3, "no Unicode glyph name found" ) FT_ERRORDEF_( Glyph_Too_Big, 0xA4, "glyph too big for hinting" ) /* BDF errors */ FT_ERRORDEF_( Missing_Startfont_Field, 0xB0, "`STARTFONT' field missing" ) FT_ERRORDEF_( Missing_Font_Field, 0xB1, "`FONT' field missing" ) FT_ERRORDEF_( Missing_Size_Field, 0xB2, "`SIZE' field missing" ) FT_ERRORDEF_( Missing_Fontboundingbox_Field, 0xB3, "`FONTBOUNDINGBOX' field missing" ) FT_ERRORDEF_( Missing_Chars_Field, 0xB4, "`CHARS' field missing" ) FT_ERRORDEF_( Missing_Startchar_Field, 0xB5, "`STARTCHAR' field missing" ) FT_ERRORDEF_( Missing_Encoding_Field, 0xB6, "`ENCODING' field missing" ) FT_ERRORDEF_( Missing_Bbx_Field, 0xB7, "`BBX' field missing" ) FT_ERRORDEF_( Bbx_Too_Big, 0xB8, "`BBX' too big" ) FT_ERRORDEF_( Corrupted_Font_Header, 0xB9, "Font header corrupted or missing fields" ) FT_ERRORDEF_( Corrupted_Font_Glyphs, 0xBA, "Font glyphs corrupted or missing fields" ) </code></pre></div> <hr> </article> </div> </div> </main> <footer class="md-footer"> <nav class="md-footer__inner md-grid" aria-label="Footer"> <a href="ft2-error_enumerations.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: Error Enumerations" rel="prev"> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Previous </span> Error Enumerations </div> </div> </a> <a href="ft2-gx_validation.html" class="md-footer__link md-footer__link--next" aria-label="Next: TrueTypeGX/AAT Validation" rel="next"> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Next </span> TrueTypeGX/AAT Validation </div> </div> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg> </div> </a> </nav> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-footer-copyright"> <div class="md-footer-copyright__highlight"> Copyright 2022 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>. </div> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"base": ".", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "assets/javascripts/workers/search.477d984a.min.js", "version": null}</script> <script src="assets/javascripts/bundle.82b56eb2.min.js"></script> <script src="javascripts/extra.js"></script> </body> </html>
whupdup/frame
real/third_party/freetype-2.12.0/docs/reference/ft2-error_code_values.html
HTML
gpl-3.0
38,849
<!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="description" content="API Reference Documentation for FreeType-2.12.0"> <meta name="author" content="FreeType Contributors"> <link rel="icon" href="images/favico.ico"> <meta name="generator" content="mkdocs-1.2.1, mkdocs-material-7.1.9"> <title>Error Enumerations - FreeType-2.12.0 API Reference</title> <link rel="stylesheet" href="assets/stylesheets/main.ca7ac06f.min.css"> <link rel="stylesheet" href="assets/stylesheets/palette.f1a3b89f.min.css"> <meta name="theme-color" content="#4cae4f"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback"> <style>:root{--md-text-font-family:"Noto Serif";--md-code-font-family:"Roboto Mono"}</style> <link rel="stylesheet" href="stylesheets/extra.css"> </head> <body dir="ltr" data-md-color-scheme="" data-md-color-primary="green" data-md-color-accent="green"> <script>function __prefix(e){return new URL(".",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <label class="md-overlay" for="__drawer"></label> <div data-md-component="skip"> <a href="#error-enumerations" class="md-skip"> Skip to content </a> </div> <div data-md-component="announce"> </div> <header class="md-header" data-md-component="header"> <nav class="md-header__inner md-grid" aria-label="Header"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> <label class="md-header__button md-icon" for="__drawer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg> </label> <div class="md-header__title" data-md-component="header-title"> <div class="md-header__ellipsis"> <div class="md-header__topic"> <span class="md-ellipsis"> FreeType-2.12.0 API Reference </span> </div> <div class="md-header__topic" data-md-component="header-topic"> <span class="md-ellipsis"> Error Enumerations </span> </div> </div> </div> <label class="md-header__button md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> </label> <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required> <label class="md-search__icon md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </label> <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg> </button> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" data-md-scrollfix> <div class="md-search-result" data-md-component="search-result"> <div class="md-search-result__meta"> Initializing search </div> <ol class="md-search-result__list"></ol> </div> </div> </div> </div> </div> </nav> </header> <div class="md-container" data-md-component="container"> <main class="md-main" data-md-component="main"> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <label class="md-nav__title" for="__drawer"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> FreeType-2.12.0 API Reference </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="index.html" class="md-nav__link"> TOC </a> </li> <li class="md-nav__item"> <a href="ft2-index.html" class="md-nav__link"> Index </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" > <label class="md-nav__link" for="__nav_3"> General Remarks <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="General Remarks" data-md-level="1"> <label class="md-nav__title" for="__nav_3"> <span class="md-nav__icon md-icon"></span> General Remarks </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-preamble.html" class="md-nav__link"> Preamble </a> </li> <li class="md-nav__item"> <a href="ft2-header_inclusion.html" class="md-nav__link"> FreeType's header inclusion scheme </a> </li> <li class="md-nav__item"> <a href="ft2-user_allocation.html" class="md-nav__link"> User allocation </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" > <label class="md-nav__link" for="__nav_4"> Core API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Core API" data-md-level="1"> <label class="md-nav__title" for="__nav_4"> <span class="md-nav__icon md-icon"></span> Core API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-version.html" class="md-nav__link"> FreeType Version </a> </li> <li class="md-nav__item"> <a href="ft2-basic_types.html" class="md-nav__link"> Basic Data Types </a> </li> <li class="md-nav__item"> <a href="ft2-base_interface.html" class="md-nav__link"> Base Interface </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_variants.html" class="md-nav__link"> Unicode Variation Sequences </a> </li> <li class="md-nav__item"> <a href="ft2-color_management.html" class="md-nav__link"> Glyph Color Management </a> </li> <li class="md-nav__item"> <a href="ft2-layer_management.html" class="md-nav__link"> Glyph Layer Management </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_management.html" class="md-nav__link"> Glyph Management </a> </li> <li class="md-nav__item"> <a href="ft2-mac_specific.html" class="md-nav__link"> Mac Specific Interface </a> </li> <li class="md-nav__item"> <a href="ft2-sizes_management.html" class="md-nav__link"> Size Management </a> </li> <li class="md-nav__item"> <a href="ft2-header_file_macros.html" class="md-nav__link"> Header File Macros </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" > <label class="md-nav__link" for="__nav_5"> Format-Specific API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Format-Specific API" data-md-level="1"> <label class="md-nav__title" for="__nav_5"> <span class="md-nav__icon md-icon"></span> Format-Specific API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-multiple_masters.html" class="md-nav__link"> Multiple Masters </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_tables.html" class="md-nav__link"> TrueType Tables </a> </li> <li class="md-nav__item"> <a href="ft2-type1_tables.html" class="md-nav__link"> Type 1 Tables </a> </li> <li class="md-nav__item"> <a href="ft2-sfnt_names.html" class="md-nav__link"> SFNT Names </a> </li> <li class="md-nav__item"> <a href="ft2-bdf_fonts.html" class="md-nav__link"> BDF and PCF Files </a> </li> <li class="md-nav__item"> <a href="ft2-cid_fonts.html" class="md-nav__link"> CID Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-pfr_fonts.html" class="md-nav__link"> PFR Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-winfnt_fonts.html" class="md-nav__link"> Window FNT Files </a> </li> <li class="md-nav__item"> <a href="ft2-svg_fonts.html" class="md-nav__link"> OpenType SVG Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-font_formats.html" class="md-nav__link"> Font Formats </a> </li> <li class="md-nav__item"> <a href="ft2-gasp_table.html" class="md-nav__link"> Gasp Table </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" > <label class="md-nav__link" for="__nav_6"> Controlling FreeType Modules <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Controlling FreeType Modules" data-md-level="1"> <label class="md-nav__title" for="__nav_6"> <span class="md-nav__icon md-icon"></span> Controlling FreeType Modules </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-auto_hinter.html" class="md-nav__link"> The auto-hinter </a> </li> <li class="md-nav__item"> <a href="ft2-cff_driver.html" class="md-nav__link"> The CFF driver </a> </li> <li class="md-nav__item"> <a href="ft2-t1_cid_driver.html" class="md-nav__link"> The Type 1 and CID drivers </a> </li> <li class="md-nav__item"> <a href="ft2-tt_driver.html" class="md-nav__link"> The TrueType driver </a> </li> <li class="md-nav__item"> <a href="ft2-pcf_driver.html" class="md-nav__link"> The PCF driver </a> </li> <li class="md-nav__item"> <a href="ft2-ot_svg_driver.html" class="md-nav__link"> The SVG driver </a> </li> <li class="md-nav__item"> <a href="ft2-properties.html" class="md-nav__link"> Driver properties </a> </li> <li class="md-nav__item"> <a href="ft2-parameter_tags.html" class="md-nav__link"> Parameter Tags </a> </li> <li class="md-nav__item"> <a href="ft2-lcd_rendering.html" class="md-nav__link"> Subpixel Rendering </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" > <label class="md-nav__link" for="__nav_7"> Cache Sub-System <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1"> <label class="md-nav__title" for="__nav_7"> <span class="md-nav__icon md-icon"></span> Cache Sub-System </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-cache_subsystem.html" class="md-nav__link"> Cache Sub-System </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" > <label class="md-nav__link" for="__nav_8"> Support API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Support API" data-md-level="1"> <label class="md-nav__title" for="__nav_8"> <span class="md-nav__icon md-icon"></span> Support API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-computations.html" class="md-nav__link"> Computations </a> </li> <li class="md-nav__item"> <a href="ft2-list_processing.html" class="md-nav__link"> List Processing </a> </li> <li class="md-nav__item"> <a href="ft2-outline_processing.html" class="md-nav__link"> Outline Processing </a> </li> <li class="md-nav__item"> <a href="ft2-quick_advance.html" class="md-nav__link"> Quick retrieval of advance values </a> </li> <li class="md-nav__item"> <a href="ft2-bitmap_handling.html" class="md-nav__link"> Bitmap Handling </a> </li> <li class="md-nav__item"> <a href="ft2-raster.html" class="md-nav__link"> Scanline Converter </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_stroker.html" class="md-nav__link"> Glyph Stroker </a> </li> <li class="md-nav__item"> <a href="ft2-system_interface.html" class="md-nav__link"> System Interface </a> </li> <li class="md-nav__item"> <a href="ft2-module_management.html" class="md-nav__link"> Module Management </a> </li> <li class="md-nav__item"> <a href="ft2-gzip.html" class="md-nav__link"> GZIP Streams </a> </li> <li class="md-nav__item"> <a href="ft2-lzw.html" class="md-nav__link"> LZW Streams </a> </li> <li class="md-nav__item"> <a href="ft2-bzip2.html" class="md-nav__link"> BZIP2 Streams </a> </li> <li class="md-nav__item"> <a href="ft2-debugging_apis.html" class="md-nav__link"> External Debugging APIs </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--active md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" checked> <label class="md-nav__link" for="__nav_9"> Error Codes <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Error Codes" data-md-level="1"> <label class="md-nav__title" for="__nav_9"> <span class="md-nav__icon md-icon"></span> Error Codes </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item md-nav__item--active"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <label class="md-nav__link md-nav__link--active" for="__toc"> Error Enumerations <span class="md-nav__icon md-icon"></span> </label> <a href="ft2-error_enumerations.html" class="md-nav__link md-nav__link--active"> Error Enumerations </a> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_error_string" class="md-nav__link"> FT_Error_String </a> </li> </ul> </nav> </li> <li class="md-nav__item"> <a href="ft2-error_code_values.html" class="md-nav__link"> Error Code Values </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" > <label class="md-nav__link" for="__nav_10"> Miscellaneous <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1"> <label class="md-nav__title" for="__nav_10"> <span class="md-nav__icon md-icon"></span> Miscellaneous </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-gx_validation.html" class="md-nav__link"> TrueTypeGX/AAT Validation </a> </li> <li class="md-nav__item"> <a href="ft2-incremental.html" class="md-nav__link"> Incremental Loading </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_engine.html" class="md-nav__link"> The TrueType Engine </a> </li> <li class="md-nav__item"> <a href="ft2-ot_validation.html" class="md-nav__link"> OpenType Validation </a> </li> </ul> </nav> </li> </ul> </nav> </div> </div> </div> <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_error_string" class="md-nav__link"> FT_Error_String </a> </li> </ul> </nav> </div> </div> </div> <div class="md-content" data-md-component="content"> <article class="md-content__inner md-typeset"> <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; <a href="index.html#error-codes">Error Codes</a> &raquo; Error Enumerations</p> <hr /> <h1 id="error-enumerations">Error Enumerations<a class="headerlink" href="#error-enumerations" title="Permanent link">&para;</a></h1> <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2> <p>The header file <code>fterrors.h</code> (which is automatically included by <code>freetype.h</code> defines the handling of FreeType's enumeration constants. It can also be used to generate error message strings with a small macro trick explained below.</p> <p><strong>Error Formats</strong></p> <p>The configuration macro <code>FT_CONFIG_OPTION_USE_MODULE_ERRORS</code> can be defined in <code>ftoption.h</code> in order to make the higher byte indicate the module where the error has happened (this is not compatible with standard builds of FreeType&nbsp;2, however). See the file <code>ftmoderr.h</code> for more details.</p> <p><strong>Error Message Strings</strong></p> <p>Error definitions are set up with special macros that allow client applications to build a table of error message strings. The strings are not included in a normal build of FreeType&nbsp;2 to save space (most client applications do not use them).</p> <p>To do so, you have to define the following macros before including this file. <div class="highlight"><pre><span></span><code> FT_ERROR_START_LIST </code></pre></div></p> <p>This macro is called before anything else to define the start of the error list. It is followed by several <code>FT_ERROR_DEF</code> calls. <div class="highlight"><pre><span></span><code> FT_ERROR_DEF( e, v, s ) </code></pre></div></p> <p>This macro is called to define one single error. &lsquo;e&rsquo; is the error code identifier (e.g., <code>Invalid_Argument</code>), &lsquo;v&rsquo; is the error's numerical value, and &lsquo;s&rsquo; is the corresponding error string. <div class="highlight"><pre><span></span><code> FT_ERROR_END_LIST </code></pre></div></p> <p>This macro ends the list.</p> <p>Additionally, you have to undefine <code>FTERRORS_H_</code> before #including this file.</p> <p>Here is a simple example. <div class="highlight"><pre><span></span><code> #undef FTERRORS_H_ #define FT_ERRORDEF( e, v, s ) { e, s }, #define FT_ERROR_START_LIST { #define FT_ERROR_END_LIST { 0, NULL } }; const struct { int err_code; const char* err_msg; } ft_errors[] = #include &lt;freetype/fterrors.h&gt; </code></pre></div></p> <p>An alternative to using an array is a switch statement. <div class="highlight"><pre><span></span><code> #undef FTERRORS_H_ #define FT_ERROR_START_LIST switch ( error_code ) { #define FT_ERRORDEF( e, v, s ) case v: return s; #define FT_ERROR_END_LIST } </code></pre></div></p> <p>If you use <code>FT_CONFIG_OPTION_USE_MODULE_ERRORS</code>, <code>error_code</code> should be replaced with <code>FT_ERROR_BASE(error_code)</code> in the last example.</p> <h2 id="ft_error_string">FT_Error_String<a class="headerlink" href="#ft_error_string" title="Permanent link">&para;</a></h2> <p>Defined in FT_ERRORS_H (freetype/fterrors.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">const</span> <span class="keyword">char</span>* ) <b>FT_Error_String</b>( <a href="ft2-basic_types.html#ft_error">FT_Error</a> error_code ); </code></pre></div> <p>Retrieve the description of a valid FreeType error code.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="error_code">error_code</td><td class="desc"> <p>A valid FreeType error code.</p> </td></tr> </table> <h4>return</h4> <p>A C&nbsp;string or <code>NULL</code>, if any error occurred.</p> <h4>note</h4> <p>FreeType has to be compiled with <code>FT_CONFIG_OPTION_ERROR_STRINGS</code> or <code>FT_DEBUG_LEVEL_ERROR</code> to get meaningful descriptions. &lsquo;error_string&rsquo; will be <code>NULL</code> otherwise.</p> <p>Module identification will be ignored: <div class="highlight"><pre><span></span><code> <span class="n">strcmp</span><span class="p">(</span> <span class="n">FT_Error_String</span><span class="p">(</span> <span class="n">FT_Err_Unknown_File_Format</span> <span class="p">),</span> <span class="n">FT_Error_String</span><span class="p">(</span> <span class="n">BDF_Err_Unknown_File_Format</span> <span class="p">)</span> <span class="p">)</span> <span class="o">==</span> <span class="mi">0</span><span class="p">;</span> </code></pre></div></p> <hr> </article> </div> </div> </main> <footer class="md-footer"> <nav class="md-footer__inner md-grid" aria-label="Footer"> <a href="ft2-debugging_apis.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: External Debugging APIs" rel="prev"> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Previous </span> External Debugging APIs </div> </div> </a> <a href="ft2-error_code_values.html" class="md-footer__link md-footer__link--next" aria-label="Next: Error Code Values" rel="next"> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Next </span> Error Code Values </div> </div> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg> </div> </a> </nav> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-footer-copyright"> <div class="md-footer-copyright__highlight"> Copyright 2022 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>. </div> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"base": ".", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "assets/javascripts/workers/search.477d984a.min.js", "version": null}</script> <script src="assets/javascripts/bundle.82b56eb2.min.js"></script> <script src="javascripts/extra.js"></script> </body> </html>
whupdup/frame
real/third_party/freetype-2.12.0/docs/reference/ft2-error_enumerations.html
HTML
gpl-3.0
31,218
<!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="description" content="API Reference Documentation for FreeType-2.12.0"> <meta name="author" content="FreeType Contributors"> <link rel="icon" href="images/favico.ico"> <meta name="generator" content="mkdocs-1.2.1, mkdocs-material-7.1.9"> <title>Font Formats - FreeType-2.12.0 API Reference</title> <link rel="stylesheet" href="assets/stylesheets/main.ca7ac06f.min.css"> <link rel="stylesheet" href="assets/stylesheets/palette.f1a3b89f.min.css"> <meta name="theme-color" content="#4cae4f"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback"> <style>:root{--md-text-font-family:"Noto Serif";--md-code-font-family:"Roboto Mono"}</style> <link rel="stylesheet" href="stylesheets/extra.css"> </head> <body dir="ltr" data-md-color-scheme="" data-md-color-primary="green" data-md-color-accent="green"> <script>function __prefix(e){return new URL(".",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <label class="md-overlay" for="__drawer"></label> <div data-md-component="skip"> <a href="#font-formats" class="md-skip"> Skip to content </a> </div> <div data-md-component="announce"> </div> <header class="md-header" data-md-component="header"> <nav class="md-header__inner md-grid" aria-label="Header"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> <label class="md-header__button md-icon" for="__drawer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg> </label> <div class="md-header__title" data-md-component="header-title"> <div class="md-header__ellipsis"> <div class="md-header__topic"> <span class="md-ellipsis"> FreeType-2.12.0 API Reference </span> </div> <div class="md-header__topic" data-md-component="header-topic"> <span class="md-ellipsis"> Font Formats </span> </div> </div> </div> <label class="md-header__button md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> </label> <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required> <label class="md-search__icon md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </label> <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg> </button> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" data-md-scrollfix> <div class="md-search-result" data-md-component="search-result"> <div class="md-search-result__meta"> Initializing search </div> <ol class="md-search-result__list"></ol> </div> </div> </div> </div> </div> </nav> </header> <div class="md-container" data-md-component="container"> <main class="md-main" data-md-component="main"> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <label class="md-nav__title" for="__drawer"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> FreeType-2.12.0 API Reference </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="index.html" class="md-nav__link"> TOC </a> </li> <li class="md-nav__item"> <a href="ft2-index.html" class="md-nav__link"> Index </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" > <label class="md-nav__link" for="__nav_3"> General Remarks <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="General Remarks" data-md-level="1"> <label class="md-nav__title" for="__nav_3"> <span class="md-nav__icon md-icon"></span> General Remarks </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-preamble.html" class="md-nav__link"> Preamble </a> </li> <li class="md-nav__item"> <a href="ft2-header_inclusion.html" class="md-nav__link"> FreeType's header inclusion scheme </a> </li> <li class="md-nav__item"> <a href="ft2-user_allocation.html" class="md-nav__link"> User allocation </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" > <label class="md-nav__link" for="__nav_4"> Core API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Core API" data-md-level="1"> <label class="md-nav__title" for="__nav_4"> <span class="md-nav__icon md-icon"></span> Core API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-version.html" class="md-nav__link"> FreeType Version </a> </li> <li class="md-nav__item"> <a href="ft2-basic_types.html" class="md-nav__link"> Basic Data Types </a> </li> <li class="md-nav__item"> <a href="ft2-base_interface.html" class="md-nav__link"> Base Interface </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_variants.html" class="md-nav__link"> Unicode Variation Sequences </a> </li> <li class="md-nav__item"> <a href="ft2-color_management.html" class="md-nav__link"> Glyph Color Management </a> </li> <li class="md-nav__item"> <a href="ft2-layer_management.html" class="md-nav__link"> Glyph Layer Management </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_management.html" class="md-nav__link"> Glyph Management </a> </li> <li class="md-nav__item"> <a href="ft2-mac_specific.html" class="md-nav__link"> Mac Specific Interface </a> </li> <li class="md-nav__item"> <a href="ft2-sizes_management.html" class="md-nav__link"> Size Management </a> </li> <li class="md-nav__item"> <a href="ft2-header_file_macros.html" class="md-nav__link"> Header File Macros </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--active md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" checked> <label class="md-nav__link" for="__nav_5"> Format-Specific API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Format-Specific API" data-md-level="1"> <label class="md-nav__title" for="__nav_5"> <span class="md-nav__icon md-icon"></span> Format-Specific API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-multiple_masters.html" class="md-nav__link"> Multiple Masters </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_tables.html" class="md-nav__link"> TrueType Tables </a> </li> <li class="md-nav__item"> <a href="ft2-type1_tables.html" class="md-nav__link"> Type 1 Tables </a> </li> <li class="md-nav__item"> <a href="ft2-sfnt_names.html" class="md-nav__link"> SFNT Names </a> </li> <li class="md-nav__item"> <a href="ft2-bdf_fonts.html" class="md-nav__link"> BDF and PCF Files </a> </li> <li class="md-nav__item"> <a href="ft2-cid_fonts.html" class="md-nav__link"> CID Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-pfr_fonts.html" class="md-nav__link"> PFR Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-winfnt_fonts.html" class="md-nav__link"> Window FNT Files </a> </li> <li class="md-nav__item"> <a href="ft2-svg_fonts.html" class="md-nav__link"> OpenType SVG Fonts </a> </li> <li class="md-nav__item md-nav__item--active"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <label class="md-nav__link md-nav__link--active" for="__toc"> Font Formats <span class="md-nav__icon md-icon"></span> </label> <a href="ft2-font_formats.html" class="md-nav__link md-nav__link--active"> Font Formats </a> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_get_font_format" class="md-nav__link"> FT_Get_Font_Format </a> </li> </ul> </nav> </li> <li class="md-nav__item"> <a href="ft2-gasp_table.html" class="md-nav__link"> Gasp Table </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" > <label class="md-nav__link" for="__nav_6"> Controlling FreeType Modules <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Controlling FreeType Modules" data-md-level="1"> <label class="md-nav__title" for="__nav_6"> <span class="md-nav__icon md-icon"></span> Controlling FreeType Modules </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-auto_hinter.html" class="md-nav__link"> The auto-hinter </a> </li> <li class="md-nav__item"> <a href="ft2-cff_driver.html" class="md-nav__link"> The CFF driver </a> </li> <li class="md-nav__item"> <a href="ft2-t1_cid_driver.html" class="md-nav__link"> The Type 1 and CID drivers </a> </li> <li class="md-nav__item"> <a href="ft2-tt_driver.html" class="md-nav__link"> The TrueType driver </a> </li> <li class="md-nav__item"> <a href="ft2-pcf_driver.html" class="md-nav__link"> The PCF driver </a> </li> <li class="md-nav__item"> <a href="ft2-ot_svg_driver.html" class="md-nav__link"> The SVG driver </a> </li> <li class="md-nav__item"> <a href="ft2-properties.html" class="md-nav__link"> Driver properties </a> </li> <li class="md-nav__item"> <a href="ft2-parameter_tags.html" class="md-nav__link"> Parameter Tags </a> </li> <li class="md-nav__item"> <a href="ft2-lcd_rendering.html" class="md-nav__link"> Subpixel Rendering </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" > <label class="md-nav__link" for="__nav_7"> Cache Sub-System <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1"> <label class="md-nav__title" for="__nav_7"> <span class="md-nav__icon md-icon"></span> Cache Sub-System </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-cache_subsystem.html" class="md-nav__link"> Cache Sub-System </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" > <label class="md-nav__link" for="__nav_8"> Support API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Support API" data-md-level="1"> <label class="md-nav__title" for="__nav_8"> <span class="md-nav__icon md-icon"></span> Support API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-computations.html" class="md-nav__link"> Computations </a> </li> <li class="md-nav__item"> <a href="ft2-list_processing.html" class="md-nav__link"> List Processing </a> </li> <li class="md-nav__item"> <a href="ft2-outline_processing.html" class="md-nav__link"> Outline Processing </a> </li> <li class="md-nav__item"> <a href="ft2-quick_advance.html" class="md-nav__link"> Quick retrieval of advance values </a> </li> <li class="md-nav__item"> <a href="ft2-bitmap_handling.html" class="md-nav__link"> Bitmap Handling </a> </li> <li class="md-nav__item"> <a href="ft2-raster.html" class="md-nav__link"> Scanline Converter </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_stroker.html" class="md-nav__link"> Glyph Stroker </a> </li> <li class="md-nav__item"> <a href="ft2-system_interface.html" class="md-nav__link"> System Interface </a> </li> <li class="md-nav__item"> <a href="ft2-module_management.html" class="md-nav__link"> Module Management </a> </li> <li class="md-nav__item"> <a href="ft2-gzip.html" class="md-nav__link"> GZIP Streams </a> </li> <li class="md-nav__item"> <a href="ft2-lzw.html" class="md-nav__link"> LZW Streams </a> </li> <li class="md-nav__item"> <a href="ft2-bzip2.html" class="md-nav__link"> BZIP2 Streams </a> </li> <li class="md-nav__item"> <a href="ft2-debugging_apis.html" class="md-nav__link"> External Debugging APIs </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" > <label class="md-nav__link" for="__nav_9"> Error Codes <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Error Codes" data-md-level="1"> <label class="md-nav__title" for="__nav_9"> <span class="md-nav__icon md-icon"></span> Error Codes </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-error_enumerations.html" class="md-nav__link"> Error Enumerations </a> </li> <li class="md-nav__item"> <a href="ft2-error_code_values.html" class="md-nav__link"> Error Code Values </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" > <label class="md-nav__link" for="__nav_10"> Miscellaneous <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1"> <label class="md-nav__title" for="__nav_10"> <span class="md-nav__icon md-icon"></span> Miscellaneous </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-gx_validation.html" class="md-nav__link"> TrueTypeGX/AAT Validation </a> </li> <li class="md-nav__item"> <a href="ft2-incremental.html" class="md-nav__link"> Incremental Loading </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_engine.html" class="md-nav__link"> The TrueType Engine </a> </li> <li class="md-nav__item"> <a href="ft2-ot_validation.html" class="md-nav__link"> OpenType Validation </a> </li> </ul> </nav> </li> </ul> </nav> </div> </div> </div> <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_get_font_format" class="md-nav__link"> FT_Get_Font_Format </a> </li> </ul> </nav> </div> </div> </div> <div class="md-content" data-md-component="content"> <article class="md-content__inner md-typeset"> <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; <a href="index.html#format-specific-api">Format-Specific API</a> &raquo; Font Formats</p> <hr /> <h1 id="font-formats">Font Formats<a class="headerlink" href="#font-formats" title="Permanent link">&para;</a></h1> <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2> <p>The single function in this section can be used to get the font format. Note that this information is not needed normally; however, there are special cases (like in PDF devices) where it is important to differentiate, in spite of FreeType's uniform API.</p> <h2 id="ft_get_font_format">FT_Get_Font_Format<a class="headerlink" href="#ft_get_font_format" title="Permanent link">&para;</a></h2> <p>Defined in FT_FONT_FORMATS_H (freetype/ftfntfmt.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">const</span> <span class="keyword">char</span>* ) <b>FT_Get_Font_Format</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a> face ); /* deprecated */ FT_EXPORT( <span class="keyword">const</span> <span class="keyword">char</span>* ) FT_Get_X11_Font_Format( <a href="ft2-base_interface.html#ft_face">FT_Face</a> face ); </code></pre></div> <p>Return a string describing the format of a given face. Possible values are &lsquo;TrueType&rsquo;, &lsquo;Type&nbsp;1&rsquo;, &lsquo;BDF&rsquo;, &lsquo;PCF&rsquo;, &lsquo;Type&nbsp;42&rsquo;, &lsquo;CID&nbsp;Type&nbsp;1&rsquo;, &lsquo;CFF&rsquo;, &lsquo;PFR&rsquo;, and &lsquo;Windows&nbsp;FNT&rsquo;.</p> <p>The return value is suitable to be used as an X11 FONT_PROPERTY.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="face">face</td><td class="desc"> <p>Input face handle.</p> </td></tr> </table> <h4>return</h4> <p>Font format string. <code>NULL</code> in case of error.</p> <h4>note</h4> <p>A deprecated name for the same function is <code>FT_Get_X11_Font_Format</code>.</p> <hr> </article> </div> </div> </main> <footer class="md-footer"> <nav class="md-footer__inner md-grid" aria-label="Footer"> <a href="ft2-svg_fonts.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: OpenType SVG Fonts" rel="prev"> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Previous </span> OpenType SVG Fonts </div> </div> </a> <a href="ft2-gasp_table.html" class="md-footer__link md-footer__link--next" aria-label="Next: Gasp Table" rel="next"> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Next </span> Gasp Table </div> </div> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg> </div> </a> </nav> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-footer-copyright"> <div class="md-footer-copyright__highlight"> Copyright 2022 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>. </div> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"base": ".", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "assets/javascripts/workers/search.477d984a.min.js", "version": null}</script> <script src="assets/javascripts/bundle.82b56eb2.min.js"></script> <script src="javascripts/extra.js"></script> </body> </html>
whupdup/frame
real/third_party/freetype-2.12.0/docs/reference/ft2-font_formats.html
HTML
gpl-3.0
28,572
<!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="description" content="API Reference Documentation for FreeType-2.12.0"> <meta name="author" content="FreeType Contributors"> <link rel="icon" href="images/favico.ico"> <meta name="generator" content="mkdocs-1.2.1, mkdocs-material-7.1.9"> <title>Gasp Table - FreeType-2.12.0 API Reference</title> <link rel="stylesheet" href="assets/stylesheets/main.ca7ac06f.min.css"> <link rel="stylesheet" href="assets/stylesheets/palette.f1a3b89f.min.css"> <meta name="theme-color" content="#4cae4f"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback"> <style>:root{--md-text-font-family:"Noto Serif";--md-code-font-family:"Roboto Mono"}</style> <link rel="stylesheet" href="stylesheets/extra.css"> </head> <body dir="ltr" data-md-color-scheme="" data-md-color-primary="green" data-md-color-accent="green"> <script>function __prefix(e){return new URL(".",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <label class="md-overlay" for="__drawer"></label> <div data-md-component="skip"> <a href="#gasp-table" class="md-skip"> Skip to content </a> </div> <div data-md-component="announce"> </div> <header class="md-header" data-md-component="header"> <nav class="md-header__inner md-grid" aria-label="Header"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> <label class="md-header__button md-icon" for="__drawer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg> </label> <div class="md-header__title" data-md-component="header-title"> <div class="md-header__ellipsis"> <div class="md-header__topic"> <span class="md-ellipsis"> FreeType-2.12.0 API Reference </span> </div> <div class="md-header__topic" data-md-component="header-topic"> <span class="md-ellipsis"> Gasp Table </span> </div> </div> </div> <label class="md-header__button md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> </label> <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required> <label class="md-search__icon md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </label> <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg> </button> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" data-md-scrollfix> <div class="md-search-result" data-md-component="search-result"> <div class="md-search-result__meta"> Initializing search </div> <ol class="md-search-result__list"></ol> </div> </div> </div> </div> </div> </nav> </header> <div class="md-container" data-md-component="container"> <main class="md-main" data-md-component="main"> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <label class="md-nav__title" for="__drawer"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> FreeType-2.12.0 API Reference </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="index.html" class="md-nav__link"> TOC </a> </li> <li class="md-nav__item"> <a href="ft2-index.html" class="md-nav__link"> Index </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" > <label class="md-nav__link" for="__nav_3"> General Remarks <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="General Remarks" data-md-level="1"> <label class="md-nav__title" for="__nav_3"> <span class="md-nav__icon md-icon"></span> General Remarks </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-preamble.html" class="md-nav__link"> Preamble </a> </li> <li class="md-nav__item"> <a href="ft2-header_inclusion.html" class="md-nav__link"> FreeType's header inclusion scheme </a> </li> <li class="md-nav__item"> <a href="ft2-user_allocation.html" class="md-nav__link"> User allocation </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" > <label class="md-nav__link" for="__nav_4"> Core API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Core API" data-md-level="1"> <label class="md-nav__title" for="__nav_4"> <span class="md-nav__icon md-icon"></span> Core API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-version.html" class="md-nav__link"> FreeType Version </a> </li> <li class="md-nav__item"> <a href="ft2-basic_types.html" class="md-nav__link"> Basic Data Types </a> </li> <li class="md-nav__item"> <a href="ft2-base_interface.html" class="md-nav__link"> Base Interface </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_variants.html" class="md-nav__link"> Unicode Variation Sequences </a> </li> <li class="md-nav__item"> <a href="ft2-color_management.html" class="md-nav__link"> Glyph Color Management </a> </li> <li class="md-nav__item"> <a href="ft2-layer_management.html" class="md-nav__link"> Glyph Layer Management </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_management.html" class="md-nav__link"> Glyph Management </a> </li> <li class="md-nav__item"> <a href="ft2-mac_specific.html" class="md-nav__link"> Mac Specific Interface </a> </li> <li class="md-nav__item"> <a href="ft2-sizes_management.html" class="md-nav__link"> Size Management </a> </li> <li class="md-nav__item"> <a href="ft2-header_file_macros.html" class="md-nav__link"> Header File Macros </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--active md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" checked> <label class="md-nav__link" for="__nav_5"> Format-Specific API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Format-Specific API" data-md-level="1"> <label class="md-nav__title" for="__nav_5"> <span class="md-nav__icon md-icon"></span> Format-Specific API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-multiple_masters.html" class="md-nav__link"> Multiple Masters </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_tables.html" class="md-nav__link"> TrueType Tables </a> </li> <li class="md-nav__item"> <a href="ft2-type1_tables.html" class="md-nav__link"> Type 1 Tables </a> </li> <li class="md-nav__item"> <a href="ft2-sfnt_names.html" class="md-nav__link"> SFNT Names </a> </li> <li class="md-nav__item"> <a href="ft2-bdf_fonts.html" class="md-nav__link"> BDF and PCF Files </a> </li> <li class="md-nav__item"> <a href="ft2-cid_fonts.html" class="md-nav__link"> CID Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-pfr_fonts.html" class="md-nav__link"> PFR Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-winfnt_fonts.html" class="md-nav__link"> Window FNT Files </a> </li> <li class="md-nav__item"> <a href="ft2-svg_fonts.html" class="md-nav__link"> OpenType SVG Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-font_formats.html" class="md-nav__link"> Font Formats </a> </li> <li class="md-nav__item md-nav__item--active"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <label class="md-nav__link md-nav__link--active" for="__toc"> Gasp Table <span class="md-nav__icon md-icon"></span> </label> <a href="ft2-gasp_table.html" class="md-nav__link md-nav__link--active"> Gasp Table </a> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_gasp_xxx" class="md-nav__link"> FT_GASP_XXX </a> </li> <li class="md-nav__item"> <a href="#ft_get_gasp" class="md-nav__link"> FT_Get_Gasp </a> </li> </ul> </nav> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" > <label class="md-nav__link" for="__nav_6"> Controlling FreeType Modules <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Controlling FreeType Modules" data-md-level="1"> <label class="md-nav__title" for="__nav_6"> <span class="md-nav__icon md-icon"></span> Controlling FreeType Modules </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-auto_hinter.html" class="md-nav__link"> The auto-hinter </a> </li> <li class="md-nav__item"> <a href="ft2-cff_driver.html" class="md-nav__link"> The CFF driver </a> </li> <li class="md-nav__item"> <a href="ft2-t1_cid_driver.html" class="md-nav__link"> The Type 1 and CID drivers </a> </li> <li class="md-nav__item"> <a href="ft2-tt_driver.html" class="md-nav__link"> The TrueType driver </a> </li> <li class="md-nav__item"> <a href="ft2-pcf_driver.html" class="md-nav__link"> The PCF driver </a> </li> <li class="md-nav__item"> <a href="ft2-ot_svg_driver.html" class="md-nav__link"> The SVG driver </a> </li> <li class="md-nav__item"> <a href="ft2-properties.html" class="md-nav__link"> Driver properties </a> </li> <li class="md-nav__item"> <a href="ft2-parameter_tags.html" class="md-nav__link"> Parameter Tags </a> </li> <li class="md-nav__item"> <a href="ft2-lcd_rendering.html" class="md-nav__link"> Subpixel Rendering </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" > <label class="md-nav__link" for="__nav_7"> Cache Sub-System <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1"> <label class="md-nav__title" for="__nav_7"> <span class="md-nav__icon md-icon"></span> Cache Sub-System </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-cache_subsystem.html" class="md-nav__link"> Cache Sub-System </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" > <label class="md-nav__link" for="__nav_8"> Support API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Support API" data-md-level="1"> <label class="md-nav__title" for="__nav_8"> <span class="md-nav__icon md-icon"></span> Support API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-computations.html" class="md-nav__link"> Computations </a> </li> <li class="md-nav__item"> <a href="ft2-list_processing.html" class="md-nav__link"> List Processing </a> </li> <li class="md-nav__item"> <a href="ft2-outline_processing.html" class="md-nav__link"> Outline Processing </a> </li> <li class="md-nav__item"> <a href="ft2-quick_advance.html" class="md-nav__link"> Quick retrieval of advance values </a> </li> <li class="md-nav__item"> <a href="ft2-bitmap_handling.html" class="md-nav__link"> Bitmap Handling </a> </li> <li class="md-nav__item"> <a href="ft2-raster.html" class="md-nav__link"> Scanline Converter </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_stroker.html" class="md-nav__link"> Glyph Stroker </a> </li> <li class="md-nav__item"> <a href="ft2-system_interface.html" class="md-nav__link"> System Interface </a> </li> <li class="md-nav__item"> <a href="ft2-module_management.html" class="md-nav__link"> Module Management </a> </li> <li class="md-nav__item"> <a href="ft2-gzip.html" class="md-nav__link"> GZIP Streams </a> </li> <li class="md-nav__item"> <a href="ft2-lzw.html" class="md-nav__link"> LZW Streams </a> </li> <li class="md-nav__item"> <a href="ft2-bzip2.html" class="md-nav__link"> BZIP2 Streams </a> </li> <li class="md-nav__item"> <a href="ft2-debugging_apis.html" class="md-nav__link"> External Debugging APIs </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" > <label class="md-nav__link" for="__nav_9"> Error Codes <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Error Codes" data-md-level="1"> <label class="md-nav__title" for="__nav_9"> <span class="md-nav__icon md-icon"></span> Error Codes </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-error_enumerations.html" class="md-nav__link"> Error Enumerations </a> </li> <li class="md-nav__item"> <a href="ft2-error_code_values.html" class="md-nav__link"> Error Code Values </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" > <label class="md-nav__link" for="__nav_10"> Miscellaneous <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1"> <label class="md-nav__title" for="__nav_10"> <span class="md-nav__icon md-icon"></span> Miscellaneous </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-gx_validation.html" class="md-nav__link"> TrueTypeGX/AAT Validation </a> </li> <li class="md-nav__item"> <a href="ft2-incremental.html" class="md-nav__link"> Incremental Loading </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_engine.html" class="md-nav__link"> The TrueType Engine </a> </li> <li class="md-nav__item"> <a href="ft2-ot_validation.html" class="md-nav__link"> OpenType Validation </a> </li> </ul> </nav> </li> </ul> </nav> </div> </div> </div> <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_gasp_xxx" class="md-nav__link"> FT_GASP_XXX </a> </li> <li class="md-nav__item"> <a href="#ft_get_gasp" class="md-nav__link"> FT_Get_Gasp </a> </li> </ul> </nav> </div> </div> </div> <div class="md-content" data-md-component="content"> <article class="md-content__inner md-typeset"> <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; <a href="index.html#format-specific-api">Format-Specific API</a> &raquo; Gasp Table</p> <hr /> <h1 id="gasp-table">Gasp Table<a class="headerlink" href="#gasp-table" title="Permanent link">&para;</a></h1> <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2> <p>The function <code><a href="ft2-gasp_table.html#ft_get_gasp">FT_Get_Gasp</a></code> can be used to query a TrueType or OpenType font for specific entries in its &lsquo;gasp&rsquo; table, if any. This is mainly useful when implementing native TrueType hinting with the bytecode interpreter to duplicate the Windows text rendering results.</p> <h2 id="ft_gasp_xxx">FT_GASP_XXX<a class="headerlink" href="#ft_gasp_xxx" title="Permanent link">&para;</a></h2> <p>Defined in FT_GASP_H (freetype/ftgasp.h).</p> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <a href="ft2-gasp_table.html#ft_gasp_no_table">FT_GASP_NO_TABLE</a> -1 #<span class="keyword">define</span> <a href="ft2-gasp_table.html#ft_gasp_do_gridfit">FT_GASP_DO_GRIDFIT</a> 0x01 #<span class="keyword">define</span> <a href="ft2-gasp_table.html#ft_gasp_do_gray">FT_GASP_DO_GRAY</a> 0x02 #<span class="keyword">define</span> <a href="ft2-gasp_table.html#ft_gasp_symmetric_gridfit">FT_GASP_SYMMETRIC_GRIDFIT</a> 0x04 #<span class="keyword">define</span> <a href="ft2-gasp_table.html#ft_gasp_symmetric_smoothing">FT_GASP_SYMMETRIC_SMOOTHING</a> 0x08 </code></pre></div> <p>A list of values and/or bit-flags returned by the <code><a href="ft2-gasp_table.html#ft_get_gasp">FT_Get_Gasp</a></code> function.</p> <h4>values</h4> <table class="fields long"> <tr><td class="val" id="ft_gasp_no_table">FT_GASP_NO_TABLE</td><td class="desc"> <p>This special value means that there is no GASP table in this face. It is up to the client to decide what to do.</p> </td></tr> <tr><td class="val" id="ft_gasp_do_gridfit">FT_GASP_DO_GRIDFIT</td><td class="desc"> <p>Grid-fitting and hinting should be performed at the specified ppem. This <strong>really</strong> means TrueType bytecode interpretation. If this bit is not set, no hinting gets applied.</p> </td></tr> <tr><td class="val" id="ft_gasp_do_gray">FT_GASP_DO_GRAY</td><td class="desc"> <p>Anti-aliased rendering should be performed at the specified ppem. If not set, do monochrome rendering.</p> </td></tr> <tr><td class="val" id="ft_gasp_symmetric_smoothing">FT_GASP_SYMMETRIC_SMOOTHING</td><td class="desc"> <p>If set, smoothing along multiple axes must be used with ClearType.</p> </td></tr> <tr><td class="val" id="ft_gasp_symmetric_gridfit">FT_GASP_SYMMETRIC_GRIDFIT</td><td class="desc"> <p>Grid-fitting must be used with ClearType's symmetric smoothing.</p> </td></tr> </table> <h4>note</h4> <p>The bit-flags <code>FT_GASP_DO_GRIDFIT</code> and <code>FT_GASP_DO_GRAY</code> are to be used for standard font rasterization only. Independently of that, <code>FT_GASP_SYMMETRIC_SMOOTHING</code> and <code>FT_GASP_SYMMETRIC_GRIDFIT</code> are to be used if ClearType is enabled (and <code>FT_GASP_DO_GRIDFIT</code> and <code>FT_GASP_DO_GRAY</code> are consequently ignored).</p> <p>&lsquo;ClearType&rsquo; is Microsoft's implementation of LCD rendering, partly protected by patents.</p> <h4>since</h4> <p>2.3.0</p> <hr> <h2 id="ft_get_gasp">FT_Get_Gasp<a class="headerlink" href="#ft_get_gasp" title="Permanent link">&para;</a></h2> <p>Defined in FT_GASP_H (freetype/ftgasp.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_int">FT_Int</a> ) <b>FT_Get_Gasp</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a> face, <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> ppem ); </code></pre></div> <p>For a TrueType or OpenType font file, return the rasterizer behaviour flags from the font's &lsquo;gasp&rsquo; table corresponding to a given character pixel size.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="face">face</td><td class="desc"> <p>The source face handle.</p> </td></tr> <tr><td class="val" id="ppem">ppem</td><td class="desc"> <p>The vertical character pixel size.</p> </td></tr> </table> <h4>return</h4> <p>Bit flags (see <code><a href="ft2-gasp_table.html#ft_gasp_xxx">FT_GASP_XXX</a></code>), or <code><a href="ft2-gasp_table.html#ft_gasp_xxx">FT_GASP_NO_TABLE</a></code> if there is no &lsquo;gasp&rsquo; table in the face.</p> <h4>note</h4> <p>If you want to use the MM functionality of OpenType variation fonts (i.e., using <code><a href="ft2-multiple_masters.html#ft_set_var_design_coordinates">FT_Set_Var_Design_Coordinates</a></code> and friends), call this function <strong>after</strong> setting an instance since the return values can change.</p> <h4>since</h4> <p>2.3.0</p> <hr> </article> </div> </div> </main> <footer class="md-footer"> <nav class="md-footer__inner md-grid" aria-label="Footer"> <a href="ft2-font_formats.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: Font Formats" rel="prev"> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Previous </span> Font Formats </div> </div> </a> <a href="ft2-auto_hinter.html" class="md-footer__link md-footer__link--next" aria-label="Next: The auto-hinter" rel="next"> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Next </span> The auto-hinter </div> </div> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg> </div> </a> </nav> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-footer-copyright"> <div class="md-footer-copyright__highlight"> Copyright 2022 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>. </div> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"base": ".", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "assets/javascripts/workers/search.477d984a.min.js", "version": null}</script> <script src="assets/javascripts/bundle.82b56eb2.min.js"></script> <script src="javascripts/extra.js"></script> </body> </html>
whupdup/frame
real/third_party/freetype-2.12.0/docs/reference/ft2-gasp_table.html
HTML
gpl-3.0
31,649
<!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="description" content="API Reference Documentation for FreeType-2.12.0"> <meta name="author" content="FreeType Contributors"> <link rel="icon" href="images/favico.ico"> <meta name="generator" content="mkdocs-1.2.1, mkdocs-material-7.1.9"> <title>Glyph Management - FreeType-2.12.0 API Reference</title> <link rel="stylesheet" href="assets/stylesheets/main.ca7ac06f.min.css"> <link rel="stylesheet" href="assets/stylesheets/palette.f1a3b89f.min.css"> <meta name="theme-color" content="#4cae4f"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback"> <style>:root{--md-text-font-family:"Noto Serif";--md-code-font-family:"Roboto Mono"}</style> <link rel="stylesheet" href="stylesheets/extra.css"> </head> <body dir="ltr" data-md-color-scheme="" data-md-color-primary="green" data-md-color-accent="green"> <script>function __prefix(e){return new URL(".",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <label class="md-overlay" for="__drawer"></label> <div data-md-component="skip"> <a href="#glyph-management" class="md-skip"> Skip to content </a> </div> <div data-md-component="announce"> </div> <header class="md-header" data-md-component="header"> <nav class="md-header__inner md-grid" aria-label="Header"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> <label class="md-header__button md-icon" for="__drawer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg> </label> <div class="md-header__title" data-md-component="header-title"> <div class="md-header__ellipsis"> <div class="md-header__topic"> <span class="md-ellipsis"> FreeType-2.12.0 API Reference </span> </div> <div class="md-header__topic" data-md-component="header-topic"> <span class="md-ellipsis"> Glyph Management </span> </div> </div> </div> <label class="md-header__button md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> </label> <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required> <label class="md-search__icon md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </label> <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg> </button> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" data-md-scrollfix> <div class="md-search-result" data-md-component="search-result"> <div class="md-search-result__meta"> Initializing search </div> <ol class="md-search-result__list"></ol> </div> </div> </div> </div> </div> </nav> </header> <div class="md-container" data-md-component="container"> <main class="md-main" data-md-component="main"> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <label class="md-nav__title" for="__drawer"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> FreeType-2.12.0 API Reference </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="index.html" class="md-nav__link"> TOC </a> </li> <li class="md-nav__item"> <a href="ft2-index.html" class="md-nav__link"> Index </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" > <label class="md-nav__link" for="__nav_3"> General Remarks <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="General Remarks" data-md-level="1"> <label class="md-nav__title" for="__nav_3"> <span class="md-nav__icon md-icon"></span> General Remarks </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-preamble.html" class="md-nav__link"> Preamble </a> </li> <li class="md-nav__item"> <a href="ft2-header_inclusion.html" class="md-nav__link"> FreeType's header inclusion scheme </a> </li> <li class="md-nav__item"> <a href="ft2-user_allocation.html" class="md-nav__link"> User allocation </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--active md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" checked> <label class="md-nav__link" for="__nav_4"> Core API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Core API" data-md-level="1"> <label class="md-nav__title" for="__nav_4"> <span class="md-nav__icon md-icon"></span> Core API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-version.html" class="md-nav__link"> FreeType Version </a> </li> <li class="md-nav__item"> <a href="ft2-basic_types.html" class="md-nav__link"> Basic Data Types </a> </li> <li class="md-nav__item"> <a href="ft2-base_interface.html" class="md-nav__link"> Base Interface </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_variants.html" class="md-nav__link"> Unicode Variation Sequences </a> </li> <li class="md-nav__item"> <a href="ft2-color_management.html" class="md-nav__link"> Glyph Color Management </a> </li> <li class="md-nav__item"> <a href="ft2-layer_management.html" class="md-nav__link"> Glyph Layer Management </a> </li> <li class="md-nav__item md-nav__item--active"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <label class="md-nav__link md-nav__link--active" for="__toc"> Glyph Management <span class="md-nav__icon md-icon"></span> </label> <a href="ft2-glyph_management.html" class="md-nav__link md-nav__link--active"> Glyph Management </a> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_glyph" class="md-nav__link"> FT_Glyph </a> </li> <li class="md-nav__item"> <a href="#ft_glyphrec" class="md-nav__link"> FT_GlyphRec </a> </li> <li class="md-nav__item"> <a href="#ft_bitmapglyph" class="md-nav__link"> FT_BitmapGlyph </a> </li> <li class="md-nav__item"> <a href="#ft_bitmapglyphrec" class="md-nav__link"> FT_BitmapGlyphRec </a> </li> <li class="md-nav__item"> <a href="#ft_outlineglyph" class="md-nav__link"> FT_OutlineGlyph </a> </li> <li class="md-nav__item"> <a href="#ft_outlineglyphrec" class="md-nav__link"> FT_OutlineGlyphRec </a> </li> <li class="md-nav__item"> <a href="#ft_svgglyph" class="md-nav__link"> FT_SvgGlyph </a> </li> <li class="md-nav__item"> <a href="#ft_svgglyphrec" class="md-nav__link"> FT_SvgGlyphRec </a> </li> <li class="md-nav__item"> <a href="#ft_new_glyph" class="md-nav__link"> FT_New_Glyph </a> </li> <li class="md-nav__item"> <a href="#ft_get_glyph" class="md-nav__link"> FT_Get_Glyph </a> </li> <li class="md-nav__item"> <a href="#ft_glyph_copy" class="md-nav__link"> FT_Glyph_Copy </a> </li> <li class="md-nav__item"> <a href="#ft_glyph_transform" class="md-nav__link"> FT_Glyph_Transform </a> </li> <li class="md-nav__item"> <a href="#ft_glyph_bbox_mode" class="md-nav__link"> FT_Glyph_BBox_Mode </a> </li> <li class="md-nav__item"> <a href="#ft_glyph_get_cbox" class="md-nav__link"> FT_Glyph_Get_CBox </a> </li> <li class="md-nav__item"> <a href="#ft_glyph_to_bitmap" class="md-nav__link"> FT_Glyph_To_Bitmap </a> </li> <li class="md-nav__item"> <a href="#ft_done_glyph" class="md-nav__link"> FT_Done_Glyph </a> </li> </ul> </nav> </li> <li class="md-nav__item"> <a href="ft2-mac_specific.html" class="md-nav__link"> Mac Specific Interface </a> </li> <li class="md-nav__item"> <a href="ft2-sizes_management.html" class="md-nav__link"> Size Management </a> </li> <li class="md-nav__item"> <a href="ft2-header_file_macros.html" class="md-nav__link"> Header File Macros </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" > <label class="md-nav__link" for="__nav_5"> Format-Specific API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Format-Specific API" data-md-level="1"> <label class="md-nav__title" for="__nav_5"> <span class="md-nav__icon md-icon"></span> Format-Specific API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-multiple_masters.html" class="md-nav__link"> Multiple Masters </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_tables.html" class="md-nav__link"> TrueType Tables </a> </li> <li class="md-nav__item"> <a href="ft2-type1_tables.html" class="md-nav__link"> Type 1 Tables </a> </li> <li class="md-nav__item"> <a href="ft2-sfnt_names.html" class="md-nav__link"> SFNT Names </a> </li> <li class="md-nav__item"> <a href="ft2-bdf_fonts.html" class="md-nav__link"> BDF and PCF Files </a> </li> <li class="md-nav__item"> <a href="ft2-cid_fonts.html" class="md-nav__link"> CID Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-pfr_fonts.html" class="md-nav__link"> PFR Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-winfnt_fonts.html" class="md-nav__link"> Window FNT Files </a> </li> <li class="md-nav__item"> <a href="ft2-svg_fonts.html" class="md-nav__link"> OpenType SVG Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-font_formats.html" class="md-nav__link"> Font Formats </a> </li> <li class="md-nav__item"> <a href="ft2-gasp_table.html" class="md-nav__link"> Gasp Table </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" > <label class="md-nav__link" for="__nav_6"> Controlling FreeType Modules <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Controlling FreeType Modules" data-md-level="1"> <label class="md-nav__title" for="__nav_6"> <span class="md-nav__icon md-icon"></span> Controlling FreeType Modules </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-auto_hinter.html" class="md-nav__link"> The auto-hinter </a> </li> <li class="md-nav__item"> <a href="ft2-cff_driver.html" class="md-nav__link"> The CFF driver </a> </li> <li class="md-nav__item"> <a href="ft2-t1_cid_driver.html" class="md-nav__link"> The Type 1 and CID drivers </a> </li> <li class="md-nav__item"> <a href="ft2-tt_driver.html" class="md-nav__link"> The TrueType driver </a> </li> <li class="md-nav__item"> <a href="ft2-pcf_driver.html" class="md-nav__link"> The PCF driver </a> </li> <li class="md-nav__item"> <a href="ft2-ot_svg_driver.html" class="md-nav__link"> The SVG driver </a> </li> <li class="md-nav__item"> <a href="ft2-properties.html" class="md-nav__link"> Driver properties </a> </li> <li class="md-nav__item"> <a href="ft2-parameter_tags.html" class="md-nav__link"> Parameter Tags </a> </li> <li class="md-nav__item"> <a href="ft2-lcd_rendering.html" class="md-nav__link"> Subpixel Rendering </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" > <label class="md-nav__link" for="__nav_7"> Cache Sub-System <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1"> <label class="md-nav__title" for="__nav_7"> <span class="md-nav__icon md-icon"></span> Cache Sub-System </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-cache_subsystem.html" class="md-nav__link"> Cache Sub-System </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" > <label class="md-nav__link" for="__nav_8"> Support API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Support API" data-md-level="1"> <label class="md-nav__title" for="__nav_8"> <span class="md-nav__icon md-icon"></span> Support API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-computations.html" class="md-nav__link"> Computations </a> </li> <li class="md-nav__item"> <a href="ft2-list_processing.html" class="md-nav__link"> List Processing </a> </li> <li class="md-nav__item"> <a href="ft2-outline_processing.html" class="md-nav__link"> Outline Processing </a> </li> <li class="md-nav__item"> <a href="ft2-quick_advance.html" class="md-nav__link"> Quick retrieval of advance values </a> </li> <li class="md-nav__item"> <a href="ft2-bitmap_handling.html" class="md-nav__link"> Bitmap Handling </a> </li> <li class="md-nav__item"> <a href="ft2-raster.html" class="md-nav__link"> Scanline Converter </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_stroker.html" class="md-nav__link"> Glyph Stroker </a> </li> <li class="md-nav__item"> <a href="ft2-system_interface.html" class="md-nav__link"> System Interface </a> </li> <li class="md-nav__item"> <a href="ft2-module_management.html" class="md-nav__link"> Module Management </a> </li> <li class="md-nav__item"> <a href="ft2-gzip.html" class="md-nav__link"> GZIP Streams </a> </li> <li class="md-nav__item"> <a href="ft2-lzw.html" class="md-nav__link"> LZW Streams </a> </li> <li class="md-nav__item"> <a href="ft2-bzip2.html" class="md-nav__link"> BZIP2 Streams </a> </li> <li class="md-nav__item"> <a href="ft2-debugging_apis.html" class="md-nav__link"> External Debugging APIs </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" > <label class="md-nav__link" for="__nav_9"> Error Codes <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Error Codes" data-md-level="1"> <label class="md-nav__title" for="__nav_9"> <span class="md-nav__icon md-icon"></span> Error Codes </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-error_enumerations.html" class="md-nav__link"> Error Enumerations </a> </li> <li class="md-nav__item"> <a href="ft2-error_code_values.html" class="md-nav__link"> Error Code Values </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" > <label class="md-nav__link" for="__nav_10"> Miscellaneous <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1"> <label class="md-nav__title" for="__nav_10"> <span class="md-nav__icon md-icon"></span> Miscellaneous </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-gx_validation.html" class="md-nav__link"> TrueTypeGX/AAT Validation </a> </li> <li class="md-nav__item"> <a href="ft2-incremental.html" class="md-nav__link"> Incremental Loading </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_engine.html" class="md-nav__link"> The TrueType Engine </a> </li> <li class="md-nav__item"> <a href="ft2-ot_validation.html" class="md-nav__link"> OpenType Validation </a> </li> </ul> </nav> </li> </ul> </nav> </div> </div> </div> <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_glyph" class="md-nav__link"> FT_Glyph </a> </li> <li class="md-nav__item"> <a href="#ft_glyphrec" class="md-nav__link"> FT_GlyphRec </a> </li> <li class="md-nav__item"> <a href="#ft_bitmapglyph" class="md-nav__link"> FT_BitmapGlyph </a> </li> <li class="md-nav__item"> <a href="#ft_bitmapglyphrec" class="md-nav__link"> FT_BitmapGlyphRec </a> </li> <li class="md-nav__item"> <a href="#ft_outlineglyph" class="md-nav__link"> FT_OutlineGlyph </a> </li> <li class="md-nav__item"> <a href="#ft_outlineglyphrec" class="md-nav__link"> FT_OutlineGlyphRec </a> </li> <li class="md-nav__item"> <a href="#ft_svgglyph" class="md-nav__link"> FT_SvgGlyph </a> </li> <li class="md-nav__item"> <a href="#ft_svgglyphrec" class="md-nav__link"> FT_SvgGlyphRec </a> </li> <li class="md-nav__item"> <a href="#ft_new_glyph" class="md-nav__link"> FT_New_Glyph </a> </li> <li class="md-nav__item"> <a href="#ft_get_glyph" class="md-nav__link"> FT_Get_Glyph </a> </li> <li class="md-nav__item"> <a href="#ft_glyph_copy" class="md-nav__link"> FT_Glyph_Copy </a> </li> <li class="md-nav__item"> <a href="#ft_glyph_transform" class="md-nav__link"> FT_Glyph_Transform </a> </li> <li class="md-nav__item"> <a href="#ft_glyph_bbox_mode" class="md-nav__link"> FT_Glyph_BBox_Mode </a> </li> <li class="md-nav__item"> <a href="#ft_glyph_get_cbox" class="md-nav__link"> FT_Glyph_Get_CBox </a> </li> <li class="md-nav__item"> <a href="#ft_glyph_to_bitmap" class="md-nav__link"> FT_Glyph_To_Bitmap </a> </li> <li class="md-nav__item"> <a href="#ft_done_glyph" class="md-nav__link"> FT_Done_Glyph </a> </li> </ul> </nav> </div> </div> </div> <div class="md-content" data-md-component="content"> <article class="md-content__inner md-typeset"> <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; <a href="index.html#core-api">Core API</a> &raquo; Glyph Management</p> <hr /> <h1 id="glyph-management">Glyph Management<a class="headerlink" href="#glyph-management" title="Permanent link">&para;</a></h1> <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2> <p>This section contains definitions used to manage glyph data through generic <code><a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a></code> objects. Each of them can contain a bitmap, a vector outline, or even images in other formats. These objects are detached from <code><a href="ft2-base_interface.html#ft_face">FT_Face</a></code>, contrary to <code><a href="ft2-base_interface.html#ft_glyphslot">FT_GlyphSlot</a></code>.</p> <h2 id="ft_glyph">FT_Glyph<a class="headerlink" href="#ft_glyph" title="Permanent link">&para;</a></h2> <p>Defined in FT_GLYPH_H (freetype/ftglyph.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_GlyphRec_* <b>FT_Glyph</b>; </code></pre></div> <p>Handle to an object used to model generic glyph images. It is a pointer to the <code><a href="ft2-glyph_management.html#ft_glyphrec">FT_GlyphRec</a></code> structure and can contain a glyph bitmap or pointer.</p> <h4>note</h4> <p>Glyph objects are not owned by the library. You must thus release them manually (through <code><a href="ft2-glyph_management.html#ft_done_glyph">FT_Done_Glyph</a></code>) <em>before</em> calling <code><a href="ft2-base_interface.html#ft_done_freetype">FT_Done_FreeType</a></code>.</p> <hr> <h2 id="ft_glyphrec">FT_GlyphRec<a class="headerlink" href="#ft_glyphrec" title="Permanent link">&para;</a></h2> <p>Defined in FT_GLYPH_H (freetype/ftglyph.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_GlyphRec_ { <a href="ft2-base_interface.html#ft_library">FT_Library</a> library; <span class="keyword">const</span> FT_Glyph_Class* clazz; <a href="ft2-basic_types.html#ft_glyph_format">FT_Glyph_Format</a> format; <a href="ft2-basic_types.html#ft_vector">FT_Vector</a> advance; } <b>FT_GlyphRec</b>; </code></pre></div> <p>The root glyph structure contains a given glyph image plus its advance width in 16.16 fixed-point format.</p> <h4>fields</h4> <table class="fields"> <tr><td class="val" id="library">library</td><td class="desc"> <p>A handle to the FreeType library object.</p> </td></tr> <tr><td class="val" id="clazz">clazz</td><td class="desc"> <p>A pointer to the glyph's class. Private.</p> </td></tr> <tr><td class="val" id="format">format</td><td class="desc"> <p>The format of the glyph's image.</p> </td></tr> <tr><td class="val" id="advance">advance</td><td class="desc"> <p>A 16.16 vector that gives the glyph's advance width.</p> </td></tr> </table> <hr> <h2 id="ft_bitmapglyph">FT_BitmapGlyph<a class="headerlink" href="#ft_bitmapglyph" title="Permanent link">&para;</a></h2> <p>Defined in FT_GLYPH_H (freetype/ftglyph.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_BitmapGlyphRec_* <b>FT_BitmapGlyph</b>; </code></pre></div> <p>A handle to an object used to model a bitmap glyph image. This is a &lsquo;sub-class&rsquo; of <code><a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a></code>, and a pointer to <code><a href="ft2-glyph_management.html#ft_bitmapglyphrec">FT_BitmapGlyphRec</a></code>.</p> <hr> <h2 id="ft_bitmapglyphrec">FT_BitmapGlyphRec<a class="headerlink" href="#ft_bitmapglyphrec" title="Permanent link">&para;</a></h2> <p>Defined in FT_GLYPH_H (freetype/ftglyph.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_BitmapGlyphRec_ { <a href="ft2-glyph_management.html#ft_glyphrec">FT_GlyphRec</a> root; <a href="ft2-basic_types.html#ft_int">FT_Int</a> left; <a href="ft2-basic_types.html#ft_int">FT_Int</a> top; <a href="ft2-basic_types.html#ft_bitmap">FT_Bitmap</a> bitmap; } <b>FT_BitmapGlyphRec</b>; </code></pre></div> <p>A structure used for bitmap glyph images. This really is a &lsquo;sub-class&rsquo; of <code><a href="ft2-glyph_management.html#ft_glyphrec">FT_GlyphRec</a></code>.</p> <h4>fields</h4> <table class="fields"> <tr><td class="val" id="root">root</td><td class="desc"> <p>The root fields of <code><a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a></code>.</p> </td></tr> <tr><td class="val" id="left">left</td><td class="desc"> <p>The left-side bearing, i.e., the horizontal distance from the current pen position to the left border of the glyph bitmap.</p> </td></tr> <tr><td class="val" id="top">top</td><td class="desc"> <p>The top-side bearing, i.e., the vertical distance from the current pen position to the top border of the glyph bitmap. This distance is positive for upwards&nbsp;y!</p> </td></tr> <tr><td class="val" id="bitmap">bitmap</td><td class="desc"> <p>A descriptor for the bitmap.</p> </td></tr> </table> <h4>note</h4> <p>You can typecast an <code><a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a></code> to <code><a href="ft2-glyph_management.html#ft_bitmapglyph">FT_BitmapGlyph</a></code> if you have <code>glyph-&gt;format == FT_GLYPH_FORMAT_BITMAP</code>. This lets you access the bitmap's contents easily.</p> <p>The corresponding pixel buffer is always owned by <code><a href="ft2-glyph_management.html#ft_bitmapglyph">FT_BitmapGlyph</a></code> and is thus created and destroyed with it.</p> <hr> <h2 id="ft_outlineglyph">FT_OutlineGlyph<a class="headerlink" href="#ft_outlineglyph" title="Permanent link">&para;</a></h2> <p>Defined in FT_GLYPH_H (freetype/ftglyph.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_OutlineGlyphRec_* <b>FT_OutlineGlyph</b>; </code></pre></div> <p>A handle to an object used to model an outline glyph image. This is a &lsquo;sub-class&rsquo; of <code><a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a></code>, and a pointer to <code><a href="ft2-glyph_management.html#ft_outlineglyphrec">FT_OutlineGlyphRec</a></code>.</p> <hr> <h2 id="ft_outlineglyphrec">FT_OutlineGlyphRec<a class="headerlink" href="#ft_outlineglyphrec" title="Permanent link">&para;</a></h2> <p>Defined in FT_GLYPH_H (freetype/ftglyph.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_OutlineGlyphRec_ { <a href="ft2-glyph_management.html#ft_glyphrec">FT_GlyphRec</a> root; <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a> outline; } <b>FT_OutlineGlyphRec</b>; </code></pre></div> <p>A structure used for outline (vectorial) glyph images. This really is a &lsquo;sub-class&rsquo; of <code><a href="ft2-glyph_management.html#ft_glyphrec">FT_GlyphRec</a></code>.</p> <h4>fields</h4> <table class="fields"> <tr><td class="val" id="root">root</td><td class="desc"> <p>The root <code><a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a></code> fields.</p> </td></tr> <tr><td class="val" id="outline">outline</td><td class="desc"> <p>A descriptor for the outline.</p> </td></tr> </table> <h4>note</h4> <p>You can typecast an <code><a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a></code> to <code><a href="ft2-glyph_management.html#ft_outlineglyph">FT_OutlineGlyph</a></code> if you have <code>glyph-&gt;format == FT_GLYPH_FORMAT_OUTLINE</code>. This lets you access the outline's content easily.</p> <p>As the outline is extracted from a glyph slot, its coordinates are expressed normally in 26.6 pixels, unless the flag <code><a href="ft2-base_interface.html#ft_load_xxx">FT_LOAD_NO_SCALE</a></code> was used in <code><a href="ft2-base_interface.html#ft_load_glyph">FT_Load_Glyph</a></code> or <code><a href="ft2-base_interface.html#ft_load_char">FT_Load_Char</a></code>.</p> <p>The outline's tables are always owned by the object and are destroyed with it.</p> <hr> <h2 id="ft_svgglyph">FT_SvgGlyph<a class="headerlink" href="#ft_svgglyph" title="Permanent link">&para;</a></h2> <p>Defined in FT_GLYPH_H (freetype/ftglyph.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_SvgGlyphRec_* <b>FT_SvgGlyph</b>; </code></pre></div> <p>A handle to an object used to model an SVG glyph. This is a &lsquo;sub-class&rsquo; of <code><a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a></code>, and a pointer to <code><a href="ft2-glyph_management.html#ft_svgglyphrec">FT_SvgGlyphRec</a></code>.</p> <h4>since</h4> <p>2.12</p> <hr> <h2 id="ft_svgglyphrec">FT_SvgGlyphRec<a class="headerlink" href="#ft_svgglyphrec" title="Permanent link">&para;</a></h2> <p>Defined in FT_GLYPH_H (freetype/ftglyph.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_SvgGlyphRec_ { <a href="ft2-glyph_management.html#ft_glyphrec">FT_GlyphRec</a> root; <a href="ft2-basic_types.html#ft_byte">FT_Byte</a>* svg_document; <a href="ft2-basic_types.html#ft_ulong">FT_ULong</a> svg_document_length; <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> glyph_index; <a href="ft2-base_interface.html#ft_size_metrics">FT_Size_Metrics</a> metrics; <a href="ft2-basic_types.html#ft_ushort">FT_UShort</a> units_per_EM; <a href="ft2-basic_types.html#ft_ushort">FT_UShort</a> start_glyph_id; <a href="ft2-basic_types.html#ft_ushort">FT_UShort</a> end_glyph_id; <a href="ft2-basic_types.html#ft_matrix">FT_Matrix</a> transform; <a href="ft2-basic_types.html#ft_vector">FT_Vector</a> delta; } <b>FT_SvgGlyphRec</b>; </code></pre></div> <p>A structure used for OT-SVG glyphs. This is a &lsquo;sub-class&rsquo; of <code><a href="ft2-glyph_management.html#ft_glyphrec">FT_GlyphRec</a></code>.</p> <h4>fields</h4> <table class="fields"> <tr><td class="val" id="root">root</td><td class="desc"> <p>The root <code><a href="ft2-glyph_management.html#ft_glyphrec">FT_GlyphRec</a></code> fields.</p> </td></tr> <tr><td class="val" id="svg_document">svg_document</td><td class="desc"> <p>A pointer to the SVG document.</p> </td></tr> <tr><td class="val" id="svg_document_length">svg_document_length</td><td class="desc"> <p>The length of <code>svg_document</code>.</p> </td></tr> <tr><td class="val" id="glyph_index">glyph_index</td><td class="desc"> <p>The index of the glyph to be rendered.</p> </td></tr> <tr><td class="val" id="metrics">metrics</td><td class="desc"> <p>A metrics object storing the size information.</p> </td></tr> <tr><td class="val" id="units_per_em">units_per_EM</td><td class="desc"> <p>The size of the EM square.</p> </td></tr> <tr><td class="val" id="start_glyph_id">start_glyph_id</td><td class="desc"> <p>The first glyph ID in the glyph range covered by this document.</p> </td></tr> <tr><td class="val" id="end_glyph_id">end_glyph_id</td><td class="desc"> <p>The last glyph ID in the glyph range covered by this document.</p> </td></tr> <tr><td class="val" id="transform">transform</td><td class="desc"> <p>A 2x2 transformation matrix to apply to the glyph while rendering it.</p> </td></tr> <tr><td class="val" id="delta">delta</td><td class="desc"> <p>Translation to apply to the glyph while rendering.</p> </td></tr> </table> <h4>note</h4> <p>The Glyph Management API requires <code><a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a></code> or its &lsquo;sub-class&rsquo; to have all the information needed to completely define the glyph's rendering. Outline-based glyphs can directly apply transformations to the outline but this is not possible for an SVG document that hasn't been parsed. Therefore, the transformation is stored along with the document. In the absence of a &lsquo;ViewBox&rsquo; or &lsquo;Width&rsquo;/'Height' attribute, the size of the ViewPort should be assumed to be &lsquo;units_per_EM&rsquo;.</p> <hr> <h2 id="ft_new_glyph">FT_New_Glyph<a class="headerlink" href="#ft_new_glyph" title="Permanent link">&para;</a></h2> <p>Defined in FT_GLYPH_H (freetype/ftglyph.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_New_Glyph</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library, <a href="ft2-basic_types.html#ft_glyph_format">FT_Glyph_Format</a> format, <a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a> *aglyph ); </code></pre></div> <p>A function used to create a new empty glyph image. Note that the created <code><a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a></code> object must be released with <code><a href="ft2-glyph_management.html#ft_done_glyph">FT_Done_Glyph</a></code>.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="library">library</td><td class="desc"> <p>A handle to the FreeType library object.</p> </td></tr> <tr><td class="val" id="format">format</td><td class="desc"> <p>The format of the glyph's image.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="aglyph">aglyph</td><td class="desc"> <p>A handle to the glyph object.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>since</h4> <p>2.10</p> <hr> <h2 id="ft_get_glyph">FT_Get_Glyph<a class="headerlink" href="#ft_get_glyph" title="Permanent link">&para;</a></h2> <p>Defined in FT_GLYPH_H (freetype/ftglyph.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Get_Glyph</b>( <a href="ft2-base_interface.html#ft_glyphslot">FT_GlyphSlot</a> slot, <a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a> *aglyph ); </code></pre></div> <p>A function used to extract a glyph image from a slot. Note that the created <code><a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a></code> object must be released with <code><a href="ft2-glyph_management.html#ft_done_glyph">FT_Done_Glyph</a></code>.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="slot">slot</td><td class="desc"> <p>A handle to the source glyph slot.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="aglyph">aglyph</td><td class="desc"> <p>A handle to the glyph object.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>Because <code>*aglyph-&gt;advance.x</code> and <code>*aglyph-&gt;advance.y</code> are 16.16 fixed-point numbers, <code>slot-&gt;advance.x</code> and <code>slot-&gt;advance.y</code> (which are in 26.6 fixed-point format) must be in the range ]-32768;32768[.</p> <hr> <h2 id="ft_glyph_copy">FT_Glyph_Copy<a class="headerlink" href="#ft_glyph_copy" title="Permanent link">&para;</a></h2> <p>Defined in FT_GLYPH_H (freetype/ftglyph.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Glyph_Copy</b>( <a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a> source, <a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a> *target ); </code></pre></div> <p>A function used to copy a glyph image. Note that the created <code><a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a></code> object must be released with <code><a href="ft2-glyph_management.html#ft_done_glyph">FT_Done_Glyph</a></code>.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="source">source</td><td class="desc"> <p>A handle to the source glyph object.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="target">target</td><td class="desc"> <p>A handle to the target glyph object. 0&nbsp;in case of error.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <hr> <h2 id="ft_glyph_transform">FT_Glyph_Transform<a class="headerlink" href="#ft_glyph_transform" title="Permanent link">&para;</a></h2> <p>Defined in FT_GLYPH_H (freetype/ftglyph.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Glyph_Transform</b>( <a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a> glyph, <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_matrix">FT_Matrix</a>* matrix, <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>* delta ); </code></pre></div> <p>Transform a glyph image if its format is scalable.</p> <h4>inout</h4> <table class="fields"> <tr><td class="val" id="glyph">glyph</td><td class="desc"> <p>A handle to the target glyph object.</p> </td></tr> </table> <h4>input</h4> <table class="fields"> <tr><td class="val" id="matrix">matrix</td><td class="desc"> <p>A pointer to a 2x2 matrix to apply.</p> </td></tr> <tr><td class="val" id="delta">delta</td><td class="desc"> <p>A pointer to a 2d vector to apply. Coordinates are expressed in 1/64th of a pixel.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code (if not 0, the glyph format is not scalable).</p> <h4>note</h4> <p>The 2x2 transformation matrix is also applied to the glyph's advance vector.</p> <hr> <h2 id="ft_glyph_bbox_mode">FT_Glyph_BBox_Mode<a class="headerlink" href="#ft_glyph_bbox_mode" title="Permanent link">&para;</a></h2> <p>Defined in FT_GLYPH_H (freetype/ftglyph.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">enum</span> FT_Glyph_BBox_Mode_ { <a href="ft2-glyph_management.html#ft_glyph_bbox_unscaled">FT_GLYPH_BBOX_UNSCALED</a> = 0, <a href="ft2-glyph_management.html#ft_glyph_bbox_subpixels">FT_GLYPH_BBOX_SUBPIXELS</a> = 0, <a href="ft2-glyph_management.html#ft_glyph_bbox_gridfit">FT_GLYPH_BBOX_GRIDFIT</a> = 1, <a href="ft2-glyph_management.html#ft_glyph_bbox_truncate">FT_GLYPH_BBOX_TRUNCATE</a> = 2, <a href="ft2-glyph_management.html#ft_glyph_bbox_pixels">FT_GLYPH_BBOX_PIXELS</a> = 3 } <b>FT_Glyph_BBox_Mode</b>; /* these constants are deprecated; use the corresponding */ /* `<b>FT_Glyph_BBox_Mode</b>` values instead */ #<span class="keyword">define</span> ft_glyph_bbox_unscaled <a href="ft2-glyph_management.html#ft_glyph_bbox_unscaled">FT_GLYPH_BBOX_UNSCALED</a> #<span class="keyword">define</span> ft_glyph_bbox_subpixels <a href="ft2-glyph_management.html#ft_glyph_bbox_subpixels">FT_GLYPH_BBOX_SUBPIXELS</a> #<span class="keyword">define</span> ft_glyph_bbox_gridfit <a href="ft2-glyph_management.html#ft_glyph_bbox_gridfit">FT_GLYPH_BBOX_GRIDFIT</a> #<span class="keyword">define</span> ft_glyph_bbox_truncate <a href="ft2-glyph_management.html#ft_glyph_bbox_truncate">FT_GLYPH_BBOX_TRUNCATE</a> #<span class="keyword">define</span> ft_glyph_bbox_pixels <a href="ft2-glyph_management.html#ft_glyph_bbox_pixels">FT_GLYPH_BBOX_PIXELS</a> </code></pre></div> <p>The mode how the values of <code><a href="ft2-glyph_management.html#ft_glyph_get_cbox">FT_Glyph_Get_CBox</a></code> are returned.</p> <h4>values</h4> <table class="fields"> <tr><td class="val" id="ft_glyph_bbox_unscaled">FT_GLYPH_BBOX_UNSCALED</td><td class="desc"> <p>Return unscaled font units.</p> </td></tr> <tr><td class="val" id="ft_glyph_bbox_subpixels">FT_GLYPH_BBOX_SUBPIXELS</td><td class="desc"> <p>Return unfitted 26.6 coordinates.</p> </td></tr> <tr><td class="val" id="ft_glyph_bbox_gridfit">FT_GLYPH_BBOX_GRIDFIT</td><td class="desc"> <p>Return grid-fitted 26.6 coordinates.</p> </td></tr> <tr><td class="val" id="ft_glyph_bbox_truncate">FT_GLYPH_BBOX_TRUNCATE</td><td class="desc"> <p>Return coordinates in integer pixels.</p> </td></tr> <tr><td class="val" id="ft_glyph_bbox_pixels">FT_GLYPH_BBOX_PIXELS</td><td class="desc"> <p>Return grid-fitted pixel coordinates.</p> </td></tr> </table> <hr> <h2 id="ft_glyph_get_cbox">FT_Glyph_Get_CBox<a class="headerlink" href="#ft_glyph_get_cbox" title="Permanent link">&para;</a></h2> <p>Defined in FT_GLYPH_H (freetype/ftglyph.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> ) <b>FT_Glyph_Get_CBox</b>( <a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a> glyph, <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> bbox_mode, <a href="ft2-basic_types.html#ft_bbox">FT_BBox</a> *acbox ); </code></pre></div> <p>Return a glyph's &lsquo;control box&rsquo;. The control box encloses all the outline's points, including Bezier control points. Though it coincides with the exact bounding box for most glyphs, it can be slightly larger in some situations (like when rotating an outline that contains Bezier outside arcs).</p> <p>Computing the control box is very fast, while getting the bounding box can take much more time as it needs to walk over all segments and arcs in the outline. To get the latter, you can use the &lsquo;ftbbox&rsquo; component, which is dedicated to this single task.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="glyph">glyph</td><td class="desc"> <p>A handle to the source glyph object.</p> </td></tr> <tr><td class="val" id="mode">mode</td><td class="desc"> <p>The mode that indicates how to interpret the returned bounding box values.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="acbox">acbox</td><td class="desc"> <p>The glyph coordinate bounding box. Coordinates are expressed in 1/64th of pixels if it is grid-fitted.</p> </td></tr> </table> <h4>note</h4> <p>Coordinates are relative to the glyph origin, using the y&nbsp;upwards convention.</p> <p>If the glyph has been loaded with <code><a href="ft2-base_interface.html#ft_load_xxx">FT_LOAD_NO_SCALE</a></code>, <code>bbox_mode</code> must be set to <code><a href="ft2-glyph_management.html#ft_glyph_bbox_mode">FT_GLYPH_BBOX_UNSCALED</a></code> to get unscaled font units in 26.6 pixel format. The value <code><a href="ft2-glyph_management.html#ft_glyph_bbox_mode">FT_GLYPH_BBOX_SUBPIXELS</a></code> is another name for this constant.</p> <p>If the font is tricky and the glyph has been loaded with <code><a href="ft2-base_interface.html#ft_load_xxx">FT_LOAD_NO_SCALE</a></code>, the resulting CBox is meaningless. To get reasonable values for the CBox it is necessary to load the glyph at a large ppem value (so that the hinting instructions can properly shift and scale the subglyphs), then extracting the CBox, which can be eventually converted back to font units.</p> <p>Note that the maximum coordinates are exclusive, which means that one can compute the width and height of the glyph image (be it in integer or 26.6 pixels) as: <div class="highlight"><pre><span></span><code> width = bbox.xMax - bbox.xMin; height = bbox.yMax - bbox.yMin; </code></pre></div></p> <p>Note also that for 26.6 coordinates, if <code>bbox_mode</code> is set to <code><a href="ft2-glyph_management.html#ft_glyph_bbox_mode">FT_GLYPH_BBOX_GRIDFIT</a></code>, the coordinates will also be grid-fitted, which corresponds to: <div class="highlight"><pre><span></span><code> bbox.xMin = FLOOR(bbox.xMin); bbox.yMin = FLOOR(bbox.yMin); bbox.xMax = CEILING(bbox.xMax); bbox.yMax = CEILING(bbox.yMax); </code></pre></div></p> <p>To get the bbox in pixel coordinates, set <code>bbox_mode</code> to <code><a href="ft2-glyph_management.html#ft_glyph_bbox_mode">FT_GLYPH_BBOX_TRUNCATE</a></code>.</p> <p>To get the bbox in grid-fitted pixel coordinates, set <code>bbox_mode</code> to <code><a href="ft2-glyph_management.html#ft_glyph_bbox_mode">FT_GLYPH_BBOX_PIXELS</a></code>.</p> <hr> <h2 id="ft_glyph_to_bitmap">FT_Glyph_To_Bitmap<a class="headerlink" href="#ft_glyph_to_bitmap" title="Permanent link">&para;</a></h2> <p>Defined in FT_GLYPH_H (freetype/ftglyph.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Glyph_To_Bitmap</b>( <a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a>* the_glyph, <a href="ft2-base_interface.html#ft_render_mode">FT_Render_Mode</a> render_mode, <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>* origin, <a href="ft2-basic_types.html#ft_bool">FT_Bool</a> destroy ); </code></pre></div> <p>Convert a given glyph object to a bitmap glyph object.</p> <h4>inout</h4> <table class="fields"> <tr><td class="val" id="the_glyph">the_glyph</td><td class="desc"> <p>A pointer to a handle to the target glyph.</p> </td></tr> </table> <h4>input</h4> <table class="fields"> <tr><td class="val" id="render_mode">render_mode</td><td class="desc"> <p>An enumeration that describes how the data is rendered.</p> </td></tr> <tr><td class="val" id="origin">origin</td><td class="desc"> <p>A pointer to a vector used to translate the glyph image before rendering. Can be&nbsp;0 (if no translation). The origin is expressed in 26.6 pixels.</p> </td></tr> <tr><td class="val" id="destroy">destroy</td><td class="desc"> <p>A boolean that indicates that the original glyph image should be destroyed by this function. It is never destroyed in case of error.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>This function does nothing if the glyph format isn't scalable.</p> <p>The glyph image is translated with the <code>origin</code> vector before rendering.</p> <p>The first parameter is a pointer to an <code><a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a></code> handle that will be <em>replaced</em> by this function (with newly allocated data). Typically, you would do something like the following (omitting error handling). <div class="highlight"><pre><span></span><code> FT_Glyph glyph; FT_BitmapGlyph glyph_bitmap; // load glyph error = FT_Load_Char( face, glyph_index, FT_LOAD_DEFAULT ); // extract glyph image error = FT_Get_Glyph( face-&gt;glyph, &amp;glyph ); // convert to a bitmap (default render mode + destroying old) if ( glyph-&gt;format != FT_GLYPH_FORMAT_BITMAP ) { error = FT_Glyph_To_Bitmap( &amp;glyph, FT_RENDER_MODE_NORMAL, 0, 1 ); if ( error ) // `glyph&#39; unchanged ... } // access bitmap content by typecasting glyph_bitmap = (FT_BitmapGlyph)glyph; // do funny stuff with it, like blitting/drawing ... // discard glyph image (bitmap or not) FT_Done_Glyph( glyph ); </code></pre></div></p> <p>Here is another example, again without error handling. <div class="highlight"><pre><span></span><code> FT_Glyph glyphs[MAX_GLYPHS] ... for ( idx = 0; i &lt; MAX_GLYPHS; i++ ) error = FT_Load_Glyph( face, idx, FT_LOAD_DEFAULT ) || FT_Get_Glyph ( face-&gt;glyph, &amp;glyphs[idx] ); ... for ( idx = 0; i &lt; MAX_GLYPHS; i++ ) { FT_Glyph bitmap = glyphs[idx]; ... // after this call, `bitmap&#39; no longer points into // the `glyphs&#39; array (and the old value isn&#39;t destroyed) FT_Glyph_To_Bitmap( &amp;bitmap, FT_RENDER_MODE_MONO, 0, 0 ); ... FT_Done_Glyph( bitmap ); } ... for ( idx = 0; i &lt; MAX_GLYPHS; i++ ) FT_Done_Glyph( glyphs[idx] ); </code></pre></div></p> <hr> <h2 id="ft_done_glyph">FT_Done_Glyph<a class="headerlink" href="#ft_done_glyph" title="Permanent link">&para;</a></h2> <p>Defined in FT_GLYPH_H (freetype/ftglyph.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> ) <b>FT_Done_Glyph</b>( <a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a> glyph ); </code></pre></div> <p>Destroy a given glyph.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="glyph">glyph</td><td class="desc"> <p>A handle to the target glyph object.</p> </td></tr> </table> <hr> </article> </div> </div> </main> <footer class="md-footer"> <nav class="md-footer__inner md-grid" aria-label="Footer"> <a href="ft2-layer_management.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: Glyph Layer Management" rel="prev"> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Previous </span> Glyph Layer Management </div> </div> </a> <a href="ft2-mac_specific.html" class="md-footer__link md-footer__link--next" aria-label="Next: Mac Specific Interface" rel="next"> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Next </span> Mac Specific Interface </div> </div> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg> </div> </a> </nav> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-footer-copyright"> <div class="md-footer-copyright__highlight"> Copyright 2022 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>. </div> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"base": ".", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "assets/javascripts/workers/search.477d984a.min.js", "version": null}</script> <script src="assets/javascripts/bundle.82b56eb2.min.js"></script> <script src="javascripts/extra.js"></script> </body> </html>
whupdup/frame
real/third_party/freetype-2.12.0/docs/reference/ft2-glyph_management.html
HTML
gpl-3.0
58,538
<!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="description" content="API Reference Documentation for FreeType-2.12.0"> <meta name="author" content="FreeType Contributors"> <link rel="icon" href="images/favico.ico"> <meta name="generator" content="mkdocs-1.2.1, mkdocs-material-7.1.9"> <title>Glyph Stroker - FreeType-2.12.0 API Reference</title> <link rel="stylesheet" href="assets/stylesheets/main.ca7ac06f.min.css"> <link rel="stylesheet" href="assets/stylesheets/palette.f1a3b89f.min.css"> <meta name="theme-color" content="#4cae4f"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback"> <style>:root{--md-text-font-family:"Noto Serif";--md-code-font-family:"Roboto Mono"}</style> <link rel="stylesheet" href="stylesheets/extra.css"> </head> <body dir="ltr" data-md-color-scheme="" data-md-color-primary="green" data-md-color-accent="green"> <script>function __prefix(e){return new URL(".",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <label class="md-overlay" for="__drawer"></label> <div data-md-component="skip"> <a href="#glyph-stroker" class="md-skip"> Skip to content </a> </div> <div data-md-component="announce"> </div> <header class="md-header" data-md-component="header"> <nav class="md-header__inner md-grid" aria-label="Header"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> <label class="md-header__button md-icon" for="__drawer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg> </label> <div class="md-header__title" data-md-component="header-title"> <div class="md-header__ellipsis"> <div class="md-header__topic"> <span class="md-ellipsis"> FreeType-2.12.0 API Reference </span> </div> <div class="md-header__topic" data-md-component="header-topic"> <span class="md-ellipsis"> Glyph Stroker </span> </div> </div> </div> <label class="md-header__button md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> </label> <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required> <label class="md-search__icon md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </label> <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg> </button> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" data-md-scrollfix> <div class="md-search-result" data-md-component="search-result"> <div class="md-search-result__meta"> Initializing search </div> <ol class="md-search-result__list"></ol> </div> </div> </div> </div> </div> </nav> </header> <div class="md-container" data-md-component="container"> <main class="md-main" data-md-component="main"> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <label class="md-nav__title" for="__drawer"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> FreeType-2.12.0 API Reference </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="index.html" class="md-nav__link"> TOC </a> </li> <li class="md-nav__item"> <a href="ft2-index.html" class="md-nav__link"> Index </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" > <label class="md-nav__link" for="__nav_3"> General Remarks <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="General Remarks" data-md-level="1"> <label class="md-nav__title" for="__nav_3"> <span class="md-nav__icon md-icon"></span> General Remarks </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-preamble.html" class="md-nav__link"> Preamble </a> </li> <li class="md-nav__item"> <a href="ft2-header_inclusion.html" class="md-nav__link"> FreeType's header inclusion scheme </a> </li> <li class="md-nav__item"> <a href="ft2-user_allocation.html" class="md-nav__link"> User allocation </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" > <label class="md-nav__link" for="__nav_4"> Core API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Core API" data-md-level="1"> <label class="md-nav__title" for="__nav_4"> <span class="md-nav__icon md-icon"></span> Core API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-version.html" class="md-nav__link"> FreeType Version </a> </li> <li class="md-nav__item"> <a href="ft2-basic_types.html" class="md-nav__link"> Basic Data Types </a> </li> <li class="md-nav__item"> <a href="ft2-base_interface.html" class="md-nav__link"> Base Interface </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_variants.html" class="md-nav__link"> Unicode Variation Sequences </a> </li> <li class="md-nav__item"> <a href="ft2-color_management.html" class="md-nav__link"> Glyph Color Management </a> </li> <li class="md-nav__item"> <a href="ft2-layer_management.html" class="md-nav__link"> Glyph Layer Management </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_management.html" class="md-nav__link"> Glyph Management </a> </li> <li class="md-nav__item"> <a href="ft2-mac_specific.html" class="md-nav__link"> Mac Specific Interface </a> </li> <li class="md-nav__item"> <a href="ft2-sizes_management.html" class="md-nav__link"> Size Management </a> </li> <li class="md-nav__item"> <a href="ft2-header_file_macros.html" class="md-nav__link"> Header File Macros </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" > <label class="md-nav__link" for="__nav_5"> Format-Specific API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Format-Specific API" data-md-level="1"> <label class="md-nav__title" for="__nav_5"> <span class="md-nav__icon md-icon"></span> Format-Specific API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-multiple_masters.html" class="md-nav__link"> Multiple Masters </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_tables.html" class="md-nav__link"> TrueType Tables </a> </li> <li class="md-nav__item"> <a href="ft2-type1_tables.html" class="md-nav__link"> Type 1 Tables </a> </li> <li class="md-nav__item"> <a href="ft2-sfnt_names.html" class="md-nav__link"> SFNT Names </a> </li> <li class="md-nav__item"> <a href="ft2-bdf_fonts.html" class="md-nav__link"> BDF and PCF Files </a> </li> <li class="md-nav__item"> <a href="ft2-cid_fonts.html" class="md-nav__link"> CID Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-pfr_fonts.html" class="md-nav__link"> PFR Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-winfnt_fonts.html" class="md-nav__link"> Window FNT Files </a> </li> <li class="md-nav__item"> <a href="ft2-svg_fonts.html" class="md-nav__link"> OpenType SVG Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-font_formats.html" class="md-nav__link"> Font Formats </a> </li> <li class="md-nav__item"> <a href="ft2-gasp_table.html" class="md-nav__link"> Gasp Table </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" > <label class="md-nav__link" for="__nav_6"> Controlling FreeType Modules <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Controlling FreeType Modules" data-md-level="1"> <label class="md-nav__title" for="__nav_6"> <span class="md-nav__icon md-icon"></span> Controlling FreeType Modules </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-auto_hinter.html" class="md-nav__link"> The auto-hinter </a> </li> <li class="md-nav__item"> <a href="ft2-cff_driver.html" class="md-nav__link"> The CFF driver </a> </li> <li class="md-nav__item"> <a href="ft2-t1_cid_driver.html" class="md-nav__link"> The Type 1 and CID drivers </a> </li> <li class="md-nav__item"> <a href="ft2-tt_driver.html" class="md-nav__link"> The TrueType driver </a> </li> <li class="md-nav__item"> <a href="ft2-pcf_driver.html" class="md-nav__link"> The PCF driver </a> </li> <li class="md-nav__item"> <a href="ft2-ot_svg_driver.html" class="md-nav__link"> The SVG driver </a> </li> <li class="md-nav__item"> <a href="ft2-properties.html" class="md-nav__link"> Driver properties </a> </li> <li class="md-nav__item"> <a href="ft2-parameter_tags.html" class="md-nav__link"> Parameter Tags </a> </li> <li class="md-nav__item"> <a href="ft2-lcd_rendering.html" class="md-nav__link"> Subpixel Rendering </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" > <label class="md-nav__link" for="__nav_7"> Cache Sub-System <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1"> <label class="md-nav__title" for="__nav_7"> <span class="md-nav__icon md-icon"></span> Cache Sub-System </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-cache_subsystem.html" class="md-nav__link"> Cache Sub-System </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--active md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" checked> <label class="md-nav__link" for="__nav_8"> Support API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Support API" data-md-level="1"> <label class="md-nav__title" for="__nav_8"> <span class="md-nav__icon md-icon"></span> Support API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-computations.html" class="md-nav__link"> Computations </a> </li> <li class="md-nav__item"> <a href="ft2-list_processing.html" class="md-nav__link"> List Processing </a> </li> <li class="md-nav__item"> <a href="ft2-outline_processing.html" class="md-nav__link"> Outline Processing </a> </li> <li class="md-nav__item"> <a href="ft2-quick_advance.html" class="md-nav__link"> Quick retrieval of advance values </a> </li> <li class="md-nav__item"> <a href="ft2-bitmap_handling.html" class="md-nav__link"> Bitmap Handling </a> </li> <li class="md-nav__item"> <a href="ft2-raster.html" class="md-nav__link"> Scanline Converter </a> </li> <li class="md-nav__item md-nav__item--active"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <label class="md-nav__link md-nav__link--active" for="__toc"> Glyph Stroker <span class="md-nav__icon md-icon"></span> </label> <a href="ft2-glyph_stroker.html" class="md-nav__link md-nav__link--active"> Glyph Stroker </a> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_stroker" class="md-nav__link"> FT_Stroker </a> </li> <li class="md-nav__item"> <a href="#ft_stroker_linejoin" class="md-nav__link"> FT_Stroker_LineJoin </a> </li> <li class="md-nav__item"> <a href="#ft_stroker_linecap" class="md-nav__link"> FT_Stroker_LineCap </a> </li> <li class="md-nav__item"> <a href="#ft_strokerborder" class="md-nav__link"> FT_StrokerBorder </a> </li> <li class="md-nav__item"> <a href="#ft_outline_getinsideborder" class="md-nav__link"> FT_Outline_GetInsideBorder </a> </li> <li class="md-nav__item"> <a href="#ft_outline_getoutsideborder" class="md-nav__link"> FT_Outline_GetOutsideBorder </a> </li> <li class="md-nav__item"> <a href="#ft_glyph_stroke" class="md-nav__link"> FT_Glyph_Stroke </a> </li> <li class="md-nav__item"> <a href="#ft_glyph_strokeborder" class="md-nav__link"> FT_Glyph_StrokeBorder </a> </li> <li class="md-nav__item"> <a href="#ft_stroker_new" class="md-nav__link"> FT_Stroker_New </a> </li> <li class="md-nav__item"> <a href="#ft_stroker_set" class="md-nav__link"> FT_Stroker_Set </a> </li> <li class="md-nav__item"> <a href="#ft_stroker_rewind" class="md-nav__link"> FT_Stroker_Rewind </a> </li> <li class="md-nav__item"> <a href="#ft_stroker_parseoutline" class="md-nav__link"> FT_Stroker_ParseOutline </a> </li> <li class="md-nav__item"> <a href="#ft_stroker_done" class="md-nav__link"> FT_Stroker_Done </a> </li> <li class="md-nav__item"> <a href="#ft_stroker_beginsubpath" class="md-nav__link"> FT_Stroker_BeginSubPath </a> </li> <li class="md-nav__item"> <a href="#ft_stroker_endsubpath" class="md-nav__link"> FT_Stroker_EndSubPath </a> </li> <li class="md-nav__item"> <a href="#ft_stroker_lineto" class="md-nav__link"> FT_Stroker_LineTo </a> </li> <li class="md-nav__item"> <a href="#ft_stroker_conicto" class="md-nav__link"> FT_Stroker_ConicTo </a> </li> <li class="md-nav__item"> <a href="#ft_stroker_cubicto" class="md-nav__link"> FT_Stroker_CubicTo </a> </li> <li class="md-nav__item"> <a href="#ft_stroker_getbordercounts" class="md-nav__link"> FT_Stroker_GetBorderCounts </a> </li> <li class="md-nav__item"> <a href="#ft_stroker_exportborder" class="md-nav__link"> FT_Stroker_ExportBorder </a> </li> <li class="md-nav__item"> <a href="#ft_stroker_getcounts" class="md-nav__link"> FT_Stroker_GetCounts </a> </li> <li class="md-nav__item"> <a href="#ft_stroker_export" class="md-nav__link"> FT_Stroker_Export </a> </li> </ul> </nav> </li> <li class="md-nav__item"> <a href="ft2-system_interface.html" class="md-nav__link"> System Interface </a> </li> <li class="md-nav__item"> <a href="ft2-module_management.html" class="md-nav__link"> Module Management </a> </li> <li class="md-nav__item"> <a href="ft2-gzip.html" class="md-nav__link"> GZIP Streams </a> </li> <li class="md-nav__item"> <a href="ft2-lzw.html" class="md-nav__link"> LZW Streams </a> </li> <li class="md-nav__item"> <a href="ft2-bzip2.html" class="md-nav__link"> BZIP2 Streams </a> </li> <li class="md-nav__item"> <a href="ft2-debugging_apis.html" class="md-nav__link"> External Debugging APIs </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" > <label class="md-nav__link" for="__nav_9"> Error Codes <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Error Codes" data-md-level="1"> <label class="md-nav__title" for="__nav_9"> <span class="md-nav__icon md-icon"></span> Error Codes </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-error_enumerations.html" class="md-nav__link"> Error Enumerations </a> </li> <li class="md-nav__item"> <a href="ft2-error_code_values.html" class="md-nav__link"> Error Code Values </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" > <label class="md-nav__link" for="__nav_10"> Miscellaneous <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1"> <label class="md-nav__title" for="__nav_10"> <span class="md-nav__icon md-icon"></span> Miscellaneous </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-gx_validation.html" class="md-nav__link"> TrueTypeGX/AAT Validation </a> </li> <li class="md-nav__item"> <a href="ft2-incremental.html" class="md-nav__link"> Incremental Loading </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_engine.html" class="md-nav__link"> The TrueType Engine </a> </li> <li class="md-nav__item"> <a href="ft2-ot_validation.html" class="md-nav__link"> OpenType Validation </a> </li> </ul> </nav> </li> </ul> </nav> </div> </div> </div> <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_stroker" class="md-nav__link"> FT_Stroker </a> </li> <li class="md-nav__item"> <a href="#ft_stroker_linejoin" class="md-nav__link"> FT_Stroker_LineJoin </a> </li> <li class="md-nav__item"> <a href="#ft_stroker_linecap" class="md-nav__link"> FT_Stroker_LineCap </a> </li> <li class="md-nav__item"> <a href="#ft_strokerborder" class="md-nav__link"> FT_StrokerBorder </a> </li> <li class="md-nav__item"> <a href="#ft_outline_getinsideborder" class="md-nav__link"> FT_Outline_GetInsideBorder </a> </li> <li class="md-nav__item"> <a href="#ft_outline_getoutsideborder" class="md-nav__link"> FT_Outline_GetOutsideBorder </a> </li> <li class="md-nav__item"> <a href="#ft_glyph_stroke" class="md-nav__link"> FT_Glyph_Stroke </a> </li> <li class="md-nav__item"> <a href="#ft_glyph_strokeborder" class="md-nav__link"> FT_Glyph_StrokeBorder </a> </li> <li class="md-nav__item"> <a href="#ft_stroker_new" class="md-nav__link"> FT_Stroker_New </a> </li> <li class="md-nav__item"> <a href="#ft_stroker_set" class="md-nav__link"> FT_Stroker_Set </a> </li> <li class="md-nav__item"> <a href="#ft_stroker_rewind" class="md-nav__link"> FT_Stroker_Rewind </a> </li> <li class="md-nav__item"> <a href="#ft_stroker_parseoutline" class="md-nav__link"> FT_Stroker_ParseOutline </a> </li> <li class="md-nav__item"> <a href="#ft_stroker_done" class="md-nav__link"> FT_Stroker_Done </a> </li> <li class="md-nav__item"> <a href="#ft_stroker_beginsubpath" class="md-nav__link"> FT_Stroker_BeginSubPath </a> </li> <li class="md-nav__item"> <a href="#ft_stroker_endsubpath" class="md-nav__link"> FT_Stroker_EndSubPath </a> </li> <li class="md-nav__item"> <a href="#ft_stroker_lineto" class="md-nav__link"> FT_Stroker_LineTo </a> </li> <li class="md-nav__item"> <a href="#ft_stroker_conicto" class="md-nav__link"> FT_Stroker_ConicTo </a> </li> <li class="md-nav__item"> <a href="#ft_stroker_cubicto" class="md-nav__link"> FT_Stroker_CubicTo </a> </li> <li class="md-nav__item"> <a href="#ft_stroker_getbordercounts" class="md-nav__link"> FT_Stroker_GetBorderCounts </a> </li> <li class="md-nav__item"> <a href="#ft_stroker_exportborder" class="md-nav__link"> FT_Stroker_ExportBorder </a> </li> <li class="md-nav__item"> <a href="#ft_stroker_getcounts" class="md-nav__link"> FT_Stroker_GetCounts </a> </li> <li class="md-nav__item"> <a href="#ft_stroker_export" class="md-nav__link"> FT_Stroker_Export </a> </li> </ul> </nav> </div> </div> </div> <div class="md-content" data-md-component="content"> <article class="md-content__inner md-typeset"> <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; <a href="index.html#support-api">Support API</a> &raquo; Glyph Stroker</p> <hr /> <h1 id="glyph-stroker">Glyph Stroker<a class="headerlink" href="#glyph-stroker" title="Permanent link">&para;</a></h1> <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2> <p>This component generates stroked outlines of a given vectorial glyph. It also allows you to retrieve the &lsquo;outside&rsquo; and/or the &lsquo;inside&rsquo; borders of the stroke.</p> <p>This can be useful to generate &lsquo;bordered&rsquo; glyph, i.e., glyphs displayed with a colored (and anti-aliased) border around their shape.</p> <h2 id="ft_stroker">FT_Stroker<a class="headerlink" href="#ft_stroker" title="Permanent link">&para;</a></h2> <p>Defined in FT_STROKER_H (freetype/ftstroke.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_StrokerRec_* <b>FT_Stroker</b>; </code></pre></div> <p>Opaque handle to a path stroker object.</p> <hr> <h2 id="ft_stroker_linejoin">FT_Stroker_LineJoin<a class="headerlink" href="#ft_stroker_linejoin" title="Permanent link">&para;</a></h2> <p>Defined in FT_STROKER_H (freetype/ftstroke.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">enum</span> FT_Stroker_LineJoin_ { <a href="ft2-glyph_stroker.html#ft_stroker_linejoin_round">FT_STROKER_LINEJOIN_ROUND</a> = 0, <a href="ft2-glyph_stroker.html#ft_stroker_linejoin_bevel">FT_STROKER_LINEJOIN_BEVEL</a> = 1, <a href="ft2-glyph_stroker.html#ft_stroker_linejoin_miter_variable">FT_STROKER_LINEJOIN_MITER_VARIABLE</a> = 2, <a href="ft2-glyph_stroker.html#ft_stroker_linejoin_miter">FT_STROKER_LINEJOIN_MITER</a> = <a href="ft2-glyph_stroker.html#ft_stroker_linejoin_miter_variable">FT_STROKER_LINEJOIN_MITER_VARIABLE</a>, <a href="ft2-glyph_stroker.html#ft_stroker_linejoin_miter_fixed">FT_STROKER_LINEJOIN_MITER_FIXED</a> = 3 } <b>FT_Stroker_LineJoin</b>; </code></pre></div> <p>These values determine how two joining lines are rendered in a stroker.</p> <h4>values</h4> <table class="fields long"> <tr><td class="val" id="ft_stroker_linejoin_round">FT_STROKER_LINEJOIN_ROUND</td><td class="desc"> <p>Used to render rounded line joins. Circular arcs are used to join two lines smoothly.</p> </td></tr> <tr><td class="val" id="ft_stroker_linejoin_bevel">FT_STROKER_LINEJOIN_BEVEL</td><td class="desc"> <p>Used to render beveled line joins. The outer corner of the joined lines is filled by enclosing the triangular region of the corner with a straight line between the outer corners of each stroke.</p> </td></tr> <tr><td class="val" id="ft_stroker_linejoin_miter_fixed">FT_STROKER_LINEJOIN_MITER_FIXED</td><td class="desc"> <p>Used to render mitered line joins, with fixed bevels if the miter limit is exceeded. The outer edges of the strokes for the two segments are extended until they meet at an angle. A bevel join (see above) is used if the segments meet at too sharp an angle and the outer edges meet beyond a distance corresponding to the meter limit. This prevents long spikes being created. <code>FT_STROKER_LINEJOIN_MITER_FIXED</code> generates a miter line join as used in PostScript and PDF.</p> </td></tr> <tr><td class="val" id="ft_stroker_linejoin_miter_variable">FT_STROKER_LINEJOIN_MITER_VARIABLE</td><td class="desc"> </td></tr> <tr><td class="val" id="ft_stroker_linejoin_miter">FT_STROKER_LINEJOIN_MITER</td><td class="desc"> <p>Used to render mitered line joins, with variable bevels if the miter limit is exceeded. The intersection of the strokes is clipped perpendicularly to the bisector, at a distance corresponding to the miter limit. This prevents long spikes being created. <code>FT_STROKER_LINEJOIN_MITER_VARIABLE</code> generates a mitered line join as used in XPS. <code>FT_STROKER_LINEJOIN_MITER</code> is an alias for <code>FT_STROKER_LINEJOIN_MITER_VARIABLE</code>, retained for backward compatibility.</p> </td></tr> </table> <hr> <h2 id="ft_stroker_linecap">FT_Stroker_LineCap<a class="headerlink" href="#ft_stroker_linecap" title="Permanent link">&para;</a></h2> <p>Defined in FT_STROKER_H (freetype/ftstroke.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">enum</span> FT_Stroker_LineCap_ { <a href="ft2-glyph_stroker.html#ft_stroker_linecap_butt">FT_STROKER_LINECAP_BUTT</a> = 0, <a href="ft2-glyph_stroker.html#ft_stroker_linecap_round">FT_STROKER_LINECAP_ROUND</a>, <a href="ft2-glyph_stroker.html#ft_stroker_linecap_square">FT_STROKER_LINECAP_SQUARE</a> } <b>FT_Stroker_LineCap</b>; </code></pre></div> <p>These values determine how the end of opened sub-paths are rendered in a stroke.</p> <h4>values</h4> <table class="fields"> <tr><td class="val" id="ft_stroker_linecap_butt">FT_STROKER_LINECAP_BUTT</td><td class="desc"> <p>The end of lines is rendered as a full stop on the last point itself.</p> </td></tr> <tr><td class="val" id="ft_stroker_linecap_round">FT_STROKER_LINECAP_ROUND</td><td class="desc"> <p>The end of lines is rendered as a half-circle around the last point.</p> </td></tr> <tr><td class="val" id="ft_stroker_linecap_square">FT_STROKER_LINECAP_SQUARE</td><td class="desc"> <p>The end of lines is rendered as a square around the last point.</p> </td></tr> </table> <hr> <h2 id="ft_strokerborder">FT_StrokerBorder<a class="headerlink" href="#ft_strokerborder" title="Permanent link">&para;</a></h2> <p>Defined in FT_STROKER_H (freetype/ftstroke.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">enum</span> FT_StrokerBorder_ { <a href="ft2-glyph_stroker.html#ft_stroker_border_left">FT_STROKER_BORDER_LEFT</a> = 0, <a href="ft2-glyph_stroker.html#ft_stroker_border_right">FT_STROKER_BORDER_RIGHT</a> } <b>FT_StrokerBorder</b>; </code></pre></div> <p>These values are used to select a given stroke border in <code><a href="ft2-glyph_stroker.html#ft_stroker_getbordercounts">FT_Stroker_GetBorderCounts</a></code> and <code><a href="ft2-glyph_stroker.html#ft_stroker_exportborder">FT_Stroker_ExportBorder</a></code>.</p> <h4>values</h4> <table class="fields"> <tr><td class="val" id="ft_stroker_border_left">FT_STROKER_BORDER_LEFT</td><td class="desc"> <p>Select the left border, relative to the drawing direction.</p> </td></tr> <tr><td class="val" id="ft_stroker_border_right">FT_STROKER_BORDER_RIGHT</td><td class="desc"> <p>Select the right border, relative to the drawing direction.</p> </td></tr> </table> <h4>note</h4> <p>Applications are generally interested in the &lsquo;inside&rsquo; and &lsquo;outside&rsquo; borders. However, there is no direct mapping between these and the &lsquo;left&rsquo; and &lsquo;right&rsquo; ones, since this really depends on the glyph's drawing orientation, which varies between font formats.</p> <p>You can however use <code><a href="ft2-glyph_stroker.html#ft_outline_getinsideborder">FT_Outline_GetInsideBorder</a></code> and <code><a href="ft2-glyph_stroker.html#ft_outline_getoutsideborder">FT_Outline_GetOutsideBorder</a></code> to get these.</p> <hr> <h2 id="ft_outline_getinsideborder">FT_Outline_GetInsideBorder<a class="headerlink" href="#ft_outline_getinsideborder" title="Permanent link">&para;</a></h2> <p>Defined in FT_STROKER_H (freetype/ftstroke.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-glyph_stroker.html#ft_strokerborder">FT_StrokerBorder</a> ) <b>FT_Outline_GetInsideBorder</b>( <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>* outline ); </code></pre></div> <p>Retrieve the <code><a href="ft2-glyph_stroker.html#ft_strokerborder">FT_StrokerBorder</a></code> value corresponding to the &lsquo;inside&rsquo; borders of a given outline.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="outline">outline</td><td class="desc"> <p>The source outline handle.</p> </td></tr> </table> <h4>return</h4> <p>The border index. <code><a href="ft2-glyph_stroker.html#ft_strokerborder">FT_STROKER_BORDER_RIGHT</a></code> for empty or invalid outlines.</p> <hr> <h2 id="ft_outline_getoutsideborder">FT_Outline_GetOutsideBorder<a class="headerlink" href="#ft_outline_getoutsideborder" title="Permanent link">&para;</a></h2> <p>Defined in FT_STROKER_H (freetype/ftstroke.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-glyph_stroker.html#ft_strokerborder">FT_StrokerBorder</a> ) <b>FT_Outline_GetOutsideBorder</b>( <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>* outline ); </code></pre></div> <p>Retrieve the <code><a href="ft2-glyph_stroker.html#ft_strokerborder">FT_StrokerBorder</a></code> value corresponding to the &lsquo;outside&rsquo; borders of a given outline.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="outline">outline</td><td class="desc"> <p>The source outline handle.</p> </td></tr> </table> <h4>return</h4> <p>The border index. <code><a href="ft2-glyph_stroker.html#ft_strokerborder">FT_STROKER_BORDER_LEFT</a></code> for empty or invalid outlines.</p> <hr> <h2 id="ft_glyph_stroke">FT_Glyph_Stroke<a class="headerlink" href="#ft_glyph_stroke" title="Permanent link">&para;</a></h2> <p>Defined in FT_STROKER_H (freetype/ftstroke.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Glyph_Stroke</b>( <a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a> *pglyph, <a href="ft2-glyph_stroker.html#ft_stroker">FT_Stroker</a> stroker, <a href="ft2-basic_types.html#ft_bool">FT_Bool</a> destroy ); </code></pre></div> <p>Stroke a given outline glyph object with a given stroker.</p> <h4>inout</h4> <table class="fields"> <tr><td class="val" id="pglyph">pglyph</td><td class="desc"> <p>Source glyph handle on input, new glyph handle on output.</p> </td></tr> </table> <h4>input</h4> <table class="fields"> <tr><td class="val" id="stroker">stroker</td><td class="desc"> <p>A stroker handle.</p> </td></tr> <tr><td class="val" id="destroy">destroy</td><td class="desc"> <p>A Boolean. If&nbsp;1, the source glyph object is destroyed on success.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>The source glyph is untouched in case of error.</p> <p>Adding stroke may yield a significantly wider and taller glyph depending on how large of a radius was used to stroke the glyph. You may need to manually adjust horizontal and vertical advance amounts to account for this added size.</p> <hr> <h2 id="ft_glyph_strokeborder">FT_Glyph_StrokeBorder<a class="headerlink" href="#ft_glyph_strokeborder" title="Permanent link">&para;</a></h2> <p>Defined in FT_STROKER_H (freetype/ftstroke.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Glyph_StrokeBorder</b>( <a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a> *pglyph, <a href="ft2-glyph_stroker.html#ft_stroker">FT_Stroker</a> stroker, <a href="ft2-basic_types.html#ft_bool">FT_Bool</a> inside, <a href="ft2-basic_types.html#ft_bool">FT_Bool</a> destroy ); </code></pre></div> <p>Stroke a given outline glyph object with a given stroker, but only return either its inside or outside border.</p> <h4>inout</h4> <table class="fields"> <tr><td class="val" id="pglyph">pglyph</td><td class="desc"> <p>Source glyph handle on input, new glyph handle on output.</p> </td></tr> </table> <h4>input</h4> <table class="fields"> <tr><td class="val" id="stroker">stroker</td><td class="desc"> <p>A stroker handle.</p> </td></tr> <tr><td class="val" id="inside">inside</td><td class="desc"> <p>A Boolean. If&nbsp;1, return the inside border, otherwise the outside border.</p> </td></tr> <tr><td class="val" id="destroy">destroy</td><td class="desc"> <p>A Boolean. If&nbsp;1, the source glyph object is destroyed on success.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>The source glyph is untouched in case of error.</p> <p>Adding stroke may yield a significantly wider and taller glyph depending on how large of a radius was used to stroke the glyph. You may need to manually adjust horizontal and vertical advance amounts to account for this added size.</p> <hr> <h2 id="ft_stroker_new">FT_Stroker_New<a class="headerlink" href="#ft_stroker_new" title="Permanent link">&para;</a></h2> <p>Defined in FT_STROKER_H (freetype/ftstroke.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Stroker_New</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library, <a href="ft2-glyph_stroker.html#ft_stroker">FT_Stroker</a> *astroker ); </code></pre></div> <p>Create a new stroker object.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="library">library</td><td class="desc"> <p>FreeType library handle.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="astroker">astroker</td><td class="desc"> <p>A new stroker object handle. <code>NULL</code> in case of error.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <hr> <h2 id="ft_stroker_set">FT_Stroker_Set<a class="headerlink" href="#ft_stroker_set" title="Permanent link">&para;</a></h2> <p>Defined in FT_STROKER_H (freetype/ftstroke.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> ) <b>FT_Stroker_Set</b>( <a href="ft2-glyph_stroker.html#ft_stroker">FT_Stroker</a> stroker, <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a> radius, <a href="ft2-glyph_stroker.html#ft_stroker_linecap">FT_Stroker_LineCap</a> line_cap, <a href="ft2-glyph_stroker.html#ft_stroker_linejoin">FT_Stroker_LineJoin</a> line_join, <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a> miter_limit ); </code></pre></div> <p>Reset a stroker object's attributes.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="stroker">stroker</td><td class="desc"> <p>The target stroker handle.</p> </td></tr> <tr><td class="val" id="radius">radius</td><td class="desc"> <p>The border radius.</p> </td></tr> <tr><td class="val" id="line_cap">line_cap</td><td class="desc"> <p>The line cap style.</p> </td></tr> <tr><td class="val" id="line_join">line_join</td><td class="desc"> <p>The line join style.</p> </td></tr> <tr><td class="val" id="miter_limit">miter_limit</td><td class="desc"> <p>The maximum reciprocal sine of half-angle at the miter join, expressed as 16.16 fixed point value.</p> </td></tr> </table> <h4>note</h4> <p>The <code>radius</code> is expressed in the same units as the outline coordinates.</p> <p>The <code>miter_limit</code> multiplied by the <code>radius</code> gives the maximum size of a miter spike, at which it is clipped for <code><a href="ft2-glyph_stroker.html#ft_stroker_linejoin">FT_STROKER_LINEJOIN_MITER_VARIABLE</a></code> or replaced with a bevel join for <code><a href="ft2-glyph_stroker.html#ft_stroker_linejoin">FT_STROKER_LINEJOIN_MITER_FIXED</a></code>.</p> <p>This function calls <code><a href="ft2-glyph_stroker.html#ft_stroker_rewind">FT_Stroker_Rewind</a></code> automatically.</p> <hr> <h2 id="ft_stroker_rewind">FT_Stroker_Rewind<a class="headerlink" href="#ft_stroker_rewind" title="Permanent link">&para;</a></h2> <p>Defined in FT_STROKER_H (freetype/ftstroke.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> ) <b>FT_Stroker_Rewind</b>( <a href="ft2-glyph_stroker.html#ft_stroker">FT_Stroker</a> stroker ); </code></pre></div> <p>Reset a stroker object without changing its attributes. You should call this function before beginning a new series of calls to <code><a href="ft2-glyph_stroker.html#ft_stroker_beginsubpath">FT_Stroker_BeginSubPath</a></code> or <code><a href="ft2-glyph_stroker.html#ft_stroker_endsubpath">FT_Stroker_EndSubPath</a></code>.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="stroker">stroker</td><td class="desc"> <p>The target stroker handle.</p> </td></tr> </table> <hr> <h2 id="ft_stroker_parseoutline">FT_Stroker_ParseOutline<a class="headerlink" href="#ft_stroker_parseoutline" title="Permanent link">&para;</a></h2> <p>Defined in FT_STROKER_H (freetype/ftstroke.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Stroker_ParseOutline</b>( <a href="ft2-glyph_stroker.html#ft_stroker">FT_Stroker</a> stroker, <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>* outline, <a href="ft2-basic_types.html#ft_bool">FT_Bool</a> opened ); </code></pre></div> <p>A convenience function used to parse a whole outline with the stroker. The resulting outline(s) can be retrieved later by functions like <code><a href="ft2-glyph_stroker.html#ft_stroker_getcounts">FT_Stroker_GetCounts</a></code> and <code><a href="ft2-glyph_stroker.html#ft_stroker_export">FT_Stroker_Export</a></code>.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="stroker">stroker</td><td class="desc"> <p>The target stroker handle.</p> </td></tr> <tr><td class="val" id="outline">outline</td><td class="desc"> <p>The source outline.</p> </td></tr> <tr><td class="val" id="opened">opened</td><td class="desc"> <p>A boolean. If&nbsp;1, the outline is treated as an open path instead of a closed one.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>If <code>opened</code> is&nbsp;0 (the default), the outline is treated as a closed path, and the stroker generates two distinct &lsquo;border&rsquo; outlines.</p> <p>If <code>opened</code> is&nbsp;1, the outline is processed as an open path, and the stroker generates a single &lsquo;stroke&rsquo; outline.</p> <p>This function calls <code><a href="ft2-glyph_stroker.html#ft_stroker_rewind">FT_Stroker_Rewind</a></code> automatically.</p> <hr> <h2 id="ft_stroker_done">FT_Stroker_Done<a class="headerlink" href="#ft_stroker_done" title="Permanent link">&para;</a></h2> <p>Defined in FT_STROKER_H (freetype/ftstroke.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> ) <b>FT_Stroker_Done</b>( <a href="ft2-glyph_stroker.html#ft_stroker">FT_Stroker</a> stroker ); </code></pre></div> <p>Destroy a stroker object.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="stroker">stroker</td><td class="desc"> <p>A stroker handle. Can be <code>NULL</code>.</p> </td></tr> </table> <hr> <h2 id="ft_stroker_beginsubpath">FT_Stroker_BeginSubPath<a class="headerlink" href="#ft_stroker_beginsubpath" title="Permanent link">&para;</a></h2> <p>Defined in FT_STROKER_H (freetype/ftstroke.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Stroker_BeginSubPath</b>( <a href="ft2-glyph_stroker.html#ft_stroker">FT_Stroker</a> stroker, <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>* to, <a href="ft2-basic_types.html#ft_bool">FT_Bool</a> open ); </code></pre></div> <p>Start a new sub-path in the stroker.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="stroker">stroker</td><td class="desc"> <p>The target stroker handle.</p> </td></tr> <tr><td class="val" id="to">to</td><td class="desc"> <p>A pointer to the start vector.</p> </td></tr> <tr><td class="val" id="open">open</td><td class="desc"> <p>A boolean. If&nbsp;1, the sub-path is treated as an open one.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>This function is useful when you need to stroke a path that is not stored as an <code><a href="ft2-outline_processing.html#ft_outline">FT_Outline</a></code> object.</p> <hr> <h2 id="ft_stroker_endsubpath">FT_Stroker_EndSubPath<a class="headerlink" href="#ft_stroker_endsubpath" title="Permanent link">&para;</a></h2> <p>Defined in FT_STROKER_H (freetype/ftstroke.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Stroker_EndSubPath</b>( <a href="ft2-glyph_stroker.html#ft_stroker">FT_Stroker</a> stroker ); </code></pre></div> <p>Close the current sub-path in the stroker.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="stroker">stroker</td><td class="desc"> <p>The target stroker handle.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>You should call this function after <code><a href="ft2-glyph_stroker.html#ft_stroker_beginsubpath">FT_Stroker_BeginSubPath</a></code>. If the subpath was not &lsquo;opened&rsquo;, this function &lsquo;draws&rsquo; a single line segment to the start position when needed.</p> <hr> <h2 id="ft_stroker_lineto">FT_Stroker_LineTo<a class="headerlink" href="#ft_stroker_lineto" title="Permanent link">&para;</a></h2> <p>Defined in FT_STROKER_H (freetype/ftstroke.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Stroker_LineTo</b>( <a href="ft2-glyph_stroker.html#ft_stroker">FT_Stroker</a> stroker, <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>* to ); </code></pre></div> <p>&lsquo;Draw&rsquo; a single line segment in the stroker's current sub-path, from the last position.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="stroker">stroker</td><td class="desc"> <p>The target stroker handle.</p> </td></tr> <tr><td class="val" id="to">to</td><td class="desc"> <p>A pointer to the destination point.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>You should call this function between <code><a href="ft2-glyph_stroker.html#ft_stroker_beginsubpath">FT_Stroker_BeginSubPath</a></code> and <code><a href="ft2-glyph_stroker.html#ft_stroker_endsubpath">FT_Stroker_EndSubPath</a></code>.</p> <hr> <h2 id="ft_stroker_conicto">FT_Stroker_ConicTo<a class="headerlink" href="#ft_stroker_conicto" title="Permanent link">&para;</a></h2> <p>Defined in FT_STROKER_H (freetype/ftstroke.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Stroker_ConicTo</b>( <a href="ft2-glyph_stroker.html#ft_stroker">FT_Stroker</a> stroker, <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>* control, <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>* to ); </code></pre></div> <p>&lsquo;Draw&rsquo; a single quadratic Bezier in the stroker's current sub-path, from the last position.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="stroker">stroker</td><td class="desc"> <p>The target stroker handle.</p> </td></tr> <tr><td class="val" id="control">control</td><td class="desc"> <p>A pointer to a Bezier control point.</p> </td></tr> <tr><td class="val" id="to">to</td><td class="desc"> <p>A pointer to the destination point.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>You should call this function between <code><a href="ft2-glyph_stroker.html#ft_stroker_beginsubpath">FT_Stroker_BeginSubPath</a></code> and <code><a href="ft2-glyph_stroker.html#ft_stroker_endsubpath">FT_Stroker_EndSubPath</a></code>.</p> <hr> <h2 id="ft_stroker_cubicto">FT_Stroker_CubicTo<a class="headerlink" href="#ft_stroker_cubicto" title="Permanent link">&para;</a></h2> <p>Defined in FT_STROKER_H (freetype/ftstroke.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Stroker_CubicTo</b>( <a href="ft2-glyph_stroker.html#ft_stroker">FT_Stroker</a> stroker, <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>* control1, <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>* control2, <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>* to ); </code></pre></div> <p>&lsquo;Draw&rsquo; a single cubic Bezier in the stroker's current sub-path, from the last position.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="stroker">stroker</td><td class="desc"> <p>The target stroker handle.</p> </td></tr> <tr><td class="val" id="control1">control1</td><td class="desc"> <p>A pointer to the first Bezier control point.</p> </td></tr> <tr><td class="val" id="control2">control2</td><td class="desc"> <p>A pointer to second Bezier control point.</p> </td></tr> <tr><td class="val" id="to">to</td><td class="desc"> <p>A pointer to the destination point.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>You should call this function between <code><a href="ft2-glyph_stroker.html#ft_stroker_beginsubpath">FT_Stroker_BeginSubPath</a></code> and <code><a href="ft2-glyph_stroker.html#ft_stroker_endsubpath">FT_Stroker_EndSubPath</a></code>.</p> <hr> <h2 id="ft_stroker_getbordercounts">FT_Stroker_GetBorderCounts<a class="headerlink" href="#ft_stroker_getbordercounts" title="Permanent link">&para;</a></h2> <p>Defined in FT_STROKER_H (freetype/ftstroke.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Stroker_GetBorderCounts</b>( <a href="ft2-glyph_stroker.html#ft_stroker">FT_Stroker</a> stroker, <a href="ft2-glyph_stroker.html#ft_strokerborder">FT_StrokerBorder</a> border, <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> *anum_points, <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> *anum_contours ); </code></pre></div> <p>Call this function once you have finished parsing your paths with the stroker. It returns the number of points and contours necessary to export one of the &lsquo;border&rsquo; or &lsquo;stroke&rsquo; outlines generated by the stroker.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="stroker">stroker</td><td class="desc"> <p>The target stroker handle.</p> </td></tr> <tr><td class="val" id="border">border</td><td class="desc"> <p>The border index.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="anum_points">anum_points</td><td class="desc"> <p>The number of points.</p> </td></tr> <tr><td class="val" id="anum_contours">anum_contours</td><td class="desc"> <p>The number of contours.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>When an outline, or a sub-path, is &lsquo;closed&rsquo;, the stroker generates two independent &lsquo;border&rsquo; outlines, named &lsquo;left&rsquo; and &lsquo;right&rsquo;.</p> <p>When the outline, or a sub-path, is &lsquo;opened&rsquo;, the stroker merges the &lsquo;border&rsquo; outlines with caps. The &lsquo;left&rsquo; border receives all points, while the &lsquo;right&rsquo; border becomes empty.</p> <p>Use the function <code><a href="ft2-glyph_stroker.html#ft_stroker_getcounts">FT_Stroker_GetCounts</a></code> instead if you want to retrieve the counts associated to both borders.</p> <hr> <h2 id="ft_stroker_exportborder">FT_Stroker_ExportBorder<a class="headerlink" href="#ft_stroker_exportborder" title="Permanent link">&para;</a></h2> <p>Defined in FT_STROKER_H (freetype/ftstroke.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> ) <b>FT_Stroker_ExportBorder</b>( <a href="ft2-glyph_stroker.html#ft_stroker">FT_Stroker</a> stroker, <a href="ft2-glyph_stroker.html#ft_strokerborder">FT_StrokerBorder</a> border, <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>* outline ); </code></pre></div> <p>Call this function after <code><a href="ft2-glyph_stroker.html#ft_stroker_getbordercounts">FT_Stroker_GetBorderCounts</a></code> to export the corresponding border to your own <code><a href="ft2-outline_processing.html#ft_outline">FT_Outline</a></code> structure.</p> <p>Note that this function appends the border points and contours to your outline, but does not try to resize its arrays.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="stroker">stroker</td><td class="desc"> <p>The target stroker handle.</p> </td></tr> <tr><td class="val" id="border">border</td><td class="desc"> <p>The border index.</p> </td></tr> <tr><td class="val" id="outline">outline</td><td class="desc"> <p>The target outline handle.</p> </td></tr> </table> <h4>note</h4> <p>Always call this function after <code><a href="ft2-glyph_stroker.html#ft_stroker_getbordercounts">FT_Stroker_GetBorderCounts</a></code> to get sure that there is enough room in your <code><a href="ft2-outline_processing.html#ft_outline">FT_Outline</a></code> object to receive all new data.</p> <p>When an outline, or a sub-path, is &lsquo;closed&rsquo;, the stroker generates two independent &lsquo;border&rsquo; outlines, named &lsquo;left&rsquo; and &lsquo;right&rsquo;.</p> <p>When the outline, or a sub-path, is &lsquo;opened&rsquo;, the stroker merges the &lsquo;border&rsquo; outlines with caps. The &lsquo;left&rsquo; border receives all points, while the &lsquo;right&rsquo; border becomes empty.</p> <p>Use the function <code><a href="ft2-glyph_stroker.html#ft_stroker_export">FT_Stroker_Export</a></code> instead if you want to retrieve all borders at once.</p> <hr> <h2 id="ft_stroker_getcounts">FT_Stroker_GetCounts<a class="headerlink" href="#ft_stroker_getcounts" title="Permanent link">&para;</a></h2> <p>Defined in FT_STROKER_H (freetype/ftstroke.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Stroker_GetCounts</b>( <a href="ft2-glyph_stroker.html#ft_stroker">FT_Stroker</a> stroker, <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> *anum_points, <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> *anum_contours ); </code></pre></div> <p>Call this function once you have finished parsing your paths with the stroker. It returns the number of points and contours necessary to export all points/borders from the stroked outline/path.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="stroker">stroker</td><td class="desc"> <p>The target stroker handle.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="anum_points">anum_points</td><td class="desc"> <p>The number of points.</p> </td></tr> <tr><td class="val" id="anum_contours">anum_contours</td><td class="desc"> <p>The number of contours.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <hr> <h2 id="ft_stroker_export">FT_Stroker_Export<a class="headerlink" href="#ft_stroker_export" title="Permanent link">&para;</a></h2> <p>Defined in FT_STROKER_H (freetype/ftstroke.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> ) <b>FT_Stroker_Export</b>( <a href="ft2-glyph_stroker.html#ft_stroker">FT_Stroker</a> stroker, <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>* outline ); </code></pre></div> <p>Call this function after <code><a href="ft2-glyph_stroker.html#ft_stroker_getbordercounts">FT_Stroker_GetBorderCounts</a></code> to export all borders to your own <code><a href="ft2-outline_processing.html#ft_outline">FT_Outline</a></code> structure.</p> <p>Note that this function appends the border points and contours to your outline, but does not try to resize its arrays.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="stroker">stroker</td><td class="desc"> <p>The target stroker handle.</p> </td></tr> <tr><td class="val" id="outline">outline</td><td class="desc"> <p>The target outline handle.</p> </td></tr> </table> <hr> </article> </div> </div> </main> <footer class="md-footer"> <nav class="md-footer__inner md-grid" aria-label="Footer"> <a href="ft2-raster.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: Scanline Converter" rel="prev"> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Previous </span> Scanline Converter </div> </div> </a> <a href="ft2-system_interface.html" class="md-footer__link md-footer__link--next" aria-label="Next: System Interface" rel="next"> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Next </span> System Interface </div> </div> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg> </div> </a> </nav> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-footer-copyright"> <div class="md-footer-copyright__highlight"> Copyright 2022 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>. </div> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"base": ".", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "assets/javascripts/workers/search.477d984a.min.js", "version": null}</script> <script src="assets/javascripts/bundle.82b56eb2.min.js"></script> <script src="javascripts/extra.js"></script> </body> </html>
whupdup/frame
real/third_party/freetype-2.12.0/docs/reference/ft2-glyph_stroker.html
HTML
gpl-3.0
64,859
<!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="description" content="API Reference Documentation for FreeType-2.12.0"> <meta name="author" content="FreeType Contributors"> <link rel="icon" href="images/favico.ico"> <meta name="generator" content="mkdocs-1.2.1, mkdocs-material-7.1.9"> <title>Unicode Variation Sequences - FreeType-2.12.0 API Reference</title> <link rel="stylesheet" href="assets/stylesheets/main.ca7ac06f.min.css"> <link rel="stylesheet" href="assets/stylesheets/palette.f1a3b89f.min.css"> <meta name="theme-color" content="#4cae4f"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback"> <style>:root{--md-text-font-family:"Noto Serif";--md-code-font-family:"Roboto Mono"}</style> <link rel="stylesheet" href="stylesheets/extra.css"> </head> <body dir="ltr" data-md-color-scheme="" data-md-color-primary="green" data-md-color-accent="green"> <script>function __prefix(e){return new URL(".",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <label class="md-overlay" for="__drawer"></label> <div data-md-component="skip"> <a href="#unicode-variation-sequences" class="md-skip"> Skip to content </a> </div> <div data-md-component="announce"> </div> <header class="md-header" data-md-component="header"> <nav class="md-header__inner md-grid" aria-label="Header"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> <label class="md-header__button md-icon" for="__drawer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg> </label> <div class="md-header__title" data-md-component="header-title"> <div class="md-header__ellipsis"> <div class="md-header__topic"> <span class="md-ellipsis"> FreeType-2.12.0 API Reference </span> </div> <div class="md-header__topic" data-md-component="header-topic"> <span class="md-ellipsis"> Unicode Variation Sequences </span> </div> </div> </div> <label class="md-header__button md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> </label> <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required> <label class="md-search__icon md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </label> <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg> </button> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" data-md-scrollfix> <div class="md-search-result" data-md-component="search-result"> <div class="md-search-result__meta"> Initializing search </div> <ol class="md-search-result__list"></ol> </div> </div> </div> </div> </div> </nav> </header> <div class="md-container" data-md-component="container"> <main class="md-main" data-md-component="main"> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <label class="md-nav__title" for="__drawer"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> FreeType-2.12.0 API Reference </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="index.html" class="md-nav__link"> TOC </a> </li> <li class="md-nav__item"> <a href="ft2-index.html" class="md-nav__link"> Index </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" > <label class="md-nav__link" for="__nav_3"> General Remarks <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="General Remarks" data-md-level="1"> <label class="md-nav__title" for="__nav_3"> <span class="md-nav__icon md-icon"></span> General Remarks </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-preamble.html" class="md-nav__link"> Preamble </a> </li> <li class="md-nav__item"> <a href="ft2-header_inclusion.html" class="md-nav__link"> FreeType's header inclusion scheme </a> </li> <li class="md-nav__item"> <a href="ft2-user_allocation.html" class="md-nav__link"> User allocation </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--active md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" checked> <label class="md-nav__link" for="__nav_4"> Core API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Core API" data-md-level="1"> <label class="md-nav__title" for="__nav_4"> <span class="md-nav__icon md-icon"></span> Core API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-version.html" class="md-nav__link"> FreeType Version </a> </li> <li class="md-nav__item"> <a href="ft2-basic_types.html" class="md-nav__link"> Basic Data Types </a> </li> <li class="md-nav__item"> <a href="ft2-base_interface.html" class="md-nav__link"> Base Interface </a> </li> <li class="md-nav__item md-nav__item--active"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <label class="md-nav__link md-nav__link--active" for="__toc"> Unicode Variation Sequences <span class="md-nav__icon md-icon"></span> </label> <a href="ft2-glyph_variants.html" class="md-nav__link md-nav__link--active"> Unicode Variation Sequences </a> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_face_getcharvariantindex" class="md-nav__link"> FT_Face_GetCharVariantIndex </a> </li> <li class="md-nav__item"> <a href="#ft_face_getcharvariantisdefault" class="md-nav__link"> FT_Face_GetCharVariantIsDefault </a> </li> <li class="md-nav__item"> <a href="#ft_face_getvariantselectors" class="md-nav__link"> FT_Face_GetVariantSelectors </a> </li> <li class="md-nav__item"> <a href="#ft_face_getvariantsofchar" class="md-nav__link"> FT_Face_GetVariantsOfChar </a> </li> <li class="md-nav__item"> <a href="#ft_face_getcharsofvariant" class="md-nav__link"> FT_Face_GetCharsOfVariant </a> </li> </ul> </nav> </li> <li class="md-nav__item"> <a href="ft2-color_management.html" class="md-nav__link"> Glyph Color Management </a> </li> <li class="md-nav__item"> <a href="ft2-layer_management.html" class="md-nav__link"> Glyph Layer Management </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_management.html" class="md-nav__link"> Glyph Management </a> </li> <li class="md-nav__item"> <a href="ft2-mac_specific.html" class="md-nav__link"> Mac Specific Interface </a> </li> <li class="md-nav__item"> <a href="ft2-sizes_management.html" class="md-nav__link"> Size Management </a> </li> <li class="md-nav__item"> <a href="ft2-header_file_macros.html" class="md-nav__link"> Header File Macros </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" > <label class="md-nav__link" for="__nav_5"> Format-Specific API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Format-Specific API" data-md-level="1"> <label class="md-nav__title" for="__nav_5"> <span class="md-nav__icon md-icon"></span> Format-Specific API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-multiple_masters.html" class="md-nav__link"> Multiple Masters </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_tables.html" class="md-nav__link"> TrueType Tables </a> </li> <li class="md-nav__item"> <a href="ft2-type1_tables.html" class="md-nav__link"> Type 1 Tables </a> </li> <li class="md-nav__item"> <a href="ft2-sfnt_names.html" class="md-nav__link"> SFNT Names </a> </li> <li class="md-nav__item"> <a href="ft2-bdf_fonts.html" class="md-nav__link"> BDF and PCF Files </a> </li> <li class="md-nav__item"> <a href="ft2-cid_fonts.html" class="md-nav__link"> CID Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-pfr_fonts.html" class="md-nav__link"> PFR Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-winfnt_fonts.html" class="md-nav__link"> Window FNT Files </a> </li> <li class="md-nav__item"> <a href="ft2-svg_fonts.html" class="md-nav__link"> OpenType SVG Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-font_formats.html" class="md-nav__link"> Font Formats </a> </li> <li class="md-nav__item"> <a href="ft2-gasp_table.html" class="md-nav__link"> Gasp Table </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" > <label class="md-nav__link" for="__nav_6"> Controlling FreeType Modules <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Controlling FreeType Modules" data-md-level="1"> <label class="md-nav__title" for="__nav_6"> <span class="md-nav__icon md-icon"></span> Controlling FreeType Modules </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-auto_hinter.html" class="md-nav__link"> The auto-hinter </a> </li> <li class="md-nav__item"> <a href="ft2-cff_driver.html" class="md-nav__link"> The CFF driver </a> </li> <li class="md-nav__item"> <a href="ft2-t1_cid_driver.html" class="md-nav__link"> The Type 1 and CID drivers </a> </li> <li class="md-nav__item"> <a href="ft2-tt_driver.html" class="md-nav__link"> The TrueType driver </a> </li> <li class="md-nav__item"> <a href="ft2-pcf_driver.html" class="md-nav__link"> The PCF driver </a> </li> <li class="md-nav__item"> <a href="ft2-ot_svg_driver.html" class="md-nav__link"> The SVG driver </a> </li> <li class="md-nav__item"> <a href="ft2-properties.html" class="md-nav__link"> Driver properties </a> </li> <li class="md-nav__item"> <a href="ft2-parameter_tags.html" class="md-nav__link"> Parameter Tags </a> </li> <li class="md-nav__item"> <a href="ft2-lcd_rendering.html" class="md-nav__link"> Subpixel Rendering </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" > <label class="md-nav__link" for="__nav_7"> Cache Sub-System <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1"> <label class="md-nav__title" for="__nav_7"> <span class="md-nav__icon md-icon"></span> Cache Sub-System </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-cache_subsystem.html" class="md-nav__link"> Cache Sub-System </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" > <label class="md-nav__link" for="__nav_8"> Support API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Support API" data-md-level="1"> <label class="md-nav__title" for="__nav_8"> <span class="md-nav__icon md-icon"></span> Support API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-computations.html" class="md-nav__link"> Computations </a> </li> <li class="md-nav__item"> <a href="ft2-list_processing.html" class="md-nav__link"> List Processing </a> </li> <li class="md-nav__item"> <a href="ft2-outline_processing.html" class="md-nav__link"> Outline Processing </a> </li> <li class="md-nav__item"> <a href="ft2-quick_advance.html" class="md-nav__link"> Quick retrieval of advance values </a> </li> <li class="md-nav__item"> <a href="ft2-bitmap_handling.html" class="md-nav__link"> Bitmap Handling </a> </li> <li class="md-nav__item"> <a href="ft2-raster.html" class="md-nav__link"> Scanline Converter </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_stroker.html" class="md-nav__link"> Glyph Stroker </a> </li> <li class="md-nav__item"> <a href="ft2-system_interface.html" class="md-nav__link"> System Interface </a> </li> <li class="md-nav__item"> <a href="ft2-module_management.html" class="md-nav__link"> Module Management </a> </li> <li class="md-nav__item"> <a href="ft2-gzip.html" class="md-nav__link"> GZIP Streams </a> </li> <li class="md-nav__item"> <a href="ft2-lzw.html" class="md-nav__link"> LZW Streams </a> </li> <li class="md-nav__item"> <a href="ft2-bzip2.html" class="md-nav__link"> BZIP2 Streams </a> </li> <li class="md-nav__item"> <a href="ft2-debugging_apis.html" class="md-nav__link"> External Debugging APIs </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" > <label class="md-nav__link" for="__nav_9"> Error Codes <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Error Codes" data-md-level="1"> <label class="md-nav__title" for="__nav_9"> <span class="md-nav__icon md-icon"></span> Error Codes </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-error_enumerations.html" class="md-nav__link"> Error Enumerations </a> </li> <li class="md-nav__item"> <a href="ft2-error_code_values.html" class="md-nav__link"> Error Code Values </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" > <label class="md-nav__link" for="__nav_10"> Miscellaneous <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1"> <label class="md-nav__title" for="__nav_10"> <span class="md-nav__icon md-icon"></span> Miscellaneous </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-gx_validation.html" class="md-nav__link"> TrueTypeGX/AAT Validation </a> </li> <li class="md-nav__item"> <a href="ft2-incremental.html" class="md-nav__link"> Incremental Loading </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_engine.html" class="md-nav__link"> The TrueType Engine </a> </li> <li class="md-nav__item"> <a href="ft2-ot_validation.html" class="md-nav__link"> OpenType Validation </a> </li> </ul> </nav> </li> </ul> </nav> </div> </div> </div> <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_face_getcharvariantindex" class="md-nav__link"> FT_Face_GetCharVariantIndex </a> </li> <li class="md-nav__item"> <a href="#ft_face_getcharvariantisdefault" class="md-nav__link"> FT_Face_GetCharVariantIsDefault </a> </li> <li class="md-nav__item"> <a href="#ft_face_getvariantselectors" class="md-nav__link"> FT_Face_GetVariantSelectors </a> </li> <li class="md-nav__item"> <a href="#ft_face_getvariantsofchar" class="md-nav__link"> FT_Face_GetVariantsOfChar </a> </li> <li class="md-nav__item"> <a href="#ft_face_getcharsofvariant" class="md-nav__link"> FT_Face_GetCharsOfVariant </a> </li> </ul> </nav> </div> </div> </div> <div class="md-content" data-md-component="content"> <article class="md-content__inner md-typeset"> <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; <a href="index.html#core-api">Core API</a> &raquo; Unicode Variation Sequences</p> <hr /> <h1 id="unicode-variation-sequences">Unicode Variation Sequences<a class="headerlink" href="#unicode-variation-sequences" title="Permanent link">&para;</a></h1> <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2> <p>Many characters, especially for CJK scripts, have variant forms. They are a sort of grey area somewhere between being totally irrelevant and semantically distinct; for this reason, the Unicode consortium decided to introduce Variation Sequences (VS), consisting of a Unicode base character and a variation selector instead of further extending the already huge number of characters.</p> <p>Unicode maintains two different sets, namely &lsquo;Standardized Variation Sequences&rsquo; and registered &lsquo;Ideographic Variation Sequences&rsquo; (IVS), collected in the &lsquo;Ideographic Variation Database&rsquo; (IVD).</p> <p><a href="https://unicode.org/Public/UCD/latest/ucd/StandardizedVariants.txt">https://unicode.org/Public/UCD/latest/ucd/StandardizedVariants.txt</a> <a href="https://unicode.org/reports/tr37/">https://unicode.org/reports/tr37/</a> <a href="https://unicode.org/ivd/">https://unicode.org/ivd/</a></p> <p>To date (January 2017), the character with the most ideographic variations is U+9089, having 32 such IVS.</p> <p>Three Mongolian Variation Selectors have the values U+180B-U+180D; 256 generic Variation Selectors are encoded in the ranges U+FE00-U+FE0F and U+E0100-U+E01EF. IVS currently use Variation Selectors from the range U+E0100-U+E01EF only.</p> <p>A VS consists of the base character value followed by a single Variation Selector. For example, to get the first variation of U+9089, you have to write the character sequence <code>U+9089 U+E0100</code>.</p> <p>Adobe and MS decided to support both standardized and ideographic VS with a new cmap subtable (format&nbsp;14). It is an odd subtable because it is not a mapping of input code points to glyphs, but contains lists of all variations supported by the font.</p> <p>A variation may be either &lsquo;default&rsquo; or &lsquo;non-default&rsquo; for a given font. A default variation is the one you will get for that code point if you look it up in the standard Unicode cmap. A non-default variation is a different glyph.</p> <h2 id="ft_face_getcharvariantindex">FT_Face_GetCharVariantIndex<a class="headerlink" href="#ft_face_getcharvariantindex" title="Permanent link">&para;</a></h2> <p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> ) <b>FT_Face_GetCharVariantIndex</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a> face, <a href="ft2-basic_types.html#ft_ulong">FT_ULong</a> charcode, <a href="ft2-basic_types.html#ft_ulong">FT_ULong</a> variantSelector ); </code></pre></div> <p>Return the glyph index of a given character code as modified by the variation selector.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="face">face</td><td class="desc"> <p>A handle to the source face object.</p> </td></tr> <tr><td class="val" id="charcode">charcode</td><td class="desc"> <p>The character code point in Unicode.</p> </td></tr> <tr><td class="val" id="variantselector">variantSelector</td><td class="desc"> <p>The Unicode code point of the variation selector.</p> </td></tr> </table> <h4>return</h4> <p>The glyph index. 0&nbsp;means either &lsquo;undefined character code&rsquo;, or &lsquo;undefined selector code&rsquo;, or &lsquo;no variation selector cmap subtable&rsquo;, or &lsquo;current CharMap is not Unicode&rsquo;.</p> <h4>note</h4> <p>If you use FreeType to manipulate the contents of font files directly, be aware that the glyph index returned by this function doesn't always correspond to the internal indices used within the file. This is done to ensure that value&nbsp;0 always corresponds to the &lsquo;missing glyph&rsquo;.</p> <p>This function is only meaningful if a) the font has a variation selector cmap sub table, and b) the current charmap has a Unicode encoding.</p> <h4>since</h4> <p>2.3.6</p> <hr> <h2 id="ft_face_getcharvariantisdefault">FT_Face_GetCharVariantIsDefault<a class="headerlink" href="#ft_face_getcharvariantisdefault" title="Permanent link">&para;</a></h2> <p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_int">FT_Int</a> ) <b>FT_Face_GetCharVariantIsDefault</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a> face, <a href="ft2-basic_types.html#ft_ulong">FT_ULong</a> charcode, <a href="ft2-basic_types.html#ft_ulong">FT_ULong</a> variantSelector ); </code></pre></div> <p>Check whether this variation of this Unicode character is the one to be found in the charmap.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="face">face</td><td class="desc"> <p>A handle to the source face object.</p> </td></tr> <tr><td class="val" id="charcode">charcode</td><td class="desc"> <p>The character codepoint in Unicode.</p> </td></tr> <tr><td class="val" id="variantselector">variantSelector</td><td class="desc"> <p>The Unicode codepoint of the variation selector.</p> </td></tr> </table> <h4>return</h4> <p>1&nbsp;if found in the standard (Unicode) cmap, 0&nbsp;if found in the variation selector cmap, or -1 if it is not a variation.</p> <h4>note</h4> <p>This function is only meaningful if the font has a variation selector cmap subtable.</p> <h4>since</h4> <p>2.3.6</p> <hr> <h2 id="ft_face_getvariantselectors">FT_Face_GetVariantSelectors<a class="headerlink" href="#ft_face_getvariantselectors" title="Permanent link">&para;</a></h2> <p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_uint32">FT_UInt32</a>* ) <b>FT_Face_GetVariantSelectors</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a> face ); </code></pre></div> <p>Return a zero-terminated list of Unicode variation selectors found in the font.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="face">face</td><td class="desc"> <p>A handle to the source face object.</p> </td></tr> </table> <h4>return</h4> <p>A pointer to an array of selector code points, or <code>NULL</code> if there is no valid variation selector cmap subtable.</p> <h4>note</h4> <p>The last item in the array is&nbsp;0; the array is owned by the <code><a href="ft2-base_interface.html#ft_face">FT_Face</a></code> object but can be overwritten or released on the next call to a FreeType function.</p> <h4>since</h4> <p>2.3.6</p> <hr> <h2 id="ft_face_getvariantsofchar">FT_Face_GetVariantsOfChar<a class="headerlink" href="#ft_face_getvariantsofchar" title="Permanent link">&para;</a></h2> <p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_uint32">FT_UInt32</a>* ) <b>FT_Face_GetVariantsOfChar</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a> face, <a href="ft2-basic_types.html#ft_ulong">FT_ULong</a> charcode ); </code></pre></div> <p>Return a zero-terminated list of Unicode variation selectors found for the specified character code.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="face">face</td><td class="desc"> <p>A handle to the source face object.</p> </td></tr> <tr><td class="val" id="charcode">charcode</td><td class="desc"> <p>The character codepoint in Unicode.</p> </td></tr> </table> <h4>return</h4> <p>A pointer to an array of variation selector code points that are active for the given character, or <code>NULL</code> if the corresponding list is empty.</p> <h4>note</h4> <p>The last item in the array is&nbsp;0; the array is owned by the <code><a href="ft2-base_interface.html#ft_face">FT_Face</a></code> object but can be overwritten or released on the next call to a FreeType function.</p> <h4>since</h4> <p>2.3.6</p> <hr> <h2 id="ft_face_getcharsofvariant">FT_Face_GetCharsOfVariant<a class="headerlink" href="#ft_face_getcharsofvariant" title="Permanent link">&para;</a></h2> <p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_uint32">FT_UInt32</a>* ) <b>FT_Face_GetCharsOfVariant</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a> face, <a href="ft2-basic_types.html#ft_ulong">FT_ULong</a> variantSelector ); </code></pre></div> <p>Return a zero-terminated list of Unicode character codes found for the specified variation selector.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="face">face</td><td class="desc"> <p>A handle to the source face object.</p> </td></tr> <tr><td class="val" id="variantselector">variantSelector</td><td class="desc"> <p>The variation selector code point in Unicode.</p> </td></tr> </table> <h4>return</h4> <p>A list of all the code points that are specified by this selector (both default and non-default codes are returned) or <code>NULL</code> if there is no valid cmap or the variation selector is invalid.</p> <h4>note</h4> <p>The last item in the array is&nbsp;0; the array is owned by the <code><a href="ft2-base_interface.html#ft_face">FT_Face</a></code> object but can be overwritten or released on the next call to a FreeType function.</p> <h4>since</h4> <p>2.3.6</p> <hr> </article> </div> </div> </main> <footer class="md-footer"> <nav class="md-footer__inner md-grid" aria-label="Footer"> <a href="ft2-base_interface.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: Base Interface" rel="prev"> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Previous </span> Base Interface </div> </div> </a> <a href="ft2-color_management.html" class="md-footer__link md-footer__link--next" aria-label="Next: Glyph Color Management" rel="next"> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Next </span> Glyph Color Management </div> </div> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg> </div> </a> </nav> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-footer-copyright"> <div class="md-footer-copyright__highlight"> Copyright 2022 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>. </div> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"base": ".", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "assets/javascripts/workers/search.477d984a.min.js", "version": null}</script> <script src="assets/javascripts/bundle.82b56eb2.min.js"></script> <script src="javascripts/extra.js"></script> </body> </html>
whupdup/frame
real/third_party/freetype-2.12.0/docs/reference/ft2-glyph_variants.html
HTML
gpl-3.0
37,675
<!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="description" content="API Reference Documentation for FreeType-2.12.0"> <meta name="author" content="FreeType Contributors"> <link rel="icon" href="images/favico.ico"> <meta name="generator" content="mkdocs-1.2.1, mkdocs-material-7.1.9"> <title>TrueTypeGX/AAT Validation - FreeType-2.12.0 API Reference</title> <link rel="stylesheet" href="assets/stylesheets/main.ca7ac06f.min.css"> <link rel="stylesheet" href="assets/stylesheets/palette.f1a3b89f.min.css"> <meta name="theme-color" content="#4cae4f"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback"> <style>:root{--md-text-font-family:"Noto Serif";--md-code-font-family:"Roboto Mono"}</style> <link rel="stylesheet" href="stylesheets/extra.css"> </head> <body dir="ltr" data-md-color-scheme="" data-md-color-primary="green" data-md-color-accent="green"> <script>function __prefix(e){return new URL(".",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <label class="md-overlay" for="__drawer"></label> <div data-md-component="skip"> <a href="#truetypegxaat-validation" class="md-skip"> Skip to content </a> </div> <div data-md-component="announce"> </div> <header class="md-header" data-md-component="header"> <nav class="md-header__inner md-grid" aria-label="Header"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> <label class="md-header__button md-icon" for="__drawer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg> </label> <div class="md-header__title" data-md-component="header-title"> <div class="md-header__ellipsis"> <div class="md-header__topic"> <span class="md-ellipsis"> FreeType-2.12.0 API Reference </span> </div> <div class="md-header__topic" data-md-component="header-topic"> <span class="md-ellipsis"> TrueTypeGX/AAT Validation </span> </div> </div> </div> <label class="md-header__button md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> </label> <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required> <label class="md-search__icon md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </label> <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg> </button> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" data-md-scrollfix> <div class="md-search-result" data-md-component="search-result"> <div class="md-search-result__meta"> Initializing search </div> <ol class="md-search-result__list"></ol> </div> </div> </div> </div> </div> </nav> </header> <div class="md-container" data-md-component="container"> <main class="md-main" data-md-component="main"> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <label class="md-nav__title" for="__drawer"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> FreeType-2.12.0 API Reference </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="index.html" class="md-nav__link"> TOC </a> </li> <li class="md-nav__item"> <a href="ft2-index.html" class="md-nav__link"> Index </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" > <label class="md-nav__link" for="__nav_3"> General Remarks <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="General Remarks" data-md-level="1"> <label class="md-nav__title" for="__nav_3"> <span class="md-nav__icon md-icon"></span> General Remarks </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-preamble.html" class="md-nav__link"> Preamble </a> </li> <li class="md-nav__item"> <a href="ft2-header_inclusion.html" class="md-nav__link"> FreeType's header inclusion scheme </a> </li> <li class="md-nav__item"> <a href="ft2-user_allocation.html" class="md-nav__link"> User allocation </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" > <label class="md-nav__link" for="__nav_4"> Core API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Core API" data-md-level="1"> <label class="md-nav__title" for="__nav_4"> <span class="md-nav__icon md-icon"></span> Core API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-version.html" class="md-nav__link"> FreeType Version </a> </li> <li class="md-nav__item"> <a href="ft2-basic_types.html" class="md-nav__link"> Basic Data Types </a> </li> <li class="md-nav__item"> <a href="ft2-base_interface.html" class="md-nav__link"> Base Interface </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_variants.html" class="md-nav__link"> Unicode Variation Sequences </a> </li> <li class="md-nav__item"> <a href="ft2-color_management.html" class="md-nav__link"> Glyph Color Management </a> </li> <li class="md-nav__item"> <a href="ft2-layer_management.html" class="md-nav__link"> Glyph Layer Management </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_management.html" class="md-nav__link"> Glyph Management </a> </li> <li class="md-nav__item"> <a href="ft2-mac_specific.html" class="md-nav__link"> Mac Specific Interface </a> </li> <li class="md-nav__item"> <a href="ft2-sizes_management.html" class="md-nav__link"> Size Management </a> </li> <li class="md-nav__item"> <a href="ft2-header_file_macros.html" class="md-nav__link"> Header File Macros </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" > <label class="md-nav__link" for="__nav_5"> Format-Specific API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Format-Specific API" data-md-level="1"> <label class="md-nav__title" for="__nav_5"> <span class="md-nav__icon md-icon"></span> Format-Specific API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-multiple_masters.html" class="md-nav__link"> Multiple Masters </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_tables.html" class="md-nav__link"> TrueType Tables </a> </li> <li class="md-nav__item"> <a href="ft2-type1_tables.html" class="md-nav__link"> Type 1 Tables </a> </li> <li class="md-nav__item"> <a href="ft2-sfnt_names.html" class="md-nav__link"> SFNT Names </a> </li> <li class="md-nav__item"> <a href="ft2-bdf_fonts.html" class="md-nav__link"> BDF and PCF Files </a> </li> <li class="md-nav__item"> <a href="ft2-cid_fonts.html" class="md-nav__link"> CID Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-pfr_fonts.html" class="md-nav__link"> PFR Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-winfnt_fonts.html" class="md-nav__link"> Window FNT Files </a> </li> <li class="md-nav__item"> <a href="ft2-svg_fonts.html" class="md-nav__link"> OpenType SVG Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-font_formats.html" class="md-nav__link"> Font Formats </a> </li> <li class="md-nav__item"> <a href="ft2-gasp_table.html" class="md-nav__link"> Gasp Table </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" > <label class="md-nav__link" for="__nav_6"> Controlling FreeType Modules <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Controlling FreeType Modules" data-md-level="1"> <label class="md-nav__title" for="__nav_6"> <span class="md-nav__icon md-icon"></span> Controlling FreeType Modules </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-auto_hinter.html" class="md-nav__link"> The auto-hinter </a> </li> <li class="md-nav__item"> <a href="ft2-cff_driver.html" class="md-nav__link"> The CFF driver </a> </li> <li class="md-nav__item"> <a href="ft2-t1_cid_driver.html" class="md-nav__link"> The Type 1 and CID drivers </a> </li> <li class="md-nav__item"> <a href="ft2-tt_driver.html" class="md-nav__link"> The TrueType driver </a> </li> <li class="md-nav__item"> <a href="ft2-pcf_driver.html" class="md-nav__link"> The PCF driver </a> </li> <li class="md-nav__item"> <a href="ft2-ot_svg_driver.html" class="md-nav__link"> The SVG driver </a> </li> <li class="md-nav__item"> <a href="ft2-properties.html" class="md-nav__link"> Driver properties </a> </li> <li class="md-nav__item"> <a href="ft2-parameter_tags.html" class="md-nav__link"> Parameter Tags </a> </li> <li class="md-nav__item"> <a href="ft2-lcd_rendering.html" class="md-nav__link"> Subpixel Rendering </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" > <label class="md-nav__link" for="__nav_7"> Cache Sub-System <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1"> <label class="md-nav__title" for="__nav_7"> <span class="md-nav__icon md-icon"></span> Cache Sub-System </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-cache_subsystem.html" class="md-nav__link"> Cache Sub-System </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" > <label class="md-nav__link" for="__nav_8"> Support API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Support API" data-md-level="1"> <label class="md-nav__title" for="__nav_8"> <span class="md-nav__icon md-icon"></span> Support API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-computations.html" class="md-nav__link"> Computations </a> </li> <li class="md-nav__item"> <a href="ft2-list_processing.html" class="md-nav__link"> List Processing </a> </li> <li class="md-nav__item"> <a href="ft2-outline_processing.html" class="md-nav__link"> Outline Processing </a> </li> <li class="md-nav__item"> <a href="ft2-quick_advance.html" class="md-nav__link"> Quick retrieval of advance values </a> </li> <li class="md-nav__item"> <a href="ft2-bitmap_handling.html" class="md-nav__link"> Bitmap Handling </a> </li> <li class="md-nav__item"> <a href="ft2-raster.html" class="md-nav__link"> Scanline Converter </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_stroker.html" class="md-nav__link"> Glyph Stroker </a> </li> <li class="md-nav__item"> <a href="ft2-system_interface.html" class="md-nav__link"> System Interface </a> </li> <li class="md-nav__item"> <a href="ft2-module_management.html" class="md-nav__link"> Module Management </a> </li> <li class="md-nav__item"> <a href="ft2-gzip.html" class="md-nav__link"> GZIP Streams </a> </li> <li class="md-nav__item"> <a href="ft2-lzw.html" class="md-nav__link"> LZW Streams </a> </li> <li class="md-nav__item"> <a href="ft2-bzip2.html" class="md-nav__link"> BZIP2 Streams </a> </li> <li class="md-nav__item"> <a href="ft2-debugging_apis.html" class="md-nav__link"> External Debugging APIs </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" > <label class="md-nav__link" for="__nav_9"> Error Codes <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Error Codes" data-md-level="1"> <label class="md-nav__title" for="__nav_9"> <span class="md-nav__icon md-icon"></span> Error Codes </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-error_enumerations.html" class="md-nav__link"> Error Enumerations </a> </li> <li class="md-nav__item"> <a href="ft2-error_code_values.html" class="md-nav__link"> Error Code Values </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--active md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" checked> <label class="md-nav__link" for="__nav_10"> Miscellaneous <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1"> <label class="md-nav__title" for="__nav_10"> <span class="md-nav__icon md-icon"></span> Miscellaneous </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item md-nav__item--active"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <label class="md-nav__link md-nav__link--active" for="__toc"> TrueTypeGX/AAT Validation <span class="md-nav__icon md-icon"></span> </label> <a href="ft2-gx_validation.html" class="md-nav__link md-nav__link--active"> TrueTypeGX/AAT Validation </a> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_truetypegx_validate" class="md-nav__link"> FT_TrueTypeGX_Validate </a> </li> <li class="md-nav__item"> <a href="#ft_truetypegx_free" class="md-nav__link"> FT_TrueTypeGX_Free </a> </li> <li class="md-nav__item"> <a href="#ft_classickern_validate" class="md-nav__link"> FT_ClassicKern_Validate </a> </li> <li class="md-nav__item"> <a href="#ft_classickern_free" class="md-nav__link"> FT_ClassicKern_Free </a> </li> <li class="md-nav__item"> <a href="#ft_validate_gx_length" class="md-nav__link"> FT_VALIDATE_GX_LENGTH </a> </li> <li class="md-nav__item"> <a href="#ft_validate_gxxxx" class="md-nav__link"> FT_VALIDATE_GXXXX </a> </li> <li class="md-nav__item"> <a href="#ft_validate_ckernxxx" class="md-nav__link"> FT_VALIDATE_CKERNXXX </a> </li> </ul> </nav> </li> <li class="md-nav__item"> <a href="ft2-incremental.html" class="md-nav__link"> Incremental Loading </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_engine.html" class="md-nav__link"> The TrueType Engine </a> </li> <li class="md-nav__item"> <a href="ft2-ot_validation.html" class="md-nav__link"> OpenType Validation </a> </li> </ul> </nav> </li> </ul> </nav> </div> </div> </div> <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_truetypegx_validate" class="md-nav__link"> FT_TrueTypeGX_Validate </a> </li> <li class="md-nav__item"> <a href="#ft_truetypegx_free" class="md-nav__link"> FT_TrueTypeGX_Free </a> </li> <li class="md-nav__item"> <a href="#ft_classickern_validate" class="md-nav__link"> FT_ClassicKern_Validate </a> </li> <li class="md-nav__item"> <a href="#ft_classickern_free" class="md-nav__link"> FT_ClassicKern_Free </a> </li> <li class="md-nav__item"> <a href="#ft_validate_gx_length" class="md-nav__link"> FT_VALIDATE_GX_LENGTH </a> </li> <li class="md-nav__item"> <a href="#ft_validate_gxxxx" class="md-nav__link"> FT_VALIDATE_GXXXX </a> </li> <li class="md-nav__item"> <a href="#ft_validate_ckernxxx" class="md-nav__link"> FT_VALIDATE_CKERNXXX </a> </li> </ul> </nav> </div> </div> </div> <div class="md-content" data-md-component="content"> <article class="md-content__inner md-typeset"> <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; <a href="index.html#miscellaneous">Miscellaneous</a> &raquo; TrueTypeGX/AAT Validation</p> <hr /> <h1 id="truetypegxaat-validation">TrueTypeGX/AAT Validation<a class="headerlink" href="#truetypegxaat-validation" title="Permanent link">&para;</a></h1> <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2> <p>This section contains the declaration of functions to validate some TrueTypeGX tables (feat, mort, morx, bsln, just, kern, opbd, trak, prop, lcar).</p> <h2 id="ft_truetypegx_validate">FT_TrueTypeGX_Validate<a class="headerlink" href="#ft_truetypegx_validate" title="Permanent link">&para;</a></h2> <p>Defined in FT_GX_VALIDATE_H (freetype/ftgxval.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_TrueTypeGX_Validate</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a> face, <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> validation_flags, <a href="ft2-basic_types.html#ft_bytes">FT_Bytes</a> tables[<a href="ft2-gx_validation.html#ft_validate_gx_length">FT_VALIDATE_GX_LENGTH</a>], <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> table_length ); </code></pre></div> <p>Validate various TrueTypeGX tables to assure that all offsets and indices are valid. The idea is that a higher-level library that actually does the text layout can access those tables without error checking (which can be quite time consuming).</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="face">face</td><td class="desc"> <p>A handle to the input face.</p> </td></tr> <tr><td class="val" id="validation_flags">validation_flags</td><td class="desc"> <p>A bit field that specifies the tables to be validated. See <code><a href="ft2-gx_validation.html#ft_validate_gxxxx">FT_VALIDATE_GXXXX</a></code> for possible values.</p> </td></tr> <tr><td class="val" id="table_length">table_length</td><td class="desc"> <p>The size of the <code>tables</code> array. Normally, <code><a href="ft2-gx_validation.html#ft_validate_gx_length">FT_VALIDATE_GX_LENGTH</a></code> should be passed.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="tables">tables</td><td class="desc"> <p>The array where all validated sfnt tables are stored. The array itself must be allocated by a client.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>This function only works with TrueTypeGX fonts, returning an error otherwise.</p> <p>After use, the application should deallocate the buffers pointed to by each <code>tables</code> element, by calling <code><a href="ft2-gx_validation.html#ft_truetypegx_free">FT_TrueTypeGX_Free</a></code>. A <code>NULL</code> value indicates that the table either doesn't exist in the font, the application hasn't asked for validation, or the validator doesn't have the ability to validate the sfnt table.</p> <hr> <h2 id="ft_truetypegx_free">FT_TrueTypeGX_Free<a class="headerlink" href="#ft_truetypegx_free" title="Permanent link">&para;</a></h2> <p>Defined in FT_GX_VALIDATE_H (freetype/ftgxval.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> ) <b>FT_TrueTypeGX_Free</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a> face, <a href="ft2-basic_types.html#ft_bytes">FT_Bytes</a> table ); </code></pre></div> <p>Free the buffer allocated by TrueTypeGX validator.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="face">face</td><td class="desc"> <p>A handle to the input face.</p> </td></tr> <tr><td class="val" id="table">table</td><td class="desc"> <p>The pointer to the buffer allocated by <code><a href="ft2-gx_validation.html#ft_truetypegx_validate">FT_TrueTypeGX_Validate</a></code>.</p> </td></tr> </table> <h4>note</h4> <p>This function must be used to free the buffer allocated by <code><a href="ft2-gx_validation.html#ft_truetypegx_validate">FT_TrueTypeGX_Validate</a></code> only.</p> <hr> <h2 id="ft_classickern_validate">FT_ClassicKern_Validate<a class="headerlink" href="#ft_classickern_validate" title="Permanent link">&para;</a></h2> <p>Defined in FT_GX_VALIDATE_H (freetype/ftgxval.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_ClassicKern_Validate</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a> face, <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> validation_flags, <a href="ft2-basic_types.html#ft_bytes">FT_Bytes</a> *ckern_table ); </code></pre></div> <p>Validate classic (16-bit format) kern table to assure that the offsets and indices are valid. The idea is that a higher-level library that actually does the text layout can access those tables without error checking (which can be quite time consuming).</p> <p>The &lsquo;kern&rsquo; table validator in <code><a href="ft2-gx_validation.html#ft_truetypegx_validate">FT_TrueTypeGX_Validate</a></code> deals with both the new 32-bit format and the classic 16-bit format, while FT_ClassicKern_Validate only supports the classic 16-bit format.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="face">face</td><td class="desc"> <p>A handle to the input face.</p> </td></tr> <tr><td class="val" id="validation_flags">validation_flags</td><td class="desc"> <p>A bit field that specifies the dialect to be validated. See <code><a href="ft2-gx_validation.html#ft_validate_ckernxxx">FT_VALIDATE_CKERNXXX</a></code> for possible values.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="ckern_table">ckern_table</td><td class="desc"> <p>A pointer to the kern table.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>After use, the application should deallocate the buffers pointed to by <code>ckern_table</code>, by calling <code><a href="ft2-gx_validation.html#ft_classickern_free">FT_ClassicKern_Free</a></code>. A <code>NULL</code> value indicates that the table doesn't exist in the font.</p> <hr> <h2 id="ft_classickern_free">FT_ClassicKern_Free<a class="headerlink" href="#ft_classickern_free" title="Permanent link">&para;</a></h2> <p>Defined in FT_GX_VALIDATE_H (freetype/ftgxval.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> ) <b>FT_ClassicKern_Free</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a> face, <a href="ft2-basic_types.html#ft_bytes">FT_Bytes</a> table ); </code></pre></div> <p>Free the buffer allocated by classic Kern validator.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="face">face</td><td class="desc"> <p>A handle to the input face.</p> </td></tr> <tr><td class="val" id="table">table</td><td class="desc"> <p>The pointer to the buffer that is allocated by <code><a href="ft2-gx_validation.html#ft_classickern_validate">FT_ClassicKern_Validate</a></code>.</p> </td></tr> </table> <h4>note</h4> <p>This function must be used to free the buffer allocated by <code><a href="ft2-gx_validation.html#ft_classickern_validate">FT_ClassicKern_Validate</a></code> only.</p> <hr> <h2 id="ft_validate_gx_length">FT_VALIDATE_GX_LENGTH<a class="headerlink" href="#ft_validate_gx_length" title="Permanent link">&para;</a></h2> <p>Defined in FT_GX_VALIDATE_H (freetype/ftgxval.h).</p> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_VALIDATE_GX_LENGTH</b> ( FT_VALIDATE_GX_LAST_INDEX + 1 ) </code></pre></div> <p>The number of tables checked in this module. Use it as a parameter for the <code>table-length</code> argument of function <code><a href="ft2-gx_validation.html#ft_truetypegx_validate">FT_TrueTypeGX_Validate</a></code>.</p> <hr> <h2 id="ft_validate_gxxxx">FT_VALIDATE_GXXXX<a class="headerlink" href="#ft_validate_gxxxx" title="Permanent link">&para;</a></h2> <p>Defined in FT_GX_VALIDATE_H (freetype/ftgxval.h).</p> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <a href="ft2-gx_validation.html#ft_validate_feat">FT_VALIDATE_feat</a> FT_VALIDATE_GX_BITFIELD( feat ) #<span class="keyword">define</span> <a href="ft2-gx_validation.html#ft_validate_mort">FT_VALIDATE_mort</a> FT_VALIDATE_GX_BITFIELD( mort ) #<span class="keyword">define</span> <a href="ft2-gx_validation.html#ft_validate_morx">FT_VALIDATE_morx</a> FT_VALIDATE_GX_BITFIELD( morx ) #<span class="keyword">define</span> <a href="ft2-gx_validation.html#ft_validate_bsln">FT_VALIDATE_bsln</a> FT_VALIDATE_GX_BITFIELD( bsln ) #<span class="keyword">define</span> <a href="ft2-gx_validation.html#ft_validate_just">FT_VALIDATE_just</a> FT_VALIDATE_GX_BITFIELD( just ) #<span class="keyword">define</span> <a href="ft2-gx_validation.html#ft_validate_kern">FT_VALIDATE_kern</a> FT_VALIDATE_GX_BITFIELD( kern ) #<span class="keyword">define</span> <a href="ft2-gx_validation.html#ft_validate_opbd">FT_VALIDATE_opbd</a> FT_VALIDATE_GX_BITFIELD( opbd ) #<span class="keyword">define</span> <a href="ft2-gx_validation.html#ft_validate_trak">FT_VALIDATE_trak</a> FT_VALIDATE_GX_BITFIELD( trak ) #<span class="keyword">define</span> <a href="ft2-gx_validation.html#ft_validate_prop">FT_VALIDATE_prop</a> FT_VALIDATE_GX_BITFIELD( prop ) #<span class="keyword">define</span> <a href="ft2-gx_validation.html#ft_validate_lcar">FT_VALIDATE_lcar</a> FT_VALIDATE_GX_BITFIELD( lcar ) #<span class="keyword">define</span> <a href="ft2-gx_validation.html#ft_validate_gx">FT_VALIDATE_GX</a> ( <a href="ft2-gx_validation.html#ft_validate_feat">FT_VALIDATE_feat</a> | \ <a href="ft2-gx_validation.html#ft_validate_mort">FT_VALIDATE_mort</a> | \ <a href="ft2-gx_validation.html#ft_validate_morx">FT_VALIDATE_morx</a> | \ <a href="ft2-gx_validation.html#ft_validate_bsln">FT_VALIDATE_bsln</a> | \ <a href="ft2-gx_validation.html#ft_validate_just">FT_VALIDATE_just</a> | \ <a href="ft2-gx_validation.html#ft_validate_kern">FT_VALIDATE_kern</a> | \ <a href="ft2-gx_validation.html#ft_validate_opbd">FT_VALIDATE_opbd</a> | \ <a href="ft2-gx_validation.html#ft_validate_trak">FT_VALIDATE_trak</a> | \ <a href="ft2-gx_validation.html#ft_validate_prop">FT_VALIDATE_prop</a> | \ <a href="ft2-gx_validation.html#ft_validate_lcar">FT_VALIDATE_lcar</a> ) </code></pre></div> <p>A list of bit-field constants used with <code><a href="ft2-gx_validation.html#ft_truetypegx_validate">FT_TrueTypeGX_Validate</a></code> to indicate which TrueTypeGX/AAT Type tables should be validated.</p> <h4>values</h4> <table class="fields"> <tr><td class="val" id="ft_validate_feat">FT_VALIDATE_feat</td><td class="desc"> <p>Validate &lsquo;feat&rsquo; table.</p> </td></tr> <tr><td class="val" id="ft_validate_mort">FT_VALIDATE_mort</td><td class="desc"> <p>Validate &lsquo;mort&rsquo; table.</p> </td></tr> <tr><td class="val" id="ft_validate_morx">FT_VALIDATE_morx</td><td class="desc"> <p>Validate &lsquo;morx&rsquo; table.</p> </td></tr> <tr><td class="val" id="ft_validate_bsln">FT_VALIDATE_bsln</td><td class="desc"> <p>Validate &lsquo;bsln&rsquo; table.</p> </td></tr> <tr><td class="val" id="ft_validate_just">FT_VALIDATE_just</td><td class="desc"> <p>Validate &lsquo;just&rsquo; table.</p> </td></tr> <tr><td class="val" id="ft_validate_kern">FT_VALIDATE_kern</td><td class="desc"> <p>Validate &lsquo;kern&rsquo; table.</p> </td></tr> <tr><td class="val" id="ft_validate_opbd">FT_VALIDATE_opbd</td><td class="desc"> <p>Validate &lsquo;opbd&rsquo; table.</p> </td></tr> <tr><td class="val" id="ft_validate_trak">FT_VALIDATE_trak</td><td class="desc"> <p>Validate &lsquo;trak&rsquo; table.</p> </td></tr> <tr><td class="val" id="ft_validate_prop">FT_VALIDATE_prop</td><td class="desc"> <p>Validate &lsquo;prop&rsquo; table.</p> </td></tr> <tr><td class="val" id="ft_validate_lcar">FT_VALIDATE_lcar</td><td class="desc"> <p>Validate &lsquo;lcar&rsquo; table.</p> </td></tr> <tr><td class="val" id="ft_validate_gx">FT_VALIDATE_GX</td><td class="desc"> <p>Validate all TrueTypeGX tables (feat, mort, morx, bsln, just, kern, opbd, trak, prop and lcar).</p> </td></tr> </table> <hr> <h2 id="ft_validate_ckernxxx">FT_VALIDATE_CKERNXXX<a class="headerlink" href="#ft_validate_ckernxxx" title="Permanent link">&para;</a></h2> <p>Defined in FT_GX_VALIDATE_H (freetype/ftgxval.h).</p> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <a href="ft2-gx_validation.html#ft_validate_ms">FT_VALIDATE_MS</a> ( FT_VALIDATE_GX_START &lt;&lt; 0 ) #<span class="keyword">define</span> <a href="ft2-gx_validation.html#ft_validate_apple">FT_VALIDATE_APPLE</a> ( FT_VALIDATE_GX_START &lt;&lt; 1 ) #<span class="keyword">define</span> <a href="ft2-gx_validation.html#ft_validate_ckern">FT_VALIDATE_CKERN</a> ( <a href="ft2-gx_validation.html#ft_validate_ms">FT_VALIDATE_MS</a> | <a href="ft2-gx_validation.html#ft_validate_apple">FT_VALIDATE_APPLE</a> ) </code></pre></div> <p>A list of bit-field constants used with <code><a href="ft2-gx_validation.html#ft_classickern_validate">FT_ClassicKern_Validate</a></code> to indicate the classic kern dialect or dialects. If the selected type doesn't fit, <code><a href="ft2-gx_validation.html#ft_classickern_validate">FT_ClassicKern_Validate</a></code> regards the table as invalid.</p> <h4>values</h4> <table class="fields"> <tr><td class="val" id="ft_validate_ms">FT_VALIDATE_MS</td><td class="desc"> <p>Handle the &lsquo;kern&rsquo; table as a classic Microsoft kern table.</p> </td></tr> <tr><td class="val" id="ft_validate_apple">FT_VALIDATE_APPLE</td><td class="desc"> <p>Handle the &lsquo;kern&rsquo; table as a classic Apple kern table.</p> </td></tr> <tr><td class="val" id="ft_validate_ckern">FT_VALIDATE_CKERN</td><td class="desc"> <p>Handle the &lsquo;kern&rsquo; as either classic Apple or Microsoft kern table.</p> </td></tr> </table> <hr> </article> </div> </div> </main> <footer class="md-footer"> <nav class="md-footer__inner md-grid" aria-label="Footer"> <a href="ft2-error_code_values.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: Error Code Values" rel="prev"> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Previous </span> Error Code Values </div> </div> </a> <a href="ft2-incremental.html" class="md-footer__link md-footer__link--next" aria-label="Next: Incremental Loading" rel="next"> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Next </span> Incremental Loading </div> </div> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg> </div> </a> </nav> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-footer-copyright"> <div class="md-footer-copyright__highlight"> Copyright 2022 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>. </div> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"base": ".", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "assets/javascripts/workers/search.477d984a.min.js", "version": null}</script> <script src="assets/javascripts/bundle.82b56eb2.min.js"></script> <script src="javascripts/extra.js"></script> </body> </html>
whupdup/frame
real/third_party/freetype-2.12.0/docs/reference/ft2-gx_validation.html
HTML
gpl-3.0
42,617
<!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="description" content="API Reference Documentation for FreeType-2.12.0"> <meta name="author" content="FreeType Contributors"> <link rel="icon" href="images/favico.ico"> <meta name="generator" content="mkdocs-1.2.1, mkdocs-material-7.1.9"> <title>GZIP Streams - FreeType-2.12.0 API Reference</title> <link rel="stylesheet" href="assets/stylesheets/main.ca7ac06f.min.css"> <link rel="stylesheet" href="assets/stylesheets/palette.f1a3b89f.min.css"> <meta name="theme-color" content="#4cae4f"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback"> <style>:root{--md-text-font-family:"Noto Serif";--md-code-font-family:"Roboto Mono"}</style> <link rel="stylesheet" href="stylesheets/extra.css"> </head> <body dir="ltr" data-md-color-scheme="" data-md-color-primary="green" data-md-color-accent="green"> <script>function __prefix(e){return new URL(".",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <label class="md-overlay" for="__drawer"></label> <div data-md-component="skip"> <a href="#gzip-streams" class="md-skip"> Skip to content </a> </div> <div data-md-component="announce"> </div> <header class="md-header" data-md-component="header"> <nav class="md-header__inner md-grid" aria-label="Header"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> <label class="md-header__button md-icon" for="__drawer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg> </label> <div class="md-header__title" data-md-component="header-title"> <div class="md-header__ellipsis"> <div class="md-header__topic"> <span class="md-ellipsis"> FreeType-2.12.0 API Reference </span> </div> <div class="md-header__topic" data-md-component="header-topic"> <span class="md-ellipsis"> GZIP Streams </span> </div> </div> </div> <label class="md-header__button md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> </label> <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required> <label class="md-search__icon md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </label> <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg> </button> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" data-md-scrollfix> <div class="md-search-result" data-md-component="search-result"> <div class="md-search-result__meta"> Initializing search </div> <ol class="md-search-result__list"></ol> </div> </div> </div> </div> </div> </nav> </header> <div class="md-container" data-md-component="container"> <main class="md-main" data-md-component="main"> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <label class="md-nav__title" for="__drawer"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> FreeType-2.12.0 API Reference </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="index.html" class="md-nav__link"> TOC </a> </li> <li class="md-nav__item"> <a href="ft2-index.html" class="md-nav__link"> Index </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" > <label class="md-nav__link" for="__nav_3"> General Remarks <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="General Remarks" data-md-level="1"> <label class="md-nav__title" for="__nav_3"> <span class="md-nav__icon md-icon"></span> General Remarks </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-preamble.html" class="md-nav__link"> Preamble </a> </li> <li class="md-nav__item"> <a href="ft2-header_inclusion.html" class="md-nav__link"> FreeType's header inclusion scheme </a> </li> <li class="md-nav__item"> <a href="ft2-user_allocation.html" class="md-nav__link"> User allocation </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" > <label class="md-nav__link" for="__nav_4"> Core API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Core API" data-md-level="1"> <label class="md-nav__title" for="__nav_4"> <span class="md-nav__icon md-icon"></span> Core API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-version.html" class="md-nav__link"> FreeType Version </a> </li> <li class="md-nav__item"> <a href="ft2-basic_types.html" class="md-nav__link"> Basic Data Types </a> </li> <li class="md-nav__item"> <a href="ft2-base_interface.html" class="md-nav__link"> Base Interface </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_variants.html" class="md-nav__link"> Unicode Variation Sequences </a> </li> <li class="md-nav__item"> <a href="ft2-color_management.html" class="md-nav__link"> Glyph Color Management </a> </li> <li class="md-nav__item"> <a href="ft2-layer_management.html" class="md-nav__link"> Glyph Layer Management </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_management.html" class="md-nav__link"> Glyph Management </a> </li> <li class="md-nav__item"> <a href="ft2-mac_specific.html" class="md-nav__link"> Mac Specific Interface </a> </li> <li class="md-nav__item"> <a href="ft2-sizes_management.html" class="md-nav__link"> Size Management </a> </li> <li class="md-nav__item"> <a href="ft2-header_file_macros.html" class="md-nav__link"> Header File Macros </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" > <label class="md-nav__link" for="__nav_5"> Format-Specific API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Format-Specific API" data-md-level="1"> <label class="md-nav__title" for="__nav_5"> <span class="md-nav__icon md-icon"></span> Format-Specific API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-multiple_masters.html" class="md-nav__link"> Multiple Masters </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_tables.html" class="md-nav__link"> TrueType Tables </a> </li> <li class="md-nav__item"> <a href="ft2-type1_tables.html" class="md-nav__link"> Type 1 Tables </a> </li> <li class="md-nav__item"> <a href="ft2-sfnt_names.html" class="md-nav__link"> SFNT Names </a> </li> <li class="md-nav__item"> <a href="ft2-bdf_fonts.html" class="md-nav__link"> BDF and PCF Files </a> </li> <li class="md-nav__item"> <a href="ft2-cid_fonts.html" class="md-nav__link"> CID Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-pfr_fonts.html" class="md-nav__link"> PFR Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-winfnt_fonts.html" class="md-nav__link"> Window FNT Files </a> </li> <li class="md-nav__item"> <a href="ft2-svg_fonts.html" class="md-nav__link"> OpenType SVG Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-font_formats.html" class="md-nav__link"> Font Formats </a> </li> <li class="md-nav__item"> <a href="ft2-gasp_table.html" class="md-nav__link"> Gasp Table </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" > <label class="md-nav__link" for="__nav_6"> Controlling FreeType Modules <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Controlling FreeType Modules" data-md-level="1"> <label class="md-nav__title" for="__nav_6"> <span class="md-nav__icon md-icon"></span> Controlling FreeType Modules </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-auto_hinter.html" class="md-nav__link"> The auto-hinter </a> </li> <li class="md-nav__item"> <a href="ft2-cff_driver.html" class="md-nav__link"> The CFF driver </a> </li> <li class="md-nav__item"> <a href="ft2-t1_cid_driver.html" class="md-nav__link"> The Type 1 and CID drivers </a> </li> <li class="md-nav__item"> <a href="ft2-tt_driver.html" class="md-nav__link"> The TrueType driver </a> </li> <li class="md-nav__item"> <a href="ft2-pcf_driver.html" class="md-nav__link"> The PCF driver </a> </li> <li class="md-nav__item"> <a href="ft2-ot_svg_driver.html" class="md-nav__link"> The SVG driver </a> </li> <li class="md-nav__item"> <a href="ft2-properties.html" class="md-nav__link"> Driver properties </a> </li> <li class="md-nav__item"> <a href="ft2-parameter_tags.html" class="md-nav__link"> Parameter Tags </a> </li> <li class="md-nav__item"> <a href="ft2-lcd_rendering.html" class="md-nav__link"> Subpixel Rendering </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" > <label class="md-nav__link" for="__nav_7"> Cache Sub-System <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1"> <label class="md-nav__title" for="__nav_7"> <span class="md-nav__icon md-icon"></span> Cache Sub-System </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-cache_subsystem.html" class="md-nav__link"> Cache Sub-System </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--active md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" checked> <label class="md-nav__link" for="__nav_8"> Support API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Support API" data-md-level="1"> <label class="md-nav__title" for="__nav_8"> <span class="md-nav__icon md-icon"></span> Support API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-computations.html" class="md-nav__link"> Computations </a> </li> <li class="md-nav__item"> <a href="ft2-list_processing.html" class="md-nav__link"> List Processing </a> </li> <li class="md-nav__item"> <a href="ft2-outline_processing.html" class="md-nav__link"> Outline Processing </a> </li> <li class="md-nav__item"> <a href="ft2-quick_advance.html" class="md-nav__link"> Quick retrieval of advance values </a> </li> <li class="md-nav__item"> <a href="ft2-bitmap_handling.html" class="md-nav__link"> Bitmap Handling </a> </li> <li class="md-nav__item"> <a href="ft2-raster.html" class="md-nav__link"> Scanline Converter </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_stroker.html" class="md-nav__link"> Glyph Stroker </a> </li> <li class="md-nav__item"> <a href="ft2-system_interface.html" class="md-nav__link"> System Interface </a> </li> <li class="md-nav__item"> <a href="ft2-module_management.html" class="md-nav__link"> Module Management </a> </li> <li class="md-nav__item md-nav__item--active"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <label class="md-nav__link md-nav__link--active" for="__toc"> GZIP Streams <span class="md-nav__icon md-icon"></span> </label> <a href="ft2-gzip.html" class="md-nav__link md-nav__link--active"> GZIP Streams </a> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_stream_opengzip" class="md-nav__link"> FT_Stream_OpenGzip </a> </li> <li class="md-nav__item"> <a href="#ft_gzip_uncompress" class="md-nav__link"> FT_Gzip_Uncompress </a> </li> </ul> </nav> </li> <li class="md-nav__item"> <a href="ft2-lzw.html" class="md-nav__link"> LZW Streams </a> </li> <li class="md-nav__item"> <a href="ft2-bzip2.html" class="md-nav__link"> BZIP2 Streams </a> </li> <li class="md-nav__item"> <a href="ft2-debugging_apis.html" class="md-nav__link"> External Debugging APIs </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" > <label class="md-nav__link" for="__nav_9"> Error Codes <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Error Codes" data-md-level="1"> <label class="md-nav__title" for="__nav_9"> <span class="md-nav__icon md-icon"></span> Error Codes </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-error_enumerations.html" class="md-nav__link"> Error Enumerations </a> </li> <li class="md-nav__item"> <a href="ft2-error_code_values.html" class="md-nav__link"> Error Code Values </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" > <label class="md-nav__link" for="__nav_10"> Miscellaneous <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1"> <label class="md-nav__title" for="__nav_10"> <span class="md-nav__icon md-icon"></span> Miscellaneous </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-gx_validation.html" class="md-nav__link"> TrueTypeGX/AAT Validation </a> </li> <li class="md-nav__item"> <a href="ft2-incremental.html" class="md-nav__link"> Incremental Loading </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_engine.html" class="md-nav__link"> The TrueType Engine </a> </li> <li class="md-nav__item"> <a href="ft2-ot_validation.html" class="md-nav__link"> OpenType Validation </a> </li> </ul> </nav> </li> </ul> </nav> </div> </div> </div> <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_stream_opengzip" class="md-nav__link"> FT_Stream_OpenGzip </a> </li> <li class="md-nav__item"> <a href="#ft_gzip_uncompress" class="md-nav__link"> FT_Gzip_Uncompress </a> </li> </ul> </nav> </div> </div> </div> <div class="md-content" data-md-component="content"> <article class="md-content__inner md-typeset"> <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; <a href="index.html#support-api">Support API</a> &raquo; GZIP Streams</p> <hr /> <h1 id="gzip-streams">GZIP Streams<a class="headerlink" href="#gzip-streams" title="Permanent link">&para;</a></h1> <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2> <p>In certain builds of the library, gzip compression recognition is automatically handled when calling <code><a href="ft2-base_interface.html#ft_new_face">FT_New_Face</a></code> or <code><a href="ft2-base_interface.html#ft_open_face">FT_Open_Face</a></code>. This means that if no font driver is capable of handling the raw compressed file, the library will try to open a gzipped stream from it and re-open the face with it.</p> <p>The stream implementation is very basic and resets the decompression process each time seeking backwards is needed within the stream, which significantly undermines the performance.</p> <p>This section contains the declaration of Gzip-specific functions.</p> <h2 id="ft_stream_opengzip">FT_Stream_OpenGzip<a class="headerlink" href="#ft_stream_opengzip" title="Permanent link">&para;</a></h2> <p>Defined in FT_GZIP_H (freetype/ftgzip.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Stream_OpenGzip</b>( <a href="ft2-system_interface.html#ft_stream">FT_Stream</a> stream, <a href="ft2-system_interface.html#ft_stream">FT_Stream</a> source ); </code></pre></div> <p>Open a new stream to parse gzip-compressed font files. This is mainly used to support the compressed <code>*.pcf.gz</code> fonts that come with XFree86.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="stream">stream</td><td class="desc"> <p>The target embedding stream.</p> </td></tr> <tr><td class="val" id="source">source</td><td class="desc"> <p>The source stream.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>The source stream must be opened <em>before</em> calling this function.</p> <p>Calling the internal function <code>FT_Stream_Close</code> on the new stream will <strong>not</strong> call <code>FT_Stream_Close</code> on the source stream. None of the stream objects will be released to the heap.</p> <p>This function may return <code>FT_Err_Unimplemented_Feature</code> if your build of FreeType was not compiled with zlib support.</p> <hr> <h2 id="ft_gzip_uncompress">FT_Gzip_Uncompress<a class="headerlink" href="#ft_gzip_uncompress" title="Permanent link">&para;</a></h2> <p>Defined in FT_GZIP_H (freetype/ftgzip.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Gzip_Uncompress</b>( <a href="ft2-system_interface.html#ft_memory">FT_Memory</a> memory, <a href="ft2-basic_types.html#ft_byte">FT_Byte</a>* output, <a href="ft2-basic_types.html#ft_ulong">FT_ULong</a>* output_len, <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_byte">FT_Byte</a>* input, <a href="ft2-basic_types.html#ft_ulong">FT_ULong</a> input_len ); </code></pre></div> <p>Decompress a zipped input buffer into an output buffer. This function is modeled after zlib's <code>uncompress</code> function.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="memory">memory</td><td class="desc"> <p>A FreeType memory handle.</p> </td></tr> <tr><td class="val" id="input">input</td><td class="desc"> <p>The input buffer.</p> </td></tr> <tr><td class="val" id="input_len">input_len</td><td class="desc"> <p>The length of the input buffer.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="output">output</td><td class="desc"> <p>The output buffer.</p> </td></tr> </table> <h4>inout</h4> <table class="fields"> <tr><td class="val" id="output_len">output_len</td><td class="desc"> <p>Before calling the function, this is the total size of the output buffer, which must be large enough to hold the entire uncompressed data (so the size of the uncompressed data must be known in advance). After calling the function, <code>output_len</code> is the size of the used data in <code>output</code>.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>This function may return <code>FT_Err_Unimplemented_Feature</code> if your build of FreeType was not compiled with zlib support.</p> <h4>since</h4> <p>2.5.1</p> <hr> </article> </div> </div> </main> <footer class="md-footer"> <nav class="md-footer__inner md-grid" aria-label="Footer"> <a href="ft2-module_management.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: Module Management" rel="prev"> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Previous </span> Module Management </div> </div> </a> <a href="ft2-lzw.html" class="md-footer__link md-footer__link--next" aria-label="Next: LZW Streams" rel="next"> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Next </span> LZW Streams </div> </div> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg> </div> </a> </nav> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-footer-copyright"> <div class="md-footer-copyright__highlight"> Copyright 2022 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>. </div> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"base": ".", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "assets/javascripts/workers/search.477d984a.min.js", "version": null}</script> <script src="assets/javascripts/bundle.82b56eb2.min.js"></script> <script src="javascripts/extra.js"></script> </body> </html>
whupdup/frame
real/third_party/freetype-2.12.0/docs/reference/ft2-gzip.html
HTML
gpl-3.0
31,512
<!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="description" content="API Reference Documentation for FreeType-2.12.0"> <meta name="author" content="FreeType Contributors"> <link rel="icon" href="images/favico.ico"> <meta name="generator" content="mkdocs-1.2.1, mkdocs-material-7.1.9"> <title>Header File Macros - FreeType-2.12.0 API Reference</title> <link rel="stylesheet" href="assets/stylesheets/main.ca7ac06f.min.css"> <link rel="stylesheet" href="assets/stylesheets/palette.f1a3b89f.min.css"> <meta name="theme-color" content="#4cae4f"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback"> <style>:root{--md-text-font-family:"Noto Serif";--md-code-font-family:"Roboto Mono"}</style> <link rel="stylesheet" href="stylesheets/extra.css"> </head> <body dir="ltr" data-md-color-scheme="" data-md-color-primary="green" data-md-color-accent="green"> <script>function __prefix(e){return new URL(".",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <label class="md-overlay" for="__drawer"></label> <div data-md-component="skip"> <a href="#header-file-macros" class="md-skip"> Skip to content </a> </div> <div data-md-component="announce"> </div> <header class="md-header" data-md-component="header"> <nav class="md-header__inner md-grid" aria-label="Header"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> <label class="md-header__button md-icon" for="__drawer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg> </label> <div class="md-header__title" data-md-component="header-title"> <div class="md-header__ellipsis"> <div class="md-header__topic"> <span class="md-ellipsis"> FreeType-2.12.0 API Reference </span> </div> <div class="md-header__topic" data-md-component="header-topic"> <span class="md-ellipsis"> Header File Macros </span> </div> </div> </div> <label class="md-header__button md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> </label> <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required> <label class="md-search__icon md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </label> <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg> </button> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" data-md-scrollfix> <div class="md-search-result" data-md-component="search-result"> <div class="md-search-result__meta"> Initializing search </div> <ol class="md-search-result__list"></ol> </div> </div> </div> </div> </div> </nav> </header> <div class="md-container" data-md-component="container"> <main class="md-main" data-md-component="main"> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <label class="md-nav__title" for="__drawer"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> FreeType-2.12.0 API Reference </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="index.html" class="md-nav__link"> TOC </a> </li> <li class="md-nav__item"> <a href="ft2-index.html" class="md-nav__link"> Index </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" > <label class="md-nav__link" for="__nav_3"> General Remarks <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="General Remarks" data-md-level="1"> <label class="md-nav__title" for="__nav_3"> <span class="md-nav__icon md-icon"></span> General Remarks </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-preamble.html" class="md-nav__link"> Preamble </a> </li> <li class="md-nav__item"> <a href="ft2-header_inclusion.html" class="md-nav__link"> FreeType's header inclusion scheme </a> </li> <li class="md-nav__item"> <a href="ft2-user_allocation.html" class="md-nav__link"> User allocation </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--active md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" checked> <label class="md-nav__link" for="__nav_4"> Core API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Core API" data-md-level="1"> <label class="md-nav__title" for="__nav_4"> <span class="md-nav__icon md-icon"></span> Core API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-version.html" class="md-nav__link"> FreeType Version </a> </li> <li class="md-nav__item"> <a href="ft2-basic_types.html" class="md-nav__link"> Basic Data Types </a> </li> <li class="md-nav__item"> <a href="ft2-base_interface.html" class="md-nav__link"> Base Interface </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_variants.html" class="md-nav__link"> Unicode Variation Sequences </a> </li> <li class="md-nav__item"> <a href="ft2-color_management.html" class="md-nav__link"> Glyph Color Management </a> </li> <li class="md-nav__item"> <a href="ft2-layer_management.html" class="md-nav__link"> Glyph Layer Management </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_management.html" class="md-nav__link"> Glyph Management </a> </li> <li class="md-nav__item"> <a href="ft2-mac_specific.html" class="md-nav__link"> Mac Specific Interface </a> </li> <li class="md-nav__item"> <a href="ft2-sizes_management.html" class="md-nav__link"> Size Management </a> </li> <li class="md-nav__item md-nav__item--active"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <label class="md-nav__link md-nav__link--active" for="__toc"> Header File Macros <span class="md-nav__icon md-icon"></span> </label> <a href="ft2-header_file_macros.html" class="md-nav__link md-nav__link--active"> Header File Macros </a> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_config_config_h" class="md-nav__link"> FT_CONFIG_CONFIG_H </a> </li> <li class="md-nav__item"> <a href="#ft_config_standard_library_h" class="md-nav__link"> FT_CONFIG_STANDARD_LIBRARY_H </a> </li> <li class="md-nav__item"> <a href="#ft_config_options_h" class="md-nav__link"> FT_CONFIG_OPTIONS_H </a> </li> <li class="md-nav__item"> <a href="#ft_config_modules_h" class="md-nav__link"> FT_CONFIG_MODULES_H </a> </li> <li class="md-nav__item"> <a href="#ft_freetype_h" class="md-nav__link"> FT_FREETYPE_H </a> </li> <li class="md-nav__item"> <a href="#ft_errors_h" class="md-nav__link"> FT_ERRORS_H </a> </li> <li class="md-nav__item"> <a href="#ft_module_errors_h" class="md-nav__link"> FT_MODULE_ERRORS_H </a> </li> <li class="md-nav__item"> <a href="#ft_system_h" class="md-nav__link"> FT_SYSTEM_H </a> </li> <li class="md-nav__item"> <a href="#ft_image_h" class="md-nav__link"> FT_IMAGE_H </a> </li> <li class="md-nav__item"> <a href="#ft_types_h" class="md-nav__link"> FT_TYPES_H </a> </li> <li class="md-nav__item"> <a href="#ft_list_h" class="md-nav__link"> FT_LIST_H </a> </li> <li class="md-nav__item"> <a href="#ft_outline_h" class="md-nav__link"> FT_OUTLINE_H </a> </li> <li class="md-nav__item"> <a href="#ft_sizes_h" class="md-nav__link"> FT_SIZES_H </a> </li> <li class="md-nav__item"> <a href="#ft_module_h" class="md-nav__link"> FT_MODULE_H </a> </li> <li class="md-nav__item"> <a href="#ft_render_h" class="md-nav__link"> FT_RENDER_H </a> </li> <li class="md-nav__item"> <a href="#ft_driver_h" class="md-nav__link"> FT_DRIVER_H </a> </li> <li class="md-nav__item"> <a href="#ft_autohinter_h" class="md-nav__link"> FT_AUTOHINTER_H </a> </li> <li class="md-nav__item"> <a href="#ft_cff_driver_h" class="md-nav__link"> FT_CFF_DRIVER_H </a> </li> <li class="md-nav__item"> <a href="#ft_truetype_driver_h" class="md-nav__link"> FT_TRUETYPE_DRIVER_H </a> </li> <li class="md-nav__item"> <a href="#ft_pcf_driver_h" class="md-nav__link"> FT_PCF_DRIVER_H </a> </li> <li class="md-nav__item"> <a href="#ft_type1_tables_h" class="md-nav__link"> FT_TYPE1_TABLES_H </a> </li> <li class="md-nav__item"> <a href="#ft_truetype_ids_h" class="md-nav__link"> FT_TRUETYPE_IDS_H </a> </li> <li class="md-nav__item"> <a href="#ft_truetype_tables_h" class="md-nav__link"> FT_TRUETYPE_TABLES_H </a> </li> <li class="md-nav__item"> <a href="#ft_truetype_tags_h" class="md-nav__link"> FT_TRUETYPE_TAGS_H </a> </li> <li class="md-nav__item"> <a href="#ft_bdf_h" class="md-nav__link"> FT_BDF_H </a> </li> <li class="md-nav__item"> <a href="#ft_cid_h" class="md-nav__link"> FT_CID_H </a> </li> <li class="md-nav__item"> <a href="#ft_gzip_h" class="md-nav__link"> FT_GZIP_H </a> </li> <li class="md-nav__item"> <a href="#ft_lzw_h" class="md-nav__link"> FT_LZW_H </a> </li> <li class="md-nav__item"> <a href="#ft_bzip2_h" class="md-nav__link"> FT_BZIP2_H </a> </li> <li class="md-nav__item"> <a href="#ft_winfonts_h" class="md-nav__link"> FT_WINFONTS_H </a> </li> <li class="md-nav__item"> <a href="#ft_glyph_h" class="md-nav__link"> FT_GLYPH_H </a> </li> <li class="md-nav__item"> <a href="#ft_bitmap_h" class="md-nav__link"> FT_BITMAP_H </a> </li> <li class="md-nav__item"> <a href="#ft_bbox_h" class="md-nav__link"> FT_BBOX_H </a> </li> <li class="md-nav__item"> <a href="#ft_cache_h" class="md-nav__link"> FT_CACHE_H </a> </li> <li class="md-nav__item"> <a href="#ft_mac_h" class="md-nav__link"> FT_MAC_H </a> </li> <li class="md-nav__item"> <a href="#ft_multiple_masters_h" class="md-nav__link"> FT_MULTIPLE_MASTERS_H </a> </li> <li class="md-nav__item"> <a href="#ft_sfnt_names_h" class="md-nav__link"> FT_SFNT_NAMES_H </a> </li> <li class="md-nav__item"> <a href="#ft_opentype_validate_h" class="md-nav__link"> FT_OPENTYPE_VALIDATE_H </a> </li> <li class="md-nav__item"> <a href="#ft_gx_validate_h" class="md-nav__link"> FT_GX_VALIDATE_H </a> </li> <li class="md-nav__item"> <a href="#ft_pfr_h" class="md-nav__link"> FT_PFR_H </a> </li> <li class="md-nav__item"> <a href="#ft_stroker_h" class="md-nav__link"> FT_STROKER_H </a> </li> <li class="md-nav__item"> <a href="#ft_synthesis_h" class="md-nav__link"> FT_SYNTHESIS_H </a> </li> <li class="md-nav__item"> <a href="#ft_font_formats_h" class="md-nav__link"> FT_FONT_FORMATS_H </a> </li> <li class="md-nav__item"> <a href="#ft_trigonometry_h" class="md-nav__link"> FT_TRIGONOMETRY_H </a> </li> <li class="md-nav__item"> <a href="#ft_lcd_filter_h" class="md-nav__link"> FT_LCD_FILTER_H </a> </li> <li class="md-nav__item"> <a href="#ft_incremental_h" class="md-nav__link"> FT_INCREMENTAL_H </a> </li> <li class="md-nav__item"> <a href="#ft_gasp_h" class="md-nav__link"> FT_GASP_H </a> </li> <li class="md-nav__item"> <a href="#ft_advances_h" class="md-nav__link"> FT_ADVANCES_H </a> </li> <li class="md-nav__item"> <a href="#ft_color_h" class="md-nav__link"> FT_COLOR_H </a> </li> <li class="md-nav__item"> <a href="#ft_otsvg_h" class="md-nav__link"> FT_OTSVG_H </a> </li> </ul> </nav> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" > <label class="md-nav__link" for="__nav_5"> Format-Specific API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Format-Specific API" data-md-level="1"> <label class="md-nav__title" for="__nav_5"> <span class="md-nav__icon md-icon"></span> Format-Specific API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-multiple_masters.html" class="md-nav__link"> Multiple Masters </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_tables.html" class="md-nav__link"> TrueType Tables </a> </li> <li class="md-nav__item"> <a href="ft2-type1_tables.html" class="md-nav__link"> Type 1 Tables </a> </li> <li class="md-nav__item"> <a href="ft2-sfnt_names.html" class="md-nav__link"> SFNT Names </a> </li> <li class="md-nav__item"> <a href="ft2-bdf_fonts.html" class="md-nav__link"> BDF and PCF Files </a> </li> <li class="md-nav__item"> <a href="ft2-cid_fonts.html" class="md-nav__link"> CID Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-pfr_fonts.html" class="md-nav__link"> PFR Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-winfnt_fonts.html" class="md-nav__link"> Window FNT Files </a> </li> <li class="md-nav__item"> <a href="ft2-svg_fonts.html" class="md-nav__link"> OpenType SVG Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-font_formats.html" class="md-nav__link"> Font Formats </a> </li> <li class="md-nav__item"> <a href="ft2-gasp_table.html" class="md-nav__link"> Gasp Table </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" > <label class="md-nav__link" for="__nav_6"> Controlling FreeType Modules <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Controlling FreeType Modules" data-md-level="1"> <label class="md-nav__title" for="__nav_6"> <span class="md-nav__icon md-icon"></span> Controlling FreeType Modules </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-auto_hinter.html" class="md-nav__link"> The auto-hinter </a> </li> <li class="md-nav__item"> <a href="ft2-cff_driver.html" class="md-nav__link"> The CFF driver </a> </li> <li class="md-nav__item"> <a href="ft2-t1_cid_driver.html" class="md-nav__link"> The Type 1 and CID drivers </a> </li> <li class="md-nav__item"> <a href="ft2-tt_driver.html" class="md-nav__link"> The TrueType driver </a> </li> <li class="md-nav__item"> <a href="ft2-pcf_driver.html" class="md-nav__link"> The PCF driver </a> </li> <li class="md-nav__item"> <a href="ft2-ot_svg_driver.html" class="md-nav__link"> The SVG driver </a> </li> <li class="md-nav__item"> <a href="ft2-properties.html" class="md-nav__link"> Driver properties </a> </li> <li class="md-nav__item"> <a href="ft2-parameter_tags.html" class="md-nav__link"> Parameter Tags </a> </li> <li class="md-nav__item"> <a href="ft2-lcd_rendering.html" class="md-nav__link"> Subpixel Rendering </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" > <label class="md-nav__link" for="__nav_7"> Cache Sub-System <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1"> <label class="md-nav__title" for="__nav_7"> <span class="md-nav__icon md-icon"></span> Cache Sub-System </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-cache_subsystem.html" class="md-nav__link"> Cache Sub-System </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" > <label class="md-nav__link" for="__nav_8"> Support API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Support API" data-md-level="1"> <label class="md-nav__title" for="__nav_8"> <span class="md-nav__icon md-icon"></span> Support API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-computations.html" class="md-nav__link"> Computations </a> </li> <li class="md-nav__item"> <a href="ft2-list_processing.html" class="md-nav__link"> List Processing </a> </li> <li class="md-nav__item"> <a href="ft2-outline_processing.html" class="md-nav__link"> Outline Processing </a> </li> <li class="md-nav__item"> <a href="ft2-quick_advance.html" class="md-nav__link"> Quick retrieval of advance values </a> </li> <li class="md-nav__item"> <a href="ft2-bitmap_handling.html" class="md-nav__link"> Bitmap Handling </a> </li> <li class="md-nav__item"> <a href="ft2-raster.html" class="md-nav__link"> Scanline Converter </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_stroker.html" class="md-nav__link"> Glyph Stroker </a> </li> <li class="md-nav__item"> <a href="ft2-system_interface.html" class="md-nav__link"> System Interface </a> </li> <li class="md-nav__item"> <a href="ft2-module_management.html" class="md-nav__link"> Module Management </a> </li> <li class="md-nav__item"> <a href="ft2-gzip.html" class="md-nav__link"> GZIP Streams </a> </li> <li class="md-nav__item"> <a href="ft2-lzw.html" class="md-nav__link"> LZW Streams </a> </li> <li class="md-nav__item"> <a href="ft2-bzip2.html" class="md-nav__link"> BZIP2 Streams </a> </li> <li class="md-nav__item"> <a href="ft2-debugging_apis.html" class="md-nav__link"> External Debugging APIs </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" > <label class="md-nav__link" for="__nav_9"> Error Codes <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Error Codes" data-md-level="1"> <label class="md-nav__title" for="__nav_9"> <span class="md-nav__icon md-icon"></span> Error Codes </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-error_enumerations.html" class="md-nav__link"> Error Enumerations </a> </li> <li class="md-nav__item"> <a href="ft2-error_code_values.html" class="md-nav__link"> Error Code Values </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" > <label class="md-nav__link" for="__nav_10"> Miscellaneous <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1"> <label class="md-nav__title" for="__nav_10"> <span class="md-nav__icon md-icon"></span> Miscellaneous </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-gx_validation.html" class="md-nav__link"> TrueTypeGX/AAT Validation </a> </li> <li class="md-nav__item"> <a href="ft2-incremental.html" class="md-nav__link"> Incremental Loading </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_engine.html" class="md-nav__link"> The TrueType Engine </a> </li> <li class="md-nav__item"> <a href="ft2-ot_validation.html" class="md-nav__link"> OpenType Validation </a> </li> </ul> </nav> </li> </ul> </nav> </div> </div> </div> <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_config_config_h" class="md-nav__link"> FT_CONFIG_CONFIG_H </a> </li> <li class="md-nav__item"> <a href="#ft_config_standard_library_h" class="md-nav__link"> FT_CONFIG_STANDARD_LIBRARY_H </a> </li> <li class="md-nav__item"> <a href="#ft_config_options_h" class="md-nav__link"> FT_CONFIG_OPTIONS_H </a> </li> <li class="md-nav__item"> <a href="#ft_config_modules_h" class="md-nav__link"> FT_CONFIG_MODULES_H </a> </li> <li class="md-nav__item"> <a href="#ft_freetype_h" class="md-nav__link"> FT_FREETYPE_H </a> </li> <li class="md-nav__item"> <a href="#ft_errors_h" class="md-nav__link"> FT_ERRORS_H </a> </li> <li class="md-nav__item"> <a href="#ft_module_errors_h" class="md-nav__link"> FT_MODULE_ERRORS_H </a> </li> <li class="md-nav__item"> <a href="#ft_system_h" class="md-nav__link"> FT_SYSTEM_H </a> </li> <li class="md-nav__item"> <a href="#ft_image_h" class="md-nav__link"> FT_IMAGE_H </a> </li> <li class="md-nav__item"> <a href="#ft_types_h" class="md-nav__link"> FT_TYPES_H </a> </li> <li class="md-nav__item"> <a href="#ft_list_h" class="md-nav__link"> FT_LIST_H </a> </li> <li class="md-nav__item"> <a href="#ft_outline_h" class="md-nav__link"> FT_OUTLINE_H </a> </li> <li class="md-nav__item"> <a href="#ft_sizes_h" class="md-nav__link"> FT_SIZES_H </a> </li> <li class="md-nav__item"> <a href="#ft_module_h" class="md-nav__link"> FT_MODULE_H </a> </li> <li class="md-nav__item"> <a href="#ft_render_h" class="md-nav__link"> FT_RENDER_H </a> </li> <li class="md-nav__item"> <a href="#ft_driver_h" class="md-nav__link"> FT_DRIVER_H </a> </li> <li class="md-nav__item"> <a href="#ft_autohinter_h" class="md-nav__link"> FT_AUTOHINTER_H </a> </li> <li class="md-nav__item"> <a href="#ft_cff_driver_h" class="md-nav__link"> FT_CFF_DRIVER_H </a> </li> <li class="md-nav__item"> <a href="#ft_truetype_driver_h" class="md-nav__link"> FT_TRUETYPE_DRIVER_H </a> </li> <li class="md-nav__item"> <a href="#ft_pcf_driver_h" class="md-nav__link"> FT_PCF_DRIVER_H </a> </li> <li class="md-nav__item"> <a href="#ft_type1_tables_h" class="md-nav__link"> FT_TYPE1_TABLES_H </a> </li> <li class="md-nav__item"> <a href="#ft_truetype_ids_h" class="md-nav__link"> FT_TRUETYPE_IDS_H </a> </li> <li class="md-nav__item"> <a href="#ft_truetype_tables_h" class="md-nav__link"> FT_TRUETYPE_TABLES_H </a> </li> <li class="md-nav__item"> <a href="#ft_truetype_tags_h" class="md-nav__link"> FT_TRUETYPE_TAGS_H </a> </li> <li class="md-nav__item"> <a href="#ft_bdf_h" class="md-nav__link"> FT_BDF_H </a> </li> <li class="md-nav__item"> <a href="#ft_cid_h" class="md-nav__link"> FT_CID_H </a> </li> <li class="md-nav__item"> <a href="#ft_gzip_h" class="md-nav__link"> FT_GZIP_H </a> </li> <li class="md-nav__item"> <a href="#ft_lzw_h" class="md-nav__link"> FT_LZW_H </a> </li> <li class="md-nav__item"> <a href="#ft_bzip2_h" class="md-nav__link"> FT_BZIP2_H </a> </li> <li class="md-nav__item"> <a href="#ft_winfonts_h" class="md-nav__link"> FT_WINFONTS_H </a> </li> <li class="md-nav__item"> <a href="#ft_glyph_h" class="md-nav__link"> FT_GLYPH_H </a> </li> <li class="md-nav__item"> <a href="#ft_bitmap_h" class="md-nav__link"> FT_BITMAP_H </a> </li> <li class="md-nav__item"> <a href="#ft_bbox_h" class="md-nav__link"> FT_BBOX_H </a> </li> <li class="md-nav__item"> <a href="#ft_cache_h" class="md-nav__link"> FT_CACHE_H </a> </li> <li class="md-nav__item"> <a href="#ft_mac_h" class="md-nav__link"> FT_MAC_H </a> </li> <li class="md-nav__item"> <a href="#ft_multiple_masters_h" class="md-nav__link"> FT_MULTIPLE_MASTERS_H </a> </li> <li class="md-nav__item"> <a href="#ft_sfnt_names_h" class="md-nav__link"> FT_SFNT_NAMES_H </a> </li> <li class="md-nav__item"> <a href="#ft_opentype_validate_h" class="md-nav__link"> FT_OPENTYPE_VALIDATE_H </a> </li> <li class="md-nav__item"> <a href="#ft_gx_validate_h" class="md-nav__link"> FT_GX_VALIDATE_H </a> </li> <li class="md-nav__item"> <a href="#ft_pfr_h" class="md-nav__link"> FT_PFR_H </a> </li> <li class="md-nav__item"> <a href="#ft_stroker_h" class="md-nav__link"> FT_STROKER_H </a> </li> <li class="md-nav__item"> <a href="#ft_synthesis_h" class="md-nav__link"> FT_SYNTHESIS_H </a> </li> <li class="md-nav__item"> <a href="#ft_font_formats_h" class="md-nav__link"> FT_FONT_FORMATS_H </a> </li> <li class="md-nav__item"> <a href="#ft_trigonometry_h" class="md-nav__link"> FT_TRIGONOMETRY_H </a> </li> <li class="md-nav__item"> <a href="#ft_lcd_filter_h" class="md-nav__link"> FT_LCD_FILTER_H </a> </li> <li class="md-nav__item"> <a href="#ft_incremental_h" class="md-nav__link"> FT_INCREMENTAL_H </a> </li> <li class="md-nav__item"> <a href="#ft_gasp_h" class="md-nav__link"> FT_GASP_H </a> </li> <li class="md-nav__item"> <a href="#ft_advances_h" class="md-nav__link"> FT_ADVANCES_H </a> </li> <li class="md-nav__item"> <a href="#ft_color_h" class="md-nav__link"> FT_COLOR_H </a> </li> <li class="md-nav__item"> <a href="#ft_otsvg_h" class="md-nav__link"> FT_OTSVG_H </a> </li> </ul> </nav> </div> </div> </div> <div class="md-content" data-md-component="content"> <article class="md-content__inner md-typeset"> <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; <a href="index.html#core-api">Core API</a> &raquo; Header File Macros</p> <hr /> <h1 id="header-file-macros">Header File Macros<a class="headerlink" href="#header-file-macros" title="Permanent link">&para;</a></h1> <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2> <p>In addition to the normal scheme of including header files like <div class="highlight"><pre><span></span><code> #include &lt;freetype/freetype.h&gt; #include &lt;freetype/ftmm.h&gt; #include &lt;freetype/ftglyph.h&gt; </code></pre></div></p> <p>it is possible to used named macros instead. They can be used directly in <code>#include</code> statements as in <div class="highlight"><pre><span></span><code> #include FT_FREETYPE_H #include FT_MULTIPLE_MASTERS_H #include FT_GLYPH_H </code></pre></div></p> <p>These macros were introduced to overcome the infamous 8.3&nbsp;naming rule required by DOS (and <code>FT_MULTIPLE_MASTERS_H</code> is a lot more meaningful than <code>ftmm.h</code>).</p> <h2 id="ft_config_config_h">FT_CONFIG_CONFIG_H<a class="headerlink" href="#ft_config_config_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">ifndef</span> <b>FT_CONFIG_CONFIG_H</b> #<span class="keyword">define</span> <b>FT_CONFIG_CONFIG_H</b> &lt;freetype/config/ftconfig.h&gt; #<span class="keyword">endif</span> </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing FreeType&nbsp;2 configuration data.</p> <hr> <h2 id="ft_config_standard_library_h">FT_CONFIG_STANDARD_LIBRARY_H<a class="headerlink" href="#ft_config_standard_library_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">ifndef</span> <b>FT_CONFIG_STANDARD_LIBRARY_H</b> #<span class="keyword">define</span> <b>FT_CONFIG_STANDARD_LIBRARY_H</b> &lt;freetype/config/ftstdlib.h&gt; #<span class="keyword">endif</span> </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing FreeType&nbsp;2 interface to the standard C library functions.</p> <hr> <h2 id="ft_config_options_h">FT_CONFIG_OPTIONS_H<a class="headerlink" href="#ft_config_options_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">ifndef</span> <b>FT_CONFIG_OPTIONS_H</b> #<span class="keyword">define</span> <b>FT_CONFIG_OPTIONS_H</b> &lt;freetype/config/ftoption.h&gt; #<span class="keyword">endif</span> </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing FreeType&nbsp;2 project-specific configuration options.</p> <hr> <h2 id="ft_config_modules_h">FT_CONFIG_MODULES_H<a class="headerlink" href="#ft_config_modules_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">ifndef</span> <b>FT_CONFIG_MODULES_H</b> #<span class="keyword">define</span> <b>FT_CONFIG_MODULES_H</b> &lt;freetype/config/ftmodule.h&gt; #<span class="keyword">endif</span> </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing the list of FreeType&nbsp;2 modules that are statically linked to new library instances in <code><a href="ft2-base_interface.html#ft_init_freetype">FT_Init_FreeType</a></code>.</p> <hr> <h2 id="ft_freetype_h">FT_FREETYPE_H<a class="headerlink" href="#ft_freetype_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_FREETYPE_H</b> &lt;freetype/freetype.h&gt; </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing the base FreeType&nbsp;2 API.</p> <hr> <h2 id="ft_errors_h">FT_ERRORS_H<a class="headerlink" href="#ft_errors_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_ERRORS_H</b> &lt;freetype/fterrors.h&gt; </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing the list of FreeType&nbsp;2 error codes (and messages).</p> <p>It is included by <code><a href="ft2-header_file_macros.html#ft_freetype_h">FT_FREETYPE_H</a></code>.</p> <hr> <h2 id="ft_module_errors_h">FT_MODULE_ERRORS_H<a class="headerlink" href="#ft_module_errors_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_MODULE_ERRORS_H</b> &lt;freetype/ftmoderr.h&gt; </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing the list of FreeType&nbsp;2 module error offsets (and messages).</p> <hr> <h2 id="ft_system_h">FT_SYSTEM_H<a class="headerlink" href="#ft_system_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_SYSTEM_H</b> &lt;freetype/ftsystem.h&gt; </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing the FreeType&nbsp;2 interface to low-level operations (i.e., memory management and stream i/o).</p> <p>It is included by <code><a href="ft2-header_file_macros.html#ft_freetype_h">FT_FREETYPE_H</a></code>.</p> <hr> <h2 id="ft_image_h">FT_IMAGE_H<a class="headerlink" href="#ft_image_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_IMAGE_H</b> &lt;freetype/ftimage.h&gt; </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing type definitions related to glyph images (i.e., bitmaps, outlines, scan-converter parameters).</p> <p>It is included by <code><a href="ft2-header_file_macros.html#ft_freetype_h">FT_FREETYPE_H</a></code>.</p> <hr> <h2 id="ft_types_h">FT_TYPES_H<a class="headerlink" href="#ft_types_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_TYPES_H</b> &lt;freetype/fttypes.h&gt; </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing the basic data types defined by FreeType&nbsp;2.</p> <p>It is included by <code><a href="ft2-header_file_macros.html#ft_freetype_h">FT_FREETYPE_H</a></code>.</p> <hr> <h2 id="ft_list_h">FT_LIST_H<a class="headerlink" href="#ft_list_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_LIST_H</b> &lt;freetype/ftlist.h&gt; </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing the list management API of FreeType&nbsp;2.</p> <p>(Most applications will never need to include this file.)</p> <hr> <h2 id="ft_outline_h">FT_OUTLINE_H<a class="headerlink" href="#ft_outline_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_OUTLINE_H</b> &lt;freetype/ftoutln.h&gt; </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing the scalable outline management API of FreeType&nbsp;2.</p> <hr> <h2 id="ft_sizes_h">FT_SIZES_H<a class="headerlink" href="#ft_sizes_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_SIZES_H</b> &lt;freetype/ftsizes.h&gt; </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing the API which manages multiple <code><a href="ft2-base_interface.html#ft_size">FT_Size</a></code> objects per face.</p> <hr> <h2 id="ft_module_h">FT_MODULE_H<a class="headerlink" href="#ft_module_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_MODULE_H</b> &lt;freetype/ftmodapi.h&gt; </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing the module management API of FreeType&nbsp;2.</p> <hr> <h2 id="ft_render_h">FT_RENDER_H<a class="headerlink" href="#ft_render_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_RENDER_H</b> &lt;freetype/ftrender.h&gt; </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing the renderer module management API of FreeType&nbsp;2.</p> <hr> <h2 id="ft_driver_h">FT_DRIVER_H<a class="headerlink" href="#ft_driver_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_DRIVER_H</b> &lt;freetype/ftdriver.h&gt; </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing structures and macros related to the driver modules.</p> <hr> <h2 id="ft_autohinter_h">FT_AUTOHINTER_H<a class="headerlink" href="#ft_autohinter_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_AUTOHINTER_H</b> <a href="ft2-header_file_macros.html#ft_driver_h">FT_DRIVER_H</a> </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing structures and macros related to the auto-hinting module.</p> <p>Deprecated since version&nbsp;2.9; use <code><a href="ft2-header_file_macros.html#ft_driver_h">FT_DRIVER_H</a></code> instead.</p> <hr> <h2 id="ft_cff_driver_h">FT_CFF_DRIVER_H<a class="headerlink" href="#ft_cff_driver_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_CFF_DRIVER_H</b> <a href="ft2-header_file_macros.html#ft_driver_h">FT_DRIVER_H</a> </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing structures and macros related to the CFF driver module.</p> <p>Deprecated since version&nbsp;2.9; use <code><a href="ft2-header_file_macros.html#ft_driver_h">FT_DRIVER_H</a></code> instead.</p> <hr> <h2 id="ft_truetype_driver_h">FT_TRUETYPE_DRIVER_H<a class="headerlink" href="#ft_truetype_driver_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_TRUETYPE_DRIVER_H</b> <a href="ft2-header_file_macros.html#ft_driver_h">FT_DRIVER_H</a> </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing structures and macros related to the TrueType driver module.</p> <p>Deprecated since version&nbsp;2.9; use <code><a href="ft2-header_file_macros.html#ft_driver_h">FT_DRIVER_H</a></code> instead.</p> <hr> <h2 id="ft_pcf_driver_h">FT_PCF_DRIVER_H<a class="headerlink" href="#ft_pcf_driver_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_PCF_DRIVER_H</b> <a href="ft2-header_file_macros.html#ft_driver_h">FT_DRIVER_H</a> </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing structures and macros related to the PCF driver module.</p> <p>Deprecated since version&nbsp;2.9; use <code><a href="ft2-header_file_macros.html#ft_driver_h">FT_DRIVER_H</a></code> instead.</p> <hr> <h2 id="ft_type1_tables_h">FT_TYPE1_TABLES_H<a class="headerlink" href="#ft_type1_tables_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_TYPE1_TABLES_H</b> &lt;freetype/t1tables.h&gt; </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing the types and API specific to the Type&nbsp;1 format.</p> <hr> <h2 id="ft_truetype_ids_h">FT_TRUETYPE_IDS_H<a class="headerlink" href="#ft_truetype_ids_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_TRUETYPE_IDS_H</b> &lt;freetype/ttnameid.h&gt; </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing the enumeration values which identify name strings, languages, encodings, etc. This file really contains a <em>large</em> set of constant macro definitions, taken from the TrueType and OpenType specifications.</p> <hr> <h2 id="ft_truetype_tables_h">FT_TRUETYPE_TABLES_H<a class="headerlink" href="#ft_truetype_tables_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_TRUETYPE_TABLES_H</b> &lt;freetype/tttables.h&gt; </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing the types and API specific to the TrueType (as well as OpenType) format.</p> <hr> <h2 id="ft_truetype_tags_h">FT_TRUETYPE_TAGS_H<a class="headerlink" href="#ft_truetype_tags_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_TRUETYPE_TAGS_H</b> &lt;freetype/tttags.h&gt; </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing the definitions of TrueType four-byte &lsquo;tags&rsquo; which identify blocks in SFNT-based font formats (i.e., TrueType and OpenType).</p> <hr> <h2 id="ft_bdf_h">FT_BDF_H<a class="headerlink" href="#ft_bdf_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_BDF_H</b> &lt;freetype/ftbdf.h&gt; </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing the definitions of an API which accesses BDF-specific strings from a face.</p> <hr> <h2 id="ft_cid_h">FT_CID_H<a class="headerlink" href="#ft_cid_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_CID_H</b> &lt;freetype/ftcid.h&gt; </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing the definitions of an API which access CID font information from a face.</p> <hr> <h2 id="ft_gzip_h">FT_GZIP_H<a class="headerlink" href="#ft_gzip_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_GZIP_H</b> &lt;freetype/ftgzip.h&gt; </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing the definitions of an API which supports gzip-compressed files.</p> <hr> <h2 id="ft_lzw_h">FT_LZW_H<a class="headerlink" href="#ft_lzw_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_LZW_H</b> &lt;freetype/ftlzw.h&gt; </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing the definitions of an API which supports LZW-compressed files.</p> <hr> <h2 id="ft_bzip2_h">FT_BZIP2_H<a class="headerlink" href="#ft_bzip2_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_BZIP2_H</b> &lt;freetype/ftbzip2.h&gt; </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing the definitions of an API which supports bzip2-compressed files.</p> <hr> <h2 id="ft_winfonts_h">FT_WINFONTS_H<a class="headerlink" href="#ft_winfonts_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_WINFONTS_H</b> &lt;freetype/ftwinfnt.h&gt; </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing the definitions of an API which supports Windows FNT files.</p> <hr> <h2 id="ft_glyph_h">FT_GLYPH_H<a class="headerlink" href="#ft_glyph_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_GLYPH_H</b> &lt;freetype/ftglyph.h&gt; </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing the API of the optional glyph management component.</p> <hr> <h2 id="ft_bitmap_h">FT_BITMAP_H<a class="headerlink" href="#ft_bitmap_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_BITMAP_H</b> &lt;freetype/ftbitmap.h&gt; </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing the API of the optional bitmap conversion component.</p> <hr> <h2 id="ft_bbox_h">FT_BBOX_H<a class="headerlink" href="#ft_bbox_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_BBOX_H</b> &lt;freetype/ftbbox.h&gt; </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing the API of the optional exact bounding box computation routines.</p> <hr> <h2 id="ft_cache_h">FT_CACHE_H<a class="headerlink" href="#ft_cache_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_CACHE_H</b> &lt;freetype/ftcache.h&gt; </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing the API of the optional FreeType&nbsp;2 cache sub-system.</p> <hr> <h2 id="ft_mac_h">FT_MAC_H<a class="headerlink" href="#ft_mac_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_MAC_H</b> &lt;freetype/ftmac.h&gt; </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing the Macintosh-specific FreeType&nbsp;2 API. The latter is used to access fonts embedded in resource forks.</p> <p>This header file must be explicitly included by client applications compiled on the Mac (note that the base API still works though).</p> <hr> <h2 id="ft_multiple_masters_h">FT_MULTIPLE_MASTERS_H<a class="headerlink" href="#ft_multiple_masters_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_MULTIPLE_MASTERS_H</b> &lt;freetype/ftmm.h&gt; </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing the optional multiple-masters management API of FreeType&nbsp;2.</p> <hr> <h2 id="ft_sfnt_names_h">FT_SFNT_NAMES_H<a class="headerlink" href="#ft_sfnt_names_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_SFNT_NAMES_H</b> &lt;freetype/ftsnames.h&gt; </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing the optional FreeType&nbsp;2 API which accesses embedded &lsquo;name&rsquo; strings in SFNT-based font formats (i.e., TrueType and OpenType).</p> <hr> <h2 id="ft_opentype_validate_h">FT_OPENTYPE_VALIDATE_H<a class="headerlink" href="#ft_opentype_validate_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_OPENTYPE_VALIDATE_H</b> &lt;freetype/ftotval.h&gt; </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing the optional FreeType&nbsp;2 API which validates OpenType tables (&lsquo;BASE&rsquo;, &lsquo;GDEF&rsquo;, &lsquo;GPOS&rsquo;, &lsquo;GSUB&rsquo;, &lsquo;JSTF&rsquo;).</p> <hr> <h2 id="ft_gx_validate_h">FT_GX_VALIDATE_H<a class="headerlink" href="#ft_gx_validate_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_GX_VALIDATE_H</b> &lt;freetype/ftgxval.h&gt; </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing the optional FreeType&nbsp;2 API which validates TrueTypeGX/AAT tables (&lsquo;feat&rsquo;, &lsquo;mort&rsquo;, &lsquo;morx&rsquo;, &lsquo;bsln&rsquo;, &lsquo;just&rsquo;, &lsquo;kern&rsquo;, &lsquo;opbd&rsquo;, &lsquo;trak&rsquo;, &lsquo;prop&rsquo;).</p> <hr> <h2 id="ft_pfr_h">FT_PFR_H<a class="headerlink" href="#ft_pfr_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_PFR_H</b> &lt;freetype/ftpfr.h&gt; </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing the FreeType&nbsp;2 API which accesses PFR-specific data.</p> <hr> <h2 id="ft_stroker_h">FT_STROKER_H<a class="headerlink" href="#ft_stroker_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_STROKER_H</b> &lt;freetype/ftstroke.h&gt; </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing the FreeType&nbsp;2 API which provides functions to stroke outline paths.</p> <hr> <h2 id="ft_synthesis_h">FT_SYNTHESIS_H<a class="headerlink" href="#ft_synthesis_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_SYNTHESIS_H</b> &lt;freetype/ftsynth.h&gt; </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing the FreeType&nbsp;2 API which performs artificial obliquing and emboldening.</p> <hr> <h2 id="ft_font_formats_h">FT_FONT_FORMATS_H<a class="headerlink" href="#ft_font_formats_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_FONT_FORMATS_H</b> &lt;freetype/ftfntfmt.h&gt; /* deprecated */ #<span class="keyword">define</span> FT_XFREE86_H <b>FT_FONT_FORMATS_H</b> </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing the FreeType&nbsp;2 API which provides functions specific to font formats.</p> <hr> <h2 id="ft_trigonometry_h">FT_TRIGONOMETRY_H<a class="headerlink" href="#ft_trigonometry_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_TRIGONOMETRY_H</b> &lt;freetype/fttrigon.h&gt; </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing the FreeType&nbsp;2 API which performs trigonometric computations (e.g., cosines and arc tangents).</p> <hr> <h2 id="ft_lcd_filter_h">FT_LCD_FILTER_H<a class="headerlink" href="#ft_lcd_filter_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_LCD_FILTER_H</b> &lt;freetype/ftlcdfil.h&gt; </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing the FreeType&nbsp;2 API which performs color filtering for subpixel rendering.</p> <hr> <h2 id="ft_incremental_h">FT_INCREMENTAL_H<a class="headerlink" href="#ft_incremental_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_INCREMENTAL_H</b> &lt;freetype/ftincrem.h&gt; </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing the FreeType&nbsp;2 API which performs incremental glyph loading.</p> <hr> <h2 id="ft_gasp_h">FT_GASP_H<a class="headerlink" href="#ft_gasp_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_GASP_H</b> &lt;freetype/ftgasp.h&gt; </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing the FreeType&nbsp;2 API which returns entries from the TrueType GASP table.</p> <hr> <h2 id="ft_advances_h">FT_ADVANCES_H<a class="headerlink" href="#ft_advances_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_ADVANCES_H</b> &lt;freetype/ftadvanc.h&gt; </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing the FreeType&nbsp;2 API which returns individual and ranged glyph advances.</p> <hr> <h2 id="ft_color_h">FT_COLOR_H<a class="headerlink" href="#ft_color_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_COLOR_H</b> &lt;freetype/ftcolor.h&gt; </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing the FreeType&nbsp;2 API which handles the OpenType &lsquo;CPAL&rsquo; table.</p> <hr> <h2 id="ft_otsvg_h">FT_OTSVG_H<a class="headerlink" href="#ft_otsvg_h" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_OTSVG_H</b> &lt;freetype/otsvg.h&gt; </code></pre></div> <p>A macro used in <code>#include</code> statements to name the file containing the FreeType&nbsp;2 API which handles the OpenType &lsquo;SVG&nbsp;&rsquo; glyphs.</p> <hr> </article> </div> </div> </main> <footer class="md-footer"> <nav class="md-footer__inner md-grid" aria-label="Footer"> <a href="ft2-sizes_management.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: Size Management" rel="prev"> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Previous </span> Size Management </div> </div> </a> <a href="ft2-multiple_masters.html" class="md-footer__link md-footer__link--next" aria-label="Next: Multiple Masters" rel="next"> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Next </span> Multiple Masters </div> </div> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg> </div> </a> </nav> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-footer-copyright"> <div class="md-footer-copyright__highlight"> Copyright 2022 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>. </div> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"base": ".", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "assets/javascripts/workers/search.477d984a.min.js", "version": null}</script> <script src="assets/javascripts/bundle.82b56eb2.min.js"></script> <script src="javascripts/extra.js"></script> </body> </html>
whupdup/frame
real/third_party/freetype-2.12.0/docs/reference/ft2-header_file_macros.html
HTML
gpl-3.0
63,597
<!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="description" content="API Reference Documentation for FreeType-2.12.0"> <meta name="author" content="FreeType Contributors"> <link rel="icon" href="images/favico.ico"> <meta name="generator" content="mkdocs-1.2.1, mkdocs-material-7.1.9"> <title>FreeType's header inclusion scheme - FreeType-2.12.0 API Reference</title> <link rel="stylesheet" href="assets/stylesheets/main.ca7ac06f.min.css"> <link rel="stylesheet" href="assets/stylesheets/palette.f1a3b89f.min.css"> <meta name="theme-color" content="#4cae4f"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback"> <style>:root{--md-text-font-family:"Noto Serif";--md-code-font-family:"Roboto Mono"}</style> <link rel="stylesheet" href="stylesheets/extra.css"> </head> <body dir="ltr" data-md-color-scheme="" data-md-color-primary="green" data-md-color-accent="green"> <script>function __prefix(e){return new URL(".",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <label class="md-overlay" for="__drawer"></label> <div data-md-component="skip"> <a href="#freetypes-header-inclusion-scheme" class="md-skip"> Skip to content </a> </div> <div data-md-component="announce"> </div> <header class="md-header" data-md-component="header"> <nav class="md-header__inner md-grid" aria-label="Header"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> <label class="md-header__button md-icon" for="__drawer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg> </label> <div class="md-header__title" data-md-component="header-title"> <div class="md-header__ellipsis"> <div class="md-header__topic"> <span class="md-ellipsis"> FreeType-2.12.0 API Reference </span> </div> <div class="md-header__topic" data-md-component="header-topic"> <span class="md-ellipsis"> FreeType's header inclusion scheme </span> </div> </div> </div> <label class="md-header__button md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> </label> <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required> <label class="md-search__icon md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </label> <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg> </button> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" data-md-scrollfix> <div class="md-search-result" data-md-component="search-result"> <div class="md-search-result__meta"> Initializing search </div> <ol class="md-search-result__list"></ol> </div> </div> </div> </div> </div> </nav> </header> <div class="md-container" data-md-component="container"> <main class="md-main" data-md-component="main"> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <label class="md-nav__title" for="__drawer"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> FreeType-2.12.0 API Reference </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="index.html" class="md-nav__link"> TOC </a> </li> <li class="md-nav__item"> <a href="ft2-index.html" class="md-nav__link"> Index </a> </li> <li class="md-nav__item md-nav__item--active md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" checked> <label class="md-nav__link" for="__nav_3"> General Remarks <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="General Remarks" data-md-level="1"> <label class="md-nav__title" for="__nav_3"> <span class="md-nav__icon md-icon"></span> General Remarks </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-preamble.html" class="md-nav__link"> Preamble </a> </li> <li class="md-nav__item md-nav__item--active"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <label class="md-nav__link md-nav__link--active" for="__toc"> FreeType's header inclusion scheme <span class="md-nav__icon md-icon"></span> </label> <a href="ft2-header_inclusion.html" class="md-nav__link md-nav__link--active"> FreeType's header inclusion scheme </a> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> </ul> </nav> </li> <li class="md-nav__item"> <a href="ft2-user_allocation.html" class="md-nav__link"> User allocation </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" > <label class="md-nav__link" for="__nav_4"> Core API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Core API" data-md-level="1"> <label class="md-nav__title" for="__nav_4"> <span class="md-nav__icon md-icon"></span> Core API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-version.html" class="md-nav__link"> FreeType Version </a> </li> <li class="md-nav__item"> <a href="ft2-basic_types.html" class="md-nav__link"> Basic Data Types </a> </li> <li class="md-nav__item"> <a href="ft2-base_interface.html" class="md-nav__link"> Base Interface </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_variants.html" class="md-nav__link"> Unicode Variation Sequences </a> </li> <li class="md-nav__item"> <a href="ft2-color_management.html" class="md-nav__link"> Glyph Color Management </a> </li> <li class="md-nav__item"> <a href="ft2-layer_management.html" class="md-nav__link"> Glyph Layer Management </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_management.html" class="md-nav__link"> Glyph Management </a> </li> <li class="md-nav__item"> <a href="ft2-mac_specific.html" class="md-nav__link"> Mac Specific Interface </a> </li> <li class="md-nav__item"> <a href="ft2-sizes_management.html" class="md-nav__link"> Size Management </a> </li> <li class="md-nav__item"> <a href="ft2-header_file_macros.html" class="md-nav__link"> Header File Macros </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" > <label class="md-nav__link" for="__nav_5"> Format-Specific API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Format-Specific API" data-md-level="1"> <label class="md-nav__title" for="__nav_5"> <span class="md-nav__icon md-icon"></span> Format-Specific API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-multiple_masters.html" class="md-nav__link"> Multiple Masters </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_tables.html" class="md-nav__link"> TrueType Tables </a> </li> <li class="md-nav__item"> <a href="ft2-type1_tables.html" class="md-nav__link"> Type 1 Tables </a> </li> <li class="md-nav__item"> <a href="ft2-sfnt_names.html" class="md-nav__link"> SFNT Names </a> </li> <li class="md-nav__item"> <a href="ft2-bdf_fonts.html" class="md-nav__link"> BDF and PCF Files </a> </li> <li class="md-nav__item"> <a href="ft2-cid_fonts.html" class="md-nav__link"> CID Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-pfr_fonts.html" class="md-nav__link"> PFR Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-winfnt_fonts.html" class="md-nav__link"> Window FNT Files </a> </li> <li class="md-nav__item"> <a href="ft2-svg_fonts.html" class="md-nav__link"> OpenType SVG Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-font_formats.html" class="md-nav__link"> Font Formats </a> </li> <li class="md-nav__item"> <a href="ft2-gasp_table.html" class="md-nav__link"> Gasp Table </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" > <label class="md-nav__link" for="__nav_6"> Controlling FreeType Modules <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Controlling FreeType Modules" data-md-level="1"> <label class="md-nav__title" for="__nav_6"> <span class="md-nav__icon md-icon"></span> Controlling FreeType Modules </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-auto_hinter.html" class="md-nav__link"> The auto-hinter </a> </li> <li class="md-nav__item"> <a href="ft2-cff_driver.html" class="md-nav__link"> The CFF driver </a> </li> <li class="md-nav__item"> <a href="ft2-t1_cid_driver.html" class="md-nav__link"> The Type 1 and CID drivers </a> </li> <li class="md-nav__item"> <a href="ft2-tt_driver.html" class="md-nav__link"> The TrueType driver </a> </li> <li class="md-nav__item"> <a href="ft2-pcf_driver.html" class="md-nav__link"> The PCF driver </a> </li> <li class="md-nav__item"> <a href="ft2-ot_svg_driver.html" class="md-nav__link"> The SVG driver </a> </li> <li class="md-nav__item"> <a href="ft2-properties.html" class="md-nav__link"> Driver properties </a> </li> <li class="md-nav__item"> <a href="ft2-parameter_tags.html" class="md-nav__link"> Parameter Tags </a> </li> <li class="md-nav__item"> <a href="ft2-lcd_rendering.html" class="md-nav__link"> Subpixel Rendering </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" > <label class="md-nav__link" for="__nav_7"> Cache Sub-System <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1"> <label class="md-nav__title" for="__nav_7"> <span class="md-nav__icon md-icon"></span> Cache Sub-System </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-cache_subsystem.html" class="md-nav__link"> Cache Sub-System </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" > <label class="md-nav__link" for="__nav_8"> Support API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Support API" data-md-level="1"> <label class="md-nav__title" for="__nav_8"> <span class="md-nav__icon md-icon"></span> Support API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-computations.html" class="md-nav__link"> Computations </a> </li> <li class="md-nav__item"> <a href="ft2-list_processing.html" class="md-nav__link"> List Processing </a> </li> <li class="md-nav__item"> <a href="ft2-outline_processing.html" class="md-nav__link"> Outline Processing </a> </li> <li class="md-nav__item"> <a href="ft2-quick_advance.html" class="md-nav__link"> Quick retrieval of advance values </a> </li> <li class="md-nav__item"> <a href="ft2-bitmap_handling.html" class="md-nav__link"> Bitmap Handling </a> </li> <li class="md-nav__item"> <a href="ft2-raster.html" class="md-nav__link"> Scanline Converter </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_stroker.html" class="md-nav__link"> Glyph Stroker </a> </li> <li class="md-nav__item"> <a href="ft2-system_interface.html" class="md-nav__link"> System Interface </a> </li> <li class="md-nav__item"> <a href="ft2-module_management.html" class="md-nav__link"> Module Management </a> </li> <li class="md-nav__item"> <a href="ft2-gzip.html" class="md-nav__link"> GZIP Streams </a> </li> <li class="md-nav__item"> <a href="ft2-lzw.html" class="md-nav__link"> LZW Streams </a> </li> <li class="md-nav__item"> <a href="ft2-bzip2.html" class="md-nav__link"> BZIP2 Streams </a> </li> <li class="md-nav__item"> <a href="ft2-debugging_apis.html" class="md-nav__link"> External Debugging APIs </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" > <label class="md-nav__link" for="__nav_9"> Error Codes <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Error Codes" data-md-level="1"> <label class="md-nav__title" for="__nav_9"> <span class="md-nav__icon md-icon"></span> Error Codes </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-error_enumerations.html" class="md-nav__link"> Error Enumerations </a> </li> <li class="md-nav__item"> <a href="ft2-error_code_values.html" class="md-nav__link"> Error Code Values </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" > <label class="md-nav__link" for="__nav_10"> Miscellaneous <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1"> <label class="md-nav__title" for="__nav_10"> <span class="md-nav__icon md-icon"></span> Miscellaneous </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-gx_validation.html" class="md-nav__link"> TrueTypeGX/AAT Validation </a> </li> <li class="md-nav__item"> <a href="ft2-incremental.html" class="md-nav__link"> Incremental Loading </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_engine.html" class="md-nav__link"> The TrueType Engine </a> </li> <li class="md-nav__item"> <a href="ft2-ot_validation.html" class="md-nav__link"> OpenType Validation </a> </li> </ul> </nav> </li> </ul> </nav> </div> </div> </div> <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> </ul> </nav> </div> </div> </div> <div class="md-content" data-md-component="content"> <article class="md-content__inner md-typeset"> <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; <a href="index.html#general-remarks">General Remarks</a> &raquo; FreeType's header inclusion scheme</p> <hr /> <h1 id="freetypes-header-inclusion-scheme">FreeType's header inclusion scheme<a class="headerlink" href="#freetypes-header-inclusion-scheme" title="Permanent link">&para;</a></h1> <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2> <p>To be as flexible as possible (and for historical reasons), you must load file <code>ft2build.h</code> first before other header files, for example <div class="highlight"><pre><span></span><code> #include &lt;ft2build.h&gt; #include &lt;freetype/freetype.h&gt; #include &lt;freetype/ftoutln.h&gt; </code></pre></div></p> </article> </div> </div> </main> <footer class="md-footer"> <nav class="md-footer__inner md-grid" aria-label="Footer"> <a href="ft2-preamble.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: Preamble" rel="prev"> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Previous </span> Preamble </div> </div> </a> <a href="ft2-user_allocation.html" class="md-footer__link md-footer__link--next" aria-label="Next: User allocation" rel="next"> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Next </span> User allocation </div> </div> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg> </div> </a> </nav> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-footer-copyright"> <div class="md-footer-copyright__highlight"> Copyright 2022 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>. </div> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"base": ".", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "assets/javascripts/workers/search.477d984a.min.js", "version": null}</script> <script src="assets/javascripts/bundle.82b56eb2.min.js"></script> <script src="javascripts/extra.js"></script> </body> </html>
whupdup/frame
real/third_party/freetype-2.12.0/docs/reference/ft2-header_inclusion.html
HTML
gpl-3.0
27,199
<!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="description" content="API Reference Documentation for FreeType-2.12.0"> <meta name="author" content="FreeType Contributors"> <link rel="icon" href="images/favico.ico"> <meta name="generator" content="mkdocs-1.2.1, mkdocs-material-7.1.9"> <title>Incremental Loading - FreeType-2.12.0 API Reference</title> <link rel="stylesheet" href="assets/stylesheets/main.ca7ac06f.min.css"> <link rel="stylesheet" href="assets/stylesheets/palette.f1a3b89f.min.css"> <meta name="theme-color" content="#4cae4f"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback"> <style>:root{--md-text-font-family:"Noto Serif";--md-code-font-family:"Roboto Mono"}</style> <link rel="stylesheet" href="stylesheets/extra.css"> </head> <body dir="ltr" data-md-color-scheme="" data-md-color-primary="green" data-md-color-accent="green"> <script>function __prefix(e){return new URL(".",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <label class="md-overlay" for="__drawer"></label> <div data-md-component="skip"> <a href="#incremental-loading" class="md-skip"> Skip to content </a> </div> <div data-md-component="announce"> </div> <header class="md-header" data-md-component="header"> <nav class="md-header__inner md-grid" aria-label="Header"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> <label class="md-header__button md-icon" for="__drawer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg> </label> <div class="md-header__title" data-md-component="header-title"> <div class="md-header__ellipsis"> <div class="md-header__topic"> <span class="md-ellipsis"> FreeType-2.12.0 API Reference </span> </div> <div class="md-header__topic" data-md-component="header-topic"> <span class="md-ellipsis"> Incremental Loading </span> </div> </div> </div> <label class="md-header__button md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> </label> <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required> <label class="md-search__icon md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </label> <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg> </button> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" data-md-scrollfix> <div class="md-search-result" data-md-component="search-result"> <div class="md-search-result__meta"> Initializing search </div> <ol class="md-search-result__list"></ol> </div> </div> </div> </div> </div> </nav> </header> <div class="md-container" data-md-component="container"> <main class="md-main" data-md-component="main"> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <label class="md-nav__title" for="__drawer"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> FreeType-2.12.0 API Reference </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="index.html" class="md-nav__link"> TOC </a> </li> <li class="md-nav__item"> <a href="ft2-index.html" class="md-nav__link"> Index </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" > <label class="md-nav__link" for="__nav_3"> General Remarks <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="General Remarks" data-md-level="1"> <label class="md-nav__title" for="__nav_3"> <span class="md-nav__icon md-icon"></span> General Remarks </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-preamble.html" class="md-nav__link"> Preamble </a> </li> <li class="md-nav__item"> <a href="ft2-header_inclusion.html" class="md-nav__link"> FreeType's header inclusion scheme </a> </li> <li class="md-nav__item"> <a href="ft2-user_allocation.html" class="md-nav__link"> User allocation </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" > <label class="md-nav__link" for="__nav_4"> Core API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Core API" data-md-level="1"> <label class="md-nav__title" for="__nav_4"> <span class="md-nav__icon md-icon"></span> Core API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-version.html" class="md-nav__link"> FreeType Version </a> </li> <li class="md-nav__item"> <a href="ft2-basic_types.html" class="md-nav__link"> Basic Data Types </a> </li> <li class="md-nav__item"> <a href="ft2-base_interface.html" class="md-nav__link"> Base Interface </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_variants.html" class="md-nav__link"> Unicode Variation Sequences </a> </li> <li class="md-nav__item"> <a href="ft2-color_management.html" class="md-nav__link"> Glyph Color Management </a> </li> <li class="md-nav__item"> <a href="ft2-layer_management.html" class="md-nav__link"> Glyph Layer Management </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_management.html" class="md-nav__link"> Glyph Management </a> </li> <li class="md-nav__item"> <a href="ft2-mac_specific.html" class="md-nav__link"> Mac Specific Interface </a> </li> <li class="md-nav__item"> <a href="ft2-sizes_management.html" class="md-nav__link"> Size Management </a> </li> <li class="md-nav__item"> <a href="ft2-header_file_macros.html" class="md-nav__link"> Header File Macros </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" > <label class="md-nav__link" for="__nav_5"> Format-Specific API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Format-Specific API" data-md-level="1"> <label class="md-nav__title" for="__nav_5"> <span class="md-nav__icon md-icon"></span> Format-Specific API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-multiple_masters.html" class="md-nav__link"> Multiple Masters </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_tables.html" class="md-nav__link"> TrueType Tables </a> </li> <li class="md-nav__item"> <a href="ft2-type1_tables.html" class="md-nav__link"> Type 1 Tables </a> </li> <li class="md-nav__item"> <a href="ft2-sfnt_names.html" class="md-nav__link"> SFNT Names </a> </li> <li class="md-nav__item"> <a href="ft2-bdf_fonts.html" class="md-nav__link"> BDF and PCF Files </a> </li> <li class="md-nav__item"> <a href="ft2-cid_fonts.html" class="md-nav__link"> CID Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-pfr_fonts.html" class="md-nav__link"> PFR Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-winfnt_fonts.html" class="md-nav__link"> Window FNT Files </a> </li> <li class="md-nav__item"> <a href="ft2-svg_fonts.html" class="md-nav__link"> OpenType SVG Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-font_formats.html" class="md-nav__link"> Font Formats </a> </li> <li class="md-nav__item"> <a href="ft2-gasp_table.html" class="md-nav__link"> Gasp Table </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" > <label class="md-nav__link" for="__nav_6"> Controlling FreeType Modules <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Controlling FreeType Modules" data-md-level="1"> <label class="md-nav__title" for="__nav_6"> <span class="md-nav__icon md-icon"></span> Controlling FreeType Modules </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-auto_hinter.html" class="md-nav__link"> The auto-hinter </a> </li> <li class="md-nav__item"> <a href="ft2-cff_driver.html" class="md-nav__link"> The CFF driver </a> </li> <li class="md-nav__item"> <a href="ft2-t1_cid_driver.html" class="md-nav__link"> The Type 1 and CID drivers </a> </li> <li class="md-nav__item"> <a href="ft2-tt_driver.html" class="md-nav__link"> The TrueType driver </a> </li> <li class="md-nav__item"> <a href="ft2-pcf_driver.html" class="md-nav__link"> The PCF driver </a> </li> <li class="md-nav__item"> <a href="ft2-ot_svg_driver.html" class="md-nav__link"> The SVG driver </a> </li> <li class="md-nav__item"> <a href="ft2-properties.html" class="md-nav__link"> Driver properties </a> </li> <li class="md-nav__item"> <a href="ft2-parameter_tags.html" class="md-nav__link"> Parameter Tags </a> </li> <li class="md-nav__item"> <a href="ft2-lcd_rendering.html" class="md-nav__link"> Subpixel Rendering </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" > <label class="md-nav__link" for="__nav_7"> Cache Sub-System <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1"> <label class="md-nav__title" for="__nav_7"> <span class="md-nav__icon md-icon"></span> Cache Sub-System </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-cache_subsystem.html" class="md-nav__link"> Cache Sub-System </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" > <label class="md-nav__link" for="__nav_8"> Support API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Support API" data-md-level="1"> <label class="md-nav__title" for="__nav_8"> <span class="md-nav__icon md-icon"></span> Support API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-computations.html" class="md-nav__link"> Computations </a> </li> <li class="md-nav__item"> <a href="ft2-list_processing.html" class="md-nav__link"> List Processing </a> </li> <li class="md-nav__item"> <a href="ft2-outline_processing.html" class="md-nav__link"> Outline Processing </a> </li> <li class="md-nav__item"> <a href="ft2-quick_advance.html" class="md-nav__link"> Quick retrieval of advance values </a> </li> <li class="md-nav__item"> <a href="ft2-bitmap_handling.html" class="md-nav__link"> Bitmap Handling </a> </li> <li class="md-nav__item"> <a href="ft2-raster.html" class="md-nav__link"> Scanline Converter </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_stroker.html" class="md-nav__link"> Glyph Stroker </a> </li> <li class="md-nav__item"> <a href="ft2-system_interface.html" class="md-nav__link"> System Interface </a> </li> <li class="md-nav__item"> <a href="ft2-module_management.html" class="md-nav__link"> Module Management </a> </li> <li class="md-nav__item"> <a href="ft2-gzip.html" class="md-nav__link"> GZIP Streams </a> </li> <li class="md-nav__item"> <a href="ft2-lzw.html" class="md-nav__link"> LZW Streams </a> </li> <li class="md-nav__item"> <a href="ft2-bzip2.html" class="md-nav__link"> BZIP2 Streams </a> </li> <li class="md-nav__item"> <a href="ft2-debugging_apis.html" class="md-nav__link"> External Debugging APIs </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" > <label class="md-nav__link" for="__nav_9"> Error Codes <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Error Codes" data-md-level="1"> <label class="md-nav__title" for="__nav_9"> <span class="md-nav__icon md-icon"></span> Error Codes </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-error_enumerations.html" class="md-nav__link"> Error Enumerations </a> </li> <li class="md-nav__item"> <a href="ft2-error_code_values.html" class="md-nav__link"> Error Code Values </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--active md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" checked> <label class="md-nav__link" for="__nav_10"> Miscellaneous <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1"> <label class="md-nav__title" for="__nav_10"> <span class="md-nav__icon md-icon"></span> Miscellaneous </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-gx_validation.html" class="md-nav__link"> TrueTypeGX/AAT Validation </a> </li> <li class="md-nav__item md-nav__item--active"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <label class="md-nav__link md-nav__link--active" for="__toc"> Incremental Loading <span class="md-nav__icon md-icon"></span> </label> <a href="ft2-incremental.html" class="md-nav__link md-nav__link--active"> Incremental Loading </a> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_incremental" class="md-nav__link"> FT_Incremental </a> </li> <li class="md-nav__item"> <a href="#ft_incremental_metricsrec" class="md-nav__link"> FT_Incremental_MetricsRec </a> </li> <li class="md-nav__item"> <a href="#ft_incremental_metrics" class="md-nav__link"> FT_Incremental_Metrics </a> </li> <li class="md-nav__item"> <a href="#ft_incremental_getglyphdatafunc" class="md-nav__link"> FT_Incremental_GetGlyphDataFunc </a> </li> <li class="md-nav__item"> <a href="#ft_incremental_freeglyphdatafunc" class="md-nav__link"> FT_Incremental_FreeGlyphDataFunc </a> </li> <li class="md-nav__item"> <a href="#ft_incremental_getglyphmetricsfunc" class="md-nav__link"> FT_Incremental_GetGlyphMetricsFunc </a> </li> <li class="md-nav__item"> <a href="#ft_incremental_funcsrec" class="md-nav__link"> FT_Incremental_FuncsRec </a> </li> <li class="md-nav__item"> <a href="#ft_incremental_interfacerec" class="md-nav__link"> FT_Incremental_InterfaceRec </a> </li> <li class="md-nav__item"> <a href="#ft_incremental_interface" class="md-nav__link"> FT_Incremental_Interface </a> </li> </ul> </nav> </li> <li class="md-nav__item"> <a href="ft2-truetype_engine.html" class="md-nav__link"> The TrueType Engine </a> </li> <li class="md-nav__item"> <a href="ft2-ot_validation.html" class="md-nav__link"> OpenType Validation </a> </li> </ul> </nav> </li> </ul> </nav> </div> </div> </div> <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_incremental" class="md-nav__link"> FT_Incremental </a> </li> <li class="md-nav__item"> <a href="#ft_incremental_metricsrec" class="md-nav__link"> FT_Incremental_MetricsRec </a> </li> <li class="md-nav__item"> <a href="#ft_incremental_metrics" class="md-nav__link"> FT_Incremental_Metrics </a> </li> <li class="md-nav__item"> <a href="#ft_incremental_getglyphdatafunc" class="md-nav__link"> FT_Incremental_GetGlyphDataFunc </a> </li> <li class="md-nav__item"> <a href="#ft_incremental_freeglyphdatafunc" class="md-nav__link"> FT_Incremental_FreeGlyphDataFunc </a> </li> <li class="md-nav__item"> <a href="#ft_incremental_getglyphmetricsfunc" class="md-nav__link"> FT_Incremental_GetGlyphMetricsFunc </a> </li> <li class="md-nav__item"> <a href="#ft_incremental_funcsrec" class="md-nav__link"> FT_Incremental_FuncsRec </a> </li> <li class="md-nav__item"> <a href="#ft_incremental_interfacerec" class="md-nav__link"> FT_Incremental_InterfaceRec </a> </li> <li class="md-nav__item"> <a href="#ft_incremental_interface" class="md-nav__link"> FT_Incremental_Interface </a> </li> </ul> </nav> </div> </div> </div> <div class="md-content" data-md-component="content"> <article class="md-content__inner md-typeset"> <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; <a href="index.html#miscellaneous">Miscellaneous</a> &raquo; Incremental Loading</p> <hr /> <h1 id="incremental-loading">Incremental Loading<a class="headerlink" href="#incremental-loading" title="Permanent link">&para;</a></h1> <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2> <p>This section contains various functions used to perform so-called &lsquo;incremental&rsquo; glyph loading. This is a mode where all glyphs loaded from a given <code><a href="ft2-base_interface.html#ft_face">FT_Face</a></code> are provided by the client application.</p> <p>Apart from that, all other tables are loaded normally from the font file. This mode is useful when FreeType is used within another engine, e.g., a PostScript Imaging Processor.</p> <p>To enable this mode, you must use <code><a href="ft2-base_interface.html#ft_open_face">FT_Open_Face</a></code>, passing an <code><a href="ft2-base_interface.html#ft_parameter">FT_Parameter</a></code> with the <code><a href="ft2-parameter_tags.html#ft_param_tag_incremental">FT_PARAM_TAG_INCREMENTAL</a></code> tag and an <code><a href="ft2-incremental.html#ft_incremental_interface">FT_Incremental_Interface</a></code> value. See the comments for <code><a href="ft2-incremental.html#ft_incremental_interfacerec">FT_Incremental_InterfaceRec</a></code> for an example.</p> <h2 id="ft_incremental">FT_Incremental<a class="headerlink" href="#ft_incremental" title="Permanent link">&para;</a></h2> <p>Defined in FT_INCREMENTAL_H (freetype/ftincrem.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_IncrementalRec_* <b>FT_Incremental</b>; </code></pre></div> <p>An opaque type describing a user-provided object used to implement &lsquo;incremental&rsquo; glyph loading within FreeType. This is used to support embedded fonts in certain environments (e.g., PostScript interpreters), where the glyph data isn't in the font file, or must be overridden by different values.</p> <h4>note</h4> <p>It is up to client applications to create and implement <code><a href="ft2-incremental.html#ft_incremental">FT_Incremental</a></code> objects, as long as they provide implementations for the methods <code><a href="ft2-incremental.html#ft_incremental_getglyphdatafunc">FT_Incremental_GetGlyphDataFunc</a></code>, <code><a href="ft2-incremental.html#ft_incremental_freeglyphdatafunc">FT_Incremental_FreeGlyphDataFunc</a></code> and <code><a href="ft2-incremental.html#ft_incremental_getglyphmetricsfunc">FT_Incremental_GetGlyphMetricsFunc</a></code>.</p> <p>See the description of <code><a href="ft2-incremental.html#ft_incremental_interfacerec">FT_Incremental_InterfaceRec</a></code> to understand how to use incremental objects with FreeType.</p> <hr> <h2 id="ft_incremental_metricsrec">FT_Incremental_MetricsRec<a class="headerlink" href="#ft_incremental_metricsrec" title="Permanent link">&para;</a></h2> <p>Defined in FT_INCREMENTAL_H (freetype/ftincrem.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Incremental_MetricsRec_ { <a href="ft2-basic_types.html#ft_long">FT_Long</a> bearing_x; <a href="ft2-basic_types.html#ft_long">FT_Long</a> bearing_y; <a href="ft2-basic_types.html#ft_long">FT_Long</a> advance; <a href="ft2-basic_types.html#ft_long">FT_Long</a> advance_v; /* since 2.3.12 */ } <b>FT_Incremental_MetricsRec</b>; </code></pre></div> <p>A small structure used to contain the basic glyph metrics returned by the <code><a href="ft2-incremental.html#ft_incremental_getglyphmetricsfunc">FT_Incremental_GetGlyphMetricsFunc</a></code> method.</p> <h4>fields</h4> <table class="fields"> <tr><td class="val" id="bearing_x">bearing_x</td><td class="desc"> <p>Left bearing, in font units.</p> </td></tr> <tr><td class="val" id="bearing_y">bearing_y</td><td class="desc"> <p>Top bearing, in font units.</p> </td></tr> <tr><td class="val" id="advance">advance</td><td class="desc"> <p>Horizontal component of glyph advance, in font units.</p> </td></tr> <tr><td class="val" id="advance_v">advance_v</td><td class="desc"> <p>Vertical component of glyph advance, in font units.</p> </td></tr> </table> <h4>note</h4> <p>These correspond to horizontal or vertical metrics depending on the value of the <code>vertical</code> argument to the function <code><a href="ft2-incremental.html#ft_incremental_getglyphmetricsfunc">FT_Incremental_GetGlyphMetricsFunc</a></code>.</p> <hr> <h2 id="ft_incremental_metrics">FT_Incremental_Metrics<a class="headerlink" href="#ft_incremental_metrics" title="Permanent link">&para;</a></h2> <p>Defined in FT_INCREMENTAL_H (freetype/ftincrem.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Incremental_MetricsRec_* <b>FT_Incremental_Metrics</b>; </code></pre></div> <p>A handle to an <code><a href="ft2-incremental.html#ft_incremental_metricsrec">FT_Incremental_MetricsRec</a></code> structure.</p> <hr> <h2 id="ft_incremental_getglyphdatafunc">FT_Incremental_GetGlyphDataFunc<a class="headerlink" href="#ft_incremental_getglyphdatafunc" title="Permanent link">&para;</a></h2> <p>Defined in FT_INCREMENTAL_H (freetype/ftincrem.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <a href="ft2-basic_types.html#ft_error">FT_Error</a> (*<b>FT_Incremental_GetGlyphDataFunc</b>)( <a href="ft2-incremental.html#ft_incremental">FT_Incremental</a> incremental, <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> glyph_index, <a href="ft2-basic_types.html#ft_data">FT_Data</a>* adata ); </code></pre></div> <p>A function called by FreeType to access a given glyph's data bytes during <code><a href="ft2-base_interface.html#ft_load_glyph">FT_Load_Glyph</a></code> or <code><a href="ft2-base_interface.html#ft_load_char">FT_Load_Char</a></code> if incremental loading is enabled.</p> <p>Note that the format of the glyph's data bytes depends on the font file format. For TrueType, it must correspond to the raw bytes within the &lsquo;glyf&rsquo; table. For PostScript formats, it must correspond to the <strong>unencrypted</strong> charstring bytes, without any <code>lenIV</code> header. It is undefined for any other format.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="incremental">incremental</td><td class="desc"> <p>Handle to an opaque <code><a href="ft2-incremental.html#ft_incremental">FT_Incremental</a></code> handle provided by the client application.</p> </td></tr> <tr><td class="val" id="glyph_index">glyph_index</td><td class="desc"> <p>Index of relevant glyph.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="adata">adata</td><td class="desc"> <p>A structure describing the returned glyph data bytes (which will be accessed as a read-only byte block).</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>If this function returns successfully the method <code><a href="ft2-incremental.html#ft_incremental_freeglyphdatafunc">FT_Incremental_FreeGlyphDataFunc</a></code> will be called later to release the data bytes.</p> <p>Nested calls to <code><a href="ft2-incremental.html#ft_incremental_getglyphdatafunc">FT_Incremental_GetGlyphDataFunc</a></code> can happen for compound glyphs.</p> <hr> <h2 id="ft_incremental_freeglyphdatafunc">FT_Incremental_FreeGlyphDataFunc<a class="headerlink" href="#ft_incremental_freeglyphdatafunc" title="Permanent link">&para;</a></h2> <p>Defined in FT_INCREMENTAL_H (freetype/ftincrem.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">void</span> (*<b>FT_Incremental_FreeGlyphDataFunc</b>)( <a href="ft2-incremental.html#ft_incremental">FT_Incremental</a> incremental, <a href="ft2-basic_types.html#ft_data">FT_Data</a>* data ); </code></pre></div> <p>A function used to release the glyph data bytes returned by a successful call to <code><a href="ft2-incremental.html#ft_incremental_getglyphdatafunc">FT_Incremental_GetGlyphDataFunc</a></code>.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="incremental">incremental</td><td class="desc"> <p>A handle to an opaque <code><a href="ft2-incremental.html#ft_incremental">FT_Incremental</a></code> handle provided by the client application.</p> </td></tr> <tr><td class="val" id="data">data</td><td class="desc"> <p>A structure describing the glyph data bytes (which will be accessed as a read-only byte block).</p> </td></tr> </table> <hr> <h2 id="ft_incremental_getglyphmetricsfunc">FT_Incremental_GetGlyphMetricsFunc<a class="headerlink" href="#ft_incremental_getglyphmetricsfunc" title="Permanent link">&para;</a></h2> <p>Defined in FT_INCREMENTAL_H (freetype/ftincrem.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <a href="ft2-basic_types.html#ft_error">FT_Error</a> (*<b>FT_Incremental_GetGlyphMetricsFunc</b>) ( <a href="ft2-incremental.html#ft_incremental">FT_Incremental</a> incremental, <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> glyph_index, <a href="ft2-basic_types.html#ft_bool">FT_Bool</a> vertical, <a href="ft2-incremental.html#ft_incremental_metricsrec">FT_Incremental_MetricsRec</a> *ametrics ); </code></pre></div> <p>A function used to retrieve the basic metrics of a given glyph index before accessing its data. This allows for handling font types such as PCL&nbsp;XL Format&nbsp;1, Class&nbsp;2 downloaded TrueType fonts, where the glyph metrics (<code>hmtx</code> and <code>vmtx</code> tables) are permitted to be omitted from the font, and the relevant metrics included in the header of the glyph outline data. Importantly, this is not intended to allow custom glyph metrics (for example, Postscript Metrics dictionaries), because that conflicts with the requirements of outline hinting. Such custom metrics must be handled separately, by the calling application.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="incremental">incremental</td><td class="desc"> <p>A handle to an opaque <code><a href="ft2-incremental.html#ft_incremental">FT_Incremental</a></code> handle provided by the client application.</p> </td></tr> <tr><td class="val" id="glyph_index">glyph_index</td><td class="desc"> <p>Index of relevant glyph.</p> </td></tr> <tr><td class="val" id="vertical">vertical</td><td class="desc"> <p>If true, return vertical metrics.</p> </td></tr> <tr><td class="val" id="ametrics">ametrics</td><td class="desc"> <p>This parameter is used for both input and output. The original glyph metrics, if any, in font units. If metrics are not available all the values must be set to zero.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="ametrics">ametrics</td><td class="desc"> <p>The glyph metrics in font units.</p> </td></tr> </table> <hr> <h2 id="ft_incremental_funcsrec">FT_Incremental_FuncsRec<a class="headerlink" href="#ft_incremental_funcsrec" title="Permanent link">&para;</a></h2> <p>Defined in FT_INCREMENTAL_H (freetype/ftincrem.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Incremental_FuncsRec_ { <a href="ft2-incremental.html#ft_incremental_getglyphdatafunc">FT_Incremental_GetGlyphDataFunc</a> get_glyph_data; <a href="ft2-incremental.html#ft_incremental_freeglyphdatafunc">FT_Incremental_FreeGlyphDataFunc</a> free_glyph_data; <a href="ft2-incremental.html#ft_incremental_getglyphmetricsfunc">FT_Incremental_GetGlyphMetricsFunc</a> get_glyph_metrics; } <b>FT_Incremental_FuncsRec</b>; </code></pre></div> <p>A table of functions for accessing fonts that load data incrementally. Used in <code><a href="ft2-incremental.html#ft_incremental_interfacerec">FT_Incremental_InterfaceRec</a></code>.</p> <h4>fields</h4> <table class="fields"> <tr><td class="val" id="get_glyph_data">get_glyph_data</td><td class="desc"> <p>The function to get glyph data. Must not be null.</p> </td></tr> <tr><td class="val" id="free_glyph_data">free_glyph_data</td><td class="desc"> <p>The function to release glyph data. Must not be null.</p> </td></tr> <tr><td class="val" id="get_glyph_metrics">get_glyph_metrics</td><td class="desc"> <p>The function to get glyph metrics. May be null if the font does not require it.</p> </td></tr> </table> <hr> <h2 id="ft_incremental_interfacerec">FT_Incremental_InterfaceRec<a class="headerlink" href="#ft_incremental_interfacerec" title="Permanent link">&para;</a></h2> <p>Defined in FT_INCREMENTAL_H (freetype/ftincrem.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Incremental_InterfaceRec_ { <span class="keyword">const</span> <a href="ft2-incremental.html#ft_incremental_funcsrec">FT_Incremental_FuncsRec</a>* funcs; <a href="ft2-incremental.html#ft_incremental">FT_Incremental</a> object; } <b>FT_Incremental_InterfaceRec</b>; </code></pre></div> <p>A structure to be used with <code><a href="ft2-base_interface.html#ft_open_face">FT_Open_Face</a></code> to indicate that the user wants to support incremental glyph loading. You should use it with <code><a href="ft2-parameter_tags.html#ft_param_tag_incremental">FT_PARAM_TAG_INCREMENTAL</a></code> as in the following example: <div class="highlight"><pre><span></span><code> FT_Incremental_InterfaceRec inc_int; FT_Parameter parameter; FT_Open_Args open_args; // set up incremental descriptor inc_int.funcs = my_funcs; inc_int.object = my_object; // set up optional parameter parameter.tag = FT_PARAM_TAG_INCREMENTAL; parameter.data = &amp;inc_int; // set up FT_Open_Args structure open_args.flags = FT_OPEN_PATHNAME | FT_OPEN_PARAMS; open_args.pathname = my_font_pathname; open_args.num_params = 1; open_args.params = &amp;parameter; // we use one optional argument // open the font error = FT_Open_Face( library, &amp;open_args, index, &amp;face ); ... </code></pre></div></p> <hr> <h2 id="ft_incremental_interface">FT_Incremental_Interface<a class="headerlink" href="#ft_incremental_interface" title="Permanent link">&para;</a></h2> <p>Defined in FT_INCREMENTAL_H (freetype/ftincrem.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <a href="ft2-incremental.html#ft_incremental_interfacerec">FT_Incremental_InterfaceRec</a>* <b>FT_Incremental_Interface</b>; </code></pre></div> <p>A pointer to an <code><a href="ft2-incremental.html#ft_incremental_interfacerec">FT_Incremental_InterfaceRec</a></code> structure.</p> <hr> </article> </div> </div> </main> <footer class="md-footer"> <nav class="md-footer__inner md-grid" aria-label="Footer"> <a href="ft2-gx_validation.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: TrueTypeGX/AAT Validation" rel="prev"> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Previous </span> TrueTypeGX/AAT Validation </div> </div> </a> <a href="ft2-truetype_engine.html" class="md-footer__link md-footer__link--next" aria-label="Next: The TrueType Engine" rel="next"> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Next </span> The TrueType Engine </div> </div> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg> </div> </a> </nav> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-footer-copyright"> <div class="md-footer-copyright__highlight"> Copyright 2022 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>. </div> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"base": ".", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "assets/javascripts/workers/search.477d984a.min.js", "version": null}</script> <script src="assets/javascripts/bundle.82b56eb2.min.js"></script> <script src="javascripts/extra.js"></script> </body> </html>
whupdup/frame
real/third_party/freetype-2.12.0/docs/reference/ft2-incremental.html
HTML
gpl-3.0
44,216
<!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="description" content="API Reference Documentation for FreeType-2.12.0"> <meta name="author" content="FreeType Contributors"> <link rel="icon" href="images/favico.ico"> <meta name="generator" content="mkdocs-1.2.1, mkdocs-material-7.1.9"> <title>Index - FreeType-2.12.0 API Reference</title> <link rel="stylesheet" href="assets/stylesheets/main.ca7ac06f.min.css"> <link rel="stylesheet" href="assets/stylesheets/palette.f1a3b89f.min.css"> <meta name="theme-color" content="#4cae4f"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback"> <style>:root{--md-text-font-family:"Noto Serif";--md-code-font-family:"Roboto Mono"}</style> <link rel="stylesheet" href="stylesheets/extra.css"> </head> <body dir="ltr" data-md-color-scheme="" data-md-color-primary="green" data-md-color-accent="green"> <script>function __prefix(e){return new URL(".",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <label class="md-overlay" for="__drawer"></label> <div data-md-component="skip"> <a href="#freetype-2120-api-reference" class="md-skip"> Skip to content </a> </div> <div data-md-component="announce"> </div> <header class="md-header" data-md-component="header"> <nav class="md-header__inner md-grid" aria-label="Header"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> <label class="md-header__button md-icon" for="__drawer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg> </label> <div class="md-header__title" data-md-component="header-title"> <div class="md-header__ellipsis"> <div class="md-header__topic"> <span class="md-ellipsis"> FreeType-2.12.0 API Reference </span> </div> <div class="md-header__topic" data-md-component="header-topic"> <span class="md-ellipsis"> Index </span> </div> </div> </div> <label class="md-header__button md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> </label> <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required> <label class="md-search__icon md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </label> <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg> </button> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" data-md-scrollfix> <div class="md-search-result" data-md-component="search-result"> <div class="md-search-result__meta"> Initializing search </div> <ol class="md-search-result__list"></ol> </div> </div> </div> </div> </div> </nav> </header> <div class="md-container" data-md-component="container"> <main class="md-main" data-md-component="main"> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <label class="md-nav__title" for="__drawer"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> FreeType-2.12.0 API Reference </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="index.html" class="md-nav__link"> TOC </a> </li> <li class="md-nav__item md-nav__item--active"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <label class="md-nav__link md-nav__link--active" for="__toc"> Index <span class="md-nav__icon md-icon"></span> </label> <a href="ft2-index.html" class="md-nav__link md-nav__link--active"> Index </a> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#b" class="md-nav__link"> B </a> </li> <li class="md-nav__item"> <a href="#c" class="md-nav__link"> C </a> </li> <li class="md-nav__item"> <a href="#d" class="md-nav__link"> D </a> </li> <li class="md-nav__item"> <a href="#f" class="md-nav__link"> F </a> </li> <li class="md-nav__item"> <a href="#g" class="md-nav__link"> G </a> </li> <li class="md-nav__item"> <a href="#h" class="md-nav__link"> H </a> </li> <li class="md-nav__item"> <a href="#i" class="md-nav__link"> I </a> </li> <li class="md-nav__item"> <a href="#n" class="md-nav__link"> N </a> </li> <li class="md-nav__item"> <a href="#p" class="md-nav__link"> P </a> </li> <li class="md-nav__item"> <a href="#r" class="md-nav__link"> R </a> </li> <li class="md-nav__item"> <a href="#s" class="md-nav__link"> S </a> </li> <li class="md-nav__item"> <a href="#t" class="md-nav__link"> T </a> </li> <li class="md-nav__item"> <a href="#w" class="md-nav__link"> W </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" > <label class="md-nav__link" for="__nav_3"> General Remarks <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="General Remarks" data-md-level="1"> <label class="md-nav__title" for="__nav_3"> <span class="md-nav__icon md-icon"></span> General Remarks </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-preamble.html" class="md-nav__link"> Preamble </a> </li> <li class="md-nav__item"> <a href="ft2-header_inclusion.html" class="md-nav__link"> FreeType's header inclusion scheme </a> </li> <li class="md-nav__item"> <a href="ft2-user_allocation.html" class="md-nav__link"> User allocation </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" > <label class="md-nav__link" for="__nav_4"> Core API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Core API" data-md-level="1"> <label class="md-nav__title" for="__nav_4"> <span class="md-nav__icon md-icon"></span> Core API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-version.html" class="md-nav__link"> FreeType Version </a> </li> <li class="md-nav__item"> <a href="ft2-basic_types.html" class="md-nav__link"> Basic Data Types </a> </li> <li class="md-nav__item"> <a href="ft2-base_interface.html" class="md-nav__link"> Base Interface </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_variants.html" class="md-nav__link"> Unicode Variation Sequences </a> </li> <li class="md-nav__item"> <a href="ft2-color_management.html" class="md-nav__link"> Glyph Color Management </a> </li> <li class="md-nav__item"> <a href="ft2-layer_management.html" class="md-nav__link"> Glyph Layer Management </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_management.html" class="md-nav__link"> Glyph Management </a> </li> <li class="md-nav__item"> <a href="ft2-mac_specific.html" class="md-nav__link"> Mac Specific Interface </a> </li> <li class="md-nav__item"> <a href="ft2-sizes_management.html" class="md-nav__link"> Size Management </a> </li> <li class="md-nav__item"> <a href="ft2-header_file_macros.html" class="md-nav__link"> Header File Macros </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" > <label class="md-nav__link" for="__nav_5"> Format-Specific API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Format-Specific API" data-md-level="1"> <label class="md-nav__title" for="__nav_5"> <span class="md-nav__icon md-icon"></span> Format-Specific API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-multiple_masters.html" class="md-nav__link"> Multiple Masters </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_tables.html" class="md-nav__link"> TrueType Tables </a> </li> <li class="md-nav__item"> <a href="ft2-type1_tables.html" class="md-nav__link"> Type 1 Tables </a> </li> <li class="md-nav__item"> <a href="ft2-sfnt_names.html" class="md-nav__link"> SFNT Names </a> </li> <li class="md-nav__item"> <a href="ft2-bdf_fonts.html" class="md-nav__link"> BDF and PCF Files </a> </li> <li class="md-nav__item"> <a href="ft2-cid_fonts.html" class="md-nav__link"> CID Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-pfr_fonts.html" class="md-nav__link"> PFR Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-winfnt_fonts.html" class="md-nav__link"> Window FNT Files </a> </li> <li class="md-nav__item"> <a href="ft2-svg_fonts.html" class="md-nav__link"> OpenType SVG Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-font_formats.html" class="md-nav__link"> Font Formats </a> </li> <li class="md-nav__item"> <a href="ft2-gasp_table.html" class="md-nav__link"> Gasp Table </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" > <label class="md-nav__link" for="__nav_6"> Controlling FreeType Modules <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Controlling FreeType Modules" data-md-level="1"> <label class="md-nav__title" for="__nav_6"> <span class="md-nav__icon md-icon"></span> Controlling FreeType Modules </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-auto_hinter.html" class="md-nav__link"> The auto-hinter </a> </li> <li class="md-nav__item"> <a href="ft2-cff_driver.html" class="md-nav__link"> The CFF driver </a> </li> <li class="md-nav__item"> <a href="ft2-t1_cid_driver.html" class="md-nav__link"> The Type 1 and CID drivers </a> </li> <li class="md-nav__item"> <a href="ft2-tt_driver.html" class="md-nav__link"> The TrueType driver </a> </li> <li class="md-nav__item"> <a href="ft2-pcf_driver.html" class="md-nav__link"> The PCF driver </a> </li> <li class="md-nav__item"> <a href="ft2-ot_svg_driver.html" class="md-nav__link"> The SVG driver </a> </li> <li class="md-nav__item"> <a href="ft2-properties.html" class="md-nav__link"> Driver properties </a> </li> <li class="md-nav__item"> <a href="ft2-parameter_tags.html" class="md-nav__link"> Parameter Tags </a> </li> <li class="md-nav__item"> <a href="ft2-lcd_rendering.html" class="md-nav__link"> Subpixel Rendering </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" > <label class="md-nav__link" for="__nav_7"> Cache Sub-System <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1"> <label class="md-nav__title" for="__nav_7"> <span class="md-nav__icon md-icon"></span> Cache Sub-System </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-cache_subsystem.html" class="md-nav__link"> Cache Sub-System </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" > <label class="md-nav__link" for="__nav_8"> Support API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Support API" data-md-level="1"> <label class="md-nav__title" for="__nav_8"> <span class="md-nav__icon md-icon"></span> Support API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-computations.html" class="md-nav__link"> Computations </a> </li> <li class="md-nav__item"> <a href="ft2-list_processing.html" class="md-nav__link"> List Processing </a> </li> <li class="md-nav__item"> <a href="ft2-outline_processing.html" class="md-nav__link"> Outline Processing </a> </li> <li class="md-nav__item"> <a href="ft2-quick_advance.html" class="md-nav__link"> Quick retrieval of advance values </a> </li> <li class="md-nav__item"> <a href="ft2-bitmap_handling.html" class="md-nav__link"> Bitmap Handling </a> </li> <li class="md-nav__item"> <a href="ft2-raster.html" class="md-nav__link"> Scanline Converter </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_stroker.html" class="md-nav__link"> Glyph Stroker </a> </li> <li class="md-nav__item"> <a href="ft2-system_interface.html" class="md-nav__link"> System Interface </a> </li> <li class="md-nav__item"> <a href="ft2-module_management.html" class="md-nav__link"> Module Management </a> </li> <li class="md-nav__item"> <a href="ft2-gzip.html" class="md-nav__link"> GZIP Streams </a> </li> <li class="md-nav__item"> <a href="ft2-lzw.html" class="md-nav__link"> LZW Streams </a> </li> <li class="md-nav__item"> <a href="ft2-bzip2.html" class="md-nav__link"> BZIP2 Streams </a> </li> <li class="md-nav__item"> <a href="ft2-debugging_apis.html" class="md-nav__link"> External Debugging APIs </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" > <label class="md-nav__link" for="__nav_9"> Error Codes <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Error Codes" data-md-level="1"> <label class="md-nav__title" for="__nav_9"> <span class="md-nav__icon md-icon"></span> Error Codes </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-error_enumerations.html" class="md-nav__link"> Error Enumerations </a> </li> <li class="md-nav__item"> <a href="ft2-error_code_values.html" class="md-nav__link"> Error Code Values </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" > <label class="md-nav__link" for="__nav_10"> Miscellaneous <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1"> <label class="md-nav__title" for="__nav_10"> <span class="md-nav__icon md-icon"></span> Miscellaneous </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-gx_validation.html" class="md-nav__link"> TrueTypeGX/AAT Validation </a> </li> <li class="md-nav__item"> <a href="ft2-incremental.html" class="md-nav__link"> Incremental Loading </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_engine.html" class="md-nav__link"> The TrueType Engine </a> </li> <li class="md-nav__item"> <a href="ft2-ot_validation.html" class="md-nav__link"> OpenType Validation </a> </li> </ul> </nav> </li> </ul> </nav> </div> </div> </div> <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#b" class="md-nav__link"> B </a> </li> <li class="md-nav__item"> <a href="#c" class="md-nav__link"> C </a> </li> <li class="md-nav__item"> <a href="#d" class="md-nav__link"> D </a> </li> <li class="md-nav__item"> <a href="#f" class="md-nav__link"> F </a> </li> <li class="md-nav__item"> <a href="#g" class="md-nav__link"> G </a> </li> <li class="md-nav__item"> <a href="#h" class="md-nav__link"> H </a> </li> <li class="md-nav__item"> <a href="#i" class="md-nav__link"> I </a> </li> <li class="md-nav__item"> <a href="#n" class="md-nav__link"> N </a> </li> <li class="md-nav__item"> <a href="#p" class="md-nav__link"> P </a> </li> <li class="md-nav__item"> <a href="#r" class="md-nav__link"> R </a> </li> <li class="md-nav__item"> <a href="#s" class="md-nav__link"> S </a> </li> <li class="md-nav__item"> <a href="#t" class="md-nav__link"> T </a> </li> <li class="md-nav__item"> <a href="#w" class="md-nav__link"> W </a> </li> </ul> </nav> </div> </div> </div> <div class="md-content" data-md-component="content"> <article class="md-content__inner md-typeset"> <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; Global Index</p> <hr /> <h1 id="freetype-2120-api-reference">FreeType-2.12.0 API Reference<a class="headerlink" href="#freetype-2120-api-reference" title="Permanent link">&para;</a></h1> <h3 id="b">B<a class="headerlink" href="#b" title="Permanent link">&para;</a></h3> <p><a href="ft2-bdf_fonts.html#bdf_property">BDF_Property</a><br /> <a href="ft2-bdf_fonts.html#bdf_propertytype">BDF_PROPERTY_TYPE_ATOM</a><br /> <a href="ft2-bdf_fonts.html#bdf_propertytype">BDF_PROPERTY_TYPE_CARDINAL</a><br /> <a href="ft2-bdf_fonts.html#bdf_propertytype">BDF_PROPERTY_TYPE_INTEGER</a><br /> <a href="ft2-bdf_fonts.html#bdf_propertytype">BDF_PROPERTY_TYPE_NONE</a><br /> <a href="ft2-bdf_fonts.html#bdf_propertyrec">BDF_PropertyRec</a><br /> <a href="ft2-bdf_fonts.html#bdf_propertytype">BDF_PropertyType</a> </p> <h3 id="c">C<a class="headerlink" href="#c" title="Permanent link">&para;</a></h3> <p><a href="ft2-type1_tables.html#cid_facedict">CID_FaceDict</a><br /> <a href="ft2-type1_tables.html#cid_facedictrec">CID_FaceDictRec</a><br /> <a href="ft2-type1_tables.html#cid_faceinfo">CID_FaceInfo</a><br /> <a href="ft2-type1_tables.html#cid_faceinforec">CID_FaceInfoRec</a><br /> <a href="ft2-type1_tables.html#cid_fontdict">CID_FontDict</a><br /> <a href="ft2-type1_tables.html#cid_info">CID_Info</a> </p> <h3 id="d">D<a class="headerlink" href="#d" title="Permanent link">&para;</a></h3> <p><a href="ft2-properties.html#darkening-parameters">darkening-parameters</a><br /> <a href="ft2-properties.html#default-script">default-script</a> </p> <h3 id="f">F<a class="headerlink" href="#f" title="Permanent link">&para;</a></h3> <p><a href="ft2-properties.html#fallback-script">fallback-script</a><br /> <a href="ft2-version.html#freetype_xxx">FREETYPE_MAJOR</a><br /> <a href="ft2-version.html#freetype_xxx">FREETYPE_MINOR</a><br /> <a href="ft2-version.html#freetype_xxx">FREETYPE_PATCH</a><br /> <a href="ft2-version.html#freetype_xxx">FREETYPE_XXX</a><br /> <a href="ft2-sizes_management.html#ft_activate_size">FT_Activate_Size</a><br /> <a href="ft2-module_management.html#ft_add_default_modules">FT_Add_Default_Modules</a><br /> <a href="ft2-module_management.html#ft_add_module">FT_Add_Module</a><br /> <a href="ft2-quick_advance.html#ft_advance_flag_fast_only">FT_ADVANCE_FLAG_FAST_ONLY</a><br /> <a href="ft2-header_file_macros.html#ft_advances_h">FT_ADVANCES_H</a><br /> <a href="ft2-layer_management.html#ft_affine23">FT_Affine23</a><br /> <a href="ft2-system_interface.html#ft_alloc_func">FT_Alloc_Func</a><br /> <a href="ft2-computations.html#ft_angle">FT_Angle</a><br /> <a href="ft2-computations.html#ft_angle_2pi">FT_ANGLE_2PI</a><br /> <a href="ft2-computations.html#ft_angle_diff">FT_Angle_Diff</a><br /> <a href="ft2-computations.html#ft_angle_pi">FT_ANGLE_PI</a><br /> <a href="ft2-computations.html#ft_angle_pi2">FT_ANGLE_PI2</a><br /> <a href="ft2-computations.html#ft_angle_pi4">FT_ANGLE_PI4</a><br /> <a href="ft2-computations.html#ft_atan2">FT_Atan2</a><br /> <a href="ft2-base_interface.html#ft_attach_file">FT_Attach_File</a><br /> <a href="ft2-base_interface.html#ft_attach_stream">FT_Attach_Stream</a><br /> <a href="ft2-header_file_macros.html#ft_autohinter_h">FT_AUTOHINTER_H</a><br /> <a href="ft2-properties.html#ft_autohinter_script_xxx">FT_AUTOHINTER_SCRIPT_CJK</a><br /> <a href="ft2-properties.html#ft_autohinter_script_xxx">FT_AUTOHINTER_SCRIPT_INDIC</a><br /> <a href="ft2-properties.html#ft_autohinter_script_xxx">FT_AUTOHINTER_SCRIPT_LATIN</a><br /> <a href="ft2-properties.html#ft_autohinter_script_xxx">FT_AUTOHINTER_SCRIPT_NONE</a><br /> <a href="ft2-properties.html#ft_autohinter_script_xxx">FT_AUTOHINTER_SCRIPT_XXX</a><br /> <a href="ft2-basic_types.html#ft_bbox">FT_BBox</a><br /> <a href="ft2-header_file_macros.html#ft_bbox_h">FT_BBOX_H</a><br /> <a href="ft2-header_file_macros.html#ft_bdf_h">FT_BDF_H</a><br /> <a href="ft2-basic_types.html#ft_bitmap">FT_Bitmap</a><br /> <a href="ft2-bitmap_handling.html#ft_bitmap_blend">FT_Bitmap_Blend</a><br /> <a href="ft2-bitmap_handling.html#ft_bitmap_convert">FT_Bitmap_Convert</a><br /> <a href="ft2-bitmap_handling.html#ft_bitmap_copy">FT_Bitmap_Copy</a><br /> <a href="ft2-bitmap_handling.html#ft_bitmap_done">FT_Bitmap_Done</a><br /> <a href="ft2-bitmap_handling.html#ft_bitmap_embolden">FT_Bitmap_Embolden</a><br /> <a href="ft2-header_file_macros.html#ft_bitmap_h">FT_BITMAP_H</a><br /> <a href="ft2-bitmap_handling.html#ft_bitmap_init">FT_Bitmap_Init</a><br /> <a href="ft2-base_interface.html#ft_bitmap_size">FT_Bitmap_Size</a><br /> <a href="ft2-glyph_management.html#ft_bitmapglyph">FT_BitmapGlyph</a><br /> <a href="ft2-glyph_management.html#ft_bitmapglyphrec">FT_BitmapGlyphRec</a><br /> <a href="ft2-basic_types.html#ft_bool">FT_Bool</a><br /> <a href="ft2-basic_types.html#ft_byte">FT_Byte</a><br /> <a href="ft2-basic_types.html#ft_bytes">FT_Bytes</a><br /> <a href="ft2-header_file_macros.html#ft_bzip2_h">FT_BZIP2_H</a><br /> <a href="ft2-header_file_macros.html#ft_cache_h">FT_CACHE_H</a><br /> <a href="ft2-computations.html#ft_ceilfix">FT_CeilFix</a><br /> <a href="ft2-header_file_macros.html#ft_cff_driver_h">FT_CFF_DRIVER_H</a><br /> <a href="ft2-basic_types.html#ft_char">FT_Char</a><br /> <a href="ft2-base_interface.html#ft_charmap">FT_CharMap</a><br /> <a href="ft2-base_interface.html#ft_charmaprec">FT_CharMapRec</a><br /> <a href="ft2-header_file_macros.html#ft_cid_h">FT_CID_H</a><br /> <a href="ft2-gx_validation.html#ft_classickern_free">FT_ClassicKern_Free</a><br /> <a href="ft2-gx_validation.html#ft_classickern_validate">FT_ClassicKern_Validate</a><br /> <a href="ft2-layer_management.html#ft_clipbox">FT_ClipBox</a><br /> <a href="ft2-color_management.html#ft_color">FT_Color</a><br /> <a href="ft2-header_file_macros.html#ft_color_h">FT_COLOR_H</a><br /> <a href="ft2-layer_management.html#ft_color_root_transform">FT_COLOR_INCLUDE_ROOT_TRANSFORM</a><br /> <a href="ft2-layer_management.html#ft_color_root_transform">FT_COLOR_NO_ROOT_TRANSFORM</a><br /> <a href="ft2-layer_management.html#ft_color_root_transform">FT_Color_Root_Transform</a><br /> <a href="ft2-layer_management.html#ft_colorindex">FT_ColorIndex</a><br /> <a href="ft2-layer_management.html#ft_colorline">FT_ColorLine</a><br /> <a href="ft2-layer_management.html#ft_colorstop">FT_ColorStop</a><br /> <a href="ft2-layer_management.html#ft_colorstopiterator">FT_ColorStopIterator</a><br /> <a href="ft2-layer_management.html#ft_colr_paint">FT_COLR_Paint</a><br /> <a href="ft2-layer_management.html#ft_composite_mode">FT_Composite_Mode</a><br /> <a href="ft2-header_file_macros.html#ft_config_config_h">FT_CONFIG_CONFIG_H</a><br /> <a href="ft2-header_file_macros.html#ft_config_modules_h">FT_CONFIG_MODULES_H</a><br /> <a href="ft2-header_file_macros.html#ft_config_options_h">FT_CONFIG_OPTIONS_H</a><br /> <a href="ft2-header_file_macros.html#ft_config_standard_library_h">FT_CONFIG_STANDARD_LIBRARY_H</a><br /> <a href="ft2-computations.html#ft_cos">FT_Cos</a><br /> <a href="ft2-debugging_apis.html#ft_custom_log_handler">FT_Custom_Log_Handler</a><br /> <a href="ft2-basic_types.html#ft_data">FT_Data</a><br /> <a href="ft2-module_management.html#ft_debug_hook_xxx">FT_DEBUG_HOOK_TRUETYPE</a><br /> <a href="ft2-module_management.html#ft_debug_hook_xxx">FT_DEBUG_HOOK_XXX</a><br /> <a href="ft2-module_management.html#ft_debughook_func">FT_DebugHook_Func</a><br /> <a href="ft2-computations.html#ft_divfix">FT_DivFix</a><br /> <a href="ft2-base_interface.html#ft_done_face">FT_Done_Face</a><br /> <a href="ft2-base_interface.html#ft_done_freetype">FT_Done_FreeType</a><br /> <a href="ft2-glyph_management.html#ft_done_glyph">FT_Done_Glyph</a><br /> <a href="ft2-module_management.html#ft_done_library">FT_Done_Library</a><br /> <a href="ft2-multiple_masters.html#ft_done_mm_var">FT_Done_MM_Var</a><br /> <a href="ft2-sizes_management.html#ft_done_size">FT_Done_Size</a><br /> <a href="ft2-module_management.html#ft_driver">FT_Driver</a><br /> <a href="ft2-header_file_macros.html#ft_driver_h">FT_DRIVER_H</a><br /> <a href="ft2-base_interface.html#ft_enc_tag">FT_ENC_TAG</a><br /> <a href="ft2-base_interface.html#ft_encoding">FT_Encoding</a><br /> <a href="ft2-base_interface.html#ft_encoding">FT_ENCODING_ADOBE_CUSTOM</a><br /> <a href="ft2-base_interface.html#ft_encoding">FT_ENCODING_ADOBE_EXPERT</a><br /> <a href="ft2-base_interface.html#ft_encoding">FT_ENCODING_ADOBE_LATIN_1</a><br /> <a href="ft2-base_interface.html#ft_encoding">FT_ENCODING_ADOBE_STANDARD</a><br /> <a href="ft2-base_interface.html#ft_encoding">FT_ENCODING_APPLE_ROMAN</a><br /> <a href="ft2-base_interface.html#ft_encoding">FT_ENCODING_BIG5</a><br /> <a href="ft2-base_interface.html#ft_encoding">FT_ENCODING_JOHAB</a><br /> <a href="ft2-base_interface.html#ft_encoding">FT_ENCODING_MS_BIG5</a><br /> <a href="ft2-base_interface.html#ft_encoding">FT_ENCODING_MS_GB2312</a><br /> <a href="ft2-base_interface.html#ft_encoding">FT_ENCODING_MS_JOHAB</a><br /> <a href="ft2-base_interface.html#ft_encoding">FT_ENCODING_MS_SJIS</a><br /> <a href="ft2-base_interface.html#ft_encoding">FT_ENCODING_MS_SYMBOL</a><br /> <a href="ft2-base_interface.html#ft_encoding">FT_ENCODING_MS_WANSUNG</a><br /> <a href="ft2-base_interface.html#ft_encoding">FT_ENCODING_NONE</a><br /> <a href="ft2-base_interface.html#ft_encoding">FT_ENCODING_OLD_LATIN_2</a><br /> <a href="ft2-base_interface.html#ft_encoding">FT_ENCODING_PRC</a><br /> <a href="ft2-base_interface.html#ft_encoding">FT_ENCODING_SJIS</a><br /> <a href="ft2-base_interface.html#ft_encoding">FT_ENCODING_UNICODE</a><br /> <a href="ft2-base_interface.html#ft_encoding">FT_ENCODING_WANSUNG</a><br /> <a href="ft2-error_code_values.html#ft_err_xxx">FT_Err_XXX</a><br /> <a href="ft2-basic_types.html#ft_error">FT_Error</a><br /> <a href="ft2-error_enumerations.html#ft_error_string">FT_Error_String</a><br /> <a href="ft2-header_file_macros.html#ft_errors_h">FT_ERRORS_H</a><br /> <a href="ft2-basic_types.html#ft_f26dot6">FT_F26Dot6</a><br /> <a href="ft2-basic_types.html#ft_f2dot14">FT_F2Dot14</a><br /> <a href="ft2-base_interface.html#ft_face">FT_Face</a><br /> <a href="ft2-version.html#ft_face_checktruetypepatents">FT_Face_CheckTrueTypePatents</a><br /> <a href="ft2-module_management.html#ft_face_driver_name">FT_FACE_DRIVER_NAME</a><br /> <a href="ft2-base_interface.html#ft_face_flag_xxx">FT_FACE_FLAG_CID_KEYED</a><br /> <a href="ft2-base_interface.html#ft_face_flag_xxx">FT_FACE_FLAG_COLOR</a><br /> <a href="ft2-base_interface.html#ft_face_flag_xxx">FT_FACE_FLAG_EXTERNAL_STREAM</a><br /> <a href="ft2-base_interface.html#ft_face_flag_xxx">FT_FACE_FLAG_FAST_GLYPHS</a><br /> <a href="ft2-base_interface.html#ft_face_flag_xxx">FT_FACE_FLAG_FIXED_SIZES</a><br /> <a href="ft2-base_interface.html#ft_face_flag_xxx">FT_FACE_FLAG_FIXED_WIDTH</a><br /> <a href="ft2-base_interface.html#ft_face_flag_xxx">FT_FACE_FLAG_GLYPH_NAMES</a><br /> <a href="ft2-base_interface.html#ft_face_flag_xxx">FT_FACE_FLAG_HINTER</a><br /> <a href="ft2-base_interface.html#ft_face_flag_xxx">FT_FACE_FLAG_HORIZONTAL</a><br /> <a href="ft2-base_interface.html#ft_face_flag_xxx">FT_FACE_FLAG_KERNING</a><br /> <a href="ft2-base_interface.html#ft_face_flag_xxx">FT_FACE_FLAG_MULTIPLE_MASTERS</a><br /> <a href="ft2-base_interface.html#ft_face_flag_xxx">FT_FACE_FLAG_SBIX</a><br /> <a href="ft2-base_interface.html#ft_face_flag_xxx">FT_FACE_FLAG_SBIX_OVERLAY</a><br /> <a href="ft2-base_interface.html#ft_face_flag_xxx">FT_FACE_FLAG_SCALABLE</a><br /> <a href="ft2-base_interface.html#ft_face_flag_xxx">FT_FACE_FLAG_SFNT</a><br /> <a href="ft2-base_interface.html#ft_face_flag_xxx">FT_FACE_FLAG_SVG</a><br /> <a href="ft2-base_interface.html#ft_face_flag_xxx">FT_FACE_FLAG_TRICKY</a><br /> <a href="ft2-base_interface.html#ft_face_flag_xxx">FT_FACE_FLAG_VARIATION</a><br /> <a href="ft2-base_interface.html#ft_face_flag_xxx">FT_FACE_FLAG_VERTICAL</a><br /> <a href="ft2-base_interface.html#ft_face_flag_xxx">FT_FACE_FLAG_XXX</a><br /> <a href="ft2-glyph_variants.html#ft_face_getcharsofvariant">FT_Face_GetCharsOfVariant</a><br /> <a href="ft2-glyph_variants.html#ft_face_getcharvariantindex">FT_Face_GetCharVariantIndex</a><br /> <a href="ft2-glyph_variants.html#ft_face_getcharvariantisdefault">FT_Face_GetCharVariantIsDefault</a><br /> <a href="ft2-glyph_variants.html#ft_face_getvariantselectors">FT_Face_GetVariantSelectors</a><br /> <a href="ft2-glyph_variants.html#ft_face_getvariantsofchar">FT_Face_GetVariantsOfChar</a><br /> <a href="ft2-base_interface.html#ft_face_internal">FT_Face_Internal</a><br /> <a href="ft2-base_interface.html#ft_face_properties">FT_Face_Properties</a><br /> <a href="ft2-version.html#ft_face_setunpatentedhinting">FT_Face_SetUnpatentedHinting</a><br /> <a href="ft2-base_interface.html#ft_facerec">FT_FaceRec</a><br /> <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a><br /> <a href="ft2-computations.html#ft_floorfix">FT_FloorFix</a><br /> <a href="ft2-header_file_macros.html#ft_font_formats_h">FT_FONT_FORMATS_H</a><br /> <a href="ft2-system_interface.html#ft_free_func">FT_Free_Func</a><br /> <a href="ft2-header_file_macros.html#ft_freetype_h">FT_FREETYPE_H</a><br /> <a href="ft2-base_interface.html#ft_fstype_xxx">FT_FSTYPE_BITMAP_EMBEDDING_ONLY</a><br /> <a href="ft2-base_interface.html#ft_fstype_xxx">FT_FSTYPE_EDITABLE_EMBEDDING</a><br /> <a href="ft2-base_interface.html#ft_fstype_xxx">FT_FSTYPE_INSTALLABLE_EMBEDDING</a><br /> <a href="ft2-base_interface.html#ft_fstype_xxx">FT_FSTYPE_NO_SUBSETTING</a><br /> <a href="ft2-base_interface.html#ft_fstype_xxx">FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING</a><br /> <a href="ft2-base_interface.html#ft_fstype_xxx">FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING</a><br /> <a href="ft2-base_interface.html#ft_fstype_xxx">FT_FSTYPE_XXX</a><br /> <a href="ft2-basic_types.html#ft_fword">FT_FWord</a><br /> <a href="ft2-gasp_table.html#ft_gasp_xxx">FT_GASP_DO_GRAY</a><br /> <a href="ft2-gasp_table.html#ft_gasp_xxx">FT_GASP_DO_GRIDFIT</a><br /> <a href="ft2-header_file_macros.html#ft_gasp_h">FT_GASP_H</a><br /> <a href="ft2-gasp_table.html#ft_gasp_xxx">FT_GASP_NO_TABLE</a><br /> <a href="ft2-gasp_table.html#ft_gasp_xxx">FT_GASP_SYMMETRIC_GRIDFIT</a><br /> <a href="ft2-gasp_table.html#ft_gasp_xxx">FT_GASP_SYMMETRIC_SMOOTHING</a><br /> <a href="ft2-gasp_table.html#ft_gasp_xxx">FT_GASP_XXX</a><br /> <a href="ft2-basic_types.html#ft_generic">FT_Generic</a><br /> <a href="ft2-basic_types.html#ft_generic_finalizer">FT_Generic_Finalizer</a><br /> <a href="ft2-quick_advance.html#ft_get_advance">FT_Get_Advance</a><br /> <a href="ft2-quick_advance.html#ft_get_advances">FT_Get_Advances</a><br /> <a href="ft2-bdf_fonts.html#ft_get_bdf_charset_id">FT_Get_BDF_Charset_ID</a><br /> <a href="ft2-bdf_fonts.html#ft_get_bdf_property">FT_Get_BDF_Property</a><br /> <a href="ft2-base_interface.html#ft_get_char_index">FT_Get_Char_Index</a><br /> <a href="ft2-base_interface.html#ft_get_charmap_index">FT_Get_Charmap_Index</a><br /> <a href="ft2-cid_fonts.html#ft_get_cid_from_glyph_index">FT_Get_CID_From_Glyph_Index</a><br /> <a href="ft2-cid_fonts.html#ft_get_cid_is_internally_cid_keyed">FT_Get_CID_Is_Internally_CID_Keyed</a><br /> <a href="ft2-cid_fonts.html#ft_get_cid_registry_ordering_supplement">FT_Get_CID_Registry_Ordering_Supplement</a><br /> <a href="ft2-truetype_tables.html#ft_get_cmap_format">FT_Get_CMap_Format</a><br /> <a href="ft2-truetype_tables.html#ft_get_cmap_language_id">FT_Get_CMap_Language_ID</a><br /> <a href="ft2-layer_management.html#ft_get_color_glyph_clipbox">FT_Get_Color_Glyph_ClipBox</a><br /> <a href="ft2-layer_management.html#ft_get_color_glyph_layer">FT_Get_Color_Glyph_Layer</a><br /> <a href="ft2-layer_management.html#ft_get_color_glyph_paint">FT_Get_Color_Glyph_Paint</a><br /> <a href="ft2-layer_management.html#ft_get_colorline_stops">FT_Get_Colorline_Stops</a><br /> <a href="ft2-base_interface.html#ft_get_first_char">FT_Get_First_Char</a><br /> <a href="ft2-font_formats.html#ft_get_font_format">FT_Get_Font_Format</a><br /> <a href="ft2-base_interface.html#ft_get_fstype_flags">FT_Get_FSType_Flags</a><br /> <a href="ft2-gasp_table.html#ft_get_gasp">FT_Get_Gasp</a><br /> <a href="ft2-glyph_management.html#ft_get_glyph">FT_Get_Glyph</a><br /> <a href="ft2-base_interface.html#ft_get_glyph_name">FT_Get_Glyph_Name</a><br /> <a href="ft2-base_interface.html#ft_get_kerning">FT_Get_Kerning</a><br /> <a href="ft2-multiple_masters.html#ft_get_mm_blend_coordinates">FT_Get_MM_Blend_Coordinates</a><br /> <a href="ft2-multiple_masters.html#ft_get_mm_var">FT_Get_MM_Var</a><br /> <a href="ft2-multiple_masters.html#ft_get_mm_weightvector">FT_Get_MM_WeightVector</a><br /> <a href="ft2-module_management.html#ft_get_module">FT_Get_Module</a><br /> <a href="ft2-multiple_masters.html#ft_get_multi_master">FT_Get_Multi_Master</a><br /> <a href="ft2-base_interface.html#ft_get_name_index">FT_Get_Name_Index</a><br /> <a href="ft2-base_interface.html#ft_get_next_char">FT_Get_Next_Char</a><br /> <a href="ft2-layer_management.html#ft_get_paint">FT_Get_Paint</a><br /> <a href="ft2-layer_management.html#ft_get_paint_layers">FT_Get_Paint_Layers</a><br /> <a href="ft2-pfr_fonts.html#ft_get_pfr_advance">FT_Get_PFR_Advance</a><br /> <a href="ft2-pfr_fonts.html#ft_get_pfr_kerning">FT_Get_PFR_Kerning</a><br /> <a href="ft2-pfr_fonts.html#ft_get_pfr_metrics">FT_Get_PFR_Metrics</a><br /> <a href="ft2-base_interface.html#ft_get_postscript_name">FT_Get_Postscript_Name</a><br /> <a href="ft2-type1_tables.html#ft_get_ps_font_info">FT_Get_PS_Font_Info</a><br /> <a href="ft2-type1_tables.html#ft_get_ps_font_private">FT_Get_PS_Font_Private</a><br /> <a href="ft2-type1_tables.html#ft_get_ps_font_value">FT_Get_PS_Font_Value</a><br /> <a href="ft2-module_management.html#ft_get_renderer">FT_Get_Renderer</a><br /> <a href="ft2-sfnt_names.html#ft_get_sfnt_langtag">FT_Get_Sfnt_LangTag</a><br /> <a href="ft2-sfnt_names.html#ft_get_sfnt_name">FT_Get_Sfnt_Name</a><br /> <a href="ft2-sfnt_names.html#ft_get_sfnt_name_count">FT_Get_Sfnt_Name_Count</a><br /> <a href="ft2-truetype_tables.html#ft_get_sfnt_table">FT_Get_Sfnt_Table</a><br /> <a href="ft2-base_interface.html#ft_get_subglyph_info">FT_Get_SubGlyph_Info</a><br /> <a href="ft2-base_interface.html#ft_get_track_kerning">FT_Get_Track_Kerning</a><br /> <a href="ft2-base_interface.html#ft_get_transform">FT_Get_Transform</a><br /> <a href="ft2-truetype_engine.html#ft_get_truetype_engine_type">FT_Get_TrueType_Engine_Type</a><br /> <a href="ft2-multiple_masters.html#ft_get_var_axis_flags">FT_Get_Var_Axis_Flags</a><br /> <a href="ft2-multiple_masters.html#ft_get_var_blend_coordinates">FT_Get_Var_Blend_Coordinates</a><br /> <a href="ft2-multiple_masters.html#ft_get_var_design_coordinates">FT_Get_Var_Design_Coordinates</a><br /> <a href="ft2-winfnt_fonts.html#ft_get_winfnt_header">FT_Get_WinFNT_Header</a><br /> <a href="ft2-mac_specific.html#ft_getfile_from_mac_ats_name">FT_GetFile_From_Mac_ATS_Name</a><br /> <a href="ft2-mac_specific.html#ft_getfile_from_mac_name">FT_GetFile_From_Mac_Name</a><br /> <a href="ft2-mac_specific.html#ft_getfilepath_from_mac_ats_name">FT_GetFilePath_From_Mac_ATS_Name</a><br /> <a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a><br /> <a href="ft2-glyph_management.html#ft_glyph_bbox_mode">FT_GLYPH_BBOX_GRIDFIT</a><br /> <a href="ft2-glyph_management.html#ft_glyph_bbox_mode">FT_Glyph_BBox_Mode</a><br /> <a href="ft2-glyph_management.html#ft_glyph_bbox_mode">FT_GLYPH_BBOX_PIXELS</a><br /> <a href="ft2-glyph_management.html#ft_glyph_bbox_mode">FT_GLYPH_BBOX_SUBPIXELS</a><br /> <a href="ft2-glyph_management.html#ft_glyph_bbox_mode">FT_GLYPH_BBOX_TRUNCATE</a><br /> <a href="ft2-glyph_management.html#ft_glyph_bbox_mode">FT_GLYPH_BBOX_UNSCALED</a><br /> <a href="ft2-glyph_management.html#ft_glyph_copy">FT_Glyph_Copy</a><br /> <a href="ft2-basic_types.html#ft_glyph_format">FT_Glyph_Format</a><br /> <a href="ft2-basic_types.html#ft_glyph_format">FT_GLYPH_FORMAT_BITMAP</a><br /> <a href="ft2-basic_types.html#ft_glyph_format">FT_GLYPH_FORMAT_COMPOSITE</a><br /> <a href="ft2-basic_types.html#ft_glyph_format">FT_GLYPH_FORMAT_NONE</a><br /> <a href="ft2-basic_types.html#ft_glyph_format">FT_GLYPH_FORMAT_OUTLINE</a><br /> <a href="ft2-basic_types.html#ft_glyph_format">FT_GLYPH_FORMAT_PLOTTER</a><br /> <a href="ft2-basic_types.html#ft_glyph_format">FT_GLYPH_FORMAT_SVG</a><br /> <a href="ft2-glyph_management.html#ft_glyph_get_cbox">FT_Glyph_Get_CBox</a><br /> <a href="ft2-header_file_macros.html#ft_glyph_h">FT_GLYPH_H</a><br /> <a href="ft2-base_interface.html#ft_glyph_metrics">FT_Glyph_Metrics</a><br /> <a href="ft2-glyph_stroker.html#ft_glyph_stroke">FT_Glyph_Stroke</a><br /> <a href="ft2-glyph_stroker.html#ft_glyph_strokeborder">FT_Glyph_StrokeBorder</a><br /> <a href="ft2-glyph_management.html#ft_glyph_to_bitmap">FT_Glyph_To_Bitmap</a><br /> <a href="ft2-glyph_management.html#ft_glyph_transform">FT_Glyph_Transform</a><br /> <a href="ft2-glyph_management.html#ft_glyphrec">FT_GlyphRec</a><br /> <a href="ft2-base_interface.html#ft_glyphslot">FT_GlyphSlot</a><br /> <a href="ft2-bitmap_handling.html#ft_glyphslot_own_bitmap">FT_GlyphSlot_Own_Bitmap</a><br /> <a href="ft2-base_interface.html#ft_glyphslotrec">FT_GlyphSlotRec</a><br /> <a href="ft2-header_file_macros.html#ft_gx_validate_h">FT_GX_VALIDATE_H</a><br /> <a href="ft2-header_file_macros.html#ft_gzip_h">FT_GZIP_H</a><br /> <a href="ft2-gzip.html#ft_gzip_uncompress">FT_Gzip_Uncompress</a><br /> <a href="ft2-base_interface.html#ft_has_color">FT_HAS_COLOR</a><br /> <a href="ft2-base_interface.html#ft_has_fast_glyphs">FT_HAS_FAST_GLYPHS</a><br /> <a href="ft2-base_interface.html#ft_has_fixed_sizes">FT_HAS_FIXED_SIZES</a><br /> <a href="ft2-base_interface.html#ft_has_glyph_names">FT_HAS_GLYPH_NAMES</a><br /> <a href="ft2-base_interface.html#ft_has_horizontal">FT_HAS_HORIZONTAL</a><br /> <a href="ft2-base_interface.html#ft_has_kerning">FT_HAS_KERNING</a><br /> <a href="ft2-base_interface.html#ft_has_multiple_masters">FT_HAS_MULTIPLE_MASTERS</a><br /> <a href="ft2-type1_tables.html#ft_has_ps_glyph_names">FT_Has_PS_Glyph_Names</a><br /> <a href="ft2-base_interface.html#ft_has_sbix">FT_HAS_SBIX</a><br /> <a href="ft2-base_interface.html#ft_has_sbix_overlay">FT_HAS_SBIX_OVERLAY</a><br /> <a href="ft2-base_interface.html#ft_has_svg">FT_HAS_SVG</a><br /> <a href="ft2-base_interface.html#ft_has_vertical">FT_HAS_VERTICAL</a><br /> <a href="ft2-properties.html#ft_hinting_xxx">FT_HINTING_ADOBE</a><br /> <a href="ft2-properties.html#ft_hinting_xxx">FT_HINTING_FREETYPE</a><br /> <a href="ft2-properties.html#ft_hinting_xxx">FT_HINTING_XXX</a><br /> <a href="ft2-header_file_macros.html#ft_image_h">FT_IMAGE_H</a><br /> <a href="ft2-basic_types.html#ft_image_tag">FT_IMAGE_TAG</a><br /> <a href="ft2-incremental.html#ft_incremental">FT_Incremental</a><br /> <a href="ft2-incremental.html#ft_incremental_freeglyphdatafunc">FT_Incremental_FreeGlyphDataFunc</a><br /> <a href="ft2-incremental.html#ft_incremental_funcsrec">FT_Incremental_FuncsRec</a><br /> <a href="ft2-incremental.html#ft_incremental_getglyphdatafunc">FT_Incremental_GetGlyphDataFunc</a><br /> <a href="ft2-incremental.html#ft_incremental_getglyphmetricsfunc">FT_Incremental_GetGlyphMetricsFunc</a><br /> <a href="ft2-header_file_macros.html#ft_incremental_h">FT_INCREMENTAL_H</a><br /> <a href="ft2-incremental.html#ft_incremental_interface">FT_Incremental_Interface</a><br /> <a href="ft2-incremental.html#ft_incremental_interfacerec">FT_Incremental_InterfaceRec</a><br /> <a href="ft2-incremental.html#ft_incremental_metrics">FT_Incremental_Metrics</a><br /> <a href="ft2-incremental.html#ft_incremental_metricsrec">FT_Incremental_MetricsRec</a><br /> <a href="ft2-base_interface.html#ft_init_freetype">FT_Init_FreeType</a><br /> <a href="ft2-basic_types.html#ft_int">FT_Int</a><br /> <a href="ft2-basic_types.html#ft_int16">FT_Int16</a><br /> <a href="ft2-basic_types.html#ft_int32">FT_Int32</a><br /> <a href="ft2-basic_types.html#ft_int64">FT_Int64</a><br /> <a href="ft2-base_interface.html#ft_is_cid_keyed">FT_IS_CID_KEYED</a><br /> <a href="ft2-base_interface.html#ft_is_fixed_width">FT_IS_FIXED_WIDTH</a><br /> <a href="ft2-base_interface.html#ft_is_named_instance">FT_IS_NAMED_INSTANCE</a><br /> <a href="ft2-base_interface.html#ft_is_scalable">FT_IS_SCALABLE</a><br /> <a href="ft2-base_interface.html#ft_is_sfnt">FT_IS_SFNT</a><br /> <a href="ft2-base_interface.html#ft_is_tricky">FT_IS_TRICKY</a><br /> <a href="ft2-base_interface.html#ft_is_variation">FT_IS_VARIATION</a><br /> <a href="ft2-base_interface.html#ft_kerning_mode">FT_KERNING_DEFAULT</a><br /> <a href="ft2-base_interface.html#ft_kerning_mode">FT_Kerning_Mode</a><br /> <a href="ft2-base_interface.html#ft_kerning_mode">FT_KERNING_UNFITTED</a><br /> <a href="ft2-base_interface.html#ft_kerning_mode">FT_KERNING_UNSCALED</a><br /> <a href="ft2-layer_management.html#ft_layeriterator">FT_LayerIterator</a><br /> <a href="ft2-lcd_rendering.html#ft_lcdfilter">FT_LCD_FILTER_DEFAULT</a><br /> <a href="ft2-header_file_macros.html#ft_lcd_filter_h">FT_LCD_FILTER_H</a><br /> <a href="ft2-lcd_rendering.html#ft_lcdfilter">FT_LCD_FILTER_LEGACY</a><br /> <a href="ft2-lcd_rendering.html#ft_lcdfilter">FT_LCD_FILTER_LEGACY1</a><br /> <a href="ft2-lcd_rendering.html#ft_lcdfilter">FT_LCD_FILTER_LIGHT</a><br /> <a href="ft2-lcd_rendering.html#ft_lcdfilter">FT_LCD_FILTER_NONE</a><br /> <a href="ft2-lcd_rendering.html#ft_lcdfilter">FT_LcdFilter</a><br /> <a href="ft2-lcd_rendering.html#ft_lcdfivetapfilter">FT_LcdFiveTapFilter</a><br /> <a href="ft2-base_interface.html#ft_library">FT_Library</a><br /> <a href="ft2-lcd_rendering.html#ft_library_setlcdfilter">FT_Library_SetLcdFilter</a><br /> <a href="ft2-lcd_rendering.html#ft_library_setlcdfilterweights">FT_Library_SetLcdFilterWeights</a><br /> <a href="ft2-lcd_rendering.html#ft_library_setlcdgeometry">FT_Library_SetLcdGeometry</a><br /> <a href="ft2-version.html#ft_library_version">FT_Library_Version</a><br /> <a href="ft2-list_processing.html#ft_list">FT_List</a><br /> <a href="ft2-list_processing.html#ft_list_add">FT_List_Add</a><br /> <a href="ft2-list_processing.html#ft_list_destructor">FT_List_Destructor</a><br /> <a href="ft2-list_processing.html#ft_list_finalize">FT_List_Finalize</a><br /> <a href="ft2-list_processing.html#ft_list_find">FT_List_Find</a><br /> <a href="ft2-header_file_macros.html#ft_list_h">FT_LIST_H</a><br /> <a href="ft2-list_processing.html#ft_list_insert">FT_List_Insert</a><br /> <a href="ft2-list_processing.html#ft_list_iterate">FT_List_Iterate</a><br /> <a href="ft2-list_processing.html#ft_list_iterator">FT_List_Iterator</a><br /> <a href="ft2-list_processing.html#ft_list_remove">FT_List_Remove</a><br /> <a href="ft2-list_processing.html#ft_list_up">FT_List_Up</a><br /> <a href="ft2-list_processing.html#ft_listnode">FT_ListNode</a><br /> <a href="ft2-list_processing.html#ft_listnoderec">FT_ListNodeRec</a><br /> <a href="ft2-list_processing.html#ft_listrec">FT_ListRec</a><br /> <a href="ft2-base_interface.html#ft_load_xxx">FT_LOAD_BITMAP_METRICS_ONLY</a><br /> <a href="ft2-base_interface.html#ft_load_char">FT_Load_Char</a><br /> <a href="ft2-base_interface.html#ft_load_xxx">FT_LOAD_COLOR</a><br /> <a href="ft2-base_interface.html#ft_load_xxx">FT_LOAD_COMPUTE_METRICS</a><br /> <a href="ft2-base_interface.html#ft_load_xxx">FT_LOAD_CROP_BITMAP</a><br /> <a href="ft2-base_interface.html#ft_load_xxx">FT_LOAD_DEFAULT</a><br /> <a href="ft2-base_interface.html#ft_load_xxx">FT_LOAD_FORCE_AUTOHINT</a><br /> <a href="ft2-base_interface.html#ft_load_glyph">FT_Load_Glyph</a><br /> <a href="ft2-base_interface.html#ft_load_xxx">FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH</a><br /> <a href="ft2-base_interface.html#ft_load_xxx">FT_LOAD_IGNORE_TRANSFORM</a><br /> <a href="ft2-base_interface.html#ft_load_xxx">FT_LOAD_LINEAR_DESIGN</a><br /> <a href="ft2-base_interface.html#ft_load_xxx">FT_LOAD_MONOCHROME</a><br /> <a href="ft2-base_interface.html#ft_load_xxx">FT_LOAD_NO_AUTOHINT</a><br /> <a href="ft2-base_interface.html#ft_load_xxx">FT_LOAD_NO_BITMAP</a><br /> <a href="ft2-base_interface.html#ft_load_xxx">FT_LOAD_NO_HINTING</a><br /> <a href="ft2-base_interface.html#ft_load_xxx">FT_LOAD_NO_RECURSE</a><br /> <a href="ft2-base_interface.html#ft_load_xxx">FT_LOAD_NO_SCALE</a><br /> <a href="ft2-base_interface.html#ft_load_xxx">FT_LOAD_PEDANTIC</a><br /> <a href="ft2-base_interface.html#ft_load_xxx">FT_LOAD_RENDER</a><br /> <a href="ft2-base_interface.html#ft_load_xxx">FT_LOAD_SBITS_ONLY</a><br /> <a href="ft2-truetype_tables.html#ft_load_sfnt_table">FT_Load_Sfnt_Table</a><br /> <a href="ft2-base_interface.html#ft_load_target_xxx">FT_LOAD_TARGET_LCD</a><br /> <a href="ft2-base_interface.html#ft_load_target_xxx">FT_LOAD_TARGET_LCD_V</a><br /> <a href="ft2-base_interface.html#ft_load_target_xxx">FT_LOAD_TARGET_LIGHT</a><br /> <a href="ft2-base_interface.html#ft_load_target_mode">FT_LOAD_TARGET_MODE</a><br /> <a href="ft2-base_interface.html#ft_load_target_xxx">FT_LOAD_TARGET_MONO</a><br /> <a href="ft2-base_interface.html#ft_load_target_xxx">FT_LOAD_TARGET_NORMAL</a><br /> <a href="ft2-base_interface.html#ft_load_target_xxx">FT_LOAD_TARGET_XXX</a><br /> <a href="ft2-base_interface.html#ft_load_xxx">FT_LOAD_VERTICAL_LAYOUT</a><br /> <a href="ft2-base_interface.html#ft_load_xxx">FT_LOAD_XXX</a><br /> <a href="ft2-basic_types.html#ft_long">FT_Long</a><br /> <a href="ft2-header_file_macros.html#ft_lzw_h">FT_LZW_H</a><br /> <a href="ft2-header_file_macros.html#ft_mac_h">FT_MAC_H</a><br /> <a href="ft2-basic_types.html#ft_make_tag">FT_MAKE_TAG</a><br /> <a href="ft2-basic_types.html#ft_matrix">FT_Matrix</a><br /> <a href="ft2-computations.html#ft_matrix_invert">FT_Matrix_Invert</a><br /> <a href="ft2-computations.html#ft_matrix_multiply">FT_Matrix_Multiply</a><br /> <a href="ft2-system_interface.html#ft_memory">FT_Memory</a><br /> <a href="ft2-system_interface.html#ft_memoryrec">FT_MemoryRec</a><br /> <a href="ft2-multiple_masters.html#ft_mm_axis">FT_MM_Axis</a><br /> <a href="ft2-multiple_masters.html#ft_mm_var">FT_MM_Var</a><br /> <a href="ft2-module_management.html#ft_module">FT_Module</a><br /> <a href="ft2-module_management.html#ft_module_class">FT_Module_Class</a><br /> <a href="ft2-module_management.html#ft_module_constructor">FT_Module_Constructor</a><br /> <a href="ft2-module_management.html#ft_module_destructor">FT_Module_Destructor</a><br /> <a href="ft2-header_file_macros.html#ft_module_errors_h">FT_MODULE_ERRORS_H</a><br /> <a href="ft2-header_file_macros.html#ft_module_h">FT_MODULE_H</a><br /> <a href="ft2-module_management.html#ft_module_requester">FT_Module_Requester</a><br /> <a href="ft2-computations.html#ft_muldiv">FT_MulDiv</a><br /> <a href="ft2-computations.html#ft_mulfix">FT_MulFix</a><br /> <a href="ft2-multiple_masters.html#ft_multi_master">FT_Multi_Master</a><br /> <a href="ft2-header_file_macros.html#ft_multiple_masters_h">FT_MULTIPLE_MASTERS_H</a><br /> <a href="ft2-base_interface.html#ft_new_face">FT_New_Face</a><br /> <a href="ft2-mac_specific.html#ft_new_face_from_fond">FT_New_Face_From_FOND</a><br /> <a href="ft2-mac_specific.html#ft_new_face_from_fsref">FT_New_Face_From_FSRef</a><br /> <a href="ft2-mac_specific.html#ft_new_face_from_fsspec">FT_New_Face_From_FSSpec</a><br /> <a href="ft2-glyph_management.html#ft_new_glyph">FT_New_Glyph</a><br /> <a href="ft2-module_management.html#ft_new_library">FT_New_Library</a><br /> <a href="ft2-base_interface.html#ft_new_memory_face">FT_New_Memory_Face</a><br /> <a href="ft2-sizes_management.html#ft_new_size">FT_New_Size</a><br /> <a href="ft2-basic_types.html#ft_offset">FT_Offset</a><br /> <a href="ft2-layer_management.html#ft_opaquepaint">FT_OpaquePaint</a><br /> <a href="ft2-base_interface.html#ft_open_args">FT_Open_Args</a><br /> <a href="ft2-base_interface.html#ft_open_xxx">FT_OPEN_DRIVER</a><br /> <a href="ft2-base_interface.html#ft_open_face">FT_Open_Face</a><br /> <a href="ft2-base_interface.html#ft_open_xxx">FT_OPEN_MEMORY</a><br /> <a href="ft2-base_interface.html#ft_open_xxx">FT_OPEN_PARAMS</a><br /> <a href="ft2-base_interface.html#ft_open_xxx">FT_OPEN_PATHNAME</a><br /> <a href="ft2-base_interface.html#ft_open_xxx">FT_OPEN_STREAM</a><br /> <a href="ft2-base_interface.html#ft_open_xxx">FT_OPEN_XXX</a><br /> <a href="ft2-ot_validation.html#ft_opentype_free">FT_OpenType_Free</a><br /> <a href="ft2-ot_validation.html#ft_opentype_validate">FT_OpenType_Validate</a><br /> <a href="ft2-header_file_macros.html#ft_opentype_validate_h">FT_OPENTYPE_VALIDATE_H</a><br /> <a href="ft2-outline_processing.html#ft_orientation">FT_Orientation</a><br /> <a href="ft2-outline_processing.html#ft_orientation">FT_ORIENTATION_FILL_LEFT</a><br /> <a href="ft2-outline_processing.html#ft_orientation">FT_ORIENTATION_FILL_RIGHT</a><br /> <a href="ft2-outline_processing.html#ft_orientation">FT_ORIENTATION_NONE</a><br /> <a href="ft2-outline_processing.html#ft_orientation">FT_ORIENTATION_POSTSCRIPT</a><br /> <a href="ft2-outline_processing.html#ft_orientation">FT_ORIENTATION_TRUETYPE</a><br /> <a href="ft2-header_file_macros.html#ft_otsvg_h">FT_OTSVG_H</a><br /> <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a><br /> <a href="ft2-outline_processing.html#ft_outline_check">FT_Outline_Check</a><br /> <a href="ft2-outline_processing.html#ft_outline_conictofunc">FT_Outline_ConicToFunc</a><br /> <a href="ft2-outline_processing.html#ft_outline_copy">FT_Outline_Copy</a><br /> <a href="ft2-outline_processing.html#ft_outline_cubictofunc">FT_Outline_CubicToFunc</a><br /> <a href="ft2-outline_processing.html#ft_outline_decompose">FT_Outline_Decompose</a><br /> <a href="ft2-outline_processing.html#ft_outline_done">FT_Outline_Done</a><br /> <a href="ft2-outline_processing.html#ft_outline_embolden">FT_Outline_Embolden</a><br /> <a href="ft2-outline_processing.html#ft_outline_emboldenxy">FT_Outline_EmboldenXY</a><br /> <a href="ft2-outline_processing.html#ft_outline_xxx">FT_OUTLINE_EVEN_ODD_FILL</a><br /> <a href="ft2-outline_processing.html#ft_outline_funcs">FT_Outline_Funcs</a><br /> <a href="ft2-outline_processing.html#ft_outline_get_bbox">FT_Outline_Get_BBox</a><br /> <a href="ft2-outline_processing.html#ft_outline_get_bitmap">FT_Outline_Get_Bitmap</a><br /> <a href="ft2-outline_processing.html#ft_outline_get_cbox">FT_Outline_Get_CBox</a><br /> <a href="ft2-outline_processing.html#ft_outline_get_orientation">FT_Outline_Get_Orientation</a><br /> <a href="ft2-glyph_stroker.html#ft_outline_getinsideborder">FT_Outline_GetInsideBorder</a><br /> <a href="ft2-glyph_stroker.html#ft_outline_getoutsideborder">FT_Outline_GetOutsideBorder</a><br /> <a href="ft2-header_file_macros.html#ft_outline_h">FT_OUTLINE_H</a><br /> <a href="ft2-outline_processing.html#ft_outline_xxx">FT_OUTLINE_HIGH_PRECISION</a><br /> <a href="ft2-outline_processing.html#ft_outline_xxx">FT_OUTLINE_IGNORE_DROPOUTS</a><br /> <a href="ft2-outline_processing.html#ft_outline_xxx">FT_OUTLINE_INCLUDE_STUBS</a><br /> <a href="ft2-outline_processing.html#ft_outline_linetofunc">FT_Outline_LineToFunc</a><br /> <a href="ft2-outline_processing.html#ft_outline_movetofunc">FT_Outline_MoveToFunc</a><br /> <a href="ft2-outline_processing.html#ft_outline_new">FT_Outline_New</a><br /> <a href="ft2-outline_processing.html#ft_outline_xxx">FT_OUTLINE_NONE</a><br /> <a href="ft2-outline_processing.html#ft_outline_xxx">FT_OUTLINE_OVERLAP</a><br /> <a href="ft2-outline_processing.html#ft_outline_xxx">FT_OUTLINE_OWNER</a><br /> <a href="ft2-outline_processing.html#ft_outline_render">FT_Outline_Render</a><br /> <a href="ft2-outline_processing.html#ft_outline_reverse">FT_Outline_Reverse</a><br /> <a href="ft2-outline_processing.html#ft_outline_xxx">FT_OUTLINE_REVERSE_FILL</a><br /> <a href="ft2-outline_processing.html#ft_outline_xxx">FT_OUTLINE_SINGLE_PASS</a><br /> <a href="ft2-outline_processing.html#ft_outline_xxx">FT_OUTLINE_SMART_DROPOUTS</a><br /> <a href="ft2-outline_processing.html#ft_outline_transform">FT_Outline_Transform</a><br /> <a href="ft2-outline_processing.html#ft_outline_translate">FT_Outline_Translate</a><br /> <a href="ft2-outline_processing.html#ft_outline_xxx">FT_OUTLINE_XXX</a><br /> <a href="ft2-glyph_management.html#ft_outlineglyph">FT_OutlineGlyph</a><br /> <a href="ft2-glyph_management.html#ft_outlineglyphrec">FT_OutlineGlyphRec</a><br /> <a href="ft2-layer_management.html#ft_paintcolrglyph">FT_PaintColrGlyph</a><br /> <a href="ft2-layer_management.html#ft_paintcolrlayers">FT_PaintColrLayers</a><br /> <a href="ft2-layer_management.html#ft_paintcomposite">FT_PaintComposite</a><br /> <a href="ft2-layer_management.html#ft_paintextend">FT_PaintExtend</a><br /> <a href="ft2-layer_management.html#ft_paintformat">FT_PaintFormat</a><br /> <a href="ft2-layer_management.html#ft_paintglyph">FT_PaintGlyph</a><br /> <a href="ft2-layer_management.html#ft_paintlineargradient">FT_PaintLinearGradient</a><br /> <a href="ft2-layer_management.html#ft_paintradialgradient">FT_PaintRadialGradient</a><br /> <a href="ft2-layer_management.html#ft_paintrotate">FT_PaintRotate</a><br /> <a href="ft2-layer_management.html#ft_paintscale">FT_PaintScale</a><br /> <a href="ft2-layer_management.html#ft_paintskew">FT_PaintSkew</a><br /> <a href="ft2-layer_management.html#ft_paintsolid">FT_PaintSolid</a><br /> <a href="ft2-layer_management.html#ft_paintsweepgradient">FT_PaintSweepGradient</a><br /> <a href="ft2-layer_management.html#ft_painttransform">FT_PaintTransform</a><br /> <a href="ft2-layer_management.html#ft_painttranslate">FT_PaintTranslate</a><br /> <a href="ft2-color_management.html#ft_palette_data">FT_Palette_Data</a><br /> <a href="ft2-color_management.html#ft_palette_data_get">FT_Palette_Data_Get</a><br /> <a href="ft2-color_management.html#ft_palette_xxx">FT_PALETTE_FOR_DARK_BACKGROUND</a><br /> <a href="ft2-color_management.html#ft_palette_xxx">FT_PALETTE_FOR_LIGHT_BACKGROUND</a><br /> <a href="ft2-color_management.html#ft_palette_select">FT_Palette_Select</a><br /> <a href="ft2-color_management.html#ft_palette_set_foreground_color">FT_Palette_Set_Foreground_Color</a><br /> <a href="ft2-color_management.html#ft_palette_xxx">FT_PALETTE_XXX</a><br /> <a href="ft2-parameter_tags.html#ft_param_tag_ignore_sbix">FT_PARAM_TAG_IGNORE_SBIX</a><br /> <a href="ft2-parameter_tags.html#ft_param_tag_ignore_typographic_family">FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY</a><br /> <a href="ft2-parameter_tags.html#ft_param_tag_ignore_typographic_subfamily">FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY</a><br /> <a href="ft2-parameter_tags.html#ft_param_tag_incremental">FT_PARAM_TAG_INCREMENTAL</a><br /> <a href="ft2-parameter_tags.html#ft_param_tag_lcd_filter_weights">FT_PARAM_TAG_LCD_FILTER_WEIGHTS</a><br /> <a href="ft2-parameter_tags.html#ft_param_tag_random_seed">FT_PARAM_TAG_RANDOM_SEED</a><br /> <a href="ft2-parameter_tags.html#ft_param_tag_stem_darkening">FT_PARAM_TAG_STEM_DARKENING</a><br /> <a href="ft2-parameter_tags.html#ft_param_tag_unpatented_hinting">FT_PARAM_TAG_UNPATENTED_HINTING</a><br /> <a href="ft2-base_interface.html#ft_parameter">FT_Parameter</a><br /> <a href="ft2-header_file_macros.html#ft_pcf_driver_h">FT_PCF_DRIVER_H</a><br /> <a href="ft2-header_file_macros.html#ft_pfr_h">FT_PFR_H</a><br /> <a href="ft2-basic_types.html#ft_pixel_mode">FT_Pixel_Mode</a><br /> <a href="ft2-basic_types.html#ft_pixel_mode">FT_PIXEL_MODE_BGRA</a><br /> <a href="ft2-basic_types.html#ft_pixel_mode">FT_PIXEL_MODE_GRAY</a><br /> <a href="ft2-basic_types.html#ft_pixel_mode">FT_PIXEL_MODE_GRAY2</a><br /> <a href="ft2-basic_types.html#ft_pixel_mode">FT_PIXEL_MODE_GRAY4</a><br /> <a href="ft2-basic_types.html#ft_pixel_mode">FT_PIXEL_MODE_LCD</a><br /> <a href="ft2-basic_types.html#ft_pixel_mode">FT_PIXEL_MODE_LCD_V</a><br /> <a href="ft2-basic_types.html#ft_pixel_mode">FT_PIXEL_MODE_MONO</a><br /> <a href="ft2-basic_types.html#ft_pixel_mode">FT_PIXEL_MODE_NONE</a><br /> <a href="ft2-basic_types.html#ft_pointer">FT_Pointer</a><br /> <a href="ft2-basic_types.html#ft_pos">FT_Pos</a><br /> <a href="ft2-properties.html#ft_prop_glyphtoscriptmap">FT_Prop_GlyphToScriptMap</a><br /> <a href="ft2-properties.html#ft_prop_increasexheight">FT_Prop_IncreaseXHeight</a><br /> <a href="ft2-module_management.html#ft_property_get">FT_Property_Get</a><br /> <a href="ft2-module_management.html#ft_property_set">FT_Property_Set</a><br /> <a href="ft2-basic_types.html#ft_ptrdist">FT_PtrDist</a><br /> <a href="ft2-raster.html#ft_raster">FT_Raster</a><br /> <a href="ft2-raster.html#ft_raster_bitset_func">FT_Raster_BitSet_Func</a><br /> <a href="ft2-raster.html#ft_raster_bittest_func">FT_Raster_BitTest_Func</a><br /> <a href="ft2-raster.html#ft_raster_donefunc">FT_Raster_DoneFunc</a><br /> <a href="ft2-raster.html#ft_raster_flag_xxx">FT_RASTER_FLAG_AA</a><br /> <a href="ft2-raster.html#ft_raster_flag_xxx">FT_RASTER_FLAG_CLIP</a><br /> <a href="ft2-raster.html#ft_raster_flag_xxx">FT_RASTER_FLAG_DEFAULT</a><br /> <a href="ft2-raster.html#ft_raster_flag_xxx">FT_RASTER_FLAG_DIRECT</a><br /> <a href="ft2-raster.html#ft_raster_flag_xxx">FT_RASTER_FLAG_SDF</a><br /> <a href="ft2-raster.html#ft_raster_flag_xxx">FT_RASTER_FLAG_XXX</a><br /> <a href="ft2-raster.html#ft_raster_funcs">FT_Raster_Funcs</a><br /> <a href="ft2-raster.html#ft_raster_newfunc">FT_Raster_NewFunc</a><br /> <a href="ft2-raster.html#ft_raster_params">FT_Raster_Params</a><br /> <a href="ft2-raster.html#ft_raster_renderfunc">FT_Raster_RenderFunc</a><br /> <a href="ft2-raster.html#ft_raster_resetfunc">FT_Raster_ResetFunc</a><br /> <a href="ft2-raster.html#ft_raster_setmodefunc">FT_Raster_SetModeFunc</a><br /> <a href="ft2-system_interface.html#ft_realloc_func">FT_Realloc_Func</a><br /> <a href="ft2-base_interface.html#ft_reference_face">FT_Reference_Face</a><br /> <a href="ft2-module_management.html#ft_reference_library">FT_Reference_Library</a><br /> <a href="ft2-module_management.html#ft_remove_module">FT_Remove_Module</a><br /> <a href="ft2-base_interface.html#ft_render_glyph">FT_Render_Glyph</a><br /> <a href="ft2-header_file_macros.html#ft_render_h">FT_RENDER_H</a><br /> <a href="ft2-base_interface.html#ft_render_mode">FT_Render_Mode</a><br /> <a href="ft2-base_interface.html#ft_render_mode">FT_RENDER_MODE_LCD</a><br /> <a href="ft2-base_interface.html#ft_render_mode">FT_RENDER_MODE_LCD_V</a><br /> <a href="ft2-base_interface.html#ft_render_mode">FT_RENDER_MODE_LIGHT</a><br /> <a href="ft2-base_interface.html#ft_render_mode">FT_RENDER_MODE_MONO</a><br /> <a href="ft2-base_interface.html#ft_render_mode">FT_RENDER_MODE_NORMAL</a><br /> <a href="ft2-base_interface.html#ft_render_mode">FT_RENDER_MODE_SDF</a><br /> <a href="ft2-module_management.html#ft_renderer">FT_Renderer</a><br /> <a href="ft2-module_management.html#ft_renderer_class">FT_Renderer_Class</a><br /> <a href="ft2-base_interface.html#ft_request_size">FT_Request_Size</a><br /> <a href="ft2-computations.html#ft_roundfix">FT_RoundFix</a><br /> <a href="ft2-base_interface.html#ft_select_charmap">FT_Select_Charmap</a><br /> <a href="ft2-base_interface.html#ft_select_size">FT_Select_Size</a><br /> <a href="ft2-base_interface.html#ft_set_char_size">FT_Set_Char_Size</a><br /> <a href="ft2-base_interface.html#ft_set_charmap">FT_Set_Charmap</a><br /> <a href="ft2-module_management.html#ft_set_debug_hook">FT_Set_Debug_Hook</a><br /> <a href="ft2-debugging_apis.html#ft_set_default_log_handler">FT_Set_Default_Log_Handler</a><br /> <a href="ft2-module_management.html#ft_set_default_properties">FT_Set_Default_Properties</a><br /> <a href="ft2-debugging_apis.html#ft_set_log_handler">FT_Set_Log_Handler</a><br /> <a href="ft2-multiple_masters.html#ft_set_mm_blend_coordinates">FT_Set_MM_Blend_Coordinates</a><br /> <a href="ft2-multiple_masters.html#ft_set_mm_design_coordinates">FT_Set_MM_Design_Coordinates</a><br /> <a href="ft2-multiple_masters.html#ft_set_mm_weightvector">FT_Set_MM_WeightVector</a><br /> <a href="ft2-multiple_masters.html#ft_set_named_instance">FT_Set_Named_Instance</a><br /> <a href="ft2-base_interface.html#ft_set_pixel_sizes">FT_Set_Pixel_Sizes</a><br /> <a href="ft2-module_management.html#ft_set_renderer">FT_Set_Renderer</a><br /> <a href="ft2-base_interface.html#ft_set_transform">FT_Set_Transform</a><br /> <a href="ft2-multiple_masters.html#ft_set_var_blend_coordinates">FT_Set_Var_Blend_Coordinates</a><br /> <a href="ft2-multiple_masters.html#ft_set_var_design_coordinates">FT_Set_Var_Design_Coordinates</a><br /> <a href="ft2-truetype_tables.html#ft_sfnt_tag">FT_SFNT_HEAD</a><br /> <a href="ft2-truetype_tables.html#ft_sfnt_tag">FT_SFNT_HHEA</a><br /> <a href="ft2-truetype_tables.html#ft_sfnt_tag">FT_SFNT_MAXP</a><br /> <a href="ft2-header_file_macros.html#ft_sfnt_names_h">FT_SFNT_NAMES_H</a><br /> <a href="ft2-truetype_tables.html#ft_sfnt_tag">FT_SFNT_OS2</a><br /> <a href="ft2-truetype_tables.html#ft_sfnt_tag">FT_SFNT_PCLT</a><br /> <a href="ft2-truetype_tables.html#ft_sfnt_tag">FT_SFNT_POST</a><br /> <a href="ft2-truetype_tables.html#ft_sfnt_table_info">FT_Sfnt_Table_Info</a><br /> <a href="ft2-truetype_tables.html#ft_sfnt_tag">FT_Sfnt_Tag</a><br /> <a href="ft2-truetype_tables.html#ft_sfnt_tag">FT_SFNT_VHEA</a><br /> <a href="ft2-sfnt_names.html#ft_sfntlangtag">FT_SfntLangTag</a><br /> <a href="ft2-sfnt_names.html#ft_sfntname">FT_SfntName</a><br /> <a href="ft2-basic_types.html#ft_short">FT_Short</a><br /> <a href="ft2-computations.html#ft_sin">FT_Sin</a><br /> <a href="ft2-base_interface.html#ft_size">FT_Size</a><br /> <a href="ft2-base_interface.html#ft_size_internal">FT_Size_Internal</a><br /> <a href="ft2-base_interface.html#ft_size_metrics">FT_Size_Metrics</a><br /> <a href="ft2-base_interface.html#ft_size_request">FT_Size_Request</a><br /> <a href="ft2-base_interface.html#ft_size_request_type">FT_Size_Request_Type</a><br /> <a href="ft2-base_interface.html#ft_size_request_type">FT_SIZE_REQUEST_TYPE_BBOX</a><br /> <a href="ft2-base_interface.html#ft_size_request_type">FT_SIZE_REQUEST_TYPE_CELL</a><br /> <a href="ft2-base_interface.html#ft_size_request_type">FT_SIZE_REQUEST_TYPE_NOMINAL</a><br /> <a href="ft2-base_interface.html#ft_size_request_type">FT_SIZE_REQUEST_TYPE_REAL_DIM</a><br /> <a href="ft2-base_interface.html#ft_size_request_type">FT_SIZE_REQUEST_TYPE_SCALES</a><br /> <a href="ft2-base_interface.html#ft_size_requestrec">FT_Size_RequestRec</a><br /> <a href="ft2-base_interface.html#ft_sizerec">FT_SizeRec</a><br /> <a href="ft2-header_file_macros.html#ft_sizes_h">FT_SIZES_H</a><br /> <a href="ft2-base_interface.html#ft_slot_internal">FT_Slot_Internal</a><br /> <a href="ft2-raster.html#ft_span">FT_Span</a><br /> <a href="ft2-raster.html#ft_spanfunc">FT_SpanFunc</a><br /> <a href="ft2-system_interface.html#ft_stream">FT_Stream</a><br /> <a href="ft2-system_interface.html#ft_stream_closefunc">FT_Stream_CloseFunc</a><br /> <a href="ft2-system_interface.html#ft_stream_iofunc">FT_Stream_IoFunc</a><br /> <a href="ft2-bzip2.html#ft_stream_openbzip2">FT_Stream_OpenBzip2</a><br /> <a href="ft2-gzip.html#ft_stream_opengzip">FT_Stream_OpenGzip</a><br /> <a href="ft2-lzw.html#ft_stream_openlzw">FT_Stream_OpenLZW</a><br /> <a href="ft2-system_interface.html#ft_streamdesc">FT_StreamDesc</a><br /> <a href="ft2-system_interface.html#ft_streamrec">FT_StreamRec</a><br /> <a href="ft2-basic_types.html#ft_string">FT_String</a><br /> <a href="ft2-glyph_stroker.html#ft_stroker">FT_Stroker</a><br /> <a href="ft2-glyph_stroker.html#ft_stroker_beginsubpath">FT_Stroker_BeginSubPath</a><br /> <a href="ft2-glyph_stroker.html#ft_strokerborder">FT_STROKER_BORDER_LEFT</a><br /> <a href="ft2-glyph_stroker.html#ft_strokerborder">FT_STROKER_BORDER_RIGHT</a><br /> <a href="ft2-glyph_stroker.html#ft_stroker_conicto">FT_Stroker_ConicTo</a><br /> <a href="ft2-glyph_stroker.html#ft_stroker_cubicto">FT_Stroker_CubicTo</a><br /> <a href="ft2-glyph_stroker.html#ft_stroker_done">FT_Stroker_Done</a><br /> <a href="ft2-glyph_stroker.html#ft_stroker_endsubpath">FT_Stroker_EndSubPath</a><br /> <a href="ft2-glyph_stroker.html#ft_stroker_export">FT_Stroker_Export</a><br /> <a href="ft2-glyph_stroker.html#ft_stroker_exportborder">FT_Stroker_ExportBorder</a><br /> <a href="ft2-glyph_stroker.html#ft_stroker_getbordercounts">FT_Stroker_GetBorderCounts</a><br /> <a href="ft2-glyph_stroker.html#ft_stroker_getcounts">FT_Stroker_GetCounts</a><br /> <a href="ft2-header_file_macros.html#ft_stroker_h">FT_STROKER_H</a><br /> <a href="ft2-glyph_stroker.html#ft_stroker_linecap">FT_Stroker_LineCap</a><br /> <a href="ft2-glyph_stroker.html#ft_stroker_linecap">FT_STROKER_LINECAP_BUTT</a><br /> <a href="ft2-glyph_stroker.html#ft_stroker_linecap">FT_STROKER_LINECAP_ROUND</a><br /> <a href="ft2-glyph_stroker.html#ft_stroker_linecap">FT_STROKER_LINECAP_SQUARE</a><br /> <a href="ft2-glyph_stroker.html#ft_stroker_linejoin">FT_Stroker_LineJoin</a><br /> <a href="ft2-glyph_stroker.html#ft_stroker_linejoin">FT_STROKER_LINEJOIN_BEVEL</a><br /> <a href="ft2-glyph_stroker.html#ft_stroker_linejoin">FT_STROKER_LINEJOIN_MITER</a><br /> <a href="ft2-glyph_stroker.html#ft_stroker_linejoin">FT_STROKER_LINEJOIN_MITER_FIXED</a><br /> <a href="ft2-glyph_stroker.html#ft_stroker_linejoin">FT_STROKER_LINEJOIN_MITER_VARIABLE</a><br /> <a href="ft2-glyph_stroker.html#ft_stroker_linejoin">FT_STROKER_LINEJOIN_ROUND</a><br /> <a href="ft2-glyph_stroker.html#ft_stroker_lineto">FT_Stroker_LineTo</a><br /> <a href="ft2-glyph_stroker.html#ft_stroker_new">FT_Stroker_New</a><br /> <a href="ft2-glyph_stroker.html#ft_stroker_parseoutline">FT_Stroker_ParseOutline</a><br /> <a href="ft2-glyph_stroker.html#ft_stroker_rewind">FT_Stroker_Rewind</a><br /> <a href="ft2-glyph_stroker.html#ft_stroker_set">FT_Stroker_Set</a><br /> <a href="ft2-glyph_stroker.html#ft_strokerborder">FT_StrokerBorder</a><br /> <a href="ft2-base_interface.html#ft_style_flag_xxx">FT_STYLE_FLAG_BOLD</a><br /> <a href="ft2-base_interface.html#ft_style_flag_xxx">FT_STYLE_FLAG_ITALIC</a><br /> <a href="ft2-base_interface.html#ft_style_flag_xxx">FT_STYLE_FLAG_XXX</a><br /> <a href="ft2-base_interface.html#ft_subglyph">FT_SubGlyph</a><br /> <a href="ft2-base_interface.html#ft_subglyph_flag_xxx">FT_SUBGLYPH_FLAG_2X2</a><br /> <a href="ft2-base_interface.html#ft_subglyph_flag_xxx">FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS</a><br /> <a href="ft2-base_interface.html#ft_subglyph_flag_xxx">FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES</a><br /> <a href="ft2-base_interface.html#ft_subglyph_flag_xxx">FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID</a><br /> <a href="ft2-base_interface.html#ft_subglyph_flag_xxx">FT_SUBGLYPH_FLAG_SCALE</a><br /> <a href="ft2-base_interface.html#ft_subglyph_flag_xxx">FT_SUBGLYPH_FLAG_USE_MY_METRICS</a><br /> <a href="ft2-base_interface.html#ft_subglyph_flag_xxx">FT_SUBGLYPH_FLAG_XXX</a><br /> <a href="ft2-base_interface.html#ft_subglyph_flag_xxx">FT_SUBGLYPH_FLAG_XY_SCALE</a><br /> <a href="ft2-svg_fonts.html#ft_svg_document">FT_SVG_Document</a><br /> <a href="ft2-svg_fonts.html#ft_svg_documentrec">FT_SVG_DocumentRec</a><br /> <a href="ft2-glyph_management.html#ft_svgglyph">FT_SvgGlyph</a><br /> <a href="ft2-glyph_management.html#ft_svgglyphrec">FT_SvgGlyphRec</a><br /> <a href="ft2-header_file_macros.html#ft_synthesis_h">FT_SYNTHESIS_H</a><br /> <a href="ft2-header_file_macros.html#ft_system_h">FT_SYSTEM_H</a><br /> <a href="ft2-basic_types.html#ft_tag">FT_Tag</a><br /> <a href="ft2-computations.html#ft_tan">FT_Tan</a><br /> <a href="ft2-debugging_apis.html#ft_trace_set_default_level">FT_Trace_Set_Default_Level</a><br /> <a href="ft2-debugging_apis.html#ft_trace_set_level">FT_Trace_Set_Level</a><br /> <a href="ft2-header_file_macros.html#ft_trigonometry_h">FT_TRIGONOMETRY_H</a><br /> <a href="ft2-header_file_macros.html#ft_truetype_driver_h">FT_TRUETYPE_DRIVER_H</a><br /> <a href="ft2-truetype_engine.html#ft_truetypeenginetype">FT_TRUETYPE_ENGINE_TYPE_NONE</a><br /> <a href="ft2-truetype_engine.html#ft_truetypeenginetype">FT_TRUETYPE_ENGINE_TYPE_PATENTED</a><br /> <a href="ft2-truetype_engine.html#ft_truetypeenginetype">FT_TRUETYPE_ENGINE_TYPE_UNPATENTED</a><br /> <a href="ft2-header_file_macros.html#ft_truetype_ids_h">FT_TRUETYPE_IDS_H</a><br /> <a href="ft2-header_file_macros.html#ft_truetype_tables_h">FT_TRUETYPE_TABLES_H</a><br /> <a href="ft2-header_file_macros.html#ft_truetype_tags_h">FT_TRUETYPE_TAGS_H</a><br /> <a href="ft2-truetype_engine.html#ft_truetypeenginetype">FT_TrueTypeEngineType</a><br /> <a href="ft2-gx_validation.html#ft_truetypegx_free">FT_TrueTypeGX_Free</a><br /> <a href="ft2-gx_validation.html#ft_truetypegx_validate">FT_TrueTypeGX_Validate</a><br /> <a href="ft2-header_file_macros.html#ft_type1_tables_h">FT_TYPE1_TABLES_H</a><br /> <a href="ft2-header_file_macros.html#ft_types_h">FT_TYPES_H</a><br /> <a href="ft2-basic_types.html#ft_ufword">FT_UFWord</a><br /> <a href="ft2-basic_types.html#ft_uint">FT_UInt</a><br /> <a href="ft2-basic_types.html#ft_uint16">FT_UInt16</a><br /> <a href="ft2-basic_types.html#ft_uint32">FT_UInt32</a><br /> <a href="ft2-basic_types.html#ft_uint64">FT_UInt64</a><br /> <a href="ft2-basic_types.html#ft_ulong">FT_ULong</a><br /> <a href="ft2-basic_types.html#ft_unitvector">FT_UnitVector</a><br /> <a href="ft2-basic_types.html#ft_ushort">FT_UShort</a><br /> <a href="ft2-gx_validation.html#ft_validate_ckernxxx">FT_VALIDATE_APPLE</a><br /> <a href="ft2-ot_validation.html#ft_validate_otxxx">FT_VALIDATE_BASE</a><br /> <a href="ft2-gx_validation.html#ft_validate_gxxxx">FT_VALIDATE_bsln</a><br /> <a href="ft2-gx_validation.html#ft_validate_ckernxxx">FT_VALIDATE_CKERN</a><br /> <a href="ft2-gx_validation.html#ft_validate_ckernxxx">FT_VALIDATE_CKERNXXX</a><br /> <a href="ft2-gx_validation.html#ft_validate_gxxxx">FT_VALIDATE_feat</a><br /> <a href="ft2-ot_validation.html#ft_validate_otxxx">FT_VALIDATE_GDEF</a><br /> <a href="ft2-ot_validation.html#ft_validate_otxxx">FT_VALIDATE_GPOS</a><br /> <a href="ft2-ot_validation.html#ft_validate_otxxx">FT_VALIDATE_GSUB</a><br /> <a href="ft2-gx_validation.html#ft_validate_gxxxx">FT_VALIDATE_GX</a><br /> <a href="ft2-gx_validation.html#ft_validate_gx_length">FT_VALIDATE_GX_LENGTH</a><br /> <a href="ft2-gx_validation.html#ft_validate_gxxxx">FT_VALIDATE_GXXXX</a><br /> <a href="ft2-ot_validation.html#ft_validate_otxxx">FT_VALIDATE_JSTF</a><br /> <a href="ft2-gx_validation.html#ft_validate_gxxxx">FT_VALIDATE_just</a><br /> <a href="ft2-gx_validation.html#ft_validate_gxxxx">FT_VALIDATE_kern</a><br /> <a href="ft2-gx_validation.html#ft_validate_gxxxx">FT_VALIDATE_lcar</a><br /> <a href="ft2-ot_validation.html#ft_validate_otxxx">FT_VALIDATE_MATH</a><br /> <a href="ft2-gx_validation.html#ft_validate_gxxxx">FT_VALIDATE_mort</a><br /> <a href="ft2-gx_validation.html#ft_validate_gxxxx">FT_VALIDATE_morx</a><br /> <a href="ft2-gx_validation.html#ft_validate_ckernxxx">FT_VALIDATE_MS</a><br /> <a href="ft2-gx_validation.html#ft_validate_gxxxx">FT_VALIDATE_opbd</a><br /> <a href="ft2-ot_validation.html#ft_validate_otxxx">FT_VALIDATE_OT</a><br /> <a href="ft2-ot_validation.html#ft_validate_otxxx">FT_VALIDATE_OTXXX</a><br /> <a href="ft2-gx_validation.html#ft_validate_gxxxx">FT_VALIDATE_prop</a><br /> <a href="ft2-gx_validation.html#ft_validate_gxxxx">FT_VALIDATE_trak</a><br /> <a href="ft2-multiple_masters.html#ft_var_axis">FT_Var_Axis</a><br /> <a href="ft2-multiple_masters.html#ft_var_axis_flag_xxx">FT_VAR_AXIS_FLAG_HIDDEN</a><br /> <a href="ft2-multiple_masters.html#ft_var_axis_flag_xxx">FT_VAR_AXIS_FLAG_XXX</a><br /> <a href="ft2-multiple_masters.html#ft_var_named_style">FT_Var_Named_Style</a><br /> <a href="ft2-basic_types.html#ft_vector">FT_Vector</a><br /> <a href="ft2-computations.html#ft_vector_from_polar">FT_Vector_From_Polar</a><br /> <a href="ft2-computations.html#ft_vector_length">FT_Vector_Length</a><br /> <a href="ft2-computations.html#ft_vector_polarize">FT_Vector_Polarize</a><br /> <a href="ft2-computations.html#ft_vector_rotate">FT_Vector_Rotate</a><br /> <a href="ft2-computations.html#ft_vector_transform">FT_Vector_Transform</a><br /> <a href="ft2-computations.html#ft_vector_unit">FT_Vector_Unit</a><br /> <a href="ft2-winfnt_fonts.html#ft_winfnt_header">FT_WinFNT_Header</a><br /> <a href="ft2-winfnt_fonts.html#ft_winfnt_headerrec">FT_WinFNT_HeaderRec</a><br /> <a href="ft2-winfnt_fonts.html#ft_winfnt_id_xxx">FT_WinFNT_ID_CP1250</a><br /> <a href="ft2-winfnt_fonts.html#ft_winfnt_id_xxx">FT_WinFNT_ID_CP1251</a><br /> <a href="ft2-winfnt_fonts.html#ft_winfnt_id_xxx">FT_WinFNT_ID_CP1252</a><br /> <a href="ft2-winfnt_fonts.html#ft_winfnt_id_xxx">FT_WinFNT_ID_CP1253</a><br /> <a href="ft2-winfnt_fonts.html#ft_winfnt_id_xxx">FT_WinFNT_ID_CP1254</a><br /> <a href="ft2-winfnt_fonts.html#ft_winfnt_id_xxx">FT_WinFNT_ID_CP1255</a><br /> <a href="ft2-winfnt_fonts.html#ft_winfnt_id_xxx">FT_WinFNT_ID_CP1256</a><br /> <a href="ft2-winfnt_fonts.html#ft_winfnt_id_xxx">FT_WinFNT_ID_CP1257</a><br /> <a href="ft2-winfnt_fonts.html#ft_winfnt_id_xxx">FT_WinFNT_ID_CP1258</a><br /> <a href="ft2-winfnt_fonts.html#ft_winfnt_id_xxx">FT_WinFNT_ID_CP1361</a><br /> <a href="ft2-winfnt_fonts.html#ft_winfnt_id_xxx">FT_WinFNT_ID_CP874</a><br /> <a href="ft2-winfnt_fonts.html#ft_winfnt_id_xxx">FT_WinFNT_ID_CP932</a><br /> <a href="ft2-winfnt_fonts.html#ft_winfnt_id_xxx">FT_WinFNT_ID_CP936</a><br /> <a href="ft2-winfnt_fonts.html#ft_winfnt_id_xxx">FT_WinFNT_ID_CP949</a><br /> <a href="ft2-winfnt_fonts.html#ft_winfnt_id_xxx">FT_WinFNT_ID_CP950</a><br /> <a href="ft2-winfnt_fonts.html#ft_winfnt_id_xxx">FT_WinFNT_ID_DEFAULT</a><br /> <a href="ft2-winfnt_fonts.html#ft_winfnt_id_xxx">FT_WinFNT_ID_MAC</a><br /> <a href="ft2-winfnt_fonts.html#ft_winfnt_id_xxx">FT_WinFNT_ID_OEM</a><br /> <a href="ft2-winfnt_fonts.html#ft_winfnt_id_xxx">FT_WinFNT_ID_SYMBOL</a><br /> <a href="ft2-winfnt_fonts.html#ft_winfnt_id_xxx">FT_WinFNT_ID_XXX</a><br /> <a href="ft2-header_file_macros.html#ft_winfonts_h">FT_WINFONTS_H</a><br /> <a href="ft2-cache_subsystem.html#ftc_cmapcache">FTC_CMapCache</a><br /> <a href="ft2-cache_subsystem.html#ftc_cmapcache_lookup">FTC_CMapCache_Lookup</a><br /> <a href="ft2-cache_subsystem.html#ftc_cmapcache_new">FTC_CMapCache_New</a><br /> <a href="ft2-cache_subsystem.html#ftc_face_requester">FTC_Face_Requester</a><br /> <a href="ft2-cache_subsystem.html#ftc_faceid">FTC_FaceID</a><br /> <a href="ft2-cache_subsystem.html#ftc_imagecache">FTC_ImageCache</a><br /> <a href="ft2-cache_subsystem.html#ftc_imagecache_lookup">FTC_ImageCache_Lookup</a><br /> <a href="ft2-cache_subsystem.html#ftc_imagecache_lookupscaler">FTC_ImageCache_LookupScaler</a><br /> <a href="ft2-cache_subsystem.html#ftc_imagecache_new">FTC_ImageCache_New</a><br /> <a href="ft2-cache_subsystem.html#ftc_imagetype">FTC_ImageType</a><br /> <a href="ft2-cache_subsystem.html#ftc_imagetyperec">FTC_ImageTypeRec</a><br /> <a href="ft2-cache_subsystem.html#ftc_manager">FTC_Manager</a><br /> <a href="ft2-cache_subsystem.html#ftc_manager_done">FTC_Manager_Done</a><br /> <a href="ft2-cache_subsystem.html#ftc_manager_lookupface">FTC_Manager_LookupFace</a><br /> <a href="ft2-cache_subsystem.html#ftc_manager_lookupsize">FTC_Manager_LookupSize</a><br /> <a href="ft2-cache_subsystem.html#ftc_manager_new">FTC_Manager_New</a><br /> <a href="ft2-cache_subsystem.html#ftc_manager_removefaceid">FTC_Manager_RemoveFaceID</a><br /> <a href="ft2-cache_subsystem.html#ftc_manager_reset">FTC_Manager_Reset</a><br /> <a href="ft2-cache_subsystem.html#ftc_node">FTC_Node</a><br /> <a href="ft2-cache_subsystem.html#ftc_node_unref">FTC_Node_Unref</a><br /> <a href="ft2-cache_subsystem.html#ftc_sbit">FTC_SBit</a><br /> <a href="ft2-cache_subsystem.html#ftc_sbitcache">FTC_SBitCache</a><br /> <a href="ft2-cache_subsystem.html#ftc_sbitcache_lookup">FTC_SBitCache_Lookup</a><br /> <a href="ft2-cache_subsystem.html#ftc_sbitcache_lookupscaler">FTC_SBitCache_LookupScaler</a><br /> <a href="ft2-cache_subsystem.html#ftc_sbitcache_new">FTC_SBitCache_New</a><br /> <a href="ft2-cache_subsystem.html#ftc_sbitrec">FTC_SBitRec</a><br /> <a href="ft2-cache_subsystem.html#ftc_scaler">FTC_Scaler</a><br /> <a href="ft2-cache_subsystem.html#ftc_scalerrec">FTC_ScalerRec</a> </p> <h3 id="g">G<a class="headerlink" href="#g" title="Permanent link">&para;</a></h3> <p><a href="ft2-properties.html#glyph-to-script-map">glyph-to-script-map</a> </p> <h3 id="h">H<a class="headerlink" href="#h" title="Permanent link">&para;</a></h3> <p><a href="ft2-properties.html#hinting-engine">hinting-engine</a> </p> <h3 id="i">I<a class="headerlink" href="#i" title="Permanent link">&para;</a></h3> <p><a href="ft2-properties.html#increase-x-height">increase-x-height</a><br /> <a href="ft2-properties.html#interpreter-version">interpreter-version</a> </p> <h3 id="n">N<a class="headerlink" href="#n" title="Permanent link">&para;</a></h3> <p><a href="ft2-properties.html#no-long-family-names">no-long-family-names</a><br /> <a href="ft2-properties.html#no-stem-darkening">no-stem-darkening</a> </p> <h3 id="p">P<a class="headerlink" href="#p" title="Permanent link">&para;</a></h3> <p><a href="ft2-type1_tables.html#ps_dict_keys">PS_DICT_BLUE_FUZZ</a><br /> <a href="ft2-type1_tables.html#ps_dict_keys">PS_DICT_BLUE_SCALE</a><br /> <a href="ft2-type1_tables.html#ps_dict_keys">PS_DICT_BLUE_SHIFT</a><br /> <a href="ft2-type1_tables.html#ps_dict_keys">PS_DICT_BLUE_VALUE</a><br /> <a href="ft2-type1_tables.html#ps_dict_keys">PS_DICT_CHAR_STRING</a><br /> <a href="ft2-type1_tables.html#ps_dict_keys">PS_DICT_CHAR_STRING_KEY</a><br /> <a href="ft2-type1_tables.html#ps_dict_keys">PS_DICT_ENCODING_ENTRY</a><br /> <a href="ft2-type1_tables.html#ps_dict_keys">PS_DICT_ENCODING_TYPE</a><br /> <a href="ft2-type1_tables.html#ps_dict_keys">PS_DICT_FAMILY_BLUE</a><br /> <a href="ft2-type1_tables.html#ps_dict_keys">PS_DICT_FAMILY_NAME</a><br /> <a href="ft2-type1_tables.html#ps_dict_keys">PS_DICT_FAMILY_OTHER_BLUE</a><br /> <a href="ft2-type1_tables.html#ps_dict_keys">PS_DICT_FONT_BBOX</a><br /> <a href="ft2-type1_tables.html#ps_dict_keys">PS_DICT_FONT_MATRIX</a><br /> <a href="ft2-type1_tables.html#ps_dict_keys">PS_DICT_FONT_NAME</a><br /> <a href="ft2-type1_tables.html#ps_dict_keys">PS_DICT_FONT_TYPE</a><br /> <a href="ft2-type1_tables.html#ps_dict_keys">PS_DICT_FORCE_BOLD</a><br /> <a href="ft2-type1_tables.html#ps_dict_keys">PS_DICT_FS_TYPE</a><br /> <a href="ft2-type1_tables.html#ps_dict_keys">PS_DICT_FULL_NAME</a><br /> <a href="ft2-type1_tables.html#ps_dict_keys">PS_DICT_IS_FIXED_PITCH</a><br /> <a href="ft2-type1_tables.html#ps_dict_keys">PS_DICT_ITALIC_ANGLE</a><br /> <a href="ft2-type1_tables.html#ps_dict_keys">PS_Dict_Keys</a><br /> <a href="ft2-type1_tables.html#ps_dict_keys">PS_DICT_LANGUAGE_GROUP</a><br /> <a href="ft2-type1_tables.html#ps_dict_keys">PS_DICT_LEN_IV</a><br /> <a href="ft2-type1_tables.html#ps_dict_keys">PS_DICT_MIN_FEATURE</a><br /> <a href="ft2-type1_tables.html#ps_dict_keys">PS_DICT_NOTICE</a><br /> <a href="ft2-type1_tables.html#ps_dict_keys">PS_DICT_NUM_BLUE_VALUES</a><br /> <a href="ft2-type1_tables.html#ps_dict_keys">PS_DICT_NUM_CHAR_STRINGS</a><br /> <a href="ft2-type1_tables.html#ps_dict_keys">PS_DICT_NUM_FAMILY_BLUES</a><br /> <a href="ft2-type1_tables.html#ps_dict_keys">PS_DICT_NUM_FAMILY_OTHER_BLUES</a><br /> <a href="ft2-type1_tables.html#ps_dict_keys">PS_DICT_NUM_OTHER_BLUES</a><br /> <a href="ft2-type1_tables.html#ps_dict_keys">PS_DICT_NUM_STEM_SNAP_H</a><br /> <a href="ft2-type1_tables.html#ps_dict_keys">PS_DICT_NUM_STEM_SNAP_V</a><br /> <a href="ft2-type1_tables.html#ps_dict_keys">PS_DICT_NUM_SUBRS</a><br /> <a href="ft2-type1_tables.html#ps_dict_keys">PS_DICT_OTHER_BLUE</a><br /> <a href="ft2-type1_tables.html#ps_dict_keys">PS_DICT_PAINT_TYPE</a><br /> <a href="ft2-type1_tables.html#ps_dict_keys">PS_DICT_PASSWORD</a><br /> <a href="ft2-type1_tables.html#ps_dict_keys">PS_DICT_RND_STEM_UP</a><br /> <a href="ft2-type1_tables.html#ps_dict_keys">PS_DICT_STD_HW</a><br /> <a href="ft2-type1_tables.html#ps_dict_keys">PS_DICT_STD_VW</a><br /> <a href="ft2-type1_tables.html#ps_dict_keys">PS_DICT_STEM_SNAP_H</a><br /> <a href="ft2-type1_tables.html#ps_dict_keys">PS_DICT_STEM_SNAP_V</a><br /> <a href="ft2-type1_tables.html#ps_dict_keys">PS_DICT_SUBR</a><br /> <a href="ft2-type1_tables.html#ps_dict_keys">PS_DICT_UNDERLINE_POSITION</a><br /> <a href="ft2-type1_tables.html#ps_dict_keys">PS_DICT_UNDERLINE_THICKNESS</a><br /> <a href="ft2-type1_tables.html#ps_dict_keys">PS_DICT_UNIQUE_ID</a><br /> <a href="ft2-type1_tables.html#ps_dict_keys">PS_DICT_VERSION</a><br /> <a href="ft2-type1_tables.html#ps_dict_keys">PS_DICT_WEIGHT</a><br /> <a href="ft2-type1_tables.html#ps_fontinfo">PS_FontInfo</a><br /> <a href="ft2-type1_tables.html#ps_fontinforec">PS_FontInfoRec</a><br /> <a href="ft2-type1_tables.html#ps_private">PS_Private</a><br /> <a href="ft2-type1_tables.html#ps_privaterec">PS_PrivateRec</a> </p> <h3 id="r">R<a class="headerlink" href="#r" title="Permanent link">&para;</a></h3> <p><a href="ft2-properties.html#random-seed">random-seed</a> </p> <h3 id="s">S<a class="headerlink" href="#s" title="Permanent link">&para;</a></h3> <p><a href="ft2-properties.html#svg-hooks">svg-hooks</a><br /> <a href="ft2-svg_fonts.html#svg_lib_free_func">SVG_Lib_Free_Func</a><br /> <a href="ft2-svg_fonts.html#svg_lib_init_func">SVG_Lib_Init_Func</a><br /> <a href="ft2-svg_fonts.html#svg_lib_preset_slot_func">SVG_Lib_Preset_Slot_Func</a><br /> <a href="ft2-svg_fonts.html#svg_lib_render_func">SVG_Lib_Render_Func</a><br /> <a href="ft2-svg_fonts.html#svg_rendererhooks">SVG_RendererHooks</a> </p> <h3 id="t">T<a class="headerlink" href="#t" title="Permanent link">&para;</a></h3> <p><a href="ft2-type1_tables.html#t1_blend_flags">T1_BLEND_BLUE_SCALE</a><br /> <a href="ft2-type1_tables.html#t1_blend_flags">T1_BLEND_BLUE_SHIFT</a><br /> <a href="ft2-type1_tables.html#t1_blend_flags">T1_BLEND_BLUE_VALUES</a><br /> <a href="ft2-type1_tables.html#t1_blend_flags">T1_BLEND_FAMILY_BLUES</a><br /> <a href="ft2-type1_tables.html#t1_blend_flags">T1_BLEND_FAMILY_OTHER_BLUES</a><br /> <a href="ft2-type1_tables.html#t1_blend_flags">T1_Blend_Flags</a><br /> <a href="ft2-type1_tables.html#t1_blend_flags">T1_BLEND_FORCE_BOLD</a><br /> <a href="ft2-type1_tables.html#t1_blend_flags">T1_BLEND_ITALIC_ANGLE</a><br /> <a href="ft2-type1_tables.html#t1_blend_flags">T1_BLEND_OTHER_BLUES</a><br /> <a href="ft2-type1_tables.html#t1_blend_flags">T1_BLEND_STANDARD_HEIGHT</a><br /> <a href="ft2-type1_tables.html#t1_blend_flags">T1_BLEND_STANDARD_WIDTH</a><br /> <a href="ft2-type1_tables.html#t1_blend_flags">T1_BLEND_STEM_SNAP_HEIGHTS</a><br /> <a href="ft2-type1_tables.html#t1_blend_flags">T1_BLEND_STEM_SNAP_WIDTHS</a><br /> <a href="ft2-type1_tables.html#t1_blend_flags">T1_BLEND_UNDERLINE_POSITION</a><br /> <a href="ft2-type1_tables.html#t1_blend_flags">T1_BLEND_UNDERLINE_THICKNESS</a><br /> <a href="ft2-type1_tables.html#t1_encodingtype">T1_ENCODING_TYPE_ARRAY</a><br /> <a href="ft2-type1_tables.html#t1_encodingtype">T1_ENCODING_TYPE_EXPERT</a><br /> <a href="ft2-type1_tables.html#t1_encodingtype">T1_ENCODING_TYPE_ISOLATIN1</a><br /> <a href="ft2-type1_tables.html#t1_encodingtype">T1_ENCODING_TYPE_NONE</a><br /> <a href="ft2-type1_tables.html#t1_encodingtype">T1_ENCODING_TYPE_STANDARD</a><br /> <a href="ft2-type1_tables.html#t1_encodingtype">T1_EncodingType</a><br /> <a href="ft2-type1_tables.html#t1_fontinfo">T1_FontInfo</a><br /> <a href="ft2-type1_tables.html#t1_private">T1_Private</a><br /> <a href="ft2-truetype_tables.html#tt_adobe_id_xxx">TT_ADOBE_ID_CUSTOM</a><br /> <a href="ft2-truetype_tables.html#tt_adobe_id_xxx">TT_ADOBE_ID_EXPERT</a><br /> <a href="ft2-truetype_tables.html#tt_adobe_id_xxx">TT_ADOBE_ID_LATIN_1</a><br /> <a href="ft2-truetype_tables.html#tt_adobe_id_xxx">TT_ADOBE_ID_STANDARD</a><br /> <a href="ft2-truetype_tables.html#tt_adobe_id_xxx">TT_ADOBE_ID_XXX</a><br /> <a href="ft2-truetype_tables.html#tt_apple_id_xxx">TT_APPLE_ID_DEFAULT</a><br /> <a href="ft2-truetype_tables.html#tt_apple_id_xxx">TT_APPLE_ID_FULL_UNICODE</a><br /> <a href="ft2-truetype_tables.html#tt_apple_id_xxx">TT_APPLE_ID_ISO_10646</a><br /> <a href="ft2-truetype_tables.html#tt_apple_id_xxx">TT_APPLE_ID_UNICODE_1_1</a><br /> <a href="ft2-truetype_tables.html#tt_apple_id_xxx">TT_APPLE_ID_UNICODE_2_0</a><br /> <a href="ft2-truetype_tables.html#tt_apple_id_xxx">TT_APPLE_ID_UNICODE_32</a><br /> <a href="ft2-truetype_tables.html#tt_apple_id_xxx">TT_APPLE_ID_VARIANT_SELECTOR</a><br /> <a href="ft2-truetype_tables.html#tt_apple_id_xxx">TT_APPLE_ID_XXX</a><br /> <a href="ft2-truetype_tables.html#tt_header">TT_Header</a><br /> <a href="ft2-truetype_tables.html#tt_horiheader">TT_HoriHeader</a><br /> <a href="ft2-properties.html#tt_interpreter_version_xxx">TT_INTERPRETER_VERSION_35</a><br /> <a href="ft2-properties.html#tt_interpreter_version_xxx">TT_INTERPRETER_VERSION_38</a><br /> <a href="ft2-properties.html#tt_interpreter_version_xxx">TT_INTERPRETER_VERSION_40</a><br /> <a href="ft2-properties.html#tt_interpreter_version_xxx">TT_INTERPRETER_VERSION_XXX</a><br /> <a href="ft2-truetype_tables.html#tt_iso_id_xxx">TT_ISO_ID_10646</a><br /> <a href="ft2-truetype_tables.html#tt_iso_id_xxx">TT_ISO_ID_7BIT_ASCII</a><br /> <a href="ft2-truetype_tables.html#tt_iso_id_xxx">TT_ISO_ID_8859_1</a><br /> <a href="ft2-truetype_tables.html#tt_iso_id_xxx">TT_ISO_ID_XXX</a><br /> <a href="ft2-truetype_tables.html#tt_mac_id_xxx">TT_MAC_ID_XXX</a><br /> <a href="ft2-truetype_tables.html#tt_mac_langid_xxx">TT_MAC_LANGID_XXX</a><br /> <a href="ft2-truetype_tables.html#tt_maxprofile">TT_MaxProfile</a><br /> <a href="ft2-truetype_tables.html#tt_ms_id_xxx">TT_MS_ID_BIG_5</a><br /> <a href="ft2-truetype_tables.html#tt_ms_id_xxx">TT_MS_ID_JOHAB</a><br /> <a href="ft2-truetype_tables.html#tt_ms_id_xxx">TT_MS_ID_PRC</a><br /> <a href="ft2-truetype_tables.html#tt_ms_id_xxx">TT_MS_ID_SJIS</a><br /> <a href="ft2-truetype_tables.html#tt_ms_id_xxx">TT_MS_ID_SYMBOL_CS</a><br /> <a href="ft2-truetype_tables.html#tt_ms_id_xxx">TT_MS_ID_UCS_4</a><br /> <a href="ft2-truetype_tables.html#tt_ms_id_xxx">TT_MS_ID_UNICODE_CS</a><br /> <a href="ft2-truetype_tables.html#tt_ms_id_xxx">TT_MS_ID_WANSUNG</a><br /> <a href="ft2-truetype_tables.html#tt_ms_id_xxx">TT_MS_ID_XXX</a><br /> <a href="ft2-truetype_tables.html#tt_ms_langid_xxx">TT_MS_LANGID_XXX</a><br /> <a href="ft2-truetype_tables.html#tt_name_id_xxx">TT_NAME_ID_XXX</a><br /> <a href="ft2-truetype_tables.html#tt_os2">TT_OS2</a><br /> <a href="ft2-truetype_tables.html#tt_pclt">TT_PCLT</a><br /> <a href="ft2-truetype_tables.html#tt_platform_xxx">TT_PLATFORM_ADOBE</a><br /> <a href="ft2-truetype_tables.html#tt_platform_xxx">TT_PLATFORM_APPLE_UNICODE</a><br /> <a href="ft2-truetype_tables.html#tt_platform_xxx">TT_PLATFORM_CUSTOM</a><br /> <a href="ft2-truetype_tables.html#tt_platform_xxx">TT_PLATFORM_ISO</a><br /> <a href="ft2-truetype_tables.html#tt_platform_xxx">TT_PLATFORM_MACINTOSH</a><br /> <a href="ft2-truetype_tables.html#tt_platform_xxx">TT_PLATFORM_MICROSOFT</a><br /> <a href="ft2-truetype_tables.html#tt_platform_xxx">TT_PLATFORM_XXX</a><br /> <a href="ft2-truetype_tables.html#tt_postscript">TT_Postscript</a><br /> <a href="ft2-truetype_tables.html#tt_ucr_xxx">TT_UCR_XXX</a><br /> <a href="ft2-truetype_tables.html#tt_vertheader">TT_VertHeader</a> </p> <h3 id="w">W<a class="headerlink" href="#w" title="Permanent link">&para;</a></h3> <p><a href="ft2-properties.html#warping">warping</a> </p> <hr /> <div class="timestamp">generated on Thu Mar 31 12:00:59 2022 UTC</div> </article> </div> </div> </main> <footer class="md-footer"> <nav class="md-footer__inner md-grid" aria-label="Footer"> <a href="index.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: TOC" rel="prev"> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Previous </span> TOC </div> </div> </a> <a href="ft2-preamble.html" class="md-footer__link md-footer__link--next" aria-label="Next: Preamble" rel="next"> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Next </span> Preamble </div> </div> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg> </div> </a> </nav> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-footer-copyright"> <div class="md-footer-copyright__highlight"> Copyright 2022 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>. </div> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"base": ".", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "assets/javascripts/workers/search.477d984a.min.js", "version": null}</script> <script src="assets/javascripts/bundle.82b56eb2.min.js"></script> <script src="javascripts/extra.js"></script> </body> </html>
whupdup/frame
real/third_party/freetype-2.12.0/docs/reference/ft2-index.html
HTML
gpl-3.0
99,915
<!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="description" content="API Reference Documentation for FreeType-2.12.0"> <meta name="author" content="FreeType Contributors"> <link rel="icon" href="images/favico.ico"> <meta name="generator" content="mkdocs-1.2.1, mkdocs-material-7.1.9"> <title>Subpixel Rendering - FreeType-2.12.0 API Reference</title> <link rel="stylesheet" href="assets/stylesheets/main.ca7ac06f.min.css"> <link rel="stylesheet" href="assets/stylesheets/palette.f1a3b89f.min.css"> <meta name="theme-color" content="#4cae4f"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback"> <style>:root{--md-text-font-family:"Noto Serif";--md-code-font-family:"Roboto Mono"}</style> <link rel="stylesheet" href="stylesheets/extra.css"> </head> <body dir="ltr" data-md-color-scheme="" data-md-color-primary="green" data-md-color-accent="green"> <script>function __prefix(e){return new URL(".",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <label class="md-overlay" for="__drawer"></label> <div data-md-component="skip"> <a href="#subpixel-rendering" class="md-skip"> Skip to content </a> </div> <div data-md-component="announce"> </div> <header class="md-header" data-md-component="header"> <nav class="md-header__inner md-grid" aria-label="Header"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> <label class="md-header__button md-icon" for="__drawer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg> </label> <div class="md-header__title" data-md-component="header-title"> <div class="md-header__ellipsis"> <div class="md-header__topic"> <span class="md-ellipsis"> FreeType-2.12.0 API Reference </span> </div> <div class="md-header__topic" data-md-component="header-topic"> <span class="md-ellipsis"> Subpixel Rendering </span> </div> </div> </div> <label class="md-header__button md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> </label> <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required> <label class="md-search__icon md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </label> <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg> </button> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" data-md-scrollfix> <div class="md-search-result" data-md-component="search-result"> <div class="md-search-result__meta"> Initializing search </div> <ol class="md-search-result__list"></ol> </div> </div> </div> </div> </div> </nav> </header> <div class="md-container" data-md-component="container"> <main class="md-main" data-md-component="main"> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <label class="md-nav__title" for="__drawer"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> FreeType-2.12.0 API Reference </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="index.html" class="md-nav__link"> TOC </a> </li> <li class="md-nav__item"> <a href="ft2-index.html" class="md-nav__link"> Index </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" > <label class="md-nav__link" for="__nav_3"> General Remarks <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="General Remarks" data-md-level="1"> <label class="md-nav__title" for="__nav_3"> <span class="md-nav__icon md-icon"></span> General Remarks </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-preamble.html" class="md-nav__link"> Preamble </a> </li> <li class="md-nav__item"> <a href="ft2-header_inclusion.html" class="md-nav__link"> FreeType's header inclusion scheme </a> </li> <li class="md-nav__item"> <a href="ft2-user_allocation.html" class="md-nav__link"> User allocation </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" > <label class="md-nav__link" for="__nav_4"> Core API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Core API" data-md-level="1"> <label class="md-nav__title" for="__nav_4"> <span class="md-nav__icon md-icon"></span> Core API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-version.html" class="md-nav__link"> FreeType Version </a> </li> <li class="md-nav__item"> <a href="ft2-basic_types.html" class="md-nav__link"> Basic Data Types </a> </li> <li class="md-nav__item"> <a href="ft2-base_interface.html" class="md-nav__link"> Base Interface </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_variants.html" class="md-nav__link"> Unicode Variation Sequences </a> </li> <li class="md-nav__item"> <a href="ft2-color_management.html" class="md-nav__link"> Glyph Color Management </a> </li> <li class="md-nav__item"> <a href="ft2-layer_management.html" class="md-nav__link"> Glyph Layer Management </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_management.html" class="md-nav__link"> Glyph Management </a> </li> <li class="md-nav__item"> <a href="ft2-mac_specific.html" class="md-nav__link"> Mac Specific Interface </a> </li> <li class="md-nav__item"> <a href="ft2-sizes_management.html" class="md-nav__link"> Size Management </a> </li> <li class="md-nav__item"> <a href="ft2-header_file_macros.html" class="md-nav__link"> Header File Macros </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" > <label class="md-nav__link" for="__nav_5"> Format-Specific API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Format-Specific API" data-md-level="1"> <label class="md-nav__title" for="__nav_5"> <span class="md-nav__icon md-icon"></span> Format-Specific API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-multiple_masters.html" class="md-nav__link"> Multiple Masters </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_tables.html" class="md-nav__link"> TrueType Tables </a> </li> <li class="md-nav__item"> <a href="ft2-type1_tables.html" class="md-nav__link"> Type 1 Tables </a> </li> <li class="md-nav__item"> <a href="ft2-sfnt_names.html" class="md-nav__link"> SFNT Names </a> </li> <li class="md-nav__item"> <a href="ft2-bdf_fonts.html" class="md-nav__link"> BDF and PCF Files </a> </li> <li class="md-nav__item"> <a href="ft2-cid_fonts.html" class="md-nav__link"> CID Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-pfr_fonts.html" class="md-nav__link"> PFR Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-winfnt_fonts.html" class="md-nav__link"> Window FNT Files </a> </li> <li class="md-nav__item"> <a href="ft2-svg_fonts.html" class="md-nav__link"> OpenType SVG Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-font_formats.html" class="md-nav__link"> Font Formats </a> </li> <li class="md-nav__item"> <a href="ft2-gasp_table.html" class="md-nav__link"> Gasp Table </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--active md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" checked> <label class="md-nav__link" for="__nav_6"> Controlling FreeType Modules <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Controlling FreeType Modules" data-md-level="1"> <label class="md-nav__title" for="__nav_6"> <span class="md-nav__icon md-icon"></span> Controlling FreeType Modules </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-auto_hinter.html" class="md-nav__link"> The auto-hinter </a> </li> <li class="md-nav__item"> <a href="ft2-cff_driver.html" class="md-nav__link"> The CFF driver </a> </li> <li class="md-nav__item"> <a href="ft2-t1_cid_driver.html" class="md-nav__link"> The Type 1 and CID drivers </a> </li> <li class="md-nav__item"> <a href="ft2-tt_driver.html" class="md-nav__link"> The TrueType driver </a> </li> <li class="md-nav__item"> <a href="ft2-pcf_driver.html" class="md-nav__link"> The PCF driver </a> </li> <li class="md-nav__item"> <a href="ft2-ot_svg_driver.html" class="md-nav__link"> The SVG driver </a> </li> <li class="md-nav__item"> <a href="ft2-properties.html" class="md-nav__link"> Driver properties </a> </li> <li class="md-nav__item"> <a href="ft2-parameter_tags.html" class="md-nav__link"> Parameter Tags </a> </li> <li class="md-nav__item md-nav__item--active"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <label class="md-nav__link md-nav__link--active" for="__toc"> Subpixel Rendering <span class="md-nav__icon md-icon"></span> </label> <a href="ft2-lcd_rendering.html" class="md-nav__link md-nav__link--active"> Subpixel Rendering </a> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_lcdfilter" class="md-nav__link"> FT_LcdFilter </a> </li> <li class="md-nav__item"> <a href="#ft_library_setlcdfilter" class="md-nav__link"> FT_Library_SetLcdFilter </a> </li> <li class="md-nav__item"> <a href="#ft_library_setlcdfilterweights" class="md-nav__link"> FT_Library_SetLcdFilterWeights </a> </li> <li class="md-nav__item"> <a href="#ft_lcdfivetapfilter" class="md-nav__link"> FT_LcdFiveTapFilter </a> </li> <li class="md-nav__item"> <a href="#ft_library_setlcdgeometry" class="md-nav__link"> FT_Library_SetLcdGeometry </a> </li> </ul> </nav> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" > <label class="md-nav__link" for="__nav_7"> Cache Sub-System <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1"> <label class="md-nav__title" for="__nav_7"> <span class="md-nav__icon md-icon"></span> Cache Sub-System </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-cache_subsystem.html" class="md-nav__link"> Cache Sub-System </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" > <label class="md-nav__link" for="__nav_8"> Support API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Support API" data-md-level="1"> <label class="md-nav__title" for="__nav_8"> <span class="md-nav__icon md-icon"></span> Support API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-computations.html" class="md-nav__link"> Computations </a> </li> <li class="md-nav__item"> <a href="ft2-list_processing.html" class="md-nav__link"> List Processing </a> </li> <li class="md-nav__item"> <a href="ft2-outline_processing.html" class="md-nav__link"> Outline Processing </a> </li> <li class="md-nav__item"> <a href="ft2-quick_advance.html" class="md-nav__link"> Quick retrieval of advance values </a> </li> <li class="md-nav__item"> <a href="ft2-bitmap_handling.html" class="md-nav__link"> Bitmap Handling </a> </li> <li class="md-nav__item"> <a href="ft2-raster.html" class="md-nav__link"> Scanline Converter </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_stroker.html" class="md-nav__link"> Glyph Stroker </a> </li> <li class="md-nav__item"> <a href="ft2-system_interface.html" class="md-nav__link"> System Interface </a> </li> <li class="md-nav__item"> <a href="ft2-module_management.html" class="md-nav__link"> Module Management </a> </li> <li class="md-nav__item"> <a href="ft2-gzip.html" class="md-nav__link"> GZIP Streams </a> </li> <li class="md-nav__item"> <a href="ft2-lzw.html" class="md-nav__link"> LZW Streams </a> </li> <li class="md-nav__item"> <a href="ft2-bzip2.html" class="md-nav__link"> BZIP2 Streams </a> </li> <li class="md-nav__item"> <a href="ft2-debugging_apis.html" class="md-nav__link"> External Debugging APIs </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" > <label class="md-nav__link" for="__nav_9"> Error Codes <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Error Codes" data-md-level="1"> <label class="md-nav__title" for="__nav_9"> <span class="md-nav__icon md-icon"></span> Error Codes </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-error_enumerations.html" class="md-nav__link"> Error Enumerations </a> </li> <li class="md-nav__item"> <a href="ft2-error_code_values.html" class="md-nav__link"> Error Code Values </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" > <label class="md-nav__link" for="__nav_10"> Miscellaneous <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1"> <label class="md-nav__title" for="__nav_10"> <span class="md-nav__icon md-icon"></span> Miscellaneous </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-gx_validation.html" class="md-nav__link"> TrueTypeGX/AAT Validation </a> </li> <li class="md-nav__item"> <a href="ft2-incremental.html" class="md-nav__link"> Incremental Loading </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_engine.html" class="md-nav__link"> The TrueType Engine </a> </li> <li class="md-nav__item"> <a href="ft2-ot_validation.html" class="md-nav__link"> OpenType Validation </a> </li> </ul> </nav> </li> </ul> </nav> </div> </div> </div> <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_lcdfilter" class="md-nav__link"> FT_LcdFilter </a> </li> <li class="md-nav__item"> <a href="#ft_library_setlcdfilter" class="md-nav__link"> FT_Library_SetLcdFilter </a> </li> <li class="md-nav__item"> <a href="#ft_library_setlcdfilterweights" class="md-nav__link"> FT_Library_SetLcdFilterWeights </a> </li> <li class="md-nav__item"> <a href="#ft_lcdfivetapfilter" class="md-nav__link"> FT_LcdFiveTapFilter </a> </li> <li class="md-nav__item"> <a href="#ft_library_setlcdgeometry" class="md-nav__link"> FT_Library_SetLcdGeometry </a> </li> </ul> </nav> </div> </div> </div> <div class="md-content" data-md-component="content"> <article class="md-content__inner md-typeset"> <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; <a href="index.html#controlling-freetype-modules">Controlling FreeType Modules</a> &raquo; Subpixel Rendering</p> <hr /> <h1 id="subpixel-rendering">Subpixel Rendering<a class="headerlink" href="#subpixel-rendering" title="Permanent link">&para;</a></h1> <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2> <p>FreeType provides two alternative subpixel rendering technologies. Should you define <code>FT_CONFIG_OPTION_SUBPIXEL_RENDERING</code> in your <code>ftoption.h</code> file, this enables ClearType-style rendering. Otherwise, Harmony LCD rendering is enabled. These technologies are controlled differently and API described below, although always available, performs its function when appropriate method is enabled and does nothing otherwise.</p> <p>ClearType-style LCD rendering exploits the color-striped structure of LCD pixels, increasing the available resolution in the direction of the stripe (usually horizontal RGB) by a factor of&nbsp;3. Using the subpixel coverages unfiltered can create severe color fringes especially when rendering thin features. Indeed, to produce black-on-white text, the nearby color subpixels must be dimmed evenly. Therefore, an equalizing 5-tap FIR filter should be applied to subpixel coverages regardless of pixel boundaries and should have these properties:</p> <ol> <li> <p>It should be symmetrical, like {&nbsp;a, b, c, b, a&nbsp;}, to avoid any shifts in appearance.</p> </li> <li> <p>It should be color-balanced, meaning a&nbsp;+ b&nbsp;=&nbsp;c, to reduce color fringes by distributing the computed coverage for one subpixel to all subpixels equally.</p> </li> <li> <p>It should be normalized, meaning 2a&nbsp;+ 2b&nbsp;+ c&nbsp;=&nbsp;1.0 to maintain overall brightness.</p> </li> </ol> <p>Boxy 3-tap filter {0, &#8531;, &#8531;, &#8531;, 0} is sharper but is less forgiving of non-ideal gamma curves of a screen (and viewing angles), beveled filters are fuzzier but more tolerant.</p> <p>Use the <code><a href="ft2-lcd_rendering.html#ft_library_setlcdfilter">FT_Library_SetLcdFilter</a></code> or <code><a href="ft2-lcd_rendering.html#ft_library_setlcdfilterweights">FT_Library_SetLcdFilterWeights</a></code> API to specify a low-pass filter, which is then applied to subpixel-rendered bitmaps generated through <code><a href="ft2-base_interface.html#ft_render_glyph">FT_Render_Glyph</a></code>.</p> <p>Harmony LCD rendering is suitable to panels with any regular subpixel structure, not just monitors with 3 color striped subpixels, as long as the color subpixels have fixed positions relative to the pixel center. In this case, each color channel can be rendered separately after shifting the outline opposite to the subpixel shift so that the coverage maps are aligned. This method is immune to color fringes because the shifts do not change integral coverage.</p> <p>The subpixel geometry must be specified by xy-coordinates for each subpixel. By convention they may come in the RGB order: {{-&#8531;, 0}, {0, 0}, {&#8531;, 0}} for standard RGB striped panel or {{-&#8537;, &frac14;}, {-&#8537;, -&frac14;}, {&#8531;, 0}} for a certain PenTile panel.</p> <p>Use the <code><a href="ft2-lcd_rendering.html#ft_library_setlcdgeometry">FT_Library_SetLcdGeometry</a></code> API to specify subpixel positions. If one follows the RGB order convention, the same order applies to the resulting <code><a href="ft2-basic_types.html#ft_pixel_mode">FT_PIXEL_MODE_LCD</a></code> and <code><a href="ft2-basic_types.html#ft_pixel_mode">FT_PIXEL_MODE_LCD_V</a></code> bitmaps. Note, however, that the coordinate frame for the latter must be rotated clockwise. Harmony with default LCD geometry is equivalent to ClearType with light filter.</p> <p>As a result of ClearType filtering or Harmony shifts, the resulting dimensions of LCD bitmaps can be slightly wider or taller than the dimensions the original outline with regard to the pixel grid. For example, for <code><a href="ft2-base_interface.html#ft_render_mode">FT_RENDER_MODE_LCD</a></code>, the filter adds 2&nbsp;subpixels to the left, and 2&nbsp;subpixels to the right. The bitmap offset values are adjusted accordingly, so clients shouldn't need to modify their layout and glyph positioning code when enabling the filter.</p> <p>The ClearType and Harmony rendering is applicable to glyph bitmaps rendered through <code><a href="ft2-base_interface.html#ft_render_glyph">FT_Render_Glyph</a></code>, <code><a href="ft2-base_interface.html#ft_load_glyph">FT_Load_Glyph</a></code>, <code><a href="ft2-base_interface.html#ft_load_char">FT_Load_Char</a></code>, and <code><a href="ft2-glyph_management.html#ft_glyph_to_bitmap">FT_Glyph_To_Bitmap</a></code>, when <code><a href="ft2-base_interface.html#ft_render_mode">FT_RENDER_MODE_LCD</a></code> or <code><a href="ft2-base_interface.html#ft_render_mode">FT_RENDER_MODE_LCD_V</a></code> is specified. This API does not control <code><a href="ft2-outline_processing.html#ft_outline_render">FT_Outline_Render</a></code> and <code><a href="ft2-outline_processing.html#ft_outline_get_bitmap">FT_Outline_Get_Bitmap</a></code>.</p> <p>The described algorithms can completely remove color artefacts when combined with gamma-corrected alpha blending in linear space. Each of the 3&nbsp;alpha values (subpixels) must by independently used to blend one color channel. That is, red alpha blends the red channel of the text color with the red channel of the background pixel.</p> <h2 id="ft_lcdfilter">FT_LcdFilter<a class="headerlink" href="#ft_lcdfilter" title="Permanent link">&para;</a></h2> <p>Defined in FT_LCD_FILTER_H (freetype/ftlcdfil.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">enum</span> FT_LcdFilter_ { <a href="ft2-lcd_rendering.html#ft_lcd_filter_none">FT_LCD_FILTER_NONE</a> = 0, <a href="ft2-lcd_rendering.html#ft_lcd_filter_default">FT_LCD_FILTER_DEFAULT</a> = 1, <a href="ft2-lcd_rendering.html#ft_lcd_filter_light">FT_LCD_FILTER_LIGHT</a> = 2, <a href="ft2-lcd_rendering.html#ft_lcd_filter_legacy1">FT_LCD_FILTER_LEGACY1</a> = 3, <a href="ft2-lcd_rendering.html#ft_lcd_filter_legacy">FT_LCD_FILTER_LEGACY</a> = 16, FT_LCD_FILTER_MAX /* do not remove */ } <b>FT_LcdFilter</b>; </code></pre></div> <p>A list of values to identify various types of LCD filters.</p> <h4>values</h4> <table class="fields"> <tr><td class="val" id="ft_lcd_filter_none">FT_LCD_FILTER_NONE</td><td class="desc"> <p>Do not perform filtering. When used with subpixel rendering, this results in sometimes severe color fringes.</p> </td></tr> <tr><td class="val" id="ft_lcd_filter_default">FT_LCD_FILTER_DEFAULT</td><td class="desc"> <p>This is a beveled, normalized, and color-balanced five-tap filter with weights of [0x08 0x4D 0x56 0x4D 0x08] in 1/256th units.</p> </td></tr> <tr><td class="val" id="ft_lcd_filter_light">FT_LCD_FILTER_LIGHT</td><td class="desc"> <p>this is a boxy, normalized, and color-balanced three-tap filter with weights of [0x00 0x55 0x56 0x55 0x00] in 1/256th units.</p> </td></tr> <tr><td class="val" id="ft_lcd_filter_legacy">FT_LCD_FILTER_LEGACY</td><td class="desc"> </td></tr> <tr><td class="val" id="ft_lcd_filter_legacy1">FT_LCD_FILTER_LEGACY1</td><td class="desc"> <p>This filter corresponds to the original libXft color filter. It provides high contrast output but can exhibit really bad color fringes if glyphs are not extremely well hinted to the pixel grid. This filter is only provided for comparison purposes, and might be disabled or stay unsupported in the future. The second value is provided for compatibility with FontConfig, which historically used different enumeration, sometimes incorrectly forwarded to FreeType.</p> </td></tr> </table> <h4>since</h4> <p>2.3.0 (<code>FT_LCD_FILTER_LEGACY1</code> since 2.6.2)</p> <hr> <h2 id="ft_library_setlcdfilter">FT_Library_SetLcdFilter<a class="headerlink" href="#ft_library_setlcdfilter" title="Permanent link">&para;</a></h2> <p>Defined in FT_LCD_FILTER_H (freetype/ftlcdfil.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Library_SetLcdFilter</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library, <a href="ft2-lcd_rendering.html#ft_lcdfilter">FT_LcdFilter</a> filter ); </code></pre></div> <p>This function is used to change filter applied to LCD decimated bitmaps, like the ones used when calling <code><a href="ft2-base_interface.html#ft_render_glyph">FT_Render_Glyph</a></code> with <code><a href="ft2-base_interface.html#ft_render_mode">FT_RENDER_MODE_LCD</a></code> or <code><a href="ft2-base_interface.html#ft_render_mode">FT_RENDER_MODE_LCD_V</a></code>.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="library">library</td><td class="desc"> <p>A handle to the target library instance.</p> </td></tr> <tr><td class="val" id="filter">filter</td><td class="desc"> <p>The filter type.</p> <p>You can use <code><a href="ft2-lcd_rendering.html#ft_lcdfilter">FT_LCD_FILTER_NONE</a></code> here to disable this feature, or <code><a href="ft2-lcd_rendering.html#ft_lcdfilter">FT_LCD_FILTER_DEFAULT</a></code> to use a default filter that should work well on most LCD screens.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>Since 2.10.3 the LCD filtering is enabled with <code><a href="ft2-lcd_rendering.html#ft_lcdfilter">FT_LCD_FILTER_DEFAULT</a></code>. It is no longer necessary to call this function explicitly except to choose a different filter or disable filtering altogether with <code><a href="ft2-lcd_rendering.html#ft_lcdfilter">FT_LCD_FILTER_NONE</a></code>.</p> <p>This function does nothing but returns <code>FT_Err_Unimplemented_Feature</code> if the configuration macro <code>FT_CONFIG_OPTION_SUBPIXEL_RENDERING</code> is not defined in your build of the library.</p> <h4>since</h4> <p>2.3.0</p> <hr> <h2 id="ft_library_setlcdfilterweights">FT_Library_SetLcdFilterWeights<a class="headerlink" href="#ft_library_setlcdfilterweights" title="Permanent link">&para;</a></h2> <p>Defined in FT_LCD_FILTER_H (freetype/ftlcdfil.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Library_SetLcdFilterWeights</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library, <span class="keyword">unsigned</span> <span class="keyword">char</span> *weights ); </code></pre></div> <p>This function can be used to enable LCD filter with custom weights, instead of using presets in <code><a href="ft2-lcd_rendering.html#ft_library_setlcdfilter">FT_Library_SetLcdFilter</a></code>.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="library">library</td><td class="desc"> <p>A handle to the target library instance.</p> </td></tr> <tr><td class="val" id="weights">weights</td><td class="desc"> <p>A pointer to an array; the function copies the first five bytes and uses them to specify the filter weights in 1/256th units.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>This function does nothing but returns <code>FT_Err_Unimplemented_Feature</code> if the configuration macro <code>FT_CONFIG_OPTION_SUBPIXEL_RENDERING</code> is not defined in your build of the library.</p> <p>LCD filter weights can also be set per face using <code><a href="ft2-base_interface.html#ft_face_properties">FT_Face_Properties</a></code> with <code><a href="ft2-parameter_tags.html#ft_param_tag_lcd_filter_weights">FT_PARAM_TAG_LCD_FILTER_WEIGHTS</a></code>.</p> <h4>since</h4> <p>2.4.0</p> <hr> <h2 id="ft_lcdfivetapfilter">FT_LcdFiveTapFilter<a class="headerlink" href="#ft_lcdfivetapfilter" title="Permanent link">&para;</a></h2> <p>Defined in FT_LCD_FILTER_H (freetype/ftlcdfil.h).</p> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> FT_LCD_FILTER_FIVE_TAPS 5 <span class="keyword">typedef</span> <a href="ft2-basic_types.html#ft_byte">FT_Byte</a> <b>FT_LcdFiveTapFilter</b>[FT_LCD_FILTER_FIVE_TAPS]; </code></pre></div> <p>A typedef for passing the five LCD filter weights to <code><a href="ft2-base_interface.html#ft_face_properties">FT_Face_Properties</a></code> within an <code><a href="ft2-base_interface.html#ft_parameter">FT_Parameter</a></code> structure.</p> <h4>since</h4> <p>2.8</p> <hr> <h2 id="ft_library_setlcdgeometry">FT_Library_SetLcdGeometry<a class="headerlink" href="#ft_library_setlcdgeometry" title="Permanent link">&para;</a></h2> <p>Defined in FT_LCD_FILTER_H (freetype/ftlcdfil.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Library_SetLcdGeometry</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library, <a href="ft2-basic_types.html#ft_vector">FT_Vector</a> sub[3] ); </code></pre></div> <p>This function can be used to modify default positions of color subpixels, which controls Harmony LCD rendering.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="library">library</td><td class="desc"> <p>A handle to the target library instance.</p> </td></tr> <tr><td class="val" id="sub">sub</td><td class="desc"> <p>A pointer to an array of 3 vectors in 26.6 fractional pixel format; the function modifies the default values, see the note below.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>Subpixel geometry examples:</p> <ul> <li> <p>{{-21, 0}, {0, 0}, {21, 0}} is the default, corresponding to 3 color stripes shifted by a third of a pixel. This could be an RGB panel.</p> </li> <li> <p>{{21, 0}, {0, 0}, {-21, 0}} looks the same as the default but can specify a BGR panel instead, while keeping the bitmap in the same RGB888 format.</p> </li> <li> <p>{{0, 21}, {0, 0}, {0, -21}} is the vertical RGB, but the bitmap stays RGB888 as a result.</p> </li> <li> <p>{{-11, 16}, {-11, -16}, {22, 0}} is a certain PenTile arrangement.</p> </li> </ul> <p>This function does nothing and returns <code>FT_Err_Unimplemented_Feature</code> in the context of ClearType-style subpixel rendering when <code>FT_CONFIG_OPTION_SUBPIXEL_RENDERING</code> is defined in your build of the library.</p> <h4>since</h4> <p>2.10.0</p> <hr> </article> </div> </div> </main> <footer class="md-footer"> <nav class="md-footer__inner md-grid" aria-label="Footer"> <a href="ft2-parameter_tags.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: Parameter Tags" rel="prev"> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Previous </span> Parameter Tags </div> </div> </a> <a href="ft2-cache_subsystem.html" class="md-footer__link md-footer__link--next" aria-label="Next: Cache Sub-System" rel="next"> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Next </span> Cache Sub-System </div> </div> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg> </div> </a> </nav> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-footer-copyright"> <div class="md-footer-copyright__highlight"> Copyright 2022 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>. </div> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"base": ".", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "assets/javascripts/workers/search.477d984a.min.js", "version": null}</script> <script src="assets/javascripts/bundle.82b56eb2.min.js"></script> <script src="javascripts/extra.js"></script> </body> </html>
whupdup/frame
real/third_party/freetype-2.12.0/docs/reference/ft2-lcd_rendering.html
HTML
gpl-3.0
42,288
<!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="description" content="API Reference Documentation for FreeType-2.12.0"> <meta name="author" content="FreeType Contributors"> <link rel="icon" href="images/favico.ico"> <meta name="generator" content="mkdocs-1.2.1, mkdocs-material-7.1.9"> <title>List Processing - FreeType-2.12.0 API Reference</title> <link rel="stylesheet" href="assets/stylesheets/main.ca7ac06f.min.css"> <link rel="stylesheet" href="assets/stylesheets/palette.f1a3b89f.min.css"> <meta name="theme-color" content="#4cae4f"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback"> <style>:root{--md-text-font-family:"Noto Serif";--md-code-font-family:"Roboto Mono"}</style> <link rel="stylesheet" href="stylesheets/extra.css"> </head> <body dir="ltr" data-md-color-scheme="" data-md-color-primary="green" data-md-color-accent="green"> <script>function __prefix(e){return new URL(".",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <label class="md-overlay" for="__drawer"></label> <div data-md-component="skip"> <a href="#list-processing" class="md-skip"> Skip to content </a> </div> <div data-md-component="announce"> </div> <header class="md-header" data-md-component="header"> <nav class="md-header__inner md-grid" aria-label="Header"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> <label class="md-header__button md-icon" for="__drawer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg> </label> <div class="md-header__title" data-md-component="header-title"> <div class="md-header__ellipsis"> <div class="md-header__topic"> <span class="md-ellipsis"> FreeType-2.12.0 API Reference </span> </div> <div class="md-header__topic" data-md-component="header-topic"> <span class="md-ellipsis"> List Processing </span> </div> </div> </div> <label class="md-header__button md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> </label> <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required> <label class="md-search__icon md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </label> <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg> </button> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" data-md-scrollfix> <div class="md-search-result" data-md-component="search-result"> <div class="md-search-result__meta"> Initializing search </div> <ol class="md-search-result__list"></ol> </div> </div> </div> </div> </div> </nav> </header> <div class="md-container" data-md-component="container"> <main class="md-main" data-md-component="main"> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <label class="md-nav__title" for="__drawer"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> FreeType-2.12.0 API Reference </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="index.html" class="md-nav__link"> TOC </a> </li> <li class="md-nav__item"> <a href="ft2-index.html" class="md-nav__link"> Index </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" > <label class="md-nav__link" for="__nav_3"> General Remarks <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="General Remarks" data-md-level="1"> <label class="md-nav__title" for="__nav_3"> <span class="md-nav__icon md-icon"></span> General Remarks </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-preamble.html" class="md-nav__link"> Preamble </a> </li> <li class="md-nav__item"> <a href="ft2-header_inclusion.html" class="md-nav__link"> FreeType's header inclusion scheme </a> </li> <li class="md-nav__item"> <a href="ft2-user_allocation.html" class="md-nav__link"> User allocation </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" > <label class="md-nav__link" for="__nav_4"> Core API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Core API" data-md-level="1"> <label class="md-nav__title" for="__nav_4"> <span class="md-nav__icon md-icon"></span> Core API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-version.html" class="md-nav__link"> FreeType Version </a> </li> <li class="md-nav__item"> <a href="ft2-basic_types.html" class="md-nav__link"> Basic Data Types </a> </li> <li class="md-nav__item"> <a href="ft2-base_interface.html" class="md-nav__link"> Base Interface </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_variants.html" class="md-nav__link"> Unicode Variation Sequences </a> </li> <li class="md-nav__item"> <a href="ft2-color_management.html" class="md-nav__link"> Glyph Color Management </a> </li> <li class="md-nav__item"> <a href="ft2-layer_management.html" class="md-nav__link"> Glyph Layer Management </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_management.html" class="md-nav__link"> Glyph Management </a> </li> <li class="md-nav__item"> <a href="ft2-mac_specific.html" class="md-nav__link"> Mac Specific Interface </a> </li> <li class="md-nav__item"> <a href="ft2-sizes_management.html" class="md-nav__link"> Size Management </a> </li> <li class="md-nav__item"> <a href="ft2-header_file_macros.html" class="md-nav__link"> Header File Macros </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" > <label class="md-nav__link" for="__nav_5"> Format-Specific API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Format-Specific API" data-md-level="1"> <label class="md-nav__title" for="__nav_5"> <span class="md-nav__icon md-icon"></span> Format-Specific API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-multiple_masters.html" class="md-nav__link"> Multiple Masters </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_tables.html" class="md-nav__link"> TrueType Tables </a> </li> <li class="md-nav__item"> <a href="ft2-type1_tables.html" class="md-nav__link"> Type 1 Tables </a> </li> <li class="md-nav__item"> <a href="ft2-sfnt_names.html" class="md-nav__link"> SFNT Names </a> </li> <li class="md-nav__item"> <a href="ft2-bdf_fonts.html" class="md-nav__link"> BDF and PCF Files </a> </li> <li class="md-nav__item"> <a href="ft2-cid_fonts.html" class="md-nav__link"> CID Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-pfr_fonts.html" class="md-nav__link"> PFR Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-winfnt_fonts.html" class="md-nav__link"> Window FNT Files </a> </li> <li class="md-nav__item"> <a href="ft2-svg_fonts.html" class="md-nav__link"> OpenType SVG Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-font_formats.html" class="md-nav__link"> Font Formats </a> </li> <li class="md-nav__item"> <a href="ft2-gasp_table.html" class="md-nav__link"> Gasp Table </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" > <label class="md-nav__link" for="__nav_6"> Controlling FreeType Modules <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Controlling FreeType Modules" data-md-level="1"> <label class="md-nav__title" for="__nav_6"> <span class="md-nav__icon md-icon"></span> Controlling FreeType Modules </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-auto_hinter.html" class="md-nav__link"> The auto-hinter </a> </li> <li class="md-nav__item"> <a href="ft2-cff_driver.html" class="md-nav__link"> The CFF driver </a> </li> <li class="md-nav__item"> <a href="ft2-t1_cid_driver.html" class="md-nav__link"> The Type 1 and CID drivers </a> </li> <li class="md-nav__item"> <a href="ft2-tt_driver.html" class="md-nav__link"> The TrueType driver </a> </li> <li class="md-nav__item"> <a href="ft2-pcf_driver.html" class="md-nav__link"> The PCF driver </a> </li> <li class="md-nav__item"> <a href="ft2-ot_svg_driver.html" class="md-nav__link"> The SVG driver </a> </li> <li class="md-nav__item"> <a href="ft2-properties.html" class="md-nav__link"> Driver properties </a> </li> <li class="md-nav__item"> <a href="ft2-parameter_tags.html" class="md-nav__link"> Parameter Tags </a> </li> <li class="md-nav__item"> <a href="ft2-lcd_rendering.html" class="md-nav__link"> Subpixel Rendering </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" > <label class="md-nav__link" for="__nav_7"> Cache Sub-System <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1"> <label class="md-nav__title" for="__nav_7"> <span class="md-nav__icon md-icon"></span> Cache Sub-System </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-cache_subsystem.html" class="md-nav__link"> Cache Sub-System </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--active md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" checked> <label class="md-nav__link" for="__nav_8"> Support API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Support API" data-md-level="1"> <label class="md-nav__title" for="__nav_8"> <span class="md-nav__icon md-icon"></span> Support API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-computations.html" class="md-nav__link"> Computations </a> </li> <li class="md-nav__item md-nav__item--active"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <label class="md-nav__link md-nav__link--active" for="__toc"> List Processing <span class="md-nav__icon md-icon"></span> </label> <a href="ft2-list_processing.html" class="md-nav__link md-nav__link--active"> List Processing </a> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_list" class="md-nav__link"> FT_List </a> </li> <li class="md-nav__item"> <a href="#ft_listnode" class="md-nav__link"> FT_ListNode </a> </li> <li class="md-nav__item"> <a href="#ft_listrec" class="md-nav__link"> FT_ListRec </a> </li> <li class="md-nav__item"> <a href="#ft_listnoderec" class="md-nav__link"> FT_ListNodeRec </a> </li> <li class="md-nav__item"> <a href="#ft_list_add" class="md-nav__link"> FT_List_Add </a> </li> <li class="md-nav__item"> <a href="#ft_list_insert" class="md-nav__link"> FT_List_Insert </a> </li> <li class="md-nav__item"> <a href="#ft_list_find" class="md-nav__link"> FT_List_Find </a> </li> <li class="md-nav__item"> <a href="#ft_list_remove" class="md-nav__link"> FT_List_Remove </a> </li> <li class="md-nav__item"> <a href="#ft_list_up" class="md-nav__link"> FT_List_Up </a> </li> <li class="md-nav__item"> <a href="#ft_list_iterate" class="md-nav__link"> FT_List_Iterate </a> </li> <li class="md-nav__item"> <a href="#ft_list_iterator" class="md-nav__link"> FT_List_Iterator </a> </li> <li class="md-nav__item"> <a href="#ft_list_finalize" class="md-nav__link"> FT_List_Finalize </a> </li> <li class="md-nav__item"> <a href="#ft_list_destructor" class="md-nav__link"> FT_List_Destructor </a> </li> </ul> </nav> </li> <li class="md-nav__item"> <a href="ft2-outline_processing.html" class="md-nav__link"> Outline Processing </a> </li> <li class="md-nav__item"> <a href="ft2-quick_advance.html" class="md-nav__link"> Quick retrieval of advance values </a> </li> <li class="md-nav__item"> <a href="ft2-bitmap_handling.html" class="md-nav__link"> Bitmap Handling </a> </li> <li class="md-nav__item"> <a href="ft2-raster.html" class="md-nav__link"> Scanline Converter </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_stroker.html" class="md-nav__link"> Glyph Stroker </a> </li> <li class="md-nav__item"> <a href="ft2-system_interface.html" class="md-nav__link"> System Interface </a> </li> <li class="md-nav__item"> <a href="ft2-module_management.html" class="md-nav__link"> Module Management </a> </li> <li class="md-nav__item"> <a href="ft2-gzip.html" class="md-nav__link"> GZIP Streams </a> </li> <li class="md-nav__item"> <a href="ft2-lzw.html" class="md-nav__link"> LZW Streams </a> </li> <li class="md-nav__item"> <a href="ft2-bzip2.html" class="md-nav__link"> BZIP2 Streams </a> </li> <li class="md-nav__item"> <a href="ft2-debugging_apis.html" class="md-nav__link"> External Debugging APIs </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" > <label class="md-nav__link" for="__nav_9"> Error Codes <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Error Codes" data-md-level="1"> <label class="md-nav__title" for="__nav_9"> <span class="md-nav__icon md-icon"></span> Error Codes </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-error_enumerations.html" class="md-nav__link"> Error Enumerations </a> </li> <li class="md-nav__item"> <a href="ft2-error_code_values.html" class="md-nav__link"> Error Code Values </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" > <label class="md-nav__link" for="__nav_10"> Miscellaneous <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1"> <label class="md-nav__title" for="__nav_10"> <span class="md-nav__icon md-icon"></span> Miscellaneous </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-gx_validation.html" class="md-nav__link"> TrueTypeGX/AAT Validation </a> </li> <li class="md-nav__item"> <a href="ft2-incremental.html" class="md-nav__link"> Incremental Loading </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_engine.html" class="md-nav__link"> The TrueType Engine </a> </li> <li class="md-nav__item"> <a href="ft2-ot_validation.html" class="md-nav__link"> OpenType Validation </a> </li> </ul> </nav> </li> </ul> </nav> </div> </div> </div> <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_list" class="md-nav__link"> FT_List </a> </li> <li class="md-nav__item"> <a href="#ft_listnode" class="md-nav__link"> FT_ListNode </a> </li> <li class="md-nav__item"> <a href="#ft_listrec" class="md-nav__link"> FT_ListRec </a> </li> <li class="md-nav__item"> <a href="#ft_listnoderec" class="md-nav__link"> FT_ListNodeRec </a> </li> <li class="md-nav__item"> <a href="#ft_list_add" class="md-nav__link"> FT_List_Add </a> </li> <li class="md-nav__item"> <a href="#ft_list_insert" class="md-nav__link"> FT_List_Insert </a> </li> <li class="md-nav__item"> <a href="#ft_list_find" class="md-nav__link"> FT_List_Find </a> </li> <li class="md-nav__item"> <a href="#ft_list_remove" class="md-nav__link"> FT_List_Remove </a> </li> <li class="md-nav__item"> <a href="#ft_list_up" class="md-nav__link"> FT_List_Up </a> </li> <li class="md-nav__item"> <a href="#ft_list_iterate" class="md-nav__link"> FT_List_Iterate </a> </li> <li class="md-nav__item"> <a href="#ft_list_iterator" class="md-nav__link"> FT_List_Iterator </a> </li> <li class="md-nav__item"> <a href="#ft_list_finalize" class="md-nav__link"> FT_List_Finalize </a> </li> <li class="md-nav__item"> <a href="#ft_list_destructor" class="md-nav__link"> FT_List_Destructor </a> </li> </ul> </nav> </div> </div> </div> <div class="md-content" data-md-component="content"> <article class="md-content__inner md-typeset"> <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; <a href="index.html#support-api">Support API</a> &raquo; List Processing</p> <hr /> <h1 id="list-processing">List Processing<a class="headerlink" href="#list-processing" title="Permanent link">&para;</a></h1> <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2> <p>This section contains various definitions related to list processing using doubly-linked nodes.</p> <h2 id="ft_list">FT_List<a class="headerlink" href="#ft_list" title="Permanent link">&para;</a></h2> <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_ListRec_* <b>FT_List</b>; </code></pre></div> <p>A handle to a list record (see <code><a href="ft2-list_processing.html#ft_listrec">FT_ListRec</a></code>).</p> <hr> <h2 id="ft_listnode">FT_ListNode<a class="headerlink" href="#ft_listnode" title="Permanent link">&para;</a></h2> <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_ListNodeRec_* <b>FT_ListNode</b>; </code></pre></div> <p>Many elements and objects in FreeType are listed through an <code><a href="ft2-list_processing.html#ft_list">FT_List</a></code> record (see <code><a href="ft2-list_processing.html#ft_listrec">FT_ListRec</a></code>). As its name suggests, an FT_ListNode is a handle to a single list element.</p> <hr> <h2 id="ft_listrec">FT_ListRec<a class="headerlink" href="#ft_listrec" title="Permanent link">&para;</a></h2> <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_ListRec_ { <a href="ft2-list_processing.html#ft_listnode">FT_ListNode</a> head; <a href="ft2-list_processing.html#ft_listnode">FT_ListNode</a> tail; } <b>FT_ListRec</b>; </code></pre></div> <p>A structure used to hold a simple doubly-linked list. These are used in many parts of FreeType.</p> <h4>fields</h4> <table class="fields"> <tr><td class="val" id="head">head</td><td class="desc"> <p>The head (first element) of doubly-linked list.</p> </td></tr> <tr><td class="val" id="tail">tail</td><td class="desc"> <p>The tail (last element) of doubly-linked list.</p> </td></tr> </table> <hr> <h2 id="ft_listnoderec">FT_ListNodeRec<a class="headerlink" href="#ft_listnoderec" title="Permanent link">&para;</a></h2> <p>Defined in FT_TYPES_H (freetype/fttypes.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_ListNodeRec_ { <a href="ft2-list_processing.html#ft_listnode">FT_ListNode</a> prev; <a href="ft2-list_processing.html#ft_listnode">FT_ListNode</a> next; <span class="keyword">void</span>* data; } <b>FT_ListNodeRec</b>; </code></pre></div> <p>A structure used to hold a single list element.</p> <h4>fields</h4> <table class="fields"> <tr><td class="val" id="prev">prev</td><td class="desc"> <p>The previous element in the list. <code>NULL</code> if first.</p> </td></tr> <tr><td class="val" id="next">next</td><td class="desc"> <p>The next element in the list. <code>NULL</code> if last.</p> </td></tr> <tr><td class="val" id="data">data</td><td class="desc"> <p>A typeless pointer to the listed object.</p> </td></tr> </table> <hr> <h2 id="ft_list_add">FT_List_Add<a class="headerlink" href="#ft_list_add" title="Permanent link">&para;</a></h2> <p>Defined in FT_LIST_H (freetype/ftlist.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> ) <b>FT_List_Add</b>( <a href="ft2-list_processing.html#ft_list">FT_List</a> list, <a href="ft2-list_processing.html#ft_listnode">FT_ListNode</a> node ); </code></pre></div> <p>Append an element to the end of a list.</p> <h4>inout</h4> <table class="fields"> <tr><td class="val" id="list">list</td><td class="desc"> <p>A pointer to the parent list.</p> </td></tr> <tr><td class="val" id="node">node</td><td class="desc"> <p>The node to append.</p> </td></tr> </table> <hr> <h2 id="ft_list_insert">FT_List_Insert<a class="headerlink" href="#ft_list_insert" title="Permanent link">&para;</a></h2> <p>Defined in FT_LIST_H (freetype/ftlist.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> ) <b>FT_List_Insert</b>( <a href="ft2-list_processing.html#ft_list">FT_List</a> list, <a href="ft2-list_processing.html#ft_listnode">FT_ListNode</a> node ); </code></pre></div> <p>Insert an element at the head of a list.</p> <h4>inout</h4> <table class="fields"> <tr><td class="val" id="list">list</td><td class="desc"> <p>A pointer to parent list.</p> </td></tr> <tr><td class="val" id="node">node</td><td class="desc"> <p>The node to insert.</p> </td></tr> </table> <hr> <h2 id="ft_list_find">FT_List_Find<a class="headerlink" href="#ft_list_find" title="Permanent link">&para;</a></h2> <p>Defined in FT_LIST_H (freetype/ftlist.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-list_processing.html#ft_listnode">FT_ListNode</a> ) <b>FT_List_Find</b>( <a href="ft2-list_processing.html#ft_list">FT_List</a> list, <span class="keyword">void</span>* data ); </code></pre></div> <p>Find the list node for a given listed object.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="list">list</td><td class="desc"> <p>A pointer to the parent list.</p> </td></tr> <tr><td class="val" id="data">data</td><td class="desc"> <p>The address of the listed object.</p> </td></tr> </table> <h4>return</h4> <p>List node. <code>NULL</code> if it wasn't found.</p> <hr> <h2 id="ft_list_remove">FT_List_Remove<a class="headerlink" href="#ft_list_remove" title="Permanent link">&para;</a></h2> <p>Defined in FT_LIST_H (freetype/ftlist.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> ) <b>FT_List_Remove</b>( <a href="ft2-list_processing.html#ft_list">FT_List</a> list, <a href="ft2-list_processing.html#ft_listnode">FT_ListNode</a> node ); </code></pre></div> <p>Remove a node from a list. This function doesn't check whether the node is in the list!</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="node">node</td><td class="desc"> <p>The node to remove.</p> </td></tr> </table> <h4>inout</h4> <table class="fields"> <tr><td class="val" id="list">list</td><td class="desc"> <p>A pointer to the parent list.</p> </td></tr> </table> <hr> <h2 id="ft_list_up">FT_List_Up<a class="headerlink" href="#ft_list_up" title="Permanent link">&para;</a></h2> <p>Defined in FT_LIST_H (freetype/ftlist.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> ) <b>FT_List_Up</b>( <a href="ft2-list_processing.html#ft_list">FT_List</a> list, <a href="ft2-list_processing.html#ft_listnode">FT_ListNode</a> node ); </code></pre></div> <p>Move a node to the head/top of a list. Used to maintain LRU lists.</p> <h4>inout</h4> <table class="fields"> <tr><td class="val" id="list">list</td><td class="desc"> <p>A pointer to the parent list.</p> </td></tr> <tr><td class="val" id="node">node</td><td class="desc"> <p>The node to move.</p> </td></tr> </table> <hr> <h2 id="ft_list_iterate">FT_List_Iterate<a class="headerlink" href="#ft_list_iterate" title="Permanent link">&para;</a></h2> <p>Defined in FT_LIST_H (freetype/ftlist.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_List_Iterate</b>( <a href="ft2-list_processing.html#ft_list">FT_List</a> list, <a href="ft2-list_processing.html#ft_list_iterator">FT_List_Iterator</a> iterator, <span class="keyword">void</span>* user ); </code></pre></div> <p>Parse a list and calls a given iterator function on each element. Note that parsing is stopped as soon as one of the iterator calls returns a non-zero value.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="list">list</td><td class="desc"> <p>A handle to the list.</p> </td></tr> <tr><td class="val" id="iterator">iterator</td><td class="desc"> <p>An iterator function, called on each node of the list.</p> </td></tr> <tr><td class="val" id="user">user</td><td class="desc"> <p>A user-supplied field that is passed as the second argument to the iterator.</p> </td></tr> </table> <h4>return</h4> <p>The result (a FreeType error code) of the last iterator call.</p> <hr> <h2 id="ft_list_iterator">FT_List_Iterator<a class="headerlink" href="#ft_list_iterator" title="Permanent link">&para;</a></h2> <p>Defined in FT_LIST_H (freetype/ftlist.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <a href="ft2-basic_types.html#ft_error">FT_Error</a> (*<b>FT_List_Iterator</b>)( <a href="ft2-list_processing.html#ft_listnode">FT_ListNode</a> node, <span class="keyword">void</span>* user ); </code></pre></div> <p>An FT_List iterator function that is called during a list parse by <code><a href="ft2-list_processing.html#ft_list_iterate">FT_List_Iterate</a></code>.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="node">node</td><td class="desc"> <p>The current iteration list node.</p> </td></tr> <tr><td class="val" id="user">user</td><td class="desc"> <p>A typeless pointer passed to <code><a href="ft2-list_processing.html#ft_list_iterate">FT_List_Iterate</a></code>. Can be used to point to the iteration's state.</p> </td></tr> </table> <hr> <h2 id="ft_list_finalize">FT_List_Finalize<a class="headerlink" href="#ft_list_finalize" title="Permanent link">&para;</a></h2> <p>Defined in FT_LIST_H (freetype/ftlist.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> ) <b>FT_List_Finalize</b>( <a href="ft2-list_processing.html#ft_list">FT_List</a> list, <a href="ft2-list_processing.html#ft_list_destructor">FT_List_Destructor</a> destroy, <a href="ft2-system_interface.html#ft_memory">FT_Memory</a> memory, <span class="keyword">void</span>* user ); </code></pre></div> <p>Destroy all elements in the list as well as the list itself.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="list">list</td><td class="desc"> <p>A handle to the list.</p> </td></tr> <tr><td class="val" id="destroy">destroy</td><td class="desc"> <p>A list destructor that will be applied to each element of the list. Set this to <code>NULL</code> if not needed.</p> </td></tr> <tr><td class="val" id="memory">memory</td><td class="desc"> <p>The current memory object that handles deallocation.</p> </td></tr> <tr><td class="val" id="user">user</td><td class="desc"> <p>A user-supplied field that is passed as the last argument to the destructor.</p> </td></tr> </table> <h4>note</h4> <p>This function expects that all nodes added by <code><a href="ft2-list_processing.html#ft_list_add">FT_List_Add</a></code> or <code><a href="ft2-list_processing.html#ft_list_insert">FT_List_Insert</a></code> have been dynamically allocated.</p> <hr> <h2 id="ft_list_destructor">FT_List_Destructor<a class="headerlink" href="#ft_list_destructor" title="Permanent link">&para;</a></h2> <p>Defined in FT_LIST_H (freetype/ftlist.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">void</span> (*<b>FT_List_Destructor</b>)( <a href="ft2-system_interface.html#ft_memory">FT_Memory</a> memory, <span class="keyword">void</span>* data, <span class="keyword">void</span>* user ); </code></pre></div> <p>An <code><a href="ft2-list_processing.html#ft_list">FT_List</a></code> iterator function that is called during a list finalization by <code><a href="ft2-list_processing.html#ft_list_finalize">FT_List_Finalize</a></code> to destroy all elements in a given list.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="system">system</td><td class="desc"> <p>The current system object.</p> </td></tr> <tr><td class="val" id="data">data</td><td class="desc"> <p>The current object to destroy.</p> </td></tr> <tr><td class="val" id="user">user</td><td class="desc"> <p>A typeless pointer passed to <code><a href="ft2-list_processing.html#ft_list_iterate">FT_List_Iterate</a></code>. It can be used to point to the iteration's state.</p> </td></tr> </table> <hr> </article> </div> </div> </main> <footer class="md-footer"> <nav class="md-footer__inner md-grid" aria-label="Footer"> <a href="ft2-computations.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: Computations" rel="prev"> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Previous </span> Computations </div> </div> </a> <a href="ft2-outline_processing.html" class="md-footer__link md-footer__link--next" aria-label="Next: Outline Processing" rel="next"> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Next </span> Outline Processing </div> </div> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg> </div> </a> </nav> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-footer-copyright"> <div class="md-footer-copyright__highlight"> Copyright 2022 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>. </div> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"base": ".", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "assets/javascripts/workers/search.477d984a.min.js", "version": null}</script> <script src="assets/javascripts/bundle.82b56eb2.min.js"></script> <script src="javascripts/extra.js"></script> </body> </html>
whupdup/frame
real/third_party/freetype-2.12.0/docs/reference/ft2-list_processing.html
HTML
gpl-3.0
42,310
<!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="description" content="API Reference Documentation for FreeType-2.12.0"> <meta name="author" content="FreeType Contributors"> <link rel="icon" href="images/favico.ico"> <meta name="generator" content="mkdocs-1.2.1, mkdocs-material-7.1.9"> <title>LZW Streams - FreeType-2.12.0 API Reference</title> <link rel="stylesheet" href="assets/stylesheets/main.ca7ac06f.min.css"> <link rel="stylesheet" href="assets/stylesheets/palette.f1a3b89f.min.css"> <meta name="theme-color" content="#4cae4f"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback"> <style>:root{--md-text-font-family:"Noto Serif";--md-code-font-family:"Roboto Mono"}</style> <link rel="stylesheet" href="stylesheets/extra.css"> </head> <body dir="ltr" data-md-color-scheme="" data-md-color-primary="green" data-md-color-accent="green"> <script>function __prefix(e){return new URL(".",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <label class="md-overlay" for="__drawer"></label> <div data-md-component="skip"> <a href="#lzw-streams" class="md-skip"> Skip to content </a> </div> <div data-md-component="announce"> </div> <header class="md-header" data-md-component="header"> <nav class="md-header__inner md-grid" aria-label="Header"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> <label class="md-header__button md-icon" for="__drawer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg> </label> <div class="md-header__title" data-md-component="header-title"> <div class="md-header__ellipsis"> <div class="md-header__topic"> <span class="md-ellipsis"> FreeType-2.12.0 API Reference </span> </div> <div class="md-header__topic" data-md-component="header-topic"> <span class="md-ellipsis"> LZW Streams </span> </div> </div> </div> <label class="md-header__button md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> </label> <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required> <label class="md-search__icon md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </label> <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg> </button> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" data-md-scrollfix> <div class="md-search-result" data-md-component="search-result"> <div class="md-search-result__meta"> Initializing search </div> <ol class="md-search-result__list"></ol> </div> </div> </div> </div> </div> </nav> </header> <div class="md-container" data-md-component="container"> <main class="md-main" data-md-component="main"> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <label class="md-nav__title" for="__drawer"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> FreeType-2.12.0 API Reference </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="index.html" class="md-nav__link"> TOC </a> </li> <li class="md-nav__item"> <a href="ft2-index.html" class="md-nav__link"> Index </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" > <label class="md-nav__link" for="__nav_3"> General Remarks <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="General Remarks" data-md-level="1"> <label class="md-nav__title" for="__nav_3"> <span class="md-nav__icon md-icon"></span> General Remarks </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-preamble.html" class="md-nav__link"> Preamble </a> </li> <li class="md-nav__item"> <a href="ft2-header_inclusion.html" class="md-nav__link"> FreeType's header inclusion scheme </a> </li> <li class="md-nav__item"> <a href="ft2-user_allocation.html" class="md-nav__link"> User allocation </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" > <label class="md-nav__link" for="__nav_4"> Core API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Core API" data-md-level="1"> <label class="md-nav__title" for="__nav_4"> <span class="md-nav__icon md-icon"></span> Core API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-version.html" class="md-nav__link"> FreeType Version </a> </li> <li class="md-nav__item"> <a href="ft2-basic_types.html" class="md-nav__link"> Basic Data Types </a> </li> <li class="md-nav__item"> <a href="ft2-base_interface.html" class="md-nav__link"> Base Interface </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_variants.html" class="md-nav__link"> Unicode Variation Sequences </a> </li> <li class="md-nav__item"> <a href="ft2-color_management.html" class="md-nav__link"> Glyph Color Management </a> </li> <li class="md-nav__item"> <a href="ft2-layer_management.html" class="md-nav__link"> Glyph Layer Management </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_management.html" class="md-nav__link"> Glyph Management </a> </li> <li class="md-nav__item"> <a href="ft2-mac_specific.html" class="md-nav__link"> Mac Specific Interface </a> </li> <li class="md-nav__item"> <a href="ft2-sizes_management.html" class="md-nav__link"> Size Management </a> </li> <li class="md-nav__item"> <a href="ft2-header_file_macros.html" class="md-nav__link"> Header File Macros </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" > <label class="md-nav__link" for="__nav_5"> Format-Specific API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Format-Specific API" data-md-level="1"> <label class="md-nav__title" for="__nav_5"> <span class="md-nav__icon md-icon"></span> Format-Specific API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-multiple_masters.html" class="md-nav__link"> Multiple Masters </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_tables.html" class="md-nav__link"> TrueType Tables </a> </li> <li class="md-nav__item"> <a href="ft2-type1_tables.html" class="md-nav__link"> Type 1 Tables </a> </li> <li class="md-nav__item"> <a href="ft2-sfnt_names.html" class="md-nav__link"> SFNT Names </a> </li> <li class="md-nav__item"> <a href="ft2-bdf_fonts.html" class="md-nav__link"> BDF and PCF Files </a> </li> <li class="md-nav__item"> <a href="ft2-cid_fonts.html" class="md-nav__link"> CID Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-pfr_fonts.html" class="md-nav__link"> PFR Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-winfnt_fonts.html" class="md-nav__link"> Window FNT Files </a> </li> <li class="md-nav__item"> <a href="ft2-svg_fonts.html" class="md-nav__link"> OpenType SVG Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-font_formats.html" class="md-nav__link"> Font Formats </a> </li> <li class="md-nav__item"> <a href="ft2-gasp_table.html" class="md-nav__link"> Gasp Table </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" > <label class="md-nav__link" for="__nav_6"> Controlling FreeType Modules <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Controlling FreeType Modules" data-md-level="1"> <label class="md-nav__title" for="__nav_6"> <span class="md-nav__icon md-icon"></span> Controlling FreeType Modules </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-auto_hinter.html" class="md-nav__link"> The auto-hinter </a> </li> <li class="md-nav__item"> <a href="ft2-cff_driver.html" class="md-nav__link"> The CFF driver </a> </li> <li class="md-nav__item"> <a href="ft2-t1_cid_driver.html" class="md-nav__link"> The Type 1 and CID drivers </a> </li> <li class="md-nav__item"> <a href="ft2-tt_driver.html" class="md-nav__link"> The TrueType driver </a> </li> <li class="md-nav__item"> <a href="ft2-pcf_driver.html" class="md-nav__link"> The PCF driver </a> </li> <li class="md-nav__item"> <a href="ft2-ot_svg_driver.html" class="md-nav__link"> The SVG driver </a> </li> <li class="md-nav__item"> <a href="ft2-properties.html" class="md-nav__link"> Driver properties </a> </li> <li class="md-nav__item"> <a href="ft2-parameter_tags.html" class="md-nav__link"> Parameter Tags </a> </li> <li class="md-nav__item"> <a href="ft2-lcd_rendering.html" class="md-nav__link"> Subpixel Rendering </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" > <label class="md-nav__link" for="__nav_7"> Cache Sub-System <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1"> <label class="md-nav__title" for="__nav_7"> <span class="md-nav__icon md-icon"></span> Cache Sub-System </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-cache_subsystem.html" class="md-nav__link"> Cache Sub-System </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--active md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" checked> <label class="md-nav__link" for="__nav_8"> Support API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Support API" data-md-level="1"> <label class="md-nav__title" for="__nav_8"> <span class="md-nav__icon md-icon"></span> Support API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-computations.html" class="md-nav__link"> Computations </a> </li> <li class="md-nav__item"> <a href="ft2-list_processing.html" class="md-nav__link"> List Processing </a> </li> <li class="md-nav__item"> <a href="ft2-outline_processing.html" class="md-nav__link"> Outline Processing </a> </li> <li class="md-nav__item"> <a href="ft2-quick_advance.html" class="md-nav__link"> Quick retrieval of advance values </a> </li> <li class="md-nav__item"> <a href="ft2-bitmap_handling.html" class="md-nav__link"> Bitmap Handling </a> </li> <li class="md-nav__item"> <a href="ft2-raster.html" class="md-nav__link"> Scanline Converter </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_stroker.html" class="md-nav__link"> Glyph Stroker </a> </li> <li class="md-nav__item"> <a href="ft2-system_interface.html" class="md-nav__link"> System Interface </a> </li> <li class="md-nav__item"> <a href="ft2-module_management.html" class="md-nav__link"> Module Management </a> </li> <li class="md-nav__item"> <a href="ft2-gzip.html" class="md-nav__link"> GZIP Streams </a> </li> <li class="md-nav__item md-nav__item--active"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <label class="md-nav__link md-nav__link--active" for="__toc"> LZW Streams <span class="md-nav__icon md-icon"></span> </label> <a href="ft2-lzw.html" class="md-nav__link md-nav__link--active"> LZW Streams </a> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_stream_openlzw" class="md-nav__link"> FT_Stream_OpenLZW </a> </li> </ul> </nav> </li> <li class="md-nav__item"> <a href="ft2-bzip2.html" class="md-nav__link"> BZIP2 Streams </a> </li> <li class="md-nav__item"> <a href="ft2-debugging_apis.html" class="md-nav__link"> External Debugging APIs </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" > <label class="md-nav__link" for="__nav_9"> Error Codes <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Error Codes" data-md-level="1"> <label class="md-nav__title" for="__nav_9"> <span class="md-nav__icon md-icon"></span> Error Codes </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-error_enumerations.html" class="md-nav__link"> Error Enumerations </a> </li> <li class="md-nav__item"> <a href="ft2-error_code_values.html" class="md-nav__link"> Error Code Values </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" > <label class="md-nav__link" for="__nav_10"> Miscellaneous <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1"> <label class="md-nav__title" for="__nav_10"> <span class="md-nav__icon md-icon"></span> Miscellaneous </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-gx_validation.html" class="md-nav__link"> TrueTypeGX/AAT Validation </a> </li> <li class="md-nav__item"> <a href="ft2-incremental.html" class="md-nav__link"> Incremental Loading </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_engine.html" class="md-nav__link"> The TrueType Engine </a> </li> <li class="md-nav__item"> <a href="ft2-ot_validation.html" class="md-nav__link"> OpenType Validation </a> </li> </ul> </nav> </li> </ul> </nav> </div> </div> </div> <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_stream_openlzw" class="md-nav__link"> FT_Stream_OpenLZW </a> </li> </ul> </nav> </div> </div> </div> <div class="md-content" data-md-component="content"> <article class="md-content__inner md-typeset"> <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; <a href="index.html#support-api">Support API</a> &raquo; LZW Streams</p> <hr /> <h1 id="lzw-streams">LZW Streams<a class="headerlink" href="#lzw-streams" title="Permanent link">&para;</a></h1> <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2> <p>In certain builds of the library, LZW compression recognition is automatically handled when calling <code><a href="ft2-base_interface.html#ft_new_face">FT_New_Face</a></code> or <code><a href="ft2-base_interface.html#ft_open_face">FT_Open_Face</a></code>. This means that if no font driver is capable of handling the raw compressed file, the library will try to open a LZW stream from it and re-open the face with it.</p> <p>The stream implementation is very basic and resets the decompression process each time seeking backwards is needed within the stream, which significantly undermines the performance.</p> <p>This section contains the declaration of LZW-specific functions.</p> <h2 id="ft_stream_openlzw">FT_Stream_OpenLZW<a class="headerlink" href="#ft_stream_openlzw" title="Permanent link">&para;</a></h2> <p>Defined in FT_LZW_H (freetype/ftlzw.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Stream_OpenLZW</b>( <a href="ft2-system_interface.html#ft_stream">FT_Stream</a> stream, <a href="ft2-system_interface.html#ft_stream">FT_Stream</a> source ); </code></pre></div> <p>Open a new stream to parse LZW-compressed font files. This is mainly used to support the compressed <code>*.pcf.Z</code> fonts that come with XFree86.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="stream">stream</td><td class="desc"> <p>The target embedding stream.</p> </td></tr> <tr><td class="val" id="source">source</td><td class="desc"> <p>The source stream.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>The source stream must be opened <em>before</em> calling this function.</p> <p>Calling the internal function <code>FT_Stream_Close</code> on the new stream will <strong>not</strong> call <code>FT_Stream_Close</code> on the source stream. None of the stream objects will be released to the heap.</p> <p>This function may return <code>FT_Err_Unimplemented_Feature</code> if your build of FreeType was not compiled with LZW support.</p> <hr> </article> </div> </div> </main> <footer class="md-footer"> <nav class="md-footer__inner md-grid" aria-label="Footer"> <a href="ft2-gzip.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: GZIP Streams" rel="prev"> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Previous </span> GZIP Streams </div> </div> </a> <a href="ft2-bzip2.html" class="md-footer__link md-footer__link--next" aria-label="Next: BZIP2 Streams" rel="next"> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Next </span> BZIP2 Streams </div> </div> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg> </div> </a> </nav> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-footer-copyright"> <div class="md-footer-copyright__highlight"> Copyright 2022 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>. </div> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"base": ".", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "assets/javascripts/workers/search.477d984a.min.js", "version": null}</script> <script src="assets/javascripts/bundle.82b56eb2.min.js"></script> <script src="javascripts/extra.js"></script> </body> </html>
whupdup/frame
real/third_party/freetype-2.12.0/docs/reference/ft2-lzw.html
HTML
gpl-3.0
29,049
<!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="description" content="API Reference Documentation for FreeType-2.12.0"> <meta name="author" content="FreeType Contributors"> <link rel="icon" href="images/favico.ico"> <meta name="generator" content="mkdocs-1.2.1, mkdocs-material-7.1.9"> <title>Mac Specific Interface - FreeType-2.12.0 API Reference</title> <link rel="stylesheet" href="assets/stylesheets/main.ca7ac06f.min.css"> <link rel="stylesheet" href="assets/stylesheets/palette.f1a3b89f.min.css"> <meta name="theme-color" content="#4cae4f"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback"> <style>:root{--md-text-font-family:"Noto Serif";--md-code-font-family:"Roboto Mono"}</style> <link rel="stylesheet" href="stylesheets/extra.css"> </head> <body dir="ltr" data-md-color-scheme="" data-md-color-primary="green" data-md-color-accent="green"> <script>function __prefix(e){return new URL(".",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <label class="md-overlay" for="__drawer"></label> <div data-md-component="skip"> <a href="#mac-specific-interface" class="md-skip"> Skip to content </a> </div> <div data-md-component="announce"> </div> <header class="md-header" data-md-component="header"> <nav class="md-header__inner md-grid" aria-label="Header"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> <label class="md-header__button md-icon" for="__drawer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg> </label> <div class="md-header__title" data-md-component="header-title"> <div class="md-header__ellipsis"> <div class="md-header__topic"> <span class="md-ellipsis"> FreeType-2.12.0 API Reference </span> </div> <div class="md-header__topic" data-md-component="header-topic"> <span class="md-ellipsis"> Mac Specific Interface </span> </div> </div> </div> <label class="md-header__button md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> </label> <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required> <label class="md-search__icon md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </label> <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg> </button> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" data-md-scrollfix> <div class="md-search-result" data-md-component="search-result"> <div class="md-search-result__meta"> Initializing search </div> <ol class="md-search-result__list"></ol> </div> </div> </div> </div> </div> </nav> </header> <div class="md-container" data-md-component="container"> <main class="md-main" data-md-component="main"> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <label class="md-nav__title" for="__drawer"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> FreeType-2.12.0 API Reference </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="index.html" class="md-nav__link"> TOC </a> </li> <li class="md-nav__item"> <a href="ft2-index.html" class="md-nav__link"> Index </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" > <label class="md-nav__link" for="__nav_3"> General Remarks <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="General Remarks" data-md-level="1"> <label class="md-nav__title" for="__nav_3"> <span class="md-nav__icon md-icon"></span> General Remarks </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-preamble.html" class="md-nav__link"> Preamble </a> </li> <li class="md-nav__item"> <a href="ft2-header_inclusion.html" class="md-nav__link"> FreeType's header inclusion scheme </a> </li> <li class="md-nav__item"> <a href="ft2-user_allocation.html" class="md-nav__link"> User allocation </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--active md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" checked> <label class="md-nav__link" for="__nav_4"> Core API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Core API" data-md-level="1"> <label class="md-nav__title" for="__nav_4"> <span class="md-nav__icon md-icon"></span> Core API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-version.html" class="md-nav__link"> FreeType Version </a> </li> <li class="md-nav__item"> <a href="ft2-basic_types.html" class="md-nav__link"> Basic Data Types </a> </li> <li class="md-nav__item"> <a href="ft2-base_interface.html" class="md-nav__link"> Base Interface </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_variants.html" class="md-nav__link"> Unicode Variation Sequences </a> </li> <li class="md-nav__item"> <a href="ft2-color_management.html" class="md-nav__link"> Glyph Color Management </a> </li> <li class="md-nav__item"> <a href="ft2-layer_management.html" class="md-nav__link"> Glyph Layer Management </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_management.html" class="md-nav__link"> Glyph Management </a> </li> <li class="md-nav__item md-nav__item--active"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <label class="md-nav__link md-nav__link--active" for="__toc"> Mac Specific Interface <span class="md-nav__icon md-icon"></span> </label> <a href="ft2-mac_specific.html" class="md-nav__link md-nav__link--active"> Mac Specific Interface </a> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_new_face_from_fond" class="md-nav__link"> FT_New_Face_From_FOND </a> </li> <li class="md-nav__item"> <a href="#ft_getfile_from_mac_name" class="md-nav__link"> FT_GetFile_From_Mac_Name </a> </li> <li class="md-nav__item"> <a href="#ft_getfile_from_mac_ats_name" class="md-nav__link"> FT_GetFile_From_Mac_ATS_Name </a> </li> <li class="md-nav__item"> <a href="#ft_getfilepath_from_mac_ats_name" class="md-nav__link"> FT_GetFilePath_From_Mac_ATS_Name </a> </li> <li class="md-nav__item"> <a href="#ft_new_face_from_fsspec" class="md-nav__link"> FT_New_Face_From_FSSpec </a> </li> <li class="md-nav__item"> <a href="#ft_new_face_from_fsref" class="md-nav__link"> FT_New_Face_From_FSRef </a> </li> </ul> </nav> </li> <li class="md-nav__item"> <a href="ft2-sizes_management.html" class="md-nav__link"> Size Management </a> </li> <li class="md-nav__item"> <a href="ft2-header_file_macros.html" class="md-nav__link"> Header File Macros </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" > <label class="md-nav__link" for="__nav_5"> Format-Specific API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Format-Specific API" data-md-level="1"> <label class="md-nav__title" for="__nav_5"> <span class="md-nav__icon md-icon"></span> Format-Specific API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-multiple_masters.html" class="md-nav__link"> Multiple Masters </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_tables.html" class="md-nav__link"> TrueType Tables </a> </li> <li class="md-nav__item"> <a href="ft2-type1_tables.html" class="md-nav__link"> Type 1 Tables </a> </li> <li class="md-nav__item"> <a href="ft2-sfnt_names.html" class="md-nav__link"> SFNT Names </a> </li> <li class="md-nav__item"> <a href="ft2-bdf_fonts.html" class="md-nav__link"> BDF and PCF Files </a> </li> <li class="md-nav__item"> <a href="ft2-cid_fonts.html" class="md-nav__link"> CID Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-pfr_fonts.html" class="md-nav__link"> PFR Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-winfnt_fonts.html" class="md-nav__link"> Window FNT Files </a> </li> <li class="md-nav__item"> <a href="ft2-svg_fonts.html" class="md-nav__link"> OpenType SVG Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-font_formats.html" class="md-nav__link"> Font Formats </a> </li> <li class="md-nav__item"> <a href="ft2-gasp_table.html" class="md-nav__link"> Gasp Table </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" > <label class="md-nav__link" for="__nav_6"> Controlling FreeType Modules <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Controlling FreeType Modules" data-md-level="1"> <label class="md-nav__title" for="__nav_6"> <span class="md-nav__icon md-icon"></span> Controlling FreeType Modules </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-auto_hinter.html" class="md-nav__link"> The auto-hinter </a> </li> <li class="md-nav__item"> <a href="ft2-cff_driver.html" class="md-nav__link"> The CFF driver </a> </li> <li class="md-nav__item"> <a href="ft2-t1_cid_driver.html" class="md-nav__link"> The Type 1 and CID drivers </a> </li> <li class="md-nav__item"> <a href="ft2-tt_driver.html" class="md-nav__link"> The TrueType driver </a> </li> <li class="md-nav__item"> <a href="ft2-pcf_driver.html" class="md-nav__link"> The PCF driver </a> </li> <li class="md-nav__item"> <a href="ft2-ot_svg_driver.html" class="md-nav__link"> The SVG driver </a> </li> <li class="md-nav__item"> <a href="ft2-properties.html" class="md-nav__link"> Driver properties </a> </li> <li class="md-nav__item"> <a href="ft2-parameter_tags.html" class="md-nav__link"> Parameter Tags </a> </li> <li class="md-nav__item"> <a href="ft2-lcd_rendering.html" class="md-nav__link"> Subpixel Rendering </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" > <label class="md-nav__link" for="__nav_7"> Cache Sub-System <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1"> <label class="md-nav__title" for="__nav_7"> <span class="md-nav__icon md-icon"></span> Cache Sub-System </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-cache_subsystem.html" class="md-nav__link"> Cache Sub-System </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" > <label class="md-nav__link" for="__nav_8"> Support API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Support API" data-md-level="1"> <label class="md-nav__title" for="__nav_8"> <span class="md-nav__icon md-icon"></span> Support API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-computations.html" class="md-nav__link"> Computations </a> </li> <li class="md-nav__item"> <a href="ft2-list_processing.html" class="md-nav__link"> List Processing </a> </li> <li class="md-nav__item"> <a href="ft2-outline_processing.html" class="md-nav__link"> Outline Processing </a> </li> <li class="md-nav__item"> <a href="ft2-quick_advance.html" class="md-nav__link"> Quick retrieval of advance values </a> </li> <li class="md-nav__item"> <a href="ft2-bitmap_handling.html" class="md-nav__link"> Bitmap Handling </a> </li> <li class="md-nav__item"> <a href="ft2-raster.html" class="md-nav__link"> Scanline Converter </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_stroker.html" class="md-nav__link"> Glyph Stroker </a> </li> <li class="md-nav__item"> <a href="ft2-system_interface.html" class="md-nav__link"> System Interface </a> </li> <li class="md-nav__item"> <a href="ft2-module_management.html" class="md-nav__link"> Module Management </a> </li> <li class="md-nav__item"> <a href="ft2-gzip.html" class="md-nav__link"> GZIP Streams </a> </li> <li class="md-nav__item"> <a href="ft2-lzw.html" class="md-nav__link"> LZW Streams </a> </li> <li class="md-nav__item"> <a href="ft2-bzip2.html" class="md-nav__link"> BZIP2 Streams </a> </li> <li class="md-nav__item"> <a href="ft2-debugging_apis.html" class="md-nav__link"> External Debugging APIs </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" > <label class="md-nav__link" for="__nav_9"> Error Codes <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Error Codes" data-md-level="1"> <label class="md-nav__title" for="__nav_9"> <span class="md-nav__icon md-icon"></span> Error Codes </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-error_enumerations.html" class="md-nav__link"> Error Enumerations </a> </li> <li class="md-nav__item"> <a href="ft2-error_code_values.html" class="md-nav__link"> Error Code Values </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" > <label class="md-nav__link" for="__nav_10"> Miscellaneous <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1"> <label class="md-nav__title" for="__nav_10"> <span class="md-nav__icon md-icon"></span> Miscellaneous </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-gx_validation.html" class="md-nav__link"> TrueTypeGX/AAT Validation </a> </li> <li class="md-nav__item"> <a href="ft2-incremental.html" class="md-nav__link"> Incremental Loading </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_engine.html" class="md-nav__link"> The TrueType Engine </a> </li> <li class="md-nav__item"> <a href="ft2-ot_validation.html" class="md-nav__link"> OpenType Validation </a> </li> </ul> </nav> </li> </ul> </nav> </div> </div> </div> <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_new_face_from_fond" class="md-nav__link"> FT_New_Face_From_FOND </a> </li> <li class="md-nav__item"> <a href="#ft_getfile_from_mac_name" class="md-nav__link"> FT_GetFile_From_Mac_Name </a> </li> <li class="md-nav__item"> <a href="#ft_getfile_from_mac_ats_name" class="md-nav__link"> FT_GetFile_From_Mac_ATS_Name </a> </li> <li class="md-nav__item"> <a href="#ft_getfilepath_from_mac_ats_name" class="md-nav__link"> FT_GetFilePath_From_Mac_ATS_Name </a> </li> <li class="md-nav__item"> <a href="#ft_new_face_from_fsspec" class="md-nav__link"> FT_New_Face_From_FSSpec </a> </li> <li class="md-nav__item"> <a href="#ft_new_face_from_fsref" class="md-nav__link"> FT_New_Face_From_FSRef </a> </li> </ul> </nav> </div> </div> </div> <div class="md-content" data-md-component="content"> <article class="md-content__inner md-typeset"> <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; <a href="index.html#core-api">Core API</a> &raquo; Mac Specific Interface</p> <hr /> <h1 id="mac-specific-interface">Mac Specific Interface<a class="headerlink" href="#mac-specific-interface" title="Permanent link">&para;</a></h1> <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2> <p>The following definitions are only available if FreeType is compiled on a Macintosh.</p> <h2 id="ft_new_face_from_fond">FT_New_Face_From_FOND<a class="headerlink" href="#ft_new_face_from_fond" title="Permanent link">&para;</a></h2> <p>Defined in FT_MAC_H (freetype/ftmac.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_New_Face_From_FOND</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library, Handle fond, <a href="ft2-basic_types.html#ft_long">FT_Long</a> face_index, <a href="ft2-base_interface.html#ft_face">FT_Face</a> *aface ) FT_DEPRECATED_ATTRIBUTE; </code></pre></div> <p>Create a new face object from a FOND resource.</p> <h4>inout</h4> <table class="fields"> <tr><td class="val" id="library">library</td><td class="desc"> <p>A handle to the library resource.</p> </td></tr> </table> <h4>input</h4> <table class="fields"> <tr><td class="val" id="fond">fond</td><td class="desc"> <p>A FOND resource.</p> </td></tr> <tr><td class="val" id="face_index">face_index</td><td class="desc"> <p>Only supported for the -1 &lsquo;sanity check&rsquo; special case.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="aface">aface</td><td class="desc"> <p>A handle to a new face object.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>example</h4> <p>This function can be used to create <code><a href="ft2-base_interface.html#ft_face">FT_Face</a></code> objects from fonts that are installed in the system as follows. <div class="highlight"><pre><span></span><code> fond = GetResource( &#39;FOND&#39;, fontName ); error = FT_New_Face_From_FOND( library, fond, 0, &amp;face ); </code></pre></div></p> <hr> <h2 id="ft_getfile_from_mac_name">FT_GetFile_From_Mac_Name<a class="headerlink" href="#ft_getfile_from_mac_name" title="Permanent link">&para;</a></h2> <p>Defined in FT_MAC_H (freetype/ftmac.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_GetFile_From_Mac_Name</b>( <span class="keyword">const</span> <span class="keyword">char</span>* fontName, FSSpec* pathSpec, <a href="ft2-basic_types.html#ft_long">FT_Long</a>* face_index ) FT_DEPRECATED_ATTRIBUTE; </code></pre></div> <p>Return an FSSpec for the disk file containing the named font.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="fontname">fontName</td><td class="desc"> <p>Mac OS name of the font (e.g., Times New Roman Bold).</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="pathspec">pathSpec</td><td class="desc"> <p>FSSpec to the file. For passing to <code><a href="ft2-mac_specific.html#ft_new_face_from_fsspec">FT_New_Face_From_FSSpec</a></code>.</p> </td></tr> <tr><td class="val" id="face_index">face_index</td><td class="desc"> <p>Index of the face. For passing to <code><a href="ft2-mac_specific.html#ft_new_face_from_fsspec">FT_New_Face_From_FSSpec</a></code>.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <hr> <h2 id="ft_getfile_from_mac_ats_name">FT_GetFile_From_Mac_ATS_Name<a class="headerlink" href="#ft_getfile_from_mac_ats_name" title="Permanent link">&para;</a></h2> <p>Defined in FT_MAC_H (freetype/ftmac.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_GetFile_From_Mac_ATS_Name</b>( <span class="keyword">const</span> <span class="keyword">char</span>* fontName, FSSpec* pathSpec, <a href="ft2-basic_types.html#ft_long">FT_Long</a>* face_index ) FT_DEPRECATED_ATTRIBUTE; </code></pre></div> <p>Return an FSSpec for the disk file containing the named font.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="fontname">fontName</td><td class="desc"> <p>Mac OS name of the font in ATS framework.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="pathspec">pathSpec</td><td class="desc"> <p>FSSpec to the file. For passing to <code><a href="ft2-mac_specific.html#ft_new_face_from_fsspec">FT_New_Face_From_FSSpec</a></code>.</p> </td></tr> <tr><td class="val" id="face_index">face_index</td><td class="desc"> <p>Index of the face. For passing to <code><a href="ft2-mac_specific.html#ft_new_face_from_fsspec">FT_New_Face_From_FSSpec</a></code>.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <hr> <h2 id="ft_getfilepath_from_mac_ats_name">FT_GetFilePath_From_Mac_ATS_Name<a class="headerlink" href="#ft_getfilepath_from_mac_ats_name" title="Permanent link">&para;</a></h2> <p>Defined in FT_MAC_H (freetype/ftmac.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_GetFilePath_From_Mac_ATS_Name</b>( <span class="keyword">const</span> <span class="keyword">char</span>* fontName, UInt8* path, UInt32 maxPathSize, <a href="ft2-basic_types.html#ft_long">FT_Long</a>* face_index ) FT_DEPRECATED_ATTRIBUTE; </code></pre></div> <p>Return a pathname of the disk file and face index for given font name that is handled by ATS framework.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="fontname">fontName</td><td class="desc"> <p>Mac OS name of the font in ATS framework.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="path">path</td><td class="desc"> <p>Buffer to store pathname of the file. For passing to <code><a href="ft2-base_interface.html#ft_new_face">FT_New_Face</a></code>. The client must allocate this buffer before calling this function.</p> </td></tr> <tr><td class="val" id="maxpathsize">maxPathSize</td><td class="desc"> <p>Lengths of the buffer <code>path</code> that client allocated.</p> </td></tr> <tr><td class="val" id="face_index">face_index</td><td class="desc"> <p>Index of the face. For passing to <code><a href="ft2-base_interface.html#ft_new_face">FT_New_Face</a></code>.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <hr> <h2 id="ft_new_face_from_fsspec">FT_New_Face_From_FSSpec<a class="headerlink" href="#ft_new_face_from_fsspec" title="Permanent link">&para;</a></h2> <p>Defined in FT_MAC_H (freetype/ftmac.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_New_Face_From_FSSpec</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library, <span class="keyword">const</span> FSSpec *spec, <a href="ft2-basic_types.html#ft_long">FT_Long</a> face_index, <a href="ft2-base_interface.html#ft_face">FT_Face</a> *aface ) FT_DEPRECATED_ATTRIBUTE; </code></pre></div> <p>Create a new face object from a given resource and typeface index using an FSSpec to the font file.</p> <h4>inout</h4> <table class="fields"> <tr><td class="val" id="library">library</td><td class="desc"> <p>A handle to the library resource.</p> </td></tr> </table> <h4>input</h4> <table class="fields"> <tr><td class="val" id="spec">spec</td><td class="desc"> <p>FSSpec to the font file.</p> </td></tr> <tr><td class="val" id="face_index">face_index</td><td class="desc"> <p>The index of the face within the resource. The first face has index&nbsp;0.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="aface">aface</td><td class="desc"> <p>A handle to a new face object.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p><code><a href="ft2-mac_specific.html#ft_new_face_from_fsspec">FT_New_Face_From_FSSpec</a></code> is identical to <code><a href="ft2-base_interface.html#ft_new_face">FT_New_Face</a></code> except it accepts an FSSpec instead of a path.</p> <hr> <h2 id="ft_new_face_from_fsref">FT_New_Face_From_FSRef<a class="headerlink" href="#ft_new_face_from_fsref" title="Permanent link">&para;</a></h2> <p>Defined in FT_MAC_H (freetype/ftmac.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_New_Face_From_FSRef</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library, <span class="keyword">const</span> FSRef *ref, <a href="ft2-basic_types.html#ft_long">FT_Long</a> face_index, <a href="ft2-base_interface.html#ft_face">FT_Face</a> *aface ) FT_DEPRECATED_ATTRIBUTE; </code></pre></div> <p>Create a new face object from a given resource and typeface index using an FSRef to the font file.</p> <h4>inout</h4> <table class="fields"> <tr><td class="val" id="library">library</td><td class="desc"> <p>A handle to the library resource.</p> </td></tr> </table> <h4>input</h4> <table class="fields"> <tr><td class="val" id="spec">spec</td><td class="desc"> <p>FSRef to the font file.</p> </td></tr> <tr><td class="val" id="face_index">face_index</td><td class="desc"> <p>The index of the face within the resource. The first face has index&nbsp;0.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="aface">aface</td><td class="desc"> <p>A handle to a new face object.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p><code><a href="ft2-mac_specific.html#ft_new_face_from_fsref">FT_New_Face_From_FSRef</a></code> is identical to <code><a href="ft2-base_interface.html#ft_new_face">FT_New_Face</a></code> except it accepts an FSRef instead of a path.</p> <hr> </article> </div> </div> </main> <footer class="md-footer"> <nav class="md-footer__inner md-grid" aria-label="Footer"> <a href="ft2-glyph_management.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: Glyph Management" rel="prev"> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Previous </span> Glyph Management </div> </div> </a> <a href="ft2-sizes_management.html" class="md-footer__link md-footer__link--next" aria-label="Next: Size Management" rel="next"> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Next </span> Size Management </div> </div> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg> </div> </a> </nav> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-footer-copyright"> <div class="md-footer-copyright__highlight"> Copyright 2022 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>. </div> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"base": ".", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "assets/javascripts/workers/search.477d984a.min.js", "version": null}</script> <script src="assets/javascripts/bundle.82b56eb2.min.js"></script> <script src="javascripts/extra.js"></script> </body> </html>
whupdup/frame
real/third_party/freetype-2.12.0/docs/reference/ft2-mac_specific.html
HTML
gpl-3.0
38,775
<!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="description" content="API Reference Documentation for FreeType-2.12.0"> <meta name="author" content="FreeType Contributors"> <link rel="icon" href="images/favico.ico"> <meta name="generator" content="mkdocs-1.2.1, mkdocs-material-7.1.9"> <title>Module Management - FreeType-2.12.0 API Reference</title> <link rel="stylesheet" href="assets/stylesheets/main.ca7ac06f.min.css"> <link rel="stylesheet" href="assets/stylesheets/palette.f1a3b89f.min.css"> <meta name="theme-color" content="#4cae4f"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback"> <style>:root{--md-text-font-family:"Noto Serif";--md-code-font-family:"Roboto Mono"}</style> <link rel="stylesheet" href="stylesheets/extra.css"> </head> <body dir="ltr" data-md-color-scheme="" data-md-color-primary="green" data-md-color-accent="green"> <script>function __prefix(e){return new URL(".",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <label class="md-overlay" for="__drawer"></label> <div data-md-component="skip"> <a href="#module-management" class="md-skip"> Skip to content </a> </div> <div data-md-component="announce"> </div> <header class="md-header" data-md-component="header"> <nav class="md-header__inner md-grid" aria-label="Header"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> <label class="md-header__button md-icon" for="__drawer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg> </label> <div class="md-header__title" data-md-component="header-title"> <div class="md-header__ellipsis"> <div class="md-header__topic"> <span class="md-ellipsis"> FreeType-2.12.0 API Reference </span> </div> <div class="md-header__topic" data-md-component="header-topic"> <span class="md-ellipsis"> Module Management </span> </div> </div> </div> <label class="md-header__button md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> </label> <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required> <label class="md-search__icon md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </label> <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg> </button> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" data-md-scrollfix> <div class="md-search-result" data-md-component="search-result"> <div class="md-search-result__meta"> Initializing search </div> <ol class="md-search-result__list"></ol> </div> </div> </div> </div> </div> </nav> </header> <div class="md-container" data-md-component="container"> <main class="md-main" data-md-component="main"> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <label class="md-nav__title" for="__drawer"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> FreeType-2.12.0 API Reference </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="index.html" class="md-nav__link"> TOC </a> </li> <li class="md-nav__item"> <a href="ft2-index.html" class="md-nav__link"> Index </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" > <label class="md-nav__link" for="__nav_3"> General Remarks <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="General Remarks" data-md-level="1"> <label class="md-nav__title" for="__nav_3"> <span class="md-nav__icon md-icon"></span> General Remarks </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-preamble.html" class="md-nav__link"> Preamble </a> </li> <li class="md-nav__item"> <a href="ft2-header_inclusion.html" class="md-nav__link"> FreeType's header inclusion scheme </a> </li> <li class="md-nav__item"> <a href="ft2-user_allocation.html" class="md-nav__link"> User allocation </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" > <label class="md-nav__link" for="__nav_4"> Core API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Core API" data-md-level="1"> <label class="md-nav__title" for="__nav_4"> <span class="md-nav__icon md-icon"></span> Core API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-version.html" class="md-nav__link"> FreeType Version </a> </li> <li class="md-nav__item"> <a href="ft2-basic_types.html" class="md-nav__link"> Basic Data Types </a> </li> <li class="md-nav__item"> <a href="ft2-base_interface.html" class="md-nav__link"> Base Interface </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_variants.html" class="md-nav__link"> Unicode Variation Sequences </a> </li> <li class="md-nav__item"> <a href="ft2-color_management.html" class="md-nav__link"> Glyph Color Management </a> </li> <li class="md-nav__item"> <a href="ft2-layer_management.html" class="md-nav__link"> Glyph Layer Management </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_management.html" class="md-nav__link"> Glyph Management </a> </li> <li class="md-nav__item"> <a href="ft2-mac_specific.html" class="md-nav__link"> Mac Specific Interface </a> </li> <li class="md-nav__item"> <a href="ft2-sizes_management.html" class="md-nav__link"> Size Management </a> </li> <li class="md-nav__item"> <a href="ft2-header_file_macros.html" class="md-nav__link"> Header File Macros </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" > <label class="md-nav__link" for="__nav_5"> Format-Specific API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Format-Specific API" data-md-level="1"> <label class="md-nav__title" for="__nav_5"> <span class="md-nav__icon md-icon"></span> Format-Specific API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-multiple_masters.html" class="md-nav__link"> Multiple Masters </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_tables.html" class="md-nav__link"> TrueType Tables </a> </li> <li class="md-nav__item"> <a href="ft2-type1_tables.html" class="md-nav__link"> Type 1 Tables </a> </li> <li class="md-nav__item"> <a href="ft2-sfnt_names.html" class="md-nav__link"> SFNT Names </a> </li> <li class="md-nav__item"> <a href="ft2-bdf_fonts.html" class="md-nav__link"> BDF and PCF Files </a> </li> <li class="md-nav__item"> <a href="ft2-cid_fonts.html" class="md-nav__link"> CID Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-pfr_fonts.html" class="md-nav__link"> PFR Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-winfnt_fonts.html" class="md-nav__link"> Window FNT Files </a> </li> <li class="md-nav__item"> <a href="ft2-svg_fonts.html" class="md-nav__link"> OpenType SVG Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-font_formats.html" class="md-nav__link"> Font Formats </a> </li> <li class="md-nav__item"> <a href="ft2-gasp_table.html" class="md-nav__link"> Gasp Table </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" > <label class="md-nav__link" for="__nav_6"> Controlling FreeType Modules <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Controlling FreeType Modules" data-md-level="1"> <label class="md-nav__title" for="__nav_6"> <span class="md-nav__icon md-icon"></span> Controlling FreeType Modules </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-auto_hinter.html" class="md-nav__link"> The auto-hinter </a> </li> <li class="md-nav__item"> <a href="ft2-cff_driver.html" class="md-nav__link"> The CFF driver </a> </li> <li class="md-nav__item"> <a href="ft2-t1_cid_driver.html" class="md-nav__link"> The Type 1 and CID drivers </a> </li> <li class="md-nav__item"> <a href="ft2-tt_driver.html" class="md-nav__link"> The TrueType driver </a> </li> <li class="md-nav__item"> <a href="ft2-pcf_driver.html" class="md-nav__link"> The PCF driver </a> </li> <li class="md-nav__item"> <a href="ft2-ot_svg_driver.html" class="md-nav__link"> The SVG driver </a> </li> <li class="md-nav__item"> <a href="ft2-properties.html" class="md-nav__link"> Driver properties </a> </li> <li class="md-nav__item"> <a href="ft2-parameter_tags.html" class="md-nav__link"> Parameter Tags </a> </li> <li class="md-nav__item"> <a href="ft2-lcd_rendering.html" class="md-nav__link"> Subpixel Rendering </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" > <label class="md-nav__link" for="__nav_7"> Cache Sub-System <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1"> <label class="md-nav__title" for="__nav_7"> <span class="md-nav__icon md-icon"></span> Cache Sub-System </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-cache_subsystem.html" class="md-nav__link"> Cache Sub-System </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--active md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" checked> <label class="md-nav__link" for="__nav_8"> Support API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Support API" data-md-level="1"> <label class="md-nav__title" for="__nav_8"> <span class="md-nav__icon md-icon"></span> Support API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-computations.html" class="md-nav__link"> Computations </a> </li> <li class="md-nav__item"> <a href="ft2-list_processing.html" class="md-nav__link"> List Processing </a> </li> <li class="md-nav__item"> <a href="ft2-outline_processing.html" class="md-nav__link"> Outline Processing </a> </li> <li class="md-nav__item"> <a href="ft2-quick_advance.html" class="md-nav__link"> Quick retrieval of advance values </a> </li> <li class="md-nav__item"> <a href="ft2-bitmap_handling.html" class="md-nav__link"> Bitmap Handling </a> </li> <li class="md-nav__item"> <a href="ft2-raster.html" class="md-nav__link"> Scanline Converter </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_stroker.html" class="md-nav__link"> Glyph Stroker </a> </li> <li class="md-nav__item"> <a href="ft2-system_interface.html" class="md-nav__link"> System Interface </a> </li> <li class="md-nav__item md-nav__item--active"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <label class="md-nav__link md-nav__link--active" for="__toc"> Module Management <span class="md-nav__icon md-icon"></span> </label> <a href="ft2-module_management.html" class="md-nav__link md-nav__link--active"> Module Management </a> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_module" class="md-nav__link"> FT_Module </a> </li> <li class="md-nav__item"> <a href="#ft_module_constructor" class="md-nav__link"> FT_Module_Constructor </a> </li> <li class="md-nav__item"> <a href="#ft_module_destructor" class="md-nav__link"> FT_Module_Destructor </a> </li> <li class="md-nav__item"> <a href="#ft_module_requester" class="md-nav__link"> FT_Module_Requester </a> </li> <li class="md-nav__item"> <a href="#ft_module_class" class="md-nav__link"> FT_Module_Class </a> </li> <li class="md-nav__item"> <a href="#ft_add_module" class="md-nav__link"> FT_Add_Module </a> </li> <li class="md-nav__item"> <a href="#ft_get_module" class="md-nav__link"> FT_Get_Module </a> </li> <li class="md-nav__item"> <a href="#ft_remove_module" class="md-nav__link"> FT_Remove_Module </a> </li> <li class="md-nav__item"> <a href="#ft_add_default_modules" class="md-nav__link"> FT_Add_Default_Modules </a> </li> <li class="md-nav__item"> <a href="#ft_face_driver_name" class="md-nav__link"> FT_FACE_DRIVER_NAME </a> </li> <li class="md-nav__item"> <a href="#ft_property_set" class="md-nav__link"> FT_Property_Set </a> </li> <li class="md-nav__item"> <a href="#ft_property_get" class="md-nav__link"> FT_Property_Get </a> </li> <li class="md-nav__item"> <a href="#ft_set_default_properties" class="md-nav__link"> FT_Set_Default_Properties </a> </li> <li class="md-nav__item"> <a href="#ft_new_library" class="md-nav__link"> FT_New_Library </a> </li> <li class="md-nav__item"> <a href="#ft_done_library" class="md-nav__link"> FT_Done_Library </a> </li> <li class="md-nav__item"> <a href="#ft_reference_library" class="md-nav__link"> FT_Reference_Library </a> </li> <li class="md-nav__item"> <a href="#ft_renderer" class="md-nav__link"> FT_Renderer </a> </li> <li class="md-nav__item"> <a href="#ft_renderer_class" class="md-nav__link"> FT_Renderer_Class </a> </li> <li class="md-nav__item"> <a href="#ft_get_renderer" class="md-nav__link"> FT_Get_Renderer </a> </li> <li class="md-nav__item"> <a href="#ft_set_renderer" class="md-nav__link"> FT_Set_Renderer </a> </li> <li class="md-nav__item"> <a href="#ft_set_debug_hook" class="md-nav__link"> FT_Set_Debug_Hook </a> </li> <li class="md-nav__item"> <a href="#ft_driver" class="md-nav__link"> FT_Driver </a> </li> <li class="md-nav__item"> <a href="#ft_debughook_func" class="md-nav__link"> FT_DebugHook_Func </a> </li> <li class="md-nav__item"> <a href="#ft_debug_hook_xxx" class="md-nav__link"> FT_DEBUG_HOOK_XXX </a> </li> </ul> </nav> </li> <li class="md-nav__item"> <a href="ft2-gzip.html" class="md-nav__link"> GZIP Streams </a> </li> <li class="md-nav__item"> <a href="ft2-lzw.html" class="md-nav__link"> LZW Streams </a> </li> <li class="md-nav__item"> <a href="ft2-bzip2.html" class="md-nav__link"> BZIP2 Streams </a> </li> <li class="md-nav__item"> <a href="ft2-debugging_apis.html" class="md-nav__link"> External Debugging APIs </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" > <label class="md-nav__link" for="__nav_9"> Error Codes <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Error Codes" data-md-level="1"> <label class="md-nav__title" for="__nav_9"> <span class="md-nav__icon md-icon"></span> Error Codes </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-error_enumerations.html" class="md-nav__link"> Error Enumerations </a> </li> <li class="md-nav__item"> <a href="ft2-error_code_values.html" class="md-nav__link"> Error Code Values </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" > <label class="md-nav__link" for="__nav_10"> Miscellaneous <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1"> <label class="md-nav__title" for="__nav_10"> <span class="md-nav__icon md-icon"></span> Miscellaneous </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-gx_validation.html" class="md-nav__link"> TrueTypeGX/AAT Validation </a> </li> <li class="md-nav__item"> <a href="ft2-incremental.html" class="md-nav__link"> Incremental Loading </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_engine.html" class="md-nav__link"> The TrueType Engine </a> </li> <li class="md-nav__item"> <a href="ft2-ot_validation.html" class="md-nav__link"> OpenType Validation </a> </li> </ul> </nav> </li> </ul> </nav> </div> </div> </div> <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_module" class="md-nav__link"> FT_Module </a> </li> <li class="md-nav__item"> <a href="#ft_module_constructor" class="md-nav__link"> FT_Module_Constructor </a> </li> <li class="md-nav__item"> <a href="#ft_module_destructor" class="md-nav__link"> FT_Module_Destructor </a> </li> <li class="md-nav__item"> <a href="#ft_module_requester" class="md-nav__link"> FT_Module_Requester </a> </li> <li class="md-nav__item"> <a href="#ft_module_class" class="md-nav__link"> FT_Module_Class </a> </li> <li class="md-nav__item"> <a href="#ft_add_module" class="md-nav__link"> FT_Add_Module </a> </li> <li class="md-nav__item"> <a href="#ft_get_module" class="md-nav__link"> FT_Get_Module </a> </li> <li class="md-nav__item"> <a href="#ft_remove_module" class="md-nav__link"> FT_Remove_Module </a> </li> <li class="md-nav__item"> <a href="#ft_add_default_modules" class="md-nav__link"> FT_Add_Default_Modules </a> </li> <li class="md-nav__item"> <a href="#ft_face_driver_name" class="md-nav__link"> FT_FACE_DRIVER_NAME </a> </li> <li class="md-nav__item"> <a href="#ft_property_set" class="md-nav__link"> FT_Property_Set </a> </li> <li class="md-nav__item"> <a href="#ft_property_get" class="md-nav__link"> FT_Property_Get </a> </li> <li class="md-nav__item"> <a href="#ft_set_default_properties" class="md-nav__link"> FT_Set_Default_Properties </a> </li> <li class="md-nav__item"> <a href="#ft_new_library" class="md-nav__link"> FT_New_Library </a> </li> <li class="md-nav__item"> <a href="#ft_done_library" class="md-nav__link"> FT_Done_Library </a> </li> <li class="md-nav__item"> <a href="#ft_reference_library" class="md-nav__link"> FT_Reference_Library </a> </li> <li class="md-nav__item"> <a href="#ft_renderer" class="md-nav__link"> FT_Renderer </a> </li> <li class="md-nav__item"> <a href="#ft_renderer_class" class="md-nav__link"> FT_Renderer_Class </a> </li> <li class="md-nav__item"> <a href="#ft_get_renderer" class="md-nav__link"> FT_Get_Renderer </a> </li> <li class="md-nav__item"> <a href="#ft_set_renderer" class="md-nav__link"> FT_Set_Renderer </a> </li> <li class="md-nav__item"> <a href="#ft_set_debug_hook" class="md-nav__link"> FT_Set_Debug_Hook </a> </li> <li class="md-nav__item"> <a href="#ft_driver" class="md-nav__link"> FT_Driver </a> </li> <li class="md-nav__item"> <a href="#ft_debughook_func" class="md-nav__link"> FT_DebugHook_Func </a> </li> <li class="md-nav__item"> <a href="#ft_debug_hook_xxx" class="md-nav__link"> FT_DEBUG_HOOK_XXX </a> </li> </ul> </nav> </div> </div> </div> <div class="md-content" data-md-component="content"> <article class="md-content__inner md-typeset"> <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; <a href="index.html#support-api">Support API</a> &raquo; Module Management</p> <hr /> <h1 id="module-management">Module Management<a class="headerlink" href="#module-management" title="Permanent link">&para;</a></h1> <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2> <p>The definitions below are used to manage modules within FreeType. Internal and external modules can be added, upgraded, and removed at runtime. For example, an alternative renderer or proprietary font driver can be registered and prioritized. Additionally, some module properties can also be controlled.</p> <p>Here is a list of existing values of the <code>module_name</code> field in the <code><a href="ft2-module_management.html#ft_module_class">FT_Module_Class</a></code> structure. <div class="highlight"><pre><span></span><code> autofitter bdf cff gxvalid otvalid pcf pfr psaux pshinter psnames raster1 sfnt smooth truetype type1 type42 t1cid winfonts </code></pre></div></p> <p>Note that the FreeType Cache sub-system is not a FreeType module.</p> <h2 id="ft_module">FT_Module<a class="headerlink" href="#ft_module" title="Permanent link">&para;</a></h2> <p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_ModuleRec_* <b>FT_Module</b>; </code></pre></div> <p>A handle to a given FreeType module object. A module can be a font driver, a renderer, or anything else that provides services to the former.</p> <hr> <h2 id="ft_module_constructor">FT_Module_Constructor<a class="headerlink" href="#ft_module_constructor" title="Permanent link">&para;</a></h2> <p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <a href="ft2-basic_types.html#ft_error">FT_Error</a> (*<b>FT_Module_Constructor</b>)( <a href="ft2-module_management.html#ft_module">FT_Module</a> module ); </code></pre></div> <p>A function used to initialize (not create) a new module object.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="module">module</td><td class="desc"> <p>The module to initialize.</p> </td></tr> </table> <hr> <h2 id="ft_module_destructor">FT_Module_Destructor<a class="headerlink" href="#ft_module_destructor" title="Permanent link">&para;</a></h2> <p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">void</span> (*<b>FT_Module_Destructor</b>)( <a href="ft2-module_management.html#ft_module">FT_Module</a> module ); </code></pre></div> <p>A function used to finalize (not destroy) a given module object.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="module">module</td><td class="desc"> <p>The module to finalize.</p> </td></tr> </table> <hr> <h2 id="ft_module_requester">FT_Module_Requester<a class="headerlink" href="#ft_module_requester" title="Permanent link">&para;</a></h2> <p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> FT_Module_Interface (*<b>FT_Module_Requester</b>)( <a href="ft2-module_management.html#ft_module">FT_Module</a> module, <span class="keyword">const</span> <span class="keyword">char</span>* name ); </code></pre></div> <p>A function used to query a given module for a specific interface.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="module">module</td><td class="desc"> <p>The module to be searched.</p> </td></tr> <tr><td class="val" id="name">name</td><td class="desc"> <p>The name of the interface in the module.</p> </td></tr> </table> <hr> <h2 id="ft_module_class">FT_Module_Class<a class="headerlink" href="#ft_module_class" title="Permanent link">&para;</a></h2> <p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Module_Class_ { <a href="ft2-basic_types.html#ft_ulong">FT_ULong</a> module_flags; <a href="ft2-basic_types.html#ft_long">FT_Long</a> module_size; <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_string">FT_String</a>* module_name; <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a> module_version; <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a> module_requires; <span class="keyword">const</span> <span class="keyword">void</span>* module_interface; <a href="ft2-module_management.html#ft_module_constructor">FT_Module_Constructor</a> module_init; <a href="ft2-module_management.html#ft_module_destructor">FT_Module_Destructor</a> module_done; <a href="ft2-module_management.html#ft_module_requester">FT_Module_Requester</a> get_interface; } <b>FT_Module_Class</b>; </code></pre></div> <p>The module class descriptor. While being a public structure necessary for FreeType's module bookkeeping, most of the fields are essentially internal, not to be used directly by an application.</p> <h4>fields</h4> <table class="fields"> <tr><td class="val" id="module_flags">module_flags</td><td class="desc"> <p>Bit flags describing the module.</p> </td></tr> <tr><td class="val" id="module_size">module_size</td><td class="desc"> <p>The size of one module object/instance in bytes.</p> </td></tr> <tr><td class="val" id="module_name">module_name</td><td class="desc"> <p>The name of the module.</p> </td></tr> <tr><td class="val" id="module_version">module_version</td><td class="desc"> <p>The version, as a 16.16 fixed number (major.minor).</p> </td></tr> <tr><td class="val" id="module_requires">module_requires</td><td class="desc"> <p>The version of FreeType this module requires, as a 16.16 fixed number (major.minor). Starts at version 2.0, i.e., 0x20000.</p> </td></tr> <tr><td class="val" id="module_interface">module_interface</td><td class="desc"> <p>A typeless pointer to a structure (which varies between different modules) that holds the module's interface functions. This is essentially what <code>get_interface</code> returns.</p> </td></tr> <tr><td class="val" id="module_init">module_init</td><td class="desc"> <p>The initializing function.</p> </td></tr> <tr><td class="val" id="module_done">module_done</td><td class="desc"> <p>The finalizing function.</p> </td></tr> <tr><td class="val" id="get_interface">get_interface</td><td class="desc"> <p>The interface requesting function.</p> </td></tr> </table> <hr> <h2 id="ft_add_module">FT_Add_Module<a class="headerlink" href="#ft_add_module" title="Permanent link">&para;</a></h2> <p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Add_Module</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library, <span class="keyword">const</span> <a href="ft2-module_management.html#ft_module_class">FT_Module_Class</a>* clazz ); </code></pre></div> <p>Add a new module to a given library instance.</p> <h4>inout</h4> <table class="fields"> <tr><td class="val" id="library">library</td><td class="desc"> <p>A handle to the library object.</p> </td></tr> </table> <h4>input</h4> <table class="fields"> <tr><td class="val" id="clazz">clazz</td><td class="desc"> <p>A pointer to class descriptor for the module.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>An error will be returned if a module already exists by that name, or if the module requires a version of FreeType that is too great.</p> <hr> <h2 id="ft_get_module">FT_Get_Module<a class="headerlink" href="#ft_get_module" title="Permanent link">&para;</a></h2> <p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-module_management.html#ft_module">FT_Module</a> ) <b>FT_Get_Module</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library, <span class="keyword">const</span> <span class="keyword">char</span>* module_name ); </code></pre></div> <p>Find a module by its name.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="library">library</td><td class="desc"> <p>A handle to the library object.</p> </td></tr> <tr><td class="val" id="module_name">module_name</td><td class="desc"> <p>The module's name (as an ASCII string).</p> </td></tr> </table> <h4>return</h4> <p>A module handle. 0&nbsp;if none was found.</p> <h4>note</h4> <p>FreeType's internal modules aren't documented very well, and you should look up the source code for details.</p> <hr> <h2 id="ft_remove_module">FT_Remove_Module<a class="headerlink" href="#ft_remove_module" title="Permanent link">&para;</a></h2> <p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Remove_Module</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library, <a href="ft2-module_management.html#ft_module">FT_Module</a> module ); </code></pre></div> <p>Remove a given module from a library instance.</p> <h4>inout</h4> <table class="fields"> <tr><td class="val" id="library">library</td><td class="desc"> <p>A handle to a library object.</p> </td></tr> </table> <h4>input</h4> <table class="fields"> <tr><td class="val" id="module">module</td><td class="desc"> <p>A handle to a module object.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>The module object is destroyed by the function in case of success.</p> <hr> <h2 id="ft_add_default_modules">FT_Add_Default_Modules<a class="headerlink" href="#ft_add_default_modules" title="Permanent link">&para;</a></h2> <p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> ) <b>FT_Add_Default_Modules</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library ); </code></pre></div> <p>Add the set of default drivers to a given library object. This is only useful when you create a library object with <code><a href="ft2-module_management.html#ft_new_library">FT_New_Library</a></code> (usually to plug a custom memory manager).</p> <h4>inout</h4> <table class="fields"> <tr><td class="val" id="library">library</td><td class="desc"> <p>A handle to a new library object.</p> </td></tr> </table> <hr> <h2 id="ft_face_driver_name">FT_FACE_DRIVER_NAME<a class="headerlink" href="#ft_face_driver_name" title="Permanent link">&para;</a></h2> <p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_FACE_DRIVER_NAME</b>( face ) \ ( ( *FT_REINTERPRET_CAST( <a href="ft2-module_management.html#ft_module_class">FT_Module_Class</a>**, \ ( face )-&gt;driver ) )-&gt;module_name ) </code></pre></div> <p>A macro that retrieves the name of a font driver from a face object.</p> <h4>note</h4> <p>The font driver name is a valid <code>module_name</code> for <code><a href="ft2-module_management.html#ft_property_set">FT_Property_Set</a></code> and <code><a href="ft2-module_management.html#ft_property_get">FT_Property_Get</a></code>. This is not the same as <code><a href="ft2-font_formats.html#ft_get_font_format">FT_Get_Font_Format</a></code>.</p> <h4>since</h4> <p>2.11</p> <hr> <h2 id="ft_property_set">FT_Property_Set<a class="headerlink" href="#ft_property_set" title="Permanent link">&para;</a></h2> <p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Property_Set</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library, <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_string">FT_String</a>* module_name, <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_string">FT_String</a>* property_name, <span class="keyword">const</span> <span class="keyword">void</span>* value ); </code></pre></div> <p>Set a property for a given module.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="library">library</td><td class="desc"> <p>A handle to the library the module is part of.</p> </td></tr> <tr><td class="val" id="module_name">module_name</td><td class="desc"> <p>The module name.</p> </td></tr> <tr><td class="val" id="property_name">property_name</td><td class="desc"> <p>The property name. Properties are described in section &lsquo;<a href="ft2-properties.html#properties">Driver properties</a>&rsquo;.</p> <p>Note that only a few modules have properties.</p> </td></tr> <tr><td class="val" id="value">value</td><td class="desc"> <p>A generic pointer to a variable or structure that gives the new value of the property. The exact definition of <code>value</code> is dependent on the property; see section &lsquo;<a href="ft2-properties.html#properties">Driver properties</a>&rsquo;.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>If <code>module_name</code> isn't a valid module name, or <code>property_name</code> doesn't specify a valid property, or if <code>value</code> doesn't represent a valid value for the given property, an error is returned.</p> <p>The following example sets property &lsquo;bar&rsquo; (a simple integer) in module &lsquo;foo&rsquo; to value&nbsp;1. <div class="highlight"><pre><span></span><code> FT_UInt bar; bar = 1; FT_Property_Set( library, &quot;foo&quot;, &quot;bar&quot;, &amp;bar ); </code></pre></div></p> <p>Note that the FreeType Cache sub-system doesn't recognize module property changes. To avoid glyph lookup confusion within the cache you should call <code><a href="ft2-cache_subsystem.html#ftc_manager_reset">FTC_Manager_Reset</a></code> to completely flush the cache if a module property gets changed after <code><a href="ft2-cache_subsystem.html#ftc_manager_new">FTC_Manager_New</a></code> has been called.</p> <p>It is not possible to set properties of the FreeType Cache sub-system itself with FT_Property_Set; use ?FTC_Property_Set? instead.</p> <h4>since</h4> <p>2.4.11</p> <hr> <h2 id="ft_property_get">FT_Property_Get<a class="headerlink" href="#ft_property_get" title="Permanent link">&para;</a></h2> <p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Property_Get</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library, <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_string">FT_String</a>* module_name, <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_string">FT_String</a>* property_name, <span class="keyword">void</span>* value ); </code></pre></div> <p>Get a module's property value.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="library">library</td><td class="desc"> <p>A handle to the library the module is part of.</p> </td></tr> <tr><td class="val" id="module_name">module_name</td><td class="desc"> <p>The module name.</p> </td></tr> <tr><td class="val" id="property_name">property_name</td><td class="desc"> <p>The property name. Properties are described in section &lsquo;<a href="ft2-properties.html#properties">Driver properties</a>&rsquo;.</p> </td></tr> </table> <h4>inout</h4> <table class="fields"> <tr><td class="val" id="value">value</td><td class="desc"> <p>A generic pointer to a variable or structure that gives the value of the property. The exact definition of <code>value</code> is dependent on the property; see section &lsquo;<a href="ft2-properties.html#properties">Driver properties</a>&rsquo;.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>If <code>module_name</code> isn't a valid module name, or <code>property_name</code> doesn't specify a valid property, or if <code>value</code> doesn't represent a valid value for the given property, an error is returned.</p> <p>The following example gets property &lsquo;baz&rsquo; (a range) in module &lsquo;foo&rsquo;. <div class="highlight"><pre><span></span><code> typedef range_ { FT_Int32 min; FT_Int32 max; } range; range baz; FT_Property_Get( library, &quot;foo&quot;, &quot;baz&quot;, &amp;baz ); </code></pre></div></p> <p>It is not possible to retrieve properties of the FreeType Cache sub-system with FT_Property_Get; use ?FTC_Property_Get? instead.</p> <h4>since</h4> <p>2.4.11</p> <hr> <h2 id="ft_set_default_properties">FT_Set_Default_Properties<a class="headerlink" href="#ft_set_default_properties" title="Permanent link">&para;</a></h2> <p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> ) <b>FT_Set_Default_Properties</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library ); </code></pre></div> <p>If compilation option <code>FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES</code> is set, this function reads the <code>FREETYPE_PROPERTIES</code> environment variable to control driver properties. See section &lsquo;<a href="ft2-properties.html#properties">Driver properties</a>&rsquo; for more.</p> <p>If the compilation option is not set, this function does nothing.</p> <p><code>FREETYPE_PROPERTIES</code> has the following syntax form (broken here into multiple lines for better readability). <div class="highlight"><pre><span></span><code> &lt;optional whitespace&gt; &lt;module-name1&gt; &#39;:&#39; &lt;property-name1&gt; &#39;=&#39; &lt;property-value1&gt; &lt;whitespace&gt; &lt;module-name2&gt; &#39;:&#39; &lt;property-name2&gt; &#39;=&#39; &lt;property-value2&gt; ... </code></pre></div></p> <p>Example: <div class="highlight"><pre><span></span><code> FREETYPE_PROPERTIES=truetype:interpreter-version=35 \ cff:no-stem-darkening=0 </code></pre></div></p> <h4>inout</h4> <table class="fields"> <tr><td class="val" id="library">library</td><td class="desc"> <p>A handle to a new library object.</p> </td></tr> </table> <h4>since</h4> <p>2.8</p> <hr> <h2 id="ft_new_library">FT_New_Library<a class="headerlink" href="#ft_new_library" title="Permanent link">&para;</a></h2> <p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_New_Library</b>( <a href="ft2-system_interface.html#ft_memory">FT_Memory</a> memory, <a href="ft2-base_interface.html#ft_library">FT_Library</a> *alibrary ); </code></pre></div> <p>This function is used to create a new FreeType library instance from a given memory object. It is thus possible to use libraries with distinct memory allocators within the same program. Note, however, that the used <code><a href="ft2-system_interface.html#ft_memory">FT_Memory</a></code> structure is expected to remain valid for the life of the <code><a href="ft2-base_interface.html#ft_library">FT_Library</a></code> object.</p> <p>Normally, you would call this function (followed by a call to <code><a href="ft2-module_management.html#ft_add_default_modules">FT_Add_Default_Modules</a></code> or a series of calls to <code><a href="ft2-module_management.html#ft_add_module">FT_Add_Module</a></code>, and a call to <code><a href="ft2-module_management.html#ft_set_default_properties">FT_Set_Default_Properties</a></code>) instead of <code><a href="ft2-base_interface.html#ft_init_freetype">FT_Init_FreeType</a></code> to initialize the FreeType library.</p> <p>Don't use <code><a href="ft2-base_interface.html#ft_done_freetype">FT_Done_FreeType</a></code> but <code><a href="ft2-module_management.html#ft_done_library">FT_Done_Library</a></code> to destroy a library instance.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="memory">memory</td><td class="desc"> <p>A handle to the original memory object.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="alibrary">alibrary</td><td class="desc"> <p>A pointer to handle of a new library object.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>See the discussion of reference counters in the description of <code><a href="ft2-module_management.html#ft_reference_library">FT_Reference_Library</a></code>.</p> <hr> <h2 id="ft_done_library">FT_Done_Library<a class="headerlink" href="#ft_done_library" title="Permanent link">&para;</a></h2> <p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Done_Library</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library ); </code></pre></div> <p>Discard a given library object. This closes all drivers and discards all resource objects.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="library">library</td><td class="desc"> <p>A handle to the target library.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>See the discussion of reference counters in the description of <code><a href="ft2-module_management.html#ft_reference_library">FT_Reference_Library</a></code>.</p> <hr> <h2 id="ft_reference_library">FT_Reference_Library<a class="headerlink" href="#ft_reference_library" title="Permanent link">&para;</a></h2> <p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Reference_Library</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library ); </code></pre></div> <p>A counter gets initialized to&nbsp;1 at the time an <code><a href="ft2-base_interface.html#ft_library">FT_Library</a></code> structure is created. This function increments the counter. <code><a href="ft2-module_management.html#ft_done_library">FT_Done_Library</a></code> then only destroys a library if the counter is&nbsp;1, otherwise it simply decrements the counter.</p> <p>This function helps in managing life-cycles of structures that reference <code><a href="ft2-base_interface.html#ft_library">FT_Library</a></code> objects.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="library">library</td><td class="desc"> <p>A handle to a target library object.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>since</h4> <p>2.4.2</p> <hr> <h2 id="ft_renderer">FT_Renderer<a class="headerlink" href="#ft_renderer" title="Permanent link">&para;</a></h2> <p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_RendererRec_* <b>FT_Renderer</b>; </code></pre></div> <p>A handle to a given FreeType renderer. A renderer is a module in charge of converting a glyph's outline image to a bitmap. It supports a single glyph image format, and one or more target surface depths.</p> <hr> <h2 id="ft_renderer_class">FT_Renderer_Class<a class="headerlink" href="#ft_renderer_class" title="Permanent link">&para;</a></h2> <p>Defined in FT_RENDER_H (freetype/ftrender.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Renderer_Class_ { <a href="ft2-module_management.html#ft_module_class">FT_Module_Class</a> root; <a href="ft2-basic_types.html#ft_glyph_format">FT_Glyph_Format</a> glyph_format; FT_Renderer_RenderFunc render_glyph; FT_Renderer_TransformFunc transform_glyph; FT_Renderer_GetCBoxFunc get_glyph_cbox; FT_Renderer_SetModeFunc set_mode; <a href="ft2-raster.html#ft_raster_funcs">FT_Raster_Funcs</a>* raster_class; } <b>FT_Renderer_Class</b>; </code></pre></div> <p>The renderer module class descriptor.</p> <h4>fields</h4> <table class="fields"> <tr><td class="val" id="root">root</td><td class="desc"> <p>The root <code><a href="ft2-module_management.html#ft_module_class">FT_Module_Class</a></code> fields.</p> </td></tr> <tr><td class="val" id="glyph_format">glyph_format</td><td class="desc"> <p>The glyph image format this renderer handles.</p> </td></tr> <tr><td class="val" id="render_glyph">render_glyph</td><td class="desc"> <p>A method used to render the image that is in a given glyph slot into a bitmap.</p> </td></tr> <tr><td class="val" id="transform_glyph">transform_glyph</td><td class="desc"> <p>A method used to transform the image that is in a given glyph slot.</p> </td></tr> <tr><td class="val" id="get_glyph_cbox">get_glyph_cbox</td><td class="desc"> <p>A method used to access the glyph's cbox.</p> </td></tr> <tr><td class="val" id="set_mode">set_mode</td><td class="desc"> <p>A method used to pass additional parameters.</p> </td></tr> <tr><td class="val" id="raster_class">raster_class</td><td class="desc"> <p>For <code><a href="ft2-basic_types.html#ft_glyph_format">FT_GLYPH_FORMAT_OUTLINE</a></code> renderers only. This is a pointer to its raster's class.</p> </td></tr> </table> <hr> <h2 id="ft_get_renderer">FT_Get_Renderer<a class="headerlink" href="#ft_get_renderer" title="Permanent link">&para;</a></h2> <p>Defined in FT_RENDER_H (freetype/ftrender.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-module_management.html#ft_renderer">FT_Renderer</a> ) <b>FT_Get_Renderer</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library, <a href="ft2-basic_types.html#ft_glyph_format">FT_Glyph_Format</a> format ); </code></pre></div> <p>Retrieve the current renderer for a given glyph format.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="library">library</td><td class="desc"> <p>A handle to the library object.</p> </td></tr> <tr><td class="val" id="format">format</td><td class="desc"> <p>The glyph format.</p> </td></tr> </table> <h4>return</h4> <p>A renderer handle. 0&nbsp;if none found.</p> <h4>note</h4> <p>An error will be returned if a module already exists by that name, or if the module requires a version of FreeType that is too great.</p> <p>To add a new renderer, simply use <code><a href="ft2-module_management.html#ft_add_module">FT_Add_Module</a></code>. To retrieve a renderer by its name, use <code><a href="ft2-module_management.html#ft_get_module">FT_Get_Module</a></code>.</p> <hr> <h2 id="ft_set_renderer">FT_Set_Renderer<a class="headerlink" href="#ft_set_renderer" title="Permanent link">&para;</a></h2> <p>Defined in FT_RENDER_H (freetype/ftrender.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Set_Renderer</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library, <a href="ft2-module_management.html#ft_renderer">FT_Renderer</a> renderer, <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> num_params, <a href="ft2-base_interface.html#ft_parameter">FT_Parameter</a>* parameters ); </code></pre></div> <p>Set the current renderer to use, and set additional mode.</p> <h4>inout</h4> <table class="fields"> <tr><td class="val" id="library">library</td><td class="desc"> <p>A handle to the library object.</p> </td></tr> </table> <h4>input</h4> <table class="fields"> <tr><td class="val" id="renderer">renderer</td><td class="desc"> <p>A handle to the renderer object.</p> </td></tr> <tr><td class="val" id="num_params">num_params</td><td class="desc"> <p>The number of additional parameters.</p> </td></tr> <tr><td class="val" id="parameters">parameters</td><td class="desc"> <p>Additional parameters.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>In case of success, the renderer will be used to convert glyph images in the renderer's known format into bitmaps.</p> <p>This doesn't change the current renderer for other formats.</p> <p>Currently, no FreeType renderer module uses <code>parameters</code>; you should thus always pass <code>NULL</code> as the value.</p> <hr> <h2 id="ft_set_debug_hook">FT_Set_Debug_Hook<a class="headerlink" href="#ft_set_debug_hook" title="Permanent link">&para;</a></h2> <p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> ) <b>FT_Set_Debug_Hook</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library, <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> hook_index, <a href="ft2-module_management.html#ft_debughook_func">FT_DebugHook_Func</a> debug_hook ); </code></pre></div> <p>Set a debug hook function for debugging the interpreter of a font format.</p> <p>While this is a public API function, an application needs access to FreeType's internal header files to do something useful.</p> <p>Have a look at the source code of the <code>ttdebug</code> FreeType demo program for an example of its usage.</p> <h4>inout</h4> <table class="fields"> <tr><td class="val" id="library">library</td><td class="desc"> <p>A handle to the library object.</p> </td></tr> </table> <h4>input</h4> <table class="fields"> <tr><td class="val" id="hook_index">hook_index</td><td class="desc"> <p>The index of the debug hook. You should use defined enumeration macros like <code><a href="ft2-module_management.html#ft_debug_hook_xxx">FT_DEBUG_HOOK_TRUETYPE</a></code>.</p> </td></tr> <tr><td class="val" id="debug_hook">debug_hook</td><td class="desc"> <p>The function used to debug the interpreter.</p> </td></tr> </table> <h4>note</h4> <p>Currently, four debug hook slots are available, but only one (for the TrueType interpreter) is defined.</p> <hr> <h2 id="ft_driver">FT_Driver<a class="headerlink" href="#ft_driver" title="Permanent link">&para;</a></h2> <p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_DriverRec_* <b>FT_Driver</b>; </code></pre></div> <p>A handle to a given FreeType font driver object. A font driver is a module capable of creating faces from font files.</p> <hr> <h2 id="ft_debughook_func">FT_DebugHook_Func<a class="headerlink" href="#ft_debughook_func" title="Permanent link">&para;</a></h2> <p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <a href="ft2-basic_types.html#ft_error">FT_Error</a> (*<b>FT_DebugHook_Func</b>)( <span class="keyword">void</span>* arg ); </code></pre></div> <p>A drop-in replacement (or rather a wrapper) for the bytecode or charstring interpreter's main loop function.</p> <p>Its job is essentially</p> <ul> <li> <p>to activate debug mode to enforce single-stepping,</p> </li> <li> <p>to call the main loop function to interpret the next opcode, and</p> </li> <li> <p>to show the changed context to the user.</p> </li> </ul> <p>An example for such a main loop function is <code>TT_RunIns</code> (declared in FreeType's internal header file <code>src/truetype/ttinterp.h</code>).</p> <p>Have a look at the source code of the <code>ttdebug</code> FreeType demo program for an example of a drop-in replacement.</p> <h4>inout</h4> <table class="fields"> <tr><td class="val" id="arg">arg</td><td class="desc"> <p>A typeless pointer, to be cast to the main loop function's data structure (which depends on the font module). For TrueType fonts it is bytecode interpreter's execution context, <code>TT_ExecContext</code>, which is declared in FreeType's internal header file <code>tttypes.h</code>.</p> </td></tr> </table> <hr> <h2 id="ft_debug_hook_xxx">FT_DEBUG_HOOK_XXX<a class="headerlink" href="#ft_debug_hook_xxx" title="Permanent link">&para;</a></h2> <p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <a href="ft2-module_management.html#ft_debug_hook_truetype">FT_DEBUG_HOOK_TRUETYPE</a> 0 </code></pre></div> <p>A list of named debug hook indices.</p> <h4>values</h4> <table class="fields"> <tr><td class="val" id="ft_debug_hook_truetype">FT_DEBUG_HOOK_TRUETYPE</td><td class="desc"> <p>This hook index identifies the TrueType bytecode debugger.</p> </td></tr> </table> <hr> </article> </div> </div> </main> <footer class="md-footer"> <nav class="md-footer__inner md-grid" aria-label="Footer"> <a href="ft2-system_interface.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: System Interface" rel="prev"> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Previous </span> System Interface </div> </div> </a> <a href="ft2-gzip.html" class="md-footer__link md-footer__link--next" aria-label="Next: GZIP Streams" rel="next"> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Next </span> GZIP Streams </div> </div> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg> </div> </a> </nav> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-footer-copyright"> <div class="md-footer-copyright__highlight"> Copyright 2022 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>. </div> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"base": ".", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "assets/javascripts/workers/search.477d984a.min.js", "version": null}</script> <script src="assets/javascripts/bundle.82b56eb2.min.js"></script> <script src="javascripts/extra.js"></script> </body> </html>
whupdup/frame
real/third_party/freetype-2.12.0/docs/reference/ft2-module_management.html
HTML
gpl-3.0
65,737
<!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="description" content="API Reference Documentation for FreeType-2.12.0"> <meta name="author" content="FreeType Contributors"> <link rel="icon" href="images/favico.ico"> <meta name="generator" content="mkdocs-1.2.1, mkdocs-material-7.1.9"> <title>Multiple Masters - FreeType-2.12.0 API Reference</title> <link rel="stylesheet" href="assets/stylesheets/main.ca7ac06f.min.css"> <link rel="stylesheet" href="assets/stylesheets/palette.f1a3b89f.min.css"> <meta name="theme-color" content="#4cae4f"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback"> <style>:root{--md-text-font-family:"Noto Serif";--md-code-font-family:"Roboto Mono"}</style> <link rel="stylesheet" href="stylesheets/extra.css"> </head> <body dir="ltr" data-md-color-scheme="" data-md-color-primary="green" data-md-color-accent="green"> <script>function __prefix(e){return new URL(".",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <label class="md-overlay" for="__drawer"></label> <div data-md-component="skip"> <a href="#multiple-masters" class="md-skip"> Skip to content </a> </div> <div data-md-component="announce"> </div> <header class="md-header" data-md-component="header"> <nav class="md-header__inner md-grid" aria-label="Header"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> <label class="md-header__button md-icon" for="__drawer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg> </label> <div class="md-header__title" data-md-component="header-title"> <div class="md-header__ellipsis"> <div class="md-header__topic"> <span class="md-ellipsis"> FreeType-2.12.0 API Reference </span> </div> <div class="md-header__topic" data-md-component="header-topic"> <span class="md-ellipsis"> Multiple Masters </span> </div> </div> </div> <label class="md-header__button md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> </label> <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required> <label class="md-search__icon md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </label> <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg> </button> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" data-md-scrollfix> <div class="md-search-result" data-md-component="search-result"> <div class="md-search-result__meta"> Initializing search </div> <ol class="md-search-result__list"></ol> </div> </div> </div> </div> </div> </nav> </header> <div class="md-container" data-md-component="container"> <main class="md-main" data-md-component="main"> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <label class="md-nav__title" for="__drawer"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> FreeType-2.12.0 API Reference </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="index.html" class="md-nav__link"> TOC </a> </li> <li class="md-nav__item"> <a href="ft2-index.html" class="md-nav__link"> Index </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" > <label class="md-nav__link" for="__nav_3"> General Remarks <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="General Remarks" data-md-level="1"> <label class="md-nav__title" for="__nav_3"> <span class="md-nav__icon md-icon"></span> General Remarks </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-preamble.html" class="md-nav__link"> Preamble </a> </li> <li class="md-nav__item"> <a href="ft2-header_inclusion.html" class="md-nav__link"> FreeType's header inclusion scheme </a> </li> <li class="md-nav__item"> <a href="ft2-user_allocation.html" class="md-nav__link"> User allocation </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" > <label class="md-nav__link" for="__nav_4"> Core API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Core API" data-md-level="1"> <label class="md-nav__title" for="__nav_4"> <span class="md-nav__icon md-icon"></span> Core API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-version.html" class="md-nav__link"> FreeType Version </a> </li> <li class="md-nav__item"> <a href="ft2-basic_types.html" class="md-nav__link"> Basic Data Types </a> </li> <li class="md-nav__item"> <a href="ft2-base_interface.html" class="md-nav__link"> Base Interface </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_variants.html" class="md-nav__link"> Unicode Variation Sequences </a> </li> <li class="md-nav__item"> <a href="ft2-color_management.html" class="md-nav__link"> Glyph Color Management </a> </li> <li class="md-nav__item"> <a href="ft2-layer_management.html" class="md-nav__link"> Glyph Layer Management </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_management.html" class="md-nav__link"> Glyph Management </a> </li> <li class="md-nav__item"> <a href="ft2-mac_specific.html" class="md-nav__link"> Mac Specific Interface </a> </li> <li class="md-nav__item"> <a href="ft2-sizes_management.html" class="md-nav__link"> Size Management </a> </li> <li class="md-nav__item"> <a href="ft2-header_file_macros.html" class="md-nav__link"> Header File Macros </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--active md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" checked> <label class="md-nav__link" for="__nav_5"> Format-Specific API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Format-Specific API" data-md-level="1"> <label class="md-nav__title" for="__nav_5"> <span class="md-nav__icon md-icon"></span> Format-Specific API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item md-nav__item--active"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <label class="md-nav__link md-nav__link--active" for="__toc"> Multiple Masters <span class="md-nav__icon md-icon"></span> </label> <a href="ft2-multiple_masters.html" class="md-nav__link md-nav__link--active"> Multiple Masters </a> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_mm_axis" class="md-nav__link"> FT_MM_Axis </a> </li> <li class="md-nav__item"> <a href="#ft_multi_master" class="md-nav__link"> FT_Multi_Master </a> </li> <li class="md-nav__item"> <a href="#ft_var_axis" class="md-nav__link"> FT_Var_Axis </a> </li> <li class="md-nav__item"> <a href="#ft_var_named_style" class="md-nav__link"> FT_Var_Named_Style </a> </li> <li class="md-nav__item"> <a href="#ft_mm_var" class="md-nav__link"> FT_MM_Var </a> </li> <li class="md-nav__item"> <a href="#ft_get_multi_master" class="md-nav__link"> FT_Get_Multi_Master </a> </li> <li class="md-nav__item"> <a href="#ft_get_mm_var" class="md-nav__link"> FT_Get_MM_Var </a> </li> <li class="md-nav__item"> <a href="#ft_done_mm_var" class="md-nav__link"> FT_Done_MM_Var </a> </li> <li class="md-nav__item"> <a href="#ft_set_mm_design_coordinates" class="md-nav__link"> FT_Set_MM_Design_Coordinates </a> </li> <li class="md-nav__item"> <a href="#ft_set_var_design_coordinates" class="md-nav__link"> FT_Set_Var_Design_Coordinates </a> </li> <li class="md-nav__item"> <a href="#ft_get_var_design_coordinates" class="md-nav__link"> FT_Get_Var_Design_Coordinates </a> </li> <li class="md-nav__item"> <a href="#ft_set_mm_blend_coordinates" class="md-nav__link"> FT_Set_MM_Blend_Coordinates </a> </li> <li class="md-nav__item"> <a href="#ft_get_mm_blend_coordinates" class="md-nav__link"> FT_Get_MM_Blend_Coordinates </a> </li> <li class="md-nav__item"> <a href="#ft_set_var_blend_coordinates" class="md-nav__link"> FT_Set_Var_Blend_Coordinates </a> </li> <li class="md-nav__item"> <a href="#ft_get_var_blend_coordinates" class="md-nav__link"> FT_Get_Var_Blend_Coordinates </a> </li> <li class="md-nav__item"> <a href="#ft_set_mm_weightvector" class="md-nav__link"> FT_Set_MM_WeightVector </a> </li> <li class="md-nav__item"> <a href="#ft_get_mm_weightvector" class="md-nav__link"> FT_Get_MM_WeightVector </a> </li> <li class="md-nav__item"> <a href="#ft_var_axis_flag_xxx" class="md-nav__link"> FT_VAR_AXIS_FLAG_XXX </a> </li> <li class="md-nav__item"> <a href="#ft_get_var_axis_flags" class="md-nav__link"> FT_Get_Var_Axis_Flags </a> </li> <li class="md-nav__item"> <a href="#ft_set_named_instance" class="md-nav__link"> FT_Set_Named_Instance </a> </li> </ul> </nav> </li> <li class="md-nav__item"> <a href="ft2-truetype_tables.html" class="md-nav__link"> TrueType Tables </a> </li> <li class="md-nav__item"> <a href="ft2-type1_tables.html" class="md-nav__link"> Type 1 Tables </a> </li> <li class="md-nav__item"> <a href="ft2-sfnt_names.html" class="md-nav__link"> SFNT Names </a> </li> <li class="md-nav__item"> <a href="ft2-bdf_fonts.html" class="md-nav__link"> BDF and PCF Files </a> </li> <li class="md-nav__item"> <a href="ft2-cid_fonts.html" class="md-nav__link"> CID Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-pfr_fonts.html" class="md-nav__link"> PFR Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-winfnt_fonts.html" class="md-nav__link"> Window FNT Files </a> </li> <li class="md-nav__item"> <a href="ft2-svg_fonts.html" class="md-nav__link"> OpenType SVG Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-font_formats.html" class="md-nav__link"> Font Formats </a> </li> <li class="md-nav__item"> <a href="ft2-gasp_table.html" class="md-nav__link"> Gasp Table </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" > <label class="md-nav__link" for="__nav_6"> Controlling FreeType Modules <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Controlling FreeType Modules" data-md-level="1"> <label class="md-nav__title" for="__nav_6"> <span class="md-nav__icon md-icon"></span> Controlling FreeType Modules </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-auto_hinter.html" class="md-nav__link"> The auto-hinter </a> </li> <li class="md-nav__item"> <a href="ft2-cff_driver.html" class="md-nav__link"> The CFF driver </a> </li> <li class="md-nav__item"> <a href="ft2-t1_cid_driver.html" class="md-nav__link"> The Type 1 and CID drivers </a> </li> <li class="md-nav__item"> <a href="ft2-tt_driver.html" class="md-nav__link"> The TrueType driver </a> </li> <li class="md-nav__item"> <a href="ft2-pcf_driver.html" class="md-nav__link"> The PCF driver </a> </li> <li class="md-nav__item"> <a href="ft2-ot_svg_driver.html" class="md-nav__link"> The SVG driver </a> </li> <li class="md-nav__item"> <a href="ft2-properties.html" class="md-nav__link"> Driver properties </a> </li> <li class="md-nav__item"> <a href="ft2-parameter_tags.html" class="md-nav__link"> Parameter Tags </a> </li> <li class="md-nav__item"> <a href="ft2-lcd_rendering.html" class="md-nav__link"> Subpixel Rendering </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" > <label class="md-nav__link" for="__nav_7"> Cache Sub-System <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1"> <label class="md-nav__title" for="__nav_7"> <span class="md-nav__icon md-icon"></span> Cache Sub-System </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-cache_subsystem.html" class="md-nav__link"> Cache Sub-System </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" > <label class="md-nav__link" for="__nav_8"> Support API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Support API" data-md-level="1"> <label class="md-nav__title" for="__nav_8"> <span class="md-nav__icon md-icon"></span> Support API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-computations.html" class="md-nav__link"> Computations </a> </li> <li class="md-nav__item"> <a href="ft2-list_processing.html" class="md-nav__link"> List Processing </a> </li> <li class="md-nav__item"> <a href="ft2-outline_processing.html" class="md-nav__link"> Outline Processing </a> </li> <li class="md-nav__item"> <a href="ft2-quick_advance.html" class="md-nav__link"> Quick retrieval of advance values </a> </li> <li class="md-nav__item"> <a href="ft2-bitmap_handling.html" class="md-nav__link"> Bitmap Handling </a> </li> <li class="md-nav__item"> <a href="ft2-raster.html" class="md-nav__link"> Scanline Converter </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_stroker.html" class="md-nav__link"> Glyph Stroker </a> </li> <li class="md-nav__item"> <a href="ft2-system_interface.html" class="md-nav__link"> System Interface </a> </li> <li class="md-nav__item"> <a href="ft2-module_management.html" class="md-nav__link"> Module Management </a> </li> <li class="md-nav__item"> <a href="ft2-gzip.html" class="md-nav__link"> GZIP Streams </a> </li> <li class="md-nav__item"> <a href="ft2-lzw.html" class="md-nav__link"> LZW Streams </a> </li> <li class="md-nav__item"> <a href="ft2-bzip2.html" class="md-nav__link"> BZIP2 Streams </a> </li> <li class="md-nav__item"> <a href="ft2-debugging_apis.html" class="md-nav__link"> External Debugging APIs </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" > <label class="md-nav__link" for="__nav_9"> Error Codes <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Error Codes" data-md-level="1"> <label class="md-nav__title" for="__nav_9"> <span class="md-nav__icon md-icon"></span> Error Codes </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-error_enumerations.html" class="md-nav__link"> Error Enumerations </a> </li> <li class="md-nav__item"> <a href="ft2-error_code_values.html" class="md-nav__link"> Error Code Values </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" > <label class="md-nav__link" for="__nav_10"> Miscellaneous <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1"> <label class="md-nav__title" for="__nav_10"> <span class="md-nav__icon md-icon"></span> Miscellaneous </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-gx_validation.html" class="md-nav__link"> TrueTypeGX/AAT Validation </a> </li> <li class="md-nav__item"> <a href="ft2-incremental.html" class="md-nav__link"> Incremental Loading </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_engine.html" class="md-nav__link"> The TrueType Engine </a> </li> <li class="md-nav__item"> <a href="ft2-ot_validation.html" class="md-nav__link"> OpenType Validation </a> </li> </ul> </nav> </li> </ul> </nav> </div> </div> </div> <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_mm_axis" class="md-nav__link"> FT_MM_Axis </a> </li> <li class="md-nav__item"> <a href="#ft_multi_master" class="md-nav__link"> FT_Multi_Master </a> </li> <li class="md-nav__item"> <a href="#ft_var_axis" class="md-nav__link"> FT_Var_Axis </a> </li> <li class="md-nav__item"> <a href="#ft_var_named_style" class="md-nav__link"> FT_Var_Named_Style </a> </li> <li class="md-nav__item"> <a href="#ft_mm_var" class="md-nav__link"> FT_MM_Var </a> </li> <li class="md-nav__item"> <a href="#ft_get_multi_master" class="md-nav__link"> FT_Get_Multi_Master </a> </li> <li class="md-nav__item"> <a href="#ft_get_mm_var" class="md-nav__link"> FT_Get_MM_Var </a> </li> <li class="md-nav__item"> <a href="#ft_done_mm_var" class="md-nav__link"> FT_Done_MM_Var </a> </li> <li class="md-nav__item"> <a href="#ft_set_mm_design_coordinates" class="md-nav__link"> FT_Set_MM_Design_Coordinates </a> </li> <li class="md-nav__item"> <a href="#ft_set_var_design_coordinates" class="md-nav__link"> FT_Set_Var_Design_Coordinates </a> </li> <li class="md-nav__item"> <a href="#ft_get_var_design_coordinates" class="md-nav__link"> FT_Get_Var_Design_Coordinates </a> </li> <li class="md-nav__item"> <a href="#ft_set_mm_blend_coordinates" class="md-nav__link"> FT_Set_MM_Blend_Coordinates </a> </li> <li class="md-nav__item"> <a href="#ft_get_mm_blend_coordinates" class="md-nav__link"> FT_Get_MM_Blend_Coordinates </a> </li> <li class="md-nav__item"> <a href="#ft_set_var_blend_coordinates" class="md-nav__link"> FT_Set_Var_Blend_Coordinates </a> </li> <li class="md-nav__item"> <a href="#ft_get_var_blend_coordinates" class="md-nav__link"> FT_Get_Var_Blend_Coordinates </a> </li> <li class="md-nav__item"> <a href="#ft_set_mm_weightvector" class="md-nav__link"> FT_Set_MM_WeightVector </a> </li> <li class="md-nav__item"> <a href="#ft_get_mm_weightvector" class="md-nav__link"> FT_Get_MM_WeightVector </a> </li> <li class="md-nav__item"> <a href="#ft_var_axis_flag_xxx" class="md-nav__link"> FT_VAR_AXIS_FLAG_XXX </a> </li> <li class="md-nav__item"> <a href="#ft_get_var_axis_flags" class="md-nav__link"> FT_Get_Var_Axis_Flags </a> </li> <li class="md-nav__item"> <a href="#ft_set_named_instance" class="md-nav__link"> FT_Set_Named_Instance </a> </li> </ul> </nav> </div> </div> </div> <div class="md-content" data-md-component="content"> <article class="md-content__inner md-typeset"> <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; <a href="index.html#format-specific-api">Format-Specific API</a> &raquo; Multiple Masters</p> <hr /> <h1 id="multiple-masters">Multiple Masters<a class="headerlink" href="#multiple-masters" title="Permanent link">&para;</a></h1> <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2> <p>The following types and functions are used to manage Multiple Master fonts, i.e., the selection of specific design instances by setting design axis coordinates.</p> <p>Besides Adobe MM fonts, the interface supports Apple's TrueType GX and OpenType variation fonts. Some of the routines only work with Adobe MM fonts, others will work with all three types. They are similar enough that a consistent interface makes sense.</p> <p>For Adobe MM fonts, macro <code><a href="ft2-base_interface.html#ft_is_sfnt">FT_IS_SFNT</a></code> returns false. For GX and OpenType variation fonts, it returns true.</p> <h2 id="ft_mm_axis">FT_MM_Axis<a class="headerlink" href="#ft_mm_axis" title="Permanent link">&para;</a></h2> <p>Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_MM_Axis_ { <a href="ft2-basic_types.html#ft_string">FT_String</a>* name; <a href="ft2-basic_types.html#ft_long">FT_Long</a> minimum; <a href="ft2-basic_types.html#ft_long">FT_Long</a> maximum; } <b>FT_MM_Axis</b>; </code></pre></div> <p>A structure to model a given axis in design space for Multiple Masters fonts.</p> <p>This structure can't be used for TrueType GX or OpenType variation fonts.</p> <h4>fields</h4> <table class="fields"> <tr><td class="val" id="name">name</td><td class="desc"> <p>The axis's name.</p> </td></tr> <tr><td class="val" id="minimum">minimum</td><td class="desc"> <p>The axis's minimum design coordinate.</p> </td></tr> <tr><td class="val" id="maximum">maximum</td><td class="desc"> <p>The axis's maximum design coordinate.</p> </td></tr> </table> <hr> <h2 id="ft_multi_master">FT_Multi_Master<a class="headerlink" href="#ft_multi_master" title="Permanent link">&para;</a></h2> <p>Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Multi_Master_ { <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> num_axis; <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> num_designs; <a href="ft2-multiple_masters.html#ft_mm_axis">FT_MM_Axis</a> axis[T1_MAX_MM_AXIS]; } <b>FT_Multi_Master</b>; </code></pre></div> <p>A structure to model the axes and space of a Multiple Masters font.</p> <p>This structure can't be used for TrueType GX or OpenType variation fonts.</p> <h4>fields</h4> <table class="fields"> <tr><td class="val" id="num_axis">num_axis</td><td class="desc"> <p>Number of axes. Cannot exceed&nbsp;4.</p> </td></tr> <tr><td class="val" id="num_designs">num_designs</td><td class="desc"> <p>Number of designs; should be normally 2^num_axis even though the Type&nbsp;1 specification strangely allows for intermediate designs to be present. This number cannot exceed&nbsp;16.</p> </td></tr> <tr><td class="val" id="axis">axis</td><td class="desc"> <p>A table of axis descriptors.</p> </td></tr> </table> <hr> <h2 id="ft_var_axis">FT_Var_Axis<a class="headerlink" href="#ft_var_axis" title="Permanent link">&para;</a></h2> <p>Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Var_Axis_ { <a href="ft2-basic_types.html#ft_string">FT_String</a>* name; <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a> minimum; <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a> def; <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a> maximum; <a href="ft2-basic_types.html#ft_ulong">FT_ULong</a> tag; <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> strid; } <b>FT_Var_Axis</b>; </code></pre></div> <p>A structure to model a given axis in design space for Multiple Masters, TrueType GX, and OpenType variation fonts.</p> <h4>fields</h4> <table class="fields"> <tr><td class="val" id="name">name</td><td class="desc"> <p>The axis's name. Not always meaningful for TrueType GX or OpenType variation fonts.</p> </td></tr> <tr><td class="val" id="minimum">minimum</td><td class="desc"> <p>The axis's minimum design coordinate.</p> </td></tr> <tr><td class="val" id="def">def</td><td class="desc"> <p>The axis's default design coordinate. FreeType computes meaningful default values for Adobe MM fonts.</p> </td></tr> <tr><td class="val" id="maximum">maximum</td><td class="desc"> <p>The axis's maximum design coordinate.</p> </td></tr> <tr><td class="val" id="tag">tag</td><td class="desc"> <p>The axis's tag (the equivalent to &lsquo;name&rsquo; for TrueType GX and OpenType variation fonts). FreeType provides default values for Adobe MM fonts if possible.</p> </td></tr> <tr><td class="val" id="strid">strid</td><td class="desc"> <p>The axis name entry in the font's &lsquo;name&rsquo; table. This is another (and often better) version of the &lsquo;name&rsquo; field for TrueType GX or OpenType variation fonts. Not meaningful for Adobe MM fonts.</p> </td></tr> </table> <h4>note</h4> <p>The fields <code>minimum</code>, <code>def</code>, and <code>maximum</code> are 16.16 fractional values for TrueType GX and OpenType variation fonts. For Adobe MM fonts, the values are integers.</p> <hr> <h2 id="ft_var_named_style">FT_Var_Named_Style<a class="headerlink" href="#ft_var_named_style" title="Permanent link">&para;</a></h2> <p>Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Var_Named_Style_ { <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a>* coords; <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> strid; <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> psid; /* since 2.7.1 */ } <b>FT_Var_Named_Style</b>; </code></pre></div> <p>A structure to model a named instance in a TrueType GX or OpenType variation font.</p> <p>This structure can't be used for Adobe MM fonts.</p> <h4>fields</h4> <table class="fields"> <tr><td class="val" id="coords">coords</td><td class="desc"> <p>The design coordinates for this instance. This is an array with one entry for each axis.</p> </td></tr> <tr><td class="val" id="strid">strid</td><td class="desc"> <p>The entry in &lsquo;name&rsquo; table identifying this instance.</p> </td></tr> <tr><td class="val" id="psid">psid</td><td class="desc"> <p>The entry in &lsquo;name&rsquo; table identifying a PostScript name for this instance. Value 0xFFFF indicates a missing entry.</p> </td></tr> </table> <hr> <h2 id="ft_mm_var">FT_MM_Var<a class="headerlink" href="#ft_mm_var" title="Permanent link">&para;</a></h2> <p>Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_MM_Var_ { <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> num_axis; <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> num_designs; <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> num_namedstyles; <a href="ft2-multiple_masters.html#ft_var_axis">FT_Var_Axis</a>* axis; <a href="ft2-multiple_masters.html#ft_var_named_style">FT_Var_Named_Style</a>* namedstyle; } <b>FT_MM_Var</b>; </code></pre></div> <p>A structure to model the axes and space of an Adobe MM, TrueType GX, or OpenType variation font.</p> <p>Some fields are specific to one format and not to the others.</p> <h4>fields</h4> <table class="fields"> <tr><td class="val" id="num_axis">num_axis</td><td class="desc"> <p>The number of axes. The maximum value is&nbsp;4 for Adobe MM fonts; no limit in TrueType GX or OpenType variation fonts.</p> </td></tr> <tr><td class="val" id="num_designs">num_designs</td><td class="desc"> <p>The number of designs; should be normally 2^num_axis for Adobe MM fonts. Not meaningful for TrueType GX or OpenType variation fonts (where every glyph could have a different number of designs).</p> </td></tr> <tr><td class="val" id="num_namedstyles">num_namedstyles</td><td class="desc"> <p>The number of named styles; a &lsquo;named style&rsquo; is a tuple of design coordinates that has a string ID (in the &lsquo;name&rsquo; table) associated with it. The font can tell the user that, for example, [Weight=1.5,Width=1.1] is &lsquo;Bold&rsquo;. Another name for &lsquo;named style&rsquo; is &lsquo;named instance&rsquo;.</p> <p>For Adobe Multiple Masters fonts, this value is always zero because the format does not support named styles.</p> </td></tr> <tr><td class="val" id="axis">axis</td><td class="desc"> <p>An axis descriptor table. TrueType GX and OpenType variation fonts contain slightly more data than Adobe MM fonts. Memory management of this pointer is done internally by FreeType.</p> </td></tr> <tr><td class="val" id="namedstyle">namedstyle</td><td class="desc"> <p>A named style (instance) table. Only meaningful for TrueType GX and OpenType variation fonts. Memory management of this pointer is done internally by FreeType.</p> </td></tr> </table> <hr> <h2 id="ft_get_multi_master">FT_Get_Multi_Master<a class="headerlink" href="#ft_get_multi_master" title="Permanent link">&para;</a></h2> <p>Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Get_Multi_Master</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a> face, <a href="ft2-multiple_masters.html#ft_multi_master">FT_Multi_Master</a> *amaster ); </code></pre></div> <p>Retrieve a variation descriptor of a given Adobe MM font.</p> <p>This function can't be used with TrueType GX or OpenType variation fonts.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="face">face</td><td class="desc"> <p>A handle to the source face.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="amaster">amaster</td><td class="desc"> <p>The Multiple Masters descriptor.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <hr> <h2 id="ft_get_mm_var">FT_Get_MM_Var<a class="headerlink" href="#ft_get_mm_var" title="Permanent link">&para;</a></h2> <p>Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Get_MM_Var</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a> face, <a href="ft2-multiple_masters.html#ft_mm_var">FT_MM_Var</a>* *amaster ); </code></pre></div> <p>Retrieve a variation descriptor for a given font.</p> <p>This function works with all supported variation formats.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="face">face</td><td class="desc"> <p>A handle to the source face.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="amaster">amaster</td><td class="desc"> <p>The variation descriptor. Allocates a data structure, which the user must deallocate with a call to <code><a href="ft2-multiple_masters.html#ft_done_mm_var">FT_Done_MM_Var</a></code> after use.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <hr> <h2 id="ft_done_mm_var">FT_Done_MM_Var<a class="headerlink" href="#ft_done_mm_var" title="Permanent link">&para;</a></h2> <p>Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Done_MM_Var</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library, <a href="ft2-multiple_masters.html#ft_mm_var">FT_MM_Var</a> *amaster ); </code></pre></div> <p>Free the memory allocated by <code><a href="ft2-multiple_masters.html#ft_get_mm_var">FT_Get_MM_Var</a></code>.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="library">library</td><td class="desc"> <p>A handle of the face's parent library object that was used in the call to <code><a href="ft2-multiple_masters.html#ft_get_mm_var">FT_Get_MM_Var</a></code> to create <code>amaster</code>.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <hr> <h2 id="ft_set_mm_design_coordinates">FT_Set_MM_Design_Coordinates<a class="headerlink" href="#ft_set_mm_design_coordinates" title="Permanent link">&para;</a></h2> <p>Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Set_MM_Design_Coordinates</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a> face, <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> num_coords, <a href="ft2-basic_types.html#ft_long">FT_Long</a>* coords ); </code></pre></div> <p>For Adobe MM fonts, choose an interpolated font design through design coordinates.</p> <p>This function can't be used with TrueType GX or OpenType variation fonts.</p> <h4>inout</h4> <table class="fields"> <tr><td class="val" id="face">face</td><td class="desc"> <p>A handle to the source face.</p> </td></tr> </table> <h4>input</h4> <table class="fields"> <tr><td class="val" id="num_coords">num_coords</td><td class="desc"> <p>The number of available design coordinates. If it is larger than the number of axes, ignore the excess values. If it is smaller than the number of axes, use default values for the remaining axes.</p> </td></tr> <tr><td class="val" id="coords">coords</td><td class="desc"> <p>An array of design coordinates.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>[Since 2.8.1] To reset all axes to the default values, call the function with <code>num_coords</code> set to zero and <code>coords</code> set to <code>NULL</code>.</p> <p>[Since 2.9] If <code>num_coords</code> is larger than zero, this function sets the <code><a href="ft2-base_interface.html#ft_face_flag_xxx">FT_FACE_FLAG_VARIATION</a></code> bit in <code><a href="ft2-base_interface.html#ft_face">FT_Face</a></code>'s <code>face_flags</code> field (i.e., <code><a href="ft2-base_interface.html#ft_is_variation">FT_IS_VARIATION</a></code> will return true). If <code>num_coords</code> is zero, this bit flag gets unset.</p> <hr> <h2 id="ft_set_var_design_coordinates">FT_Set_Var_Design_Coordinates<a class="headerlink" href="#ft_set_var_design_coordinates" title="Permanent link">&para;</a></h2> <p>Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Set_Var_Design_Coordinates</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a> face, <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> num_coords, <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a>* coords ); </code></pre></div> <p>Choose an interpolated font design through design coordinates.</p> <p>This function works with all supported variation formats.</p> <h4>inout</h4> <table class="fields"> <tr><td class="val" id="face">face</td><td class="desc"> <p>A handle to the source face.</p> </td></tr> </table> <h4>input</h4> <table class="fields"> <tr><td class="val" id="num_coords">num_coords</td><td class="desc"> <p>The number of available design coordinates. If it is larger than the number of axes, ignore the excess values. If it is smaller than the number of axes, use default values for the remaining axes.</p> </td></tr> <tr><td class="val" id="coords">coords</td><td class="desc"> <p>An array of design coordinates.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>[Since 2.8.1] To reset all axes to the default values, call the function with <code>num_coords</code> set to zero and <code>coords</code> set to <code>NULL</code>. [Since 2.9] &lsquo;Default values&rsquo; means the currently selected named instance (or the base font if no named instance is selected).</p> <p>[Since 2.9] If <code>num_coords</code> is larger than zero, this function sets the <code><a href="ft2-base_interface.html#ft_face_flag_xxx">FT_FACE_FLAG_VARIATION</a></code> bit in <code><a href="ft2-base_interface.html#ft_face">FT_Face</a></code>'s <code>face_flags</code> field (i.e., <code><a href="ft2-base_interface.html#ft_is_variation">FT_IS_VARIATION</a></code> will return true). If <code>num_coords</code> is zero, this bit flag gets unset.</p> <hr> <h2 id="ft_get_var_design_coordinates">FT_Get_Var_Design_Coordinates<a class="headerlink" href="#ft_get_var_design_coordinates" title="Permanent link">&para;</a></h2> <p>Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Get_Var_Design_Coordinates</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a> face, <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> num_coords, <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a>* coords ); </code></pre></div> <p>Get the design coordinates of the currently selected interpolated font.</p> <p>This function works with all supported variation formats.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="face">face</td><td class="desc"> <p>A handle to the source face.</p> </td></tr> <tr><td class="val" id="num_coords">num_coords</td><td class="desc"> <p>The number of design coordinates to retrieve. If it is larger than the number of axes, set the excess values to&nbsp;0.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="coords">coords</td><td class="desc"> <p>The design coordinates array.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>since</h4> <p>2.7.1</p> <hr> <h2 id="ft_set_mm_blend_coordinates">FT_Set_MM_Blend_Coordinates<a class="headerlink" href="#ft_set_mm_blend_coordinates" title="Permanent link">&para;</a></h2> <p>Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Set_MM_Blend_Coordinates</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a> face, <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> num_coords, <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a>* coords ); </code></pre></div> <p>Choose an interpolated font design through normalized blend coordinates.</p> <p>This function works with all supported variation formats.</p> <h4>inout</h4> <table class="fields"> <tr><td class="val" id="face">face</td><td class="desc"> <p>A handle to the source face.</p> </td></tr> </table> <h4>input</h4> <table class="fields"> <tr><td class="val" id="num_coords">num_coords</td><td class="desc"> <p>The number of available design coordinates. If it is larger than the number of axes, ignore the excess values. If it is smaller than the number of axes, use default values for the remaining axes.</p> </td></tr> <tr><td class="val" id="coords">coords</td><td class="desc"> <p>The design coordinates array (each element must be between 0 and 1.0 for Adobe MM fonts, and between -1.0 and 1.0 for TrueType GX and OpenType variation fonts).</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>[Since 2.8.1] To reset all axes to the default values, call the function with <code>num_coords</code> set to zero and <code>coords</code> set to <code>NULL</code>. [Since 2.9] &lsquo;Default values&rsquo; means the currently selected named instance (or the base font if no named instance is selected).</p> <p>[Since 2.9] If <code>num_coords</code> is larger than zero, this function sets the <code><a href="ft2-base_interface.html#ft_face_flag_xxx">FT_FACE_FLAG_VARIATION</a></code> bit in <code><a href="ft2-base_interface.html#ft_face">FT_Face</a></code>'s <code>face_flags</code> field (i.e., <code><a href="ft2-base_interface.html#ft_is_variation">FT_IS_VARIATION</a></code> will return true). If <code>num_coords</code> is zero, this bit flag gets unset.</p> <hr> <h2 id="ft_get_mm_blend_coordinates">FT_Get_MM_Blend_Coordinates<a class="headerlink" href="#ft_get_mm_blend_coordinates" title="Permanent link">&para;</a></h2> <p>Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Get_MM_Blend_Coordinates</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a> face, <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> num_coords, <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a>* coords ); </code></pre></div> <p>Get the normalized blend coordinates of the currently selected interpolated font.</p> <p>This function works with all supported variation formats.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="face">face</td><td class="desc"> <p>A handle to the source face.</p> </td></tr> <tr><td class="val" id="num_coords">num_coords</td><td class="desc"> <p>The number of normalized blend coordinates to retrieve. If it is larger than the number of axes, set the excess values to&nbsp;0.5 for Adobe MM fonts, and to&nbsp;0 for TrueType GX and OpenType variation fonts.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="coords">coords</td><td class="desc"> <p>The normalized blend coordinates array.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>since</h4> <p>2.7.1</p> <hr> <h2 id="ft_set_var_blend_coordinates">FT_Set_Var_Blend_Coordinates<a class="headerlink" href="#ft_set_var_blend_coordinates" title="Permanent link">&para;</a></h2> <p>Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Set_Var_Blend_Coordinates</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a> face, <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> num_coords, <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a>* coords ); </code></pre></div> <p>This is another name of <code><a href="ft2-multiple_masters.html#ft_set_mm_blend_coordinates">FT_Set_MM_Blend_Coordinates</a></code>.</p> <hr> <h2 id="ft_get_var_blend_coordinates">FT_Get_Var_Blend_Coordinates<a class="headerlink" href="#ft_get_var_blend_coordinates" title="Permanent link">&para;</a></h2> <p>Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Get_Var_Blend_Coordinates</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a> face, <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> num_coords, <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a>* coords ); </code></pre></div> <p>This is another name of <code><a href="ft2-multiple_masters.html#ft_get_mm_blend_coordinates">FT_Get_MM_Blend_Coordinates</a></code>.</p> <h4>since</h4> <p>2.7.1</p> <hr> <h2 id="ft_set_mm_weightvector">FT_Set_MM_WeightVector<a class="headerlink" href="#ft_set_mm_weightvector" title="Permanent link">&para;</a></h2> <p>Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Set_MM_WeightVector</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a> face, <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> len, <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a>* weightvector ); </code></pre></div> <p>For Adobe MM fonts, choose an interpolated font design by directly setting the weight vector.</p> <p>This function can't be used with TrueType GX or OpenType variation fonts.</p> <h4>inout</h4> <table class="fields"> <tr><td class="val" id="face">face</td><td class="desc"> <p>A handle to the source face.</p> </td></tr> </table> <h4>input</h4> <table class="fields"> <tr><td class="val" id="len">len</td><td class="desc"> <p>The length of the weight vector array. If it is larger than the number of designs, the extra values are ignored. If it is less than the number of designs, the remaining values are set to zero.</p> </td></tr> <tr><td class="val" id="weightvector">weightvector</td><td class="desc"> <p>An array representing the weight vector.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>Adobe Multiple Master fonts limit the number of designs, and thus the length of the weight vector to&nbsp;16.</p> <p>If <code>len</code> is zero and <code>weightvector</code> is <code>NULL</code>, the weight vector array is reset to the default values.</p> <p>The Adobe documentation also states that the values in the WeightVector array must total 1.0 &plusmn;&nbsp;0.001. In practice this does not seem to be enforced, so is not enforced here, either.</p> <h4>since</h4> <p>2.10</p> <hr> <h2 id="ft_get_mm_weightvector">FT_Get_MM_WeightVector<a class="headerlink" href="#ft_get_mm_weightvector" title="Permanent link">&para;</a></h2> <p>Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Get_MM_WeightVector</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a> face, <a href="ft2-basic_types.html#ft_uint">FT_UInt</a>* len, <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a>* weightvector ); </code></pre></div> <p>For Adobe MM fonts, retrieve the current weight vector of the font.</p> <p>This function can't be used with TrueType GX or OpenType variation fonts.</p> <h4>inout</h4> <table class="fields"> <tr><td class="val" id="face">face</td><td class="desc"> <p>A handle to the source face.</p> </td></tr> <tr><td class="val" id="len">len</td><td class="desc"> <p>A pointer to the size of the array to be filled. If the size of the array is less than the number of designs, <code>FT_Err_Invalid_Argument</code> is returned, and <code>len</code> is set to the required size (the number of designs). If the size of the array is greater than the number of designs, the remaining entries are set to&nbsp;0. On successful completion, <code>len</code> is set to the number of designs (i.e., the number of values written to the array).</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="weightvector">weightvector</td><td class="desc"> <p>An array to be filled.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>Adobe Multiple Master fonts limit the number of designs, and thus the length of the WeightVector to&nbsp;16.</p> <h4>since</h4> <p>2.10</p> <hr> <h2 id="ft_var_axis_flag_xxx">FT_VAR_AXIS_FLAG_XXX<a class="headerlink" href="#ft_var_axis_flag_xxx" title="Permanent link">&para;</a></h2> <p>Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).</p> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <a href="ft2-multiple_masters.html#ft_var_axis_flag_hidden">FT_VAR_AXIS_FLAG_HIDDEN</a> 1 </code></pre></div> <p>A list of bit flags used in the return value of <code><a href="ft2-multiple_masters.html#ft_get_var_axis_flags">FT_Get_Var_Axis_Flags</a></code>.</p> <h4>values</h4> <table class="fields"> <tr><td class="val" id="ft_var_axis_flag_hidden">FT_VAR_AXIS_FLAG_HIDDEN</td><td class="desc"> <p>The variation axis should not be exposed to user interfaces.</p> </td></tr> </table> <h4>since</h4> <p>2.8.1</p> <hr> <h2 id="ft_get_var_axis_flags">FT_Get_Var_Axis_Flags<a class="headerlink" href="#ft_get_var_axis_flags" title="Permanent link">&para;</a></h2> <p>Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Get_Var_Axis_Flags</b>( <a href="ft2-multiple_masters.html#ft_mm_var">FT_MM_Var</a>* master, <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> axis_index, <a href="ft2-basic_types.html#ft_uint">FT_UInt</a>* flags ); </code></pre></div> <p>Get the &lsquo;flags&rsquo; field of an OpenType Variation Axis Record.</p> <p>Not meaningful for Adobe MM fonts (<code>*flags</code> is always zero).</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="master">master</td><td class="desc"> <p>The variation descriptor.</p> </td></tr> <tr><td class="val" id="axis_index">axis_index</td><td class="desc"> <p>The index of the requested variation axis.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="flags">flags</td><td class="desc"> <p>The &lsquo;flags&rsquo; field. See <code><a href="ft2-multiple_masters.html#ft_var_axis_flag_xxx">FT_VAR_AXIS_FLAG_XXX</a></code> for possible values.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>since</h4> <p>2.8.1</p> <hr> <h2 id="ft_set_named_instance">FT_Set_Named_Instance<a class="headerlink" href="#ft_set_named_instance" title="Permanent link">&para;</a></h2> <p>Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Set_Named_Instance</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a> face, <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> instance_index ); </code></pre></div> <p>Set or change the current named instance.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="face">face</td><td class="desc"> <p>A handle to the source face.</p> </td></tr> <tr><td class="val" id="instance_index">instance_index</td><td class="desc"> <p>The index of the requested instance, starting with value 1. If set to value 0, FreeType switches to font access without a named instance.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>The function uses the value of <code>instance_index</code> to set bits 16-30 of the face's <code>face_index</code> field. It also resets any variation applied to the font, and the <code><a href="ft2-base_interface.html#ft_face_flag_xxx">FT_FACE_FLAG_VARIATION</a></code> bit of the face's <code>face_flags</code> field gets reset to zero (i.e., <code><a href="ft2-base_interface.html#ft_is_variation">FT_IS_VARIATION</a></code> will return false).</p> <p>For Adobe MM fonts (which don't have named instances) this function simply resets the current face to the default instance.</p> <h4>since</h4> <p>2.9</p> <hr> </article> </div> </div> </main> <footer class="md-footer"> <nav class="md-footer__inner md-grid" aria-label="Footer"> <a href="ft2-header_file_macros.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: Header File Macros" rel="prev"> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Previous </span> Header File Macros </div> </div> </a> <a href="ft2-truetype_tables.html" class="md-footer__link md-footer__link--next" aria-label="Next: TrueType Tables" rel="next"> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Next </span> TrueType Tables </div> </div> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg> </div> </a> </nav> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-footer-copyright"> <div class="md-footer-copyright__highlight"> Copyright 2022 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>. </div> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"base": ".", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "assets/javascripts/workers/search.477d984a.min.js", "version": null}</script> <script src="assets/javascripts/bundle.82b56eb2.min.js"></script> <script src="javascripts/extra.js"></script> </body> </html>
whupdup/frame
real/third_party/freetype-2.12.0/docs/reference/ft2-multiple_masters.html
HTML
gpl-3.0
63,601
<!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="description" content="API Reference Documentation for FreeType-2.12.0"> <meta name="author" content="FreeType Contributors"> <link rel="icon" href="images/favico.ico"> <meta name="generator" content="mkdocs-1.2.1, mkdocs-material-7.1.9"> <title>The SVG driver - FreeType-2.12.0 API Reference</title> <link rel="stylesheet" href="assets/stylesheets/main.ca7ac06f.min.css"> <link rel="stylesheet" href="assets/stylesheets/palette.f1a3b89f.min.css"> <meta name="theme-color" content="#4cae4f"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback"> <style>:root{--md-text-font-family:"Noto Serif";--md-code-font-family:"Roboto Mono"}</style> <link rel="stylesheet" href="stylesheets/extra.css"> </head> <body dir="ltr" data-md-color-scheme="" data-md-color-primary="green" data-md-color-accent="green"> <script>function __prefix(e){return new URL(".",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <label class="md-overlay" for="__drawer"></label> <div data-md-component="skip"> <a href="#the-svg-driver" class="md-skip"> Skip to content </a> </div> <div data-md-component="announce"> </div> <header class="md-header" data-md-component="header"> <nav class="md-header__inner md-grid" aria-label="Header"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> <label class="md-header__button md-icon" for="__drawer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg> </label> <div class="md-header__title" data-md-component="header-title"> <div class="md-header__ellipsis"> <div class="md-header__topic"> <span class="md-ellipsis"> FreeType-2.12.0 API Reference </span> </div> <div class="md-header__topic" data-md-component="header-topic"> <span class="md-ellipsis"> The SVG driver </span> </div> </div> </div> <label class="md-header__button md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> </label> <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required> <label class="md-search__icon md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </label> <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg> </button> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" data-md-scrollfix> <div class="md-search-result" data-md-component="search-result"> <div class="md-search-result__meta"> Initializing search </div> <ol class="md-search-result__list"></ol> </div> </div> </div> </div> </div> </nav> </header> <div class="md-container" data-md-component="container"> <main class="md-main" data-md-component="main"> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <label class="md-nav__title" for="__drawer"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> FreeType-2.12.0 API Reference </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="index.html" class="md-nav__link"> TOC </a> </li> <li class="md-nav__item"> <a href="ft2-index.html" class="md-nav__link"> Index </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" > <label class="md-nav__link" for="__nav_3"> General Remarks <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="General Remarks" data-md-level="1"> <label class="md-nav__title" for="__nav_3"> <span class="md-nav__icon md-icon"></span> General Remarks </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-preamble.html" class="md-nav__link"> Preamble </a> </li> <li class="md-nav__item"> <a href="ft2-header_inclusion.html" class="md-nav__link"> FreeType's header inclusion scheme </a> </li> <li class="md-nav__item"> <a href="ft2-user_allocation.html" class="md-nav__link"> User allocation </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" > <label class="md-nav__link" for="__nav_4"> Core API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Core API" data-md-level="1"> <label class="md-nav__title" for="__nav_4"> <span class="md-nav__icon md-icon"></span> Core API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-version.html" class="md-nav__link"> FreeType Version </a> </li> <li class="md-nav__item"> <a href="ft2-basic_types.html" class="md-nav__link"> Basic Data Types </a> </li> <li class="md-nav__item"> <a href="ft2-base_interface.html" class="md-nav__link"> Base Interface </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_variants.html" class="md-nav__link"> Unicode Variation Sequences </a> </li> <li class="md-nav__item"> <a href="ft2-color_management.html" class="md-nav__link"> Glyph Color Management </a> </li> <li class="md-nav__item"> <a href="ft2-layer_management.html" class="md-nav__link"> Glyph Layer Management </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_management.html" class="md-nav__link"> Glyph Management </a> </li> <li class="md-nav__item"> <a href="ft2-mac_specific.html" class="md-nav__link"> Mac Specific Interface </a> </li> <li class="md-nav__item"> <a href="ft2-sizes_management.html" class="md-nav__link"> Size Management </a> </li> <li class="md-nav__item"> <a href="ft2-header_file_macros.html" class="md-nav__link"> Header File Macros </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" > <label class="md-nav__link" for="__nav_5"> Format-Specific API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Format-Specific API" data-md-level="1"> <label class="md-nav__title" for="__nav_5"> <span class="md-nav__icon md-icon"></span> Format-Specific API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-multiple_masters.html" class="md-nav__link"> Multiple Masters </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_tables.html" class="md-nav__link"> TrueType Tables </a> </li> <li class="md-nav__item"> <a href="ft2-type1_tables.html" class="md-nav__link"> Type 1 Tables </a> </li> <li class="md-nav__item"> <a href="ft2-sfnt_names.html" class="md-nav__link"> SFNT Names </a> </li> <li class="md-nav__item"> <a href="ft2-bdf_fonts.html" class="md-nav__link"> BDF and PCF Files </a> </li> <li class="md-nav__item"> <a href="ft2-cid_fonts.html" class="md-nav__link"> CID Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-pfr_fonts.html" class="md-nav__link"> PFR Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-winfnt_fonts.html" class="md-nav__link"> Window FNT Files </a> </li> <li class="md-nav__item"> <a href="ft2-svg_fonts.html" class="md-nav__link"> OpenType SVG Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-font_formats.html" class="md-nav__link"> Font Formats </a> </li> <li class="md-nav__item"> <a href="ft2-gasp_table.html" class="md-nav__link"> Gasp Table </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--active md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" checked> <label class="md-nav__link" for="__nav_6"> Controlling FreeType Modules <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Controlling FreeType Modules" data-md-level="1"> <label class="md-nav__title" for="__nav_6"> <span class="md-nav__icon md-icon"></span> Controlling FreeType Modules </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-auto_hinter.html" class="md-nav__link"> The auto-hinter </a> </li> <li class="md-nav__item"> <a href="ft2-cff_driver.html" class="md-nav__link"> The CFF driver </a> </li> <li class="md-nav__item"> <a href="ft2-t1_cid_driver.html" class="md-nav__link"> The Type 1 and CID drivers </a> </li> <li class="md-nav__item"> <a href="ft2-tt_driver.html" class="md-nav__link"> The TrueType driver </a> </li> <li class="md-nav__item"> <a href="ft2-pcf_driver.html" class="md-nav__link"> The PCF driver </a> </li> <li class="md-nav__item md-nav__item--active"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <label class="md-nav__link md-nav__link--active" for="__toc"> The SVG driver <span class="md-nav__icon md-icon"></span> </label> <a href="ft2-ot_svg_driver.html" class="md-nav__link md-nav__link--active"> The SVG driver </a> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> </ul> </nav> </li> <li class="md-nav__item"> <a href="ft2-properties.html" class="md-nav__link"> Driver properties </a> </li> <li class="md-nav__item"> <a href="ft2-parameter_tags.html" class="md-nav__link"> Parameter Tags </a> </li> <li class="md-nav__item"> <a href="ft2-lcd_rendering.html" class="md-nav__link"> Subpixel Rendering </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" > <label class="md-nav__link" for="__nav_7"> Cache Sub-System <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1"> <label class="md-nav__title" for="__nav_7"> <span class="md-nav__icon md-icon"></span> Cache Sub-System </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-cache_subsystem.html" class="md-nav__link"> Cache Sub-System </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" > <label class="md-nav__link" for="__nav_8"> Support API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Support API" data-md-level="1"> <label class="md-nav__title" for="__nav_8"> <span class="md-nav__icon md-icon"></span> Support API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-computations.html" class="md-nav__link"> Computations </a> </li> <li class="md-nav__item"> <a href="ft2-list_processing.html" class="md-nav__link"> List Processing </a> </li> <li class="md-nav__item"> <a href="ft2-outline_processing.html" class="md-nav__link"> Outline Processing </a> </li> <li class="md-nav__item"> <a href="ft2-quick_advance.html" class="md-nav__link"> Quick retrieval of advance values </a> </li> <li class="md-nav__item"> <a href="ft2-bitmap_handling.html" class="md-nav__link"> Bitmap Handling </a> </li> <li class="md-nav__item"> <a href="ft2-raster.html" class="md-nav__link"> Scanline Converter </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_stroker.html" class="md-nav__link"> Glyph Stroker </a> </li> <li class="md-nav__item"> <a href="ft2-system_interface.html" class="md-nav__link"> System Interface </a> </li> <li class="md-nav__item"> <a href="ft2-module_management.html" class="md-nav__link"> Module Management </a> </li> <li class="md-nav__item"> <a href="ft2-gzip.html" class="md-nav__link"> GZIP Streams </a> </li> <li class="md-nav__item"> <a href="ft2-lzw.html" class="md-nav__link"> LZW Streams </a> </li> <li class="md-nav__item"> <a href="ft2-bzip2.html" class="md-nav__link"> BZIP2 Streams </a> </li> <li class="md-nav__item"> <a href="ft2-debugging_apis.html" class="md-nav__link"> External Debugging APIs </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" > <label class="md-nav__link" for="__nav_9"> Error Codes <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Error Codes" data-md-level="1"> <label class="md-nav__title" for="__nav_9"> <span class="md-nav__icon md-icon"></span> Error Codes </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-error_enumerations.html" class="md-nav__link"> Error Enumerations </a> </li> <li class="md-nav__item"> <a href="ft2-error_code_values.html" class="md-nav__link"> Error Code Values </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" > <label class="md-nav__link" for="__nav_10"> Miscellaneous <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1"> <label class="md-nav__title" for="__nav_10"> <span class="md-nav__icon md-icon"></span> Miscellaneous </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-gx_validation.html" class="md-nav__link"> TrueTypeGX/AAT Validation </a> </li> <li class="md-nav__item"> <a href="ft2-incremental.html" class="md-nav__link"> Incremental Loading </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_engine.html" class="md-nav__link"> The TrueType Engine </a> </li> <li class="md-nav__item"> <a href="ft2-ot_validation.html" class="md-nav__link"> OpenType Validation </a> </li> </ul> </nav> </li> </ul> </nav> </div> </div> </div> <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> </ul> </nav> </div> </div> </div> <div class="md-content" data-md-component="content"> <article class="md-content__inner md-typeset"> <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; <a href="index.html#controlling-freetype-modules">Controlling FreeType Modules</a> &raquo; The SVG driver</p> <hr /> <h1 id="the-svg-driver">The SVG driver<a class="headerlink" href="#the-svg-driver" title="Permanent link">&para;</a></h1> <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2> <p>By default, FreeType can only load the &lsquo;SVG&nbsp;&rsquo; table of OpenType fonts if configuration macro <code>FT_CONFIG_OPTION_SVG</code> is defined. To make it render SVG glyphs, an external SVG rendering library is needed. All details on the interface between FreeType and the external library via function hooks can be found in section &lsquo;<a href="ft2-svg_fonts.html#svg_fonts">OpenType SVG Fonts</a>&rsquo;.</p> <p>The OT-SVG driver's module name is &lsquo;ot-svg&rsquo;; it supports a single property called <code><a href="ft2-properties.html#svg-hooks">svg-hooks</a></code>, documented below in the &lsquo;<a href="ft2-properties.html#properties">Driver properties</a>&rsquo; section.</p> </article> </div> </div> </main> <footer class="md-footer"> <nav class="md-footer__inner md-grid" aria-label="Footer"> <a href="ft2-pcf_driver.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: The PCF driver" rel="prev"> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Previous </span> The PCF driver </div> </div> </a> <a href="ft2-properties.html" class="md-footer__link md-footer__link--next" aria-label="Next: Driver properties" rel="next"> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Next </span> Driver properties </div> </div> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg> </div> </a> </nav> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-footer-copyright"> <div class="md-footer-copyright__highlight"> Copyright 2022 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>. </div> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"base": ".", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "assets/javascripts/workers/search.477d984a.min.js", "version": null}</script> <script src="assets/javascripts/bundle.82b56eb2.min.js"></script> <script src="javascripts/extra.js"></script> </body> </html>
whupdup/frame
real/third_party/freetype-2.12.0/docs/reference/ft2-ot_svg_driver.html
HTML
gpl-3.0
27,459
<!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="description" content="API Reference Documentation for FreeType-2.12.0"> <meta name="author" content="FreeType Contributors"> <link rel="icon" href="images/favico.ico"> <meta name="generator" content="mkdocs-1.2.1, mkdocs-material-7.1.9"> <title>OpenType Validation - FreeType-2.12.0 API Reference</title> <link rel="stylesheet" href="assets/stylesheets/main.ca7ac06f.min.css"> <link rel="stylesheet" href="assets/stylesheets/palette.f1a3b89f.min.css"> <meta name="theme-color" content="#4cae4f"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback"> <style>:root{--md-text-font-family:"Noto Serif";--md-code-font-family:"Roboto Mono"}</style> <link rel="stylesheet" href="stylesheets/extra.css"> </head> <body dir="ltr" data-md-color-scheme="" data-md-color-primary="green" data-md-color-accent="green"> <script>function __prefix(e){return new URL(".",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <label class="md-overlay" for="__drawer"></label> <div data-md-component="skip"> <a href="#opentype-validation" class="md-skip"> Skip to content </a> </div> <div data-md-component="announce"> </div> <header class="md-header" data-md-component="header"> <nav class="md-header__inner md-grid" aria-label="Header"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> <label class="md-header__button md-icon" for="__drawer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg> </label> <div class="md-header__title" data-md-component="header-title"> <div class="md-header__ellipsis"> <div class="md-header__topic"> <span class="md-ellipsis"> FreeType-2.12.0 API Reference </span> </div> <div class="md-header__topic" data-md-component="header-topic"> <span class="md-ellipsis"> OpenType Validation </span> </div> </div> </div> <label class="md-header__button md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> </label> <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required> <label class="md-search__icon md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </label> <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg> </button> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" data-md-scrollfix> <div class="md-search-result" data-md-component="search-result"> <div class="md-search-result__meta"> Initializing search </div> <ol class="md-search-result__list"></ol> </div> </div> </div> </div> </div> </nav> </header> <div class="md-container" data-md-component="container"> <main class="md-main" data-md-component="main"> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <label class="md-nav__title" for="__drawer"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> FreeType-2.12.0 API Reference </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="index.html" class="md-nav__link"> TOC </a> </li> <li class="md-nav__item"> <a href="ft2-index.html" class="md-nav__link"> Index </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" > <label class="md-nav__link" for="__nav_3"> General Remarks <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="General Remarks" data-md-level="1"> <label class="md-nav__title" for="__nav_3"> <span class="md-nav__icon md-icon"></span> General Remarks </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-preamble.html" class="md-nav__link"> Preamble </a> </li> <li class="md-nav__item"> <a href="ft2-header_inclusion.html" class="md-nav__link"> FreeType's header inclusion scheme </a> </li> <li class="md-nav__item"> <a href="ft2-user_allocation.html" class="md-nav__link"> User allocation </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" > <label class="md-nav__link" for="__nav_4"> Core API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Core API" data-md-level="1"> <label class="md-nav__title" for="__nav_4"> <span class="md-nav__icon md-icon"></span> Core API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-version.html" class="md-nav__link"> FreeType Version </a> </li> <li class="md-nav__item"> <a href="ft2-basic_types.html" class="md-nav__link"> Basic Data Types </a> </li> <li class="md-nav__item"> <a href="ft2-base_interface.html" class="md-nav__link"> Base Interface </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_variants.html" class="md-nav__link"> Unicode Variation Sequences </a> </li> <li class="md-nav__item"> <a href="ft2-color_management.html" class="md-nav__link"> Glyph Color Management </a> </li> <li class="md-nav__item"> <a href="ft2-layer_management.html" class="md-nav__link"> Glyph Layer Management </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_management.html" class="md-nav__link"> Glyph Management </a> </li> <li class="md-nav__item"> <a href="ft2-mac_specific.html" class="md-nav__link"> Mac Specific Interface </a> </li> <li class="md-nav__item"> <a href="ft2-sizes_management.html" class="md-nav__link"> Size Management </a> </li> <li class="md-nav__item"> <a href="ft2-header_file_macros.html" class="md-nav__link"> Header File Macros </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" > <label class="md-nav__link" for="__nav_5"> Format-Specific API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Format-Specific API" data-md-level="1"> <label class="md-nav__title" for="__nav_5"> <span class="md-nav__icon md-icon"></span> Format-Specific API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-multiple_masters.html" class="md-nav__link"> Multiple Masters </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_tables.html" class="md-nav__link"> TrueType Tables </a> </li> <li class="md-nav__item"> <a href="ft2-type1_tables.html" class="md-nav__link"> Type 1 Tables </a> </li> <li class="md-nav__item"> <a href="ft2-sfnt_names.html" class="md-nav__link"> SFNT Names </a> </li> <li class="md-nav__item"> <a href="ft2-bdf_fonts.html" class="md-nav__link"> BDF and PCF Files </a> </li> <li class="md-nav__item"> <a href="ft2-cid_fonts.html" class="md-nav__link"> CID Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-pfr_fonts.html" class="md-nav__link"> PFR Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-winfnt_fonts.html" class="md-nav__link"> Window FNT Files </a> </li> <li class="md-nav__item"> <a href="ft2-svg_fonts.html" class="md-nav__link"> OpenType SVG Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-font_formats.html" class="md-nav__link"> Font Formats </a> </li> <li class="md-nav__item"> <a href="ft2-gasp_table.html" class="md-nav__link"> Gasp Table </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" > <label class="md-nav__link" for="__nav_6"> Controlling FreeType Modules <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Controlling FreeType Modules" data-md-level="1"> <label class="md-nav__title" for="__nav_6"> <span class="md-nav__icon md-icon"></span> Controlling FreeType Modules </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-auto_hinter.html" class="md-nav__link"> The auto-hinter </a> </li> <li class="md-nav__item"> <a href="ft2-cff_driver.html" class="md-nav__link"> The CFF driver </a> </li> <li class="md-nav__item"> <a href="ft2-t1_cid_driver.html" class="md-nav__link"> The Type 1 and CID drivers </a> </li> <li class="md-nav__item"> <a href="ft2-tt_driver.html" class="md-nav__link"> The TrueType driver </a> </li> <li class="md-nav__item"> <a href="ft2-pcf_driver.html" class="md-nav__link"> The PCF driver </a> </li> <li class="md-nav__item"> <a href="ft2-ot_svg_driver.html" class="md-nav__link"> The SVG driver </a> </li> <li class="md-nav__item"> <a href="ft2-properties.html" class="md-nav__link"> Driver properties </a> </li> <li class="md-nav__item"> <a href="ft2-parameter_tags.html" class="md-nav__link"> Parameter Tags </a> </li> <li class="md-nav__item"> <a href="ft2-lcd_rendering.html" class="md-nav__link"> Subpixel Rendering </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" > <label class="md-nav__link" for="__nav_7"> Cache Sub-System <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1"> <label class="md-nav__title" for="__nav_7"> <span class="md-nav__icon md-icon"></span> Cache Sub-System </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-cache_subsystem.html" class="md-nav__link"> Cache Sub-System </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" > <label class="md-nav__link" for="__nav_8"> Support API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Support API" data-md-level="1"> <label class="md-nav__title" for="__nav_8"> <span class="md-nav__icon md-icon"></span> Support API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-computations.html" class="md-nav__link"> Computations </a> </li> <li class="md-nav__item"> <a href="ft2-list_processing.html" class="md-nav__link"> List Processing </a> </li> <li class="md-nav__item"> <a href="ft2-outline_processing.html" class="md-nav__link"> Outline Processing </a> </li> <li class="md-nav__item"> <a href="ft2-quick_advance.html" class="md-nav__link"> Quick retrieval of advance values </a> </li> <li class="md-nav__item"> <a href="ft2-bitmap_handling.html" class="md-nav__link"> Bitmap Handling </a> </li> <li class="md-nav__item"> <a href="ft2-raster.html" class="md-nav__link"> Scanline Converter </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_stroker.html" class="md-nav__link"> Glyph Stroker </a> </li> <li class="md-nav__item"> <a href="ft2-system_interface.html" class="md-nav__link"> System Interface </a> </li> <li class="md-nav__item"> <a href="ft2-module_management.html" class="md-nav__link"> Module Management </a> </li> <li class="md-nav__item"> <a href="ft2-gzip.html" class="md-nav__link"> GZIP Streams </a> </li> <li class="md-nav__item"> <a href="ft2-lzw.html" class="md-nav__link"> LZW Streams </a> </li> <li class="md-nav__item"> <a href="ft2-bzip2.html" class="md-nav__link"> BZIP2 Streams </a> </li> <li class="md-nav__item"> <a href="ft2-debugging_apis.html" class="md-nav__link"> External Debugging APIs </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" > <label class="md-nav__link" for="__nav_9"> Error Codes <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Error Codes" data-md-level="1"> <label class="md-nav__title" for="__nav_9"> <span class="md-nav__icon md-icon"></span> Error Codes </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-error_enumerations.html" class="md-nav__link"> Error Enumerations </a> </li> <li class="md-nav__item"> <a href="ft2-error_code_values.html" class="md-nav__link"> Error Code Values </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--active md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" checked> <label class="md-nav__link" for="__nav_10"> Miscellaneous <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1"> <label class="md-nav__title" for="__nav_10"> <span class="md-nav__icon md-icon"></span> Miscellaneous </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-gx_validation.html" class="md-nav__link"> TrueTypeGX/AAT Validation </a> </li> <li class="md-nav__item"> <a href="ft2-incremental.html" class="md-nav__link"> Incremental Loading </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_engine.html" class="md-nav__link"> The TrueType Engine </a> </li> <li class="md-nav__item md-nav__item--active"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <label class="md-nav__link md-nav__link--active" for="__toc"> OpenType Validation <span class="md-nav__icon md-icon"></span> </label> <a href="ft2-ot_validation.html" class="md-nav__link md-nav__link--active"> OpenType Validation </a> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_opentype_validate" class="md-nav__link"> FT_OpenType_Validate </a> </li> <li class="md-nav__item"> <a href="#ft_opentype_free" class="md-nav__link"> FT_OpenType_Free </a> </li> <li class="md-nav__item"> <a href="#ft_validate_otxxx" class="md-nav__link"> FT_VALIDATE_OTXXX </a> </li> </ul> </nav> </li> </ul> </nav> </li> </ul> </nav> </div> </div> </div> <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_opentype_validate" class="md-nav__link"> FT_OpenType_Validate </a> </li> <li class="md-nav__item"> <a href="#ft_opentype_free" class="md-nav__link"> FT_OpenType_Free </a> </li> <li class="md-nav__item"> <a href="#ft_validate_otxxx" class="md-nav__link"> FT_VALIDATE_OTXXX </a> </li> </ul> </nav> </div> </div> </div> <div class="md-content" data-md-component="content"> <article class="md-content__inner md-typeset"> <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; <a href="index.html#miscellaneous">Miscellaneous</a> &raquo; OpenType Validation</p> <hr /> <h1 id="opentype-validation">OpenType Validation<a class="headerlink" href="#opentype-validation" title="Permanent link">&para;</a></h1> <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2> <p>This section contains the declaration of functions to validate some OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH).</p> <h2 id="ft_opentype_validate">FT_OpenType_Validate<a class="headerlink" href="#ft_opentype_validate" title="Permanent link">&para;</a></h2> <p>Defined in FT_OPENTYPE_VALIDATE_H (freetype/ftotval.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_OpenType_Validate</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a> face, <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> validation_flags, <a href="ft2-basic_types.html#ft_bytes">FT_Bytes</a> *BASE_table, <a href="ft2-basic_types.html#ft_bytes">FT_Bytes</a> *GDEF_table, <a href="ft2-basic_types.html#ft_bytes">FT_Bytes</a> *GPOS_table, <a href="ft2-basic_types.html#ft_bytes">FT_Bytes</a> *GSUB_table, <a href="ft2-basic_types.html#ft_bytes">FT_Bytes</a> *JSTF_table ); </code></pre></div> <p>Validate various OpenType tables to assure that all offsets and indices are valid. The idea is that a higher-level library that actually does the text layout can access those tables without error checking (which can be quite time consuming).</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="face">face</td><td class="desc"> <p>A handle to the input face.</p> </td></tr> <tr><td class="val" id="validation_flags">validation_flags</td><td class="desc"> <p>A bit field that specifies the tables to be validated. See <code><a href="ft2-ot_validation.html#ft_validate_otxxx">FT_VALIDATE_OTXXX</a></code> for possible values.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="base_table">BASE_table</td><td class="desc"> <p>A pointer to the BASE table.</p> </td></tr> <tr><td class="val" id="gdef_table">GDEF_table</td><td class="desc"> <p>A pointer to the GDEF table.</p> </td></tr> <tr><td class="val" id="gpos_table">GPOS_table</td><td class="desc"> <p>A pointer to the GPOS table.</p> </td></tr> <tr><td class="val" id="gsub_table">GSUB_table</td><td class="desc"> <p>A pointer to the GSUB table.</p> </td></tr> <tr><td class="val" id="jstf_table">JSTF_table</td><td class="desc"> <p>A pointer to the JSTF table.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>This function only works with OpenType fonts, returning an error otherwise.</p> <p>After use, the application should deallocate the five tables with <code><a href="ft2-ot_validation.html#ft_opentype_free">FT_OpenType_Free</a></code>. A <code>NULL</code> value indicates that the table either doesn't exist in the font, or the application hasn't asked for validation.</p> <hr> <h2 id="ft_opentype_free">FT_OpenType_Free<a class="headerlink" href="#ft_opentype_free" title="Permanent link">&para;</a></h2> <p>Defined in FT_OPENTYPE_VALIDATE_H (freetype/ftotval.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> ) <b>FT_OpenType_Free</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a> face, <a href="ft2-basic_types.html#ft_bytes">FT_Bytes</a> table ); </code></pre></div> <p>Free the buffer allocated by OpenType validator.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="face">face</td><td class="desc"> <p>A handle to the input face.</p> </td></tr> <tr><td class="val" id="table">table</td><td class="desc"> <p>The pointer to the buffer that is allocated by <code><a href="ft2-ot_validation.html#ft_opentype_validate">FT_OpenType_Validate</a></code>.</p> </td></tr> </table> <h4>note</h4> <p>This function must be used to free the buffer allocated by <code><a href="ft2-ot_validation.html#ft_opentype_validate">FT_OpenType_Validate</a></code> only.</p> <hr> <h2 id="ft_validate_otxxx">FT_VALIDATE_OTXXX<a class="headerlink" href="#ft_validate_otxxx" title="Permanent link">&para;</a></h2> <p>Defined in FT_OPENTYPE_VALIDATE_H (freetype/ftotval.h).</p> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <a href="ft2-ot_validation.html#ft_validate_base">FT_VALIDATE_BASE</a> 0x0100 #<span class="keyword">define</span> <a href="ft2-ot_validation.html#ft_validate_gdef">FT_VALIDATE_GDEF</a> 0x0200 #<span class="keyword">define</span> <a href="ft2-ot_validation.html#ft_validate_gpos">FT_VALIDATE_GPOS</a> 0x0400 #<span class="keyword">define</span> <a href="ft2-ot_validation.html#ft_validate_gsub">FT_VALIDATE_GSUB</a> 0x0800 #<span class="keyword">define</span> <a href="ft2-ot_validation.html#ft_validate_jstf">FT_VALIDATE_JSTF</a> 0x1000 #<span class="keyword">define</span> <a href="ft2-ot_validation.html#ft_validate_math">FT_VALIDATE_MATH</a> 0x2000 #<span class="keyword">define</span> <a href="ft2-ot_validation.html#ft_validate_ot">FT_VALIDATE_OT</a> ( <a href="ft2-ot_validation.html#ft_validate_base">FT_VALIDATE_BASE</a> | \ <a href="ft2-ot_validation.html#ft_validate_gdef">FT_VALIDATE_GDEF</a> | \ <a href="ft2-ot_validation.html#ft_validate_gpos">FT_VALIDATE_GPOS</a> | \ <a href="ft2-ot_validation.html#ft_validate_gsub">FT_VALIDATE_GSUB</a> | \ <a href="ft2-ot_validation.html#ft_validate_jstf">FT_VALIDATE_JSTF</a> | \ <a href="ft2-ot_validation.html#ft_validate_math">FT_VALIDATE_MATH</a> ) </code></pre></div> <p>A list of bit-field constants used with <code><a href="ft2-ot_validation.html#ft_opentype_validate">FT_OpenType_Validate</a></code> to indicate which OpenType tables should be validated.</p> <h4>values</h4> <table class="fields"> <tr><td class="val" id="ft_validate_base">FT_VALIDATE_BASE</td><td class="desc"> <p>Validate BASE table.</p> </td></tr> <tr><td class="val" id="ft_validate_gdef">FT_VALIDATE_GDEF</td><td class="desc"> <p>Validate GDEF table.</p> </td></tr> <tr><td class="val" id="ft_validate_gpos">FT_VALIDATE_GPOS</td><td class="desc"> <p>Validate GPOS table.</p> </td></tr> <tr><td class="val" id="ft_validate_gsub">FT_VALIDATE_GSUB</td><td class="desc"> <p>Validate GSUB table.</p> </td></tr> <tr><td class="val" id="ft_validate_jstf">FT_VALIDATE_JSTF</td><td class="desc"> <p>Validate JSTF table.</p> </td></tr> <tr><td class="val" id="ft_validate_math">FT_VALIDATE_MATH</td><td class="desc"> <p>Validate MATH table.</p> </td></tr> <tr><td class="val" id="ft_validate_ot">FT_VALIDATE_OT</td><td class="desc"> <p>Validate all OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH).</p> </td></tr> </table> <hr> </article> </div> </div> </main> <footer class="md-footer"> <nav class="md-footer__inner md-grid" aria-label="Footer"> <a href="ft2-truetype_engine.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: The TrueType Engine" rel="prev"> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Previous </span> The TrueType Engine </div> </div> </a> </nav> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-footer-copyright"> <div class="md-footer-copyright__highlight"> Copyright 2022 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>. </div> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"base": ".", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "assets/javascripts/workers/search.477d984a.min.js", "version": null}</script> <script src="assets/javascripts/bundle.82b56eb2.min.js"></script> <script src="javascripts/extra.js"></script> </body> </html>
whupdup/frame
real/third_party/freetype-2.12.0/docs/reference/ft2-ot_validation.html
HTML
gpl-3.0
33,653
<!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="description" content="API Reference Documentation for FreeType-2.12.0"> <meta name="author" content="FreeType Contributors"> <link rel="icon" href="images/favico.ico"> <meta name="generator" content="mkdocs-1.2.1, mkdocs-material-7.1.9"> <title>Outline Processing - FreeType-2.12.0 API Reference</title> <link rel="stylesheet" href="assets/stylesheets/main.ca7ac06f.min.css"> <link rel="stylesheet" href="assets/stylesheets/palette.f1a3b89f.min.css"> <meta name="theme-color" content="#4cae4f"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback"> <style>:root{--md-text-font-family:"Noto Serif";--md-code-font-family:"Roboto Mono"}</style> <link rel="stylesheet" href="stylesheets/extra.css"> </head> <body dir="ltr" data-md-color-scheme="" data-md-color-primary="green" data-md-color-accent="green"> <script>function __prefix(e){return new URL(".",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <label class="md-overlay" for="__drawer"></label> <div data-md-component="skip"> <a href="#outline-processing" class="md-skip"> Skip to content </a> </div> <div data-md-component="announce"> </div> <header class="md-header" data-md-component="header"> <nav class="md-header__inner md-grid" aria-label="Header"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> <label class="md-header__button md-icon" for="__drawer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg> </label> <div class="md-header__title" data-md-component="header-title"> <div class="md-header__ellipsis"> <div class="md-header__topic"> <span class="md-ellipsis"> FreeType-2.12.0 API Reference </span> </div> <div class="md-header__topic" data-md-component="header-topic"> <span class="md-ellipsis"> Outline Processing </span> </div> </div> </div> <label class="md-header__button md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> </label> <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required> <label class="md-search__icon md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </label> <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg> </button> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" data-md-scrollfix> <div class="md-search-result" data-md-component="search-result"> <div class="md-search-result__meta"> Initializing search </div> <ol class="md-search-result__list"></ol> </div> </div> </div> </div> </div> </nav> </header> <div class="md-container" data-md-component="container"> <main class="md-main" data-md-component="main"> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <label class="md-nav__title" for="__drawer"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> FreeType-2.12.0 API Reference </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="index.html" class="md-nav__link"> TOC </a> </li> <li class="md-nav__item"> <a href="ft2-index.html" class="md-nav__link"> Index </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" > <label class="md-nav__link" for="__nav_3"> General Remarks <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="General Remarks" data-md-level="1"> <label class="md-nav__title" for="__nav_3"> <span class="md-nav__icon md-icon"></span> General Remarks </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-preamble.html" class="md-nav__link"> Preamble </a> </li> <li class="md-nav__item"> <a href="ft2-header_inclusion.html" class="md-nav__link"> FreeType's header inclusion scheme </a> </li> <li class="md-nav__item"> <a href="ft2-user_allocation.html" class="md-nav__link"> User allocation </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" > <label class="md-nav__link" for="__nav_4"> Core API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Core API" data-md-level="1"> <label class="md-nav__title" for="__nav_4"> <span class="md-nav__icon md-icon"></span> Core API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-version.html" class="md-nav__link"> FreeType Version </a> </li> <li class="md-nav__item"> <a href="ft2-basic_types.html" class="md-nav__link"> Basic Data Types </a> </li> <li class="md-nav__item"> <a href="ft2-base_interface.html" class="md-nav__link"> Base Interface </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_variants.html" class="md-nav__link"> Unicode Variation Sequences </a> </li> <li class="md-nav__item"> <a href="ft2-color_management.html" class="md-nav__link"> Glyph Color Management </a> </li> <li class="md-nav__item"> <a href="ft2-layer_management.html" class="md-nav__link"> Glyph Layer Management </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_management.html" class="md-nav__link"> Glyph Management </a> </li> <li class="md-nav__item"> <a href="ft2-mac_specific.html" class="md-nav__link"> Mac Specific Interface </a> </li> <li class="md-nav__item"> <a href="ft2-sizes_management.html" class="md-nav__link"> Size Management </a> </li> <li class="md-nav__item"> <a href="ft2-header_file_macros.html" class="md-nav__link"> Header File Macros </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" > <label class="md-nav__link" for="__nav_5"> Format-Specific API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Format-Specific API" data-md-level="1"> <label class="md-nav__title" for="__nav_5"> <span class="md-nav__icon md-icon"></span> Format-Specific API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-multiple_masters.html" class="md-nav__link"> Multiple Masters </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_tables.html" class="md-nav__link"> TrueType Tables </a> </li> <li class="md-nav__item"> <a href="ft2-type1_tables.html" class="md-nav__link"> Type 1 Tables </a> </li> <li class="md-nav__item"> <a href="ft2-sfnt_names.html" class="md-nav__link"> SFNT Names </a> </li> <li class="md-nav__item"> <a href="ft2-bdf_fonts.html" class="md-nav__link"> BDF and PCF Files </a> </li> <li class="md-nav__item"> <a href="ft2-cid_fonts.html" class="md-nav__link"> CID Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-pfr_fonts.html" class="md-nav__link"> PFR Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-winfnt_fonts.html" class="md-nav__link"> Window FNT Files </a> </li> <li class="md-nav__item"> <a href="ft2-svg_fonts.html" class="md-nav__link"> OpenType SVG Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-font_formats.html" class="md-nav__link"> Font Formats </a> </li> <li class="md-nav__item"> <a href="ft2-gasp_table.html" class="md-nav__link"> Gasp Table </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" > <label class="md-nav__link" for="__nav_6"> Controlling FreeType Modules <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Controlling FreeType Modules" data-md-level="1"> <label class="md-nav__title" for="__nav_6"> <span class="md-nav__icon md-icon"></span> Controlling FreeType Modules </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-auto_hinter.html" class="md-nav__link"> The auto-hinter </a> </li> <li class="md-nav__item"> <a href="ft2-cff_driver.html" class="md-nav__link"> The CFF driver </a> </li> <li class="md-nav__item"> <a href="ft2-t1_cid_driver.html" class="md-nav__link"> The Type 1 and CID drivers </a> </li> <li class="md-nav__item"> <a href="ft2-tt_driver.html" class="md-nav__link"> The TrueType driver </a> </li> <li class="md-nav__item"> <a href="ft2-pcf_driver.html" class="md-nav__link"> The PCF driver </a> </li> <li class="md-nav__item"> <a href="ft2-ot_svg_driver.html" class="md-nav__link"> The SVG driver </a> </li> <li class="md-nav__item"> <a href="ft2-properties.html" class="md-nav__link"> Driver properties </a> </li> <li class="md-nav__item"> <a href="ft2-parameter_tags.html" class="md-nav__link"> Parameter Tags </a> </li> <li class="md-nav__item"> <a href="ft2-lcd_rendering.html" class="md-nav__link"> Subpixel Rendering </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" > <label class="md-nav__link" for="__nav_7"> Cache Sub-System <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1"> <label class="md-nav__title" for="__nav_7"> <span class="md-nav__icon md-icon"></span> Cache Sub-System </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-cache_subsystem.html" class="md-nav__link"> Cache Sub-System </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--active md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" checked> <label class="md-nav__link" for="__nav_8"> Support API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Support API" data-md-level="1"> <label class="md-nav__title" for="__nav_8"> <span class="md-nav__icon md-icon"></span> Support API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-computations.html" class="md-nav__link"> Computations </a> </li> <li class="md-nav__item"> <a href="ft2-list_processing.html" class="md-nav__link"> List Processing </a> </li> <li class="md-nav__item md-nav__item--active"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <label class="md-nav__link md-nav__link--active" for="__toc"> Outline Processing <span class="md-nav__icon md-icon"></span> </label> <a href="ft2-outline_processing.html" class="md-nav__link md-nav__link--active"> Outline Processing </a> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_outline" class="md-nav__link"> FT_Outline </a> </li> <li class="md-nav__item"> <a href="#ft_outline_new" class="md-nav__link"> FT_Outline_New </a> </li> <li class="md-nav__item"> <a href="#ft_outline_done" class="md-nav__link"> FT_Outline_Done </a> </li> <li class="md-nav__item"> <a href="#ft_outline_copy" class="md-nav__link"> FT_Outline_Copy </a> </li> <li class="md-nav__item"> <a href="#ft_outline_translate" class="md-nav__link"> FT_Outline_Translate </a> </li> <li class="md-nav__item"> <a href="#ft_outline_transform" class="md-nav__link"> FT_Outline_Transform </a> </li> <li class="md-nav__item"> <a href="#ft_outline_embolden" class="md-nav__link"> FT_Outline_Embolden </a> </li> <li class="md-nav__item"> <a href="#ft_outline_emboldenxy" class="md-nav__link"> FT_Outline_EmboldenXY </a> </li> <li class="md-nav__item"> <a href="#ft_outline_reverse" class="md-nav__link"> FT_Outline_Reverse </a> </li> <li class="md-nav__item"> <a href="#ft_outline_check" class="md-nav__link"> FT_Outline_Check </a> </li> <li class="md-nav__item"> <a href="#ft_outline_get_cbox" class="md-nav__link"> FT_Outline_Get_CBox </a> </li> <li class="md-nav__item"> <a href="#ft_outline_get_bbox" class="md-nav__link"> FT_Outline_Get_BBox </a> </li> <li class="md-nav__item"> <a href="#ft_outline_get_bitmap" class="md-nav__link"> FT_Outline_Get_Bitmap </a> </li> <li class="md-nav__item"> <a href="#ft_outline_render" class="md-nav__link"> FT_Outline_Render </a> </li> <li class="md-nav__item"> <a href="#ft_outline_decompose" class="md-nav__link"> FT_Outline_Decompose </a> </li> <li class="md-nav__item"> <a href="#ft_outline_funcs" class="md-nav__link"> FT_Outline_Funcs </a> </li> <li class="md-nav__item"> <a href="#ft_outline_movetofunc" class="md-nav__link"> FT_Outline_MoveToFunc </a> </li> <li class="md-nav__item"> <a href="#ft_outline_linetofunc" class="md-nav__link"> FT_Outline_LineToFunc </a> </li> <li class="md-nav__item"> <a href="#ft_outline_conictofunc" class="md-nav__link"> FT_Outline_ConicToFunc </a> </li> <li class="md-nav__item"> <a href="#ft_outline_cubictofunc" class="md-nav__link"> FT_Outline_CubicToFunc </a> </li> <li class="md-nav__item"> <a href="#ft_orientation" class="md-nav__link"> FT_Orientation </a> </li> <li class="md-nav__item"> <a href="#ft_outline_get_orientation" class="md-nav__link"> FT_Outline_Get_Orientation </a> </li> <li class="md-nav__item"> <a href="#ft_outline_xxx" class="md-nav__link"> FT_OUTLINE_XXX </a> </li> </ul> </nav> </li> <li class="md-nav__item"> <a href="ft2-quick_advance.html" class="md-nav__link"> Quick retrieval of advance values </a> </li> <li class="md-nav__item"> <a href="ft2-bitmap_handling.html" class="md-nav__link"> Bitmap Handling </a> </li> <li class="md-nav__item"> <a href="ft2-raster.html" class="md-nav__link"> Scanline Converter </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_stroker.html" class="md-nav__link"> Glyph Stroker </a> </li> <li class="md-nav__item"> <a href="ft2-system_interface.html" class="md-nav__link"> System Interface </a> </li> <li class="md-nav__item"> <a href="ft2-module_management.html" class="md-nav__link"> Module Management </a> </li> <li class="md-nav__item"> <a href="ft2-gzip.html" class="md-nav__link"> GZIP Streams </a> </li> <li class="md-nav__item"> <a href="ft2-lzw.html" class="md-nav__link"> LZW Streams </a> </li> <li class="md-nav__item"> <a href="ft2-bzip2.html" class="md-nav__link"> BZIP2 Streams </a> </li> <li class="md-nav__item"> <a href="ft2-debugging_apis.html" class="md-nav__link"> External Debugging APIs </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" > <label class="md-nav__link" for="__nav_9"> Error Codes <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Error Codes" data-md-level="1"> <label class="md-nav__title" for="__nav_9"> <span class="md-nav__icon md-icon"></span> Error Codes </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-error_enumerations.html" class="md-nav__link"> Error Enumerations </a> </li> <li class="md-nav__item"> <a href="ft2-error_code_values.html" class="md-nav__link"> Error Code Values </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" > <label class="md-nav__link" for="__nav_10"> Miscellaneous <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1"> <label class="md-nav__title" for="__nav_10"> <span class="md-nav__icon md-icon"></span> Miscellaneous </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-gx_validation.html" class="md-nav__link"> TrueTypeGX/AAT Validation </a> </li> <li class="md-nav__item"> <a href="ft2-incremental.html" class="md-nav__link"> Incremental Loading </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_engine.html" class="md-nav__link"> The TrueType Engine </a> </li> <li class="md-nav__item"> <a href="ft2-ot_validation.html" class="md-nav__link"> OpenType Validation </a> </li> </ul> </nav> </li> </ul> </nav> </div> </div> </div> <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_outline" class="md-nav__link"> FT_Outline </a> </li> <li class="md-nav__item"> <a href="#ft_outline_new" class="md-nav__link"> FT_Outline_New </a> </li> <li class="md-nav__item"> <a href="#ft_outline_done" class="md-nav__link"> FT_Outline_Done </a> </li> <li class="md-nav__item"> <a href="#ft_outline_copy" class="md-nav__link"> FT_Outline_Copy </a> </li> <li class="md-nav__item"> <a href="#ft_outline_translate" class="md-nav__link"> FT_Outline_Translate </a> </li> <li class="md-nav__item"> <a href="#ft_outline_transform" class="md-nav__link"> FT_Outline_Transform </a> </li> <li class="md-nav__item"> <a href="#ft_outline_embolden" class="md-nav__link"> FT_Outline_Embolden </a> </li> <li class="md-nav__item"> <a href="#ft_outline_emboldenxy" class="md-nav__link"> FT_Outline_EmboldenXY </a> </li> <li class="md-nav__item"> <a href="#ft_outline_reverse" class="md-nav__link"> FT_Outline_Reverse </a> </li> <li class="md-nav__item"> <a href="#ft_outline_check" class="md-nav__link"> FT_Outline_Check </a> </li> <li class="md-nav__item"> <a href="#ft_outline_get_cbox" class="md-nav__link"> FT_Outline_Get_CBox </a> </li> <li class="md-nav__item"> <a href="#ft_outline_get_bbox" class="md-nav__link"> FT_Outline_Get_BBox </a> </li> <li class="md-nav__item"> <a href="#ft_outline_get_bitmap" class="md-nav__link"> FT_Outline_Get_Bitmap </a> </li> <li class="md-nav__item"> <a href="#ft_outline_render" class="md-nav__link"> FT_Outline_Render </a> </li> <li class="md-nav__item"> <a href="#ft_outline_decompose" class="md-nav__link"> FT_Outline_Decompose </a> </li> <li class="md-nav__item"> <a href="#ft_outline_funcs" class="md-nav__link"> FT_Outline_Funcs </a> </li> <li class="md-nav__item"> <a href="#ft_outline_movetofunc" class="md-nav__link"> FT_Outline_MoveToFunc </a> </li> <li class="md-nav__item"> <a href="#ft_outline_linetofunc" class="md-nav__link"> FT_Outline_LineToFunc </a> </li> <li class="md-nav__item"> <a href="#ft_outline_conictofunc" class="md-nav__link"> FT_Outline_ConicToFunc </a> </li> <li class="md-nav__item"> <a href="#ft_outline_cubictofunc" class="md-nav__link"> FT_Outline_CubicToFunc </a> </li> <li class="md-nav__item"> <a href="#ft_orientation" class="md-nav__link"> FT_Orientation </a> </li> <li class="md-nav__item"> <a href="#ft_outline_get_orientation" class="md-nav__link"> FT_Outline_Get_Orientation </a> </li> <li class="md-nav__item"> <a href="#ft_outline_xxx" class="md-nav__link"> FT_OUTLINE_XXX </a> </li> </ul> </nav> </div> </div> </div> <div class="md-content" data-md-component="content"> <article class="md-content__inner md-typeset"> <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; <a href="index.html#support-api">Support API</a> &raquo; Outline Processing</p> <hr /> <h1 id="outline-processing">Outline Processing<a class="headerlink" href="#outline-processing" title="Permanent link">&para;</a></h1> <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2> <p>This section contains routines used to create and destroy scalable glyph images known as &lsquo;outlines&rsquo;. These can also be measured, transformed, and converted into bitmaps and pixmaps.</p> <h2 id="ft_outline">FT_Outline<a class="headerlink" href="#ft_outline" title="Permanent link">&para;</a></h2> <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Outline_ { <span class="keyword">short</span> n_contours; /* number of contours in glyph */ <span class="keyword">short</span> n_points; /* number of points in the glyph */ <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>* points; /* the outline's points */ <span class="keyword">char</span>* tags; /* the points flags */ <span class="keyword">short</span>* contours; /* the contour end points */ <span class="keyword">int</span> flags; /* outline masks */ } <b>FT_Outline</b>; </code></pre></div> <p>This structure is used to describe an outline to the scan-line converter.</p> <h4>fields</h4> <table class="fields"> <tr><td class="val" id="n_contours">n_contours</td><td class="desc"> <p>The number of contours in the outline.</p> </td></tr> <tr><td class="val" id="n_points">n_points</td><td class="desc"> <p>The number of points in the outline.</p> </td></tr> <tr><td class="val" id="points">points</td><td class="desc"> <p>A pointer to an array of <code>n_points</code> <code><a href="ft2-basic_types.html#ft_vector">FT_Vector</a></code> elements, giving the outline's point coordinates.</p> </td></tr> <tr><td class="val" id="tags">tags</td><td class="desc"> <p>A pointer to an array of <code>n_points</code> chars, giving each outline point's type.</p> <p>If bit&nbsp;0 is unset, the point is &lsquo;off&rsquo; the curve, i.e., a Bezier control point, while it is &lsquo;on&rsquo; if set.</p> <p>Bit&nbsp;1 is meaningful for &lsquo;off&rsquo; points only. If set, it indicates a third-order Bezier arc control point; and a second-order control point if unset.</p> <p>If bit&nbsp;2 is set, bits 5-7 contain the drop-out mode (as defined in the OpenType specification; the value is the same as the argument to the &lsquo;SCANMODE&rsquo; instruction).</p> <p>Bits 3 and&nbsp;4 are reserved for internal purposes.</p> </td></tr> <tr><td class="val" id="contours">contours</td><td class="desc"> <p>An array of <code>n_contours</code> shorts, giving the end point of each contour within the outline. For example, the first contour is defined by the points &lsquo;0&rsquo; to <code>contours[0]</code>, the second one is defined by the points <code>contours[0]+1</code> to <code>contours[1]</code>, etc.</p> </td></tr> <tr><td class="val" id="flags">flags</td><td class="desc"> <p>A set of bit flags used to characterize the outline and give hints to the scan-converter and hinter on how to convert/grid-fit it. See <code><a href="ft2-outline_processing.html#ft_outline_xxx">FT_OUTLINE_XXX</a></code>.</p> </td></tr> </table> <h4>note</h4> <p>The B/W rasterizer only checks bit&nbsp;2 in the <code>tags</code> array for the first point of each contour. The drop-out mode as given with <code><a href="ft2-outline_processing.html#ft_outline_xxx">FT_OUTLINE_IGNORE_DROPOUTS</a></code>, <code><a href="ft2-outline_processing.html#ft_outline_xxx">FT_OUTLINE_SMART_DROPOUTS</a></code>, and <code><a href="ft2-outline_processing.html#ft_outline_xxx">FT_OUTLINE_INCLUDE_STUBS</a></code> in <code>flags</code> is then overridden.</p> <hr> <h2 id="ft_outline_new">FT_Outline_New<a class="headerlink" href="#ft_outline_new" title="Permanent link">&para;</a></h2> <p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Outline_New</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library, <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> numPoints, <a href="ft2-basic_types.html#ft_int">FT_Int</a> numContours, <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a> *anoutline ); </code></pre></div> <p>Create a new outline of a given size.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="library">library</td><td class="desc"> <p>A handle to the library object from where the outline is allocated. Note however that the new outline will <strong>not</strong> necessarily be <strong>freed</strong>, when destroying the library, by <code><a href="ft2-base_interface.html#ft_done_freetype">FT_Done_FreeType</a></code>.</p> </td></tr> <tr><td class="val" id="numpoints">numPoints</td><td class="desc"> <p>The maximum number of points within the outline. Must be smaller than or equal to 0xFFFF (65535).</p> </td></tr> <tr><td class="val" id="numcontours">numContours</td><td class="desc"> <p>The maximum number of contours within the outline. This value must be in the range 0 to <code>numPoints</code>.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="anoutline">anoutline</td><td class="desc"> <p>A handle to the new outline.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>The reason why this function takes a <code>library</code> parameter is simply to use the library's memory allocator.</p> <hr> <h2 id="ft_outline_done">FT_Outline_Done<a class="headerlink" href="#ft_outline_done" title="Permanent link">&para;</a></h2> <p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Outline_Done</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library, <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>* outline ); </code></pre></div> <p>Destroy an outline created with <code><a href="ft2-outline_processing.html#ft_outline_new">FT_Outline_New</a></code>.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="library">library</td><td class="desc"> <p>A handle of the library object used to allocate the outline.</p> </td></tr> <tr><td class="val" id="outline">outline</td><td class="desc"> <p>A pointer to the outline object to be discarded.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>If the outline's &lsquo;owner&rsquo; field is not set, only the outline descriptor will be released.</p> <hr> <h2 id="ft_outline_copy">FT_Outline_Copy<a class="headerlink" href="#ft_outline_copy" title="Permanent link">&para;</a></h2> <p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Outline_Copy</b>( <span class="keyword">const</span> <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>* source, <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a> *target ); </code></pre></div> <p>Copy an outline into another one. Both objects must have the same sizes (number of points &amp; number of contours) when this function is called.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="source">source</td><td class="desc"> <p>A handle to the source outline.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="target">target</td><td class="desc"> <p>A handle to the target outline.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <hr> <h2 id="ft_outline_translate">FT_Outline_Translate<a class="headerlink" href="#ft_outline_translate" title="Permanent link">&para;</a></h2> <p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> ) <b>FT_Outline_Translate</b>( <span class="keyword">const</span> <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>* outline, <a href="ft2-basic_types.html#ft_pos">FT_Pos</a> xOffset, <a href="ft2-basic_types.html#ft_pos">FT_Pos</a> yOffset ); </code></pre></div> <p>Apply a simple translation to the points of an outline.</p> <h4>inout</h4> <table class="fields"> <tr><td class="val" id="outline">outline</td><td class="desc"> <p>A pointer to the target outline descriptor.</p> </td></tr> </table> <h4>input</h4> <table class="fields"> <tr><td class="val" id="xoffset">xOffset</td><td class="desc"> <p>The horizontal offset.</p> </td></tr> <tr><td class="val" id="yoffset">yOffset</td><td class="desc"> <p>The vertical offset.</p> </td></tr> </table> <hr> <h2 id="ft_outline_transform">FT_Outline_Transform<a class="headerlink" href="#ft_outline_transform" title="Permanent link">&para;</a></h2> <p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> ) <b>FT_Outline_Transform</b>( <span class="keyword">const</span> <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>* outline, <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_matrix">FT_Matrix</a>* matrix ); </code></pre></div> <p>Apply a simple 2x2 matrix to all of an outline's points. Useful for applying rotations, slanting, flipping, etc.</p> <h4>inout</h4> <table class="fields"> <tr><td class="val" id="outline">outline</td><td class="desc"> <p>A pointer to the target outline descriptor.</p> </td></tr> </table> <h4>input</h4> <table class="fields"> <tr><td class="val" id="matrix">matrix</td><td class="desc"> <p>A pointer to the transformation matrix.</p> </td></tr> </table> <h4>note</h4> <p>You can use <code><a href="ft2-outline_processing.html#ft_outline_translate">FT_Outline_Translate</a></code> if you need to translate the outline's points.</p> <hr> <h2 id="ft_outline_embolden">FT_Outline_Embolden<a class="headerlink" href="#ft_outline_embolden" title="Permanent link">&para;</a></h2> <p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Outline_Embolden</b>( <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>* outline, <a href="ft2-basic_types.html#ft_pos">FT_Pos</a> strength ); </code></pre></div> <p>Embolden an outline. The new outline will be at most 4&nbsp;times <code>strength</code> pixels wider and higher. You may think of the left and bottom borders as unchanged.</p> <p>Negative <code>strength</code> values to reduce the outline thickness are possible also.</p> <h4>inout</h4> <table class="fields"> <tr><td class="val" id="outline">outline</td><td class="desc"> <p>A handle to the target outline.</p> </td></tr> </table> <h4>input</h4> <table class="fields"> <tr><td class="val" id="strength">strength</td><td class="desc"> <p>How strong the glyph is emboldened. Expressed in 26.6 pixel format.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>The used algorithm to increase or decrease the thickness of the glyph doesn't change the number of points; this means that certain situations like acute angles or intersections are sometimes handled incorrectly.</p> <p>If you need &lsquo;better&rsquo; metrics values you should call <code><a href="ft2-outline_processing.html#ft_outline_get_cbox">FT_Outline_Get_CBox</a></code> or <code><a href="ft2-outline_processing.html#ft_outline_get_bbox">FT_Outline_Get_BBox</a></code>.</p> <p>To get meaningful results, font scaling values must be set with functions like <code><a href="ft2-base_interface.html#ft_set_char_size">FT_Set_Char_Size</a></code> before calling FT_Render_Glyph.</p> <h4>example</h4> <div class="highlight"><pre><span></span><code> FT_Load_Glyph( face, index, FT_LOAD_DEFAULT ); if ( face-&gt;glyph-&gt;format == FT_GLYPH_FORMAT_OUTLINE ) FT_Outline_Embolden( &amp;face-&gt;glyph-&gt;outline, strength ); </code></pre></div> <hr> <h2 id="ft_outline_emboldenxy">FT_Outline_EmboldenXY<a class="headerlink" href="#ft_outline_emboldenxy" title="Permanent link">&para;</a></h2> <p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Outline_EmboldenXY</b>( <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>* outline, <a href="ft2-basic_types.html#ft_pos">FT_Pos</a> xstrength, <a href="ft2-basic_types.html#ft_pos">FT_Pos</a> ystrength ); </code></pre></div> <p>Embolden an outline. The new outline will be <code>xstrength</code> pixels wider and <code>ystrength</code> pixels higher. Otherwise, it is similar to <code><a href="ft2-outline_processing.html#ft_outline_embolden">FT_Outline_Embolden</a></code>, which uses the same strength in both directions.</p> <h4>since</h4> <p>2.4.10</p> <hr> <h2 id="ft_outline_reverse">FT_Outline_Reverse<a class="headerlink" href="#ft_outline_reverse" title="Permanent link">&para;</a></h2> <p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> ) <b>FT_Outline_Reverse</b>( <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>* outline ); </code></pre></div> <p>Reverse the drawing direction of an outline. This is used to ensure consistent fill conventions for mirrored glyphs.</p> <h4>inout</h4> <table class="fields"> <tr><td class="val" id="outline">outline</td><td class="desc"> <p>A pointer to the target outline descriptor.</p> </td></tr> </table> <h4>note</h4> <p>This function toggles the bit flag <code><a href="ft2-outline_processing.html#ft_outline_xxx">FT_OUTLINE_REVERSE_FILL</a></code> in the outline's <code>flags</code> field.</p> <p>It shouldn't be used by a normal client application, unless it knows what it is doing.</p> <hr> <h2 id="ft_outline_check">FT_Outline_Check<a class="headerlink" href="#ft_outline_check" title="Permanent link">&para;</a></h2> <p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Outline_Check</b>( <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>* outline ); </code></pre></div> <p>Check the contents of an outline descriptor.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="outline">outline</td><td class="desc"> <p>A handle to a source outline.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>An empty outline, or an outline with a single point only is also valid.</p> <hr> <h2 id="ft_outline_get_cbox">FT_Outline_Get_CBox<a class="headerlink" href="#ft_outline_get_cbox" title="Permanent link">&para;</a></h2> <p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> ) <b>FT_Outline_Get_CBox</b>( <span class="keyword">const</span> <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>* outline, <a href="ft2-basic_types.html#ft_bbox">FT_BBox</a> *acbox ); </code></pre></div> <p>Return an outline's &lsquo;control box&rsquo;. The control box encloses all the outline's points, including Bezier control points. Though it coincides with the exact bounding box for most glyphs, it can be slightly larger in some situations (like when rotating an outline that contains Bezier outside arcs).</p> <p>Computing the control box is very fast, while getting the bounding box can take much more time as it needs to walk over all segments and arcs in the outline. To get the latter, you can use the &lsquo;ftbbox&rsquo; component, which is dedicated to this single task.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="outline">outline</td><td class="desc"> <p>A pointer to the source outline descriptor.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="acbox">acbox</td><td class="desc"> <p>The outline's control box.</p> </td></tr> </table> <h4>note</h4> <p>See <code><a href="ft2-glyph_management.html#ft_glyph_get_cbox">FT_Glyph_Get_CBox</a></code> for a discussion of tricky fonts.</p> <hr> <h2 id="ft_outline_get_bbox">FT_Outline_Get_BBox<a class="headerlink" href="#ft_outline_get_bbox" title="Permanent link">&para;</a></h2> <p>Defined in FT_BBOX_H (freetype/ftbbox.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Outline_Get_BBox</b>( <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>* outline, <a href="ft2-basic_types.html#ft_bbox">FT_BBox</a> *abbox ); </code></pre></div> <p>Compute the exact bounding box of an outline. This is slower than computing the control box. However, it uses an advanced algorithm that returns <em>very</em> quickly when the two boxes coincide. Otherwise, the outline Bezier arcs are traversed to extract their extrema.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="outline">outline</td><td class="desc"> <p>A pointer to the source outline.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="abbox">abbox</td><td class="desc"> <p>The outline's exact bounding box.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>If the font is tricky and the glyph has been loaded with <code><a href="ft2-base_interface.html#ft_load_xxx">FT_LOAD_NO_SCALE</a></code>, the resulting BBox is meaningless. To get reasonable values for the BBox it is necessary to load the glyph at a large ppem value (so that the hinting instructions can properly shift and scale the subglyphs), then extracting the BBox, which can be eventually converted back to font units.</p> <hr> <h2 id="ft_outline_get_bitmap">FT_Outline_Get_Bitmap<a class="headerlink" href="#ft_outline_get_bitmap" title="Permanent link">&para;</a></h2> <p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Outline_Get_Bitmap</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library, <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>* outline, <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_bitmap">FT_Bitmap</a> *abitmap ); </code></pre></div> <p>Render an outline within a bitmap. The outline's image is simply OR-ed to the target bitmap.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="library">library</td><td class="desc"> <p>A handle to a FreeType library object.</p> </td></tr> <tr><td class="val" id="outline">outline</td><td class="desc"> <p>A pointer to the source outline descriptor.</p> </td></tr> </table> <h4>inout</h4> <table class="fields"> <tr><td class="val" id="abitmap">abitmap</td><td class="desc"> <p>A pointer to the target bitmap descriptor.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>This function does <strong>not create</strong> the bitmap, it only renders an outline image within the one you pass to it! Consequently, the various fields in <code>abitmap</code> should be set accordingly.</p> <p>It will use the raster corresponding to the default glyph format.</p> <p>The value of the <code>num_grays</code> field in <code>abitmap</code> is ignored. If you select the gray-level rasterizer, and you want less than 256 gray levels, you have to use <code><a href="ft2-outline_processing.html#ft_outline_render">FT_Outline_Render</a></code> directly.</p> <hr> <h2 id="ft_outline_render">FT_Outline_Render<a class="headerlink" href="#ft_outline_render" title="Permanent link">&para;</a></h2> <p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Outline_Render</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a> library, <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>* outline, <a href="ft2-raster.html#ft_raster_params">FT_Raster_Params</a>* params ); </code></pre></div> <p>Render an outline within a bitmap using the current scan-convert.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="library">library</td><td class="desc"> <p>A handle to a FreeType library object.</p> </td></tr> <tr><td class="val" id="outline">outline</td><td class="desc"> <p>A pointer to the source outline descriptor.</p> </td></tr> </table> <h4>inout</h4> <table class="fields"> <tr><td class="val" id="params">params</td><td class="desc"> <p>A pointer to an <code><a href="ft2-raster.html#ft_raster_params">FT_Raster_Params</a></code> structure used to describe the rendering operation.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>This advanced function uses <code><a href="ft2-raster.html#ft_raster_params">FT_Raster_Params</a></code> as an argument. The field <code>params.source</code> will be set to <code>outline</code> before the scan converter is called, which means that the value you give to it is actually ignored. Either <code>params.target</code> must point to preallocated bitmap, or <code><a href="ft2-raster.html#ft_raster_flag_xxx">FT_RASTER_FLAG_DIRECT</a></code> must be set in <code>params.flags</code> allowing FreeType rasterizer to be used for direct composition, translucency, etc. See <code><a href="ft2-raster.html#ft_raster_params">FT_Raster_Params</a></code> for more details.</p> <hr> <h2 id="ft_outline_decompose">FT_Outline_Decompose<a class="headerlink" href="#ft_outline_decompose" title="Permanent link">&para;</a></h2> <p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Outline_Decompose</b>( <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>* outline, <span class="keyword">const</span> <a href="ft2-outline_processing.html#ft_outline_funcs">FT_Outline_Funcs</a>* func_interface, <span class="keyword">void</span>* user ); </code></pre></div> <p>Walk over an outline's structure to decompose it into individual segments and Bezier arcs. This function also emits &lsquo;move to&rsquo; operations to indicate the start of new contours in the outline.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="outline">outline</td><td class="desc"> <p>A pointer to the source target.</p> </td></tr> <tr><td class="val" id="func_interface">func_interface</td><td class="desc"> <p>A table of &lsquo;emitters&rsquo;, i.e., function pointers called during decomposition to indicate path operations.</p> </td></tr> </table> <h4>inout</h4> <table class="fields"> <tr><td class="val" id="user">user</td><td class="desc"> <p>A typeless pointer that is passed to each emitter during the decomposition. It can be used to store the state during the decomposition.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>Degenerate contours, segments, and Bezier arcs may be reported. In most cases, it is best to filter these out before using the outline for stroking or other path modification purposes (which may cause degenerate segments to become non-degenrate and visible, like when stroke caps are used or the path is otherwise outset). Some glyph outlines may contain deliberate degenerate single points for mark attachement.</p> <p>Similarly, the function returns success for an empty outline also (doing nothing, this is, not calling any emitter); if necessary, you should filter this out, too.</p> <hr> <h2 id="ft_outline_funcs">FT_Outline_Funcs<a class="headerlink" href="#ft_outline_funcs" title="Permanent link">&para;</a></h2> <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Outline_Funcs_ { <a href="ft2-outline_processing.html#ft_outline_movetofunc">FT_Outline_MoveToFunc</a> move_to; <a href="ft2-outline_processing.html#ft_outline_linetofunc">FT_Outline_LineToFunc</a> line_to; <a href="ft2-outline_processing.html#ft_outline_conictofunc">FT_Outline_ConicToFunc</a> conic_to; <a href="ft2-outline_processing.html#ft_outline_cubictofunc">FT_Outline_CubicToFunc</a> cubic_to; <span class="keyword">int</span> shift; <a href="ft2-basic_types.html#ft_pos">FT_Pos</a> delta; } <b>FT_Outline_Funcs</b>; </code></pre></div> <p>A structure to hold various function pointers used during outline decomposition in order to emit segments, conic, and cubic Beziers.</p> <h4>fields</h4> <table class="fields"> <tr><td class="val" id="move_to">move_to</td><td class="desc"> <p>The &lsquo;move to&rsquo; emitter.</p> </td></tr> <tr><td class="val" id="line_to">line_to</td><td class="desc"> <p>The segment emitter.</p> </td></tr> <tr><td class="val" id="conic_to">conic_to</td><td class="desc"> <p>The second-order Bezier arc emitter.</p> </td></tr> <tr><td class="val" id="cubic_to">cubic_to</td><td class="desc"> <p>The third-order Bezier arc emitter.</p> </td></tr> <tr><td class="val" id="shift">shift</td><td class="desc"> <p>The shift that is applied to coordinates before they are sent to the emitter.</p> </td></tr> <tr><td class="val" id="delta">delta</td><td class="desc"> <p>The delta that is applied to coordinates before they are sent to the emitter, but after the shift.</p> </td></tr> </table> <h4>note</h4> <p>The point coordinates sent to the emitters are the transformed version of the original coordinates (this is important for high accuracy during scan-conversion). The transformation is simple: <div class="highlight"><pre><span></span><code> x&#39; = (x &lt;&lt; shift) - delta y&#39; = (y &lt;&lt; shift) - delta </code></pre></div></p> <p>Set the values of <code>shift</code> and <code>delta</code> to&nbsp;0 to get the original point coordinates.</p> <hr> <h2 id="ft_outline_movetofunc">FT_Outline_MoveToFunc<a class="headerlink" href="#ft_outline_movetofunc" title="Permanent link">&para;</a></h2> <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">int</span> (*<b>FT_Outline_MoveToFunc</b>)( <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>* to, <span class="keyword">void</span>* user ); #<span class="keyword">define</span> FT_Outline_MoveTo_Func <b>FT_Outline_MoveToFunc</b> </code></pre></div> <p>A function pointer type used to describe the signature of a &lsquo;move to&rsquo; function during outline walking/decomposition.</p> <p>A &lsquo;move to&rsquo; is emitted to start a new contour in an outline.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="to">to</td><td class="desc"> <p>A pointer to the target point of the &lsquo;move to&rsquo;.</p> </td></tr> <tr><td class="val" id="user">user</td><td class="desc"> <p>A typeless pointer, which is passed from the caller of the decomposition function.</p> </td></tr> </table> <h4>return</h4> <p>Error code. 0&nbsp;means success.</p> <hr> <h2 id="ft_outline_linetofunc">FT_Outline_LineToFunc<a class="headerlink" href="#ft_outline_linetofunc" title="Permanent link">&para;</a></h2> <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">int</span> (*<b>FT_Outline_LineToFunc</b>)( <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>* to, <span class="keyword">void</span>* user ); #<span class="keyword">define</span> FT_Outline_LineTo_Func <b>FT_Outline_LineToFunc</b> </code></pre></div> <p>A function pointer type used to describe the signature of a &lsquo;line to&rsquo; function during outline walking/decomposition.</p> <p>A &lsquo;line to&rsquo; is emitted to indicate a segment in the outline.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="to">to</td><td class="desc"> <p>A pointer to the target point of the &lsquo;line to&rsquo;.</p> </td></tr> <tr><td class="val" id="user">user</td><td class="desc"> <p>A typeless pointer, which is passed from the caller of the decomposition function.</p> </td></tr> </table> <h4>return</h4> <p>Error code. 0&nbsp;means success.</p> <hr> <h2 id="ft_outline_conictofunc">FT_Outline_ConicToFunc<a class="headerlink" href="#ft_outline_conictofunc" title="Permanent link">&para;</a></h2> <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">int</span> (*<b>FT_Outline_ConicToFunc</b>)( <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>* control, <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>* to, <span class="keyword">void</span>* user ); #<span class="keyword">define</span> FT_Outline_ConicTo_Func <b>FT_Outline_ConicToFunc</b> </code></pre></div> <p>A function pointer type used to describe the signature of a &lsquo;conic to&rsquo; function during outline walking or decomposition.</p> <p>A &lsquo;conic to&rsquo; is emitted to indicate a second-order Bezier arc in the outline.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="control">control</td><td class="desc"> <p>An intermediate control point between the last position and the new target in <code>to</code>.</p> </td></tr> <tr><td class="val" id="to">to</td><td class="desc"> <p>A pointer to the target end point of the conic arc.</p> </td></tr> <tr><td class="val" id="user">user</td><td class="desc"> <p>A typeless pointer, which is passed from the caller of the decomposition function.</p> </td></tr> </table> <h4>return</h4> <p>Error code. 0&nbsp;means success.</p> <hr> <h2 id="ft_outline_cubictofunc">FT_Outline_CubicToFunc<a class="headerlink" href="#ft_outline_cubictofunc" title="Permanent link">&para;</a></h2> <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">int</span> (*<b>FT_Outline_CubicToFunc</b>)( <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>* control1, <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>* control2, <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>* to, <span class="keyword">void</span>* user ); #<span class="keyword">define</span> FT_Outline_CubicTo_Func <b>FT_Outline_CubicToFunc</b> </code></pre></div> <p>A function pointer type used to describe the signature of a &lsquo;cubic to&rsquo; function during outline walking or decomposition.</p> <p>A &lsquo;cubic to&rsquo; is emitted to indicate a third-order Bezier arc.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="control1">control1</td><td class="desc"> <p>A pointer to the first Bezier control point.</p> </td></tr> <tr><td class="val" id="control2">control2</td><td class="desc"> <p>A pointer to the second Bezier control point.</p> </td></tr> <tr><td class="val" id="to">to</td><td class="desc"> <p>A pointer to the target end point.</p> </td></tr> <tr><td class="val" id="user">user</td><td class="desc"> <p>A typeless pointer, which is passed from the caller of the decomposition function.</p> </td></tr> </table> <h4>return</h4> <p>Error code. 0&nbsp;means success.</p> <hr> <h2 id="ft_orientation">FT_Orientation<a class="headerlink" href="#ft_orientation" title="Permanent link">&para;</a></h2> <p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">enum</span> FT_Orientation_ { <a href="ft2-outline_processing.html#ft_orientation_truetype">FT_ORIENTATION_TRUETYPE</a> = 0, <a href="ft2-outline_processing.html#ft_orientation_postscript">FT_ORIENTATION_POSTSCRIPT</a> = 1, <a href="ft2-outline_processing.html#ft_orientation_fill_right">FT_ORIENTATION_FILL_RIGHT</a> = <a href="ft2-outline_processing.html#ft_orientation_truetype">FT_ORIENTATION_TRUETYPE</a>, <a href="ft2-outline_processing.html#ft_orientation_fill_left">FT_ORIENTATION_FILL_LEFT</a> = <a href="ft2-outline_processing.html#ft_orientation_postscript">FT_ORIENTATION_POSTSCRIPT</a>, <a href="ft2-outline_processing.html#ft_orientation_none">FT_ORIENTATION_NONE</a> } <b>FT_Orientation</b>; </code></pre></div> <p>A list of values used to describe an outline's contour orientation.</p> <p>The TrueType and PostScript specifications use different conventions to determine whether outline contours should be filled or unfilled.</p> <h4>values</h4> <table class="fields"> <tr><td class="val" id="ft_orientation_truetype">FT_ORIENTATION_TRUETYPE</td><td class="desc"> <p>According to the TrueType specification, clockwise contours must be filled, and counter-clockwise ones must be unfilled.</p> </td></tr> <tr><td class="val" id="ft_orientation_postscript">FT_ORIENTATION_POSTSCRIPT</td><td class="desc"> <p>According to the PostScript specification, counter-clockwise contours must be filled, and clockwise ones must be unfilled.</p> </td></tr> <tr><td class="val" id="ft_orientation_fill_right">FT_ORIENTATION_FILL_RIGHT</td><td class="desc"> <p>This is identical to <code><a href="ft2-outline_processing.html#ft_orientation">FT_ORIENTATION_TRUETYPE</a></code>, but is used to remember that in TrueType, everything that is to the right of the drawing direction of a contour must be filled.</p> </td></tr> <tr><td class="val" id="ft_orientation_fill_left">FT_ORIENTATION_FILL_LEFT</td><td class="desc"> <p>This is identical to <code><a href="ft2-outline_processing.html#ft_orientation">FT_ORIENTATION_POSTSCRIPT</a></code>, but is used to remember that in PostScript, everything that is to the left of the drawing direction of a contour must be filled.</p> </td></tr> <tr><td class="val" id="ft_orientation_none">FT_ORIENTATION_NONE</td><td class="desc"> <p>The orientation cannot be determined. That is, different parts of the glyph have different orientation.</p> </td></tr> </table> <hr> <h2 id="ft_outline_get_orientation">FT_Outline_Get_Orientation<a class="headerlink" href="#ft_outline_get_orientation" title="Permanent link">&para;</a></h2> <p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-outline_processing.html#ft_orientation">FT_Orientation</a> ) <b>FT_Outline_Get_Orientation</b>( <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>* outline ); </code></pre></div> <p>This function analyzes a glyph outline and tries to compute its fill orientation (see <code><a href="ft2-outline_processing.html#ft_orientation">FT_Orientation</a></code>). This is done by integrating the total area covered by the outline. The positive integral corresponds to the clockwise orientation and <code><a href="ft2-outline_processing.html#ft_orientation">FT_ORIENTATION_POSTSCRIPT</a></code> is returned. The negative integral corresponds to the counter-clockwise orientation and <code><a href="ft2-outline_processing.html#ft_orientation">FT_ORIENTATION_TRUETYPE</a></code> is returned.</p> <p>Note that this will return <code><a href="ft2-outline_processing.html#ft_orientation">FT_ORIENTATION_TRUETYPE</a></code> for empty outlines.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="outline">outline</td><td class="desc"> <p>A handle to the source outline.</p> </td></tr> </table> <h4>return</h4> <p>The orientation.</p> <hr> <h2 id="ft_outline_xxx">FT_OUTLINE_XXX<a class="headerlink" href="#ft_outline_xxx" title="Permanent link">&para;</a></h2> <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <a href="ft2-outline_processing.html#ft_outline_none">FT_OUTLINE_NONE</a> 0x0 #<span class="keyword">define</span> <a href="ft2-outline_processing.html#ft_outline_owner">FT_OUTLINE_OWNER</a> 0x1 #<span class="keyword">define</span> <a href="ft2-outline_processing.html#ft_outline_even_odd_fill">FT_OUTLINE_EVEN_ODD_FILL</a> 0x2 #<span class="keyword">define</span> <a href="ft2-outline_processing.html#ft_outline_reverse_fill">FT_OUTLINE_REVERSE_FILL</a> 0x4 #<span class="keyword">define</span> <a href="ft2-outline_processing.html#ft_outline_ignore_dropouts">FT_OUTLINE_IGNORE_DROPOUTS</a> 0x8 #<span class="keyword">define</span> <a href="ft2-outline_processing.html#ft_outline_smart_dropouts">FT_OUTLINE_SMART_DROPOUTS</a> 0x10 #<span class="keyword">define</span> <a href="ft2-outline_processing.html#ft_outline_include_stubs">FT_OUTLINE_INCLUDE_STUBS</a> 0x20 #<span class="keyword">define</span> <a href="ft2-outline_processing.html#ft_outline_overlap">FT_OUTLINE_OVERLAP</a> 0x40 #<span class="keyword">define</span> <a href="ft2-outline_processing.html#ft_outline_high_precision">FT_OUTLINE_HIGH_PRECISION</a> 0x100 #<span class="keyword">define</span> <a href="ft2-outline_processing.html#ft_outline_single_pass">FT_OUTLINE_SINGLE_PASS</a> 0x200 /* these constants are deprecated; use the corresponding */ /* `<b>FT_OUTLINE_XXX</b>` values instead */ #<span class="keyword">define</span> ft_outline_none <a href="ft2-outline_processing.html#ft_outline_none">FT_OUTLINE_NONE</a> #<span class="keyword">define</span> ft_outline_owner <a href="ft2-outline_processing.html#ft_outline_owner">FT_OUTLINE_OWNER</a> #<span class="keyword">define</span> ft_outline_even_odd_fill <a href="ft2-outline_processing.html#ft_outline_even_odd_fill">FT_OUTLINE_EVEN_ODD_FILL</a> #<span class="keyword">define</span> ft_outline_reverse_fill <a href="ft2-outline_processing.html#ft_outline_reverse_fill">FT_OUTLINE_REVERSE_FILL</a> #<span class="keyword">define</span> ft_outline_ignore_dropouts <a href="ft2-outline_processing.html#ft_outline_ignore_dropouts">FT_OUTLINE_IGNORE_DROPOUTS</a> #<span class="keyword">define</span> ft_outline_high_precision <a href="ft2-outline_processing.html#ft_outline_high_precision">FT_OUTLINE_HIGH_PRECISION</a> #<span class="keyword">define</span> ft_outline_single_pass <a href="ft2-outline_processing.html#ft_outline_single_pass">FT_OUTLINE_SINGLE_PASS</a> </code></pre></div> <p>A list of bit-field constants used for the flags in an outline's <code>flags</code> field.</p> <h4>values</h4> <table class="fields long"> <tr><td class="val" id="ft_outline_none">FT_OUTLINE_NONE</td><td class="desc"> <p>Value&nbsp;0 is reserved.</p> </td></tr> <tr><td class="val" id="ft_outline_owner">FT_OUTLINE_OWNER</td><td class="desc"> <p>If set, this flag indicates that the outline's field arrays (i.e., <code>points</code>, <code>flags</code>, and <code>contours</code>) are &lsquo;owned&rsquo; by the outline object, and should thus be freed when it is destroyed.</p> </td></tr> <tr><td class="val" id="ft_outline_even_odd_fill">FT_OUTLINE_EVEN_ODD_FILL</td><td class="desc"> <p>By default, outlines are filled using the non-zero winding rule. If set to 1, the outline will be filled using the even-odd fill rule (only works with the smooth rasterizer).</p> </td></tr> <tr><td class="val" id="ft_outline_reverse_fill">FT_OUTLINE_REVERSE_FILL</td><td class="desc"> <p>By default, outside contours of an outline are oriented in clock-wise direction, as defined in the TrueType specification. This flag is set if the outline uses the opposite direction (typically for Type&nbsp;1 fonts). This flag is ignored by the scan converter.</p> </td></tr> <tr><td class="val" id="ft_outline_ignore_dropouts">FT_OUTLINE_IGNORE_DROPOUTS</td><td class="desc"> <p>By default, the scan converter will try to detect drop-outs in an outline and correct the glyph bitmap to ensure consistent shape continuity. If set, this flag hints the scan-line converter to ignore such cases. See below for more information.</p> </td></tr> <tr><td class="val" id="ft_outline_smart_dropouts">FT_OUTLINE_SMART_DROPOUTS</td><td class="desc"> <p>Select smart dropout control. If unset, use simple dropout control. Ignored if <code><a href="ft2-outline_processing.html#ft_outline_xxx">FT_OUTLINE_IGNORE_DROPOUTS</a></code> is set. See below for more information.</p> </td></tr> <tr><td class="val" id="ft_outline_include_stubs">FT_OUTLINE_INCLUDE_STUBS</td><td class="desc"> <p>If set, turn pixels on for &lsquo;stubs&rsquo;, otherwise exclude them. Ignored if <code><a href="ft2-outline_processing.html#ft_outline_xxx">FT_OUTLINE_IGNORE_DROPOUTS</a></code> is set. See below for more information.</p> </td></tr> <tr><td class="val" id="ft_outline_overlap">FT_OUTLINE_OVERLAP</td><td class="desc"> <p>[Since 2.10.3] This flag indicates that this outline contains overlapping contours and the anti-aliased renderer should perform oversampling to mitigate possible artifacts. This flag should <em>not</em> be set for well designed glyphs without overlaps because it quadruples the rendering time.</p> </td></tr> <tr><td class="val" id="ft_outline_high_precision">FT_OUTLINE_HIGH_PRECISION</td><td class="desc"> <p>This flag indicates that the scan-line converter should try to convert this outline to bitmaps with the highest possible quality. It is typically set for small character sizes. Note that this is only a hint that might be completely ignored by a given scan-converter.</p> </td></tr> <tr><td class="val" id="ft_outline_single_pass">FT_OUTLINE_SINGLE_PASS</td><td class="desc"> <p>This flag is set to force a given scan-converter to only use a single pass over the outline to render a bitmap glyph image. Normally, it is set for very large character sizes. It is only a hint that might be completely ignored by a given scan-converter.</p> </td></tr> </table> <h4>note</h4> <p>The flags <code><a href="ft2-outline_processing.html#ft_outline_xxx">FT_OUTLINE_IGNORE_DROPOUTS</a></code>, <code><a href="ft2-outline_processing.html#ft_outline_xxx">FT_OUTLINE_SMART_DROPOUTS</a></code>, and <code><a href="ft2-outline_processing.html#ft_outline_xxx">FT_OUTLINE_INCLUDE_STUBS</a></code> are ignored by the smooth rasterizer.</p> <p>There exists a second mechanism to pass the drop-out mode to the B/W rasterizer; see the <code>tags</code> field in <code><a href="ft2-outline_processing.html#ft_outline">FT_Outline</a></code>.</p> <p>Please refer to the description of the &lsquo;SCANTYPE&rsquo; instruction in the OpenType specification (in file <code>ttinst1.doc</code>) how simple drop-outs, smart drop-outs, and stubs are defined.</p> <hr> </article> </div> </div> </main> <footer class="md-footer"> <nav class="md-footer__inner md-grid" aria-label="Footer"> <a href="ft2-list_processing.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: List Processing" rel="prev"> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Previous </span> List Processing </div> </div> </a> <a href="ft2-quick_advance.html" class="md-footer__link md-footer__link--next" aria-label="Next: Quick retrieval of advance values" rel="next"> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Next </span> Quick retrieval of advance values </div> </div> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg> </div> </a> </nav> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-footer-copyright"> <div class="md-footer-copyright__highlight"> Copyright 2022 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>. </div> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"base": ".", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "assets/javascripts/workers/search.477d984a.min.js", "version": null}</script> <script src="assets/javascripts/bundle.82b56eb2.min.js"></script> <script src="javascripts/extra.js"></script> </body> </html>
whupdup/frame
real/third_party/freetype-2.12.0/docs/reference/ft2-outline_processing.html
HTML
gpl-3.0
76,705
<!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="description" content="API Reference Documentation for FreeType-2.12.0"> <meta name="author" content="FreeType Contributors"> <link rel="icon" href="images/favico.ico"> <meta name="generator" content="mkdocs-1.2.1, mkdocs-material-7.1.9"> <title>Parameter Tags - FreeType-2.12.0 API Reference</title> <link rel="stylesheet" href="assets/stylesheets/main.ca7ac06f.min.css"> <link rel="stylesheet" href="assets/stylesheets/palette.f1a3b89f.min.css"> <meta name="theme-color" content="#4cae4f"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback"> <style>:root{--md-text-font-family:"Noto Serif";--md-code-font-family:"Roboto Mono"}</style> <link rel="stylesheet" href="stylesheets/extra.css"> </head> <body dir="ltr" data-md-color-scheme="" data-md-color-primary="green" data-md-color-accent="green"> <script>function __prefix(e){return new URL(".",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <label class="md-overlay" for="__drawer"></label> <div data-md-component="skip"> <a href="#parameter-tags" class="md-skip"> Skip to content </a> </div> <div data-md-component="announce"> </div> <header class="md-header" data-md-component="header"> <nav class="md-header__inner md-grid" aria-label="Header"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> <label class="md-header__button md-icon" for="__drawer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg> </label> <div class="md-header__title" data-md-component="header-title"> <div class="md-header__ellipsis"> <div class="md-header__topic"> <span class="md-ellipsis"> FreeType-2.12.0 API Reference </span> </div> <div class="md-header__topic" data-md-component="header-topic"> <span class="md-ellipsis"> Parameter Tags </span> </div> </div> </div> <label class="md-header__button md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> </label> <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required> <label class="md-search__icon md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </label> <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg> </button> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" data-md-scrollfix> <div class="md-search-result" data-md-component="search-result"> <div class="md-search-result__meta"> Initializing search </div> <ol class="md-search-result__list"></ol> </div> </div> </div> </div> </div> </nav> </header> <div class="md-container" data-md-component="container"> <main class="md-main" data-md-component="main"> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <label class="md-nav__title" for="__drawer"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> FreeType-2.12.0 API Reference </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="index.html" class="md-nav__link"> TOC </a> </li> <li class="md-nav__item"> <a href="ft2-index.html" class="md-nav__link"> Index </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" > <label class="md-nav__link" for="__nav_3"> General Remarks <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="General Remarks" data-md-level="1"> <label class="md-nav__title" for="__nav_3"> <span class="md-nav__icon md-icon"></span> General Remarks </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-preamble.html" class="md-nav__link"> Preamble </a> </li> <li class="md-nav__item"> <a href="ft2-header_inclusion.html" class="md-nav__link"> FreeType's header inclusion scheme </a> </li> <li class="md-nav__item"> <a href="ft2-user_allocation.html" class="md-nav__link"> User allocation </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" > <label class="md-nav__link" for="__nav_4"> Core API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Core API" data-md-level="1"> <label class="md-nav__title" for="__nav_4"> <span class="md-nav__icon md-icon"></span> Core API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-version.html" class="md-nav__link"> FreeType Version </a> </li> <li class="md-nav__item"> <a href="ft2-basic_types.html" class="md-nav__link"> Basic Data Types </a> </li> <li class="md-nav__item"> <a href="ft2-base_interface.html" class="md-nav__link"> Base Interface </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_variants.html" class="md-nav__link"> Unicode Variation Sequences </a> </li> <li class="md-nav__item"> <a href="ft2-color_management.html" class="md-nav__link"> Glyph Color Management </a> </li> <li class="md-nav__item"> <a href="ft2-layer_management.html" class="md-nav__link"> Glyph Layer Management </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_management.html" class="md-nav__link"> Glyph Management </a> </li> <li class="md-nav__item"> <a href="ft2-mac_specific.html" class="md-nav__link"> Mac Specific Interface </a> </li> <li class="md-nav__item"> <a href="ft2-sizes_management.html" class="md-nav__link"> Size Management </a> </li> <li class="md-nav__item"> <a href="ft2-header_file_macros.html" class="md-nav__link"> Header File Macros </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" > <label class="md-nav__link" for="__nav_5"> Format-Specific API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Format-Specific API" data-md-level="1"> <label class="md-nav__title" for="__nav_5"> <span class="md-nav__icon md-icon"></span> Format-Specific API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-multiple_masters.html" class="md-nav__link"> Multiple Masters </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_tables.html" class="md-nav__link"> TrueType Tables </a> </li> <li class="md-nav__item"> <a href="ft2-type1_tables.html" class="md-nav__link"> Type 1 Tables </a> </li> <li class="md-nav__item"> <a href="ft2-sfnt_names.html" class="md-nav__link"> SFNT Names </a> </li> <li class="md-nav__item"> <a href="ft2-bdf_fonts.html" class="md-nav__link"> BDF and PCF Files </a> </li> <li class="md-nav__item"> <a href="ft2-cid_fonts.html" class="md-nav__link"> CID Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-pfr_fonts.html" class="md-nav__link"> PFR Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-winfnt_fonts.html" class="md-nav__link"> Window FNT Files </a> </li> <li class="md-nav__item"> <a href="ft2-svg_fonts.html" class="md-nav__link"> OpenType SVG Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-font_formats.html" class="md-nav__link"> Font Formats </a> </li> <li class="md-nav__item"> <a href="ft2-gasp_table.html" class="md-nav__link"> Gasp Table </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--active md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" checked> <label class="md-nav__link" for="__nav_6"> Controlling FreeType Modules <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Controlling FreeType Modules" data-md-level="1"> <label class="md-nav__title" for="__nav_6"> <span class="md-nav__icon md-icon"></span> Controlling FreeType Modules </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-auto_hinter.html" class="md-nav__link"> The auto-hinter </a> </li> <li class="md-nav__item"> <a href="ft2-cff_driver.html" class="md-nav__link"> The CFF driver </a> </li> <li class="md-nav__item"> <a href="ft2-t1_cid_driver.html" class="md-nav__link"> The Type 1 and CID drivers </a> </li> <li class="md-nav__item"> <a href="ft2-tt_driver.html" class="md-nav__link"> The TrueType driver </a> </li> <li class="md-nav__item"> <a href="ft2-pcf_driver.html" class="md-nav__link"> The PCF driver </a> </li> <li class="md-nav__item"> <a href="ft2-ot_svg_driver.html" class="md-nav__link"> The SVG driver </a> </li> <li class="md-nav__item"> <a href="ft2-properties.html" class="md-nav__link"> Driver properties </a> </li> <li class="md-nav__item md-nav__item--active"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <label class="md-nav__link md-nav__link--active" for="__toc"> Parameter Tags <span class="md-nav__icon md-icon"></span> </label> <a href="ft2-parameter_tags.html" class="md-nav__link md-nav__link--active"> Parameter Tags </a> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_param_tag_ignore_typographic_family" class="md-nav__link"> FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY </a> </li> <li class="md-nav__item"> <a href="#ft_param_tag_ignore_typographic_subfamily" class="md-nav__link"> FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY </a> </li> <li class="md-nav__item"> <a href="#ft_param_tag_incremental" class="md-nav__link"> FT_PARAM_TAG_INCREMENTAL </a> </li> <li class="md-nav__item"> <a href="#ft_param_tag_ignore_sbix" class="md-nav__link"> FT_PARAM_TAG_IGNORE_SBIX </a> </li> <li class="md-nav__item"> <a href="#ft_param_tag_lcd_filter_weights" class="md-nav__link"> FT_PARAM_TAG_LCD_FILTER_WEIGHTS </a> </li> <li class="md-nav__item"> <a href="#ft_param_tag_random_seed" class="md-nav__link"> FT_PARAM_TAG_RANDOM_SEED </a> </li> <li class="md-nav__item"> <a href="#ft_param_tag_stem_darkening" class="md-nav__link"> FT_PARAM_TAG_STEM_DARKENING </a> </li> <li class="md-nav__item"> <a href="#ft_param_tag_unpatented_hinting" class="md-nav__link"> FT_PARAM_TAG_UNPATENTED_HINTING </a> </li> </ul> </nav> </li> <li class="md-nav__item"> <a href="ft2-lcd_rendering.html" class="md-nav__link"> Subpixel Rendering </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" > <label class="md-nav__link" for="__nav_7"> Cache Sub-System <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1"> <label class="md-nav__title" for="__nav_7"> <span class="md-nav__icon md-icon"></span> Cache Sub-System </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-cache_subsystem.html" class="md-nav__link"> Cache Sub-System </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" > <label class="md-nav__link" for="__nav_8"> Support API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Support API" data-md-level="1"> <label class="md-nav__title" for="__nav_8"> <span class="md-nav__icon md-icon"></span> Support API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-computations.html" class="md-nav__link"> Computations </a> </li> <li class="md-nav__item"> <a href="ft2-list_processing.html" class="md-nav__link"> List Processing </a> </li> <li class="md-nav__item"> <a href="ft2-outline_processing.html" class="md-nav__link"> Outline Processing </a> </li> <li class="md-nav__item"> <a href="ft2-quick_advance.html" class="md-nav__link"> Quick retrieval of advance values </a> </li> <li class="md-nav__item"> <a href="ft2-bitmap_handling.html" class="md-nav__link"> Bitmap Handling </a> </li> <li class="md-nav__item"> <a href="ft2-raster.html" class="md-nav__link"> Scanline Converter </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_stroker.html" class="md-nav__link"> Glyph Stroker </a> </li> <li class="md-nav__item"> <a href="ft2-system_interface.html" class="md-nav__link"> System Interface </a> </li> <li class="md-nav__item"> <a href="ft2-module_management.html" class="md-nav__link"> Module Management </a> </li> <li class="md-nav__item"> <a href="ft2-gzip.html" class="md-nav__link"> GZIP Streams </a> </li> <li class="md-nav__item"> <a href="ft2-lzw.html" class="md-nav__link"> LZW Streams </a> </li> <li class="md-nav__item"> <a href="ft2-bzip2.html" class="md-nav__link"> BZIP2 Streams </a> </li> <li class="md-nav__item"> <a href="ft2-debugging_apis.html" class="md-nav__link"> External Debugging APIs </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" > <label class="md-nav__link" for="__nav_9"> Error Codes <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Error Codes" data-md-level="1"> <label class="md-nav__title" for="__nav_9"> <span class="md-nav__icon md-icon"></span> Error Codes </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-error_enumerations.html" class="md-nav__link"> Error Enumerations </a> </li> <li class="md-nav__item"> <a href="ft2-error_code_values.html" class="md-nav__link"> Error Code Values </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" > <label class="md-nav__link" for="__nav_10"> Miscellaneous <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1"> <label class="md-nav__title" for="__nav_10"> <span class="md-nav__icon md-icon"></span> Miscellaneous </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-gx_validation.html" class="md-nav__link"> TrueTypeGX/AAT Validation </a> </li> <li class="md-nav__item"> <a href="ft2-incremental.html" class="md-nav__link"> Incremental Loading </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_engine.html" class="md-nav__link"> The TrueType Engine </a> </li> <li class="md-nav__item"> <a href="ft2-ot_validation.html" class="md-nav__link"> OpenType Validation </a> </li> </ul> </nav> </li> </ul> </nav> </div> </div> </div> <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_param_tag_ignore_typographic_family" class="md-nav__link"> FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY </a> </li> <li class="md-nav__item"> <a href="#ft_param_tag_ignore_typographic_subfamily" class="md-nav__link"> FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY </a> </li> <li class="md-nav__item"> <a href="#ft_param_tag_incremental" class="md-nav__link"> FT_PARAM_TAG_INCREMENTAL </a> </li> <li class="md-nav__item"> <a href="#ft_param_tag_ignore_sbix" class="md-nav__link"> FT_PARAM_TAG_IGNORE_SBIX </a> </li> <li class="md-nav__item"> <a href="#ft_param_tag_lcd_filter_weights" class="md-nav__link"> FT_PARAM_TAG_LCD_FILTER_WEIGHTS </a> </li> <li class="md-nav__item"> <a href="#ft_param_tag_random_seed" class="md-nav__link"> FT_PARAM_TAG_RANDOM_SEED </a> </li> <li class="md-nav__item"> <a href="#ft_param_tag_stem_darkening" class="md-nav__link"> FT_PARAM_TAG_STEM_DARKENING </a> </li> <li class="md-nav__item"> <a href="#ft_param_tag_unpatented_hinting" class="md-nav__link"> FT_PARAM_TAG_UNPATENTED_HINTING </a> </li> </ul> </nav> </div> </div> </div> <div class="md-content" data-md-component="content"> <article class="md-content__inner md-typeset"> <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; <a href="index.html#controlling-freetype-modules">Controlling FreeType Modules</a> &raquo; Parameter Tags</p> <hr /> <h1 id="parameter-tags">Parameter Tags<a class="headerlink" href="#parameter-tags" title="Permanent link">&para;</a></h1> <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2> <p>This section contains macros for the <code><a href="ft2-base_interface.html#ft_parameter">FT_Parameter</a></code> structure that are used with various functions to activate some special functionality or different behaviour of various components of FreeType.</p> <h2 id="ft_param_tag_ignore_typographic_family">FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY<a class="headerlink" href="#ft_param_tag_ignore_typographic_family" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY</b> \ <a href="ft2-basic_types.html#ft_make_tag">FT_MAKE_TAG</a>( 'i', 'g', 'p', 'f' ) /* this constant is deprecated */ #<span class="keyword">define</span> FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY \ <b>FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY</b> </code></pre></div> <p>A tag for <code><a href="ft2-base_interface.html#ft_parameter">FT_Parameter</a></code> to make <code><a href="ft2-base_interface.html#ft_open_face">FT_Open_Face</a></code> ignore typographic family names in the &lsquo;name&rsquo; table (introduced in OpenType version 1.4). Use this for backward compatibility with legacy systems that have a four-faces-per-family restriction.</p> <h4>since</h4> <p>2.8</p> <hr> <h2 id="ft_param_tag_ignore_typographic_subfamily">FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY<a class="headerlink" href="#ft_param_tag_ignore_typographic_subfamily" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY</b> \ <a href="ft2-basic_types.html#ft_make_tag">FT_MAKE_TAG</a>( 'i', 'g', 'p', 's' ) /* this constant is deprecated */ #<span class="keyword">define</span> FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY \ <b>FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY</b> </code></pre></div> <p>A tag for <code><a href="ft2-base_interface.html#ft_parameter">FT_Parameter</a></code> to make <code><a href="ft2-base_interface.html#ft_open_face">FT_Open_Face</a></code> ignore typographic subfamily names in the &lsquo;name&rsquo; table (introduced in OpenType version 1.4). Use this for backward compatibility with legacy systems that have a four-faces-per-family restriction.</p> <h4>since</h4> <p>2.8</p> <hr> <h2 id="ft_param_tag_incremental">FT_PARAM_TAG_INCREMENTAL<a class="headerlink" href="#ft_param_tag_incremental" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_PARAM_TAG_INCREMENTAL</b> \ <a href="ft2-basic_types.html#ft_make_tag">FT_MAKE_TAG</a>( 'i', 'n', 'c', 'r' ) </code></pre></div> <p>An <code><a href="ft2-base_interface.html#ft_parameter">FT_Parameter</a></code> tag to be used with <code><a href="ft2-base_interface.html#ft_open_face">FT_Open_Face</a></code> to indicate incremental glyph loading.</p> <hr> <h2 id="ft_param_tag_ignore_sbix">FT_PARAM_TAG_IGNORE_SBIX<a class="headerlink" href="#ft_param_tag_ignore_sbix" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_PARAM_TAG_IGNORE_SBIX</b> \ <a href="ft2-basic_types.html#ft_make_tag">FT_MAKE_TAG</a>( 'i', 's', 'b', 'x' ) </code></pre></div> <p>A tag for <code><a href="ft2-base_interface.html#ft_parameter">FT_Parameter</a></code> to make <code><a href="ft2-base_interface.html#ft_open_face">FT_Open_Face</a></code> ignore an &lsquo;sbix&rsquo; table while loading a font. Use this if <code><a href="ft2-base_interface.html#ft_face_flag_xxx">FT_FACE_FLAG_SBIX</a></code> is set and you want to access the outline glyphs in the font.</p> <hr> <h2 id="ft_param_tag_lcd_filter_weights">FT_PARAM_TAG_LCD_FILTER_WEIGHTS<a class="headerlink" href="#ft_param_tag_lcd_filter_weights" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_PARAM_TAG_LCD_FILTER_WEIGHTS</b> \ <a href="ft2-basic_types.html#ft_make_tag">FT_MAKE_TAG</a>( 'l', 'c', 'd', 'f' ) </code></pre></div> <p>An <code><a href="ft2-base_interface.html#ft_parameter">FT_Parameter</a></code> tag to be used with <code><a href="ft2-base_interface.html#ft_face_properties">FT_Face_Properties</a></code>. The corresponding argument specifies the five LCD filter weights for a given face (if using <code><a href="ft2-base_interface.html#ft_load_target_xxx">FT_LOAD_TARGET_LCD</a></code>, for example), overriding the global default values or the values set up with <code><a href="ft2-lcd_rendering.html#ft_library_setlcdfilterweights">FT_Library_SetLcdFilterWeights</a></code>.</p> <h4>since</h4> <p>2.8</p> <hr> <h2 id="ft_param_tag_random_seed">FT_PARAM_TAG_RANDOM_SEED<a class="headerlink" href="#ft_param_tag_random_seed" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_PARAM_TAG_RANDOM_SEED</b> \ <a href="ft2-basic_types.html#ft_make_tag">FT_MAKE_TAG</a>( 's', 'e', 'e', 'd' ) </code></pre></div> <p>An <code><a href="ft2-base_interface.html#ft_parameter">FT_Parameter</a></code> tag to be used with <code><a href="ft2-base_interface.html#ft_face_properties">FT_Face_Properties</a></code>. The corresponding 32bit signed integer argument overrides the font driver's random seed value with a face-specific one; see <code><a href="ft2-properties.html#random-seed">random-seed</a></code>.</p> <h4>since</h4> <p>2.8</p> <hr> <h2 id="ft_param_tag_stem_darkening">FT_PARAM_TAG_STEM_DARKENING<a class="headerlink" href="#ft_param_tag_stem_darkening" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_PARAM_TAG_STEM_DARKENING</b> \ <a href="ft2-basic_types.html#ft_make_tag">FT_MAKE_TAG</a>( 'd', 'a', 'r', 'k' ) </code></pre></div> <p>An <code><a href="ft2-base_interface.html#ft_parameter">FT_Parameter</a></code> tag to be used with <code><a href="ft2-base_interface.html#ft_face_properties">FT_Face_Properties</a></code>. The corresponding Boolean argument specifies whether to apply stem darkening, overriding the global default values or the values set up with <code><a href="ft2-module_management.html#ft_property_set">FT_Property_Set</a></code> (see <code><a href="ft2-properties.html#no-stem-darkening">no-stem-darkening</a></code>).</p> <p>This is a passive setting that only takes effect if the font driver or autohinter honors it, which the CFF, Type&nbsp;1, and CID drivers always do, but the autohinter only in &lsquo;light&rsquo; hinting mode (as of version 2.9).</p> <h4>since</h4> <p>2.8</p> <hr> <h2 id="ft_param_tag_unpatented_hinting">FT_PARAM_TAG_UNPATENTED_HINTING<a class="headerlink" href="#ft_param_tag_unpatented_hinting" title="Permanent link">&para;</a></h2> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_PARAM_TAG_UNPATENTED_HINTING</b> \ <a href="ft2-basic_types.html#ft_make_tag">FT_MAKE_TAG</a>( 'u', 'n', 'p', 'a' ) </code></pre></div> <p>Deprecated, no effect.</p> <p>Previously: A constant used as the tag of an <code><a href="ft2-base_interface.html#ft_parameter">FT_Parameter</a></code> structure to indicate that unpatented methods only should be used by the TrueType bytecode interpreter for a typeface opened by <code><a href="ft2-base_interface.html#ft_open_face">FT_Open_Face</a></code>.</p> <hr> </article> </div> </div> </main> <footer class="md-footer"> <nav class="md-footer__inner md-grid" aria-label="Footer"> <a href="ft2-properties.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: Driver properties" rel="prev"> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Previous </span> Driver properties </div> </div> </a> <a href="ft2-lcd_rendering.html" class="md-footer__link md-footer__link--next" aria-label="Next: Subpixel Rendering" rel="next"> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Next </span> Subpixel Rendering </div> </div> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg> </div> </a> </nav> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-footer-copyright"> <div class="md-footer-copyright__highlight"> Copyright 2022 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>. </div> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"base": ".", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "assets/javascripts/workers/search.477d984a.min.js", "version": null}</script> <script src="assets/javascripts/bundle.82b56eb2.min.js"></script> <script src="javascripts/extra.js"></script> </body> </html>
whupdup/frame
real/third_party/freetype-2.12.0/docs/reference/ft2-parameter_tags.html
HTML
gpl-3.0
36,718
<!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="description" content="API Reference Documentation for FreeType-2.12.0"> <meta name="author" content="FreeType Contributors"> <link rel="icon" href="images/favico.ico"> <meta name="generator" content="mkdocs-1.2.1, mkdocs-material-7.1.9"> <title>The PCF driver - FreeType-2.12.0 API Reference</title> <link rel="stylesheet" href="assets/stylesheets/main.ca7ac06f.min.css"> <link rel="stylesheet" href="assets/stylesheets/palette.f1a3b89f.min.css"> <meta name="theme-color" content="#4cae4f"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback"> <style>:root{--md-text-font-family:"Noto Serif";--md-code-font-family:"Roboto Mono"}</style> <link rel="stylesheet" href="stylesheets/extra.css"> </head> <body dir="ltr" data-md-color-scheme="" data-md-color-primary="green" data-md-color-accent="green"> <script>function __prefix(e){return new URL(".",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <label class="md-overlay" for="__drawer"></label> <div data-md-component="skip"> <a href="#the-pcf-driver" class="md-skip"> Skip to content </a> </div> <div data-md-component="announce"> </div> <header class="md-header" data-md-component="header"> <nav class="md-header__inner md-grid" aria-label="Header"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> <label class="md-header__button md-icon" for="__drawer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg> </label> <div class="md-header__title" data-md-component="header-title"> <div class="md-header__ellipsis"> <div class="md-header__topic"> <span class="md-ellipsis"> FreeType-2.12.0 API Reference </span> </div> <div class="md-header__topic" data-md-component="header-topic"> <span class="md-ellipsis"> The PCF driver </span> </div> </div> </div> <label class="md-header__button md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> </label> <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required> <label class="md-search__icon md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </label> <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg> </button> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" data-md-scrollfix> <div class="md-search-result" data-md-component="search-result"> <div class="md-search-result__meta"> Initializing search </div> <ol class="md-search-result__list"></ol> </div> </div> </div> </div> </div> </nav> </header> <div class="md-container" data-md-component="container"> <main class="md-main" data-md-component="main"> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <label class="md-nav__title" for="__drawer"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> FreeType-2.12.0 API Reference </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="index.html" class="md-nav__link"> TOC </a> </li> <li class="md-nav__item"> <a href="ft2-index.html" class="md-nav__link"> Index </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" > <label class="md-nav__link" for="__nav_3"> General Remarks <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="General Remarks" data-md-level="1"> <label class="md-nav__title" for="__nav_3"> <span class="md-nav__icon md-icon"></span> General Remarks </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-preamble.html" class="md-nav__link"> Preamble </a> </li> <li class="md-nav__item"> <a href="ft2-header_inclusion.html" class="md-nav__link"> FreeType's header inclusion scheme </a> </li> <li class="md-nav__item"> <a href="ft2-user_allocation.html" class="md-nav__link"> User allocation </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" > <label class="md-nav__link" for="__nav_4"> Core API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Core API" data-md-level="1"> <label class="md-nav__title" for="__nav_4"> <span class="md-nav__icon md-icon"></span> Core API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-version.html" class="md-nav__link"> FreeType Version </a> </li> <li class="md-nav__item"> <a href="ft2-basic_types.html" class="md-nav__link"> Basic Data Types </a> </li> <li class="md-nav__item"> <a href="ft2-base_interface.html" class="md-nav__link"> Base Interface </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_variants.html" class="md-nav__link"> Unicode Variation Sequences </a> </li> <li class="md-nav__item"> <a href="ft2-color_management.html" class="md-nav__link"> Glyph Color Management </a> </li> <li class="md-nav__item"> <a href="ft2-layer_management.html" class="md-nav__link"> Glyph Layer Management </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_management.html" class="md-nav__link"> Glyph Management </a> </li> <li class="md-nav__item"> <a href="ft2-mac_specific.html" class="md-nav__link"> Mac Specific Interface </a> </li> <li class="md-nav__item"> <a href="ft2-sizes_management.html" class="md-nav__link"> Size Management </a> </li> <li class="md-nav__item"> <a href="ft2-header_file_macros.html" class="md-nav__link"> Header File Macros </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" > <label class="md-nav__link" for="__nav_5"> Format-Specific API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Format-Specific API" data-md-level="1"> <label class="md-nav__title" for="__nav_5"> <span class="md-nav__icon md-icon"></span> Format-Specific API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-multiple_masters.html" class="md-nav__link"> Multiple Masters </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_tables.html" class="md-nav__link"> TrueType Tables </a> </li> <li class="md-nav__item"> <a href="ft2-type1_tables.html" class="md-nav__link"> Type 1 Tables </a> </li> <li class="md-nav__item"> <a href="ft2-sfnt_names.html" class="md-nav__link"> SFNT Names </a> </li> <li class="md-nav__item"> <a href="ft2-bdf_fonts.html" class="md-nav__link"> BDF and PCF Files </a> </li> <li class="md-nav__item"> <a href="ft2-cid_fonts.html" class="md-nav__link"> CID Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-pfr_fonts.html" class="md-nav__link"> PFR Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-winfnt_fonts.html" class="md-nav__link"> Window FNT Files </a> </li> <li class="md-nav__item"> <a href="ft2-svg_fonts.html" class="md-nav__link"> OpenType SVG Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-font_formats.html" class="md-nav__link"> Font Formats </a> </li> <li class="md-nav__item"> <a href="ft2-gasp_table.html" class="md-nav__link"> Gasp Table </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--active md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" checked> <label class="md-nav__link" for="__nav_6"> Controlling FreeType Modules <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Controlling FreeType Modules" data-md-level="1"> <label class="md-nav__title" for="__nav_6"> <span class="md-nav__icon md-icon"></span> Controlling FreeType Modules </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-auto_hinter.html" class="md-nav__link"> The auto-hinter </a> </li> <li class="md-nav__item"> <a href="ft2-cff_driver.html" class="md-nav__link"> The CFF driver </a> </li> <li class="md-nav__item"> <a href="ft2-t1_cid_driver.html" class="md-nav__link"> The Type 1 and CID drivers </a> </li> <li class="md-nav__item"> <a href="ft2-tt_driver.html" class="md-nav__link"> The TrueType driver </a> </li> <li class="md-nav__item md-nav__item--active"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <label class="md-nav__link md-nav__link--active" for="__toc"> The PCF driver <span class="md-nav__icon md-icon"></span> </label> <a href="ft2-pcf_driver.html" class="md-nav__link md-nav__link--active"> The PCF driver </a> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> </ul> </nav> </li> <li class="md-nav__item"> <a href="ft2-ot_svg_driver.html" class="md-nav__link"> The SVG driver </a> </li> <li class="md-nav__item"> <a href="ft2-properties.html" class="md-nav__link"> Driver properties </a> </li> <li class="md-nav__item"> <a href="ft2-parameter_tags.html" class="md-nav__link"> Parameter Tags </a> </li> <li class="md-nav__item"> <a href="ft2-lcd_rendering.html" class="md-nav__link"> Subpixel Rendering </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" > <label class="md-nav__link" for="__nav_7"> Cache Sub-System <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1"> <label class="md-nav__title" for="__nav_7"> <span class="md-nav__icon md-icon"></span> Cache Sub-System </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-cache_subsystem.html" class="md-nav__link"> Cache Sub-System </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" > <label class="md-nav__link" for="__nav_8"> Support API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Support API" data-md-level="1"> <label class="md-nav__title" for="__nav_8"> <span class="md-nav__icon md-icon"></span> Support API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-computations.html" class="md-nav__link"> Computations </a> </li> <li class="md-nav__item"> <a href="ft2-list_processing.html" class="md-nav__link"> List Processing </a> </li> <li class="md-nav__item"> <a href="ft2-outline_processing.html" class="md-nav__link"> Outline Processing </a> </li> <li class="md-nav__item"> <a href="ft2-quick_advance.html" class="md-nav__link"> Quick retrieval of advance values </a> </li> <li class="md-nav__item"> <a href="ft2-bitmap_handling.html" class="md-nav__link"> Bitmap Handling </a> </li> <li class="md-nav__item"> <a href="ft2-raster.html" class="md-nav__link"> Scanline Converter </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_stroker.html" class="md-nav__link"> Glyph Stroker </a> </li> <li class="md-nav__item"> <a href="ft2-system_interface.html" class="md-nav__link"> System Interface </a> </li> <li class="md-nav__item"> <a href="ft2-module_management.html" class="md-nav__link"> Module Management </a> </li> <li class="md-nav__item"> <a href="ft2-gzip.html" class="md-nav__link"> GZIP Streams </a> </li> <li class="md-nav__item"> <a href="ft2-lzw.html" class="md-nav__link"> LZW Streams </a> </li> <li class="md-nav__item"> <a href="ft2-bzip2.html" class="md-nav__link"> BZIP2 Streams </a> </li> <li class="md-nav__item"> <a href="ft2-debugging_apis.html" class="md-nav__link"> External Debugging APIs </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" > <label class="md-nav__link" for="__nav_9"> Error Codes <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Error Codes" data-md-level="1"> <label class="md-nav__title" for="__nav_9"> <span class="md-nav__icon md-icon"></span> Error Codes </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-error_enumerations.html" class="md-nav__link"> Error Enumerations </a> </li> <li class="md-nav__item"> <a href="ft2-error_code_values.html" class="md-nav__link"> Error Code Values </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" > <label class="md-nav__link" for="__nav_10"> Miscellaneous <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1"> <label class="md-nav__title" for="__nav_10"> <span class="md-nav__icon md-icon"></span> Miscellaneous </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-gx_validation.html" class="md-nav__link"> TrueTypeGX/AAT Validation </a> </li> <li class="md-nav__item"> <a href="ft2-incremental.html" class="md-nav__link"> Incremental Loading </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_engine.html" class="md-nav__link"> The TrueType Engine </a> </li> <li class="md-nav__item"> <a href="ft2-ot_validation.html" class="md-nav__link"> OpenType Validation </a> </li> </ul> </nav> </li> </ul> </nav> </div> </div> </div> <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> </ul> </nav> </div> </div> </div> <div class="md-content" data-md-component="content"> <article class="md-content__inner md-typeset"> <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; <a href="index.html#controlling-freetype-modules">Controlling FreeType Modules</a> &raquo; The PCF driver</p> <hr /> <h1 id="the-pcf-driver">The PCF driver<a class="headerlink" href="#the-pcf-driver" title="Permanent link">&para;</a></h1> <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2> <p>While FreeType's PCF driver doesn't expose API functions by itself, it is possible to control its behaviour with <code><a href="ft2-module_management.html#ft_property_set">FT_Property_Set</a></code> and <code><a href="ft2-module_management.html#ft_property_get">FT_Property_Get</a></code>. Right now, there is a single property <code><a href="ft2-properties.html#no-long-family-names">no-long-family-names</a></code> available if FreeType is compiled with PCF_CONFIG_OPTION_LONG_FAMILY_NAMES.</p> <p>The PCF driver's module name is &lsquo;pcf&rsquo;.</p> </article> </div> </div> </main> <footer class="md-footer"> <nav class="md-footer__inner md-grid" aria-label="Footer"> <a href="ft2-tt_driver.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: The TrueType driver" rel="prev"> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Previous </span> The TrueType driver </div> </div> </a> <a href="ft2-ot_svg_driver.html" class="md-footer__link md-footer__link--next" aria-label="Next: The SVG driver" rel="next"> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Next </span> The SVG driver </div> </div> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg> </div> </a> </nav> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-footer-copyright"> <div class="md-footer-copyright__highlight"> Copyright 2022 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>. </div> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"base": ".", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "assets/javascripts/workers/search.477d984a.min.js", "version": null}</script> <script src="assets/javascripts/bundle.82b56eb2.min.js"></script> <script src="javascripts/extra.js"></script> </body> </html>
whupdup/frame
real/third_party/freetype-2.12.0/docs/reference/ft2-pcf_driver.html
HTML
gpl-3.0
27,315
<!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="description" content="API Reference Documentation for FreeType-2.12.0"> <meta name="author" content="FreeType Contributors"> <link rel="icon" href="images/favico.ico"> <meta name="generator" content="mkdocs-1.2.1, mkdocs-material-7.1.9"> <title>PFR Fonts - FreeType-2.12.0 API Reference</title> <link rel="stylesheet" href="assets/stylesheets/main.ca7ac06f.min.css"> <link rel="stylesheet" href="assets/stylesheets/palette.f1a3b89f.min.css"> <meta name="theme-color" content="#4cae4f"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback"> <style>:root{--md-text-font-family:"Noto Serif";--md-code-font-family:"Roboto Mono"}</style> <link rel="stylesheet" href="stylesheets/extra.css"> </head> <body dir="ltr" data-md-color-scheme="" data-md-color-primary="green" data-md-color-accent="green"> <script>function __prefix(e){return new URL(".",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <label class="md-overlay" for="__drawer"></label> <div data-md-component="skip"> <a href="#pfr-fonts" class="md-skip"> Skip to content </a> </div> <div data-md-component="announce"> </div> <header class="md-header" data-md-component="header"> <nav class="md-header__inner md-grid" aria-label="Header"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> <label class="md-header__button md-icon" for="__drawer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg> </label> <div class="md-header__title" data-md-component="header-title"> <div class="md-header__ellipsis"> <div class="md-header__topic"> <span class="md-ellipsis"> FreeType-2.12.0 API Reference </span> </div> <div class="md-header__topic" data-md-component="header-topic"> <span class="md-ellipsis"> PFR Fonts </span> </div> </div> </div> <label class="md-header__button md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> </label> <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required> <label class="md-search__icon md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </label> <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg> </button> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" data-md-scrollfix> <div class="md-search-result" data-md-component="search-result"> <div class="md-search-result__meta"> Initializing search </div> <ol class="md-search-result__list"></ol> </div> </div> </div> </div> </div> </nav> </header> <div class="md-container" data-md-component="container"> <main class="md-main" data-md-component="main"> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <label class="md-nav__title" for="__drawer"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> FreeType-2.12.0 API Reference </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="index.html" class="md-nav__link"> TOC </a> </li> <li class="md-nav__item"> <a href="ft2-index.html" class="md-nav__link"> Index </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" > <label class="md-nav__link" for="__nav_3"> General Remarks <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="General Remarks" data-md-level="1"> <label class="md-nav__title" for="__nav_3"> <span class="md-nav__icon md-icon"></span> General Remarks </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-preamble.html" class="md-nav__link"> Preamble </a> </li> <li class="md-nav__item"> <a href="ft2-header_inclusion.html" class="md-nav__link"> FreeType's header inclusion scheme </a> </li> <li class="md-nav__item"> <a href="ft2-user_allocation.html" class="md-nav__link"> User allocation </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" > <label class="md-nav__link" for="__nav_4"> Core API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Core API" data-md-level="1"> <label class="md-nav__title" for="__nav_4"> <span class="md-nav__icon md-icon"></span> Core API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-version.html" class="md-nav__link"> FreeType Version </a> </li> <li class="md-nav__item"> <a href="ft2-basic_types.html" class="md-nav__link"> Basic Data Types </a> </li> <li class="md-nav__item"> <a href="ft2-base_interface.html" class="md-nav__link"> Base Interface </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_variants.html" class="md-nav__link"> Unicode Variation Sequences </a> </li> <li class="md-nav__item"> <a href="ft2-color_management.html" class="md-nav__link"> Glyph Color Management </a> </li> <li class="md-nav__item"> <a href="ft2-layer_management.html" class="md-nav__link"> Glyph Layer Management </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_management.html" class="md-nav__link"> Glyph Management </a> </li> <li class="md-nav__item"> <a href="ft2-mac_specific.html" class="md-nav__link"> Mac Specific Interface </a> </li> <li class="md-nav__item"> <a href="ft2-sizes_management.html" class="md-nav__link"> Size Management </a> </li> <li class="md-nav__item"> <a href="ft2-header_file_macros.html" class="md-nav__link"> Header File Macros </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--active md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" checked> <label class="md-nav__link" for="__nav_5"> Format-Specific API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Format-Specific API" data-md-level="1"> <label class="md-nav__title" for="__nav_5"> <span class="md-nav__icon md-icon"></span> Format-Specific API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-multiple_masters.html" class="md-nav__link"> Multiple Masters </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_tables.html" class="md-nav__link"> TrueType Tables </a> </li> <li class="md-nav__item"> <a href="ft2-type1_tables.html" class="md-nav__link"> Type 1 Tables </a> </li> <li class="md-nav__item"> <a href="ft2-sfnt_names.html" class="md-nav__link"> SFNT Names </a> </li> <li class="md-nav__item"> <a href="ft2-bdf_fonts.html" class="md-nav__link"> BDF and PCF Files </a> </li> <li class="md-nav__item"> <a href="ft2-cid_fonts.html" class="md-nav__link"> CID Fonts </a> </li> <li class="md-nav__item md-nav__item--active"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <label class="md-nav__link md-nav__link--active" for="__toc"> PFR Fonts <span class="md-nav__icon md-icon"></span> </label> <a href="ft2-pfr_fonts.html" class="md-nav__link md-nav__link--active"> PFR Fonts </a> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_get_pfr_metrics" class="md-nav__link"> FT_Get_PFR_Metrics </a> </li> <li class="md-nav__item"> <a href="#ft_get_pfr_kerning" class="md-nav__link"> FT_Get_PFR_Kerning </a> </li> <li class="md-nav__item"> <a href="#ft_get_pfr_advance" class="md-nav__link"> FT_Get_PFR_Advance </a> </li> </ul> </nav> </li> <li class="md-nav__item"> <a href="ft2-winfnt_fonts.html" class="md-nav__link"> Window FNT Files </a> </li> <li class="md-nav__item"> <a href="ft2-svg_fonts.html" class="md-nav__link"> OpenType SVG Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-font_formats.html" class="md-nav__link"> Font Formats </a> </li> <li class="md-nav__item"> <a href="ft2-gasp_table.html" class="md-nav__link"> Gasp Table </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" > <label class="md-nav__link" for="__nav_6"> Controlling FreeType Modules <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Controlling FreeType Modules" data-md-level="1"> <label class="md-nav__title" for="__nav_6"> <span class="md-nav__icon md-icon"></span> Controlling FreeType Modules </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-auto_hinter.html" class="md-nav__link"> The auto-hinter </a> </li> <li class="md-nav__item"> <a href="ft2-cff_driver.html" class="md-nav__link"> The CFF driver </a> </li> <li class="md-nav__item"> <a href="ft2-t1_cid_driver.html" class="md-nav__link"> The Type 1 and CID drivers </a> </li> <li class="md-nav__item"> <a href="ft2-tt_driver.html" class="md-nav__link"> The TrueType driver </a> </li> <li class="md-nav__item"> <a href="ft2-pcf_driver.html" class="md-nav__link"> The PCF driver </a> </li> <li class="md-nav__item"> <a href="ft2-ot_svg_driver.html" class="md-nav__link"> The SVG driver </a> </li> <li class="md-nav__item"> <a href="ft2-properties.html" class="md-nav__link"> Driver properties </a> </li> <li class="md-nav__item"> <a href="ft2-parameter_tags.html" class="md-nav__link"> Parameter Tags </a> </li> <li class="md-nav__item"> <a href="ft2-lcd_rendering.html" class="md-nav__link"> Subpixel Rendering </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" > <label class="md-nav__link" for="__nav_7"> Cache Sub-System <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1"> <label class="md-nav__title" for="__nav_7"> <span class="md-nav__icon md-icon"></span> Cache Sub-System </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-cache_subsystem.html" class="md-nav__link"> Cache Sub-System </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" > <label class="md-nav__link" for="__nav_8"> Support API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Support API" data-md-level="1"> <label class="md-nav__title" for="__nav_8"> <span class="md-nav__icon md-icon"></span> Support API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-computations.html" class="md-nav__link"> Computations </a> </li> <li class="md-nav__item"> <a href="ft2-list_processing.html" class="md-nav__link"> List Processing </a> </li> <li class="md-nav__item"> <a href="ft2-outline_processing.html" class="md-nav__link"> Outline Processing </a> </li> <li class="md-nav__item"> <a href="ft2-quick_advance.html" class="md-nav__link"> Quick retrieval of advance values </a> </li> <li class="md-nav__item"> <a href="ft2-bitmap_handling.html" class="md-nav__link"> Bitmap Handling </a> </li> <li class="md-nav__item"> <a href="ft2-raster.html" class="md-nav__link"> Scanline Converter </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_stroker.html" class="md-nav__link"> Glyph Stroker </a> </li> <li class="md-nav__item"> <a href="ft2-system_interface.html" class="md-nav__link"> System Interface </a> </li> <li class="md-nav__item"> <a href="ft2-module_management.html" class="md-nav__link"> Module Management </a> </li> <li class="md-nav__item"> <a href="ft2-gzip.html" class="md-nav__link"> GZIP Streams </a> </li> <li class="md-nav__item"> <a href="ft2-lzw.html" class="md-nav__link"> LZW Streams </a> </li> <li class="md-nav__item"> <a href="ft2-bzip2.html" class="md-nav__link"> BZIP2 Streams </a> </li> <li class="md-nav__item"> <a href="ft2-debugging_apis.html" class="md-nav__link"> External Debugging APIs </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" > <label class="md-nav__link" for="__nav_9"> Error Codes <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Error Codes" data-md-level="1"> <label class="md-nav__title" for="__nav_9"> <span class="md-nav__icon md-icon"></span> Error Codes </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-error_enumerations.html" class="md-nav__link"> Error Enumerations </a> </li> <li class="md-nav__item"> <a href="ft2-error_code_values.html" class="md-nav__link"> Error Code Values </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" > <label class="md-nav__link" for="__nav_10"> Miscellaneous <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1"> <label class="md-nav__title" for="__nav_10"> <span class="md-nav__icon md-icon"></span> Miscellaneous </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-gx_validation.html" class="md-nav__link"> TrueTypeGX/AAT Validation </a> </li> <li class="md-nav__item"> <a href="ft2-incremental.html" class="md-nav__link"> Incremental Loading </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_engine.html" class="md-nav__link"> The TrueType Engine </a> </li> <li class="md-nav__item"> <a href="ft2-ot_validation.html" class="md-nav__link"> OpenType Validation </a> </li> </ul> </nav> </li> </ul> </nav> </div> </div> </div> <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_get_pfr_metrics" class="md-nav__link"> FT_Get_PFR_Metrics </a> </li> <li class="md-nav__item"> <a href="#ft_get_pfr_kerning" class="md-nav__link"> FT_Get_PFR_Kerning </a> </li> <li class="md-nav__item"> <a href="#ft_get_pfr_advance" class="md-nav__link"> FT_Get_PFR_Advance </a> </li> </ul> </nav> </div> </div> </div> <div class="md-content" data-md-component="content"> <article class="md-content__inner md-typeset"> <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; <a href="index.html#format-specific-api">Format-Specific API</a> &raquo; PFR Fonts</p> <hr /> <h1 id="pfr-fonts">PFR Fonts<a class="headerlink" href="#pfr-fonts" title="Permanent link">&para;</a></h1> <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2> <p>This section contains the declaration of PFR-specific functions.</p> <h2 id="ft_get_pfr_metrics">FT_Get_PFR_Metrics<a class="headerlink" href="#ft_get_pfr_metrics" title="Permanent link">&para;</a></h2> <p>Defined in FT_PFR_H (freetype/ftpfr.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Get_PFR_Metrics</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a> face, <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> *aoutline_resolution, <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> *ametrics_resolution, <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a> *ametrics_x_scale, <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a> *ametrics_y_scale ); </code></pre></div> <p>Return the outline and metrics resolutions of a given PFR face.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="face">face</td><td class="desc"> <p>Handle to the input face. It can be a non-PFR face.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="aoutline_resolution">aoutline_resolution</td><td class="desc"> <p>Outline resolution. This is equivalent to <code>face-&gt;units_per_EM</code> for non-PFR fonts. Optional (parameter can be <code>NULL</code>).</p> </td></tr> <tr><td class="val" id="ametrics_resolution">ametrics_resolution</td><td class="desc"> <p>Metrics resolution. This is equivalent to <code>outline_resolution</code> for non-PFR fonts. Optional (parameter can be <code>NULL</code>).</p> </td></tr> <tr><td class="val" id="ametrics_x_scale">ametrics_x_scale</td><td class="desc"> <p>A 16.16 fixed-point number used to scale distance expressed in metrics units to device subpixels. This is equivalent to <code>face-&gt;size-&gt;x_scale</code>, but for metrics only. Optional (parameter can be <code>NULL</code>).</p> </td></tr> <tr><td class="val" id="ametrics_y_scale">ametrics_y_scale</td><td class="desc"> <p>Same as <code>ametrics_x_scale</code> but for the vertical direction. optional (parameter can be <code>NULL</code>).</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>If the input face is not a PFR, this function will return an error. However, in all cases, it will return valid values.</p> <hr> <h2 id="ft_get_pfr_kerning">FT_Get_PFR_Kerning<a class="headerlink" href="#ft_get_pfr_kerning" title="Permanent link">&para;</a></h2> <p>Defined in FT_PFR_H (freetype/ftpfr.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Get_PFR_Kerning</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a> face, <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> left, <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> right, <a href="ft2-basic_types.html#ft_vector">FT_Vector</a> *avector ); </code></pre></div> <p>Return the kerning pair corresponding to two glyphs in a PFR face. The distance is expressed in metrics units, unlike the result of <code><a href="ft2-base_interface.html#ft_get_kerning">FT_Get_Kerning</a></code>.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="face">face</td><td class="desc"> <p>A handle to the input face.</p> </td></tr> <tr><td class="val" id="left">left</td><td class="desc"> <p>Index of the left glyph.</p> </td></tr> <tr><td class="val" id="right">right</td><td class="desc"> <p>Index of the right glyph.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="avector">avector</td><td class="desc"> <p>A kerning vector.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>This function always return distances in original PFR metrics units. This is unlike <code><a href="ft2-base_interface.html#ft_get_kerning">FT_Get_Kerning</a></code> with the <code><a href="ft2-base_interface.html#ft_kerning_mode">FT_KERNING_UNSCALED</a></code> mode, which always returns distances converted to outline units.</p> <p>You can use the value of the <code>x_scale</code> and <code>y_scale</code> parameters returned by <code><a href="ft2-pfr_fonts.html#ft_get_pfr_metrics">FT_Get_PFR_Metrics</a></code> to scale these to device subpixels.</p> <hr> <h2 id="ft_get_pfr_advance">FT_Get_PFR_Advance<a class="headerlink" href="#ft_get_pfr_advance" title="Permanent link">&para;</a></h2> <p>Defined in FT_PFR_H (freetype/ftpfr.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Get_PFR_Advance</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a> face, <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> gindex, <a href="ft2-basic_types.html#ft_pos">FT_Pos</a> *aadvance ); </code></pre></div> <p>Return a given glyph advance, expressed in original metrics units, from a PFR font.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="face">face</td><td class="desc"> <p>A handle to the input face.</p> </td></tr> <tr><td class="val" id="gindex">gindex</td><td class="desc"> <p>The glyph index.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="aadvance">aadvance</td><td class="desc"> <p>The glyph advance in metrics units.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>You can use the <code>x_scale</code> or <code>y_scale</code> results of <code><a href="ft2-pfr_fonts.html#ft_get_pfr_metrics">FT_Get_PFR_Metrics</a></code> to convert the advance to device subpixels (i.e., 1/64<sup>th</sup> of pixels).</p> <hr> </article> </div> </div> </main> <footer class="md-footer"> <nav class="md-footer__inner md-grid" aria-label="Footer"> <a href="ft2-cid_fonts.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: CID Fonts" rel="prev"> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Previous </span> CID Fonts </div> </div> </a> <a href="ft2-winfnt_fonts.html" class="md-footer__link md-footer__link--next" aria-label="Next: Window FNT Files" rel="next"> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Next </span> Window FNT Files </div> </div> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg> </div> </a> </nav> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-footer-copyright"> <div class="md-footer-copyright__highlight"> Copyright 2022 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>. </div> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"base": ".", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "assets/javascripts/workers/search.477d984a.min.js", "version": null}</script> <script src="assets/javascripts/bundle.82b56eb2.min.js"></script> <script src="javascripts/extra.js"></script> </body> </html>
whupdup/frame
real/third_party/freetype-2.12.0/docs/reference/ft2-pfr_fonts.html
HTML
gpl-3.0
33,319
<!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="description" content="API Reference Documentation for FreeType-2.12.0"> <meta name="author" content="FreeType Contributors"> <link rel="icon" href="images/favico.ico"> <meta name="generator" content="mkdocs-1.2.1, mkdocs-material-7.1.9"> <title>Preamble - FreeType-2.12.0 API Reference</title> <link rel="stylesheet" href="assets/stylesheets/main.ca7ac06f.min.css"> <link rel="stylesheet" href="assets/stylesheets/palette.f1a3b89f.min.css"> <meta name="theme-color" content="#4cae4f"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback"> <style>:root{--md-text-font-family:"Noto Serif";--md-code-font-family:"Roboto Mono"}</style> <link rel="stylesheet" href="stylesheets/extra.css"> </head> <body dir="ltr" data-md-color-scheme="" data-md-color-primary="green" data-md-color-accent="green"> <script>function __prefix(e){return new URL(".",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <label class="md-overlay" for="__drawer"></label> <div data-md-component="skip"> <a href="#preamble" class="md-skip"> Skip to content </a> </div> <div data-md-component="announce"> </div> <header class="md-header" data-md-component="header"> <nav class="md-header__inner md-grid" aria-label="Header"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> <label class="md-header__button md-icon" for="__drawer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg> </label> <div class="md-header__title" data-md-component="header-title"> <div class="md-header__ellipsis"> <div class="md-header__topic"> <span class="md-ellipsis"> FreeType-2.12.0 API Reference </span> </div> <div class="md-header__topic" data-md-component="header-topic"> <span class="md-ellipsis"> Preamble </span> </div> </div> </div> <label class="md-header__button md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> </label> <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required> <label class="md-search__icon md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </label> <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg> </button> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" data-md-scrollfix> <div class="md-search-result" data-md-component="search-result"> <div class="md-search-result__meta"> Initializing search </div> <ol class="md-search-result__list"></ol> </div> </div> </div> </div> </div> </nav> </header> <div class="md-container" data-md-component="container"> <main class="md-main" data-md-component="main"> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <label class="md-nav__title" for="__drawer"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> FreeType-2.12.0 API Reference </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="index.html" class="md-nav__link"> TOC </a> </li> <li class="md-nav__item"> <a href="ft2-index.html" class="md-nav__link"> Index </a> </li> <li class="md-nav__item md-nav__item--active md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" checked> <label class="md-nav__link" for="__nav_3"> General Remarks <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="General Remarks" data-md-level="1"> <label class="md-nav__title" for="__nav_3"> <span class="md-nav__icon md-icon"></span> General Remarks </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item md-nav__item--active"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <label class="md-nav__link md-nav__link--active" for="__toc"> Preamble <span class="md-nav__icon md-icon"></span> </label> <a href="ft2-preamble.html" class="md-nav__link md-nav__link--active"> Preamble </a> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> </ul> </nav> </li> <li class="md-nav__item"> <a href="ft2-header_inclusion.html" class="md-nav__link"> FreeType's header inclusion scheme </a> </li> <li class="md-nav__item"> <a href="ft2-user_allocation.html" class="md-nav__link"> User allocation </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" > <label class="md-nav__link" for="__nav_4"> Core API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Core API" data-md-level="1"> <label class="md-nav__title" for="__nav_4"> <span class="md-nav__icon md-icon"></span> Core API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-version.html" class="md-nav__link"> FreeType Version </a> </li> <li class="md-nav__item"> <a href="ft2-basic_types.html" class="md-nav__link"> Basic Data Types </a> </li> <li class="md-nav__item"> <a href="ft2-base_interface.html" class="md-nav__link"> Base Interface </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_variants.html" class="md-nav__link"> Unicode Variation Sequences </a> </li> <li class="md-nav__item"> <a href="ft2-color_management.html" class="md-nav__link"> Glyph Color Management </a> </li> <li class="md-nav__item"> <a href="ft2-layer_management.html" class="md-nav__link"> Glyph Layer Management </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_management.html" class="md-nav__link"> Glyph Management </a> </li> <li class="md-nav__item"> <a href="ft2-mac_specific.html" class="md-nav__link"> Mac Specific Interface </a> </li> <li class="md-nav__item"> <a href="ft2-sizes_management.html" class="md-nav__link"> Size Management </a> </li> <li class="md-nav__item"> <a href="ft2-header_file_macros.html" class="md-nav__link"> Header File Macros </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" > <label class="md-nav__link" for="__nav_5"> Format-Specific API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Format-Specific API" data-md-level="1"> <label class="md-nav__title" for="__nav_5"> <span class="md-nav__icon md-icon"></span> Format-Specific API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-multiple_masters.html" class="md-nav__link"> Multiple Masters </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_tables.html" class="md-nav__link"> TrueType Tables </a> </li> <li class="md-nav__item"> <a href="ft2-type1_tables.html" class="md-nav__link"> Type 1 Tables </a> </li> <li class="md-nav__item"> <a href="ft2-sfnt_names.html" class="md-nav__link"> SFNT Names </a> </li> <li class="md-nav__item"> <a href="ft2-bdf_fonts.html" class="md-nav__link"> BDF and PCF Files </a> </li> <li class="md-nav__item"> <a href="ft2-cid_fonts.html" class="md-nav__link"> CID Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-pfr_fonts.html" class="md-nav__link"> PFR Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-winfnt_fonts.html" class="md-nav__link"> Window FNT Files </a> </li> <li class="md-nav__item"> <a href="ft2-svg_fonts.html" class="md-nav__link"> OpenType SVG Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-font_formats.html" class="md-nav__link"> Font Formats </a> </li> <li class="md-nav__item"> <a href="ft2-gasp_table.html" class="md-nav__link"> Gasp Table </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" > <label class="md-nav__link" for="__nav_6"> Controlling FreeType Modules <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Controlling FreeType Modules" data-md-level="1"> <label class="md-nav__title" for="__nav_6"> <span class="md-nav__icon md-icon"></span> Controlling FreeType Modules </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-auto_hinter.html" class="md-nav__link"> The auto-hinter </a> </li> <li class="md-nav__item"> <a href="ft2-cff_driver.html" class="md-nav__link"> The CFF driver </a> </li> <li class="md-nav__item"> <a href="ft2-t1_cid_driver.html" class="md-nav__link"> The Type 1 and CID drivers </a> </li> <li class="md-nav__item"> <a href="ft2-tt_driver.html" class="md-nav__link"> The TrueType driver </a> </li> <li class="md-nav__item"> <a href="ft2-pcf_driver.html" class="md-nav__link"> The PCF driver </a> </li> <li class="md-nav__item"> <a href="ft2-ot_svg_driver.html" class="md-nav__link"> The SVG driver </a> </li> <li class="md-nav__item"> <a href="ft2-properties.html" class="md-nav__link"> Driver properties </a> </li> <li class="md-nav__item"> <a href="ft2-parameter_tags.html" class="md-nav__link"> Parameter Tags </a> </li> <li class="md-nav__item"> <a href="ft2-lcd_rendering.html" class="md-nav__link"> Subpixel Rendering </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" > <label class="md-nav__link" for="__nav_7"> Cache Sub-System <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1"> <label class="md-nav__title" for="__nav_7"> <span class="md-nav__icon md-icon"></span> Cache Sub-System </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-cache_subsystem.html" class="md-nav__link"> Cache Sub-System </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" > <label class="md-nav__link" for="__nav_8"> Support API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Support API" data-md-level="1"> <label class="md-nav__title" for="__nav_8"> <span class="md-nav__icon md-icon"></span> Support API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-computations.html" class="md-nav__link"> Computations </a> </li> <li class="md-nav__item"> <a href="ft2-list_processing.html" class="md-nav__link"> List Processing </a> </li> <li class="md-nav__item"> <a href="ft2-outline_processing.html" class="md-nav__link"> Outline Processing </a> </li> <li class="md-nav__item"> <a href="ft2-quick_advance.html" class="md-nav__link"> Quick retrieval of advance values </a> </li> <li class="md-nav__item"> <a href="ft2-bitmap_handling.html" class="md-nav__link"> Bitmap Handling </a> </li> <li class="md-nav__item"> <a href="ft2-raster.html" class="md-nav__link"> Scanline Converter </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_stroker.html" class="md-nav__link"> Glyph Stroker </a> </li> <li class="md-nav__item"> <a href="ft2-system_interface.html" class="md-nav__link"> System Interface </a> </li> <li class="md-nav__item"> <a href="ft2-module_management.html" class="md-nav__link"> Module Management </a> </li> <li class="md-nav__item"> <a href="ft2-gzip.html" class="md-nav__link"> GZIP Streams </a> </li> <li class="md-nav__item"> <a href="ft2-lzw.html" class="md-nav__link"> LZW Streams </a> </li> <li class="md-nav__item"> <a href="ft2-bzip2.html" class="md-nav__link"> BZIP2 Streams </a> </li> <li class="md-nav__item"> <a href="ft2-debugging_apis.html" class="md-nav__link"> External Debugging APIs </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" > <label class="md-nav__link" for="__nav_9"> Error Codes <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Error Codes" data-md-level="1"> <label class="md-nav__title" for="__nav_9"> <span class="md-nav__icon md-icon"></span> Error Codes </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-error_enumerations.html" class="md-nav__link"> Error Enumerations </a> </li> <li class="md-nav__item"> <a href="ft2-error_code_values.html" class="md-nav__link"> Error Code Values </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" > <label class="md-nav__link" for="__nav_10"> Miscellaneous <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1"> <label class="md-nav__title" for="__nav_10"> <span class="md-nav__icon md-icon"></span> Miscellaneous </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-gx_validation.html" class="md-nav__link"> TrueTypeGX/AAT Validation </a> </li> <li class="md-nav__item"> <a href="ft2-incremental.html" class="md-nav__link"> Incremental Loading </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_engine.html" class="md-nav__link"> The TrueType Engine </a> </li> <li class="md-nav__item"> <a href="ft2-ot_validation.html" class="md-nav__link"> OpenType Validation </a> </li> </ul> </nav> </li> </ul> </nav> </div> </div> </div> <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> </ul> </nav> </div> </div> </div> <div class="md-content" data-md-component="content"> <article class="md-content__inner md-typeset"> <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; <a href="index.html#general-remarks">General Remarks</a> &raquo; Preamble</p> <hr /> <h1 id="preamble">Preamble<a class="headerlink" href="#preamble" title="Permanent link">&para;</a></h1> <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2> <p>FreeType is a library that provides access to glyphs in font files. It scales the glyph images and their metrics to a requested size, and it rasterizes the glyph images to produce pixel or subpixel alpha coverage bitmaps.</p> <p>Note that FreeType is <em>not</em> a text layout engine. You have to use higher-level libraries like HarfBuzz, Pango, or ICU for that.</p> <p>Note also that FreeType does <em>not</em> perform alpha blending or compositing the resulting bitmaps or pixmaps by itself. Use your favourite graphics library (for example, Cairo or Skia) to further process FreeType's output.</p> </article> </div> </div> </main> <footer class="md-footer"> <nav class="md-footer__inner md-grid" aria-label="Footer"> <a href="ft2-index.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: Index" rel="prev"> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Previous </span> Index </div> </div> </a> <a href="ft2-header_inclusion.html" class="md-footer__link md-footer__link--next" aria-label="Next: FreeType&#39;s header inclusion scheme" rel="next"> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Next </span> FreeType's header inclusion scheme </div> </div> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg> </div> </a> </nav> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-footer-copyright"> <div class="md-footer-copyright__highlight"> Copyright 2022 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>. </div> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"base": ".", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "assets/javascripts/workers/search.477d984a.min.js", "version": null}</script> <script src="assets/javascripts/bundle.82b56eb2.min.js"></script> <script src="javascripts/extra.js"></script> </body> </html>
whupdup/frame
real/third_party/freetype-2.12.0/docs/reference/ft2-preamble.html
HTML
gpl-3.0
27,303
<!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="description" content="API Reference Documentation for FreeType-2.12.0"> <meta name="author" content="FreeType Contributors"> <link rel="icon" href="images/favico.ico"> <meta name="generator" content="mkdocs-1.2.1, mkdocs-material-7.1.9"> <title>Driver properties - FreeType-2.12.0 API Reference</title> <link rel="stylesheet" href="assets/stylesheets/main.ca7ac06f.min.css"> <link rel="stylesheet" href="assets/stylesheets/palette.f1a3b89f.min.css"> <meta name="theme-color" content="#4cae4f"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback"> <style>:root{--md-text-font-family:"Noto Serif";--md-code-font-family:"Roboto Mono"}</style> <link rel="stylesheet" href="stylesheets/extra.css"> </head> <body dir="ltr" data-md-color-scheme="" data-md-color-primary="green" data-md-color-accent="green"> <script>function __prefix(e){return new URL(".",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <label class="md-overlay" for="__drawer"></label> <div data-md-component="skip"> <a href="#driver-properties" class="md-skip"> Skip to content </a> </div> <div data-md-component="announce"> </div> <header class="md-header" data-md-component="header"> <nav class="md-header__inner md-grid" aria-label="Header"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> <label class="md-header__button md-icon" for="__drawer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg> </label> <div class="md-header__title" data-md-component="header-title"> <div class="md-header__ellipsis"> <div class="md-header__topic"> <span class="md-ellipsis"> FreeType-2.12.0 API Reference </span> </div> <div class="md-header__topic" data-md-component="header-topic"> <span class="md-ellipsis"> Driver properties </span> </div> </div> </div> <label class="md-header__button md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> </label> <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required> <label class="md-search__icon md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </label> <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg> </button> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" data-md-scrollfix> <div class="md-search-result" data-md-component="search-result"> <div class="md-search-result__meta"> Initializing search </div> <ol class="md-search-result__list"></ol> </div> </div> </div> </div> </div> </nav> </header> <div class="md-container" data-md-component="container"> <main class="md-main" data-md-component="main"> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <label class="md-nav__title" for="__drawer"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> FreeType-2.12.0 API Reference </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="index.html" class="md-nav__link"> TOC </a> </li> <li class="md-nav__item"> <a href="ft2-index.html" class="md-nav__link"> Index </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" > <label class="md-nav__link" for="__nav_3"> General Remarks <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="General Remarks" data-md-level="1"> <label class="md-nav__title" for="__nav_3"> <span class="md-nav__icon md-icon"></span> General Remarks </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-preamble.html" class="md-nav__link"> Preamble </a> </li> <li class="md-nav__item"> <a href="ft2-header_inclusion.html" class="md-nav__link"> FreeType's header inclusion scheme </a> </li> <li class="md-nav__item"> <a href="ft2-user_allocation.html" class="md-nav__link"> User allocation </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" > <label class="md-nav__link" for="__nav_4"> Core API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Core API" data-md-level="1"> <label class="md-nav__title" for="__nav_4"> <span class="md-nav__icon md-icon"></span> Core API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-version.html" class="md-nav__link"> FreeType Version </a> </li> <li class="md-nav__item"> <a href="ft2-basic_types.html" class="md-nav__link"> Basic Data Types </a> </li> <li class="md-nav__item"> <a href="ft2-base_interface.html" class="md-nav__link"> Base Interface </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_variants.html" class="md-nav__link"> Unicode Variation Sequences </a> </li> <li class="md-nav__item"> <a href="ft2-color_management.html" class="md-nav__link"> Glyph Color Management </a> </li> <li class="md-nav__item"> <a href="ft2-layer_management.html" class="md-nav__link"> Glyph Layer Management </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_management.html" class="md-nav__link"> Glyph Management </a> </li> <li class="md-nav__item"> <a href="ft2-mac_specific.html" class="md-nav__link"> Mac Specific Interface </a> </li> <li class="md-nav__item"> <a href="ft2-sizes_management.html" class="md-nav__link"> Size Management </a> </li> <li class="md-nav__item"> <a href="ft2-header_file_macros.html" class="md-nav__link"> Header File Macros </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" > <label class="md-nav__link" for="__nav_5"> Format-Specific API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Format-Specific API" data-md-level="1"> <label class="md-nav__title" for="__nav_5"> <span class="md-nav__icon md-icon"></span> Format-Specific API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-multiple_masters.html" class="md-nav__link"> Multiple Masters </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_tables.html" class="md-nav__link"> TrueType Tables </a> </li> <li class="md-nav__item"> <a href="ft2-type1_tables.html" class="md-nav__link"> Type 1 Tables </a> </li> <li class="md-nav__item"> <a href="ft2-sfnt_names.html" class="md-nav__link"> SFNT Names </a> </li> <li class="md-nav__item"> <a href="ft2-bdf_fonts.html" class="md-nav__link"> BDF and PCF Files </a> </li> <li class="md-nav__item"> <a href="ft2-cid_fonts.html" class="md-nav__link"> CID Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-pfr_fonts.html" class="md-nav__link"> PFR Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-winfnt_fonts.html" class="md-nav__link"> Window FNT Files </a> </li> <li class="md-nav__item"> <a href="ft2-svg_fonts.html" class="md-nav__link"> OpenType SVG Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-font_formats.html" class="md-nav__link"> Font Formats </a> </li> <li class="md-nav__item"> <a href="ft2-gasp_table.html" class="md-nav__link"> Gasp Table </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--active md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" checked> <label class="md-nav__link" for="__nav_6"> Controlling FreeType Modules <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Controlling FreeType Modules" data-md-level="1"> <label class="md-nav__title" for="__nav_6"> <span class="md-nav__icon md-icon"></span> Controlling FreeType Modules </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-auto_hinter.html" class="md-nav__link"> The auto-hinter </a> </li> <li class="md-nav__item"> <a href="ft2-cff_driver.html" class="md-nav__link"> The CFF driver </a> </li> <li class="md-nav__item"> <a href="ft2-t1_cid_driver.html" class="md-nav__link"> The Type 1 and CID drivers </a> </li> <li class="md-nav__item"> <a href="ft2-tt_driver.html" class="md-nav__link"> The TrueType driver </a> </li> <li class="md-nav__item"> <a href="ft2-pcf_driver.html" class="md-nav__link"> The PCF driver </a> </li> <li class="md-nav__item"> <a href="ft2-ot_svg_driver.html" class="md-nav__link"> The SVG driver </a> </li> <li class="md-nav__item md-nav__item--active"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <label class="md-nav__link md-nav__link--active" for="__toc"> Driver properties <span class="md-nav__icon md-icon"></span> </label> <a href="ft2-properties.html" class="md-nav__link md-nav__link--active"> Driver properties </a> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_hinting_xxx" class="md-nav__link"> FT_HINTING_XXX </a> </li> <li class="md-nav__item"> <a href="#hinting-engine" class="md-nav__link"> hinting-engine </a> </li> <li class="md-nav__item"> <a href="#no-stem-darkening" class="md-nav__link"> no-stem-darkening </a> </li> <li class="md-nav__item"> <a href="#darkening-parameters" class="md-nav__link"> darkening-parameters </a> </li> <li class="md-nav__item"> <a href="#random-seed" class="md-nav__link"> random-seed </a> </li> <li class="md-nav__item"> <a href="#no-long-family-names" class="md-nav__link"> no-long-family-names </a> </li> <li class="md-nav__item"> <a href="#tt_interpreter_version_xxx" class="md-nav__link"> TT_INTERPRETER_VERSION_XXX </a> </li> <li class="md-nav__item"> <a href="#interpreter-version" class="md-nav__link"> interpreter-version </a> </li> <li class="md-nav__item"> <a href="#svg-hooks" class="md-nav__link"> svg-hooks </a> </li> <li class="md-nav__item"> <a href="#glyph-to-script-map" class="md-nav__link"> glyph-to-script-map </a> </li> <li class="md-nav__item"> <a href="#ft_autohinter_script_xxx" class="md-nav__link"> FT_AUTOHINTER_SCRIPT_XXX </a> </li> <li class="md-nav__item"> <a href="#ft_prop_glyphtoscriptmap" class="md-nav__link"> FT_Prop_GlyphToScriptMap </a> </li> <li class="md-nav__item"> <a href="#fallback-script" class="md-nav__link"> fallback-script </a> </li> <li class="md-nav__item"> <a href="#default-script" class="md-nav__link"> default-script </a> </li> <li class="md-nav__item"> <a href="#increase-x-height" class="md-nav__link"> increase-x-height </a> </li> <li class="md-nav__item"> <a href="#ft_prop_increasexheight" class="md-nav__link"> FT_Prop_IncreaseXHeight </a> </li> <li class="md-nav__item"> <a href="#warping" class="md-nav__link"> warping </a> </li> </ul> </nav> </li> <li class="md-nav__item"> <a href="ft2-parameter_tags.html" class="md-nav__link"> Parameter Tags </a> </li> <li class="md-nav__item"> <a href="ft2-lcd_rendering.html" class="md-nav__link"> Subpixel Rendering </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" > <label class="md-nav__link" for="__nav_7"> Cache Sub-System <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1"> <label class="md-nav__title" for="__nav_7"> <span class="md-nav__icon md-icon"></span> Cache Sub-System </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-cache_subsystem.html" class="md-nav__link"> Cache Sub-System </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" > <label class="md-nav__link" for="__nav_8"> Support API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Support API" data-md-level="1"> <label class="md-nav__title" for="__nav_8"> <span class="md-nav__icon md-icon"></span> Support API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-computations.html" class="md-nav__link"> Computations </a> </li> <li class="md-nav__item"> <a href="ft2-list_processing.html" class="md-nav__link"> List Processing </a> </li> <li class="md-nav__item"> <a href="ft2-outline_processing.html" class="md-nav__link"> Outline Processing </a> </li> <li class="md-nav__item"> <a href="ft2-quick_advance.html" class="md-nav__link"> Quick retrieval of advance values </a> </li> <li class="md-nav__item"> <a href="ft2-bitmap_handling.html" class="md-nav__link"> Bitmap Handling </a> </li> <li class="md-nav__item"> <a href="ft2-raster.html" class="md-nav__link"> Scanline Converter </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_stroker.html" class="md-nav__link"> Glyph Stroker </a> </li> <li class="md-nav__item"> <a href="ft2-system_interface.html" class="md-nav__link"> System Interface </a> </li> <li class="md-nav__item"> <a href="ft2-module_management.html" class="md-nav__link"> Module Management </a> </li> <li class="md-nav__item"> <a href="ft2-gzip.html" class="md-nav__link"> GZIP Streams </a> </li> <li class="md-nav__item"> <a href="ft2-lzw.html" class="md-nav__link"> LZW Streams </a> </li> <li class="md-nav__item"> <a href="ft2-bzip2.html" class="md-nav__link"> BZIP2 Streams </a> </li> <li class="md-nav__item"> <a href="ft2-debugging_apis.html" class="md-nav__link"> External Debugging APIs </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" > <label class="md-nav__link" for="__nav_9"> Error Codes <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Error Codes" data-md-level="1"> <label class="md-nav__title" for="__nav_9"> <span class="md-nav__icon md-icon"></span> Error Codes </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-error_enumerations.html" class="md-nav__link"> Error Enumerations </a> </li> <li class="md-nav__item"> <a href="ft2-error_code_values.html" class="md-nav__link"> Error Code Values </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" > <label class="md-nav__link" for="__nav_10"> Miscellaneous <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1"> <label class="md-nav__title" for="__nav_10"> <span class="md-nav__icon md-icon"></span> Miscellaneous </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-gx_validation.html" class="md-nav__link"> TrueTypeGX/AAT Validation </a> </li> <li class="md-nav__item"> <a href="ft2-incremental.html" class="md-nav__link"> Incremental Loading </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_engine.html" class="md-nav__link"> The TrueType Engine </a> </li> <li class="md-nav__item"> <a href="ft2-ot_validation.html" class="md-nav__link"> OpenType Validation </a> </li> </ul> </nav> </li> </ul> </nav> </div> </div> </div> <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_hinting_xxx" class="md-nav__link"> FT_HINTING_XXX </a> </li> <li class="md-nav__item"> <a href="#hinting-engine" class="md-nav__link"> hinting-engine </a> </li> <li class="md-nav__item"> <a href="#no-stem-darkening" class="md-nav__link"> no-stem-darkening </a> </li> <li class="md-nav__item"> <a href="#darkening-parameters" class="md-nav__link"> darkening-parameters </a> </li> <li class="md-nav__item"> <a href="#random-seed" class="md-nav__link"> random-seed </a> </li> <li class="md-nav__item"> <a href="#no-long-family-names" class="md-nav__link"> no-long-family-names </a> </li> <li class="md-nav__item"> <a href="#tt_interpreter_version_xxx" class="md-nav__link"> TT_INTERPRETER_VERSION_XXX </a> </li> <li class="md-nav__item"> <a href="#interpreter-version" class="md-nav__link"> interpreter-version </a> </li> <li class="md-nav__item"> <a href="#svg-hooks" class="md-nav__link"> svg-hooks </a> </li> <li class="md-nav__item"> <a href="#glyph-to-script-map" class="md-nav__link"> glyph-to-script-map </a> </li> <li class="md-nav__item"> <a href="#ft_autohinter_script_xxx" class="md-nav__link"> FT_AUTOHINTER_SCRIPT_XXX </a> </li> <li class="md-nav__item"> <a href="#ft_prop_glyphtoscriptmap" class="md-nav__link"> FT_Prop_GlyphToScriptMap </a> </li> <li class="md-nav__item"> <a href="#fallback-script" class="md-nav__link"> fallback-script </a> </li> <li class="md-nav__item"> <a href="#default-script" class="md-nav__link"> default-script </a> </li> <li class="md-nav__item"> <a href="#increase-x-height" class="md-nav__link"> increase-x-height </a> </li> <li class="md-nav__item"> <a href="#ft_prop_increasexheight" class="md-nav__link"> FT_Prop_IncreaseXHeight </a> </li> <li class="md-nav__item"> <a href="#warping" class="md-nav__link"> warping </a> </li> </ul> </nav> </div> </div> </div> <div class="md-content" data-md-component="content"> <article class="md-content__inner md-typeset"> <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; <a href="index.html#controlling-freetype-modules">Controlling FreeType Modules</a> &raquo; Driver properties</p> <hr /> <h1 id="driver-properties">Driver properties<a class="headerlink" href="#driver-properties" title="Permanent link">&para;</a></h1> <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2> <p>Driver modules can be controlled by setting and unsetting properties, using the functions <code><a href="ft2-module_management.html#ft_property_set">FT_Property_Set</a></code> and <code><a href="ft2-module_management.html#ft_property_get">FT_Property_Get</a></code>. This section documents the available properties, together with auxiliary macros and structures.</p> <h2 id="ft_hinting_xxx">FT_HINTING_XXX<a class="headerlink" href="#ft_hinting_xxx" title="Permanent link">&para;</a></h2> <p>Defined in FT_DRIVER_H (freetype/ftdriver.h).</p> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <a href="ft2-properties.html#ft_hinting_freetype">FT_HINTING_FREETYPE</a> 0 #<span class="keyword">define</span> <a href="ft2-properties.html#ft_hinting_adobe">FT_HINTING_ADOBE</a> 1 /* these constants (introduced in 2.4.12) are deprecated */ #<span class="keyword">define</span> FT_CFF_HINTING_FREETYPE <a href="ft2-properties.html#ft_hinting_freetype">FT_HINTING_FREETYPE</a> #<span class="keyword">define</span> FT_CFF_HINTING_ADOBE <a href="ft2-properties.html#ft_hinting_adobe">FT_HINTING_ADOBE</a> </code></pre></div> <p>A list of constants used for the <code><a href="ft2-properties.html#hinting-engine">hinting-engine</a></code> property to select the hinting engine for CFF, Type&nbsp;1, and CID fonts.</p> <h4>values</h4> <table class="fields"> <tr><td class="val" id="ft_hinting_freetype">FT_HINTING_FREETYPE</td><td class="desc"> <p>Use the old FreeType hinting engine.</p> </td></tr> <tr><td class="val" id="ft_hinting_adobe">FT_HINTING_ADOBE</td><td class="desc"> <p>Use the hinting engine contributed by Adobe.</p> </td></tr> </table> <h4>since</h4> <p>2.9</p> <hr> <h2 id="hinting-engine">hinting-engine<a class="headerlink" href="#hinting-engine" title="Permanent link">&para;</a></h2> <p>Thanks to Adobe, which contributed a new hinting (and parsing) engine, an application can select between &lsquo;freetype&rsquo; and &lsquo;adobe&rsquo; if compiled with <code>CFF_CONFIG_OPTION_OLD_ENGINE</code>. If this configuration macro isn't defined, &lsquo;hinting-engine&rsquo; does nothing.</p> <p>The same holds for the Type&nbsp;1 and CID modules if compiled with <code>T1_CONFIG_OPTION_OLD_ENGINE</code>.</p> <p>For the &lsquo;cff&rsquo; module, the default engine is &lsquo;adobe&rsquo;. For both the &lsquo;type1&rsquo; and &lsquo;t1cid&rsquo; modules, the default engine is &lsquo;adobe&rsquo;, too.</p> <h4>note</h4> <p>This property can be used with <code><a href="ft2-module_management.html#ft_property_get">FT_Property_Get</a></code> also.</p> <p>This property can be set via the <code>FREETYPE_PROPERTIES</code> environment variable (using values &lsquo;adobe&rsquo; or &lsquo;freetype&rsquo;).</p> <h4>example</h4> <p>The following example code demonstrates how to select Adobe's hinting engine for the &lsquo;cff&rsquo; module (omitting the error handling). <div class="highlight"><pre><span></span><code> FT_Library library; FT_UInt hinting_engine = FT_HINTING_ADOBE; FT_Init_FreeType( &amp;library ); FT_Property_Set( library, &quot;cff&quot;, &quot;hinting-engine&quot;, &amp;hinting_engine ); </code></pre></div></p> <h4>since</h4> <p>2.4.12 (for &lsquo;cff&rsquo; module)</p> <p>2.9 (for &lsquo;type1&rsquo; and &lsquo;t1cid&rsquo; modules)</p> <hr> <h2 id="no-stem-darkening">no-stem-darkening<a class="headerlink" href="#no-stem-darkening" title="Permanent link">&para;</a></h2> <p>All glyphs that pass through the auto-hinter will be emboldened unless this property is set to TRUE. The same is true for the CFF, Type&nbsp;1, and CID font modules if the &lsquo;Adobe&rsquo; engine is selected (which is the default).</p> <p>Stem darkening emboldens glyphs at smaller sizes to make them more readable on common low-DPI screens when using linear alpha blending and gamma correction, see <code><a href="ft2-base_interface.html#ft_render_glyph">FT_Render_Glyph</a></code>. When not using linear alpha blending and gamma correction, glyphs will appear heavy and fuzzy!</p> <p>Gamma correction essentially lightens fonts since shades of grey are shifted to higher pixel values (=&nbsp;higher brightness) to match the original intention to the reality of our screens. The side-effect is that glyphs &lsquo;thin out&rsquo;. Mac OS&nbsp;X and Adobe's proprietary font rendering library implement a counter-measure: stem darkening at smaller sizes where shades of gray dominate. By emboldening a glyph slightly in relation to its pixel size, individual pixels get higher coverage of filled-in outlines and are therefore &lsquo;blacker&rsquo;. This counteracts the &lsquo;thinning out&rsquo; of glyphs, making text remain readable at smaller sizes.</p> <p>For the auto-hinter, stem-darkening is experimental currently and thus switched off by default (this is, <code>no-stem-darkening</code> is set to TRUE by default). Total consistency with the CFF driver is not achieved right now because the emboldening method differs and glyphs must be scaled down on the Y-axis to keep outline points inside their precomputed blue zones. The smaller the size (especially 9ppem and down), the higher the loss of emboldening versus the CFF driver.</p> <p>Note that stem darkening is never applied if <code><a href="ft2-base_interface.html#ft_load_xxx">FT_LOAD_NO_SCALE</a></code> is set.</p> <h4>note</h4> <p>This property can be used with <code><a href="ft2-module_management.html#ft_property_get">FT_Property_Get</a></code> also.</p> <p>This property can be set via the <code>FREETYPE_PROPERTIES</code> environment variable (using values 1 and 0 for &lsquo;on&rsquo; and &lsquo;off&rsquo;, respectively). It can also be set per face using <code><a href="ft2-base_interface.html#ft_face_properties">FT_Face_Properties</a></code> with <code><a href="ft2-parameter_tags.html#ft_param_tag_stem_darkening">FT_PARAM_TAG_STEM_DARKENING</a></code>.</p> <h4>example</h4> <div class="highlight"><pre><span></span><code> FT_Library library; FT_Bool no_stem_darkening = TRUE; FT_Init_FreeType( &amp;library ); FT_Property_Set( library, &quot;cff&quot;, &quot;no-stem-darkening&quot;, &amp;no_stem_darkening ); </code></pre></div> <h4>since</h4> <p>2.4.12 (for &lsquo;cff&rsquo; module)</p> <p>2.6.2 (for &lsquo;autofitter&rsquo; module)</p> <p>2.9 (for &lsquo;type1&rsquo; and &lsquo;t1cid&rsquo; modules)</p> <hr> <h2 id="darkening-parameters">darkening-parameters<a class="headerlink" href="#darkening-parameters" title="Permanent link">&para;</a></h2> <p>By default, the Adobe hinting engine, as used by the CFF, Type&nbsp;1, and CID font drivers, darkens stems as follows (if the <code>no-stem-darkening</code> property isn't set): <div class="highlight"><pre><span></span><code> stem width &lt;= 0.5px: darkening amount = 0.4px stem width = 1px: darkening amount = 0.275px stem width = 1.667px: darkening amount = 0.275px stem width &gt;= 2.333px: darkening amount = 0px </code></pre></div></p> <p>and piecewise linear in-between. At configuration time, these four control points can be set with the macro <code>CFF_CONFIG_OPTION_DARKENING_PARAMETERS</code>; the CFF, Type&nbsp;1, and CID drivers share these values. At runtime, the control points can be changed using the <code>darkening-parameters</code> property (see the example below that demonstrates this for the Type&nbsp;1 driver).</p> <p>The x&nbsp;values give the stem width, and the y&nbsp;values the darkening amount. The unit is 1000<sup>th</sup> of pixels. All coordinate values must be positive; the x&nbsp;values must be monotonically increasing; the y&nbsp;values must be monotonically decreasing and smaller than or equal to 500 (corresponding to half a pixel); the slope of each linear piece must be shallower than -1 (e.g., -.4).</p> <p>The auto-hinter provides this property, too, as an experimental feature. See <code><a href="ft2-properties.html#no-stem-darkening">no-stem-darkening</a></code> for more.</p> <h4>note</h4> <p>This property can be used with <code><a href="ft2-module_management.html#ft_property_get">FT_Property_Get</a></code> also.</p> <p>This property can be set via the <code>FREETYPE_PROPERTIES</code> environment variable, using eight comma-separated integers without spaces. Here the above example, using <code>\</code> to break the line for readability. <div class="highlight"><pre><span></span><code> FREETYPE_PROPERTIES=\ type1:darkening-parameters=500,300,1000,200,1500,100,2000,0 </code></pre></div></p> <h4>example</h4> <div class="highlight"><pre><span></span><code> FT_Library library; FT_Int darken_params[8] = { 500, 300, // x1, y1 1000, 200, // x2, y2 1500, 100, // x3, y3 2000, 0 }; // x4, y4 FT_Init_FreeType( &amp;library ); FT_Property_Set( library, &quot;type1&quot;, &quot;darkening-parameters&quot;, darken_params ); </code></pre></div> <h4>since</h4> <p>2.5.1 (for &lsquo;cff&rsquo; module)</p> <p>2.6.2 (for &lsquo;autofitter&rsquo; module)</p> <p>2.9 (for &lsquo;type1&rsquo; and &lsquo;t1cid&rsquo; modules)</p> <hr> <h2 id="random-seed">random-seed<a class="headerlink" href="#random-seed" title="Permanent link">&para;</a></h2> <p>By default, the seed value for the CFF &lsquo;random&rsquo; operator and the similar &lsquo;0 28 callothersubr pop&rsquo; command for the Type&nbsp;1 and CID drivers is set to a random value. However, mainly for debugging purposes, it is often necessary to use a known value as a seed so that the pseudo-random number sequences generated by &lsquo;random&rsquo; are repeatable.</p> <p>The <code>random-seed</code> property does that. Its argument is a signed 32bit integer; if the value is zero or negative, the seed given by the <code>intitialRandomSeed</code> private DICT operator in a CFF file gets used (or a default value if there is no such operator). If the value is positive, use it instead of <code>initialRandomSeed</code>, which is consequently ignored.</p> <h4>note</h4> <p>This property can be set via the <code>FREETYPE_PROPERTIES</code> environment variable. It can also be set per face using <code><a href="ft2-base_interface.html#ft_face_properties">FT_Face_Properties</a></code> with <code><a href="ft2-parameter_tags.html#ft_param_tag_random_seed">FT_PARAM_TAG_RANDOM_SEED</a></code>.</p> <h4>since</h4> <p>2.8 (for &lsquo;cff&rsquo; module)</p> <p>2.9 (for &lsquo;type1&rsquo; and &lsquo;t1cid&rsquo; modules)</p> <hr> <h2 id="no-long-family-names">no-long-family-names<a class="headerlink" href="#no-long-family-names" title="Permanent link">&para;</a></h2> <p>If <code>PCF_CONFIG_OPTION_LONG_FAMILY_NAMES</code> is active while compiling FreeType, the PCF driver constructs long family names.</p> <p>There are many PCF fonts just called &lsquo;Fixed&rsquo; which look completely different, and which have nothing to do with each other. When selecting &lsquo;Fixed&rsquo; in KDE or Gnome one gets results that appear rather random, the style changes often if one changes the size and one cannot select some fonts at all. The improve this situation, the PCF module prepends the foundry name (plus a space) to the family name. It also checks whether there are &lsquo;wide&rsquo; characters; all put together, family names like &lsquo;Sony Fixed&rsquo; or &lsquo;Misc Fixed Wide&rsquo; are constructed.</p> <p>If <code>no-long-family-names</code> is set, this feature gets switched off.</p> <h4>note</h4> <p>This property can be used with <code><a href="ft2-module_management.html#ft_property_get">FT_Property_Get</a></code> also.</p> <p>This property can be set via the <code>FREETYPE_PROPERTIES</code> environment variable (using values 1 and 0 for &lsquo;on&rsquo; and &lsquo;off&rsquo;, respectively).</p> <h4>example</h4> <div class="highlight"><pre><span></span><code> FT_Library library; FT_Bool no_long_family_names = TRUE; FT_Init_FreeType( &amp;library ); FT_Property_Set( library, &quot;pcf&quot;, &quot;no-long-family-names&quot;, &amp;no_long_family_names ); </code></pre></div> <h4>since</h4> <p>2.8</p> <hr> <h2 id="tt_interpreter_version_xxx">TT_INTERPRETER_VERSION_XXX<a class="headerlink" href="#tt_interpreter_version_xxx" title="Permanent link">&para;</a></h2> <p>Defined in FT_DRIVER_H (freetype/ftdriver.h).</p> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <a href="ft2-properties.html#tt_interpreter_version_35">TT_INTERPRETER_VERSION_35</a> 35 #<span class="keyword">define</span> <a href="ft2-properties.html#tt_interpreter_version_38">TT_INTERPRETER_VERSION_38</a> 38 #<span class="keyword">define</span> <a href="ft2-properties.html#tt_interpreter_version_40">TT_INTERPRETER_VERSION_40</a> 40 </code></pre></div> <p>A list of constants used for the <code><a href="ft2-properties.html#interpreter-version">interpreter-version</a></code> property to select the hinting engine for Truetype fonts.</p> <p>The numeric value in the constant names represents the version number as returned by the &lsquo;GETINFO&rsquo; bytecode instruction.</p> <h4>values</h4> <table class="fields"> <tr><td class="val" id="tt_interpreter_version_35">TT_INTERPRETER_VERSION_35</td><td class="desc"> <p>Version&nbsp;35 corresponds to MS rasterizer v.1.7 as used e.g. in Windows&nbsp;98; only grayscale and B/W rasterizing is supported.</p> </td></tr> <tr><td class="val" id="tt_interpreter_version_38">TT_INTERPRETER_VERSION_38</td><td class="desc"> <p>Version&nbsp;38 corresponds to MS rasterizer v.1.9; it is roughly equivalent to the hinting provided by DirectWrite ClearType (as can be found, for example, in the Internet Explorer&nbsp;9 running on Windows&nbsp;7). It is used in FreeType to select the &lsquo;Infinality&rsquo; subpixel hinting code. The code may be removed in a future version.</p> </td></tr> <tr><td class="val" id="tt_interpreter_version_40">TT_INTERPRETER_VERSION_40</td><td class="desc"> <p>Version&nbsp;40 corresponds to MS rasterizer v.2.1; it is roughly equivalent to the hinting provided by DirectWrite ClearType (as can be found, for example, in Microsoft's Edge Browser on Windows&nbsp;10). It is used in FreeType to select the &lsquo;minimal&rsquo; subpixel hinting code, a stripped-down and higher performance version of the &lsquo;Infinality&rsquo; code.</p> </td></tr> </table> <h4>note</h4> <p>This property controls the behaviour of the bytecode interpreter and thus how outlines get hinted. It does <strong>not</strong> control how glyph get rasterized! In particular, it does not control subpixel color filtering.</p> <p>If FreeType has not been compiled with the configuration option <code>TT_CONFIG_OPTION_SUBPIXEL_HINTING</code>, selecting version&nbsp;38 or&nbsp;40 causes an <code>FT_Err_Unimplemented_Feature</code> error.</p> <p>Depending on the graphics framework, Microsoft uses different bytecode and rendering engines. As a consequence, the version numbers returned by a call to the &lsquo;GETINFO&rsquo; bytecode instruction are more convoluted than desired.</p> <p>Here are two tables that try to shed some light on the possible values for the MS rasterizer engine, together with the additional features introduced by it. <div class="highlight"><pre><span></span><code> GETINFO framework version feature ------------------------------------------------------------------- 3 GDI (Win 3.1), v1.0 16-bit, first version TrueImage 33 GDI (Win NT 3.1), v1.5 32-bit HP Laserjet 34 GDI (Win 95) v1.6 font smoothing, new SCANTYPE opcode 35 GDI (Win 98/2000) v1.7 (UN)SCALED_COMPONENT_OFFSET bits in composite glyphs 36 MGDI (Win CE 2) v1.6+ classic ClearType 37 GDI (XP and later), v1.8 ClearType GDI+ old (before Vista) 38 GDI+ old (Vista, Win 7), v1.9 subpixel ClearType, WPF Y-direction ClearType, additional error checking 39 DWrite (before Win 8) v2.0 subpixel ClearType flags in GETINFO opcode, bug fixes 40 GDI+ (after Win 7), v2.1 Y-direction ClearType flag DWrite (Win 8) in GETINFO opcode, Gray ClearType </code></pre></div></p> <p>The &lsquo;version&rsquo; field gives a rough orientation only, since some applications provided certain features much earlier (as an example, Microsoft Reader used subpixel and Y-direction ClearType already in Windows 2000). Similarly, updates to a given framework might include improved hinting support. <div class="highlight"><pre><span></span><code> version sampling rendering comment x y x y -------------------------------------------------------------- v1.0 normal normal B/W B/W bi-level v1.6 high high gray gray grayscale v1.8 high normal color-filter B/W (GDI) ClearType v1.9 high high color-filter gray Color ClearType v2.1 high normal gray B/W Gray ClearType v2.1 high high gray gray Gray ClearType </code></pre></div></p> <p>Color and Gray ClearType are the two available variants of &lsquo;Y-direction ClearType&rsquo;, meaning grayscale rasterization along the Y-direction; the name used in the TrueType specification for this feature is &lsquo;symmetric smoothing&rsquo;. &lsquo;Classic ClearType&rsquo; is the original algorithm used before introducing a modified version in Win&nbsp;XP. Another name for v1.6's grayscale rendering is &lsquo;font smoothing&rsquo;, and &lsquo;Color ClearType&rsquo; is sometimes also called &lsquo;DWrite ClearType&rsquo;. To differentiate between today's Color ClearType and the earlier ClearType variant with B/W rendering along the vertical axis, the latter is sometimes called &lsquo;GDI ClearType&rsquo;.</p> <p>&lsquo;Normal&rsquo; and &lsquo;high&rsquo; sampling describe the (virtual) resolution to access the rasterized outline after the hinting process. &lsquo;Normal&rsquo; means 1 sample per grid line (i.e., B/W). In the current Microsoft implementation, &lsquo;high&rsquo; means an extra virtual resolution of 16x16 (or 16x1) grid lines per pixel for bytecode instructions like &lsquo;MIRP&rsquo;. After hinting, these 16 grid lines are mapped to 6x5 (or 6x1) grid lines for color filtering if Color ClearType is activated.</p> <p>Note that &lsquo;Gray ClearType&rsquo; is essentially the same as v1.6's grayscale rendering. However, the GETINFO instruction handles it differently: v1.6 returns bit&nbsp;12 (hinting for grayscale), while v2.1 returns bits&nbsp;13 (hinting for ClearType), 18 (symmetrical smoothing), and&nbsp;19 (Gray ClearType). Also, this mode respects bits 2 and&nbsp;3 for the version&nbsp;1 gasp table exclusively (like Color ClearType), while v1.6 only respects the values of version&nbsp;0 (bits 0 and&nbsp;1).</p> <p>Keep in mind that the features of the above interpreter versions might not map exactly to FreeType features or behavior because it is a fundamentally different library with different internals.</p> <hr> <h2 id="interpreter-version">interpreter-version<a class="headerlink" href="#interpreter-version" title="Permanent link">&para;</a></h2> <p>Currently, three versions are available, two representing the bytecode interpreter with subpixel hinting support (old &lsquo;Infinality&rsquo; code and new stripped-down and higher performance &lsquo;minimal&rsquo; code) and one without, respectively. The default is subpixel support if <code>TT_CONFIG_OPTION_SUBPIXEL_HINTING</code> is defined, and no subpixel support otherwise (since it isn't available then).</p> <p>If subpixel hinting is on, many TrueType bytecode instructions behave differently compared to B/W or grayscale rendering (except if &lsquo;native ClearType&rsquo; is selected by the font). Microsoft's main idea is to render at a much increased horizontal resolution, then sampling down the created output to subpixel precision. However, many older fonts are not suited to this and must be specially taken care of by applying (hardcoded) tweaks in Microsoft's interpreter.</p> <p>Details on subpixel hinting and some of the necessary tweaks can be found in Greg Hitchcock's whitepaper at &lsquo;<a href="https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx">https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx</a>&rsquo;. Note that FreeType currently doesn't really &lsquo;subpixel hint&rsquo; (6x1, 6x2, or 6x5 supersampling) like discussed in the paper. Depending on the chosen interpreter, it simply ignores instructions on vertical stems to arrive at very similar results.</p> <h4>note</h4> <p>This property can be used with <code><a href="ft2-module_management.html#ft_property_get">FT_Property_Get</a></code> also.</p> <p>This property can be set via the <code>FREETYPE_PROPERTIES</code> environment variable (using values &lsquo;35&rsquo;, &lsquo;38&rsquo;, or &lsquo;40&rsquo;).</p> <h4>example</h4> <p>The following example code demonstrates how to deactivate subpixel hinting (omitting the error handling). <div class="highlight"><pre><span></span><code> FT_Library library; FT_Face face; FT_UInt interpreter_version = TT_INTERPRETER_VERSION_35; FT_Init_FreeType( &amp;library ); FT_Property_Set( library, &quot;truetype&quot;, &quot;interpreter-version&quot;, &amp;interpreter_version ); </code></pre></div></p> <h4>since</h4> <p>2.5</p> <hr> <h2 id="svg-hooks">svg-hooks<a class="headerlink" href="#svg-hooks" title="Permanent link">&para;</a></h2> <p>Set up the interface between FreeType and an extern SVG rendering library like &lsquo;librsvg&rsquo;. All details on the function hooks can be found in section &lsquo;<a href="ft2-svg_fonts.html#svg_fonts">OpenType SVG Fonts</a>&rsquo;.</p> <h4>example</h4> <p>The following example code expects that the four hook functions <code>svg_*</code> are defined elsewhere. Error handling is omitted, too. <div class="highlight"><pre><span></span><code> FT_Library library; SVG_RendererHooks hooks = { (SVG_Lib_Init_Func)svg_init, (SVG_Lib_Free_Func)svg_free, (SVG_Lib_Render_Func)svg_render, (SVG_Lib_Preset_Slot_Func)svg_preset_slot }; FT_Init_FreeType( &amp;library ); FT_Property_Set( library, &quot;ot-svg&quot;, &quot;svg-hooks&quot;, &amp;hooks ); </code></pre></div></p> <h4>since</h4> <p>2.12</p> <hr> <h2 id="glyph-to-script-map">glyph-to-script-map<a class="headerlink" href="#glyph-to-script-map" title="Permanent link">&para;</a></h2> <p><strong>Experimental only</strong></p> <p>The auto-hinter provides various script modules to hint glyphs. Examples of supported scripts are Latin or CJK. Before a glyph is auto-hinted, the Unicode character map of the font gets examined, and the script is then determined based on Unicode character ranges, see below.</p> <p>OpenType fonts, however, often provide much more glyphs than character codes (small caps, superscripts, ligatures, swashes, etc.), to be controlled by so-called &lsquo;features&rsquo;. Handling OpenType features can be quite complicated and thus needs a separate library on top of FreeType.</p> <p>The mapping between glyph indices and scripts (in the auto-hinter sense, see the <code><a href="ft2-properties.html#ft_autohinter_script_xxx">FT_AUTOHINTER_SCRIPT_XXX</a></code> values) is stored as an array with <code>num_glyphs</code> elements, as found in the font's <code><a href="ft2-base_interface.html#ft_face">FT_Face</a></code> structure. The <code>glyph-to-script-map</code> property returns a pointer to this array, which can be modified as needed. Note that the modification should happen before the first glyph gets processed by the auto-hinter so that the global analysis of the font shapes actually uses the modified mapping.</p> <h4>example</h4> <p>The following example code demonstrates how to access it (omitting the error handling). <div class="highlight"><pre><span></span><code> FT_Library library; FT_Face face; FT_Prop_GlyphToScriptMap prop; FT_Init_FreeType( &amp;library ); FT_New_Face( library, &quot;foo.ttf&quot;, 0, &amp;face ); prop.face = face; FT_Property_Get( library, &quot;autofitter&quot;, &quot;glyph-to-script-map&quot;, &amp;prop ); // adjust `prop.map&#39; as needed right here FT_Load_Glyph( face, ..., FT_LOAD_FORCE_AUTOHINT ); </code></pre></div></p> <h4>since</h4> <p>2.4.11</p> <hr> <h2 id="ft_autohinter_script_xxx">FT_AUTOHINTER_SCRIPT_XXX<a class="headerlink" href="#ft_autohinter_script_xxx" title="Permanent link">&para;</a></h2> <p>Defined in FT_DRIVER_H (freetype/ftdriver.h).</p> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <a href="ft2-properties.html#ft_autohinter_script_none">FT_AUTOHINTER_SCRIPT_NONE</a> 0 #<span class="keyword">define</span> <a href="ft2-properties.html#ft_autohinter_script_latin">FT_AUTOHINTER_SCRIPT_LATIN</a> 1 #<span class="keyword">define</span> <a href="ft2-properties.html#ft_autohinter_script_cjk">FT_AUTOHINTER_SCRIPT_CJK</a> 2 #<span class="keyword">define</span> <a href="ft2-properties.html#ft_autohinter_script_indic">FT_AUTOHINTER_SCRIPT_INDIC</a> 3 </code></pre></div> <p><strong>Experimental only</strong></p> <p>A list of constants used for the <code><a href="ft2-properties.html#glyph-to-script-map">glyph-to-script-map</a></code> property to specify the script submodule the auto-hinter should use for hinting a particular glyph.</p> <h4>values</h4> <table class="fields long"> <tr><td class="val" id="ft_autohinter_script_none">FT_AUTOHINTER_SCRIPT_NONE</td><td class="desc"> <p>Don't auto-hint this glyph.</p> </td></tr> <tr><td class="val" id="ft_autohinter_script_latin">FT_AUTOHINTER_SCRIPT_LATIN</td><td class="desc"> <p>Apply the latin auto-hinter. For the auto-hinter, &lsquo;latin&rsquo; is a very broad term, including Cyrillic and Greek also since characters from those scripts share the same design constraints.</p> <p>By default, characters from the following Unicode ranges are assigned to this submodule.</p> <pre><code> U+0020 - U+007F // Basic Latin (no control characters) U+00A0 - U+00FF // Latin-1 Supplement (no control characters) U+0100 - U+017F // Latin Extended-A U+0180 - U+024F // Latin Extended-B U+0250 - U+02AF // IPA Extensions U+02B0 - U+02FF // Spacing Modifier Letters U+0300 - U+036F // Combining Diacritical Marks U+0370 - U+03FF // Greek and Coptic U+0400 - U+04FF // Cyrillic U+0500 - U+052F // Cyrillic Supplement U+1D00 - U+1D7F // Phonetic Extensions U+1D80 - U+1DBF // Phonetic Extensions Supplement U+1DC0 - U+1DFF // Combining Diacritical Marks Supplement U+1E00 - U+1EFF // Latin Extended Additional U+1F00 - U+1FFF // Greek Extended U+2000 - U+206F // General Punctuation U+2070 - U+209F // Superscripts and Subscripts U+20A0 - U+20CF // Currency Symbols U+2150 - U+218F // Number Forms U+2460 - U+24FF // Enclosed Alphanumerics U+2C60 - U+2C7F // Latin Extended-C U+2DE0 - U+2DFF // Cyrillic Extended-A U+2E00 - U+2E7F // Supplemental Punctuation U+A640 - U+A69F // Cyrillic Extended-B U+A720 - U+A7FF // Latin Extended-D U+FB00 - U+FB06 // Alphab. Present. Forms (Latin Ligatures) U+1D400 - U+1D7FF // Mathematical Alphanumeric Symbols U+1F100 - U+1F1FF // Enclosed Alphanumeric Supplement </code></pre> </td></tr> <tr><td class="val" id="ft_autohinter_script_cjk">FT_AUTOHINTER_SCRIPT_CJK</td><td class="desc"> <p>Apply the CJK auto-hinter, covering Chinese, Japanese, Korean, old Vietnamese, and some other scripts.</p> <p>By default, characters from the following Unicode ranges are assigned to this submodule.</p> <pre><code> U+1100 - U+11FF // Hangul Jamo U+2E80 - U+2EFF // CJK Radicals Supplement U+2F00 - U+2FDF // Kangxi Radicals U+2FF0 - U+2FFF // Ideographic Description Characters U+3000 - U+303F // CJK Symbols and Punctuation U+3040 - U+309F // Hiragana U+30A0 - U+30FF // Katakana U+3100 - U+312F // Bopomofo U+3130 - U+318F // Hangul Compatibility Jamo U+3190 - U+319F // Kanbun U+31A0 - U+31BF // Bopomofo Extended U+31C0 - U+31EF // CJK Strokes U+31F0 - U+31FF // Katakana Phonetic Extensions U+3200 - U+32FF // Enclosed CJK Letters and Months U+3300 - U+33FF // CJK Compatibility U+3400 - U+4DBF // CJK Unified Ideographs Extension A U+4DC0 - U+4DFF // Yijing Hexagram Symbols U+4E00 - U+9FFF // CJK Unified Ideographs U+A960 - U+A97F // Hangul Jamo Extended-A U+AC00 - U+D7AF // Hangul Syllables U+D7B0 - U+D7FF // Hangul Jamo Extended-B U+F900 - U+FAFF // CJK Compatibility Ideographs U+FE10 - U+FE1F // Vertical forms U+FE30 - U+FE4F // CJK Compatibility Forms U+FF00 - U+FFEF // Halfwidth and Fullwidth Forms U+1B000 - U+1B0FF // Kana Supplement U+1D300 - U+1D35F // Tai Xuan Hing Symbols U+1F200 - U+1F2FF // Enclosed Ideographic Supplement U+20000 - U+2A6DF // CJK Unified Ideographs Extension B U+2A700 - U+2B73F // CJK Unified Ideographs Extension C U+2B740 - U+2B81F // CJK Unified Ideographs Extension D U+2F800 - U+2FA1F // CJK Compatibility Ideographs Supplement </code></pre> </td></tr> <tr><td class="val" id="ft_autohinter_script_indic">FT_AUTOHINTER_SCRIPT_INDIC</td><td class="desc"> <p>Apply the indic auto-hinter, covering all major scripts from the Indian sub-continent and some other related scripts like Thai, Lao, or Tibetan.</p> <p>By default, characters from the following Unicode ranges are assigned to this submodule.</p> <pre><code> U+0900 - U+0DFF // Indic Range U+0F00 - U+0FFF // Tibetan U+1900 - U+194F // Limbu U+1B80 - U+1BBF // Sundanese U+A800 - U+A82F // Syloti Nagri U+ABC0 - U+ABFF // Meetei Mayek U+11800 - U+118DF // Sharada </code></pre> <p>Note that currently Indic support is rudimentary only, missing blue zone support.</p> </td></tr> </table> <h4>since</h4> <p>2.4.11</p> <hr> <h2 id="ft_prop_glyphtoscriptmap">FT_Prop_GlyphToScriptMap<a class="headerlink" href="#ft_prop_glyphtoscriptmap" title="Permanent link">&para;</a></h2> <p>Defined in FT_DRIVER_H (freetype/ftdriver.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Prop_GlyphToScriptMap_ { <a href="ft2-base_interface.html#ft_face">FT_Face</a> face; <a href="ft2-basic_types.html#ft_ushort">FT_UShort</a>* map; } <b>FT_Prop_GlyphToScriptMap</b>; </code></pre></div> <p><strong>Experimental only</strong></p> <p>The data exchange structure for the <code><a href="ft2-properties.html#glyph-to-script-map">glyph-to-script-map</a></code> property.</p> <h4>since</h4> <p>2.4.11</p> <hr> <h2 id="fallback-script">fallback-script<a class="headerlink" href="#fallback-script" title="Permanent link">&para;</a></h2> <p><strong>Experimental only</strong></p> <p>If no auto-hinter script module can be assigned to a glyph, a fallback script gets assigned to it (see also the <code><a href="ft2-properties.html#glyph-to-script-map">glyph-to-script-map</a></code> property). By default, this is <code><a href="ft2-properties.html#ft_autohinter_script_xxx">FT_AUTOHINTER_SCRIPT_CJK</a></code>. Using the <code>fallback-script</code> property, this fallback value can be changed.</p> <h4>note</h4> <p>This property can be used with <code><a href="ft2-module_management.html#ft_property_get">FT_Property_Get</a></code> also.</p> <p>It's important to use the right timing for changing this value: The creation of the glyph-to-script map that eventually uses the fallback script value gets triggered either by setting or reading a face-specific property like <code><a href="ft2-properties.html#glyph-to-script-map">glyph-to-script-map</a></code>, or by auto-hinting any glyph from that face. In particular, if you have already created an <code><a href="ft2-base_interface.html#ft_face">FT_Face</a></code> structure but not loaded any glyph (using the auto-hinter), a change of the fallback script will affect this face.</p> <h4>example</h4> <div class="highlight"><pre><span></span><code> FT_Library library; FT_UInt fallback_script = FT_AUTOHINTER_SCRIPT_NONE; FT_Init_FreeType( &amp;library ); FT_Property_Set( library, &quot;autofitter&quot;, &quot;fallback-script&quot;, &amp;fallback_script ); </code></pre></div> <h4>since</h4> <p>2.4.11</p> <hr> <h2 id="default-script">default-script<a class="headerlink" href="#default-script" title="Permanent link">&para;</a></h2> <p><strong>Experimental only</strong></p> <p>If FreeType gets compiled with <code>FT_CONFIG_OPTION_USE_HARFBUZZ</code> to make the HarfBuzz library access OpenType features for getting better glyph coverages, this property sets the (auto-fitter) script to be used for the default (OpenType) script data of a font's GSUB table. Features for the default script are intended for all scripts not explicitly handled in GSUB; an example is a &lsquo;dlig&rsquo; feature, containing the combination of the characters &lsquo;T&rsquo;, &lsquo;E&rsquo;, and &lsquo;L&rsquo; to form a &lsquo;TEL&rsquo; ligature.</p> <p>By default, this is <code><a href="ft2-properties.html#ft_autohinter_script_xxx">FT_AUTOHINTER_SCRIPT_LATIN</a></code>. Using the <code>default-script</code> property, this default value can be changed.</p> <h4>note</h4> <p>This property can be used with <code><a href="ft2-module_management.html#ft_property_get">FT_Property_Get</a></code> also.</p> <p>It's important to use the right timing for changing this value: The creation of the glyph-to-script map that eventually uses the default script value gets triggered either by setting or reading a face-specific property like <code><a href="ft2-properties.html#glyph-to-script-map">glyph-to-script-map</a></code>, or by auto-hinting any glyph from that face. In particular, if you have already created an <code><a href="ft2-base_interface.html#ft_face">FT_Face</a></code> structure but not loaded any glyph (using the auto-hinter), a change of the default script will affect this face.</p> <h4>example</h4> <div class="highlight"><pre><span></span><code> FT_Library library; FT_UInt default_script = FT_AUTOHINTER_SCRIPT_NONE; FT_Init_FreeType( &amp;library ); FT_Property_Set( library, &quot;autofitter&quot;, &quot;default-script&quot;, &amp;default_script ); </code></pre></div> <h4>since</h4> <p>2.5.3</p> <hr> <h2 id="increase-x-height">increase-x-height<a class="headerlink" href="#increase-x-height" title="Permanent link">&para;</a></h2> <p>For ppem values in the range 6&nbsp;&lt;= ppem &lt;= <code>increase-x-height</code>, round up the font's x&nbsp;height much more often than normally. If the value is set to&nbsp;0, which is the default, this feature is switched off. Use this property to improve the legibility of small font sizes if necessary.</p> <h4>note</h4> <p>This property can be used with <code><a href="ft2-module_management.html#ft_property_get">FT_Property_Get</a></code> also.</p> <p>Set this value right after calling <code><a href="ft2-base_interface.html#ft_set_char_size">FT_Set_Char_Size</a></code>, but before loading any glyph (using the auto-hinter).</p> <h4>example</h4> <div class="highlight"><pre><span></span><code> FT_Library library; FT_Face face; FT_Prop_IncreaseXHeight prop; FT_Init_FreeType( &amp;library ); FT_New_Face( library, &quot;foo.ttf&quot;, 0, &amp;face ); FT_Set_Char_Size( face, 10 * 64, 0, 72, 0 ); prop.face = face; prop.limit = 14; FT_Property_Set( library, &quot;autofitter&quot;, &quot;increase-x-height&quot;, &amp;prop ); </code></pre></div> <h4>since</h4> <p>2.4.11</p> <hr> <h2 id="ft_prop_increasexheight">FT_Prop_IncreaseXHeight<a class="headerlink" href="#ft_prop_increasexheight" title="Permanent link">&para;</a></h2> <p>Defined in FT_DRIVER_H (freetype/ftdriver.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Prop_IncreaseXHeight_ { <a href="ft2-base_interface.html#ft_face">FT_Face</a> face; <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> limit; } <b>FT_Prop_IncreaseXHeight</b>; </code></pre></div> <p>The data exchange structure for the <code><a href="ft2-properties.html#increase-x-height">increase-x-height</a></code> property.</p> <hr> <h2 id="warping">warping<a class="headerlink" href="#warping" title="Permanent link">&para;</a></h2> <p><strong>Obsolete</strong></p> <p>This property was always experimental and probably never worked correctly. It was entirely removed from the FreeType&nbsp;2 sources. This entry is only here for historical reference.</p> <p>Warping only worked in &lsquo;normal&rsquo; auto-hinting mode replacing it. The idea of the code was to slightly scale and shift a glyph along the non-hinted dimension (which is usually the horizontal axis) so that as much of its segments were aligned (more or less) to the grid. To find out a glyph's optimal scaling and shifting value, various parameter combinations were tried and scored.</p> <h4>since</h4> <p>2.6</p> <hr> </article> </div> </div> </main> <footer class="md-footer"> <nav class="md-footer__inner md-grid" aria-label="Footer"> <a href="ft2-ot_svg_driver.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: The SVG driver" rel="prev"> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Previous </span> The SVG driver </div> </div> </a> <a href="ft2-parameter_tags.html" class="md-footer__link md-footer__link--next" aria-label="Next: Parameter Tags" rel="next"> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Next </span> Parameter Tags </div> </div> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg> </div> </a> </nav> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-footer-copyright"> <div class="md-footer-copyright__highlight"> Copyright 2022 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>. </div> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"base": ".", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "assets/javascripts/workers/search.477d984a.min.js", "version": null}</script> <script src="assets/javascripts/bundle.82b56eb2.min.js"></script> <script src="javascripts/extra.js"></script> </body> </html>
whupdup/frame
real/third_party/freetype-2.12.0/docs/reference/ft2-properties.html
HTML
gpl-3.0
69,131
<!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="description" content="API Reference Documentation for FreeType-2.12.0"> <meta name="author" content="FreeType Contributors"> <link rel="icon" href="images/favico.ico"> <meta name="generator" content="mkdocs-1.2.1, mkdocs-material-7.1.9"> <title>Quick retrieval of advance values - FreeType-2.12.0 API Reference</title> <link rel="stylesheet" href="assets/stylesheets/main.ca7ac06f.min.css"> <link rel="stylesheet" href="assets/stylesheets/palette.f1a3b89f.min.css"> <meta name="theme-color" content="#4cae4f"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback"> <style>:root{--md-text-font-family:"Noto Serif";--md-code-font-family:"Roboto Mono"}</style> <link rel="stylesheet" href="stylesheets/extra.css"> </head> <body dir="ltr" data-md-color-scheme="" data-md-color-primary="green" data-md-color-accent="green"> <script>function __prefix(e){return new URL(".",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <label class="md-overlay" for="__drawer"></label> <div data-md-component="skip"> <a href="#quick-retrieval-of-advance-values" class="md-skip"> Skip to content </a> </div> <div data-md-component="announce"> </div> <header class="md-header" data-md-component="header"> <nav class="md-header__inner md-grid" aria-label="Header"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> <label class="md-header__button md-icon" for="__drawer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg> </label> <div class="md-header__title" data-md-component="header-title"> <div class="md-header__ellipsis"> <div class="md-header__topic"> <span class="md-ellipsis"> FreeType-2.12.0 API Reference </span> </div> <div class="md-header__topic" data-md-component="header-topic"> <span class="md-ellipsis"> Quick retrieval of advance values </span> </div> </div> </div> <label class="md-header__button md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> </label> <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required> <label class="md-search__icon md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </label> <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg> </button> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" data-md-scrollfix> <div class="md-search-result" data-md-component="search-result"> <div class="md-search-result__meta"> Initializing search </div> <ol class="md-search-result__list"></ol> </div> </div> </div> </div> </div> </nav> </header> <div class="md-container" data-md-component="container"> <main class="md-main" data-md-component="main"> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <label class="md-nav__title" for="__drawer"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> FreeType-2.12.0 API Reference </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="index.html" class="md-nav__link"> TOC </a> </li> <li class="md-nav__item"> <a href="ft2-index.html" class="md-nav__link"> Index </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" > <label class="md-nav__link" for="__nav_3"> General Remarks <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="General Remarks" data-md-level="1"> <label class="md-nav__title" for="__nav_3"> <span class="md-nav__icon md-icon"></span> General Remarks </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-preamble.html" class="md-nav__link"> Preamble </a> </li> <li class="md-nav__item"> <a href="ft2-header_inclusion.html" class="md-nav__link"> FreeType's header inclusion scheme </a> </li> <li class="md-nav__item"> <a href="ft2-user_allocation.html" class="md-nav__link"> User allocation </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" > <label class="md-nav__link" for="__nav_4"> Core API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Core API" data-md-level="1"> <label class="md-nav__title" for="__nav_4"> <span class="md-nav__icon md-icon"></span> Core API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-version.html" class="md-nav__link"> FreeType Version </a> </li> <li class="md-nav__item"> <a href="ft2-basic_types.html" class="md-nav__link"> Basic Data Types </a> </li> <li class="md-nav__item"> <a href="ft2-base_interface.html" class="md-nav__link"> Base Interface </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_variants.html" class="md-nav__link"> Unicode Variation Sequences </a> </li> <li class="md-nav__item"> <a href="ft2-color_management.html" class="md-nav__link"> Glyph Color Management </a> </li> <li class="md-nav__item"> <a href="ft2-layer_management.html" class="md-nav__link"> Glyph Layer Management </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_management.html" class="md-nav__link"> Glyph Management </a> </li> <li class="md-nav__item"> <a href="ft2-mac_specific.html" class="md-nav__link"> Mac Specific Interface </a> </li> <li class="md-nav__item"> <a href="ft2-sizes_management.html" class="md-nav__link"> Size Management </a> </li> <li class="md-nav__item"> <a href="ft2-header_file_macros.html" class="md-nav__link"> Header File Macros </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" > <label class="md-nav__link" for="__nav_5"> Format-Specific API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Format-Specific API" data-md-level="1"> <label class="md-nav__title" for="__nav_5"> <span class="md-nav__icon md-icon"></span> Format-Specific API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-multiple_masters.html" class="md-nav__link"> Multiple Masters </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_tables.html" class="md-nav__link"> TrueType Tables </a> </li> <li class="md-nav__item"> <a href="ft2-type1_tables.html" class="md-nav__link"> Type 1 Tables </a> </li> <li class="md-nav__item"> <a href="ft2-sfnt_names.html" class="md-nav__link"> SFNT Names </a> </li> <li class="md-nav__item"> <a href="ft2-bdf_fonts.html" class="md-nav__link"> BDF and PCF Files </a> </li> <li class="md-nav__item"> <a href="ft2-cid_fonts.html" class="md-nav__link"> CID Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-pfr_fonts.html" class="md-nav__link"> PFR Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-winfnt_fonts.html" class="md-nav__link"> Window FNT Files </a> </li> <li class="md-nav__item"> <a href="ft2-svg_fonts.html" class="md-nav__link"> OpenType SVG Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-font_formats.html" class="md-nav__link"> Font Formats </a> </li> <li class="md-nav__item"> <a href="ft2-gasp_table.html" class="md-nav__link"> Gasp Table </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" > <label class="md-nav__link" for="__nav_6"> Controlling FreeType Modules <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Controlling FreeType Modules" data-md-level="1"> <label class="md-nav__title" for="__nav_6"> <span class="md-nav__icon md-icon"></span> Controlling FreeType Modules </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-auto_hinter.html" class="md-nav__link"> The auto-hinter </a> </li> <li class="md-nav__item"> <a href="ft2-cff_driver.html" class="md-nav__link"> The CFF driver </a> </li> <li class="md-nav__item"> <a href="ft2-t1_cid_driver.html" class="md-nav__link"> The Type 1 and CID drivers </a> </li> <li class="md-nav__item"> <a href="ft2-tt_driver.html" class="md-nav__link"> The TrueType driver </a> </li> <li class="md-nav__item"> <a href="ft2-pcf_driver.html" class="md-nav__link"> The PCF driver </a> </li> <li class="md-nav__item"> <a href="ft2-ot_svg_driver.html" class="md-nav__link"> The SVG driver </a> </li> <li class="md-nav__item"> <a href="ft2-properties.html" class="md-nav__link"> Driver properties </a> </li> <li class="md-nav__item"> <a href="ft2-parameter_tags.html" class="md-nav__link"> Parameter Tags </a> </li> <li class="md-nav__item"> <a href="ft2-lcd_rendering.html" class="md-nav__link"> Subpixel Rendering </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" > <label class="md-nav__link" for="__nav_7"> Cache Sub-System <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1"> <label class="md-nav__title" for="__nav_7"> <span class="md-nav__icon md-icon"></span> Cache Sub-System </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-cache_subsystem.html" class="md-nav__link"> Cache Sub-System </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--active md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" checked> <label class="md-nav__link" for="__nav_8"> Support API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Support API" data-md-level="1"> <label class="md-nav__title" for="__nav_8"> <span class="md-nav__icon md-icon"></span> Support API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-computations.html" class="md-nav__link"> Computations </a> </li> <li class="md-nav__item"> <a href="ft2-list_processing.html" class="md-nav__link"> List Processing </a> </li> <li class="md-nav__item"> <a href="ft2-outline_processing.html" class="md-nav__link"> Outline Processing </a> </li> <li class="md-nav__item md-nav__item--active"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <label class="md-nav__link md-nav__link--active" for="__toc"> Quick retrieval of advance values <span class="md-nav__icon md-icon"></span> </label> <a href="ft2-quick_advance.html" class="md-nav__link md-nav__link--active"> Quick retrieval of advance values </a> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_get_advance" class="md-nav__link"> FT_Get_Advance </a> </li> <li class="md-nav__item"> <a href="#ft_get_advances" class="md-nav__link"> FT_Get_Advances </a> </li> <li class="md-nav__item"> <a href="#ft_advance_flag_fast_only" class="md-nav__link"> FT_ADVANCE_FLAG_FAST_ONLY </a> </li> </ul> </nav> </li> <li class="md-nav__item"> <a href="ft2-bitmap_handling.html" class="md-nav__link"> Bitmap Handling </a> </li> <li class="md-nav__item"> <a href="ft2-raster.html" class="md-nav__link"> Scanline Converter </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_stroker.html" class="md-nav__link"> Glyph Stroker </a> </li> <li class="md-nav__item"> <a href="ft2-system_interface.html" class="md-nav__link"> System Interface </a> </li> <li class="md-nav__item"> <a href="ft2-module_management.html" class="md-nav__link"> Module Management </a> </li> <li class="md-nav__item"> <a href="ft2-gzip.html" class="md-nav__link"> GZIP Streams </a> </li> <li class="md-nav__item"> <a href="ft2-lzw.html" class="md-nav__link"> LZW Streams </a> </li> <li class="md-nav__item"> <a href="ft2-bzip2.html" class="md-nav__link"> BZIP2 Streams </a> </li> <li class="md-nav__item"> <a href="ft2-debugging_apis.html" class="md-nav__link"> External Debugging APIs </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" > <label class="md-nav__link" for="__nav_9"> Error Codes <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Error Codes" data-md-level="1"> <label class="md-nav__title" for="__nav_9"> <span class="md-nav__icon md-icon"></span> Error Codes </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-error_enumerations.html" class="md-nav__link"> Error Enumerations </a> </li> <li class="md-nav__item"> <a href="ft2-error_code_values.html" class="md-nav__link"> Error Code Values </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" > <label class="md-nav__link" for="__nav_10"> Miscellaneous <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1"> <label class="md-nav__title" for="__nav_10"> <span class="md-nav__icon md-icon"></span> Miscellaneous </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-gx_validation.html" class="md-nav__link"> TrueTypeGX/AAT Validation </a> </li> <li class="md-nav__item"> <a href="ft2-incremental.html" class="md-nav__link"> Incremental Loading </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_engine.html" class="md-nav__link"> The TrueType Engine </a> </li> <li class="md-nav__item"> <a href="ft2-ot_validation.html" class="md-nav__link"> OpenType Validation </a> </li> </ul> </nav> </li> </ul> </nav> </div> </div> </div> <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_get_advance" class="md-nav__link"> FT_Get_Advance </a> </li> <li class="md-nav__item"> <a href="#ft_get_advances" class="md-nav__link"> FT_Get_Advances </a> </li> <li class="md-nav__item"> <a href="#ft_advance_flag_fast_only" class="md-nav__link"> FT_ADVANCE_FLAG_FAST_ONLY </a> </li> </ul> </nav> </div> </div> </div> <div class="md-content" data-md-component="content"> <article class="md-content__inner md-typeset"> <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; <a href="index.html#support-api">Support API</a> &raquo; Quick retrieval of advance values</p> <hr /> <h1 id="quick-retrieval-of-advance-values">Quick retrieval of advance values<a class="headerlink" href="#quick-retrieval-of-advance-values" title="Permanent link">&para;</a></h1> <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2> <p>This section contains functions to quickly extract advance values without handling glyph outlines, if possible.</p> <h2 id="ft_get_advance">FT_Get_Advance<a class="headerlink" href="#ft_get_advance" title="Permanent link">&para;</a></h2> <p>Defined in FT_ADVANCES_H (freetype/ftadvanc.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Get_Advance</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a> face, <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> gindex, <a href="ft2-basic_types.html#ft_int32">FT_Int32</a> load_flags, <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a> *padvance ); </code></pre></div> <p>Retrieve the advance value of a given glyph outline in an <code><a href="ft2-base_interface.html#ft_face">FT_Face</a></code>.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="face">face</td><td class="desc"> <p>The source <code><a href="ft2-base_interface.html#ft_face">FT_Face</a></code> handle.</p> </td></tr> <tr><td class="val" id="gindex">gindex</td><td class="desc"> <p>The glyph index.</p> </td></tr> <tr><td class="val" id="load_flags">load_flags</td><td class="desc"> <p>A set of bit flags similar to those used when calling <code><a href="ft2-base_interface.html#ft_load_glyph">FT_Load_Glyph</a></code>, used to determine what kind of advances you need.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="padvance">padvance</td><td class="desc"> <p>The advance value. If scaling is performed (based on the value of <code>load_flags</code>), the advance value is in 16.16 format. Otherwise, it is in font units.</p> <p>If <code><a href="ft2-base_interface.html#ft_load_xxx">FT_LOAD_VERTICAL_LAYOUT</a></code> is set, this is the vertical advance corresponding to a vertical layout. Otherwise, it is the horizontal advance in a horizontal layout.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0 means success.</p> <h4>note</h4> <p>This function may fail if you use <code><a href="ft2-quick_advance.html#ft_advance_flag_fast_only">FT_ADVANCE_FLAG_FAST_ONLY</a></code> and if the corresponding font backend doesn't have a quick way to retrieve the advances.</p> <p>A scaled advance is returned in 16.16 format but isn't transformed by the affine transformation specified by <code><a href="ft2-base_interface.html#ft_set_transform">FT_Set_Transform</a></code>.</p> <hr> <h2 id="ft_get_advances">FT_Get_Advances<a class="headerlink" href="#ft_get_advances" title="Permanent link">&para;</a></h2> <p>Defined in FT_ADVANCES_H (freetype/ftadvanc.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Get_Advances</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a> face, <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> start, <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> count, <a href="ft2-basic_types.html#ft_int32">FT_Int32</a> load_flags, <a href="ft2-basic_types.html#ft_fixed">FT_Fixed</a> *padvances ); </code></pre></div> <p>Retrieve the advance values of several glyph outlines in an <code><a href="ft2-base_interface.html#ft_face">FT_Face</a></code>.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="face">face</td><td class="desc"> <p>The source <code><a href="ft2-base_interface.html#ft_face">FT_Face</a></code> handle.</p> </td></tr> <tr><td class="val" id="start">start</td><td class="desc"> <p>The first glyph index.</p> </td></tr> <tr><td class="val" id="count">count</td><td class="desc"> <p>The number of advance values you want to retrieve.</p> </td></tr> <tr><td class="val" id="load_flags">load_flags</td><td class="desc"> <p>A set of bit flags similar to those used when calling <code><a href="ft2-base_interface.html#ft_load_glyph">FT_Load_Glyph</a></code>.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="padvance">padvance</td><td class="desc"> <p>The advance values. This array, to be provided by the caller, must contain at least <code>count</code> elements.</p> <p>If scaling is performed (based on the value of <code>load_flags</code>), the advance values are in 16.16 format. Otherwise, they are in font units.</p> <p>If <code><a href="ft2-base_interface.html#ft_load_xxx">FT_LOAD_VERTICAL_LAYOUT</a></code> is set, these are the vertical advances corresponding to a vertical layout. Otherwise, they are the horizontal advances in a horizontal layout.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0 means success.</p> <h4>note</h4> <p>This function may fail if you use <code><a href="ft2-quick_advance.html#ft_advance_flag_fast_only">FT_ADVANCE_FLAG_FAST_ONLY</a></code> and if the corresponding font backend doesn't have a quick way to retrieve the advances.</p> <p>Scaled advances are returned in 16.16 format but aren't transformed by the affine transformation specified by <code><a href="ft2-base_interface.html#ft_set_transform">FT_Set_Transform</a></code>.</p> <hr> <h2 id="ft_advance_flag_fast_only">FT_ADVANCE_FLAG_FAST_ONLY<a class="headerlink" href="#ft_advance_flag_fast_only" title="Permanent link">&para;</a></h2> <p>Defined in FT_ADVANCES_H (freetype/ftadvanc.h).</p> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <b>FT_ADVANCE_FLAG_FAST_ONLY</b> 0x20000000L </code></pre></div> <p>A bit-flag to be OR-ed with the <code>flags</code> parameter of the <code><a href="ft2-quick_advance.html#ft_get_advance">FT_Get_Advance</a></code> and <code><a href="ft2-quick_advance.html#ft_get_advances">FT_Get_Advances</a></code> functions.</p> <p>If set, it indicates that you want these functions to fail if the corresponding hinting mode or font driver doesn't allow for very quick advance computation.</p> <p>Typically, glyphs that are either unscaled, unhinted, bitmapped, or light-hinted can have their advance width computed very quickly.</p> <p>Normal and bytecode hinted modes that require loading, scaling, and hinting of the glyph outline, are extremely slow by comparison.</p> <hr> </article> </div> </div> </main> <footer class="md-footer"> <nav class="md-footer__inner md-grid" aria-label="Footer"> <a href="ft2-outline_processing.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: Outline Processing" rel="prev"> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Previous </span> Outline Processing </div> </div> </a> <a href="ft2-bitmap_handling.html" class="md-footer__link md-footer__link--next" aria-label="Next: Bitmap Handling" rel="next"> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Next </span> Bitmap Handling </div> </div> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg> </div> </a> </nav> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-footer-copyright"> <div class="md-footer-copyright__highlight"> Copyright 2022 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>. </div> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"base": ".", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "assets/javascripts/workers/search.477d984a.min.js", "version": null}</script> <script src="assets/javascripts/bundle.82b56eb2.min.js"></script> <script src="javascripts/extra.js"></script> </body> </html>
whupdup/frame
real/third_party/freetype-2.12.0/docs/reference/ft2-quick_advance.html
HTML
gpl-3.0
33,936
<!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="description" content="API Reference Documentation for FreeType-2.12.0"> <meta name="author" content="FreeType Contributors"> <link rel="icon" href="images/favico.ico"> <meta name="generator" content="mkdocs-1.2.1, mkdocs-material-7.1.9"> <title>Scanline Converter - FreeType-2.12.0 API Reference</title> <link rel="stylesheet" href="assets/stylesheets/main.ca7ac06f.min.css"> <link rel="stylesheet" href="assets/stylesheets/palette.f1a3b89f.min.css"> <meta name="theme-color" content="#4cae4f"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback"> <style>:root{--md-text-font-family:"Noto Serif";--md-code-font-family:"Roboto Mono"}</style> <link rel="stylesheet" href="stylesheets/extra.css"> </head> <body dir="ltr" data-md-color-scheme="" data-md-color-primary="green" data-md-color-accent="green"> <script>function __prefix(e){return new URL(".",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <label class="md-overlay" for="__drawer"></label> <div data-md-component="skip"> <a href="#scanline-converter" class="md-skip"> Skip to content </a> </div> <div data-md-component="announce"> </div> <header class="md-header" data-md-component="header"> <nav class="md-header__inner md-grid" aria-label="Header"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> <label class="md-header__button md-icon" for="__drawer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg> </label> <div class="md-header__title" data-md-component="header-title"> <div class="md-header__ellipsis"> <div class="md-header__topic"> <span class="md-ellipsis"> FreeType-2.12.0 API Reference </span> </div> <div class="md-header__topic" data-md-component="header-topic"> <span class="md-ellipsis"> Scanline Converter </span> </div> </div> </div> <label class="md-header__button md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> </label> <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required> <label class="md-search__icon md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </label> <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg> </button> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" data-md-scrollfix> <div class="md-search-result" data-md-component="search-result"> <div class="md-search-result__meta"> Initializing search </div> <ol class="md-search-result__list"></ol> </div> </div> </div> </div> </div> </nav> </header> <div class="md-container" data-md-component="container"> <main class="md-main" data-md-component="main"> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <label class="md-nav__title" for="__drawer"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> FreeType-2.12.0 API Reference </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="index.html" class="md-nav__link"> TOC </a> </li> <li class="md-nav__item"> <a href="ft2-index.html" class="md-nav__link"> Index </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" > <label class="md-nav__link" for="__nav_3"> General Remarks <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="General Remarks" data-md-level="1"> <label class="md-nav__title" for="__nav_3"> <span class="md-nav__icon md-icon"></span> General Remarks </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-preamble.html" class="md-nav__link"> Preamble </a> </li> <li class="md-nav__item"> <a href="ft2-header_inclusion.html" class="md-nav__link"> FreeType's header inclusion scheme </a> </li> <li class="md-nav__item"> <a href="ft2-user_allocation.html" class="md-nav__link"> User allocation </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" > <label class="md-nav__link" for="__nav_4"> Core API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Core API" data-md-level="1"> <label class="md-nav__title" for="__nav_4"> <span class="md-nav__icon md-icon"></span> Core API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-version.html" class="md-nav__link"> FreeType Version </a> </li> <li class="md-nav__item"> <a href="ft2-basic_types.html" class="md-nav__link"> Basic Data Types </a> </li> <li class="md-nav__item"> <a href="ft2-base_interface.html" class="md-nav__link"> Base Interface </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_variants.html" class="md-nav__link"> Unicode Variation Sequences </a> </li> <li class="md-nav__item"> <a href="ft2-color_management.html" class="md-nav__link"> Glyph Color Management </a> </li> <li class="md-nav__item"> <a href="ft2-layer_management.html" class="md-nav__link"> Glyph Layer Management </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_management.html" class="md-nav__link"> Glyph Management </a> </li> <li class="md-nav__item"> <a href="ft2-mac_specific.html" class="md-nav__link"> Mac Specific Interface </a> </li> <li class="md-nav__item"> <a href="ft2-sizes_management.html" class="md-nav__link"> Size Management </a> </li> <li class="md-nav__item"> <a href="ft2-header_file_macros.html" class="md-nav__link"> Header File Macros </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" > <label class="md-nav__link" for="__nav_5"> Format-Specific API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Format-Specific API" data-md-level="1"> <label class="md-nav__title" for="__nav_5"> <span class="md-nav__icon md-icon"></span> Format-Specific API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-multiple_masters.html" class="md-nav__link"> Multiple Masters </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_tables.html" class="md-nav__link"> TrueType Tables </a> </li> <li class="md-nav__item"> <a href="ft2-type1_tables.html" class="md-nav__link"> Type 1 Tables </a> </li> <li class="md-nav__item"> <a href="ft2-sfnt_names.html" class="md-nav__link"> SFNT Names </a> </li> <li class="md-nav__item"> <a href="ft2-bdf_fonts.html" class="md-nav__link"> BDF and PCF Files </a> </li> <li class="md-nav__item"> <a href="ft2-cid_fonts.html" class="md-nav__link"> CID Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-pfr_fonts.html" class="md-nav__link"> PFR Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-winfnt_fonts.html" class="md-nav__link"> Window FNT Files </a> </li> <li class="md-nav__item"> <a href="ft2-svg_fonts.html" class="md-nav__link"> OpenType SVG Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-font_formats.html" class="md-nav__link"> Font Formats </a> </li> <li class="md-nav__item"> <a href="ft2-gasp_table.html" class="md-nav__link"> Gasp Table </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" > <label class="md-nav__link" for="__nav_6"> Controlling FreeType Modules <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Controlling FreeType Modules" data-md-level="1"> <label class="md-nav__title" for="__nav_6"> <span class="md-nav__icon md-icon"></span> Controlling FreeType Modules </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-auto_hinter.html" class="md-nav__link"> The auto-hinter </a> </li> <li class="md-nav__item"> <a href="ft2-cff_driver.html" class="md-nav__link"> The CFF driver </a> </li> <li class="md-nav__item"> <a href="ft2-t1_cid_driver.html" class="md-nav__link"> The Type 1 and CID drivers </a> </li> <li class="md-nav__item"> <a href="ft2-tt_driver.html" class="md-nav__link"> The TrueType driver </a> </li> <li class="md-nav__item"> <a href="ft2-pcf_driver.html" class="md-nav__link"> The PCF driver </a> </li> <li class="md-nav__item"> <a href="ft2-ot_svg_driver.html" class="md-nav__link"> The SVG driver </a> </li> <li class="md-nav__item"> <a href="ft2-properties.html" class="md-nav__link"> Driver properties </a> </li> <li class="md-nav__item"> <a href="ft2-parameter_tags.html" class="md-nav__link"> Parameter Tags </a> </li> <li class="md-nav__item"> <a href="ft2-lcd_rendering.html" class="md-nav__link"> Subpixel Rendering </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" > <label class="md-nav__link" for="__nav_7"> Cache Sub-System <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1"> <label class="md-nav__title" for="__nav_7"> <span class="md-nav__icon md-icon"></span> Cache Sub-System </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-cache_subsystem.html" class="md-nav__link"> Cache Sub-System </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--active md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" checked> <label class="md-nav__link" for="__nav_8"> Support API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Support API" data-md-level="1"> <label class="md-nav__title" for="__nav_8"> <span class="md-nav__icon md-icon"></span> Support API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-computations.html" class="md-nav__link"> Computations </a> </li> <li class="md-nav__item"> <a href="ft2-list_processing.html" class="md-nav__link"> List Processing </a> </li> <li class="md-nav__item"> <a href="ft2-outline_processing.html" class="md-nav__link"> Outline Processing </a> </li> <li class="md-nav__item"> <a href="ft2-quick_advance.html" class="md-nav__link"> Quick retrieval of advance values </a> </li> <li class="md-nav__item"> <a href="ft2-bitmap_handling.html" class="md-nav__link"> Bitmap Handling </a> </li> <li class="md-nav__item md-nav__item--active"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <label class="md-nav__link md-nav__link--active" for="__toc"> Scanline Converter <span class="md-nav__icon md-icon"></span> </label> <a href="ft2-raster.html" class="md-nav__link md-nav__link--active"> Scanline Converter </a> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_span" class="md-nav__link"> FT_Span </a> </li> <li class="md-nav__item"> <a href="#ft_spanfunc" class="md-nav__link"> FT_SpanFunc </a> </li> <li class="md-nav__item"> <a href="#ft_raster_params" class="md-nav__link"> FT_Raster_Params </a> </li> <li class="md-nav__item"> <a href="#ft_raster_flag_xxx" class="md-nav__link"> FT_RASTER_FLAG_XXX </a> </li> <li class="md-nav__item"> <a href="#ft_raster" class="md-nav__link"> FT_Raster </a> </li> <li class="md-nav__item"> <a href="#ft_raster_newfunc" class="md-nav__link"> FT_Raster_NewFunc </a> </li> <li class="md-nav__item"> <a href="#ft_raster_donefunc" class="md-nav__link"> FT_Raster_DoneFunc </a> </li> <li class="md-nav__item"> <a href="#ft_raster_resetfunc" class="md-nav__link"> FT_Raster_ResetFunc </a> </li> <li class="md-nav__item"> <a href="#ft_raster_setmodefunc" class="md-nav__link"> FT_Raster_SetModeFunc </a> </li> <li class="md-nav__item"> <a href="#ft_raster_renderfunc" class="md-nav__link"> FT_Raster_RenderFunc </a> </li> <li class="md-nav__item"> <a href="#ft_raster_funcs" class="md-nav__link"> FT_Raster_Funcs </a> </li> <li class="md-nav__item"> <a href="#ft_raster_bittest_func" class="md-nav__link"> FT_Raster_BitTest_Func </a> </li> <li class="md-nav__item"> <a href="#ft_raster_bitset_func" class="md-nav__link"> FT_Raster_BitSet_Func </a> </li> </ul> </nav> </li> <li class="md-nav__item"> <a href="ft2-glyph_stroker.html" class="md-nav__link"> Glyph Stroker </a> </li> <li class="md-nav__item"> <a href="ft2-system_interface.html" class="md-nav__link"> System Interface </a> </li> <li class="md-nav__item"> <a href="ft2-module_management.html" class="md-nav__link"> Module Management </a> </li> <li class="md-nav__item"> <a href="ft2-gzip.html" class="md-nav__link"> GZIP Streams </a> </li> <li class="md-nav__item"> <a href="ft2-lzw.html" class="md-nav__link"> LZW Streams </a> </li> <li class="md-nav__item"> <a href="ft2-bzip2.html" class="md-nav__link"> BZIP2 Streams </a> </li> <li class="md-nav__item"> <a href="ft2-debugging_apis.html" class="md-nav__link"> External Debugging APIs </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" > <label class="md-nav__link" for="__nav_9"> Error Codes <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Error Codes" data-md-level="1"> <label class="md-nav__title" for="__nav_9"> <span class="md-nav__icon md-icon"></span> Error Codes </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-error_enumerations.html" class="md-nav__link"> Error Enumerations </a> </li> <li class="md-nav__item"> <a href="ft2-error_code_values.html" class="md-nav__link"> Error Code Values </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" > <label class="md-nav__link" for="__nav_10"> Miscellaneous <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1"> <label class="md-nav__title" for="__nav_10"> <span class="md-nav__icon md-icon"></span> Miscellaneous </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-gx_validation.html" class="md-nav__link"> TrueTypeGX/AAT Validation </a> </li> <li class="md-nav__item"> <a href="ft2-incremental.html" class="md-nav__link"> Incremental Loading </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_engine.html" class="md-nav__link"> The TrueType Engine </a> </li> <li class="md-nav__item"> <a href="ft2-ot_validation.html" class="md-nav__link"> OpenType Validation </a> </li> </ul> </nav> </li> </ul> </nav> </div> </div> </div> <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_span" class="md-nav__link"> FT_Span </a> </li> <li class="md-nav__item"> <a href="#ft_spanfunc" class="md-nav__link"> FT_SpanFunc </a> </li> <li class="md-nav__item"> <a href="#ft_raster_params" class="md-nav__link"> FT_Raster_Params </a> </li> <li class="md-nav__item"> <a href="#ft_raster_flag_xxx" class="md-nav__link"> FT_RASTER_FLAG_XXX </a> </li> <li class="md-nav__item"> <a href="#ft_raster" class="md-nav__link"> FT_Raster </a> </li> <li class="md-nav__item"> <a href="#ft_raster_newfunc" class="md-nav__link"> FT_Raster_NewFunc </a> </li> <li class="md-nav__item"> <a href="#ft_raster_donefunc" class="md-nav__link"> FT_Raster_DoneFunc </a> </li> <li class="md-nav__item"> <a href="#ft_raster_resetfunc" class="md-nav__link"> FT_Raster_ResetFunc </a> </li> <li class="md-nav__item"> <a href="#ft_raster_setmodefunc" class="md-nav__link"> FT_Raster_SetModeFunc </a> </li> <li class="md-nav__item"> <a href="#ft_raster_renderfunc" class="md-nav__link"> FT_Raster_RenderFunc </a> </li> <li class="md-nav__item"> <a href="#ft_raster_funcs" class="md-nav__link"> FT_Raster_Funcs </a> </li> <li class="md-nav__item"> <a href="#ft_raster_bittest_func" class="md-nav__link"> FT_Raster_BitTest_Func </a> </li> <li class="md-nav__item"> <a href="#ft_raster_bitset_func" class="md-nav__link"> FT_Raster_BitSet_Func </a> </li> </ul> </nav> </div> </div> </div> <div class="md-content" data-md-component="content"> <article class="md-content__inner md-typeset"> <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; <a href="index.html#support-api">Support API</a> &raquo; Scanline Converter</p> <hr /> <h1 id="scanline-converter">Scanline Converter<a class="headerlink" href="#scanline-converter" title="Permanent link">&para;</a></h1> <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2> <p>A raster or a rasterizer is a scan converter in charge of producing a pixel coverage bitmap that can be used as an alpha channel when compositing a glyph with a background. FreeType comes with two rasterizers: bilevel <code>raster1</code> and anti-aliased <code>smooth</code> are two separate modules. They are usually called from the high-level <code><a href="ft2-base_interface.html#ft_load_glyph">FT_Load_Glyph</a></code> or <code><a href="ft2-base_interface.html#ft_render_glyph">FT_Render_Glyph</a></code> functions and produce the entire coverage bitmap at once, while staying largely invisible to users.</p> <p>Instead of working with complete coverage bitmaps, it is also possible to intercept consecutive pixel runs on the same scanline with the same coverage, called <em>spans</em>, and process them individually. Only the <code>smooth</code> rasterizer permits this when calling <code><a href="ft2-outline_processing.html#ft_outline_render">FT_Outline_Render</a></code> with <code><a href="ft2-raster.html#ft_raster_params">FT_Raster_Params</a></code> as described below.</p> <p>Working with either complete bitmaps or spans it is important to think of them as colorless coverage objects suitable as alpha channels to blend arbitrary colors with a background. For best results, it is recommended to use gamma correction, too.</p> <p>This section also describes the public API needed to set up alternative <code><a href="ft2-module_management.html#ft_renderer">FT_Renderer</a></code> modules.</p> <h2 id="ft_span">FT_Span<a class="headerlink" href="#ft_span" title="Permanent link">&para;</a></h2> <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Span_ { <span class="keyword">short</span> x; <span class="keyword">unsigned</span> <span class="keyword">short</span> len; <span class="keyword">unsigned</span> <span class="keyword">char</span> coverage; } <b>FT_Span</b>; </code></pre></div> <p>A structure to model a single span of consecutive pixels when rendering an anti-aliased bitmap.</p> <h4>fields</h4> <table class="fields"> <tr><td class="val" id="x">x</td><td class="desc"> <p>The span's horizontal start position.</p> </td></tr> <tr><td class="val" id="len">len</td><td class="desc"> <p>The span's length in pixels.</p> </td></tr> <tr><td class="val" id="coverage">coverage</td><td class="desc"> <p>The span color/coverage, ranging from 0 (background) to 255 (foreground).</p> </td></tr> </table> <h4>note</h4> <p>This structure is used by the span drawing callback type named <code><a href="ft2-raster.html#ft_spanfunc">FT_SpanFunc</a></code> that takes the y&nbsp;coordinate of the span as a parameter.</p> <p>The anti-aliased rasterizer produces coverage values from 0 to 255, this is, from completely transparent to completely opaque.</p> <hr> <h2 id="ft_spanfunc">FT_SpanFunc<a class="headerlink" href="#ft_spanfunc" title="Permanent link">&para;</a></h2> <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">void</span> (*<b>FT_SpanFunc</b>)( <span class="keyword">int</span> y, <span class="keyword">int</span> count, <span class="keyword">const</span> <a href="ft2-raster.html#ft_span">FT_Span</a>* spans, <span class="keyword">void</span>* user ); #<span class="keyword">define</span> FT_Raster_Span_Func <b>FT_SpanFunc</b> </code></pre></div> <p>A function used as a call-back by the anti-aliased renderer in order to let client applications draw themselves the pixel spans on each scan line.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="y">y</td><td class="desc"> <p>The scanline's upward y&nbsp;coordinate.</p> </td></tr> <tr><td class="val" id="count">count</td><td class="desc"> <p>The number of spans to draw on this scanline.</p> </td></tr> <tr><td class="val" id="spans">spans</td><td class="desc"> <p>A table of <code>count</code> spans to draw on the scanline.</p> </td></tr> <tr><td class="val" id="user">user</td><td class="desc"> <p>User-supplied data that is passed to the callback.</p> </td></tr> </table> <h4>note</h4> <p>This callback allows client applications to directly render the spans of the anti-aliased bitmap to any kind of surfaces.</p> <p>This can be used to write anti-aliased outlines directly to a given background bitmap using alpha compositing. It can also be used for oversampling and averaging.</p> <hr> <h2 id="ft_raster_params">FT_Raster_Params<a class="headerlink" href="#ft_raster_params" title="Permanent link">&para;</a></h2> <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Raster_Params_ { <span class="keyword">const</span> <a href="ft2-basic_types.html#ft_bitmap">FT_Bitmap</a>* target; <span class="keyword">const</span> <span class="keyword">void</span>* source; <span class="keyword">int</span> flags; <a href="ft2-raster.html#ft_spanfunc">FT_SpanFunc</a> gray_spans; <a href="ft2-raster.html#ft_spanfunc">FT_SpanFunc</a> black_spans; /* unused */ <a href="ft2-raster.html#ft_raster_bittest_func">FT_Raster_BitTest_Func</a> bit_test; /* unused */ <a href="ft2-raster.html#ft_raster_bitset_func">FT_Raster_BitSet_Func</a> bit_set; /* unused */ <span class="keyword">void</span>* user; <a href="ft2-basic_types.html#ft_bbox">FT_BBox</a> clip_box; } <b>FT_Raster_Params</b>; </code></pre></div> <p>A structure to hold the parameters used by a raster's render function, passed as an argument to <code><a href="ft2-outline_processing.html#ft_outline_render">FT_Outline_Render</a></code>.</p> <h4>fields</h4> <table class="fields"> <tr><td class="val" id="target">target</td><td class="desc"> <p>The target bitmap.</p> </td></tr> <tr><td class="val" id="source">source</td><td class="desc"> <p>A pointer to the source glyph image (e.g., an <code><a href="ft2-outline_processing.html#ft_outline">FT_Outline</a></code>).</p> </td></tr> <tr><td class="val" id="flags">flags</td><td class="desc"> <p>The rendering flags.</p> </td></tr> <tr><td class="val" id="gray_spans">gray_spans</td><td class="desc"> <p>The gray span drawing callback.</p> </td></tr> <tr><td class="val" id="black_spans">black_spans</td><td class="desc"> <p>Unused.</p> </td></tr> <tr><td class="val" id="bit_test">bit_test</td><td class="desc"> <p>Unused.</p> </td></tr> <tr><td class="val" id="bit_set">bit_set</td><td class="desc"> <p>Unused.</p> </td></tr> <tr><td class="val" id="user">user</td><td class="desc"> <p>User-supplied data that is passed to each drawing callback.</p> </td></tr> <tr><td class="val" id="clip_box">clip_box</td><td class="desc"> <p>An optional span clipping box expressed in <em>integer</em> pixels (not in 26.6 fixed-point units).</p> </td></tr> </table> <h4>note</h4> <p>The <code><a href="ft2-raster.html#ft_raster_flag_xxx">FT_RASTER_FLAG_AA</a></code> bit flag must be set in the <code>flags</code> to generate an anti-aliased glyph bitmap, otherwise a monochrome bitmap is generated. The <code>target</code> should have appropriate pixel mode and its dimensions define the clipping region.</p> <p>If both <code><a href="ft2-raster.html#ft_raster_flag_xxx">FT_RASTER_FLAG_AA</a></code> and <code><a href="ft2-raster.html#ft_raster_flag_xxx">FT_RASTER_FLAG_DIRECT</a></code> bit flags are set in <code>flags</code>, the raster calls an <code><a href="ft2-raster.html#ft_spanfunc">FT_SpanFunc</a></code> callback <code>gray_spans</code> with <code>user</code> data as an argument ignoring <code>target</code>. This allows direct composition over a pre-existing user surface to perform the span drawing and composition. To optionally clip the spans, set the <code><a href="ft2-raster.html#ft_raster_flag_xxx">FT_RASTER_FLAG_CLIP</a></code> flag and <code>clip_box</code>. The monochrome raster does not support the direct mode.</p> <p>The gray-level rasterizer always uses 256 gray levels. If you want fewer gray levels, you have to use <code><a href="ft2-raster.html#ft_raster_flag_xxx">FT_RASTER_FLAG_DIRECT</a></code> and reduce the levels in the callback function.</p> <hr> <h2 id="ft_raster_flag_xxx">FT_RASTER_FLAG_XXX<a class="headerlink" href="#ft_raster_flag_xxx" title="Permanent link">&para;</a></h2> <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p> <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <a href="ft2-raster.html#ft_raster_flag_default">FT_RASTER_FLAG_DEFAULT</a> 0x0 #<span class="keyword">define</span> <a href="ft2-raster.html#ft_raster_flag_aa">FT_RASTER_FLAG_AA</a> 0x1 #<span class="keyword">define</span> <a href="ft2-raster.html#ft_raster_flag_direct">FT_RASTER_FLAG_DIRECT</a> 0x2 #<span class="keyword">define</span> <a href="ft2-raster.html#ft_raster_flag_clip">FT_RASTER_FLAG_CLIP</a> 0x4 #<span class="keyword">define</span> <a href="ft2-raster.html#ft_raster_flag_sdf">FT_RASTER_FLAG_SDF</a> 0x8 /* these constants are deprecated; use the corresponding */ /* `<b>FT_RASTER_FLAG_XXX</b>` values instead */ #<span class="keyword">define</span> ft_raster_flag_default <a href="ft2-raster.html#ft_raster_flag_default">FT_RASTER_FLAG_DEFAULT</a> #<span class="keyword">define</span> ft_raster_flag_aa <a href="ft2-raster.html#ft_raster_flag_aa">FT_RASTER_FLAG_AA</a> #<span class="keyword">define</span> ft_raster_flag_direct <a href="ft2-raster.html#ft_raster_flag_direct">FT_RASTER_FLAG_DIRECT</a> #<span class="keyword">define</span> ft_raster_flag_clip <a href="ft2-raster.html#ft_raster_flag_clip">FT_RASTER_FLAG_CLIP</a> </code></pre></div> <p>A list of bit flag constants as used in the <code>flags</code> field of a <code><a href="ft2-raster.html#ft_raster_params">FT_Raster_Params</a></code> structure.</p> <h4>values</h4> <table class="fields"> <tr><td class="val" id="ft_raster_flag_default">FT_RASTER_FLAG_DEFAULT</td><td class="desc"> <p>This value is 0.</p> </td></tr> <tr><td class="val" id="ft_raster_flag_aa">FT_RASTER_FLAG_AA</td><td class="desc"> <p>This flag is set to indicate that an anti-aliased glyph image should be generated. Otherwise, it will be monochrome (1-bit).</p> </td></tr> <tr><td class="val" id="ft_raster_flag_direct">FT_RASTER_FLAG_DIRECT</td><td class="desc"> <p>This flag is set to indicate direct rendering. In this mode, client applications must provide their own span callback. This lets them directly draw or compose over an existing bitmap. If this bit is <em>not</em> set, the target pixmap's buffer <em>must</em> be zeroed before rendering and the output will be clipped to its size.</p> <p>Direct rendering is only possible with anti-aliased glyphs.</p> </td></tr> <tr><td class="val" id="ft_raster_flag_clip">FT_RASTER_FLAG_CLIP</td><td class="desc"> <p>This flag is only used in direct rendering mode. If set, the output will be clipped to a box specified in the <code>clip_box</code> field of the <code><a href="ft2-raster.html#ft_raster_params">FT_Raster_Params</a></code> structure. Otherwise, the <code>clip_box</code> is effectively set to the bounding box and all spans are generated.</p> </td></tr> <tr><td class="val" id="ft_raster_flag_sdf">FT_RASTER_FLAG_SDF</td><td class="desc"> <p>This flag is set to indicate that a signed distance field glyph image should be generated. This is only used while rendering with the <code><a href="ft2-base_interface.html#ft_render_mode">FT_RENDER_MODE_SDF</a></code> render mode.</p> </td></tr> </table> <hr> <h2 id="ft_raster">FT_Raster<a class="headerlink" href="#ft_raster" title="Permanent link">&para;</a></h2> <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_RasterRec_* <b>FT_Raster</b>; </code></pre></div> <p>An opaque handle (pointer) to a raster object. Each object can be used independently to convert an outline into a bitmap or pixmap.</p> <h4>note</h4> <p>In FreeType 2, all rasters are now encapsulated within specific <code><a href="ft2-module_management.html#ft_renderer">FT_Renderer</a></code> modules and only used in their context.</p> <hr> <h2 id="ft_raster_newfunc">FT_Raster_NewFunc<a class="headerlink" href="#ft_raster_newfunc" title="Permanent link">&para;</a></h2> <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">int</span> (*<b>FT_Raster_NewFunc</b>)( <span class="keyword">void</span>* memory, <a href="ft2-raster.html#ft_raster">FT_Raster</a>* raster ); #<span class="keyword">define</span> FT_Raster_New_Func <b>FT_Raster_NewFunc</b> </code></pre></div> <p>A function used to create a new raster object.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="memory">memory</td><td class="desc"> <p>A handle to the memory allocator.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="raster">raster</td><td class="desc"> <p>A handle to the new raster object.</p> </td></tr> </table> <h4>return</h4> <p>Error code. 0&nbsp;means success.</p> <h4>note</h4> <p>The <code>memory</code> parameter is a typeless pointer in order to avoid un-wanted dependencies on the rest of the FreeType code. In practice, it is an <code><a href="ft2-system_interface.html#ft_memory">FT_Memory</a></code> object, i.e., a handle to the standard FreeType memory allocator. However, this field can be completely ignored by a given raster implementation.</p> <hr> <h2 id="ft_raster_donefunc">FT_Raster_DoneFunc<a class="headerlink" href="#ft_raster_donefunc" title="Permanent link">&para;</a></h2> <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">void</span> (*<b>FT_Raster_DoneFunc</b>)( <a href="ft2-raster.html#ft_raster">FT_Raster</a> raster ); #<span class="keyword">define</span> FT_Raster_Done_Func <b>FT_Raster_DoneFunc</b> </code></pre></div> <p>A function used to destroy a given raster object.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="raster">raster</td><td class="desc"> <p>A handle to the raster object.</p> </td></tr> </table> <hr> <h2 id="ft_raster_resetfunc">FT_Raster_ResetFunc<a class="headerlink" href="#ft_raster_resetfunc" title="Permanent link">&para;</a></h2> <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">void</span> (*<b>FT_Raster_ResetFunc</b>)( <a href="ft2-raster.html#ft_raster">FT_Raster</a> raster, <span class="keyword">unsigned</span> <span class="keyword">char</span>* pool_base, <span class="keyword">unsigned</span> <span class="keyword">long</span> pool_size ); #<span class="keyword">define</span> FT_Raster_Reset_Func <b>FT_Raster_ResetFunc</b> </code></pre></div> <p>FreeType used to provide an area of memory called the &lsquo;render pool&rsquo; available to all registered rasterizers. This was not thread safe, however, and now FreeType never allocates this pool.</p> <p>This function is called after a new raster object is created.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="raster">raster</td><td class="desc"> <p>A handle to the new raster object.</p> </td></tr> <tr><td class="val" id="pool_base">pool_base</td><td class="desc"> <p>Previously, the address in memory of the render pool. Set this to <code>NULL</code>.</p> </td></tr> <tr><td class="val" id="pool_size">pool_size</td><td class="desc"> <p>Previously, the size in bytes of the render pool. Set this to 0.</p> </td></tr> </table> <h4>note</h4> <p>Rasterizers should rely on dynamic or stack allocation if they want to (a handle to the memory allocator is passed to the rasterizer constructor).</p> <hr> <h2 id="ft_raster_setmodefunc">FT_Raster_SetModeFunc<a class="headerlink" href="#ft_raster_setmodefunc" title="Permanent link">&para;</a></h2> <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">int</span> (*<b>FT_Raster_SetModeFunc</b>)( <a href="ft2-raster.html#ft_raster">FT_Raster</a> raster, <span class="keyword">unsigned</span> <span class="keyword">long</span> mode, <span class="keyword">void</span>* args ); #<span class="keyword">define</span> FT_Raster_Set_Mode_Func <b>FT_Raster_SetModeFunc</b> </code></pre></div> <p>This function is a generic facility to change modes or attributes in a given raster. This can be used for debugging purposes, or simply to allow implementation-specific &lsquo;features&rsquo; in a given raster module.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="raster">raster</td><td class="desc"> <p>A handle to the new raster object.</p> </td></tr> <tr><td class="val" id="mode">mode</td><td class="desc"> <p>A 4-byte tag used to name the mode or property.</p> </td></tr> <tr><td class="val" id="args">args</td><td class="desc"> <p>A pointer to the new mode/property to use.</p> </td></tr> </table> <hr> <h2 id="ft_raster_renderfunc">FT_Raster_RenderFunc<a class="headerlink" href="#ft_raster_renderfunc" title="Permanent link">&para;</a></h2> <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">int</span> (*<b>FT_Raster_RenderFunc</b>)( <a href="ft2-raster.html#ft_raster">FT_Raster</a> raster, <span class="keyword">const</span> <a href="ft2-raster.html#ft_raster_params">FT_Raster_Params</a>* params ); #<span class="keyword">define</span> FT_Raster_Render_Func <b>FT_Raster_RenderFunc</b> </code></pre></div> <p>Invoke a given raster to scan-convert a given glyph image into a target bitmap.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="raster">raster</td><td class="desc"> <p>A handle to the raster object.</p> </td></tr> <tr><td class="val" id="params">params</td><td class="desc"> <p>A pointer to an <code><a href="ft2-raster.html#ft_raster_params">FT_Raster_Params</a></code> structure used to store the rendering parameters.</p> </td></tr> </table> <h4>return</h4> <p>Error code. 0&nbsp;means success.</p> <h4>note</h4> <p>The exact format of the source image depends on the raster's glyph format defined in its <code><a href="ft2-raster.html#ft_raster_funcs">FT_Raster_Funcs</a></code> structure. It can be an <code><a href="ft2-outline_processing.html#ft_outline">FT_Outline</a></code> or anything else in order to support a large array of glyph formats.</p> <p>Note also that the render function can fail and return a <code>FT_Err_Unimplemented_Feature</code> error code if the raster used does not support direct composition.</p> <hr> <h2 id="ft_raster_funcs">FT_Raster_Funcs<a class="headerlink" href="#ft_raster_funcs" title="Permanent link">&para;</a></h2> <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Raster_Funcs_ { <a href="ft2-basic_types.html#ft_glyph_format">FT_Glyph_Format</a> glyph_format; <a href="ft2-raster.html#ft_raster_newfunc">FT_Raster_NewFunc</a> raster_new; <a href="ft2-raster.html#ft_raster_resetfunc">FT_Raster_ResetFunc</a> raster_reset; <a href="ft2-raster.html#ft_raster_setmodefunc">FT_Raster_SetModeFunc</a> raster_set_mode; <a href="ft2-raster.html#ft_raster_renderfunc">FT_Raster_RenderFunc</a> raster_render; <a href="ft2-raster.html#ft_raster_donefunc">FT_Raster_DoneFunc</a> raster_done; } <b>FT_Raster_Funcs</b>; </code></pre></div> <p>A structure used to describe a given raster class to the library.</p> <h4>fields</h4> <table class="fields"> <tr><td class="val" id="glyph_format">glyph_format</td><td class="desc"> <p>The supported glyph format for this raster.</p> </td></tr> <tr><td class="val" id="raster_new">raster_new</td><td class="desc"> <p>The raster constructor.</p> </td></tr> <tr><td class="val" id="raster_reset">raster_reset</td><td class="desc"> <p>Used to reset the render pool within the raster.</p> </td></tr> <tr><td class="val" id="raster_render">raster_render</td><td class="desc"> <p>A function to render a glyph into a given bitmap.</p> </td></tr> <tr><td class="val" id="raster_done">raster_done</td><td class="desc"> <p>The raster destructor.</p> </td></tr> </table> <hr> <h2 id="ft_raster_bittest_func">FT_Raster_BitTest_Func<a class="headerlink" href="#ft_raster_bittest_func" title="Permanent link">&para;</a></h2> <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">int</span> (*<b>FT_Raster_BitTest_Func</b>)( <span class="keyword">int</span> y, <span class="keyword">int</span> x, <span class="keyword">void</span>* user ); </code></pre></div> <p>Deprecated, unimplemented.</p> <hr> <h2 id="ft_raster_bitset_func">FT_Raster_BitSet_Func<a class="headerlink" href="#ft_raster_bitset_func" title="Permanent link">&para;</a></h2> <p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">void</span> (*<b>FT_Raster_BitSet_Func</b>)( <span class="keyword">int</span> y, <span class="keyword">int</span> x, <span class="keyword">void</span>* user ); </code></pre></div> <p>Deprecated, unimplemented.</p> <hr> </article> </div> </div> </main> <footer class="md-footer"> <nav class="md-footer__inner md-grid" aria-label="Footer"> <a href="ft2-bitmap_handling.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: Bitmap Handling" rel="prev"> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Previous </span> Bitmap Handling </div> </div> </a> <a href="ft2-glyph_stroker.html" class="md-footer__link md-footer__link--next" aria-label="Next: Glyph Stroker" rel="next"> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Next </span> Glyph Stroker </div> </div> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg> </div> </a> </nav> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-footer-copyright"> <div class="md-footer-copyright__highlight"> Copyright 2022 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>. </div> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"base": ".", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "assets/javascripts/workers/search.477d984a.min.js", "version": null}</script> <script src="assets/javascripts/bundle.82b56eb2.min.js"></script> <script src="javascripts/extra.js"></script> </body> </html>
whupdup/frame
real/third_party/freetype-2.12.0/docs/reference/ft2-raster.html
HTML
gpl-3.0
52,325
<!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="description" content="API Reference Documentation for FreeType-2.12.0"> <meta name="author" content="FreeType Contributors"> <link rel="icon" href="images/favico.ico"> <meta name="generator" content="mkdocs-1.2.1, mkdocs-material-7.1.9"> <title>SFNT Names - FreeType-2.12.0 API Reference</title> <link rel="stylesheet" href="assets/stylesheets/main.ca7ac06f.min.css"> <link rel="stylesheet" href="assets/stylesheets/palette.f1a3b89f.min.css"> <meta name="theme-color" content="#4cae4f"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback"> <style>:root{--md-text-font-family:"Noto Serif";--md-code-font-family:"Roboto Mono"}</style> <link rel="stylesheet" href="stylesheets/extra.css"> </head> <body dir="ltr" data-md-color-scheme="" data-md-color-primary="green" data-md-color-accent="green"> <script>function __prefix(e){return new URL(".",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <label class="md-overlay" for="__drawer"></label> <div data-md-component="skip"> <a href="#sfnt-names" class="md-skip"> Skip to content </a> </div> <div data-md-component="announce"> </div> <header class="md-header" data-md-component="header"> <nav class="md-header__inner md-grid" aria-label="Header"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> <label class="md-header__button md-icon" for="__drawer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg> </label> <div class="md-header__title" data-md-component="header-title"> <div class="md-header__ellipsis"> <div class="md-header__topic"> <span class="md-ellipsis"> FreeType-2.12.0 API Reference </span> </div> <div class="md-header__topic" data-md-component="header-topic"> <span class="md-ellipsis"> SFNT Names </span> </div> </div> </div> <label class="md-header__button md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> </label> <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required> <label class="md-search__icon md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </label> <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg> </button> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" data-md-scrollfix> <div class="md-search-result" data-md-component="search-result"> <div class="md-search-result__meta"> Initializing search </div> <ol class="md-search-result__list"></ol> </div> </div> </div> </div> </div> </nav> </header> <div class="md-container" data-md-component="container"> <main class="md-main" data-md-component="main"> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <label class="md-nav__title" for="__drawer"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> FreeType-2.12.0 API Reference </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="index.html" class="md-nav__link"> TOC </a> </li> <li class="md-nav__item"> <a href="ft2-index.html" class="md-nav__link"> Index </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" > <label class="md-nav__link" for="__nav_3"> General Remarks <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="General Remarks" data-md-level="1"> <label class="md-nav__title" for="__nav_3"> <span class="md-nav__icon md-icon"></span> General Remarks </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-preamble.html" class="md-nav__link"> Preamble </a> </li> <li class="md-nav__item"> <a href="ft2-header_inclusion.html" class="md-nav__link"> FreeType's header inclusion scheme </a> </li> <li class="md-nav__item"> <a href="ft2-user_allocation.html" class="md-nav__link"> User allocation </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" > <label class="md-nav__link" for="__nav_4"> Core API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Core API" data-md-level="1"> <label class="md-nav__title" for="__nav_4"> <span class="md-nav__icon md-icon"></span> Core API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-version.html" class="md-nav__link"> FreeType Version </a> </li> <li class="md-nav__item"> <a href="ft2-basic_types.html" class="md-nav__link"> Basic Data Types </a> </li> <li class="md-nav__item"> <a href="ft2-base_interface.html" class="md-nav__link"> Base Interface </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_variants.html" class="md-nav__link"> Unicode Variation Sequences </a> </li> <li class="md-nav__item"> <a href="ft2-color_management.html" class="md-nav__link"> Glyph Color Management </a> </li> <li class="md-nav__item"> <a href="ft2-layer_management.html" class="md-nav__link"> Glyph Layer Management </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_management.html" class="md-nav__link"> Glyph Management </a> </li> <li class="md-nav__item"> <a href="ft2-mac_specific.html" class="md-nav__link"> Mac Specific Interface </a> </li> <li class="md-nav__item"> <a href="ft2-sizes_management.html" class="md-nav__link"> Size Management </a> </li> <li class="md-nav__item"> <a href="ft2-header_file_macros.html" class="md-nav__link"> Header File Macros </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--active md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" checked> <label class="md-nav__link" for="__nav_5"> Format-Specific API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Format-Specific API" data-md-level="1"> <label class="md-nav__title" for="__nav_5"> <span class="md-nav__icon md-icon"></span> Format-Specific API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-multiple_masters.html" class="md-nav__link"> Multiple Masters </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_tables.html" class="md-nav__link"> TrueType Tables </a> </li> <li class="md-nav__item"> <a href="ft2-type1_tables.html" class="md-nav__link"> Type 1 Tables </a> </li> <li class="md-nav__item md-nav__item--active"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <label class="md-nav__link md-nav__link--active" for="__toc"> SFNT Names <span class="md-nav__icon md-icon"></span> </label> <a href="ft2-sfnt_names.html" class="md-nav__link md-nav__link--active"> SFNT Names </a> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_sfntname" class="md-nav__link"> FT_SfntName </a> </li> <li class="md-nav__item"> <a href="#ft_get_sfnt_name_count" class="md-nav__link"> FT_Get_Sfnt_Name_Count </a> </li> <li class="md-nav__item"> <a href="#ft_get_sfnt_name" class="md-nav__link"> FT_Get_Sfnt_Name </a> </li> <li class="md-nav__item"> <a href="#ft_sfntlangtag" class="md-nav__link"> FT_SfntLangTag </a> </li> <li class="md-nav__item"> <a href="#ft_get_sfnt_langtag" class="md-nav__link"> FT_Get_Sfnt_LangTag </a> </li> </ul> </nav> </li> <li class="md-nav__item"> <a href="ft2-bdf_fonts.html" class="md-nav__link"> BDF and PCF Files </a> </li> <li class="md-nav__item"> <a href="ft2-cid_fonts.html" class="md-nav__link"> CID Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-pfr_fonts.html" class="md-nav__link"> PFR Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-winfnt_fonts.html" class="md-nav__link"> Window FNT Files </a> </li> <li class="md-nav__item"> <a href="ft2-svg_fonts.html" class="md-nav__link"> OpenType SVG Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-font_formats.html" class="md-nav__link"> Font Formats </a> </li> <li class="md-nav__item"> <a href="ft2-gasp_table.html" class="md-nav__link"> Gasp Table </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" > <label class="md-nav__link" for="__nav_6"> Controlling FreeType Modules <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Controlling FreeType Modules" data-md-level="1"> <label class="md-nav__title" for="__nav_6"> <span class="md-nav__icon md-icon"></span> Controlling FreeType Modules </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-auto_hinter.html" class="md-nav__link"> The auto-hinter </a> </li> <li class="md-nav__item"> <a href="ft2-cff_driver.html" class="md-nav__link"> The CFF driver </a> </li> <li class="md-nav__item"> <a href="ft2-t1_cid_driver.html" class="md-nav__link"> The Type 1 and CID drivers </a> </li> <li class="md-nav__item"> <a href="ft2-tt_driver.html" class="md-nav__link"> The TrueType driver </a> </li> <li class="md-nav__item"> <a href="ft2-pcf_driver.html" class="md-nav__link"> The PCF driver </a> </li> <li class="md-nav__item"> <a href="ft2-ot_svg_driver.html" class="md-nav__link"> The SVG driver </a> </li> <li class="md-nav__item"> <a href="ft2-properties.html" class="md-nav__link"> Driver properties </a> </li> <li class="md-nav__item"> <a href="ft2-parameter_tags.html" class="md-nav__link"> Parameter Tags </a> </li> <li class="md-nav__item"> <a href="ft2-lcd_rendering.html" class="md-nav__link"> Subpixel Rendering </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" > <label class="md-nav__link" for="__nav_7"> Cache Sub-System <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1"> <label class="md-nav__title" for="__nav_7"> <span class="md-nav__icon md-icon"></span> Cache Sub-System </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-cache_subsystem.html" class="md-nav__link"> Cache Sub-System </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" > <label class="md-nav__link" for="__nav_8"> Support API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Support API" data-md-level="1"> <label class="md-nav__title" for="__nav_8"> <span class="md-nav__icon md-icon"></span> Support API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-computations.html" class="md-nav__link"> Computations </a> </li> <li class="md-nav__item"> <a href="ft2-list_processing.html" class="md-nav__link"> List Processing </a> </li> <li class="md-nav__item"> <a href="ft2-outline_processing.html" class="md-nav__link"> Outline Processing </a> </li> <li class="md-nav__item"> <a href="ft2-quick_advance.html" class="md-nav__link"> Quick retrieval of advance values </a> </li> <li class="md-nav__item"> <a href="ft2-bitmap_handling.html" class="md-nav__link"> Bitmap Handling </a> </li> <li class="md-nav__item"> <a href="ft2-raster.html" class="md-nav__link"> Scanline Converter </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_stroker.html" class="md-nav__link"> Glyph Stroker </a> </li> <li class="md-nav__item"> <a href="ft2-system_interface.html" class="md-nav__link"> System Interface </a> </li> <li class="md-nav__item"> <a href="ft2-module_management.html" class="md-nav__link"> Module Management </a> </li> <li class="md-nav__item"> <a href="ft2-gzip.html" class="md-nav__link"> GZIP Streams </a> </li> <li class="md-nav__item"> <a href="ft2-lzw.html" class="md-nav__link"> LZW Streams </a> </li> <li class="md-nav__item"> <a href="ft2-bzip2.html" class="md-nav__link"> BZIP2 Streams </a> </li> <li class="md-nav__item"> <a href="ft2-debugging_apis.html" class="md-nav__link"> External Debugging APIs </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" > <label class="md-nav__link" for="__nav_9"> Error Codes <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Error Codes" data-md-level="1"> <label class="md-nav__title" for="__nav_9"> <span class="md-nav__icon md-icon"></span> Error Codes </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-error_enumerations.html" class="md-nav__link"> Error Enumerations </a> </li> <li class="md-nav__item"> <a href="ft2-error_code_values.html" class="md-nav__link"> Error Code Values </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" > <label class="md-nav__link" for="__nav_10"> Miscellaneous <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1"> <label class="md-nav__title" for="__nav_10"> <span class="md-nav__icon md-icon"></span> Miscellaneous </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-gx_validation.html" class="md-nav__link"> TrueTypeGX/AAT Validation </a> </li> <li class="md-nav__item"> <a href="ft2-incremental.html" class="md-nav__link"> Incremental Loading </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_engine.html" class="md-nav__link"> The TrueType Engine </a> </li> <li class="md-nav__item"> <a href="ft2-ot_validation.html" class="md-nav__link"> OpenType Validation </a> </li> </ul> </nav> </li> </ul> </nav> </div> </div> </div> <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_sfntname" class="md-nav__link"> FT_SfntName </a> </li> <li class="md-nav__item"> <a href="#ft_get_sfnt_name_count" class="md-nav__link"> FT_Get_Sfnt_Name_Count </a> </li> <li class="md-nav__item"> <a href="#ft_get_sfnt_name" class="md-nav__link"> FT_Get_Sfnt_Name </a> </li> <li class="md-nav__item"> <a href="#ft_sfntlangtag" class="md-nav__link"> FT_SfntLangTag </a> </li> <li class="md-nav__item"> <a href="#ft_get_sfnt_langtag" class="md-nav__link"> FT_Get_Sfnt_LangTag </a> </li> </ul> </nav> </div> </div> </div> <div class="md-content" data-md-component="content"> <article class="md-content__inner md-typeset"> <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; <a href="index.html#format-specific-api">Format-Specific API</a> &raquo; SFNT Names</p> <hr /> <h1 id="sfnt-names">SFNT Names<a class="headerlink" href="#sfnt-names" title="Permanent link">&para;</a></h1> <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2> <p>The TrueType and OpenType specifications allow the inclusion of a special names table (&lsquo;name&rsquo;) in font files. This table contains textual (and internationalized) information regarding the font, like family name, copyright, version, etc.</p> <p>The definitions below are used to access them if available.</p> <p>Note that this has nothing to do with glyph names!</p> <h2 id="ft_sfntname">FT_SfntName<a class="headerlink" href="#ft_sfntname" title="Permanent link">&para;</a></h2> <p>Defined in FT_SFNT_NAMES_H (freetype/ftsnames.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_SfntName_ { <a href="ft2-basic_types.html#ft_ushort">FT_UShort</a> platform_id; <a href="ft2-basic_types.html#ft_ushort">FT_UShort</a> encoding_id; <a href="ft2-basic_types.html#ft_ushort">FT_UShort</a> language_id; <a href="ft2-basic_types.html#ft_ushort">FT_UShort</a> name_id; <a href="ft2-basic_types.html#ft_byte">FT_Byte</a>* string; /* this string is *not* null-terminated! */ <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> string_len; /* in bytes */ } <b>FT_SfntName</b>; </code></pre></div> <p>A structure used to model an SFNT &lsquo;name&rsquo; table entry.</p> <h4>fields</h4> <table class="fields"> <tr><td class="val" id="platform_id">platform_id</td><td class="desc"> <p>The platform ID for <code>string</code>. See <code><a href="ft2-truetype_tables.html#tt_platform_xxx">TT_PLATFORM_XXX</a></code> for possible values.</p> </td></tr> <tr><td class="val" id="encoding_id">encoding_id</td><td class="desc"> <p>The encoding ID for <code>string</code>. See <code><a href="ft2-truetype_tables.html#tt_apple_id_xxx">TT_APPLE_ID_XXX</a></code>, <code><a href="ft2-truetype_tables.html#tt_mac_id_xxx">TT_MAC_ID_XXX</a></code>, <code><a href="ft2-truetype_tables.html#tt_iso_id_xxx">TT_ISO_ID_XXX</a></code>, <code><a href="ft2-truetype_tables.html#tt_ms_id_xxx">TT_MS_ID_XXX</a></code>, and <code><a href="ft2-truetype_tables.html#tt_adobe_id_xxx">TT_ADOBE_ID_XXX</a></code> for possible values.</p> </td></tr> <tr><td class="val" id="language_id">language_id</td><td class="desc"> <p>The language ID for <code>string</code>. See <code><a href="ft2-truetype_tables.html#tt_mac_langid_xxx">TT_MAC_LANGID_XXX</a></code> and <code><a href="ft2-truetype_tables.html#tt_ms_langid_xxx">TT_MS_LANGID_XXX</a></code> for possible values.</p> <p>Registered OpenType values for <code>language_id</code> are always smaller than 0x8000; values equal or larger than 0x8000 usually indicate a language tag string (introduced in OpenType version 1.6). Use function <code><a href="ft2-sfnt_names.html#ft_get_sfnt_langtag">FT_Get_Sfnt_LangTag</a></code> with <code>language_id</code> as its argument to retrieve the associated language tag.</p> </td></tr> <tr><td class="val" id="name_id">name_id</td><td class="desc"> <p>An identifier for <code>string</code>. See <code><a href="ft2-truetype_tables.html#tt_name_id_xxx">TT_NAME_ID_XXX</a></code> for possible values.</p> </td></tr> <tr><td class="val" id="string">string</td><td class="desc"> <p>The &lsquo;name&rsquo; string. Note that its format differs depending on the (platform,encoding) pair, being either a string of bytes (without a terminating <code>NULL</code> byte) or containing UTF-16BE entities.</p> </td></tr> <tr><td class="val" id="string_len">string_len</td><td class="desc"> <p>The length of <code>string</code> in bytes.</p> </td></tr> </table> <h4>note</h4> <p>Please refer to the TrueType or OpenType specification for more details.</p> <hr> <h2 id="ft_get_sfnt_name_count">FT_Get_Sfnt_Name_Count<a class="headerlink" href="#ft_get_sfnt_name_count" title="Permanent link">&para;</a></h2> <p>Defined in FT_SFNT_NAMES_H (freetype/ftsnames.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> ) <b>FT_Get_Sfnt_Name_Count</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a> face ); </code></pre></div> <p>Retrieve the number of name strings in the SFNT &lsquo;name&rsquo; table.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="face">face</td><td class="desc"> <p>A handle to the source face.</p> </td></tr> </table> <h4>return</h4> <p>The number of strings in the &lsquo;name&rsquo; table.</p> <h4>note</h4> <p>This function always returns an error if the config macro <code>TT_CONFIG_OPTION_SFNT_NAMES</code> is not defined in <code>ftoption.h</code>.</p> <hr> <h2 id="ft_get_sfnt_name">FT_Get_Sfnt_Name<a class="headerlink" href="#ft_get_sfnt_name" title="Permanent link">&para;</a></h2> <p>Defined in FT_SFNT_NAMES_H (freetype/ftsnames.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Get_Sfnt_Name</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a> face, <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> idx, <a href="ft2-sfnt_names.html#ft_sfntname">FT_SfntName</a> *aname ); </code></pre></div> <p>Retrieve a string of the SFNT &lsquo;name&rsquo; table for a given index.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="face">face</td><td class="desc"> <p>A handle to the source face.</p> </td></tr> <tr><td class="val" id="idx">idx</td><td class="desc"> <p>The index of the &lsquo;name&rsquo; string.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="aname">aname</td><td class="desc"> <p>The indexed <code><a href="ft2-sfnt_names.html#ft_sfntname">FT_SfntName</a></code> structure.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>The <code>string</code> array returned in the <code>aname</code> structure is not null-terminated. Note that you don't have to deallocate <code>string</code> by yourself; FreeType takes care of it if you call <code><a href="ft2-base_interface.html#ft_done_face">FT_Done_Face</a></code>.</p> <p>Use <code><a href="ft2-sfnt_names.html#ft_get_sfnt_name_count">FT_Get_Sfnt_Name_Count</a></code> to get the total number of available &lsquo;name&rsquo; table entries, then do a loop until you get the right platform, encoding, and name ID.</p> <p>&lsquo;name&rsquo; table format&nbsp;1 entries can use language tags also, see <code><a href="ft2-sfnt_names.html#ft_get_sfnt_langtag">FT_Get_Sfnt_LangTag</a></code>.</p> <p>This function always returns an error if the config macro <code>TT_CONFIG_OPTION_SFNT_NAMES</code> is not defined in <code>ftoption.h</code>.</p> <hr> <h2 id="ft_sfntlangtag">FT_SfntLangTag<a class="headerlink" href="#ft_sfntlangtag" title="Permanent link">&para;</a></h2> <p>Defined in FT_SFNT_NAMES_H (freetype/ftsnames.h).</p> <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_SfntLangTag_ { <a href="ft2-basic_types.html#ft_byte">FT_Byte</a>* string; /* this string is *not* null-terminated! */ <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> string_len; /* in bytes */ } <b>FT_SfntLangTag</b>; </code></pre></div> <p>A structure to model a language tag entry from an SFNT &lsquo;name&rsquo; table.</p> <h4>fields</h4> <table class="fields"> <tr><td class="val" id="string">string</td><td class="desc"> <p>The language tag string, encoded in UTF-16BE (without trailing <code>NULL</code> bytes).</p> </td></tr> <tr><td class="val" id="string_len">string_len</td><td class="desc"> <p>The length of <code>string</code> in <strong>bytes</strong>.</p> </td></tr> </table> <h4>note</h4> <p>Please refer to the TrueType or OpenType specification for more details.</p> <h4>since</h4> <p>2.8</p> <hr> <h2 id="ft_get_sfnt_langtag">FT_Get_Sfnt_LangTag<a class="headerlink" href="#ft_get_sfnt_langtag" title="Permanent link">&para;</a></h2> <p>Defined in FT_SFNT_NAMES_H (freetype/ftsnames.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Get_Sfnt_LangTag</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a> face, <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> langID, <a href="ft2-sfnt_names.html#ft_sfntlangtag">FT_SfntLangTag</a> *alangTag ); </code></pre></div> <p>Retrieve the language tag associated with a language ID of an SFNT &lsquo;name&rsquo; table entry.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="face">face</td><td class="desc"> <p>A handle to the source face.</p> </td></tr> <tr><td class="val" id="langid">langID</td><td class="desc"> <p>The language ID, as returned by <code><a href="ft2-sfnt_names.html#ft_get_sfnt_name">FT_Get_Sfnt_Name</a></code>. This is always a value larger than 0x8000.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="alangtag">alangTag</td><td class="desc"> <p>The language tag associated with the &lsquo;name&rsquo; table entry's language ID.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>The <code>string</code> array returned in the <code>alangTag</code> structure is not null-terminated. Note that you don't have to deallocate <code>string</code> by yourself; FreeType takes care of it if you call <code><a href="ft2-base_interface.html#ft_done_face">FT_Done_Face</a></code>.</p> <p>Only &lsquo;name&rsquo; table format&nbsp;1 supports language tags. For format&nbsp;0 tables, this function always returns FT_Err_Invalid_Table. For invalid format&nbsp;1 language ID values, FT_Err_Invalid_Argument is returned.</p> <p>This function always returns an error if the config macro <code>TT_CONFIG_OPTION_SFNT_NAMES</code> is not defined in <code>ftoption.h</code>.</p> <h4>since</h4> <p>2.8</p> <hr> </article> </div> </div> </main> <footer class="md-footer"> <nav class="md-footer__inner md-grid" aria-label="Footer"> <a href="ft2-type1_tables.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: Type 1 Tables" rel="prev"> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Previous </span> Type 1 Tables </div> </div> </a> <a href="ft2-bdf_fonts.html" class="md-footer__link md-footer__link--next" aria-label="Next: BDF and PCF Files" rel="next"> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Next </span> BDF and PCF Files </div> </div> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg> </div> </a> </nav> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-footer-copyright"> <div class="md-footer-copyright__highlight"> Copyright 2022 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>. </div> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"base": ".", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "assets/javascripts/workers/search.477d984a.min.js", "version": null}</script> <script src="assets/javascripts/bundle.82b56eb2.min.js"></script> <script src="javascripts/extra.js"></script> </body> </html>
whupdup/frame
real/third_party/freetype-2.12.0/docs/reference/ft2-sfnt_names.html
HTML
gpl-3.0
37,950
<!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="description" content="API Reference Documentation for FreeType-2.12.0"> <meta name="author" content="FreeType Contributors"> <link rel="icon" href="images/favico.ico"> <meta name="generator" content="mkdocs-1.2.1, mkdocs-material-7.1.9"> <title>Size Management - FreeType-2.12.0 API Reference</title> <link rel="stylesheet" href="assets/stylesheets/main.ca7ac06f.min.css"> <link rel="stylesheet" href="assets/stylesheets/palette.f1a3b89f.min.css"> <meta name="theme-color" content="#4cae4f"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback"> <style>:root{--md-text-font-family:"Noto Serif";--md-code-font-family:"Roboto Mono"}</style> <link rel="stylesheet" href="stylesheets/extra.css"> </head> <body dir="ltr" data-md-color-scheme="" data-md-color-primary="green" data-md-color-accent="green"> <script>function __prefix(e){return new URL(".",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <label class="md-overlay" for="__drawer"></label> <div data-md-component="skip"> <a href="#size-management" class="md-skip"> Skip to content </a> </div> <div data-md-component="announce"> </div> <header class="md-header" data-md-component="header"> <nav class="md-header__inner md-grid" aria-label="Header"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> <label class="md-header__button md-icon" for="__drawer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg> </label> <div class="md-header__title" data-md-component="header-title"> <div class="md-header__ellipsis"> <div class="md-header__topic"> <span class="md-ellipsis"> FreeType-2.12.0 API Reference </span> </div> <div class="md-header__topic" data-md-component="header-topic"> <span class="md-ellipsis"> Size Management </span> </div> </div> </div> <label class="md-header__button md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> </label> <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required> <label class="md-search__icon md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </label> <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg> </button> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" data-md-scrollfix> <div class="md-search-result" data-md-component="search-result"> <div class="md-search-result__meta"> Initializing search </div> <ol class="md-search-result__list"></ol> </div> </div> </div> </div> </div> </nav> </header> <div class="md-container" data-md-component="container"> <main class="md-main" data-md-component="main"> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <label class="md-nav__title" for="__drawer"> <a href="index.html" title="FreeType-2.12.0 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.12.0 API Reference" data-md-component="logo"> <img src="images/favico.ico" alt="logo"> </a> FreeType-2.12.0 API Reference </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="index.html" class="md-nav__link"> TOC </a> </li> <li class="md-nav__item"> <a href="ft2-index.html" class="md-nav__link"> Index </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" > <label class="md-nav__link" for="__nav_3"> General Remarks <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="General Remarks" data-md-level="1"> <label class="md-nav__title" for="__nav_3"> <span class="md-nav__icon md-icon"></span> General Remarks </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-preamble.html" class="md-nav__link"> Preamble </a> </li> <li class="md-nav__item"> <a href="ft2-header_inclusion.html" class="md-nav__link"> FreeType's header inclusion scheme </a> </li> <li class="md-nav__item"> <a href="ft2-user_allocation.html" class="md-nav__link"> User allocation </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--active md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" checked> <label class="md-nav__link" for="__nav_4"> Core API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Core API" data-md-level="1"> <label class="md-nav__title" for="__nav_4"> <span class="md-nav__icon md-icon"></span> Core API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-version.html" class="md-nav__link"> FreeType Version </a> </li> <li class="md-nav__item"> <a href="ft2-basic_types.html" class="md-nav__link"> Basic Data Types </a> </li> <li class="md-nav__item"> <a href="ft2-base_interface.html" class="md-nav__link"> Base Interface </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_variants.html" class="md-nav__link"> Unicode Variation Sequences </a> </li> <li class="md-nav__item"> <a href="ft2-color_management.html" class="md-nav__link"> Glyph Color Management </a> </li> <li class="md-nav__item"> <a href="ft2-layer_management.html" class="md-nav__link"> Glyph Layer Management </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_management.html" class="md-nav__link"> Glyph Management </a> </li> <li class="md-nav__item"> <a href="ft2-mac_specific.html" class="md-nav__link"> Mac Specific Interface </a> </li> <li class="md-nav__item md-nav__item--active"> <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc"> <label class="md-nav__link md-nav__link--active" for="__toc"> Size Management <span class="md-nav__icon md-icon"></span> </label> <a href="ft2-sizes_management.html" class="md-nav__link md-nav__link--active"> Size Management </a> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_new_size" class="md-nav__link"> FT_New_Size </a> </li> <li class="md-nav__item"> <a href="#ft_done_size" class="md-nav__link"> FT_Done_Size </a> </li> <li class="md-nav__item"> <a href="#ft_activate_size" class="md-nav__link"> FT_Activate_Size </a> </li> </ul> </nav> </li> <li class="md-nav__item"> <a href="ft2-header_file_macros.html" class="md-nav__link"> Header File Macros </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" > <label class="md-nav__link" for="__nav_5"> Format-Specific API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Format-Specific API" data-md-level="1"> <label class="md-nav__title" for="__nav_5"> <span class="md-nav__icon md-icon"></span> Format-Specific API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-multiple_masters.html" class="md-nav__link"> Multiple Masters </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_tables.html" class="md-nav__link"> TrueType Tables </a> </li> <li class="md-nav__item"> <a href="ft2-type1_tables.html" class="md-nav__link"> Type 1 Tables </a> </li> <li class="md-nav__item"> <a href="ft2-sfnt_names.html" class="md-nav__link"> SFNT Names </a> </li> <li class="md-nav__item"> <a href="ft2-bdf_fonts.html" class="md-nav__link"> BDF and PCF Files </a> </li> <li class="md-nav__item"> <a href="ft2-cid_fonts.html" class="md-nav__link"> CID Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-pfr_fonts.html" class="md-nav__link"> PFR Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-winfnt_fonts.html" class="md-nav__link"> Window FNT Files </a> </li> <li class="md-nav__item"> <a href="ft2-svg_fonts.html" class="md-nav__link"> OpenType SVG Fonts </a> </li> <li class="md-nav__item"> <a href="ft2-font_formats.html" class="md-nav__link"> Font Formats </a> </li> <li class="md-nav__item"> <a href="ft2-gasp_table.html" class="md-nav__link"> Gasp Table </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" > <label class="md-nav__link" for="__nav_6"> Controlling FreeType Modules <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Controlling FreeType Modules" data-md-level="1"> <label class="md-nav__title" for="__nav_6"> <span class="md-nav__icon md-icon"></span> Controlling FreeType Modules </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-auto_hinter.html" class="md-nav__link"> The auto-hinter </a> </li> <li class="md-nav__item"> <a href="ft2-cff_driver.html" class="md-nav__link"> The CFF driver </a> </li> <li class="md-nav__item"> <a href="ft2-t1_cid_driver.html" class="md-nav__link"> The Type 1 and CID drivers </a> </li> <li class="md-nav__item"> <a href="ft2-tt_driver.html" class="md-nav__link"> The TrueType driver </a> </li> <li class="md-nav__item"> <a href="ft2-pcf_driver.html" class="md-nav__link"> The PCF driver </a> </li> <li class="md-nav__item"> <a href="ft2-ot_svg_driver.html" class="md-nav__link"> The SVG driver </a> </li> <li class="md-nav__item"> <a href="ft2-properties.html" class="md-nav__link"> Driver properties </a> </li> <li class="md-nav__item"> <a href="ft2-parameter_tags.html" class="md-nav__link"> Parameter Tags </a> </li> <li class="md-nav__item"> <a href="ft2-lcd_rendering.html" class="md-nav__link"> Subpixel Rendering </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" > <label class="md-nav__link" for="__nav_7"> Cache Sub-System <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1"> <label class="md-nav__title" for="__nav_7"> <span class="md-nav__icon md-icon"></span> Cache Sub-System </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-cache_subsystem.html" class="md-nav__link"> Cache Sub-System </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" > <label class="md-nav__link" for="__nav_8"> Support API <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Support API" data-md-level="1"> <label class="md-nav__title" for="__nav_8"> <span class="md-nav__icon md-icon"></span> Support API </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-computations.html" class="md-nav__link"> Computations </a> </li> <li class="md-nav__item"> <a href="ft2-list_processing.html" class="md-nav__link"> List Processing </a> </li> <li class="md-nav__item"> <a href="ft2-outline_processing.html" class="md-nav__link"> Outline Processing </a> </li> <li class="md-nav__item"> <a href="ft2-quick_advance.html" class="md-nav__link"> Quick retrieval of advance values </a> </li> <li class="md-nav__item"> <a href="ft2-bitmap_handling.html" class="md-nav__link"> Bitmap Handling </a> </li> <li class="md-nav__item"> <a href="ft2-raster.html" class="md-nav__link"> Scanline Converter </a> </li> <li class="md-nav__item"> <a href="ft2-glyph_stroker.html" class="md-nav__link"> Glyph Stroker </a> </li> <li class="md-nav__item"> <a href="ft2-system_interface.html" class="md-nav__link"> System Interface </a> </li> <li class="md-nav__item"> <a href="ft2-module_management.html" class="md-nav__link"> Module Management </a> </li> <li class="md-nav__item"> <a href="ft2-gzip.html" class="md-nav__link"> GZIP Streams </a> </li> <li class="md-nav__item"> <a href="ft2-lzw.html" class="md-nav__link"> LZW Streams </a> </li> <li class="md-nav__item"> <a href="ft2-bzip2.html" class="md-nav__link"> BZIP2 Streams </a> </li> <li class="md-nav__item"> <a href="ft2-debugging_apis.html" class="md-nav__link"> External Debugging APIs </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" > <label class="md-nav__link" for="__nav_9"> Error Codes <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Error Codes" data-md-level="1"> <label class="md-nav__title" for="__nav_9"> <span class="md-nav__icon md-icon"></span> Error Codes </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-error_enumerations.html" class="md-nav__link"> Error Enumerations </a> </li> <li class="md-nav__item"> <a href="ft2-error_code_values.html" class="md-nav__link"> Error Code Values </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" > <label class="md-nav__link" for="__nav_10"> Miscellaneous <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1"> <label class="md-nav__title" for="__nav_10"> <span class="md-nav__icon md-icon"></span> Miscellaneous </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="ft2-gx_validation.html" class="md-nav__link"> TrueTypeGX/AAT Validation </a> </li> <li class="md-nav__item"> <a href="ft2-incremental.html" class="md-nav__link"> Incremental Loading </a> </li> <li class="md-nav__item"> <a href="ft2-truetype_engine.html" class="md-nav__link"> The TrueType Engine </a> </li> <li class="md-nav__item"> <a href="ft2-ot_validation.html" class="md-nav__link"> OpenType Validation </a> </li> </ul> </nav> </li> </ul> </nav> </div> </div> </div> <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#synopsis" class="md-nav__link"> Synopsis </a> </li> <li class="md-nav__item"> <a href="#ft_new_size" class="md-nav__link"> FT_New_Size </a> </li> <li class="md-nav__item"> <a href="#ft_done_size" class="md-nav__link"> FT_Done_Size </a> </li> <li class="md-nav__item"> <a href="#ft_activate_size" class="md-nav__link"> FT_Activate_Size </a> </li> </ul> </nav> </div> </div> </div> <div class="md-content" data-md-component="content"> <article class="md-content__inner md-typeset"> <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; <a href="index.html#core-api">Core API</a> &raquo; Size Management</p> <hr /> <h1 id="size-management">Size Management<a class="headerlink" href="#size-management" title="Permanent link">&para;</a></h1> <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2> <p>When creating a new face object (e.g., with <code><a href="ft2-base_interface.html#ft_new_face">FT_New_Face</a></code>), an <code><a href="ft2-base_interface.html#ft_size">FT_Size</a></code> object is automatically created and used to store all pixel-size dependent information, available in the <code>face-&gt;size</code> field.</p> <p>It is however possible to create more sizes for a given face, mostly in order to manage several character pixel sizes of the same font family and style. See <code><a href="ft2-sizes_management.html#ft_new_size">FT_New_Size</a></code> and <code><a href="ft2-sizes_management.html#ft_done_size">FT_Done_Size</a></code>.</p> <p>Note that <code><a href="ft2-base_interface.html#ft_set_pixel_sizes">FT_Set_Pixel_Sizes</a></code> and <code><a href="ft2-base_interface.html#ft_set_char_size">FT_Set_Char_Size</a></code> only modify the contents of the current &lsquo;active&rsquo; size; you thus need to use <code><a href="ft2-sizes_management.html#ft_activate_size">FT_Activate_Size</a></code> to change it.</p> <p>99% of applications won't need the functions provided here, especially if they use the caching sub-system, so be cautious when using these.</p> <h2 id="ft_new_size">FT_New_Size<a class="headerlink" href="#ft_new_size" title="Permanent link">&para;</a></h2> <p>Defined in FT_SIZES_H (freetype/ftsizes.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_New_Size</b>( <a href="ft2-base_interface.html#ft_face">FT_Face</a> face, <a href="ft2-base_interface.html#ft_size">FT_Size</a>* size ); </code></pre></div> <p>Create a new size object from a given face object.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="face">face</td><td class="desc"> <p>A handle to a parent face object.</p> </td></tr> </table> <h4>output</h4> <table class="fields"> <tr><td class="val" id="asize">asize</td><td class="desc"> <p>A handle to a new size object.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>You need to call <code><a href="ft2-sizes_management.html#ft_activate_size">FT_Activate_Size</a></code> in order to select the new size for upcoming calls to <code><a href="ft2-base_interface.html#ft_set_pixel_sizes">FT_Set_Pixel_Sizes</a></code>, <code><a href="ft2-base_interface.html#ft_set_char_size">FT_Set_Char_Size</a></code>, <code><a href="ft2-base_interface.html#ft_load_glyph">FT_Load_Glyph</a></code>, <code><a href="ft2-base_interface.html#ft_load_char">FT_Load_Char</a></code>, etc.</p> <hr> <h2 id="ft_done_size">FT_Done_Size<a class="headerlink" href="#ft_done_size" title="Permanent link">&para;</a></h2> <p>Defined in FT_SIZES_H (freetype/ftsizes.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Done_Size</b>( <a href="ft2-base_interface.html#ft_size">FT_Size</a> size ); </code></pre></div> <p>Discard a given size object. Note that <code><a href="ft2-base_interface.html#ft_done_face">FT_Done_Face</a></code> automatically discards all size objects allocated with <code><a href="ft2-sizes_management.html#ft_new_size">FT_New_Size</a></code>.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="size">size</td><td class="desc"> <p>A handle to a target size object.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <hr> <h2 id="ft_activate_size">FT_Activate_Size<a class="headerlink" href="#ft_activate_size" title="Permanent link">&para;</a></h2> <p>Defined in FT_SIZES_H (freetype/ftsizes.h).</p> <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> ) <b>FT_Activate_Size</b>( <a href="ft2-base_interface.html#ft_size">FT_Size</a> size ); </code></pre></div> <p>Even though it is possible to create several size objects for a given face (see <code><a href="ft2-sizes_management.html#ft_new_size">FT_New_Size</a></code> for details), functions like <code><a href="ft2-base_interface.html#ft_load_glyph">FT_Load_Glyph</a></code> or <code><a href="ft2-base_interface.html#ft_load_char">FT_Load_Char</a></code> only use the one that has been activated last to determine the &lsquo;current character pixel size&rsquo;.</p> <p>This function can be used to &lsquo;activate&rsquo; a previously created size object.</p> <h4>input</h4> <table class="fields"> <tr><td class="val" id="size">size</td><td class="desc"> <p>A handle to a target size object.</p> </td></tr> </table> <h4>return</h4> <p>FreeType error code. 0&nbsp;means success.</p> <h4>note</h4> <p>If <code>face</code> is the size's parent face object, this function changes the value of <code>face-&gt;size</code> to the input size handle.</p> <hr> </article> </div> </div> </main> <footer class="md-footer"> <nav class="md-footer__inner md-grid" aria-label="Footer"> <a href="ft2-mac_specific.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: Mac Specific Interface" rel="prev"> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> </div> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Previous </span> Mac Specific Interface </div> </div> </a> <a href="ft2-header_file_macros.html" class="md-footer__link md-footer__link--next" aria-label="Next: Header File Macros" rel="next"> <div class="md-footer__title"> <div class="md-ellipsis"> <span class="md-footer__direction"> Next </span> Header File Macros </div> </div> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg> </div> </a> </nav> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-footer-copyright"> <div class="md-footer-copyright__highlight"> Copyright 2022 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>. </div> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"base": ".", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "assets/javascripts/workers/search.477d984a.min.js", "version": null}</script> <script src="assets/javascripts/bundle.82b56eb2.min.js"></script> <script src="javascripts/extra.js"></script> </body> </html>
whupdup/frame
real/third_party/freetype-2.12.0/docs/reference/ft2-sizes_management.html
HTML
gpl-3.0
32,307