Compare commits
1 Commits
main
...
ultra-weig
Author | SHA1 | Date |
---|---|---|
|
4e21e6f6e6 |
|
@ -0,0 +1,35 @@
|
|||
aclocal.m4
|
||||
Makefile
|
||||
Makefile.in
|
||||
config.cache
|
||||
config.guess
|
||||
config.h
|
||||
config.h.in
|
||||
config.log
|
||||
config.status
|
||||
config.sub
|
||||
configure
|
||||
debian
|
||||
depcomp
|
||||
fontconfig.pc
|
||||
fontconfig.spec
|
||||
fontconfig-zip
|
||||
fonts.conf
|
||||
install-sh
|
||||
libtool
|
||||
missing
|
||||
mkinstalldirs
|
||||
stamp-h
|
||||
stamp-h.in
|
||||
stamp-h1
|
||||
fontconfig-*.tar.gz
|
||||
ltmain.sh
|
||||
autom4te.cache
|
||||
ChangeLog-*
|
||||
*.deb
|
||||
*.dsc
|
||||
*.changes
|
||||
*.build
|
||||
*.tar.gz
|
||||
*.diff.gz
|
||||
*.udeb
|
|
@ -0,0 +1,75 @@
|
|||
tags
|
||||
*.tar.gz
|
||||
.libs
|
||||
.deps
|
||||
*.o
|
||||
*.lo
|
||||
*.la
|
||||
Makefile
|
||||
Makefile.in
|
||||
aclocal.m4
|
||||
autom4te.cache
|
||||
config.guess
|
||||
config.h
|
||||
config.h.in
|
||||
config.log
|
||||
config.status
|
||||
config.sub
|
||||
configure
|
||||
depcomp
|
||||
fontconfig-zip
|
||||
fontconfig.pc
|
||||
fontconfig.spec
|
||||
fonts.conf
|
||||
install-sh
|
||||
libtool
|
||||
ltmain.sh
|
||||
missing
|
||||
stamp-h1
|
||||
doc/*.3
|
||||
doc/confdir.sgml
|
||||
doc/edit-sgml
|
||||
doc/fcatomic.sgml
|
||||
doc/fcblanks.sgml
|
||||
doc/fccharset.sgml
|
||||
doc/fcconfig.sgml
|
||||
doc/fcconstant.sgml
|
||||
doc/fcfile.sgml
|
||||
doc/fcfontset.sgml
|
||||
doc/fcfreetype.sgml
|
||||
doc/fcinit.sgml
|
||||
doc/fcmatrix.sgml
|
||||
doc/fcobjectset.sgml
|
||||
doc/fcobjecttype.sgml
|
||||
doc/fcpattern.sgml
|
||||
doc/fcstring.sgml
|
||||
doc/fcstrset.sgml
|
||||
doc/fcvalue.sgml
|
||||
doc/fontconfig-devel.pdf
|
||||
doc/fontconfig-devel.txt
|
||||
doc/fontconfig-devel
|
||||
doc/fontconfig-user.html
|
||||
doc/fontconfig-user.pdf
|
||||
doc/fontconfig-user.txt
|
||||
doc/fonts-conf.5
|
||||
doc/func.refs
|
||||
doc/local-fontconfig-devel.sgml
|
||||
doc/local-fontconfig-user.sgml
|
||||
doc/version.sgml
|
||||
fc-arch/fc-arch
|
||||
fc-arch/fcarch.h
|
||||
fc-cache/fc-cache
|
||||
fc-cache/fc-cache.1
|
||||
fc-case/fc-case
|
||||
fc-case/fccase.h
|
||||
fc-cat/fc-cat
|
||||
fc-cat/fc-cat.1
|
||||
fc-glyphname/fc-glyphname
|
||||
fc-glyphname/fcglyphname.h
|
||||
fc-lang/fc-lang
|
||||
fc-lang/fclang.h
|
||||
fc-list/fc-list
|
||||
fc-list/fc-list.1
|
||||
fc-match/fc-match
|
||||
fc-match/fc-match.1
|
||||
src/fontconfig.def
|
717
.gitlab-ci.yml
717
.gitlab-ci.yml
|
@ -1,717 +0,0 @@
|
|||
# vim: set expandtab shiftwidth=2 tabstop=8 textwidth=0 filetype=yaml:
|
||||
|
||||
#######################################
|
||||
# #
|
||||
# THIS FILE IS GENERATED, DO NOT EDIT #
|
||||
# #
|
||||
#######################################
|
||||
|
||||
# To change the gitlab CI, edit .gitlab-ci/ci.template and/or .gitlab-ci/config.yml
|
||||
# and run ci-fairy generate-template. For details, see
|
||||
# https://freedesktop.pages.freedesktop.org/ci-templates/ci-fairy.html#templating-gitlab-ci-yml
|
||||
|
||||
.templates_sha: &template_sha d11c0dd4c1c9a69c14b4af9b50cdd12b89d24672
|
||||
|
||||
include:
|
||||
# Fedora container builder template
|
||||
- project: 'freedesktop/ci-templates'
|
||||
ref: *template_sha
|
||||
file: '/templates/fedora.yml'
|
||||
# Freebsd container builder template
|
||||
- project: 'freedesktop/ci-templates'
|
||||
ref: *template_sha
|
||||
file: '/templates/freebsd.yml'
|
||||
- project: 'freedesktop/ci-templates'
|
||||
ref: *template_sha
|
||||
file: '/templates/ci-fairy.yml'
|
||||
- local: '.gitlab-ci/other.yml'
|
||||
|
||||
stages:
|
||||
- sanity check
|
||||
- prep
|
||||
- test
|
||||
- deploy
|
||||
- container_clean
|
||||
|
||||
variables:
|
||||
FDO_UPSTREAM_REPO: fontconfig/fontconfig
|
||||
GIT_DEPTH: 1
|
||||
|
||||
# these tags should be updated each time the list of packages is updated
|
||||
# changing these will force rebuilding the associated image
|
||||
# Note: these tags have no meaning and are not tied to a particular
|
||||
# fontconfig version
|
||||
FEDORA_TAG: '2023-12-05.1-7c59f403cca5'
|
||||
FREEBSD_TAG: '2023-12-05.1-b3f6fd9ee634'
|
||||
|
||||
FEDORA_EXEC: 'bash .gitlab-ci/fedora-install.sh'
|
||||
FREEBSD_EXEC: 'bash .gitlab-ci/freebsd-install.sh'
|
||||
|
||||
#######################################
|
||||
# #
|
||||
# sanity check #
|
||||
# #
|
||||
#######################################
|
||||
|
||||
fail-if-fork-is-not-public:
|
||||
stage: sanity check
|
||||
script:
|
||||
- |
|
||||
if [ $CI_PROJECT_VISIBILITY != "public" ]; then
|
||||
echo "*************************************************************************************"
|
||||
echo "Project visibility must be set to 'public'."
|
||||
echo "Change this in $CI_PROJECT_URL/edit under 'Visibility, project features, permissions'"
|
||||
echo "*************************************************************************************"
|
||||
exit 1
|
||||
fi
|
||||
except:
|
||||
- main@fontconfig/fontconfig
|
||||
|
||||
check-ci-script:
|
||||
extends:
|
||||
- .fdo.ci-fairy
|
||||
stage: sanity check
|
||||
script:
|
||||
- ci-fairy generate-template --verify && exit 0 || true
|
||||
- >
|
||||
printf "%s\n" \
|
||||
"Committed gitlab-ci.yml differs from generated gitlab-ci.yml." \
|
||||
"To change the gitlab CI, edit .gitlab-ci/ci.template and/or .gitlab-ci/config.yml" \
|
||||
" and run ci-fairy generate-template. For details, see " \
|
||||
"https://freedesktop.pages.freedesktop.org/ci-templates/ci-fairy.html#templating-gitlab-ci-yml"
|
||||
- exit 1
|
||||
|
||||
#######################################
|
||||
# #
|
||||
# containers stage #
|
||||
# #
|
||||
#######################################
|
||||
|
||||
# Build a container for each distribution + version. The ci-templates
|
||||
# will re-use the containers if the tag doesn't change.
|
||||
|
||||
fedora:rawhide@container-prep:
|
||||
extends: .fdo.container-build@fedora
|
||||
stage: prep
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
FDO_DISTRIBUTION_VERSION: 'rawhide'
|
||||
FDO_DISTRIBUTION_PACKAGES: '@buildsys-build autoconf automake libtool gettext gettext-devel gperf expat-devel libxml2-devel freetype-devel json-c-devel git docbook-utils docbook-utils-pdf bubblewrap ninja-build wget python3-pip mingw64-gettext mingw64-freetype mingw64-libxml2 wine'
|
||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||
FDO_DISTRIBUTION_EXEC: $FEDORA_EXEC
|
||||
|
||||
fedora:39@container-prep:
|
||||
extends: .fdo.container-build@fedora
|
||||
stage: prep
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
FDO_DISTRIBUTION_VERSION: '39'
|
||||
FDO_DISTRIBUTION_PACKAGES: '@buildsys-build autoconf automake libtool gettext gettext-devel gperf expat-devel libxml2-devel freetype-devel json-c-devel git docbook-utils docbook-utils-pdf bubblewrap ninja-build wget python3-pip mingw64-gettext mingw64-freetype mingw64-libxml2 wine'
|
||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||
FDO_DISTRIBUTION_EXEC: $FEDORA_EXEC
|
||||
|
||||
fedora:38@container-prep:
|
||||
extends: .fdo.container-build@fedora
|
||||
stage: prep
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
FDO_DISTRIBUTION_VERSION: '38'
|
||||
FDO_DISTRIBUTION_PACKAGES: '@buildsys-build autoconf automake libtool gettext gettext-devel gperf expat-devel libxml2-devel freetype-devel json-c-devel git docbook-utils docbook-utils-pdf bubblewrap ninja-build wget python3-pip mingw64-gettext mingw64-freetype mingw64-libxml2 wine'
|
||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||
FDO_DISTRIBUTION_EXEC: $FEDORA_EXEC
|
||||
|
||||
freebsd:14.0@container-prep:
|
||||
extends: .fdo.qemu-build@freebsd
|
||||
tags:
|
||||
- kvm
|
||||
stage: prep
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
FDO_DISTRIBUTION_VERSION: '14.0'
|
||||
FDO_DISTRIBUTION_PACKAGES: 'gcc autoconf automake libtool gettext gperf expat libxml2 freetype2 json-c git ninja wget python3 py39-pip pkgconf gmake'
|
||||
FDO_DISTRIBUTION_TAG: $FREEBSD_TAG
|
||||
FDO_DISTRIBUTION_EXEC: $FREEBSD_EXEC
|
||||
|
||||
freebsd:13.2@container-prep:
|
||||
extends: .fdo.qemu-build@freebsd
|
||||
tags:
|
||||
- kvm
|
||||
stage: prep
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
FDO_DISTRIBUTION_VERSION: '13.2'
|
||||
FDO_DISTRIBUTION_PACKAGES: 'gcc autoconf automake libtool gettext gperf expat libxml2 freetype2 json-c git ninja wget python3 py39-pip pkgconf gmake'
|
||||
FDO_DISTRIBUTION_TAG: $FREEBSD_TAG
|
||||
FDO_DISTRIBUTION_EXEC: $FREEBSD_EXEC
|
||||
|
||||
#######################################
|
||||
# #
|
||||
# container clean stage #
|
||||
# #
|
||||
#######################################
|
||||
|
||||
#
|
||||
# This stage will look for the container images e currently have in
|
||||
# the registry and will remove any that are not tagged with the provided
|
||||
# $container_image:$tag
|
||||
#
|
||||
# This job only runs for a scheduled pipeline.
|
||||
#
|
||||
# Go to your Profile, Settings, Access Tokens
|
||||
# Create a personal token with `api' scope, copy the value.
|
||||
# Go to CI/CD, Schedules, schedule a monthly job.
|
||||
# Define a variable of type File named AUTHFILE. Content is that token
|
||||
# value.
|
||||
.container-clean:
|
||||
stage: container_clean
|
||||
image: golang:alpine
|
||||
before_script:
|
||||
- apk add python3 py-pip git
|
||||
- pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates
|
||||
script:
|
||||
- ci-fairy -v --authfile $AUTHFILE delete-image
|
||||
--repository $FDO_DISTRIBUTION_NAME/$FDO_DISTRIBUTION_VERSION
|
||||
--exclude-tag $FDO_DISTRIBUTION_TAG
|
||||
dependencies: []
|
||||
allow_failure: true
|
||||
only:
|
||||
- schedules
|
||||
|
||||
fedora:rawhide@container-clean:
|
||||
extends:
|
||||
- .container-clean
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/fedora/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
|
||||
FDO_DISTRIBUTION_VERSION: 'rawhide'
|
||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||
|
||||
fedora:39@container-clean:
|
||||
extends:
|
||||
- .container-clean
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/fedora/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
|
||||
FDO_DISTRIBUTION_VERSION: '39'
|
||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||
|
||||
fedora:38@container-clean:
|
||||
extends:
|
||||
- .container-clean
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/fedora/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
|
||||
FDO_DISTRIBUTION_VERSION: '38'
|
||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||
|
||||
freebsd:14.0@container-clean:
|
||||
extends:
|
||||
- .container-clean
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/freebsd/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
|
||||
FDO_DISTRIBUTION_VERSION: '14.0'
|
||||
FDO_DISTRIBUTION_TAG: $FREEBSD_TAG
|
||||
|
||||
freebsd:13.2@container-clean:
|
||||
extends:
|
||||
- .container-clean
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/freebsd/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
|
||||
FDO_DISTRIBUTION_VERSION: '13.2'
|
||||
FDO_DISTRIBUTION_TAG: $FREEBSD_TAG
|
||||
|
||||
|
||||
#######################################
|
||||
# #
|
||||
# build stage #
|
||||
# #
|
||||
#######################################
|
||||
|
||||
.check_tainted: &check_tainted |
|
||||
# make sure the kernel is not tainted
|
||||
if [[ "$(ssh localhost -p 5555 cat /proc/sys/kernel/tainted)" -gt 0 ]];
|
||||
then
|
||||
echo tainted kernel ;
|
||||
exit 1 ;
|
||||
fi
|
||||
|
||||
.build-in-qemu@template:
|
||||
tags:
|
||||
- kvm
|
||||
script:
|
||||
- /app/vmctl start || (echo "Error - Failed to start the VM." && exit 1)
|
||||
|
||||
- *check_tainted
|
||||
|
||||
- export BUILD_ID="fontconfig-$CI_JOB_NAME_$CI_COMMIT_SHA-$CI_JOB_ID"
|
||||
- export PREFIX="$(pwd)/prefix-$BUILD_ID"
|
||||
- export BUILDDIR="$(pwd)/build-$BUILD_ID"
|
||||
- export MAKEFLAGS="-j4"
|
||||
- |
|
||||
buildopt=()
|
||||
for bo in $FC_BUILD_ENABLED; do
|
||||
buildopt+=(-e $bo)
|
||||
done
|
||||
for bo in $FC_BUILD_DISABLED; do
|
||||
buildopt+=(-d $bo)
|
||||
done
|
||||
[ -n "$FC_BUILD_ARCH" ] && buildopt+=(-a $FC_BUILD_ARCH)
|
||||
[ $FC_BUILD_DISTCHECK -eq 1 ] && buildopt+=(-c)
|
||||
[ $FC_BUILD_NO_INSTALL -eq 1 ] && buildopt+=(-I)
|
||||
[ $FC_BUILD_NO_CHECK -eq 1 ] && buildopt+=(-C)
|
||||
buildopt+=(-s $FC_BUILDSYS)
|
||||
buildopt+=(-t $FC_BUILD_TYPE)
|
||||
buildopt+=(-X $FC_XML_BACKEND)
|
||||
export buildopt
|
||||
- "scp -r $(pwd) vm:"
|
||||
- echo "CI_JOB_ID=\"$CI_JOB_ID\"" > fcenv
|
||||
- echo "CI_JOB_NAME=\"$CI_JOB_NAME\"" >> fcenv
|
||||
- echo "BUILD_ID=\"$BUILD_ID\"" >> fcenv
|
||||
- echo "MAKEFLAGS=\"$MAKEFLAGS\"" >> fcenv
|
||||
- echo "MAKE=\"$MAKE\"" >> fcenv
|
||||
- "scp fcenv vm:~/$CI_PROJECT_NAME/.gitlab-ci/fcenv"
|
||||
- /app/vmctl exec "cd $CI_PROJECT_NAME ; bash .gitlab-ci/build.sh ${buildopt[@]}" && touch .success || true
|
||||
- scp -r vm:$CI_PROJECT_NAME/build $BUILDDIR
|
||||
|
||||
- *check_tainted
|
||||
|
||||
- /app/vmctl stop
|
||||
- if [[ ! -e .success ]];
|
||||
then
|
||||
exit 1 ;
|
||||
fi
|
||||
variables:
|
||||
FC_BUILDSYS: autotools
|
||||
FC_XML_BACKEND: expat
|
||||
FC_BUILD_TYPE: both
|
||||
FC_BUILD_DISTCHECK: 0
|
||||
FC_BUILD_NO_INSTALL: 0
|
||||
FC_BUILD_NO_CHECK: 0
|
||||
|
||||
.build@template:
|
||||
script:
|
||||
- export BUILD_ID="fontconfig-$CI_JOB_NAME_$CI_COMMIT_SHA-$CI_JOB_ID"
|
||||
- export PREFIX="$(pwd)/prefix-$BUILD_ID"
|
||||
- export BUILDDIR="$(pwd)/build-$BUILD_ID"
|
||||
- export MAKEFLAGS="-j4"
|
||||
- |
|
||||
buildopt=()
|
||||
for bo in $FC_BUILD_ENABLED; do
|
||||
buildopt+=(-e $bo)
|
||||
done
|
||||
for bo in $FC_BUILD_DISABLED; do
|
||||
buildopt+=(-d $bo)
|
||||
done
|
||||
[ -n "$FC_BUILD_ARCH" ] && buildopt+=(-a $FC_BUILD_ARCH)
|
||||
[ $FC_BUILD_DISTCHECK -eq 1 ] && buildopt+=(-c)
|
||||
[ $FC_BUILD_NO_INSTALL -eq 1 ] && buildopt+=(-I)
|
||||
[ $FC_BUILD_NO_CHECK -eq 1 ] && buildopt+=(-C)
|
||||
buildopt+=(-s $FC_BUILDSYS)
|
||||
buildopt+=(-t $FC_BUILD_TYPE)
|
||||
buildopt+=(-X $FC_XML_BACKEND)
|
||||
sh .gitlab-ci/build.sh ${buildopt[@]}
|
||||
variables:
|
||||
FC_BUILDSYS: autotools
|
||||
FC_XML_BACKEND: expat
|
||||
FC_BUILD_TYPE: both
|
||||
FC_BUILD_DISTCHECK: 0
|
||||
FC_BUILD_NO_INSTALL: 0
|
||||
FC_BUILD_NO_CHECK: 0
|
||||
|
||||
.fc_artifacts:
|
||||
artifacts:
|
||||
name: fontconfig-$CI_COMMIT_SHA-$CI_JOB_ID
|
||||
when: always
|
||||
expire_in: 5 days
|
||||
paths:
|
||||
- build*/fc-build.log
|
||||
- build*/fontconfig-*.tar.*
|
||||
- build*/test/*log
|
||||
- build*/fontconfig*/_build
|
||||
- build*/meson-logs/*
|
||||
|
||||
#######################################
|
||||
# #
|
||||
# test stage #
|
||||
# #
|
||||
#######################################
|
||||
|
||||
|
||||
t_fedora:rawhide:autotools shared expat:
|
||||
extends:
|
||||
- .build@template
|
||||
- .fdo.distribution-image@fedora
|
||||
- .fc_artifacts
|
||||
variables:
|
||||
FC_DISTRO_NAME: fedora
|
||||
FDO_DISTRIBUTION_VERSION: 'rawhide'
|
||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||
FC_BUILDSYS: autotools
|
||||
FC_BUILD_TYPE: shared
|
||||
FC_XML_BACKEND: expat
|
||||
needs:
|
||||
- 'fedora:rawhide@container-prep'
|
||||
|
||||
|
||||
t_fedora:rawhide:autotools shared libxml2:
|
||||
extends:
|
||||
- .build@template
|
||||
- .fdo.distribution-image@fedora
|
||||
- .fc_artifacts
|
||||
variables:
|
||||
FC_DISTRO_NAME: fedora
|
||||
FDO_DISTRIBUTION_VERSION: 'rawhide'
|
||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||
FC_BUILDSYS: autotools
|
||||
FC_BUILD_TYPE: shared
|
||||
FC_XML_BACKEND: libxml2
|
||||
FC_BUILD_DISTCHECK: 1
|
||||
needs:
|
||||
- 'fedora:rawhide@container-prep'
|
||||
|
||||
|
||||
t_fedora:rawhide:meson shared expat:
|
||||
extends:
|
||||
- .build@template
|
||||
- .fdo.distribution-image@fedora
|
||||
- .fc_artifacts
|
||||
variables:
|
||||
FC_DISTRO_NAME: fedora
|
||||
FDO_DISTRIBUTION_VERSION: 'rawhide'
|
||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||
FC_BUILDSYS: meson
|
||||
FC_BUILD_TYPE: shared
|
||||
FC_XML_BACKEND: expat
|
||||
needs:
|
||||
- 'fedora:rawhide@container-prep'
|
||||
|
||||
|
||||
t_fedora:rawhide:autotools static expat:
|
||||
extends:
|
||||
- .build@template
|
||||
- .fdo.distribution-image@fedora
|
||||
- .fc_artifacts
|
||||
variables:
|
||||
FC_DISTRO_NAME: fedora
|
||||
FDO_DISTRIBUTION_VERSION: 'rawhide'
|
||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||
FC_BUILDSYS: autotools
|
||||
FC_BUILD_TYPE: static
|
||||
FC_XML_BACKEND: expat
|
||||
needs:
|
||||
- 'fedora:rawhide@container-prep'
|
||||
|
||||
|
||||
t_fedora:rawhide:autotools static libxml2:
|
||||
extends:
|
||||
- .build@template
|
||||
- .fdo.distribution-image@fedora
|
||||
- .fc_artifacts
|
||||
variables:
|
||||
FC_DISTRO_NAME: fedora
|
||||
FDO_DISTRIBUTION_VERSION: 'rawhide'
|
||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||
FC_BUILDSYS: autotools
|
||||
FC_BUILD_TYPE: static
|
||||
FC_XML_BACKEND: libxml2
|
||||
needs:
|
||||
- 'fedora:rawhide@container-prep'
|
||||
|
||||
|
||||
t_fedora:rawhide:meson static expat:
|
||||
extends:
|
||||
- .build@template
|
||||
- .fdo.distribution-image@fedora
|
||||
- .fc_artifacts
|
||||
variables:
|
||||
FC_DISTRO_NAME: fedora
|
||||
FDO_DISTRIBUTION_VERSION: 'rawhide'
|
||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||
FC_BUILDSYS: meson
|
||||
FC_BUILD_TYPE: static
|
||||
FC_XML_BACKEND: expat
|
||||
needs:
|
||||
- 'fedora:rawhide@container-prep'
|
||||
|
||||
|
||||
t_fedora:rawhide:mingw autotools static libxml2:
|
||||
extends:
|
||||
- .build@template
|
||||
- .fdo.distribution-image@fedora
|
||||
- .fc_artifacts
|
||||
variables:
|
||||
FC_DISTRO_NAME: fedora
|
||||
FDO_DISTRIBUTION_VERSION: 'rawhide'
|
||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||
FC_BUILDSYS: autotools
|
||||
FC_BUILD_TYPE: static
|
||||
FC_XML_BACKEND: libxml2
|
||||
FC_BUILD_PLATFORM: mingw
|
||||
FC_BUILD_ARCH: x86_64-mingw32
|
||||
needs:
|
||||
- 'fedora:rawhide@container-prep'
|
||||
|
||||
|
||||
t_fedora:rawhide:mingw meson static expat:
|
||||
extends:
|
||||
- .build@template
|
||||
- .fdo.distribution-image@fedora
|
||||
- .fc_artifacts
|
||||
variables:
|
||||
FC_DISTRO_NAME: fedora
|
||||
FDO_DISTRIBUTION_VERSION: 'rawhide'
|
||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||
FC_BUILDSYS: meson
|
||||
FC_BUILD_TYPE: static
|
||||
FC_XML_BACKEND: expat
|
||||
FC_BUILD_PLATFORM: mingw
|
||||
FC_BUILD_ARCH: linux-mingw-w64-64bit
|
||||
FC_BUILD_NO_INSTALL: 1
|
||||
needs:
|
||||
- 'fedora:rawhide@container-prep'
|
||||
|
||||
|
||||
t_fedora:39:autotools shared expat:
|
||||
extends:
|
||||
- .build@template
|
||||
- .fdo.distribution-image@fedora
|
||||
- .fc_artifacts
|
||||
variables:
|
||||
FC_DISTRO_NAME: fedora
|
||||
FDO_DISTRIBUTION_VERSION: '39'
|
||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||
FC_BUILDSYS: autotools
|
||||
FC_BUILD_TYPE: shared
|
||||
FC_XML_BACKEND: expat
|
||||
needs:
|
||||
- 'fedora:39@container-prep'
|
||||
|
||||
|
||||
t_fedora:39:autotools shared libxml2:
|
||||
extends:
|
||||
- .build@template
|
||||
- .fdo.distribution-image@fedora
|
||||
- .fc_artifacts
|
||||
variables:
|
||||
FC_DISTRO_NAME: fedora
|
||||
FDO_DISTRIBUTION_VERSION: '39'
|
||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||
FC_BUILDSYS: autotools
|
||||
FC_BUILD_TYPE: shared
|
||||
FC_XML_BACKEND: libxml2
|
||||
FC_BUILD_DISTCHECK: 1
|
||||
needs:
|
||||
- 'fedora:39@container-prep'
|
||||
|
||||
|
||||
t_fedora:39:meson shared expat:
|
||||
extends:
|
||||
- .build@template
|
||||
- .fdo.distribution-image@fedora
|
||||
- .fc_artifacts
|
||||
variables:
|
||||
FC_DISTRO_NAME: fedora
|
||||
FDO_DISTRIBUTION_VERSION: '39'
|
||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||
FC_BUILDSYS: meson
|
||||
FC_BUILD_TYPE: shared
|
||||
FC_XML_BACKEND: expat
|
||||
needs:
|
||||
- 'fedora:39@container-prep'
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
t_fedora:38:autotools shared expat:
|
||||
extends:
|
||||
- .build@template
|
||||
- .fdo.distribution-image@fedora
|
||||
- .fc_artifacts
|
||||
variables:
|
||||
FC_DISTRO_NAME: fedora
|
||||
FDO_DISTRIBUTION_VERSION: '38'
|
||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||
FC_BUILDSYS: autotools
|
||||
FC_BUILD_TYPE: shared
|
||||
FC_XML_BACKEND: expat
|
||||
needs:
|
||||
- 'fedora:38@container-prep'
|
||||
|
||||
|
||||
t_fedora:38:autotools shared libxml2:
|
||||
extends:
|
||||
- .build@template
|
||||
- .fdo.distribution-image@fedora
|
||||
- .fc_artifacts
|
||||
variables:
|
||||
FC_DISTRO_NAME: fedora
|
||||
FDO_DISTRIBUTION_VERSION: '38'
|
||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||
FC_BUILDSYS: autotools
|
||||
FC_BUILD_TYPE: shared
|
||||
FC_XML_BACKEND: libxml2
|
||||
FC_BUILD_DISTCHECK: 1
|
||||
needs:
|
||||
- 'fedora:38@container-prep'
|
||||
|
||||
|
||||
t_fedora:38:meson shared expat:
|
||||
extends:
|
||||
- .build@template
|
||||
- .fdo.distribution-image@fedora
|
||||
- .fc_artifacts
|
||||
variables:
|
||||
FC_DISTRO_NAME: fedora
|
||||
FDO_DISTRIBUTION_VERSION: '38'
|
||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||
FC_BUILDSYS: meson
|
||||
FC_BUILD_TYPE: shared
|
||||
FC_XML_BACKEND: expat
|
||||
needs:
|
||||
- 'fedora:38@container-prep'
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
t_freebsd:14.0:autotools shared expat:
|
||||
extends:
|
||||
- .build-in-qemu@template
|
||||
- .fdo.distribution-image@freebsd
|
||||
- .fc_artifacts
|
||||
variables:
|
||||
FC_DISTRO_NAME: freebsd
|
||||
FDO_DISTRIBUTION_VERSION: '14.0'
|
||||
FDO_DISTRIBUTION_TAG: $FREEBSD_TAG
|
||||
FC_BUILDSYS: autotools
|
||||
FC_BUILD_TYPE: shared
|
||||
FC_XML_BACKEND: expat
|
||||
MAKE: gmake
|
||||
FC_BUILD_NO_CHECK: 1
|
||||
needs:
|
||||
- 'freebsd:14.0@container-prep'
|
||||
|
||||
|
||||
t_freebsd:14.0:autotools shared libxml2:
|
||||
extends:
|
||||
- .build-in-qemu@template
|
||||
- .fdo.distribution-image@freebsd
|
||||
- .fc_artifacts
|
||||
variables:
|
||||
FC_DISTRO_NAME: freebsd
|
||||
FDO_DISTRIBUTION_VERSION: '14.0'
|
||||
FDO_DISTRIBUTION_TAG: $FREEBSD_TAG
|
||||
FC_BUILDSYS: autotools
|
||||
FC_BUILD_TYPE: shared
|
||||
FC_XML_BACKEND: libxml2
|
||||
MAKE: gmake
|
||||
FC_BUILD_NO_CHECK: 1
|
||||
needs:
|
||||
- 'freebsd:14.0@container-prep'
|
||||
|
||||
|
||||
t_freebsd:14.0:meson shared expat:
|
||||
extends:
|
||||
- .build-in-qemu@template
|
||||
- .fdo.distribution-image@freebsd
|
||||
- .fc_artifacts
|
||||
variables:
|
||||
FC_DISTRO_NAME: freebsd
|
||||
FDO_DISTRIBUTION_VERSION: '14.0'
|
||||
FDO_DISTRIBUTION_TAG: $FREEBSD_TAG
|
||||
FC_BUILDSYS: meson
|
||||
FC_BUILD_TYPE: shared
|
||||
FC_XML_BACKEND: expat
|
||||
FC_BUILD_NO_CHECK: 1
|
||||
needs:
|
||||
- 'freebsd:14.0@container-prep'
|
||||
|
||||
|
||||
t_freebsd:13.2:autotools shared expat:
|
||||
extends:
|
||||
- .build-in-qemu@template
|
||||
- .fdo.distribution-image@freebsd
|
||||
- .fc_artifacts
|
||||
variables:
|
||||
FC_DISTRO_NAME: freebsd
|
||||
FDO_DISTRIBUTION_VERSION: '13.2'
|
||||
FDO_DISTRIBUTION_TAG: $FREEBSD_TAG
|
||||
FC_BUILDSYS: autotools
|
||||
FC_BUILD_TYPE: shared
|
||||
FC_XML_BACKEND: expat
|
||||
MAKE: gmake
|
||||
FC_BUILD_NO_CHECK: 1
|
||||
needs:
|
||||
- 'freebsd:13.2@container-prep'
|
||||
|
||||
|
||||
t_freebsd:13.2:autotools shared libxml2:
|
||||
extends:
|
||||
- .build-in-qemu@template
|
||||
- .fdo.distribution-image@freebsd
|
||||
- .fc_artifacts
|
||||
variables:
|
||||
FC_DISTRO_NAME: freebsd
|
||||
FDO_DISTRIBUTION_VERSION: '13.2'
|
||||
FDO_DISTRIBUTION_TAG: $FREEBSD_TAG
|
||||
FC_BUILDSYS: autotools
|
||||
FC_BUILD_TYPE: shared
|
||||
FC_XML_BACKEND: libxml2
|
||||
MAKE: gmake
|
||||
FC_BUILD_NO_CHECK: 1
|
||||
needs:
|
||||
- 'freebsd:13.2@container-prep'
|
||||
|
||||
|
||||
t_freebsd:13.2:meson shared expat:
|
||||
extends:
|
||||
- .build-in-qemu@template
|
||||
- .fdo.distribution-image@freebsd
|
||||
- .fc_artifacts
|
||||
variables:
|
||||
FC_DISTRO_NAME: freebsd
|
||||
FDO_DISTRIBUTION_VERSION: '13.2'
|
||||
FDO_DISTRIBUTION_TAG: $FREEBSD_TAG
|
||||
FC_BUILDSYS: meson
|
||||
FC_BUILD_TYPE: shared
|
||||
FC_XML_BACKEND: expat
|
||||
FC_BUILD_NO_CHECK: 1
|
||||
needs:
|
||||
- 'freebsd:13.2@container-prep'
|
||||
|
||||
|
||||
#######################################
|
||||
# #
|
||||
# deploy stage #
|
||||
# #
|
||||
#######################################
|
||||
|
||||
check-merge-request:
|
||||
extends:
|
||||
- .fdo.ci-fairy
|
||||
stage: deploy
|
||||
script:
|
||||
- ci-fairy check-merge-request --require-allow-collaboration --junit-xml=results.xml
|
||||
artifacts:
|
||||
when: on_failure
|
||||
reports:
|
||||
junit: results.xml
|
||||
allow_failure: true
|
||||
|
|
@ -1 +0,0 @@
|
|||
/*~
|
|
@ -1,144 +0,0 @@
|
|||
#! /bin/bash
|
||||
|
||||
set -ex
|
||||
set -o pipefail
|
||||
|
||||
cidir=$(dirname $0)
|
||||
[ -f ${cidir}/fcenv ] && . ${cidir}/fcenv
|
||||
|
||||
case "$OSTYPE" in
|
||||
msys) MyPWD=$(pwd -W) ;;
|
||||
*BSD) PATH=$PATH:/usr/local/bin ;&
|
||||
*) MyPWD=$(pwd) ;;
|
||||
esac
|
||||
enable=()
|
||||
disable=()
|
||||
distcheck=0
|
||||
enable_install=1
|
||||
disable_check=0
|
||||
cross=0
|
||||
buildsys="autotools"
|
||||
type="both"
|
||||
arch=""
|
||||
buildopt=()
|
||||
SRCDIR=$MyPWD
|
||||
export MAKE=${MAKE:-make}
|
||||
export BUILD_ID=${BUILD_ID:-fontconfig-$$}
|
||||
export PREFIX=${PREFIX:-$MyPWD/prefix}
|
||||
export BUILDDIR=${BUILDDIR:-$MyPWD/build}
|
||||
|
||||
while getopts a:cCe:d:hIs:t:X: OPT
|
||||
do
|
||||
case $OPT in
|
||||
'a') arch=$OPTARG ;;
|
||||
'c') distcheck=1 ;;
|
||||
'C') disable_check=1 ;;
|
||||
'e') enable+=($OPTARG) ;;
|
||||
'd') disable+=($OPTARG) ;;
|
||||
'I') enable_install=0 ;;
|
||||
's') buildsys=$OPTARG ;;
|
||||
't') type=$OPTARG ;;
|
||||
'X') backend=$OPTARG ;;
|
||||
'h')
|
||||
echo "Usage: $0 [-a ARCH] [-c] [-e OPT] [-d OPT] [-I] [-s BUILDSYS] [-t BUILDTYPE] [-X XMLBACKEND]"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
case x"$FC_BUILD_PLATFORM" in
|
||||
'xmingw') cross=1 ;;
|
||||
*) cross=0 ;;
|
||||
esac
|
||||
|
||||
env
|
||||
r=0
|
||||
|
||||
if [ x"$buildsys" == "xautotools" ]; then
|
||||
for i in "${enable[@]}"; do
|
||||
buildopt+=(--enable-$i)
|
||||
done
|
||||
for i in "${disable[@]}"; do
|
||||
buildopt+=(--disable-$i)
|
||||
done
|
||||
case x"$backend" in
|
||||
'xexpat')
|
||||
buildopt+=(--disable-libxml2)
|
||||
;;
|
||||
'xlibxml2')
|
||||
buildopt+=(--enable-libxml2)
|
||||
;;
|
||||
esac
|
||||
case x"$type" in
|
||||
'xshared')
|
||||
buildopt+=(--enable-shared)
|
||||
buildopt+=(--disable-static)
|
||||
;;
|
||||
'xstatic')
|
||||
buildopt+=(--disable-shared)
|
||||
buildopt+=(--enable-static)
|
||||
;;
|
||||
'both')
|
||||
buildopt+=(--enable-shared)
|
||||
buildopt+=(--enable-static)
|
||||
;;
|
||||
esac
|
||||
if [ $cross -eq 1 -a -z "$arch" ]; then
|
||||
buildopt+=(--host=$arch)
|
||||
if [ -f .gitlab-ci/${FC_DISTRO_NAME}-cross.sh ]; then
|
||||
echo "No ${FC_DISTRO_NAME}-cross.sh available"
|
||||
exit 1
|
||||
fi
|
||||
. .gitlab-ci/${FC_DISTRO_NAME}-cross.sh
|
||||
fi
|
||||
rm -rf "$BUILDDIR" "$PREFIX" || :
|
||||
mkdir "$BUILDDIR" "$PREFIX"
|
||||
cd "$BUILDDIR"
|
||||
../autogen.sh --prefix="$PREFIX" ${buildopt[*]} 2>&1 | tee /tmp/fc-build.log || r=$?
|
||||
$MAKE V=1 2>&1 | tee -a /tmp/fc-build.log || r=$?
|
||||
if [ $disable_check -eq 0 ]; then
|
||||
$MAKE check V=1 2>&1 | tee -a /tmp/fc-build.log || r=$?
|
||||
fi
|
||||
if [ $enable_install -eq 1 ]; then
|
||||
$MAKE install V=1 2>&1 | tee -a /tmp/fc-build.log || r=$?
|
||||
fi
|
||||
if [ $distcheck -eq 1 ]; then
|
||||
$MAKE distcheck V=1 2>&1 | tee -a /tmp/fc-build.log || r=$?
|
||||
fi
|
||||
elif [ x"$buildsys" == "xmeson" ]; then
|
||||
pip install meson
|
||||
for i in "${enable[@]}"; do
|
||||
buildopt+=(-D$i=true)
|
||||
done
|
||||
for i in "${disable[@]}"; do
|
||||
buildopt+=(-D$i=false)
|
||||
done
|
||||
case x"$backend" in
|
||||
'xexpat')
|
||||
;;
|
||||
'xlibxml2')
|
||||
;;
|
||||
esac
|
||||
if [ $cross -eq 1 -a -z "$arch" ]; then
|
||||
buildopt+=(--cross-file)
|
||||
buildopt+=(.gitlab-ci/$arch.txt)
|
||||
if [ -f .gitlab-ci/cross-$FC_DISTRO_NAME.sh ]; then
|
||||
echo "No cross-$FC_DISTRO_NAME.sh available"
|
||||
exit 1
|
||||
fi
|
||||
. .gitlab-ci/cross-$FC_DISTRO_NAME.sh
|
||||
fi
|
||||
buildopt+=(--default-library=$type)
|
||||
meson setup --prefix="$PREFIX" ${buildopt[*]} "$BUILDDIR" 2>&1 | tee /tmp/fc-build.log || r=$?
|
||||
meson compile -v -C "$BUILDDIR" 2>&1 | tee -a /tmp/fc-build.log || r=$?
|
||||
if [ $disable_check -eq 0 ]; then
|
||||
meson test -v -C "$BUILDDIR" 2>&1 | tee -a /tmp/fc-build.log || r=$?
|
||||
fi
|
||||
if [ $enable_install -eq 1 ]; then
|
||||
meson install -C "$BUILDDIR" 2>&1 | tee -a /tmp/fc-build.log || r=$?
|
||||
fi
|
||||
if [ $distcheck -eq 1 ]; then
|
||||
meson dist -C "$BUILDDIR" 2>&1 | tee -a /tmp/fc-build.log || r=$?
|
||||
fi
|
||||
fi
|
||||
mv /tmp/fc-build.log . || :
|
||||
exit $r
|
|
@ -1,331 +0,0 @@
|
|||
# vim: set expandtab shiftwidth=2 tabstop=8 textwidth=0 filetype=yaml:
|
||||
|
||||
{# You're looking at the template here, so you can ignore the below
|
||||
warning. This is the right file to edit #}
|
||||
#######################################
|
||||
# #
|
||||
# THIS FILE IS GENERATED, DO NOT EDIT #
|
||||
# #
|
||||
#######################################
|
||||
|
||||
# To change the gitlab CI, edit .gitlab-ci/ci.template and/or .gitlab-ci/config.yml
|
||||
# and run ci-fairy generate-template. For details, see
|
||||
# https://freedesktop.pages.freedesktop.org/ci-templates/ci-fairy.html#templating-gitlab-ci-yml
|
||||
|
||||
.templates_sha: &template_sha d11c0dd4c1c9a69c14b4af9b50cdd12b89d24672
|
||||
|
||||
include:
|
||||
{% for distro in distributions|sort(attribute="name") %}
|
||||
# {{ distro.name.capitalize() }} container builder template
|
||||
- project: 'freedesktop/ci-templates'
|
||||
ref: *template_sha
|
||||
file: '/templates/{{distro.name}}.yml'
|
||||
{% endfor %}
|
||||
- project: 'freedesktop/ci-templates'
|
||||
ref: *template_sha
|
||||
file: '/templates/ci-fairy.yml'
|
||||
- local: '.gitlab-ci/other.yml'
|
||||
|
||||
stages:
|
||||
- sanity check
|
||||
- prep
|
||||
- test
|
||||
- deploy
|
||||
- container_clean
|
||||
|
||||
variables:
|
||||
FDO_UPSTREAM_REPO: fontconfig/fontconfig
|
||||
GIT_DEPTH: 1
|
||||
|
||||
# these tags should be updated each time the list of packages is updated
|
||||
# changing these will force rebuilding the associated image
|
||||
# Note: these tags have no meaning and are not tied to a particular
|
||||
# fontconfig version
|
||||
{% for distro in distributions %}
|
||||
{{"%-15s"| format(distro.name.upper() + '_TAG:')}}'{{distro.tag}}-{{
|
||||
(ci_fairy.hashfiles('.gitlab-ci/config.yml',
|
||||
'.gitlab-ci/' + distro.name + '-install.sh'))[0:12]
|
||||
}}'
|
||||
{% endfor %}
|
||||
|
||||
{% for distro in distributions %}
|
||||
{{"%-15s"| format(distro.name.upper() + '_EXEC:')}}'bash .gitlab-ci/{{distro.name}}-install.sh'
|
||||
{% endfor %}
|
||||
|
||||
#######################################
|
||||
# #
|
||||
# sanity check #
|
||||
# #
|
||||
#######################################
|
||||
|
||||
fail-if-fork-is-not-public:
|
||||
stage: sanity check
|
||||
script:
|
||||
- |
|
||||
if [ $CI_PROJECT_VISIBILITY != "public" ]; then
|
||||
echo "*************************************************************************************"
|
||||
echo "Project visibility must be set to 'public'."
|
||||
echo "Change this in $CI_PROJECT_URL/edit under 'Visibility, project features, permissions'"
|
||||
echo "*************************************************************************************"
|
||||
exit 1
|
||||
fi
|
||||
except:
|
||||
- main@fontconfig/fontconfig
|
||||
|
||||
check-ci-script:
|
||||
extends:
|
||||
- .fdo.ci-fairy
|
||||
stage: sanity check
|
||||
script:
|
||||
- ci-fairy generate-template --verify && exit 0 || true
|
||||
- >
|
||||
printf "%s\n" \
|
||||
"Committed gitlab-ci.yml differs from generated gitlab-ci.yml." \
|
||||
"To change the gitlab CI, edit .gitlab-ci/ci.template and/or .gitlab-ci/config.yml" \
|
||||
" and run ci-fairy generate-template. For details, see " \
|
||||
"https://freedesktop.pages.freedesktop.org/ci-templates/ci-fairy.html#templating-gitlab-ci-yml"
|
||||
- exit 1
|
||||
|
||||
#######################################
|
||||
# #
|
||||
# containers stage #
|
||||
# #
|
||||
#######################################
|
||||
|
||||
# Build a container for each distribution + version. The ci-templates
|
||||
# will re-use the containers if the tag doesn't change.
|
||||
{% for distro in distributions %}
|
||||
{% for version in distro.versions %}
|
||||
|
||||
{{distro.name}}:{{version}}@container-prep:
|
||||
{% if distro.qemu_based %}
|
||||
extends: .fdo.qemu-build@{{distro.name}}
|
||||
{% else %}
|
||||
extends: .fdo.container-build@{{distro.name}}
|
||||
{% endif %}
|
||||
{% if distro.qemu_based %}
|
||||
tags:
|
||||
- kvm
|
||||
{% endif %}
|
||||
stage: prep
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
FDO_DISTRIBUTION_VERSION: '{{version}}'
|
||||
FDO_DISTRIBUTION_PACKAGES: '{{' '.join(packages[distro.name].needed)}}'
|
||||
FDO_DISTRIBUTION_TAG: ${{distro.name.upper()}}_TAG
|
||||
FDO_DISTRIBUTION_EXEC: ${{distro.name.upper()}}_EXEC
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
#######################################
|
||||
# #
|
||||
# container clean stage #
|
||||
# #
|
||||
#######################################
|
||||
|
||||
#
|
||||
# This stage will look for the container images e currently have in
|
||||
# the registry and will remove any that are not tagged with the provided
|
||||
# $container_image:$tag
|
||||
#
|
||||
# This job only runs for a scheduled pipeline.
|
||||
#
|
||||
# Go to your Profile, Settings, Access Tokens
|
||||
# Create a personal token with `api' scope, copy the value.
|
||||
# Go to CI/CD, Schedules, schedule a monthly job.
|
||||
# Define a variable of type File named AUTHFILE. Content is that token
|
||||
# value.
|
||||
.container-clean:
|
||||
stage: container_clean
|
||||
image: golang:alpine
|
||||
before_script:
|
||||
- apk add python3 py-pip git
|
||||
- pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates
|
||||
script:
|
||||
- ci-fairy -v --authfile $AUTHFILE delete-image
|
||||
--repository $FDO_DISTRIBUTION_NAME/$FDO_DISTRIBUTION_VERSION
|
||||
--exclude-tag $FDO_DISTRIBUTION_TAG
|
||||
dependencies: []
|
||||
allow_failure: true
|
||||
only:
|
||||
- schedules
|
||||
|
||||
{% for distro in distributions %}
|
||||
{% for version in distro.versions %}
|
||||
{{distro.name}}:{{version}}@container-clean:
|
||||
extends:
|
||||
- .container-clean
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/{{distro.name}}/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
|
||||
FDO_DISTRIBUTION_VERSION: '{{version}}'
|
||||
FDO_DISTRIBUTION_TAG: ${{distro.name.upper()}}_TAG
|
||||
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
#######################################
|
||||
# #
|
||||
# build stage #
|
||||
# #
|
||||
#######################################
|
||||
|
||||
.check_tainted: &check_tainted |
|
||||
# make sure the kernel is not tainted
|
||||
if [[ "$(ssh localhost -p 5555 cat /proc/sys/kernel/tainted)" -gt 0 ]];
|
||||
then
|
||||
echo tainted kernel ;
|
||||
exit 1 ;
|
||||
fi
|
||||
|
||||
.build-in-qemu@template:
|
||||
tags:
|
||||
- kvm
|
||||
script:
|
||||
- /app/vmctl start || (echo "Error - Failed to start the VM." && exit 1)
|
||||
|
||||
- *check_tainted
|
||||
|
||||
- export BUILD_ID="fontconfig-$CI_JOB_NAME_$CI_COMMIT_SHA-$CI_JOB_ID"
|
||||
- export PREFIX="$(pwd)/prefix-$BUILD_ID"
|
||||
- export BUILDDIR="$(pwd)/build-$BUILD_ID"
|
||||
- export MAKEFLAGS="-j4"
|
||||
- |
|
||||
buildopt=()
|
||||
for bo in $FC_BUILD_ENABLED; do
|
||||
buildopt+=(-e $bo)
|
||||
done
|
||||
for bo in $FC_BUILD_DISABLED; do
|
||||
buildopt+=(-d $bo)
|
||||
done
|
||||
[ -n "$FC_BUILD_ARCH" ] && buildopt+=(-a $FC_BUILD_ARCH)
|
||||
[ $FC_BUILD_DISTCHECK -eq 1 ] && buildopt+=(-c)
|
||||
[ $FC_BUILD_NO_INSTALL -eq 1 ] && buildopt+=(-I)
|
||||
[ $FC_BUILD_NO_CHECK -eq 1 ] && buildopt+=(-C)
|
||||
buildopt+=(-s $FC_BUILDSYS)
|
||||
buildopt+=(-t $FC_BUILD_TYPE)
|
||||
buildopt+=(-X $FC_XML_BACKEND)
|
||||
export buildopt
|
||||
- "scp -r $(pwd) vm:"
|
||||
- echo "CI_JOB_ID=\"$CI_JOB_ID\"" > fcenv
|
||||
- echo "CI_JOB_NAME=\"$CI_JOB_NAME\"" >> fcenv
|
||||
- echo "BUILD_ID=\"$BUILD_ID\"" >> fcenv
|
||||
- echo "MAKEFLAGS=\"$MAKEFLAGS\"" >> fcenv
|
||||
- echo "MAKE=\"$MAKE\"" >> fcenv
|
||||
- "scp fcenv vm:~/$CI_PROJECT_NAME/.gitlab-ci/fcenv"
|
||||
- /app/vmctl exec "cd $CI_PROJECT_NAME ; bash .gitlab-ci/build.sh ${buildopt[@]}" && touch .success || true
|
||||
- scp -r vm:$CI_PROJECT_NAME/build $BUILDDIR
|
||||
|
||||
- *check_tainted
|
||||
|
||||
- /app/vmctl stop
|
||||
- if [[ ! -e .success ]];
|
||||
then
|
||||
exit 1 ;
|
||||
fi
|
||||
variables:
|
||||
FC_BUILDSYS: autotools
|
||||
FC_XML_BACKEND: expat
|
||||
FC_BUILD_TYPE: both
|
||||
FC_BUILD_DISTCHECK: 0
|
||||
FC_BUILD_NO_INSTALL: 0
|
||||
FC_BUILD_NO_CHECK: 0
|
||||
|
||||
.build@template:
|
||||
script:
|
||||
- export BUILD_ID="fontconfig-$CI_JOB_NAME_$CI_COMMIT_SHA-$CI_JOB_ID"
|
||||
- export PREFIX="$(pwd)/prefix-$BUILD_ID"
|
||||
- export BUILDDIR="$(pwd)/build-$BUILD_ID"
|
||||
- export MAKEFLAGS="-j4"
|
||||
- |
|
||||
buildopt=()
|
||||
for bo in $FC_BUILD_ENABLED; do
|
||||
buildopt+=(-e $bo)
|
||||
done
|
||||
for bo in $FC_BUILD_DISABLED; do
|
||||
buildopt+=(-d $bo)
|
||||
done
|
||||
[ -n "$FC_BUILD_ARCH" ] && buildopt+=(-a $FC_BUILD_ARCH)
|
||||
[ $FC_BUILD_DISTCHECK -eq 1 ] && buildopt+=(-c)
|
||||
[ $FC_BUILD_NO_INSTALL -eq 1 ] && buildopt+=(-I)
|
||||
[ $FC_BUILD_NO_CHECK -eq 1 ] && buildopt+=(-C)
|
||||
buildopt+=(-s $FC_BUILDSYS)
|
||||
buildopt+=(-t $FC_BUILD_TYPE)
|
||||
buildopt+=(-X $FC_XML_BACKEND)
|
||||
sh .gitlab-ci/build.sh ${buildopt[@]}
|
||||
variables:
|
||||
FC_BUILDSYS: autotools
|
||||
FC_XML_BACKEND: expat
|
||||
FC_BUILD_TYPE: both
|
||||
FC_BUILD_DISTCHECK: 0
|
||||
FC_BUILD_NO_INSTALL: 0
|
||||
FC_BUILD_NO_CHECK: 0
|
||||
|
||||
.fc_artifacts:
|
||||
artifacts:
|
||||
name: fontconfig-$CI_COMMIT_SHA-$CI_JOB_ID
|
||||
when: always
|
||||
expire_in: 5 days
|
||||
paths:
|
||||
- build*/fc-build.log
|
||||
- build*/fontconfig-*.tar.*
|
||||
- build*/test/*log
|
||||
- build*/fontconfig*/_build
|
||||
- build*/meson-logs/*
|
||||
|
||||
#######################################
|
||||
# #
|
||||
# test stage #
|
||||
# #
|
||||
#######################################
|
||||
|
||||
{% for distro in distributions %}
|
||||
{% for version in distro.versions %}
|
||||
{% for build in distro.builds %}
|
||||
|
||||
{% if not 'build_only' in build or build.build_only == version %}
|
||||
t_{{distro.name}}:{{version}}:{{build.name}}:
|
||||
extends:
|
||||
{% if distro.qemu_based %}
|
||||
- .build-in-qemu@template
|
||||
{% else %}
|
||||
- .build@template
|
||||
{% endif %}
|
||||
- .fdo.distribution-image@{{distro.name}}
|
||||
- .fc_artifacts
|
||||
variables:
|
||||
FC_DISTRO_NAME: {{distro.name}}
|
||||
FDO_DISTRIBUTION_VERSION: '{{version}}'
|
||||
FDO_DISTRIBUTION_TAG: ${{distro.name.upper()}}_TAG
|
||||
{# Where we have extra_variables defined, add them to the list #}
|
||||
{% if build.variables is defined %}
|
||||
{% for key, value in build.variables.items() %}
|
||||
{{key}}: {{value}}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
needs:
|
||||
- '{{distro.name}}:{{version}}@container-prep'
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
#######################################
|
||||
# #
|
||||
# deploy stage #
|
||||
# #
|
||||
#######################################
|
||||
|
||||
check-merge-request:
|
||||
extends:
|
||||
- .fdo.ci-fairy
|
||||
stage: deploy
|
||||
script:
|
||||
- ci-fairy check-merge-request --require-allow-collaboration --junit-xml=results.xml
|
||||
artifacts:
|
||||
when: on_failure
|
||||
reports:
|
||||
junit: results.xml
|
||||
allow_failure: true
|
||||
|
|
@ -1,140 +0,0 @@
|
|||
.default_tag: &default_tag "2023-12-05.1"
|
||||
|
||||
distributions:
|
||||
- name: fedora
|
||||
tag: *default_tag
|
||||
base_type: fedora
|
||||
qemu_based: false
|
||||
versions:
|
||||
- "rawhide"
|
||||
- "39"
|
||||
- "38"
|
||||
builds:
|
||||
- name: "autotools shared expat"
|
||||
variables:
|
||||
FC_BUILDSYS: autotools
|
||||
FC_BUILD_TYPE: shared
|
||||
FC_XML_BACKEND: expat
|
||||
- name: "autotools shared libxml2"
|
||||
variables:
|
||||
FC_BUILDSYS: autotools
|
||||
FC_BUILD_TYPE: shared
|
||||
FC_XML_BACKEND: libxml2
|
||||
FC_BUILD_DISTCHECK: 1
|
||||
- name: "meson shared expat"
|
||||
variables:
|
||||
FC_BUILDSYS: meson
|
||||
FC_BUILD_TYPE: shared
|
||||
FC_XML_BACKEND: expat
|
||||
- name: "autotools static expat"
|
||||
build_only: "rawhide"
|
||||
variables:
|
||||
FC_BUILDSYS: autotools
|
||||
FC_BUILD_TYPE: static
|
||||
FC_XML_BACKEND: expat
|
||||
- name: "autotools static libxml2"
|
||||
build_only: "rawhide"
|
||||
variables:
|
||||
FC_BUILDSYS: autotools
|
||||
FC_BUILD_TYPE: static
|
||||
FC_XML_BACKEND: libxml2
|
||||
- name: "meson static expat"
|
||||
build_only: "rawhide"
|
||||
variables:
|
||||
FC_BUILDSYS: meson
|
||||
FC_BUILD_TYPE: static
|
||||
FC_XML_BACKEND: expat
|
||||
- name: "mingw autotools static libxml2"
|
||||
build_only: "rawhide"
|
||||
variables:
|
||||
FC_BUILDSYS: autotools
|
||||
FC_BUILD_TYPE: static
|
||||
FC_XML_BACKEND: libxml2
|
||||
FC_BUILD_PLATFORM: mingw
|
||||
FC_BUILD_ARCH: x86_64-mingw32
|
||||
- name: "mingw meson static expat"
|
||||
build_only: "rawhide"
|
||||
variables:
|
||||
FC_BUILDSYS: meson
|
||||
FC_BUILD_TYPE: static
|
||||
FC_XML_BACKEND: expat
|
||||
FC_BUILD_PLATFORM: mingw
|
||||
FC_BUILD_ARCH: linux-mingw-w64-64bit
|
||||
FC_BUILD_NO_INSTALL: 1
|
||||
- name: freebsd
|
||||
tag: *default_tag
|
||||
base_type: freebsd
|
||||
qemu_based: true
|
||||
versions:
|
||||
- "14.0"
|
||||
- "13.2"
|
||||
builds:
|
||||
- name: "autotools shared expat"
|
||||
variables:
|
||||
FC_BUILDSYS: autotools
|
||||
FC_BUILD_TYPE: shared
|
||||
FC_XML_BACKEND: expat
|
||||
MAKE: gmake
|
||||
FC_BUILD_NO_CHECK: 1 # FIXME: There is GNU-specific parameter issue in touch command.
|
||||
- name: "autotools shared libxml2"
|
||||
variables:
|
||||
FC_BUILDSYS: autotools
|
||||
FC_BUILD_TYPE: shared
|
||||
FC_XML_BACKEND: libxml2
|
||||
MAKE: gmake
|
||||
FC_BUILD_NO_CHECK: 1
|
||||
- name: "meson shared expat"
|
||||
variables:
|
||||
FC_BUILDSYS: meson
|
||||
FC_BUILD_TYPE: shared
|
||||
FC_XML_BACKEND: expat
|
||||
FC_BUILD_NO_CHECK: 1
|
||||
|
||||
packages:
|
||||
fedora:
|
||||
needed:
|
||||
[
|
||||
"@buildsys-build",
|
||||
"autoconf",
|
||||
"automake",
|
||||
"libtool",
|
||||
"gettext",
|
||||
"gettext-devel",
|
||||
"gperf",
|
||||
"expat-devel",
|
||||
"libxml2-devel",
|
||||
"freetype-devel",
|
||||
"json-c-devel",
|
||||
"git",
|
||||
"docbook-utils",
|
||||
"docbook-utils-pdf",
|
||||
"bubblewrap",
|
||||
"ninja-build",
|
||||
"wget",
|
||||
"python3-pip",
|
||||
"mingw64-gettext",
|
||||
"mingw64-freetype",
|
||||
"mingw64-libxml2",
|
||||
"wine",
|
||||
]
|
||||
freebsd:
|
||||
needed:
|
||||
[
|
||||
"gcc",
|
||||
"autoconf",
|
||||
"automake",
|
||||
"libtool",
|
||||
"gettext",
|
||||
"gperf",
|
||||
"expat",
|
||||
"libxml2",
|
||||
"freetype2",
|
||||
"json-c",
|
||||
"git",
|
||||
"ninja",
|
||||
"wget",
|
||||
"python3",
|
||||
"py39-pip",
|
||||
"pkgconf",
|
||||
"gmake",
|
||||
]
|
|
@ -1,3 +0,0 @@
|
|||
#! /bin/sh
|
||||
|
||||
eval `rpm --eval %{mingw64_env}`
|
|
@ -1,3 +0,0 @@
|
|||
#! /bin/bash
|
||||
|
||||
set -ex
|
|
@ -1,4 +0,0 @@
|
|||
#! /bin/sh
|
||||
|
||||
echo "** Cross build not supported."
|
||||
exit 1
|
|
@ -1,3 +0,0 @@
|
|||
#! /bin/bash
|
||||
|
||||
set -ex
|
|
@ -1,21 +0,0 @@
|
|||
[host_machine]
|
||||
system = 'windows'
|
||||
cpu_family = 'x86_64'
|
||||
cpu = 'x86_64'
|
||||
endian = 'little'
|
||||
|
||||
[properties]
|
||||
# Will be picked up from env vars if not defined here
|
||||
#c_args = []
|
||||
#c_link_args = []
|
||||
|
||||
[binaries]
|
||||
c = 'x86_64-w64-mingw32-gcc'
|
||||
cpp = 'x86_64-w64-mingw32-g++'
|
||||
ar = 'x86_64-w64-mingw32-ar'
|
||||
ld = 'x86_64-w64-mingw32-ld'
|
||||
objcopy = 'x86_64-w64-mingw32-objcopy'
|
||||
strip = 'x86_64-w64-mingw32-strip'
|
||||
pkgconfig = 'x86_64-w64-mingw32-pkg-config'
|
||||
windres = 'x86_64-w64-mingw32-windres'
|
||||
# exe_wrapper = 'wine64'
|
|
@ -1,142 +0,0 @@
|
|||
# FIXME: fontconfig should probably get its own image
|
||||
# In the meantime, the latest GStreamer image tag can be found here:
|
||||
# https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/main/.gitlab-image-tags.yml#L10
|
||||
.build meson windows:
|
||||
image: "registry.freedesktop.org/gstreamer/gstreamer/amd64/windows:2022-09-23.0-main"
|
||||
stage: "test"
|
||||
tags:
|
||||
- "docker"
|
||||
- "windows"
|
||||
- "2022"
|
||||
variables:
|
||||
# Make sure any failure in PowerShell scripts is fatal
|
||||
ErrorActionPreference: "Stop"
|
||||
WarningPreference: "Stop"
|
||||
# Uncomment the following key if need to pass custom args, as well with the
|
||||
# $env:MESON_ARGS line in the `script:` blocks
|
||||
# MESON_ARGS: >-
|
||||
# -Dfoo=enabled
|
||||
# -Dbar=disabled
|
||||
before_script:
|
||||
# Make sure meson is up to date, so we don't need to rebuild the image with each release
|
||||
- pip3 install -U meson certifi
|
||||
script:
|
||||
# For some reason, options are separated by newline instead of space, so we
|
||||
# have to replace them first.
|
||||
# - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
|
||||
# Gitlab executes PowerShell in docker, but VsDevCmd.bat is a batch script.
|
||||
# Environment variables substitutions is done by PowerShell before calling
|
||||
# cmd.exe, that's why we use $env:FOO instead of %FOO%
|
||||
- cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
|
||||
SET CERT_PATH=$(python -m certifi) &&
|
||||
SET SSL_CERT_FILE=$(python -m certifi) &&
|
||||
SET REQUESTS_CA_BUNDLE=$(python -m certifi) &&
|
||||
meson build $env:MESON_ARGS &&
|
||||
ninja -C build &&
|
||||
ninja -C build test"
|
||||
artifacts:
|
||||
name: fontconfig-$CI_COMMIT_SHA-$CI_JOB_ID
|
||||
when: always
|
||||
paths:
|
||||
- build-*/meson-logs/*txt
|
||||
- prefix-*
|
||||
|
||||
meson vs2019 amd64:
|
||||
extends: ".build meson windows"
|
||||
variables:
|
||||
ARCH: "amd64"
|
||||
|
||||
meson vs2019 x86:
|
||||
extends: ".build meson windows"
|
||||
variables:
|
||||
ARCH: "x86"
|
||||
|
||||
meson macos:
|
||||
stage: "test"
|
||||
tags:
|
||||
- gst-macos-11.1
|
||||
artifacts:
|
||||
name: "${CI_JOB_NAME}_${CI_COMMIT_SHA}"
|
||||
expire_in: "5 days"
|
||||
when: "always"
|
||||
paths:
|
||||
- "build/meson-logs/*txt"
|
||||
before_script:
|
||||
- pip3 install --upgrade pip
|
||||
# Make sure meson is up to date
|
||||
- pip3 install -U meson
|
||||
# Need to install certificates for python
|
||||
- pip3 install --upgrade certifi
|
||||
# Anther way t install certificates
|
||||
- open /Applications/Python\ 3.8/Install\ Certificates.command
|
||||
# Get ninja
|
||||
- curl -L -o ninja-mac.zip https://github.com/ninja-build/ninja/releases/download/v1.10.0/ninja-mac.zip
|
||||
- unzip ninja-mac.zip
|
||||
- sudo cp ninja /usr/local/bin
|
||||
script:
|
||||
- CERT_PATH=$(python3 -m certifi) && export SSL_CERT_FILE=${CERT_PATH} && export REQUESTS_CA_BUNDLE=${CERT_PATH} && meson build
|
||||
- ninja -C build
|
||||
- ninja -C build test
|
||||
|
||||
# msys infrastructure is a bit broken, disable for now
|
||||
meson msys2:
|
||||
extends: ".build meson windows"
|
||||
when: "manual"
|
||||
allow_failure: true
|
||||
script:
|
||||
# For some reason, options are separated by newline instead of space, so we
|
||||
# have to replace them first.
|
||||
# - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ")
|
||||
|
||||
- $env:PATH += ";C:\msys64\usr\bin;C:\msys64\mingw64/bin;C:\msys64\mingw32/bin"
|
||||
# XXX: Copied from https://gitlab.freedesktop.org/gstreamer/gst-ci/blob/master/gitlab/ci_template.yml#L487
|
||||
# For some reason docker build hangs if this is included in the image, needs more troubleshooting
|
||||
- C:\msys64\usr\bin\bash -c "pacman-key --init && pacman-key --populate msys2 && pacman-key --refresh-keys || true"
|
||||
- C:\msys64\usr\bin\bash -c "pacman -Syuu --noconfirm"
|
||||
- C:\msys64\usr\bin\bash -c "pacman -Sy --noconfirm --needed mingw-w64-x86_64-toolchain ninja"
|
||||
- C:\msys64\usr\bin\bash -c "meson build $env:MESON_ARGS &&
|
||||
ninja -C build &&
|
||||
ninja -C build test"
|
||||
|
||||
meson android arm64 fedora:
|
||||
# See https://gitlab.freedesktop.org/gstreamer/gst-ci/container_registry/164 for current images
|
||||
image: "registry.freedesktop.org/gstreamer/gst-ci/amd64/android-fedora:2020-10-22.0-master"
|
||||
stage: "test"
|
||||
artifacts:
|
||||
name: "${CI_JOB_NAME}_${CI_COMMIT_SHA}"
|
||||
expire_in: "5 days"
|
||||
when: "always"
|
||||
paths:
|
||||
- "build/meson-logs/*.txt"
|
||||
before_script:
|
||||
- dnf install -y python3-pip gcc ninja-build gperf
|
||||
- pip3 install --user meson
|
||||
script:
|
||||
- export PATH="$HOME/.local/bin:$PATH"
|
||||
- |
|
||||
cat > android-cross-file.txt <<EOF
|
||||
[constants]
|
||||
ndk_path = '/android/ndk'
|
||||
toolchain = ndk_path + '/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android'
|
||||
api = '28'
|
||||
|
||||
[host_machine]
|
||||
system = 'android'
|
||||
cpu_family = 'aarch64'
|
||||
cpu = 'aarch64'
|
||||
endian = 'little'
|
||||
|
||||
[properties]
|
||||
sys_root = ndk_path + '/sysroot'
|
||||
c_args = ['-Wno-pointer-bool-conversion']
|
||||
c_link_args = ['-fuse-ld=gold']
|
||||
cpp_link_args = ['-fuse-ld=gold']
|
||||
|
||||
[binaries]
|
||||
c = toolchain + api + '-clang'
|
||||
cpp = toolchain + api + '-clang++'
|
||||
ar = toolchain + '-ar'
|
||||
strip = toolchain + '-strip'
|
||||
EOF
|
||||
- meson setup --werror --cross-file android-cross-file.txt build
|
||||
- meson compile --verbose -C build
|
190
COPYING
190
COPYING
|
@ -1,200 +1,22 @@
|
|||
fontconfig/COPYING
|
||||
|
||||
Copyright © 2000,2001,2002,2003,2004,2006,2007 Keith Packard
|
||||
Copyright © 2005 Patrick Lam
|
||||
Copyright © 2007 Dwayne Bailey and Translate.org.za
|
||||
Copyright © 2009 Roozbeh Pournader
|
||||
Copyright © 2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 Red Hat, Inc.
|
||||
Copyright © 2008 Danilo Šegan
|
||||
Copyright © 2012 Google, Inc.
|
||||
$Id$
|
||||
|
||||
Copyright © 2001,2003 Keith Packard
|
||||
|
||||
Permission to use, copy, modify, distribute, and sell this software and its
|
||||
documentation for any purpose is hereby granted without fee, provided that
|
||||
the above copyright notice appear in all copies and that both that
|
||||
copyright notice and this permission notice appear in supporting
|
||||
documentation, and that the name of the author(s) not be used in
|
||||
documentation, and that the name of Keith Packard not be used in
|
||||
advertising or publicity pertaining to distribution of the software without
|
||||
specific, written prior permission. The authors make no
|
||||
specific, written prior permission. Keith Packard makes no
|
||||
representations about the suitability of this software for any purpose. It
|
||||
is provided "as is" without express or implied warranty.
|
||||
|
||||
THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
||||
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
fontconfig/fc-case/CaseFolding.txt
|
||||
|
||||
© 2019 Unicode®, Inc.
|
||||
Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries.
|
||||
For terms of use, see http://www.unicode.org/terms_of_use.html
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
fontconfig/src/fcatomic.h
|
||||
|
||||
/*
|
||||
* Mutex operations. Originally copied from HarfBuzz.
|
||||
*
|
||||
* Copyright © 2007 Chris Wilson
|
||||
* Copyright © 2009,2010 Red Hat, Inc.
|
||||
* Copyright © 2011,2012,2013 Google, Inc.
|
||||
*
|
||||
* Permission is hereby granted, without written agreement and without
|
||||
* license or royalty fees, to use, copy, modify, and distribute this
|
||||
* software and its documentation for any purpose, provided that the
|
||||
* above copyright notice and the following two paragraphs appear in
|
||||
* all copies of this software.
|
||||
*
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
|
||||
* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
|
||||
* ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
|
||||
* IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
* DAMAGE.
|
||||
*
|
||||
* THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
|
||||
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
|
||||
* ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
|
||||
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Chris Wilson <chris@chris-wilson.co.uk>
|
||||
* Red Hat Author(s): Behdad Esfahbod
|
||||
* Google Author(s): Behdad Esfahbod
|
||||
*/
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
fontconfig/src/fcfoundry.h
|
||||
|
||||
/*
|
||||
Copyright © 2002-2003 by Juliusz Chroboczek
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
fontconfig/src/fcmd5.h
|
||||
|
||||
/*
|
||||
* This code implements the MD5 message-digest algorithm.
|
||||
* The algorithm is due to Ron Rivest. This code was
|
||||
* written by Colin Plumb in 1993, no copyright is claimed.
|
||||
* This code is in the public domain; do with it what you wish.
|
||||
*
|
||||
* Equivalent code is available from RSA Data Security, Inc.
|
||||
* This code has been tested against that, and is equivalent,
|
||||
* except that you don't need to include two pages of legalese
|
||||
* with every copy.
|
||||
*
|
||||
* To compute the message digest of a chunk of bytes, declare an
|
||||
* MD5Context structure, pass it to MD5Init, call MD5Update as
|
||||
* needed on buffers full of bytes, and then call MD5Final, which
|
||||
* will fill a supplied 16-byte array with the digest.
|
||||
*/
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
fontconfig/src/fcmutex.h
|
||||
|
||||
/*
|
||||
* Atomic int and pointer operations. Originally copied from HarfBuzz.
|
||||
*
|
||||
* Copyright © 2007 Chris Wilson
|
||||
* Copyright © 2009,2010 Red Hat, Inc.
|
||||
* Copyright © 2011,2012,2013 Google, Inc.
|
||||
*
|
||||
* Permission is hereby granted, without written agreement and without
|
||||
* license or royalty fees, to use, copy, modify, and distribute this
|
||||
* software and its documentation for any purpose, provided that the
|
||||
* above copyright notice and the following two paragraphs appear in
|
||||
* all copies of this software.
|
||||
*
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
|
||||
* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
|
||||
* ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
|
||||
* IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
* DAMAGE.
|
||||
*
|
||||
* THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
|
||||
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
|
||||
* ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
|
||||
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Chris Wilson <chris@chris-wilson.co.uk>
|
||||
* Red Hat Author(s): Behdad Esfahbod
|
||||
* Google Author(s): Behdad Esfahbod
|
||||
*/
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
fontconfig/src/ftglue.[ch]
|
||||
|
||||
/* ftglue.c: Glue code for compiling the OpenType code from
|
||||
* FreeType 1 using only the public API of FreeType 2
|
||||
*
|
||||
* By David Turner, The FreeType Project (www.freetype.org)
|
||||
*
|
||||
* This code is explicitely put in the public domain
|
||||
*
|
||||
* ==========================================================================
|
||||
*
|
||||
* the OpenType parser codes was originally written as an extension to
|
||||
* FreeType 1.x. As such, its source code was embedded within the library,
|
||||
* and used many internal FreeType functions to deal with memory and
|
||||
* stream i/o.
|
||||
*
|
||||
* When it was 'salvaged' for Pango and Qt, the code was "ported" to FreeType 2,
|
||||
* which basically means that some macro tricks were performed in order to
|
||||
* directly access FT2 _internal_ functions.
|
||||
*
|
||||
* these functions were never part of FT2 public API, and _did_ change between
|
||||
* various releases. This created chaos for many users: when they upgraded the
|
||||
* FreeType library on their system, they couldn't run Gnome anymore since
|
||||
* Pango refused to link.
|
||||
*
|
||||
* Very fortunately, it's possible to completely avoid this problem because
|
||||
* the FT_StreamRec and FT_MemoryRec structure types, which describe how
|
||||
* memory and stream implementations interface with the rest of the font
|
||||
* library, have always been part of the public API, and never changed.
|
||||
*
|
||||
* What we do thus is re-implement, within the OpenType parser, the few
|
||||
* functions that depend on them. This only adds one or two kilobytes of
|
||||
* code, and ensures that the parser can work with _any_ version
|
||||
* of FreeType installed on your system. How sweet... !
|
||||
*
|
||||
* Note that we assume that Pango doesn't use any other internal functions
|
||||
* from FreeType. It used to in old versions, but this should no longer
|
||||
* be the case. (crossing my fingers).
|
||||
*
|
||||
* - David Turner
|
||||
* - The FreeType Project (www.freetype.org)
|
||||
*
|
||||
* PS: This "glue" code is explicitely put in the public domain
|
||||
*/
|
||||
|
|
52
INSTALL
52
INSTALL
|
@ -2,12 +2,7 @@ Fontconfig is built with the traditional configure script:
|
|||
|
||||
$ ./configure --sysconfdir=/etc --prefix=/usr --mandir=/usr/share/man
|
||||
|
||||
If you checked out from the git repository (as opposed to downloading a
|
||||
tarball), you need to run autogen.sh instead of configure:
|
||||
|
||||
$ ./autogen.sh --sysconfdir=/etc --prefix=/usr --mandir=/usr/share/man
|
||||
|
||||
Either way, that should generate valid Makefiles, then:
|
||||
This should generate valid Makefiles, then:
|
||||
|
||||
$ make
|
||||
$ make install
|
||||
|
@ -15,28 +10,25 @@ Either way, that should generate valid Makefiles, then:
|
|||
If you're going to package fontconfig for release, there are several
|
||||
important steps:
|
||||
|
||||
1. Create new version
|
||||
sh new-version.sh 2.xx.xx
|
||||
|
||||
2. rebuild the configuration files with autogen.sh
|
||||
./autogen.sh --sysconfdir=/etc --prefix=/usr --mandir=/usr/share/man --localstatedir=/var
|
||||
|
||||
3. make distcheck
|
||||
|
||||
4. Copy ChangeLog-2.x.y and fontconfig-2.x.y.tar.gz to
|
||||
|
||||
freedesktop.org:/srv/www.freedesktop.org/www/software/fontconfig/release
|
||||
|
||||
5. Update the Fontconfig Devel wiki page
|
||||
https://www.freedesktop.org/wiki/Software/fontconfig/Devel/
|
||||
|
||||
6. Update the fontconfig documentation
|
||||
|
||||
scp -rp doc/fontconfig-user.html doc/fontconfig-devel freedesktop.org:/srv/www.freedesktop.org/www/software/fontconfig
|
||||
|
||||
7. Compute md5sums for release files:
|
||||
md5sum fontconfig-2.4.x.tar.gz ChangeLog-2.4.x
|
||||
|
||||
8. Post a note to fontconfig@fontconfig.org. Include the md5sums.
|
||||
1. Update the version numbers
|
||||
configure.in
|
||||
fontconfig/fontconfig.h
|
||||
2. Fix the README
|
||||
Change version number
|
||||
Set the date
|
||||
3. Commit those changes
|
||||
4. rebuild the configuration files with autogen.sh
|
||||
sh autogen.sh --sysconfdir=/etc --prefix=/usr --mandir=/usr/share/man --localstatedir=/var
|
||||
5. make distcheck (NB: won't work without docbook-utils -PL)
|
||||
6. tag the tree
|
||||
cvs tag fc-2_2_xx
|
||||
7. Split out the ChangeLog into ChangeLog-2.2.xx with
|
||||
the changes since the previous release
|
||||
8. Copy ChangeLog-2.2.xx and fontconfig-2.2.xx.tar.gz to
|
||||
freedesktop.org:/srv/fontconfig.freedesktop.org/www/release
|
||||
9. Update the Fontconfig Devel wiki page
|
||||
http://fontconfig.org/wiki/Devel
|
||||
10. Compute md5sums for release files:
|
||||
md5sum fontconfig-2.2.xx.tar.gz ChangeLog-2.2.xx
|
||||
11. Post a note to fontconfig@fontconfig.org. Include the md5sums.
|
||||
gpg sign the message.
|
||||
|
||||
|
|
169
Makefile.am
169
Makefile.am
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# fontconfig/Makefile.am
|
||||
# $Id$
|
||||
#
|
||||
# Copyright © 2003 Keith Packard
|
||||
#
|
||||
|
@ -7,137 +7,60 @@
|
|||
# documentation for any purpose is hereby granted without fee, provided that
|
||||
# the above copyright notice appear in all copies and that both that
|
||||
# copyright notice and this permission notice appear in supporting
|
||||
# documentation, and that the name of the author(s) not be used in
|
||||
# documentation, and that the name of Keith Packard not be used in
|
||||
# advertising or publicity pertaining to distribution of the software without
|
||||
# specific, written prior permission. The authors make no
|
||||
# specific, written prior permission. Keith Packard makes no
|
||||
# representations about the suitability of this software for any purpose. It
|
||||
# is provided "as is" without express or implied warranty.
|
||||
#
|
||||
# THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
# KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
# EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
# EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
||||
# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
# PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
SUBDIRS=fontconfig fc-case fc-lang src \
|
||||
fc-cache fc-cat fc-conflist fc-list fc-match \
|
||||
fc-pattern fc-query fc-scan fc-validate conf.d \
|
||||
its po po-conf test
|
||||
if ENABLE_DOCS
|
||||
SUBDIRS += doc
|
||||
endif
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
MESON_FILES = \
|
||||
conf.d/link_confs.py \
|
||||
conf.d/write-35-lang-normalize-conf.py \
|
||||
doc/edit-sgml.py \
|
||||
doc/extract-man-list.py \
|
||||
doc/run-quiet.py \
|
||||
fc-case/fc-case.py \
|
||||
fc-lang/fc-lang.py \
|
||||
meson.build \
|
||||
meson_options.txt \
|
||||
src/cutout.py \
|
||||
src/fcstdint.h.in \
|
||||
src/fcwindows.h \
|
||||
src/fontconfig.def.in \
|
||||
src/makealias.py \
|
||||
$(wildcard $(srcdir)/*/meson.build) \
|
||||
$(wildcard $(srcdir)/meson-cc-tests/*) \
|
||||
$(wildcard $(srcdir)/subprojects/*.wrap)
|
||||
|
||||
EXTRA_DIST = config.rpath \
|
||||
fontconfig.pc.in \
|
||||
fonts.conf.in \
|
||||
DOCSRC=@DOCSRC@
|
||||
SUBDIRS=fontconfig fc-case fc-lang fc-glyphname fc-arch src \
|
||||
fc-cache fc-cat fc-list fc-match conf.d $(DOCSRC) test
|
||||
|
||||
EXTRA_DIST = \
|
||||
fontconfig.pc.in \
|
||||
fonts.conf.in \
|
||||
fonts.dtd \
|
||||
fontconfig-zip.in \
|
||||
config-fixups.h \
|
||||
$(MESON_FILES)
|
||||
CLEANFILES = fonts.conf
|
||||
DISTCLEANFILES = config.cache doltcompile
|
||||
MAINTAINERCLEANFILES = \
|
||||
$(srcdir)/aclocal.m4 \
|
||||
$(srcdir)/autoscan.log \
|
||||
$(srcdir)/compile \
|
||||
$(srcdir)/config.guess \
|
||||
$(srcdir)/config.h.in \
|
||||
$(srcdir)/config.sub \
|
||||
$(srcdir)/configure.scan \
|
||||
$(srcdir)/depcomp \
|
||||
$(srcdir)/install-sh \
|
||||
$(srcdir)/ltmain.sh \
|
||||
$(srcdir)/missing \
|
||||
$(srcdir)/mkinstalldirs \
|
||||
$(srcdir)/test-driver \
|
||||
`find "$(srcdir)" -type f -name Makefile.in -print`
|
||||
fontconfig.spec.in \
|
||||
fontconfig.spec \
|
||||
fontconfig-zip.in
|
||||
|
||||
pkgconfigdir=$(libdir)/pkgconfig
|
||||
pkgconfig_DATA = fontconfig.pc
|
||||
|
||||
baseconfigdir = $(BASECONFIGDIR)
|
||||
configdir = $(CONFIGDIR)
|
||||
configdir=$(CONFDIR)
|
||||
config_DATA=fonts.dtd
|
||||
|
||||
xmldir = $(XMLDIR)
|
||||
xml_DATA = fonts.dtd
|
||||
|
||||
if !ENABLE_CACHE_BUILD
|
||||
if CROSS_COMPILING
|
||||
RUN_FC_CACHE_TEST=false
|
||||
else
|
||||
RUN_FC_CACHE_TEST=test -z "$(DESTDIR)"
|
||||
endif
|
||||
|
||||
# Creating ChangeLog from git log:
|
||||
|
||||
MAINTAINERCLEANFILES += $(srcdir)/ChangeLog
|
||||
EXTRA_DIST += ChangeLog
|
||||
ChangeLog: $(srcdir)/ChangeLog
|
||||
$(srcdir)/ChangeLog:
|
||||
if test -d "$(srcdir)/.git"; then \
|
||||
(GIT_DIR=$(top_srcdir)/.git $(GIT) log --stat) | fmt --split-only > $@.tmp \
|
||||
&& mv -f $@.tmp $@ \
|
||||
|| ($(RM) $@.tmp; \
|
||||
echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
|
||||
(test -f $@ || echo git-log is required to generate this file >> $@)); \
|
||||
else \
|
||||
test -f $@ || \
|
||||
(echo A git checkout and git-log is required to generate ChangeLog >&2 && \
|
||||
echo A git checkout and git-log is required to generate this file >> $@); \
|
||||
fi
|
||||
|
||||
.PHONY: ChangeLog
|
||||
|
||||
FC_CONFIGDIR = $(subst $(BASECONFIGDIR)/,,$(CONFIGDIR))
|
||||
|
||||
fonts.conf: fonts.conf.in Makefile
|
||||
sed \
|
||||
-e 's,@FC_CACHEDIR\@,$(FC_CACHEDIR),g' \
|
||||
-e 's,@FC_DEFAULT_FONTS\@, $(FC_DEFAULT_FONTS),g' \
|
||||
-e 's,@FC_FONTPATH\@,$(FC_FONTPATH),g' \
|
||||
-e 's,@CONFIGDIR\@,$(FC_CONFIGDIR),g' \
|
||||
-e 's,@PACKAGE\@,$(PACKAGE),g' \
|
||||
-e 's,@VERSION\@,$(VERSION),g' \
|
||||
$(srcdir)/$@.in > $@.tmp && \
|
||||
mv $@.tmp $@
|
||||
|
||||
install-data-local: fonts.conf
|
||||
$(mkinstalldirs) $(DESTDIR)$(baseconfigdir) $(DESTDIR)$(fc_cachedir)
|
||||
if [ -f $(DESTDIR)$(baseconfigdir)/fonts.conf ]; then \
|
||||
echo "backing up existing $(DESTDIR)$(baseconfigdir)/fonts.conf"; \
|
||||
mv $(DESTDIR)$(baseconfigdir)/fonts.conf $(DESTDIR)$(baseconfigdir)/fonts.conf.bak; \
|
||||
install-data-local:
|
||||
$(mkinstalldirs) $(DESTDIR)$(configdir)
|
||||
if [ -f $(DESTDIR)$(configdir)/fonts.conf ]; then \
|
||||
echo "backing up existing $(DESTDIR)$(configdir)/fonts.conf"; \
|
||||
mv $(DESTDIR)$(configdir)/fonts.conf $(DESTDIR)$(configdir)/fonts.conf.bak; \
|
||||
fi
|
||||
if [ -f $(srcdir)/fonts.conf ]; then \
|
||||
echo " $(INSTALL_DATA) $(srcdir)/fonts.conf $(DESTDIR)$(baseconfigdir)/fonts.conf"; \
|
||||
$(INSTALL_DATA) $(srcdir)/fonts.conf $(DESTDIR)$(baseconfigdir)/fonts.conf; \
|
||||
echo " $(INSTALL_DATA) $(srcdir)/fonts.conf $(DESTDIR)$(configdir)/fonts.conf"; \
|
||||
$(INSTALL_DATA) $(srcdir)/fonts.conf $(DESTDIR)$(configdir)/fonts.conf; \
|
||||
else if [ -f fonts.conf ]; then \
|
||||
echo " $(INSTALL_DATA) fonts.conf $(DESTDIR)$(baseconfigdir)/fonts.conf"; \
|
||||
$(INSTALL_DATA) fonts.conf $(DESTDIR)$(baseconfigdir)/fonts.conf; \
|
||||
echo " $(INSTALL_DATA) fonts.conf $(DESTDIR)$(configdir)/fonts.conf"; \
|
||||
$(INSTALL_DATA) fonts.conf $(DESTDIR)$(configdir)/fonts.conf; \
|
||||
fi; fi
|
||||
@(if $(RUN_FC_CACHE_TEST); then \
|
||||
echo "fc-cache$(EXEEXT) -s -f -v"; \
|
||||
fc-cache/fc-cache$(EXEEXT) -s -f -v; \
|
||||
echo " fc-cache/fc-cache -s -f -v"; \
|
||||
fc-cache/fc-cache -s -f -v; \
|
||||
else \
|
||||
echo "***"; \
|
||||
echo "*** Warning: fonts.cache not built"; \
|
||||
|
@ -148,14 +71,14 @@ install-data-local: fonts.conf
|
|||
|
||||
uninstall-local:
|
||||
if [ -f $(srcdir)/fonts.conf ]; then \
|
||||
if cmp -s $(srcdir)/fonts.conf $(DESTDIR)$(baseconfigdir)/fonts.conf; then \
|
||||
echo " uninstall standard $(DESTDIR)$(baseconfigdir)/fonts.conf"; \
|
||||
$(RM) $(DESTDIR)$(baseconfigdir)/fonts.conf; \
|
||||
if cmp -s $(srcdir)/fonts.conf $(DESTDIR)$(configdir)/fonts.conf; then \
|
||||
echo " uninstall standard $(DESTDIR)$(configdir)/fonts.conf"; \
|
||||
rm -f $(DESTDIR)$(configdir)/fonts.conf; \
|
||||
fi; \
|
||||
else if [ -f fonts.conf ]; then \
|
||||
if cmp -s fonts.conf $(DESTDIR)$(baseconfigdir)/fonts.conf; then \
|
||||
echo " uninstall standard $(DESTDIR)$(baseconfigdir)/fonts.conf"; \
|
||||
$(RM) $(DESTDIR)$(baseconfigdir)/fonts.conf; \
|
||||
if cmp -s fonts.conf $(DESTDIR)$(configdir)/fonts.conf; then \
|
||||
echo " uninstall standard $(DESTDIR)$(configdir)/fonts.conf"; \
|
||||
rm -f $(DESTDIR)$(configdir)/fonts.conf; \
|
||||
fi; \
|
||||
fi; fi
|
||||
|
||||
|
@ -166,21 +89,7 @@ debuild-unsigned: debuild-dirs
|
|||
(cd $(distdir)/debian && debuild -us -uc)
|
||||
|
||||
debuild-dirs: distdir
|
||||
$(RM) $(PACKAGE)_$(VERSION).orig.tar.gz
|
||||
$(RM) -r $(distdir).orig
|
||||
rm -f $(PACKAGE)_$(VERSION).orig.tar.gz
|
||||
rm -rf $(distdir).orig
|
||||
cp -a $(distdir) $(distdir).orig
|
||||
$(RM) -r $(distdir).orig/debian
|
||||
|
||||
DISTCHECK_CONFIGURE_FLAGS =
|
||||
|
||||
check-versions:
|
||||
@$(GREP) -e "^[[:space:]]*version[[:space:]]*:[[:space:]]*'$(VERSION)'," $(srcdir)/meson.build >/dev/null || { \
|
||||
echo "======================================================================================"; \
|
||||
echo "Meson version does not seem to match autotools version $(VERSION), update meson.build!"; \
|
||||
echo "======================================================================================"; \
|
||||
exit 1; \
|
||||
}
|
||||
|
||||
all-local: check-versions
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
rm -rf $(distdir).orig/debian
|
||||
|
|
51
Tools.mk
51
Tools.mk
|
@ -1,51 +0,0 @@
|
|||
# -*- encoding: utf-8 -*-
|
||||
#
|
||||
# Copyright © 2003 Keith Packard
|
||||
# Copyright © 2013 Google, Inc.
|
||||
#
|
||||
# Permission to use, copy, modify, distribute, and sell this software and its
|
||||
# documentation for any purpose is hereby granted without fee, provided that
|
||||
# the above copyright notice appear in all copies and that both that
|
||||
# copyright notice and this permission notice appear in supporting
|
||||
# documentation, and that the name of the author(s) not be used in
|
||||
# advertising or publicity pertaining to distribution of the software without
|
||||
# specific, written prior permission. The authors make no
|
||||
# representations about the suitability of this software for any purpose. It
|
||||
# is provided "as is" without express or implied warranty.
|
||||
#
|
||||
# THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
# EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
||||
# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
# PERFORMANCE OF THIS SOFTWARE.
|
||||
#
|
||||
# Google Author(s): Behdad Esfahbod
|
||||
|
||||
DIR=fc-$(TAG)
|
||||
OUT=fc$(TAG)
|
||||
TMPL=$(OUT).tmpl.h
|
||||
TARG=$(OUT).h
|
||||
TOOL=$(srcdir)/$(DIR).py
|
||||
|
||||
noinst_SCRIPTS = $(TOOL)
|
||||
EXTRA_DIST = $(TARG) $(TMPL) $(DIST)
|
||||
|
||||
$(TARG): $(TMPL) $(TOOL) $(DEPS)
|
||||
$(AM_V_GEN) \
|
||||
$(RM) $(TARG) && \
|
||||
$(PYTHON) $(TOOL) $(ARGS) --template $< --output $(TARG).tmp && \
|
||||
mv $(TARG).tmp $(TARG) || ( $(RM) $(TARG).tmp && false )
|
||||
noinst_HEADERS=$(TARG)
|
||||
|
||||
ALIAS_FILES = fcalias.h fcaliastail.h
|
||||
|
||||
BUILT_SOURCES = $(ALIAS_FILES)
|
||||
|
||||
$(ALIAS_FILES):
|
||||
$(AM_V_GEN) touch $@
|
||||
|
||||
CLEANFILES = $(ALIAS_FILES)
|
||||
|
||||
MAINTAINERCLEANFILES = $(TARG)
|
120
autogen.sh
120
autogen.sh
|
@ -1,26 +1,4 @@
|
|||
#!/bin/sh
|
||||
# fontconfig/autogen.sh
|
||||
#
|
||||
# Copyright © 2000 Keith Packard
|
||||
#
|
||||
# Permission to use, copy, modify, distribute, and sell this software and its
|
||||
# documentation for any purpose is hereby granted without fee, provided that
|
||||
# the above copyright notice appear in all copies and that both that
|
||||
# copyright notice and this permission notice appear in supporting
|
||||
# documentation, and that the name of the author(s) not be used in
|
||||
# advertising or publicity pertaining to distribution of the software without
|
||||
# specific, written prior permission. The authors make no
|
||||
# representations about the suitability of this software for any purpose. It
|
||||
# is provided "as is" without express or implied warranty.
|
||||
#
|
||||
# THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
# EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
||||
# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
# PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
# Run this to generate all the initial makefiles, etc.
|
||||
|
||||
set -e
|
||||
|
@ -28,39 +6,23 @@ set -e
|
|||
srcdir=`dirname $0`
|
||||
test -z "$srcdir" && srcdir=.
|
||||
|
||||
case "$1" in
|
||||
--noconf*)
|
||||
AUTOGEN_SUBDIR_MODE="true"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
|
||||
ORIGDIR=`pwd`
|
||||
cd $srcdir
|
||||
PROJECT=Fontconfig
|
||||
TEST_TYPE=-f
|
||||
FILE=fontconfig/fontconfig.h
|
||||
ACLOCAL=${ACLOCAL-aclocal}
|
||||
LIBTOOLIZE=${LIBTOOLIZE-libtoolize}
|
||||
AUTOPOINT=${AUTOPOINT-autopoint}
|
||||
AUTORECONF=${AUTORECONF-autoreconf}
|
||||
AUTORECONF_FLAGS=${AUTORECONF_FLAGS-"-i"}
|
||||
GPERF=${GPERF-gperf}
|
||||
GETTEXTIZE=${GETTEXTIZE-gettextize}
|
||||
GETTEXTIZE_FLAGS="--force --no-changelog"
|
||||
AUTOMAKE=${AUTOMAKE-automake}
|
||||
AUTOHEADER=${AUTOHEADER-autoheader}
|
||||
AUTOCONF=${AUTOCONF-autoconf}
|
||||
LIBTOOLIZE_FLAGS="--copy --force"
|
||||
|
||||
DIE=0
|
||||
|
||||
($GPERF --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "You must have gperf installed to compile $PROJECT."
|
||||
echo "Install the appropriate package for your distribution."
|
||||
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
|
||||
DIE=1
|
||||
}
|
||||
|
||||
have_libtool=false
|
||||
if $LIBTOOLIZE --version < /dev/null > /dev/null 2>&1 ; then
|
||||
libtool_version=`$LIBTOOLIZE --version | sed 's/^.* \([0-9][.][0-9.]*\)[^ ]*$/\1/'`
|
||||
libtool_version=`$LIBTOOLIZE --version | sed 's/^[^0-9]*\([0-9].[0-9.]*\).*/\1/'`
|
||||
case $libtool_version in
|
||||
1.4*|1.5*|1.6*|1.7*|2*)
|
||||
have_libtool=true
|
||||
|
@ -74,27 +36,38 @@ if $have_libtool ; then : ; else
|
|||
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
|
||||
DIE=1
|
||||
fi
|
||||
($GETTEXTIZE --version) < /dev/null > /dev/null 2>&1 || {
|
||||
|
||||
($AUTOCONF --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "You must have gettext installed to compile $PROJECT."
|
||||
echo "Install the appropriate package for your distribution,"
|
||||
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
|
||||
DIE=1
|
||||
}
|
||||
($AUTOPOINT --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "You must have autopoint installed to compile $PROJECT."
|
||||
echo "Install the appropriate package for your distribution,"
|
||||
echo "You must have autoconf installed to compile $PROJECT."
|
||||
echo "libtool the appropriate package for your distribution,"
|
||||
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
|
||||
DIE=1
|
||||
}
|
||||
($AUTORECONF --version) < /dev/null > /dev/null 2>&1 || {
|
||||
|
||||
have_automake=false
|
||||
need_libtoolize=true
|
||||
if $AUTOMAKE --version < /dev/null > /dev/null 2>&1 ; then
|
||||
automake_version=`$AUTOMAKE --version | grep 'automake (GNU automake)' | sed 's/^[^0-9]*\(.*\)/\1/'`
|
||||
case $automake_version in
|
||||
1.2*|1.3*|1.4)
|
||||
;;
|
||||
1.4*)
|
||||
have_automake=true
|
||||
need_libtoolize=false
|
||||
;;
|
||||
*)
|
||||
have_automake=true
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if $have_automake ; then : ; else
|
||||
echo
|
||||
echo "You must have autoreconf installed to compile $PROJECT."
|
||||
echo "Install the appropriate package for your distribution,"
|
||||
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
|
||||
echo "You must have automake 1.4-p1 installed to compile $PROJECT."
|
||||
echo "Get ftp://ftp.gnu.org/pub/gnu/automake/automake-1.4-p1.tar.gz"
|
||||
echo "(or a newer version if it is available)"
|
||||
DIE=1
|
||||
}
|
||||
fi
|
||||
|
||||
if test "$DIE" -eq 1; then
|
||||
exit 1
|
||||
|
@ -105,21 +78,38 @@ test $TEST_TYPE $FILE || {
|
|||
exit 1
|
||||
}
|
||||
|
||||
if test -z "$AUTOGEN_SUBDIR_MODE" -a -z "$NOCONFIGURE"; then
|
||||
if test -z "$AUTOGEN_SUBDIR_MODE"; then
|
||||
if test -z "$*"; then
|
||||
echo "I am going to run ./configure with no arguments - if you wish "
|
||||
echo "to pass any to it, please specify them on the $0 command line."
|
||||
fi
|
||||
fi
|
||||
|
||||
echo Running $AUTORECONF $AUTORECONF_FLAGS
|
||||
$AUTORECONF $AUTORECONF_FLAGS
|
||||
echo Running $ACLOCAL $ACLOCAL_FLAGS
|
||||
$ACLOCAL $ACLOCAL_FLAGS
|
||||
|
||||
# optionally run autoheader
|
||||
if $AUTOHEADER --version < /dev/null > /dev/null 2>&1; then
|
||||
echo Running $AUTOHEADER
|
||||
$AUTOHEADER
|
||||
fi
|
||||
|
||||
case $need_libtoolize in
|
||||
true)
|
||||
echo Running $LIBTOOLIZE $LIBTOOLIZE_FLAGS
|
||||
$LIBTOOLIZE $LIBTOOLIZE_FLAGS
|
||||
;;
|
||||
esac
|
||||
|
||||
echo Running $AUTOMAKE -a $am_opt
|
||||
$AUTOMAKE -a $am_opt
|
||||
echo Running $AUTOCONF
|
||||
$AUTOCONF
|
||||
cd $ORIGDIR
|
||||
|
||||
if test -z "$AUTOGEN_SUBDIR_MODE" -a -z "$NOCONFIGURE"; then
|
||||
echo Running $srcdir/configure "$@"
|
||||
$srcdir/configure "$@"
|
||||
if test -z "$AUTOGEN_SUBDIR_MODE"; then
|
||||
echo Running $srcdir/configure --enable-maintainer-mode "$@"
|
||||
$srcdir/configure --enable-maintainer-mode "$@"
|
||||
|
||||
echo
|
||||
echo "Now type 'make' to compile $PROJECT."
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
Makefile
|
||||
Makefile.in
|
|
@ -1,9 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<description>Re-define fonts dirs sample</description>
|
||||
|
||||
<reset-dirs />
|
||||
<dir prefix="xdg">fonts</dir>
|
||||
|
||||
</fontconfig>
|
|
@ -1,16 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<description>Enable autohinter if font doesn't have any hinting</description>
|
||||
<!-- Use the Autohinter -->
|
||||
<match target="font">
|
||||
<test name="fonthashint"><bool>false</bool></test>
|
||||
<!--
|
||||
This sort of configuration is available on the major desktop environments
|
||||
and we don't have to break it with "assign" unconditionally. however, we
|
||||
want to set something for others. So we use "append" here to get this working
|
||||
in both cases so that most clients would takes a look at the first place only.
|
||||
-->
|
||||
<edit name="autohint" mode="append"><bool>true</bool></edit>
|
||||
</match>
|
||||
</fontconfig>
|
|
@ -1,15 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<description>Enable autohinter</description>
|
||||
<!-- Use the Autohinter -->
|
||||
<match target="pattern">
|
||||
<!--
|
||||
This sort of configuration is available on the major desktop environments
|
||||
and we don't have to break it with "assign" unconditionally. however, we
|
||||
want to set something for others. So we use "append" here to get this working
|
||||
in both cases so that most clients would takes a look at the first place only.
|
||||
-->
|
||||
<edit name="autohint" mode="append"><bool>true</bool></edit>
|
||||
</match>
|
||||
</fontconfig>
|
|
@ -0,0 +1,539 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
<!-- /etc/fonts/conf.d/10-fonts-persian.conf -->
|
||||
<!--
|
||||
fonts-persian.conf
|
||||
To configure Persian fonts from The FarsiWeb Project.
|
||||
|
||||
Copyright (C) 2005 Sharif FarsiWeb, Inc. <license@farsiweb.info>
|
||||
|
||||
Permission to use, copy, modify, distribute, and sell this software and its
|
||||
documentation for any purpose is hereby granted without fee, provided that
|
||||
the above copyright notice appear in all copies and that both that
|
||||
copyright notice and this permission notice appear in supporting
|
||||
documentation, and that the name of Sharif FarsiWeb, Inc. not be used in
|
||||
advertising or publicity pertaining to distribution of the software without
|
||||
specific, written prior permission. Sharif FarsiWeb, Inc. makes no
|
||||
representations about the suitability of this software for any purpose. It
|
||||
is provided "as is" without express or implied warranty.
|
||||
|
||||
SHARIF FARSIWEB, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
||||
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
ChangeLog:
|
||||
2005-04-03 Behdad Esfahbod: Initial revision.
|
||||
2005-10-09 Behdad Esfahbod: Turned off back-slant and Tahoma sections.
|
||||
2005-11-30 Behdad Esfahbod: Set Titr susbtitution size to 24 points.
|
||||
|
||||
Todo:
|
||||
Add generic font "fantasy". Add some fonts into that category.
|
||||
Maybe add a "cursive" generic font.
|
||||
-->
|
||||
<fontconfig>
|
||||
|
||||
|
||||
<!--
|
||||
We don't want weak bindings. So got to use the syntactical expansion
|
||||
of alias tag to do binding=same :(. Please support that in alias.
|
||||
-->
|
||||
|
||||
|
||||
<!-- Deprecated fonts are discouraged -->
|
||||
|
||||
<!-- Nesf[2] is officially deprecated and has problematic tables -->
|
||||
<match>
|
||||
<test name="family">
|
||||
<string>Nesf</string>
|
||||
</test>
|
||||
<edit name="family" mode="assign" binding="same">
|
||||
<string>Nesf2</string>
|
||||
</edit>
|
||||
</match>
|
||||
<match>
|
||||
<test name="family">
|
||||
<string>Nesf2</string>
|
||||
</test>
|
||||
<edit name="family" mode="assign" binding="same">
|
||||
<string>Persian_sansserif_default</string>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
<!-- Tahoma looks awful (TURNED-OFF) -->
|
||||
<!--match>
|
||||
<test name="family">
|
||||
<string>Tahoma</string>
|
||||
</test>
|
||||
<edit name="family" mode="prepend" binding="same">
|
||||
<string>Persian_sansserif_default</string>
|
||||
</edit>
|
||||
</match-->
|
||||
|
||||
<!-- Name changes and spelling variant aliases -->
|
||||
|
||||
<!-- Changed due to trademark problems -->
|
||||
<match>
|
||||
<test name="family">
|
||||
<string>Nazanin</string>
|
||||
</test>
|
||||
<edit name="family" mode="assign" binding="same">
|
||||
<string>Nazli</string>
|
||||
</edit>
|
||||
</match>
|
||||
<match>
|
||||
<test name="family">
|
||||
<string>Lotus</string>
|
||||
</test>
|
||||
<edit name="family" mode="assign" binding="same">
|
||||
<string>Lotoos</string>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
<!-- Changed due to transcription orthography -->
|
||||
<match>
|
||||
<test name="family">
|
||||
<string>Yaqut</string>
|
||||
</test>
|
||||
<edit name="family" mode="assign" binding="same">
|
||||
<string>Yaghoot</string>
|
||||
</edit>
|
||||
</match>
|
||||
<match>
|
||||
<test name="family">
|
||||
<string>Yagut</string>
|
||||
</test>
|
||||
<edit name="family" mode="assign" binding="same">
|
||||
<string>Yaghoot</string>
|
||||
</edit>
|
||||
</match>
|
||||
<match>
|
||||
<test name="family">
|
||||
<string>Yaghut</string>
|
||||
</test>
|
||||
<edit name="family" mode="assign" binding="same">
|
||||
<string>Yaghoot</string>
|
||||
</edit>
|
||||
</match>
|
||||
<match>
|
||||
<test name="family">
|
||||
<string>Traffic</string>
|
||||
</test>
|
||||
<edit name="family" mode="assign" binding="same">
|
||||
<string>Terafik</string>
|
||||
</edit>
|
||||
</match>
|
||||
<match>
|
||||
<test name="family">
|
||||
<string>Ferdowsi</string>
|
||||
</test>
|
||||
<edit name="family" mode="assign" binding="same">
|
||||
<string>Ferdosi</string>
|
||||
</edit>
|
||||
</match>
|
||||
<match>
|
||||
<test name="family">
|
||||
<string>Fantezy</string>
|
||||
</test>
|
||||
<edit name="family" mode="assign" binding="same">
|
||||
<string>Fantezi</string>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
|
||||
<!-- Classify fonts. -->
|
||||
|
||||
<!-- Persian_title class -->
|
||||
<match>
|
||||
<test name="family">
|
||||
<string>Jadid</string>
|
||||
</test>
|
||||
<edit name="family" mode="append" binding="same">
|
||||
<string>Persian_title</string>
|
||||
</edit>
|
||||
</match>
|
||||
<match>
|
||||
<test name="family">
|
||||
<string>Titr</string>
|
||||
</test>
|
||||
<edit name="family" mode="append" binding="same">
|
||||
<string>Persian_title</string>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
<!-- Persian_fantasy class -->
|
||||
<match>
|
||||
<test name="family">
|
||||
<string>Kamran</string>
|
||||
</test>
|
||||
<edit name="family" mode="append" binding="same">
|
||||
<string>Homa</string>
|
||||
</edit>
|
||||
<edit name="family" mode="append" binding="same">
|
||||
<string>Persian_fantasy</string>
|
||||
</edit>
|
||||
</match>
|
||||
<match>
|
||||
<test name="family">
|
||||
<string>Homa</string>
|
||||
</test>
|
||||
<edit name="family" mode="append" binding="same">
|
||||
<string>Kamran</string>
|
||||
</edit>
|
||||
<edit name="family" mode="append" binding="same">
|
||||
<string>Persian_fantasy</string>
|
||||
</edit>
|
||||
</match>
|
||||
<match>
|
||||
<test name="family">
|
||||
<string>Fantezi</string>
|
||||
</test>
|
||||
<edit name="family" mode="append" binding="same">
|
||||
<string>Persian_fantasy</string>
|
||||
</edit>
|
||||
</match>
|
||||
<match>
|
||||
<test name="family">
|
||||
<string>Tabassom</string>
|
||||
</test>
|
||||
<edit name="family" mode="append" binding="same">
|
||||
<string>Persian_fantasy</string>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
<!-- Persian_square class -->
|
||||
<match>
|
||||
<test name="family">
|
||||
<string>Arshia</string>
|
||||
</test>
|
||||
<edit name="family" mode="append" binding="same">
|
||||
<string>Persian_square</string>
|
||||
</edit>
|
||||
</match>
|
||||
<match>
|
||||
<test name="family">
|
||||
<string>Nasim</string>
|
||||
</test>
|
||||
<edit name="family" mode="append" binding="same">
|
||||
<string>Persian_square</string>
|
||||
</edit>
|
||||
</match>
|
||||
<match>
|
||||
<test name="family">
|
||||
<string>Elham</string>
|
||||
</test>
|
||||
<edit name="family" mode="append" binding="same">
|
||||
<string>Farnaz</string>
|
||||
</edit>
|
||||
<edit name="family" mode="append" binding="same">
|
||||
<string>Persian_square</string>
|
||||
</edit>
|
||||
</match>
|
||||
<match>
|
||||
<test name="family">
|
||||
<string>Farnaz</string>
|
||||
</test>
|
||||
<edit name="family" mode="append" binding="same">
|
||||
<string>Elham</string>
|
||||
</edit>
|
||||
<edit name="family" mode="append" binding="same">
|
||||
<string>Persian_square</string>
|
||||
</edit>
|
||||
</match>
|
||||
<match>
|
||||
<test name="family">
|
||||
<string>Sina</string>
|
||||
</test>
|
||||
<edit name="family" mode="append" binding="same">
|
||||
<string>Persian_square</string>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
<!-- Font ordering per class -->
|
||||
|
||||
<!-- Persian_title class -->
|
||||
<match>
|
||||
<test name="family">
|
||||
<string>Persian_title</string>
|
||||
</test>
|
||||
<edit name="family" mode="append" binding="same">
|
||||
<string>Persian_serif</string>
|
||||
</edit>
|
||||
<edit name="family" mode="append" binding="same">
|
||||
<string>Jadid</string>
|
||||
</edit>
|
||||
<edit name="family" mode="append" binding="same">
|
||||
<string>Titr</string>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
<!-- Persian_fantasy class -->
|
||||
<match>
|
||||
<test name="family">
|
||||
<string>Persian_fantasy</string>
|
||||
</test>
|
||||
<edit name="family" mode="append" binding="same">
|
||||
<string>Persian_square</string>
|
||||
</edit>
|
||||
<edit name="family" mode="append" binding="same">
|
||||
<string>Tabassom</string>
|
||||
</edit>
|
||||
<edit name="family" mode="append" binding="same">
|
||||
<string>Fantezi</string>
|
||||
</edit>
|
||||
<edit name="family" mode="append" binding="same">
|
||||
<string>Kamran</string>
|
||||
</edit>
|
||||
<edit name="family" mode="append" binding="same">
|
||||
<string>Homa</string>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
<!-- Persian_square class -->
|
||||
<match>
|
||||
<test name="family">
|
||||
<string>Persian_square</string>
|
||||
</test>
|
||||
<edit name="family" mode="append" binding="same">
|
||||
<string>Persian_serif</string>
|
||||
</edit>
|
||||
<edit name="family" mode="append" binding="same">
|
||||
<string>Sina</string>
|
||||
</edit>
|
||||
<edit name="family" mode="append" binding="same">
|
||||
<string>Nasim</string>
|
||||
</edit>
|
||||
<edit name="family" mode="append" binding="same">
|
||||
<string>Farnaz</string>
|
||||
</edit>
|
||||
<edit name="family" mode="append" binding="same">
|
||||
<string>Elham</string>
|
||||
</edit>
|
||||
<edit name="family" mode="append" binding="same">
|
||||
<string>Arshia</string>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
<!-- Register the fonts that we actually do have -->
|
||||
|
||||
<match target="font">
|
||||
<test name="family">
|
||||
<string>Elham</string>
|
||||
</test>
|
||||
<edit name="foundry">
|
||||
<string>farsiweb</string>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
<match target="font">
|
||||
<test name="family">
|
||||
<string>Homa</string>
|
||||
</test>
|
||||
<edit name="foundry">
|
||||
<string>farsiweb</string>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
<match target="font">
|
||||
<test name="family">
|
||||
<string>Koodak</string>
|
||||
</test>
|
||||
<edit name="foundry">
|
||||
<string>farsiweb</string>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
<match target="font">
|
||||
<test name="family">
|
||||
<string>Nazli</string>
|
||||
</test>
|
||||
<edit name="foundry">
|
||||
<string>farsiweb</string>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
<match target="font">
|
||||
<test name="family">
|
||||
<string>Roya</string>
|
||||
</test>
|
||||
<edit name="foundry">
|
||||
<string>farsiweb</string>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
<match target="font">
|
||||
<test name="family">
|
||||
<string>Terafik</string>
|
||||
</test>
|
||||
<edit name="foundry">
|
||||
<string>farsiweb</string>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
<match target="font">
|
||||
<test name="family">
|
||||
<string>Titr</string>
|
||||
</test>
|
||||
<edit name="foundry">
|
||||
<string>farsiweb</string>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
|
||||
<!-- Our fonts should oblique to the other side (TURNED-OFF) -->
|
||||
|
||||
<match target="font">
|
||||
<test name="foundry">
|
||||
<!--string>farsiweb</string-->
|
||||
<string>TURNED-OFF</string>
|
||||
</test>
|
||||
<test name="foundry">
|
||||
<string>farsiweb</string>
|
||||
</test>
|
||||
<!-- check to see if the font is roman -->
|
||||
<test name="slant">
|
||||
<const>roman</const>
|
||||
</test>
|
||||
<!-- check to see if the pattern requested non-roman -->
|
||||
<test target="pattern" name="slant" compare="not_eq">
|
||||
<const>roman</const>
|
||||
</test>
|
||||
<!-- multiply the matrix to slant the font -->
|
||||
<edit name="matrix" mode="assign">
|
||||
<times>
|
||||
<name>matrix</name>
|
||||
<matrix><double>1</double><double>-0.2</double>
|
||||
<double>0</double><double>1</double>
|
||||
</matrix>
|
||||
</times>
|
||||
</edit>
|
||||
<!-- pretend the font is oblique now -->
|
||||
<edit name="slant" mode="assign">
|
||||
<const>oblique</const>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
|
||||
<!--
|
||||
We can't hint our fonts well, so turn off hinting.
|
||||
Moreover, the bitmaps we have designed (well, they
|
||||
have designed), suck, so disable them too.
|
||||
-->
|
||||
|
||||
<match target="font">
|
||||
<test name="foundry">
|
||||
<string>farsiweb</string>
|
||||
</test>
|
||||
<edit name="autohint">
|
||||
<bool>false</bool>
|
||||
</edit>
|
||||
<edit name="hinting">
|
||||
<bool>false</bool>
|
||||
</edit>
|
||||
<edit name="embeddedbitmap">
|
||||
<bool>false</bool>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
|
||||
<!-- Alias our fonts to common families -->
|
||||
|
||||
<!-- Persian serif fonts -->
|
||||
<alias>
|
||||
<family>serif</family>
|
||||
<accept>
|
||||
<family>Nazli</family>
|
||||
<family>Lotoos</family>
|
||||
<family>Mitra</family>
|
||||
<family>Ferdosi</family>
|
||||
<family>Badr</family>
|
||||
<family>Zar</family>
|
||||
</accept>
|
||||
</alias>
|
||||
|
||||
<!-- Persian sans-serif fonts -->
|
||||
<alias>
|
||||
<family>sans-serif</family>
|
||||
<accept>
|
||||
<family>Roya</family>
|
||||
<family>Koodak</family>
|
||||
<family>Terafik</family>
|
||||
</accept>
|
||||
</alias>
|
||||
|
||||
<!-- Persian monospace fonts -->
|
||||
<alias>
|
||||
<family>monospace</family>
|
||||
<accept>
|
||||
<!-- Not really monospace -->
|
||||
<family>Terafik</family>
|
||||
</accept>
|
||||
</alias>
|
||||
|
||||
|
||||
<!-- Use Titr in titles -->
|
||||
|
||||
<!-- Both serif... -->
|
||||
<match>
|
||||
<test name="family">
|
||||
<string>serif</string>
|
||||
</test>
|
||||
<test name="weight" compare="more_eq">
|
||||
<int>200</int>
|
||||
</test>
|
||||
<test name="size" compare="more_eq">
|
||||
<double>24</double>
|
||||
</test>
|
||||
<edit name="family" mode="prepend">
|
||||
<string>Titr</string>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
<!-- and sans-serif. -->
|
||||
<match>
|
||||
<test name="family">
|
||||
<string>sans-serif</string>
|
||||
</test>
|
||||
<test name="weight" compare="more_eq">
|
||||
<int>200</int>
|
||||
</test>
|
||||
<test name="size" compare="more_eq">
|
||||
<double>24</double>
|
||||
</test>
|
||||
<edit name="family" mode="prepend">
|
||||
<string>Titr</string>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
<!-- and more. -->
|
||||
<match>
|
||||
<test name="family">
|
||||
<string>Persian_sansserif_default</string>
|
||||
</test>
|
||||
<test name="weight" compare="more_eq">
|
||||
<int>200</int>
|
||||
</test>
|
||||
<test name="size" compare="more_eq">
|
||||
<double>24</double>
|
||||
</test>
|
||||
<edit name="family" mode="prepend" binding="same">
|
||||
<string>Titr</string>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
|
||||
<!-- Default substituted for deprecated sans-serif fonts -->
|
||||
|
||||
<match>
|
||||
<test name="family">
|
||||
<string>Persian_sansserif_default</string>
|
||||
</test>
|
||||
<edit name="family" mode="assign" binding="same">
|
||||
<string>Roya</string>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
</fontconfig>
|
|
@ -1,15 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<description>Set hintfull to hintstyle</description>
|
||||
|
||||
<match target="pattern">
|
||||
<!--
|
||||
This sort of configuration is available on the major desktop environments
|
||||
and we don't have to break it with "assign" unconditionally. however, we
|
||||
want to set something for others. So we use "append" here to get this working
|
||||
in both cases so that most clients would takes a look at the first place only.
|
||||
-->
|
||||
<edit name="hintstyle" mode="append"><const>hintfull</const></edit>
|
||||
</match>
|
||||
</fontconfig>
|
|
@ -1,15 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<description>Set hintmedium to hintstyle</description>
|
||||
|
||||
<match target="pattern">
|
||||
<!--
|
||||
This sort of configuration is available on the major desktop environments
|
||||
and we don't have to break it with "assign" unconditionally. however, we
|
||||
want to set something for others. So we use "append" here to get this working
|
||||
in both cases so that most clients would takes a look at the first place only.
|
||||
-->
|
||||
<edit name="hintstyle" mode="append"><const>hintmedium</const></edit>
|
||||
</match>
|
||||
</fontconfig>
|
|
@ -1,15 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<description>Set hintnone to hintstyle</description>
|
||||
|
||||
<match target="pattern">
|
||||
<!--
|
||||
This sort of configuration is available on the major desktop environments
|
||||
and we don't have to break it with "assign" unconditionally. however, we
|
||||
want to set something for others. So we use "append" here to get this working
|
||||
in both cases so that most clients would takes a look at the first place only.
|
||||
-->
|
||||
<edit name="hintstyle" mode="append"><const>hintnone</const></edit>
|
||||
</match>
|
||||
</fontconfig>
|
|
@ -1,15 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<description>Set hintslight to hintstyle</description>
|
||||
|
||||
<match target="pattern">
|
||||
<!--
|
||||
This sort of configuration is available on the major desktop environments
|
||||
and we don't have to break it with "assign" unconditionally. however, we
|
||||
want to set something for others. So we use "append" here to get this working
|
||||
in both cases so that most clients would takes a look at the first place only.
|
||||
-->
|
||||
<edit name="hintstyle" mode="append"><const>hintslight</const></edit>
|
||||
</match>
|
||||
</fontconfig>
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<description>Disable antialiasing</description>
|
||||
<match target="pattern">
|
||||
<edit name="antialias" mode="append"><bool>false</bool></edit>
|
||||
</match>
|
||||
</fontconfig>
|
|
@ -1,83 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<description>Bitmap scaling</description>
|
||||
<!--
|
||||
If font is bitmap, calculate scale factor.
|
||||
Note that color bitmap fonts have scalable=true, while
|
||||
non-color ones have scalable=false. Both groups have outline=false.
|
||||
-->
|
||||
<match target="font">
|
||||
<test name="outline" compare="eq">
|
||||
<bool>false</bool>
|
||||
</test>
|
||||
<edit name="pixelsizefixupfactor" mode="assign">
|
||||
<divide>
|
||||
<name target="pattern">pixelsize</name>
|
||||
<name target="font" >pixelsize</name>
|
||||
</divide>
|
||||
</edit>
|
||||
</match>
|
||||
<!--
|
||||
For non-scalable bitmap fonts (ie. non-color), skip
|
||||
minor scaling if hinting is enabled.
|
||||
-->
|
||||
<match target="font">
|
||||
<test name="outline" compare="eq">
|
||||
<bool>false</bool>
|
||||
</test>
|
||||
<test name="scalable" compare="eq">
|
||||
<bool>false</bool>
|
||||
</test>
|
||||
<test name="hinting" compare="eq">
|
||||
<bool>true</bool>
|
||||
</test>
|
||||
<edit name="scalingnotneeded" mode="assign">
|
||||
<and>
|
||||
<less>
|
||||
<name>pixelsizefixupfactor</name>
|
||||
<double>1.2</double>
|
||||
</less>
|
||||
<more>
|
||||
<name>pixelsizefixupfactor</name>
|
||||
<double>0.8</double>
|
||||
</more>
|
||||
</and>
|
||||
</edit>
|
||||
</match>
|
||||
<match target="font">
|
||||
<test name="scalingnotneeded" compare="eq">
|
||||
<bool>true</bool>
|
||||
</test>
|
||||
<edit name="pixelsizefixupfactor" mode="assign">
|
||||
<double>1.0</double>
|
||||
</edit>
|
||||
</match>
|
||||
<!--
|
||||
If we *are* going to scale, go ahead and do it.
|
||||
-->
|
||||
<match target="font">
|
||||
<test name="outline" compare="eq">
|
||||
<bool>false</bool>
|
||||
</test>
|
||||
<test name="pixelsizefixupfactor" compare="not_eq">
|
||||
<double>1.0</double>
|
||||
</test>
|
||||
<edit name="matrix" mode="assign">
|
||||
<times>
|
||||
<name>matrix</name>
|
||||
<matrix>
|
||||
<name>pixelsizefixupfactor</name> <double>0</double>
|
||||
<double>0</double> <name>pixelsizefixupfactor</name>
|
||||
</matrix>
|
||||
</times>
|
||||
</edit>
|
||||
<edit name="size" mode="assign">
|
||||
<divide>
|
||||
<name>size</name>
|
||||
<name>pixelsizefixupfactor</name>
|
||||
</divide>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
</fontconfig>
|
|
@ -1,15 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<description>Enable sub-pixel rendering with the BGR stripes layout</description>
|
||||
<!-- Enable sub-pixel rendering -->
|
||||
<match target="pattern">
|
||||
<!--
|
||||
This sort of configuration is available on the major desktop environments
|
||||
and we don't have to break it with "assign" unconditionally. however, we
|
||||
want to set something for others. So we use "append" here to get this working
|
||||
in both cases so that most clients would takes a look at the first place only.
|
||||
-->
|
||||
<edit name="rgba" mode="append"><const>bgr</const></edit>
|
||||
</match>
|
||||
</fontconfig>
|
|
@ -1,15 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<description>Disable sub-pixel rendering</description>
|
||||
<!-- Disable sub-pixel rendering -->
|
||||
<match target="pattern">
|
||||
<!--
|
||||
This sort of configuration is available on the major desktop environments
|
||||
and we don't have to break it with "assign" unconditionally. however, we
|
||||
want to set something for others. So we use "append" here to get this working
|
||||
in both cases so that most clients would takes a look at the first place only.
|
||||
-->
|
||||
<edit name="rgba" mode="append"><const>none</const></edit>
|
||||
</match>
|
||||
</fontconfig>
|
|
@ -1,15 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<description>Enable sub-pixel rendering with the RGB stripes layout</description>
|
||||
<!-- Enable sub-pixel rendering -->
|
||||
<match target="pattern">
|
||||
<!--
|
||||
This sort of configuration is available on the major desktop environments
|
||||
and we don't have to break it with "assign" unconditionally. however, we
|
||||
want to set something for others. So we use "append" here to get this working
|
||||
in both cases so that most clients would takes a look at the first place only.
|
||||
-->
|
||||
<edit name="rgba" mode="append"><const>rgb</const></edit>
|
||||
</match>
|
||||
</fontconfig>
|
|
@ -1,15 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<description>Enable sub-pixel rendering with the vertical BGR stripes layout</description>
|
||||
<!-- Enable sub-pixel rendering -->
|
||||
<match target="pattern">
|
||||
<!--
|
||||
This sort of configuration is available on the major desktop environments
|
||||
and we don't have to break it with "assign" unconditionally. however, we
|
||||
want to set something for others. So we use "append" here to get this working
|
||||
in both cases so that most clients would takes a look at the first place only.
|
||||
-->
|
||||
<edit name="rgba" mode="append"><const>vbgr</const></edit>
|
||||
</match>
|
||||
</fontconfig>
|
|
@ -1,15 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<description>Enable sub-pixel rendering with the vertical RGB stripes layout</description>
|
||||
<!-- Enable sub-pixel rendering -->
|
||||
<match target="pattern">
|
||||
<!--
|
||||
This sort of configuration is available on the major desktop environments
|
||||
and we don't have to break it with "assign" unconditionally. however, we
|
||||
want to set something for others. So we use "append" here to get this working
|
||||
in both cases so that most clients would takes a look at the first place only.
|
||||
-->
|
||||
<edit name="rgba" mode="append"><const>vrgb</const></edit>
|
||||
</match>
|
||||
</fontconfig>
|
|
@ -1,15 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<description>Disable hinting</description>
|
||||
<!-- Disable hinting -->
|
||||
<match target="pattern">
|
||||
<!--
|
||||
This sort of configuration is available on the major desktop environments
|
||||
and we don't have to break it with "assign" unconditionally. however, we
|
||||
want to set something for others. So we use "append" here to get this working
|
||||
in both cases so that most clients would takes a look at the first place only.
|
||||
-->
|
||||
<edit name="hinting" mode="append"><bool>false</bool></edit>
|
||||
</match>
|
||||
</fontconfig>
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<description>Enable antialiasing</description>
|
||||
<match target="pattern">
|
||||
<edit name="antialias" mode="append"><bool>true</bool></edit>
|
||||
</match>
|
||||
</fontconfig>
|
|
@ -0,0 +1,5 @@
|
|||
<!-- Available Gujarti fonts look much better without hinting -->
|
||||
<match target="font">
|
||||
<test name="family"><string>Lohit Gujarati</string></test>
|
||||
<edit name="hinting"><bool>false</bool></edit>
|
||||
</match>
|
|
@ -1,17 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<description>Use lcddefault as default for LCD filter</description>
|
||||
<!-- Use lcddefault as default for LCD filter -->
|
||||
<match target="pattern">
|
||||
<!--
|
||||
This sort of configuration is available on the major desktop environments
|
||||
and we don't have to break it with "assign" unconditionally. however, we
|
||||
want to set something for others. So we use "append" here to get this working
|
||||
in both cases so that most clients would takes a look at the first place only.
|
||||
-->
|
||||
<edit mode="append" name="lcdfilter">
|
||||
<const>lcddefault</const>
|
||||
</edit>
|
||||
</match>
|
||||
</fontconfig>
|
|
@ -1,17 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<description>Use lcdlegacy as default for LCD filter</description>
|
||||
<!-- Use lcdlegacy as default for LCD filter -->
|
||||
<match target="pattern">
|
||||
<!--
|
||||
This sort of configuration is available on the major desktop environments
|
||||
and we don't have to break it with "assign" unconditionally. however, we
|
||||
want to set something for others. So we use "append" here to get this working
|
||||
in both cases so that most clients would takes a look at the first place only.
|
||||
-->
|
||||
<edit mode="append" name="lcdfilter">
|
||||
<const>lcdlegacy</const>
|
||||
</edit>
|
||||
</match>
|
||||
</fontconfig>
|
|
@ -1,17 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<description>Use lcdlight as default for LCD filter</description>
|
||||
<!-- Use lcdlight as default for LCD filter -->
|
||||
<match target="pattern">
|
||||
<!--
|
||||
This sort of configuration is available on the major desktop environments
|
||||
and we don't have to break it with "assign" unconditionally. however, we
|
||||
want to set something for others. So we use "append" here to get this working
|
||||
in both cases so that most clients would takes a look at the first place only.
|
||||
-->
|
||||
<edit mode="append" name="lcdfilter">
|
||||
<const>lcdlight</const>
|
||||
</edit>
|
||||
</match>
|
||||
</fontconfig>
|
|
@ -1,17 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<description>Use lcdnone as default for LCD filter</description>
|
||||
<!-- Use lcdnone as default for LCD filter -->
|
||||
<match target="pattern">
|
||||
<!--
|
||||
This sort of configuration is available on the major desktop environments
|
||||
and we don't have to break it with "assign" unconditionally. however, we
|
||||
want to set something for others. So we use "append" here to get this working
|
||||
in both cases so that most clients would takes a look at the first place only.
|
||||
-->
|
||||
<edit mode="append" name="lcdfilter">
|
||||
<const>lcdnone</const>
|
||||
</edit>
|
||||
</match>
|
||||
</fontconfig>
|
|
@ -1,49 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<description>Disable hinting for Bitstream Vera fonts when the size is less than 8ppem</description>
|
||||
<!--
|
||||
The Bitstream Vera fonts have GASP entries suggesting that hinting be
|
||||
disabled below 8 ppem, but FreeType ignores those, preferring to use
|
||||
the data found in the instructed hints. The initial Vera release
|
||||
didn't include the right instructions in the 'prep' table. Fix this
|
||||
by disabling hinting manually at smaller sizes (< 8ppem)
|
||||
-->
|
||||
|
||||
<match target="font">
|
||||
<test name="family" compare="eq" ignore-blanks="true">
|
||||
<string>Bitstream Vera Sans</string>
|
||||
</test>
|
||||
<test name="pixelsize" compare="less">
|
||||
<double>7.5</double>
|
||||
</test>
|
||||
<edit name="hinting">
|
||||
<bool>false</bool>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
<match target="font">
|
||||
<test name="family" compare="eq" ignore-blanks="true">
|
||||
<string>Bitstream Vera Serif</string>
|
||||
</test>
|
||||
<test name="pixelsize" compare="less">
|
||||
<double>7.5</double>
|
||||
</test>
|
||||
<edit name="hinting">
|
||||
<bool>false</bool>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
<match target="font">
|
||||
<test name="family" compare="eq" ignore-blanks="true">
|
||||
<string>Bitstream Vera Sans Mono</string>
|
||||
</test>
|
||||
<test name="pixelsize" compare="less">
|
||||
<double>7.5</double>
|
||||
</test>
|
||||
<edit name="hinting">
|
||||
<bool>false</bool>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
</fontconfig>
|
|
@ -1,128 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<description>Disable hinting for CJK fonts</description>
|
||||
<!-- We can't hint CJK fonts well, so turn off hinting for CJK fonts. -->
|
||||
|
||||
<match target="font">
|
||||
<test name="family" compare="eq" ignore-blanks="true">
|
||||
<string>Kochi Mincho</string>
|
||||
</test>
|
||||
<edit name="hinting" mode="assign">
|
||||
<bool>false</bool>
|
||||
</edit>
|
||||
</match>
|
||||
<match target="font">
|
||||
<test name="family" compare="eq" ignore-blanks="true">
|
||||
<string>Kochi Gothic</string>
|
||||
</test>
|
||||
<edit name="hinting" mode="assign">
|
||||
<bool>false</bool>
|
||||
</edit>
|
||||
</match>
|
||||
<match target="font">
|
||||
<test name="family" compare="eq" ignore-blanks="true">
|
||||
<string>Sazanami Mincho</string>
|
||||
</test>
|
||||
<edit name="hinting" mode="assign">
|
||||
<bool>false</bool>
|
||||
</edit>
|
||||
</match>
|
||||
<match target="font">
|
||||
<test name="family" compare="eq" ignore-blanks="true">
|
||||
<string>Sazanami Gothic</string>
|
||||
</test>
|
||||
<edit name="hinting" mode="assign">
|
||||
<bool>false</bool>
|
||||
</edit>
|
||||
</match>
|
||||
<match target="font">
|
||||
<test name="family" compare="eq" ignore-blanks="true">
|
||||
<string>Baekmuk Batang</string>
|
||||
</test>
|
||||
<edit name="hinting" mode="assign">
|
||||
<bool>false</bool>
|
||||
</edit>
|
||||
</match>
|
||||
<match target="font">
|
||||
<test name="family" compare="eq" ignore-blanks="true">
|
||||
<string>Baekmuk Dotum</string>
|
||||
</test>
|
||||
<edit name="hinting" mode="assign">
|
||||
<bool>false</bool>
|
||||
</edit>
|
||||
</match>
|
||||
<match target="font">
|
||||
<test name="family" compare="eq" ignore-blanks="true">
|
||||
<string>Baekmuk Gulim</string>
|
||||
</test>
|
||||
<edit name="hinting" mode="assign">
|
||||
<bool>false</bool>
|
||||
</edit>
|
||||
</match>
|
||||
<match target="font">
|
||||
<test name="family" compare="eq" ignore-blanks="true">
|
||||
<string>Baekmuk Headline</string>
|
||||
</test>
|
||||
<edit name="hinting" mode="assign">
|
||||
<bool>false</bool>
|
||||
</edit>
|
||||
</match>
|
||||
<match target="font">
|
||||
<test name="family" compare="eq" ignore-blanks="true">
|
||||
<string>AR PL Mingti2L Big5</string>
|
||||
</test>
|
||||
<edit name="hinting" mode="assign">
|
||||
<bool>false</bool>
|
||||
</edit>
|
||||
</match>
|
||||
<match target="font">
|
||||
<test name="family" compare="eq" ignore-blanks="true">
|
||||
<string>AR PL ShanHeiSun Uni</string>
|
||||
</test>
|
||||
<edit name="hinting" mode="assign">
|
||||
<bool>false</bool>
|
||||
</edit>
|
||||
</match>
|
||||
<match target="font">
|
||||
<test name="family" compare="eq" ignore-blanks="true">
|
||||
<string>AR PL KaitiM Big5</string>
|
||||
</test>
|
||||
<edit name="hinting" mode="assign">
|
||||
<bool>false</bool>
|
||||
</edit>
|
||||
</match>
|
||||
<match target="font">
|
||||
<test name="family" compare="eq" ignore-blanks="true">
|
||||
<string>AR PL ZenKai Uni</string>
|
||||
</test>
|
||||
<edit name="hinting" mode="assign">
|
||||
<bool>false</bool>
|
||||
</edit>
|
||||
</match>
|
||||
<match target="font">
|
||||
<test name="family" compare="eq" ignore-blanks="true">
|
||||
<string>AR PL SungtiL GB</string>
|
||||
</test>
|
||||
<edit name="hinting" mode="assign">
|
||||
<bool>false</bool>
|
||||
</edit>
|
||||
</match>
|
||||
<match target="font">
|
||||
<test name="family" compare="eq" ignore-blanks="true">
|
||||
<string>AR PL KaitiM GB</string>
|
||||
</test>
|
||||
<edit name="hinting" mode="assign">
|
||||
<bool>false</bool>
|
||||
</edit>
|
||||
</match>
|
||||
<match target="font">
|
||||
<test name="family" compare="eq" ignore-blanks="true">
|
||||
<string>ZYSong18030</string>
|
||||
</test>
|
||||
<edit name="hinting" mode="assign">
|
||||
<bool>false</bool>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
</fontconfig>
|
|
@ -1,658 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<description>Set substitutions for similar/metric-compatible families</description>
|
||||
|
||||
<!--
|
||||
|
||||
Alias similar/metric-compatible families from various sources:
|
||||
|
||||
PostScript fonts: URW fonts: GUST fonts: Windows fonts:
|
||||
====================== ================== ================= ==================
|
||||
Helvetica Nimbus Sans TeX Gyre Heros
|
||||
Helvetica Narrow Nimbus Sans Narrow TeX Gyre Heros Cn
|
||||
Times Nimbus Roman TeX Gyre Termes
|
||||
Courier Nimbus Mono PS TeX Gyre Cursor
|
||||
ITC Avant Garde Gothic URW Gothic TeX Gyre Adventor
|
||||
ITC Bookman URW Bookman TeX Gyre Bonum Bookman Old Style
|
||||
ITC Zapf Chancery Z003 TeX Gyre Chorus
|
||||
Palatino P052 TeX Gyre Pagella Palatino Linotype
|
||||
New Century Schoolbook C059 TeX Gyre Schola Century Schoolbook
|
||||
|
||||
Microsoft fonts: Liberation fonts: Google CrOS core fonts: StarOffice fonts: AMT fonts:
|
||||
================ ====================== ======================= ================= ==============
|
||||
Arial Liberation Sans Arimo Albany Albany AMT
|
||||
Arial Narrow Liberation Sans Narrow
|
||||
Times New Roman Liberation Serif Tinos Thorndale Thorndale AMT
|
||||
Courier New Liberation Mono Cousine Cumberland Cumberland AMT
|
||||
Cambria Caladea
|
||||
Calibri Carlito
|
||||
Symbol SymbolNeu
|
||||
|
||||
Microsoft fonts: Other fonts:
|
||||
================ ============
|
||||
Georgia Gelasio
|
||||
|
||||
We want for each of them to fallback to any of these available,
|
||||
but in an order preferring similar designs first. We do this in three steps:
|
||||
|
||||
1) Alias each specific to its generic family.
|
||||
e.g. Liberation Sans to Arial
|
||||
|
||||
2) Weak alias each generic to the other generic of its family.
|
||||
e.g. Arial to Helvetica
|
||||
|
||||
3) Alias each generic to its specifics.
|
||||
e.g. Arial to Liberation Sans, Arimo, Albany, and Albany AMT
|
||||
|
||||
NOTE: The (URW)++ fonts mappings of generics to specifics were removed, because
|
||||
upstream now includes them in their release of (URW)++ Core Font Set here:
|
||||
https://github.com/ArtifexSoftware/urw-base35-fonts/tree/master/fontconfig
|
||||
-->
|
||||
|
||||
<!-- Map specifics to generics -->
|
||||
|
||||
<!-- PostScript -->
|
||||
<alias binding="same">
|
||||
<family>Helvetica LT Std</family>
|
||||
<default>
|
||||
<family>Helvetica</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Nimbus Sans L</family>
|
||||
<default>
|
||||
<family>Helvetica</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Nimbus Sans</family>
|
||||
<default>
|
||||
<family>Helvetica</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>TeX Gyre Heros</family>
|
||||
<default>
|
||||
<family>Helvetica</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Nimbus Sans Narrow</family>
|
||||
<default>
|
||||
<family>Helvetica Narrow</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>TeX Gyre Heros Cn</family>
|
||||
<default>
|
||||
<family>Helvetica Narrow</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Nimbus Roman No9 L</family>
|
||||
<default>
|
||||
<family>Times</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Nimbus Roman</family>
|
||||
<default>
|
||||
<family>Times</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>TeX Gyre Termes</family>
|
||||
<default>
|
||||
<family>Times</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Courier Std</family>
|
||||
<accept>
|
||||
<family>Courier</family>
|
||||
</accept>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Nimbus Mono L</family>
|
||||
<default>
|
||||
<family>Courier</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Nimbus Mono</family>
|
||||
<default>
|
||||
<family>Courier</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Nimbus Mono PS</family>
|
||||
<default>
|
||||
<family>Courier</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>TeX Gyre Cursor</family>
|
||||
<default>
|
||||
<family>Courier</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Avant Garde</family>
|
||||
<default>
|
||||
<family>ITC Avant Garde Gothic</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>URW Gothic L</family>
|
||||
<default>
|
||||
<family>ITC Avant Garde Gothic</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>URW Gothic</family>
|
||||
<default>
|
||||
<family>ITC Avant Garde Gothic</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>TeX Gyre Adventor</family>
|
||||
<default>
|
||||
<family>ITC Avant Garde Gothic</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Bookman</family>
|
||||
<default>
|
||||
<family>ITC Bookman</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>URW Bookman L</family>
|
||||
<default>
|
||||
<family>ITC Bookman</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Bookman URW</family>
|
||||
<default>
|
||||
<family>ITC Bookman</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>URW Bookman</family>
|
||||
<default>
|
||||
<family>ITC Bookman</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>TeX Gyre Bonum</family>
|
||||
<default>
|
||||
<family>ITC Bookman</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Bookman Old Style</family>
|
||||
<default>
|
||||
<family>ITC Bookman</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Zapf Chancery</family>
|
||||
<default>
|
||||
<family>ITC Zapf Chancery</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>URW Chancery L</family>
|
||||
<default>
|
||||
<family>ITC Zapf Chancery</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Chancery URW</family>
|
||||
<default>
|
||||
<family>ITC Zapf Chancery</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Z003</family>
|
||||
<default>
|
||||
<family>ITC Zapf Chancery</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>TeX Gyre Chorus</family>
|
||||
<default>
|
||||
<family>ITC Zapf Chancery</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>URW Palladio L</family>
|
||||
<default>
|
||||
<family>Palatino</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Palladio URW</family>
|
||||
<default>
|
||||
<family>Palatino</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>P052</family>
|
||||
<default>
|
||||
<family>Palatino</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>TeX Gyre Pagella</family>
|
||||
<default>
|
||||
<family>Palatino</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Palatino Linotype</family>
|
||||
<default>
|
||||
<family>Palatino</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Century Schoolbook L</family>
|
||||
<default>
|
||||
<family>New Century Schoolbook</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Century SchoolBook URW</family>
|
||||
<default>
|
||||
<family>New Century Schoolbook</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>C059</family>
|
||||
<default>
|
||||
<family>New Century Schoolbook</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>TeX Gyre Schola</family>
|
||||
<default>
|
||||
<family>New Century Schoolbook</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Century Schoolbook</family>
|
||||
<default>
|
||||
<family>New Century Schoolbook</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<!-- Microsoft -->
|
||||
<alias binding="same">
|
||||
<family>Arimo</family>
|
||||
<default>
|
||||
<family>Arial</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Liberation Sans</family>
|
||||
<default>
|
||||
<family>Arial</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Liberation Sans Narrow</family>
|
||||
<default>
|
||||
<family>Arial Narrow</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Albany</family>
|
||||
<default>
|
||||
<family>Arial</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Albany AMT</family>
|
||||
<default>
|
||||
<family>Arial</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Tinos</family>
|
||||
<default>
|
||||
<family>Times New Roman</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Liberation Serif</family>
|
||||
<default>
|
||||
<family>Times New Roman</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Thorndale</family>
|
||||
<default>
|
||||
<family>Times New Roman</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Thorndale AMT</family>
|
||||
<default>
|
||||
<family>Times New Roman</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Cousine</family>
|
||||
<default>
|
||||
<family>Courier New</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Liberation Mono</family>
|
||||
<default>
|
||||
<family>Courier New</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Cumberland</family>
|
||||
<default>
|
||||
<family>Courier New</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Cumberland AMT</family>
|
||||
<default>
|
||||
<family>Courier New</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Gelasio</family>
|
||||
<default>
|
||||
<family>Georgia</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Caladea</family>
|
||||
<default>
|
||||
<family>Cambria</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Carlito</family>
|
||||
<default>
|
||||
<family>Calibri</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>SymbolNeu</family>
|
||||
<default>
|
||||
<family>Symbol</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<!-- Accept the other group as fallback -->
|
||||
|
||||
<!-- PostScript -->
|
||||
<alias>
|
||||
<family>Helvetica</family>
|
||||
<default>
|
||||
<family>Arial</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias>
|
||||
<family>Helvetica Narrow</family>
|
||||
<default>
|
||||
<family>Arial Narrow</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias>
|
||||
<family>Times</family>
|
||||
<default>
|
||||
<family>Times New Roman</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias>
|
||||
<family>Courier</family>
|
||||
<default>
|
||||
<family>Courier New</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<!-- Microsoft -->
|
||||
<alias>
|
||||
<family>Arial</family>
|
||||
<default>
|
||||
<family>Helvetica</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias>
|
||||
<family>Arial Narrow</family>
|
||||
<default>
|
||||
<family>Helvetica Narrow</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias>
|
||||
<family>Times New Roman</family>
|
||||
<default>
|
||||
<family>Times</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<alias>
|
||||
<family>Courier New</family>
|
||||
<default>
|
||||
<family>Courier</family>
|
||||
</default>
|
||||
</alias>
|
||||
|
||||
<!-- Map generics to specifics -->
|
||||
|
||||
<!-- PostScript -->
|
||||
<alias binding="same">
|
||||
<family>Helvetica</family>
|
||||
<accept>
|
||||
<family>Helvetica LT Std</family>
|
||||
</accept>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Helvetica</family>
|
||||
<accept>
|
||||
<family>TeX Gyre Heros</family>
|
||||
</accept>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Helvetica Narrow</family>
|
||||
<accept>
|
||||
<family>TeX Gyre Heros Cn</family>
|
||||
</accept>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Times</family>
|
||||
<accept>
|
||||
<family>TeX Gyre Termes</family>
|
||||
</accept>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Courier</family>
|
||||
<accept>
|
||||
<family>TeX Gyre Cursor</family>
|
||||
</accept>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Courier</family>
|
||||
<accept>
|
||||
<family>Courier Std</family>
|
||||
</accept>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>ITC Avant Garde Gothic</family>
|
||||
<accept>
|
||||
<family>TeX Gyre Adventor</family>
|
||||
</accept>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>ITC Bookman</family>
|
||||
<accept>
|
||||
<family>Bookman Old Style</family>
|
||||
<family>TeX Gyre Bonum</family>
|
||||
</accept>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>ITC Zapf Chancery</family>
|
||||
<accept>
|
||||
<family>TeX Gyre Chorus</family>
|
||||
</accept>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Palatino</family>
|
||||
<accept>
|
||||
<family>Palatino Linotype</family>
|
||||
<family>TeX Gyre Pagella</family>
|
||||
</accept>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>New Century Schoolbook</family>
|
||||
<accept>
|
||||
<family>Century Schoolbook</family>
|
||||
<family>TeX Gyre Schola</family>
|
||||
</accept>
|
||||
</alias>
|
||||
|
||||
<!-- Microsoft -->
|
||||
<alias binding="same">
|
||||
<family>Arial</family>
|
||||
<accept>
|
||||
<family>Arimo</family>
|
||||
<family>Liberation Sans</family>
|
||||
<family>Albany</family>
|
||||
<family>Albany AMT</family>
|
||||
</accept>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Arial Narrow</family>
|
||||
<accept>
|
||||
<family>Liberation Sans Narrow</family>
|
||||
</accept>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Times New Roman</family>
|
||||
<accept>
|
||||
<family>Tinos</family>
|
||||
<family>Liberation Serif</family>
|
||||
<family>Thorndale</family>
|
||||
<family>Thorndale AMT</family>
|
||||
</accept>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Courier New</family>
|
||||
<accept>
|
||||
<family>Cousine</family>
|
||||
<family>Liberation Mono</family>
|
||||
<family>Cumberland</family>
|
||||
<family>Cumberland AMT</family>
|
||||
</accept>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Georgia</family>
|
||||
<accept>
|
||||
<family>Gelasio</family>
|
||||
</accept>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Cambria</family>
|
||||
<accept>
|
||||
<family>Caladea</family>
|
||||
</accept>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Calibri</family>
|
||||
<accept>
|
||||
<family>Carlito</family>
|
||||
</accept>
|
||||
</alias>
|
||||
|
||||
<alias binding="same">
|
||||
<family>Symbol</family>
|
||||
<accept>
|
||||
<family>SymbolNeu</family>
|
||||
</accept>
|
||||
</alias>
|
||||
|
||||
</fontconfig>
|
|
@ -1,332 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<description>Set substitutions for non-Latin fonts</description>
|
||||
<!--
|
||||
Mark common families with their generics so we'll get
|
||||
something reasonable
|
||||
-->
|
||||
|
||||
<!--
|
||||
Serif faces
|
||||
-->
|
||||
<alias>
|
||||
<family>Nazli</family>
|
||||
<default><family>serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Lotoos</family>
|
||||
<default><family>serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Mitra</family>
|
||||
<default><family>serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Ferdosi</family>
|
||||
<default><family>serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Badr</family>
|
||||
<default><family>serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Zar</family>
|
||||
<default><family>serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Titr</family>
|
||||
<default><family>serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Jadid</family>
|
||||
<default><family>serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Kochi Mincho</family>
|
||||
<default><family>serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>AR PL SungtiL GB</family>
|
||||
<default><family>serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>AR PL Mingti2L Big5</family>
|
||||
<default><family>serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>MS 明朝</family>
|
||||
<default><family>serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>NanumMyeongjo</family>
|
||||
<default><family>serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>UnBatang</family>
|
||||
<default><family>serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Baekmuk Batang</family>
|
||||
<default><family>serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>MgOpen Canonica</family>
|
||||
<default><family>serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Sazanami Mincho</family>
|
||||
<default><family>serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>AR PL ZenKai Uni</family>
|
||||
<default><family>serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>ZYSong18030</family>
|
||||
<default><family>serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>FreeSerif</family>
|
||||
<default><family>serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>SimSun</family>
|
||||
<default><family>serif</family></default>
|
||||
</alias>
|
||||
<!--
|
||||
Sans-serif faces
|
||||
-->
|
||||
<alias>
|
||||
<family>Arshia</family>
|
||||
<default><family>sans-serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Elham</family>
|
||||
<default><family>sans-serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Farnaz</family>
|
||||
<default><family>sans-serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Nasim</family>
|
||||
<default><family>sans-serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Sina</family>
|
||||
<default><family>sans-serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Roya</family>
|
||||
<default><family>sans-serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Koodak</family>
|
||||
<default><family>sans-serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Terafik</family>
|
||||
<default><family>sans-serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Kochi Gothic</family>
|
||||
<default><family>sans-serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>AR PL KaitiM GB</family>
|
||||
<default><family>sans-serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>AR PL KaitiM Big5</family>
|
||||
<default><family>sans-serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>MS ゴシック</family>
|
||||
<default><family>sans-serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>NanumGothic</family>
|
||||
<default><family>sans-serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>UnDotum</family>
|
||||
<default><family>sans-serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Baekmuk Dotum</family>
|
||||
<default><family>sans-serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>MgOpen Modata</family>
|
||||
<default><family>sans-serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Sazanami Gothic</family>
|
||||
<default><family>sans-serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>AR PL ShanHeiSun Uni</family>
|
||||
<default><family>sans-serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>ZYSong18030</family>
|
||||
<default><family>sans-serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>FreeSans</family>
|
||||
<default><family>sans-serif</family></default>
|
||||
</alias>
|
||||
<!--
|
||||
Monospace faces
|
||||
-->
|
||||
<alias>
|
||||
<family>NSimSun</family>
|
||||
<default><family>monospace</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>ZYSong18030</family>
|
||||
<default><family>monospace</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>NanumGothicCoding</family>
|
||||
<default><family>monospace</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>FreeMono</family>
|
||||
<default><family>monospace</family></default>
|
||||
</alias>
|
||||
|
||||
<!--
|
||||
Fantasy faces
|
||||
-->
|
||||
<alias>
|
||||
<family>Homa</family>
|
||||
<default><family>fantasy</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Kamran</family>
|
||||
<default><family>fantasy</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Fantezi</family>
|
||||
<default><family>fantasy</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Tabassom</family>
|
||||
<default><family>fantasy</family></default>
|
||||
</alias>
|
||||
|
||||
<!--
|
||||
Cursive faces
|
||||
-->
|
||||
<alias>
|
||||
<family>IranNastaliq</family>
|
||||
<default><family>cursive</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Nafees Nastaleeq</family>
|
||||
<default><family>cursive</family></default>
|
||||
</alias>
|
||||
|
||||
<!--
|
||||
system-ui
|
||||
-->
|
||||
<alias>
|
||||
<family>Noto Sans Arabic UI</family>
|
||||
<default><family>system-ui</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Noto Sans Bengali UI</family>
|
||||
<default><family>system-ui</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Noto Sans Devanagari UI</family>
|
||||
<default><family>system-ui</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Noto Sans Gujarati UI</family>
|
||||
<default><family>system-ui</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Noto Sans Gurmukhi UI</family>
|
||||
<default><family>system-ui</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Noto Sans Kannada UI</family>
|
||||
<default><family>system-ui</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Noto Sans Khmer UI</family>
|
||||
<default><family>system-ui</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Noto Sans Lao UI</family>
|
||||
<default><family>system-ui</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Noto Sans Malayalam UI</family>
|
||||
<default><family>system-ui</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Noto Sans Myanmar UI</family>
|
||||
<default><family>system-ui</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Noto Sans Oriya UI</family>
|
||||
<default><family>system-ui</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Noto Sans Sinhala UI</family>
|
||||
<default><family>system-ui</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Noto Sans Tamil UI</family>
|
||||
<default><family>system-ui</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Noto Sans Telugu UI</family>
|
||||
<default><family>system-ui</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Noto Sans Thai UI</family>
|
||||
<default><family>system-ui</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Leelawadee UI</family>
|
||||
<default><family>system-ui</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Nirmala UI</family>
|
||||
<default><family>system-ui</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Yu Gothic UI</family>
|
||||
<default><family>system-ui</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Meiryo UI</family>
|
||||
<default><family>system-ui</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>MS UI Gothic</family>
|
||||
<default><family>system-ui</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Khmer UI</family>
|
||||
<default><family>system-ui</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Lao UI</family>
|
||||
<default><family>system-ui</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Microsoft JhengHei UI</family>
|
||||
<default><family>system-ui</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Microsoft YaHei UI</family>
|
||||
<default><family>system-ui</family></default>
|
||||
</alias>
|
||||
|
||||
</fontconfig>
|
|
@ -1,136 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<description>Set substitutions for emoji/math fonts</description>
|
||||
|
||||
<!-- Keep in sync with 60-generic.conf -->
|
||||
|
||||
<!-- Emoji -->
|
||||
|
||||
<!-- System emoji -->
|
||||
<alias binding="same">
|
||||
<family>Noto Color Emoji</family> <!-- Google -->
|
||||
<default><family>emoji</family></default>
|
||||
</alias>
|
||||
<alias binding="same">
|
||||
<family>Apple Color Emoji</family> <!-- Apple -->
|
||||
<default><family>emoji</family></default>
|
||||
</alias>
|
||||
<alias binding="same">
|
||||
<family>Segoe UI Emoji</family> <!-- Microsoft -->
|
||||
<default><family>emoji</family></default>
|
||||
</alias>
|
||||
<alias binding="same">
|
||||
<family>Twitter Color Emoji</family> <!-- Twitter -->
|
||||
<default><family>emoji</family></default>
|
||||
</alias>
|
||||
<alias binding="same">
|
||||
<family>EmojiOne Mozilla</family> <!-- Mozilla -->
|
||||
<default><family>emoji</family></default>
|
||||
</alias>
|
||||
<!-- Third-party emoji -->
|
||||
<alias binding="same">
|
||||
<family>Emoji Two</family>
|
||||
<default><family>emoji</family></default>
|
||||
</alias>
|
||||
<alias binding="same">
|
||||
<family>JoyPixels</family>
|
||||
<default><family>emoji</family></default>
|
||||
</alias>
|
||||
<alias binding="same">
|
||||
<family>Emoji One</family>
|
||||
<default><family>emoji</family></default>
|
||||
</alias>
|
||||
<!-- B&W -->
|
||||
<alias binding="same">
|
||||
<family>Noto Emoji</family> <!-- Google -->
|
||||
<default><family>emoji</family></default>
|
||||
</alias>
|
||||
<alias binding="same">
|
||||
<family>Android Emoji</family> <!-- Google -->
|
||||
<default><family>emoji</family></default>
|
||||
</alias>
|
||||
|
||||
<!-- Add language for emoji, to match other emoji fonts. -->
|
||||
<match>
|
||||
<test name="family">
|
||||
<string>emoji</string>
|
||||
</test>
|
||||
<edit name="lang" mode="prepend">
|
||||
<string>und-zsye</string>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
<match>
|
||||
<test name="lang">
|
||||
<string>und-zsye</string>
|
||||
</test>
|
||||
<test qual="all" name="family" compare="not_eq">
|
||||
<string>emoji</string>
|
||||
</test>
|
||||
|
||||
<!-- Add generic family. -->
|
||||
<edit name="family" mode="append" binding="strong">
|
||||
<string>emoji</string>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
|
||||
<!-- Math -->
|
||||
|
||||
<!-- https://en.wikipedia.org/wiki/Category:Mathematical_OpenType_typefaces -->
|
||||
<alias binding="same">
|
||||
<family>XITS Math</family> <!-- Khaled Hosny -->
|
||||
<default><family>math</family></default>
|
||||
</alias>
|
||||
<alias binding="same">
|
||||
<family>STIX Two Math</family> <!-- AMS -->
|
||||
<default><family>math</family></default>
|
||||
</alias>
|
||||
<alias binding="same">
|
||||
<family>Cambria Math</family> <!-- Microsoft -->
|
||||
<default><family>math</family></default>
|
||||
</alias>
|
||||
<alias binding="same">
|
||||
<family>Latin Modern Math</family> <!-- TeX -->
|
||||
<default><family>math</family></default>
|
||||
</alias>
|
||||
<alias binding="same">
|
||||
<family>Minion Math</family> <!-- Adobe -->
|
||||
<default><family>math</family></default>
|
||||
</alias>
|
||||
<alias binding="same">
|
||||
<family>Lucida Math</family> <!-- Adobe -->
|
||||
<default><family>math</family></default>
|
||||
</alias>
|
||||
<alias binding="same">
|
||||
<family>Asana Math</family>
|
||||
<default><family>math</family></default>
|
||||
</alias>
|
||||
|
||||
<!-- Add language for math, to match other math fonts. -->
|
||||
<match>
|
||||
<test name="family">
|
||||
<string>math</string>
|
||||
</test>
|
||||
<edit name="lang" mode="prepend">
|
||||
<string>und-zmth</string>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
<match>
|
||||
<test name="lang">
|
||||
<string>und-zmth</string>
|
||||
</test>
|
||||
<test qual="all" name="family" compare="not_eq">
|
||||
<string>math</string>
|
||||
</test>
|
||||
|
||||
<!-- Add generic family -->
|
||||
<edit name="family" mode="append" binding="strong">
|
||||
<string>math</string>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
|
||||
</fontconfig>
|
|
@ -1,305 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<description>Set substitutions for Latin fonts</description>
|
||||
<!--
|
||||
Mark common families with their generics so we'll get
|
||||
something reasonable
|
||||
-->
|
||||
|
||||
<!--
|
||||
Serif faces
|
||||
-->
|
||||
<alias>
|
||||
<family>Bitstream Vera Serif</family>
|
||||
<default><family>serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Cambria</family>
|
||||
<default><family>serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Constantia</family>
|
||||
<default><family>serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>DejaVu Serif</family>
|
||||
<default><family>serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Elephant</family>
|
||||
<default><family>serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Garamond</family>
|
||||
<default><family>serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Georgia</family>
|
||||
<default><family>serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Liberation Serif</family>
|
||||
<default><family>serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Luxi Serif</family>
|
||||
<default><family>serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>MS Serif</family>
|
||||
<default><family>serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Nimbus Roman No9 L</family>
|
||||
<default><family>serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Nimbus Roman</family>
|
||||
<default><family>serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Palatino Linotype</family>
|
||||
<default><family>serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Thorndale AMT</family>
|
||||
<default><family>serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Thorndale</family>
|
||||
<default><family>serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Times New Roman</family>
|
||||
<default><family>serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Times</family>
|
||||
<default><family>serif</family></default>
|
||||
</alias>
|
||||
<!--
|
||||
Sans-serif faces
|
||||
-->
|
||||
<alias>
|
||||
<family>Albany AMT</family>
|
||||
<default><family>sans-serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Albany</family>
|
||||
<default><family>sans-serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Arial Unicode MS</family>
|
||||
<default><family>sans-serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Arial</family>
|
||||
<default><family>sans-serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Bitstream Vera Sans</family>
|
||||
<default><family>sans-serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Britannic</family>
|
||||
<default><family>sans-serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Calibri</family>
|
||||
<default><family>sans-serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Candara</family>
|
||||
<default><family>sans-serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Century Gothic</family>
|
||||
<default><family>sans-serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Corbel</family>
|
||||
<default><family>sans-serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>DejaVu Sans</family>
|
||||
<default><family>sans-serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Helvetica LT Std</family>
|
||||
<default><family>sans-serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Helvetica</family>
|
||||
<default><family>sans-serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Haettenschweiler</family>
|
||||
<default><family>sans-serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Liberation Sans</family>
|
||||
<default><family>sans-serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>MS Sans Serif</family>
|
||||
<default><family>sans-serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Nimbus Sans L</family>
|
||||
<default><family>sans-serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Nimbus Sans</family>
|
||||
<default><family>sans-serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Luxi Sans</family>
|
||||
<default><family>sans-serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Tahoma</family>
|
||||
<default><family>sans-serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Trebuchet MS</family>
|
||||
<default><family>sans-serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Twentieth Century</family>
|
||||
<default><family>sans-serif</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Verdana</family>
|
||||
<default><family>sans-serif</family></default>
|
||||
</alias>
|
||||
<!--
|
||||
Monospace faces
|
||||
-->
|
||||
<alias>
|
||||
<family>Andale Mono</family>
|
||||
<default><family>monospace</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Bitstream Vera Sans Mono</family>
|
||||
<default><family>monospace</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Consolas</family>
|
||||
<default><family>monospace</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Courier New</family>
|
||||
<default><family>monospace</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Courier Std</family>
|
||||
<default><family>monospace</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Courier</family>
|
||||
<default><family>monospace</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Cumberland AMT</family>
|
||||
<default><family>monospace</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Cumberland</family>
|
||||
<default><family>monospace</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>DejaVu Sans Mono</family>
|
||||
<default><family>monospace</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Fixedsys</family>
|
||||
<default><family>monospace</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Inconsolata</family>
|
||||
<default><family>monospace</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Liberation Mono</family>
|
||||
<default><family>monospace</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Luxi Mono</family>
|
||||
<default><family>monospace</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Nimbus Mono L</family>
|
||||
<default><family>monospace</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Nimbus Mono</family>
|
||||
<default><family>monospace</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Nimbus Mono PS</family>
|
||||
<default><family>monospace</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Terminal</family>
|
||||
<default><family>monospace</family></default>
|
||||
</alias>
|
||||
<!--
|
||||
Fantasy faces
|
||||
-->
|
||||
<alias>
|
||||
<family>Bauhaus Std</family>
|
||||
<default><family>fantasy</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Cooper Std</family>
|
||||
<default><family>fantasy</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Copperplate Gothic Std</family>
|
||||
<default><family>fantasy</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Impact</family>
|
||||
<default><family>fantasy</family></default>
|
||||
</alias>
|
||||
<!--
|
||||
Cursive faces
|
||||
-->
|
||||
<alias>
|
||||
<family>Comic Sans MS</family>
|
||||
<default><family>cursive</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>ITC Zapf Chancery Std</family>
|
||||
<default><family>cursive</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Zapfino</family>
|
||||
<default><family>cursive</family></default>
|
||||
</alias>
|
||||
<!--
|
||||
system-ui
|
||||
-->
|
||||
<alias>
|
||||
<family>Cantarell</family>
|
||||
<default><family>system-ui</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Noto Sans UI</family>
|
||||
<default><family>system-ui</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Segoe UI</family>
|
||||
<default><family>system-ui</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Segoe UI Historic</family>
|
||||
<default><family>system-ui</family></default>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>Segoe UI Symbol</family>
|
||||
<default><family>system-ui</family></default>
|
||||
</alias>
|
||||
|
||||
</fontconfig>
|
|
@ -1,16 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<description>Add mono to the family when spacing is 100</description>
|
||||
<!--
|
||||
If the request specifies spacing 100, add monospace to family
|
||||
-->
|
||||
<match target="pattern">
|
||||
<test qual="any" name="spacing" compare="eq">
|
||||
<int>100</int>
|
||||
</test>
|
||||
<edit name="family" mode="prepend">
|
||||
<string>monospace</string>
|
||||
</edit>
|
||||
</match>
|
||||
</fontconfig>
|
|
@ -1,22 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<description>Add sans-serif to the family when no generic name</description>
|
||||
<!--
|
||||
If the font still has no generic name, add sans-serif
|
||||
-->
|
||||
<match target="pattern">
|
||||
<test qual="all" name="family" compare="not_eq">
|
||||
<string>sans-serif</string>
|
||||
</test>
|
||||
<test qual="all" name="family" compare="not_eq">
|
||||
<string>serif</string>
|
||||
</test>
|
||||
<test qual="all" name="family" compare="not_eq">
|
||||
<string>monospace</string>
|
||||
</test>
|
||||
<edit name="family" mode="append_last">
|
||||
<string>sans-serif</string>
|
||||
</edit>
|
||||
</match>
|
||||
</fontconfig>
|
|
@ -1,16 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<description>Load per-user customization files</description>
|
||||
<!--
|
||||
Load per-user customization files where stored on XDG Base Directory
|
||||
specification compliant places. it should be usually:
|
||||
$HOME/.config/fontconfig/conf.d
|
||||
$HOME/.config/fontconfig/fonts.conf
|
||||
-->
|
||||
<include ignore_missing="yes" prefix="xdg">fontconfig/conf.d</include>
|
||||
<include ignore_missing="yes" prefix="xdg">fontconfig/fonts.conf</include>
|
||||
<!-- the following elements will be removed in the future -->
|
||||
<include ignore_missing="yes" deprecated="yes">~/.fonts.conf.d</include>
|
||||
<include ignore_missing="yes" deprecated="yes">~/.fonts.conf</include>
|
||||
</fontconfig>
|
|
@ -1,7 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<description>Load local customization file</description>
|
||||
<!-- Load local system customization file -->
|
||||
<include ignore_missing="yes">local.conf</include>
|
||||
</fontconfig>
|
|
@ -1,11 +1,12 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
<!-- /etc/fonts/conf.d/60-delicious.conf -->
|
||||
<fontconfig>
|
||||
<!-- Fix-ups for Delicious family -->
|
||||
|
||||
<!-- Delicious 'heavy' variant says its Medium weight -->
|
||||
<match target="scan">
|
||||
<test name="family" compare="eq" ignore-blanks="true">
|
||||
<test name="family">
|
||||
<string>Delicious</string>
|
||||
</test>
|
||||
<test name="style">
|
|
@ -1,64 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<description>Set preferable fonts for emoji/math fonts</description>
|
||||
<!-- Keep in sync with 45-generic.conf -->
|
||||
|
||||
<!-- Emoji -->
|
||||
|
||||
<!-- Prefer to match color emoji font. -->
|
||||
<match>
|
||||
<test name="lang">
|
||||
<string>und-zsye</string>
|
||||
</test>
|
||||
<test qual="all" name="color" compare="not_eq">
|
||||
<bool>true</bool>
|
||||
</test>
|
||||
<test qual="all" name="color" compare="not_eq">
|
||||
<bool>false</bool>
|
||||
</test>
|
||||
<edit name="color" mode="append">
|
||||
<bool>true</bool>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
<!-- TODO
|
||||
! Match on "color" and alias B&W ones first if no color is requested.
|
||||
! That's "hard" because <alias> doesn't work in match and needs to be
|
||||
! expanded to its non-sugar form.
|
||||
!-->
|
||||
<alias binding="same">
|
||||
<family>emoji</family>
|
||||
<prefer>
|
||||
<!-- System fonts -->
|
||||
<family>Noto Color Emoji</family> <!-- Google -->
|
||||
<family>Apple Color Emoji</family> <!-- Apple -->
|
||||
<family>Segoe UI Emoji</family> <!-- Microsoft -->
|
||||
<family>Twitter Color Emoji</family> <!-- Twitter -->
|
||||
<family>EmojiOne Mozilla</family> <!-- Mozilla -->
|
||||
<!-- Third-Party fonts -->
|
||||
<family>Emoji Two</family>
|
||||
<family>JoyPixels</family>
|
||||
<family>Emoji One</family>
|
||||
<!-- Non-color -->
|
||||
<family>Noto Emoji</family> <!-- Google -->
|
||||
<family>Android Emoji</family> <!-- Google -->
|
||||
</prefer>
|
||||
</alias>
|
||||
|
||||
<!-- Math -->
|
||||
<alias binding="same">
|
||||
<!-- https://en.wikipedia.org/wiki/Category:Mathematical_OpenType_typefaces -->
|
||||
<family>math</family>
|
||||
<prefer>
|
||||
<family>XITS Math</family> <!-- Khaled Hosny -->
|
||||
<family>STIX Two Math</family> <!-- AMS -->
|
||||
<family>Cambria Math</family> <!-- Microsoft -->
|
||||
<family>Latin Modern Math</family> <!-- TeX -->
|
||||
<family>Minion Math</family> <!-- Adobe -->
|
||||
<family>Lucida Math</family> <!-- Adobe -->
|
||||
<family>Asana Math</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
|
||||
</fontconfig>
|
|
@ -1,88 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<description>Set preferable fonts for Latin</description>
|
||||
<alias>
|
||||
<family>serif</family>
|
||||
<prefer>
|
||||
<family>Noto Serif</family>
|
||||
<family>DejaVu Serif</family>
|
||||
<family>Times New Roman</family>
|
||||
<family>Thorndale AMT</family>
|
||||
<family>Luxi Serif</family>
|
||||
<family>Nimbus Roman No9 L</family>
|
||||
<family>Nimbus Roman</family>
|
||||
<family>Times</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>sans-serif</family>
|
||||
<prefer>
|
||||
<family>Noto Sans</family>
|
||||
<family>DejaVu Sans</family>
|
||||
<family>Verdana</family>
|
||||
<family>Arial</family>
|
||||
<family>Albany AMT</family>
|
||||
<family>Luxi Sans</family>
|
||||
<family>Nimbus Sans L</family>
|
||||
<family>Nimbus Sans</family>
|
||||
<family>Helvetica</family>
|
||||
<family>Lucida Sans Unicode</family>
|
||||
<family>BPG Glaho International</family> <!-- lat,cyr,arab,geor -->
|
||||
<family>Tahoma</family> <!-- lat,cyr,greek,heb,arab,thai -->
|
||||
</prefer>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>monospace</family>
|
||||
<prefer>
|
||||
<family>Noto Sans Mono</family>
|
||||
<family>DejaVu Sans Mono</family>
|
||||
<family>Inconsolata</family>
|
||||
<family>Andale Mono</family>
|
||||
<family>Courier New</family>
|
||||
<family>Cumberland AMT</family>
|
||||
<family>Luxi Mono</family>
|
||||
<family>Nimbus Mono L</family>
|
||||
<family>Nimbus Mono</family>
|
||||
<family>Nimbus Mono PS</family>
|
||||
<family>Courier</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
<!--
|
||||
Fantasy faces
|
||||
-->
|
||||
<alias>
|
||||
<family>fantasy</family>
|
||||
<prefer>
|
||||
<family>Impact</family>
|
||||
<family>Copperplate Gothic Std</family>
|
||||
<family>Cooper Std</family>
|
||||
<family>Bauhaus Std</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
<!--
|
||||
Cursive faces
|
||||
-->
|
||||
<alias>
|
||||
<family>cursive</family>
|
||||
<prefer>
|
||||
<family>ITC Zapf Chancery Std</family>
|
||||
<family>Zapfino</family>
|
||||
<family>Comic Sans MS</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
<!--
|
||||
system-ui
|
||||
-->
|
||||
<alias>
|
||||
<family>system-ui</family>
|
||||
<prefer>
|
||||
<family>Cantarell</family>
|
||||
<family>Noto Sans UI</family>
|
||||
<family>Segoe UI</family>
|
||||
<family>Segoe UI Historic</family>
|
||||
<family>Segoe UI Symbol</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
|
||||
</fontconfig>
|
|
@ -1,418 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<!--
|
||||
fonts-persian.conf
|
||||
To configure Persian fonts from The FarsiWeb Project.
|
||||
|
||||
Copyright (C) 2005 Sharif FarsiWeb, Inc. <license@farsiweb.info>
|
||||
|
||||
Permission to use, copy, modify, distribute, and sell this software and its
|
||||
documentation for any purpose is hereby granted without fee, provided that
|
||||
the above copyright notice appear in all copies and that both that
|
||||
copyright notice and this permission notice appear in supporting
|
||||
documentation, and that the name of Sharif FarsiWeb, Inc. not be used in
|
||||
advertising or publicity pertaining to distribution of the software without
|
||||
specific, written prior permission. Sharif FarsiWeb, Inc. makes no
|
||||
representations about the suitability of this software for any purpose. It
|
||||
is provided "as is" without express or implied warranty.
|
||||
|
||||
SHARIF FARSIWEB, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
||||
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
ChangeLog:
|
||||
2005-04-03 Behdad Esfahbod: Initial revision.
|
||||
2005-10-09 Behdad Esfahbod: Turned off back-slant and Tahoma sections.
|
||||
2005-11-30 Behdad Esfahbod: Set Titr susbtitution size to 24 points.
|
||||
2008 Behdad Esfahbod: Cleanup. Add fantasy and cursive.
|
||||
-->
|
||||
<fontconfig>
|
||||
|
||||
<!-- Deprecated fonts are discouraged -->
|
||||
|
||||
<!-- Nesf[2] is officially deprecated and has problematic tables -->
|
||||
<alias binding="same">
|
||||
<family>Nesf</family>
|
||||
<accept><family>Nesf2</family></accept>
|
||||
</alias>
|
||||
<alias binding="same">
|
||||
<family>Nesf2</family>
|
||||
<accept><family>Persian_sansserif_default</family></accept>
|
||||
</alias>
|
||||
|
||||
<!-- Name changes and spelling variant aliases -->
|
||||
|
||||
<alias binding="same">
|
||||
<family>Nazanin</family>
|
||||
<accept><family>Nazli</family></accept>
|
||||
</alias>
|
||||
<alias binding="same">
|
||||
<family>Lotus</family>
|
||||
<accept><family>Lotoos</family></accept>
|
||||
</alias>
|
||||
<alias binding="same">
|
||||
<family>Yaqut</family>
|
||||
<accept><family>Yaghoot</family></accept>
|
||||
</alias>
|
||||
<alias binding="same">
|
||||
<family>Yaghut</family>
|
||||
<accept><family>Yaghoot</family></accept>
|
||||
</alias>
|
||||
<alias binding="same">
|
||||
<family>Traffic</family>
|
||||
<accept><family>Terafik</family></accept>
|
||||
</alias>
|
||||
<alias binding="same">
|
||||
<family>Ferdowsi</family>
|
||||
<accept><family>Ferdosi</family></accept>
|
||||
</alias>
|
||||
<alias binding="same">
|
||||
<family>Fantezy</family>
|
||||
<accept><family>Fantezi</family></accept>
|
||||
</alias>
|
||||
|
||||
|
||||
<!-- Classify fonts. -->
|
||||
|
||||
<!-- Persian_title class -->
|
||||
<alias binding="same">
|
||||
<family>Jadid</family>
|
||||
<accept><family>Persian_title</family></accept>
|
||||
</alias>
|
||||
<alias binding="same">
|
||||
<family>Titr</family>
|
||||
<accept><family>Persian_title</family></accept>
|
||||
</alias>
|
||||
|
||||
<!-- Persian_fantasy class -->
|
||||
<alias binding="same">
|
||||
<family>Kamran</family>
|
||||
<accept>
|
||||
<family>Persian_fantasy</family>
|
||||
<family>Homa</family>
|
||||
</accept>
|
||||
</alias>
|
||||
<alias binding="same">
|
||||
<family>Homa</family>
|
||||
<accept>
|
||||
<family>Persian_fantasy</family>
|
||||
<family>Kamran</family>
|
||||
</accept>
|
||||
</alias>
|
||||
<alias binding="same">
|
||||
<family>Fantezi</family>
|
||||
<accept><family>Persian_fantasy</family></accept>
|
||||
</alias>
|
||||
<alias binding="same">
|
||||
<family>Tabassom</family>
|
||||
<accept><family>Persian_fantasy</family></accept>
|
||||
</alias>
|
||||
|
||||
<!-- Persian_square class -->
|
||||
<alias binding="same">
|
||||
<family>Arshia</family>
|
||||
<accept><family>Persian_square</family></accept>
|
||||
</alias>
|
||||
<alias binding="same">
|
||||
<family>Nasim</family>
|
||||
<accept><family>Persian_square</family></accept>
|
||||
</alias>
|
||||
<alias binding="same">
|
||||
<family>Elham</family>
|
||||
<accept>
|
||||
<family>Persian_square</family>
|
||||
<family>Farnaz</family>
|
||||
</accept>
|
||||
</alias>
|
||||
<alias binding="same">
|
||||
<family>Farnaz</family>
|
||||
<accept>
|
||||
<family>Persian_square</family>
|
||||
<family>Elham</family>
|
||||
</accept>
|
||||
</alias>
|
||||
<alias binding="same">
|
||||
<family>Sina</family>
|
||||
<accept><family>Persian_square</family></accept>
|
||||
</alias>
|
||||
|
||||
<!-- Font ordering per class -->
|
||||
|
||||
<!-- Persian_title class -->
|
||||
<alias binding="same">
|
||||
<family>Persian_title</family>
|
||||
<accept>
|
||||
<family>Titr</family>
|
||||
<family>Jadid</family>
|
||||
<family>Persian_serif</family>
|
||||
</accept>
|
||||
</alias>
|
||||
|
||||
<!-- Persian_fantasy class -->
|
||||
<alias binding="same">
|
||||
<family>Persian_fantasy</family>
|
||||
<accept>
|
||||
<family>Homa</family>
|
||||
<family>Kamran</family>
|
||||
<family>Fantezi</family>
|
||||
<family>Tabassom</family>
|
||||
<family>Persian_square</family>
|
||||
</accept>
|
||||
</alias>
|
||||
|
||||
<!-- Persian_square class -->
|
||||
<alias binding="same">
|
||||
<family>Persian_square</family>
|
||||
<accept>
|
||||
<family>Arshia</family>
|
||||
<family>Elham</family>
|
||||
<family>Farnaz</family>
|
||||
<family>Nasim</family>
|
||||
<family>Sina</family>
|
||||
<family>Persian_serif</family>
|
||||
</accept>
|
||||
</alias>
|
||||
|
||||
<!-- Register the fonts that we actually do have -->
|
||||
|
||||
<match target="scan">
|
||||
<test name="family" compare="eq" ignore-blanks="true">
|
||||
<string>Elham</string>
|
||||
</test>
|
||||
<edit name="foundry">
|
||||
<string>farsiweb</string>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
<match target="scan">
|
||||
<test name="family" compare="eq" ignore-blanks="true">
|
||||
<string>Homa</string>
|
||||
</test>
|
||||
<edit name="foundry">
|
||||
<string>farsiweb</string>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
<match target="scan">
|
||||
<test name="family" compare="eq" ignore-blanks="true">
|
||||
<string>Koodak</string>
|
||||
</test>
|
||||
<edit name="foundry">
|
||||
<string>farsiweb</string>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
<match target="scan">
|
||||
<test name="family" compare="eq" ignore-blanks="true">
|
||||
<string>Nazli</string>
|
||||
</test>
|
||||
<edit name="foundry">
|
||||
<string>farsiweb</string>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
<match target="scan">
|
||||
<test name="family" compare="eq" ignore-blanks="true">
|
||||
<string>Roya</string>
|
||||
</test>
|
||||
<edit name="foundry">
|
||||
<string>farsiweb</string>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
<match target="scan">
|
||||
<test name="family" compare="eq" ignore-blanks="true">
|
||||
<string>Terafik</string>
|
||||
</test>
|
||||
<edit name="foundry">
|
||||
<string>farsiweb</string>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
<match target="scan">
|
||||
<test name="family" compare="eq" ignore-blanks="true">
|
||||
<string>Titr</string>
|
||||
</test>
|
||||
<edit name="foundry">
|
||||
<string>farsiweb</string>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
|
||||
<!-- Our fonts should oblique to the other side (TURNED-OFF) -->
|
||||
|
||||
<match target="font">
|
||||
<test name="foundry">
|
||||
<!--string>farsiweb</string-->
|
||||
<string>TURNED-OFF</string>
|
||||
</test>
|
||||
<test name="foundry">
|
||||
<string>farsiweb</string>
|
||||
</test>
|
||||
<!-- check to see if the font is roman -->
|
||||
<test name="slant">
|
||||
<const>roman</const>
|
||||
</test>
|
||||
<!-- check to see if the pattern requested non-roman -->
|
||||
<test target="pattern" name="slant" compare="not_eq">
|
||||
<const>roman</const>
|
||||
</test>
|
||||
<!-- multiply the matrix to slant the font -->
|
||||
<edit name="matrix" mode="assign">
|
||||
<times>
|
||||
<name>matrix</name>
|
||||
<matrix><double>1</double><double>-0.2</double>
|
||||
<double>0</double><double>1</double>
|
||||
</matrix>
|
||||
</times>
|
||||
</edit>
|
||||
<!-- pretend the font is oblique now -->
|
||||
<edit name="slant" mode="assign">
|
||||
<const>oblique</const>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
|
||||
<!--
|
||||
We can't hint our fonts well, so turn off hinting.
|
||||
Moreover, the bitmaps we have designed (well, they
|
||||
have designed), suck, so disable them too.
|
||||
-->
|
||||
|
||||
<match target="font">
|
||||
<test name="foundry">
|
||||
<string>farsiweb</string>
|
||||
</test>
|
||||
<edit name="autohint">
|
||||
<bool>false</bool>
|
||||
</edit>
|
||||
<edit name="hinting">
|
||||
<bool>false</bool>
|
||||
</edit>
|
||||
<edit name="embeddedbitmap">
|
||||
<bool>false</bool>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
|
||||
<!-- Alias our fonts to common families -->
|
||||
|
||||
<!-- Persian serif fonts -->
|
||||
<alias>
|
||||
<family>serif</family>
|
||||
<accept>
|
||||
<family>Nazli</family>
|
||||
<family>Lotoos</family>
|
||||
<family>Mitra</family>
|
||||
<family>Ferdosi</family>
|
||||
<family>Badr</family>
|
||||
<family>Zar</family>
|
||||
</accept>
|
||||
</alias>
|
||||
|
||||
<!-- Persian sans-serif fonts -->
|
||||
<alias>
|
||||
<family>sans-serif</family>
|
||||
<accept>
|
||||
<family>Roya</family>
|
||||
<family>Koodak</family>
|
||||
<family>Terafik</family>
|
||||
</accept>
|
||||
</alias>
|
||||
|
||||
<!-- Persian monospace fonts -->
|
||||
<alias>
|
||||
<family>monospace</family>
|
||||
<accept>
|
||||
<!-- Not really monospace -->
|
||||
<family>Terafik</family>
|
||||
</accept>
|
||||
</alias>
|
||||
|
||||
<!-- Persian fantasy fonts -->
|
||||
<alias>
|
||||
<family>fantasy</family>
|
||||
<accept>
|
||||
<family>Homa</family>
|
||||
<family>Kamran</family>
|
||||
<family>Fantezi</family>
|
||||
<family>Tabassom</family>
|
||||
</accept>
|
||||
</alias>
|
||||
|
||||
<!-- Persian (and Urdu) Nastaliq/cursive fonts -->
|
||||
<alias>
|
||||
<family>cursive</family>
|
||||
<accept>
|
||||
<family>IranNastaliq</family>
|
||||
<family>Nafees Nastaleeq</family>
|
||||
</accept>
|
||||
</alias>
|
||||
|
||||
<!-- Use Titr in titles -->
|
||||
|
||||
<!-- Both serif... -->
|
||||
<match>
|
||||
<test name="family">
|
||||
<string>serif</string>
|
||||
</test>
|
||||
<test name="weight" compare="more_eq">
|
||||
<int>200</int>
|
||||
</test>
|
||||
<test name="size" compare="more_eq">
|
||||
<double>24</double>
|
||||
</test>
|
||||
<edit name="family" mode="prepend">
|
||||
<string>Titr</string>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
<!-- and sans-serif. -->
|
||||
<match>
|
||||
<test name="family">
|
||||
<string>sans-serif</string>
|
||||
</test>
|
||||
<test name="weight" compare="more_eq">
|
||||
<int>200</int>
|
||||
</test>
|
||||
<test name="size" compare="more_eq">
|
||||
<double>24</double>
|
||||
</test>
|
||||
<edit name="family" mode="prepend">
|
||||
<string>Titr</string>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
<!-- and more. -->
|
||||
<match>
|
||||
<test name="family">
|
||||
<string>Persian_sansserif_default</string>
|
||||
</test>
|
||||
<test name="weight" compare="more_eq">
|
||||
<int>200</int>
|
||||
</test>
|
||||
<test name="size" compare="more_eq">
|
||||
<double>24</double>
|
||||
</test>
|
||||
<edit name="family" mode="prepend" binding="same">
|
||||
<string>Titr</string>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
|
||||
<!-- Default substituted for deprecated sans-serif fonts -->
|
||||
|
||||
<match>
|
||||
<test name="family">
|
||||
<string>Persian_sansserif_default</string>
|
||||
</test>
|
||||
<edit name="family" mode="assign" binding="same">
|
||||
<string>Roya</string>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
</fontconfig>
|
|
@ -1,16 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<alias>
|
||||
<family>serif</family>
|
||||
<prefer>
|
||||
<family>Khmer OS"</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>sans-serif</family>
|
||||
<prefer>
|
||||
<family>Khmer OS"</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
</fontconfig>
|
|
@ -1,240 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<description>Set preferable fonts for non-Latin</description>
|
||||
<alias>
|
||||
<family>serif</family>
|
||||
<prefer>
|
||||
<family>Artsounk</family> <!-- armenian -->
|
||||
<family>BPG UTF8 M</family> <!-- georgian -->
|
||||
<family>Kinnari</family> <!-- thai -->
|
||||
<family>Norasi</family> <!-- thai -->
|
||||
<family>Frank Ruehl</family> <!-- hebrew -->
|
||||
<family>Dror</family> <!-- hebrew -->
|
||||
<family>JG LaoTimes</family> <!-- lao -->
|
||||
<family>Saysettha Unicode</family> <!-- lao -->
|
||||
<family>Pigiarniq</family> <!-- canadian syllabics -->
|
||||
<family>B Davat</family> <!-- arabic (fa) -->
|
||||
<family>B Compset</family> <!-- arabic (fa) -->
|
||||
<family>Kacst-Qr</family> <!-- arabic (ar) -->
|
||||
<family>Urdu Nastaliq Unicode</family> <!-- arabic (ur) -->
|
||||
<family>Raghindi</family> <!-- devanagari -->
|
||||
<family>Mukti Narrow</family> <!-- bengali -->
|
||||
<family>malayalam</family> <!-- malayalam -->
|
||||
<family>Sampige</family> <!-- kannada -->
|
||||
<family>padmaa</family> <!-- gujarati -->
|
||||
<family>Hapax Berbère</family> <!-- tifinagh -->
|
||||
<family>MS Mincho</family> <!-- han (ja) -->
|
||||
<family>SimSun</family> <!-- han (zh-cn,zh-tw) -->
|
||||
<family>PMingLiu</family> <!-- han (zh-tw) -->
|
||||
<family>WenQuanYi Zen Hei</family> <!-- han (zh-cn,zh-tw) -->
|
||||
<family>WenQuanYi Bitmap Song</family> <!-- han (zh-cn,zh-tw) -->
|
||||
<family>AR PL ShanHeiSun Uni</family> <!-- han (ja,zh-cn,zh-tw) -->
|
||||
<family>AR PL New Sung</family> <!-- han (zh-cn,zh-tw) -->
|
||||
<family>ZYSong18030</family> <!-- han (zh-cn,zh-tw) -->
|
||||
<family>HanyiSong</family> <!-- han (zh-cn,zh-tw) -->
|
||||
<family>Hiragino Mincho ProN</family> <!-- han (ja) - macOS -->
|
||||
<family>Songti SC</family> <!-- han (zh-cn) - macOS -->
|
||||
<family>Songti TC</family> <!-- han (zh-tw) - macOS -->
|
||||
<family>SimSong</family> <!-- han (zh-cn) - macOS -->
|
||||
<family>MgOpen Canonica</family>
|
||||
<family>Sazanami Mincho</family>
|
||||
<family>IPAMonaMincho</family>
|
||||
<family>IPAMincho</family>
|
||||
<family>Kochi Mincho</family>
|
||||
<family>AR PL SungtiL GB</family>
|
||||
<family>AR PL Mingti2L Big5</family>
|
||||
<family>AR PL Zenkai Uni</family>
|
||||
<family>MS 明朝</family>
|
||||
<family>ZYSong18030</family>
|
||||
<family>NanumMyeongjo</family> <!-- hangul (ko) -->
|
||||
<family>UnBatang</family> <!-- hangul (ko) -->
|
||||
<family>Baekmuk Batang</family> <!-- hangul (ko) -->
|
||||
<family>AppleMyungjo</family> <!-- hangul (ko) - macOS -->
|
||||
<family>KacstQura</family>
|
||||
<family>Frank Ruehl CLM</family>
|
||||
<family>Lohit Bengali</family>
|
||||
<family>Lohit Gujarati</family>
|
||||
<family>Lohit Hindi</family>
|
||||
<family>Lohit Marathi</family>
|
||||
<family>Lohit Maithili</family>
|
||||
<family>Lohit Kashmiri</family>
|
||||
<family>Lohit Konkani</family>
|
||||
<family>Lohit Nepali</family>
|
||||
<family>Lohit Sindhi</family>
|
||||
<family>Lohit Punjabi</family>
|
||||
<family>Lohit Tamil</family>
|
||||
<family>Rachana</family>
|
||||
<family>Lohit Malayalam</family>
|
||||
<family>Lohit Kannada</family>
|
||||
<family>Lohit Telugu</family>
|
||||
<family>Lohit Oriya</family>
|
||||
<family>LKLUG</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>sans-serif</family>
|
||||
<prefer>
|
||||
<family>Nachlieli</family> <!-- hebrew -->
|
||||
<family>Lucida Sans Unicode</family>
|
||||
<family>Yudit Unicode</family>
|
||||
<family>Kerkis</family> <!-- greek -->
|
||||
<family>ArmNet Helvetica</family> <!-- armenian -->
|
||||
<family>Artsounk</family> <!-- armenian -->
|
||||
<family>BPG UTF8 M</family> <!-- georgian -->
|
||||
<family>Waree</family> <!-- thai -->
|
||||
<family>Loma</family> <!-- thai -->
|
||||
<family>Garuda</family> <!-- thai -->
|
||||
<family>Umpush</family> <!-- thai -->
|
||||
<family>Saysettha Unicode</family> <!-- lao? -->
|
||||
<family>JG Lao Old Arial</family> <!-- lao -->
|
||||
<family>GF Zemen Unicode</family> <!-- ethiopic -->
|
||||
<family>Pigiarniq</family> <!-- canadian syllabics -->
|
||||
<family>B Davat</family> <!-- arabic (fa) -->
|
||||
<family>B Compset</family> <!-- arabic (fa) -->
|
||||
<family>Kacst-Qr</family> <!-- arabic (ar) -->
|
||||
<family>Urdu Nastaliq Unicode</family> <!-- arabic (ur) -->
|
||||
<family>Raghindi</family> <!-- devanagari -->
|
||||
<family>Mukti Narrow</family> <!-- bengali -->
|
||||
<family>malayalam</family> <!-- malayalam -->
|
||||
<family>Sampige</family> <!-- kannada -->
|
||||
<family>padmaa</family> <!-- gujarati -->
|
||||
<family>Hapax Berbère</family> <!-- tifinagh -->
|
||||
<family>MS Gothic</family> <!-- han (ja) -->
|
||||
<family>UmePlus P Gothic</family> <!-- han (ja) -->
|
||||
<family>Microsoft YaHei</family> <!-- han (zh-cn,zh-tw) -->
|
||||
<family>Microsoft JhengHei</family> <!-- han (zh-tw) -->
|
||||
<family>WenQuanYi Zen Hei</family> <!-- han (zh-cn,zh-tw) -->
|
||||
<family>WenQuanYi Bitmap Song</family> <!-- han (zh-cn,zh-tw) -->
|
||||
<family>AR PL ShanHeiSun Uni</family> <!--han (ja,zh-cn,zh-tw) -->
|
||||
<family>AR PL New Sung</family> <!-- han (zh-cn,zh-tw) -->
|
||||
<family>Hiragino Sans</family> <!-- han (ja) - macOS -->
|
||||
<family>PingFang SC</family> <!-- han (zh-cn) - macOS -->
|
||||
<family>PingFang TC</family> <!-- han (zh-tw) - macOS -->
|
||||
<family>PingFang HK</family> <!-- han (zh-hk) - macOS -->
|
||||
<family>Hiragino Sans CNS</family> <!-- han (zh-cn) - macOS -->
|
||||
<family>Hiragino Sans GB</family> <!-- han (zh-tw) - macOS -->
|
||||
<family>MgOpen Modata</family>
|
||||
<family>VL Gothic</family>
|
||||
<family>IPAMonaGothic</family>
|
||||
<family>IPAGothic</family>
|
||||
<family>Sazanami Gothic</family>
|
||||
<family>Kochi Gothic</family>
|
||||
<family>AR PL KaitiM GB</family>
|
||||
<family>AR PL KaitiM Big5</family>
|
||||
<family>AR PL ShanHeiSun Uni</family>
|
||||
<family>AR PL SungtiL GB</family>
|
||||
<family>AR PL Mingti2L Big5</family>
|
||||
<family>MS ゴシック</family>
|
||||
<family>ZYSong18030</family> <!-- han (zh-cn,zh-tw) -->
|
||||
<family>TSCu_Paranar</family> <!-- tamil -->
|
||||
<family>NanumGothic</family> <!-- hangul (ko) -->
|
||||
<family>UnDotum</family> <!-- hangul (ko) -->
|
||||
<family>Baekmuk Dotum</family> <!-- hangul (ko) -->
|
||||
<family>Baekmuk Gulim</family> <!-- hangul (ko) -->
|
||||
<family>Apple SD Gothic Neo</family> <!-- hangul (ko) - macOS -->
|
||||
<family>KacstQura</family>
|
||||
<family>Lohit Bengali</family>
|
||||
<family>Lohit Gujarati</family>
|
||||
<family>Lohit Hindi</family>
|
||||
<family>Lohit Marathi</family>
|
||||
<family>Lohit Maithili</family>
|
||||
<family>Lohit Kashmiri</family>
|
||||
<family>Lohit Konkani</family>
|
||||
<family>Lohit Nepali</family>
|
||||
<family>Lohit Sindhi</family>
|
||||
<family>Lohit Punjabi</family>
|
||||
<family>Lohit Tamil</family>
|
||||
<family>Meera</family>
|
||||
<family>Lohit Malayalam</family>
|
||||
<family>Lohit Kannada</family>
|
||||
<family>Lohit Telugu</family>
|
||||
<family>Lohit Oriya</family>
|
||||
<family>LKLUG</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>monospace</family>
|
||||
<prefer>
|
||||
<family>Miriam Mono</family> <!-- hebrew -->
|
||||
<family>VL Gothic</family>
|
||||
<family>IPAMonaGothic</family>
|
||||
<family>IPAGothic</family>
|
||||
<family>Sazanami Gothic</family>
|
||||
<family>Kochi Gothic</family>
|
||||
<family>AR PL KaitiM GB</family>
|
||||
<family>MS Gothic</family> <!-- han (ja) -->
|
||||
<family>UmePlus Gothic</family> <!-- han (ja) -->
|
||||
<family>NSimSun</family> <!-- han (zh-cn,zh-tw) -->
|
||||
<family>MingLiu</family> <!-- han (zh-tw) -->
|
||||
<family>AR PL ShanHeiSun Uni</family> <!-- han (ja,zh-cn,zh-tw) -->
|
||||
<family>AR PL New Sung Mono</family> <!-- han (zh-cn,zh-tw) -->
|
||||
<family>HanyiSong</family> <!-- han (zh-cn) -->
|
||||
<family>AR PL SungtiL GB</family>
|
||||
<family>AR PL Mingti2L Big5</family>
|
||||
<family>ZYSong18030</family> <!-- han (zh-cn,zh-tw) -->
|
||||
<family>NanumGothicCoding</family> <!-- hangul (ko) -->
|
||||
<family>NanumGothic</family> <!-- hangul (ko) -->
|
||||
<family>UnDotum</family> <!-- hangul (ko) -->
|
||||
<family>Baekmuk Dotum</family> <!-- hangul (ko) -->
|
||||
<family>Baekmuk Gulim</family> <!-- hangul (ko) -->
|
||||
<family>TlwgTypo</family> <!-- thai -->
|
||||
<family>TlwgTypist</family> <!-- thai -->
|
||||
<family>TlwgTypewriter</family> <!-- thai -->
|
||||
<family>TlwgMono</family> <!-- thai -->
|
||||
<family>Hasida</family> <!-- hebrew -->
|
||||
<family>GF Zemen Unicode</family> <!-- ethiopic -->
|
||||
<family>Hapax Berbère</family> <!-- tifinagh -->
|
||||
<family>Lohit Bengali</family>
|
||||
<family>Lohit Gujarati</family>
|
||||
<family>Lohit Hindi</family>
|
||||
<family>Lohit Marathi</family>
|
||||
<family>Lohit Maithili</family>
|
||||
<family>Lohit Kashmiri</family>
|
||||
<family>Lohit Konkani</family>
|
||||
<family>Lohit Nepali</family>
|
||||
<family>Lohit Sindhi</family>
|
||||
<family>Lohit Punjabi</family>
|
||||
<family>Lohit Tamil</family>
|
||||
<family>Meera</family>
|
||||
<family>Lohit Malayalam</family>
|
||||
<family>Lohit Kannada</family>
|
||||
<family>Lohit Telugu</family>
|
||||
<family>Lohit Oriya</family>
|
||||
<family>LKLUG</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
<!--
|
||||
system-ui
|
||||
-->
|
||||
<alias>
|
||||
<family>system-ui</family>
|
||||
<prefer>
|
||||
<family>Noto Sans Arabic UI</family><!-- ar -->
|
||||
<family>Noto Sans Bengali UI</family><!-- bn -->
|
||||
<family>Noto Sans Devanagari UI</family><!-- hi, mai, mr -->
|
||||
<family>Noto Sans Gujarati UI</family><!-- gu -->
|
||||
<family>Noto Sans Gurmukhi UI</family><!-- pa -->
|
||||
<family>Noto Sans Kannada UI</family><!-- kn -->
|
||||
<family>Noto Sans Khmer UI</family><!-- km -->
|
||||
<family>Noto Sans Lao UI</family><!-- lo -->
|
||||
<family>Noto Sans Malayalam UI</family><!-- ml -->
|
||||
<family>Noto Sans Myanmar UI</family><!-- my -->
|
||||
<family>Noto Sans Oriya UI</family><!-- or -->
|
||||
<family>Noto Sans Sinhala UI</family><!-- si -->
|
||||
<family>Noto Sans Tamil UI</family><!-- ta -->
|
||||
<family>Noto Sans Telugu UI</family><!-- te -->
|
||||
<family>Noto Sans Thai UI</family><!-- th -->
|
||||
<family>Leelawadee UI</family><!-- bug, th, jv, km, lo -->
|
||||
<family>Nirmala UI</family><!-- Indic -->
|
||||
<family>Yu Gothic UI</family><!-- han (ja) -->
|
||||
<family>Meiryo UI</family><!-- han (ja) -->
|
||||
<family>MS UI Gothic</family><!-- han (ja) -->
|
||||
<family>Khmer UI</family><!-- km -->
|
||||
<family>Lao UI</family><!-- lo -->
|
||||
<family>Microsoft YaHei UI</family><!-- han (zh-cn) -->
|
||||
<family>Microsoft JhengHei UI</family><!-- han (zh-tw) -->
|
||||
</prefer>
|
||||
</alias>
|
||||
|
||||
</fontconfig>
|
|
@ -1,28 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<alias>
|
||||
<family>serif</family>
|
||||
<prefer>
|
||||
<family>FreeSerif</family>
|
||||
<family>Code2000</family>
|
||||
<family>Code2001</family> <!-- plane1 and beyond -->
|
||||
</prefer>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>sans-serif</family>
|
||||
<prefer>
|
||||
<family>FreeSans</family>
|
||||
<family>Arial Unicode MS</family>
|
||||
<family>Arial Unicode</family>
|
||||
<family>Code2000</family> <!-- almost everything; serif actually -->
|
||||
<family>Code2001</family> <!-- plane1 and beyond -->
|
||||
</prefer>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>monospace</family>
|
||||
<prefer>
|
||||
<family>FreeMono</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
</fontconfig>
|
|
@ -1,64 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<!--
|
||||
Artificial oblique for fonts without an italic or oblique version
|
||||
-->
|
||||
|
||||
<match target="font">
|
||||
<!-- check to see if the font is roman -->
|
||||
<test name="slant">
|
||||
<const>roman</const>
|
||||
</test>
|
||||
<!-- check to see if the pattern requested non-roman -->
|
||||
<test target="pattern" name="slant" compare="not_eq">
|
||||
<const>roman</const>
|
||||
</test>
|
||||
<!-- multiply the matrix to slant the font -->
|
||||
<edit name="matrix" mode="assign">
|
||||
<times>
|
||||
<name>matrix</name>
|
||||
<matrix><double>1</double><double>0.2</double>
|
||||
<double>0</double><double>1</double>
|
||||
</matrix>
|
||||
</times>
|
||||
</edit>
|
||||
<!-- pretend the font is oblique now -->
|
||||
<edit name="slant" mode="assign">
|
||||
<const>oblique</const>
|
||||
</edit>
|
||||
<!-- and disable embedded bitmaps for artificial oblique -->
|
||||
<edit name="embeddedbitmap" mode="assign">
|
||||
<bool>false</bool>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
<!--
|
||||
Synthetic emboldening for fonts that do not have bold face available
|
||||
-->
|
||||
|
||||
<match target="font">
|
||||
<!-- check to see if the weight in the font is less than medium which possibly need emboldening -->
|
||||
<test name="weight" compare="less_eq">
|
||||
<const>medium</const>
|
||||
</test>
|
||||
<!-- check to see if the pattern requests bold -->
|
||||
<test target="pattern" name="weight" compare="more_eq">
|
||||
<const>bold</const>
|
||||
</test>
|
||||
<!--
|
||||
set the embolden flag
|
||||
needed for applications using cairo, e.g. gucharmap, gedit, ...
|
||||
-->
|
||||
<edit name="embolden" mode="assign">
|
||||
<bool>true</bool>
|
||||
</edit>
|
||||
<!--
|
||||
set weight to bold
|
||||
needed for applications using Xft directly, e.g. Firefox, ...
|
||||
-->
|
||||
<edit name="weight" mode="assign">
|
||||
<const>bold</const>
|
||||
</edit>
|
||||
</match>
|
||||
</fontconfig>
|
|
@ -1,121 +1,40 @@
|
|||
#
|
||||
# fontconfig/conf.d/Makefile.am
|
||||
#
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# Copyright © 2005 Keith Packard
|
||||
#
|
||||
#
|
||||
# Permission to use, copy, modify, distribute, and sell this software and its
|
||||
# documentation for any purpose is hereby granted without fee, provided that
|
||||
# the above copyright notice appear in all copies and that both that
|
||||
# copyright notice and this permission notice appear in supporting
|
||||
# documentation, and that the name of the author(s) not be used in
|
||||
# documentation, and that the name of Keith Packard not be used in
|
||||
# advertising or publicity pertaining to distribution of the software without
|
||||
# specific, written prior permission. The authors make no
|
||||
# specific, written prior permission. Keith Packard makes no
|
||||
# representations about the suitability of this software for any purpose. It
|
||||
# is provided "as is" without express or implied warranty.
|
||||
#
|
||||
# THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
#
|
||||
# KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
# EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
# EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
||||
# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
# PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
NULL =
|
||||
BUILT_SOURCES = \
|
||||
README \
|
||||
35-lang-normalize.conf \
|
||||
$(NULL)
|
||||
DOC_SOURCES = README.in
|
||||
DOC_FILES = $(DOC_SOURCES:.in=)
|
||||
CONF_FILES = \
|
||||
10LohitGujarati.conf \
|
||||
10-fonts-persian.conf \
|
||||
60-delicious.conf \
|
||||
autohint.conf \
|
||||
no-bitmaps.conf \
|
||||
no-sub-pixel.conf \
|
||||
sub-pixel.conf \
|
||||
unhinted.conf \
|
||||
yes-bitmaps.conf
|
||||
|
||||
CONF_LINKS = \
|
||||
10-hinting-$(PREFERRED_HINTING).conf \
|
||||
10-scale-bitmap-fonts.conf \
|
||||
10-yes-antialias.conf \
|
||||
10-sub-pixel-$(PREFERRED_SUB_PIXEL_RENDERING).conf \
|
||||
11-lcdfilter-default.conf \
|
||||
20-unhint-small-vera.conf \
|
||||
30-metric-aliases.conf \
|
||||
40-nonlatin.conf \
|
||||
45-generic.conf \
|
||||
45-latin.conf \
|
||||
48-spacing.conf \
|
||||
49-sansserif.conf \
|
||||
50-user.conf \
|
||||
51-local.conf \
|
||||
60-generic.conf \
|
||||
60-latin.conf \
|
||||
65-fonts-persian.conf \
|
||||
65-nonlatin.conf \
|
||||
69-unifont.conf \
|
||||
80-delicious.conf \
|
||||
90-synthetic.conf
|
||||
EXTRA_DIST = $(CONF_FILES)
|
||||
|
||||
EXTRA_DIST = $(template_DATA) $(DOC_SOURCES)
|
||||
CLEANFILES = $(DOC_FILES)
|
||||
configdir=$(CONFDIR)
|
||||
confddir=$(configdir)/conf.d
|
||||
|
||||
configdir = $(CONFIGDIR)
|
||||
config_DATA = $(DOC_FILES)
|
||||
|
||||
templatedir = $(TEMPLATEDIR)
|
||||
template_DATA = \
|
||||
05-reset-dirs-sample.conf \
|
||||
09-autohint-if-no-hinting.conf \
|
||||
10-autohint.conf \
|
||||
10-hinting-full.conf \
|
||||
10-hinting-medium.conf \
|
||||
10-hinting-none.conf \
|
||||
10-hinting-slight.conf \
|
||||
10-no-antialias.conf \
|
||||
10-scale-bitmap-fonts.conf \
|
||||
10-sub-pixel-bgr.conf \
|
||||
10-sub-pixel-none.conf \
|
||||
10-sub-pixel-rgb.conf \
|
||||
10-sub-pixel-vbgr.conf \
|
||||
10-sub-pixel-vrgb.conf \
|
||||
10-unhinted.conf \
|
||||
10-yes-antialias.conf \
|
||||
11-lcdfilter-default.conf \
|
||||
11-lcdfilter-legacy.conf \
|
||||
11-lcdfilter-light.conf \
|
||||
11-lcdfilter-none.conf \
|
||||
20-unhint-small-vera.conf \
|
||||
25-unhint-nonlatin.conf \
|
||||
30-metric-aliases.conf \
|
||||
35-lang-normalize.conf \
|
||||
40-nonlatin.conf \
|
||||
45-generic.conf \
|
||||
45-latin.conf \
|
||||
48-spacing.conf \
|
||||
49-sansserif.conf \
|
||||
50-user.conf \
|
||||
51-local.conf \
|
||||
60-generic.conf \
|
||||
60-latin.conf \
|
||||
65-fonts-persian.conf \
|
||||
65-khmer.conf \
|
||||
65-nonlatin.conf \
|
||||
69-unifont.conf \
|
||||
70-no-bitmaps.conf \
|
||||
70-yes-bitmaps.conf \
|
||||
80-delicious.conf \
|
||||
90-synthetic.conf
|
||||
|
||||
README: $(srcdir)/README.in
|
||||
sed "s|\@TEMPLATEDIR\@|$(templatedir)|" $< > $@
|
||||
|
||||
35-lang-normalize.conf: ../fc-lang/Makefile.am
|
||||
cd ../fc-lang && $(MAKE) $(AM_MAKEFLAGS) $(top_builddir)/conf.d/35-lang-normalize.conf
|
||||
|
||||
install-data-hook:
|
||||
$(PYTHON) $(srcdir)/link_confs.py $(templatedir) $(configdir) $(CONF_LINKS)
|
||||
uninstall-local:
|
||||
@(echo cd $(DESTDIR)$(configdir); \
|
||||
cd $(DESTDIR)$(configdir); \
|
||||
for i in $(CONF_LINKS); do \
|
||||
echo $(RM) $$i; \
|
||||
$(RM) $$i; \
|
||||
done)
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
confd_DATA=$(CONF_FILES)
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
conf.d/README
|
||||
|
||||
Each file in this directory is a fontconfig configuration file. Fontconfig
|
||||
scans this directory, loading all files of the form [0-9][0-9]*, so if you
|
||||
want to use any of these options, link them to a name of that form. E.g.
|
||||
|
||||
$ ln -s no-bitmaps.conf 10no-bitmaps.conf
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
conf.d/README
|
||||
|
||||
Each file in this directory is a fontconfig configuration file. Fontconfig
|
||||
scans this directory, loading all files of the form [0-9][0-9]*.conf.
|
||||
These files are normally installed in @TEMPLATEDIR@
|
||||
and then symlinked here, allowing them to be easily installed and then
|
||||
enabled/disabled by adjusting the symlinks.
|
||||
|
||||
The files are loaded in numeric order, the structure of the configuration
|
||||
has led to the following conventions in usage:
|
||||
|
||||
Files beginning with: Contain:
|
||||
|
||||
00 through 09 Font directories
|
||||
10 through 19 system rendering defaults (AA, etc)
|
||||
20 through 29 font rendering options
|
||||
30 through 39 family substitution
|
||||
40 through 49 generic identification, map family->generic
|
||||
50 through 59 alternate config file loading
|
||||
60 through 69 generic aliases, map generic->family
|
||||
70 through 79 select font (adjust which fonts are available)
|
||||
80 through 89 match target="scan" (modify scanned patterns)
|
||||
90 through 99 font synthesis
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
<!-- debian/autohint.conf -->
|
||||
<fontconfig>
|
||||
<!-- Use the Autohinter -->
|
||||
<match target="font">
|
||||
<edit name="autohint" mode="assign"><bool>true</bool></edit>
|
||||
</match>
|
||||
</fontconfig>
|
|
@ -1,45 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import sys
|
||||
import argparse
|
||||
import platform
|
||||
from pathlib import PurePath
|
||||
|
||||
if __name__=='__main__':
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('availpath')
|
||||
parser.add_argument('confpath')
|
||||
parser.add_argument('links', nargs='+')
|
||||
args = parser.parse_args()
|
||||
|
||||
if os.path.isabs(args.confpath):
|
||||
destdir = os.environ.get('DESTDIR')
|
||||
if destdir:
|
||||
# c:\destdir + c:\prefix must produce c:\destdir\prefix
|
||||
confpath = str(PurePath(destdir, *PurePath(args.confpath).parts[1:]))
|
||||
else:
|
||||
confpath = args.confpath
|
||||
else:
|
||||
confpath = os.path.join(os.environ['MESON_INSTALL_DESTDIR_PREFIX'], args.confpath)
|
||||
|
||||
if not os.path.exists(confpath):
|
||||
os.makedirs(confpath)
|
||||
|
||||
for link in args.links:
|
||||
src = os.path.join(args.availpath, link)
|
||||
dst = os.path.join(confpath, link)
|
||||
try:
|
||||
os.remove(dst)
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
try:
|
||||
os.symlink(os.path.relpath(src, start=args.confpath), dst)
|
||||
except NotImplementedError:
|
||||
# Not supported on this version of Windows
|
||||
break
|
||||
except OSError as e:
|
||||
# Symlink privileges are not available
|
||||
if platform.system().lower() == 'windows' and e.winerror == 1314:
|
||||
break
|
||||
raise
|
|
@ -1,100 +0,0 @@
|
|||
conf_files = [
|
||||
'05-reset-dirs-sample.conf',
|
||||
'09-autohint-if-no-hinting.conf',
|
||||
'10-autohint.conf',
|
||||
'10-hinting-full.conf',
|
||||
'10-hinting-medium.conf',
|
||||
'10-hinting-none.conf',
|
||||
'10-hinting-slight.conf',
|
||||
'10-no-antialias.conf',
|
||||
'10-scale-bitmap-fonts.conf',
|
||||
'10-sub-pixel-bgr.conf',
|
||||
'10-sub-pixel-none.conf',
|
||||
'10-sub-pixel-rgb.conf',
|
||||
'10-sub-pixel-vbgr.conf',
|
||||
'10-sub-pixel-vrgb.conf',
|
||||
'10-unhinted.conf',
|
||||
'10-yes-antialias.conf',
|
||||
'11-lcdfilter-default.conf',
|
||||
'11-lcdfilter-legacy.conf',
|
||||
'11-lcdfilter-light.conf',
|
||||
'11-lcdfilter-none.conf',
|
||||
'20-unhint-small-vera.conf',
|
||||
'25-unhint-nonlatin.conf',
|
||||
'30-metric-aliases.conf',
|
||||
'40-nonlatin.conf',
|
||||
'45-generic.conf',
|
||||
'45-latin.conf',
|
||||
'48-spacing.conf',
|
||||
'49-sansserif.conf',
|
||||
'50-user.conf',
|
||||
'51-local.conf',
|
||||
'60-generic.conf',
|
||||
'60-latin.conf',
|
||||
'65-fonts-persian.conf',
|
||||
'65-khmer.conf',
|
||||
'65-nonlatin.conf',
|
||||
'69-unifont.conf',
|
||||
'70-no-bitmaps.conf',
|
||||
'70-yes-bitmaps.conf',
|
||||
'80-delicious.conf',
|
||||
'90-synthetic.conf',
|
||||
]
|
||||
|
||||
preferred_hinting = get_option('default-hinting')
|
||||
preferred_sub_pixel_rendering = get_option('default-sub-pixel-rendering')
|
||||
|
||||
conf_links = [
|
||||
'10-hinting-@0@.conf'.format(preferred_hinting),
|
||||
'10-scale-bitmap-fonts.conf',
|
||||
'10-sub-pixel-@0@.conf'.format(preferred_sub_pixel_rendering),
|
||||
'10-yes-antialias.conf',
|
||||
'11-lcdfilter-default.conf',
|
||||
'20-unhint-small-vera.conf',
|
||||
'30-metric-aliases.conf',
|
||||
'40-nonlatin.conf',
|
||||
'45-generic.conf',
|
||||
'45-latin.conf',
|
||||
'48-spacing.conf',
|
||||
'49-sansserif.conf',
|
||||
'50-user.conf',
|
||||
'51-local.conf',
|
||||
'60-generic.conf',
|
||||
'60-latin.conf',
|
||||
'65-fonts-persian.conf',
|
||||
'65-nonlatin.conf',
|
||||
'69-unifont.conf',
|
||||
'80-delicious.conf',
|
||||
'90-synthetic.conf',
|
||||
]
|
||||
|
||||
install_data(conf_files, install_dir: fc_templatedir)
|
||||
|
||||
meson.add_install_script('link_confs.py', fc_templatedir,
|
||||
fc_configdir,
|
||||
conf_links,
|
||||
)
|
||||
|
||||
# 35-lang-normalize.conf
|
||||
orths = []
|
||||
foreach o : orth_files # orth_files is from fc-lang/meson.build
|
||||
o = o.split('.')[0] # strip filename suffix
|
||||
if not o.contains('_') # ignore those with an underscore
|
||||
orths += [o]
|
||||
endif
|
||||
endforeach
|
||||
|
||||
custom_target('35-lang-normalize.conf',
|
||||
output: '35-lang-normalize.conf',
|
||||
command: [find_program('write-35-lang-normalize-conf.py'), ','.join(orths), '@OUTPUT@'],
|
||||
install_dir: fc_templatedir,
|
||||
install: true)
|
||||
|
||||
# README
|
||||
readme_cdata = configuration_data()
|
||||
readme_cdata.set('TEMPLATEDIR', fc_templatedir)
|
||||
configure_file(output: 'README',
|
||||
input: 'README.in',
|
||||
configuration: readme_cdata,
|
||||
install_dir: fc_configdir,
|
||||
install: true)
|
|
@ -1,12 +1,12 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
<!-- /etc/fonts/conf.d/no-bitmaps.conf -->
|
||||
<fontconfig>
|
||||
<description>Reject bitmap fonts</description>
|
||||
<!-- Reject bitmap fonts -->
|
||||
<selectfont>
|
||||
<rejectfont>
|
||||
<pattern>
|
||||
<patelt name="outline"><bool>false</bool></patelt>
|
||||
<patelt name="scalable"><bool>false</bool></patelt>
|
||||
</pattern>
|
||||
</rejectfont>
|
||||
</selectfont>
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
<!-- conf.d/sub-pixel.conf -->
|
||||
<fontconfig>
|
||||
<!-- Enable sub-pixel rendering -->
|
||||
<match target="font">
|
||||
<edit name="rgba" mode="assign"><const>none</const></edit>
|
||||
</match>
|
||||
</fontconfig>
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
<!-- conf.d/sub-pixel.conf -->
|
||||
<fontconfig>
|
||||
<!-- Enable sub-pixel rendering -->
|
||||
<match target="font">
|
||||
<edit name="rgba" mode="assign"><const>rgb</const></edit>
|
||||
</match>
|
||||
</fontconfig>
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
<!-- debian/unhinted.conf -->
|
||||
<fontconfig>
|
||||
<!-- Disable hinting -->
|
||||
<match target="font">
|
||||
<edit name="hinting" mode="assign"><bool>false</bool></edit>
|
||||
</match>
|
||||
</fontconfig>
|
|
@ -1,36 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
#
|
||||
# fontconfig write-35-lang-normalize-conf.py
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
print('ERROR: usage: {} ORTH_LIST [OUTPUT.CONF]'.format(sys.argv[0]))
|
||||
sys.exit(-1)
|
||||
|
||||
orth_list_unsorted = sys.argv[1].split(',')
|
||||
|
||||
if len(sys.argv) > 2 and sys.argv[2] != '-':
|
||||
f_out = open(sys.argv[2], 'w', encoding='utf8')
|
||||
else:
|
||||
f_out = sys.stdout
|
||||
|
||||
orth_list = sorted(sys.argv[1].split(','))
|
||||
|
||||
print('<?xml version="1.0"?>', file=f_out)
|
||||
print('<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">', file=f_out)
|
||||
print('<fontconfig>', file=f_out)
|
||||
|
||||
for o in orth_list:
|
||||
print(f' <!-- {o}* -> {o} -->', file=f_out)
|
||||
print(f' <match>', file=f_out)
|
||||
print(f' <test name="lang" compare="contains"><string>{o}</string></test>', file=f_out)
|
||||
print(f' <edit name="lang" mode="assign" binding="same"><string>{o}</string></edit>', file=f_out)
|
||||
print(f' </match>', file=f_out)
|
||||
|
||||
print('</fontconfig>', file=f_out)
|
||||
|
||||
f_out.close()
|
||||
|
||||
sys.exit(0)
|
|
@ -1,12 +1,12 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
<!-- conf.d/yes-bitmaps.conf -->
|
||||
<fontconfig>
|
||||
<description>Accept bitmap fonts</description>
|
||||
<!-- Accept bitmap fonts -->
|
||||
<selectfont>
|
||||
<acceptfont>
|
||||
<pattern>
|
||||
<patelt name="outline"><bool>false</bool></patelt>
|
||||
<patelt name="scalable"><bool>false</bool></patelt>
|
||||
</pattern>
|
||||
</acceptfont>
|
||||
</selectfont>
|
|
@ -1,40 +0,0 @@
|
|||
/*
|
||||
* Copyright 息 2006 Keith Packard
|
||||
* Copyright 息 2010 Behdad Esfahbod
|
||||
*
|
||||
* Permission to use, copy, modify, distribute, and sell this software and its
|
||||
* documentation for any purpose is hereby granted without fee, provided that
|
||||
* the above copyright notice appear in all copies and that both that
|
||||
* copyright notice and this permission notice appear in supporting
|
||||
* documentation, and that the name of the author(s) not be used in
|
||||
* advertising or publicity pertaining to distribution of the software without
|
||||
* specific, written prior permission. The authors make no
|
||||
* representations about the suitability of this software for any purpose. It
|
||||
* is provided "as is" without express or implied warranty.
|
||||
*
|
||||
* THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
* EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
||||
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* This header file is supposed to be included in config.h */
|
||||
|
||||
/* just a hack to build the fat binaries:
|
||||
* https://bugs.freedesktop.org/show_bug.cgi?id=20208
|
||||
*/
|
||||
#ifdef __APPLE__
|
||||
# include <machine/endian.h>
|
||||
# undef SIZEOF_VOID_P
|
||||
# undef ALIGNOF_DOUBLE
|
||||
# ifdef __LP64__
|
||||
# define SIZEOF_VOID_P 8
|
||||
# define ALIGNOF_DOUBLE 8
|
||||
# else
|
||||
# define SIZEOF_VOID_P 4
|
||||
# define ALIGNOF_DOUBLE 4
|
||||
# endif
|
||||
#endif
|
|
@ -0,0 +1,76 @@
|
|||
#
|
||||
# $RCSId: xc/lib/fontconfig/config/Makedefs.in,v 1.3 2002/08/01 15:57:26 keithp Exp $
|
||||
#
|
||||
# Copyright © 2002 Keith Packard
|
||||
#
|
||||
# Permission to use, copy, modify, distribute, and sell this software and its
|
||||
# documentation for any purpose is hereby granted without fee, provided that
|
||||
# the above copyright notice appear in all copies and that both that
|
||||
# copyright notice and this permission notice appear in supporting
|
||||
# documentation, and that the name of Keith Packard not be used in
|
||||
# advertising or publicity pertaining to distribution of the software without
|
||||
# specific, written prior permission. Keith Packard makes no
|
||||
# representations about the suitability of this software for any purpose. It
|
||||
# is provided "as is" without express or implied warranty.
|
||||
#
|
||||
# KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
# EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
||||
# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
# PERFORMANCE OF THIS SOFTWARE.
|
||||
#
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir=@srcdir@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
bindir=@bindir@
|
||||
datadir=@datadir@
|
||||
includedir=@includedir@
|
||||
sysconfdir=@sysconfdir@
|
||||
confdir=@confdir@
|
||||
|
||||
DSO_LDOPTS=@DSO_LDOPTS@
|
||||
DSO_CFLAGS=@DSO_CFLAGS@
|
||||
DSO_PIC_CFLAGS=@DSO_PIC_CFLAGS@
|
||||
|
||||
INSTALL=@INSTALL@
|
||||
INSTALL_PROGRAM=@INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT=@INSTALL_SCRIPT@
|
||||
INSTALL_DATA=@INSTALL_DATA@
|
||||
MKSHLIB=@MKSHLIB@
|
||||
LN_S=@LN_S@
|
||||
|
||||
# shared libraries
|
||||
LIBDIR=$(libdir)
|
||||
# programs
|
||||
BINDIR=$(bindir)
|
||||
# font configuration files
|
||||
CONFDIR=@CONFDIR@
|
||||
# include files
|
||||
INCLUDEDIR=$(includedir)/fontconfig
|
||||
|
||||
X_FONT_DIR=@X_FONT_DIR@
|
||||
FC_DEFAULT_FONTS=@FC_DEFAULT_FONTS@
|
||||
FCPATH_DEF=-DFONTCONFIG_PATH=\"$(CONFDIR)\"
|
||||
|
||||
CDEBUGFLAGS=@CFLAGS@
|
||||
|
||||
INCLUDES=-I$(TOPDIR) -I$(srcdir) @CPPFLAGS@
|
||||
|
||||
CFLAGS=$(CDEBUGFLAGS) @DEFS@ $(FCPATH_DEF) $(INCLUDES)
|
||||
|
||||
LIBBASE=libfontconfig.so
|
||||
LIBFILE=$(LIBBASE).@PACKAGE_MAJOR@.@PACKAGE_MINOR@
|
||||
LIBMAJOR=$(LIBBASE).@PACKAGE_MAJOR@
|
||||
|
||||
LIBFONTCONFIG=-L$(SRCDIR) -lfontconfig
|
||||
|
||||
SRCDIR=$(TOPDIR)/src
|
||||
|
||||
INCDIR=$(TOPDIR)/fontconfig
|
||||
HEADERS=$(INCDIR)/fontconfig.h $(INCDIR)/fcfreetype.h $(INCDIR)/fcprivate.h
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
script=config-subst.$$
|
||||
trap "rm $script" 0
|
||||
rm -f $script
|
||||
for i in ${1+"$@"}; do
|
||||
var="`echo "$i" | sed 's/=.*$//'`"
|
||||
val="`echo "$i" | sed 's/^[^=]*=//'`"
|
||||
echo "s;@$var@;$val;" >> $script
|
||||
done
|
||||
sed -f $script
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,240 @@
|
|||
#! /bin/sh
|
||||
#
|
||||
# $RCSId: $
|
||||
#
|
||||
# install - install a program, script, or datafile
|
||||
# This comes from X11R5.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch.
|
||||
#
|
||||
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit="${DOITPROG-}"
|
||||
|
||||
|
||||
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||
|
||||
mvprog="${MVPROG-mv}"
|
||||
cpprog="${CPPROG-cp}"
|
||||
chmodprog="${CHMODPROG-chmod}"
|
||||
chownprog="${CHOWNPROG-chown}"
|
||||
chgrpprog="${CHGRPPROG-chgrp}"
|
||||
stripprog="${STRIPPROG-strip}"
|
||||
rmprog="${RMPROG-rm}"
|
||||
mkdirprog="${MKDIRPROG-mkdir}"
|
||||
|
||||
tranformbasename=""
|
||||
transform_arg=""
|
||||
instcmd="$mvprog"
|
||||
chmodcmd="$chmodprog 0755"
|
||||
chowncmd=""
|
||||
chgrpcmd=""
|
||||
stripcmd=""
|
||||
rmcmd="$rmprog -f"
|
||||
mvcmd="$mvprog"
|
||||
src=""
|
||||
dst=""
|
||||
dir_arg=""
|
||||
|
||||
while [ x"$1" != x ]; do
|
||||
case $1 in
|
||||
-c) instcmd="$cpprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-d) dir_arg=true
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-m) chmodcmd="$chmodprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-s) stripcmd="$stripprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
*) if [ x"$src" = x ]
|
||||
then
|
||||
src=$1
|
||||
else
|
||||
# this colon is to work around a 386BSD /bin/sh bug
|
||||
:
|
||||
dst=$1
|
||||
fi
|
||||
shift
|
||||
continue;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ x"$src" = x ]
|
||||
then
|
||||
echo "install: no input file specified"
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]; then
|
||||
dst=$src
|
||||
src=""
|
||||
|
||||
if [ -d $dst ]; then
|
||||
instcmd=:
|
||||
else
|
||||
instcmd=mkdir
|
||||
fi
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
|
||||
if [ -f $src -o -d $src ]
|
||||
then
|
||||
true
|
||||
else
|
||||
echo "install: $src does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ x"$dst" = x ]
|
||||
then
|
||||
echo "install: no destination specified"
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
# If destination is a directory, append the input filename; if your system
|
||||
# does not like double slashes in filenames, you may need to add some logic
|
||||
|
||||
if [ -d $dst ]
|
||||
then
|
||||
dst="$dst"/`basename $src`
|
||||
else
|
||||
true
|
||||
fi
|
||||
fi
|
||||
|
||||
## this sed command emulates the dirname command
|
||||
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
||||
|
||||
# Make sure that the destination directory exists.
|
||||
# this part is taken from Noah Friedman's mkinstalldirs script
|
||||
|
||||
# Skip lots of stat calls in the usual case.
|
||||
if [ ! -d "$dstdir" ]; then
|
||||
defaultIFS='
|
||||
'
|
||||
IFS="${IFS-${defaultIFS}}"
|
||||
|
||||
oIFS="${IFS}"
|
||||
# Some sh's can't handle IFS=/ for some reason.
|
||||
IFS='%'
|
||||
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||
IFS="${oIFS}"
|
||||
|
||||
pathcomp=''
|
||||
|
||||
while [ $# -ne 0 ] ; do
|
||||
pathcomp="${pathcomp}${1}"
|
||||
shift
|
||||
|
||||
if [ ! -d "${pathcomp}" ] ;
|
||||
then
|
||||
$mkdirprog "${pathcomp}"
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
pathcomp="${pathcomp}/"
|
||||
done
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]
|
||||
then
|
||||
$doit $instcmd $dst &&
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
|
||||
else
|
||||
|
||||
# If we're going to rename the final executable, determine the name now.
|
||||
|
||||
if [ x"$transformarg" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
dstfile=`basename $dst $transformbasename |
|
||||
sed $transformarg`$transformbasename
|
||||
fi
|
||||
|
||||
# don't allow the sed command to completely eliminate the filename
|
||||
|
||||
if [ x"$dstfile" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
# Make a temp file name in the proper directory.
|
||||
|
||||
dsttmp=$dstdir/#inst.$$#
|
||||
|
||||
# Move or copy the file name to the temp name
|
||||
|
||||
$doit $instcmd $src $dsttmp &&
|
||||
|
||||
trap "rm -f ${dsttmp}" 0 &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits
|
||||
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $instcmd $src $dsttmp" command.
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
|
||||
$doit $rmcmd -f $dstdir/$dstfile &&
|
||||
$doit $mvcmd $dsttmp $dstdir/$dstfile
|
||||
|
||||
fi &&
|
||||
|
||||
|
||||
exit 0
|
857
configure.ac
857
configure.ac
|
@ -1,857 +0,0 @@
|
|||
dnl
|
||||
dnl fontconfig/configure.in
|
||||
dnl
|
||||
dnl Copyright © 2003 Keith Packard
|
||||
dnl
|
||||
dnl Permission to use, copy, modify, distribute, and sell this software and its
|
||||
dnl documentation for any purpose is hereby granted without fee, provided that
|
||||
dnl the above copyright notice appear in all copies and that both that
|
||||
dnl copyright notice and this permission notice appear in supporting
|
||||
dnl documentation, and that the name of the author(s) not be used in
|
||||
dnl advertising or publicity pertaining to distribution of the software without
|
||||
dnl specific, written prior permission. The authors make no
|
||||
dnl representations about the suitability of this software for any purpose. It
|
||||
dnl is provided "as is" without express or implied warranty.
|
||||
dnl
|
||||
dnl THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
dnl EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
dnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
||||
dnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
dnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
dnl PERFORMANCE OF THIS SOFTWARE.
|
||||
dnl
|
||||
dnl Process this file with autoconf to create configure.
|
||||
|
||||
AC_PREREQ(2.61)
|
||||
|
||||
dnl ==========================================================================
|
||||
dnl Versioning
|
||||
dnl ==========================================================================
|
||||
|
||||
dnl This is the package version number, not the shared library
|
||||
dnl version. This same version number must appear in fontconfig/fontconfig.h
|
||||
dnl Yes, it is a pain to synchronize version numbers. Unfortunately, it's
|
||||
dnl not possible to extract the version number here from fontconfig.h
|
||||
AC_INIT([fontconfig], [2.14.2], [https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/new])
|
||||
AM_INIT_AUTOMAKE([1.11 parallel-tests dist-xz])
|
||||
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
|
||||
|
||||
dnl ==========================================================================
|
||||
|
||||
AC_CONFIG_HEADERS(config.h)
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
AC_PROG_CC
|
||||
AC_USE_SYSTEM_EXTENSIONS
|
||||
AC_SYS_LARGEFILE
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_LN_S
|
||||
AC_PROG_MAKE_SET
|
||||
PKG_PROG_PKG_CONFIG
|
||||
m4_ifdef([PKG_INSTALLDIR], [PKG_INSTALLDIR], AC_SUBST([pkgconfigdir], ${libdir}/pkgconfig))
|
||||
|
||||
AM_MISSING_PROG([GIT], [git])
|
||||
AM_MISSING_PROG([GPERF], [gperf])
|
||||
AM_PATH_PYTHON([3])
|
||||
|
||||
AC_MSG_CHECKING([for RM macro])
|
||||
_predefined_rm=`make -p -f /dev/null 2>/dev/null|grep '^RM ='|sed -e 's/^RM = //'`
|
||||
if test "x$_predefined_rm" = "x"; then
|
||||
AC_MSG_RESULT([no predefined RM])
|
||||
AC_CHECK_PROG(RM, rm, [rm -f])
|
||||
else
|
||||
AC_MSG_RESULT($_predefined_rm)
|
||||
fi
|
||||
|
||||
dnl Initialize libtool
|
||||
LT_PREREQ([2.2])
|
||||
LT_INIT([disable-static win32-dll])
|
||||
|
||||
dnl libtool versioning
|
||||
|
||||
dnl bump revision when fixing bugs
|
||||
dnl bump current and age, reset revision to zero when adding APIs
|
||||
dnl bump current, leave age, reset revision to zero when changing/removing APIS
|
||||
LIBT_CURRENT=13
|
||||
LIBT_REVISION=0
|
||||
AC_SUBST(LIBT_CURRENT)
|
||||
AC_SUBST(LIBT_REVISION)
|
||||
LIBT_AGE=12
|
||||
|
||||
LIBT_VERSION_INFO="$LIBT_CURRENT:$LIBT_REVISION:$LIBT_AGE"
|
||||
AC_SUBST(LIBT_VERSION_INFO)
|
||||
|
||||
LIBT_CURRENT_MINUS_AGE=`expr $LIBT_CURRENT - $LIBT_AGE`
|
||||
AC_SUBST(LIBT_CURRENT_MINUS_AGE)
|
||||
|
||||
PKGCONFIG_REQUIRES=
|
||||
PKGCONFIG_REQUIRES_PRIVATELY=
|
||||
|
||||
dnl ==========================================================================
|
||||
AC_CANONICAL_HOST
|
||||
os_win32=no
|
||||
os_darwin=no
|
||||
case "${host_os}" in
|
||||
cygwin*|mingw*)
|
||||
os_win32=yes
|
||||
;;
|
||||
darwin*)
|
||||
os_darwin=yes
|
||||
;;
|
||||
esac
|
||||
AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")
|
||||
AM_CONDITIONAL(OS_DARWIN, test "$os_darwin" = "yes")
|
||||
|
||||
dnl ==========================================================================
|
||||
dnl gettext stuff
|
||||
dnl ==========================================================================
|
||||
GETTEXT_PACKAGE=$PACKAGE
|
||||
AC_SUBST(GETTEXT_PACKAGE)
|
||||
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext package])
|
||||
|
||||
AM_GNU_GETTEXT_VERSION([0.19.7])
|
||||
AM_GNU_GETTEXT([external])
|
||||
|
||||
dnl ==========================================================================
|
||||
|
||||
if test "$os_win32" = "yes"; then
|
||||
AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
|
||||
fi
|
||||
AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes)
|
||||
|
||||
AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
|
||||
WARN_CFLAGS=""
|
||||
WARNING_CPP_DIRECTIVE="no"
|
||||
if test "x$GCC" = "xyes"; then
|
||||
WARN_CFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes \
|
||||
-Wmissing-prototypes -Wmissing-declarations \
|
||||
-Wnested-externs -fno-strict-aliasing"
|
||||
WARNING_CPP_DIRECTIVE="yes"
|
||||
elif test "x$SUNCC" = "xyes"; then
|
||||
WARN_CFLAGS="-v -fd"
|
||||
WARNING_CPP_DIRECTIVE="yes"
|
||||
fi
|
||||
if test "x$WARNING_CPP_DIRECTIVE" = "xyes"; then
|
||||
AC_DEFINE_UNQUOTED(HAVE_WARNING_CPP_DIRECTIVE,1,
|
||||
[Can use #warning in C files])
|
||||
fi
|
||||
AC_SUBST(WARN_CFLAGS)
|
||||
|
||||
|
||||
dnl ==========================================================================
|
||||
|
||||
AX_CC_FOR_BUILD()
|
||||
AC_ARG_VAR(CC_FOR_BUILD, [build system C compiler])
|
||||
AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
|
||||
AM_CONDITIONAL(ENABLE_SHARED, test "$enable_shared" = "yes")
|
||||
|
||||
dnl ==========================================================================
|
||||
|
||||
AC_ARG_WITH(arch,
|
||||
[AC_HELP_STRING([--with-arch=ARCH],
|
||||
[Force architecture to ARCH])],
|
||||
arch="$withval", arch=auto)
|
||||
|
||||
if test "x$arch" != xauto; then
|
||||
AC_DEFINE_UNQUOTED([FC_ARCHITECTURE], "$arch", [Architecture prefix to use for cache file names])
|
||||
fi
|
||||
|
||||
|
||||
dnl ==========================================================================
|
||||
|
||||
# Checks for header files.
|
||||
AC_HEADER_DIRENT
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS([dirent.h fcntl.h stdlib.h string.h unistd.h sys/statvfs.h sys/vfs.h sys/statfs.h sys/param.h sys/mount.h])
|
||||
AX_CREATE_STDINT_H([src/fcstdint.h])
|
||||
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
AC_C_INLINE
|
||||
AC_C_FLEXIBLE_ARRAY_MEMBER
|
||||
AC_TYPE_PID_T
|
||||
|
||||
# Checks for library functions.
|
||||
AC_FUNC_VPRINTF
|
||||
AC_FUNC_MMAP
|
||||
AC_CHECK_FUNCS([link mkstemp mkostemp _mktemp_s mkdtemp getopt getopt_long getprogname getexecname rand random lrand48 random_r rand_r readlink fstatvfs fstatfs lstat strerror strerror_r])
|
||||
|
||||
dnl AC_CHECK_FUNCS doesn't check for header files.
|
||||
dnl posix_fadvise() may be not available in older libc.
|
||||
AC_CHECK_SYMBOL([posix_fadvise], [fcntl.h], [fc_func_posix_fadvise=1], [fc_func_posix_fadvise=0])
|
||||
AC_DEFINE_UNQUOTED([HAVE_POSIX_FADVISE], [$fc_func_posix_fadvise], [Define to 1 if you have the 'posix_fadvise' function.])
|
||||
|
||||
#
|
||||
AC_CHECK_MEMBERS([struct stat.st_mtim],,, [#include <sys/stat.h>])
|
||||
|
||||
#
|
||||
if test "x$ac_cv_func_fstatvfs" = "xyes"; then
|
||||
AC_CHECK_MEMBERS([struct statvfs.f_basetype, struct statvfs.f_fstypename],,,
|
||||
[#include <sys/statvfs.h>])
|
||||
fi
|
||||
if test "x$ac_cv_func_fstatfs" = "xyes"; then
|
||||
AC_CHECK_MEMBERS([struct statfs.f_flags, struct statfs.f_fstypename],,, [
|
||||
#ifdef HAVE_SYS_VFS_H
|
||||
#include <sys/vfs.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_STATFS_H
|
||||
#include <sys/statfs.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_PARAM_H
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_MOUNT_H
|
||||
#include <sys/mount.h>
|
||||
#endif])
|
||||
fi
|
||||
AC_CHECK_MEMBERS([struct dirent.d_type],,,
|
||||
[#include <dirent.h>])
|
||||
|
||||
# Check the argument type of the gperf hash/lookup function
|
||||
AC_MSG_CHECKING([The type of len parameter of gperf hash/lookup function])
|
||||
fc_gperf_test="$(echo 'foo' | gperf -L ANSI-C)"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <string.h>
|
||||
|
||||
const char *in_word_set(register const char *, register size_t);
|
||||
$fc_gperf_test
|
||||
]])], [FC_GPERF_SIZE_T=size_t],
|
||||
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <string.h>
|
||||
|
||||
const char *in_word_set(register const char *, register unsigned int);
|
||||
$fc_gperf_test
|
||||
]])], [FC_GPERF_SIZE_T="unsigned int"],
|
||||
[AC_MSG_ERROR([Unable to determine the type of the len parameter of the gperf hash/lookup function])]
|
||||
)])
|
||||
AC_DEFINE_UNQUOTED(FC_GPERF_SIZE_T, $FC_GPERF_SIZE_T, [The type of len parameter of the gperf hash/lookup function])
|
||||
AC_MSG_RESULT($FC_GPERF_SIZE_T)
|
||||
|
||||
#
|
||||
# Checks for iconv
|
||||
#
|
||||
AC_ARG_ENABLE(iconv,
|
||||
[AC_HELP_STRING([--enable-iconv],
|
||||
[Use iconv to support non-Unicode SFNT name])],
|
||||
,enable_iconv=no)
|
||||
AC_ARG_WITH(libiconv,
|
||||
[AC_HELP_STRING([--with-libiconv=DIR],
|
||||
[Use libiconv in DIR])],
|
||||
[if test "x$withval" = "xyes"; then
|
||||
libiconv_prefix=$prefix
|
||||
else
|
||||
libiconv_prefix=$withval
|
||||
fi],
|
||||
[libiconv_prefix=auto])
|
||||
AC_ARG_WITH(libiconv-includes,
|
||||
[AC_HELP_STRING([--with-libiconv-includes=DIR],
|
||||
[Use libiconv includes in DIR])],
|
||||
[libiconv_includes=$withval],
|
||||
[libiconv_includes=auto])
|
||||
AC_ARG_WITH(libiconv-lib,
|
||||
[AC_HELP_STRING([--with-libiconv-lib=DIR],
|
||||
[Use libiconv library in DIR])],
|
||||
[libiconv_lib=$withval],
|
||||
[libiconv_lib=auto])
|
||||
|
||||
# if no libiconv,libiconv-includes,libiconv-lib are specified,
|
||||
# libc's iconv has a priority.
|
||||
if test "$libiconv_includes" != "auto" -a -r ${libiconv_includes}/iconv.h; then
|
||||
libiconv_cflags="-I${libiconv_includes}"
|
||||
elif test "$libiconv_prefix" != "auto" -a -r ${libiconv_prefix}/include/iconv.h; then
|
||||
libiconv_cflags="-I${libiconv_prefix}/include"
|
||||
else
|
||||
libiconv_cflags=""
|
||||
fi
|
||||
libiconv_libs=""
|
||||
if test "x$libiconv_cflags" != "x"; then
|
||||
if test "$libiconv_lib" != "auto" -a -d ${libiconv_lib}; then
|
||||
libiconv_libs="-L${libiconv_lib} -liconv"
|
||||
elif test "$libiconv_prefix" != "auto" -a -d ${libiconv_prefix}/lib; then
|
||||
libiconv_libs="-L${libiconv_prefix}/lib -liconv"
|
||||
else
|
||||
libiconv_libs="-liconv"
|
||||
fi
|
||||
fi
|
||||
|
||||
use_iconv=0
|
||||
if test "x$enable_iconv" != "xno"; then
|
||||
AC_MSG_CHECKING([for a usable iconv])
|
||||
if test "x$libiconv_cflags" != "x" -o "x$libiconv_libs" != "x"; then
|
||||
iconvsaved_CFLAGS="$CFLAGS"
|
||||
iconvsaved_LIBS="$LIBS"
|
||||
CFLAGS="$CFLAGS $libiconv_cflags"
|
||||
LIBS="$LIBS $libiconv_libs"
|
||||
|
||||
AC_TRY_LINK([#include <iconv.h>],
|
||||
[iconv_open ("from", "to");],
|
||||
[iconv_type="libiconv"
|
||||
use_iconv=1
|
||||
ICONV_CFLAGS="$libiconv_cflags"
|
||||
ICONV_LIBS="$libiconv_libs"
|
||||
],
|
||||
[use_iconv=0])
|
||||
|
||||
CFLAGS="$iconvsaved_CFLAGS"
|
||||
LIBS="$iconvsaved_LIBS"
|
||||
fi
|
||||
if test "x$use_iconv" = "x0"; then
|
||||
AC_TRY_LINK([#include <iconv.h>],
|
||||
[iconv_open ("from", "to");],
|
||||
[iconv_type="libc"
|
||||
use_iconv=1],
|
||||
[iconv_type="not found"
|
||||
use_iconv=0])
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT([$iconv_type])
|
||||
AC_SUBST(ICONV_CFLAGS)
|
||||
AC_SUBST(ICONV_LIBS)
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED(USE_ICONV,$use_iconv,[Use iconv.])
|
||||
#
|
||||
# Checks for FreeType
|
||||
#
|
||||
dnl See http://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/docs/VERSIONS.TXT for versioning in freetype
|
||||
PKG_CHECK_MODULES(FREETYPE, freetype2 >= 21.0.15)
|
||||
PKGCONFIG_REQUIRES="$PKGCONFIG_REQUIRES freetype2 >= 21.0.15"
|
||||
|
||||
AC_SUBST(FREETYPE_LIBS)
|
||||
AC_SUBST(FREETYPE_CFLAGS)
|
||||
|
||||
fontconfig_save_libs="$LIBS"
|
||||
fontconfig_save_cflags="$CFLAGS"
|
||||
LIBS="$LIBS $FREETYPE_LIBS"
|
||||
CFLAGS="$CFLAGS $FREETYPE_CFLAGS"
|
||||
AC_CHECK_FUNCS(FT_Get_BDF_Property FT_Get_PS_Font_Info FT_Has_PS_Glyph_Names FT_Get_X11_Font_Format FT_Done_MM_Var)
|
||||
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <ft2build.h>
|
||||
#include FT_CONFIG_OPTIONS_H
|
||||
#ifndef PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
|
||||
# error "No pcf long family names support"
|
||||
#endif
|
||||
]])], [have_pcf_long_family_names=yes], [have_pcf_long_family_names=no])
|
||||
AM_CONDITIONAL(FREETYPE_PCF_LONG_FAMILY_NAMES, test "x$have_pcf_long_family_names" = xyes)
|
||||
|
||||
LIBS="$fontconfig_save_libs"
|
||||
CFLAGS="$fontconfig_save_cflags"
|
||||
|
||||
#
|
||||
# Check expat configuration
|
||||
#
|
||||
AC_ARG_WITH(expat,
|
||||
[AC_HELP_STRING([--with-expat=DIR],
|
||||
[Use Expat in DIR])],
|
||||
[expat_prefix=$withval],
|
||||
[expat_prefix=auto])
|
||||
AC_ARG_WITH(expat-includes,
|
||||
[AC_HELP_STRING([--with-expat-includes=DIR],
|
||||
[Use Expat includes in DIR])],
|
||||
[expat_includes=$withval],
|
||||
[expat_includes=auto])
|
||||
AC_ARG_WITH(expat-lib,
|
||||
[AC_HELP_STRING([--with-expat-lib=DIR])],
|
||||
[expat_lib=$withval],
|
||||
[expat_lib=auto])
|
||||
|
||||
if test "$enable_libxml2" != "yes"; then
|
||||
use_pkgconfig_for_expat=yes
|
||||
if test "$expat_prefix" = "auto" -a "$expat_includes" = "auto" -a "$expat_lib" = "auto"; then
|
||||
PKG_CHECK_MODULES(EXPAT, expat,,use_pkgconfig_for_expat=no)
|
||||
else
|
||||
use_pkgconfig_for_expat=no
|
||||
fi
|
||||
if test "x$use_pkgconfig_for_expat" = "xno"; then
|
||||
if test "$expat_includes" != "auto" -a -r ${expat_includes}/expat.h; then
|
||||
EXPAT_CFLAGS="-I${expat_includes}"
|
||||
elif test "$expat_prefix" != "auto" -a -r ${expat_prefix}/include/expat.h; then
|
||||
EXPAT_CFLAGS="-I${expat_prefix}/include"
|
||||
else
|
||||
EXPAT_CFLAGS=""
|
||||
fi
|
||||
if test "$expat_lib" != "auto"; then
|
||||
EXPAT_LIBS="-L${expat_lib} -lexpat"
|
||||
elif test "$expat_prefix" != "auto"; then
|
||||
EXPAT_LIBS="-L${expat_prefix}/lib -lexpat"
|
||||
else
|
||||
EXPAT_LIBS="-lexpat"
|
||||
fi
|
||||
PKG_EXPAT_CFLAGS=$EXPAT_CFLAGS
|
||||
PKG_EXPAT_LIBS=$EXPAT_LIBS
|
||||
else
|
||||
PKGCONFIG_REQUIRES_PRIVATELY="$PKGCONFIG_REQUIRES_PRIVATELY expat"
|
||||
PKG_EXPAT_CFLAGS=
|
||||
PKG_EXPAT_LIBS=
|
||||
fi
|
||||
|
||||
expatsaved_CPPFLAGS="$CPPFLAGS"
|
||||
expatsaved_LIBS="$LIBS"
|
||||
CPPFLAGS="$CPPFLAGS $EXPAT_CFLAGS"
|
||||
LIBS="$LIBS $EXPAT_LIBS"
|
||||
|
||||
AC_CHECK_HEADER(expat.h)
|
||||
if test "$ac_cv_header_expat_h" = "no"; then
|
||||
AC_CHECK_HEADER(xmlparse.h)
|
||||
if test "$ac_cv_header_xmlparse_h" = "yes"; then
|
||||
HAVE_XMLPARSE_H=1
|
||||
AC_SUBST(HAVE_XMLPARSE_H)
|
||||
AC_DEFINE_UNQUOTED(HAVE_XMLPARSE_H,$HAVE_XMLPARSE_H,
|
||||
[Use xmlparse.h instead of expat.h])
|
||||
else
|
||||
AC_MSG_ERROR([
|
||||
*** expat is required. or try to use --enable-libxml2])
|
||||
fi
|
||||
fi
|
||||
AC_CHECK_FUNCS(XML_SetDoctypeDeclHandler)
|
||||
if test "$ac_cv_func_XML_SetDoctypeDeclHandler" = "no"; then
|
||||
AC_MSG_ERROR([
|
||||
*** expat is required. or try to use --enable-libxml2])
|
||||
fi
|
||||
CPPFLAGS="$expatsaved_CPPFLAGS"
|
||||
LIBS="$expatsaved_LIBS"
|
||||
|
||||
AC_SUBST(EXPAT_CFLAGS)
|
||||
AC_SUBST(EXPAT_LIBS)
|
||||
AC_SUBST(PKG_EXPAT_CFLAGS)
|
||||
AC_SUBST(PKG_EXPAT_LIBS)
|
||||
fi
|
||||
|
||||
#
|
||||
# Check libxml2 configuration
|
||||
#
|
||||
AC_ARG_ENABLE(libxml2,
|
||||
[AC_HELP_STRING([--enable-libxml2],
|
||||
[Use libxml2 instead of Expat])])
|
||||
|
||||
if test "$enable_libxml2" = "yes"; then
|
||||
PKG_CHECK_MODULES([LIBXML2], [libxml-2.0 >= 2.6])
|
||||
PKGCONFIG_REQUIRES_PRIVATELY="$PKGCONFIG_REQUIRES_PRIVATELY libxml-2.0 >= 2.6"
|
||||
AC_DEFINE_UNQUOTED(ENABLE_LIBXML2,1,[Use libxml2 instead of Expat])
|
||||
|
||||
AC_SUBST(LIBXML2_CFLAGS)
|
||||
AC_SUBST(LIBXML2_LIBS)
|
||||
|
||||
fc_saved_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $LIBXML2_CFLAGS"
|
||||
AC_MSG_CHECKING([SAX1 support in libxml2])
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <libxml/xmlversion.h>
|
||||
#if !defined(LIBXML_SAX1_ENABLED)
|
||||
# include "error: No SAX1 support in libxml2"
|
||||
#endif
|
||||
]])], [AC_MSG_RESULT([found])], [AC_MSG_ERROR([
|
||||
*** SAX1 support in libxml2 is required. enable it or use expat instead.])])
|
||||
CFLAGS="$fc_saved_CFLAGS"
|
||||
fi
|
||||
|
||||
#
|
||||
# Check json-c
|
||||
#
|
||||
PKG_CHECK_MODULES([JSONC], [json-c], [use_jsonc=yes], [use_jsonc=no])
|
||||
|
||||
AM_CONDITIONAL(ENABLE_JSONC, test "x$use_jsonc" = "xyes")
|
||||
AC_SUBST(JSONC_CFLAGS)
|
||||
AC_SUBST(JSONC_LIBS)
|
||||
|
||||
#
|
||||
# Set default sub-pixel rendering
|
||||
#
|
||||
|
||||
AC_ARG_WITH(default-sub-pixel-rendering,
|
||||
[AC_HELP_STRING([--with-default-sub-pixel-rendering=NAME],
|
||||
[Enable your preferred sub-pixel rendering configuration (none/bgr/rgb/vbgr/vrgb) [default=none]])],
|
||||
preferred_sub_pixel_rendering="$withval", preferred_sub_pixel_rendering=none)
|
||||
|
||||
case "$preferred_sub_pixel_rendering" in
|
||||
none|bgr|rgb|vbgr|vrgb)
|
||||
PREFERRED_SUB_PIXEL_RENDERING="$preferred_sub_pixel_rendering"
|
||||
AC_SUBST(PREFERRED_SUB_PIXEL_RENDERING)
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([Invalid sub-pixel rendering. please choose one of none, bgr, rgb, vbgr, or vrgb])
|
||||
;;
|
||||
esac
|
||||
|
||||
#
|
||||
# Set default hinting
|
||||
#
|
||||
|
||||
AC_ARG_WITH(default-hinting,
|
||||
[AC_HELP_STRING([--with-default-hinting=NAME],
|
||||
[Enable your preferred hinting configuration (none/slight/medium/full) [default=slight]])],
|
||||
preferred_hinting="$withval", preferred_hinting=slight)
|
||||
|
||||
case "$preferred_hinting" in
|
||||
none|slight|medium|full)
|
||||
PREFERRED_HINTING="$preferred_hinting"
|
||||
AC_SUBST(PREFERRED_HINTING)
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([Invalid hinting. please choose one of none, slight, medium, or full])
|
||||
;;
|
||||
esac
|
||||
|
||||
#
|
||||
# Set default font directory
|
||||
#
|
||||
|
||||
AC_ARG_WITH(default-fonts,
|
||||
[AC_HELP_STRING([--with-default-fonts=DIR1,DIR2,...],
|
||||
[Use fonts from DIR1,DIR2,... when config is busted])],
|
||||
default_fonts="$withval", default_fonts=yes)
|
||||
|
||||
case "$default_fonts" in
|
||||
yes)
|
||||
if test "$os_win32" = "yes"; then
|
||||
default_fonts="WINDOWSFONTDIR,WINDOWSUSERFONTDIR"
|
||||
elif test "$os_darwin" = "yes"; then
|
||||
default_fonts="/System/Library/Fonts,/Library/Fonts,~/Library/Fonts,/System/Library/Assets/com_apple_MobileAsset_Font3,/System/Library/Assets/com_apple_MobileAsset_Font4"
|
||||
else
|
||||
default_fonts="/usr/share/fonts"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
FC_DEFAULT_FONTS=""
|
||||
if test x${default_fonts+set} = xset; then
|
||||
fc_IFS=$IFS
|
||||
IFS=","
|
||||
for p in $default_fonts; do
|
||||
if test x"$FC_DEFAULT_FONTS" != x; then
|
||||
FC_DEFAULT_FONTS="$FC_DEFAULT_FONTS "
|
||||
fi
|
||||
FC_DEFAULT_FONTS="$FC_DEFAULT_FONTS<dir>$p</dir>"
|
||||
done
|
||||
IFS=$fc_IFS
|
||||
fi
|
||||
|
||||
AC_DEFINE_UNQUOTED(FC_DEFAULT_FONTS, "$FC_DEFAULT_FONTS",
|
||||
[System font directory])
|
||||
|
||||
AC_SUBST(FC_DEFAULT_FONTS)
|
||||
|
||||
#
|
||||
# Add more fonts if available. By default, add only the directories
|
||||
# with outline fonts; those with bitmaps can be added as desired in
|
||||
# local.conf or ~/.fonts.conf
|
||||
#
|
||||
AC_ARG_WITH(add-fonts,
|
||||
[AC_HELP_STRING([--with-add-fonts=DIR1,DIR2,...],
|
||||
[Find additional fonts in DIR1,DIR2,... ])],
|
||||
add_fonts="$withval", add_fonts=yes)
|
||||
|
||||
case "$add_fonts" in
|
||||
yes)
|
||||
FC_ADD_FONTS=""
|
||||
for dir in /usr/X11R6/lib/X11 /usr/X11/lib/X11 /usr/lib/X11; do
|
||||
case x"$FC_ADD_FONTS" in
|
||||
x)
|
||||
sub="$dir/fonts"
|
||||
if test -d "$sub"; then
|
||||
case x$FC_ADD_FONTS in
|
||||
x)
|
||||
FC_ADD_FONTS="$sub"
|
||||
;;
|
||||
*)
|
||||
FC_ADD_FONTS="$FC_ADD_FONTS,$sub"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
AC_DEFINE_UNQUOTED(FC_ADD_FONTS,"$add_fonts",[Additional font directories])
|
||||
;;
|
||||
no)
|
||||
FC_ADD_FONTS=""
|
||||
;;
|
||||
*)
|
||||
FC_ADD_FONTS="$add_fonts"
|
||||
AC_DEFINE_UNQUOTED(FC_ADD_FONTS,"$add_fonts",[Additional font directories])
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(FC_ADD_FONTS)
|
||||
|
||||
FC_FONTPATH=""
|
||||
|
||||
case "$FC_ADD_FONTS" in
|
||||
"")
|
||||
;;
|
||||
*)
|
||||
FC_FONTPATH=`echo $FC_ADD_FONTS |
|
||||
sed -e 's/^/<dir>/' -e 's/$/<\/dir>/' -e 's/,/<\/dir> <dir>/g'`
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(FC_FONTPATH)
|
||||
|
||||
#
|
||||
# Set default cache directory path
|
||||
#
|
||||
AC_ARG_WITH(cache-dir,
|
||||
[AC_HELP_STRING([--with-cache-dir=DIR],
|
||||
[Use DIR to store cache files [default=LOCALSTATEDIR/cache/fontconfig]])],
|
||||
fc_cachedir="$withval", fc_cachedir=yes)
|
||||
|
||||
case $fc_cachedir in
|
||||
no|yes)
|
||||
if test "$os_win32" = "yes"; then
|
||||
fc_cachedir="LOCAL_APPDATA_FONTCONFIG_CACHE"
|
||||
else
|
||||
fc_cachedir='${localstatedir}/cache/${PACKAGE}'
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(fc_cachedir)
|
||||
FC_CACHEDIR=${fc_cachedir}
|
||||
AC_SUBST(FC_CACHEDIR)
|
||||
|
||||
FC_FONTDATE=`LC_ALL=C date`
|
||||
|
||||
AC_SUBST(FC_FONTDATE)
|
||||
|
||||
#
|
||||
# Set configuration paths
|
||||
#
|
||||
|
||||
AC_ARG_WITH(templatedir,
|
||||
[AC_HELP_STRING([--with-templatedir=DIR],
|
||||
[Use DIR to store the configuration template files [default=DATADIR/fontconfig/conf.avail]])],
|
||||
[templatedir="$withval"],
|
||||
[templatedir=yes])
|
||||
AC_ARG_WITH(baseconfigdir,
|
||||
[AC_HELP_STRING([--with-baseconfigdir=DIR],
|
||||
[Use DIR to store the base configuration files [default=SYSCONFDIR/fonts]])],
|
||||
[baseconfigdir="$withval"],
|
||||
[baseconfigdir=yes])
|
||||
AC_ARG_WITH(configdir,
|
||||
[AC_HELP_STRING([--with-configdir=DIR],
|
||||
[Use DIR to store active configuration files [default=BASECONFIGDIR/conf.d]])],
|
||||
[configdir="$withval"],
|
||||
[configdir=yes])
|
||||
AC_ARG_WITH(xmldir,
|
||||
[AC_HELP_STRING([--with-xmldir=DIR],
|
||||
[Use DIR to store XML schema files [default=DATADIR/xml/fontconfig]])],
|
||||
[xmldir="$withval"],
|
||||
[xmldir=yes])
|
||||
|
||||
case "$templatedir" in
|
||||
no|yes)
|
||||
templatedir='${datadir}'/fontconfig/conf.avail
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
case "$baseconfigdir" in
|
||||
no|yes)
|
||||
baseconfigdir='${sysconfdir}'/fonts
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
case "$configdir" in
|
||||
no|yes)
|
||||
configdir='${BASECONFIGDIR}'/conf.d
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
case "$xmldir" in
|
||||
no|yes)
|
||||
xmldir='${datadir}'/xml/fontconfig
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
TEMPLATEDIR=${templatedir}
|
||||
BASECONFIGDIR=${baseconfigdir}
|
||||
CONFIGDIR=${configdir}
|
||||
XMLDIR=${xmldir}
|
||||
AC_SUBST(TEMPLATEDIR)
|
||||
AC_SUBST(BASECONFIGDIR)
|
||||
AC_SUBST(CONFIGDIR)
|
||||
AC_SUBST(XMLDIR)
|
||||
|
||||
|
||||
dnl ===========================================================================
|
||||
|
||||
#
|
||||
# Thread-safety primitives
|
||||
#
|
||||
|
||||
AC_CACHE_CHECK([stdatomic.h atomic primitives], fc_cv_have_stdatomic_atomic_primitives, [
|
||||
fc_cv_have_stdatomic_atomic_primitives=false
|
||||
AC_TRY_LINK([
|
||||
#include <stdatomic.h>
|
||||
|
||||
void memory_barrier (void) { atomic_thread_fence (memory_order_acq_rel); }
|
||||
int atomic_add (atomic_int *i) { return atomic_fetch_add_explicit (i, 1, memory_order_relaxed); }
|
||||
int mutex_trylock (atomic_flag *m) { return atomic_flag_test_and_set_explicit (m, memory_order_acquire); }
|
||||
void mutex_unlock (atomic_flag *m) { atomic_flag_clear_explicit (m, memory_order_release); }
|
||||
], [], fc_cv_have_stdatomic_atomic_primitives=true
|
||||
)
|
||||
])
|
||||
if $fc_cv_have_stdatomic_atomic_primitives; then
|
||||
AC_DEFINE(HAVE_STDATOMIC_PRIMITIVES, 1, [Have C99 stdatomic atomic primitives])
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK([for Intel atomic primitives], fc_cv_have_intel_atomic_primitives, [
|
||||
fc_cv_have_intel_atomic_primitives=false
|
||||
AC_TRY_LINK([
|
||||
void memory_barrier (void) { __sync_synchronize (); }
|
||||
int atomic_add (int *i) { return __sync_fetch_and_add (i, 1); }
|
||||
int mutex_trylock (int *m) { return __sync_lock_test_and_set (m, 1); }
|
||||
void mutex_unlock (int *m) { __sync_lock_release (m); }
|
||||
], [], fc_cv_have_intel_atomic_primitives=true
|
||||
)
|
||||
])
|
||||
if $fc_cv_have_intel_atomic_primitives; then
|
||||
AC_DEFINE(HAVE_INTEL_ATOMIC_PRIMITIVES, 1, [Have Intel __sync_* atomic primitives])
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK([for Solaris atomic operations], fc_cv_have_solaris_atomic_ops, [
|
||||
fc_cv_have_solaris_atomic_ops=false
|
||||
AC_TRY_LINK([
|
||||
#include <atomic.h>
|
||||
/* This requires Solaris Studio 12.2 or newer: */
|
||||
#include <mbarrier.h>
|
||||
void memory_barrier (void) { __machine_rw_barrier (); }
|
||||
int atomic_add (volatile unsigned *i) { return atomic_add_int_nv (i, 1); }
|
||||
void *atomic_ptr_cmpxchg (volatile void **target, void *cmp, void *newval) { return atomic_cas_ptr (target, cmp, newval); }
|
||||
], [], fc_cv_have_solaris_atomic_ops=true
|
||||
)
|
||||
])
|
||||
if $fc_cv_have_solaris_atomic_ops; then
|
||||
AC_DEFINE(HAVE_SOLARIS_ATOMIC_OPS, 1, [Have Solaris __machine_*_barrier and atomic_* operations])
|
||||
fi
|
||||
|
||||
if test "$os_win32" = no && ! $have_pthread; then
|
||||
AC_CHECK_HEADERS(sched.h)
|
||||
AC_SEARCH_LIBS(sched_yield,rt,AC_DEFINE(HAVE_SCHED_YIELD, 1, [Have sched_yield]))
|
||||
fi
|
||||
|
||||
have_pthread=false
|
||||
if test "$os_win32" = no; then
|
||||
AX_PTHREAD([have_pthread=true])
|
||||
fi
|
||||
if $have_pthread; then
|
||||
LIBS="$PTHREAD_LIBS $LIBS"
|
||||
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
||||
CC="$PTHREAD_CC"
|
||||
AC_DEFINE(HAVE_PTHREAD, 1, [Have POSIX threads])
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_PTHREAD, $have_pthread)
|
||||
|
||||
|
||||
dnl ===========================================================================
|
||||
|
||||
#
|
||||
# Let people not build/install docs if they don't have docbook
|
||||
#
|
||||
|
||||
AC_ARG_ENABLE(docbook,
|
||||
[AS_HELP_STRING([--disable-docbook],
|
||||
[Disable building docs with docbook2html (default: no)])],,)
|
||||
|
||||
if test x$enable_docbook != xno; then
|
||||
AC_CHECK_PROG(HASDOCBOOK, docbook2html, yes, no)
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(USEDOCBOOK, test "x$HASDOCBOOK" = xyes)
|
||||
|
||||
default_docs="yes"
|
||||
#
|
||||
# Check if docs exist or can be created
|
||||
#
|
||||
if test x$HASDOCBOOK = xno; then
|
||||
if test -f $srcdir/doc/fonts-conf.5; then
|
||||
:
|
||||
else
|
||||
default_docs="no"
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(docs,
|
||||
[AC_HELP_STRING([--disable-docs],
|
||||
[Don't build and install documentation])],
|
||||
,
|
||||
enable_docs=$default_docs)
|
||||
|
||||
AM_CONDITIONAL(ENABLE_DOCS, test "x$enable_docs" = xyes)
|
||||
|
||||
if test "x$enable_docs" = xyes; then
|
||||
tmp=funcs.$$
|
||||
cat $srcdir/doc/*.fncs | awk '
|
||||
/^@TITLE@/ { if (!done) { printf ("%s\n", $2); done = 1; } }
|
||||
/^@FUNC@/ { if (!done) { printf ("%s\n", $2); done = 1; } }
|
||||
/^@@/ { done = 0; }' > $tmp
|
||||
DOCMAN3=`cat $tmp | awk '{ printf ("%s.3 ", $1); }'`
|
||||
echo DOCMAN3 $DOCMAN3
|
||||
rm -f $tmp
|
||||
else
|
||||
DOCMAN3=""
|
||||
fi
|
||||
AC_SUBST(DOCMAN3)
|
||||
|
||||
dnl ===========================================================================
|
||||
default_cache_build="yes"
|
||||
if test $cross_compiling = "yes"; then
|
||||
default_cache_build="no"
|
||||
fi
|
||||
AC_ARG_ENABLE(cache-build,
|
||||
[AC_HELP_STRING([--disable-cache-build],
|
||||
[Don't run fc-cache during the build])],
|
||||
,
|
||||
enable_cache_build=$default_cache_build)
|
||||
|
||||
AM_CONDITIONAL(ENABLE_CACHE_BUILD, test "x$enable_cache_build" = xyes)
|
||||
|
||||
|
||||
dnl Figure out what cache format suffix to use for this architecture
|
||||
AC_C_BIGENDIAN
|
||||
AC_CHECK_SIZEOF([void *])
|
||||
AC_CHECK_ALIGNOF([double])
|
||||
AC_CHECK_ALIGNOF([void *])
|
||||
|
||||
dnl include the header file for workaround of miscalculating size on autoconf
|
||||
dnl particularly for fat binaries
|
||||
AH_BOTTOM([#include "config-fixups.h"])
|
||||
|
||||
dnl
|
||||
dnl
|
||||
AC_SUBST(PKGCONFIG_REQUIRES)
|
||||
AC_SUBST(PKGCONFIG_REQUIRES_PRIVATELY)
|
||||
|
||||
dnl
|
||||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
fontconfig/Makefile
|
||||
fc-lang/Makefile
|
||||
fc-case/Makefile
|
||||
src/Makefile
|
||||
conf.d/Makefile
|
||||
fc-cache/Makefile
|
||||
fc-cat/Makefile
|
||||
fc-conflist/Makefile
|
||||
fc-list/Makefile
|
||||
fc-match/Makefile
|
||||
fc-pattern/Makefile
|
||||
fc-query/Makefile
|
||||
fc-scan/Makefile
|
||||
fc-validate/Makefile
|
||||
doc/Makefile
|
||||
doc/version.sgml
|
||||
its/Makefile
|
||||
po/Makefile.in
|
||||
po-conf/Makefile.in
|
||||
test/Makefile
|
||||
fontconfig.pc
|
||||
fontconfig-zip
|
||||
])
|
||||
AC_OUTPUT
|
|
@ -0,0 +1,575 @@
|
|||
dnl
|
||||
dnl $Id$
|
||||
dnl
|
||||
dnl Copyright © 2003 Keith Packard
|
||||
dnl
|
||||
dnl Permission to use, copy, modify, distribute, and sell this software and its
|
||||
dnl documentation for any purpose is hereby granted without fee, provided that
|
||||
dnl the above copyright notice appear in all copies and that both that
|
||||
dnl copyright notice and this permission notice appear in supporting
|
||||
dnl documentation, and that the name of Keith Packard not be used in
|
||||
dnl advertising or publicity pertaining to distribution of the software without
|
||||
dnl specific, written prior permission. Keith Packard makes no
|
||||
dnl representations about the suitability of this software for any purpose. It
|
||||
dnl is provided "as is" without express or implied warranty.
|
||||
dnl
|
||||
dnl KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
dnl EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
dnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
||||
dnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
dnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
dnl PERFORMANCE OF THIS SOFTWARE.
|
||||
dnl
|
||||
dnl Process this file with autoconf to create configure.
|
||||
|
||||
AC_INIT(fonts.dtd)
|
||||
|
||||
dnl ==========================================================================
|
||||
dnl Versioning
|
||||
dnl ==========================================================================
|
||||
|
||||
dnl This is the package version number, not the shared library
|
||||
dnl version. This same version number must appear in fontconfig/fontconfig.h
|
||||
dnl Yes, it is a pain to synchronize version numbers. Unfortunately, it's
|
||||
dnl not possible to extract the version number here from fontconfig.h
|
||||
AM_INIT_AUTOMAKE(fontconfig, 2.3.95)
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
dnl libtool versioning
|
||||
|
||||
LT_CURRENT=1
|
||||
LT_REVISION=4
|
||||
AC_SUBST(LT_CURRENT)
|
||||
AC_SUBST(LT_REVISION)
|
||||
LT_AGE=0
|
||||
|
||||
LT_VERSION_INFO="$LT_CURRENT:$LT_REVISION:$LT_AGE"
|
||||
AC_SUBST(LT_VERSION_INFO)
|
||||
|
||||
LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`
|
||||
AC_SUBST(LT_CURRENT_MINUS_AGE)
|
||||
|
||||
dnl ==========================================================================
|
||||
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
AC_PROG_CC
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_LN_S
|
||||
AC_LIBTOOL_WIN32_DLL
|
||||
AM_PROG_LIBTOOL
|
||||
AC_PROG_MAKE_SET
|
||||
|
||||
dnl ==========================================================================
|
||||
|
||||
case "$host" in
|
||||
*-*-mingw*)
|
||||
os_win32=yes
|
||||
;;
|
||||
*)
|
||||
os_win32=no
|
||||
esac
|
||||
AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")
|
||||
|
||||
if test "$os_win32" = "yes"; then
|
||||
AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
|
||||
fi
|
||||
AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes)
|
||||
|
||||
WARN_CFLAGS=""
|
||||
if test "x$GCC" = "xyes"; then
|
||||
WARN_CFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes \
|
||||
-Wmissing-prototypes -Wmissing-declarations \
|
||||
-Wnested-externs -fno-strict-aliasing"
|
||||
AC_DEFINE_UNQUOTED(HAVE_WARNING_CPP_DIRECTIVE,1,
|
||||
[Can use #warning in C files])
|
||||
fi
|
||||
AC_SUBST(WARN_CFLAGS)
|
||||
|
||||
|
||||
dnl ==========================================================================
|
||||
|
||||
AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
|
||||
|
||||
dnl ==========================================================================
|
||||
|
||||
# Setup for compiling build tools (fc-glyphname, etc)
|
||||
AC_MSG_CHECKING([for a C compiler for build tools])
|
||||
if test $cross_compiling = yes; then
|
||||
AC_CHECK_PROGS(CC_FOR_BUILD, gcc cc)
|
||||
else
|
||||
CC_FOR_BUILD=$CC
|
||||
fi
|
||||
AC_MSG_RESULT([$CC_FOR_BUILD])
|
||||
AC_SUBST(CC_FOR_BUILD)
|
||||
|
||||
AC_MSG_CHECKING([for suffix of executable build tools])
|
||||
if test $cross_compiling = yes; then
|
||||
cat >conftest.c <<\_______EOF
|
||||
int
|
||||
main ()
|
||||
{
|
||||
exit (0);
|
||||
}
|
||||
_______EOF
|
||||
for i in .exe ""; do
|
||||
compile="$CC_FOR_BUILD conftest.c -o conftest$i"
|
||||
if AC_TRY_EVAL(compile); then
|
||||
if (./conftest) 2>&AC_FD_CC; then
|
||||
EXEEXT_FOR_BUILD=$i
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
rm -f conftest*
|
||||
if test "${EXEEXT_FOR_BUILD+set}" != set; then
|
||||
AC_MSG_ERROR([Cannot determine suffix of executable build tools])
|
||||
fi
|
||||
else
|
||||
EXEEXT_FOR_BUILD=$EXEEXT
|
||||
fi
|
||||
AC_MSG_RESULT([$EXEEXT_FOR_BUILD])
|
||||
AC_SUBST(EXEEXT_FOR_BUILD)
|
||||
|
||||
dnl ==========================================================================
|
||||
|
||||
AC_ARG_WITH(arch, [ --with-arch=ARCH Force architecture to ARCH], arch="$withval", arch=auto)
|
||||
|
||||
if test $cross_compiling = yes; then
|
||||
case "$arch" in
|
||||
auto)
|
||||
AC_MSG_ERROR([Cannot autodetect architecture in cross compile environment]
|
||||
[Use --with-arch=ARCH to specify architecture])
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
ARCHITECTURE=$arch
|
||||
AC_SUBST(ARCHITECTURE)
|
||||
|
||||
dnl ==========================================================================
|
||||
|
||||
# Checks for header files.
|
||||
AC_HEADER_DIRENT
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h])
|
||||
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
AC_C_INLINE
|
||||
AC_TYPE_PID_T
|
||||
|
||||
# Checks for library functions.
|
||||
AC_FUNC_VPRINTF
|
||||
AC_FUNC_MMAP
|
||||
AC_CHECK_FUNCS([geteuid getuid link memmove memset mkstemp strchr strrchr strtol getopt getopt_long sysconf ftruncate chsize rand_r])
|
||||
|
||||
#
|
||||
# Checks for iconv
|
||||
#
|
||||
AC_MSG_CHECKING([for a usable iconv])
|
||||
ICONV_LIBS=""
|
||||
AC_TRY_LINK([#include <iconv.h>],
|
||||
[iconv_open ("from", "to");],
|
||||
[use_iconv=1],
|
||||
[use_iconv=0])
|
||||
if test x$use_iconv = x1; then
|
||||
AC_MSG_RESULT([libc])
|
||||
else
|
||||
# try using libiconv
|
||||
fontconfig_save_libs="$LIBS"
|
||||
LIBS="$LIBS -liconv"
|
||||
|
||||
AC_TRY_LINK([#include <iconv.h>],
|
||||
[iconv_open ("from", "to");],
|
||||
[use_iconv=true],
|
||||
[use_iconv=false])
|
||||
|
||||
if test x$use_iconv = x1; then
|
||||
ICONV_LIBS="-liconv"
|
||||
AC_MSG_RESULT([libiconv])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
LIBS="$fontconfig_save_libs"
|
||||
fi
|
||||
AC_SUBST(ICONV_LIBS)
|
||||
AC_DEFINE_UNQUOTED(USE_ICONV,$use_iconv,[Use iconv.])
|
||||
|
||||
#
|
||||
# Checks for FreeType
|
||||
#
|
||||
|
||||
AC_ARG_WITH(freetype-config, [ --with-freetype-config=PROG Use FreeType configuration program PROG], freetype_config=$withval, freetype_config=yes)
|
||||
|
||||
if test "$freetype_config" = "yes"; then
|
||||
AC_PATH_PROG(ft_config,freetype-config,no)
|
||||
if test "$ft_config" = "no"; then
|
||||
AC_MSG_ERROR([You must have freetype installed; see http://www.freetype.org/])
|
||||
fi
|
||||
else
|
||||
ft_config="$freetype_config"
|
||||
fi
|
||||
|
||||
FREETYPE_CFLAGS="`$ft_config --cflags`"
|
||||
FREETYPE_LIBS="`$ft_config --libs`"
|
||||
|
||||
AC_SUBST(FREETYPE_LIBS)
|
||||
AC_SUBST(FREETYPE_CFLAGS)
|
||||
|
||||
#
|
||||
# Check to see whether we have:
|
||||
# FT_Get_Next_Char
|
||||
# FT_Get_BDF_Property
|
||||
# FT_Get_PS_Font_Info
|
||||
# FT_Has_PS_Glyph_Names
|
||||
#
|
||||
|
||||
fontconfig_save_libs="$LIBS"
|
||||
fontconfig_save_cflags="$CFLAGS"
|
||||
LIBS="$LIBS $FREETYPE_LIBS"
|
||||
CFLAGS="$CFLAGS $FREETYPE_CFLAGS"
|
||||
AC_CHECK_FUNCS(FT_Get_Next_Char FT_Get_BDF_Property FT_Get_PS_Font_Info FT_Has_PS_Glyph_Names FT_Get_X11_Font_Format)
|
||||
AC_CHECK_MEMBER(FT_Bitmap_Size.y_ppem,
|
||||
HAVE_FT_BITMAP_SIZE_Y_PPEM=1,
|
||||
HAVE_FT_BITMAP_SIZE_Y_PPEM=0,
|
||||
[#include <ft2build.h>
|
||||
#include FT_FREETYPE_H])
|
||||
AC_DEFINE_UNQUOTED(HAVE_FT_BITMAP_SIZE_Y_PPEM,$HAVE_FT_BITMAP_SIZE_Y_PPEM,
|
||||
[FT_Bitmap_Size structure includes y_ppem field])
|
||||
CFLAGS="$fontconfig_save_cflags"
|
||||
LIBS="$fontconfig_save_libs"
|
||||
|
||||
#
|
||||
# Check expat configuration
|
||||
#
|
||||
|
||||
AC_ARG_WITH(expat, [ --with-expat=DIR Use Expat in DIR], expat=$withval, expat=yes)
|
||||
AC_ARG_WITH(expat-includes, [ --with-expat-includes=DIR Use Expat includes in DIR], expat_includes=$withval, expat_includes=yes)
|
||||
AC_ARG_WITH(expat-lib, [ --with-expat-lib=DIR Use Expat library in DIR], expat_lib=$withval, expat_lib=yes)
|
||||
|
||||
if test "$enable_libxml2" != "yes"; then
|
||||
case "$expat" in
|
||||
no)
|
||||
;;
|
||||
*)
|
||||
case "$expat_includes" in
|
||||
yes)
|
||||
case "$expat" in
|
||||
yes)
|
||||
;;
|
||||
*)
|
||||
EXPAT_CFLAGS="-I$expat/include"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
no)
|
||||
EXPAT_CFLAGS=""
|
||||
;;
|
||||
*)
|
||||
EXPAT_CFLAGS="-I$expat_includes"
|
||||
;;
|
||||
esac
|
||||
case "$expat_lib" in
|
||||
yes)
|
||||
case "$expat" in
|
||||
yes)
|
||||
EXPAT_LIBS="-lexpat"
|
||||
;;
|
||||
*)
|
||||
EXPAT_LIBS="-L$expat/lib -lexpat"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
no)
|
||||
;;
|
||||
*)
|
||||
EXPAT_LIBS="-L$expat_lib -lexpat"
|
||||
;;
|
||||
esac
|
||||
|
||||
expatsaved_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $EXPAT_CFLAGS"
|
||||
expatsaved_LIBS="$LIBS"
|
||||
LIBS="$LIBS $EXPAT_LIBS"
|
||||
|
||||
AC_CHECK_HEADER(expat.h)
|
||||
case "$ac_cv_header_expat_h" in
|
||||
no)
|
||||
AC_CHECK_HEADER(xmlparse.h)
|
||||
case "$ac_cv_header_xmlparse_h" in
|
||||
no)
|
||||
have_expat_header=no;
|
||||
;;
|
||||
yes)
|
||||
HAVE_XMLPARSE_H=1
|
||||
AC_SUBST(HAVE_XMLPARSE_H)
|
||||
AC_DEFINE_UNQUOTED(HAVE_XMLPARSE_H,$HAVE_XMLPARSE_H,
|
||||
[Use xmlparse.h instead of expat.h])
|
||||
have_expat_header=yes
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
yes)
|
||||
have_expat_header=yes
|
||||
;;
|
||||
esac
|
||||
case "$have_expat_header" in
|
||||
no)
|
||||
expat=no
|
||||
;;
|
||||
yes)
|
||||
AC_CHECK_FUNCS(XML_SetDoctypeDeclHandler)
|
||||
case "$ac_cv_func_XML_SetDoctypeDeclHandler" in
|
||||
yes)
|
||||
HAVE_EXPAT=1
|
||||
AC_SUBST(HAVE_EXPAT)
|
||||
AC_DEFINE_UNQUOTED(HAVE_EXPAT,$HAVE_EXPAT,
|
||||
[Found a useable expat library])
|
||||
;;
|
||||
*)
|
||||
expat=no
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
CPPFLAGS="$expatsaved_CPPFLAGS"
|
||||
LIBS="$expatsaved_LIBS"
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(EXPAT_CFLAGS)
|
||||
AC_SUBST(EXPAT_LIBS)
|
||||
|
||||
case "$expat" in
|
||||
no)
|
||||
EXPAT_CFLAGS=""
|
||||
EXPAT_LIBS=""
|
||||
|
||||
AC_MSG_WARN([Cannot find usable expat library. Trying to use libxml2 as fallback.])
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
#
|
||||
# Check libxml2 configuration
|
||||
#
|
||||
|
||||
AC_ARG_ENABLE(libxml2, [ --enable-libxml2 Use libxml2 instead of Expat])
|
||||
|
||||
PKG_PROG_PKG_CONFIG
|
||||
|
||||
if test "$enable_libxml2" = "yes" -o "$expat" = "no"; then
|
||||
PKG_CHECK_MODULES([LIBXML2], [libxml-2.0 >= 2.6])
|
||||
AC_DEFINE_UNQUOTED(ENABLE_LIBXML2,1,[Use libxml2 instead of Expat])
|
||||
|
||||
AC_SUBST(LIBXML2_CFLAGS)
|
||||
AC_SUBST(LIBXML2_LIBS)
|
||||
fi
|
||||
|
||||
#
|
||||
# Set default font directory
|
||||
#
|
||||
|
||||
AC_ARG_WITH(default-fonts, [ --with-default-fonts=DIR Use fonts from DIR when config is busted], default_fonts="$withval", default_fonts=yes)
|
||||
|
||||
case "$default_fonts" in
|
||||
yes)
|
||||
if test "$os_win32" = "yes"; then
|
||||
FC_DEFAULT_FONTS="WINDOWSFONTDIR"
|
||||
AC_DEFINE_UNQUOTED(FC_DEFAULT_FONTS, "WINDOWSFONTDIR",
|
||||
[Windows font directory])
|
||||
else
|
||||
FC_DEFAULT_FONTS="/usr/share/fonts"
|
||||
AC_DEFINE_UNQUOTED(FC_DEFAULT_FONTS, "/usr/share/fonts",
|
||||
[System font directory])
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
FC_DEFAULT_FONTS="$default_fonts"
|
||||
AC_DEFINE_UNQUOTED(FC_DEFAULT_FONTS, "$default_fonts",
|
||||
[System font directory])
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(FC_DEFAULT_FONTS)
|
||||
|
||||
#
|
||||
# Add more fonts if available. By default, add only the directories
|
||||
# with outline fonts; those with bitmaps can be added as desired in
|
||||
# local.conf or ~/.fonts.conf
|
||||
#
|
||||
AC_ARG_WITH(add-fonts, [ --with-add-fonts=DIR1,DIR2,...Find additional fonts in DIR1,DIR2,... ], add_fonts="$withval", add_fonts=yes)
|
||||
|
||||
case "$add_fonts" in
|
||||
yes)
|
||||
FC_ADD_FONTS=""
|
||||
for dir in /usr/X11R6/lib/X11 /usr/X11/lib/X11 /usr/lib/X11; do
|
||||
case x"$FC_ADD_FONTS" in
|
||||
x)
|
||||
sub="$dir/fonts"
|
||||
if test -d "$sub"; then
|
||||
case x$FC_ADD_FONTS in
|
||||
x)
|
||||
FC_ADD_FONTS="$sub"
|
||||
;;
|
||||
*)
|
||||
FC_ADD_FONTS="$FC_ADD_FONTS,$sub"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
AC_DEFINE_UNQUOTED(FC_ADD_FONTS,"$add_fonts",[Additional font directories])
|
||||
;;
|
||||
no)
|
||||
FC_ADD_FONTS=""
|
||||
;;
|
||||
*)
|
||||
FC_ADD_FONTS="$add_fonts"
|
||||
AC_DEFINE_UNQUOTED(FC_ADD_FONTS,"$add_fonts",[Additional font directories])
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(FC_ADD_FONTS)
|
||||
|
||||
FC_FONTPATH=""
|
||||
|
||||
case "$FC_ADD_FONTS" in
|
||||
"")
|
||||
;;
|
||||
*)
|
||||
FC_FONTPATH=`echo $FC_ADD_FONTS |
|
||||
sed -e 's/^/<dir>/' -e 's/$/<\/dir>/' -e 's/,/<\/dir> <dir>/g'`
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(FC_FONTPATH)
|
||||
|
||||
#
|
||||
# Set default cache directory path
|
||||
#
|
||||
AC_ARG_WITH(cache-dir, [ --with-cache-dir=DIR Use DIR to store cache files (default /var/cache/fontconfig)], fc_cachedir="$withval", fc_cachedir=yes)
|
||||
|
||||
case $fc_cachedir in
|
||||
no|yes)
|
||||
fc_cachedir=`eval echo "${localstatedir}/cache/"${PACKAGE}`
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(fc_cachedir)
|
||||
FC_CACHEDIR=${fc_cachedir}
|
||||
AC_SUBST(FC_CACHEDIR)
|
||||
|
||||
FC_FONTDATE=`LC_ALL=C date`
|
||||
|
||||
AC_SUBST(FC_FONTDATE)
|
||||
|
||||
AC_ARG_WITH(confdir, [ --with-confdir=DIR Use DIR to store configuration files (default /etc/fonts)], confdir="$withval", confdir=yes)
|
||||
|
||||
#
|
||||
# Set CONFDIR and FONTCONFIG_PATH
|
||||
#
|
||||
|
||||
case "$confdir" in
|
||||
no|yes)
|
||||
confdir='${sysconfdir}'/fonts
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(confdir)
|
||||
CONFDIR=${confdir}
|
||||
AC_DEFINE_UNQUOTED(CONFDIR, "$CONFDIR",[Font configuration directory])
|
||||
AC_SUBST(CONFDIR)
|
||||
|
||||
#
|
||||
# Find out what language orthographies are included
|
||||
#
|
||||
|
||||
ORTH_FILES=`cd ${srcdir}/fc-lang && echo *.orth`
|
||||
AC_SUBST(ORTH_FILES)
|
||||
|
||||
#
|
||||
# Let people not build/install docs if they don't have docbook
|
||||
#
|
||||
|
||||
AC_CHECK_PROG(HASDOCBOOK, docbook2html, yes, no)
|
||||
|
||||
AM_CONDITIONAL(USEDOCBOOK, test "x$HASDOCBOOK" = xyes)
|
||||
|
||||
default_docs="yes"
|
||||
#
|
||||
# Check if docs exist or can be created
|
||||
#
|
||||
if test x$HASDOCBOOK = xno; then
|
||||
if test -f doc/fonts-conf.5; then
|
||||
:
|
||||
else
|
||||
default_docs="no"
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(docs, [ --disable-docs Don't build and install documentation],,enable_docs=$default_docs)
|
||||
|
||||
AM_CONDITIONAL(ENABLE_DOCS, test "x$enable_docs" = xyes)
|
||||
|
||||
if test "x$enable_docs" = xyes; then
|
||||
DOCSRC="doc"
|
||||
tmp=funcs.$$
|
||||
cat $srcdir/doc/*.fncs | awk '
|
||||
/^@TITLE@/ { if (!done) { printf ("%s\n", $2); done = 1; } }
|
||||
/^@FUNC@/ { if (!done) { printf ("%s\n", $2); done = 1; } }
|
||||
/^@@/ { done = 0; }' > $tmp
|
||||
DOCMAN3=`cat $tmp | awk '{ printf ("%s.3 ", $1); }'`
|
||||
echo DOCMAN3 $DOCMAN3
|
||||
rm -f $tmp
|
||||
else
|
||||
DOCSRC=""
|
||||
DOCMAN3=""
|
||||
fi
|
||||
|
||||
AC_SUBST(DOCSRC)
|
||||
AC_SUBST(DOCMAN3)
|
||||
|
||||
#
|
||||
# Figure out where to install documentation
|
||||
#
|
||||
|
||||
AC_ARG_WITH(docdir, [ --with-docdir=DIR Use DIR to store documentation files (default ${datadir}/doc/fontconfig)], confdir="$withval")
|
||||
|
||||
if test "x$with_docdir" = "x" ; then
|
||||
DOCDIR='${datadir}/doc/fontconfig'
|
||||
else
|
||||
DOCDIR=$with_docdir
|
||||
fi
|
||||
|
||||
AC_SUBST(DOCDIR)
|
||||
|
||||
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
fontconfig/Makefile
|
||||
fc-lang/Makefile
|
||||
fc-glyphname/Makefile
|
||||
fc-case/Makefile
|
||||
fc-arch/Makefile
|
||||
src/Makefile
|
||||
src/fontconfig.def
|
||||
conf.d/Makefile
|
||||
fc-cache/Makefile
|
||||
fc-cat/Makefile
|
||||
fc-list/Makefile
|
||||
fc-match/Makefile
|
||||
doc/Makefile
|
||||
doc/version.sgml
|
||||
test/Makefile
|
||||
fontconfig.spec
|
||||
fontconfig.pc
|
||||
fonts.conf
|
||||
fontconfig-zip
|
||||
])
|
|
@ -0,0 +1,16 @@
|
|||
Makefile
|
||||
Makefile.in
|
||||
*.txt
|
||||
*.html
|
||||
*.pdf
|
||||
fontconfig-devel
|
||||
edit-sgml
|
||||
*.o
|
||||
*.3
|
||||
*.5
|
||||
fc*.sgml
|
||||
.deps
|
||||
.libs
|
||||
func.refs
|
||||
version.sgml
|
||||
confdir.sgml
|
346
doc/Makefile.am
346
doc/Makefile.am
|
@ -1,6 +1,5 @@
|
|||
# -*- encoding: utf-8 -*-
|
||||
#
|
||||
# fontconfig/doc/Makefile.am
|
||||
# $Id$
|
||||
#
|
||||
# Copyright © 2003 Keith Packard
|
||||
#
|
||||
|
@ -8,227 +7,178 @@
|
|||
# documentation for any purpose is hereby granted without fee, provided that
|
||||
# the above copyright notice appear in all copies and that both that
|
||||
# copyright notice and this permission notice appear in supporting
|
||||
# documentation, and that the name of the author(s) not be used in
|
||||
# documentation, and that the name of Keith Packard not be used in
|
||||
# advertising or publicity pertaining to distribution of the software without
|
||||
# specific, written prior permission. The authors make no
|
||||
# specific, written prior permission. Keith Packard makes no
|
||||
# representations about the suitability of this software for any purpose. It
|
||||
# is provided "as is" without express or implied warranty.
|
||||
#
|
||||
# THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
# KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
# EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
# EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
||||
# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
# PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
NULL =
|
||||
EXTRA_DIST = \
|
||||
$(BUILT_DOCS) \
|
||||
$(DOC_FUNCS_FNCS) \
|
||||
$(HTML_DIR)/* \
|
||||
$(SGML_FILES) \
|
||||
$(check_SCRIPTS) \
|
||||
confdir.sgml.in \
|
||||
func.sgml \
|
||||
$(NULL)
|
||||
BUILT_SOURCES = \
|
||||
$(DOC_FUNCS_SGML) \
|
||||
$(NULL)
|
||||
CC = @CC_FOR_BUILD@
|
||||
EXEEXT = @EXEEXT_FOR_BUILD@
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
|
||||
if USEDOCBOOK
|
||||
maintainerdoccleanfiles = \
|
||||
$(NULL)
|
||||
cleandocfiles = \
|
||||
$(BUILT_DOCS) \
|
||||
$(NULL)
|
||||
else
|
||||
maintainerdoccleanfiles = \
|
||||
$(BUILT_DOCS) \
|
||||
$(NULL)
|
||||
cleandocfiles = \
|
||||
$(NULL)
|
||||
endif
|
||||
MAINTAINERCLEANFILES = \
|
||||
$(DOC_FUNCS_SGML) \
|
||||
$(maintainerdoccleanfiles) \
|
||||
$(NULL)
|
||||
CLEANFILES = \
|
||||
$(cleandocfiles) \
|
||||
$(LOCAL_SGML_FILES) \
|
||||
confdir.sgml \
|
||||
func.refs \
|
||||
$(NULL)
|
||||
SUFFIXES = \
|
||||
.fncs \
|
||||
.sgml \
|
||||
.txt \
|
||||
.html \
|
||||
$(NULL)
|
||||
TESTS = \
|
||||
check-missing-doc \
|
||||
$(NULL)
|
||||
TESTS_ENVIRONMENT = \
|
||||
top_srcdir=${top_srcdir}; export top_srcdir; \
|
||||
$(NULL)
|
||||
LOG_COMPILER = sh
|
||||
#
|
||||
DOC_SRC = $(srcdir)
|
||||
DOC_MODULE = fontconfig
|
||||
DOC2HTML = docbook2html
|
||||
DOC2TXT = docbook2txt
|
||||
DOC2MAN = docbook2man
|
||||
DOC2PDF = docbook2pdf
|
||||
DOC2TXT = docbook2txt
|
||||
DOC2MAN = docbook2man
|
||||
DOC2PDF = docbook2pdf
|
||||
|
||||
DOC_FUNCS_FNCS = \
|
||||
fcatomic.fncs \
|
||||
fcblanks.fncs \
|
||||
fccache.fncs \
|
||||
fccharset.fncs \
|
||||
fcconfig.fncs \
|
||||
fcconstant.fncs \
|
||||
fcdircache.fncs \
|
||||
fcfile.fncs \
|
||||
fcfontset.fncs \
|
||||
fcformat.fncs \
|
||||
fcfreetype.fncs \
|
||||
fcinit.fncs \
|
||||
fclangset.fncs \
|
||||
fcmatrix.fncs \
|
||||
fcobjectset.fncs \
|
||||
fcobjecttype.fncs \
|
||||
fcpattern.fncs \
|
||||
fcrange.fncs \
|
||||
fcstring.fncs \
|
||||
fcstrset.fncs \
|
||||
fcvalue.fncs \
|
||||
fcweight.fncs \
|
||||
$(NULL)
|
||||
SGML_FILES = \
|
||||
fontconfig-user.sgml \
|
||||
fontconfig-devel.sgml \
|
||||
$(NULL)
|
||||
LOCAL_SGML_FILES = \
|
||||
local-fontconfig-user.sgml \
|
||||
local-fontconfig-devel.sgml \
|
||||
$(NULL)
|
||||
|
||||
DOC_FUNCS_SGML = $(DOC_FUNCS_FNCS:.fncs=.sgml)
|
||||
BUILT_DOCS = \
|
||||
$(HTML_FILES) \
|
||||
$(PDF_FILES) \
|
||||
$(TXT_FILES) \
|
||||
$(man3_MANS) \
|
||||
$(man5_MANS) \
|
||||
$(NULL)
|
||||
DOCS_DEPS = \
|
||||
$(DOC_FUNCS_SGML) \
|
||||
confdir.sgml \
|
||||
version.sgml \
|
||||
$(NULL)
|
||||
|
||||
TXT_FILES = $(SGML_FILES:.sgml=.txt)
|
||||
PDF_FILES = $(SGML_FILES:.sgml=.pdf)
|
||||
HTML_FILES = \
|
||||
fontconfig-user.html \
|
||||
$(NULL)
|
||||
TXT = fontconfig-user.txt fontconfig-devel.txt
|
||||
PDF = fontconfig-user.pdf fontconfig-devel.pdf
|
||||
HTML_FILES = fontconfig-user.html
|
||||
HTML_DIR = fontconfig-devel
|
||||
#
|
||||
noinst_PROGRAMS = \
|
||||
$(NULL)
|
||||
noinst_SCRIPTS = \
|
||||
edit-sgml.py \
|
||||
$(NULL)
|
||||
##
|
||||
check_SCRIPTS = \
|
||||
check-missing-doc \
|
||||
$(NULL)
|
||||
#
|
||||
man3_MANS = \
|
||||
$(DOCMAN3) \
|
||||
$(NULL)
|
||||
man5_MANS = \
|
||||
fonts-conf.5 \
|
||||
$(NULL)
|
||||
#
|
||||
doc_DATA = \
|
||||
$(TXT_FILES) \
|
||||
$(PDF_FILES) \
|
||||
$(HTML_FILES) \
|
||||
$(NULL)
|
||||
#
|
||||
htmldocdir = $(docdir)/$(HTML_DIR)
|
||||
htmldoc_DATA = \
|
||||
$(NULL)
|
||||
SGML = fontconfig-user.sgml fontconfig-devel.sgml
|
||||
FNCS_TMPL = ${DOC_SRC}/func.sgml
|
||||
|
||||
DOC_FUNCS_FNCS=\
|
||||
fcatomic.fncs \
|
||||
fcblanks.fncs \
|
||||
fccharset.fncs \
|
||||
fcconfig.fncs \
|
||||
fcconstant.fncs \
|
||||
fcfile.fncs \
|
||||
fcfontset.fncs \
|
||||
fcfreetype.fncs \
|
||||
fcinit.fncs \
|
||||
fcmatrix.fncs \
|
||||
fcobjectset.fncs \
|
||||
fcobjecttype.fncs \
|
||||
fcpattern.fncs \
|
||||
fcstring.fncs \
|
||||
fcstrset.fncs \
|
||||
fcvalue.fncs
|
||||
|
||||
DOC_FUNCS_SGML=\
|
||||
fcatomic.sgml \
|
||||
fcblanks.sgml \
|
||||
fccharset.sgml \
|
||||
fcconfig.sgml \
|
||||
fcconstant.sgml \
|
||||
fcfile.sgml \
|
||||
fcfontset.sgml \
|
||||
fcfreetype.sgml \
|
||||
fcinit.sgml \
|
||||
fcmatrix.sgml \
|
||||
fcobjectset.sgml \
|
||||
fcobjecttype.sgml \
|
||||
fcpattern.sgml \
|
||||
fcstring.sgml \
|
||||
fcstrset.sgml \
|
||||
fcvalue.sgml
|
||||
|
||||
man5_MANS=fonts-conf.5
|
||||
man3_MANS=$(DOCMAN3)
|
||||
|
||||
noinst_PROGRAMS=edit-sgml
|
||||
edit_sgml_SOURCES=edit-sgml.c
|
||||
|
||||
docdir=@DOCDIR@
|
||||
|
||||
DOC_FILES=$(TXT) $(PDF) $(HTML_FILES)
|
||||
LOCAL_DOCS=$(man3_MANS) $(man5_MANS) $(DOC_FILES) $(HTML_DIR)/*
|
||||
|
||||
EXTRA_DIST=$(LOCAL_DOCS) $(SGML) $(DOC_FUNCS_FNCS) func.sgml confdir.sgml.in
|
||||
|
||||
SUFFIXES=.fncs .sgml .txt .html
|
||||
|
||||
if USEDOCBOOK
|
||||
BUILT_SOURCES += \
|
||||
$(LOCAL_SGML_FILES) \
|
||||
$(NULL)
|
||||
htmldoc_DATA += $(HTML_DIR)/*
|
||||
|
||||
##
|
||||
.fncs.sgml:
|
||||
$(AM_V_GEN) $(RM) $@; \
|
||||
$(PYTHON) $(srcdir)/edit-sgml.py $(srcdir)/func.sgml '$(srcdir)/$*.fncs' $*.sgml
|
||||
$(RM) $@
|
||||
./edit-sgml$(EXEEXT) $(FNCS_TMPL) < '$<' > $*.sgml
|
||||
|
||||
.sgml.txt:
|
||||
$(AM_V_GEN) $(RM) $@; \
|
||||
$(DOC2TXT) $*.sgml
|
||||
$(RM) $@
|
||||
$(DOC2TXT) $<
|
||||
|
||||
.sgml.pdf:
|
||||
$(AM_V_GEN) $(RM) $@; \
|
||||
$(DOC2PDF) $*.sgml
|
||||
.sgml.html:
|
||||
$(AM_V_GEN) $(RM) $@; \
|
||||
$(DOC2HTML) -u $*.sgml > $@
|
||||
##
|
||||
fonts-conf.5: local-fontconfig-user.sgml version.sgml confdir.sgml
|
||||
$(AM_V_GEN) $(RM) $@; \
|
||||
$(DOC2MAN) local-fontconfig-user.sgml && \
|
||||
$(RM) manpage.*
|
||||
##
|
||||
$(RM) $@
|
||||
$(DOC2PDF) $<
|
||||
|
||||
$(man3_MANS): func.refs
|
||||
func.refs: local-fontconfig-devel.sgml $(DOCS_DEPS)
|
||||
$(AM_V_GEN) $(RM) $@; \
|
||||
$(DOC2MAN) -o devel-man local-fontconfig-devel.sgml && \
|
||||
mv devel-man/manpage.refs func.refs && \
|
||||
mv devel-man/*.3 . && \
|
||||
$(RM) devel-man/manpage.* && \
|
||||
rmdir devel-man || rm $@ || :
|
||||
confdir.sgml: $(srcdir)/confdir.sgml.in
|
||||
$(AM_V_GEN) sed -e 's,@BASECONFIGDIR\@,${BASECONFIGDIR},' $(srcdir)/$@.in | awk '{if (NR > 1) printf("\n"); printf("%s", $$0);}' > $@
|
||||
##
|
||||
$(DOC_FUNCS_SGML): $(DOC_FUNCS_FNCS) $(srcdir)/edit-sgml.py $(srcdir)/func.sgml
|
||||
$(TXT_FILES): $(DOCS_DEPS)
|
||||
$(PDF_FILES): $(DOCS_DEPS)
|
||||
$(HTML_FILES): $(DOCS_DEPS)
|
||||
$(HTML_DIR)/*: $(HTML_DIR)
|
||||
$(HTML_DIR): local-fontconfig-devel.sgml $(DOCS_DEPS)
|
||||
$(AM_V_GEN) $(RM) -r $@; \
|
||||
$(DOC2HTML) -V '%use-id-as-filename%' -o $@ local-fontconfig-devel.sgml
|
||||
local-fontconfig-user.sgml: $(srcdir)/fontconfig-user.sgml
|
||||
$(AM_V_GEN) $(LN_S) $(srcdir)/fontconfig-user.sgml $@; \
|
||||
[ ! -f $(builddir)/fontconfig-user.sgml ] && cp -a $(srcdir)/fontconfig-user.sgml $(builddir)/fontconfig-user.sgml || :
|
||||
local-fontconfig-devel.sgml: $(srcdir)/fontconfig-devel.sgml
|
||||
$(AM_V_GEN) $(LN_S) $(srcdir)/fontconfig-devel.sgml $@; \
|
||||
[ ! -f $(builddir)/fontconfig-devel.sgml ] && cp -a $(srcdir)/fontconfig-devel.sgml $(builddir)/fontconfig-devel.sgml || :
|
||||
#
|
||||
all-local: $(BUILT_DOCS) $(HTML_DIR)/*
|
||||
|
||||
func.refs: local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml
|
||||
$(RM) func.refs
|
||||
$(DOC2MAN) local-fontconfig-devel.sgml
|
||||
mv manpage.refs func.refs
|
||||
$(RM) manpage.links
|
||||
|
||||
local-fontconfig-devel.sgml: fontconfig-devel.sgml
|
||||
$(LN_S) $< $@
|
||||
|
||||
$(DOC_FUNCS_SGML): edit-sgml$(EXEEXT) $(FNCS_TMPL)
|
||||
|
||||
fonts-conf.5: local-fontconfig-user.sgml version.sgml confdir.sgml
|
||||
$(RM) $@
|
||||
$(DOC2MAN) local-fontconfig-user.sgml
|
||||
$(RM) manpage.refs manpage.links
|
||||
|
||||
local-fontconfig-user.sgml: fontconfig-user.sgml
|
||||
$(LN_S) $< $@
|
||||
|
||||
all-local: $(LOCAL_DOCS)
|
||||
|
||||
clean-local:
|
||||
$(RM) -r $(HTML_DIR) devel-man
|
||||
[ "x$(builddir)" != "x$(srcdir)" ] && $(RM) $(builddir)/*.sgml || :
|
||||
dist-local-check-docs-enabled:
|
||||
@true
|
||||
$(RM) $(man3_MANS) $(man5_MANS) $(DOC_FILES) $(DOC_FUNCS_SGML) func.refs
|
||||
$(RM) -r $(HTML_DIR)
|
||||
|
||||
$(HTML_DIR): local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml
|
||||
$(RM) -r $(HTML_DIR)
|
||||
$(DOC2HTML) -o $(HTML_DIR) local-fontconfig-devel.sgml
|
||||
|
||||
fontconfig-devel.txt: local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml
|
||||
$(RM) $@
|
||||
$(DOC2TXT) local-fontconfig-devel.sgml
|
||||
mv local-fontconfig-devel.txt $@
|
||||
|
||||
fontconfig-devel.pdf: local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml
|
||||
$(RM) $@
|
||||
../missing --run $(DOC2PDF) $< && mv local-$@ $@ \
|
||||
|| echo Failed to generate $@ >&2; \
|
||||
(test -f $@ || echo $(DOC2PDF) is required to generate this file >> $@)
|
||||
|
||||
fontconfig-user.html: local-fontconfig-user.sgml version.sgml confdir.sgml
|
||||
$(RM) $@ local-$@ $@.tmp
|
||||
$(DOC2HTML) -u local-fontconfig-user.sgml > $@.tmp
|
||||
-test -f local-$@ && mv local-$@ $@
|
||||
-test -f $@ || mv $@.tmp $@
|
||||
-test -f $@.tmp && $(RM) $@.tmp
|
||||
|
||||
fontconfig-user.txt: local-fontconfig-user.sgml version.sgml confdir.sgml
|
||||
$(RM) $@
|
||||
$(DOC2TXT) local-fontconfig-user.sgml
|
||||
mv local-fontconfig-user.txt $@
|
||||
|
||||
fontconfig-user.pdf: local-fontconfig-user.sgml version.sgml confdir.sgml
|
||||
$(RM) $@
|
||||
../missing --run $(DOC2PDF) $< && mv local-$@ $@ \
|
||||
|| echo Failed to generate $@ >&2; \
|
||||
(test -f $@ || echo $(DOC2PDF) is required to generate this file >> $@)
|
||||
|
||||
STRIPNL=awk '{ if (NR > 1) printf ("\n"); printf ("%s", $$0); }'
|
||||
confdir.sgml: ${DOC_SRC}/confdir.sgml.in
|
||||
sed "s,@CONFDIR\@,${CONFDIR}," < ${DOC_SRC}/confdir.sgml.in | $(STRIPNL) > confdir.sgml
|
||||
|
||||
CLEANFILES=confdir.sgml local-fontconfig-user.sgml local-fontconfig-devel.sgml
|
||||
|
||||
else
|
||||
htmldoc_DATA += $(srcdir)/$(HTML_DIR)/*
|
||||
.fncs.sgml:
|
||||
$(AM_V_GEN) $(RM) $@; \
|
||||
touch -r $< $@
|
||||
all-local:
|
||||
clean-local:
|
||||
dist-local-check-docs-enabled:
|
||||
@echo "*** --enable-man must be used in order to make dist"
|
||||
@false
|
||||
endif
|
||||
|
||||
# force doc rebuild after configure
|
||||
dist-hook-local: dist-local-check-docs-enabled
|
||||
htmldocdir=$(docdir)/$(HTML_DIR)
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
doc_DATA = $(DOC_FILES)
|
||||
|
||||
htmldoc_DATA = $(HTML_DIR)/*
|
||||
|
||||
$(HTML_DIR)/*: $(HTML_DIR)
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
#!/bin/sh
|
||||
header=fontconfig-header
|
||||
doc=fontconfig-doc
|
||||
trap "rm $header $doc" 0 1 15
|
||||
top_srcdir=${top_srcdir-".."}
|
||||
(
|
||||
cat $top_srcdir/fontconfig/*.h | grep '^Fc' |
|
||||
grep -v FcPublic | sed 's/[^a-zA-Z0-9].*//';
|
||||
cat $top_srcdir/fontconfig/*.h |
|
||||
sed -n 's/#define \(Fc[a-zA-Z]*\)(.*$/\1/p') |
|
||||
sort -u > $header
|
||||
|
||||
grep '@FUNC[+]*@' $top_srcdir/doc/*.fncs |
|
||||
awk '{print $2}' |
|
||||
sort -u > $doc
|
||||
|
||||
if cmp $doc $header > /dev/null; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo \
|
||||
'Library Export Documentation'
|
||||
diff -y $header $doc | grep '[<>]'
|
||||
exit 1
|
|
@ -1,5 +1,5 @@
|
|||
<!--
|
||||
fontconfig/doc/confdir.sgml.in
|
||||
$Id$
|
||||
|
||||
Copyright © 2003 Keith Packard
|
||||
|
||||
|
@ -7,20 +7,19 @@
|
|||
documentation for any purpose is hereby granted without fee, provided that
|
||||
the above copyright notice appear in all copies and that both that
|
||||
copyright notice and this permission notice appear in supporting
|
||||
documentation, and that the name of the author(s) not be used in
|
||||
documentation, and that the name of Keith Packard not be used in
|
||||
advertising or publicity pertaining to distribution of the software without
|
||||
specific, written prior permission. The authors make no
|
||||
specific, written prior permission. Keith Packard makes no
|
||||
representations about the suitability of this software for any purpose. It
|
||||
is provided "as is" without express or implied warranty.
|
||||
|
||||
THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
||||
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- this is filled in at make time -->
|
||||
<!--@BASECONFIGDIR@-->
|
||||
/etc/fonts
|
||||
@CONFDIR@
|
||||
|
|
|
@ -0,0 +1,521 @@
|
|||
/*
|
||||
* $Id$
|
||||
*
|
||||
* Copyright © 2003 Keith Packard
|
||||
*
|
||||
* Permission to use, copy, modify, distribute, and sell this software and its
|
||||
* documentation for any purpose is hereby granted without fee, provided that
|
||||
* the above copyright notice appear in all copies and that both that
|
||||
* copyright notice and this permission notice appear in supporting
|
||||
* documentation, and that the name of Keith Packard not be used in
|
||||
* advertising or publicity pertaining to distribution of the software without
|
||||
* specific, written prior permission. Keith Packard makes no
|
||||
* representations about the suitability of this software for any purpose. It
|
||||
* is provided "as is" without express or implied warranty.
|
||||
*
|
||||
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
* EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
||||
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
static void *
|
||||
New (int size);
|
||||
|
||||
static void *
|
||||
Reallocate (void *p, int size);
|
||||
|
||||
static void
|
||||
Dispose (void *p);
|
||||
|
||||
typedef enum { False, True } Bool;
|
||||
|
||||
typedef struct {
|
||||
char *buf;
|
||||
int size;
|
||||
int len;
|
||||
} String;
|
||||
|
||||
static String *
|
||||
StringNew (void);
|
||||
|
||||
static void
|
||||
StringAdd (String *s, char c);
|
||||
|
||||
static void
|
||||
StringAddString (String *s, char *buf);
|
||||
|
||||
static String *
|
||||
StringMake (char *buf);
|
||||
|
||||
static void
|
||||
StringDel (String *s);
|
||||
|
||||
static void
|
||||
StringPut (FILE *f, String *s);
|
||||
|
||||
static void
|
||||
StringDispose (String *s);
|
||||
|
||||
typedef struct {
|
||||
String *tag;
|
||||
String *text;
|
||||
} Replace;
|
||||
|
||||
static Replace *
|
||||
ReplaceNew (void);
|
||||
|
||||
static void
|
||||
ReplaceDispose (Replace *r);
|
||||
|
||||
static void
|
||||
Bail (const char *format, const char *arg);
|
||||
|
||||
static Replace *
|
||||
ReplaceRead (FILE *f);
|
||||
|
||||
typedef struct _replaceList {
|
||||
struct _replaceList *next;
|
||||
Replace *r;
|
||||
} ReplaceList;
|
||||
|
||||
static ReplaceList *
|
||||
ReplaceListNew (Replace *r, ReplaceList *next);
|
||||
|
||||
static void
|
||||
ReplaceListDispose (ReplaceList *l);
|
||||
|
||||
typedef struct {
|
||||
ReplaceList *head;
|
||||
} ReplaceSet;
|
||||
|
||||
static ReplaceSet *
|
||||
ReplaceSetNew (void);
|
||||
|
||||
static void
|
||||
ReplaceSetDispose (ReplaceSet *s);
|
||||
|
||||
static void
|
||||
ReplaceSetAdd (ReplaceSet *s, Replace *r);
|
||||
|
||||
static Replace *
|
||||
ReplaceSetFind (ReplaceSet *s, char *tag);
|
||||
|
||||
static ReplaceSet *
|
||||
ReplaceSetRead (FILE *f);
|
||||
|
||||
typedef struct _skipStack {
|
||||
struct _skipStack *prev;
|
||||
int skipping;
|
||||
} SkipStack;
|
||||
|
||||
static SkipStack *
|
||||
SkipStackPush (SkipStack *prev, int skipping);
|
||||
|
||||
static SkipStack *
|
||||
SkipStackPop (SkipStack *prev);
|
||||
|
||||
typedef struct _loopStack {
|
||||
struct _loopStack *prev;
|
||||
String *tag;
|
||||
String *extra;
|
||||
long pos;
|
||||
} LoopStack;
|
||||
|
||||
static LoopStack *
|
||||
LoopStackPush (LoopStack *prev, FILE *f, char *tag);
|
||||
|
||||
static LoopStack *
|
||||
LoopStackLoop (ReplaceSet *rs, LoopStack *ls, FILE *f);
|
||||
|
||||
static void
|
||||
LineSkip (FILE *f);
|
||||
|
||||
static void
|
||||
DoReplace (FILE *f, ReplaceSet *s);
|
||||
|
||||
#define STRING_INIT 128
|
||||
|
||||
static void *
|
||||
New (int size)
|
||||
{
|
||||
void *m = malloc (size);
|
||||
if (!m)
|
||||
abort ();
|
||||
return m;
|
||||
}
|
||||
|
||||
static void *
|
||||
Reallocate (void *p, int size)
|
||||
{
|
||||
void *r = realloc (p, size);
|
||||
|
||||
if (!r)
|
||||
abort ();
|
||||
return r;
|
||||
}
|
||||
|
||||
static void
|
||||
Dispose (void *p)
|
||||
{
|
||||
free (p);
|
||||
}
|
||||
|
||||
static String *
|
||||
StringNew (void)
|
||||
{
|
||||
String *s;
|
||||
|
||||
s = New (sizeof (String));
|
||||
s->buf = New (STRING_INIT);
|
||||
s->size = STRING_INIT - 1;
|
||||
s->buf[0] = '\0';
|
||||
s->len = 0;
|
||||
return s;
|
||||
}
|
||||
|
||||
static void
|
||||
StringAdd (String *s, char c)
|
||||
{
|
||||
if (s->len == s->size)
|
||||
s->buf = Reallocate (s->buf, (s->size *= 2) + 1);
|
||||
s->buf[s->len++] = c;
|
||||
s->buf[s->len] = '\0';
|
||||
}
|
||||
|
||||
static void
|
||||
StringAddString (String *s, char *buf)
|
||||
{
|
||||
while (*buf)
|
||||
StringAdd (s, *buf++);
|
||||
}
|
||||
|
||||
static String *
|
||||
StringMake (char *buf)
|
||||
{
|
||||
String *s = StringNew ();
|
||||
StringAddString (s, buf);
|
||||
return s;
|
||||
}
|
||||
|
||||
static void
|
||||
StringDel (String *s)
|
||||
{
|
||||
if (s->len)
|
||||
s->buf[--s->len] = '\0';
|
||||
}
|
||||
|
||||
static void
|
||||
StringPut (FILE *f, String *s)
|
||||
{
|
||||
char *b = s->buf;
|
||||
|
||||
while (*b)
|
||||
putc (*b++, f);
|
||||
}
|
||||
|
||||
#define StringLast(s) ((s)->len ? (s)->buf[(s)->len - 1] : '\0')
|
||||
|
||||
static void
|
||||
StringDispose (String *s)
|
||||
{
|
||||
Dispose (s->buf);
|
||||
Dispose (s);
|
||||
}
|
||||
|
||||
static Replace *
|
||||
ReplaceNew (void)
|
||||
{
|
||||
Replace *r = New (sizeof (Replace));
|
||||
r->tag = StringNew ();
|
||||
r->text = StringNew ();
|
||||
return r;
|
||||
}
|
||||
|
||||
static void
|
||||
ReplaceDispose (Replace *r)
|
||||
{
|
||||
StringDispose (r->tag);
|
||||
StringDispose (r->text);
|
||||
Dispose (r);
|
||||
}
|
||||
|
||||
static void
|
||||
Bail (const char *format, const char *arg)
|
||||
{
|
||||
fprintf (stderr, "fatal: ");
|
||||
fprintf (stderr, format, arg);
|
||||
fprintf (stderr, "\n");
|
||||
exit (1);
|
||||
}
|
||||
|
||||
static Replace *
|
||||
ReplaceRead (FILE *f)
|
||||
{
|
||||
int c;
|
||||
Replace *r;
|
||||
|
||||
while ((c = getc (f)) != '@')
|
||||
{
|
||||
if (c == EOF)
|
||||
return 0;
|
||||
}
|
||||
r = ReplaceNew();
|
||||
while ((c = getc (f)) != '@')
|
||||
{
|
||||
if (c == EOF)
|
||||
{
|
||||
ReplaceDispose (r);
|
||||
return 0;
|
||||
}
|
||||
if (isspace (c))
|
||||
Bail ("invalid character after tag %s", r->tag->buf);
|
||||
StringAdd (r->tag, c);
|
||||
}
|
||||
if (r->tag->buf[0] == '\0')
|
||||
{
|
||||
ReplaceDispose (r);
|
||||
return 0;
|
||||
}
|
||||
while (isspace ((c = getc (f))))
|
||||
;
|
||||
ungetc (c, f);
|
||||
while ((c = getc (f)) != '@' && c != EOF)
|
||||
StringAdd (r->text, c);
|
||||
if (c == '@')
|
||||
ungetc (c, f);
|
||||
while (isspace (StringLast (r->text)))
|
||||
StringDel (r->text);
|
||||
return r;
|
||||
}
|
||||
|
||||
static ReplaceList *
|
||||
ReplaceListNew (Replace *r, ReplaceList *next)
|
||||
{
|
||||
ReplaceList *l = New (sizeof (ReplaceList));
|
||||
l->r = r;
|
||||
l->next = next;
|
||||
return l;
|
||||
}
|
||||
|
||||
static void
|
||||
ReplaceListDispose (ReplaceList *l)
|
||||
{
|
||||
if (l)
|
||||
{
|
||||
ReplaceListDispose (l->next);
|
||||
ReplaceDispose (l->r);
|
||||
Dispose (l);
|
||||
}
|
||||
}
|
||||
|
||||
static ReplaceSet *
|
||||
ReplaceSetNew (void)
|
||||
{
|
||||
ReplaceSet *s = New (sizeof (ReplaceSet));
|
||||
s->head = 0;
|
||||
return s;
|
||||
}
|
||||
|
||||
static void
|
||||
ReplaceSetDispose (ReplaceSet *s)
|
||||
{
|
||||
ReplaceListDispose (s->head);
|
||||
Dispose (s);
|
||||
}
|
||||
|
||||
static void
|
||||
ReplaceSetAdd (ReplaceSet *s, Replace *r)
|
||||
{
|
||||
s->head = ReplaceListNew (r, s->head);
|
||||
}
|
||||
|
||||
static Replace *
|
||||
ReplaceSetFind (ReplaceSet *s, char *tag)
|
||||
{
|
||||
ReplaceList *l;
|
||||
|
||||
for (l = s->head; l; l = l->next)
|
||||
if (!strcmp (tag, l->r->tag->buf))
|
||||
return l->r;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static ReplaceSet *
|
||||
ReplaceSetRead (FILE *f)
|
||||
{
|
||||
ReplaceSet *s = ReplaceSetNew ();
|
||||
Replace *r;
|
||||
|
||||
while ((r = ReplaceRead (f)))
|
||||
{
|
||||
while (ReplaceSetFind (s, r->tag->buf))
|
||||
StringAdd (r->tag, '+');
|
||||
ReplaceSetAdd (s, r);
|
||||
}
|
||||
if (!s->head)
|
||||
{
|
||||
ReplaceSetDispose (s);
|
||||
s = 0;
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
static SkipStack *
|
||||
SkipStackPush (SkipStack *prev, int skipping)
|
||||
{
|
||||
SkipStack *ss = New (sizeof (SkipStack));
|
||||
ss->prev = prev;
|
||||
ss->skipping = skipping;
|
||||
return ss;
|
||||
}
|
||||
|
||||
static SkipStack *
|
||||
SkipStackPop (SkipStack *prev)
|
||||
{
|
||||
SkipStack *ss = prev->prev;
|
||||
Dispose (prev);
|
||||
return ss;
|
||||
}
|
||||
|
||||
static LoopStack *
|
||||
LoopStackPush (LoopStack *prev, FILE *f, char *tag)
|
||||
{
|
||||
LoopStack *ls = New (sizeof (LoopStack));
|
||||
ls->prev = prev;
|
||||
ls->tag = StringMake (tag);
|
||||
ls->extra = StringNew ();
|
||||
ls->pos = ftell (f);
|
||||
return ls;
|
||||
}
|
||||
|
||||
static LoopStack *
|
||||
LoopStackLoop (ReplaceSet *rs, LoopStack *ls, FILE *f)
|
||||
{
|
||||
String *s = StringMake (ls->tag->buf);
|
||||
LoopStack *ret = ls;
|
||||
Bool loop;
|
||||
|
||||
StringAdd (ls->extra, '+');
|
||||
StringAddString (s, ls->extra->buf);
|
||||
loop = ReplaceSetFind (rs, s->buf) != 0;
|
||||
StringDispose (s);
|
||||
if (loop)
|
||||
fseek (f, ls->pos, SEEK_SET);
|
||||
else
|
||||
{
|
||||
ret = ls->prev;
|
||||
StringDispose (ls->tag);
|
||||
StringDispose (ls->extra);
|
||||
Dispose (ls);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
LineSkip (FILE *f)
|
||||
{
|
||||
int c;
|
||||
|
||||
while ((c = getc (f)) == '\n')
|
||||
;
|
||||
ungetc (c, f);
|
||||
}
|
||||
|
||||
static void
|
||||
DoReplace (FILE *f, ReplaceSet *s)
|
||||
{
|
||||
int c;
|
||||
String *tag;
|
||||
Replace *r;
|
||||
SkipStack *ss = 0;
|
||||
LoopStack *ls = 0;
|
||||
int skipping = 0;
|
||||
|
||||
while ((c = getc (f)) != EOF)
|
||||
{
|
||||
if (c == '@')
|
||||
{
|
||||
tag = StringNew ();
|
||||
while ((c = getc (f)) != '@')
|
||||
{
|
||||
if (c == EOF)
|
||||
abort ();
|
||||
StringAdd (tag, c);
|
||||
}
|
||||
if (ls)
|
||||
StringAddString (tag, ls->extra->buf);
|
||||
switch (tag->buf[0]) {
|
||||
case '?':
|
||||
ss = SkipStackPush (ss, skipping);
|
||||
if (!ReplaceSetFind (s, tag->buf + 1))
|
||||
skipping++;
|
||||
LineSkip (f);
|
||||
break;
|
||||
case ':':
|
||||
if (!ss)
|
||||
abort ();
|
||||
if (ss->skipping == skipping)
|
||||
++skipping;
|
||||
else
|
||||
--skipping;
|
||||
LineSkip (f);
|
||||
break;
|
||||
case ';':
|
||||
skipping = ss->skipping;
|
||||
ss = SkipStackPop (ss);
|
||||
LineSkip (f);
|
||||
break;
|
||||
case '{':
|
||||
ls = LoopStackPush (ls, f, tag->buf + 1);
|
||||
LineSkip (f);
|
||||
break;
|
||||
case '}':
|
||||
ls = LoopStackLoop (s, ls, f);
|
||||
LineSkip (f);
|
||||
break;
|
||||
default:
|
||||
r = ReplaceSetFind (s, tag->buf);
|
||||
if (r && !skipping)
|
||||
StringPut (stdout, r->text);
|
||||
break;
|
||||
}
|
||||
StringDispose (tag);
|
||||
}
|
||||
else if (!skipping)
|
||||
putchar (c);
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
FILE *f;
|
||||
ReplaceSet *s;
|
||||
|
||||
if (!argv[1])
|
||||
Bail ("usage: %s <template.sgml>", argv[0]);
|
||||
f = fopen (argv[1], "r");
|
||||
if (!f)
|
||||
{
|
||||
Bail ("can't open file %s", argv[1]);
|
||||
exit (1);
|
||||
}
|
||||
while ((s = ReplaceSetRead (stdin)))
|
||||
{
|
||||
DoReplace (f, s);
|
||||
ReplaceSetDispose (s);
|
||||
rewind (f);
|
||||
}
|
||||
if (ferror (stdout))
|
||||
Bail ("%s", "error writing output");
|
||||
exit (0);
|
||||
}
|
160
doc/edit-sgml.py
160
doc/edit-sgml.py
|
@ -1,160 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
#
|
||||
# fontconfig/doc/edit-sgml.py
|
||||
#
|
||||
# Copyright © 2003 Keith Packard
|
||||
# Copyright © 2020 Tim-Philipp Müller
|
||||
#
|
||||
# Permission to use, copy, modify, distribute, and sell this software and its
|
||||
# documentation for any purpose is hereby granted without fee, provided that
|
||||
# the above copyright notice appear in all copies and that both that
|
||||
# copyright notice and this permission notice appear in supporting
|
||||
# documentation, and that the name of the author(s) not be used in
|
||||
# advertising or publicity pertaining to distribution of the software without
|
||||
# specific, written prior permission. The authors make no
|
||||
# representations about the suitability of this software for any purpose. It
|
||||
# is provided "as is" without express or implied warranty.
|
||||
#
|
||||
# THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
# EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
||||
# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
# PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
import argparse
|
||||
import sys
|
||||
import re
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('template')
|
||||
parser.add_argument('input')
|
||||
parser.add_argument('output')
|
||||
|
||||
args = parser.parse_known_args()
|
||||
|
||||
template_fn = args[0].template
|
||||
output_fn = args[0].output
|
||||
input_fn = args[0].input
|
||||
|
||||
# -------------
|
||||
# Read template
|
||||
# -------------
|
||||
|
||||
with open(template_fn, 'r', encoding='utf8') as f:
|
||||
template_text = f.read()
|
||||
|
||||
template_lines = template_text.strip().split('\n')
|
||||
|
||||
# -------------------------------------
|
||||
# Read replacement sets from .fncs file
|
||||
# -------------------------------------
|
||||
|
||||
replacement_sets = []
|
||||
|
||||
# TODO: also allow '-' for stdin
|
||||
with open(input_fn, 'r', encoding='utf8') as f:
|
||||
fncs_text = f.read()
|
||||
|
||||
# split into replacement sets
|
||||
fncs_chunks = fncs_text.strip().split('@@')
|
||||
|
||||
for chunk in fncs_chunks:
|
||||
# get rid of any preamble such as license and FcFreeTypeQueryAll decl in fcfreetype.fncs
|
||||
start = chunk.find('@')
|
||||
if start:
|
||||
chunk = chunk[start:]
|
||||
|
||||
# split at '@' and remove empty lines (keep it simple instead of doing fancy
|
||||
# things with regular expression matches, we control the input after all)
|
||||
lines = [line for line in chunk.split('@') if line.strip()]
|
||||
|
||||
replacement_set = {}
|
||||
|
||||
while lines:
|
||||
tag = lines.pop(0).strip()
|
||||
# FIXME: this hard codes the tag used in funcs.sgml - we're lazy
|
||||
if tag.startswith('PROTOTYPE'):
|
||||
text = ''
|
||||
else:
|
||||
text = lines.pop(0).strip()
|
||||
if text.endswith('%'):
|
||||
text = text[:-1] + ' '
|
||||
|
||||
replacement_set[tag] = text
|
||||
|
||||
if replacement_set:
|
||||
replacement_sets += [replacement_set]
|
||||
|
||||
# ----------------
|
||||
# Open output file
|
||||
# ----------------
|
||||
|
||||
if output_fn == '-':
|
||||
fout = sys.stdout
|
||||
else:
|
||||
fout = open(output_fn, "w", encoding='utf8')
|
||||
|
||||
# ----------------
|
||||
# Process template
|
||||
# ----------------
|
||||
|
||||
def do_replace(template_lines, rep, tag_suffix=''):
|
||||
skip_tag = None
|
||||
skip_lines = False
|
||||
loop_lines = []
|
||||
loop_tag = None
|
||||
|
||||
for t_line in template_lines:
|
||||
# This makes processing easier and is the case for our templates
|
||||
if t_line.startswith('@') and not t_line.endswith('@'):
|
||||
sys.exit('Template lines starting with @ are expected to end with @, please fix me!')
|
||||
|
||||
if loop_tag:
|
||||
loop_lines += [t_line]
|
||||
|
||||
# Check if line starts with a directive
|
||||
if t_line.startswith('@?'):
|
||||
tag = t_line[2:-1] + tag_suffix
|
||||
if skip_tag:
|
||||
sys.exit('Recursive skipping not supported, please fix me!')
|
||||
skip_tag = tag
|
||||
skip_lines = tag not in rep
|
||||
elif t_line.startswith('@:'):
|
||||
if not skip_tag:
|
||||
sys.exit('Skip else but no active skip list?!')
|
||||
skip_lines = skip_tag in rep
|
||||
elif t_line.startswith('@;'):
|
||||
if not skip_tag:
|
||||
sys.exit('Skip end but no active skip list?!')
|
||||
skip_tag = None
|
||||
skip_lines = False
|
||||
elif t_line.startswith('@{'):
|
||||
if loop_tag or tag_suffix != '':
|
||||
sys.exit('Recursive looping not supported, please fix me!')
|
||||
loop_tag = t_line[2:-1]
|
||||
elif t_line.startswith('@}'):
|
||||
tag = t_line[2:-1] + tag_suffix
|
||||
if not loop_tag:
|
||||
sys.exit('Loop end but no active loop?!')
|
||||
if loop_tag != tag:
|
||||
sys.exit(f'Loop end but loop tag mismatch: {loop_tag} != {tag}!')
|
||||
loop_lines.pop() # remove loop end directive
|
||||
suffix = '+'
|
||||
while loop_tag + suffix in rep:
|
||||
do_replace(loop_lines, rep, suffix)
|
||||
suffix += '+'
|
||||
loop_tag = None
|
||||
loop_lines = []
|
||||
else:
|
||||
if not skip_lines:
|
||||
# special-case inline optional substitution (hard-codes specific pattern in funcs.sgml because we're lazy)
|
||||
output_line = re.sub(r'@\?(RET)@@RET@@:@(void)@;@', lambda m: rep.get(m.group(1) + tag_suffix, m.group(2)), t_line)
|
||||
# replace any substitution tags with their respective substitution text
|
||||
output_line = re.sub(r'@(\w+)@', lambda m: rep.get(m.group(1) + tag_suffix, ''), output_line)
|
||||
print(output_line, file=fout)
|
||||
|
||||
# process template for each replacement set
|
||||
for rep in replacement_sets:
|
||||
do_replace(template_lines, rep)
|
|
@ -1,90 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
#
|
||||
# fontconfig/doc/extract-man-list.py
|
||||
#
|
||||
# Parses .fncs files and extracts list of man pages that will be generated
|
||||
#
|
||||
# Copyright © 2020 Tim-Philipp Müller
|
||||
#
|
||||
# Permission to use, copy, modify, distribute, and sell this software and its
|
||||
# documentation for any purpose is hereby granted without fee, provided that
|
||||
# the above copyright notice appear in all copies and that both that
|
||||
# copyright notice and this permission notice appear in supporting
|
||||
# documentation, and that the name of the author(s) not be used in
|
||||
# advertising or publicity pertaining to distribution of the software without
|
||||
# specific, written prior permission. The authors make no
|
||||
# representations about the suitability of this software for any purpose. It
|
||||
# is provided "as is" without express or implied warranty.
|
||||
#
|
||||
# THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
# EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
||||
# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
# PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
import sys
|
||||
import re
|
||||
|
||||
replacement_sets = []
|
||||
|
||||
# -------------------------------------
|
||||
# Read replacement sets from .fncs file
|
||||
# -------------------------------------
|
||||
|
||||
def read_fncs_file(fn):
|
||||
global replacement_sets
|
||||
|
||||
with open(fn, 'r', encoding='utf8') as f:
|
||||
fncs_text = f.read()
|
||||
|
||||
# split into replacement sets
|
||||
fncs_chunks = fncs_text.strip().split('@@')
|
||||
|
||||
for chunk in fncs_chunks:
|
||||
# get rid of any preamble such as license and FcFreeTypeQueryAll decl in fcfreetype.fncs
|
||||
start = chunk.find('@')
|
||||
if start:
|
||||
chunk = chunk[start:]
|
||||
|
||||
# split at '@' and remove empty lines (keep it simple instead of doing fancy
|
||||
# things with regular expression matches, we control the input after all)
|
||||
lines = [line for line in chunk.split('@') if line.strip()]
|
||||
|
||||
replacement_set = {}
|
||||
|
||||
while lines:
|
||||
tag = lines.pop(0).strip()
|
||||
# FIXME: this hard codes the tag used in funcs.sgml - we're lazy
|
||||
if tag.startswith('PROTOTYPE'):
|
||||
text = ''
|
||||
else:
|
||||
text = lines.pop(0).strip()
|
||||
if text.endswith('%'):
|
||||
text = text[:-1] + ' '
|
||||
|
||||
replacement_set[tag] = text
|
||||
|
||||
if replacement_set:
|
||||
replacement_sets += [replacement_set]
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Main
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
sys.exit('Usage: {} FILE1.FNCS [FILE2.FNCS...]'.format(sys.argv[0]))
|
||||
|
||||
fout = sys.stdout
|
||||
|
||||
for input_fn in sys.argv[1:]:
|
||||
read_fncs_file(input_fn)
|
||||
|
||||
# process template for each replacement set
|
||||
for rep in replacement_sets:
|
||||
if 'FUNC+' in rep:
|
||||
man_page_title = rep.get('TITLE', rep['FUNC'])
|
||||
else:
|
||||
man_page_title = rep['FUNC']
|
||||
print(man_page_title)
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* fontconfig/doc/fcatomic.fncs
|
||||
* $Id$
|
||||
*
|
||||
* Copyright © 2003 Keith Packard
|
||||
*
|
||||
|
@ -7,15 +7,15 @@
|
|||
* documentation for any purpose is hereby granted without fee, provided that
|
||||
* the above copyright notice appear in all copies and that both that
|
||||
* copyright notice and this permission notice appear in supporting
|
||||
* documentation, and that the name of the author(s) not be used in
|
||||
* documentation, and that the name of Keith Packard not be used in
|
||||
* advertising or publicity pertaining to distribution of the software without
|
||||
* specific, written prior permission. The authors make no
|
||||
* specific, written prior permission. Keith Packard makes no
|
||||
* representations about the suitability of this software for any purpose. It
|
||||
* is provided "as is" without express or implied warranty.
|
||||
*
|
||||
* THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
* EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
* EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
||||
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
|
@ -24,8 +24,8 @@
|
|||
|
||||
@RET@ FcAtomic *
|
||||
@FUNC@ FcAtomicCreate
|
||||
@TYPE1@ const FcChar8 * @ARG1@ file
|
||||
@PURPOSE@ create an FcAtomic object
|
||||
@TYPE1@ const FcChar8 * @ARG1@ file
|
||||
@PURPOSE@ create an FcAtomic object
|
||||
@DESC@
|
||||
Creates a data structure containing data needed to control access to <parameter>file</parameter>.
|
||||
Writing is done to a separate file. Once that file is complete, the original
|
||||
|
@ -36,17 +36,17 @@ a consistent and complete file without the need to lock for reading.
|
|||
@RET@ FcBool
|
||||
@FUNC@ FcAtomicLock
|
||||
@TYPE1@ FcAtomic * @ARG1@ atomic
|
||||
@PURPOSE@ lock a file
|
||||
@PURPOSE@ lock a file
|
||||
@DESC@
|
||||
Attempts to lock the file referenced by <parameter>atomic</parameter>.
|
||||
Returns FcFalse if the file is already locked, else returns FcTrue and
|
||||
leaves the file locked.
|
||||
Attempts to lock the file referenced by <parameter>atomic</parameter>. Returns FcFalse if the
|
||||
file is locked by another process, else returns FcTrue and leaves the file
|
||||
locked.
|
||||
@@
|
||||
|
||||
@RET@ FcChar8 *
|
||||
@FUNC@ FcAtomicNewFile
|
||||
@TYPE1@ FcAtomic * @ARG1@ atomic
|
||||
@PURPOSE@ return new temporary file name
|
||||
@PURPOSE@ return new temporary file name
|
||||
@DESC@
|
||||
Returns the filename for writing a new version of the file referenced
|
||||
by <parameter>atomic</parameter>.
|
||||
|
@ -55,25 +55,23 @@ by <parameter>atomic</parameter>.
|
|||
@RET@ FcChar8 *
|
||||
@FUNC@ FcAtomicOrigFile
|
||||
@TYPE1@ FcAtomic * @ARG1@ atomic
|
||||
@PURPOSE@ return original file name
|
||||
@PURPOSE@ return original file name
|
||||
@DESC@
|
||||
Returns the file referenced by <parameter>atomic</parameter>.
|
||||
Returns the file refernced by <parameter>atomic</parameter>.
|
||||
@@
|
||||
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcAtomicReplaceOrig
|
||||
@TYPE1@ FcAtomic * @ARG1@ atomic
|
||||
@PURPOSE@ replace original with new
|
||||
@PURPOSE@ replace original with new
|
||||
@DESC@
|
||||
Replaces the original file referenced by <parameter>atomic</parameter> with
|
||||
the new file. Returns FcFalse if the file cannot be replaced due to
|
||||
permission issues in the filesystem. Otherwise returns FcTrue.
|
||||
Replaces the original file referenced by <parameter>atomic</parameter> with the new file.
|
||||
@@
|
||||
|
||||
@RET@ void
|
||||
@FUNC@ FcAtomicDeleteNew
|
||||
@TYPE1@ FcAtomic * @ARG1@ atomic
|
||||
@PURPOSE@ delete new file
|
||||
@PURPOSE@ delete new file
|
||||
@DESC@
|
||||
Deletes the new file. Used in error recovery to back out changes.
|
||||
@@
|
||||
|
@ -81,7 +79,7 @@ Deletes the new file. Used in error recovery to back out changes.
|
|||
@RET@ void
|
||||
@FUNC@ FcAtomicUnlock
|
||||
@TYPE1@ FcAtomic * @ARG1@ atomic
|
||||
@PURPOSE@ unlock a file
|
||||
@PURPOSE@ unlock a file
|
||||
@DESC@
|
||||
Unlocks the file.
|
||||
@@
|
||||
|
@ -89,7 +87,7 @@ Unlocks the file.
|
|||
@RET@ void
|
||||
@FUNC@ FcAtomicDestroy
|
||||
@TYPE1@ FcAtomic * @ARG1@ atomic
|
||||
@PURPOSE@ destroy an FcAtomic object
|
||||
@PURPOSE@ destroy an FcAtomic object
|
||||
@DESC@
|
||||
Destroys <parameter>atomic</parameter>.
|
||||
@@
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* fontconfig/doc/fcblanks.fncs
|
||||
* $Id$
|
||||
*
|
||||
* Copyright © 2003 Keith Packard
|
||||
*
|
||||
|
@ -7,54 +7,52 @@
|
|||
* documentation for any purpose is hereby granted without fee, provided that
|
||||
* the above copyright notice appear in all copies and that both that
|
||||
* copyright notice and this permission notice appear in supporting
|
||||
* documentation, and that the name of the author(s) not be used in
|
||||
* documentation, and that the name of Keith Packard not be used in
|
||||
* advertising or publicity pertaining to distribution of the software without
|
||||
* specific, written prior permission. The authors make no
|
||||
* specific, written prior permission. Keith Packard makes no
|
||||
* representations about the suitability of this software for any purpose. It
|
||||
* is provided "as is" without express or implied warranty.
|
||||
*
|
||||
* THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
* EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
* EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
||||
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
@RET@ FcBlanks *
|
||||
@FUNC@ FcBlanksCreate
|
||||
@TYPE1@ void
|
||||
@PURPOSE@ Create an FcBlanks
|
||||
@RET@ FcBlanks *
|
||||
@FUNC@ FcBlanksCreate
|
||||
@TYPE1@ void
|
||||
@PURPOSE@ Create an FcBlanks
|
||||
@DESC@
|
||||
FcBlanks is deprecated.
|
||||
This function always returns NULL.
|
||||
Creates an empty FcBlanks object.
|
||||
@@
|
||||
|
||||
@RET@ void
|
||||
@FUNC@ FcBlanksDestroy
|
||||
@TYPE1@ FcBlanks * @ARG1@ b
|
||||
@PURPOSE@ Destroy and FcBlanks
|
||||
@RET@ void
|
||||
@FUNC@ FcBlanksDestroy
|
||||
@TYPE1@ FcBlanks * @ARG1@ b
|
||||
@PURPOSE@ Destroy and FcBlanks
|
||||
@DESC@
|
||||
FcBlanks is deprecated.
|
||||
This function does nothing.
|
||||
Destroys an FcBlanks object, freeing any associated memory.
|
||||
@@
|
||||
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcBlanksAdd
|
||||
@TYPE1@ FcBlanks * @ARG1@ b
|
||||
@TYPE2@ FcChar32% @ARG2@ ucs4
|
||||
@PURPOSE@ Add a character to an FcBlanks
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcBlanksAdd
|
||||
@TYPE1@ FcBlanks * @ARG1@ b
|
||||
@TYPE2@ FcChar32 @ARG2@ ucs4
|
||||
@PURPOSE@ Add a character to an FcBlanks
|
||||
@DESC@
|
||||
FcBlanks is deprecated.
|
||||
This function always returns FALSE.
|
||||
Adds a single character to an FcBlanks object, returning FcFalse
|
||||
if this process ran out of memory.
|
||||
@@
|
||||
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcBlanksIsMember
|
||||
@TYPE1@ FcBlanks * @ARG1@ b
|
||||
@TYPE2@ FcChar32% @ARG2@ ucs4
|
||||
@PURPOSE@ Query membership in an FcBlanks
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcBlanksIsMember
|
||||
@TYPE1@ FcBlanks * @ARG1@ b
|
||||
@TYPE2@ FcChar32 @ARG2@ ucs4
|
||||
@PURPOSE@ Query membership in an FcBlanks
|
||||
@DESC@
|
||||
FcBlanks is deprecated.
|
||||
This function always returns FALSE.
|
||||
Returns whether the specified FcBlanks object contains the indicated Unicode
|
||||
value.
|
||||
@@
|
||||
|
|
111
doc/fccache.fncs
111
doc/fccache.fncs
|
@ -1,111 +0,0 @@
|
|||
/*
|
||||
* Copyright © 2007 Keith Packard
|
||||
*
|
||||
* Permission to use, copy, modify, distribute, and sell this software and its
|
||||
* documentation for any purpose is hereby granted without fee, provided that
|
||||
* the above copyright notice appear in all copies and that both that
|
||||
* copyright notice and this permission notice appear in supporting
|
||||
* documentation, and that the name of the author(s) not be used in
|
||||
* advertising or publicity pertaining to distribution of the software without
|
||||
* specific, written prior permission. The authors make no
|
||||
* representations about the suitability of this software for any purpose. It
|
||||
* is provided "as is" without express or implied warranty.
|
||||
*
|
||||
* THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
* EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
||||
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
@RET@ const FcChar8 *
|
||||
@FUNC@ FcCacheDir
|
||||
@TYPE1@ const FcCache * @ARG1@ cache
|
||||
@PURPOSE@ Return directory of <parameter>cache</parameter>
|
||||
@DESC@
|
||||
This function returns the directory from which the cache was constructed.
|
||||
@@
|
||||
|
||||
@RET@ FcFontSet *
|
||||
@FUNC@ FcCacheCopySet
|
||||
@TYPE1@ const FcCache * @ARG1@ cache
|
||||
@PURPOSE@ Returns a copy of the fontset from <parameter>cache</parameter>
|
||||
@DESC@
|
||||
The returned fontset contains each of the font patterns from
|
||||
<parameter>cache</parameter>. This fontset may be modified, but the patterns
|
||||
from the cache are read-only.
|
||||
@@
|
||||
|
||||
@RET@ const FcChar8 *
|
||||
@FUNC@ FcCacheSubdir
|
||||
@TYPE1@ const FcCache * @ARG1@ cache
|
||||
@TYPE2@ int @ARG2@ i
|
||||
@PURPOSE@ Return the <parameter>i</parameter>'th subdirectory.
|
||||
@DESC@
|
||||
The set of subdirectories stored in a cache file are indexed by this
|
||||
function, <parameter>i</parameter> should range from 0 to
|
||||
<parameter>n</parameter>-1, where <parameter>n</parameter> is the return
|
||||
value from FcCacheNumSubdir.
|
||||
@@
|
||||
|
||||
@RET@ int
|
||||
@FUNC@ FcCacheNumSubdir
|
||||
@TYPE1@ const FcCache * @ARG1@ cache
|
||||
@PURPOSE@ Return the number of subdirectories in <parameter>cache</parameter>.
|
||||
@DESC@
|
||||
This returns the total number of subdirectories in the cache.
|
||||
@@
|
||||
|
||||
@RET@ int
|
||||
@FUNC@ FcCacheNumFont
|
||||
@TYPE1@ const FcCache * @ARG1@ cache
|
||||
@PURPOSE@ Returns the number of fonts in <parameter>cache</parameter>.
|
||||
@DESC@
|
||||
This returns the number of fonts which would be included in the return from
|
||||
FcCacheCopySet.
|
||||
@@
|
||||
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcDirCacheClean
|
||||
@TYPE1@ const FcChar8 * @ARG1@ cache_dir
|
||||
@TYPE2@ FcBool @ARG2@ verbose
|
||||
@PURPOSE@ Clean up a cache directory
|
||||
@DESC@
|
||||
This tries to clean up the cache directory of <parameter>cache_dir</parameter>.
|
||||
This returns FcTrue if the operation is successfully complete. otherwise FcFalse.
|
||||
@SINCE@ 2.9.91
|
||||
@@
|
||||
|
||||
@RET@ void
|
||||
@FUNC@ FcCacheCreateTagFile
|
||||
@TYPE1@ const FcConfig * @ARG1@ config
|
||||
@PURPOSE@ Create CACHEDIR.TAG at cache directory.
|
||||
@DESC@
|
||||
This tries to create CACHEDIR.TAG file at the cache directory registered
|
||||
to <parameter>config</parameter>.
|
||||
@SINCE@ 2.9.91
|
||||
@@
|
||||
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcDirCacheCreateUUID
|
||||
@TYPE1@ FcChar8 * @ARG1@ dir
|
||||
@TYPE2@ FcBool @ARG2@ force
|
||||
@TYPE3@ FcConfig * @ARG3@ config
|
||||
@PURPOSE@ Create .uuid file at a directory
|
||||
@DESC@
|
||||
This function is deprecated. it doesn't take any effects.
|
||||
@SINCE@ 2.12.92
|
||||
@@
|
||||
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcDirCacheDeleteUUID
|
||||
@TYPE1@ const FcChar8 * @ARG1@ dir
|
||||
@TYPE2@ FcConfig * @ARG2@ config
|
||||
@PURPOSE@ Delete .uuid file
|
||||
@DESC@
|
||||
This is to delete .uuid file containing an UUID at a font directory of
|
||||
<parameter>dir</parameter>.
|
||||
@SINCE@ 2.13.1
|
||||
@@
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* fontconfig/doc/fccharset.fncs
|
||||
* $Id$
|
||||
*
|
||||
* Copyright © 2003 Keith Packard
|
||||
*
|
||||
|
@ -7,236 +7,161 @@
|
|||
* documentation for any purpose is hereby granted without fee, provided that
|
||||
* the above copyright notice appear in all copies and that both that
|
||||
* copyright notice and this permission notice appear in supporting
|
||||
* documentation, and that the name of the author(s) not be used in
|
||||
* documentation, and that the name of Keith Packard not be used in
|
||||
* advertising or publicity pertaining to distribution of the software without
|
||||
* specific, written prior permission. The authors make no
|
||||
* specific, written prior permission. Keith Packard makes no
|
||||
* representations about the suitability of this software for any purpose. It
|
||||
* is provided "as is" without express or implied warranty.
|
||||
*
|
||||
* THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
* EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
* EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
||||
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
@RET@ FcCharSet *
|
||||
@FUNC@ FcCharSetCreate
|
||||
@TYPE1@ void
|
||||
@PURPOSE@ Create an empty character set
|
||||
@RET@ FcCharSet *
|
||||
@FUNC@ FcCharSetCreate
|
||||
@TYPE1@ void
|
||||
@PURPOSE@ Create an empty character set
|
||||
@DESC@
|
||||
<function>FcCharSetCreate</function> allocates and initializes a new empty
|
||||
character set object.
|
||||
@@
|
||||
|
||||
@RET@ void
|
||||
@FUNC@ FcCharSetDestroy
|
||||
@TYPE1@ FcCharSet * @ARG1@ fcs
|
||||
@PURPOSE@ Destroy a character set
|
||||
@RET@ void
|
||||
@FUNC@ FcCharSetDestroy
|
||||
@TYPE1@ FcCharSet * @ARG1@ fcs
|
||||
@PURPOSE@ Destroy a character set
|
||||
@DESC@
|
||||
<function>FcCharSetDestroy</function> decrements the reference count
|
||||
<function>FcCharSetDestroy</function> decrements the reference count
|
||||
<parameter>fcs</parameter>. If the reference count becomes zero, all
|
||||
memory referenced is freed.
|
||||
@@
|
||||
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcCharSetAddChar
|
||||
@TYPE1@ FcCharSet * @ARG1@ fcs
|
||||
@TYPE2@ FcChar32% @ARG2@ ucs4
|
||||
@PURPOSE@ Add a character to a charset
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcCharSetAddChar
|
||||
@TYPE1@ FcCharSet * @ARG1@ fcs
|
||||
@TYPE2@ FcChar32 @ARG2@ ucs4
|
||||
@PURPOSE@ Add a character to a charset
|
||||
@DESC@
|
||||
<function>FcCharSetAddChar</function> adds a single Unicode char to the set,
|
||||
<function>FcCharSetAddChar</function> adds a single unicode char to the set,
|
||||
returning FcFalse on failure, either as a result of a constant set or from
|
||||
running out of memory.
|
||||
running out of memory.
|
||||
@@
|
||||
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcCharSetDelChar
|
||||
@TYPE1@ FcCharSet * @ARG1@ fcs
|
||||
@TYPE2@ FcChar32% @ARG2@ ucs4
|
||||
@PURPOSE@ Delete a character from a charset
|
||||
@DESC@
|
||||
<function>FcCharSetDelChar</function> deletes a single Unicode char from the set,
|
||||
returning FcFalse on failure, either as a result of a constant set or from
|
||||
running out of memory.
|
||||
@SINCE@ 2.9.0
|
||||
@@
|
||||
|
||||
@RET@ FcCharSet *
|
||||
@FUNC@ FcCharSetCopy
|
||||
@TYPE1@ FcCharSet * @ARG1@ src
|
||||
@PURPOSE@ Copy a charset
|
||||
@RET@ FcCharSet *
|
||||
@FUNC@ FcCharSetCopy
|
||||
@TYPE1@ FcCharSet * @ARG1@ src
|
||||
@PURPOSE@ Copy a charset
|
||||
@DESC@
|
||||
Makes a copy of <parameter>src</parameter>; note that this may not actually do anything more
|
||||
than increment the reference count on <parameter>src</parameter>.
|
||||
than increment the reference count on <parameter>src</parameter>.
|
||||
@@
|
||||
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcCharSetEqual
|
||||
@TYPE1@ const FcCharSet * @ARG1@ a
|
||||
@TYPE2@ const FcCharSet * @ARG2@ b
|
||||
@PURPOSE@ Compare two charsets
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcCharSetEqual
|
||||
@TYPE1@ const FcCharSet * @ARG1@ a
|
||||
@TYPE2@ const FcCharSet * @ARG2@ b
|
||||
@PURPOSE@ Compare two charsets
|
||||
@DESC@
|
||||
Returns whether <parameter>a</parameter> and <parameter>b</parameter>
|
||||
contain the same set of Unicode chars.
|
||||
contain the same set of unicode chars.
|
||||
@@
|
||||
|
||||
@RET@ FcCharSet *
|
||||
@FUNC@ FcCharSetIntersect
|
||||
@TYPE1@ const FcCharSet * @ARG1@ a
|
||||
@TYPE2@ const FcCharSet * @ARG2@ b
|
||||
@PURPOSE@ Intersect charsets
|
||||
@RET@ FcCharSet *
|
||||
@FUNC@ FcCharSetIntersect
|
||||
@TYPE1@ const FcCharSet * @ARG1@ a
|
||||
@TYPE2@ const FcCharSet * @ARG2@ b
|
||||
@PURPOSE@ Intersect charsets
|
||||
@DESC@
|
||||
Returns a set including only those chars found in both
|
||||
<parameter>a</parameter> and <parameter>b</parameter>.
|
||||
<parameter>a</parameter> and <parameter>b</parameter>.
|
||||
@@
|
||||
|
||||
@RET@ FcCharSet *
|
||||
@FUNC@ FcCharSetUnion
|
||||
@TYPE1@ const FcCharSet * @ARG1@ a
|
||||
@TYPE2@ const FcCharSet * @ARG2@ b
|
||||
@PURPOSE@ Add charsets
|
||||
@RET@ FcCharSet *
|
||||
@FUNC@ FcCharSetUnion
|
||||
@TYPE1@ const FcCharSet * @ARG1@ a
|
||||
@TYPE2@ const FcCharSet * @ARG2@ b
|
||||
@PURPOSE@ Add charsets
|
||||
@DESC@
|
||||
Returns a set including only those chars found in either <parameter>a</parameter> or <parameter>b</parameter>.
|
||||
Returns a set including only those chars found in either <parameter>a</parameter> or <parameter>b</parameter>.
|
||||
@@
|
||||
|
||||
@RET@ FcCharSet *
|
||||
@FUNC@ FcCharSetSubtract
|
||||
@TYPE1@ const FcCharSet * @ARG1@ a
|
||||
@TYPE2@ const FcCharSet * @ARG2@ b
|
||||
@PURPOSE@ Subtract charsets
|
||||
@RET@ FcCharSet *
|
||||
@FUNC@ FcCharSetSubtract
|
||||
@TYPE1@ const FcCharSet * @ARG1@ a
|
||||
@TYPE2@ const FcCharSet * @ARG2@ b
|
||||
@PURPOSE@ Subtract charsets
|
||||
@DESC@
|
||||
Returns a set including only those chars found in <parameter>a</parameter> but not <parameter>b</parameter>.
|
||||
Returns a set including only those chars found in <parameter>a</parameter> but not <parameter>b</parameter>.
|
||||
@@
|
||||
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcCharSetMerge
|
||||
@TYPE1@ FcCharSet * @ARG1@ a
|
||||
@TYPE2@ const FcCharSet * @ARG2@ b
|
||||
@TYPE3@ FcBool * @ARG3@ changed
|
||||
@PURPOSE@ Merge charsets
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcCharSetHasChar
|
||||
@TYPE1@ const FcCharSet * @ARG1@ fcs
|
||||
@TYPE2@ FcChar32 @ARG2@ ucs4
|
||||
@PURPOSE@ Check a charset for a char
|
||||
@DESC@
|
||||
Adds all chars in <parameter>b</parameter> to <parameter>a</parameter>.
|
||||
In other words, this is an in-place version of FcCharSetUnion.
|
||||
If <parameter>changed</parameter> is not NULL, then it returns whether any new
|
||||
chars from <parameter>b</parameter> were added to <parameter>a</parameter>.
|
||||
Returns FcFalse on failure, either when <parameter>a</parameter> is a constant
|
||||
set or from running out of memory.
|
||||
Returns whether <parameter>fcs</parameter> contains the char <parameter>ucs4</parameter>.
|
||||
@@
|
||||
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcCharSetHasChar
|
||||
@TYPE1@ const FcCharSet * @ARG1@ fcs
|
||||
@TYPE2@ FcChar32% @ARG2@ ucs4
|
||||
@PURPOSE@ Check a charset for a char
|
||||
@RET@ FcChar32
|
||||
@FUNC@ FcCharSetCount
|
||||
@TYPE1@ const FcCharSet * @ARG1@ a
|
||||
@PURPOSE@ Count entries in a charset
|
||||
@DESC@
|
||||
Returns whether <parameter>fcs</parameter> contains the char <parameter>ucs4</parameter>.
|
||||
Returns the total number of unicode chars in <parameter>a</parameter>.
|
||||
@@
|
||||
|
||||
@RET@ FcChar32
|
||||
@FUNC@ FcCharSetCount
|
||||
@TYPE1@ const FcCharSet * @ARG1@ a
|
||||
@PURPOSE@ Count entries in a charset
|
||||
@RET@ FcChar32
|
||||
@FUNC@ FcCharSetIntersectCount
|
||||
@TYPE1@ const FcCharSet * @ARG1@ a
|
||||
@TYPE2@ const FcCharSet * @ARG2@ b
|
||||
@PURPOSE@ Intersect and count charsets
|
||||
@DESC@
|
||||
Returns the total number of Unicode chars in <parameter>a</parameter>.
|
||||
Returns the number of chars that are in both <parameter>a</parameter> and <parameter>b</parameter>.
|
||||
@@
|
||||
|
||||
@RET@ FcChar32
|
||||
@FUNC@ FcCharSetIntersectCount
|
||||
@TYPE1@ const FcCharSet * @ARG1@ a
|
||||
@TYPE2@ const FcCharSet * @ARG2@ b
|
||||
@PURPOSE@ Intersect and count charsets
|
||||
@RET@ FcChar32
|
||||
@FUNC@ FcCharSetSubtractCount
|
||||
@TYPE1@ const FcCharSet * @ARG1@ a
|
||||
@TYPE2@ const FcCharSet * @ARG2@ b
|
||||
@PURPOSE@ Subtract and count charsets
|
||||
@DESC@
|
||||
Returns the number of chars that are in both <parameter>a</parameter> and <parameter>b</parameter>.
|
||||
Returns the number of chars that are in <parameter>a</parameter> but not in <parameter>b</parameter>.
|
||||
@@
|
||||
|
||||
@RET@ FcChar32
|
||||
@FUNC@ FcCharSetSubtractCount
|
||||
@TYPE1@ const FcCharSet * @ARG1@ a
|
||||
@TYPE2@ const FcCharSet * @ARG2@ b
|
||||
@PURPOSE@ Subtract and count charsets
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcCharSetIsSubset
|
||||
@TYPE1@ const FcCharSet * @ARG1@ a
|
||||
@TYPE2@ const FcCharSet * @ARG2@ b
|
||||
@PURPOSE@ Test for charset inclusion
|
||||
@DESC@
|
||||
Returns the number of chars that are in <parameter>a</parameter> but not in <parameter>b</parameter>.
|
||||
Returns whether <parameter>a</parameter> is a subset of <parameter>b</parameter>.
|
||||
@@
|
||||
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcCharSetIsSubset
|
||||
@TYPE1@ const FcCharSet * @ARG1@ a
|
||||
@TYPE2@ const FcCharSet * @ARG2@ b
|
||||
@PURPOSE@ Test for charset inclusion
|
||||
@RET@ FcChar32
|
||||
@FUNC@ FcCharSetFirstPage
|
||||
@TYPE1@ const FcCharSet * @ARG1@ a
|
||||
@TYPE2@ FcChar32[FC_CHARSET_MAP_SIZE] @ARG2@ map
|
||||
@TYPE3@ FcChar32 * @ARG3@ next
|
||||
@PURPOSE@ Start enumerating charset contents
|
||||
@DESC@
|
||||
Returns whether <parameter>a</parameter> is a subset of <parameter>b</parameter>.
|
||||
Builds an array of bits marking the first page of Unicode coverage of
|
||||
<parameter>a</parameter>. Returns the base of the array. <parameter>next</parameter> contains the next page in the
|
||||
font.
|
||||
@@
|
||||
|
||||
@RET@ FcChar32
|
||||
@FUNC@ FcCharSetFirstPage
|
||||
@TYPE1@ const FcCharSet * @ARG1@ a
|
||||
@TYPE2@ FcChar32[FC_CHARSET_MAP_SIZE]% @ARG2@ map
|
||||
@TYPE3@ FcChar32 * @ARG3@ next
|
||||
@PURPOSE@ Start enumerating charset contents
|
||||
@RET@ FcChar32
|
||||
@FUNC@ FcCharSetNextPage
|
||||
@TYPE1@ const FcCharSet * @ARG1@ a
|
||||
@TYPE2@ FcChar32[FC_CHARSET_MAP_SIZE] @ARG2@ map
|
||||
@TYPE3@ FcChar32 * @ARG3@ next
|
||||
@PURPOSE@ Continue enumerating charset contents
|
||||
@DESC@
|
||||
Builds an array of bits in <parameter>map</parameter> marking the
|
||||
first page of Unicode coverage of <parameter>a</parameter>.
|
||||
<parameter>*next</parameter> is set to contains the base code point
|
||||
for the next page in <parameter>a</parameter>. Returns the base code
|
||||
point for the page, or <constant>FC_CHARSET_DONE</constant> if
|
||||
<parameter>a</parameter> contains no pages. As an example, if
|
||||
<function>FcCharSetFirstPage</function> returns
|
||||
<literal>0x300</literal> and fills <parameter>map</parameter> with
|
||||
<literallayout class="monospaced">
|
||||
0xffffffff 0xffffffff 0x01000008 0x44300002 0xffffd7f0 0xfffffffb 0xffff7fff 0xffff0003
|
||||
</literallayout>
|
||||
Then the page contains code points <literal>0x300</literal> through
|
||||
<literal>0x33f</literal> (the first 64 code points on the page)
|
||||
because <parameter>map[0]</parameter> and
|
||||
<parameter>map[1]</parameter> both have all their bits set. It also
|
||||
contains code points <literal>0x343</literal> (<parameter>0x300 + 32*2
|
||||
+ (4-1)</parameter>) and <literal>0x35e</literal> (<parameter>0x300 +
|
||||
32*2 + (31-1)</parameter>) because <parameter>map[2]</parameter> has
|
||||
the 4th and 31st bits set. The code points represented by
|
||||
<literal>map[3]</literal> and later are left as an exercise for the
|
||||
reader ;).
|
||||
Builds an array of bits marking the Unicode coverage of <parameter>a</parameter> for page
|
||||
<parameter>*next</parameter>. Returns the base of the array. <parameter>next</parameter> contains the next page in
|
||||
the font.
|
||||
@@
|
||||
|
||||
@RET@ FcChar32
|
||||
@FUNC@ FcCharSetNextPage
|
||||
@TYPE1@ const FcCharSet * @ARG1@ a
|
||||
@TYPE2@ FcChar32[FC_CHARSET_MAP_SIZE]% @ARG2@ map
|
||||
@TYPE3@ FcChar32 * @ARG3@ next
|
||||
@PURPOSE@ Continue enumerating charset contents
|
||||
@DESC@
|
||||
Builds an array of bits in <parameter>map</parameter> marking the
|
||||
Unicode coverage of <parameter>a</parameter> for page containing
|
||||
<parameter>*next</parameter> (see the
|
||||
<function>FcCharSetFirstPage</function> description for details).
|
||||
<parameter>*next</parameter> is set to contains the base code point
|
||||
for the next page in <parameter>a</parameter>. Returns the base of
|
||||
code point for the page, or <constant>FC_CHARSET_DONE</constant> if
|
||||
<parameter>a</parameter> does not contain
|
||||
<parameter>*next</parameter>.
|
||||
@@
|
||||
|
||||
@RET@ FcChar32
|
||||
@FUNC@ FcCharSetCoverage
|
||||
@TYPE1@ const FcCharSet * @ARG1@ a
|
||||
@TYPE2@ FcChar32 @ARG2@ page
|
||||
@TYPE3@ FcChar32[8] @ARG3@ result
|
||||
@PURPOSE@ DEPRECATED return coverage for a Unicode page
|
||||
@DESC@
|
||||
DEPRECATED
|
||||
This function returns a bitmask in <parameter>result</parameter> which
|
||||
indicates which code points in
|
||||
<parameter>page</parameter> are included in <parameter>a</parameter>.
|
||||
<function>FcCharSetCoverage</function> returns the next page in the charset which has any
|
||||
coverage.
|
||||
@@
|
||||
|
||||
@RET@ FcCharSet *
|
||||
@FUNC@ FcCharSetNew
|
||||
@TYPE1@ void
|
||||
@PURPOSE@ DEPRECATED alias for FcCharSetCreate
|
||||
@DESC@
|
||||
<function>FcCharSetNew</function> is a DEPRECATED alias for FcCharSetCreate.
|
||||
@@
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* fontconfig/doc/fcconfig.fncs
|
||||
* $Id$
|
||||
*
|
||||
* Copyright © 2003 Keith Packard
|
||||
*
|
||||
|
@ -7,15 +7,15 @@
|
|||
* documentation for any purpose is hereby granted without fee, provided that
|
||||
* the above copyright notice appear in all copies and that both that
|
||||
* copyright notice and this permission notice appear in supporting
|
||||
* documentation, and that the name of the author(s) not be used in
|
||||
* documentation, and that the name of Keith Packard not be used in
|
||||
* advertising or publicity pertaining to distribution of the software without
|
||||
* specific, written prior permission. The authors make no
|
||||
* specific, written prior permission. Keith Packard makes no
|
||||
* representations about the suitability of this software for any purpose. It
|
||||
* is provided "as is" without express or implied warranty.
|
||||
*
|
||||
* THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
* EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
* EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
||||
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
|
@ -23,50 +23,35 @@
|
|||
*/
|
||||
@RET@ FcConfig *
|
||||
@FUNC@ FcConfigCreate
|
||||
@TYPE1@ void
|
||||
@PURPOSE@ Create a configuration
|
||||
@TYPE1@ void
|
||||
@PURPOSE@ Create a configuration
|
||||
@DESC@
|
||||
Creates an empty configuration.
|
||||
@@
|
||||
|
||||
@RET@ FcConfig *
|
||||
@FUNC@ FcConfigReference
|
||||
@TYPE1@ FcConfig * @ARG1@ config
|
||||
@PURPOSE@ Increment config reference count
|
||||
@DESC@
|
||||
Add another reference to <parameter>config</parameter>. Configs are freed only
|
||||
when the reference count reaches zero.
|
||||
If <parameter>config</parameter> is NULL, the current configuration is used.
|
||||
In that case this function will be similar to FcConfigGetCurrent() except that
|
||||
it increments the reference count before returning and the user is responsible
|
||||
for destroying the configuration when not needed anymore.
|
||||
@@
|
||||
|
||||
@RET@ void
|
||||
@FUNC@ FcConfigDestroy
|
||||
@TYPE1@ FcConfig * @ARG1@ config
|
||||
@PURPOSE@ Destroy a configuration
|
||||
@PURPOSE@ Destroy a configuration
|
||||
@DESC@
|
||||
Decrements the config reference count. If all references are gone, destroys
|
||||
the configuration and any data associated with it.
|
||||
Note that calling this function with the return from FcConfigGetCurrent will
|
||||
cause a new configuration to be created for use as current configuration.
|
||||
Destroys a configuration and any data associated with it. Note that calling
|
||||
this function with the return from FcConfigGetCurrent will place the library
|
||||
in an indeterminate state.
|
||||
@@
|
||||
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcConfigSetCurrent
|
||||
@TYPE1@ FcConfig * @ARG1@ config
|
||||
@PURPOSE@ Set configuration as default
|
||||
@PURPOSE@ Set configuration as default
|
||||
@DESC@
|
||||
Sets the current default configuration to <parameter>config</parameter>. Implicitly calls
|
||||
FcConfigBuildFonts if necessary, and FcConfigReference() to inrease the reference count
|
||||
in <parameter>config</parameter> since 2.12.0, returning FcFalse if that call fails.
|
||||
FcConfigBuildFonts if necessary, returning FcFalse if that call fails.
|
||||
@@
|
||||
|
||||
@RET@ FcConfig *
|
||||
@FUNC@ FcConfigGetCurrent
|
||||
@TYPE1@ void
|
||||
@PURPOSE@ Return current configuration
|
||||
@TYPE1@ void
|
||||
@PURPOSE@ Return current configuration
|
||||
@DESC@
|
||||
Returns the current default configuration.
|
||||
@@
|
||||
|
@ -74,238 +59,167 @@ Returns the current default configuration.
|
|||
@RET@ FcBool
|
||||
@FUNC@ FcConfigUptoDate
|
||||
@TYPE1@ FcConfig * @ARG1@ config
|
||||
@PURPOSE@ Check timestamps on config files
|
||||
@PURPOSE@ Check timestamps on config files
|
||||
@DESC@
|
||||
Checks all of the files related to <parameter>config</parameter> and returns
|
||||
whether any of them has been modified since the configuration was created.
|
||||
If <parameter>config</parameter> is NULL, the current configuration is used.
|
||||
@@
|
||||
|
||||
@RET@ FcChar8 *
|
||||
@FUNC@ FcConfigHome
|
||||
@TYPE1@ void
|
||||
@PURPOSE@ return the current home directory.
|
||||
@DESC@
|
||||
Return the current user's home directory, if it is available, and if using it
|
||||
is enabled, and NULL otherwise.
|
||||
See also <function>FcConfigEnableHome</function>).
|
||||
@@
|
||||
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcConfigEnableHome
|
||||
@TYPE1@ FcBool% @ARG1@ enable
|
||||
@PURPOSE@ controls use of the home directory.
|
||||
@DESC@
|
||||
If <parameter>enable</parameter> is FcTrue, then Fontconfig will use various
|
||||
files which are specified relative to the user's home directory (using the ~
|
||||
notation in the configuration). When <parameter>enable</parameter> is
|
||||
FcFalse, then all use of the home directory in these contexts will be
|
||||
disabled. The previous setting of the value is returned.
|
||||
Checks all of the files related to <parameter>config</parameter> and returns whether the
|
||||
in-memory version is in sync with the disk version.
|
||||
@@
|
||||
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcConfigBuildFonts
|
||||
@TYPE1@ FcConfig * @ARG1@ config
|
||||
@PURPOSE@ Build font database
|
||||
@PURPOSE@ Build font database
|
||||
@DESC@
|
||||
Builds the set of available fonts for the given configuration. Note that
|
||||
any changes to the configuration after this call (through
|
||||
<function>FcConfigParseAndLoad</function> or
|
||||
<function>FcConfigParseAndLoadFromMemory</function>) have indeterminate
|
||||
effects. (On the other hand, application fonts can still be modified
|
||||
through <function>FcConfigAppFontAddFile</function>,
|
||||
<function>FcConfigAppFontAddDir</function> and
|
||||
<function>FcConfigAppFontClear</function>). Returns FcFalse if this operation
|
||||
runs out of memory. If <parameter>config</parameter> is NULL, the current
|
||||
configuration is used.
|
||||
any changes to the configuration after this call have indeterminate effects.
|
||||
Returns FcFalse if this operation runs out of memory.
|
||||
@@
|
||||
|
||||
@RET@ FcStrList *
|
||||
@FUNC@ FcConfigGetConfigDirs
|
||||
@TYPE1@ FcConfig * @ARG1@ config
|
||||
@PURPOSE@ Get config directories
|
||||
@PURPOSE@ Get config directories
|
||||
@DESC@
|
||||
Returns the list of font directories specified in the configuration files
|
||||
for <parameter>config</parameter>. Does not include any subdirectories.
|
||||
If <parameter>config</parameter> is NULL, the current configuration is used.
|
||||
@@
|
||||
|
||||
@RET@ FcStrList *
|
||||
@FUNC@ FcConfigGetFontDirs
|
||||
@TYPE1@ FcConfig * @ARG1@ config
|
||||
@PURPOSE@ Get font directories
|
||||
@PURPOSE@ Get font directories
|
||||
@DESC@
|
||||
Returns the list of font directories in <parameter>config</parameter>. This includes the
|
||||
configured font directories along with any directories below those in the
|
||||
filesystem.
|
||||
If <parameter>config</parameter> is NULL, the current configuration is used.
|
||||
@@
|
||||
|
||||
@RET@ FcStrList *
|
||||
@FUNC@ FcConfigGetConfigFiles
|
||||
@TYPE1@ FcConfig * @ARG1@ config
|
||||
@PURPOSE@ Get config files
|
||||
@PURPOSE@ Get config files
|
||||
@DESC@
|
||||
Returns the list of known configuration files used to generate <parameter>config</parameter>.
|
||||
If <parameter>config</parameter> is NULL, the current configuration is used.
|
||||
Note that this will not include any configuration done with FcConfigParse.
|
||||
@@
|
||||
|
||||
@RET@ FcChar8 *
|
||||
@RET@ char *
|
||||
@FUNC@ FcConfigGetCache
|
||||
@TYPE1@ FcConfig * @ARG1@ config
|
||||
@PURPOSE@ DEPRECATED used to return per-user cache filename
|
||||
@PURPOSE@ Get cache filename
|
||||
@DESC@
|
||||
With fontconfig no longer using per-user cache files, this function now
|
||||
simply returns NULL to indicate that no per-user file exists.
|
||||
@@
|
||||
|
||||
@RET@ FcStrList *
|
||||
@FUNC@ FcConfigGetCacheDirs
|
||||
@TYPE1@ const FcConfig * @ARG1@ config
|
||||
@PURPOSE@ return the list of directories searched for cache files
|
||||
@DESC@
|
||||
<function>FcConfigGetCacheDirs</function> returns a string list containing
|
||||
all of the directories that fontconfig will search when attempting to load a
|
||||
cache file for a font directory.
|
||||
If <parameter>config</parameter> is NULL, the current configuration is used.
|
||||
Returns the name of the file used to store per-user font information.
|
||||
@@
|
||||
|
||||
@RET@ FcFontSet *
|
||||
@FUNC@ FcConfigGetFonts
|
||||
@TYPE1@ FcConfig * @ARG1@ config
|
||||
@TYPE2@ FcSetName% @ARG2@ set
|
||||
@PURPOSE@ Get config font set
|
||||
@TYPE1@ FcConfig * @ARG1@ config
|
||||
@TYPE2@ FcSetName @ARG2@ set
|
||||
@PURPOSE@ Get config font set
|
||||
@DESC@
|
||||
Returns one of the two sets of fonts from the configuration as specified
|
||||
by <parameter>set</parameter>. This font set is owned by the library and must
|
||||
not be modified or freed.
|
||||
If <parameter>config</parameter> is NULL, the current configuration is used.
|
||||
</para><para>
|
||||
This function isn't MT-safe. <function>FcConfigReference</function> must be called
|
||||
before using this and then <function>FcConfigDestroy</function> when
|
||||
the return value is no longer referenced.
|
||||
by <parameter>set</parameter>.
|
||||
@@
|
||||
|
||||
@RET@ FcBlanks *
|
||||
@FUNC@ FcConfigGetBlanks
|
||||
@TYPE1@ FcConfig * @ARG1@ config
|
||||
@PURPOSE@ Get config blanks
|
||||
@PURPOSE@ Get config blanks
|
||||
@DESC@
|
||||
FcBlanks is deprecated.
|
||||
This function always returns NULL.
|
||||
Returns the FcBlanks object associated with the given configuration, if no
|
||||
blanks were present in the configuration, this function will return 0.
|
||||
@@
|
||||
|
||||
@RET@ int
|
||||
@FUNC@ FcConfigGetRescanInterval
|
||||
@FUNC@ FcConfigGetRescanInverval
|
||||
@TYPE1@ FcConfig * @ARG1@ config
|
||||
@PURPOSE@ Get config rescan interval
|
||||
@PURPOSE@ Get config rescan interval
|
||||
@DESC@
|
||||
Returns the interval between automatic checks of the configuration (in
|
||||
seconds) specified in <parameter>config</parameter>. The configuration is checked during
|
||||
a call to FcFontList when this interval has passed since the last check.
|
||||
An interval setting of zero disables automatic checks.
|
||||
If <parameter>config</parameter> is NULL, the current configuration is used.
|
||||
@@
|
||||
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcConfigSetRescanInterval
|
||||
@TYPE1@ FcConfig * @ARG1@ config
|
||||
@TYPE2@ int% @ARG2@ rescanInterval
|
||||
@PURPOSE@ Set config rescan interval
|
||||
@FUNC@ FcConfigSetRescanInverval
|
||||
@TYPE1@ FcConfig * @ARG1@ config
|
||||
@TYPE2@ int @ARG2@ rescanInterval
|
||||
@PURPOSE@ Set config rescan interval
|
||||
@DESC@
|
||||
Sets the rescan interval. Returns FcFalse if the interval cannot be set (due
|
||||
to allocation failure). Otherwise returns FcTrue.
|
||||
An interval setting of zero disables automatic checks.
|
||||
If <parameter>config</parameter> is NULL, the current configuration is used.
|
||||
Sets the rescan interval; returns FcFalse if an error occurred.
|
||||
@@
|
||||
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcConfigAppFontAddFile
|
||||
@TYPE1@ FcConfig * @ARG1@ config
|
||||
@TYPE2@ const FcChar8 * @ARG2@ file
|
||||
@PURPOSE@ Add font file to font database
|
||||
@TYPE1@ FcConfig * @ARG1@ config
|
||||
@TYPE2@ const char * @ARG2@ file
|
||||
@PURPOSE@ Add font file to font database
|
||||
@DESC@
|
||||
Adds an application-specific font to the configuration. Returns FcFalse
|
||||
if the fonts cannot be added (due to allocation failure or no fonts found).
|
||||
Otherwise returns FcTrue. If <parameter>config</parameter> is NULL,
|
||||
the current configuration is used.
|
||||
Adds an application-specific font to the configuration.
|
||||
@@
|
||||
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcConfigAppFontAddDir
|
||||
@TYPE1@ FcConfig * @ARG1@ config
|
||||
@TYPE2@ const FcChar8 * @ARG2@ dir
|
||||
@PURPOSE@ Add fonts from directory to font database
|
||||
@TYPE1@ FcConfig * @ARG1@ config
|
||||
@TYPE2@ const char * @ARG1@ dir
|
||||
@PURPOSE@ Add fonts from directory to font database
|
||||
@DESC@
|
||||
Scans the specified directory for fonts, adding each one found to the
|
||||
application-specific set of fonts. Returns FcFalse
|
||||
if the fonts cannot be added (due to allocation failure).
|
||||
Otherwise returns FcTrue. If <parameter>config</parameter> is NULL,
|
||||
the current configuration is used.
|
||||
application-specific set of fonts.
|
||||
@@
|
||||
|
||||
@RET@ void
|
||||
@FUNC@ FcConfigAppFontClear
|
||||
@TYPE1@ FcConfig * @ARG1@ config
|
||||
@PURPOSE@ Remove all app fonts from font database
|
||||
@PURPOSE@ Remove all app fonts from font database
|
||||
@DESC@
|
||||
Clears the set of application-specific fonts.
|
||||
If <parameter>config</parameter> is NULL, the current configuration is used.
|
||||
@@
|
||||
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcConfigSubstituteWithPat
|
||||
@TYPE1@ FcConfig * @ARG1@ config
|
||||
@TYPE2@ FcPattern * @ARG2@ p
|
||||
@TYPE3@ FcPattern * @ARG3@ p_pat
|
||||
@TYPE4@ FcMatchKind% @ARG4@ kind
|
||||
@PURPOSE@ Execute substitutions
|
||||
@TYPE1@ FcConfig * @ARG1@ config
|
||||
@TYPE2@ FcPattern * @ARG2@ p
|
||||
@TYPE3@ FcPattern * @ARG3@ p_pat
|
||||
@TYPE4@ FcMatchKind @ARG4@ kind
|
||||
@PURPOSE@ Execute substitutions
|
||||
@DESC@
|
||||
Performs the sequence of pattern modification operations, if <parameter>kind</parameter> is
|
||||
FcMatchPattern, then those tagged as pattern operations are applied, else
|
||||
if <parameter>kind</parameter> is FcMatchFont, those tagged as font operations are applied and
|
||||
p_pat is used for <test> elements with target=pattern. Returns FcFalse
|
||||
if the substitution cannot be performed (due to allocation failure). Otherwise returns FcTrue.
|
||||
If <parameter>config</parameter> is NULL, the current configuration is used.
|
||||
p_pat is used for <test> elements with target=pattern.
|
||||
@@
|
||||
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcConfigSubstitute
|
||||
@TYPE1@ FcConfig * @ARG1@ config
|
||||
@TYPE2@ FcPattern * @ARG2@ p
|
||||
@TYPE3@ FcMatchKind% @ARG3@ kind
|
||||
@PURPOSE@ Execute substitutions
|
||||
@TYPE1@ FcConfig * @ARG1@ config
|
||||
@TYPE2@ FcPattern * @ARG2@ p
|
||||
@TYPE3@ FcMatchKind @ARG3@ kind
|
||||
@PURPOSE@ Execute substitutions
|
||||
@DESC@
|
||||
Calls FcConfigSubstituteWithPat setting p_pat to NULL. Returns FcFalse
|
||||
if the substitution cannot be performed (due to allocation failure). Otherwise returns FcTrue.
|
||||
If <parameter>config</parameter> is NULL, the current configuration is used.
|
||||
Calls FcConfigSubstituteWithPat setting p_pat to NULL.
|
||||
@@
|
||||
|
||||
@RET@ FcPattern *
|
||||
@FUNC@ FcFontMatch
|
||||
@TYPE1@ FcConfig * @ARG1@ config
|
||||
@TYPE2@ FcPattern * @ARG2@ p
|
||||
@TYPE3@ FcResult * @ARG3@ result
|
||||
@PURPOSE@ Return best font
|
||||
@TYPE1@ FcConfig * @ARG1@ config
|
||||
@TYPE2@ FcPattern * @ARG2@ p
|
||||
@TYPE3@ FcResult * @ARG3@ result
|
||||
@PURPOSE@ Return best font
|
||||
@DESC@
|
||||
Finds the font in <parameter>sets</parameter> most closely matching
|
||||
<parameter>pattern</parameter> and returns the result of
|
||||
<function>FcFontRenderPrepare</function> for that font and the provided
|
||||
pattern. This function should be called only after
|
||||
<function>FcConfigSubstitute</function> and
|
||||
<function>FcDefaultSubstitute</function> have been called for
|
||||
<parameter>p</parameter>; otherwise the results will not be correct.
|
||||
If <parameter>config</parameter> is NULL, the current configuration is used.
|
||||
Returns the font in <parameter>config</parameter> most close matching <parameter>p</parameter>. This function
|
||||
should be called only after FcConfigSubstitute and FcDefaultSubstitute have
|
||||
been called for <parameter>p</parameter>; otherwise the results will not be correct.
|
||||
@@
|
||||
|
||||
@RET@ FcFontSet *
|
||||
@FUNC@ FcFontSort
|
||||
@TYPE1@ FcConfig * @ARG1@ config
|
||||
@TYPE2@ FcPattern * @ARG2@ p
|
||||
@TYPE3@ FcBool% @ARG3@ trim
|
||||
@TYPE4@ FcCharSet ** @ARG4@ csp
|
||||
@TYPE5@ FcResult * @ARG5@ result
|
||||
@PURPOSE@ Return list of matching fonts
|
||||
@TYPE1@ FcConfig * @ARG1@ config
|
||||
@TYPE2@ FcPattern * @ARG2@ p
|
||||
@TYPE3@ FcBool @ARG3@ trim
|
||||
@TYPE4@ FcCharSet ** @ARG4@ csp
|
||||
@TYPE5@ FcResult * @ARG5@ result
|
||||
@PURPOSE@ Return list of matching fonts
|
||||
@DESC@
|
||||
Returns the list of fonts sorted by closeness to <parameter>p</parameter>. If <parameter>trim</parameter> is FcTrue,
|
||||
elements in the list which don't include Unicode coverage not provided by
|
||||
|
@ -317,51 +231,39 @@ been called for <parameter>p</parameter>; otherwise the results will not be corr
|
|||
The returned FcFontSet references FcPattern structures which may be shared
|
||||
by the return value from multiple FcFontSort calls, applications must not
|
||||
modify these patterns. Instead, they should be passed, along with <parameter>p</parameter> to
|
||||
<function>FcFontRenderPrepare</function> which combines them into a complete pattern.
|
||||
FcFontRenderPrepare which combines them into a complete pattern.
|
||||
</para><para>
|
||||
The FcFontSet returned by FcFontSort is destroyed by calling FcFontSetDestroy.
|
||||
If <parameter>config</parameter> is NULL, the current configuration is used.
|
||||
The FcFontSet returned by FcFontSort is destroyed by caling FcFontSetDestroy.
|
||||
@@
|
||||
|
||||
@RET@ FcPattern *
|
||||
@FUNC@ FcFontRenderPrepare
|
||||
@TYPE1@ FcConfig * @ARG1@ config
|
||||
@TYPE2@ FcPattern * @ARG2@ pat
|
||||
@TYPE3@ FcPattern * @ARG3@ font
|
||||
@PURPOSE@ Prepare pattern for loading font file
|
||||
@TYPE1@ FcConfig * @ARG1@ config
|
||||
@TYPE2@ FcPattern * @ARG2@ pat
|
||||
@TYPE3@ FcPattern * @ARG3@ font
|
||||
@PURPOSE@ Prepare pattern for loading font file
|
||||
@DESC@
|
||||
Creates a new pattern consisting of elements of <parameter>font</parameter> not appearing
|
||||
in <parameter>pat</parameter>, elements of <parameter>pat</parameter> not appearing in <parameter>font</parameter> and the best matching
|
||||
value from <parameter>pat</parameter> for elements appearing in both. The result is passed to
|
||||
FcConfigSubstituteWithPat with <parameter>kind</parameter> FcMatchFont and then returned.
|
||||
FcConfigSubstitute with <parameter>kind</parameter> FcMatchFont and then returned.
|
||||
@@
|
||||
|
||||
@RET@ FcFontSet *
|
||||
@FUNC@ FcFontList
|
||||
@TYPE1@ FcConfig * @ARG1@ config
|
||||
@TYPE2@ FcPattern * @ARG2@ p
|
||||
@TYPE3@ FcObjectSet * @ARG3@ os
|
||||
@PURPOSE@ List fonts
|
||||
@TYPE1@ FcConfig * @ARG1@ config
|
||||
@TYPE2@ FcPattern * @ARG2@ p
|
||||
@TYPE3@ FcObjectSet * @ARG3@ os
|
||||
@PURPOSE@ List fonts
|
||||
@DESC@
|
||||
Selects fonts matching <parameter>p</parameter>, creates patterns from those fonts containing
|
||||
only the objects in <parameter>os</parameter> and returns the set of unique such patterns.
|
||||
If <parameter>config</parameter> is NULL, the default configuration is checked
|
||||
to be up to date, and used.
|
||||
@@
|
||||
|
||||
@RET@ FcChar8 *
|
||||
@RET@ char *
|
||||
@FUNC@ FcConfigFilename
|
||||
@TYPE1@ const FcChar8 * @ARG1@ name
|
||||
@PURPOSE@ Find a config file
|
||||
@DESC@
|
||||
This function is deprecated and is replaced by <function>FcConfigGetFilename</function>.
|
||||
@@
|
||||
|
||||
@RET@ FcChar8 *
|
||||
@FUNC@ FcConfigGetFilename
|
||||
@TYPE1@ FcConfig * @ARG1@ config
|
||||
@TYPE2@ const FcChar8 * @ARG2@ name
|
||||
@PURPOSE@ Find a config file
|
||||
@TYPE1@ const char * @ARG1@ name
|
||||
@PURPOSE@ Find a config file
|
||||
@DESC@
|
||||
Given the specified external entity name, return the associated filename.
|
||||
This provides applications a way to convert various configuration file
|
||||
|
@ -369,136 +271,33 @@ references into filename form.
|
|||
</para><para>
|
||||
A null or empty <parameter>name</parameter> indicates that the default configuration file should
|
||||
be used; which file this references can be overridden with the
|
||||
FONTCONFIG_FILE environment variable. Next, if the name starts with <parameter>~</parameter>, it
|
||||
FC_CONFIG_FILE environment variable. Next, if the name starts with <parameter>~</parameter>, it
|
||||
refers to a file in the current users home directory. Otherwise if the name
|
||||
doesn't start with '/', it refers to a file in the default configuration
|
||||
directory; the built-in default directory can be overridden with the
|
||||
FONTCONFIG_PATH environment variable.
|
||||
</para><para>
|
||||
The result of this function is affected by the FONTCONFIG_SYSROOT environment variable or equivalent functionality.
|
||||
FC_CONFIG_DIR environment variable.
|
||||
@@
|
||||
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcConfigParseAndLoad
|
||||
@TYPE1@ FcConfig * @ARG1@ config
|
||||
@TYPE2@ const FcChar8 * @ARG2@ file
|
||||
@TYPE3@ FcBool% @ARG3@ complain
|
||||
@PURPOSE@ load a configuration file
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcConfigParseAndLoad
|
||||
@TYPE1@ FcConfig * @ARG1@ config
|
||||
@TYPE2@ const FcChar8 * @ARG2@ file
|
||||
@TYPE2@ FcBool @ARG3@ complain
|
||||
@PURPOSE@ load a configuration file
|
||||
@DESC@
|
||||
Walks the configuration in 'file' and constructs the internal representation
|
||||
in 'config'. Any include files referenced from within 'file' will be loaded
|
||||
and parsed. If 'complain' is FcFalse, no warning will be displayed if
|
||||
'file' does not exist. Error and warning messages will be output to stderr.
|
||||
Returns FcFalse if some error occurred while loading the file, either a
|
||||
parse error, semantic error or allocation failure. Otherwise returns FcTrue.
|
||||
|
||||
After all configuration files / strings have been loaded, with
|
||||
<function>FcConfigParseAndLoad</function> and/or
|
||||
<function>FcConfigParseAndLoadFromMemory</function>, call
|
||||
<function>FcConfigBuildFonts</function> to build the font
|
||||
database.
|
||||
with FcConfigLoad and also parsed. If 'complain' is FcFalse, no warning
|
||||
will be displayed if 'file' does not exist.
|
||||
@@
|
||||
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcConfigParseAndLoadFromMemory
|
||||
@TYPE1@ FcConfig * @ARG1@ config
|
||||
@TYPE2@ const FcChar8 * @ARG2@ buffer
|
||||
@TYPE3@ FcBool% @ARG3@ complain
|
||||
@PURPOSE@ load a configuration from memory
|
||||
@RET@ const FcChar8 *
|
||||
@FUNC@ FcConfigNormalizeFontDir
|
||||
@TYPE1@ FcConfig * @ARG1@ config
|
||||
@TYPE2@ const FcChar8 * @ARG2@ dir
|
||||
@PURPOSE@ normalize a font directory
|
||||
@DESC@
|
||||
Walks the configuration in 'memory' and constructs the internal representation
|
||||
in 'config'. Any includes files referenced from within 'memory' will be loaded
|
||||
and dparsed. If 'complain' is FcFalse, no warning will be displayed if
|
||||
'file' does not exist. Error and warning messages will be output to stderr.
|
||||
Returns FcFalse if fsome error occurred while loading the file, either a
|
||||
parse error, semantic error or allocation failure. Otherwise returns FcTrue.
|
||||
|
||||
After all configuration files / strings have been loaded, with
|
||||
<function>FcConfigParseAndLoad</function> and/or
|
||||
<function>FcConfigParseAndLoadFromMemory</function>, call
|
||||
<function>FcConfigBuildFonts</function> to build the font
|
||||
database.
|
||||
@SINCE@ 2.12.5
|
||||
@@
|
||||
|
||||
@RET@ const FcChar8 *
|
||||
@FUNC@ FcConfigGetSysRoot
|
||||
@TYPE1@ const FcConfig * @ARG1@ config
|
||||
@PURPOSE@ Obtain the system root directory
|
||||
@DESC@
|
||||
Obtains the system root directory in 'config' if available. All files
|
||||
(including file properties in patterns) obtained from this 'config' are
|
||||
relative to this system root directory.
|
||||
</para><para>
|
||||
This function isn't MT-safe. <function>FcConfigReference</function> must be called
|
||||
before using this and then <function>FcConfigDestroy</function> when
|
||||
the return value is no longer referenced.
|
||||
@SINCE@ 2.10.92
|
||||
@@
|
||||
|
||||
@RET@ void
|
||||
@FUNC@ FcConfigSetSysRoot
|
||||
@TYPE1@ FcConfig * @ARG1@ config
|
||||
@TYPE2@ const FcChar8 * @ARG2@ sysroot
|
||||
@PURPOSE@ Set the system root directory
|
||||
@DESC@
|
||||
Set 'sysroot' as the system root directory. All file paths used or created with
|
||||
this 'config' (including file properties in patterns) will be considered or
|
||||
made relative to this 'sysroot'. This allows a host to generate caches for
|
||||
targets at build time. This also allows a cache to be re-targeted to a
|
||||
different base directory if 'FcConfigGetSysRoot' is used to resolve file paths.
|
||||
When setting this on the current config this causes changing current config
|
||||
(calls FcConfigSetCurrent()).
|
||||
@SINCE@ 2.10.92
|
||||
@@
|
||||
|
||||
@RET@ void
|
||||
@FUNC@ FcConfigFileInfoIterInit
|
||||
@TYPE1@ FcConfig * @ARG1@ config
|
||||
@TYPE2@ FcConfigFileInfoIter * @ARG2@ iter
|
||||
@PURPOSE@ Initialize the iterator
|
||||
@DESC@
|
||||
Initialize 'iter' with the first iterator in the config file information list.
|
||||
</para><para>
|
||||
The config file information list is stored in numerical order for filenames
|
||||
i.e. how fontconfig actually read them.
|
||||
</para><para>
|
||||
This function isn't MT-safe. <function>FcConfigReference</function> must be called
|
||||
before using this and then <function>FcConfigDestroy</function> when the relevant
|
||||
values are no longer referenced.
|
||||
@SINCE@ 2.12.91
|
||||
@@
|
||||
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcConfigFileInfoIterNext
|
||||
@TYPE1@ FcConfig * @ARG1@ config
|
||||
@TYPE2@ FcConfigFileInfoIter * @ARG2@ iter
|
||||
@PURPOSE@ Set the iterator to point to the next list
|
||||
@DESC@
|
||||
Set 'iter' to point to the next node in the config file information list.
|
||||
If there is no next node, FcFalse is returned.
|
||||
</para><para>
|
||||
This function isn't MT-safe. <function>FcConfigReference</function> must be called
|
||||
before using <function>FcConfigFileInfoIterInit</function> and then
|
||||
<function>FcConfigDestroy</function> when the relevant values are no longer referenced.
|
||||
@SINCE@ 2.12.91
|
||||
@@
|
||||
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcConfigFileInfoIterGet
|
||||
@TYPE1@ FcConfig * @ARG1@ config
|
||||
@TYPE2@ FcConfigFileInfoIter * @ARG2@ iter
|
||||
@TYPE3@ FcChar8 ** @ARG3@ name
|
||||
@TYPE4@ FcChar8 ** @ARG4@ description
|
||||
@TYPE5@ FcBool * @ARG5@ enabled
|
||||
@PURPOSE@ Obtain the configuration file information
|
||||
@DESC@
|
||||
Obtain the filename, the description and the flag whether it is enabled or not
|
||||
for 'iter' where points to current configuration file information.
|
||||
If the iterator is invalid, FcFalse is returned.
|
||||
</para><para>
|
||||
This function isn't MT-safe. <function>FcConfigReference</function> must be called
|
||||
before using <function>FcConfigFileInfoIterInit</function> and then
|
||||
<function>FcConfigDestroy</function> when the relevant values are no longer referenced.
|
||||
@SINCE@ 2.12.91
|
||||
Converts the directory name given in 'dir' to a normal form, i.e. one
|
||||
of the forms which are derived from the font directories specified
|
||||
in the config file.
|
||||
@@
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* fontconfig/doc/fcconstant.fncs
|
||||
* $Id$
|
||||
*
|
||||
* Copyright © 2003 Keith Packard
|
||||
*
|
||||
|
@ -7,61 +7,51 @@
|
|||
* documentation for any purpose is hereby granted without fee, provided that
|
||||
* the above copyright notice appear in all copies and that both that
|
||||
* copyright notice and this permission notice appear in supporting
|
||||
* documentation, and that the name of the author(s) not be used in
|
||||
* documentation, and that the name of Keith Packard not be used in
|
||||
* advertising or publicity pertaining to distribution of the software without
|
||||
* specific, written prior permission. The authors make no
|
||||
* specific, written prior permission. Keith Packard makes no
|
||||
* representations about the suitability of this software for any purpose. It
|
||||
* is provided "as is" without express or implied warranty.
|
||||
*
|
||||
* THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
* EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
* EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
||||
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcNameRegisterConstants
|
||||
@TYPE1@ const FcConstant * @ARG1@ consts
|
||||
@TYPE2@ int% @ARG2@ nconsts
|
||||
@PURPOSE@ Register symbolic constants
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcNameRegisterConstants
|
||||
@TYPE1@ const FcConstant * @ARG1@ consts
|
||||
@TYPE2@ int @ARG2@ nconsts
|
||||
@PURPOSE@ Register symbolic constants
|
||||
@DESC@
|
||||
Deprecated. Does nothing. Returns FcFalse.
|
||||
Register <parameter>nconsts</parameter> new symbolic constants.
|
||||
@@
|
||||
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcNameUnregisterConstants
|
||||
@TYPE1@ const FcConstant * @ARG1@ consts
|
||||
@TYPE2@ int% @ARG2@ nconsts
|
||||
@PURPOSE@ Unregister symbolic constants
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcNameUnregisterConstants
|
||||
@TYPE1@ const FcConstant * @ARG1@ consts
|
||||
@TYPE2@ int @ARG2@ nconsts
|
||||
@PURPOSE@ Unregister symbolic constants
|
||||
@DESC@
|
||||
Deprecated. Does nothing. Returns FcFalse.
|
||||
Unregister <parameter>nconsts</parameter> symbolic constants.
|
||||
@@
|
||||
|
||||
@RET@ const FcConstant *
|
||||
@FUNC@ FcNameGetConstant
|
||||
@TYPE1@ FcChar8 * @ARG1@ string
|
||||
@PURPOSE@ Lookup symbolic constant
|
||||
@RET@ const FcConstant *
|
||||
@FUNC@ FcNameGetConstant
|
||||
@TYPE1@ FcChar8 * @ARG1@ string
|
||||
@PURPOSE@ Lookup symbolic constant
|
||||
@DESC@
|
||||
Return the FcConstant structure related to symbolic constant <parameter>string</parameter>.
|
||||
@@
|
||||
|
||||
@RET@ const FcConstant *
|
||||
@FUNC@ FcNameGetConstantFor
|
||||
@TYPE1@ FcChar8 * @ARG1@ string
|
||||
@TYPE2@ char * @ARG2@ object
|
||||
@PURPOSE@ Lookup symbolic constant For object
|
||||
@DESC@
|
||||
Return the FcConstant structure related to symbolic constant <parameter>string</parameter>
|
||||
for <parameter>object</parameter>.
|
||||
@@
|
||||
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcNameConstant
|
||||
@TYPE1@ FcChar8 * @ARG1@ string
|
||||
@TYPE2@ int * @ARG2@ result
|
||||
@PURPOSE@ Get the value for a symbolic constant
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcNameConstant
|
||||
@TYPE1@ FcChar8 * @ARG1@ string
|
||||
@TYPE2@ int * @ARG2@ result
|
||||
@PURPOSE@ Get the value for a symbolic constant
|
||||
@DESC@
|
||||
Returns whether a symbolic constant with name <parameter>string</parameter> is registered,
|
||||
placing the value of the constant in <parameter>result</parameter> if present.
|
||||
|
|
|
@ -1,99 +0,0 @@
|
|||
/*
|
||||
* Copyright © 2007 Keith Packard
|
||||
*
|
||||
* Permission to use, copy, modify, distribute, and sell this software and its
|
||||
* documentation for any purpose is hereby granted without fee, provided that
|
||||
* the above copyright notice appear in all copies and that both that copyright
|
||||
* notice and this permission notice appear in supporting documentation, and
|
||||
* that the name of the copyright holders not be used in advertising or
|
||||
* publicity pertaining to distribution of the software without specific,
|
||||
* written prior permission. The copyright holders make no representations
|
||||
* about the suitability of this software for any purpose. It is provided "as
|
||||
* is" without express or implied warranty.
|
||||
*
|
||||
* THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
* EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
||||
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||
* OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcDirCacheUnlink
|
||||
@TYPE1@ const FcChar8 * @ARG1@ dir
|
||||
@TYPE2@ FcConfig * @ARG2@ config
|
||||
@PURPOSE@ Remove all caches related to <parameter>dir</parameter>
|
||||
@DESC@
|
||||
Scans the cache directories in <parameter>config</parameter>, removing any
|
||||
instances of the cache file for <parameter>dir</parameter>. Returns FcFalse
|
||||
when some internal error occurs (out of memory, etc). Errors actually
|
||||
unlinking any files are ignored.
|
||||
@@
|
||||
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcDirCacheValid
|
||||
@TYPE1@ const FcChar8 * @ARG1@ dir
|
||||
@PURPOSE@ check directory cache
|
||||
@DESC@
|
||||
Returns FcTrue if <parameter>dir</parameter> has an associated valid cache
|
||||
file, else returns FcFalse
|
||||
@@
|
||||
|
||||
@RET@ FcCache *
|
||||
@FUNC@ FcDirCacheLoad
|
||||
@TYPE1@ const FcChar8 * @ARG1@ dir
|
||||
@TYPE2@ FcConfig * @ARG2@ config
|
||||
@TYPE3@ FcChar8 ** @ARG3@ cache_file
|
||||
@PURPOSE@ load a directory cache
|
||||
@DESC@
|
||||
Loads the cache related to <parameter>dir</parameter>. If no cache file
|
||||
exists, returns NULL. The name of the cache file is returned in
|
||||
<parameter>cache_file</parameter>, unless that is NULL. See also
|
||||
FcDirCacheRead.
|
||||
@@
|
||||
|
||||
@RET@ FcCache *
|
||||
@FUNC@ FcDirCacheRescan
|
||||
@TYPE1@ const FcChar8 * @ARG1@ dir
|
||||
@TYPE2@ FcConfig * @ARG2@ config
|
||||
@PURPOSE@ Re-scan a directory cache
|
||||
@DESC@
|
||||
Re-scan directories only at <parameter>dir</parameter> and update the cache.
|
||||
returns NULL if failed.
|
||||
@SINCE@ 2.11.1
|
||||
@@
|
||||
|
||||
@RET@ FcCache *
|
||||
@FUNC@ FcDirCacheRead
|
||||
@TYPE1@ const FcChar8 * @ARG1@ dir
|
||||
@TYPE2@ FcBool% @ARG2@ force
|
||||
@TYPE3@ FcConfig * @ARG3@ config
|
||||
@PURPOSE@ read or construct a directory cache
|
||||
@DESC@
|
||||
This returns a cache for <parameter>dir</parameter>. If
|
||||
<parameter>force</parameter> is FcFalse, then an existing, valid cache file
|
||||
will be used. Otherwise, a new cache will be created by scanning the
|
||||
directory and that returned.
|
||||
@@
|
||||
|
||||
@RET@ FcCache *
|
||||
@FUNC@ FcDirCacheLoadFile
|
||||
@TYPE1@ const FcChar8 * @ARG1@ cache_file
|
||||
@TYPE2@ struct stat * @ARG2@ file_stat
|
||||
@PURPOSE@ load a cache file
|
||||
@DESC@
|
||||
This function loads a directory cache from
|
||||
<parameter>cache_file</parameter>. If <parameter>file_stat</parameter> is
|
||||
non-NULL, it will be filled with the results of stat(2) on the cache file.
|
||||
@@
|
||||
|
||||
@RET@ void
|
||||
@FUNC@ FcDirCacheUnload
|
||||
@TYPE1@ FcCache * @ARG1@ cache
|
||||
@PURPOSE@ unload a cache file
|
||||
@DESC@
|
||||
This function dereferences <parameter>cache</parameter>. When no other
|
||||
references to it remain, all memory associated with the cache will be freed.
|
||||
@@
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* fontconfig/doc/fcfile.fncs
|
||||
* $Id$
|
||||
*
|
||||
* Copyright © 2003 Keith Packard
|
||||
*
|
||||
|
@ -7,82 +7,72 @@
|
|||
* documentation for any purpose is hereby granted without fee, provided that
|
||||
* the above copyright notice appear in all copies and that both that
|
||||
* copyright notice and this permission notice appear in supporting
|
||||
* documentation, and that the name of the author(s) not be used in
|
||||
* documentation, and that the name of Keith Packard not be used in
|
||||
* advertising or publicity pertaining to distribution of the software without
|
||||
* specific, written prior permission. The authors make no
|
||||
* specific, written prior permission. Keith Packard makes no
|
||||
* representations about the suitability of this software for any purpose. It
|
||||
* is provided "as is" without express or implied warranty.
|
||||
*
|
||||
* THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
* EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
* EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
||||
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcFileScan
|
||||
@TYPE1@ FcFontSet * @ARG1@ set
|
||||
@TYPE2@ FcStrSet * @ARG2@ dirs
|
||||
@TYPE3@ FcFileCache * @ARG3@ cache
|
||||
@TYPE4@ FcBlanks * @ARG4@ blanks
|
||||
@TYPE5@ const FcChar8 * @ARG5@ file
|
||||
@TYPE6@ FcBool% @ARG6@ force
|
||||
@PURPOSE@ scan a font file
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcFileScan
|
||||
@TYPE1@ FcFontSet * @ARG1@ set
|
||||
@TYPE2@ FcStrSet * @ARG2@ dirs
|
||||
@TYPE3@ FcFileCache * @ARG3@ cache
|
||||
@TYPE4@ FcBlanks * @ARG4@ blanks
|
||||
@TYPE5@ const char * @ARG5@ file
|
||||
@TYPE6@ FcBool @ARG6@ force
|
||||
@PURPOSE@ scan a font file
|
||||
@DESC@
|
||||
Scans a single file and adds all fonts found to <parameter>set</parameter>.
|
||||
If <parameter>force</parameter> is FcTrue, then the file is scanned even if
|
||||
associated information is found in <parameter>cache</parameter>. If
|
||||
<parameter>file</parameter> is a directory, it is added to
|
||||
<parameter>dirs</parameter>. Whether fonts are found depends on fontconfig
|
||||
policy as well as the current configuration. Internally, fontconfig will
|
||||
ignore BDF and PCF fonts which are not in Unicode (or the effectively
|
||||
equivalent ISO Latin-1) encoding as those are not usable by Unicode-based
|
||||
applications. The configuration can ignore fonts based on filename or
|
||||
contents of the font file itself. Returns FcFalse if any of the fonts cannot be
|
||||
added (due to allocation failure). Otherwise returns FcTrue.
|
||||
<parameter>dirs</parameter>.
|
||||
@@
|
||||
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcFileIsDir
|
||||
@TYPE1@ const FcChar8 * @ARG1@ file
|
||||
@PURPOSE@ check whether a file is a directory
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcDirScan
|
||||
@TYPE1@ FcFontSet * @ARG1@ set
|
||||
@TYPE2@ FcStrSet * @ARG2@ dirs
|
||||
@TYPE3@ FcFileCache * @ARG3@ cache
|
||||
@TYPE4@ FcBlanks * @ARG4@ blanks
|
||||
@TYPE5@ const char * @ARG5@ dir
|
||||
@TYPE6@ FcBool @ARG6@ force
|
||||
@PURPOSE@ scan a font directory
|
||||
@DESC@
|
||||
Returns FcTrue if <parameter>file</parameter> is a directory, otherwise
|
||||
returns FcFalse.
|
||||
Scans an entire directory and adds all fonts found to
|
||||
<parameter>set</parameter>. If <parameter>force</parameter> is FcTrue, then
|
||||
the directory and all files within it are scanned even if information is
|
||||
present in the per-directory cache file or <parameter>cache</parameter>. Any
|
||||
subdirectories found are added to <parameter>dirs</parameter>.
|
||||
@@
|
||||
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcDirScan
|
||||
@TYPE1@ FcFontSet * @ARG1@ set
|
||||
@TYPE2@ FcStrSet * @ARG2@ dirs
|
||||
@TYPE3@ FcFileCache * @ARG3@ cache
|
||||
@TYPE4@ FcBlanks * @ARG4@ blanks
|
||||
@TYPE5@ const FcChar8 * @ARG5@ dir
|
||||
@TYPE6@ FcBool% @ARG6@ force
|
||||
@PURPOSE@ scan a font directory without caching it
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcDirSave
|
||||
@TYPE1@ FcFontSet * @ARG1@ set
|
||||
@TYPE2@ FcStrSet * @ARG2@ dirs
|
||||
@TYPE3@ const char * @ARG3@ dir
|
||||
@PURPOSE@ save a directory cache
|
||||
@DESC@
|
||||
If <parameter>cache</parameter> is not zero or if <parameter>force</parameter>
|
||||
is FcFalse, this function currently returns FcFalse. Otherwise, it scans an
|
||||
entire directory and adds all fonts found to <parameter>set</parameter>.
|
||||
Any subdirectories found are added to <parameter>dirs</parameter>. Calling
|
||||
this function does not create any cache files. Use FcDirCacheRead() if
|
||||
caching is desired.
|
||||
Creates the per-directory cache file for <parameter>dir</parameter> and
|
||||
populates it with the fonts in <parameter>set</parameter> and subdirectories
|
||||
in <parameter>dirs</parameter>.
|
||||
@@
|
||||
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcDirSave
|
||||
@TYPE1@ FcFontSet * @ARG1@ set
|
||||
@TYPE2@ FcStrSet * @ARG2@ dirs
|
||||
@TYPE3@ const FcChar8 * @ARG3@ dir
|
||||
@PURPOSE@ DEPRECATED: formerly used to save a directory cache
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcDirCacheValid
|
||||
@TYPE1@ const FcChar8 * @ARG1@ cache_file
|
||||
@PURPOSE@ check directory cache timestamp
|
||||
@DESC@
|
||||
This function now does nothing aside from returning FcFalse. It used to creates the
|
||||
per-directory cache file for <parameter>dir</parameter> and populates it
|
||||
with the fonts in <parameter>set</parameter> and subdirectories in
|
||||
<parameter>dirs</parameter>. All of this functionality is now automatically
|
||||
managed by FcDirCacheLoad and FcDirCacheRead.
|
||||
Returns FcTrue if <parameter>cache_file</parameter> is no older than the
|
||||
directory containing it, else FcFalse.
|
||||
@@
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* fontconfig/doc/fcfontset.fncs
|
||||
* $Id$
|
||||
*
|
||||
* Copyright © 2003 Keith Packard
|
||||
*
|
||||
|
@ -7,134 +7,43 @@
|
|||
* documentation for any purpose is hereby granted without fee, provided that
|
||||
* the above copyright notice appear in all copies and that both that
|
||||
* copyright notice and this permission notice appear in supporting
|
||||
* documentation, and that the name of the author(s) not be used in
|
||||
* documentation, and that the name of Keith Packard not be used in
|
||||
* advertising or publicity pertaining to distribution of the software without
|
||||
* specific, written prior permission. The authors make no
|
||||
* specific, written prior permission. Keith Packard makes no
|
||||
* representations about the suitability of this software for any purpose. It
|
||||
* is provided "as is" without express or implied warranty.
|
||||
*
|
||||
* THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
* EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
* EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
||||
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
@RET@ FcFontSet *
|
||||
@FUNC@ FcFontSetCreate
|
||||
@TYPE1@ void
|
||||
@PURPOSE@ Create a font set
|
||||
@RET@ FcFontSet *
|
||||
@FUNC@ FcFontSetCreate
|
||||
@TYPE1@ void
|
||||
@PURPOSE@ Create a font set
|
||||
@DESC@
|
||||
Creates an empty font set.
|
||||
@@
|
||||
|
||||
@RET@ void
|
||||
@FUNC@ FcFontSetDestroy
|
||||
@TYPE1@ FcFontSet * @ARG1@ s
|
||||
@PURPOSE@ Destroy a font set
|
||||
@RET@ void
|
||||
@FUNC@ FcFontSetDestroy
|
||||
@TYPE1@ FcFontSet * @ARG1@ s
|
||||
@PURPOSE@ Destroy a font set
|
||||
@DESC@
|
||||
Destroys a font set. Note that this destroys any referenced patterns as
|
||||
well.
|
||||
@@
|
||||
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcFontSetAdd
|
||||
@TYPE1@ FcFontSet * @ARG1@ s
|
||||
@TYPE2@ FcPattern * @ARG2@ font
|
||||
@PURPOSE@ Add to a font set
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcFontSetAdd
|
||||
@TYPE1@ FcFontSet * @ARG1@ s
|
||||
@TYPE2@ FcPattern * @ARG2@ font
|
||||
@PURPOSE@ Add to a font set
|
||||
@DESC@
|
||||
Adds a pattern to a font set. Note that the pattern is not copied before
|
||||
being inserted into the set. Returns FcFalse if the pattern cannot be
|
||||
inserted into the set (due to allocation failure). Otherwise returns FcTrue.
|
||||
@@
|
||||
|
||||
@RET@ FcFontSet *
|
||||
@FUNC@ FcFontSetList
|
||||
@TYPE1@ FcConfig * @ARG1@ config
|
||||
@TYPE2@ FcFontSet ** @ARG2@ sets
|
||||
@TYPE3@ int @ARG3@ nsets
|
||||
@TYPE4@ FcPattern * @ARG4@ pattern
|
||||
@TYPE5@ FcObjectSet * @ARG5@ object_set
|
||||
@PURPOSE@ List fonts from a set of font sets
|
||||
@DESC@
|
||||
Selects fonts matching <parameter>pattern</parameter> from
|
||||
<parameter>sets</parameter>, creates patterns from those
|
||||
fonts containing only the objects in <parameter>object_set</parameter> and returns
|
||||
the set of unique such patterns.
|
||||
If <parameter>config</parameter> is NULL, the default configuration is checked
|
||||
to be up to date, and used.
|
||||
@@
|
||||
|
||||
@RET@ FcPattern *
|
||||
@FUNC@ FcFontSetMatch
|
||||
@TYPE1@ FcConfig * @ARG1@ config
|
||||
@TYPE2@ FcFontSet ** @ARG2@ sets
|
||||
@TYPE3@ int @ARG3@ nsets
|
||||
@TYPE4@ FcPattern * @ARG4@ pattern
|
||||
@TYPE5@ FcResult * @ARG5@ result
|
||||
@PURPOSE@ Return the best font from a set of font sets
|
||||
@DESC@
|
||||
Finds the font in <parameter>sets</parameter> most closely matching
|
||||
<parameter>pattern</parameter> and returns the result of
|
||||
<function>FcFontRenderPrepare</function> for that font and the provided
|
||||
pattern. This function should be called only after
|
||||
<function>FcConfigSubstitute</function> and
|
||||
<function>FcDefaultSubstitute</function> have been called for
|
||||
<parameter>pattern</parameter>; otherwise the results will not be correct.
|
||||
If <parameter>config</parameter> is NULL, the current configuration is used.
|
||||
Returns NULL if an error occurs during this process.
|
||||
@@
|
||||
|
||||
@RET@ void
|
||||
@FUNC@ FcFontSetPrint
|
||||
@TYPE1@ FcFontSet * @ARG1@ set
|
||||
@PURPOSE@ Print a set of patterns to stdout
|
||||
@DESC@
|
||||
This function is useful for diagnosing font related issues, printing the
|
||||
complete contents of every pattern in <parameter>set</parameter>. The format
|
||||
of the output is designed to be of help to users and developers, and may
|
||||
change at any time.
|
||||
@@
|
||||
|
||||
@RET@ FcFontSet *
|
||||
@FUNC@ FcFontSetSort
|
||||
@TYPE1@ FcConfig * @ARG1@ config
|
||||
@TYPE2@ FcFontSet ** @ARG2@ sets
|
||||
@TYPE3@ int @ARG3@ nsets
|
||||
@TYPE4@ FcPattern * @ARG4@ pattern
|
||||
@TYPE5@ FcBool% @ARG5@ trim
|
||||
@TYPE6@ FcCharSet ** @ARG6@ csp
|
||||
@TYPE7@ FcResult * @ARG7@ result
|
||||
@PURPOSE@ Add to a font set
|
||||
@DESC@
|
||||
Returns the list of fonts from <parameter>sets</parameter>
|
||||
sorted by closeness to <parameter>pattern</parameter>.
|
||||
If <parameter>trim</parameter> is FcTrue,
|
||||
elements in the list which don't include Unicode coverage not provided by
|
||||
earlier elements in the list are elided. The union of Unicode coverage of
|
||||
all of the fonts is returned in <parameter>csp</parameter>,
|
||||
if <parameter>csp</parameter> is not NULL. This function
|
||||
should be called only after FcConfigSubstitute and FcDefaultSubstitute have
|
||||
been called for <parameter>p</parameter>;
|
||||
otherwise the results will not be correct.
|
||||
</para><para>
|
||||
The returned FcFontSet references FcPattern structures which may be shared
|
||||
by the return value from multiple FcFontSort calls, applications cannot
|
||||
modify these patterns. Instead, they should be passed, along with
|
||||
<parameter>pattern</parameter> to
|
||||
<function>FcFontRenderPrepare</function> which combines them into a complete pattern.
|
||||
</para><para>
|
||||
The FcFontSet returned by FcFontSetSort is destroyed by calling FcFontSetDestroy.
|
||||
@@
|
||||
|
||||
@RET@ void
|
||||
@FUNC@ FcFontSetSortDestroy
|
||||
@TYPE1@ FcFontSet * @ARG1@ set
|
||||
@PURPOSE@ DEPRECATED destroy a font set
|
||||
@DESC@
|
||||
This function is DEPRECATED. <function>FcFontSetSortDestroy</function>
|
||||
destroys <parameter>set</parameter> by calling
|
||||
<function>FcFontSetDestroy</function>. Applications should use
|
||||
<function>FcFontSetDestroy</function> directly instead.
|
||||
being inserted into the set.
|
||||
@@
|
||||
|
|
|
@ -1,309 +0,0 @@
|
|||
/*
|
||||
* fontconfig/doc/fcformat.fncs
|
||||
*
|
||||
* Copyright © 2008 Behdad Esfahbod
|
||||
*
|
||||
* Permission to use, copy, modify, distribute, and sell this software and its
|
||||
* documentation for any purpose is hereby granted without fee, provided that
|
||||
* the above copyright notice appear in all copies and that both that
|
||||
* copyright notice and this permission notice appear in supporting
|
||||
* documentation, and that the name of the author(s) not be used in
|
||||
* advertising or publicity pertaining to distribution of the software without
|
||||
* specific, written prior permission. The authors make no
|
||||
* representations about the suitability of this software for any purpose. It
|
||||
* is provided "as is" without express or implied warranty.
|
||||
*
|
||||
* THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
* EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
||||
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
@RET@ FcChar8 *
|
||||
@FUNC@ FcPatternFormat
|
||||
@TYPE1@ FcPattern * @ARG1@ pat
|
||||
@TYPE2@ const FcChar8 * @ARG2@ format
|
||||
@PURPOSE@ Format a pattern into a string according to a format specifier
|
||||
@DESC@
|
||||
|
||||
Converts given pattern <parameter>pat</parameter> into text described by
|
||||
the format specifier <parameter>format</parameter>.
|
||||
The return value refers to newly allocated memory which should be freed by the
|
||||
caller using free(), or NULL if <parameter>format</parameter> is invalid.
|
||||
|
||||
</para><para>
|
||||
|
||||
The format is loosely modeled after printf-style format string.
|
||||
The format string is composed of zero or more directives: ordinary
|
||||
characters (not "%"), which are copied unchanged to the output stream;
|
||||
and tags which are interpreted to construct text from the pattern in a
|
||||
variety of ways (explained below).
|
||||
Special characters can be escaped
|
||||
using backslash. C-string style special characters like \n and \r are
|
||||
also supported (this is useful when the format string is not a C string
|
||||
literal).
|
||||
It is advisable to always escape curly braces that
|
||||
are meant to be copied to the output as ordinary characters.
|
||||
|
||||
</para><para>
|
||||
|
||||
Each tag is introduced by the character "%",
|
||||
followed by an optional minimum field width,
|
||||
followed by tag contents in curly braces ({}).
|
||||
If the minimum field width value is provided the tag
|
||||
will be expanded and the result padded to achieve the minimum width.
|
||||
If the minimum field width is positive, the padding will right-align
|
||||
the text. Negative field width will left-align.
|
||||
The rest of this section describes various supported tag contents
|
||||
and their expansion.
|
||||
|
||||
</para><para>
|
||||
|
||||
A <firstterm>simple</firstterm> tag
|
||||
is one where the content is an identifier. When simple
|
||||
tags are expanded, the named identifier will be looked up in
|
||||
<parameter>pattern</parameter> and the resulting list of values returned,
|
||||
joined together using comma. For example, to print the family name and style of the
|
||||
pattern, use the format "%{family} %{style}\n". To extend the family column
|
||||
to forty characters use "%-40{family}%{style}\n".
|
||||
|
||||
</para><para>
|
||||
|
||||
Simple tags expand to list of all values for an element. To only choose
|
||||
one of the values, one can index using the syntax "%{elt[idx]}". For example,
|
||||
to get the first family name only, use "%{family[0]}".
|
||||
|
||||
</para><para>
|
||||
|
||||
If a simple tag ends with "=" and the element is found in the pattern, the
|
||||
name of the element followed by "=" will be output before the list of values.
|
||||
For example, "%{weight=}" may expand to the string "weight=80". Or to the empty
|
||||
string if <parameter>pattern</parameter> does not have weight set.
|
||||
|
||||
</para><para>
|
||||
|
||||
If a simple tag starts with ":" and the element is found in the pattern, ":"
|
||||
will be printed first. For example, combining this with the =, the format
|
||||
"%{:weight=}" may expand to ":weight=80" or to the empty string
|
||||
if <parameter>pattern</parameter> does not have weight set.
|
||||
|
||||
</para><para>
|
||||
|
||||
If a simple tag contains the string ":-", the rest of the the tag contents
|
||||
will be used as a default string. The default string is output if the element
|
||||
is not found in the pattern. For example, the format
|
||||
"%{:weight=:-123}" may expand to ":weight=80" or to the string
|
||||
":weight=123" if <parameter>pattern</parameter> does not have weight set.
|
||||
|
||||
</para><para>
|
||||
|
||||
A <firstterm>count</firstterm> tag
|
||||
is one that starts with the character "#" followed by an element
|
||||
name, and expands to the number of values for the element in the pattern.
|
||||
For example, "%{#family}" expands to the number of family names
|
||||
<parameter>pattern</parameter> has set, which may be zero.
|
||||
|
||||
</para><para>
|
||||
|
||||
A <firstterm>sub-expression</firstterm> tag
|
||||
is one that expands a sub-expression. The tag contents
|
||||
are the sub-expression to expand placed inside another set of curly braces.
|
||||
Sub-expression tags are useful for aligning an entire sub-expression, or to
|
||||
apply converters (explained later) to the entire sub-expression output.
|
||||
For example, the format "%40{{%{family} %{style}}}" expands the sub-expression
|
||||
to construct the family name followed by the style, then takes the entire
|
||||
string and pads it on the left to be at least forty characters.
|
||||
|
||||
</para><para>
|
||||
|
||||
A <firstterm>filter-out</firstterm> tag
|
||||
is one starting with the character "-" followed by a
|
||||
comma-separated list of element names, followed by a sub-expression enclosed
|
||||
in curly braces. The sub-expression will be expanded but with a pattern that
|
||||
has the listed elements removed from it.
|
||||
For example, the format "%{-size,pixelsize{sub-expr}}" will expand "sub-expr"
|
||||
with <parameter>pattern</parameter> sans the size and pixelsize elements.
|
||||
|
||||
</para><para>
|
||||
|
||||
A <firstterm>filter-in</firstterm> tag
|
||||
is one starting with the character "+" followed by a
|
||||
comma-separated list of element names, followed by a sub-expression enclosed
|
||||
in curly braces. The sub-expression will be expanded but with a pattern that
|
||||
only has the listed elements from the surrounding pattern.
|
||||
For example, the format "%{+family,familylang{sub-expr}}" will expand "sub-expr"
|
||||
with a sub-pattern consisting only the family and family lang elements of
|
||||
<parameter>pattern</parameter>.
|
||||
|
||||
</para><para>
|
||||
|
||||
A <firstterm>conditional</firstterm> tag
|
||||
is one starting with the character "?" followed by a
|
||||
comma-separated list of element conditions, followed by two sub-expression
|
||||
enclosed in curly braces. An element condition can be an element name,
|
||||
in which case it tests whether the element is defined in pattern, or
|
||||
the character "!" followed by an element name, in which case the test
|
||||
is negated. The conditional passes if all the element conditions pass.
|
||||
The tag expands the first sub-expression if the conditional passes, and
|
||||
expands the second sub-expression otherwise.
|
||||
For example, the format "%{?size,dpi,!pixelsize{pass}{fail}}" will expand
|
||||
to "pass" if <parameter>pattern</parameter> has size and dpi elements but
|
||||
no pixelsize element, and to "fail" otherwise.
|
||||
|
||||
</para><para>
|
||||
|
||||
An <firstterm>enumerate</firstterm> tag
|
||||
is one starting with the string "[]" followed by a
|
||||
comma-separated list of element names, followed by a sub-expression enclosed
|
||||
in curly braces. The list of values for the named elements are walked in
|
||||
parallel and the sub-expression expanded each time with a pattern just having
|
||||
a single value for those elements, starting from the first value and
|
||||
continuing as long as any of those elements has a value.
|
||||
For example, the format "%{[]family,familylang{%{family} (%{familylang})\n}}"
|
||||
will expand the pattern "%{family} (%{familylang})\n" with a pattern
|
||||
having only the first value of the family and familylang elements, then expands
|
||||
it with the second values, then the third, etc.
|
||||
|
||||
</para><para>
|
||||
|
||||
As a special case, if an enumerate tag has only one element, and that element
|
||||
has only one value in the pattern, and that value is of type FcLangSet, the
|
||||
individual languages in the language set are enumerated.
|
||||
|
||||
</para><para>
|
||||
|
||||
A <firstterm>builtin</firstterm> tag
|
||||
is one starting with the character "=" followed by a builtin
|
||||
name. The following builtins are defined:
|
||||
|
||||
<variablelist>
|
||||
|
||||
<varlistentry><term>
|
||||
unparse
|
||||
</term><listitem><para>
|
||||
Expands to the result of calling FcNameUnparse() on the pattern.
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
<varlistentry><term>
|
||||
fcmatch
|
||||
</term><listitem><para>
|
||||
Expands to the output of the default output format of the fc-match
|
||||
command on the pattern, without the final newline.
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
<varlistentry><term>
|
||||
fclist
|
||||
</term><listitem><para>
|
||||
Expands to the output of the default output format of the fc-list
|
||||
command on the pattern, without the final newline.
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
<varlistentry><term>
|
||||
fccat
|
||||
</term><listitem><para>
|
||||
Expands to the output of the default output format of the fc-cat
|
||||
command on the pattern, without the final newline.
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
<varlistentry><term>
|
||||
pkgkit
|
||||
</term><listitem><para>
|
||||
Expands to the list of PackageKit font() tags for the pattern.
|
||||
Currently this includes tags for each family name, and each language
|
||||
from the pattern, enumerated and sanitized into a set of tags terminated
|
||||
by newline. Package management systems can use these tags to tag their
|
||||
packages accordingly.
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
</variablelist>
|
||||
|
||||
For example, the format "%{+family,style{%{=unparse}}}\n" will expand
|
||||
to an unparsed name containing only the family and style element values
|
||||
from <parameter>pattern</parameter>.
|
||||
|
||||
</para><para>
|
||||
|
||||
The contents of any tag can be followed by a set of zero or more
|
||||
<firstterm>converter</firstterm>s. A converter is specified by the
|
||||
character "|" followed by the converter name and arguments. The
|
||||
following converters are defined:
|
||||
|
||||
<variablelist>
|
||||
|
||||
<varlistentry><term>
|
||||
basename
|
||||
</term><listitem><para>
|
||||
Replaces text with the results of calling FcStrBasename() on it.
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
<varlistentry><term>
|
||||
dirname
|
||||
</term><listitem><para>
|
||||
Replaces text with the results of calling FcStrDirname() on it.
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
<varlistentry><term>
|
||||
downcase
|
||||
</term><listitem><para>
|
||||
Replaces text with the results of calling FcStrDowncase() on it.
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
<varlistentry><term>
|
||||
shescape
|
||||
</term><listitem><para>
|
||||
Escapes text for one level of shell expansion.
|
||||
(Escapes single-quotes, also encloses text in single-quotes.)
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
<varlistentry><term>
|
||||
cescape
|
||||
</term><listitem><para>
|
||||
Escapes text such that it can be used as part of a C string literal.
|
||||
(Escapes backslash and double-quotes.)
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
<varlistentry><term>
|
||||
xmlescape
|
||||
</term><listitem><para>
|
||||
Escapes text such that it can be used in XML and HTML.
|
||||
(Escapes less-than, greater-than, and ampersand.)
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
<varlistentry><term>
|
||||
delete(<parameter>chars</parameter>)
|
||||
</term><listitem><para>
|
||||
Deletes all occurrences of each of the characters in <parameter>chars</parameter>
|
||||
from the text.
|
||||
FIXME: This converter is not UTF-8 aware yet.
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
<varlistentry><term>
|
||||
escape(<parameter>chars</parameter>)
|
||||
</term><listitem><para>
|
||||
Escapes all occurrences of each of the characters in <parameter>chars</parameter>
|
||||
by prepending it by the first character in <parameter>chars</parameter>.
|
||||
FIXME: This converter is not UTF-8 aware yet.
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
<varlistentry><term>
|
||||
translate(<parameter>from</parameter>,<parameter>to</parameter>)
|
||||
</term><listitem><para>
|
||||
Translates all occurrences of each of the characters in <parameter>from</parameter>
|
||||
by replacing them with their corresponding character in <parameter>to</parameter>.
|
||||
If <parameter>to</parameter> has fewer characters than
|
||||
<parameter>from</parameter>, it will be extended by repeating its last
|
||||
character.
|
||||
FIXME: This converter is not UTF-8 aware yet.
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
</variablelist>
|
||||
|
||||
For example, the format "%{family|downcase|delete( )}\n" will expand
|
||||
to the values of the family element in <parameter>pattern</parameter>,
|
||||
lower-cased and with spaces removed.
|
||||
|
||||
@SINCE@ 2.9.0
|
||||
@@
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* fontconfig/doc/fcfreetype.fncs
|
||||
* $Id$
|
||||
*
|
||||
* Copyright © 2003 Keith Packard
|
||||
*
|
||||
|
@ -7,15 +7,15 @@
|
|||
* documentation for any purpose is hereby granted without fee, provided that
|
||||
* the above copyright notice appear in all copies and that both that
|
||||
* copyright notice and this permission notice appear in supporting
|
||||
* documentation, and that the name of the author(s) not be used in
|
||||
* documentation, and that the name of Keith Packard not be used in
|
||||
* advertising or publicity pertaining to distribution of the software without
|
||||
* specific, written prior permission. The authors make no
|
||||
* specific, written prior permission. Keith Packard makes no
|
||||
* representations about the suitability of this software for any purpose. It
|
||||
* is provided "as is" without express or implied warranty.
|
||||
*
|
||||
* THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
* EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
* EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
||||
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
|
@ -25,11 +25,11 @@
|
|||
@SYNOPSIS@
|
||||
#include <fontconfig.h>
|
||||
#include <fcfreetype.h>
|
||||
@RET@ FT_UInt
|
||||
@FUNC@ FcFreeTypeCharIndex
|
||||
@TYPE1@ FT_Face% @ARG1@ face
|
||||
@TYPE2@ FcChar32% @ARG2@ ucs4
|
||||
@PURPOSE@ map Unicode to glyph id
|
||||
@RET@ FT_UInt
|
||||
@FUNC@ FcFreeTypeCharIndex
|
||||
@TYPE1@ FT_Face @ARG1@ face
|
||||
@TYPE2@ FcChar32 @ARG2@ ucs4
|
||||
@PURPOSE@ map Unicode to glyph id
|
||||
@DESC@
|
||||
Maps a Unicode char to a glyph index. This function uses information from
|
||||
several possible underlying encoding tables to work around broken fonts.
|
||||
|
@ -41,95 +41,29 @@ higher level functions.
|
|||
@SYNOPSIS@
|
||||
#include <fontconfig.h>
|
||||
#include <fcfreetype.h>
|
||||
@RET@ FcCharSet *
|
||||
@FUNC@ FcFreeTypeCharSet
|
||||
@TYPE1@ FT_Face% @ARG1@ face
|
||||
@TYPE2@ FcBlanks * @ARG2@ blanks
|
||||
@PURPOSE@ compute Unicode coverage
|
||||
@RET@ FcCharSet *
|
||||
@FUNC@ FcFreeTypeCharSet
|
||||
@TYPE1@ FT_Face @ARG1@ face
|
||||
@TYPE2@ FcBlanks * @ARG2@ blanks
|
||||
@PURPOSE@ compute unicode coverage
|
||||
@DESC@
|
||||
Scans a FreeType face and returns the set of encoded Unicode chars.
|
||||
FcBlanks is deprecated, <parameter>blanks</parameter> is ignored and
|
||||
accepted only for compatibility with older code.
|
||||
Scans a FreeType face and returns the set of encoded Unicode chars. This scans
|
||||
several encoding tables to build as complete a list as possible.
|
||||
If 'blanks' is not 0, the glyphs in the font are examined and any blank glyphs
|
||||
not in 'blanks' are not placed in the returned FcCharSet.
|
||||
@@
|
||||
|
||||
@SYNOPSIS@
|
||||
#include <fontconfig.h>
|
||||
#include <fcfreetype.h>
|
||||
@RET@ FcCharSet *
|
||||
@FUNC@ FcFreeTypeCharSetAndSpacing
|
||||
@TYPE1@ FT_Face% @ARG1@ face
|
||||
@TYPE2@ FcBlanks * @ARG2@ blanks
|
||||
@TYPE3@ int * @ARG3@ spacing
|
||||
@PURPOSE@ compute Unicode coverage and spacing type
|
||||
@RET@ FcPattern *
|
||||
@FUNC@ FcFreeTypeQuery
|
||||
@TYPE1@ const char * @ARG1@ file
|
||||
@TYPE2@ int @ARG2@ id
|
||||
@TYPE3@ FcBlanks * @ARG3@ blanks
|
||||
@TYPE4@ int * @ARG4@ count
|
||||
@PURPOSE@ compute font file pattern
|
||||
@DESC@
|
||||
Scans a FreeType face and returns the set of encoded Unicode chars.
|
||||
FcBlanks is deprecated, <parameter>blanks</parameter> is ignored and
|
||||
accepted only for compatibility with older code.
|
||||
<parameter>spacing</parameter> receives the computed spacing type of the
|
||||
font, one of FC_MONO for a font where all glyphs have the same width,
|
||||
FC_DUAL, where the font has glyphs in precisely two widths, one twice as
|
||||
wide as the other, or FC_PROPORTIONAL where the font has glyphs of many
|
||||
widths.
|
||||
@@
|
||||
|
||||
@SYNOPSIS@
|
||||
#include <fontconfig.h>
|
||||
#include <fcfreetype.h>
|
||||
@RET@ FcPattern *
|
||||
@FUNC@ FcFreeTypeQuery
|
||||
@TYPE1@ const FcChar8 * @ARG1@ file
|
||||
@TYPE2@ int% @ARG2@ id
|
||||
@TYPE3@ FcBlanks * @ARG3@ blanks
|
||||
@TYPE4@ int * @ARG4@ count
|
||||
@PURPOSE@ compute pattern from font file (and index)
|
||||
@DESC@
|
||||
Constructs a pattern representing the 'id'th face in 'file'. The number
|
||||
of faces in 'file' is returned in 'count'.
|
||||
FcBlanks is deprecated, <parameter>blanks</parameter> is ignored and
|
||||
accepted only for compatibility with older code.
|
||||
@@
|
||||
|
||||
unsigned int
|
||||
FcFreeTypeQueryAll(const FcChar8 *file,
|
||||
int id,
|
||||
FcBlanks *blanks,
|
||||
int *count,
|
||||
FcFontSet *set)
|
||||
@SYNOPSIS@
|
||||
#include <fontconfig.h>
|
||||
#include <fcfreetype.h>
|
||||
@RET@ unsigned int
|
||||
@FUNC@ FcFreeTypeQueryAll
|
||||
@TYPE1@ const FcChar8 * @ARG1@ file
|
||||
@TYPE2@ int% @ARG2@ id
|
||||
@TYPE3@ FcBlanks * @ARG3@ blanks
|
||||
@TYPE4@ int * @ARG4@ count
|
||||
@TYPE5@ FcFontSet * @ARG5@ set
|
||||
@PURPOSE@ compute all patterns from font file (and index)
|
||||
@DESC@
|
||||
Constructs patterns found in 'file'.
|
||||
If id is -1, then all patterns found in 'file' are added to 'set'.
|
||||
Otherwise, this function works exactly like FcFreeTypeQuery().
|
||||
The number of faces in 'file' is returned in 'count'.
|
||||
The number of patterns added to 'set' is returned.
|
||||
FcBlanks is deprecated, <parameter>blanks</parameter> is ignored and
|
||||
accepted only for compatibility with older code.
|
||||
@SINCE@ 2.12.91
|
||||
@@
|
||||
|
||||
@SYNOPSIS@
|
||||
#include <fontconfig.h>
|
||||
#include <fcfreetype.h>
|
||||
@RET@ FcPattern *
|
||||
@FUNC@ FcFreeTypeQueryFace
|
||||
@TYPE1@ const FT_Face% @ARG1@ face
|
||||
@TYPE2@ const FcChar8 * @ARG2@ file
|
||||
@TYPE3@ int% @ARG3@ id
|
||||
@TYPE4@ FcBlanks * @ARG4@ blanks
|
||||
@PURPOSE@ compute pattern from FT_Face
|
||||
@DESC@
|
||||
Constructs a pattern representing 'face'. 'file' and 'id' are used solely as
|
||||
data for pattern elements (FC_FILE, FC_INDEX and sometimes FC_FAMILY).
|
||||
FcBlanks is deprecated, <parameter>blanks</parameter> is ignored and
|
||||
accepted only for compatibility with older code.
|
||||
Constructs a pattern representing the 'id'th font in 'file'. The number
|
||||
of fonts in 'file' is returned in 'count'.
|
||||
@@
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* fontconfig/doc/fcinit.fncs
|
||||
* $Id$
|
||||
*
|
||||
* Copyright © 2003 Keith Packard
|
||||
*
|
||||
|
@ -7,42 +7,42 @@
|
|||
* documentation for any purpose is hereby granted without fee, provided that
|
||||
* the above copyright notice appear in all copies and that both that
|
||||
* copyright notice and this permission notice appear in supporting
|
||||
* documentation, and that the name of the author(s) not be used in
|
||||
* documentation, and that the name of Keith Packard not be used in
|
||||
* advertising or publicity pertaining to distribution of the software without
|
||||
* specific, written prior permission. The authors make no
|
||||
* specific, written prior permission. Keith Packard makes no
|
||||
* representations about the suitability of this software for any purpose. It
|
||||
* is provided "as is" without express or implied warranty.
|
||||
*
|
||||
* THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
* EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
* EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
||||
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
@RET@ FcConfig *
|
||||
@FUNC@ FcInitLoadConfig
|
||||
@TYPE1@ void
|
||||
@PURPOSE@ load configuration
|
||||
@RET@ FcConfig *
|
||||
@FUNC@ FcInitLoadConfig
|
||||
@TYPE1@ void
|
||||
@PURPOSE@ load configuration
|
||||
@DESC@
|
||||
Loads the default configuration file and returns the resulting configuration.
|
||||
Does not load any font information.
|
||||
@@
|
||||
|
||||
@RET@ FcConfig *
|
||||
@FUNC@ FcInitLoadConfigAndFonts
|
||||
@TYPE1@ void
|
||||
@PURPOSE@ load configuration and font data
|
||||
@RET@ FcConfig *
|
||||
@FUNC@ FcInitLoadConfigAndFonts
|
||||
@TYPE1@ void
|
||||
@PURPOSE@ load configuration and font data
|
||||
@DESC@
|
||||
Loads the default configuration file and builds information about the
|
||||
available fonts. Returns the resulting configuration.
|
||||
@@
|
||||
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcInit
|
||||
@TYPE1@ void
|
||||
@PURPOSE@ initialize fontconfig library
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcInit
|
||||
@TYPE1@ void
|
||||
@PURPOSE@ initialize fontconfig library
|
||||
@DESC@
|
||||
Loads the default configuration file and the fonts referenced therein and
|
||||
sets the default configuration to that result. Returns whether this
|
||||
|
@ -50,10 +50,10 @@ process succeeded or not. If the default configuration has already
|
|||
been loaded, this routine does nothing and returns FcTrue.
|
||||
@@
|
||||
|
||||
@RET@ void
|
||||
@FUNC@ FcFini
|
||||
@TYPE1@ void
|
||||
@PURPOSE@ finalize fontconfig library
|
||||
@RET@ void
|
||||
@FUNC@ FcFini
|
||||
@TYPE1@ void
|
||||
@PURPOSE@ finalize fonconfig library
|
||||
@DESC@
|
||||
Frees all data structures allocated by previous calls to fontconfig
|
||||
functions. Fontconfig returns to an uninitialized state, requiring a
|
||||
|
@ -61,32 +61,29 @@ new call to one of the FcInit functions before any other fontconfig
|
|||
function may be called.
|
||||
@@
|
||||
|
||||
@RET@ int
|
||||
@FUNC@ FcGetVersion
|
||||
@TYPE1@ void
|
||||
@PURPOSE@ library version number
|
||||
@RET@ int
|
||||
@FUNC@ FcGetVersion
|
||||
@TYPE1@ void
|
||||
@PURPOSE@ library version number
|
||||
@DESC@
|
||||
Returns the version number of the library.
|
||||
@@
|
||||
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcInitReinitialize
|
||||
@TYPE1@ void
|
||||
@PURPOSE@ re-initialize library
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcInitReinitialize
|
||||
@TYPE1@ void
|
||||
@PURPOSE@ re-initialize library
|
||||
@DESC@
|
||||
Forces the default configuration file to be reloaded and resets the default
|
||||
configuration. Returns FcFalse if the configuration cannot be reloaded (due
|
||||
to configuration file errors, allocation failures or other issues) and leaves the
|
||||
existing configuration unchanged. Otherwise returns FcTrue.
|
||||
configuration.
|
||||
@@
|
||||
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcInitBringUptoDate
|
||||
@TYPE1@ void
|
||||
@PURPOSE@ reload configuration files if needed
|
||||
@RET@ FcBool
|
||||
@FUNC@ FcInitBringUptoDate
|
||||
@TYPE1@ void
|
||||
@PURPOSE@ reload configuration files if needed
|
||||
@DESC@
|
||||
Checks the rescan interval in the default configuration, checking the
|
||||
configuration if the interval has passed and reloading the configuration if
|
||||
when any changes are detected. Returns FcFalse if the configuration cannot
|
||||
be reloaded (see FcInitReinitialize). Otherwise returns FcTrue.
|
||||
when any changes are detected.
|
||||
@@
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue