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.
|
|
|
|
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.
|
|
|
|
|
|
|
|
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.
|
|
|
|
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.
|
|
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).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This algorithm can handle flow nodes that has non-zero width when they
break a line of text. The previous algorithm could not handle this.
This paves the way for supporting soft hyphens.
|
|
This paves the way for supporting soft hyphens.
|
|
|
|
Match naming of fz_moveto/lineto etc for paths.
|