David Weiß
3889cb2faa
[build] Better optimization settings for vc2010 solution file.
...
* builds/windows/vc2010/freetype.sln,
builds/windows/vc2010/freetype.vcxproj: Updated.
10 years ago
Werner Lemberg
8f17809b2d
[autofit] Adjust Devenagari character range.
...
* src/autofit/afranges.c (af_deva_uniranges): Omit characters that
are common to all other Indic scripts.
10 years ago
Werner Lemberg
1ca5fa15b0
[sfnt] Fix Savannah bug #43392 .
...
* src/sfnt/ttsbit.c (tt_sbit_decoder_load_metrics): Don't let
vertical metrics uninitialized.
10 years ago
Alexei Podtelezhnikov
673a28ef93
[base] Small bbox correction.
...
* src/base/ftbbox.c (FT_Outline_Get_BBox): Start from nonsense bbox
instead of initial point that could be `off' in conic outlines.
10 years ago
Alexei Podtelezhnikov
9cc0ad7bf5
Formatting.
10 years ago
Alexei Podtelezhnikov
40dac11360
[base] Fix Savannah bug #43356 .
...
* src/base/ftbbox.c (BBox_Move_To, BBox_Conic_To): Update bbox in case
of implicit `to'.
(BBox_Line_To): New emitter that does not update bbox.
10 years ago
Alexei Podtelezhnikov
2ffcf17e15
[base] Introduce and use new macro `FT_UPDATE_BBOX'
...
* src/base/ftbbox.c (FT_UPDATE_BBOX): New macro.
(FT_Outline_Get_BBox): Use it here.
10 years ago
Alexei Podtelezhnikov
7abdb8ccea
[base] Significant optimization of `ft_div64by32'
...
We shift as many bits as we can into the high register, perform
32-bit division with modulo there, then work through the remaining
bits with long division. This optimization is especially noticeable
for smaller dividends that barely use the high register.
* src/base/ftcalc.c (ft_div64by32): Updated.
10 years ago
Werner Lemberg
c0ce72a6de
Formatting.
10 years ago
Dave Arnold
537c55d39d
[cff] Fix Savannah bug #43271 .
...
* src/cff/cf2font.c (cf2_computeDarkening): Change overflow
detection to use logarithms and clamp `scaledStem'.
10 years ago
Alexei Podtelezhnikov
74d0aad22c
* src/base/ftcalc.c: Remove miscellaneous type casts.
10 years ago
Alexei Podtelezhnikov
418e18f3df
[base] Use more common `FT_MSB' implementation with masks.
...
* src/base/ftcalc.c (FT_MSB): Updated.
10 years ago
Alexei Podtelezhnikov
955aff12c0
[base] Clean up.
...
* src/base/ftcalc.c (FT_MOVE_SIGN): New macro for frequently used code.
10 years ago
Alexei Podtelezhnikov
f78ca0dbb9
Remove commented out code.
10 years ago
Alexei Podtelezhnikov
7f49111f81
[base] Avoid unnecessary long division.
...
This applies to `FT_MulDiv' but not to `FT_DivFix', where overflows or
lack thereof are predicted accurately.
* src/base/ftcalc.c (ft_div64by32): Improve readability.
(FT_MulDiv, FT_MulDiv_No_Round) [!FT_LONG64]: Use straight division
when multiplication stayed within 32 bits.
10 years ago
Werner Lemberg
5b68e4fb60
[autofit] Minor clean-ups.
...
* src/autofit/afhints.c (AF_FLAGS): Remove obsolete values.
* src/autofit/afhints.c (af_glyph_hints_dump_points,
af_glyph_hints_align_strong_points): Updated.
* src/autofit/aflatin.c (af_latin_hints_link_segments,
af_latin_hints_compute_segments), src/autofit/afcjk.c
(af_cjk_hints_link_segments), src/autofit/aflatin2.c
(af_latin2_hints_link_segments, af_latin2_hints_compute_segments):
There are no longer fake segments since more than 10 years...
10 years ago
Alexei Podtelezhnikov
0753c0c35e
Minor documentation fixes.
10 years ago
Werner Lemberg
7a615283cb
[autofit] Minor.
10 years ago
Werner Lemberg
387a9fe73d
[autofit] Minor code streamlining.
...
* src/autofit/afhints.c (af_axis_hints_new_edge): Remove redundant
initialization.
10 years ago
Werner Lemberg
378266dc1a
Formatting.
10 years ago
Alexei Podtelezhnikov
5c894842d3
* src/base/ftcalc.c: Harmonize code.
10 years ago
Alexei Podtelezhnikov
ef070d458b
[base] Tighten the overflow check in `FT_MulDiv'.
...
* src/base/ftcalc.c (FT_MulDiv) [!FT_LONG64]: Updated.
10 years ago
Alexei Podtelezhnikov
bc12d9e9ac
Fix Savannah bug #43153 .
...
* src/psaux/psconv.c (PS_Conv_ToFixed): Add protection against
overflow in `divider'.
10 years ago
Alexei Podtelezhnikov
336735d8de
[base] Tighten the overflow check in `FT_DivFix'.
...
This fixes a 13-year old bug. The original overflow check should have
been updated when rounding was introduced into this function
(c2cd00443b
).
* src/base/ftcalc.c (FT_DivFix) [!FT_LONG64]: Updated.
* include/freetype.h (FT_DivFix): Updated documentation.
11 years ago
Alexei Podtelezhnikov
3212852cce
[base] Tighten the overflow check in `FT_MulFix'.
...
* src/base/ftcalc.c (FT_MulFix) [!FT_LONG64]: Updated.
11 years ago
Alexei Podtelezhnikov
125c3ca8f0
[truetype] Shortcut ppem calculations for square pixels.
...
* src/truetype/ttinterp.h (TT_ExecContextRec): New field
`cur_ppem_func' with a function pointer.
* src/truetype/ttinterp.c (TT_RunIns): Initialize `cur_ppem_func'
depending on the pixel geometry to either...
(Current_Ppem_Stretched): ... this for stretched pixels.
(Current_Ppem): ... or this for square pixels.
(DO_MPPEM, DO_MPS, Ins_DELTAP, Ins_DELTAC): Use `cur_ppem_func'.
11 years ago
Behdad Esfahbod
1ec98b29ec
Don't use `register' keyword. Fixes compiler warnings.
...
* src/base/ftcalc.c (FT_Add64) [!FT_LONG64]: Do it.
* src/gzip/inftrees.c (huft_build): Ditto.
* src/truetype/ttinterp.c (TT_MulFix14_arm): Ditto.
11 years ago
Alexei Podtelezhnikov
a8bc49e141
[truetype] Optimize DELTAP and DELTAC.
...
* src/truetype/ttinterp.c (Ins_DELTAP, Ins_DELTAC): Move ppem
calculations outside of the loop.
11 years ago
Alexei Podtelezhnikov
5bb5750f98
Minor.
11 years ago
Alexei Podtelezhnikov
986885965a
Fix Savannah bug #43033 .
...
* include/config/ftconfig.h, builds/unix/ftconfig.in,
builds/vms/ftconfig.h [FT_LONG64]: Do not disable the macro when
64-bit type is `long'.
11 years ago
Werner Lemberg
70961e5772
Minor.
11 years ago
Alexei Podtelezhnikov
8fd87d4e69
[base] Small optimization of `FT_MulFix'.
...
* src/base/ftcalc.c (FT_MulFix): Loosen up the condition for direct
32-bit calculations.
11 years ago
Alexei Podtelezhnikov
f09326a1a6
[base] Use unsigned calculation in `FT_MulDiv'.
...
* src/base/ftcalc.c (FT_MulDiv): Updated to expand 32-bit range.
11 years ago
Alexei Podtelezhnikov
382f3155f6
[base] Remove truncation in `FT_DivFix'.
...
* src/base/ftcalc.c (FT_DivFix): Updated.
11 years ago
Alexei Podtelezhnikov
5ef2023c45
Minor refactoring.
...
* src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round): Updated.
11 years ago
Alexei Podtelezhnikov
c7022467d2
Turn FT_MSB into a macro when using gcc builtins.
...
* src/base/ftcalc.c, include/internal/ftcalc.h: Updated.
11 years ago
Alexei Podtelezhnikov
87e56b043a
Fix comment and whitespace.
11 years ago
Alexei Podtelezhnikov
f8efbcfb8e
[base] Avoid undefined FT_MSB in `BBox_Cubic_Check'.
...
* src/base/ftbbox.c (BBox_Cubic_Check): Update.
(update_cubic_max): Repalce with...
(cubic_peak): ... this, which now handles upscaling.
11 years ago
Alexei Podtelezhnikov
d2935e2969
* src/base/fttrigon.c (ft_trig_prenorm): Comment on undefined behavior.
11 years ago
Alexei Podtelezhnikov
28018d42a8
[base] Handle collapsed outlines to avoid undefined FT_MSB.
...
* src/base/ftoutln.c (FT_Outline_Get_Orientation): Update.
11 years ago
Alexei Podtelezhnikov
4728993fa8
[base] Restore FT_MulFix inlining.
...
* include/freetype.h (FT_MulFix): Unconditionally defined.
* src/base/ftcalc.c [FT_MULFIX_ASSEMBLER]: Move code from here...
* include/internal/ftcalc.h [FT_MULFIX_ASSEMBLER]: ... to here,
which conditionally replaces the function with an inline version
through the macro.
11 years ago
Alexei Podtelezhnikov
90be4b6377
* src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Refactor.
11 years ago
Werner Lemberg
e1394d5675
Minor documentation improvement.
11 years ago
Werner Lemberg
d17cabf57d
[cff] Fix typo.
...
* src/cff/cf2hints.c (cf2_glyphpath_computeOffset): Use correct
offsets in third quadrant.
Reported by maks <maksqwe1@ukr.net>.
11 years ago
Werner Lemberg
4e75413334
Fix Savannah bug #42788 .
...
* src/pfr/pfrobjs.c: Include `ftcalc.h'.
11 years ago
Werner Lemberg
cbbf26b705
Whitespace.
11 years ago
Werner Lemberg
3939c200f3
Minor.
11 years ago
Alexei Podtelezhnikov
c0a6f20a4b
Replace `ft_highpow2' function.
...
* src/pfr/pfrobjs.c (pfr_face_get_kerning): Use `FT_MSB' instead of
`ft_highpow2'.
* src/base/ftutil.c, include/internal/ftobjs.h (ft_highpow2): Remove
it.
11 years ago
Alexei Podtelezhnikov
177982e933
* src/base/ftcalc.c (FT_MSB): Utilize gcc builtins.
11 years ago
Alexei Podtelezhnikov
71330ceb50
[base] Move assembler code back in the source file.
...
FT_MulFix assembler used to reside in ftcalc.c before f47d263f1b
.
* include/config/ftconfig.h, builds/unix/ftconfig.in,
builds/vms/ftconfig.h [FT_MULFIX_ASSEMBLER]: Move code from here...
* src/base/ftcalc.c [FT_MULFIX_ASSEMBLER]: ... to here.
11 years ago