Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

For print-quality stuff?


Yes. CSS (in Chrome and Firefox and modern IE; not Safari, despite Apple's typographical reputation) supports OpenType features like ligatures, stylistic alternates, kerning, true small caps (not using the CSS font-variant property, using the font-feature-settings property), lining/oldstyle (and proportional/tabular) numbers, etc.

HTML/CSS typography can be very sophisticated.


And at the same time, HTML/CSS typography is in the stone age compared to LaTeX. No microtype without manually tweaked <span> soup, awful justified layout, CSS regions and columns are a work in progress, and all of this is unusable for print because there is no concept of pagination.


Good justification/hyphenation requires Javascript, yes. That's still an existing weakness. But there is absolutely pagination control.

HTML + CSS isn't perfect, of course, but the difference between HTML and professional typesetting is much, much smaller than the difference between Word and professional typesetting.


> there is absolutely pagination control

Put something at the bottom of the current page, like a footnote.


I agree that the browser engines are too limited at the moment. It somewhat works, if you use the proprietary PrinceXML.

http://www.princexml.com/


It's a bit finicky but it's possible. Text is vector so as long as you use print-quality images and shrink them down to screen size using the width and height properties, you can have something that looks pretty good on both print and screen.

(I've self-published a book that way and was surprised at how well it worked.)


Well, the point is that just shrinking stuff that looks pretty good isn't professional typesetting. Attention to stroke size in small-caps fonts are exactly the difference between a professional system (or just a professional typesetter) and using MS Word. It's not out of the question to build a JS-based system to do this kind of thing, but it would be a great deal of work, with probably little payout. After all, Knuth and crew have been doing the work and the upkeep on TeX and LaTeX for what, twenty or thirty years now?


I actually did end up building a similar tool[1] for my self-published book, creating a printable PDF booklet out of markdown.

It's probably not good for serious publishing but I found it hell of a lot easier to work with than LaTeX and/or Word.

[1]: https://github.com/andrey-p/apocalism-js


I just checked your Naphthalene pdf. Looking at the first page of text (page 1):

* The first real kerning issue is the third word "wondering", which looks like "wo n d erin g" to me. The kerning is terrible, but that is probably more of a font issue.

* There should be no line break between the words: >>overpowering circumstance?”<< Probably should hyphenate circum-stance.


Yeah, I'm aware of these.

The kerning issue is due to an existing bug with PhantomJS on Linux [1]. Hyphenation is a feature I've been wanting to do for a while but haven't managed yet due to the lack of a decent hyphenation engine for JS [2].

To quote from the readme, the program is "a very early version with a number of problems". But my point of "it's finicky but possible" still stands.

[1]: https://github.com/ariya/phantomjs/issues/12016 [2]: https://github.com/andrey-p/apocalism-js/issues/18




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: