W3C home > Mailing lists > Public > www-svg@w3.org > April 2005

Re: Fwd: Two questions on flowed text in 1.2

From: Thomas DeWeese <Thomas.DeWeese@Kodak.com>
Date: Sun, 17 Apr 2005 15:45:53 -0400
Message-ID: <4262BCF1.8000206@Kodak.com>
To: bulia byak <buliabyak@gmail.com>
CC: Jon Ferraiolo <jon.ferraiolo@adobe.com>, Chris Lilley <chris@w3.org>, www-svg@w3.org

bulia byak wrote:

> Hmm, actually changing font size is not the most common strategy when
> fitting text into a box. Usually, at first one tries to achieve that
> by changing letterspacing and/or word spacing, then by line spacing,
> sometimes even by squeezing the font horizontally. Changing the font
> size is usually one of the last resorts, only if the space deficit is
> large enough. 

    Well in my use cases it is almost always the case that the text
can not be made to fit just by 'squishing' it.  Also in my use cases a
'designer' has not really decided that the text should fit, so rather
than messup the normal layout of the text changing the font-size is
probably the preferred solution (obviously in some systems the normal
layout may involve some amount of squishing to avoid things like
lines with just one word etc).

    I will agree that in the case where a designer has 'fit' the text
to a region spacing adjustments are much better than futzing with

> So, if such a feature is indeed added, I think it might
> be as simple as an attribute which _requires_ that the given text fits
> the given container. The specific way(s) of satisfying this
> requirement may be left to the discretion of the SVG renderer.

    I would probably go along with this...  My only concern is that at
some point the system really should 'break down' and the fit should
fail.  When someone pastes Hamlet into a 2 line text box you are
going to spend a lot of time trying to make it fit when it clearly
isn't going to be useful when it does.  But I will agree that there
is a lot to be said for the simplicity.

>>    A feature that would be of great interest in _many_ use cases for
>>flowed text in SVG would be to allow a range of font-sizes that the
>>text could use.  An implementation would start with the largest
>>font-size if the text fit all is well and good.  If the text doesn't
>>fit it adjusts the font-size down until it does or it hits a user
>>defined min font-size.  You could even leave font-size alone and
>>just add a "min-font-size" property that would default to
>>'current-font-size' - which would effectively inhibit this behavior
>>but using something like: 'font-size="24" min-font-size="12"' would
>>allow for the text to vary from 12 to 24 such that it fits the

> --
> bulia byak
> Inkscape. Draw Freely.
> http:://www.inkscape.org
Received on Sunday, 17 April 2005 19:45:56 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:02 UTC