summaryrefslogtreecommitdiff
path: root/paper.h (unfollow)
Commit message (Collapse)Author
2013-03-10Add \s for 'strong' text, i.e. bold rather than italics. I've missedSimon Tatham
this a couple of times in Halibut markup recently (in particular, it's handy to have a typographical distinction between 'this term is emphasised because it's new' and 'this term is emphasised because I want you to pay attention to it'), so here's an implementation, basically parallel to \e. One slight oddity is that strong text in headings will not be distinguished in some output formats, since they already use bolded text for their headings. [originally from svn r9772]
2007-02-10Now that glyph indices are exposed to bk_pdf.c, move CMap generation there,Ben Harris
since that seems closer to being where it belongs. [originally from svn r7262]
2007-02-10Generate a "W" array for CIDFonts, since acroread seems to do very sillyBen Harris
things without one. [originally from svn r7261]
2007-02-08Support for embedding TrueType fonts in PDF output. The code isn't the mostBen Harris
beautiful I've ever written, and xpdf turns out not to support the encoding mechanism I've chosen, but it works in GhostScript so I'm not too unhappy for now. [originally from svn r7259]
2007-02-06Make ps_token() more generally available and use it to improve the formattingBen Harris
of Type 42 fonts. [originally from svn r7245]
2007-02-03Add support for using TrueType fonts, including embedding in PostScript butBen Harris
not yet in PDF. There's a lot of cleaning up to be done, especially in the area of error, but I think it would be better committed gradually. [originally from svn r7198]
2007-01-27Add support for PFB files. This seems to have caused me to completelyBen Harris
rewrite the Type 1 font support, and I'm sure the result is more complex than it needs to be, but it seems to work correctly, so I shouldn't complain. [originally from svn r7175]
2007-01-07Add a mechanism for disabling ligature substitution for an entire paragraphBen Harris
and apply it to code paragraphs. [originally from svn r7069]
2007-01-06Make ps_glyph_to_unicode() take a glyph index instead of a glyph name.Ben Harris
[originally from svn r7062]
2007-01-06Overhaul of glyph-name handling in the paper backends. Before, we hadBen Harris
a separate dense array of glyph names for each font, and referenced glyphs by indicies into that array, which meant that the array had to be set up before we could generate any indices. Now we have an overall array of glyph names, and use the same glyph indicies for all fonts. Some arrays have had to turn into tree234s as a result. [originally from svn r7061]
2006-12-31Initial ligature support. This adds support for emitting ligatures, and addsBen Harris
the "fi" and "fl" ligatures to the built-in fonts, but doesn't add support for reading ligature information from AFM files because that requires coping with forward references to glyph names, which is tricky. [originally from svn r7045]
2006-12-09Correct embedding of Type 1 fonts in PDF. Error cases (e.g. invalid Type 1Ben Harris
fonts) may not be well handled, and may emit invalid PDF. [originally from svn r6974]
2006-12-02Support for emitting outlines using pdfmark.Ben Harris
[originally from svn r6952]
2006-05-14Fairly ropey font-embedding support. In particular, the PDF output isBen Harris
technically incorrect, though it works perfectly well with xpdf. To do it properly requires actually parsing the unencrypted part of a Type 1 font, which will be a bit tedious in C. [originally from svn r6685]
2006-05-13Generate a more-or-less valid /FontDescriptor dictionary for non-standardBen Harris
fonts in PDF output. [originally from svn r6684]
2006-05-13Initial support for adding fonts at run-time. Currently we only supportBen Harris
loading AFM files, we recognise them by name, and we can't embed fonts in the output (which is also invalid, though accepted by xpdf, in the PDF case). Oh, and there's no documentation. Still, it's a start. [originally from svn r6681]
2004-09-28Add kerning support to paper backends, embedding the kerning tables fromBen Harris
the AFM files in psdata.c. Also fix a couple of bugs that this revealed. [originally from svn r4588]
2004-09-24Replace the empirical GhostScript-derived font metrics with ones derivedBen Harris
from Adobe's official AFM files. These are expressed in integer multiples of 1/1000 pt (well, 1/1000 of the design size of the font, actually, but that's always a whole number of points), so use that as our internal unit rather than 1/4096 pt. This doesn't seem to make a significant difference to Halibut's output. [originally from svn r4576]
2004-09-21Replace the hardcoded instances of "4096" and "4096.0" in the paper backendsBen Harris
with a macro. halibut.ps and halibut.pdf are identical (modulo dates) over this change. [originally from svn r4564]
2004-04-16Compacted PS and PDF output files by removing redundant reiterationsSimon Tatham
of the same font and position designations. Reduced the size of the Halibut manual PDF to less than half what it started out as, and the PS one to more like a third of its original size. [originally from svn r4083]
2004-04-14Implemented an index. Good _grief_, that was hard work to get allSimon Tatham
the fine details right. [originally from svn r4072]
2004-04-14Support for a contents section.Simon Tatham
[originally from svn r4069]
2004-04-14Restructuring to remove the requirement for a printed paragraph toSimon Tatham
correspond exactly to a source paragraph. Should allow me to create multiple printed paragraphs from the same source paragraph (i.e. a contents entry for each heading in addition to the heading itself), and invent entirely new printed paragraphs of my own (e.g. for index entries). [originally from svn r4068]
2004-04-14Implemented PDF outlines.Simon Tatham
[originally from svn r4067]
2004-04-13Implemented lines under chapter titles.Simon Tatham
[originally from svn r4065]
2004-04-13Fine-tuned the page breaking algorithm by adding penalties andSimon Tatham
bonuses for breaking in particular places. (For example, it's especially bad to break just after a heading, and especially good to break just before one.) [originally from svn r4064]
2004-04-13Implemented all the missing rendering features (such as differentSimon Tatham
font selection in headings, mentioning section numbers, bullets, list item numbers, code paragraphs etc). The PS/PDF output now actually looks like the document it's supposed to be :-) [originally from svn r4061]
2004-04-13Implement PDF link annotations: both internal hyperlinks within theSimon Tatham
document, and references to external URLs for which acroread will start a web browser. [originally from svn r4060]
2004-04-13Aha, _that's_ why paragraphs weren't properly justified. ConfusionSimon Tatham
of semantics as to whether a `last' pointer pointed to the last relevant thing in a list, or the one beyond that. Oops. [originally from svn r4059]
2004-04-13Initial work on PS and PDF output. Because these two backends shareSimon Tatham
an enormous amount of preprocessing and differ only in their final output form, I've introduced a new type of layer called a `pre-backend' (bk_paper.c is one). This takes all the information passed to a normal backend and returns an arbitrary void *, which is cached by the front end and passed on to any backend(s) which state a desire for the output of that particular pre-backend. Thus, all the page layout is done only once, and the PS and PDF backends process the same data structures into two output files. Note that these backends are _very_ unfinished; all sorts of vital things such as section numbers, list markers, and title formatting are missing, the paragraph justification doesn't quite work, and advanced stuff like indexes and PDF interactive features haven't even been started. But this basic framework generates valid output files and is a good starting point, so I'm checking it in. [originally from svn r4058]