cairo/src
Chris Wilson d3330d7beb [ft] Substitute twin if there are no fonts
Fixes bug 22356 -- Spurious "out of memory" error on system without fonts
https://bugs.freedesktop.org/show_bug.cgi?id=22356

If FcFontMatch() fails, then it means that there are no fonts available on
the system (or it may have been a malloc error, we have no way of telling).
Instead of report NO_MEMORY and disabling all drawing, one of the
rationales for including a builtin font was so that we could continue even
in the face of this error and show *something* to the user. (This being a
last resort (and especially important for demos!) and hopefully easier to
diagnose than no output at all.)
2009-06-19 11:20:48 +01:00
..
.gitignore [build] Include all generated win32 build files in the repo 2009-01-09 15:55:24 -05:00
cairo-analysis-surface-private.h [analysis] Merge two analysis status codes. 2008-09-26 13:42:28 +01:00
cairo-analysis-surface.c [analysis] Restore nops for the analysis null surface 2009-06-19 00:28:58 +01:00
cairo-arc-private.h Add cairo_private to several function prototypes that were missing it. 2005-08-09 13:01:14 +00:00
cairo-arc.c Remove some bogus XXX marks 2008-05-28 19:10:09 -04:00
cairo-array.c [surface] Speed up cairo_surface_get_mime_data(). 2009-06-01 18:04:13 +01:00
cairo-atomic-private.h [atomic] Hide compiler warnings 2009-06-05 18:35:52 +01:00
cairo-atomic.c [atomic] Provide mutex-based ptr cmpxchg 2009-06-05 18:29:40 +01:00
cairo-base85-stream.c Mark allocation failures as unlikely. 2008-11-29 11:20:34 +00:00
cairo-bentley-ottmann.c [memfault] Manually inject faults when using stack allocations 2009-04-23 09:22:51 +01:00
cairo-beos-surface.cpp [cairo-spans] Add a check/create_span_renderer backend methods. 2008-12-06 14:04:36 +02:00
cairo-beos.h Use #include "cairo-*." instead of #include <cairo-*.h> 2008-06-23 00:30:04 -04:00
cairo-cache-private.h [cache] Expose init/fini methods so that caches can be embedded. 2009-06-01 18:04:14 +01:00
cairo-cache.c [cache] Expose init/fini methods so that caches can be embedded. 2009-06-01 18:04:14 +01:00
cairo-cff-subset.c [cff-subset] Free ps_name. 2009-01-29 10:10:41 +00:00
cairo-clip-private.h [region] Move region function prototypes to cairo.h along with helper types. 2009-03-28 18:02:57 -04:00
cairo-clip.c [clip] Missing {} (coding style) 2009-06-17 17:15:26 +01:00
cairo-color.c [directfb] When blitting check if we need the un-premultiplied color. 2008-10-20 23:20:24 +01:00
cairo-combsort-private.h [tessellator] Use a combsort for sorting the event queue. 2008-10-30 19:08:24 +00:00
cairo-compiler-private.h [win32] Use _hypot instead of hypot 2009-03-21 11:56:18 -07:00
cairo-debug.c Import Qt backend by Mozilla 2009-06-16 11:03:46 +01:00
cairo-deflate-stream.c Mark allocation failures as unlikely. 2008-11-29 11:20:34 +00:00
cairo-deprecated.h [cairo-deprecated.h] Remove mention of cairoint.h from public header 2008-05-09 15:54:10 +02:00
cairo-directfb-surface.c [pattern] Pass flags to _cairo_pattern_acquire_surface() 2009-06-02 15:13:45 +01:00
cairo-directfb.h Make sure feature macros are checked using #if, not #ifdef; add a test for it 2008-09-20 17:20:36 -04:00
cairo-features-uninstalled.pc.in Build -uninstalled.pc files 2008-09-11 00:38:30 -04:00
cairo-features.pc.in More fixes for pkgconfig files 2008-09-10 12:41:57 -04:00
cairo-fixed-private.h [cairo-fixed] Implement _cairo_fixed_mul_div() 2008-05-15 20:02:33 -04:00
cairo-fixed-type-private.h Change cairo's fixed-point format from 16.16 to 24.8 2008-02-27 15:08:18 -08:00
cairo-fixed.c [fixpt] Make fixed point methods static inline and generic 2007-07-18 22:45:21 +02:00
cairo-font-face-twin-data.c [twin] Improve glyph hints 2008-12-25 02:46:27 -05:00
cairo-font-face-twin.c [ft] Substitute twin if there are no fonts 2009-06-19 11:20:48 +01:00
cairo-font-face.c [toy-font-face] Move toy font face code in a file of its own 2008-12-20 01:18:12 -05:00
cairo-font-options.c [font-options] Doc typo 2009-06-03 10:45:51 +01:00
cairo-freelist-private.h Revamp the build system. 2008-09-02 20:24:08 -04:00
cairo-freelist.c valgrindify init/fini routines 2009-06-04 14:17:43 +01:00
cairo-ft-font.c [ft] Substitute twin if there are no fonts 2009-06-19 11:20:48 +01:00
cairo-ft-private.h Add CairoScript backend. 2008-11-13 11:36:54 +00:00
cairo-ft.h Support compiling without fontconfig 2009-03-17 00:58:40 -04:00
cairo-glitz-private.h [slim] hide cairo_glitz_surface_create() (#8551) 2006-10-08 17:07:17 -04:00
cairo-glitz-surface.c Add more surface snapshots providers 2009-06-02 15:13:48 +01:00
cairo-glitz.h Use #include "cairo-*." instead of #include <cairo-*.h> 2008-06-23 00:30:04 -04:00
cairo-gstate-private.h [cairo] Track the MRU scaled font 2009-06-02 15:13:44 +01:00
cairo-gstate.c valgrindify init/fini routines 2009-06-04 14:17:43 +01:00
cairo-hash-private.h [scaled-font] Lean and mean global glyph cache. 2009-03-16 20:51:50 +00:00
cairo-hash.c [scaled-font] Lean and mean global glyph cache. 2009-03-16 20:51:50 +00:00
cairo-hull.c [memfault] Manually inject faults when using stack allocations 2009-04-23 09:22:51 +01:00
cairo-image-info-private.h Add PNG get info function 2008-11-24 22:27:09 +10:30
cairo-image-info.c Change uint to uint32_t 2008-11-26 06:40:47 +10:30
cairo-image-surface.c Factor out _cairo_image_surface_span_render_row() 2009-06-18 19:29:12 +03:00
cairo-lzw.c Mark allocation failures as unlikely. 2008-11-29 11:20:34 +00:00
cairo-malloc-private.h [memfault] Update macros to avoid namescape collision with memcheck 2009-05-15 21:31:03 +01:00
cairo-matrix.c [stroker] Rectilinear dashing. 2009-01-29 14:55:21 +00:00
cairo-meta-surface-private.h Make meta-surface store and replay extents of each operation 2008-11-02 20:12:29 +10:30
cairo-meta-surface.c [pattern] Add _cairo_pattern_fini_snapshot 2009-06-19 00:29:00 +01:00
cairo-misc.c [cairo] Tweak error strings. 2009-06-03 09:51:52 +01:00
cairo-mutex-impl-private.h Spelling corrections: s/it's/its/ 2009-01-29 10:10:40 +00:00
cairo-mutex-list-private.h [pattern] Generalise the freed pattern pool 2009-06-05 07:32:07 +01:00
cairo-mutex-private.h [cairo-mutex] Move semicolons out of cairo-mutex-list-private.h 2008-09-19 18:45:44 -04:00
cairo-mutex-type-private.h Ensure that the scaled font is frozen for the lifetime of the scaled glyph. 2008-10-22 00:53:55 +01:00
cairo-mutex.c [cairo-mutex] Move semicolons out of cairo-mutex-list-private.h 2008-09-19 18:45:44 -04:00
cairo-os2-private.h [os2] Fix includes 2008-11-26 20:22:57 +00:00
cairo-os2-surface.c Support compiling without fontconfig 2009-03-17 00:58:40 -04:00
cairo-os2.h [os2] Move include cairo.h before os2.h 2008-11-26 20:23:05 +00:00
cairo-output-stream-private.h Add CairoScript backend. 2008-11-13 11:36:54 +00:00
cairo-output-stream.c Mark allocation failures as unlikely. 2008-11-29 11:20:34 +00:00
cairo-paginated-private.h [svg] Use finer-grained fallbacks for SVG 1.2 2008-10-08 12:43:35 +01:00
cairo-paginated-surface-private.h Remove include of cairoint.h from *-private.h header files. 2007-08-23 16:13:04 -07:00
cairo-paginated-surface.c [region] Remove underscores from _cairo_region_* 2009-03-28 18:02:07 -04:00
cairo-path-bounds.c [bounds] Skip spline evaluation based on bounding bbox of control points. 2009-01-29 10:10:39 +00:00
cairo-path-fill.c [path] Mark points as const during _cairo_path_fixed_interpret() 2008-12-12 11:11:49 +00:00
cairo-path-fixed-private.h [fill] Allow rectangles to be implicitly closed. 2008-11-29 10:14:26 +00:00
cairo-path-fixed.c [path] Fix missing implicit move-to 2009-06-17 16:39:56 +01:00
cairo-path-in-fill.c [in-fill] Fix typo in on-vertex test. 2009-05-25 22:14:56 +01:00
cairo-path-private.h [cairo-path] Make _cairo_path_nil static. 2007-10-30 10:58:16 +00:00
cairo-path-stroke.c [path] Define _BSD_SOURCE to enable hypot() 2009-05-08 08:53:51 +01:00
cairo-path.c [path] Fix regression introduced with 005436 2009-03-01 10:10:24 +00:00
cairo-pattern.c [pattern] Add _cairo_pattern_fini_snapshot 2009-06-19 00:29:00 +01:00
cairo-pdf-operators-private.h PDF: Disable PDF 1.5 features when version 1.4 is selected 2008-11-24 22:27:09 +10:30
cairo-pdf-operators.c Spelling corrections: s/it's/its/ 2009-01-29 10:10:40 +00:00
cairo-pdf-surface-private.h Fix PDF pattern embedding 2009-06-14 00:43:41 +09:30
cairo-pdf-surface.c Fix PDF pattern embedding 2009-06-14 00:43:41 +09:30
cairo-pdf.h Document PDF restrict_to_version API 2008-12-23 15:04:10 +10:30
cairo-pen.c valgrindify init/fini routines 2009-06-04 14:17:43 +01:00
cairo-png.c [debug] Check image contents using memcheck. 2009-05-15 21:31:03 +01:00
cairo-polygon.c valgrindify init/fini routines 2009-06-04 14:17:43 +01:00
cairo-private.h [cairo] Embed a second gstate. 2009-01-02 09:53:25 +00:00
cairo-ps-surface-private.h [ps] Free images after emitting patterns. 2009-01-29 10:10:41 +00:00
cairo-ps-surface.c [ps] Trivial warning fix. 2009-06-02 15:13:46 +01:00
cairo-ps.h Use #include "cairo-*." instead of #include <cairo-*.h> 2008-06-23 00:30:04 -04:00
cairo-qt-surface.cpp Import Qt backend by Mozilla 2009-06-16 11:03:46 +01:00
cairo-qt.h Import Qt backend by Mozilla 2009-06-16 11:03:46 +01:00
cairo-quartz-font.c Fix compilation on OS X when compiling for 64 bit 2009-06-11 17:32:23 -04:00
cairo-quartz-image-surface.c [surface] add CAIRO_STATUS_INVALID_SIZE 2009-01-29 10:10:40 +00:00
cairo-quartz-image.h Use #include "cairo-*." instead of #include <cairo-*.h> 2008-06-23 00:30:04 -04:00
cairo-quartz-private.h Make sure feature macros are checked using #if, not #ifdef; add a test for it 2008-09-20 17:20:36 -04:00
cairo-quartz-surface.c Add more surface snapshots providers 2009-06-02 15:13:48 +01:00
cairo-quartz.h Fix compilation on OS X when compiling for 64 bit 2009-06-11 17:32:23 -04:00
cairo-rectangle.c [path] Separate the approx. bounds into 3 distinct functions 2008-12-18 14:55:20 +00:00
cairo-reference-count-private.h Make sure (and check) that all private headers include some cairo header first 2008-09-19 17:19:10 -04:00
cairo-region.c [region] Add PLT entry for cairo_region_create_rectangles() 2009-06-15 15:04:13 +01:00
cairo-scaled-font-private.h [scaled-font] Close race from 16d128 2009-06-05 07:32:44 +01:00
cairo-scaled-font-subsets-private.h [scaled-font] Fix up syntax in doc comments 2009-01-29 10:10:39 +00:00
cairo-scaled-font-subsets.c [scaled-font-subset] Check for matching font-face implementors 2009-06-19 00:28:59 +01:00
cairo-scaled-font.c [scaled-font] Check the MRU font before resolving the implementor 2009-06-19 00:29:00 +01:00
cairo-script-surface.c Query the backend to see if we can repaint the solid pattern. 2008-12-18 12:06:45 +00:00
cairo-script.h Add CairoScript backend. 2008-11-13 11:36:54 +00:00
cairo-skiplist-private.h [skiplist] Provide an initial stack allocated pool. 2009-01-29 16:47:53 +00:00
cairo-skiplist.c Only include <strings.h> for ffs() when we HAVE_FFS 2009-05-15 15:34:05 -04:00
cairo-slope.c [slope] Replace open-coding 64bit integer arithmetic. 2008-10-07 01:45:45 +01:00
cairo-spans-private.h [cairo-spans] New cairo_tor_scan_converter_t. 2008-12-06 14:04:36 +02:00
cairo-spans.c [spans] Squash a compiler warning when creating error objects. 2009-06-19 02:45:39 +03:00
cairo-spline.c [spline] fix wrong sign in _cairo_spline_bound. 2009-03-27 07:10:21 +01:00
cairo-stroke-style.c valgrindify init/fini routines 2009-06-04 14:17:43 +01:00
cairo-surface-fallback-private.h [xlib] Use minimal depth for similar clones. 2009-05-15 21:31:02 +01:00
cairo-surface-fallback.c Add a generic cow-snapshotting framework 2009-06-02 15:13:47 +01:00
cairo-surface-private.h Add a generic cow-snapshotting framework 2009-06-02 15:13:47 +01:00
cairo-surface.c [cairo-surface] Handle the all clipped out case for regions. 2009-06-18 16:42:53 +03:00
cairo-svg-surface-private.h Remove include of cairoint.h from *-private.h header files. 2007-08-23 16:13:04 -07:00
cairo-svg-surface.c [svg] Break circular snapshot reference by explicit finish 2009-06-19 00:29:00 +01:00
cairo-svg.h Use #include "cairo-*." instead of #include <cairo-*.h> 2008-06-23 00:30:04 -04:00
cairo-system.c [cairo.h] Don't define cairo_public to __declspec(dllimport) for static build 2008-09-26 13:27:42 -04:00
cairo-tor-scan-converter.c Remove zero size data array for compilation with MSVC 2009-02-10 01:58:15 +02:00
cairo-toy-font-face.c [ft] Support font_face->get_implementation 2009-06-07 19:49:00 +01:00
cairo-traps.c Reinstate cairo_region_create_rectangles() 2009-06-15 05:48:51 -04:00
cairo-truetype-subset-private.h Fix TrueType subsetting bug 2009-04-05 01:09:32 +10:30
cairo-truetype-subset.c Fix typo in comment 2009-05-27 17:56:05 +09:30
cairo-type1-fallback.c [type1] Fixup error path during write_charstrings() 2009-03-31 12:16:02 +01:00
cairo-type1-private.h Revamp the build system. 2008-09-02 20:24:08 -04:00
cairo-type1-subset.c Mark allocation failures as unlikely. 2008-11-29 11:20:34 +00:00
cairo-type3-glyph-surface-private.h Don't add a notdef glyph to Type 3 font subsets 2008-10-22 22:00:31 +10:30
cairo-type3-glyph-surface.c [type3] Propagate error from font creation. 2009-04-16 09:34:03 +01:00
cairo-types-private.h [cache] Expose init/fini methods so that caches can be embedded. 2009-06-01 18:04:14 +01:00
cairo-unicode.c [doc] Fix a few gtk-doc errors. 2008-10-14 14:42:48 +01:00
cairo-uninstalled.pc.in Build -uninstalled.pc files 2008-09-11 00:38:30 -04:00
cairo-user-font-private.h Revamp the build system. 2008-09-02 20:24:08 -04:00
cairo-user-font.c [user-font] Set the initial colour to white 2009-06-02 18:16:52 +01:00
cairo-version.c Some nasty tracks to make changing version number not cause a total rebuild 2008-08-28 18:18:23 -04:00
cairo-version.h Some nasty tracks to make changing version number not cause a total rebuild 2008-08-28 18:18:23 -04:00
cairo-wideint-private.h [tessellator] Compile fixes for !HAVE_INT64_T 2008-10-07 22:16:26 +01:00
cairo-wideint-type-private.h Make sure (and check) that all private headers include some cairo header first 2008-09-19 17:19:10 -04:00
cairo-wideint.c [tessellator] Replace open-coding _cairo_int64_cmp(). 2008-10-06 12:07:41 +01:00
cairo-win32-font.c [win32-font] Non-fatal error from GetGlyphOutlineW(GGO_METRICS) 2009-06-10 13:02:43 +01:00
cairo-win32-printing-surface.c [win32] Wrap win32-font usage with CAIRO_HAS_WIN32_FONT 2009-05-22 16:41:57 +01:00
cairo-win32-private.h Fix win32 build breakage 2009-05-17 18:05:42 +09:30
cairo-win32-surface.c Use the scanline rasterizer in the win32 backend. 2009-06-18 17:13:13 -04:00
cairo-win32.h Make sure feature macros are checked using #if, not #ifdef; add a test for it 2008-09-20 17:20:36 -04:00
cairo-xcb-surface.c [xcb] Trivial compile fix. 2009-06-11 15:35:05 +01:00
cairo-xcb-xrender.h Use #include "cairo-*." instead of #include <cairo-*.h> 2008-06-23 00:30:04 -04:00
cairo-xcb.h Use #include "cairo-*." instead of #include <cairo-*.h> 2008-06-23 00:30:04 -04:00
cairo-xlib-display.c xlib, xcb: Hand off EXTEND_PAD/EXTEND_REFLECT to Render 2009-06-05 17:26:09 +01:00
cairo-xlib-private.h [xlib] Improve GC caching efficacy 2009-06-19 00:28:57 +01:00
cairo-xlib-screen.c [xlib] Improve GC caching efficacy 2009-06-19 00:28:57 +01:00
cairo-xlib-surface-private.h xlib, xcb: Hand off EXTEND_PAD/EXTEND_REFLECT to Render 2009-06-05 17:26:09 +01:00
cairo-xlib-surface.c [xlib] Improve GC caching efficacy 2009-06-19 00:28:57 +01:00
cairo-xlib-visual.c Mark allocation failures as unlikely. 2008-11-29 11:20:34 +00:00
cairo-xlib-xrender-private.h Define RepeatNone, etc if the available Render version doesn't (#18385) 2008-11-05 11:54:54 -05:00
cairo-xlib-xrender.h Use #include "cairo-*." instead of #include <cairo-*.h> 2008-06-23 00:30:04 -04:00
cairo-xlib.h Use #include "cairo-*." instead of #include <cairo-*.h> 2008-06-23 00:30:04 -04:00
cairo.c [cairo] Remove instance of 'return free()' 2009-06-16 11:36:36 +01:00
cairo.h Import Qt backend by Mozilla 2009-06-16 11:03:46 +01:00
cairo.pc.in Improve backend .pc files generation: 2006-07-12 04:27:55 -04:00
cairoint.h [ft] Substitute twin if there are no fonts 2009-06-19 11:20:48 +01:00
check-def.sh Import Qt backend by Mozilla 2009-06-16 11:03:46 +01:00
check-doc-syntax.sh [check] Search for the word NOTE 2008-11-29 10:14:26 +00:00
check-has-hidden-symbols.c [check] Move the hidden symbol check into check-{def,plt}.sh 2008-01-11 21:21:34 +00:00
check-headers.sh [check-*.sh] Redirect error reports to stderr 2008-09-26 11:08:22 -04:00
check-link.c [src/check-link.c] Simple test to check we can link to the built cairo.so 2008-09-02 21:31:43 -04:00
check-plt.sh [check-*.sh] Redirect error reports to stderr 2008-09-26 11:08:22 -04:00
check-preprocessor-syntax.sh Import Qt backend by Mozilla 2009-06-16 11:03:46 +01:00
Makefile.am Import Qt backend by Mozilla 2009-06-16 11:03:46 +01:00
Makefile.am.analysis [check] Quieten output during checking headers-standalone 2009-05-07 15:14:14 +01:00
Makefile.sources Import Qt backend by Mozilla 2009-06-16 11:03:46 +01:00
Makefile.win32 [win32] Include $(OPT) flags when linking cairo.dll 2009-02-26 16:04:49 -05:00
Makefile.win32.features Import Qt backend by Mozilla 2009-06-16 11:03:46 +01:00
README Fix various README typos 2009-01-02 02:56:38 -05:00
test-fallback-surface.c [xlib] Use minimal depth for similar clones. 2009-05-15 21:31:02 +01:00
test-fallback-surface.h [test-surfaces] Prefix public symbols with _cairo 2007-03-13 05:14:19 -04:00
test-fallback16-surface.c [xlib] Use minimal depth for similar clones. 2009-05-15 21:31:02 +01:00
test-fallback16-surface.h [test] Create a new fallback surface to exercise 16-bit paths. 2009-05-05 21:17:11 +01:00
test-meta-surface.c Query the backend to see if we can repaint the solid pattern. 2008-12-18 12:06:45 +00:00
test-meta-surface.h [test-surfaces] Prefix public symbols with _cairo 2007-03-13 05:14:19 -04:00
test-null-surface.c [analysis] Restore nops for the analysis null surface 2009-06-19 00:28:58 +01:00
test-null-surface.h Missing header file for cairo-test-null-surface. 2009-06-15 12:14:51 +01:00
test-paginated-surface.c Query the backend to see if we can repaint the solid pattern. 2008-12-18 12:06:45 +00:00
test-paginated-surface.h [test-surfaces] Prefix public symbols with _cairo 2007-03-13 05:14:19 -04:00

Cairo Library Source Code
=========================

This directory contains the source code of the cairo library.


Source Code Listing
-------------------

The canonical list of source files is the file Makefile.sources.  See that
file for how it works.


New Backends
------------

The rule of the thumb for adding new backends is to see how other
backends are integrated.  Pick one of the simpler, unsupported, backends
and search the entire tree for it, and go from there.

To add new backends you need to basically:

  * Modify $(top_srcdir)/configure.in to add checks for your backend.

  * Modify Makefile.sources to add source files for your backend,

  * Modify $(top_srcdir)/boilerplate/ to add boilerplate code for
    testing your new backend.


New API
-------

After adding new API, run "make check" in this directory and fix any
reported issues.  Also add new API to the right location in
$(top_srcdir)/doc/public/cairo-sections.txt and run "make check"
in $(top_builddir)/doc/public to make sure that any newly added
documentation is correctly hooked up.

Do not forget to add tests for the new API.  See next section.


Tests
-----

There are some tests in this directory that check the source code and
the build for various issues.  The tests are very quick to run, and
particularly should be run after any documentation or API changes.  It
does not hurt to run them after any source modification either.  Run
them simply by calling:

	make check

There are also extensive regression tests in $(top_srcdir)/test.  It is
a good idea to run that test suite for any changes made to the source
code.  Moreover, for any new feature, API, or bug fix, new tests should
be added to the regression test suite to test the new code.


Bibliography
------------

A detailed list of academic publications used in cairo code is available
in the file $(top_srcdir)/BIBLIOGRAPHY.  Feel free to update as you
implement more papers.

For more technical publications (eg. Adobe technical reports) just
point them out in a comment in the header of the file implementing them.