aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/term_ps.c
Commit message (Collapse)AuthorAgeFilesLines
...
* IMPORTANT FIX: add missing braces around alloc failure conditional inKristaps Dzonsons2010-08-061-4/+8
| | | | | fuction-isation of PS_GROWBUF. Obviously the original commit was never actually tested, as -Tps and -Tpdf errored out immediately.
* Turn the non-trivial PS_GROWBUF macro into a function. Don't use MAX, itJoerg Sonnenberger2010-08-011-16/+19
| | | | doesn't exist in the default namespace on Solaris.
* Fully-working -Tpdf: xref table is now generated. This works for bothKristaps Dzonsons2010-07-251-15/+44
| | | | single and multiple-manual mode (e.g., mandoc -Tpdf foo.1 bar.1).
* Make PDF sections contiguous.Kristaps Dzonsons2010-07-251-64/+52
|
* Initial PDF shim over PS. This produces working PDF output with -Tpdf.Kristaps Dzonsons2010-07-251-47/+227
| | | | | | | | | | It's currently missing the xref table, so you'll get a warning in most PDF viewers). It also produces lots of redundant output, which will go away once I get a better handle on the PDF spec. The code doesn't really touch any existing functionality; it's a bunch of conditionals atop the -Tps (term_ps.c) implementation. I'm checking it in now to have it exist and be auditable. It needs clean-up, polish, and general care (and xref!).
* The "wx" value is quite small, so use a u_short instead of a size_t.Kristaps Dzonsons2010-07-211-8/+8
|
* Use floating-point -Tps "moveto" arguments to smooth out column and rowKristaps Dzonsons2010-07-201-5/+5
| | | | misalignments.
* correct lots of copyright notices;Ingo Schwarze2010-07-131-2/+2
| | | | ok kristaps@
* Suppress duplicate "Page: 1 1" -Tps printing and instead relay onKristaps Dzonsons2010-07-051-6/+2
| | | | PS_NEWPAGE to do the job for us. Noted by Dillo.
* gv(1) doesn't remember the last set font when displaying new pages, soKristaps Dzonsons2010-07-041-7/+25
| | | | | print it out for each new page. This also prevents superfluous printings of the font before the %%Page: comment has been displayed.
* Set line-height to be 1.4em. Removed check for minimum margins that are noKristaps Dzonsons2010-07-041-19/+6
| | | | longer important.
* Suppress printing blank eof pages in -Tps. Delay printing of Page:Kristaps Dzonsons2010-07-041-10/+14
| | | | until actual text is ready to be displayed.
* Suppress printing of newlines/space at start of new -Tps page.Kristaps Dzonsons2010-07-041-16/+32
| | | | | Also renamed "psstate" -> "flags" (was wrongly implying some sort of state machine).
* Backed out margin calculations in favour of much simpler rule of thumb:Kristaps Dzonsons2010-07-041-16/+11
| | | | margins are 1/9 the length/width.
* Auto-margins. Documented in mandoc.1. Also bumped line-height and madeKristaps Dzonsons2010-07-041-13/+40
| | | | sure header and footer accomodate for said line-height.
* Lint fixes.Kristaps Dzonsons2010-07-021-1/+2
|
* First, I'm defaulting to 11-point font, which renders much nicer (theKristaps Dzonsons2010-07-011-15/+41
| | | | | | | | | | | "Internet" vaguely suggests using 11- or 9-Point for serifed fonts). This verified on GNU/Linux, Mac OSX, Windows, and OpenBSD. Noted in mandoc.1. Then added a3, a4, a5, letter, legal, and custom page dimensions. These seem to be the main players. Noted in mandoc.1. Lintified the casting.
* Now using Times AFM provided by Dillo. Verified on OpenBSD by me and Mac OSXKristaps Dzonsons2010-06-301-271/+271
| | | | by M. Deksters.
* Correct dimensions for DocumentMedia. Noted by schwarze@, as gv(1) wasKristaps Dzonsons2010-06-301-6/+5
| | | | puking on input.
* Embedding Charter proportional-width glyphs. Nice-looking output.Kristaps Dzonsons2010-06-301-289/+289
|
* PostScript can now handle scaled glyph sizes (see "scale" in structKristaps Dzonsons2010-06-301-18/+28
| | | | termp_ps) to arbitrarily scale font. Tested with 10 (default), 12, 14.
* Pushed normalisation of scaling units into term_hspan().Kristaps Dzonsons2010-06-301-10/+4
|
* Move term_hspan() calculation into the output devices, where it belongs.Kristaps Dzonsons2010-06-301-7/+66
|
* Push paper calculation out of getsubopt() loop. Make all points be AFMKristaps Dzonsons2010-06-301-21/+22
| | | | glyph units to make positioning more precise.
* Add in -Opaper=xxx support for -Tps postscript. This doesn't have anyKristaps Dzonsons2010-06-291-2/+24
| | | | | | functional changes beyond the getsubopt() parse in term_ps.c. If you want to test this (it only does -Opaper=a4 and -Opaper=letter; adding more is trivial), make sure you specify (e.g.) -sPAPERSIZE=a4 to gs(1).
* Give -Tps better PostScript hinting. Note that we're using Adobe-3.0Kristaps Dzonsons2010-06-291-24/+57
| | | | | constructs. Push the stupid CPP defines for page boundaries and margins into proper variables. Give enum termfont a proper TERMFONT__MAX.
* Clean-up of variable-width glyph support. Adds no new code; onlyKristaps Dzonsons2010-06-281-10/+12
| | | | | restructured to make a bit more readable. Also removed an unused entry in the PS engine structure.
* This enables variable glyph-width output. The checkin will be followedKristaps Dzonsons2010-06-281-16/+14
| | | | | | by a [functionless] clean-up in term_ps.c, but this makes the appropriate changes to "enable" initial proportional-width functionality in term.c and fixes some areas of term_ps.c that were causing errors.
* Initial encoding of glyph widths. From /usr/X11R6/lib/X11/fonts/Type1.Kristaps Dzonsons2010-06-281-15/+342
| | | | These continues proportional-width glyph encoding.
* Remove "pt" from struct roffsu, as CSS (the only reason it was there) isKristaps Dzonsons2010-06-251-1/+2
| | | | | unclear about which units accept floats/integers, which leads me to assume that it handles either and rounds as appropriate.
* Initial chunks for variable-width fonts. Pushes all width calculationsKristaps Dzonsons2010-06-251-1/+13
| | | | | | | | in mdoc_term.c and man_term.c down into term.c. This is still not implemented in term.c, although stubs for width calculations are in place. From now on, offset, rmargin, and other layout variables are abstract screen widths. They will resolve to the the familiar values for -Tascii but -Tps will eventually use points instead of chars.
* Churn as I finish email address migration kth.se -> bsd.lv.Kristaps Dzonsons2010-06-191-2/+2
|
* Implement font-switching for PostScript. -Tps now supportsKristaps Dzonsons2010-06-111-62/+134
| | | | | | TERMFONT_BOLD (Courier-Bold) and TERMFONT_UNDER (Courier-Oblique). It doesn't look half bad. This accomplished through tricksy juggling of the one-char back-buffer.
* Delay opening a word state until a character is ready to be output.Kristaps Dzonsons2010-06-111-21/+42
| | | | | This paves the way for closing/reopening scope in the event that a font changes.
* Teach -Tps to ignore backspace-encoding by using a one-char buffer and aKristaps Dzonsons2010-06-111-2/+31
| | | | simple state machine. This paves the way for decorated text.
* Allow open word contexts in -Tps to preserve whitespace, as whitespaceKristaps Dzonsons2010-06-101-4/+5
| | | | | apparently doesn't collapse in PostScript (surprise!). Makes output files much more compact.
* Forgot to increment into the nil terminator. And call va_end() whileKristaps Dzonsons2010-06-091-2/+4
| | | | we're at it.
* Have the standard manpage header and footer print on every page of -TpsKristaps Dzonsons2010-06-091-55/+139
| | | | | | | | | | | | | | | output. This is more tricky than you may think: we can't just call the header function out-of-state (i.e., before a flushln has occured) because we'd clobber our current state. Thus, we call at the beginning and dump the output into an auxiliary buffer. For the record, I don't think there's any other clean way to do this. The only other Way That Works is to copy-aside *all* termp state, zero it, and do the necessary headf/footf. This is just as complex, as memory needs to be alloc'd and free'd per margin. Unfortunately, this prohibits page numbering (the margin is only printed once), so I'll probably end up re-writing this down the line.
* Lint noops. Also fixed getsubopt() to be in unistd.h (noted by joerg@).Kristaps Dzonsons2010-06-081-1/+2
|
* Broke ascii_*() functions into term_ascii.cKristaps Dzonsons2010-06-081-1/+173
| | | | Made low-level engine functions into function pointers.
* No functionality changes: just restructuring. DeprecatedKristaps Dzonsons2010-06-081-0/+45
terminal_free() in favour of ps_free() and ascii_free(). Moved ps_*() functions into term_ps.c so that they don't clutter up term.c.