Age | Commit message (Collapse) | Author |
|
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.
|
|
|
|
|
|
Saves a bit of memory, and prepares for the addition of later
fields (such as direction).
|
|
Forgot these in my previous pass.
|
|
Use a pointer to the top error stack slot instead of access via
array and index. Return the stack slot from fz_push_try.
|
|
|
|
"0.00-70" should be parsed as one token, not two tokens as we did.
|
|
In general, we should use 'const fz_blah' in device calls whenever
the callee should not alter the fz_blah.
Push this through. This shows up various places where we fz_keep
and fz_drop these const things.
I've updated the fz_keep and fz_drops with appropriate casts
to remove the consts. We may need to do the union dance to avoid
the consts for some compilers, but will only do that if required.
I think this is nicer overall, even allowing for the const<->no const
problems.
|
|
|
|
Makes valgrind somewhat usable (glfw and xlib still leak plenty of
global objects at exit).
|
|
|
|
|
|
|
|
It's slower, but will work for CJK fonts as well.
|
|
|
|
|
|
|
|
stm.avail_out is only set if !only_metadata.
Reverse the order of the if tests to silence valgrind.
|
|
Keeps operations in the int domain as long as possible,
and only resorts to floats if required.
|
|
|
|
|
|
Add a caching table for the lower planes of unicode, which cover the
latin, greek, cyrillic, hebrew and arabic scripts.
|
|
|
|
|
|
js_pcall was leaving crap on the stack in case of errors.
AFSimple_Calculate needs access to the doc object, but cannot use the
usual 'this' binding since it's a function. Add a global reference to
the doc object MuPDF_Doc.
|
|
Remove strcpy and strtok calls when matching class conditions.
|
|
|
|
|
|
|
|
|
|
|
|
During pdf_save_document the main performance bottleneck is the formatting
of floats to decimal ASCII representations in fz_ftoa.
Fix this by using the Grisu2 algorithm, the fastest known algorithm for
accurate printing of IEEE floating point numbers while minimizing the number
of produced decimal digits.
This requires no libc support, only integer arithmetic.
|
|
CSS doesn't need precision, and doesn't support exponential notation.
Use a simpler string to float conversion algorithm, which is magnitudes
of order faster.
|