summaryrefslogtreecommitdiff
path: root/src/FreeType
Commit message (Collapse)AuthorAgeFilesLines
* Fix spelling/wording issuesAlan Coopersmith2022-04-062-4/+4
| | | | | | | Found by using: codespell --builtin clear,rare,usage,informal,code,names Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Convert multiplying malloc calls to use mallocarray insteadAlan Coopersmith2019-08-041-3/+3
| | | | | | | Introduces mallocarray as a macro calling reallocarray with a NULL pointer for the old allocation. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Convert multiplying realloc calls to use reallocarray insteadAlan Coopersmith2019-08-031-1/+1
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Use bounds checking string functions everywhereAlan Coopersmith2019-08-032-17/+18
| | | | | | | | Replace strcpy, strcat, sprintf with strlcpy, strlcat, snprintf everywhere, even where there were already bounds checks in place, to reduce time spent checking static analysis results. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* freetype: Fix a logic error in computing face nameAdam Jackson2016-06-101-1/+0
| | | | | | | | | gcc6 chirps an indentation warning here, but really this is bad code. Effectively this would ignore en_US or en_UK names for the font, despite that those are the English names the font is most likely to have. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* FreeType: Correct an allocation sizeJeremy Huddleston Sequoia2016-05-291-1/+1
| | | | | | | | | | | Found by clang static analysis: Result of 'calloc' is converted to a pointer of type 'int', which is incompatible with sizeof operand type 'int *' This is likely benign because the old size was larger on any platform where sizeof(int) <= sizeof(void *), which is everywhere. Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
* Convert to non-recursive build.Matt Turner2015-12-091-15/+0
|
* Eliminate calls back to X server or font server functions by name (v4)libXfont2-2.0.0Keith Packard2015-12-085-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | This eliminates the weak symbol adventures and makes all of the calls back to the X server or Font server go through a table of functions instead, clarifying the required API. As this is a rather major change to the API for the library, it now installs itself as libXfont2 instead of libXfont, and the package config file is now xfont2.pc. All of the installed headers remain the same as the original library; there's now a new include file, libxfont2.h, which defines the X server and Font server interfaces. This moves util/atom.c to stubs/atom.c and reformats that file, hence the diff being larger than it would otherwise be. v2: Rename to libXfont2 instead of libXfont_2 as suggested by Emil Velikov Fix whitespace in stubs/atom.c, which was moved from util/ v3: Remove select masks from API. Expose single 'font_init' function for all library initialization. v4: Change name of distributed tarballs to libXfont2 as well Signed-off-by: Keith Packard <keithp@keithp.com>
* Add compiler warning flags and fix warningsKeith Packard2015-12-081-6/+6
| | | | | | Mostly signed vs unsigned comparisons Signed-off-by: Keith Packard <keithp@keithp.com>
* Fix is*() usage.Thomas Klausner2015-10-202-4/+4
| | | | | | | | | The argument must be an unsigned char or -1; in these cases we know it's not -1 so cast it to unsigned char. Fixes warning: array subscript is of type 'char' [-Wchar-subscripts] Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
* Fix buffer read overrunPeter Harris2014-04-111-1/+1
| | | | | | | | "FreeType" is only eight bytes long. The atom "FreeType\x00\x??" is probably not what the author intended. Signed-off-by: Peter Harris <pharris@opentext.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Warning fixes.Keith Packard2014-01-291-0/+2
| | | | | | | | | | | | | | | | | Many const char issues. One extra 'i' declared in ScaleFont; we can just use the same 'i' as exists at the top level scope. Also ignore bad-function-cast in ftfuncs.c and bitscale.c because we're casting the return value from floor or ceil from double to int. As floor and ceil are kinda designed to generate integer results, it's pretty clear that we're doing what we want and that the compiler is generating noise. I'm not sure why bad-function-cast is ever a good warning to turn on, but I'll leave that for another day. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
* Remove redundant setting of 'len' in SPropRecValList_add_by_font_capAlan Coopersmith2014-01-081-1/+0
| | | | | | | | | Found by cppcheck 1.63: [FreeType/xttcap.c:621] -> [FreeType/xttcap.c:624]: (performance) Variable 'len' is reassigned a value before the old one has been used. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
* Don't leak old allocation if realloc fails to enlarge itAlan Coopersmith2013-12-131-3/+6
| | | | | | | | | | | | | | | | | | | | | In ftfuncs.c, since the buffer being reallocated is a function local buffer, used to accumulate data for a single run of the function and then freed at the end of the function, we just free the old buffer if realloc fails. In atom.c however, the ReverseMap is a static buffer, so we operate in temporary variables until we know we're successful, then update the static variables. If we fail, we leave the old static variables in place, since they contain data about previous atoms we should maintain, not lose. Reported by cppcheck: [lib/libXfont/src/FreeType/ftfuncs.c:2122]: (error) Common realloc mistake: 'ranges' nulled but not freed upon failure [lib/libXfont/src/util/atom.c:126]: (error) Common realloc mistake: 'reverseMap' nulled but not freed upon failure Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
* Replace malloc(strlen)+strcpy/strcat calls with strdupAlan Coopersmith2013-11-012-5/+2
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* xstrdup -> strdupAlan Coopersmith2013-11-013-31/+2
| | | | | | | Missed in xalloc -> malloc etal conversion in 0cdc9b8f850342 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
* Replace deprecated Automake INCLUDES variable with AM_CPPFLAGSbaserock/morphAlan Coopersmith2013-01-161-3/+3
| | | | | | | | | | | | | | Excerpt https://lists.gnu.org/archive/html/automake/2012-12/msg00038.html - Support for the long-deprecated INCLUDES variable will be removed altogether in Automake 1.14. The AM_CPPFLAGS variable should be used instead. This variable was deprecated in Automake releases prior to 1.10, which is the current minimum level required to build X. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
* Add const attributes to fix gcc -Wwrite-strings warningsAlan Coopersmith2011-11-112-4/+4
| | | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
* Fix empty statement in if conditional.Joerg Sonnenberger2011-09-181-1/+1
| | | | | | | Assume for a moment that the intention here is to do something useful. Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
* Strip trailing whitespaceAlan Coopersmith2011-09-166-180/+180
| | | | | | | Performed with: find * -type f | xargs perl -i -p -e 's{[ \t]+$}{}' git diff -w & git diff -b show no diffs from this change Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Purge cvs tags.Jesse Adkins2010-10-067-11/+0
| | | | | Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* FreeType: Cleanup MUMBLE and fix printing of XLFD in debug spew.Jeremy Huddleston2010-09-272-20/+10
| | | | Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
* Janitor: make distcheck and .gitignorePaulo Cesar Pereira de Andrade2009-01-291-6/+0
| | | | | Distribute ChangeLog but not autogen.sh. Use a single toplevel .gitignore file, instead of one per subdirectory.
* Remove some strcasecmp sillinessAdam Jackson2009-01-201-4/+0
|
* Allow case insensitive filename matching in fontfile.Adam Jackson2009-01-201-16/+0
| | | | Simplify the freetype renderer list to match.
* xalloc -> malloc, etc.Adam Jackson2009-01-202-72/+58
|
* libXfont ansification and removal of xf86_ansic.h dependencyPaulo Cesar Pereira de Andrade2008-12-195-46/+0
| | | | | | | | | | | | | Basically the code is now compiled as if FONTMODULE was never defined, but also removed some "magic" defining _XOPEN_SOURCE before including math.h. Also removed some #if 0'ed code instead of fixing prototypes inside the "dead code". Changes to spdo_prv.h were due to defines like: <hash>define foo() sp_foo() that would not compile with the ansification in the format: type foo(void) due to the macro receiving "void" as an argument.
* Don't clobber CFLAGS in configureJulien Cristau2008-11-041-1/+1
| | | | This lets the user set CFLAGS when running make.
* Do not call FT_Get_BDF_Charset_ID() if configured with --disable-bdfformatMaarten ter Huurne2008-06-281-0/+4
| | | | | | | | | | | | | When I configure libXfont-1.3.2 with --disable-bdfformat and link it against FreeType that is built without BDF support, I get the following link error: libXfont.so: undefined reference to ‘FT_Get_BDF_Charset_ID’ I fixed it by checking XFONT_BDFFORMAT and if BDF support is disabled, the call to FT_Get_BDF_Charset_ID() is omitted and the result code is set as if the call had failed. Signed-off-by: James Cloos <cloos@jhcloos.com>
* Add missing include in src/FreeType/ftfuncs.cJulien Cristau2008-03-071-0/+1
| | | | | | Fixes compiler warning: ../../../src/FreeType/ftfuncs.c: In function 'restrict_code_range_by_str': ../../../src/FreeType/ftfuncs.c:2081: warning: implicit declaration of function 'isspace'
* ftsystem.c is not needed anymore.Matthieu Herrb2007-10-182-333/+0
|
* Kill unused macro definition.Matthieu Herrb2007-08-251-7/+0
|
* Dead code cull from FreeType.Adam Jackson2007-06-074-256/+158
|
* Death to open-coded strcasecmp.Adam Jackson2007-06-071-49/+16
| | | | Seriously, if you don't already have this, you've already lost.
* renamed: .cvsignore -> .gitignoreAlan Coopersmith2006-07-131-0/+0
|
* Bug #7397: Fix a buffer overflow in Freetype font support.Matthieu Herrb2006-07-131-3/+4
|
* Bug #6918: remove dependencies on Freetype internal headers. As of 2.2Jie Luo2006-07-063-25/+143
| | | | Freetype no longer installs them.
* Bug #4721: Fix crash when using Freetype 2.1.10. (Michael Gor)Adam Jackson2005-10-231-1/+2
|
* Include missing filesKevin E Martin2005-10-051-0/+2
|
* Fix distchecksKevin E Martin2005-07-231-0/+1
|
* Change include dir now that public headers are referenced byKevin E Martin2005-07-101-1/+1
| | | | <X11/fonts/*.h>
* Rearrange configuration options so that individual font file formats driveKeith Packard2005-07-091-1/+2
| | | | | | | | combined options, and so that the default matches the monolithic defaults Extent fontconf.h to cover all formats Typo in src/Makefile.am failed to link in Type1 library Missing xttcap.c from FreeType shim library.
* Include config.h in every source file to make sure necessary options areKeith Packard2005-07-095-1/+16
| | | | found when building in the modular tree
* Add .cvsignore files Switch _la_CFLAGS for AM_CFLAGS to clean up directoryKeith Packard2005-07-092-3/+3
|
* Bug #2901 <https://bugs.freedesktop.org/show_bug.cgi?id=2901> Patch #2332Alan Coopersmith2005-07-071-0/+4
| | | | | | | <https://bugs.freedesktop.org/attachment.cgi?id=2332> This patch avoids 79 gcc-3.4.3 warnings 'xxx' declared `static' but never defined mostly due to including "ftfuncs.h" with the declaration of static functions defined in "ftfuncs.c". (Peter Breitenlohner)
* Add Xtrans definitions (FONT_t, TRANS_CLIENT) to clean up warnings.Daniel Stone2005-07-034-11/+11
| | | | | | | | Add XSERV_t, TRANS_SERVER, TRANS_REOPEN to quash warnings. Add #include <dix-config.h> or <xorg-config.h>, as appropriate, to all source files in the xserver/xorg tree, predicated on defines of HAVE_{DIX,XORG}_CONFIG_H. Change all Xfont includes to <X11/fonts/foo.h>.
* Add suitable .cvsignore filesKeith Packard2005-07-021-0/+6
|
* Reference X11/fonts header files using X11/fonts/ prefix.XORG-6_8_99_9XORG-6_8_99_10Josh Triplett2005-05-273-3/+3
|
* Add Xfont.Josh Triplett2005-05-271-0/+13
|
* //freedesktop.org/bugzilla/show_bug.cgi?id=1767): Fixing build bustage inRoland Mainz2004-11-031-3/+1
| | | | | xc/programs/bdftopcf/ due missing `FT_STREAM_SEEK'/`FT_STREAM_POS' symbols.