summaryrefslogtreecommitdiff
path: root/source/pdf/pdf-font.c
AgeCommit message (Collapse)Author
2014-07-17Improve callback for loading substitute CJK fonts to return TTC index.Tor Andersson
2014-05-29Fix 694093: add vertical variant of CJK fallback font.Tor Andersson
Replace the DroidSansFallback TTF files with a TTC that has two fonts: The original and a copy where the OpenType 'vert' substitution lookup has been pre-applied by copying the uniXXXX.vert glyph data to uniXXXX.
2014-04-23Fix 693419: always load CIDToGIDMap if it exists.Tor Andersson
OpenType CFF fonts are detected as TYPE1 by ft_kind. Relaxing the test for when to load a CIDToGIDMap lets us load it even for OpenType fonts.
2014-02-25load StandardEncoding for non-embedded non-symbolic encoding-less fontsSimon Bünzli
See https://code.google.com/p/sumatrapdf/issues/detail?id=2526 for a file which renders wrongly if no encoding is loaded.
2014-02-25Bug 694851: pass more information to fz_load_system_fontSimon Bünzli
The following changes allow font providers to make better choices WRT what font to provide and under what circumstances: * bold and italic flags are passed in so that implementors can decide themselves whether to ask for simulated boldening/italicising if a font claims not to be bold/italic * is_substitute is replaced with needs_exact_metrics to make the meaning of this argument hopefully clearer (that argument is set only for PDF fonts without a FontDescriptor) * the font name is always passed as requested by the document instead of the cleaned name for the standard 14 fonts which allows distinguishing e.g. Symbol and Symbol,Bold
2014-01-13Bug 694851: enhance fz_load_system_fontSimon Bünzli
For SumatraPDF, the following changes are required: * fz_load_system_font is called from pdf_load_builtin_font as well so that Arial, Courier New, etc. can be loaded from the system instead of their Nimbus replacements. In order to distinguish between calls from pdf_load_builtin_font and pdf_load_substitute_font, an is_substitute argument is added. * fz_load_system_cjk_font is added and called from pdf_load_substitute_cjk_font so that a better replacement font can be loaded instead of DroidSansFallback. * Both fz_load_system_font and fz_load_system_cjk_font return fz_font* instead of fz_buffer* so that implementers aren't required to load fonts into memory (SumatraPDF uses fz_new_font_from_file for system fonts). In addition to that, fz_load_system_font_func is renamed to fz_load_system_font_funcs since it now accepts two functions, and the PDF_ROS_* constants are renamed to FZ_ADOBE_* (collection names aren't passed as const char* so that implementers know which collections to expect). For convenience, fz_load_*_font also never throws since currently all callers have further fallbacks available.
2014-01-06fix various MSVC warningsSimon Bünzli
Some warnings we'd like to enable for MuPDF and still be able to compile it with warnings as errors using MSVC (2008 to 2013): * C4115: 'timeval' : named type definition in parentheses * C4204: nonstandard extension used : non-constant aggregate initializer * C4295: 'hex' : array is too small to include a terminating null character * C4389: '==' : signed/unsigned mismatch * C4702: unreachable code * C4706: assignment within conditional expression Also, globally disable C4701 which is frequently caused by MSVC not being able to correctly figure out fz_try/fz_catch code flow. And don't define isnan for VS2013 and later where that's no longer needed.
2013-11-27fix memory leak introduced with a2c945506ea2a2b58edbde84124094c6b4f69eacSimon Bünzli
fz_new_font_from_buffer keeps the buffer for the font, so callers which no longer need the data have to drop the buffer themselves explicitly.
2013-11-11Add hooks to load system fonts. Use them in PDF interpreter.Tor Andersson
2013-11-11Add fz_new_font_from_buffer function.Tor Andersson
Use fz_buffer to wrap and reference count data used in font.
2013-10-16Fix cross document store object hash collisions.Robin Watts
When putting store objects into the store, ensure that they do cannot collide across documents.
2013-09-13Fix various compile warnings spotted by the cluster.Robin Watts
2013-08-23Look up glyphs by the 'uniXXXX' form if the glyph list duplicates all fail.Tor Andersson
2013-07-30Change pdf_measure_text to account for the borders around charactersPaul Gardiner
Prevously the true bounds of the glyph were used which didn't account for the total area blocked out by a character
2013-07-19Initial work on progressive loadingRobin Watts
We are testing this using a new -p flag to mupdf that sets a bitrate at which data will appear to arrive progressively as time goes on. For example: mupdf -p 102400 pdf_reference17.pdf Details of the scheme used here are presented in docs/progressive.txt
2013-06-25Rid the world of "pdf_document *xref".Robin Watts
For historical reasons lots of the code uses "xref" when talking about a pdf document. Now pdf_xref is a separate type this has become confusing, so replace 'xref' with 'doc' for clarity.
2013-06-20Rearrange source files.Tor Andersson