Commit Graph

2176 Commits

Author SHA1 Message Date
Werner Lemberg 952e6e167b * include/freetype/ftimage.h (FT_Outline_MoveToFunc,
FT_Outline_LineToFunc, FT_Outline_ConicToFunc,
FT_Outline_CubicToFunc, FT_Raster_RenderFunc),
include/freetype/ftrender.h (FT_Glyph_TransformFunc,
FT_Renderer_RenderFunc, FT_Renderer_TransformFunc): Don't use
`const' to stay compatible with FreeType 2.1.9.
2005-06-04 05:27:18 +00:00
Werner Lemberg 5d8fec36c1 typos. 2005-06-02 07:14:04 +00:00
Werner Lemberg 759f488165 Mention that the otvalid module might be moved to another library. 2005-06-02 07:12:05 +00:00
Werner Lemberg f7f9852bf1 * src/base/ftstroke.c (ft_stroker_inside): Revert `sigma' patch from
2004-07-11; this gives much better results under normal
circumstances.
2005-06-01 15:30:44 +00:00
Werner Lemberg 31728442ff * include/freetype/ftbitmap.h (FT_Bitmap_Embolden): Minor
documentation improvements.

* include/freetype/ftoutln.h (FT_Outline_Embolden): Fix typos.

* src/base/ftbitmap.c (FT_Bitmap_Embolden): Add support for bitmap
of pixel_mode FT_PIXEL_MODE_GRAY2 or FT_PIXEL_MODE_GRAY4.
If xstr is larger than 8 and bitmap is of pixel_mode
FT_PIXEL_MODE_MONO, set xstr to 8 instead of returning error.
2005-05-30 19:22:44 +00:00
Werner Lemberg c0ff44f880 * src/base/ftbitmap.c (FT_Bitmap_Embolden): Fix emboldening bitmap
of mode FT_PIXEL_MODE_GRAY.  Also add support for mode
FT_PIXEL_MODE_LCD and FT_PIXEL_MODE_LCD_V.
(ft_bitmap_assure_buffer): FT_PIXEL_MODE_LCD and FT_PIXEL_MODE_LCD_V
should have ppb (pixel per byte) 1.
Zero the padding when there's no need to allocate memory.

* src/base/ftsynth.c (FT_GlyphSlot_Embolden): Handle slot->advance
too.
More suited emboldening strength.
2005-05-30 07:54:20 +00:00
Werner Lemberg 869db78869 *** empty log message *** 2005-05-30 07:50:39 +00:00
Werner Lemberg 50d381f55d * src/base/ftbitmap.c (FT_Bitmap_Embolden): Handle negative pitch.
Handle FT_PIXEL_MODE_GRAY with num_gray != 256.
Improve speed for FT_PIXEL_MODE_GRAY.
(ft_bitmap_assure_buffer): Accept FT_PIXEL_MODE_LCD and
FT_PIXEL_MODE_LCD_V.
2005-05-28 21:52:37 +00:00
Werner Lemberg 3386362160 * src/base/ftobjs.c (ft_cmap_done_internal): New function.
(FT_CMap_Done): Remove cmap from cmap list.
(destroy_charmaps, FT_CMap_New): Don't call FT_CMap_Done but
ft_cmap_done_internal.
2005-05-27 06:01:28 +00:00
Werner Lemberg 3bd826ae06 * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Initialize `error'. 2005-05-27 04:18:20 +00:00
Werner Lemberg 1fa6dd2186 * docs/GPL.txt: Update postal address of FSF.
* include/freetype/ftbitmap.h (FT_Bitmap_Embolden): Improve
documentation.

* src/base/ftsynth.c (FT_BOLD_THRESHOLD): Removed.
(FT_GlyphSlot_Embolden): Check whether slot is bitmap owner.
Always modify the metrics.
2005-05-26 21:02:25 +00:00
Werner Lemberg 87e8d1f146 * docs/CHANGES: Updated.
* include/freetype/ftbitmap.h (FT_Bitmap_Embolden): New declaration.

* include/freetype/ftoutln.h (FT_Outline_Embolden): New declaration.

* src/base/ftbitmap.c (ft_bitmap_assure_buffer): New auxiliary
function.
(FT_Bitmap_Embolden): New function.

* src/base/ftoutln.c (FT_Outline_Embolden): New function.

* src/base/ftsynth.c: Don't include FT_INTERNAL_CALC_H and
FT_TRIGONOMETRY_H but FT_BITMAP_H.
(FT_GlyphSlot_Embolden): Use FT_Outline_Embolden or
FT_Bitmap_Embolden.
2005-05-25 05:51:01 +00:00
Werner Lemberg ca9cb2f90d * README.CVS: Mention file permissions. 2005-05-24 13:46:17 +00:00
Werner Lemberg 6e26686aca * configure: Always remove config.mk, builds/unix/unix-def.mk, and
builds/unix/unix-cc.mk.  This fixes repeated calls of the script.
Reported by Nelson Beebe and Behdad Esfahbod.
2005-05-24 04:49:42 +00:00
Werner Lemberg 4e1621ece4 *** empty log message *** 2005-05-23 21:34:17 +00:00
Werner Lemberg 52c21bb383 * builds/amiga/makefile.os4 (WARNINGS), builds/compiler/gcc-dev.mk
(CFLAGS), builds/compiler/gcc.mk (CFLAGS): Remove
-fno-strict-aliasing.


Say you have `(Foo*)x' and want to assign, pass, or return it as
`(Bar*)'.  If you simply say `x' or `(Bar*)x', then the C compiler
would warn you that type casting incompatible pointer types breaks
strict-aliasing.  The solution is to cast to `(void*)' instead which
is the generic pointer type, so the compiler knows that it should
make no strict-aliasing assumption on `x'.  But the problem with
`(void*)x' is that seems like in C++, unlike C, `void*' is not a
generic pointer type and assigning `void*' to `Bar*' without a cast
causes an error.  The solution is to cast to `Bar*' too, with
`(Bar*)(void*)x' as the result -- this is what the patch does.

