Age | Commit message (Collapse) | Author |
|
Note: does not handle the case where certain classes of characters
prohibit breaking at spaces between them.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
"Defined but not used" and "Set but not used" as seen with
ndk-build.
|
|
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).
|
|
|
|
|
|
|
|
|
|
If built with MEMENTO_DETAILS (on by default), we store the
backtrace on every event that affects a block.
Memento_details(address) will display the events that affected
a block (typically malloc, {realloc}*, free), including the
backtrace at each point.
Windows and linux use different mechanisms for this. Windows
loads a DLL and calls windows specific functions - no extra
libraries are required.
Linux also loads a shared object (libbacktrace.so). This is not
present on all platforms, so on platforms where it is not available
we just get addresses. These can be converted using addr2line
(unless ASLR is enabled).
In order for linux to be able to load libbacktrace.so we link in
libdl. If this is not available, define HAVE_LIBDL=no when building
the memento target.
|
|
Add Memento_info(address) that will show the details of a block
(callstacks when it was allocatd, realloced, freed etc).
This works on MSVC and GNUC using two different methods.
|
|
Avoid searching the linked list of blocks in order to remove a
block by moving to a doubly linked list. This can be done
without increasing the amount of memory in use by making better
use of the 'parent' pointer that is only used when displaying
nested blocks.
Also store magic values in the 'child' and 'sibling' pointers
(again only used when displaying nested blocks) so that we
can quickly verify that a block is real before doing too much
with it.
Those changes drastically reduce the time required for
MEMENTO_LEAKONLY runs (now the same order of magnitude as non
memento runs).
Normal memento runs are still very slow when the numbers of
blocks increase due to the paranoid checking taking time.
To ameliorate this a bit, we try 2 other things.
Firstly, we optimise the searching of blocks by making use of
int aligned tests. This still doesn't make much difference.
Secondly, we introduce a new mechanism for the 'paranoia'
levels. If a negative number is given for the paranoia level
(say -n) then we first perform our overwrite checks after n events.
We next test after 2n events, then 4n, then 8n etc.
The new default paranoia level is set to be -1024.
This makes a huge difference, and brings normal memento runs
down to be comparable with debug runs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Don't bale on the first 'large enough' match.
|
|
Guess paper sizes from bitmap dimensions unless the paper
size has been specified. If unknown, depending on the
properties of the printer, we'll either send a 'custom'
paper size (followed by the page size in decipoints), or
the next size up.
Depending on the capabilities of the printer, we can
optionally send orientation too.
|
|
|
|
We no longer need to take the freetype lock here.
We also never read the value assigned to face earlier in the
routine, so remove that too.
|
|
Arrange to keep only the Outline entries that still refer to
valid pages.
More specifically, leaf outline entries that refer to pages that
are elided are not dropped. Non leaf outline entries that refer
to pages that have been elided are kept (for the sake of the
children) but have NULL destinations.
|
|
Use image.getWidth() rather than image.width property access
to match JNI interface.
|
|
Use an API similar to the JNI bindings.
|
|
Don't mess with Td.
|
|
|
|
Don't try creating the resource for each fill_text call.
|
|
Only allocate one scratch buffer, and no larger than it needs to be.
Detect and warn when we can't create a ToUnicode CMap.
|
|
With an identity encoding, the glyph indices are the character codes.
|