| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
* src/base/ftbbox.c (BBox_Cubic_Check): Change scaling to msb of 22.
|
|
|
|
|
|
| |
* src/base/ftbbox.c (BBox_Cubic_Check): New bisecting algorithm
for extremum search built around simple condition that defines
which half contains the extremum.
|
|
|
|
|
|
| |
* src/tools/test_bbox.c: Add another cubic outline with exact BBox.
(REPEAT): Increase the number of benchmarking cycles.
(profile_outline): Tweak output formatting.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
* src/truetype/ttinterp.c (Ins_IP): Implement identical behaviour to
MS rasterizer if rp1 == rp2 (confirmed by Greg Hitchcock).
|
|
|
|
|
| |
* src/pcf/pcfread.c (pcf_get_encodings): Use simpler double for-loop.
Reallocate array instead of using temporary storage.
|
|
|
|
| |
* builds/unix/freetype-config.in: Set LC_ALL.
|
|
|
|
|
|
|
| |
This complements commit 83c0ebab.
* src/base/ftcalc.c (FT_MulDiv_No_Round): Don't enclose with
`TT_USE_BYTECODE_INTERPRETER'.
|
|
|
|
|
| |
* src/truetype/ttinterp.c (Ins_IP): Make FreeType behave identical
to other interpreters if rp1 == rp2 (which is invalid).
|
| |
|
|
|
|
| |
Thanks to Hin-Tak Leung for the analysis.
|
| |
|
|
|
|
|
| |
* src/base/ftbbox.c (BBox_Cubic_Check): Use FT_MSB function in
scaling algorithm.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
* src/base/ftoutln.c (FT_Outline_EmboldenXY): Do not attempt to
normalize zero-length vectors.
|
|
|
|
|
|
|
| |
This fixes commit 83c0ebab from 2012-06-27.
* src/truetype/ttinterp.h:
s/TT_CONFIG_OPTION_BYTECODE_INTERPRETER/TT_USE_BYTECODE_INTERPRETER/.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
* src/base/ftoutln.c, src/base/fttrigon.c: Include
FT_INTERNAL_CALC_H.
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
|
|
|
| |
FreeType's `height' value is the baseline-to-baseline distance...
* src/truetype/ttobjs.c (tt_size_reset): Undo.
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
|
|
| |
* src/base/ftoutln.c (FT_Outline_EmboldenXY): Normalize incoming and
outgoing vectors and use fixed point arithmetic.
|
|
|
|
|
| |
* src/base/ftoutln.c (FT_Outline_Get_Orientation): Scale the
coordinates down to avoid overflow.
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
* src/base/fttrigon.c (ft_trig_pseudo_rotate,
ft_trig_pseudo_polarize): Improve accuracy by rounding.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|