Commit graph

5507 commits

Author SHA1 Message Date
Behdad Esfahbod
fbe7044f10 [user-font] Improve docs. 2008-05-30 15:18:22 -04:00
Behdad Esfahbod
45be1459b2 [user-font] Document all public functions
Remains to do: callback types.
2008-05-29 02:35:09 -04:00
Behdad Esfahbod
9a05c0e7f4 Fix doc syntax. 2008-05-29 02:34:07 -04:00
Behdad Esfahbod
d0bc3ca1a2 [doc] Add Index of 1.8 symbols 2008-05-28 20:58:35 -04:00
Behdad Esfahbod
4e68140aca [doc] Document remaining CAIRO_HAS_* macros
I'm sure I had done them all before.  No idea what happened.
Perhaps gtk-doc was not seeing them as missing.
2008-05-28 20:57:36 -04:00
Behdad Esfahbod
65cc905c2f [doc] Add stub for user-fonts 2008-05-28 20:54:38 -04:00
Behdad Esfahbod
a9b2461c41 [user-font] Handle metrics-hinting font option 2008-05-28 20:29:11 -04:00
Behdad Esfahbod
b0796bf200 [user-font] Cache extent-space scale in the scaled font 2008-05-28 20:20:46 -04:00
Behdad Esfahbod
abdf04c671 [user-font] Handle the case of a null render_glyph callback 2008-05-28 19:52:56 -04:00
Behdad Esfahbod
50e6957e80 [user-font] Remove completed TODO item
The user-font-proxy test case already does this.
2008-05-28 19:31:51 -04:00
Behdad Esfahbod
f2b385558b [cairo-user-font] Add comment about possibly doing metrics-hinting 2008-05-28 19:30:39 -04:00
Behdad Esfahbod
9b1cbcde32 [user-font] Handle antialiasing font option 2008-05-28 19:27:58 -04:00
Behdad Esfahbod
e8e2386233 Remove some bogus XXX marks
These are all perfectly correct code.  Most are simply there because when
we support vertical text writing mode we need to update there, but that's
pretty trivial.  No special markers needed.

/me is trying to make user-font clean of XXX and TODO marks
2008-05-28 19:10:09 -04:00
Behdad Esfahbod
4e10241148 Fix whitespace 2008-05-28 17:12:51 -04:00
Behdad Esfahbod
78b9e29178 [cairo-xlib] Rewrite cairo_xlib_glyph_t as a union of cairo_glyph_t
Someone reported on cairo list that on some system with gcc, he had the
compile-time assertion failing, meaning that the following struct:

typedef struct {
  unsigned long index;
  union {
    struct {
      double x;
      double y;
    } d;
    struct {
      int x;
      int y;
    } i;
  } p;
} cairo_xlib_glyph_t;

had a different size from:

typedef struct {
  unsigned long        index;
  double               x;
  double               y;
} cairo_glyph_t;

That looks quite a weird thing for a compiler to do.  Anyway, rewriting
our struct like this may help in those weird situations:

typedef union {
  cairo_glyph_t d;
  unsigned long index;
  struct {
    unsigned long index;
    int x;
    int y;
  } i;
} cairo_xlib_glyph_t;

That's what we do now.
2008-05-28 17:04:09 -04:00
Behdad Esfahbod
51885e9a1e [test/user-font.c] Fix compiler warnings 2008-05-28 16:52:19 -04:00
Behdad Esfahbod
9b16b528dc [cairo-unicode] Make unicode conversion funcs take const char *utf8
Instead of the previous const unsigned char *utf8.  This is in line
with our public API now.
2008-05-28 16:48:13 -04:00
Behdad Esfahbod
df5ad168aa [cairo-path-fixed] Fixe compiler warning 2008-05-28 16:47:55 -04:00
Behdad Esfahbod
6938f15898 [cairo-win32-surface] Remove unused variable 2008-05-28 16:47:37 -04:00
Behdad Esfahbod
12646f81ca [cairo-compiler-private] Make it build with wine
One can build cairo with wine easily now:

