[Cairo] Review of text API in new virtualized font interface
Carl Worth
cworth at east.isi.edu
Tue Oct 21 12:46:36 PDT 2003
On Oct 21, Keith Packard wrote:
> If you're going to use CSS2, you might as well stick all of the values
> into the typedef; it's 'free'; the underlying code can simply compare <=
> NORMAL and > NORMAL for not-bold/bold.
The rest of the CSS2 weights are just numbers, right? (except bolder
and lighter of course which we won't need). Perhaps we should just
ignore CSS2 altogether. One fear I have about basing the "toy" API on
CSS2 at all is that a user might feel the need to wade through that
giant spec. just to use this. I certainly wouldn't want that.
> Style includes many attributes not covered here, this really is
> just slant.
Since I want to ignore CSS2 now, I actually prefer slant as well. But
I'm curious, from what I read[*] CSS2 "font-style" has exactly the
values "normal", "italic", and "oblique", (and "inherit" which isn't
interesting). Did I miss something about CSS2 or did you just mean in
general that "style" suggests more than just "slant".
> cairo_select_font/cairo_set_font should always be followed by
> cairo_scale_font/cairo_transform_font.
Yes. And in that case, we can just drop the cairo_font_scale and
cairo_font_transform calls too. I like that idea.
> Freeze/thaw? I don't see the point here. With cairo_set_font, there may
> be device-specific 'issues' with scaling fonts, but that's not our problem
> in this part of the API.
graydon and I were chatting and perceived a potential future problem
that this could address. We'll see if it comes up or not.
> > The freetype-specific portion of the API should be moved into a new
> > file cairo-ft.h.
>
> I thought we'd discussed this and decided that cairo.h should be
> sufficient on every platform and that applications can do feature
> dectection to discover what cairo APIs were available.
You and I had discussed this, but we didn't have a decision here on
the list yet. I was still a bit concerned about namespace pollution,
but you've now proposed a nice solution for that.
Long live the single cairo.h file.
-Carl
[*] http://www.w3.org/TR/REC-CSS2/fonts.html
More information about the cairo
mailing list