what is the status of the font rendering

Andrew Tween amtween at hotmail.com
Sun Apr 22 09:37:23 UTC 2007


----- Original Message ----- 
From: "sig" <siguctua at gmail.com>
To: "The general-purpose Squeak developers list"
<squeak-dev at lists.squeakfoundation.org>
Sent: Sunday, April 22, 2007 9:07 AM
Subject: Re: what is the status of the font rendering


> I see no problem in having invalid font dirs in class var. The paths
> just need to be checked when image starts. why this a problem?

It isn't a problem.

> If going this way, you can just put there all well known paths for
> every known platform at package installation phase and don't care if
> they all valid.

It is better to use FFI to get the known font paths from the OS.
Here's why.
Consider windows. The font folder might be c:\windows\fonts or c:\winnt\fonts or
e:\windows\fonts etc.
On a dual boot machine (e.g. Vista and Windows 2000), both c:\windows\fonts AND
c:\winnt\fonts could be present. Which one should be used?

It would certainly be possible to include every possible path, for every drive
letter, and check for their existence. But this can cause annoying side effects.
If d: is the cd/dvd-rom drive, and it has been accessed in this session but it
currently contains no disk, then, when checking for the existence of
d:\windows\fonts, windows pops up a dialog saying that the drive can't be
accessed. Very annoying.

I don't know if it is possible to get the paths from a Linux OS using FFI, hence
the hardcoded paths.
You are suggesting that rather than these paths being hardcoded in a method;
they are hardcoded in a method AND copied to a class var. The paths can then be
edited through some new window?

There are a number of questions here...
    1. should the user being able to add and remove font folder paths?
    2. should the user be able to add and remove font FILE paths?
    3. What is the user interface for performing these edits?
    4. Where and how should the paths be persisted?
    5. If different versions of the same font are found in more than one folder,
which should take precedence?

Perhaps the user can only add paths, not remove them.
Perhaps the user can add and remove paths, but isn't allowed to remove the
predefined, well known, paths.
Perhaps the info is persisted outside the image in a config/ini file.

I don't know the answers. But it is good to have the discussion.


> Rendering engine must be aware that some or all of
> given directories can be missing or contain no fonts. You need to
> check it anyways because they external to image and if i added new
> directory and then moved/renamed it in my OS the squeak must not crash
> after restart.

Correct.

Cheers,
Andy




More information about the Squeak-dev mailing list