ÿþT h e w a y t o d o i t i s t o f i r s t g o t o
t t i n t e r p . c , t h e n a t t h e s t a r t o f t h e
f i l e d e c l a r e t w o v a r i a b l e s :
c h a r F T _ i n j e c t e d G E T I N F O h a c k = 0 ;
F T _ L o n g
F T _ i n j e c t e d G E T I N F O h a c k v a l u e ;
N o w h e r e ' s t h e t r i c k y p a r t . G o n e a r
l i n e 7 6 6 0 a n d f i n d t h e e n d i n g o f t h e
G E T I N F O f u n c t i o n . I t w o u l d l o o k
s o m e t h i n g l i k e t h i s :
# e n d i f / *
T T _ S U P P O R T _ S U B P I X E L _ H I N T I N G _ I N F I N A L I T Y
* /
a r g s [ 0 ] = K ;
}
S o t h e w a y t o a d d t h e i n t e r c e p t i s t o
t h e n p r o c e e d t o a d d c o d e t o o v e r w r i t e
t h e v a l u e :
# e n d i f / *
T T _ S U P P O R T _ S U B P I X E L _ H I N T I N G _ I N F I N A L I T Y
* /
i f ( F T _ i n j e c t e d G E T I N F O h a c k ) {
K = F T _ i n j e c t e d G E T I N F O h a c k v a l u e ;
}
a r g s [ 0 ] = K ;
}
W h a t w i l l p r o v i d e i n i t b e t t e r r e n d e r
r e s u l t ? O f c o u r s e , t h i s m a k e s t h e
G E T I N F O c u s t o m i z a b l e f o r u s e r s o f
F r e e T y p e ( t h a t i n c l u d e t h e F r e e T y p e
f i l e s i n t h e i r p r o g r a m s ) . T h e b e n e f i t s
o f i n t e r c e p t i o n c a n b e s e e n f o r
i n s t a n c e i n t h e v 3 8 r e n d e r e r .
D i s c l a i m e r : T h e s a m p l e i m a g e s a r e m a d e
w i t h v 3 8 F r e e T y p e b y t e c o d e , b u t t h e
o u t l i n e s a r e n o t r a s t e r i z e d w i t h
F r e e T y p e r a s t e r i z e r . T h e c o r r e c t g a s p
s e t t i n g f o r s y m m e t r i c s m o o t h i n g i s u s e d
i n t h e r e n d e r s , w i t h 6 × 1 o r 6 × 5
o v e r s a m p l i n g a n d t h e s u b p i x e l b o x
f i l t e r t o s i m u l a t e C l e a r T y p e .
F i r s t o f a l l , a c o m m e r c i a l f o n t i s
r e n d e r e d l i k e t h i s w h e n G E T I N F O i s n o t
i n t e r c e p t e d :
h t t p s : / / i . i m g u r . c o m / W 9 F S E z d . p n g
S i z e 1 8 p p e m a n d u p i s w h e r e i t g e t s
v e r y c o n t r o v e r s i a l i n r e n d e r i n g . I n
t h i s c a s e w h a t d e f a u l t v 3 8 F r e e T y p e
d o e s i s e n d u p w i t h f r a c t i o n a l
h o r i z o n t a l s t e m s . U s i n g V i s u a l T r u e T y p e
r e v e a l s t h a t t h e f o n t o n l y d o e s t h a t
w h e n f r a c t i o n a l w i d t h s a r e u s e d i n
C l e a r T y p e . H o w e v e r i t i s v e r y w o r r y i n g
t h a t t h i s i s d e f a u l t F r e e T y p e b e h a v i o r ,
a n d n o F T _ R E N D E R _ M O D E _ X X X i s d o c u m e n t e d
t o u s e a n i n t e g e r w i d t h v e r s i o n o f
s u b p i x e l h i n t i n g .
W h a t h a p p e n s w i t h t h e i n t e r c e p t e d
G E T I N F O ? I n t h e f o l l o w i n g i m a g e I u s e
t h e f o l l o w i n g s e t t i n g s :
F T _ i n j e c t e d G E T I N F O h a c k = 1 ;
F T _ i n j e c t e d G E T I N F O h a c k v a l u e =
0 x 0 0 0 0 6 C 0 0 ;
h t t p s : / / i . i m g u r . c o m / P u h G J 1 3 . p n g .
S u d d e n l y t h e p r o b l e m s w i t h f r a c t i o n a l
h o r i z o n t a l s t e m s d i s a p p e a r . T h i s w i l l
i n f a c t a l l o w t h e F r e e T y p e u s e r t o u s e
a c u s t o m G E T I N F O v a l u e , a n d G E T I N F O
( w h a t f o n t s s e e h o w t h e r e n d e r e r i s
l i k e ) b e c o m e s d e t a c h e d f r o m t h e
F r e e T y p e r e n d e r m o d e ( w h a t t h e r e n d e r e r
i s a c t u a l l y l i k e ) , a l l o w i n g f o r
p e r s o n a l i z e d r e n d e r e r s e t t i n g s .
H o w e v e r , e v e n w h e n t h e G E T I N F O i s
c h a n g e d t h e v 3 8 o r v 4 0 r e n d e r e r i s
s t i l l m i l e s f r o m b e i n g f i n i s h e d ,
e s p e c i a l l y c o n s i d e r i n g t h a t F r e e T y p e
d o e s n o t e v e n d i r e c t l y h a v e a p r o p e r
r a s t e r i z e r f o r t h e b a s e f o r m o f
s u b p i x e l h i n t i n g .