typography

Font rendering for web pages

I always run into the same problem when creating web pages. When I add a font that is larger then about 16-18px it looks terrible. Its jagged, and pixelated. I have tried using different fonts and weights, however I haven't had much luck there. Note: Its only in windows that it is like this. Mainly in Opera and FF also in IE7 but not q...

Consistent outdent of first letter with CSS?

I'm in the process of redesigning my blog. I'm trying to implement an outdent of the first letter of the first paragraph of the body text. Where I'm stuck is in getting consistent spacing between the first letter and the rest of the paragraph. Basically, the problem is that there is a huge difference in spacing between a "W" and an "I". ...

Should I avoid using "text-align: justify;"?

Is there any reason to avoid using "text-align: justify;"? Does it reduce readability or cause problems? ...

Tiny Fonts on Web Sites

My main browsers (FF and Chrome) are both configured for a 12 point font. In both browsers the font picker shows a font preview, and in both they are the same size and a comfortable size for reading web sites. My IE doesn't allow me to set font size, but seems to default to something a little bit larger than Chrome. On my personal web...

What is the most readable, appealing font?

What is the most readable, appealing font? Besides Wingdings, of course. I'm not talking programming font, but for design docs, documentation, web pages, etc. What wins? Times New Roman 10pt, Arial 12pt, Verdana? Anyone have science in addition to their opinion? ...

Algorithm to implement something like Wordle

Context Take a look at what wordle does : http://www.wordle.net/ it's much better looking than any other word cloud generators I've seen note: the source is not avaialable - read the FAQ http://www.wordle.net/faq#code My Questions Is there an algorithm available that does what Worlde does? If no, what are some alternatives that pro...

How do I calculate a String's width in Ruby?

String.length will only tell me how many characters are in the String. (In fact, before Ruby 1.9, it will only tell me how many bytes, which is even less useful.) I'd really like to be able to find out how many 'en' wide a String is. For example: 'foo'.width # => 3 'moo'.width # => 3.5 # m's, w's, etc. are wide 'foi'.width...

Distinct stylesheets for type, color and layout. What goes where?

I came across this article on "A List Apart" that suggests spliting css information in (at least) three separate files, one for typography, one for layout and one for color information. Color seems pretty obvious, but how would you explain to your average programmer (that would be me) what's type and what's layout? ...

Portable web font technology

After reading the question on web font typeface selection, it occurred to me that portable network fonts were the answer. We used to use a package by Bitstream to generate subsets of needed fonts to embed in web pages so that it looked the same in every browser on every platform. When I Googled this, I found an RFC that looks like it's...

Drop caps in pdfLaTeX

I want to find a way to produce drop caps (large initial letters several lines high) in pdfLaTeX. I know that there is a dropping package which works well when used with latex + dvips. However, when used with pdflatex the result looks ugly. My source file is: \documentclass[12pt]{article} % for pdflatex file.tex # dropping is ugly % \...

Boustrophedon Text Editing?

Hello, I would like to edit text in boustrophedon in emacs. For those of you who don't know boustrophedon text direction goes "like an ox turns" in a field or like a printer inkjet. For the same reasons this is efficient on a farm or in a printer this text is very efficient to read once you get used to it (which doesn't take too long). ...

Apart from <script> tags, what should I strip to make sure user-entered HTML is safe?

I have an app that reprocesses HTML in order to do nice typography. Now, I want to put it up on the web to let users type in their text. So here's the question: I'm pretty sure that I want to remove the SCRIPT tag, plus closing tags like </form>. But what else should I remove to make it totally safe? ...

Ideas for converting straight quotes to curly quotes

I have a file that contains "straight" (normal, ASCII) quotes, and I'm trying to convert them to real quotation mark glyphs (“curly” quotes, U+2018 to U+201D). Since the transformation from two different quote characters into a single one has been lossy in the first place, obviously there is no way to automatically perform this conversio...

How to render narrow non-breaking spaces in HTML for Windows?

In French, typography requires that we use narrow non-breaking space (U+202F) at various places (“Comme ça !”). Apparently every browser on windows fails to support that and they all display a weird character instead. This works on most browsers on Mac OS X as well as Linux. Does anyone know how to make Windows browsers render it corre...

How to print subscripts/superscripts on a CLI?

Hello there, I'm writing a piece of code which deals with math variables and indices, and I'd need to print subscripts and superscripts on a CLI, is there a (possibly cross-platform) way to do that? I'm working in vanilla C++. Note: I'd like this to be cross-platform, but since from the first answers this doesn't seem to be possible I'm...

Source code of books made with TeX/LaTeX to learn

Some time ago, reading this entry I found a nice image and a pointer to a better book entitled "Thinking Forth". To my surprise, the LaTeX sources of the book were ready to download, with pearls like: %% There's no bold typewriter in Computer Modern. %% Emulate with printing several times, slightly moving \newdimen\poormove \poormove0....

Font licensing on the web?

I'd like to do nice typography on the web-- that is, fonts other than the limited set of "web safe" fonts. Reasonable choices (considering accessibility and SEO) seem to be Cufón or sIFR or maybe @font-face. Which approach has some blessing from font foundries? Are some foundries more web-friendly? I know there are free font houses, ...

Web font embedding vs. sifr?

I'd like to use a non-standard web font to improve the appearance of my HTML. Is it preferable to embed a web font or use something like sifr? My understanding is sifr is a flash-based viewer for vector fonts but I've been reluctant to try it because it seems somewhat complicated. There does not seem to be a lot of encouraging talk ...

ridonkulous large-font display issue. fontSize shatters words all over

I'm in the midst writing a Lessig-Method slideware object in javascript (so something fun, not important), and I keep encountering strange text layout anomalies, the likes of which I can't say I've ever seen. And yet, they are pervasive across my slides. The background is straight-forward. Presentation has Slides, and Slides have Lines....

css text-align bug

I'm seeing a strange text-align bug using FF 3.0.11 on Ubuntu-Hardy. test case The letter "f" is way out in left field. I can also make this happen with a variety of fonts and sizes, involving as many as three letters flying away and stacking onto each other. Is this known? Is a fix known? (I have another question open about this tha...