./configure CC=winegcc LD=winegcc
2008-05-28 16:46:55 -04:00
Behdad Esfahbod
b70e6e1d98 One more remaining_glyphs compile fix 2008-05-28 16:09:56 -04:00
Behdad Esfahbod
9076206080 Fix two more compile errors
When adding remaining_glyphs argument to show_glyphs(), I missed
a few places.
2008-05-28 16:08:37 -04:00
Behdad Esfahbod
295dee36e3 [cairo-xlib] Use newly-added COMPILE_TIME_ASSERT 2008-05-28 13:10:07 -04:00
Behdad Esfahbod
2e4d6acd09 [cairoint.h] Add COMPILE_TIME_ASSERT() 2008-05-28 13:09:52 -04:00
Behdad Esfahbod
043ed895ad [cairo-xlib] Fix compiler warning 2008-05-28 13:09:43 -04:00
Behdad Esfahbod
26aec31f24 [src/check-def.sh] Don't report anything if skipping test 2008-05-28 12:07:13 -04:00
Behdad Esfahbod
f074073355 [configure.in] Dont let a missing FcFini disable the freetype font backend! 2008-05-28 12:02:16 -04:00
Behdad Esfahbod
d7ddde8a32 [cairo-user-font] Make backend struct static 2008-05-28 12:02:16 -04:00
Behdad Esfahbod
3306aa5e8d [src/check-def.sh] Also check for public variables (#16129) 2008-05-28 12:02:16 -04:00
Behdad Esfahbod
f3a3a0594d [cairo-xlib] Add recently-added byteswap macros (#16128) 2008-05-28 12:02:16 -04:00
Behdad Esfahbod
0bf941c9b2 Add support for byteswap macros bswap_16 and bswap_32 2008-05-28 12:02:16 -04:00
Behdad Esfahbod
5c732badbc [src/check-def.sh] Improve test comment 2008-05-28 12:02:16 -04:00
Behdad Esfahbod
e8dd97fde8 [cairo-scaled-font] Fix assertion failure
Revert 127c4b8e64
We assume that all scaled fonts with ref count 0 are in holdover cache.
That commit was breaking this assumption.
2008-05-28 12:02:16 -04:00
Behdad Esfahbod
8c4f4a758b [cairo-gstate] Use clip, not surface, extents to drop invisible glyphs 2008-05-27 20:27:18 -04:00
Behdad Esfahbod
c752bd665a [cairo-gstate] Add _cairo_gstate_int_clip_extents() 2008-05-27 20:27:07 -04:00
Behdad Esfahbod
0f07c45fa3 [test/user-font] Use user_data to access glyphs array
This way the same callback code can be used to render multiple different
glyph arrays.  Change done for education purposes, otherwise doesn't
make any difference in the test.
2008-05-27 17:53:35 -04:00
Behdad Esfahbod
626edfc333 [cairo-mutex] Prepare mutex infrastructure for adding mutex debugging facilities
Essentially renaming cairo-mutex-type-private.h to cairo-mutex-impl-private.h
and changing all its namespace from cairo_mutex to cairo_mutex_impl.
cairo-mutex-type-private.h then does all the sanity checks on the
implementation that used to be in cairo-mutex-private.h.  Plus, defines macros
for the cairo-mutex namespace to map to the cairo-mutex-impl namespace.  This
extra mapping layer allows for add debugging facilities.
2008-05-27 05:11:00 -04:00
Ginn Chen
07fef4f480 [cairo-xlib] Implement _cairo_xlib_surface_solid_fill_rectangles() (#11529) 2008-05-27 05:07:44 -04:00
Behdad Esfahbod
f90b155b5a [cairo-xlib] Delay using fallback if xrender is not available
So we can use XCopyArea when Render is not available.  Based on patch by
Ginn Chen.
2008-05-27 05:07:44 -04:00
Behdad Esfahbod
30a16df29b [util/backtrace-symbols] Implement backtrace_symbols_fd() 2008-05-27 04:45:37 -04:00
Adrian Johnson
ce56e0cd0c Add missing argument to _cairo_pdf_surface_show_glyphs()
cf473f4a75 missed the PDF surface when
it added an argument to the show_glyphs() surface backend function.
2008-05-27 12:44:50 +09:30
Behdad Esfahbod
8d86e725ce [cairo-gstate] Add code for switching to path;fill for huge show_glyph()s
For really huge font sizes, we can just do path;fill instead of
show_glyphs, as show_glyphs would put excess pressure on the cache,
and moreover, not all components below us correctly handle huge font
sizes.  I wanted to set the limit at 256.  But alas, seems like cairo's
rasterizer is something like ten times slower than freetype's for huge
sizes.  So, no win just yet.  For now, do it for insanely-huge sizes,
just to make sure we don't make anyone unhappy.  When we get a really
fast rasterizer in cairo, we may want to readjust this.
2008-05-25 02:30:14 -04:00
Behdad Esfahbod
f5fbb8b24e Fix typo. 2008-05-25 01:53:44 -04:00
Behdad Esfahbod
238a3117f1 [cairo-scaled-font] Clean up recent locking changes
Based on feedback from Keith.
2008-05-25 01:51:05 -04:00
Behdad Esfahbod
0621f412ff [cairo-matrix] Move IS_FINITE(det) checks before det==0 checks
I'm still getting floating point exceptions in test suite in a
made-to-overflow test though.  Not sure why isfinite() doesn't work.
2008-05-25 00:55:36 -04:00
Behdad Esfahbod
9827dae570 [user-font] Fix fontmap locking
After consulting with Keith Packard we came up with a farily simple
solution.  Documented in the code.
2008-05-25 00:42:28 -04:00
Behdad Esfahbod
96f7178226 [user-font] Lock the font mutex such that user doesn't accidentally use it yet 2008-05-24 23:28:15 -04:00
Behdad Esfahbod
8dc1e6d945 One more typo fix 2008-05-24 22:13:01 -04:00
Behdad Esfahbod
8ff0fa112d Fix typos 2008-05-24 22:11:41 -04:00
Behdad Esfahbod
a3d9918428 [user-font] Note possible locking issue 2008-05-24 20:51:43 -04:00