Linux-specific technical problems

Don Jungk linux at flippingdades.com
Wed Mar 14 21:09:20 EDT 2007


On Tuesday 13 March 2007 7:14 pm, Bob Warren wrote:
> --------------------------
> %!PS-Adobe-3.0

> /threequarters /questiondown /Agrave /Aacute /Acircumflex /Atilde
> /Adieresis /Aring /AE /Ccedilla /Egrave /Eacute /Ecircumflex /Edieresis
> /Igrave /Iacute /Icircumflex /Idieresis /Eth /Ntilde /Ograve /Oacute
> /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute
> /Ucircumflex /Udieresis /Yacute /Thorn /germandbls /agrave /aacute
> /acircumflex /atilde /adieresis /aring /ae /ccedilla /egrave /eacute
> /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis /eth
> /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash
> /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis ] def

>
> 14 /_Helvetica-Bold setFont
> 0 0 0 setrgbcolor

> --------------------------

> However, if there IS a workaround, or my impression is incorrect, I would
> like to know about it.
>
> Bob
Hi Bob,
OK, your PS file does have accented characters in it. It appears they are just 
in the wrong place. This code that I will paste in here is something I use 
when I have to re-encode a Macintosh font to work on my Linux computer. This 
should be put after all of the original encoding because it is going to 
change it. This list includes all of the characters that I need for Spanish. 
Put this in one of your PS files and see if it makes the letters á. é, í, ó, 
ú, ü, ñ appear correctly. If it does, we can add the others that you need.

****************************************
%Start Font Re-encoding Procedure
/reencsmalldict 12 dict def
/ReEncodeSmall
{ reencsmalldict begin
/newcodesandnames exch def
/newfontname exch def
/basefontname exch def
/basefontdict basefontname findfont def
/newfont basefontdict maxlength dict def
basefontdict
{ exch dup/FID ne
{ dup /Encoding eq
{ exch dup length array copy
newfont 3 1 roll put }
{ exch newfont 3 1 roll put }
ifelse
}
{ pop pop }
ifelse
} forall
newfont /FontName newfontname put
newcodesandnames aload pop
newcodesandnames length 2 idiv
{ newfont /Encoding get 3 1 roll put}
repeat
newfontname newfont definefont pop
end
} def
/spanvec[
8#341 /iacute
8#351 /eacute
8#355 /iacute
8#363 /oacute
8#372 /uacute
8#374 /udieresis
8#301 /Aacute
8#311 /Eacute
8#315 /Iacute
8#323 /Oacute
8#332 /Uacute
8#334 /Udieresis
8#361 /ntilde
8#321 /Ntilde
] def
%End Font Re-encoding Procedure
************************

After you have defined the re-encoding procedure, you have to apply it. This 
is what i use to re-encode Helvetica, Times and Courier in one of mine:

*********
%start Font Re-encoding
/Helvetica /Helvetica-Span spanvec
ReEncodeSmall
/Helvetica-Bold /Helvetica-Bold-Span spanvec
ReEncodeSmall
/Helvetica-Italic /Helvetica-Italic-Span spanvec
ReEncodeSmall
/Times-Roman /Times-Roman-Span spanvec
ReEncodeSmall
/Times-Bold /Times-Bold-Span spanvec
ReEncodeSmall
/Times-Italic /Times-Italic-Span spanvec
ReEncodeSmall
/Courier /Courier.Span spanvec
ReEncodeSmall
%End Font Re-encoding
***************

The last step is to change the line that names the font in the code. It is 
usually a line like:

/Helvetica findfont 14 setfont

But I see you have "14 /_Helvetica-Bold setfont" I think this means they have 
defined a procedure earlier for the findfont step. Probably you can just 
change the word Helvetica-Bold to Helvetica-Bold-Span

The suffix "-Span" is what I named my newly encoded font. You just add it to 
what ever font you are going to change.

I hope some of this works for you,

Don



More information about the use-livecode mailing list