Commit graph

3660 commits

Author SHA1 Message Date
Behdad Esfahbod
cd72167ede [xlib] Get rid of _cairo_xlib_test_disable_render
in favor of cairo_boilerplate_xlib_surface_disable_render.
2007-04-21 02:08:38 -04:00
Behdad Esfahbod
908418cb4d [cairo-surface] Move cairo_surface_t struct in cairo-surface-private.h 2007-04-21 02:08:37 -04:00
Behdad Esfahbod
8ae02fa470 [boilerplate] Minor indentation fix 2007-04-21 02:08:37 -04:00
Behdad Esfahbod
1345552ac2 [xlib] Move cairo_xlib_surface_t definition into cairo-xlib-surface-private.h 2007-04-21 02:08:37 -04:00
Peter Weilbacher
735be3f09d Fix build break related to mutexes on OS/2
cairo_mutex_t is HTMX which is ULONG on OS/2, so we have to set the
mutex itself to 0 and not the address...
2007-04-20 20:46:55 +02:00
Chris Wilson
5135bcf414 cairo-boilerplate - use xmalloc and friends
Prefer to abort gracefully if we run out of memory (or simply to protect
them from memfault).
2007-04-20 19:08:07 +01:00
Chris Wilson
b6be361d0e Clean up compiler warnings from cairo-png
I introduced some compiler warnings into read_png() with the superfluous
introduction of a couple of volatile qualifiers. I'm sure at the time,
the reason was that gcc suggested adding them - however, ATM gcc issues
no warnings without them.
2007-04-20 17:49:10 +01:00
Adrian Johnson
fc455c53ec Ensure _cairo_scaled_font_subsets_map_glyph() returns correct values
The CID font subsetting exposed a bug where the subset_glyph->is_scaled
return argument of _cairo_scaled_font_subsets_map_glyph() is sometimes
not assigned a value.
2007-04-21 00:26:25 +09:30
Adrian Johnson
9d8eb42c01 Exclude Type1 fonts from CID subsets
Make cairo-scaled-font-subsets.c limit Type1 font subsets to
256 glyphs. This allows Type1 subsetting to be enabled again
with type1-fallback as the fallback option for Type1 fonts.
2007-04-20 22:45:12 +09:30
Adrian Johnson
56ad56263b Enable embedding of CID fonts in PDF
Update cairo-pdf-surface.c to embed CFF and TrueType fonts
as CID fonts. Update the ToUnicode CMap to handle CID fonts.
2007-04-20 22:44:04 +09:30
Adrian Johnson
ca3662d6fc Make cairo-output-stream.c accept variable width printf fields 2007-04-20 22:43:37 +09:30
Adrian Johnson
0c2a653033 Add CFF CID Fallback
Switching to CID font embedding requires a fallback font for
the case where CFF CID or TrueType CID subsetting fails.

The new function _cairo_type2_charstrings_init() added to
cairo-type1-fallback.c creates Type2 charstrings from glyph
paths. _cairo_cff_fallback_init() in cairo-cff-subset.c
wraps these charstrings in a CFF CID font.
2007-04-20 22:30:55 +09:30
Adrian Johnson
c68a2389f5 Make CFF Subsetting create CID subsets
OpenType/CFF fonts come in two types: CID and non CID.
CFF CID font subsetting was previously disabled in cairo
due 1) to the need to embed CFF CID fonts in PDF as a CID fonts
and 2) there is no easy way to convert CFF CID to CFF non CID.

With the switch to CID fonts cairo-cff-subset.c has been
updated to subset CID fonts and to covert non CID fonts to
CID. A further advantage of converting non CID CFF fonts
to CID is the reduction in size due to not embedding the
name of each glyph in the font subset.
2007-04-20 22:30:05 +09:30
Adrian Johnson
073fce5a85 Add support for creating CID/composite font subsets
cairo-scaled-font-subsets.c now provides three functions for creating subsets:

  _cairo_scaled_font_subsets_create_scaled()
    Create a subset for each scaled font with maximum size INT_MAX.

  _cairo_scaled_font_subsets_create_simple()
    Create subsets suitable for embedding as simple fonts in PS/PDF.

  _cairo_scaled_font_subsets_create_composite()
    Create subsets suitable for embedding as composite fonts in PS/PDF.

The _create_simple() and _create_composite() functions both merge
scaled fonts with the same face and an outline path available into
the same subset. _create_composite() has a maximum subset size of
65536 for outline fonts. Bitmap fonts have a separate subset for
each scale with a maximum subset size of 256.

The _create_simple() and _create_composite() functions both reserve
the first glyph in the subset for the .notdef glyph. CID fonts require
CID 0 to be .notdef.

