summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* [base] Fix commit ab02d9e8.baserock/morphAlexei Podtelezhnikov2013-02-222-8/+14
| | | | * src/base/ftbbox.c (BBox_Cubic_Check): Change scaling to msb of 22.
* [base] New bisecting BBox_Cubic_Check (disabled).Alexei Podtelezhnikov2013-02-192-46/+89
| | | | | | * src/base/ftbbox.c (BBox_Cubic_Check): New bisecting algorithm for extremum search built around simple condition that defines which half contains the extremum.
* [tools] Update BBox testing tool.Alexei Podtelezhnikov2013-02-182-3/+39
| | | | | | * src/tools/test_bbox.c: Add another cubic outline with exact BBox. (REPEAT): Increase the number of benchmarking cycles. (profile_outline): Tweak output formatting.
* Fix Savannah bug #38235.Werner Lemberg2013-02-085-30/+95
| | | | | | | | | | | | | | | | | | | * builds/unix/configure.raw: Don't generate `freetype-config' and `freetype.pc'. * builds/unix/unix-def.in (FT2_EXTRA_LIBS, LIBBZ2, LIBZ, build_libtool_libs, ft_version): New variables to be substituted. (freetype-config, freetype.pc): New rules to generate those files. * builds/unix/freetype-config.in: Remove code for handling `rpath'. The use of $rpath has been accidentally removed in a patch from 2009-12-22, and apparently noone has missed it since. Use `%' instead of `@' as a variable substitution marker. Use quotes. * builds/unix/freetype.in: Use `%' instead of `@' as a variable substitution marker. Use quotes.
* * src/truetype/ttobjs.c (tt_size_run_prep): Reset more GS variables.Werner Lemberg2013-02-072-1/+24
| | | | | | BTW, Greg agrees that the OpenType specification is missing the list of GS variables which will always be reset to the default values after the `prep' table has been executed.
* * src/truetype/ttobjs.c (tt_size_run_prep): Reset reference points.Werner Lemberg2013-02-062-0/+19
| | | | | | | | | | | | Up to now, we simply took a snapshot of the Graphics State after the `prep' table has been executed, and right before a glyph's bytecode was run it got reloaded. However, as Greg Hitchcock has told us in private communication, reference points get reset to zero in the MS rasterizer and we follow in due course. While reasonable, this is undocumented behaviour. Most notably, this fixes the rendering of Arial's `x' glyph in subpixel hinting mode.
* [truetype] A better fix for Savannah bug #38211.Werner Lemberg2013-02-052-5/+18
| | | | | * src/truetype/ttinterp.c (Ins_IP): Implement identical behaviour to MS rasterizer if rp1 == rp2 (confirmed by Greg Hitchcock).
* [pcf] Streamline parsing of PCF encoding table.Alexei Podtelezhnikov2013-02-012-30/+28
| | | | | * src/pcf/pcfread.c (pcf_get_encodings): Use simpler double for-loop. Reallocate array instead of using temporary storage.
* Fix Savannah bug #38227.Werner Lemberg2013-02-012-1/+10
| | | | * builds/unix/freetype-config.in: Set LC_ALL.
* Fix Savannah bug #38221.Werner Lemberg2013-02-012-8/+9
| | | | | | | This complements commit 83c0ebab. * src/base/ftcalc.c (FT_MulDiv_No_Round): Don't enclose with `TT_USE_BYTECODE_INTERPRETER'.
* [truetype] Fix Savannah bug #38211.Werner Lemberg2013-02-012-3/+19
| | | | | * src/truetype/ttinterp.c (Ins_IP): Make FreeType behave identical to other interpreters if rp1 == rp2 (which is invalid).
* Improve comments.Alexei Podtelezhnikov2013-01-301-7/+7
|
* Add an important comment.Alexei Podtelezhnikov2013-01-281-0/+1
| | | | Thanks to Hin-Tak Leung for the analysis.
* Formatting, comment improvements.Werner Lemberg2013-01-288-98/+107
|
* [base] Small optimization of BBox calculation.Alexei Podtelezhnikov2013-01-282-81/+38
| | | | | * src/base/ftbbox.c (BBox_Cubic_Check): Use FT_MSB function in scaling algorithm.
* [truetype] Minor formatting fix.Infinality2013-01-262-12/+19
|
* [truetype] Fix rasterizer_version logic in sph.Infinality2013-01-262-15/+27
|
* [truetype] Align more to ClearType whitepaper for sph.Infinality2013-01-268-140/+352
|
* [base] Fix broken emboldening at small sizes.Alexei Podtelezhnikov2013-01-252-4/+17
| | | | | * src/base/ftoutln.c (FT_Outline_EmboldenXY): Do not attempt to normalize zero-length vectors.
* Fix Savannah bug #38167.Werner Lemberg2013-01-252-4/+13
| | | | | | | This fixes commit 83c0ebab from 2012-06-27. * src/truetype/ttinterp.h: s/TT_CONFIG_OPTION_BYTECODE_INTERPRETER/TT_USE_BYTECODE_INTERPRETER/.
* [sfnt] Fix broken pointer overflow checks.Xi Wang2013-01-252-14/+22
| | | | | | | | | | | | Many compilers such as gcc and clang optimize away pointer overflow checks `p + n < p', because pointer overflow is undefined behavior. Use a safe form `n > p_limit - p' instead. Also avoid possible integer overflow issues, for example, using `num_glyphs > ( p_limit - p ) / 2' rather than `num_glyphs * 2' given a large `num_glyphs'. * src/sfnt/ttsbit0.c (tt_sbit_decoder_load_image): Implement it.
* Fix `make multi'Werner Lemberg2013-01-253-0/+9
| | | | | * src/base/ftoutln.c, src/base/fttrigon.c: Include FT_INTERNAL_CALC_H.
* [truetype] Fix C++ compilation.David 'Digit' Turner2013-01-254-22/+39
| | | | | | | | | | | * src/truetype/ttsubpix.h: Updated. (SPH_X_SCALING_RULES_SIZE): Moved and renamed to... * src/truetype/ttsubpix.c (X_SCALING_RULES_SIZE): This. (sph_X_SCALING_Rules): Removed. (scale_test_tweak): Make function static. (sph_test_tweak_x_scaling): New function. * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Updated.
* Remove trailing whitespace.Werner Lemberg2013-01-2413-18/+18
|
* [base] Make `FT_Hypot' really internal.Werner Lemberg2013-01-246-28/+43
| | | | | | | | | | | * include/freetype/fttrigon.h (FT_Hypot): Move to... * include/freetype/internal/ftcalc.h: This file. * src/base/fttrigon.c (FT_Hypot): Move to... * src/base/ftcalc.c: This file. Include FT_TRIGONOMETRY_H. * src/truetype/ttgload.c: Don't include FT_TRIGONOMETRY_H.
* Minor.Werner Lemberg2013-01-241-1/+4
|
* [truetype] Revert change from 2013-01-22.Werner Lemberg2013-01-242-3/+10
| | | | | | FreeType's `height' value is the baseline-to-baseline distance... * src/truetype/ttobjs.c (tt_size_reset): Undo.
* [base, truetype] New internal FT_Hypot function.Alexei Podtelezhnikov2013-01-235-29/+44
| | | | | | | | | | * include/freetype/fttrigon.h (FT_Hypot): Declare it. * src/base/fttrigon.c (FT_Hypot): Define it. * src/truetype/ttgload.c (TT_Process_Composite_Component): Use it instead of explicit expressions. * src/truetype/ttinterp.c (Current_Ratio, Normalize): Use it instead of TT_VecLen. (TT_VecLen): Removed.
* Typo.Alexei Podtelezhnikov2013-01-231-2/+2
|
* [base] Fix integer overflow.Alexei Podtelezhnikov2013-01-232-10/+24
| | | | | * src/base/ftoutln.c (FT_Outline_EmboldenXY): Normalize incoming and outgoing vectors and use fixed point arithmetic.
* [base] Fix integer overflow.Alexei Podtelezhnikov2013-01-232-1/+19
| | | | | * src/base/ftoutln.c (FT_Outline_Get_Orientation): Scale the coordinates down to avoid overflow.
* [base] Split out MSB function.Alexei Podtelezhnikov2013-01-234-31/+53
| | | | | | * src/base/fttrigon.c (ft_trig_prenorm): Borrow from here. * include/freetype/internal/ftcalc.h (FT_MSB): Declare here. * src/base/ftcalc.c (FT_MSB): Define here.
* [truetype] Fix font height.Werner Lemberg2013-01-222-3/+12
| | | | | | * src/truetype/ttobjs.c (tt_size_reset): The Windows rendering engine uses rounded values of the ascender and descender to compute the TrueType font height.
* Minor.Werner Lemberg2013-01-168-41/+44
|
* [sfnt] Fix optimized sbit loader.Werner Lemberg2013-01-162-9/+23
| | | | | | | | It was not taking bit_depth into consideration when blitting! * src/sfnt/ttsbit0.c (tt_sbit_decoder_load_byte_aligned, * tt_sbit_decoder_load_bit_aligned): Handle bit depth.
* [truetype] Improve sub-pixel code.David Turner2013-01-165-820/+870
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patches fixes many issues with the ttsubpix implementation. 1. Data tables are defined, instead of declared, in the header, and thus copied into each source file that includes it. 2. These tables were defined as global, mutable, visible variables, and thus costing private RAM to every process that loads the library (> 50 KB / process, this is huge!). Additionally, this also made the library export the symbols completely needlessly. 3. Missing `sph_' and `SPH_' prefixes to some of the definitions. Note that this doesn't try to fix the incredibly inefficient storage format for the data tables used by the code. This one will require another pass in the future. * src/truetype/ttinterp.h (MAX_NAME_SIZE, MAX_CLASS_MEMBERS): Renamed to... (SPH_MAX_NAME_SIZE, SPH_MAX_CLASS_MEMBERS): This. Update all users. (SPH_TweakRule, SPH_ScaleRule): Decorate with `const' where appropriate. (Font_Class): Rename to... (SPH_Font_Class): This. Decorate with `const' where appropriate. * src/truetype/ttsubpix.h (scale_test_tweak, sph_test_tweak): Decorate arguments with `const' where appropriate. Move font tweaking tables to... * src/truetype/ttsubpic.c: This file and decorate them with `static' and `const' where appropriate. (X_SCALING_Rules, X_SCALING_RULES_SIZE): Renamed to... (spu_X_SCALING_Rules, SPH_X_SCALING_RULES_SIZE): This. Update all users.
* [truetype] Improve accuracy of normalization of short vectors.Alexei Podtelezhnikov2013-01-122-6/+16
| | | | | | | | | | Unit vector components are stored as 2.14 fixed-point numbers. In order to calculate all 14 bits accurately, a short vector to be normalized has to be upscaled to at least 14 bits before its length is calculated. This has been safe since accurate CORDIC algorithms were adopted. * src/truetype/ttinterp.c (Normalize): Scale short vectors by 0x4000.
* [truetype] Kill very old vector normalization hacks.Alexei Podtelezhnikov2013-01-122-141/+16
| | | | | | | | | | | Back in the days, vector length calculations were not very accurate and the vector normalization function, Normalize, had to meticulously correct the errors for long vectors [commit b7ef2b096867]. It was no longer necessary after accurate CORDIC algorithms were adopted, but the code remained. It is time to kill it. * src/truetype/ttinterp.c (Normalize): Remove error compensation. (TT_VecLen): Remove any mention of old less accurate implementation.
* Call it fixed-point.Alexei Podtelezhnikov2013-01-1210-20/+19
|
* Disable FT_CONFIG_OPTION_OLD_INTERNALS.Werner Lemberg2013-01-114-2/+24
| | | | | | | | After the next release we are going to remove the code completely. * devel/ftoption.h, include/freetype/config/ftoption.h (FT_CONFIG_OPTION_OLD_INTERNALS): Comment out. * docs/CHANGES: Document it.
* Typos, whitespace.Werner Lemberg2013-01-112-9/+9
|
* [base] Update the overflow protection bit.Alexei Podtelezhnikov2013-01-102-32/+19
| | | | | | | | | The recent optimizations of CORDIC iterations drastically reduce the expansion factor. The vector components with MSB of 29 are now safe from overflow. * src/base/fttrigon.c (FT_TRIG_SAFE_MSB): New macro. (ft_trig_prenorm): Use it and remove dead code.
* Minor comment improvements.Werner Lemberg2013-01-101-6/+6
|
* [base, pshinter] Use FT_ABS, FT_MIN, and FT_MAX for readability.Alexei Podtelezhnikov2013-01-096-17/+27
| | | | | | | | * src/base/ftbbox.c: Updated. * src/base/ftobjs.c: Updated. * src/base/fttrigon.c: Updated. * src/pshinter/pshalgo.c: Updated. * src/pshinter/pshrec.c: Updated.
* [base] Clean up trigonometric core.Alexei Podtelezhnikov2013-01-082-9/+28
| | | | | | | * src/base/fttrigon.c: Document the algorithm in a large comment. (FT_TRIG_COSCALE): Remove macro. (FT_Tan: Use `FT_TRIG_SCALE' instead. (FT_Cos, FT_Vector_Unit): Ditto and round the return values.
* [base] Use rounding in CORDIC iterations.Alexei Podtelezhnikov2013-01-022-16/+21
| | | | | * src/base/fttrigon.c (ft_trig_pseudo_rotate, ft_trig_pseudo_polarize): Improve accuracy by rounding.
* [base] Reduce trigonometric algorithms.Alexei Podtelezhnikov2013-01-024-31/+68
| | | | | | | | | | | | | After we get within 45 degrees by means of true 90-degree rotations, we can remove initial 45-degree CORDIC iteration and start from atan(1/2) pseudorotation, reducing expansion factor thereby. * src/base/fttrigon.c (FT_TRIG_SCALE, FT_TRIG_COSCALE): Update macros. (ft_trig_pseudo_rotate, ft_trig_pseudo_polarize): Update. * src/tools/cordic.py: Bring up to date with trigonometric core. * docs/CHANGES: Old typo.
* * src/pshinter/pshalgo.h: Remove unused code.Alexei Podtelezhnikov2013-01-022-10/+5
|
* * src/truetype/ttgload.c (tt_loader_init): Add more tracing.Werner Lemberg2012-12-272-0/+10
|
* [type1] Fix handling of /FontBBox in MM fonts.Werner Lemberg2012-12-233-10/+87
| | | | | | | | | | | | | | | | | | | | Problem reported by Del Merritt <del@alum.mit.edu> If we have /FontBBox { { 11 12 13 14 15 16 17 18 } { 21 22 23 24 25 26 27 28 } { 31 32 33 34 35 36 37 38 } { 41 42 43 44 45 46 47 48 } } in the /Blend dictionary, then the first BBox is { 11 21 31 41 }, the second { 12 22 32 42 }, etc. * include/freetype/internal/psaux.h (T1_FieldType): Add `T1_FIELD_TYPE_MM_BBOX' (for temporary use). * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_MM_BBOX>: Implement it.