[FIX] TTCFontFixes-nk
Ned Konz
ned at bike-nomad.com
Thu Jun 26 01:07:06 UTC 2003
On Wednesday 25 June 2003 05:21 pm, Yoshiki.Ohshima at acm.org wrote:
> One thing I noticed is TTCFont>>emphasis doesn't check the
> NamesToIndexes dictionary.
Right, it should. I'll post another version.
> Now I'm wondering that the way we use to avoid the text style
> name conflict makes sense or not... We want to assign the same
> name for a font across the images so that project exporting/loading
> can be done without confusion. Maybe we should always put 'TT' (or
> '-TT' for readability) for TrueType fonts.
>
> How do you think?
Well, we could do this for file-out, but I don't think it's necessary.
After all, when we file out a TTCFont we store the name in the
TTCFont, as well as its ttcDescription as a DiskProxy that will then
do something like this to load:
TTCFontDescription descriptionNamed: ttcDescription name
Now, on reading this back in the TTCFontDescription is only going to
find other TTCFontDescriptions (though it could be a little bit
looser about how to find them).
I think at least we could fall back to stripping out TT prefixes and
suffixes, and to comparing without spaces or case sensitivity, if we
don't find an exact match in Descriptions.
Though I do think that on reading the TTCFont back in it might make
sense to make sure that its name agrees with its ttcDescription's
name (since that might have changed if we do loose lookup).
The other place where font names is a concern is in styled text. There
we just store the familyName and size for font references. So if
there's a corresponding font on the target system that has exactly
the same naem it should be OK. Otherwise you get the default font.
But we also store the font number for some size changes, which means
that when you read this text back into an image with a different set
of font sizes that your text is going to be a different size.
And we store the one-bit emphasis flags
normal/bold/italic/underline/struckout as well.
--
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE
More information about the Squeak-dev
mailing list
|