[Cairo] Re: Text APIs round 2
Keith Packard
keithp at keithp.com
Thu Aug 14 10:55:03 PDT 2003
Around 12 o'clock on Aug 14, graydon hoare wrote:
> this typename shouldn't be here, should it? FT_UInt might not have any
> meaning on win32.
Oops. Missed a spot there.
> how about also having a couple (maybe-NULL-returning) downcast
> operators and a query function?
Hmm. The idea of using specific types and allowing only a one-way
conversion was to identify OS-specific code and not let it "polute"
OS-indepedent code. If you think that kind of B&D design will make your
life miserable, then perhaps we should go with a single datatype
(cairo_font_t) and have all of the functions accept that type (returning
a failure indication if the font has the wrong underlying concrete
representation).
Does anyone else have an opinion on whether this restrictive design is
likely to hurt or help?
> - someone writing code which has font-system-specific branches can ask
> cairo for its opinion on which font system to use, freeing them from
> writing font-system-detection configury tests and also enabling say
> win32 to silently acquire a fontconfig implementation someday.
I think the plan is to always prefer the native font system on each
platform; if win32 (or OS X) move to fontconfig/freetype as their native
font system, we would migrate along with them. The alternative is to have
cairo applications use different font conventions from other applications
sharing the same screen, and that seems like a really bad idea.
While we haven't made cairo applications any more portable, we have
ensured consistency in a single platform on all output devices, so you'll
get precisely the same appearance on the printer as the screen. I think
that's as good as we can do, and certainly it's a lot better than the
state of the art for X desktops.
-keith
More information about the cairo
mailing list