summaryrefslogtreecommitdiff
path: root/source/html
AgeCommit message (Collapse)Author
2016-05-30Avoid fz_font pulling harfbuzz in.Robin Watts
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.
2016-05-30Respect FZ_ENABLE_SVG=0 in HTML/EPUB.Tor Andersson
Don't try to load SVG images if SVG support is disabled.
2016-05-24Fix issues uncovered by coverity.Tor Andersson
2016-05-20html: Add SVG image support.Tor Andersson
2016-04-26Improve fz_new_documentRobin Watts
Use a macro to make fz_new_document nicer (akin to fz_malloc_struct).
2016-04-26fb2: Add image support.Tor Andersson
2016-04-26fb2: Add basic FictionBook support.Tor Andersson
No images. The default stylesheet is preliminary, and will need improvements.
2016-04-26epub: Support page-break-before/after: always, left and right.Tor Andersson
Does not support page-break-before/after: avoid.
2016-04-26epub: Add matching for [att], [att=val] and [att~=val] css selectors.Tor Andersson
2016-04-21epub: Change ul disc styles for nested lists.Tor Andersson
2016-04-06epub: Avoid passing 'em' argument explicitly.Tor Andersson
It's implicit in the 'top' box.
2016-04-06epub: Handle font-size in nested inline elements.Tor Andersson
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.
2016-04-06epub: Fix vertical-align: text-top and text-bottom.Tor Andersson
2016-04-06epub: Skip root box during layout so we don't apply page margins twice.Tor Andersson
2016-04-06epub: Remove debug logging printfs.Tor Andersson
2016-04-06epub: Try to keep to one fz_text per paragraph.Tor Andersson
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.
2016-04-06epub: Change order of arguments to fz_draw_html.Tor Andersson
2016-04-05epub: Don't conflate dimensioned lengths with untyped numbers.Tor Andersson
2016-04-05epub: Respect HTML 'dir' attribute.Tor Andersson
Default to "ltr" (unhelpfully, but that's the spec). Handle ltr, rtl, and auto values.
2016-04-05Clean up bidi enum names.Tor Andersson
And use the same enum for both the internal bidi code and the layout code.
2016-04-04Fixed signed/unsigned comparison warnings.Robin Watts
2016-04-04epub: Add harfbuzz bypass for fonts without opentype tables.Tor Andersson
In certain simple circumstances, we can bypass harfbuzz shaping and gain a lot of performance.
2016-04-04epub: Simplify harfbuzz glyph cluster mapping and positioning.Tor Andersson
Remove the need for type punning, and make it behave more robustly for indic languages.
2016-04-04epub: Add stripped Charis SIL font to use as the default font for EPUB.Tor Andersson
2016-03-31Clean up some whitespace.Tor Andersson
2016-03-31html: Tweak how builtin font families are loaded.Tor Andersson
2016-03-30Use fz_new_document for pdf and html docs.Robin Watts
In particular for html docs we were getting the refcount wrong, causing us to leak on closedown.
2016-03-30HTML Layout: avoid problems with emitting text several times.Robin Watts
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.
2016-03-29Fix typo in "Tweak html-layout harfbuzz code" commit.Tor Andersson
2016-03-29epub: Fix sign inversion in harfbuzz y-offsets.Tor Andersson
Combining marks were being offset in the wrong direction vertically.
2016-03-29Tweak html-layout harfbuff code to placate gcc.Robin Watts
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 *.
2016-03-28Label blocks that Harfbuzz leaks as leaked.Robin Watts
Tell Memento to treat all blocks allocated within given harfbuzz calls as being leaks.
2016-03-23Compile embedded fonts in separate C files.Tor Andersson
Also change unsigned char into const char for embedded data.
2016-03-14html: Use pair break table from UAX #14 to add soft breaks.Tor Andersson
Note: does not handle the case where certain classes of characters prohibit breaking at spaces between them.
2016-03-11Implement fz_text_language support functions.Robin Watts
Add code to convert to and from fz_text_language codes from ISO 639 language strings. No validation is carried out.
2016-03-11Rejig Bidirectional and Text code.Robin Watts
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).
2016-03-02html: Collect passed state into a common struct.Sebastian Rasmussen
2016-03-02Move UTF-8 string length function to fitz.Sebastian Rasmussen
2016-02-24Strip trailing whitespace.Tor Andersson
2016-02-24Add fz_show_string function and move wmode argument to end.Tor Andersson
2016-02-24html: Rewrite handling of whitespace collapsing.Tor Andersson
2016-02-24html: Add support for soft hyphens in line breaking.Sebastian Rasmussen
2016-02-24html: Introduce a new line breaking algorithm.Sebastian Rasmussen
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.
2016-02-24html: Split glue nodes into space and soft break nodes.Sebastian Rasmussen
This paves the way for supporting soft hyphens.
2016-02-24html: Fix typo.Tor Andersson
2016-02-22Rename fz_add_text to fz_show_glyph.Tor Andersson
Match naming of fz_moveto/lineto etc for paths.
2016-02-22html: Don't forget bold/italic when font-family is not set.Tor Andersson
2016-02-10Add bold/italic/monospaced/serif flags to fz_font.Tor Andersson
Use the flags when selecting a fallback font.
2016-02-10Refactor node shaping code.Robin Watts
We walk the text in a node to shape it in 2 different places in the code. Reformulate the code so that the 'walking' logic is commoned up.
2016-02-10Fix hang in bidi directinality detection code.Tor Andersson