41 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult
dbc2fbc582 include: libxfont2: fix missing includes of fontproto.h
* needs types from X11/fonts/fontproto.h (eg. NameCheckFunc) from this header,
but forgot to include it.
* needs NULL, which is defined in stddef.h

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxfont/-/merge_requests/28>
2024-07-19 13:35:11 +02:00
Adam Jackson
77ae404856 fontfile: Remove unused 'bc' slot from _FontEntry
Whatever this is, we're not using it. On my machine we allocate about
1100 of these structs, and this change reduces the struct from 152 to 48
bytes, so this saves about 100k of memory.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2019-05-14 15:36:20 -04:00
Keith Packard
95a40553b8 Remove fontconf.h
This file used to advertise which font formats the library
supports. The X server doesn't care, so let's just remove it so that
it doesn't conflict with the older version of libXfont

Signed-off-by: Keith Packard <keithp@keithp.com>
2015-12-11 07:09:16 -08:00
Keith Packard
135fb032e9 Eliminate calls back to X server or font server functions by name (v4)
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>
2015-12-08 20:37:48 -08:00
Keith Packard
a96cc1f032 Warning fixes.
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>
2014-01-29 15:20:03 -08:00
Alan Coopersmith
f24c559bcb Add _X_ATTRIBUTE_PRINTF to *Error/*Warning functions taking printf formats
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-11 20:15:14 -08:00
Alan Coopersmith
3715cd752b Add const attributes to fix gcc -Wwrite-strings warnings
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-11 20:15:06 -08:00
Alan Coopersmith
098ab294de Strip trailing whitespace
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>
2011-09-16 22:21:21 -07:00
Jesse Adkins
f29f1d68d7 Purge cvs tags.
Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-10-06 21:12:21 -07:00
Gaetan Nadon
9be83ae94c .gitignore: use common defaults with custom section # 24239
Using common defaults will reduce errors and maintenance.
Only the very small or inexistent custom section need periodic maintenance
when the structure of the component changes. Do not edit defaults.
2009-10-22 15:34:34 -04:00
Paulo Cesar Pereira de Andrade
e15dca77fa Janitor: make distcheck and .gitignore
Distribute ChangeLog but not autogen.sh.
  Use a single toplevel .gitignore file, instead of one per subdirectory.
2009-01-29 18:02:34 -02:00
Adam Jackson
38bac54519 Remove some strcasecmp silliness 2009-01-20 23:25:31 -05:00
Adam Jackson
0cdc9b8f85 xalloc -> malloc, etc. 2009-01-20 23:16:35 -05:00
Adam Jackson
632a2e90a4 Remove PMF support.
.pmf files are printer font metrics; they have no glyphs, just boxes for
layout.  They can't possibly be useful in a post-Xprint world.
2009-01-20 23:00:05 -05:00
Adam Jackson
732191d5d6 Remove loadable renderer support. 2009-01-20 22:42:22 -05:00
Adam Jackson
1247f01ee3 Delete Type1
Yes, these are still real fonts, but freetype can handle them just fine.
2009-01-20 01:13:08 -05:00
Adam Jackson
85b66b8a7f Delete speedo
OUT OUT OUT
2009-01-20 01:03:16 -05:00
Paulo Cesar Pereira de Andrade
b6f793d7d5 libXfont ansification and removal of xf86_ansic.h dependency
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.
2008-12-19 16:22:29 -08:00
Alan Coopersmith
5d5587a364 Add support for bzip2 bitmap font compression
Code originally written for Solaris Xsun in 2003, ported now to current Xorg
<http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=4819077>
2008-08-21 19:58:06 -07:00
Matthieu Herrb
6ba408c956 nuke RCS Ids 2008-03-09 08:21:34 +01:00
Kristian Høgsberg
c5ab59762c Add a new 'catalogue' FPE, which takes font paths from symlinks in a dir.
This patch adds a new FPE type, which will match font path elements of the
form

	catalogue:<dir>

The dir specified after the catalogue: prefix will be scanned for symlinks
and each symlink destination will be added as a local fontfile FPE.
The symlink can be suffixed by attributes, such as 'unscaled', which
will be passed through to the underlying fontfile FPE.  Except the new
attribute 'pri' which will be used for ordering the fontfile FPEs.

An example configuration:

	75dpi:unscaled:pri=20 -> /usr/share/X11/fonts/75dpi
	ghostscript:pri=60 -> /usr/share/fonts/default/ghostscript
	misc:unscaled:pri=10 -> /usr/share/X11/fonts/misc
	type1:pri=40 -> /usr/share/X11/fonts/Type1
	type1:pri=50 -> /usr/share/fonts/default/Type1

will add /usr/share/X11/fonts/misc as the first FPE with the attribute
'unscaled', second FPE will be /usr/share/X11/fonts/75dpi, also with
the attribute unscaled etc.  This is functionally equivalent to setting
the following font path:

	/usr/share/X11/fonts/misc:unscaled,
	/usr/share/X11/fonts/75dpi:unscaled,
	/usr/share/X11/fonts/Type1,
	/usr/share/fonts/default/Type1,
	/usr/share/fonts/default/ghostscript

The motivation is to let font packages add a symlink to the new font
directory they provide instead of rewriting either the Xorg config file
or the xfs config file.
2007-06-21 17:41:42 -04:00
Adam Jackson
1a690feaf7 Minor fontfile cleanup. 2007-06-07 16:01:03 -04:00
Adam Jackson
6257af0e54 Static markup over bitmap and builtins. 2007-06-07 15:41:19 -04:00
Adam Jackson
9739e750a7 Warning cleanup. 2007-06-07 14:20:27 -04:00
Daniel Stone
47084ba399 remove CID font support (bug #5553)
Remove non-free CID font support, which was unused anyway.
2006-12-01 00:35:04 +02:00
Alan Coopersmith
47ca994139 renamed: .cvsignore -> .gitignore 2006-07-13 14:58:56 -07:00
Adam Jackson
ddd281e6b9 For the 20-odd symbols defined both in libXfont and the X server, emit them
as weak symbols so that the linker will prefer the server's definition
    when present.
2006-06-01 21:49:51 +00:00
Keith Packard
99cde389c3 Rearrange configuration options so that individual font file formats drive
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.
2005-07-09 23:15:37 +00:00
Daniel Stone
932edb23b4 Add Xtrans definitions (FONT_t, TRANS_CLIENT) to clean up warnings.
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>.
2005-07-03 07:01:01 +00:00
Keith Packard
b03d67fd16 Add suitable .cvsignore files 2005-07-02 23:03:05 +00:00
Josh Triplett
175bbc2e58 Reference X11/fonts header files using X11/fonts/ prefix. 2005-05-27 17:44:08 +00:00
Josh Triplett
fd884a4dbe Add Xfont. 2005-05-27 05:17:52 +00:00
Egbert Eich
3d75ea33ec Merging XORG-CURRENT into trunk 2004-04-23 18:44:23 +00:00
Egbert Eich
8ee2a19ff0 Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004 2004-03-14 08:32:37 +00:00
Egbert Eich
4986cabb22 Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004 2004-03-03 12:11:44 +00:00
Egbert Eich
f827ecf1e0 readding XFree86's cvs IDs 2004-02-26 13:35:35 +00:00
Egbert Eich
90614769a0 Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004 2004-02-26 09:22:53 +00:00
Kaleb Keithley
fb0cbe6e72 XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks 2003-11-25 19:28:20 +00:00
Kaleb Keithley
4349bf0fa1 XFree86 4.3.0.1 2003-11-14 16:48:50 +00:00
Kaleb Keithley
3795e9702b Initial revision 2003-11-14 16:48:50 +00:00
Kaleb Keithley
153e8da444 R6.6 is the Xorg base-line 2003-11-14 15:54:40 +00:00