Re: wxEuphoria - get_facenames() issue

new topic     » goto parent     » topic index » view thread      » older message » newer message

Pete Lomax wrote:
> 
> Fairly obviously, Edita/Arwen uses winAPI, eg from eafonts.ew:
> }}}
<eucode>
>     cbid = CallBack(routine_id("EnumFontFamExProc"))
>     void = c_func(xEnumFontFamiliesExA,{hDC,lf,cbid,0,0})
> </eucode>
{{{

> It just builds a list of allowed font sizes in EnumFonFamExProc(), 
> which gets called for each and every permitted facename/pointsize combo.

Yeah, I took a look at that code as soon as Greg mentioned it.
 
> The only thing I can suggest is that if wxEuphoria is implementing 
> get_facenames() via:
> 
> >>wxFontEnumerator::GetFacenames
> >>
> >>static wxArrayString GetFacenames(wxFontEncoding encoding = 
> >>wxFONTENCODING_SYSTEM, bool fixedWidthOnly = false)
> 
> Then it might be possible to build valid sizes in a similar fashion via:
> 
> >>wxFontEnumerator::EnumerateFacenames
> >> [snipped]

> Not that I properly understand all that smile but
> it would seem to depend on whether that OnFacename (some kind of virtual 
> function it seems) gets called the same way or not.

Yes, wxEuphoria uses GetFaceNames.  Basically, GetFaceNames (if you look
at the wxWidgets source) uses a simple object that overrides OnFacename,
and just accumulates them for you into a wxArrayString, which I turn into a 
sequence and pass back.

Unfortunately, there is no way to get the available sizes through wxWidgets.
I did some research into doing this on GTK through pango (the GTK font lib 
or whatever), and didn't see any obvious way to do it, or if it were 
available at all.  I suspect that I may have to go down into X itself to 
get this information.

Matt

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu