| 1357 | // a system font character. |
| 1358 | |
| 1359 | void DrawSign(int i, int x, int y) |
| 1360 | { |
| 1361 | int nFont = gs.nFontSig, ch = -1, nScale = 100; |
| 1362 | flag fDoThin; |
| 1363 | |
| 1364 | if (nFont == fiWingding) |
| 1365 | ch = '^' + i - 1; |
| 1366 | else if (nFont == fiAstro) |
| 1367 | ch = 'A' + i - 1; |
| 1368 | else if (nFont == fiEnigma) { |
| 1369 | ch = szSignFontEnigma[i == sCap && gs.nGlyphCap > 1 ? cSign : i-1]; |
| 1370 | y -= gi.nScale; |
| 1371 | } else if (nFont == fiHamburg) { |
| 1372 | ch = szSignFontHamburg[i == sCap && gs.nGlyphCap > 1 ? cSign : i-1]; |
| 1373 | y += gi.nScale; |
| 1374 | } else if (nFont == fiAstronom) { |
| 1375 | ch = (i == sCap && gs.nGlyphCap <= 1) ? '\\' : ('A' + i - 1); |
| 1376 | if (FBetween(i, sLeo, sSco)) |
| 1377 | y -= gi.nScale; |
| 1378 | } else if (FBetween(nFont, fiStarSan, fiStarSer)) { |
| 1379 | ch = szSignFontStar[i == sCap && gs.nGlyphCap > 1 ? cSign : i-1]; |
| 1380 | if (FBetween(i, sLeo, sVir)) { |
| 1381 | y -= gi.nScaleT; |
| 1382 | nScale = 90; |
| 1383 | } |
| 1384 | } else if (nFont >= fiArial && gs.ft != ftPS && gs.ft != ftWmf) |
| 1385 | ch = 0x2648 + i - 1; |
| 1386 | // A few fonts support Ophiuchus, which is specified as "sign" #13. |
| 1387 | if (i > cSign) |
| 1388 | ch = (nFont >= fiArial && gs.ft != ftPS && gs.ft != ftWmf) ? 0x26ce : -1; |
| 1389 | #ifdef EXPRESS |
| 1390 | AdjustGlyph(&ch, &x, &y, &nFont, &nScale, i, us.szExpFontSig); |
| 1391 | if (!FBetween(nFont, 0, cFont-1)) |
| 1392 | ch = -1; |
| 1393 | #endif |
| 1394 | fDoThin = gs.fThick && nFont == 0 && ch <= 0 && gi.nScale <= gi.nScaleT; |
| 1395 | if (fDoThin) |
| 1396 | DrawThick(fFalse); |
| 1397 | #ifdef WINANY |
| 1398 | if (!gi.fFile && ch > 0) { |
| 1399 | if (DrawGlyph(ch, x, y, nFont, nScale)) |
| 1400 | return; |
| 1401 | } |
| 1402 | #endif |
| 1403 | #ifdef PS |
| 1404 | if (gs.ft == ftPS && nFont > 0 && ch > 0) { |
| 1405 | PsFont(nFont); |
| 1406 | fprintf(gi.file, "%d %d(%s%c)center\n", x, y, PsEscape(ch), ch); |
| 1407 | return; |
| 1408 | } |
| 1409 | #endif |
| 1410 | #ifdef META |
| 1411 | if (gs.ft == ftWmf && nFont > 0 && ch > 0) { |
| 1412 | gi.nFontDes = nFont; |
| 1413 | gi.kiTextDes = gi.kiCur; |
| 1414 | gi.nAlignDes = 0x6 | 0x8 /* Center | Bottom */; |
| 1415 | MetaSelect(); |
| 1416 | MetaTextOut(x, y + 7*gi.nScale, 1); |
no test coverage detected