MCPcopy Create free account
hub / github.com/CruiserOne/Astrolog / PsFont

Function PsFont

xdevice.cpp:1506–1522  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1504// Set a system font and size to be used by PostScript text commands.
1505
1506void PsFont(int nFont)
1507{
1508 CONST char *szFont;
1509 int z;
1510
1511 if (nFont == gi.nFontPS || gs.nFontAll == 0)
1512 return;
1513 szFont = rgszFontName[nFont];
1514 z = PSMUL*gi.nScale;
1515 if (nFont == fiArial) {
1516 szFont = "Times-Roman"; z = 4*PSMUL*gi.nScaleText;
1517 } else if (nFont == fiCourier || nFont == fiAstrolog) {
1518 szFont = "Courier"; z = 5*PSMUL*gi.nScaleText;
1519 }
1520 fprintf(gi.file, "/%s[%d 0 0 -%d 0 0]sf\n", szFont, z, z);
1521 gi.nFontPS = nFont;
1522}
1523
1524
1525// Write out initial file header information to the PostScript file.

Callers 7

DrawSzFunction · 0.85
DrawSignFunction · 0.85
DrawHouseFunction · 0.85
DrawObjectFunction · 0.85
DrawAspectFunction · 0.85
DrawNakshatraFunction · 0.85
PsBeginFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected