Age | Commit message (Collapse) | Author |
|
Match naming of fz_moveto/lineto etc for paths.
|
|
|
|
We compile with -Wno-unused-parameters instead.
|
|
Don't just cast an enum to another.
|
|
|
|
The PCL monochrome output code was unfinished. This now produces
PCL accepted by ghostpcl for ljet4 and dj500 presets at least.
|
|
Writing individual bytes using fwrite is VERY slow (profile of debug
code shows 93% of runtime is in system fwrite). Fix this by collating
into a buffer and writing (now 2.5%).
|
|
|
|
Use putc for single byte writes instead of fwrite.
|
|
|
|
|
|
Use the flags when selecting a fallback font.
|
|
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.
|
|
|
|
|
|
|
|
|
|
Fixes http://bugs.ghostscript.com/show_bug.cgi?id=696004
|
|
Also fix a memory leak.
|
|
Wrap the unsafe _snprintf to ensure that the string is null-terminated
even on overflow.
|
|
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.
|
|
Thanks to Simon Reinhardt for these.
|
|
Spot (broken) values that will require special 'acrobat
compatible' handling and use the old code for that.
|
|
Take on a (slightly tweaked) version of Simon Reinhardt's
patch.
The actual logic is left entirely unchanged; minor changes
have been made to the names of functions/types to avoid
clashing in the cmapdump.c repeated inclusion.
Currently this should really only affect xps files, as strtof
is only used as fz_atof, and that's (effectively) all xps for
now.
I will look at updating lex_number to call this in future.
|
|
Unadorned calling works on 64bit, but on 32bit we need to
ensure that the gsapi functions are declared as __stdcall.
|
|
|
|
Because of a shortcoming in harfbuzz, we can't easily force
all its allocations through our allocators.
We fudge it, with the addition of some macros to change
malloc/free/calloc into hb_malloc/hb_free/hb_calloc. To
prevent thread safety issues, we use our freetype lock
around calls to harfbuzz.
We stash the current context in a static var.
|
|
|
|
|
|
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.
|
|
|
|
Fix TTC numbering in DroidSansFallback.ttc (H and V were swapped).
Strip unused kerning tables.
|
|
|
|
Newer versions of clang supports .incbin, so enable it for clang.
Disable .incbin for release builds, since then the compiler can strip
out unused font data.
|
|
MSVC doesn't understand %04X. Use %04x instead.
|
|
|
|
Note: font->fallback is not reference counted here. The fallback
mechanism is probably going to have to change when we add text shaping.
|
|
|
|
It's an opaque immutable structure, that we don't expect to ever want
to change after creation. Therefore the const keyword is not useful,
and is only line noise.
|
|
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.
|
|
The font is an immutable opaque structure, no need to add the const
keyword since users aren't expected or expecting to change it.
|
|
In RTL context, text-align: left should be right, and vice versa.
Since we currently ignore the dir="xxx" HTML attributes and CSS
properties, always pick up the directionality from the text as if
dir="auto".
|
|
|
|
|
|
Make the import follow mupdf style (better, if not perfect).
Use ucdn where possible to avoid duplicating tables.
Shrink the types, make them explicit (e.g. use fz_bidi_level rather
than int) and make tables const.
Use 32-bit integers for text.
|
|
|
|
|
|
|
|
|
|
After we parse html text from an ebook run it through the
unicode bidirectional algorithm to determine the directionality
of each fragment. This may require splitting of fragments.
Currently we don't do anything with this information.
|