Linux-specific technical problems

Bob Warren bobwarren at howsoft.com
Thu Mar 15 10:39:24 EDT 2007


Don Jungk wrote:

>  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. 
>   
Jacqueline Landman Gay wrote:
<snip>

Wow. That's just...wow. The level of expertise on this list never ceases 
to amaze me.

-----------------------------------------------------
And if that's your reaction, imagine mine! It's the first time I've even seen a Postscript file.
OK Don, thanks very much. I'll sit down calmly and see if I can manage to implement your suggestion, and when inevitably I have problems I'll get back to you. Tell you what, I'll include the whole PS file that does NOT work below. I did think of uploading it to my site, but in the end I decided that perhaps other users could more easily benefit from your explanations with the file in front of them. Perhaps some users will complain about the length of it, so I apologise in advance.

Jacque:

Thanks for your further suggested experiments. I'll come back with the answers, but it might take a little time because I have quite a lot of non-programming work to do over the next few days.

----------------------------------------------------------
THE FOLLOWING POSTSCRIPT FILE DOES NOT DISPLAY CORRECTLY USING THE EVINCE UTILITY IN UBUNTU:
----------------------------------------------------------

%!PS-Adobe-3.0
%%Creator: MetaCard 2.6.6
%%DocumentData: Clean8Bit
%%MCOrientation Portrait
%%BoundingBox: 72 72 540 720
%%EndComments
%%BeginProlog
        /isolatin1encoding [ /.notdef /.notdef /.notdef /.notdef /.notdef
        /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
        /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
        /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
        /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclam
        /quotedbl /numbersign /dollar /percent /ampersand /quoteright
        /parenleft /parenright /asterisk /plus /comma /minus /period /slash
        /zero /one /two /three /four /five /six /seven /eight /nine /colon
        /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H
        /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft
        /backslash /bracketright /asciicircum /underscore /quoteleft /a /b /c
        /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z
        /braceleft /bar /braceright /asciitilde /.notdef /.notdef /.notdef
        /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
        /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
        /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
        /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
        /.notdef /.notdef /space /exclamdown /cent /sterling /currency /yen
        /brokenbar /section /dieresis /copyright /ordfeminine /guillemotleft
        /logicalnot /hyphen /registered /macron /degree /plusminus
        /twosuperior /threesuperior /acute /mu /paragraph /periodcentered
        /cedilla /onesuperior /ordmasculine /guillemotright /onequarter
        /onehalf /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
        
        /symbolencoding [ /.notdef /.notdef /.notdef /.notdef /.notdef
        /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
        /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
        /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
        /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclam
        /universal /numbersign /existential /percent /ampersand /suchthat
        /parenleft /parenright /asteriskmath /plus /comma /minus /period
        /slash /zero /one /two /three /four /five /six /seven /eight /nine
        /colon /semicolon /less /equal /greater /question /congruent /Alpha
        /Beta /Chi /Delta /Epsilon /Phi /Gamma /Eta /Iota /theta1 /Kappa
        /Lambda /Mu /Nu /Omicron /Pi /Theta /Rho /Sigma /Tau /Upsilon /sigma1
        /Omega /Xi /Psi /Zeta /bracketleft /therefore /bracketright
        /perpendicular /underscore /radicalex /alpha /beta /chi /delta
        /epsilon /phi /gamma /eta /iota /phi1 /kappa /lambda /mu /nu /omicron
        /pi /theta /rho /sigma /tau /upsilon /omega1 /omega /xi /psi /zeta
        /braceleft /bar /braceright /similar /.notdef /.notdef /.notdef
        /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
        /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
        /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
        /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
        /.notdef /.notdef /.notdef /Upsilon1 /minute /lessequal /fraction
        /infinity /florin /club /diamond /heart /spade /arrowboth /arrowleft
        /arrowup /arrowright /arrowdown /degree /plusminus /second
        /greaterequal /multiply /proportional /partialdiff /bullet /divide
        /notequal /equivalence /approxequal /ellipsis /arrowvertex
        /arrowhorizex /carriagereturn /aleph /Ifraktur /Rfraktur /weierstrass
/circlemultiply /circleplus /emptyset /intersection /union
        /propersuperset /reflexsuperset /notsubset /propersubset /reflexsubset
        /element /notelement /angle /gradient /registerserif /copyrightserif
        /trademarkserif /product /radical /dotmath /logicalnot /logicaland
        /logicalor /arrowdblboth /arrowdblleft /arrowdblup /arrowdblright
        /arrowdbldown /lozenge /angleleft /registersans /copyrightsans
        /trademarksans /summation /parenlefttp /parenleftex /parenleftbt
        /bracketlefttp /bracketleftex /bracketleftbt /bracelefttp
        /braceleftmid /braceleftbt /braceex /apple /angleright /integral
        /integraltp /integralex /integralbt /parenrighttp /parenrightex
        /parenrightbt /bracketrighttp /bracketrightex /bracketrightbt
        /bracerighttp /bracerightmid /bracerightbt /.notdef ] def
        
        %ReEncoding, for reencoding character set of a font family
        %It expects three objects(input) on the stack:
        %  [array] /NewName /OldName
        %The array should contain pairs of
        % <numbers> <name>
        /RE {%def
        findfont begin
        currentdict dup length dict begin
        { %forall
        1 index /FID ne {def} {pop pop} ifelse
        } forall
        /FontName exch def dup length 0 ne { %if
        /Encoding Encoding 256 array copy def
        0 exch { %forall
        dup type /nametype eq { %ifelse
        Encoding 2 index 2 index put
        pop 1 add
        } { %else
        exch pop
        } ifelse
        } forall
        } if pop
        currentdict dup end end
        /FontName get exch definefont pop
        } bind def
        
        %usage: width height LLx LLy FR  Fill-Rectangle
        /FR { %def
        gsave
        newpath
        moveto
        1 index 0 rlineto
        0 exch rlineto
        neg 0 rlineto
        closepath fill
        grestore
        } bind def
        
%usage: width height LLx LLy R    Rectangle routine
        /R { %def
        gsave
        newpath
        moveto 
        1 index 0 rlineto
        0 exch rlineto
        neg 0 rlineto
        closepath
        stroke
        grestore
        } bind def
        
        %usage: topLeftx, topLefty, width, height, radius  FRR
        /FRR { %def  (tlx tly w h r --)  Fill Rounded Rectangle
        gsave
        matrix currentmatrix
        newpath 6 1 roll 5 -2 roll translate
        dup 0 exch neg moveto
        mark 0 3 index neg 5 index 5 index neg 5 index arcto cleartomark
        mark 3 index 3 index neg 5 index 0 5 index arcto cleartomark
        mark 3 index 0 0 0 5 index arcto cleartomark
        mark 0 0 0 5 index neg 5 index arcto cleartomark
        closepath pop pop pop fill setmatrix
        grestore
        } bind def
        
        %usage: topLeftx, topLefty, width, height, radius  RR
        /RR { %def  (tlx tly w h r --)  Draw Rounded Rectangle
        gsave
        matrix currentmatrix
        newpath 6 1 roll 5 -2 roll translate
        dup 0 exch neg moveto
        mark 0 3 index neg 5 index 5 index neg 5 index arcto cleartomark
        mark 3 index 3 index neg 5 index 0 5 index arcto cleartomark
        mark 3 index 0 0 0 5 index arcto cleartomark
        mark 0 0 0 5 index neg 5 index arcto cleartomark
        closepath  pop pop pop  stroke setmatrix
        grestore
        } bind def
        
        %usage: width height LLx LLy CLP  set clipping rectangle
        /CLP { %def 
        newpath moveto
        1 index 0 rlineto
        0 exch rlineto
        neg 0 rlineto
        closepath clip
        } bind def
        
        %usage: tx ty fx fy L
        /L { %def
        gsave newpath
        moveto lineto stroke
        grestore
        } bind def
        
        %usage: pn.x pn.y ... p1.x p1.y Count  LS %%print a line w/points 
        /LS { %def Draws connected line segments
        gsave newpath
        3 1 roll
        moveto
        {lineto} repeat stroke
        grestore
        } bind def
        
%usage: pn.x pn.y ... p1.x p1.y Count  CLS %%print a line w/points 
        /CLS { %def Draws connected line segments AND CLOSE path
        gsave newpath
        3 1 roll
        moveto
        {lineto} repeat 
        closepath
        stroke
        grestore
        } bind def
        
        %usage: (Hello!) 72 512 T
        /T { %def
        gsave moveto show
        grestore
        } bind def
        
        %parameters: # of char -1, ScreenTextWidth, string, x, y, AT(Ajusted Text)
        %usage: 120 8 (Hello!) 72 512 AT
        /AT { %def
        gsave moveto
        dup                        %duplicate a copy of the String
        4 1 roll                   %move one copy of string to the bottom of stack
        stringwidth pop            %get PS string width and pop the Height out(no need)
        sub 
        exch
        div 
        0 3 2 roll ashow
        grestore
        } bind def
        
        %usage: 10 /Times-Roman setFont
        %if findfont command failed, we substitue with Helvetica default font
        %if findfont command does not failed, it may substitute the font specified with
        %system own default, we want to replace it with Helvetica too.
        /setFont { %def
        dup
        { findfont } stopped 
        { %execution stopped if can't find specified font
        pop pop /_Helvetica findfont exch scalefont setfont %replace with Helvetica
        }
        { %found the font specified or replace with a system font
        dup                      %dup the font dictionary
        4 1 roll 
        /FontName get eq         %compare font name with the font name specified
        {                    %if they are the same, go ahead and set the font
        scalefont setfont
        }
        {      %not the same, system substitued with a font, set our own font
        /_Helvetica findfont exch scalefont setfont pop
        }ifelse
        } ifelse
        } bind def
        
        %usage: 10 /Times-Roman F
        /F { %def
        findfont exch scalefont setfont
        } bind def
        
%usage: radius startAngle arcAngle yScale centerX centerY FA 
        %this routine fills an Arc
        /FA { %def
        gsave newpath
        translate 1 scale
        0 0 moveto
        0 0 5 2 roll arc
        closepath fill grestore
        } bind def
        
        %usage: invyscale 0 0 radius starAngle arcAngle yScale centerX centerY DA 
        %this routine draws and an Arc
        /DA { %def
        gsave newpath
        translate 1 scale
        arc 1 scale stroke grestore
        } bind def
        
        /BeginEPSF { %def
        /b4_Inc_state save def
        /dict_count countdictstack def
        /op_count count 1 sub def
        userdict begin
        /showpage {} def
        /exitserver {} def
        /product (none) def
        /jobname (none) def
        /revision 1 def
        /version 1 def
        /languagelevel 1 def
        /serialnumber 1 def
        /manualfeedtimeout 0 def
        /setjobtimeout {pop} bind def
        /waittimeout 0  def
        /setdefaulttimeouts {pop pop pop} bind def
        /setrealdevice {pop pop} bind def
        /checkpassword {pop true} bind def
        /manualfeed false def
        0 setgray 0 setlinecap
        1 setlinewidth 0 setlinejoin
        10 setmiterlimit [] 0 setdash newpath
        /languagelevel where
        {pop languagelevel
        1 ne
        {false setstrokeadjust false setoverprint
        } if
        } if
        } bind def
        
        /EndEPSF { %def
        count op_count sub {pop} repeat
        countdictstack dict_count sub {end} repeat
        b4_Inc_state restore
        } bind def
        
        %usage: width, height, 8 rlecmapimage 
        %un-RLE image, then convert colormap entries to RGB values
        /rlecmapimage {
        /buffer 1 string def
        /rgbval 3 string def
        /block 384 string def
        { currentfile buffer readhexstring pop
        /bcount exch 0 get store
        bcount 128 ge
        {
        0 1 bcount 128 sub
        { currentfile buffer readhexstring pop pop
        /rgbval cmap buffer 0 get 3 mul 3 getinterval store
        block exch 3 mul rgbval putinterval
        } for
        block 0 bcount 127 sub 3 mul getinterval
        }
        {
        currentfile buffer readhexstring pop pop
        /rgbval cmap buffer 0 get 3 mul 3 getinterval store
        0 1 bcount { block exch 3 mul rgbval putinterval} for
        block 0 bcount 1 add 3 mul getinterval
        } ifelse
        }
        false 3 colorimage
        } bind def
        %%EndProlog
%%Page: MC 1
1.3 setlinewidth
gsave
72 620 translate
1 1 scale
1.0 setgray
0.862745 0.862745 0.862745 setrgbcolor
100 100 0 0 FR
gsave
92 100 8 0 CLP
gsave
92 100 8 0 CLP
0.996109 0.996109 0.996109 setrgbcolor
9 1 142 1 L
142 1 142 99 L
10 2 141 2 L
141 2 141 98 L
0.67451 0.67451 0.67451 setrgbcolor
8 1 8 100 L
8 100 142 100 L
9 2 9 99 L
9 99 141 99 L
grestore
gsave
90 96 10 2 CLP
0.862745 0.862745 0.862745 setrgbcolor
90 96 10 2 FR
isolatin1encoding /_Helvetica /Helvetica RE
10 /_Helvetica setFont
0 0 0 setrgbcolor
9 47 (bom ar [1]) 12 90 AT
11 53 (bom-bril [1]) 12 77 AT
9 46 (15 72 (desinfetante [1]) 12 51 AT
14 73 (desodorante [1]) 12 38 AT
13 65 (detergente [1]) 12 25 AT
10 50 (esponja [1]) 12 12 AT
17 74 (grestore
gsave
92 100 8 0 CLP
grestore
gsave
92 100 8 0 CLP
grestore
grestore
gsave
92 32 8 68 CLP
gsave
92 32 8 68 CLP
grestore
gsave
92 32 8 68 CLP
isolatin1encoding /_Helvetica-Bold /Helvetica-Bold RE
18 /_Helvetica-Bold setFont
0 0 0 setrgbcolor
5 77 (MASTER) 37 78 AT
grestore
gsave
92 32 8 68 CLP
grestore
gsave
92 32 8 68 CLP
grestore
grestore
gsave
91 20 9 53 CLP
gsave
91 20 9 53 CLP
grestore
gsave
91 20 9 53 CLP
14 /_Helvetica-Bold setFont
0 0 0 setrgbcolor
6 55 (Limpeza) 49 55 AT
grestore
gsave
91 20 9 53 CLP
grestore
gsave
91 20 9 53 CLP
grestore
grestore
grestore
showpage
%%EOF







More information about the use-livecode mailing list