summaryrefslogtreecommitdiff
path: root/src/winfonts
Commit message (Collapse)AuthorAgeFilesLines
* Whitespace.Werner Lemberg2022-04-011-2/+2
|
* * src/winfonts/winfnt.c (fnt_face_get_dll_font): Trace font resources.Alexei Podtelezhnikov2022-02-031-0/+4
|
* Update all copyright notices.Werner Lemberg2022-01-115-5/+5
|
* [bdf, cid, pfr, winfonts] Improve rejection of other font formats.Werner Lemberg2021-10-191-0/+7
| | | | | | | | | | | | | | This is mainly for better diagnostics of malformed fonts. * src/bdf/bdflib.c (_bfd_readstream): Stop font format testing if the first input line is too long or doesn't end with `\r` or `\n`. * src/cid/cidparse.c (cid_parser_new): Don't handle too short input as an error but as an unknown format. * src/pfr/pfrobjs.c (pfr_face_init): Ditto. * src/winfonts/winfnt.c (fnt_font_load, fnt_face_get_dll_font): Ditto.
* * src/winfonts/winfnt.c (FNT_Face_Init): Correct reallocation.Alexei Podtelezhnikov2021-09-281-3/+4
|
* Use NULL for pointers only.Alexei Podtelezhnikov2021-09-231-1/+1
| | | | | | | * src/bdf/bdflib.c (*): Code changes. * include/freetype/freetype.h: Comments only. * src/cff/cffload.c, src/cff/cffobjs.c: Ditto. * src/winfonts/winfnt.c: Ditto.
* * src/winfonts/winfnt.c (FNT_Face_Init): Tweak memory macro.Alexei Podtelezhnikov2021-04-261-1/+1
|
* [pcf,bdf,winfonts] s/FT_ALLOC/FT_QALLOC/ for initialized buffers.Alexei Podtelezhnikov2021-04-231-2/+2
| | | | | | * src/pcf/pcfread.c (pcf_interpret_style): Do not zero out the buffer. * src/bdf/bdfdrivr.c (bdf_interpret_style): Ditto. * src/winfonts/winfnt.c (FNT_Face_Init, FNT_Load_Glyph): Ditto.
* * src/*: Don't use more than one '\n' in `FT_TRACE` and `FT_ERROR`.Werner Lemberg2021-02-041-4/+4
| | | | | | | | This ensures good logging output, with all lines having a proper prefix (if requested). This is a continuation of a similar patch from 2020-12-02, which missed some locations.
* Update all copyright notices.Werner Lemberg2021-01-175-5/+5
|
* Remove redundant inclusion of `ft2build.h'.Werner Lemberg2020-06-132-2/+0
| | | | | | | * */*: Remove `#include <ft2build.h>' where possible. * include/freetype/freetype.h: Remove cpp error about missing inclusion of `ft2build.h'.
* Make macros for header file names optional.David Turner2020-06-083-11/+11
| | | | | | | | | | | | | | | | | 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.
* Remove Jamfile files from the tree.David Turner2020-05-181-16/+0
| | | | | | | | These have not been used in a very, very long time, so better remove them. A corresponding patch will be submitted to the `freetype2-demos' repository. * src/Jamfile, src/*/Jamfile, Jamrules: Delete.
* Update all copyright notices.Werner Lemberg2020-01-196-6/+6
|
* [sfnt, winfonts] Avoid memory leaks in case of error (#56587).Werner Lemberg2019-07-121-1/+5
| | | | | | | * src/sfnt/sfwoff.c (woff_open_font): Call `FT_FRAME_EXIT' in case of error. * src/winfonts/winfnt.c (fnt_face_get_dll_font): Ditto.
* Update all copyright notices.Werner Lemberg2019-02-236-6/+6
|
* Update copyright years.Werner Lemberg2019-01-226-6/+6
|
* Remove unused fields.Alexei Podtelezhnikov2018-09-181-3/+0
| | | | | | * src/pcf.h (PCF_FaceRec): Remove `charmap' and `charmap_handle'. * src/bdfdrvr.h (BDF_FaceRec): Ditto. * src/winfonts/winfnt.h (FNT_FaceRec): Ditto.
* Don't use `trace_' prefix for FT_COMPONENT arguments.Werner Lemberg2018-08-151-1/+1
| | | | | | | | * include/freetype/internal/ftdebug.h (FT_TRACE_COMP, FT_TRACE_COMP_): New auxiliary macros to add `trace_' prefix. (FT_TRACE): Use `FT_TRACE_COMP'. */* (FT_COMPONENT): Updated.
* [GSoC] src/*.*: Convert block comments to `light' style.Werner Lemberg2018-06-033-69/+69
| | | | | | | | | | | 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.
* Remove FT_CONFIG_OPTION_PIC and related code.Werner Lemberg2018-05-021-3/+0
| | | | | | | | | | | | | | | | | */* [FT_CONFIG_OPTION_PIC]: Remove all code guarded by this preprocessor symbol. */*: Replace `XXX_GET' macros (which could be either a function in PIC mode or an array in non-PIC mode) with `xxx' arrays. * include/freetype/internal/ftpic.h, src/autofit/afpic.c, src/autofit/afpic.h, src/base/basepic.c, src/base/basepic.h, src/base/ftpic.c, src/cff/cffpic.c, src/cff/cffpic.h, src/pshinter/pshpic.c, src/pshinter/pshpic.h, src/psnames/pspic.c, src/psnames/pspic.h, src/raster/rastpic.c, src/raster/rastpic.h, src/sfnt/sfntpic.c, src/sfnt/sfntpic.h, src/smooth/ftspic.c, src/smooth/ftspic.h, src/truetype/ttpic.c, src/truetype/ttpic.h: Removed.
* Update copyright year.Werner Lemberg2018-01-026-6/+6
|
* Swap `ALLOC_MULT' arguments (#51833).Alexei Podtelezhnikov2017-08-251-1/+1
| | | | | | * src/base/ftbitmap.c (ft_bitmap_assure_buffer): Updated. * src/winfonts/winfnt.c (FNT_Load_Glyph): Updated. * src/raster/ftrend1.c (ft_raster1_render): Updated.
* * src/winfonts/winfnt.c (FNT_Face_Init): Don't set active encoding.Werner Lemberg2017-06-141-4/+0
| | | | FreeType only sets a default active encoding for Unicode.
* Update copyright year.Werner Lemberg2017-01-046-6/+6
|
* */*: Use hex numbers for errors in tracing messages.Werner Lemberg2017-01-011-1/+1
|
* Introduce a way of quickly retrieving (embedded) bitmap metrics.Werner Lemberg2016-11-061-21/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `FT_Load_Glyph' doesn't generate a bitmap for a non-bitmap glyph until the user calls `FT_Render_Glyph'. However, it always allocates memory for bitmaps and copies or decodes the contents of a bitmap glyph, which can be quite slow for PNG data. * include/freetype/freetype.h (FT_LOAD_BITMAP_METRICS_ONLY): New macro. * src/base/ftobjs.c (FT_Load_Glyph): Unset FT_LOAD_RENDER if FT_LOAD_BITMAP_METRICS_ONLY is used. * src/sfnt/ttsbit.c (tt_sbit_decoder_alloc_bitmap, tt_sbit_decoder_load_bitmap): Add argument to control allocation of the glyph slot. (tt_sbit_decoder_load_image, tt_sbit_decoder_load_compound, tt_face_load_sbit_image): Updated. * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Quickly exit if `FT_LOAD_BITMAP_METRICS_ONLY' is set. * src/pfr/pfrsbit.c, src/pfr/pfrsbit.h (pfr_slot_load_bitmap): Add argument to control allocation of the glyph slot. * src/pfr/pfrobjs (pfr_slot_load): Updated. * src/winfonts/winfnt.c (FNT_Load_Glyph): Ditto. * docs/CHANGES: Updated.
* s/0/NULL/ for function pointers; comments, formatting.Werner Lemberg2016-09-171-10/+10
|
* [winfonts] Avoid zero bitmap width and height.Werner Lemberg2016-08-131-1/+10
| | | | | | | | | Reported as https://bugzilla.mozilla.org/show_bug.cgi?id=1272173 * src/winfonts/winfnt.c (FNT_Face_Init): Check zero pixel height. (FNT_Load_Glyph): Check for zero pitch.
* Update copyright year.Werner Lemberg2016-01-136-6/+6
|
* Don't use macro names that contain `__' [1/2].Werner Lemberg2016-01-122-7/+7
| | | | | | Such macro names are reserved for both C and C++. */*: Replace macros of the form `__XXX_H__' with `XXX_H_'.
* Comments.Werner Lemberg2015-10-301-1/+1
|
* Comments.Werner Lemberg2015-10-191-16/+16
|
* [winfonts] Check alignment shift count for resource data (#45938).Werner Lemberg2015-09-131-0/+15
| | | | * src/winfonts/winfnt.c (fnt_face_get_dll_font): Implement it.
* [truetype] Introduce named instance access to GX fonts.Werner Lemberg2015-08-131-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For functions querying a face, bits 16-30 of the face index can hold the named instance index if we have a GX font. The indices start with value 1; value 0 indicates font access without GX variation data. * include/freetype/freetype.h (FT_FaceRec): Update documentation. * include/freetype/internal/sfnt.h: Ditto. * src/sfnt/sfobjs.c (sfnt_init_face) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Get number of named instances and do argument checks. (sfnt_load_face): Updated. * src/truetype/ttobjs.c (tt_face_init) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Use named instance, overwriting the style name. * src/base/ftobjs.c (open_face_from_buffer, open_face_PS_from_sfnt_stream): Updated. * src/bdf/bdfdrivr.c (BDF_Face_Init): Updated. * src/cff/cffload.c (cff_font_load): Updated. * src/cff/cffobjs.c (cff_face_init): Make function exit early for pure CFF fonts if `font_index < 0'. Updated. * src/cid/cidobjs.c (cid_face_init): Updated. * src/pcf/pcfdrivr.c (PCF_Face_Init): Updated. * src/pfr/pfrobjs.c (pfr_face_init): Updated. * src/type1/t1objs.c (T1_Face_Init): Updated. * src/type42/t42objs.c (T42_Face_Init): Updated. * src/winfonts/winfnt.c (fnt_face_get_dll_font, FNT_Face_Init): Updated. * docs/CHANGES: Updated.
* [cff,cid,pfr,sfnt,winfonts] NULL.Alexei Podtelezhnikov2015-04-151-2/+2
|
* Rename `svxf86nm.h' to `svfntfmt.h'; update related symbols.Werner Lemberg2015-03-111-3/+3
| | | | | | | | | | | | | | | * include/internal/ftserv.h (FT_SERVICE_XFREE86_NAME_H): Renamed to... (FT_SERVICE_FONT_FORMAT_H): This. * include/internal/services/svfntfmt.h (FT_XF86_FORMAT_*): Renamed to ... (FT_FONT_FORMAT_*): This. src/base/ftfntfmt.c, src/bdf/bdfdrivr.c, src/cff/cffdrivr.c, src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/pfr/pfrdrivr.c, src/truetype/ttdriver.c, src/type1/t1driver.c, src/type42/t42drivr.c, src/winfonts/winfnt.c: Updated.
* * src/winfonts/winfnt.c: Signedness fixes.Werner Lemberg2015-02-211-19/+19
|
* Run `src/tools/update-copyright'.Werner Lemberg2015-01-176-6/+6
|
* Fix Savannah bug #43976.Werner Lemberg2015-01-121-1/+4
| | | | | | | | | | | | | Assure that FreeType's internal include directories are found before `CPPFLAGS' (which might be set by the user in the environment), and `CPPFLAGS' before `CFLAGS'. * builds/freetype.mk (FT_CFLAGS): Don't add `INCLUDE_FLAGS'. (FT_COMPILE): Make this a special variable for compiling only the files handled in `freetype.mk'. (.c.$O): Removed, unused. * src/*/rules.mk (*_COMPILE): Fix order of include directories.
* Uppercase all hex digits for orthogonality.Werner Lemberg2014-12-071-5/+5
|
* */*: s/Invalid_Argument/Invalid_Face_Handle/ where appropriate.Werner Lemberg2014-11-251-1/+1
|
* [cff, pfr, psaux, winfonts] Fix Savannah bug #43676.Jarkko Pöyry2014-11-241-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Don't cast cmap init function pointers to an incompatible type. Without this patch, the number of parameters between declaration and the real signature differs. Calling such a function results in undefined behavior. ISO/IEC 9899:TC3 (Committee Draft September 7, 2007) 6.5.2.2 Function calls 9 If the function is defined with a type that is not compatible with the type (of the expression) pointed to by the expression that denotes the called function, the behavior is undefined. On certain platforms (c -> js with emscripten) this causes termination of execution or invalid calls because in the emscripten implementation, function pointers of different types are stored in different pointer arrays. Incorrect pointer type here results in indexing of an incorrect array. * src/cff/cffcmap.c (cff_cmap_encoding_init, cff_cmap_unicode_init), src/pfr/pfrcmap.c (pfr_cmap_init), src/psaux/t1cmap.c t1_cmap_standard_init, t1_cmap_expert_init, t1_cmap_custom_init, t1_cmap_unicode_init), src/winfonts/winfnt.c (fnt_cmap_init): Fix signature.
* [winfnt] Fix Savannah bug #41694.Werner Lemberg2014-02-261-5/+15
| | | | * src/winfonts/winfnt.c (FNT_Load_Glyph): Check glyph offset.
* Fix Savannah bug #40997.Werner Lemberg2013-12-251-2/+2
| | | | | | | | | | | | | * src/bdf/bdfdrivr.c (BDF_Face_Init): Only use OR operator to adjust face flags since FT_FACE_FLAG_EXTERNAL_STREAM might already be set. * src/cff/cffobjs.c (cff_face_init): Ditto. * src/cid/cidobjs.c (cid_face_init): Ditto. * src/pcf/pcfread.c (pcf_load_font): Ditto. * src/pfr/pfrobjs.c (pfr_face_init): Ditto. * src/type1/t1objs.c (T1_Face_Init): Ditto. * src/type42/t42objs.c (T42_Face_Init): Ditto. * src/winfonts/winfnt.c (FNT_Face_Init): Ditto.
* Better tracing of loaded glyphs.Werner Lemberg2013-08-261-0/+2
| | | | | | | | | | | | | | | | | | | | Previously, the loading of a glyph was traced at level 4, if at all. With this change, all font loading routines emit a tracing message at level 1, making it easier to select tracing output (for example using F2_DEBUG="any:1 afhints:7 aflatin:7"). * src/bdf/bdfdrivr.c (BDF_Glyph_Load): Add tracing message. * src/cff/cffdrivr.c (cff_glyph_load): Ditto. * src/cff/cffgload.c (cff_decoder_prepare): Improve tracing messages. * src/cid/cidgload.c (cid_load_glyph): Use level 1 for tracing message. * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Ditto. * src/pfr/pfrobjs.c (pfr_slot_load): Add tracing message. * src/truetype/ttgload.c (TT_Load_Glyph): Ditto. * src/type1/t1gload.c (T1_Load_Glyph): Ditto. * src/type42/t42objs.c (T42_GlyphSlot_Load): Ditto. * src/winfonts/winfnt.c (FNT_Load_Glyph): Ditto.
* * src/winfonts/winfnt.c (FNT_Load_Glyph): Fix bitmap width guard.Werner Lemberg2013-06-271-1/+1
|
* */* [FT_CONFIG_OPTION_OLD_INTERNALS]: Remove macro and guarded code.Werner Lemberg2013-05-101-4/+0
|
* */*: Use FT_ERR_EQ, FT_ERR_NEQ, and FT_ERR where appropriate.Werner Lemberg2013-03-141-4/+4
| | | | | FT_Err_XXX and friends are no longer directly used in the source code.
* */*: Use FT_Err_Ok only.Werner Lemberg2013-03-141-4/+4
| | | | This is a purely mechanical conversion.