On Thu, Jan 17, 2002 at 08:00:48PM +1000, Allan Rae wrote:

> If we know what font we are displaying, -*-times- for example, then
> won't we be able to ask the server for all the fonts that match and
> for a given font size check a list and if none matches exactly and
> there is no scalable font in the list _then_ the checkbox value
> (\use_scalable_fonts ?) decides whether we scale a bitmapped font or
> not?

I don't see why not, at least gfontsel claims to able to distinguish between
all 3 types of fonts.

Our code is :

     41         for (int i = 0; i < matches; ++i) {
     42                 if (sizes[i] == 0) {
     43                         // Scalable font should not be considered close
     44                 } else if (sizes[i] == size) {
     45                         lyxerr[Debug::FONT] << "Exact font match with\n"
     46                                             << strings[i] << endl;
     47                         return strings[i];
     48                 } else if (abs(sizes[i] - size - 0.1) < error) {
     49                         error = abs(sizes[i] - size - 0.1);
     50                         closestind = i;
     51                 }
     52         }
     53
     54         if (scalable && (lyxrc.use_scalable_fonts || closestind == -1)) {
     55                 // We can use scalable
     56                 string const font = resize(strings[scaleindex], size);


Why can't we do the X font request for the exact size of the really-scalable
font after line 42 ? It seems to me that sizes[] is just what X told us, and we
haven't actually requested any specific sizes for a really scalable font.

regards
john

-- 
"Before seeking vengeance, dig two graves."
        - Chinese proverb

Reply via email to