- From: David Singer <singer@apple.com>
- Date: Wed, 22 Oct 2014 10:13:07 +0200
- To: www-style list <www-style@w3.org>
On Oct 21, 2014, at 9:33 , John Daggett <jdaggett@mozilla.com> wrote: > Hi Cam, > > Rather than using new CSS features to solve your problem, I think the simplest and best approach here is simply to use a font that's designed for the set of characters you intend to use. Applying "effects" like this is always a second-rate option. true, but is it possible to predict the coverage of a ‘generic’ font like monospace? isn’t it likely to vary across platforms? Perhaps doing a character-fallback from a font that has a certain ‘promise’ (e.g. monospacing in this case) to one that does not adhere to that promise is not helpful, unless some kind of adjustment step is taken? > > Cheers, > > John > > > ----- Original Message ----- > From: "Cameron McCormack" <cam@mcc.id.au> > To: "www-style list" <www-style@w3.org> > Sent: Tuesday, October 21, 2014 2:35:13 PM > Subject: [css-text][css-fonts] preventing font fallback from ruining my monospace text's alignment > > I have a document that includes some code snippets in <pre> elements. > Here is one: > > <pre> > ... > <ex:arc from="n2" to="n3" label="Λ + c"/> > ... > </pre> > > It turns out that the font I am using for my code snippets doesn't have > a glyph for the "Λ" character, and that the fallback font it ends up > using has an advance that is a bit bigger than that of the surrounding > characters. This causes all the following characters to look > misaligned, when looking at the lines above and below it. > > Is there a way to prevent that from happening? I feel like I want the > ability to compress the "Λ" so that its advance is 1ch or perhaps to let > it render at its slightly-bigger-than-I-want size but then place the > following character where I expect it. > > pre { font-family: My Monospace Font; text-advance: 1ch compress; } > > David Singer Manager, Software Standards, Apple Inc.
Received on Wednesday, 22 October 2014 08:13:41 UTC