While we choose a bright color for filling the text, a black outline is usually used to emphasize it (or it is unnoticeable). For plotting text on the canvas, we would immediately come up with pstext. But when we want to depict the outline of the text, there is no intuitive way or independent arguments for this. The -G and -W of pstext are actually for the background textbox rather than the text itself. Here, we provide two methods to achieve this: append =<pen> to the font specification in pstext or use
Method1: Append =<pen> after
echo "1 0 A" |gmt pstext -R0/4/-1/1 -JX4 -F+f30,Helvetica=2,red -P -K > output.ps echo "2 0 A" |gmt pstext -R -J -F+f30,Helvetica=~2,green -O -K>> output.ps echo "3 0 A" |gmt pstext -R -J -F+f30,Helvetica -O >> output.ps
The black “A” at the right side (third row of the code) is for reference. If the given outline width is too large, we can find some difference. As the left “A” is set with =2
Method 2: Use psxy
The following code shows the GMT command of the cover photo (A_A, the code of the underline is omitted for concise).
# Left blue A echo "0 0" |gmt psxy -R-2/8/-1/1 -JX8 -Sl4+t"A"+fHelvetica -W4,black -G30/144/255 -P -K > output.ps # Right green A echo "6 0 A" |gmt pstext -R -J -F+f120p,Helvetica,0/128/0+jCM -O >> output.ps