Commit Graph

70 Commits

Author SHA1 Message Date
Priyeshkkumar c96739bfc9 * builds/windows/ftdebug.c (ft_logging_init, ft_logging_init):
Fixed coding style.

    * src/base/ftdebug.c (ft_logging_init): Fixed coding style.
2020-08-24 13:47:38 +05:30
Priyeshkkumar ec03321013 * src/sfnt/ttload.c (tt_face_load_font_dir): Changed layout of tracing
messages.

    * src/base/ftdebug.c (ft_logging_init): Fix Seg fault.
2020-08-24 12:28:12 +05:30
Priyeshkkumar 4f472b5799 * include/freetype/ftlogging.h (FT_Trace_Set_Level): Use more relevant
parameters name in function declaration.
    (FT_Custom_Log_Handler): Changed function name `ft_custom_log_handler'->
    `FT_Custom_Log_Handler'.
    Updated documentation.

    * include/freetype/ftchapters.h: Added `debugging_apis' section under
    `support_api' chapter.

    * .gitmodules: Updated submodule to track recent changes in dlg library.

    * src/base/ftdebug.c (ft_log_handler): Updated code according to the
    recent updates in dlg library.
    (ft_logging_init): Added environment variable `FT_LOGGING_FILE', the
    variable `ft_fileptr' stores it's value.
    Changed function name `ft_custom_log_handler'->
    `FT_Custom_Log_Handler'.

    * include/freetype/internal/ftdebug.h: Changed function name
    `ft_custom_log_handler'-> `FT_Custom_Log_Handler'.

    * README.git: Updated documentation.

    * docs/DEBUG: Updated documentation.
2020-08-24 10:58:17 +05:30
Priyeshkkumar 17700d419b * include/freetype/internal/ftdebug.h (FT_LOG ): Use more relevant
temporary variable name, to hold the name of FT_COMPONENT.
    (FT_ERROR): Store the name of `FT_COMPONENT' in a temporary variable
    and then pass it as a parameter to `ft_add_tag' and `ft_remove_tag'.

    * src/base/ftdebug.c : Updated Comments.
    (FT_Trace_Set_Level, FT_Trace_Set_Default_Level): Reinitialize the
    values of `ft_timestamp_flag' and `ft_component_flag' every time
    `FT_Trace_Set_Level' and `FT_Trace_Set_Default_Level' is used.
2020-08-21 12:18:07 +05:30
Priyeshkkumar 008ee3ebca * src/base/ftdebug.c (ft_log_handler): Fix "-Wunused-parameter" warning.
* include/freetype/ftlogging.h ( FTLOGGING_H_ ): Added Include guard.

    * src/*: Fixed format specifiers.

    * [priyesh]ChangeLog: Fix typo.
2020-08-12 14:47:03 +05:30
Priyeshkkumar 9bd35c7d91 Updated builds/toplevel.mk for builds that don't use ./configure 2020-07-22 16:52:51 +05:30
Priyeshkkumar 1e1912dbac Started working on build process 2020-07-20 18:13:17 +05:30
Priyeshkkumar afa548bb74 Added a flag to toggle ON/OFF the printing of FT_COMPONENT and Timestamp with actual log message 2020-07-13 18:37:34 +05:30
Priyeshkkumar 0c793e381c Added code to print FT_COMPONENT and Time Stamp 2020-07-05 00:33:48 +05:30
Priyeshkkumar bfe6d5218a Added support of callback functions to handle logs outside FreeType 2020-07-04 13:09:33 +05:30
Priyeshkkumar b378812f22 Updates on dynamic change of trace level 2020-07-03 15:00:27 +05:30
Priyeshkkumar fde1c1698d Minor Updates on FT_ERROR part 2020-07-02 22:21:46 +05:30
Priyeshkkumar 1d6ffcc77a Added public APIs to set new/default trace level, started working on Callback function 2020-07-02 19:50:49 +05:30
Priyeshkkumar 52926578db Addded logic to print trace messages to a file 2020-06-30 17:44:52 +05:30
Priyeshkkumar 421bb589e6 Added functions to initialize and un-initialize logging 2020-06-29 21:53:44 +05:30
Werner Lemberg 1658685967 Remove redundant inclusion of `ft2build.h'.
* */*: Remove `#include <ft2build.h>' where possible.

* include/freetype/freetype.h: Remove cpp error about missing
inclusion of `ft2build.h'.
2020-06-13 21:15:45 +02:00
David Turner e13391333f Make macros for header file names optional.
We no longer have to take care of the 8.3 file name limit; this
allows us (a) to introduce longer, meaningful file names, and (b) to
avoid macro names in `#include' lines altogether since some
compilers (most notably Visual C++) doesn't support this properly.

*/*: Replace

   #include FOO_H

with

   #include <freetype/foo.h>

or something similar.  Also update the documentation.
2020-06-08 13:31:55 +02:00
Werner Lemberg e5038be704 Update all copyright notices. 2020-01-19 17:05:19 +01:00
Werner Lemberg 7585997024 Update all copyright notices. 2019-02-23 10:07:09 +01:00
Werner Lemberg f686ad46a3 Update copyright years. 2019-01-22 20:31:44 +01:00
Werner Lemberg c6df41e319 Whitespace. 2018-08-31 20:10:38 +02:00
Werner Lemberg 9a323e4762 * src/base/ftdebug.c (FT_Throw): Restore missing `FT_UNUSED' calls. 2018-08-31 20:09:21 +02:00
Werner Lemberg aff04e91f6 * src/base/ftdebug.c (FT_Throw): Reduce chattiness. 2018-08-31 14:57:36 +02:00
Armin Hasitzka d20dc3928b [errors] Introduce `FT_Error_String'.
* include/freetype/fterrors.h (FT_Error_String),
src/base/fterrors.c (FT_Error_String): Implement `FT_Error_String'.

