summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-08-18Require xproto >= 7.0.22 for _X_UNUSEDHEADmasterAlan Coopersmith1-1/+1
Since _X_UNUSED is only used in source code, not exported headers, the version requirement is only set in configure.ac, not xft.pc. Fixes: 4dadf0e ("quiet unused-parameter warnings with _X_UNUSED") Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxft/-/merge_requests/32>
2024-08-18Remove support for building with pre-C89 versions of CAlan Coopersmith1-8/+0
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxft/-/merge_requests/32>
2024-08-18Remove support for building with pre-X11R7 versions of XAlan Coopersmith2-15/+0
Other parts of the code already required later versions of X, so this is just cleaning out #ifdef cases that can never be hit anymore. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxft/-/merge_requests/32>
2024-08-15fix potential buffer overrun in _XftGlyphDefaultPeter Harris1-1/+1
Initialize `nmissing` so that XftFontCheckGlyph does not write past the end of the `missing` array if a glyph is missing. Signed-off-by: Peter Harris <pharris2@rocketsoftware.com>
2024-04-06issue 21: remove redundant/out-of-place prototype for XftNameUnparseThomas E. Dickey1-7/+0
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2023-05-01build-fix for older versions of freetype2: FT_HAS_SVG was added late in 2021Thomas E. Dickey1-0/+4
2023-04-30issue 19: Problem loading "SourceCodePro-Regular" font in FedoraThomas E. Dickey1-1/+1
Ignore face flag FT_FACE_FLAG_COLOR if FT_FACE_FLAG_SVG is set, allowing adobe-source-code-pro font to work. This bug was introduced by a change in freetype2 #1151, 62bc04f4c5b4369cc493ff24b1de27aabd79e0c6 Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2023-04-17libXft 2.3.8libXft-2.3.8Matt Turner1-1/+1
Signed-off-by: Matt Turner <mattst88@gmail.com>
2023-03-04configure: Use LT_INIT from libtool 2 instead of deprecated AC_PROG_LIBTOOLAlan Coopersmith1-1/+2
AC_PROG_LIBTOOL was replaced by LT_INIT in libtool 2 in 2008, so it's time to rely on it. Clears autoconf warnings: configure.ac:39: warning: The macro `AC_PROG_LIBTOOL' is obsolete. configure.ac:39: You should run autoupdate. aclocal.m4:3465: AC_PROG_LIBTOOL is expanded from... configure.ac:39: the top level libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.ac, libtoolize: and rerunning libtoolize and aclocal. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-01-18issue 18: Problems with rotated text (monospace font only)Thomas E. Dickey1-1/+1
Updates for version 2.3.5 included improvements for font rotation. One of the minus-signs was dropped, causing a change to the orientation of strings. Restore the minus-sign. Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2022-11-27issue 17: libxft-2.3.7: Bold fonts in urxvt missing leftmost pixelsThomas E. Dickey1-2/+6
Update for issue 16 replaced maximum advance with truncated offsets. However, in some cases (e.g., server providing a fake bold version of a font), the result may extend outside the bounding box for the glyph. To work around this, use the minimum of old/new values. Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2022-11-20add check for missing glyph in XftFontCheckGlyph()Thomas E. Dickey1-1/+4
This check is needed when updating the linked list of glyphs, since the older/newer links are not set, causing an xterm crash for certain fonts which have holes (e.g., Kochi Mincho). reported by Jeff Chua Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2022-11-15libXft 2.3.7libXft-2.3.7Thomas E. Dickey1-1/+1
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2022-11-14libxft issue #16Thomas E. Dickey1-1/+1
https://gitlab.freedesktop.org/xorg/lib/libxft/-/issues/16 Stack gets smashed in fonts with colors when calling XftGlyphRender BGRA changes made incorrect comparison for local vs allocated buffer in XftGlyphSpecRender Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2022-11-13fix compiler warningThomas E. Dickey1-2/+2
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2022-11-12libxft issue #15Thomas E. Dickey1-2/+2
https://gitlab.freedesktop.org/xorg/lib/libxft/-/issues/15 XftFontLoadGlyphs for mono font returns wrong info in extents from XftTextExtentsUtf8 for variable chars Patch by Scott Mcdermott, based on https://github.com/googlefonts/Inconsolata/issues/42 Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2022-09-25stdint.h header is needed for SIZE_MAXericLemanissier1-0/+1
2022-09-10libXft 2.3.6libXft-2.3.6Thomas E. Dickey2-3/+7
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2022-09-07fix gcc12 warning about malloc sizeThomas E. Dickey1-3/+8
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2022-09-07revised fix for gcc 12 compiler warnings in xftextent.cThomas E. Dickey1-5/+5
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2022-09-07Fix length check in XftTextExtents*.Adam Sampson1-5/+5
Commit 06a3c0ab6520e368ac936cb1ef172f19957db0fa added length checks of the form "if (len <= 0) return;" to various Xft functions. However, while rendering an empty string is equivalent to doing nothing, asking for the extents of an empty string isn't -- it still needs to fill in the extents structure. This broke text rendering in some applications (e.g. xpdf's Motif GUI). Check for len < 0 in XftTextExtents* instead.
2022-09-05libXft 2.3.5Thomas E. Dickey2-3/+9
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2022-07-09update copyright noticeThomas E. Dickey1-12/+13
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2022-07-09add a null-pointer checkThomas E. Dickey1-0/+2
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2022-07-09fix new gcc warningsThomas E. Dickey2-22/+25
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2022-07-09build-fixThomas E. Dickey1-3/+3
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2022-07-09merge changes by Christian WernerThomas E. Dickey3-139/+234
see note in libXft merge-request #1 at #note_1222314 Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2022-07-09cleanup new compiler warningsThomas E. Dickey1-14/+15
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2022-07-09build-fix for c89Thomas E. Dickey1-2/+3
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2022-07-09Add support for BGRA glyphs display and scalingMaxime Coste4-30/+293
Display is done using an XRender Picture, as XRender glyphs are incompatible with BGRA rendering due to their use of the glyph bitmap as a mask. Scaling is done by averaging all relevant pixel, which gives much better result than nearest pixel sampling while staying simple enough and not too computationally expensive. This enables color emoji rendering support. Fixes: #6 Signed-off-by: Maxime Coste <mawww@kakoune.org> Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2022-07-09Introduce a _XftCompositeText helper functionMaxime Coste1-34/+49
Dispatch to XRenderCompositeText{8,16,32} based off the given width. Signed-off-by: Maxime Coste <mawww@kakoune.org> Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2022-07-09Introduce a _XftCompositeString helper functionMaxime Coste1-18/+43
Dispatch to XRenderCompositeString{8,16,32} based off the given width. Signed-off-by: Maxime Coste <mawww@kakoune.org> Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2022-07-06errata (cppcheck, clang --analyze, manpage credit)Thomas E. Dickey6-13/+8
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2022-07-06document new features for glyph memory-trackingThomas E. Dickey1-1/+11
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2022-07-06improve glyph management by relinking to unload least-recently used glyphsThomas E. Dickey1-2/+34
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2022-07-06when tracking glyph memory usage, unload the oldest glyph rather than randomlyThomas E. Dickey1-1/+12
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2022-07-06cppcheck/gcc-stricter warnings about printf-formats and operator precedenceThomas E. Dickey2-13/+14
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2022-07-06fix delinkage of last glyph in font, improve debug-traceThomas E. Dickey1-7/+10
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2022-07-06add asserts (to help with debugging), update copyright noticesThomas E. Dickey3-36/+43
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2022-07-06refactor _XftFontUncacheGlyph, separate the two types of loop for readabilityThomas E. Dickey1-19/+35
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2022-07-06validate linked-list updates with _XftValidateGlyphUsageThomas E. Dickey3-17/+92
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2022-07-06add option for tracking glyph memory-usage on a linked listThomas E. Dickey6-20/+91
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2022-07-06add "trackmemusage" property to use in improved _XftFontUncacheGlyphThomas E. Dickey7-27/+71
The linear search used for randomly selecting a glyph to discard is inefficient. This commit provides for a doubly-linked list which could be maintained by the library to quickly discard the least recently used glyph. Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2022-07-06reduce clutter with macros for allocating arraysThomas E. Dickey4-25/+31
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2022-06-24add debugging trace for XftDefaultSet()Thomas E. Dickey1-0/+4
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2022-06-13add section of functions managing XftColorThomas E. Dickey1-18/+114
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2022-06-11add a section on the XFT_DEBUG environment variableThomas E. Dickey1-2/+47
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2022-06-11add a table of the "families" of functionsThomas E. Dickey1-1/+22
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2022-06-11document XftGlyphFontSpecRender() and related functions.Thomas E. Dickey1-1/+156
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2022-06-11reduce clutter for external data-types by documenting them one timeThomas E. Dickey1-60/+53
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>