summaryrefslogtreecommitdiff
path: root/fitz/res_font.c
AgeCommit message (Collapse)Author
2011-12-16Add fz_malloc_struct, and make code use it.Robin Watts
The new fz_malloc_struct(A,B) macro allocates sizeof(B) bytes using fz_malloc, and then passes the resultant pointer to Memento_label to label it with "B". This costs nothing in non-memento builds, but gives much nicer listings of leaked blocks when memento is enabled.
2011-12-08Stylistic changes when testing pointer values for NULL.Tor Andersson
Also: use 'cannot' instead of 'failed to' in error messages.
2011-12-08Throw exceptions for read errors.Tor Andersson
2011-12-06Move antialias levels into context.Robin Watts
In builds that support configurable layers of antialiasing, move the variables that control this into the context. This makes it possible to safely use different levels of antialiasing in different threads.
2011-11-28Move Freetype globals into context.Robin Watts
Freetype globals are not shared between threads currently - to do that we'll need to introduce a lock.
2011-10-04Move to exception handling rather than error passing throughout.Robin Watts
This frees us from passing errors back everywhere, and hence enables us to pass results back as return values. Rather than having to explicitly check for errors everywhere and bubble them, we now allow exception handling to do the work for us; the downside to this is that we no longer emit as much debugging information as we did before (though this could be put back in). For now, the debugging information we have lost has been retained in comments with 'RJW:' at the start. This code needs fuller testing, but is being committed as a work in progress.
2011-09-21Add warning context.Tor Andersson
2011-09-21Rename malloc functions for arrays (fz_calloc and fz_realloc).Tor Andersson
2011-09-21Don't thread ctx through safe fz_obj functions.Tor Andersson
2011-09-15Add context to mupdf.Robin Watts
Huge pervasive change to lots of files, adding a context for exception handling and allocation. In time we'll move more statics into there. Also fix some for(i = 0; i < function(...); i++) calls.
2011-09-14Initial import of exception handling codeRobin Watts
Import exception handling code from WSS, modified to fit into the fitz world. With this code we have 'real' fz_try/fz_catch/fz_rethrow functions, handling a fz_except type. We therefore rename the existing fz_throw/ fz_catch/fz_rethrow to be fz_error_make/fz_error_handle/fz_error_note. We don't actually use fz_try/fz_catch/fz_rethrow yet...
2011-08-06Cosmetic style fixes.Tor Andersson
2011-08-01Add support for colored Type3 glyphs (ones that use d0).Robin Watts
Detect the d0 or d1 operators by writing a bit to the new device flags word. This can then be checked by the Type3 code to create the appropriate backing pixmap. In order to know what the appropriate backing pixmap is, we pass an additional colorspace into the glyph rendering code.
2011-07-26Fix bug 692354: Horizontal white lines in images.Robin Watts
The problem is due to abutting images showing gaps between them. These gaps are due to a combination of rounding errors, and anti-aliasing effects on the edge of images. The solution is to selectively 'grid fit' images. If an image is part of a type 3 font, we do NOT want to grid fit it, as this is where the sub pixel positioning makes a huge difference. If an image is displayed with alpha, then we don't want to grid fit it (as grid fitting will tend to make the edges of images overlap by 1 pixel, and will hence produce nasty effects). Otherwise, we will grid fit; Grid fit in this sense is where we expand an image to completely fill the pixel grid that it touches (i.e. the extents for the image are expanded to pixel boundaries; no half full pixels are left around the edges). The only real change of note here is in how we detect that we are in a type 3 charproc; we add a new draw device creation function that we call in the type3 charproc case that sets a flag that the drawing functions can check.
2011-04-20Revert part of "Tweak hinting flags to freetype."Tor Andersson
FT_LOAD_TARGET_LIGHT implies the autohinter, which causes spectacular failures on DynaLab fonts. The stripped down freetype we compile with using the "thirdparty" package does not have the autohinter, which is how this bug slipped through the regression testing.
2011-04-15Tweak hinting flags to freetype.Tor Andersson
2011-04-15Use artificial italics and emboldening for substitute font.Tor Andersson
2011-04-15Use DroidSans.ttf as substitute font.Tor Andersson
2011-04-11Add triangle caps; separate start, dash and end cap styles for XPS.Tor Andersson
2011-04-08Simplify arguments to fz_new_pixmap.Tor Andersson
2011-04-08Add special case non-aa scan converter with accompanying blit functions.Tor Andersson
Also turn on font hinting when rendering non-aa text.
2011-04-07Add text antialiasing too.Robin Watts
Update the text rendering code to use the raster renderer in freetype rather than the smooth one. No change to the hinting methods used yet.
2011-04-04Le Roi est mort, vive le Roi!Tor Andersson
The run-together words are dead! Long live the underscores! The postscript inspired naming convention of using all run-together words has served us well, but it is now time for more readable code. In this commit I have also added the sed script, rename.sed, that I used to convert the source. Use it on your patches and application code.
2011-04-03xps: Plug memory leaks.Tor Andersson
2011-04-03xps: Fix bugs uncovered by QualityLogicMinBar tests.Tor Andersson
2011-02-23Revert to using fthint since we cannot rely on FreeType's trickyness ↵Tor Andersson
detection on some subset fonts.
2011-02-23Remove fthint workaround for DynaLab fonts, since that is now a part of ↵Tor Andersson
freetype.
2011-02-17Stretch glyphs for substituted fonts when stroking the same as when filling.Tor Andersson
2011-02-04Add ftsize and ftfile fields to font struct for SumatraPDF use.Tor Andersson
2011-02-02Store font data buffer in fz_font rather than in pdf_fontdesc. Fixes bug ↵Tor Andersson
where the fontdesc was evicted from cache while the font still lived on in a display list, with a now stale pointer.
2011-01-27Add fz_calloc function to check for integer overflow when allocating arrays, ↵Tor Andersson
and change the signature of fz_realloc to match.
2010-12-30Adhere to nil idiom.Sebastian Rasmussen
2010-11-28Support luminosity softmask background colors.Tor Andersson
2010-08-04Rearrange low level painting functions and add new functions for constant ↵Tor Andersson
alpha painting.
2010-07-17Remove all trailing whitespace.Tor Andersson
2010-07-17Minor edits.Tor Andersson
2010-07-17Support SMasks for general graphics (incomplete).Tor Andersson
2010-07-15Check page for transparency to install a page-level transparency group.Tor Andersson
2010-07-13Implement stroked text.Tor Andersson
2010-07-09Rearrange and merge some files in the fitz directory.Tor Andersson
2010-06-29Reformat to remove all instances of double spaces (to easier spot ↵Tor Andersson
indentation errors in the future).
2010-06-21Fix ascender and descender and other metric calculations to use proper ↵Tor Andersson
scaling values.
2010-06-19Floats everywhere!Tor Andersson
2010-05-14Add workaround to clip image blits against the unit rectangle.Tor Andersson
2010-05-11Use the bbox device to get an accurate bounding box for type 3 font glyphs.Tor Andersson
2010-04-24Add font width scaling for rendering substituted fonts.Tor Andersson
2010-04-24Round type 3 font bounding box size outward when rendering.Tor Andersson
2010-04-16Rewrite glyph cache to use fz_hashtable without a fixed size buffer.Tor Andersson
2010-04-15Make the content stream interpreter automatically rewind the fz_buffer.Tor Andersson
2010-04-15Make the glyph cache an input to fz_newdrawdevice so that it can be shared ↵Tor Andersson
between pages.