* src/base/ftbase.c, src/base/Jamfile (_source),
src/base/rules.mk (BASE_SRC): Add `fterrors.c' to the build logic.

* src/base/ftdebug.c (FT_Throw): Use `FT_Error_String'.
2018-08-30 14:09:04 +02:00
Werner Lemberg c8ef0fd07c Fix clang warnings.
* src/base/ftdebug.c (ft_trace_level_enabled,
ft_trace_level_disabled): Add `static' keyword.
2018-08-10 04:44:22 +02:00
Werner Lemberg c9bbc2419a Add internal functions `FT_Trace_Disable' and `FT_Trace_Enable'.
It sometimes makes sense to suppress tracing informations, for
example, if it outputs identical messages again and again.

* include/freetype/internal/ftdebug.h: Make `ft_trace_levels' a
pointer.
(FT_Trace_Disable, FT_Trace_Enable): New declarations.

* src/base/ftdebug.c (ft_trace_levels): Rename to...
(ft_trace_levels_enabled): ... this.
(ft_trace_levels_disabled): New array.
(ft_trace_levels): New pointer.
(FT_Trace_Disable, FT_Trace_Enable): Implement.
(ft_debug_init): Updated.
2018-08-08 18:12:31 +02:00
Werner Lemberg 9ac9060df0 [GSoC] src/*.*: Convert block comments to `light' style.
This monster commit was created by applying Nikhil's scripts
`docconverter.py' and `markify.py' to all C header and source files,
followed up by minor manual clean-up.

No change in functionality, of course.