* include/freetype/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP),
include/freetype/cache/ftcmru.h (FTC_MRULIST_LOOKUP_CMP): Remove
cast on lvalue, use a temporary pointer instead.
Cast temporarily to (void*) to not break strict aliasing.

* include/freetype/internal/ftmemory.h (FT_MEM_ALLOC,
FT_MEM_REALLOC, FT_MEM_QALLOC, FT_MEM_QREALLOC, FT_MEM_FREE),
src/base/ftglyph.c (FT_Glyph_To_Bitmap): Cast temporarily to (void*)
to not break strict aliasing.

* src/base/ftinit.c (FT_USE_MODULE): Fix wrong type information.

* builds/unix/configure.ac (XX_CFLAGS): Remove -fno-strict-aliasing.

* src/sfnt/rules.mk (SFNT_DRV_SRC): Don't include ttsbit0.c --
it is currently loaded from ttsbit.c.


Other formatting.
2005-05-23 21:33:02 +00:00
David Turner cb05ae4371 * include/freetype/cache/ftcache.h, src/cache/ftccache.c,
src/cache/ftcsbits.c: fixing bug #12213 (incorrect behaviour
    of the cache sub-system in low-memory conditions).
2005-05-23 13:04:53 +00:00
Werner Lemberg d4ada6d5b4 * src/base/rules.mk (BASE_SRC): Don't add ftsynth.c here but...
(BASE_EXT_SRC): Here.
2005-05-23 12:01:39 +00:00
Werner Lemberg 93d026a14f * src/base/rules.mk (BASE_SRC): Add ftsynth.c. 2005-05-22 20:46:40 +00:00
Werner Lemberg 69cf1fcba0 *** empty log message *** 2005-05-22 20:43:38 +00:00
Werner Lemberg 140f7076f0 * src/base/ftrfork.c (raccess_guess_apple_generic): Mark
`version_number' and `entry_length' as unused.
(raccess_guess_linux_double_from_file_name): Remove `memory'.
(raccess_make_file_name): Mark `error' as unused.

* src/bdf/bdflib.c (_bdf_parse_properties): Remove `memory'.

* src/cid/cidobjs.c (cid_face_init): Remove `psnames'.

