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.
10 years ago
Alexei Podtelezhnikov
3212852cce
[base] Tighten the overflow check in `FT_MulFix'.
...
* src/base/ftcalc.c (FT_MulFix) [!FT_LONG64]: Updated.
10 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'.
10 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
Alexei Podtelezhnikov
1183cd4e17
[base] Further clean up color bitmap conversion.
...
* src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Stop
using FT_MulFix and FT_DivFix since all calculations fit into 32 bits.
11 years ago
Werner Lemberg
441b3f3898
[truetype] Improve handling of buggy `prep' tables.
...
In case of an error in the `prep' table, no longer try to execute it
again and again. This makes FreeType handle endless loops in buggy
fonts much faster.
* src/truetype/ttobjs.h (TT_SizeRec): The fields `bytecode_ready'
and `cvt_ready' are now negative if not initialized yet, otherwise
they indicate the error code of the last run.
* src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep,
tt_size_done_bytecode, tt_size_init_bytecode,
tt_size_ready_bytecode, tt_size_init, tt_size_done, tt_size_reset):
Updated.
* src/truetype/ttgload.c (tt_loader_init): Updated.
* src/truetype/ttinterp.c (TT_RunIns): Force reexecution of `fpgm'
and `prep' only if we are in the `glyf' table.
11 years ago
Werner Lemberg
e98e2bc1aa
* builds/vms/ftconfig.h: Synchronize.
...
Problem reported by Alexei.
11 years ago
Alexei Podtelezhnikov
35576bf067
[base] Clean up bitmap conversion.
...
* src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Use
appropriate FT_DivFix and remove superfluous upscaling.
11 years ago
Alexei Podtelezhnikov
2f52df4a0d
[base] Improve comment.
11 years ago
Alexei Podtelezhnikov
ceab95a649
[base] Small optimization of the ancient code.
...
* src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round): Loosen up the
condition for direct 32-bit calculations.
11 years ago
Werner Lemberg
3897556a13
Fix Apple standard glyph names.
...
* src/sfnt/ttpost.c (tt_post_default_names): Synchronize with
`tools/glnames.py'
Problem reported by Adam Twardoch <adam@fontlab.com>.
11 years ago
Werner Lemberg
ccf60ad445
Formatting.
11 years ago
Werner Lemberg
231171fc3a
Partially revert commit from 2014-06-13.
...
* src/autofit/aflatin.c (af_latin_metrics_init_blues): Move
declaration of `p_first' and `p_last' out of the loop.
11 years ago
Werner Lemberg
cf2347c962
* builds/unix/freetype2.m4: s/AC_PATH_PROG/AC_PATH_TOOL/.
...
This simplifies cross-compiling.
11 years ago
Werner Lemberg
d708658c4a
And another warning from Wojciech.
11 years ago
Werner Lemberg
e5c0fff5af
Fix more compiler warnings.
...
Reported by Wojciech Mamrak <wmamrak@gmail.com>.
* src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
Make integer constant unsigned.
* src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
<TT_SBIT_TABLE_TYPE_SBIX>: Fix types.
(tt_sbit_decoder_load_compound, tt_face_load_sbix_image): Add proper
casts.
11 years ago
Werner Lemberg
6497b9c5a5
Fix compiler warnings.
...
Reported by Wojciech Mamrak <wmamrak@gmail.com>.
* src/autofit/afglobal.c (af_face_globals_compute_style_coverage),
src/autofit/afmodule.c (af_property_set): Fix `signed' vs.
`unsigned' issues.
* src/autofit/aflatin.c (af_latin_metrics_init_blues): Make compiler
happy.
* src/base/ftlcdfil.c (_ft_lcd_filter_fir): Use only four elements
for `fir'.
Fix `signed' vs. `unsigned' issues.
* src/sfnt/sfobjs.c (WRITE_BYTE): Removed, unused.
(WRITE_USHORT, WRITE_ULONG): Add proper casts.
* src/truetype/ttgload.c (TT_Get_VMetrics): Add proper casts.
* src/truetype/ttinterp.c (Ins_DELTAP): Add proper casts for `B1'
and `B2'.
11 years ago
Werner Lemberg
099489feff
Update CHANGES file.
11 years ago
Alexey Petruchik
02f2170432
[cmake] Add option to build OS X framework.
...
* CMakeLists.txt: Update accordingly.
* builds/mac/freetype-Info.plist: New file.
11 years ago