me again on embeded fonts
as you may have noticed, i managed type42 fonts. now i want to know if there's a smart way to use the deflate filter on the sfnts array, which contains the data from the ttf font. i tryed some ways, but i don't understand how to apply a filter only to a certain string..
for example, now i have the ttf definirion as a hex string <A3F4....>
but i want it as ascii85+deflated binary.
so, is there a way to replace
/sfnts [
<aaffffee....>
<aaffffee....>
...
<aaffffee....>
]
through some kind of
/sfnts [
<~!@#!#@@$#!$....~> /ASCII85Decode filter /FlateDecode filter
....
]
something?
on my images i've done it that way:
/Image {gsave
/ZData exch def /VHeight exch def
/VWidth exch def
/Height exch def
/Width exch def
/Y exch def
/X exch def
/Data ZData /FlateDecode filter def
X Y translate
VWidth VHeight scale
Width Height 8 [Width 0 0 Height neg 0 Height] Data false 3 colorimage
grestore
} def
34 486 143 17 107 13 {<~
Gb"/gl......!'EAV>^
~>} Image
thanks again
as you may have noticed, i managed type42 fonts. now i want to know if there's a smart way to use the deflate filter on the sfnts array, which contains the data from the ttf font. i tryed some ways, but i don't understand how to apply a filter only to a certain string..
for example, now i have the ttf definirion as a hex string <A3F4....>
but i want it as ascii85+deflated binary.
so, is there a way to replace
/sfnts [
<aaffffee....>
<aaffffee....>
...
<aaffffee....>
]
through some kind of
/sfnts [
<~!@#!#@@$#!$....~> /ASCII85Decode filter /FlateDecode filter
....
]
something?
on my images i've done it that way:
/Image {gsave
/ZData exch def /VHeight exch def
/VWidth exch def
/Height exch def
/Width exch def
/Y exch def
/X exch def
/Data ZData /FlateDecode filter def
X Y translate
VWidth VHeight scale
Width Height 8 [Width 0 0 Height neg 0 Height] Data false 3 colorimage
grestore
} def
34 486 143 17 107 13 {<~
Gb"/gl......!'EAV>^
~>} Image
thanks again