* src/sfnt/sfobjs.c (sfnt_load_face): Remove `memory'.

* src/truetype/ttgxvar.c (ft_var_readpackedpoints,
ft_var_readpackeddeltas, ft_var_load_avar): Mark `error' as unused.
2005-05-22 20:33:09 +00:00
David Turner af23b86939 * src/base/ftsynth.c (FT_GlyphSlot_Embolden): fixing a bug that produced
unpleasant artefacts when trying to embolden very sharp corners.
2005-05-21 10:42:32 +00:00
Werner Lemberg 9d1b2e0289 * docs/CHANGES: Updated.
* src/base/ftbitmap.c: Don't include FT_FREETYPE_H and FT_IMAGE_H
but FT_BITMAP_H.
(FT_Bitmap_Copy): New function (from ftglyph.c).

* include/freetype/ftbitmap.h (FT_Bitmap_Copy): New public
definition.

* src/base/ftglyph.c: Include FT_BITMAP_H.
(ft_bitmap_copy): Move to ftbitmap.c.
(ft_bitmap_glyph_init): Remove `memory' variable.
Create new bitmap object if FT_GLYPH_OWN_BITMAP isn't set.
(ft_bitmap_glyph_copy): Use FT_Bitmap_Copy.
(ft_bitmap_glyph_done): Use FT_Bitmap_Done.
(ft_outline_glyph_init): Use FT_Outline_Copy.

* src/base/ftoutln.c (FT_Outline_Copy): Handle source == target.
(FT_Outline_Done_Internal): Check for valid `memory' pointer.
(FT_Outline_Translate, FT_Outline_Reverse, FT_Outline_Render,
FT_Outline_Transform): Check for valid `outline' pointer.

* src/base/ftobjs.c (FT_New_GlyphSlot): Prepend glyph slot to
face->glyph, otherwise a new second glyph slot cannot be created.
(FT_Done_GlyphSlot): Fix memory leak.
(FT_Open_Face): Updated -- face->glyph is already managed by
FT_New_GlyphSlot.

* src/type42/t42objs.c (T42_GlyphSlot_Done): Updated.
2005-05-20 21:52:19 +00:00
Werner Lemberg 7f69b656c2 * include/freetype/ftimage.h (FT_Raster_Params),
include/freetype/ftoutln.h (FT_Outline_Translate,
FT_Outline_Transform), src/base/ftoutln.c (FT_Outline_Translate,
FT_Outline_Transform): Decorate parameters with `const' where
appropriate.
Update all callers.

* src/raster/ftraster.c (ft_black_reset), src/smooth/ftgrays.c
(gray_raster_reset): Remove `const' from `pool_base' argument.
2005-05-20 06:22:20 +00:00
Werner Lemberg b9055b05a3 typo 2005-05-19 13:51:26 +00:00
Werner Lemberg ccd17b5ada * src/raster/ftmisc.h: New file. Only needed if ftraster.c is
compiled as stand-alone.

* src/raster/ftraster.c: Add comment how to compile as stand-alone.
s/FT_CONFIG_OPTION_STATIC_RASTER/FT_STATIC_RASTER/.
s/TT_STATIC_RASTER/FT_STATIC_RASTER/.
[_STANDALONE_]: Include ftimage.h and ftmisc.h.
(FT_TRACE1, FT_TRACE6, ft_memset, FT_MEM_ZERO): Define
conditionally.
(Render_Glyph, Render_Gray_Glyph): Return Raster_Err_None (or
Raster_Err_Unsupported).
(ft_black_new) [_STANDALONE_]: Fix type of `the_raster'.
(ft_black_init, ft_black_reset, ft_black_set_mode, ft_black_render):
Use `ras', not `raster'.
(ft_black_done): Use FT_UNUSED_RASTER.
(Horizontal_Sweep_Init, Horizontal_Sweep_Step,
Horizontal_Gray_Sweep_Span): Use FT_UNUSED_RASTER.


