Age | Commit message (Collapse) | Author |
|
|
|
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.
|
|
|
|
|
|
|
|
In particular for html docs we were getting the refcount wrong,
causing us to leak on closedown.
|
|
If a "word" of HTML is split into several fragments by the
string walker (due to glyphs not being available in the same font)
then we'd previously have walked too much of the string when
pulling glyphs out of the harfbuzz buffer.
Only walk as much as we should.
|
|
|
|
Combining marks were being offset in the wrong direction vertically.
|
|
gcc whines about strict-aliasing rules. Tweak the code to avoid
them.
Short version = gcc dislikes accessing the same memory
through different typed pointers unless they are void * or char *.
|
|
Tell Memento to treat all blocks allocated within given harfbuzz
calls as being leaks.
|
|
Also change unsigned char into const char for embedded data.
|
|
Note: does not handle the case where certain classes of characters
prohibit breaking at spaces between them.
|
|
Add code to convert to and from fz_text_language codes from
ISO 639 language strings. No validation is carried out.
|
|
We move to using bidirectional "levels" throughout. This should
give us better behaviour vis-a-vis nested l2r/l2r text. This
also allows us to carry xps levels throughout with no loss of
information.
This also avoids the need to special case numbers.
We accordingly carry more information into fz_text.
As well as wmode, also hold additional details about the text spans.
We now include the directionality of the bidi level text (either as
derived from bidi code, or from the original document (e.g. xps)),
the directionality of text (as specified in the original document
(e.g. html)), and the language of the text (if specified in the
original document).
|
|
|
|
|
|
|
|
|
|
|
|
|