Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
Keep them as 'FLOW' entries rather than box entries. Although
they technically enclose areas of text, we only ever use them
as points.
Thanks to Tor for fixing this code.
|
|
Saves 12 bytes per fz_html, and we have a lot.
|
|
Saves 8 bytes on every css_style (and we have a lot of those).
|
|
|
|
|
|
|
|
|
|
Only create a text object if we are definitely going to use it,
and then take care of exceptions being thrown.
|
|
Thanks to Vlad Glagolev for the example file, analysis and
patch.
We had failed to initialise the "last break class" value, so that
when we use it as an index into an array, we run the risk of
crashing.
The fix is simply to initialise it. By initialising it to OP
we don't allow any softbreaks to be added when it's uninitialised,
which feels right to me.
|
|
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.
|
|
|
|
Getting a backtrace out with missing functions makes the
backtrace much less useful. Some backtrace routines (such
as that used by Memento on Android) are incapable of
resolving static functions.
We therefore provide 2 scripts (scripts/destatic.sh and
scripts/restatic.sh) that respectively remove and replace
the 'static' from function definitions.
The scripts do not affect "static inline" or "static const"
definitions, and they are are restricted to working in the
source directory (excluding source/tools), thirdparty/mujs
and the platform/{java,android} directories.
The transformed source should NOT be checked in.
To avoid problems with clashing symbols, some functions are
renamed or tweaked slightly in this patch.
|
|
|
|
|
|
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).
|
|
|
|
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.
|
|
Don't try to load SVG images if SVG support is disabled.
|
|
|
|
|
|
Use a macro to make fz_new_document nicer (akin to
fz_malloc_struct).
|
|
|
|
No images.
The default stylesheet is preliminary, and will need improvements.
|
|
Does not support page-break-before/after: avoid.
|
|
|
|
|
|
It's implicit in the 'top' box.
|
|
Point to the box struct rather than its style, so we can look at its
resolved em size. Also make sure to resolve em sizes for inline boxes.
|
|
|
|
|
|
|
|
We will need to split if the color changes, or an image is spliced in.
List item bullets also get their own fz_text element.
|
|
|
|
|
|
Default to "ltr" (unhelpfully, but that's the spec).
Handle ltr, rtl, and auto values.
|
|
And use the same enum for both the internal bidi code and the layout code.
|
|
|
|
In certain simple circumstances, we can bypass harfbuzz shaping and gain
a lot of performance.
|
|
Remove the need for type punning, and make it behave more robustly
for indic languages.
|
|
|
|
|
|
|