* docs/CHANGES: Updated.
2005-05-19 07:20:24 +00:00
Werner Lemberg 1fc9ce9659 * docs/announce: Start updating. 2005-05-18 07:01:59 +00:00
Werner Lemberg 9f29b02c30 *** empty log message *** 2005-05-17 20:37:50 +00:00
Werner Lemberg 4303677c2d * builds/win32/visualc/freetype.vcproj: Updated.
Exclude debug info for `Release' versions to reduce library size.


* src/base/ftobjs.c (FT_Open_Face): Make it work as documented, this
is, ignore `aface' completely if face_index < 0.  Reported by David
Osborn <spam@habitualhiatus.com>.


* include/freetype/ftimage.h (FT_Outline_MoveToFunc,
FT_Outline_LineTo_Func, FT_Outline_ConicToFunc,
FT_Outline_CubicToFunc), src/smooth/ftgrays.c (gray_render_conic,
gray_render_cubic, gray_move_to, gray_line_to, gray_conic_to,
gray_cubic_to, gray_render_span, gray_sweep): Decorate parameters
with `const' where appropriate.
2005-05-17 20:35:23 +00:00
Werner Lemberg daeaa43978 * include/freetype/ftimage.h (FT_Raster_RenderFunc),
include/freetype/ftrender.h (FT_Glyph_TransformFunc,
FT_Renderer_Render_Func, FT_Renderer_TransformFunc),
src/base/ftglyph.c (ft_outline_glyph_transform),
src/raster/ftrend1.c (ft_raster1_transform, ft_raster1_render),
src/smooth/ftgrays.c (FT_Outline_Decompose, gray_raster_render),
src/smooth/ftsmooth.c (ft_smooth_transform,
ft_smooth_render_generic, ft_smooth_render, ft_smooth_render_lcd,
ft_smooth_render_lcd_v): Decorate parameters with `const' where
appropriate.

* src/raster/ftraster.c (RASTER_RENDER_POOL): Removed.  Obsolete.
(ft_black_render): Decorate parameters with `const' where
appropriate.


* src/sfnt/ttcmap.c (tt_cmap4_set_range): Fix typo (FT_PEEK_SHORT ->
FT_PEEK_USHORT) which caused crashes.  Reported by Ismail Donmez
<ismail@kde.org.tr>.
2005-05-11 20:04:35 +00:00
Werner Lemberg 2c9ee60e04 * include/freetype/internal/ftserv.h (FT_FACE_FIND_GLOBAL_SERVICE)
[__cplusplus]: Fix typo.
2005-05-09 22:29:36 +00:00
Werner Lemberg 9539d9b96f Handle unsorted SFNT type 4 cmaps correctly (reported by Dirck
Blaskey).

* src/sfnt/ttcmap.h (TT_CMap): Add member `unsorted'.
* src/sfnt/ttcmac.c: Use SFNT_Err_Ok where appropriate.

(tt_cmap0_validate, tt_cmap2_validate, tt_cmap6_validate,
tt_cmap8_validate, tt_cmap10_validate, tt_cmap12_validate): Use
`FT_Error' as return type.
(tt_cmap4_validate): Use `FT_Error' as return type.
Return error code for unsorted cmap.
(tt_cmap4_char_index, tt_cmap4_char_next): Use old code for unsorted
cmaps.
(tt_face_build_cmaps): Set `unsorted' variable in cmap.


Minor formatting.
2005-05-09 22:11:36 +00:00
Werner Lemberg 31809f0abc * src/truetype/ttpload.c (tt_face_get_location): Fix typo. 2005-05-07 06:10:19 +00:00
Werner Lemberg 753daf1cee * src/cff/cffobjs.c (cff_face_init): Set ppem value in top
dictionary for SFNT-based CFF.
2005-05-06 19:24:13 +00:00
Werner Lemberg 0b5282f170 Handle malformed `loca' table entries.
* docs/TODO: Add some bugs which should be fixed.

