Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
* Use pool allocator and linked lists for all levels.
* Remove separate fz_stext_sheet struct.
* Remove unused 'script' style.
* Remove 'span' level items.
* Detect visual/logical RTL layouts.
* Detect indented paragraphs.
|
|
|
|
Update separations interface further to cope with whether spots
should be rendered separately, or as composite colors.
|
|
|
|
We still use the fz_context versions as the default, but these
can be overridden with draw device options.
|
|
|
|
This is very common and not a problem. Let's keep warnings
for problematic things, and not use them for informational
messages such as these.
|
|
|
|
Fix for bug 697943.
Set the initial replacement font bbox to the empty rectangle for type3 fonts,
and let the type3 glyph loading initialize by taking the union of all glyph
bboxes.
Set the replacement font bbox for non-Type3 fonts to the unit rectangle.
Also remove unused flag from fz_font struct.
|
|
|
|
It's not used, so prone to bit rot. Better to purge it.
|
|
|
|
|
|
|
|
Rename fz_write to fz_write_data.
Rename fz_write_buffer_* and fz_buffer_printf to fz_append_*.
Be consistent in naming:
fz_write_* calls write to fz_output.
fz_append_* calls append to fz_buffer.
Update documentation.
|
|
|
|
|
|
|
|
Move the definition of the structure contents into new fitz-imp.h
file. Make all code outside of fitz access the buffer through the
defined API.
Add a convenience API for people that want to get buffers as
null terminated C strings.
|
|
Ideographic and full-width punctuation inherit the script from the
surroundings, like all other punctuation. This does not play well
with our fallback font lookups.
Add special cases for ideographic and fullwidth unicode blocks.
|
|
tests_private/pdf/sumatra/1297_-_interpolate_at_lower_resolutions.pdf
times out in the cluster.
This is due to us having empty t3 glyphs defined that define d1
rectangles that are wildly different to the default font bbox.
Add code to spot that t3 glyphs are empty, and to use a tiny font
bbox for them.
(It might be nicer to drop the empty display lists, but then this
produces knock on problems further on, where non-existent display
lists lead to NULL pixmaps, which lead to us think that renders
failed etc).
|
|
|
|
As fz_drop_*()/fz_free() all must handle NULL.
|
|
|
|
* Handle multiple calls to fz_drop_colorspace_context() and
fz_drop_font_context().
* Allow missing context in call to fz_drop_aa_context()
and fz_drop_glyph_cache_context().
* Only drop font context objects when dropping the last reference.
* Avoid unnecessary NULL checks.
|
|
Code MUST pass a non-null context to all functions.
Checking ctx for null and failing silently is no more useful
than segfaulting.
fz_keep_imp and fz_drop_imp handle NULL pointers safely, so
the NULL checks for this can also be dropped at the same time.
|
|
|
|
font->name can never be NULL as it is an array.
|
|
|
|
Call fz_calloc rather than fz_malloc_array and then
manually clearing.
|
|
The fz_font structure now doesn't know anything about
harfbuzz at all, it merely offers an abstract
'fz_shaper_data_t' entry.
|
|
Move the definition of fz_font to be in a private header file
rather than in the public API. Add accessors for specific
parts of the structure and use them as appropriate.
The font flags, and the harfbuzz records remain public.
This means that only 3 files now need access to the font
implementation (font.c, pdf-font.c and pdf-type3.c). This
may be able to be improved further in future.
|
|
The upshot of debugging this is that:
1) We can't trust the FontBBox. Certainly it appears that no
one else trusts it.
2) We can't trust the d1 values in all cases, as it can lead to
use rendering glyphs far larger than we'd want to.
So we have the compromise used here.
1) We never clip to the FontBBox.
2) If the FontBBox is invalid, then we calculate the bbox
from the contents of the data streams.
3) If the FontBBox is valid, and the d1 rectangle given
does not fit inside it, then we calculate the bbox from
the contents of the data streams.
This could theoretically produce problems with glyphs that have
much more content than they actually need, and rely on the d1
rect to clip it down to sanity. If the FontBBox is invalid in
such fonts, we will go wrong.
It's not clear to me that this will actually work in Acrobat/
Foxit/gs etc either, so we defer handling this better until we
actually have an example.
Tested with bug 694952, and bug 695843 which were the last 2 in
this area.
|
|
|
|
The type3 font(s) in the file have an invalid (0 sized) bbox, hence
the clipping of the chars goes wrong.
We now spot the invalid bbox, and suppress the clipping.
|
|
Closing a device or writer may throw exceptions, but much of the
foreign language bindings (JNI and JS) depend on drop to never throw
an exception (exceptions in finalizers are bad).
|
|
|
|
To return the proper size from fz_bound_display_list, which has been
broken since the begin_page device call was removed.
|
|
Allows us to remove the out parameter 'transform' from fz_begin_page.
|
|
This silences the many warnings we get when building for x64
in windows.
This does not address any of the warnings we get in thirdparty
libraries - in particular harfbuzz. These look (at a quick
glance) harmless though.
|
|
We store an hb_font in every font, and currently have fz_drop_font
know to call harfbuzz to destroy it. This causes harfbuzz to be
included even in builds that never use it.
We improve this situation by storing both an hb_font, and a
function pointer to destroy it within fz_font. This costs us
an extra pointer per fz_font, but solves the problem.
|
|
fz_pixmaps now have an explicit stride value. By default no change
from before, but code all copes with extra gaps at the end of the
line.
The alpha data in fz_pixmaps is no longer compulsory.
mudraw: use rgb not rgba (ppmraw), cmyk not cmyka (pkmraw).
Update halftone code to not expect alpha plane.
Update PNG writing to cope with alpha less input.
Also hide repeated params within the png output context.
ARM code needs updating.
|
|
|
|
In certain simple circumstances, we can bypass harfbuzz shaping and gain
a lot of performance.
|
|
We were setting it to zero if not building a bbox table, which caused havoc
with the advance width caching.
|