]>
git.cameronkatri.com Git - mandoc.git/blob - term_ps.c
1 /* $Id: term_ps.c,v 1.38 2010/07/25 19:37:38 kristaps Exp $ */
3 * Copyright (c) 2010 Kristaps Dzonsons <kristaps@bsd.lv>
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
21 #include <sys/param.h>
36 /* Convert PostScript point "x" to an AFM unit. */
37 #define PNT2AFM(p, x) /* LINTED */ \
38 (size_t)((double)(x) * (1000.0 / (double)(p)->engine.ps.scale))
40 /* Convert an AFM unit "x" to a PostScript points */
41 #define AFM2PNT(p, x) /* LINTED */ \
42 ((double)(x) / (1000.0 / (double)(p)->engine.ps.scale))
45 unsigned short wx
; /* WX in AFM */
49 const char *name
; /* FontName in AFM */
50 #define MAXCHAR 95 /* total characters we can handle */
51 struct glyph gly
[MAXCHAR
]; /* glyph metrics */
55 * We define, for the time being, three fonts: bold, oblique/italic, and
56 * normal (roman). The following table hard-codes the font metrics for
57 * ASCII, i.e., 32--127.
60 static const struct font fonts
[TERMFONT__MAX
] = {
354 /* These work the buffer used by the header and footer. */
355 #define PS_BUFSLOP 128
356 #define PS_GROWBUF(p, sz) \
357 do if ((p)->engine.ps.psmargcur + (sz) > \
358 (p)->engine.ps.psmargsz) { \
359 (p)->engine.ps.psmargsz += /* CONSTCOND */ \
360 MAX(PS_BUFSLOP, (sz)); \
361 (p)->engine.ps.psmarg = realloc \
362 ((p)->engine.ps.psmarg, \
363 (p)->engine.ps.psmargsz); \
364 if (NULL == (p)->engine.ps.psmarg) { \
366 exit(EXIT_FAILURE); \
368 } while (/* CONSTCOND */ 0)
371 static double ps_hspan(const struct termp
*,
372 const struct roffsu
*);
373 static size_t ps_width(const struct termp
*, char);
374 static void ps_advance(struct termp
*, size_t);
375 static void ps_begin(struct termp
*);
376 static void ps_closepage(struct termp
*);
377 static void ps_end(struct termp
*);
378 static void ps_endline(struct termp
*);
379 static void ps_fclose(struct termp
*);
380 static void ps_letter(struct termp
*, char);
381 static void ps_pclose(struct termp
*);
382 static void ps_pletter(struct termp
*, int);
383 static void ps_printf(struct termp
*, const char *, ...);
384 static void ps_putchar(struct termp
*, char);
385 static void ps_setfont(struct termp
*, enum termfont
);
386 static struct termp
*pspdf_alloc(char *);
390 pdf_alloc(char *outopts
)
394 if (NULL
!= (p
= pspdf_alloc(outopts
)))
395 p
->type
= TERMTYPE_PDF
;
402 ps_alloc(char *outopts
)
406 if (NULL
!= (p
= pspdf_alloc(outopts
)))
407 p
->type
= TERMTYPE_PS
;
413 static struct termp
*
414 pspdf_alloc(char *outopts
)
417 size_t pagex
, pagey
, marginx
, marginy
, lineheight
;
422 if (NULL
== (p
= term_alloc(TERMENC_ASCII
)))
425 p
->advance
= ps_advance
;
428 p
->endline
= ps_endline
;
430 p
->letter
= ps_letter
;
438 while (outopts
&& *outopts
)
439 switch (getsubopt(&outopts
, UNCONST(toks
), &v
)) {
447 /* Default to US letter (millimetres). */
453 * The ISO-269 paper sizes can be calculated automatically, but
454 * it would require bringing in -lm for pow() and I'd rather not
455 * do that. So just do it the easy way for now. Since this
456 * only happens once, I'm not terribly concerned.
459 if (pp
&& strcasecmp(pp
, "letter")) {
460 if (0 == strcasecmp(pp
, "a3")) {
463 } else if (0 == strcasecmp(pp
, "a4")) {
466 } else if (0 == strcasecmp(pp
, "a5")) {
469 } else if (0 == strcasecmp(pp
, "legal")) {
472 } else if (2 != sscanf(pp
, "%zux%zu", &pagex
, &pagey
))
473 fprintf(stderr
, "%s: Unknown paper\n", pp
);
474 } else if (NULL
== pp
)
478 * This MUST be defined before any PNT2AFM or AFM2PNT
479 * calculations occur.
482 p
->engine
.ps
.scale
= 11;
484 /* Remember millimetres -> AFM units. */
486 pagex
= PNT2AFM(p
, ((double)pagex
* 2.834));
487 pagey
= PNT2AFM(p
, ((double)pagey
* 2.834));
489 /* Margins are 1/9 the page x and y. */
491 marginx
= /* LINTED */
492 (size_t)((double)pagex
/ 9.0);
493 marginy
= /* LINTED */
494 (size_t)((double)pagey
/ 9.0);
496 /* Line-height is 1.4em. */
498 lineheight
= PNT2AFM(p
, ((double)p
->engine
.ps
.scale
* 1.4));
500 p
->engine
.ps
.width
= pagex
;
501 p
->engine
.ps
.height
= pagey
;
502 p
->engine
.ps
.header
= pagey
- (marginy
/ 2) - (lineheight
/ 2);
503 p
->engine
.ps
.top
= pagey
- marginy
;
504 p
->engine
.ps
.footer
= (marginy
/ 2) - (lineheight
/ 2);
505 p
->engine
.ps
.bottom
= marginy
;
506 p
->engine
.ps
.left
= marginx
;
507 p
->engine
.ps
.lineheight
= lineheight
;
509 p
->defrmargin
= pagex
- (marginx
* 2);
515 pspdf_free(void *arg
)
519 p
= (struct termp
*)arg
;
521 if (p
->engine
.ps
.psmarg
)
522 free(p
->engine
.ps
.psmarg
);
529 ps_printf(struct termp
*p
, const char *fmt
, ...)
537 * If we're running in regular mode, then pipe directly into
538 * vprintf(). If we're processing margins, then push the data
539 * into our growable margin buffer.
542 if ( ! (PS_MARGINS
& p
->engine
.ps
.flags
)) {
543 len
= vprintf(fmt
, ap
);
545 p
->engine
.ps
.pdfbytes
+= /* LINTED */
546 len
< 0 ? 0 : (size_t)len
;
551 * XXX: I assume that the in-margin print won't exceed
552 * PS_BUFSLOP (128 bytes), which is reasonable but still an
553 * assumption that will cause pukeage if it's not the case.
556 PS_GROWBUF(p
, PS_BUFSLOP
);
558 pos
= (int)p
->engine
.ps
.psmargcur
;
559 len
= vsnprintf(&p
->engine
.ps
.psmarg
[pos
], PS_BUFSLOP
, fmt
, ap
);
563 p
->engine
.ps
.psmargcur
= strlen(p
->engine
.ps
.psmarg
);
564 p
->engine
.ps
.pdfbytes
+= /* LINTED */
565 len
< 0 ? 0 : (size_t)len
;
570 ps_putchar(struct termp
*p
, char c
)
574 /* See ps_printf(). */
576 if ( ! (PS_MARGINS
& p
->engine
.ps
.flags
)) {
578 p
->engine
.ps
.pdfbytes
++;
584 pos
= (int)p
->engine
.ps
.psmargcur
++;
585 p
->engine
.ps
.psmarg
[pos
++] = c
;
586 p
->engine
.ps
.psmarg
[pos
] = '\0';
591 ps_closepage(struct termp
*p
)
597 * Close out a page that we've already flushed to output. In
598 * PostScript, we simply note that the page must be showed. In
599 * PDF, we must now create the Length, Resource, and Page node
600 * for the page contents.
603 assert(p
->engine
.ps
.psmarg
&& p
->engine
.ps
.psmarg
[0]);
604 ps_printf(p
, "%s", p
->engine
.ps
.psmarg
);
606 if (TERMTYPE_PS
!= p
->type
) {
607 ps_printf(p
, "ET\n");
609 len
= p
->engine
.ps
.pdfbytes
- p
->engine
.ps
.pdflastpg
;
610 base
= p
->engine
.ps
.pages
* 4 + p
->engine
.ps
.pdfbody
;
612 ps_printf(p
, "endstream\nendobj\n");
614 /* Length of content. */
615 ps_printf(p
, "%zu 0 obj\n", base
+ 1);
616 ps_printf(p
, "%zu\nendobj\n", len
);
618 /* Resource for content. */
619 ps_printf(p
, "%zu 0 obj\n", base
+ 2);
620 ps_printf(p
, "<<\n/ProcSet [/PDF /Text]\n");
621 ps_printf(p
, "/Font <<\n");
622 for (i
= 0; i
< TERMFONT__MAX
; i
++)
623 ps_printf(p
, "/F%d %d 0 R\n", i
, 3 + i
);
624 ps_printf(p
, ">>\n>>\n");
627 ps_printf(p
, "%zu 0 obj\n<<\n", base
+ 3);
628 ps_printf(p
, "/Type /Page\n");
629 ps_printf(p
, "/Parent 2 0 R\n");
630 ps_printf(p
, "/Resources %zu 0 R\n", base
+ 2);
631 ps_printf(p
, "/Contents %zu 0 R\n", base
);
632 ps_printf(p
, ">>\nendobj\n");
634 ps_printf(p
, "showpage\n");
636 p
->engine
.ps
.pages
++;
637 p
->engine
.ps
.psrow
= p
->engine
.ps
.top
;
638 assert( ! (PS_NEWPAGE
& p
->engine
.ps
.flags
));
639 p
->engine
.ps
.flags
|= PS_NEWPAGE
;
645 ps_end(struct termp
*p
)
647 size_t i
, xref
, base
;
650 * At the end of the file, do one last showpage. This is the
651 * same behaviour as groff(1) and works for multiple pages as
655 if ( ! (PS_NEWPAGE
& p
->engine
.ps
.flags
)) {
656 assert(0 == p
->engine
.ps
.flags
);
657 assert('\0' == p
->engine
.ps
.last
);
661 if (TERMTYPE_PS
== p
->type
) {
662 ps_printf(p
, "%%%%Trailer\n");
663 ps_printf(p
, "%%%%Pages: %zu\n", p
->engine
.ps
.pages
);
664 ps_printf(p
, "%%%%EOF\n");
668 ps_printf(p
, "2 0 obj\n<<\n/Type /Pages\n");
669 ps_printf(p
, "/MediaBox [0 0 %zu %zu]\n",
670 (size_t)AFM2PNT(p
, p
->engine
.ps
.width
),
671 (size_t)AFM2PNT(p
, p
->engine
.ps
.height
));
673 ps_printf(p
, "/Count %zu\n", p
->engine
.ps
.pages
);
674 ps_printf(p
, "/Kids [");
676 for (i
= 0; i
< p
->engine
.ps
.pages
; i
++)
677 ps_printf(p
, " %zu 0 R", i
* 4 +
678 p
->engine
.ps
.pdfbody
+ 3);
680 base
= (p
->engine
.ps
.pages
- 1) * 4 +
681 p
->engine
.ps
.pdfbody
+ 4;
683 ps_printf(p
, "]\n>>\nendobj\n");
684 ps_printf(p
, "%zu 0 obj\n", base
);
685 ps_printf(p
, "<<\n");
686 ps_printf(p
, "/Type /Catalog\n");
687 ps_printf(p
, "/Pages 2 0 R\n");
688 ps_printf(p
, ">>\n");
689 xref
= p
->engine
.ps
.pdfbytes
;
690 ps_printf(p
, "xref\n");
691 ps_printf(p
, "0 %zu\n", base
+ 1);
692 ps_printf(p
, "0000000000 65535 f\n");
693 ps_printf(p
, "trailer\n");
694 ps_printf(p
, "<<\n");
695 ps_printf(p
, "/Size %zu\n", base
+ 1);
696 ps_printf(p
, "/Root %zu 0 R\n", base
);
697 ps_printf(p
, "/Info 1 0 R\n");
698 ps_printf(p
, ">>\n");
699 ps_printf(p
, "startxref\n");
700 ps_printf(p
, "%zu\n", xref
);
701 ps_printf(p
, "%%%%EOF\n");
706 ps_begin(struct termp
*p
)
712 * Print margins into margin buffer. Nothing gets output to the
713 * screen yet, so we don't need to initialise the primary state.
716 if (p
->engine
.ps
.psmarg
) {
717 assert(p
->engine
.ps
.psmargsz
);
718 p
->engine
.ps
.psmarg
[0] = '\0';
721 p
->engine
.ps
.pdfbytes
= 0;
722 p
->engine
.ps
.psmargcur
= 0;
723 p
->engine
.ps
.flags
= PS_MARGINS
;
724 p
->engine
.ps
.pscol
= p
->engine
.ps
.left
;
725 p
->engine
.ps
.psrow
= p
->engine
.ps
.header
;
727 ps_setfont(p
, TERMFONT_NONE
);
729 (*p
->headf
)(p
, p
->argf
);
732 p
->engine
.ps
.pscol
= p
->engine
.ps
.left
;
733 p
->engine
.ps
.psrow
= p
->engine
.ps
.footer
;
735 (*p
->footf
)(p
, p
->argf
);
738 p
->engine
.ps
.flags
&= ~PS_MARGINS
;
740 assert(0 == p
->engine
.ps
.flags
);
741 assert(p
->engine
.ps
.psmarg
);
742 assert('\0' != p
->engine
.ps
.psmarg
[0]);
745 * Print header and initialise page state. Following this,
746 * stuff gets printed to the screen, so make sure we're sane.
751 if (TERMTYPE_PS
== p
->type
) {
752 ps_printf(p
, "%%!PS-Adobe-3.0\n");
753 ps_printf(p
, "%%%%Creator: mandoc-%s\n", VERSION
);
754 ps_printf(p
, "%%%%CreationDate: %s", ctime(&t
));
755 ps_printf(p
, "%%%%DocumentData: Clean7Bit\n");
756 ps_printf(p
, "%%%%Orientation: Portrait\n");
757 ps_printf(p
, "%%%%Pages: (atend)\n");
758 ps_printf(p
, "%%%%PageOrder: Ascend\n");
759 ps_printf(p
, "%%%%DocumentMedia: "
760 "Default %zu %zu 0 () ()\n",
761 (size_t)AFM2PNT(p
, p
->engine
.ps
.width
),
762 (size_t)AFM2PNT(p
, p
->engine
.ps
.height
));
763 ps_printf(p
, "%%%%DocumentNeededResources: font");
765 for (i
= 0; i
< (int)TERMFONT__MAX
; i
++)
766 ps_printf(p
, " %s", fonts
[i
].name
);
768 ps_printf(p
, "\n%%%%EndComments\n");
770 ps_printf(p
, "%%PDF-1.1\n");
771 ps_printf(p
, "1 0 obj\n");
772 ps_printf(p
, "<<\n");
773 ps_printf(p
, "/Creator mandoc-%s\n", VERSION
);
774 ps_printf(p
, ">>\n");
775 ps_printf(p
, "endobj\n");
777 for (i
= 0; i
< (int)TERMFONT__MAX
; i
++) {
778 ps_printf(p
, "%d 0 obj\n", i
+ 3);
779 ps_printf(p
, "<<\n");
780 ps_printf(p
, "/Type /Font\n");
781 ps_printf(p
, "/Subtype /Type1\n");
782 ps_printf(p
, "/Name /F%zu\n", i
);
783 ps_printf(p
, "/BaseFont /%s\n", fonts
[i
].name
);
784 ps_printf(p
, ">>\n");
788 p
->engine
.ps
.pdfbody
= (size_t)TERMFONT__MAX
+ 3;
789 p
->engine
.ps
.pscol
= p
->engine
.ps
.left
;
790 p
->engine
.ps
.psrow
= p
->engine
.ps
.top
;
791 p
->engine
.ps
.flags
|= PS_NEWPAGE
;
792 ps_setfont(p
, TERMFONT_NONE
);
797 ps_pletter(struct termp
*p
, int c
)
802 * If we haven't opened a page context, then output that we're
803 * in a new page and make sure the font is correctly set.
806 if (PS_NEWPAGE
& p
->engine
.ps
.flags
) {
807 if (TERMTYPE_PS
== p
->type
) {
808 ps_printf(p
, "%%%%Page: %zu %zu\n",
809 p
->engine
.ps
.pages
+ 1,
810 p
->engine
.ps
.pages
+ 1);
811 ps_printf(p
, "/%s %zu selectfont\n",
812 fonts
[(int)p
->engine
.ps
.lastf
].name
,
815 ps_printf(p
, "%zu 0 obj\n",
816 p
->engine
.ps
.pdfbody
+
817 p
->engine
.ps
.pages
* 4);
818 ps_printf(p
, "<<\n");
819 ps_printf(p
, "/Length %zu 0 R\n",
820 p
->engine
.ps
.pdfbody
+ 1 +
821 p
->engine
.ps
.pages
* 4);
822 ps_printf(p
, ">>\nstream\n");
824 p
->engine
.ps
.pdflastpg
= p
->engine
.ps
.pdfbytes
;
825 p
->engine
.ps
.flags
&= ~PS_NEWPAGE
;
829 * If we're not in a PostScript "word" context, then open one
830 * now at the current cursor.
833 if ( ! (PS_INLINE
& p
->engine
.ps
.flags
)) {
834 if (TERMTYPE_PS
!= p
->type
) {
835 ps_printf(p
, "BT\n/F%d %zu Tf\n",
836 (int)p
->engine
.ps
.lastf
,
838 ps_printf(p
, "%.3f %.3f Td\n(",
839 AFM2PNT(p
, p
->engine
.ps
.pscol
),
840 AFM2PNT(p
, p
->engine
.ps
.psrow
));
842 ps_printf(p
, "%.3f %.3f moveto\n(",
843 AFM2PNT(p
, p
->engine
.ps
.pscol
),
844 AFM2PNT(p
, p
->engine
.ps
.psrow
));
845 p
->engine
.ps
.flags
|= PS_INLINE
;
848 assert( ! (PS_NEWPAGE
& p
->engine
.ps
.flags
));
851 * We need to escape these characters as per the PostScript
852 * specification. We would also escape non-graphable characters
853 * (like tabs), but none of them would get to this point and
854 * it's superfluous to abort() on them.
869 /* Write the character and adjust where we are on the page. */
871 f
= (int)p
->engine
.ps
.lastf
;
873 if (c
<= 32 || (c
- 32 > MAXCHAR
)) {
875 p
->engine
.ps
.pscol
+= (size_t)fonts
[f
].gly
[0].wx
;
879 ps_putchar(p
, (char)c
);
881 p
->engine
.ps
.pscol
+= (size_t)fonts
[f
].gly
[c
].wx
;
886 ps_pclose(struct termp
*p
)
890 * Spit out that we're exiting a word context (this is a
891 * "partial close" because we don't check the last-char buffer
895 if ( ! (PS_INLINE
& p
->engine
.ps
.flags
))
898 if (TERMTYPE_PS
!= p
->type
) {
899 ps_printf(p
, ") Tj\nET\n");
901 ps_printf(p
, ") show\n");
903 p
->engine
.ps
.flags
&= ~PS_INLINE
;
908 ps_fclose(struct termp
*p
)
912 * Strong closure: if we have a last-char, spit it out after
913 * checking that we're in the right font mode. This will of
914 * course open a new scope, if applicable.
916 * Following this, close out any scope that's open.
919 if ('\0' != p
->engine
.ps
.last
) {
920 if (p
->engine
.ps
.lastf
!= TERMFONT_NONE
) {
922 ps_setfont(p
, TERMFONT_NONE
);
924 ps_pletter(p
, p
->engine
.ps
.last
);
925 p
->engine
.ps
.last
= '\0';
928 if ( ! (PS_INLINE
& p
->engine
.ps
.flags
))
936 ps_letter(struct termp
*p
, char c
)
941 * State machine dictates whether to buffer the last character
942 * or not. Basically, encoded words are detected by checking if
943 * we're an "8" and switching on the buffer. Then we put "8" in
944 * our buffer, and on the next charater, flush both character
945 * and buffer. Thus, "regular" words are detected by having a
946 * regular character and a regular buffer character.
949 if ('\0' == p
->engine
.ps
.last
) {
951 p
->engine
.ps
.last
= c
;
953 } else if (8 == p
->engine
.ps
.last
) {
955 p
->engine
.ps
.last
= '\0';
957 assert(8 != p
->engine
.ps
.last
);
958 if ('_' == p
->engine
.ps
.last
) {
959 if (p
->engine
.ps
.lastf
!= TERMFONT_UNDER
) {
961 ps_setfont(p
, TERMFONT_UNDER
);
963 } else if (p
->engine
.ps
.lastf
!= TERMFONT_BOLD
) {
965 ps_setfont(p
, TERMFONT_BOLD
);
967 p
->engine
.ps
.last
= c
;
970 if (p
->engine
.ps
.lastf
!= TERMFONT_NONE
) {
972 ps_setfont(p
, TERMFONT_NONE
);
974 cc
= p
->engine
.ps
.last
;
975 p
->engine
.ps
.last
= c
;
984 ps_advance(struct termp
*p
, size_t len
)
988 * Advance some spaces. This can probably be made smarter,
989 * i.e., to have multiple space-separated words in the same
990 * scope, but this is easier: just close out the current scope
991 * and readjust our column settings.
995 p
->engine
.ps
.pscol
+= len
;
1000 ps_endline(struct termp
*p
)
1003 /* Close out any scopes we have open: we're at eoln. */
1008 * If we're in the margin, don't try to recalculate our current
1009 * row. XXX: if the column tries to be fancy with multiple
1010 * lines, we'll do nasty stuff.
1013 if (PS_MARGINS
& p
->engine
.ps
.flags
)
1018 p
->engine
.ps
.pscol
= p
->engine
.ps
.left
;
1020 /* If we haven't printed anything, return. */
1022 if (PS_NEWPAGE
& p
->engine
.ps
.flags
)
1026 * Put us down a line. If we're at the page bottom, spit out a
1027 * showpage and restart our row.
1030 if (p
->engine
.ps
.psrow
>= p
->engine
.ps
.lineheight
+
1031 p
->engine
.ps
.bottom
) {
1032 p
->engine
.ps
.psrow
-= p
->engine
.ps
.lineheight
;
1041 ps_setfont(struct termp
*p
, enum termfont f
)
1044 assert(f
< TERMFONT__MAX
);
1045 p
->engine
.ps
.lastf
= f
;
1048 * If we're still at the top of the page, let the font-setting
1049 * be delayed until we actually have stuff to print.
1052 if (PS_NEWPAGE
& p
->engine
.ps
.flags
)
1055 if (TERMTYPE_PS
== p
->type
)
1056 ps_printf(p
, "/%s %zu selectfont\n",
1058 p
->engine
.ps
.scale
);
1060 ps_printf(p
, "/F%d %zu Tf\n",
1062 p
->engine
.ps
.scale
);
1068 ps_width(const struct termp
*p
, char c
)
1071 if (c
<= 32 || c
- 32 >= MAXCHAR
)
1072 return((size_t)fonts
[(int)TERMFONT_NONE
].gly
[0].wx
);
1075 return((size_t)fonts
[(int)TERMFONT_NONE
].gly
[(int)c
].wx
);
1080 ps_hspan(const struct termp
*p
, const struct roffsu
*su
)
1085 * All of these measurements are derived by converting from the
1086 * native measurement to AFM units.
1091 r
= PNT2AFM(p
, su
->scale
* 28.34);
1094 r
= PNT2AFM(p
, su
->scale
* 72);
1097 r
= PNT2AFM(p
, su
->scale
* 12);
1100 r
= PNT2AFM(p
, su
->scale
* 100);
1104 fonts
[(int)TERMFONT_NONE
].gly
[109 - 32].wx
;
1107 r
= PNT2AFM(p
, su
->scale
* 2.834);
1111 fonts
[(int)TERMFONT_NONE
].gly
[110 - 32].wx
;
1114 r
= su
->scale
* p
->engine
.ps
.lineheight
;