* include/freetype/internal/tttypes.h (TT_FaceRec): Add `glyf_len'
element.

* src/truetype/ttpload.c (tt_face_load_loca): Get length of `glyf'
table.
(tt_face_get_location): Fix computation of `asize' for malformed
`loca' entries.
2005-05-05 07:44:20 +00:00
David Turner 29519bbada * Jamfile: removing otvalid from the list of compiled modules
* include/freetype/internal/ftserv.h: added compiler pragmas to get rid
    of annoying warnings with Visual C++ compiler in maximum warning mode

  * src/autofit/afhints.c, src/autofit/aflatin.c, src/base/ftstroke.c,
    src/bdf/bdfdrivr.c, src/cache/ftcbasic.c, src/cache/ftccmap.c,
    src/cache/ftcmanag.c, src/cff/cffload.c, src/cid/cidload.c,
    src/lzw/zopen.c, src/otvalid/otvgdef.c, src/pcf/pcfread.c,
    src/sfnt/sfobjs.c, src/truetype/ttgxvar.c: removing compiler warnings
2005-05-01 10:11:32 +00:00
Werner Lemberg 7315df76c6 * docs/TODO: Updated. 2005-04-28 05:34:25 +00:00
Werner Lemberg 7a10462344 * src/otvalid/otvcommn.c
(otv_GSUBGPOS_have_MarkAttachmentType_flag): Handle table == 0.
2005-04-24 21:50:41 +00:00
Werner Lemberg a59ef5267d * src/cff/cffobjs.c (cff_face_init): Set default upem value in top
font dict also.
Handle font matrix settings in subfonts.

* src/cff/cffgload.c (cff_slot_load): Use the correct font matrix
for CID-keyed fonts with subfonts.

* docs/formats.txt: Updated.
2005-04-18 07:13:07 +00:00
Werner Lemberg c16eeb1d19 * include/freetype/freetype.h (FT_Vector_Transform),
include/freetype/ftimage.h (FT_Raster_Params),
include/freetype/ftoutln.h, src/base/ftoutln.c (FT_Outline_Get_CBox,
FT_Outline_Copy, FT_Outline_Transform, FT_Vector_Transform,
FT_Outline_Get_Bitmap), src/raster/ftraster.c (ft_black_render),
src/smooth/ftgrays.c (gray_raster_render): Decorate parameters with
`const' where appropriate.

* src/sfnt/ttsbit0.c (tt_sbit_decoder_load_image): Fix arguments
to call of tt_sbit_decoder_load_bitmap.
2005-04-14 16:03:15 +00:00
Werner Lemberg e9b8c39eb8 * src/type1/t1load.c (parse_charstrings): Catch this non-standard
beginning of the /CharStrings dictionary:

  /CharStrings 118 dict def
  Private begin
  CharStrings begin
2005-04-14 11:43:40 +00:00
Werner Lemberg a9a65f7f50 * docs/TODO: Updated.
* autogen.sh: Use `--force' for all commands.
2005-04-13 18:12:36 +00:00
Werner Lemberg 3f4f7450da src/pshinter/pshalgo.c (ps_hints_apply): Change scaling values only
if `fitted' is not zero.
2005-04-09 09:50:39 +00:00
Werner Lemberg 57214ba86a * src/truetype/ttgload.c (tt_face_get_metrics) [FT_OPTIMIZE_MEMORY]:
Fix typo which sometimes causes wrong metrics for the last glyph.
2005-04-06 14:48:55 +00:00
Werner Lemberg 5f501a4a98 *** empty log message *** 2005-04-04 20:38:33 +00:00
David Turner 76d7d37b19 * include/freetype/config/ftoption.h: commenting the definition of
FT_OPTIMIZE_MEMORY for the upcoming 2.1.10 release

    * src/autofit/afhints.c: small tweak to use a bit less heap memory
    within the auto-fitter
2005-04-03 22:09:41 +00:00
Werner Lemberg 069ea05829 * src/type1/t1parse.c (T1_New_Parser): Relax the check for a valid
first line in the font.
2005-04-03 20:44:43 +00:00
Werner Lemberg 3a1a1eeaa7 * docs/CHANGES, include/freetype/freetype.h: Improve documentation
of FT_Set_Pixel_Sizes and FT_Set_Char_Size.
2005-04-03 20:11:42 +00:00
Werner Lemberg adebe7e2de Add comment about hard-coded dropout mode. 2005-04-01 23:57:31 +00:00
Werner Lemberg 8bbace0b63 * builds/amiga/src/base/ftsystem.c (ft_amiga_stream_io): Fix buffer
offsets after a large read.
2005-03-26 22:57:57 +00:00