summaryrefslogtreecommitdiff
path: root/source/html
AgeCommit message (Collapse)Author
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
2016-02-10html: Consider CJK punctuation in line breaking algorithmSebastian Rasmussen
2016-02-10html: Support vertical alignment to top/bottom of parent boxSebastian Rasmussen
Fixes http://bugs.ghostscript.com/show_bug.cgi?id=696004
2016-02-04Make HTML layout use harfbuzz for shaping.Robin Watts
fz_fonts gain a 'shaper' field that will be filled in as required. Use a void * rather than an hb_font_t to avoid polluting top level include space. Harfbuff handles mirroring for us, so lose the 'mirror' fields. This simplifies our wrappers around the 'standard' bidi code in that we don't need to split fragments upon mirroring. We do need to split our fragments at script changes though as harfbuzz only operates on a single font at a time. Update the html flow structure so that each flow node contains details of the the direction specified for it in the markup, the language specified for it in the markup and the script detected by the bidi code. Get the bidi code to pass out the script for each fragment as part of the callback and populate that field in the node. Ensure that we pass in the markup direction to the bidi splitting code as the 'base' direction. When feeding the bidi code, rather than feeding it paragraphs at a time, break those paragraphs if different parts of them have different marked up directions.
2016-01-28Add fallback font cache to font context.Tor Andersson
2016-01-28Add Noto fallback fonts.Tor Andersson
Look up fallback fonts by unicode script, with a flag to select the serif or sans-serif font style where such variants exist. Move all builtin fonts into fitz namespace.
2016-01-22epub: Ignore missing fallback font for NOCJK builds.Tor Andersson
2016-01-22epub: Implement @font-face rules.Tor Andersson
Note: font->fallback is not reference counted here. The fallback mechanism is probably going to have to change when we add text shaping.
2016-01-22epub: Fix memory leak of bidi detection scratch buffer.Tor Andersson
2016-01-21epub: Put font fallback chain in fz_font.Tor Andersson
fz_encode_character_with_fallback finds the first font in the fallback chain that has the glyph encoded, and if none do then try to encode a bullet character.