Age | Commit message (Collapse) | Author | Files | Lines |
|
Previously the glyph advance in font units was used for the widths in
the PDF font dictionary. This only works for cff fonts that use a
[0.001 0 0 0.001 0 0] font matrix.
|
|
I updated the Free Software Foundation address using the following script.
for i in $(git grep Temple | cut -d: -f1 )
do
sed -e 's/59 Temple Place[, -]* Suite 330, Boston, MA *02111-1307[, ]* USA/51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA/' -i "$i"
done
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=21356
|
|
A pending commit will want to include some utility code from cairo and
so we need to extricate the error handling from the PLT symbol hiding.
|
|
Ensure ps_name is freed along error paths and by the normal destructor.
|
|
Ensure the font_name is initialized to NULL.
|
|
James Cloos found that the font name in embedded fonts should be the
PostScript font name (nameID=6 in the name table).
http://lists.cairographics.org/archives/cairo/2008-December/015919.html
|
|
The code for reading the font name from the name table has been moved
to a new function: _cairo_truetype_read_font_name().
|
|
Don't use the remarkably inefficient _cairo_hash_table_random_entry() to
remove all entries from the hash table!
|
|
Adrian Johnson spotted that I marked a few malloc failures as likely,
whoops.
|
|
Use the gcc likelihood annotation to indicate that allocation failures are
extremely unlikely.
|
|
The error paths should be hit very rarely during normal operation, so mark
them as being unlikely so gcc may emit better code.
|
|
Use the return value to return the result from _cairo_hash_table_lookup()
(as opposed to filling an output parameter on the stack) as this (a)
results in cleaner code (no strict-alias breaking pointer casts), (b)
produces a smaller binary and (c) is measurably faster.
|
|
Cleanup a minor -Wshadow warning.
|
|
Quick summary of changes:
- Move list of cairo source files out of src/Makefile.am and into
src/Sources.mk,
- Generate files src/Config.mk and src/Config.mk.win32 that choose
the right set of source files and headers based on configured
backends and features. This drastically simplifies building
using other build systems. The src/Makefile.win32 file needs
to be updated to reflect these changes.
- Add README files to various directories,
- Add toplevel HACKING file.
|
|
Add links to specifications for the Type1, CFF, and TrueType font file
formats, provided by Adrian Johnson.
|
|
strdup() and friends require at least _BSD_SOURCE or
_XOPEN_SOURCE >= 500 to be defined for the prototypes to be included.
For the time being, add the define to each source file that requires one
of the BSD functions.
|
|
Remove duplicate _cairo_error() by ensuring that the error status is
always propagated from the original error site. Note that in one case
this eliminates a potential _cairo_error(CAIRO_INT_STATUS_UNSUPPORTED)!
|
|
Add a couple of missing status checks for the result of
cff_index_append_copy().
|
|
Ensure that errors get duly propagated back to the caller and all
locally allocated resources are freed along error paths.
|
|
Every time we assign or return a hard-coded error status wrap that value
with a call to _cairo_error(). So the idiom becomes:
status = _cairo_error (CAIRO_STATUS_NO_MEMORY);
or
return _cairo_error (CAIRO_STATUS_INVALID_DASH);
This ensures that a breakpoint placed on _cairo_error() will trigger
immediately cairo detects the error.
|
|
Blitz all allocations to ensure that they raise a
_cairo_error(CAIRO_STATUS_NO_MEMORY) on failure.
|
|
This fixes the problem Apple Preview has with viewing PDFs with CFF
font subsets.
|
|
Bug report at https://bugzilla.mozilla.org/show_bug.cgi?id=368668
|
|
The subsetted font is not the same as the original font so it should not
have the same XUID and UniqueID.
|
|
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.
|
|
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.
|
|
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.
|
|
Yet another victim in my hunt against abbreviations within cairo's implementation.
|
|
|
|
|
|
Don't use structure intitialization for assigning
structure values.
Add a new field to cff_charset_t to point to the sids
charset array instead of casting it into the data field.
|
|
I assume this was just a leftover that was meant to be removed
earlier. If not, please feel free to bring it back again.
|
|
Current code for subsetting CFF fonts does not write charset information
into it. According to spec this means that font have ISOAdobe charset.
This charset contains only 228 names (excluding .notdef). This is not
enough for subfonts with 256 glyphs and causes bugs when viewing
generated PDFs.
|
|
|