[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: DiaFont abstraction and namespacing



Le Sun, Jun 23, 2002, à 03:32:23PM +0200, Hans Breuer a écrit:

> >Which comments ? 
> > 
> "The Pango people don't seem to encounter the real world much..."

Oh ! This is not mine...
 
> Impressive, if it wouldn't pop up about 8 message boxes with:
> 	Trying to set invalid font arial, helvetica, helv, sans!
> 	Trying to set invalid font courier new, courier, monospace, fixed!
> on UML
> classes; which isn't Lars' fault but some strangeness with BASIC_SANS_FONT,
> BASIC_MONOSPACE_FONT etc.


Yes, I selected that, because on my system, plain "monospace" and "sans" are
flat out ugly. We should fix Lars' selector to keep only the first valid item of a
comma-separated list (Pango does this on its side).

> >Means dia is now hardcoded to only three families ? 
> Nope. But these constants could be used for some simplifiction like
> 
> 	dia_font_new_from_style(DIA_FONT_SANS | DIA_FONT_BOLD, 0.42) 
> 
> which I hope could replace the BASIC_SANS_FONT, ... above. It appears
> to me that at least the win32 Pango backend isn't capable of
> loading such.
Oh, I see.

> With my approach there would only be one central place in font.c
> where the assignment between "BASIC_*" and a real font name needs
> to happen. I'm not sure if even there it is required than. Pango
> should be able to give me a font from style only - without
> naming it. As font info to store one would have the font name
> _and_ the style as fallback.

And how do you get the specific families, then ?

> What I like to get though is a - per default - shorter list
> of fonts to select from. In the spirit of useability and
> the ability to exchange diagrams between platforms with
> differnt font sets. 
> I am thinking of a GtkFifoOptionMenu with a details entry to 
> select additional fonts from the standard Gtk font selector, 
> to have the choice of using any font available on the system. 

Hmmm. Sounds good, then.
 
> >(there are so many
> >available families on my system I have to scroll through three screenfuls of
> >the font widget -- with 1024 dots of vertical resolution).
> >
> Is this the new kind of useability, menus about 3072 pixels long :-) ?

Ahem.

 
> >Some constants for the general (regular, bold, italic, bold-italic) styles
> >may be a useful thing to keep.
> >
> Something like ?
> #define DIA_FONT_STYLE_SANS_NORMAL (DIA_FONT_SANS | DIA_FONT_WEIGHT_NORMAL)
> I'm not sure if it's worth the effort, but will do it when replacing
> BASIC_*_FONT otherwise would be too much hassle.

OK.

> BTW: here are some of the warnings Dia (or better Pango) spits out
> if I play with uml-demo.dia (Is this your magic font scaler? :) :
> 
> ** (dia.exe:4294445299): WARNING **: Couldn't load font "courier new,
> courier, monospace, fixed Ultra-Light Semi-Condensed 16.8037109375" falling
> back to "SansUltra-Light Semi-Condensed 16.8037109375"

Could be.

It's very possible the stretcher loop should be commented out, or made
smarter (to actually request *available* stretches; stretch in fact is a
one of the dimensions of the font face space).


	-- Cyrille

-- 
Grumpf.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] Mail converted by Mofo Magic and the Flying D

 
All trademarks and copyrights are the property of their respective owners.

Other Directory Sites: SeekWonder | Directory Owners Forum

GuideSMACK