Update Type1, TrueType and CFF subsetting to expect glyph 0 of each
subset to be the .notdef.
2007-04-20 22:29:41 +09:30
Chris Wilson
bf957ee0f2 cairo-png - handle short reads
During MT cairo testing we get the error "libpng: Read Error" which is
emitted should the fread return fewer bytes than asked. However, this is
not necessarily an error, so double-check the ferror() status before
raising a png_error().
2007-04-20 09:52:49 +01:00
Behdad Esfahbod
d00aa44206 [Makefile.am] Add a "make snapshot" target
that creates a tarball named with version, date, and git hash of
the tree.  Like cairo-1.4.5-20070420-2a0389.tar.gz.
2007-04-20 01:28:56 -04:00
Behdad Esfahbod
2a03895663 [pixman] Fix typo in Makefile.am 2007-04-20 00:55:03 -04:00
Behdad Esfahbod
abcd929c57 [boilerplate] Add cairo_boilerplate_format_from_content 2007-04-20 00:52:04 -04:00
Behdad Esfahbod
97624dc488 [boilerplate] Strip test-surfaces boilerplate into cairo-boilerplate-test-surfaces* 2007-04-20 00:52:04 -04:00
Behdad Esfahbod
2e709321d8 [boilerplate] Move xasprintf to xmalloc.c 2007-04-20 00:52:03 -04:00
Behdad Esfahbod
5331445c12 [boilerplate] Cleanup includes in cairo-boilerplate-beos.cpp 2007-04-20 00:52:03 -04:00
Behdad Esfahbod
56e916d40c [boilerplate] Fix typos in cairo-boilerplate-glitz.c 2007-04-20 00:52:03 -04:00
Behdad Esfahbod
06718b0da6 [boilerplate] Remove leftover call to cairo_test_log 2007-04-20 00:52:03 -04:00
Behdad Esfahbod
99737a60cb [boilerplate] Clean up includes and remove unnecessary ones 2007-04-20 00:52:03 -04:00
Behdad Esfahbod
4b569f13d7 [boilerplate] Strip win32 boilerplate into cairo-boilerplate-win32* 2007-04-20 00:52:03 -04:00
Behdad Esfahbod
0a03d66fff [boilerplate] Rename create_win32_surface to _cairo_boilerplate_win32_create_surface 2007-04-20 00:52:03 -04:00
Behdad Esfahbod
5ee882d394 [boilerplate] Remove empty cleanup_win32 2007-04-20 00:52:03 -04:00
Behdad Esfahbod
a684fd80e7 [directfb] Silence compiler warning 2007-04-20 00:52:03 -04:00
Behdad Esfahbod
23e6abc3fc [boilerplate] Strip glitz boilerplate into cairo-boilerplate-glitz* 2007-04-20 00:52:03 -04:00
Behdad Esfahbod
7d576a3767 [boilerplate] Minor indentation fix 2007-04-20 00:52:03 -04:00
Behdad Esfahbod
06b657ccf1 [boilerplate] Strip xcb boilerplate into cairo-boilerplate-xcb* 2007-04-20 00:52:02 -04:00
Behdad Esfahbod
65f636649d [boilerplate] Strip svg boilerplate into cairo-boilerplate-svg* 2007-04-20 00:52:02 -04:00
Behdad Esfahbod
8c9960675b [boilerplate] Strip pdf boilerplate into cairo-boilerplate-pdf* 2007-04-20 00:52:02 -04:00
Behdad Esfahbod
d9ce7de575 [boilerplate] Rename xcairo_surface_set_user_data to cairo_boilerplate_surface_set_user_data
and make it public.
2007-04-20 00:52:02 -04:00
Behdad Esfahbod
df6b8ecc89 [boilerplate] Strip ps boilerplate into cairo-boilerplate-ps* 2007-04-20 00:52:02 -04:00
Behdad Esfahbod
6461f0d120 [boilerplate] Remove unused variables 2007-04-20 00:52:02 -04:00
Behdad Esfahbod
f2d6275352 [boilerplate] Fix renaming typo 2007-04-20 00:52:02 -04:00
Behdad Esfahbod
d5535c993b [boilerplate/test] Move vector_ignored_tests from boilerplate/ to test/ 2007-04-20 00:52:02 -04:00
Behdad Esfahbod
d6dc4f9783 [boilerplate] Add a boolean is_vector to boilerplate target type
This is used to move the skip-these-tests-for-vector code into
cairo-test which it belongs.
2007-04-20 00:52:02 -04:00
Behdad Esfahbod
0b5e2dbaa8 [boilerplate] Sort backend entries in Makefile.am alphabetically 2007-04-20 00:52:02 -04:00
Behdad Esfahbod
be0320c4f8 [boilerplate] Properly namespace boilerplate methods
in preparation for ripping them into per-backend files.
2007-04-20 00:52:02 -04:00
Behdad Esfahbod
9b660a3d54 [boilerplate] Strip xlib boilerplate into cairo-boilerplate-xlib* 2007-04-20 00:52:02 -04:00
Behdad Esfahbod
d945f64346 [boilerplate] Move includes around 2007-04-20 00:52:01 -04:00
Behdad Esfahbod
0130cca692 [boilerplate] Rename test-directfb to boilerplate-directfb 2007-04-20 00:52:01 -04:00
Behdad Esfahbod
fb2c0daa09 [boilerplate] Rename test-beos to boilerplate-beos 2007-04-20 00:52:01 -04:00
Behdad Esfahbod
01760286b3 [boilerplate] Rename quartz-boilerplate to boilerplate-quartz 2007-04-20 00:52:01 -04:00
Chris Wilson
d64ef35521 Include cairo-perf in make check
Although cairo-perf is not written to perform explicit failure testing of
cairo, it does generate long sequences of cairo operations which often
trigger unexpected errors. By including it with make check, it becomes
even easier for the programmer to check that one has not broken cairo in
terms of expected behaviour or performance.
2007-04-19 23:12:09 +01:00
Behdad Esfahbod
0ffb021e9b [cairo-mutex] If no mutex implementation is found, should #error instead of #warning
otherwise we will cause compile errors before the sanity check macros get
a chance to err.
2007-04-19 16:53:24 -04:00
Behdad Esfahbod
813cdd7150 [configure.in] Support --disable-pthread
Also allows for --enable-pthread=yes which will make configure abort
if pthread is not found (as opposed to silently disabling it).
2007-04-19 16:53:24 -04:00
Chris Wilson
6d01e89988 Add callgrind output files to CLEANFILES and .gitignore. 2007-04-19 21:46:00 +01:00