Re: wxEuphoria - get_facenames() issue

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

Matt Lewis wrote:
> 
> Greg Haberek wrote:
> > 
> > Matt Lewis wrote:
> > > 
> > > Quick googling doesn't give me an answer as to whether there's even an API
> > >
> > > for doing this.
> > 
> > Pete knows how! Edita does this (that's actually where I got the idea from).
> > But obviously Edita uses ARWEN not wxEuphoria. At least we know there's a
> > way
> > to do it in Windows.
> 
> Interesting.  If there's a gtk way to do it, then we're set.
> 
> Matt

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

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

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)
>>
>>Return array of strings containing all facenames found by 
>>EnumerateFacenames.

Then it might be possible to build valid sizes in a similar fashion via:

>>wxFontEnumerator::EnumerateFacenames
>>
>>virtual bool EnumerateFacenames( wxFontEncoding encoding =
>>>>wxFONTENCODING_SYSTEM, bool fixedWidthOnly = false)
>>
>>Call OnFacename for each font which supports given encoding (only if it is 
>>not wxFONTENCODING_SYSTEM) and is of fixed width (if fixedWidthOnly is 
>>true).
>>
>>Calling this function with default arguments will result in enumerating 
>>all fonts available on the system.

The above quotes are from
http://wxwidgets.org/manuals/stable/wx_wxfontenumerator.html#wxfontenumeratorenumeratefacenames

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.

Regards,
Pete

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

Search



Quick Links

User menu

Not signed in.

Misc Menu