fonts

Daniel KochmaƄski daniel at turtleware.eu
Mon Aug 14 06:12:28 UTC 2017


Hey Greg,

standard makes it possible to extend set of available fonts, but 
mandates only three basic ones. Also list of fonts is dependent on port 
(which is a backend thing), because some fonts suitable for X may not be 
suitable for say Wayland etc. We have portable extension allowing us to 
use TTF fonts - how it works you may check out  Extensions/fonts 
subdirectory in McCLIM tree. For how to use them, you may check (a bit 
messy) example in Examples/font-selector.lisp .

Without further descriptions, you may have a list of such things with:

     (clim-extensions:port-all-font-families (clim:find-port))

Find-port finds port used automatically for your platform (CLX).
To see text-style associated with medium, you may use functions 
pane-text-style and (low level) medium-text-style. For quick reading the 
spec, you may use spec browser hosted here:

http://bauhh.dyndns.org:8000/clim-spec/edit/apropos?q=text-style

Another interesting function may be text-style-mapping, though I think 
you don't need it due to our extension. For better understanding I 
recommend reading code of the above-mentioned extension.

Hope that helps.
Best regards,
Daniel
On 14.08.2017 03:59, Greg Bennett wrote:
> Good morning, from Greg Bennett
>
> Is there a way to make a list of all the (fonts or) text-styles 
> potentially available in mcclim  ?
>
> Under allegro I can do this, for example:
>
> (defun font-names ()
>      "Collects (family.face) list for (cg::screen cg::*system*)"
>      (let (fonts
>              (root (cg::screen cg::*system*)))
>       (cg::with-device-context (hdc (cg::screen cg::*system*))
>          (loop for face in (cg::font-faces root)
>            do
>            (loop for family in (list :modern :roman :swiss NIL)
>              do
>              (push (cons family face) fonts))
>            ))
>          fonts))
>
> While I can see text-style-face, text-style-family to extract those 
> things from text-styles,
> I cannot yet see how to find something like (text-styles-of ??).
>
> Thanks for any and all assistance
>
> Cheers /Greg Bennett
>




More information about the mcclim-devel mailing list