I used commit f7419907bc6044b9b7057f9789866426c804ba82 from
https://github.com/nikramakrishnan/freetype-docs.git.
2018-06-03 09:08:41 +02:00
Werner Lemberg 0a0c22569d Update copyright year. 2018-01-02 09:33:57 +01:00
Werner Lemberg 068a7a03aa * src/*/*: Only use `ft_' and `FT_' variants of stdc library stuff. 2017-12-18 20:34:05 +01:00
Werner Lemberg 563ae78022 Update copyright year. 2017-01-04 20:16:34 +01:00
Werner Lemberg 9adeab6452 Update copyright year. 2016-01-13 11:54:10 +01:00
Werner Lemberg 392cf22f8a Another adjustment to header locations.
This change is a result of a discussion thread on freetype-devel

  http://lists.nongnu.org/archive/html/freetype-devel/2015-06/msg00041.html

Re-introduce the `freetype2' subdirectory for all FreeType header
files after installation, and rename the `freetype2' subdirectory in
the git repository to `freetype'.

* include/freetype2: Renamed to...
* include/freetype: This.

* CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
PRIVATE_HEADERS): Updated.
Update creation of `ftconfig.h'.
Install generated `ftconfig.h'.

* Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.

* builds/amiga/include/config/ftconfig.h, builds/freetype.mk
(PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
builds/unix/freetype2.in: Updated.

* builds/unix/freetype-config.in: Updated.
* builds/unix/configure.raw: Don't check for `rmdir'.
* builds/unix/unix-def.in (DELDIR): Use `rm -rf', which is portable
according to the autoconf info manual.
* builds/unix/install.mk (install, uninstall,
distclean_project_unix): Update and simplify.

* builds/wince/*, builds/windows/*: Updated.

* devel/ft2build.h, include/ft2build.h: Updated.

* include/freetype2/config/ftheader.h,
include/freetype2/internal/ftserv.h,
include/freetype2/internal/internal.h: Update all header file
macros.

* src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.

* docs/*: Updated.
2015-06-26 06:48:00 +02:00
Werner Lemberg 8502c98b15 Fix Savannah bug #45097.
We no longer `pollute' the namespace of possible header file names;
instead we move `ft2build.h' up by one level so that it gets
installed in the default include directory (e.g.,
/usr/local/include).  After this commit, only `ft2build.h' stays in
the compiler's include path.

No visible changes for the user who follows the standard FreeType
header inclusion rules.

* include/*: Move to ...
* include/freetype2/*: This directory, except `ft2build.h'.

* CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
PRIVATE_HEADERS), Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.

* builds/amiga/include/config/ftconfig.h, builds/freetype.mk
(PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
builds/unix/install.mk (install, uninstall),
builds/unix/freetype2.in: Updated.

* builds/unix/freetype-config.in: Updated.
Emit -I directory only if it is not `/usr/include'.

* builds/wince/*, builds/windows/*: Updated.

* devel/ft2build.h, include/ft2build.h: Updated.

* include/freetype2/config/ftheader.h,
include/freetype2/internal/ftserv.h,
include/freetype2/internal/internal.h: Update all header file
macros.

* src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.

* docs/*: Updated.
2015-06-22 06:35:23 +02:00
Werner Lemberg f57fc59e01 Run `src/tools/update-copyright'. 2015-01-17 20:41:43 +01:00
Werner Lemberg fae3820764 Simplify header file hierarchy.
This large patch changes the header file directory layout from
`include/freetype/...' to `include/...', effectively removing one
level.  Since the file `ft2build.h' is also located in `include'
(and it stays there even after installation), all FreeType header
files are now in a single directory.

Applications that use (a) `freetype-config' or FreeType's
`pkg-config' file to get the include directory for the compiler, and
(b) the documented way for header inclusion like

  #include <ft2build.h>
  #include FT_FREETYPE_H
  ...

don't need any change to the source code.

* include/freetype/*: Move up to...
* include/*: ... this directory.

* builds/amiga/include/freetype/*: Move up to...
* builds/amiga/include/*: ... this directory.

*/*: Essentially do `s@/freetype/@/@' where appropriate.

* CMakeList.txt: Simplify.
* builds/unix/freetype-config.in, builds/unix/freetype2.in: For
`--cflags', return a single directory.
* builds/unix/install.mk (install): No longer try to remove `cache'
and `internal' subdirectories; instead, remove the `freetype'
subdirectory.
2013-11-13 08:55:46 +01:00
Brian Nixon 8d6025c8da Fix Savannah bug #38970.
* src/base/ftdebug.c, builds/win32/ftdebug.c,
builds/wince/ftdebug.c, builds/amiga/src/base/ftdebug.c
(ft_debug_init): Don't read past the environment variable FT2_DEBUG.
2013-05-13 09:06:42 +02:00
Werner Lemberg b114b7c01b Fix Savannah bug #38538.
* builds/amiga/src/base/ftdebug.c, builds/win32/ftdebug.c,
builds/wince/ftdebug.c (FT_Throw): Add function.
2013-03-17 22:42:07 +01:00
Werner Lemberg c58ce3beee Introduce `FT_THROW' macro.
The idea is to replace code like

  return FT_Err_Foo_Bar;

or

  return CFF_Err_Foo_Bar;

with

  return FT_THROW( Foo_Bar );

The FT_THROW macro has two functions:

  . It hides the module specific prefix.

  . In debug mode, it calls the empty function `FT_Throw' which can
    be thus used to set a breakpoint.

* include/freetype/internal/ftdebug.h (FT_THROW): New macro.
(FT_Throw): New prototype.
* src/base/ftdebug.c (FT_Throw): New function.
2013-03-13 11:06:39 +01:00
Werner Lemberg 02197280b4 Formatting. 2008-11-29 09:31:44 +00:00
Werner Lemberg 16dc51feae * src/base/ftdebug.c (FT_Message, FT_Panic): Send output to stderr.
This fixes Savannah bug #23280.

* docs/CHANGES: Updated.

Some formatting.
2008-05-18 17:36:15 +00:00
Wu, Chia-I (吳佳一) 35bfc0f1b9 * src/base/ftcalc.c (FT_MulTo64): Commented out.
* include/freetype/internal/ftcalc.h (FT_SqrtFixed), src/base/ftcalc.c
(FT_SqrtFixed), include/freetype/internal/ftdebug.h
(FT_Trace_Get_Count, FT_Trace_Get_Name, FT_Message, FT_Panic),
src/base/ftdebug.c (FT_Trace_Get_Count, FT_Trace_Get_Name, FT_Message,
FT_Panic), include/freetype/internal/ftobjs.h (FT_New_Memory,
FT_Done_Memory), include/freetype/internal/ftstream.h
(FT_Stream_Open), src/base/ftsystem.c (FT_New_Memory, FT_Done_Memory,
FT_Stream_Open): s/FT_EXPORT/FT_BASE/.

* builds/exports.mk: Manually add TT_New_Context to EXPORTS_LIST too.
2005-11-17 01:53:07 +00:00
Werner Lemberg ece8b20e6c Documentation updates, whitespace. 2004-12-13 23:16:59 +00:00
Werner Lemberg 92c9f105d7 * src/base/ftdebug.c (ft_debug_init): Highest debug level is 7,
not 6.
2004-09-04 06:53:36 +00:00
David Turner 10bf05a31d * src/cff/cffobjs.c (cff_face_init): fixed a small memory leak
* src/autofit/afloader.c, src/autofit/afmodule.c, src/base/ftdebug.c:
        removed compiler warnings

        * src/autofit/aftypes.h, src/lzw/zopen.c, src/pcf/pcfdrivr.c,
        src/pcf/pcfread.c, src/psaux/psobjs.c, src/type42/t42drivr.c:
        changed data arrays to "const" to avoid populating the ".data"
        segment
2004-04-21 14:30:37 +00:00
Werner Lemberg 391de1a63e * src/lzw/ftlzw.c: Include zopen.h dependent on
FT_CONFIG_OPTION_USE_LZW.

* src/base/ftdebug.c: s/index/idx/ to avoid compiler warnings.
2004-04-11 16:44:54 +00:00
Werner Lemberg 460355a5ea * docs/CHANGES: Updated.
* include/freetype/internal/ftdebug.h: Include FT_FREETYPE_H.


Provide a simple API to control FreeType's tracing levels.

* include/freetype/internal/ftdebug.h (FT_Trace_Get_Count,
FT_Trace_Get_Name): New declarations.

* src/base/ftdebug.c (FT_Trace_Get_Count, FT_Trace_Get_Name): New
functions.
2004-02-24 07:52:45 +00:00
Werner Lemberg 68e9f92710 * src/sfnt/ttpost.c (load_post_names, tt_face_free_ps_names,
tt_face_get_ps_name): Replace switch statement with if clauses to
make it more portable.

* src/cff/cffobjs.c (cff_face_init): Ditto.

* include/freetype/ftmodule.h (FT_Module_Class): Use `FT_Long' for
`module_size'.
* include/freetype/ftrender.h (FT_Glyph_Class_): Use `FT_Long' for
`glyph_size'.

* src/base/ftobjs.c (FT_Render_Glyph): Change second parameter to
`FT_Render_Mode'.
(FT_Render_Glyph_Internal): Change third parameter to
`FT_Render_Mode'.
* src/base/ftglyph.c (FT_Glyph_To_Bitmap): Change second parameter
to `FT_Render_Mode'.

* src/raster/ftrend1.c (ft_raster1_render): Change third parameter
to `FT_Render_Mode'.
* src/smooth/ftsmooth.c (ft_smooth_render, ft_smooth_render_lcd,
ft_smooth_render_lcd_v): Ditto.
(ft_smooth_render_generic): Change third and fifth parameter to
`FT_Render_Mode'.

* include/freetype/freetype.h, include/freetype/internal/ftobjs.h,
include/freetype/ftglyph.h: Updated.

* src/cff/cffdrivr.c (Load_Glyph), src/pcf/pcfdriver.c
(PCF_Glyph_Load), src/pfr/pfrobjs.c (pfr_slot_load),
src/winfonts/winfnt.c (FNT_Load_Glyph), src/t42/t42objs.c
(T42_GlyphSlot_Load), src/bdf/bdfdrivr.c (BDF_Glyph_Load): Change
fourth parameter to `FT_Int32'.

* src/pfr/pfrobjs.c (pfr_face_init): Add two missing parameters
and declare them as unused.

* src/cid/cidparse.h (CID_Parser): Use FT_Long for `postscript_len'.

* src/psnames/psnames.h (PS_Unicode_Value_Func): Change return
value to FT_UInt32.
* src/psnames/psmodule.c (ps_unicode_value, ps_build_unicode_table):
Updated accordingly.

* src/cff/cffdrivr.c (Get_Kerning): Use FT_Long for `middle'.
(cff_get_glyph_name): Use cast for result of ft_strlen.
* src/cff/cffparse.c (cff_parse_real): User cast for assigning
`exp'.
* src/cff/cffload.c (cff_index_get_pointers): Use FT_ULong for
some local variables.
(cff_charset_load, cff_encoding_load): Use casts to FT_UInt for some
switch statements.
(cff_font_load): Use cast in call to CFF_Load_FD_Select.
* src/cff/cffobjs.c (cff_size_init): Use more casts.
(cff_face_init): Use FT_Int32 for `flags'.
* src/cff/cffgload.c (cff_operator_seac): Use cast for assigning
`adx' and `ady'.
(cff_decoder_parse_charstrings): Use FT_ULong for third parameter.
Use more casts.
* src/cff/cffcmap.c (cff_cmap_unicode_init): Use cast for `count'.

* src/cid/cidload.c (cid_read_subrs): Use FT_ULong for `len'.
* src/cid/cidgload.c (cid_load_glyph): Add missing cast for
`cid_get_offset'.

* src/psaux/t1decode.c (t1_decoder_parse_charstrings) <18>: Use
cast for `num_points'.
(t1_decoder_init): Use cast for assigning `decoder->num_glyphs'.

* src/base/ftdebug.c (ft_debug_init): Use FT_Int.
* include/freetype/internal/ftdriver.h (FT_Slot_LoadFunc): Use
`FT_Int32' for fourth parameter.
* src/base/ftobjs.c (open_face): Use cast for calling
clazz->init_face.

* src/raster/ftraster.c (Set_High_Precision): Use `1' instead of
`1L'.
(Finalize_Profile_Table, Line_Up, ft_black_init): Use casts.
* src/raster/ftrend1.c (ft_raster1_render): Ditto.

* src/sfnt/sfnt_dir_check: Compare `magic' with unsigned long
constant.

* builds/amiga/include/freetype/config/ftmodule.h: Updated.
2002-09-27 11:09:23 +00:00
David Turner ee06410b0a * src/pshinter/pshglob.c: fixed a bug that prevented the hinter from using
correct standard width and height values. resulting in hinting bugs with
    certain fonts (e.g. Utopia)
2002-07-09 16:49:12 +00:00
David Turner 02c3aede1b * docs/DEBUG.TXT: adding debugging support documentation
* src/base/ftdebug.c (ft_debug_init), builds/win32/ftdebug.c
    (ft_debug_init), builds/amiga/src/ftdebug.c (ft_debug_init): changed the
    syntax of the FT2_DEBUG environment variable  used to control debugging
    output (i.e. logging and error messages). It must now look like:

       any:6 memory:4 io:3   or
       any:6,memory:4,io:3   or
       any:6;memory:4;io:3
2002-07-08 23:02:32 +00:00
David Turner 88027fdde4 fixing typo preventing compilation in non-debugging modes 2002-04-17 11:32:10 +00:00