diff --git a/source/Build b/source/Build index 5f1cdf1bf1d4abf8bea19ed87182e625c8a4d003..f44becab3a047224cb8adb0d25a39581775b531d 100755 --- a/source/Build +++ b/source/Build @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: Build 59855 2021-07-06 17:52:36Z karl $ +# $Id: Build 66136 2023-02-24 23:44:26Z karl $ # Public domain. Originally written many years ago by Sebastian Rahtz. # The basic idea is to run configure && make, but with a multitude of # environment variables to allow overriding everything. @@ -117,7 +117,7 @@ cd $TL_WORKDIR || exit 1 echo "starting TeX Live build at `date`" printf 'CMDLINE\t"%s"\n' "$0 $*" printf 'PWD\t"%s"\n' "`pwd`" - printf 'UNAME\t"%s"\n' "`uname`" + printf 'UNAME\t"%s"\n' "`uname -a`" env | sort >buildenv.log echo "See also buildenv.log and buildinfo.log in `pwd`" echo diff --git a/source/ChangeLog b/source/ChangeLog index eabcf30a910d4ab77afe8edce69e5bb83849850a..bf2bf77a7113fb8b6b4bde898077896f5b10e8ec 100644 --- a/source/ChangeLog +++ b/source/ChangeLog @@ -1,6 +1,14 @@ +2023-02-25 Karl Berry <karl@tug.org> + + * Build: show full uname -a. + +2023-02-09 Karl Berry <karl@freefriends.org> + + * version.ac: 2023, no more /dev. + 2022-03-21 Karl Berry <karl@freefriends.org> - * tardate.ac (tex_live_tardate): 2020-03-21 for TL'22. + * tardate.ac (tex_live_tardate): 2022-03-21 for TL'22. 2022-01-18 Karl Berry <karl@freefriends.org> diff --git a/source/README b/source/README index ca503d35d5402d1b19eb95326ca3f6739be4f5ac..fa58526b2b661db01c98f4bfef1b9f657593c113 100644 --- a/source/README +++ b/source/README @@ -1,4 +1,4 @@ -Id: README 62297 2022-02-28 22:13:17Z karl $ +$Id: README 66164 2023-02-25 23:32:34Z hironobu $ Public domain. Originally written 2005 by Karl Berry. For a high-level overview of building TeX Live, see @@ -25,12 +25,13 @@ that document). Build information for some of the platforms. -See also Master/tlpkg/bin/tl-update-bindir +See also Master/tlpkg/bin/tl-update-bindir. aarch64-linux: + Built on contextgarden, see below, except for asy: aarch64 Debian GNU/Linux 10 (buster) gcc (Debian 8.3.0-6) 8.3.0 - ./Build --enable-arm-neon=check + ./Build --enable-arm-neon=on armhf-linux: Built on contextgarden, see below. @@ -42,7 +43,7 @@ armhf-linux: they run on RPi, as well as ARMv7 CPUs, but are untested on non-RPi ARMv6 machines. -i386-cygwin, x86_64-cygwin: gcc-10.2.0, cygwin-3.1.7 +x86_64-cygwin: gcc-10.2.0, cygwin-3.1.7 TL_CONFIGURE_ARGS="--enable-xindy --enable-shared CLISP=/path/to/clisp.exe LDFLAGS='-Wl,--no-insert-timestamp -Wl,--stack,0x800000'" \ ./Build @@ -68,8 +69,8 @@ i386-solaris, x86_64-solaris: universal-darwin: See Master/source/mactexdoc.tar.xz. -win32: - Makefiles written by hand, see Master/source/w32tex-src.tar.xz. +windows: + Makefiles written by hand, see Master/source/windows-src.tar.xz. Visual Studio 2010 and Visual Studio 2015. x86_64-darwinlegacy: diff --git a/source/build-aux/config.sub b/source/build-aux/config.sub index d6731d655c08e5e8d1c87eacc94aeffbd213d470..de4259e4047972f77ffc089796b32e325636c207 100755 --- a/source/build-aux/config.sub +++ b/source/build-aux/config.sub @@ -4,7 +4,7 @@ # shellcheck disable=SC2006,SC2268 # see below for rationale -timestamp='2023-01-01' +timestamp='2023-01-21' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -1075,7 +1075,7 @@ case $cpu-$vendor in pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) cpu=i586 ;; - pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*) + pentiumpro-* | p6-* | 6x86-* | athlon-* | athlon_*-*) cpu=i686 ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) diff --git a/source/configure b/source/configure index 1213d4ce2d3b22600496d13e537943a5b77433e9..255cb4859fd51c15238ab99837d2c5d57b42a319 100755 --- a/source/configure +++ b/source/configure @@ -816,23 +816,6 @@ enable_native_texlive_build enable_multiplatform enable_cxx_runtime_hack enable_libtool_hack -enable_autosp -enable_axodraw2 -enable_devnag -enable_lacheck -enable_m_tx -enable_pmx -enable_ps2eps -enable_t1utils -enable_texdoctk -enable_tpic2pdftex -enable_vlna -enable_xindy -enable_xindy_rules -enable_xindy_docs -with_clisp_runtime -enable_xml2pmx -enable_xpdfopen enable_web2c with_banner_add with_editor @@ -881,84 +864,15 @@ enable_tektronixwin enable_unitermwin enable_web_progs enable_synctex -enable_afm2pl -enable_bibtex_x -enable_bibtex8 -enable_bibtexu -enable_chktex -enable_cjkutils -enable_detex -enable_dtl -enable_dvi2tty -enable_dvidvi -enable_dviljk -enable_dviout_util -enable_dvipdfm_x -enable_dvipng -enable_debug -enable_timing -with_gs -enable_dvipos -enable_dvipsk -enable_dvisvgm -enable_gregorio -enable_gsftopk -enable_lcdf_typetools -enable_cfftot1 -enable_mmafm -enable_mmpfb -enable_otfinfo -enable_otftotfm -enable_t1dotlessj -enable_t1lint -enable_t1rawafm -enable_t1reencode -enable_t1testpage -enable_ttftotype42 -enable_updmap -enable_makeindexk -enable_makejvf -enable_mendexk -enable_musixtnt -enable_ps2pk -enable_psutils -enable_seetexk -enable_tex4htk -enable_ttf2pk2 -enable_ttfdump -enable_upmendex -enable_xdvik -with_xdvi_x_toolkit enable_texlive enable_linked_scripts with_system_harfbuzz -with_system_icu -with_system_teckit with_system_graphite2 with_system_zziplib -with_system_mpfr -with_mpfr_includes -with_mpfr_libdir -with_system_gmp -with_gmp_includes -with_gmp_libdir -with_system_cairo -with_system_pixman -with_system_gd -with_gd_includes -with_gd_libdir -with_system_potrace -with_potrace_includes -with_potrace_libdir -with_system_freetype2 with_system_libpng -with_system_libpaper -with_libpaper_includes -with_libpaper_libdir with_system_zlib with_zlib_includes with_zlib_libdir -with_system_ptexenc with_system_kpathsea enable_mktexmf_default enable_mktexpk_default @@ -1638,22 +1552,6 @@ Optional Features: lib/PLATFORM --enable-cxx-runtime-hack link C++ runtime statically --enable-libtool-hack ignore libtool dependency_libs - --disable-autosp do not build the autosp package - --disable-axodraw2 do not build the axodraw2 package - --disable-devnag do not build the devnag package - --disable-lacheck do not build the lacheck package - --disable-m-tx do not build the m-tx package - --disable-pmx do not build the pmx package - --disable-ps2eps do not build the ps2eps package - --disable-t1utils do not build the t1utils package - --disable-texdoctk do not build the texdoctk package - --disable-tpic2pdftex do not build the tpic2pdftex package - --disable-vlna do not build the vlna package - --enable-xindy build the xindy package - --enable-xindy-rules build and install make-rules package - --enable-xindy-docs build and install documentation - --disable-xml2pmx do not build the xml2pmx package - --disable-xpdfopen do not build the xpdfopen package --disable-web2c do not build the web2c (TeX & Co.) package --enable-auto-core cause TeX&MF to dump core, given a certain filename @@ -1664,11 +1562,11 @@ Optional Features: --enable-tex-synctex build TeX with SyncTeX support --enable-etex compile and install e-TeX --disable-etex-synctex build e-TeX without SyncTeX support - --disable-ptex do not compile and install pTeX + --enable-ptex compile and install pTeX --disable-ptex-synctex build pTeX without SyncTeX support --disable-eptex do not compile and install e-pTeX --disable-eptex-synctex build e-pTeX without SyncTeX support - --disable-uptex do not compile and install upTeX + --enable-uptex compile and install upTeX --disable-uptex-synctex build upTeX without SyncTeX support --disable-euptex do not compile and install e-upTeX --disable-euptex-synctex build e-upTeX without SyncTeX support @@ -1702,57 +1600,6 @@ Optional Features: --enable-unitermwin include Uniterm window support --disable-web-progs do not build WEB programs bibtex ... weave --disable-synctex do not build the SyncTeX library and tool - --disable-afm2pl do not build the afm2pl package - --disable-bibtex-x do not build the bibtex-x package - --disable-bibtex8 do not build the bibtex8 program - --disable-bibtexu do not build the bibtexu program - --disable-chktex do not build the chktex package - --disable-cjkutils do not build the cjkutils package - --disable-detex do not build the detex package - --disable-dtl do not build the dtl package - --disable-dvi2tty do not build the dvi2tty package - --disable-dvidvi do not build the dvidvi package - --disable-dviljk do not build the dviljk package - --disable-dviout-util do not build the dviout-util package - --disable-dvipdfm-x do not build the dvipdfm-x package - --disable-dvipng do not build the dvipng package - --disable-debug Compile without debug (-d) option - --enable-timing Output execution time of dvipng - --disable-dvipos do not build the dvipos package - --disable-dvipsk do not build the dvipsk package - --disable-dvisvgm do not build the dvisvgm package - --disable-gregorio do not build the gregorio package - --disable-gsftopk do not build the gsftopk package - --disable-lcdf-typetools - do not build the lcdf-typetools package - --disable-cfftot1 do not build the cfftot1 program - --disable-mmafm do not build the mmafm program - --disable-mmpfb do not build the mmpfb program - --disable-otfinfo do not build the otfinfo program - --disable-otftotfm do not build the otftotfm program - --disable-t1dotlessj do not build the t1dotlessj program - --disable-t1lint do not build the t1lint program - --disable-t1rawafm do not build the t1rawafm program - --disable-t1reencode do not build the t1reencode program - --disable-t1testpage do not build the t1testpage program - --disable-ttftotype42 do not build the ttftotype42 program - --disable-auto-cfftot1 disable running cfftot1 from otftotfm - --disable-auto-t1dotlessj disable running t1dotlessj from otftotfm - --disable-auto-ttftotype42 - disable running ttftotype42 from otftotfm - --disable-auto-updmap disable running updmap from otftotfm - --disable-makeindexk do not build the makeindexk package - --disable-makejvf do not build the makejvf package - --disable-mendexk do not build the mendexk package - --disable-musixtnt do not build the musixtnt package - --disable-ps2pk do not build the ps2pk package - --disable-psutils do not build the psutils package - --disable-seetexk do not build the seetexk package - --disable-tex4htk do not build the tex4htk package - --disable-ttf2pk2 do not build the ttf2pk2 package - --disable-ttfdump do not build the ttfdump package - --disable-upmendex do not build the upmendex package - --disable-xdvik do not build the xdvik package --disable-texlive do not build the texlive (TeX Live scripts) package --disable-linked-scripts do not install the linked scripts --disable-mktexmf-default do not run mktexmf if MF source missing @@ -1784,62 +1631,22 @@ Optional Features: Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-clisp-runtime=PATH - pathname of clisp runtime to install for `xindy', - `default' to derive from clisp, or `system' to use - installed version --with-banner-add=STR add STR to version string appended to banner lines --with-editor=CMD invoke CMD from the `e' option [vi +%d '%s'] or [texworks --position=%d "%s"] --with-mf-x-toolkit use X toolkit for METAFONT - --with-gs=/PATH/TO/gs Hard-wire the location of GhostScript - --with-xdvi-x-toolkit=KIT - Use toolkit KIT (xaw/motif/xaw3d/neXtaw) for xdvi - [default: Xaw] --with-system-harfbuzz use installed harfbuzz headers and library (requires pkg-config) - --with-system-icu use installed ICU headers and libraries (requires - pkg-config or icu-config) - --with-system-teckit use installed teckit headers and library (requires - pkg-config) --with-system-graphite2 use installed graphite2 headers and library (requires pkg-config) --with-system-zziplib use installed zziplib headers and library (requires pkg-config) - --with-system-mpfr use installed mpfr headers and library - --with-mpfr-includes=DIR - mpfr headers installed in DIR - --with-mpfr-libdir=DIR mpfr library installed in DIR - --with-system-gmp use installed gmp headers and library - --with-gmp-includes=DIR gmp headers installed in DIR - --with-gmp-libdir=DIR gmp library installed in DIR - --with-system-cairo use installed cairo headers and library (requires - pkg-config) - --with-system-pixman use installed pixman headers and library (requires - pkg-config) - --with-system-gd use installed gd headers and library - --with-gd-includes=DIR gd headers installed in DIR - --with-gd-libdir=DIR gd library installed in DIR - --with-system-potrace use installed potrace headers and library - --with-potrace-includes=DIR - potrace headers installed in DIR - --with-potrace-libdir=DIR - potrace library installed in DIR - --with-system-freetype2 use installed freetype2 headers and library - (requires freetype-config) --with-system-libpng use installed libpng headers and library (requires pkg-config) - --with-system-libpaper use installed libpaper headers and library - --with-libpaper-includes=DIR - libpaper headers installed in DIR - --with-libpaper-libdir=DIR - libpaper library installed in DIR --with-system-zlib use installed zlib headers and library --with-zlib-includes=DIR zlib headers installed in DIR --with-zlib-libdir=DIR zlib library installed in DIR - --with-system-ptexenc use installed ptexenc headers and library (requires - pkg-config) --with-system-kpathsea use installed kpathsea headers and library (requires pkg-config) --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use @@ -4980,332 +4787,6 @@ printf "%s\n" "$as_me: $host -> \`--disable-mfluajit-nowin'" >&6;} esac ;; esac -## utils/autosp/ac/withenable.ac: configure.ac fragment for Tl subdir -## configure options and TL libraries required for autosp. -# Check whether --enable-autosp was given. -if test ${enable_autosp+y} -then : - enableval=$enable_autosp; -fi -case $enable_autosp in #( - yes|no) : - ;; #( - *) : - - enable_autosp=$enable_all_pkgs - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-autosp=$enable_autosp'" >&5 -printf "%s\n" "$as_me: Assuming \`--enable-autosp=$enable_autosp'" >&6;} - ac_configure_args="$ac_configure_args '--enable-autosp=$enable_autosp'" - ;; -esac - -## utils/axodraw2/ac/withenable.ac: configure.ac fragment for TL subdir -## configure options and TL libraries for axodraw2. -# Check whether --enable-axodraw2 was given. -if test ${enable_axodraw2+y} -then : - enableval=$enable_axodraw2; -fi -case $enable_axodraw2 in #( - yes|no) : - ;; #( - *) : - - enable_axodraw2=$enable_all_pkgs - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-axodraw2=$enable_axodraw2'" >&5 -printf "%s\n" "$as_me: Assuming \`--enable-axodraw2=$enable_axodraw2'" >&6;} - ac_configure_args="$ac_configure_args '--enable-axodraw2=$enable_axodraw2'" - ;; -esac - -## utils/devnag/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory utils/devnag/ -## configure options and TL libraries required for devnag -# Check whether --enable-devnag was given. -if test ${enable_devnag+y} -then : - enableval=$enable_devnag; -fi -case $enable_devnag in #( - yes|no) : - ;; #( - *) : - - enable_devnag=$enable_all_pkgs - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-devnag=$enable_devnag'" >&5 -printf "%s\n" "$as_me: Assuming \`--enable-devnag=$enable_devnag'" >&6;} - ac_configure_args="$ac_configure_args '--enable-devnag=$enable_devnag'" - ;; -esac - -## utils/lacheck/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory utils/lacheck/ -## configure options and TL libraries required for lacheck -# Check whether --enable-lacheck was given. -if test ${enable_lacheck+y} -then : - enableval=$enable_lacheck; -fi -case $enable_lacheck in #( - yes|no) : - ;; #( - *) : - - enable_lacheck=$enable_all_pkgs - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-lacheck=$enable_lacheck'" >&5 -printf "%s\n" "$as_me: Assuming \`--enable-lacheck=$enable_lacheck'" >&6;} - ac_configure_args="$ac_configure_args '--enable-lacheck=$enable_lacheck'" - ;; -esac - -## utils/m-tx/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory utils/m-tx/ -## configure options and TL libraries required for mtx -# Check whether --enable-m-tx was given. -if test ${enable_m_tx+y} -then : - enableval=$enable_m_tx; -fi -case $enable_m_tx in #( - yes|no) : - ;; #( - *) : - - enable_m_tx=$enable_all_pkgs - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-m-tx=$enable_m_tx'" >&5 -printf "%s\n" "$as_me: Assuming \`--enable-m-tx=$enable_m_tx'" >&6;} - ac_configure_args="$ac_configure_args '--enable-m-tx=$enable_m_tx'" - ;; -esac - -## utils/pmx/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory utils/pmx/ -## configure options and TL libraries required for pmx -# Check whether --enable-pmx was given. -if test ${enable_pmx+y} -then : - enableval=$enable_pmx; -fi -case $enable_pmx in #( - yes|no) : - ;; #( - *) : - - enable_pmx=$enable_all_pkgs - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-pmx=$enable_pmx'" >&5 -printf "%s\n" "$as_me: Assuming \`--enable-pmx=$enable_pmx'" >&6;} - ac_configure_args="$ac_configure_args '--enable-pmx=$enable_pmx'" - ;; -esac - -## utils/ps2eps/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory utils/ps2eps/ -## configure options and TL libraries required for ps2eps -# Check whether --enable-ps2eps was given. -if test ${enable_ps2eps+y} -then : - enableval=$enable_ps2eps; -fi -case $enable_ps2eps in #( - yes|no) : - ;; #( - *) : - - enable_ps2eps=$enable_all_pkgs - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-ps2eps=$enable_ps2eps'" >&5 -printf "%s\n" "$as_me: Assuming \`--enable-ps2eps=$enable_ps2eps'" >&6;} - ac_configure_args="$ac_configure_args '--enable-ps2eps=$enable_ps2eps'" - ;; -esac - -## utils/t1utils/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory utils/t1utils/ -## configure options and TL libraries required for t1utils -# Check whether --enable-t1utils was given. -if test ${enable_t1utils+y} -then : - enableval=$enable_t1utils; -fi -case $enable_t1utils in #( - yes|no) : - ;; #( - *) : - - enable_t1utils=$enable_all_pkgs - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-t1utils=$enable_t1utils'" >&5 -printf "%s\n" "$as_me: Assuming \`--enable-t1utils=$enable_t1utils'" >&6;} - ac_configure_args="$ac_configure_args '--enable-t1utils=$enable_t1utils'" - ;; -esac - -## utils/texdoctk/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory utils/texdoctk/ -## configure options and TL libraries required for texdoctk -# Check whether --enable-texdoctk was given. -if test ${enable_texdoctk+y} -then : - enableval=$enable_texdoctk; -fi -case $enable_texdoctk in #( - yes|no) : - ;; #( - *) : - - enable_texdoctk=$enable_all_pkgs - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-texdoctk=$enable_texdoctk'" >&5 -printf "%s\n" "$as_me: Assuming \`--enable-texdoctk=$enable_texdoctk'" >&6;} - ac_configure_args="$ac_configure_args '--enable-texdoctk=$enable_texdoctk'" - ;; -esac - -## utils/tpic2pdftex/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory utils/tpic2pdftex/ -## configure options and TL libraries required for tpic2pdftex -# Check whether --enable-tpic2pdftex was given. -if test ${enable_tpic2pdftex+y} -then : - enableval=$enable_tpic2pdftex; -fi -case $enable_tpic2pdftex in #( - yes|no) : - ;; #( - *) : - - enable_tpic2pdftex=$enable_all_pkgs - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-tpic2pdftex=$enable_tpic2pdftex'" >&5 -printf "%s\n" "$as_me: Assuming \`--enable-tpic2pdftex=$enable_tpic2pdftex'" >&6;} - ac_configure_args="$ac_configure_args '--enable-tpic2pdftex=$enable_tpic2pdftex'" - ;; -esac - -## utils/vlna/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory utils/vlna/ -## configure options and TL libraries required for vlna -# Check whether --enable-vlna was given. -if test ${enable_vlna+y} -then : - enableval=$enable_vlna; -fi -case $enable_vlna in #( - yes|no) : - ;; #( - *) : - - enable_vlna=$enable_all_pkgs - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-vlna=$enable_vlna'" >&5 -printf "%s\n" "$as_me: Assuming \`--enable-vlna=$enable_vlna'" >&6;} - ac_configure_args="$ac_configure_args '--enable-vlna=$enable_vlna'" - ;; -esac - -## utils/xindy/ac/withenable.ac: configure.ac fragment for TL subdir -## configure options and TL libraries required for xindy. -# Check whether --enable-xindy was given. -if test ${enable_xindy+y} -then : - enableval=$enable_xindy; -fi -case $enable_xindy in #( - yes|no) : - ;; #( - *) : - - enable_xindy=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-xindy=$enable_xindy'" >&5 -printf "%s\n" "$as_me: Assuming \`--enable-xindy=$enable_xindy'" >&6;} - ac_configure_args="$ac_configure_args '--enable-xindy=$enable_xindy'" - ;; -esac - -## utils/xindy/ac/xindy.ac: configure.ac fragment for the TeX Live subdirectory utils/xindy/ -## configure options for xindy -# Check whether --enable-xindy-rules was given. -if test ${enable_xindy_rules+y} -then : - enableval=$enable_xindy_rules; -fi -# Check whether --enable-xindy-docs was given. -if test ${enable_xindy_docs+y} -then : - enableval=$enable_xindy_docs; -fi - -# Check whether --with-clisp-runtime was given. -if test ${with_clisp_runtime+y} -then : - withval=$with_clisp_runtime; -fi - -## utils/xindy/ac/clisp.ac: configure.ac fragment for the TeX Live subdirectory utils/xindy/ -## configure checks for xindy and clisp -case $with_clisp_runtime in #( - default) : - ;; #( - system) : - if test "x$enable_native_texlive_build" = xyes -then : - as_fn_error $? "you can not use the installed clisp for a native TeX Live build" "$LINENO" 5 -fi ;; #( - "") : - if test "x$enable_native_texlive_build" = xyes -then : - with_clisp_runtime=default -else $as_nop - with_clisp_runtime=system -fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--with-clisp-runtime=$with_clisp_runtime'" >&5 -printf "%s\n" "$as_me: Assuming \`--with-clisp-runtime=$with_clisp_runtime'" >&6;} - ac_configure_args="$ac_configure_args '--with-clisp-runtime=$with_clisp_runtime'" ;; #( - *) : - if test ! -f "$with_clisp_runtime" -then : - as_fn_error $? "no such file: \"$with_clisp_runtime\"" "$LINENO" 5 -fi ;; -esac - -## utils/xml2pmx/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory utils/xml2pmx/ -## configure options and TL libraries required for xml2pmx -# Check whether --enable-xml2pmx was given. -if test ${enable_xml2pmx+y} -then : - enableval=$enable_xml2pmx; -fi -case $enable_xml2pmx in #( - yes|no) : - ;; #( - *) : - - enable_xml2pmx=$enable_all_pkgs - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-xml2pmx=$enable_xml2pmx'" >&5 -printf "%s\n" "$as_me: Assuming \`--enable-xml2pmx=$enable_xml2pmx'" >&6;} - ac_configure_args="$ac_configure_args '--enable-xml2pmx=$enable_xml2pmx'" - ;; -esac - -## utils/xpdfopen/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory utils/xpdfopen/ -## configure options and TL libraries required for xpdfopen -# Check whether --enable-xpdfopen was given. -if test ${enable_xpdfopen+y} -then : - enableval=$enable_xpdfopen; -fi -if test "x$with_x" = xno -then : - case $enable_xpdfopen in #( - "") : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \`--without-x' -> \`--disable-xpdfopen'" >&5 -printf "%s\n" "$as_me: \`--without-x' -> \`--disable-xpdfopen'" >&6;} - enable_xpdfopen=no - ac_configure_args="$ac_configure_args '--disable-xpdfopen'" ;; #( - yes) : - as_fn_error $? "Sorry, incompatible options \`--without-x' and \`--enable-xpdfopen'" "$LINENO" 5 ;; #( - *) : - ;; -esac -fi -case $enable_xpdfopen in #( - yes|no) : - ;; #( - *) : - - enable_xpdfopen=$enable_all_pkgs - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-xpdfopen=$enable_xpdfopen'" >&5 -printf "%s\n" "$as_me: Assuming \`--enable-xpdfopen=$enable_xpdfopen'" >&6;} - ac_configure_args="$ac_configure_args '--enable-xpdfopen=$enable_xpdfopen'" - ;; -esac - ## texk/web2c/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/web2c/ ## configure options and TL libraries required for web2c @@ -5408,7 +4889,7 @@ case $enable_ptex in #( yes | no) : ;; #( *) : - enable_ptex=yes ;; + enable_ptex=no ;; esac # Check whether --enable-ptex-synctex was given. @@ -5452,7 +4933,7 @@ case $enable_uptex in #( yes | no) : ;; #( *) : - enable_uptex=yes ;; + enable_uptex=no ;; esac # Check whether --enable-uptex-synctex was given. @@ -5828,1029 +5309,98 @@ then : fi -## texk/afm2pl/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/afm2pl/ -## configure options and TL libraries required for afm2pl -# Check whether --enable-afm2pl was given. -if test ${enable_afm2pl+y} +## texk/texlive/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/texlive/ +## configure options and TL libraries required for texlive +# Check whether --enable-texlive was given. +if test ${enable_texlive+y} then : - enableval=$enable_afm2pl; + enableval=$enable_texlive; fi -case $enable_afm2pl in #( +case $enable_texlive in #( yes|no) : ;; #( *) : - enable_afm2pl=$enable_all_pkgs - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-afm2pl=$enable_afm2pl'" >&5 -printf "%s\n" "$as_me: Assuming \`--enable-afm2pl=$enable_afm2pl'" >&6;} - ac_configure_args="$ac_configure_args '--enable-afm2pl=$enable_afm2pl'" + enable_texlive=$enable_all_pkgs + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-texlive=$enable_texlive'" >&5 +printf "%s\n" "$as_me: Assuming \`--enable-texlive=$enable_texlive'" >&6;} + ac_configure_args="$ac_configure_args '--enable-texlive=$enable_texlive'" ;; esac -test "x$enable_afm2pl" = xno || { - need_kpathsea=yes -} - -## texk/bibtex-x/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/bibtex-x/ -## configure options and TL libraries required for bibtex-x -# Check whether --enable-bibtex-x was given. -if test ${enable_bibtex_x+y} +## texk/texlive/ac/texlive.ac: configure.ac fragment for the TeX Live subdirectory texk/texlive/ +## configure options for texlive +# Check whether --enable-linked-scripts was given. +if test ${enable_linked_scripts+y} then : - enableval=$enable_bibtex_x; + enableval=$enable_linked_scripts; fi -case $enable_bibtex_x in #( - yes|no) : - ;; #( - *) : - enable_bibtex_x=$enable_all_pkgs - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-bibtex-x=$enable_bibtex_x'" >&5 -printf "%s\n" "$as_me: Assuming \`--enable-bibtex-x=$enable_bibtex_x'" >&6;} - ac_configure_args="$ac_configure_args '--enable-bibtex-x=$enable_bibtex_x'" - ;; -esac -test "x$enable_bibtex_x" = xno || { - need_kpathsea=yes -} +## libs/pplib/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/pplib/ +## configure options and TL libraries required for pplib -## texk/bibtex-x/ac/bibtex-x.ac: configure.ac fragment for the TeX Live subdirectory texk/bibtex-x/ -## configure options for bibtex-x -# Check whether --enable-bibtex8 was given. -if test ${enable_bibtex8+y} -then : - enableval=$enable_bibtex8; -fi +## libs/harfbuzz/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/harfbuzz/ +## configure options and TL libraries required for harfbuzz -case $enable_bibtex8 in #( - yes | no) : - ;; #( - *) : - enable_bibtex8=yes ;; -esac -# Check whether --enable-bibtexu was given. -if test ${enable_bibtexu+y} +# Check whether --with-system-harfbuzz was given. +if test ${with_system_harfbuzz+y} then : - enableval=$enable_bibtexu; + withval=$with_system_harfbuzz; +fi +if test "x$with_system_harfbuzz" = x; then + if test -f $srcdir/libs/harfbuzz/configure; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`harfbuzz' headers and library from TL tree" >&5 +printf "%s\n" "$as_me: Assuming \`harfbuzz' headers and library from TL tree" >&6;} + with_system_harfbuzz=no + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming installed \`harfbuzz' headers and library" >&5 +printf "%s\n" "$as_me: Assuming installed \`harfbuzz' headers and library" >&6;} + with_system_harfbuzz=yes + fi + ac_configure_args="$ac_configure_args '--with-system-harfbuzz=$with_system_harfbuzz'" +elif test "x$with_system_harfbuzz" = xyes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using installed \`harfbuzz' headers and library" >&5 +printf "%s\n" "$as_me: Using installed \`harfbuzz' headers and library" >&6;} +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using \`harfbuzz' headers and library from TL tree" >&5 +printf "%s\n" "$as_me: Using \`harfbuzz' headers and library from TL tree" >&6;} + if test "x$with_system_harfbuzz" != xno; then + with_system_harfbuzz=no + ac_configure_args="$ac_configure_args '--without-system-harfbuzz'" + fi +fi +if test "x$with_system_harfbuzz" = xyes; then + if test "x$with_system_graphite2" = x; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -> installed \`graphite2' headers and library" >&5 +printf "%s\n" "$as_me: -> installed \`graphite2' headers and library" >&6;} + with_system_graphite2=yes + ac_configure_args="$ac_configure_args '--with-system-graphite2'" + elif test "x$with_system_graphite2" != xyes; then + as_fn_error $? "Sorry, \`--with-system-harfbuzz' requires \`--with-system-graphite2'" "$LINENO" 5 + fi + if test "x$with_system_icu" = x; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -> installed \`icu' headers and library" >&5 +printf "%s\n" "$as_me: -> installed \`icu' headers and library" >&6;} + with_system_icu=yes + ac_configure_args="$ac_configure_args '--with-system-icu'" + elif test "x$with_system_icu" != xyes; then + as_fn_error $? "Sorry, \`--with-system-harfbuzz' requires \`--with-system-icu'" "$LINENO" 5 + fi fi -case $enable_bibtexu in #( - yes | no) : - ;; #( - *) : - enable_bibtexu=yes ;; -esac +test "x$need_harfbuzz" = xyes && { + need_graphite2=yes + need_icu=yes +} -test "x$enable_bibtex_x:$enable_bibtexu" = xyes:yes && need_icu=yes +## libs/graphite2/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/graphite2/ +## configure options and TL libraries required for graphite2 -## texk/chktex/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/chktex/ -## configure options and TL libraries required for chktex -# Check whether --enable-chktex was given. -if test ${enable_chktex+y} +# Check whether --with-system-graphite2 was given. +if test ${with_system_graphite2+y} then : - enableval=$enable_chktex; -fi -case $enable_chktex in #( - yes|no) : - ;; #( - *) : - - enable_chktex=$enable_all_pkgs - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-chktex=$enable_chktex'" >&5 -printf "%s\n" "$as_me: Assuming \`--enable-chktex=$enable_chktex'" >&6;} - ac_configure_args="$ac_configure_args '--enable-chktex=$enable_chktex'" - ;; -esac - -test "x$enable_chktex" = xno || { - need_kpathsea=yes -} - -## texk/cjkutils/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/cjkutils/ -## configure options and TL libraries required for cjkutils -# Check whether --enable-cjkutils was given. -if test ${enable_cjkutils+y} -then : - enableval=$enable_cjkutils; -fi -case $enable_cjkutils in #( - yes|no) : - ;; #( - *) : - - enable_cjkutils=$enable_all_pkgs - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-cjkutils=$enable_cjkutils'" >&5 -printf "%s\n" "$as_me: Assuming \`--enable-cjkutils=$enable_cjkutils'" >&6;} - ac_configure_args="$ac_configure_args '--enable-cjkutils=$enable_cjkutils'" - ;; -esac - -test "x$enable_cjkutils" = xno || { - need_kpathsea=yes -} - -## texk/detex/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/detex/ -## configure options and TL libraries required for detex -# Check whether --enable-detex was given. -if test ${enable_detex+y} -then : - enableval=$enable_detex; -fi -case $enable_detex in #( - yes|no) : - ;; #( - *) : - - enable_detex=$enable_all_pkgs - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-detex=$enable_detex'" >&5 -printf "%s\n" "$as_me: Assuming \`--enable-detex=$enable_detex'" >&6;} - ac_configure_args="$ac_configure_args '--enable-detex=$enable_detex'" - ;; -esac - -test "x$enable_detex" = xno || { - need_kpathsea=yes -} - -## texk/dtl/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/dtl/ -## configure options and TL libraries required for dtl -# Check whether --enable-dtl was given. -if test ${enable_dtl+y} -then : - enableval=$enable_dtl; -fi -case $enable_dtl in #( - yes|no) : - ;; #( - *) : - - enable_dtl=$enable_all_pkgs - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-dtl=$enable_dtl'" >&5 -printf "%s\n" "$as_me: Assuming \`--enable-dtl=$enable_dtl'" >&6;} - ac_configure_args="$ac_configure_args '--enable-dtl=$enable_dtl'" - ;; -esac - -test "x$enable_dtl" = xno || { - need_kpathsea=yes -} - -## texk/dvi2tty/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/dvi2tty/ -## configure options and TL libraries required for dvi2tty -# Check whether --enable-dvi2tty was given. -if test ${enable_dvi2tty+y} -then : - enableval=$enable_dvi2tty; -fi -case $enable_dvi2tty in #( - yes|no) : - ;; #( - *) : - - enable_dvi2tty=$enable_all_pkgs - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-dvi2tty=$enable_dvi2tty'" >&5 -printf "%s\n" "$as_me: Assuming \`--enable-dvi2tty=$enable_dvi2tty'" >&6;} - ac_configure_args="$ac_configure_args '--enable-dvi2tty=$enable_dvi2tty'" - ;; -esac - -test "x$enable_dvi2tty" = xno || { - need_ptexenc=yes -} - -## texk/dvidvi/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/dvidvi/ -## configure options and TL libraries required for dvidvi -# Check whether --enable-dvidvi was given. -if test ${enable_dvidvi+y} -then : - enableval=$enable_dvidvi; -fi -case $enable_dvidvi in #( - yes|no) : - ;; #( - *) : - - enable_dvidvi=$enable_all_pkgs - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-dvidvi=$enable_dvidvi'" >&5 -printf "%s\n" "$as_me: Assuming \`--enable-dvidvi=$enable_dvidvi'" >&6;} - ac_configure_args="$ac_configure_args '--enable-dvidvi=$enable_dvidvi'" - ;; -esac - -test "x$enable_dvidvi" = xno || { - need_kpathsea=yes -} - -## texk/dviljk/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/dviljk/ -## configure options and TL libraries required for dviljk -# Check whether --enable-dviljk was given. -if test ${enable_dviljk+y} -then : - enableval=$enable_dviljk; -fi -case $enable_dviljk in #( - yes|no) : - ;; #( - *) : - - enable_dviljk=$enable_all_pkgs - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-dviljk=$enable_dviljk'" >&5 -printf "%s\n" "$as_me: Assuming \`--enable-dviljk=$enable_dviljk'" >&6;} - ac_configure_args="$ac_configure_args '--enable-dviljk=$enable_dviljk'" - ;; -esac - -test "x$enable_dviljk" = xno || { - need_kpathsea=yes -} - -## texk/dviout-util/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/dviout-util/ -## configure options and TL libraries required for dviout-util -# Check whether --enable-dviout-util was given. -if test ${enable_dviout_util+y} -then : - enableval=$enable_dviout_util; -fi -case $enable_dviout_util in #( - yes|no) : - ;; #( - *) : - - enable_dviout_util=$enable_all_pkgs - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-dviout-util=$enable_dviout_util'" >&5 -printf "%s\n" "$as_me: Assuming \`--enable-dviout-util=$enable_dviout_util'" >&6;} - ac_configure_args="$ac_configure_args '--enable-dviout-util=$enable_dviout_util'" - ;; -esac - -test "x$enable_dviout_util" = xno || { - need_ptexenc=yes -} - -## texk/dvipdfm-x/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/dvipdfm-x/ -## configure options and TL libraries required for dvipdfm-x -# Check whether --enable-dvipdfm-x was given. -if test ${enable_dvipdfm_x+y} -then : - enableval=$enable_dvipdfm_x; -fi -case $enable_dvipdfm_x in #( - yes|no) : - ;; #( - *) : - - enable_dvipdfm_x=$enable_all_pkgs - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-dvipdfm-x=$enable_dvipdfm_x'" >&5 -printf "%s\n" "$as_me: Assuming \`--enable-dvipdfm-x=$enable_dvipdfm_x'" >&6;} - ac_configure_args="$ac_configure_args '--enable-dvipdfm-x=$enable_dvipdfm_x'" - ;; -esac - -test "x$enable_dvipdfm_x" = xno || { - need_kpathsea=yes - need_libpng=yes - need_libpaper=yes -} - -## texk/dvipng/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/dvipng/ -## configure options and TL libraries required for dvipng -# Check whether --enable-dvipng was given. -if test ${enable_dvipng+y} -then : - enableval=$enable_dvipng; -fi -case $enable_dvipng in #( - yes|no) : - ;; #( - *) : - - enable_dvipng=$enable_all_pkgs - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-dvipng=$enable_dvipng'" >&5 -printf "%s\n" "$as_me: Assuming \`--enable-dvipng=$enable_dvipng'" >&6;} - ac_configure_args="$ac_configure_args '--enable-dvipng=$enable_dvipng'" - ;; -esac - -test "x$enable_dvipng" = xno || { - need_kpathsea=yes - need_gd=yes -} - -## texk/dvipng/ac/dvipng.ac: configure.ac fragment for the TeX Live subdirectory texk/dvipng/ -## configure options for dvipng -# Check whether --enable-debug was given. -if test ${enable_debug+y} -then : - enableval=$enable_debug; -fi - -# Check whether --enable-timing was given. -if test ${enable_timing+y} -then : - enableval=$enable_timing; -fi - - -# Check whether --with-gs was given. -if test ${with_gs+y} -then : - withval=$with_gs; -fi - - -## texk/dvipos/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/dvipos/ -## configure options and TL libraries required for dvipos -# Check whether --enable-dvipos was given. -if test ${enable_dvipos+y} -then : - enableval=$enable_dvipos; -fi -case $enable_dvipos in #( - yes|no) : - ;; #( - *) : - - enable_dvipos=$enable_all_pkgs - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-dvipos=$enable_dvipos'" >&5 -printf "%s\n" "$as_me: Assuming \`--enable-dvipos=$enable_dvipos'" >&6;} - ac_configure_args="$ac_configure_args '--enable-dvipos=$enable_dvipos'" - ;; -esac - -test "x$enable_dvipos" = xno || { - need_kpathsea=yes -} - -## texk/dvipsk/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/dvipsk/ -## configure options and TL libraries required for dvipsk -# Check whether --enable-dvipsk was given. -if test ${enable_dvipsk+y} -then : - enableval=$enable_dvipsk; -fi -case $enable_dvipsk in #( - yes|no) : - ;; #( - *) : - - enable_dvipsk=$enable_all_pkgs - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-dvipsk=$enable_dvipsk'" >&5 -printf "%s\n" "$as_me: Assuming \`--enable-dvipsk=$enable_dvipsk'" >&6;} - ac_configure_args="$ac_configure_args '--enable-dvipsk=$enable_dvipsk'" - ;; -esac - -test "x$enable_dvipsk" = xno || { - need_kpathsea=yes -} - -# texk/dvisvgm/ac/withenable.ac: configure.ac fragment -## configure options and TL libraries required for dvisvgm -# Check whether --enable-dvisvgm was given. -if test ${enable_dvisvgm+y} -then : - enableval=$enable_dvisvgm; -fi -case $enable_dvisvgm in #( - yes|no) : - ;; #( - *) : - - enable_dvisvgm=$enable_all_pkgs - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-dvisvgm=$enable_dvisvgm'" >&5 -printf "%s\n" "$as_me: Assuming \`--enable-dvisvgm=$enable_dvisvgm'" >&6;} - ac_configure_args="$ac_configure_args '--enable-dvisvgm=$enable_dvisvgm'" - ;; -esac - -test "x$enable_dvisvgm" = xno || { - need_kpathsea=yes - need_potrace=yes - need_freetype2=yes - need_zlib=yes -} - -## texk/gregorio/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/gregorio/ -## configure options and TL libraries required for gregorio -# Check whether --enable-gregorio was given. -if test ${enable_gregorio+y} -then : - enableval=$enable_gregorio; -fi -case $enable_gregorio in #( - yes|no) : - ;; #( - *) : - - enable_gregorio=$enable_all_pkgs - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-gregorio=$enable_gregorio'" >&5 -printf "%s\n" "$as_me: Assuming \`--enable-gregorio=$enable_gregorio'" >&6;} - ac_configure_args="$ac_configure_args '--enable-gregorio=$enable_gregorio'" - ;; -esac - -test "x$enable_gregorio" = xno || { - need_kpathsea=yes -} - -## texk/gsftopk/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/gsftopk/ -## configure options and TL libraries required for gsftopk -# Check whether --enable-gsftopk was given. -if test ${enable_gsftopk+y} -then : - enableval=$enable_gsftopk; -fi -case $enable_gsftopk in #( - yes|no) : - ;; #( - *) : - - enable_gsftopk=$enable_all_pkgs - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-gsftopk=$enable_gsftopk'" >&5 -printf "%s\n" "$as_me: Assuming \`--enable-gsftopk=$enable_gsftopk'" >&6;} - ac_configure_args="$ac_configure_args '--enable-gsftopk=$enable_gsftopk'" - ;; -esac - -test "x$enable_gsftopk" = xno || { - need_kpathsea=yes -} - -## texk/lcdf-typetools/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/lcdf-typetools/ -## configure options and TL libraries required for lcdf-typetools -# Check whether --enable-lcdf-typetools was given. -if test ${enable_lcdf_typetools+y} -then : - enableval=$enable_lcdf_typetools; -fi -case $enable_lcdf_typetools in #( - yes|no) : - ;; #( - *) : - - enable_lcdf_typetools=$enable_all_pkgs - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-lcdf-typetools=$enable_lcdf_typetools'" >&5 -printf "%s\n" "$as_me: Assuming \`--enable-lcdf-typetools=$enable_lcdf_typetools'" >&6;} - ac_configure_args="$ac_configure_args '--enable-lcdf-typetools=$enable_lcdf_typetools'" - ;; -esac - -test "x$enable_lcdf_typetools" = xno || { - need_kpathsea=yes -} - -## Define configure options for lcdf-typetools. Extracted from configure.ac -## for ease of building TeX Live. -# Check whether --enable-cfftot1 was given. -if test ${enable_cfftot1+y} -then : - enableval=$enable_cfftot1; -fi -# Check whether --enable-mmafm was given. -if test ${enable_mmafm+y} -then : - enableval=$enable_mmafm; -fi -# Check whether --enable-mmpfb was given. -if test ${enable_mmpfb+y} -then : - enableval=$enable_mmpfb; -fi -# Check whether --enable-otfinfo was given. -if test ${enable_otfinfo+y} -then : - enableval=$enable_otfinfo; -fi -# Check whether --enable-otftotfm was given. -if test ${enable_otftotfm+y} -then : - enableval=$enable_otftotfm; -fi -# Check whether --enable-t1dotlessj was given. -if test ${enable_t1dotlessj+y} -then : - enableval=$enable_t1dotlessj; -fi -# Check whether --enable-t1lint was given. -if test ${enable_t1lint+y} -then : - enableval=$enable_t1lint; -fi -# Check whether --enable-t1rawafm was given. -if test ${enable_t1rawafm+y} -then : - enableval=$enable_t1rawafm; -fi -# Check whether --enable-t1reencode was given. -if test ${enable_t1reencode+y} -then : - enableval=$enable_t1reencode; -fi -# Check whether --enable-t1testpage was given. -if test ${enable_t1testpage+y} -then : - enableval=$enable_t1testpage; -fi -# Check whether --enable-ttftotype42 was given. -if test ${enable_ttftotype42+y} -then : - enableval=$enable_ttftotype42; -fi - -# Check whether --enable-cfftot1 was given. -if test ${enable_cfftot1+y} -then : - enableval=$enable_cfftot1; -fi -# Check whether --enable-t1dotlessj was given. -if test ${enable_t1dotlessj+y} -then : - enableval=$enable_t1dotlessj; -fi -# Check whether --enable-ttftotype42 was given. -if test ${enable_ttftotype42+y} -then : - enableval=$enable_ttftotype42; -fi -# Check whether --enable-updmap was given. -if test ${enable_updmap+y} -then : - enableval=$enable_updmap; -fi - - -## texk/makeindexk/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/makeindexk/ -## configure options and TL libraries required for makeindexk -# Check whether --enable-makeindexk was given. -if test ${enable_makeindexk+y} -then : - enableval=$enable_makeindexk; -fi -case $enable_makeindexk in #( - yes|no) : - ;; #( - *) : - - enable_makeindexk=$enable_all_pkgs - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-makeindexk=$enable_makeindexk'" >&5 -printf "%s\n" "$as_me: Assuming \`--enable-makeindexk=$enable_makeindexk'" >&6;} - ac_configure_args="$ac_configure_args '--enable-makeindexk=$enable_makeindexk'" - ;; -esac - -test "x$enable_makeindexk" = xno || { - need_kpathsea=yes -} - -## texk/makejvf/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/makejvf/ -## configure options and TL libraries required for makejvf -# Check whether --enable-makejvf was given. -if test ${enable_makejvf+y} -then : - enableval=$enable_makejvf; -fi -case $enable_makejvf in #( - yes|no) : - ;; #( - *) : - - enable_makejvf=$enable_all_pkgs - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-makejvf=$enable_makejvf'" >&5 -printf "%s\n" "$as_me: Assuming \`--enable-makejvf=$enable_makejvf'" >&6;} - ac_configure_args="$ac_configure_args '--enable-makejvf=$enable_makejvf'" - ;; -esac - -test "x$enable_makejvf" = xno || { - need_ptexenc=yes -} - -## texk/mendexk/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/mendexk/ -## configure options and TL libraries required for mendexk -# Check whether --enable-mendexk was given. -if test ${enable_mendexk+y} -then : - enableval=$enable_mendexk; -fi -case $enable_mendexk in #( - yes|no) : - ;; #( - *) : - - enable_mendexk=$enable_all_pkgs - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-mendexk=$enable_mendexk'" >&5 -printf "%s\n" "$as_me: Assuming \`--enable-mendexk=$enable_mendexk'" >&6;} - ac_configure_args="$ac_configure_args '--enable-mendexk=$enable_mendexk'" - ;; -esac - -test "x$enable_mendexk" = xno || { - need_ptexenc=yes -} - -## texk/musixtnt/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/musixtnt/ -## configure options and TL libraries required for musixtnt -# Check whether --enable-musixtnt was given. -if test ${enable_musixtnt+y} -then : - enableval=$enable_musixtnt; -fi -case $enable_musixtnt in #( - yes|no) : - ;; #( - *) : - - enable_musixtnt=$enable_all_pkgs - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-musixtnt=$enable_musixtnt'" >&5 -printf "%s\n" "$as_me: Assuming \`--enable-musixtnt=$enable_musixtnt'" >&6;} - ac_configure_args="$ac_configure_args '--enable-musixtnt=$enable_musixtnt'" - ;; -esac - -test "x$enable_musixtnt" = xno || { - need_kpathsea=yes -} - -## texk/ps2pk/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/ps2pk/ -## configure options and TL libraries required for ps2pk -# Check whether --enable-ps2pk was given. -if test ${enable_ps2pk+y} -then : - enableval=$enable_ps2pk; -fi -case $enable_ps2pk in #( - yes|no) : - ;; #( - *) : - - enable_ps2pk=$enable_all_pkgs - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-ps2pk=$enable_ps2pk'" >&5 -printf "%s\n" "$as_me: Assuming \`--enable-ps2pk=$enable_ps2pk'" >&6;} - ac_configure_args="$ac_configure_args '--enable-ps2pk=$enable_ps2pk'" - ;; -esac - -test "x$enable_ps2pk" = xno || { - need_kpathsea=yes -} - -## texk/psutils/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/psutils/ -## configure options and TL libraries required for psutils -# Check whether --enable-psutils was given. -if test ${enable_psutils+y} -then : - enableval=$enable_psutils; -fi -case $enable_psutils in #( - yes|no) : - ;; #( - *) : - - enable_psutils=$enable_all_pkgs - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-psutils=$enable_psutils'" >&5 -printf "%s\n" "$as_me: Assuming \`--enable-psutils=$enable_psutils'" >&6;} - ac_configure_args="$ac_configure_args '--enable-psutils=$enable_psutils'" - ;; -esac - -test "x$enable_psutils" = xno || { - need_kpathsea=yes - need_libpaper=yes -} - -## texk/seetexk/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/seetexk/ -## configure options and TL libraries required for seetexk -# Check whether --enable-seetexk was given. -if test ${enable_seetexk+y} -then : - enableval=$enable_seetexk; -fi -case $enable_seetexk in #( - yes|no) : - ;; #( - *) : - - enable_seetexk=$enable_all_pkgs - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-seetexk=$enable_seetexk'" >&5 -printf "%s\n" "$as_me: Assuming \`--enable-seetexk=$enable_seetexk'" >&6;} - ac_configure_args="$ac_configure_args '--enable-seetexk=$enable_seetexk'" - ;; -esac - -test "x$enable_seetexk" = xno || { - need_kpathsea=yes -} - -## texk/tex4htk/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/tex4htk/ -## configure options and TL libraries required for tex4htk -# Check whether --enable-tex4htk was given. -if test ${enable_tex4htk+y} -then : - enableval=$enable_tex4htk; -fi -case $enable_tex4htk in #( - yes|no) : - ;; #( - *) : - - enable_tex4htk=$enable_all_pkgs - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-tex4htk=$enable_tex4htk'" >&5 -printf "%s\n" "$as_me: Assuming \`--enable-tex4htk=$enable_tex4htk'" >&6;} - ac_configure_args="$ac_configure_args '--enable-tex4htk=$enable_tex4htk'" - ;; -esac - -test "x$enable_tex4htk" = xno || { - need_kpathsea=yes -} - -## texk/ttf2pk2/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/ttf2pk2/ -## configure options and TL libraries required for ttf2pk -# Check whether --enable-ttf2pk2 was given. -if test ${enable_ttf2pk2+y} -then : - enableval=$enable_ttf2pk2; -fi -case $enable_ttf2pk2 in #( - yes|no) : - ;; #( - *) : - - enable_ttf2pk2=$enable_all_pkgs - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-ttf2pk2=$enable_ttf2pk2'" >&5 -printf "%s\n" "$as_me: Assuming \`--enable-ttf2pk2=$enable_ttf2pk2'" >&6;} - ac_configure_args="$ac_configure_args '--enable-ttf2pk2=$enable_ttf2pk2'" - ;; -esac - -test "x$enable_ttf2pk2" = xno || { - need_kpathsea=yes - need_freetype2=yes -} - -## texk/ttfdump/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/ttfdump/ -## configure options and TL libraries required for ttfdump -# Check whether --enable-ttfdump was given. -if test ${enable_ttfdump+y} -then : - enableval=$enable_ttfdump; -fi -case $enable_ttfdump in #( - yes|no) : - ;; #( - *) : - - enable_ttfdump=$enable_all_pkgs - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-ttfdump=$enable_ttfdump'" >&5 -printf "%s\n" "$as_me: Assuming \`--enable-ttfdump=$enable_ttfdump'" >&6;} - ac_configure_args="$ac_configure_args '--enable-ttfdump=$enable_ttfdump'" - ;; -esac - -test "x$enable_ttfdump" = xno || { - need_kpathsea=yes -} - -## texk/upmendex/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/upmendex/ -## configure options and TL libraries required for upmendex -# Check whether --enable-upmendex was given. -if test ${enable_upmendex+y} -then : - enableval=$enable_upmendex; -fi -case $enable_upmendex in #( - yes|no) : - ;; #( - *) : - - enable_upmendex=$enable_all_pkgs - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-upmendex=$enable_upmendex'" >&5 -printf "%s\n" "$as_me: Assuming \`--enable-upmendex=$enable_upmendex'" >&6;} - ac_configure_args="$ac_configure_args '--enable-upmendex=$enable_upmendex'" - ;; -esac - -test "x$enable_upmendex" = xno || { - need_kpathsea=yes - need_icu=yes -} - -## texk/xdvik/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/xdvik/ -## configure options and TL libraries required for xdvik -# Check whether --enable-xdvik was given. -if test ${enable_xdvik+y} -then : - enableval=$enable_xdvik; -fi -if test "x$with_x" = xno -then : - case $enable_xdvik in #( - "") : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \`--without-x' -> \`--disable-xdvik'" >&5 -printf "%s\n" "$as_me: \`--without-x' -> \`--disable-xdvik'" >&6;} - enable_xdvik=no - ac_configure_args="$ac_configure_args '--disable-xdvik'" ;; #( - yes) : - as_fn_error $? "Sorry, incompatible options \`--without-x' and \`--enable-xdvik'" "$LINENO" 5 ;; #( - *) : - ;; -esac -fi -case $enable_xdvik in #( - yes|no) : - ;; #( - *) : - - enable_xdvik=$enable_all_pkgs - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-xdvik=$enable_xdvik'" >&5 -printf "%s\n" "$as_me: Assuming \`--enable-xdvik=$enable_xdvik'" >&6;} - ac_configure_args="$ac_configure_args '--enable-xdvik=$enable_xdvik'" - ;; -esac - -test "x$enable_xdvik" = xno || { - need_kpathsea=yes - need_freetype2=yes -} - -## texk/xdvik/ac/xdvik.ac: configure.ac fragment for the TeX Live subdirectory texk/xdvik/ -## configure options for xdvik - -# Check whether --with-xdvi-x-toolkit was given. -if test ${with_xdvi_x_toolkit+y} -then : - withval=$with_xdvi_x_toolkit; -fi - - -## texk/texlive/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/texlive/ -## configure options and TL libraries required for texlive -# Check whether --enable-texlive was given. -if test ${enable_texlive+y} -then : - enableval=$enable_texlive; -fi -case $enable_texlive in #( - yes|no) : - ;; #( - *) : - - enable_texlive=$enable_all_pkgs - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-texlive=$enable_texlive'" >&5 -printf "%s\n" "$as_me: Assuming \`--enable-texlive=$enable_texlive'" >&6;} - ac_configure_args="$ac_configure_args '--enable-texlive=$enable_texlive'" - ;; -esac - -## texk/texlive/ac/texlive.ac: configure.ac fragment for the TeX Live subdirectory texk/texlive/ -## configure options for texlive -# Check whether --enable-linked-scripts was given. -if test ${enable_linked_scripts+y} -then : - enableval=$enable_linked_scripts; -fi - - -## libs/pplib/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/pplib/ -## configure options and TL libraries required for pplib - -## libs/harfbuzz/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/harfbuzz/ -## configure options and TL libraries required for harfbuzz - -# Check whether --with-system-harfbuzz was given. -if test ${with_system_harfbuzz+y} -then : - withval=$with_system_harfbuzz; -fi -if test "x$with_system_harfbuzz" = x; then - if test -f $srcdir/libs/harfbuzz/configure; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`harfbuzz' headers and library from TL tree" >&5 -printf "%s\n" "$as_me: Assuming \`harfbuzz' headers and library from TL tree" >&6;} - with_system_harfbuzz=no - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming installed \`harfbuzz' headers and library" >&5 -printf "%s\n" "$as_me: Assuming installed \`harfbuzz' headers and library" >&6;} - with_system_harfbuzz=yes - fi - ac_configure_args="$ac_configure_args '--with-system-harfbuzz=$with_system_harfbuzz'" -elif test "x$with_system_harfbuzz" = xyes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using installed \`harfbuzz' headers and library" >&5 -printf "%s\n" "$as_me: Using installed \`harfbuzz' headers and library" >&6;} -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using \`harfbuzz' headers and library from TL tree" >&5 -printf "%s\n" "$as_me: Using \`harfbuzz' headers and library from TL tree" >&6;} - if test "x$with_system_harfbuzz" != xno; then - with_system_harfbuzz=no - ac_configure_args="$ac_configure_args '--without-system-harfbuzz'" - fi -fi -if test "x$with_system_harfbuzz" = xyes; then - if test "x$with_system_graphite2" = x; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -> installed \`graphite2' headers and library" >&5 -printf "%s\n" "$as_me: -> installed \`graphite2' headers and library" >&6;} - with_system_graphite2=yes - ac_configure_args="$ac_configure_args '--with-system-graphite2'" - elif test "x$with_system_graphite2" != xyes; then - as_fn_error $? "Sorry, \`--with-system-harfbuzz' requires \`--with-system-graphite2'" "$LINENO" 5 - fi - if test "x$with_system_icu" = x; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -> installed \`icu' headers and library" >&5 -printf "%s\n" "$as_me: -> installed \`icu' headers and library" >&6;} - with_system_icu=yes - ac_configure_args="$ac_configure_args '--with-system-icu'" - elif test "x$with_system_icu" != xyes; then - as_fn_error $? "Sorry, \`--with-system-harfbuzz' requires \`--with-system-icu'" "$LINENO" 5 - fi -fi - -test "x$need_harfbuzz" = xyes && { - need_graphite2=yes - need_icu=yes -} - -## libs/icu/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/icu/ -## configure options and TL libraries required for icu (modified for XeTeX) - -# Check whether --with-system-icu was given. -if test ${with_system_icu+y} -then : - withval=$with_system_icu; -fi -if test "x$with_system_icu" = x; then - if test -f $srcdir/libs/icu/configure; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`icu' headers and library from TL tree" >&5 -printf "%s\n" "$as_me: Assuming \`icu' headers and library from TL tree" >&6;} - with_system_icu=no - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming installed \`icu' headers and library" >&5 -printf "%s\n" "$as_me: Assuming installed \`icu' headers and library" >&6;} - with_system_icu=yes - fi - ac_configure_args="$ac_configure_args '--with-system-icu=$with_system_icu'" -elif test "x$with_system_icu" = xyes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using installed \`icu' headers and library" >&5 -printf "%s\n" "$as_me: Using installed \`icu' headers and library" >&6;} -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using \`icu' headers and library from TL tree" >&5 -printf "%s\n" "$as_me: Using \`icu' headers and library from TL tree" >&6;} - if test "x$with_system_icu" != xno; then - with_system_icu=no - ac_configure_args="$ac_configure_args '--without-system-icu'" - fi -fi - -## libs/teckit/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/teckit/ -## configure options and TL libraries required for teckit - -# Check whether --with-system-teckit was given. -if test ${with_system_teckit+y} -then : - withval=$with_system_teckit; -fi -if test "x$with_system_teckit" = x; then - if test -f $srcdir/libs/teckit/configure; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`teckit' headers and library from TL tree" >&5 -printf "%s\n" "$as_me: Assuming \`teckit' headers and library from TL tree" >&6;} - with_system_teckit=no - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming installed \`teckit' headers and library" >&5 -printf "%s\n" "$as_me: Assuming installed \`teckit' headers and library" >&6;} - with_system_teckit=yes - fi - ac_configure_args="$ac_configure_args '--with-system-teckit=$with_system_teckit'" -elif test "x$with_system_teckit" = xyes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using installed \`teckit' headers and library" >&5 -printf "%s\n" "$as_me: Using installed \`teckit' headers and library" >&6;} -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using \`teckit' headers and library from TL tree" >&5 -printf "%s\n" "$as_me: Using \`teckit' headers and library from TL tree" >&6;} - if test "x$with_system_teckit" != xno; then - with_system_teckit=no - ac_configure_args="$ac_configure_args '--without-system-teckit'" - fi -fi -if test "x$with_system_teckit" = xyes; then - if test "x$with_system_zlib" = x; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -> installed \`zlib' headers and library" >&5 -printf "%s\n" "$as_me: -> installed \`zlib' headers and library" >&6;} - with_system_zlib=yes - ac_configure_args="$ac_configure_args '--with-system-zlib'" - elif test "x$with_system_zlib" != xyes; then - as_fn_error $? "Sorry, \`--with-system-teckit' requires \`--with-system-zlib'" "$LINENO" 5 - fi -fi - -test "x$need_teckit" = xyes && { - need_zlib=yes -} - -## libs/graphite2/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/graphite2/ -## configure options and TL libraries required for graphite2 - -# Check whether --with-system-graphite2 was given. -if test ${with_system_graphite2+y} -then : - withval=$with_system_graphite2; + withval=$with_system_graphite2; fi if test "x$with_system_graphite2" = x; then if test -f $srcdir/libs/graphite2/configure; then @@ -6920,362 +5470,6 @@ test "x$need_zziplib" = xyes && { need_zlib=yes } -## libs/xpdf/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/xpdf/ -## configure options and TL libraries required for xpdf -: "kpse_xpdf_options - no-op" -if test "x$with_system_xpdf" = x; then - if test -f $srcdir/libs/xpdf/configure; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`xpdf' headers and library from TL tree" >&5 -printf "%s\n" "$as_me: Assuming \`xpdf' headers and library from TL tree" >&6;} - with_system_xpdf=no - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming installed \`xpdf' headers and library" >&5 -printf "%s\n" "$as_me: Assuming installed \`xpdf' headers and library" >&6;} - with_system_xpdf=yes - fi - ac_configure_args="$ac_configure_args '--with-system-xpdf=$with_system_xpdf'" -elif test "x$with_system_xpdf" = xyes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using installed \`xpdf' headers and library" >&5 -printf "%s\n" "$as_me: Using installed \`xpdf' headers and library" >&6;} -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using \`xpdf' headers and library from TL tree" >&5 -printf "%s\n" "$as_me: Using \`xpdf' headers and library from TL tree" >&6;} - if test "x$with_system_xpdf" != xno; then - with_system_xpdf=no - ac_configure_args="$ac_configure_args '--without-system-xpdf'" - fi -fi - -## libs/mpfr/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/mpfr/ -## configure options and TL libraries required for mpfr - -# Check whether --with-system-mpfr was given. -if test ${with_system_mpfr+y} -then : - withval=$with_system_mpfr; -fi - -# Check whether --with-mpfr-includes was given. -if test ${with_mpfr_includes+y} -then : - withval=$with_mpfr_includes; -fi - -# Check whether --with-mpfr-libdir was given. -if test ${with_mpfr_libdir+y} -then : - withval=$with_mpfr_libdir; -fi -if test "x$with_system_mpfr" = x; then - if test -f $srcdir/libs/mpfr/configure; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`mpfr' headers and library from TL tree" >&5 -printf "%s\n" "$as_me: Assuming \`mpfr' headers and library from TL tree" >&6;} - with_system_mpfr=no - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming installed \`mpfr' headers and library" >&5 -printf "%s\n" "$as_me: Assuming installed \`mpfr' headers and library" >&6;} - with_system_mpfr=yes - fi - ac_configure_args="$ac_configure_args '--with-system-mpfr=$with_system_mpfr'" -elif test "x$with_system_mpfr" = xyes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using installed \`mpfr' headers and library" >&5 -printf "%s\n" "$as_me: Using installed \`mpfr' headers and library" >&6;} -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using \`mpfr' headers and library from TL tree" >&5 -printf "%s\n" "$as_me: Using \`mpfr' headers and library from TL tree" >&6;} - if test "x$with_system_mpfr" != xno; then - with_system_mpfr=no - ac_configure_args="$ac_configure_args '--without-system-mpfr'" - fi -fi -if test "x$with_system_mpfr" = xyes; then - if test "x$with_system_gmp" = x; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -> installed \`gmp' headers and library" >&5 -printf "%s\n" "$as_me: -> installed \`gmp' headers and library" >&6;} - with_system_gmp=yes - ac_configure_args="$ac_configure_args '--with-system-gmp'" - elif test "x$with_system_gmp" != xyes; then - as_fn_error $? "Sorry, \`--with-system-mpfr' requires \`--with-system-gmp'" "$LINENO" 5 - fi -fi - -test "x$need_mpfr" = xyes && { - need_gmp=yes -} - -## libs/gmp/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/gmp/ -## configure options and TL libraries required for gmp - -# Check whether --with-system-gmp was given. -if test ${with_system_gmp+y} -then : - withval=$with_system_gmp; -fi - -# Check whether --with-gmp-includes was given. -if test ${with_gmp_includes+y} -then : - withval=$with_gmp_includes; -fi - -# Check whether --with-gmp-libdir was given. -if test ${with_gmp_libdir+y} -then : - withval=$with_gmp_libdir; -fi -if test "x$with_system_gmp" = x; then - if test -f $srcdir/libs/gmp/configure; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`gmp' headers and library from TL tree" >&5 -printf "%s\n" "$as_me: Assuming \`gmp' headers and library from TL tree" >&6;} - with_system_gmp=no - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming installed \`gmp' headers and library" >&5 -printf "%s\n" "$as_me: Assuming installed \`gmp' headers and library" >&6;} - with_system_gmp=yes - fi - ac_configure_args="$ac_configure_args '--with-system-gmp=$with_system_gmp'" -elif test "x$with_system_gmp" = xyes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using installed \`gmp' headers and library" >&5 -printf "%s\n" "$as_me: Using installed \`gmp' headers and library" >&6;} -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using \`gmp' headers and library from TL tree" >&5 -printf "%s\n" "$as_me: Using \`gmp' headers and library from TL tree" >&6;} - if test "x$with_system_gmp" != xno; then - with_system_gmp=no - ac_configure_args="$ac_configure_args '--without-system-gmp'" - fi -fi - -## libs/cairo/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/cairo/ -## configure options and TL libraries required for cairo - -# Check whether --with-system-cairo was given. -if test ${with_system_cairo+y} -then : - withval=$with_system_cairo; -fi -if test "x$with_system_cairo" = x; then - if test -f $srcdir/libs/cairo/configure; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`cairo' headers and library from TL tree" >&5 -printf "%s\n" "$as_me: Assuming \`cairo' headers and library from TL tree" >&6;} - with_system_cairo=no - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming installed \`cairo' headers and library" >&5 -printf "%s\n" "$as_me: Assuming installed \`cairo' headers and library" >&6;} - with_system_cairo=yes - fi - ac_configure_args="$ac_configure_args '--with-system-cairo=$with_system_cairo'" -elif test "x$with_system_cairo" = xyes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using installed \`cairo' headers and library" >&5 -printf "%s\n" "$as_me: Using installed \`cairo' headers and library" >&6;} -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using \`cairo' headers and library from TL tree" >&5 -printf "%s\n" "$as_me: Using \`cairo' headers and library from TL tree" >&6;} - if test "x$with_system_cairo" != xno; then - with_system_cairo=no - ac_configure_args="$ac_configure_args '--without-system-cairo'" - fi -fi -if test "x$with_system_cairo" = xyes; then - if test "x$with_system_pixman" = x; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -> installed \`pixman' headers and library" >&5 -printf "%s\n" "$as_me: -> installed \`pixman' headers and library" >&6;} - with_system_pixman=yes - ac_configure_args="$ac_configure_args '--with-system-pixman'" - elif test "x$with_system_pixman" != xyes; then - as_fn_error $? "Sorry, \`--with-system-cairo' requires \`--with-system-pixman'" "$LINENO" 5 - fi -fi - -test "x$need_cairo" = xyes && { - need_pixman=yes -} - -## libs/pixman/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/pixman/ -## configure options and TL libraries required for pixman - -# Check whether --with-system-pixman was given. -if test ${with_system_pixman+y} -then : - withval=$with_system_pixman; -fi -if test "x$with_system_pixman" = x; then - if test -f $srcdir/libs/pixman/configure; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`pixman' headers and library from TL tree" >&5 -printf "%s\n" "$as_me: Assuming \`pixman' headers and library from TL tree" >&6;} - with_system_pixman=no - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming installed \`pixman' headers and library" >&5 -printf "%s\n" "$as_me: Assuming installed \`pixman' headers and library" >&6;} - with_system_pixman=yes - fi - ac_configure_args="$ac_configure_args '--with-system-pixman=$with_system_pixman'" -elif test "x$with_system_pixman" = xyes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using installed \`pixman' headers and library" >&5 -printf "%s\n" "$as_me: Using installed \`pixman' headers and library" >&6;} -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using \`pixman' headers and library from TL tree" >&5 -printf "%s\n" "$as_me: Using \`pixman' headers and library from TL tree" >&6;} - if test "x$with_system_pixman" != xno; then - with_system_pixman=no - ac_configure_args="$ac_configure_args '--without-system-pixman'" - fi -fi - -## libs/gd/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/gd/ -## configure options and TL libraries required for gd - -# Check whether --with-system-gd was given. -if test ${with_system_gd+y} -then : - withval=$with_system_gd; -fi - -# Check whether --with-gd-includes was given. -if test ${with_gd_includes+y} -then : - withval=$with_gd_includes; -fi - -# Check whether --with-gd-libdir was given. -if test ${with_gd_libdir+y} -then : - withval=$with_gd_libdir; -fi -if test "x$with_system_gd" = x; then - if test -f $srcdir/libs/gd/configure; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`gd' headers and library from TL tree" >&5 -printf "%s\n" "$as_me: Assuming \`gd' headers and library from TL tree" >&6;} - with_system_gd=no - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming installed \`gd' headers and library" >&5 -printf "%s\n" "$as_me: Assuming installed \`gd' headers and library" >&6;} - with_system_gd=yes - fi - ac_configure_args="$ac_configure_args '--with-system-gd=$with_system_gd'" -elif test "x$with_system_gd" = xyes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using installed \`gd' headers and library" >&5 -printf "%s\n" "$as_me: Using installed \`gd' headers and library" >&6;} -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using \`gd' headers and library from TL tree" >&5 -printf "%s\n" "$as_me: Using \`gd' headers and library from TL tree" >&6;} - if test "x$with_system_gd" != xno; then - with_system_gd=no - ac_configure_args="$ac_configure_args '--without-system-gd'" - fi -fi -if test "x$with_system_gd" = xyes; then - if test "x$with_system_libpng" = x; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -> installed \`libpng' headers and library" >&5 -printf "%s\n" "$as_me: -> installed \`libpng' headers and library" >&6;} - with_system_libpng=yes - ac_configure_args="$ac_configure_args '--with-system-libpng'" - elif test "x$with_system_libpng" != xyes; then - as_fn_error $? "Sorry, \`--with-system-gd' requires \`--with-system-libpng'" "$LINENO" 5 - fi - if test "x$with_system_freetype2" = x; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -> installed \`freetype2' headers and library" >&5 -printf "%s\n" "$as_me: -> installed \`freetype2' headers and library" >&6;} - with_system_freetype2=yes - ac_configure_args="$ac_configure_args '--with-system-freetype2'" - elif test "x$with_system_freetype2" != xyes; then - as_fn_error $? "Sorry, \`--with-system-gd' requires \`--with-system-freetype2'" "$LINENO" 5 - fi -fi - -test "x$need_gd" = xyes && { - need_libpng=yes - need_freetype2=yes -} - -## libs/potrace/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/potrace/ -## configure options and TL libraries required for potrace - -# Check whether --with-system-potrace was given. -if test ${with_system_potrace+y} -then : - withval=$with_system_potrace; -fi - -# Check whether --with-potrace-includes was given. -if test ${with_potrace_includes+y} -then : - withval=$with_potrace_includes; -fi - -# Check whether --with-potrace-libdir was given. -if test ${with_potrace_libdir+y} -then : - withval=$with_potrace_libdir; -fi -if test "x$with_system_potrace" = x; then - if test -f $srcdir/libs/potrace/configure; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`potrace' headers and library from TL tree" >&5 -printf "%s\n" "$as_me: Assuming \`potrace' headers and library from TL tree" >&6;} - with_system_potrace=no - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming installed \`potrace' headers and library" >&5 -printf "%s\n" "$as_me: Assuming installed \`potrace' headers and library" >&6;} - with_system_potrace=yes - fi - ac_configure_args="$ac_configure_args '--with-system-potrace=$with_system_potrace'" -elif test "x$with_system_potrace" = xyes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using installed \`potrace' headers and library" >&5 -printf "%s\n" "$as_me: Using installed \`potrace' headers and library" >&6;} -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using \`potrace' headers and library from TL tree" >&5 -printf "%s\n" "$as_me: Using \`potrace' headers and library from TL tree" >&6;} - if test "x$with_system_potrace" != xno; then - with_system_potrace=no - ac_configure_args="$ac_configure_args '--without-system-potrace'" - fi -fi - -## libs/freetype2/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/freetype2/ -## configure options and TL libraries required for freetype2 - -# Check whether --with-system-freetype2 was given. -if test ${with_system_freetype2+y} -then : - withval=$with_system_freetype2; -fi -if test "x$with_system_freetype2" = x; then - if test -f $srcdir/libs/freetype2/configure; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`freetype2' headers and library from TL tree" >&5 -printf "%s\n" "$as_me: Assuming \`freetype2' headers and library from TL tree" >&6;} - with_system_freetype2=no - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming installed \`freetype2' headers and library" >&5 -printf "%s\n" "$as_me: Assuming installed \`freetype2' headers and library" >&6;} - with_system_freetype2=yes - fi - ac_configure_args="$ac_configure_args '--with-system-freetype2=$with_system_freetype2'" -elif test "x$with_system_freetype2" = xyes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using installed \`freetype2' headers and library" >&5 -printf "%s\n" "$as_me: Using installed \`freetype2' headers and library" >&6;} -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using \`freetype2' headers and library from TL tree" >&5 -printf "%s\n" "$as_me: Using \`freetype2' headers and library from TL tree" >&6;} - if test "x$with_system_freetype2" != xno; then - with_system_freetype2=no - ac_configure_args="$ac_configure_args '--without-system-freetype2'" - fi -fi -if test "x$with_system_freetype2" = xyes; then - if test "x$with_system_zlib" = x; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -> installed \`zlib' headers and library" >&5 -printf "%s\n" "$as_me: -> installed \`zlib' headers and library" >&6;} - with_system_zlib=yes - ac_configure_args="$ac_configure_args '--with-system-zlib'" - elif test "x$with_system_zlib" != xyes; then - as_fn_error $? "Sorry, \`--with-system-freetype2' requires \`--with-system-zlib'" "$LINENO" 5 - fi -fi - -test "x$need_freetype2" = xyes && { - need_zlib=yes -} - ## libs/libpng/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/libpng/ ## configure options and TL libraries required for libpng @@ -7321,49 +5515,6 @@ test "x$need_libpng" = xyes && { need_zlib=yes } -## libs/libpaper/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/libpaper/ -## configure options and TL libraries required for libpaper - -# Check whether --with-system-libpaper was given. -if test ${with_system_libpaper+y} -then : - withval=$with_system_libpaper; -fi - -# Check whether --with-libpaper-includes was given. -if test ${with_libpaper_includes+y} -then : - withval=$with_libpaper_includes; -fi - -# Check whether --with-libpaper-libdir was given. -if test ${with_libpaper_libdir+y} -then : - withval=$with_libpaper_libdir; -fi -if test "x$with_system_libpaper" = x; then - if test -f $srcdir/libs/libpaper/configure; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`libpaper' headers and library from TL tree" >&5 -printf "%s\n" "$as_me: Assuming \`libpaper' headers and library from TL tree" >&6;} - with_system_libpaper=no - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming installed \`libpaper' headers and library" >&5 -printf "%s\n" "$as_me: Assuming installed \`libpaper' headers and library" >&6;} - with_system_libpaper=yes - fi - ac_configure_args="$ac_configure_args '--with-system-libpaper=$with_system_libpaper'" -elif test "x$with_system_libpaper" = xyes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using installed \`libpaper' headers and library" >&5 -printf "%s\n" "$as_me: Using installed \`libpaper' headers and library" >&6;} -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using \`libpaper' headers and library from TL tree" >&5 -printf "%s\n" "$as_me: Using \`libpaper' headers and library from TL tree" >&6;} - if test "x$with_system_libpaper" != xno; then - with_system_libpaper=no - ac_configure_args="$ac_configure_args '--without-system-libpaper'" - fi -fi - ## libs/luajit/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/luajit/ ## configure options and TL libraries required for luajit @@ -7409,55 +5560,10 @@ else printf "%s\n" "$as_me: Using \`zlib' headers and library from TL tree" >&6;} if test "x$with_system_zlib" != xno; then with_system_zlib=no - ac_configure_args="$ac_configure_args '--without-system-zlib'" - fi -fi - - -## texk/ptexenc/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/ptexenc/ -## configure options and TL libraries required for ptexenc - -# Check whether --with-system-ptexenc was given. -if test ${with_system_ptexenc+y} -then : - withval=$with_system_ptexenc; -fi -if test "x$with_system_ptexenc" = x; then - if test -f $srcdir/texk/ptexenc/configure; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`ptexenc' headers and library from TL tree" >&5 -printf "%s\n" "$as_me: Assuming \`ptexenc' headers and library from TL tree" >&6;} - with_system_ptexenc=no - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming installed \`ptexenc' headers and library" >&5 -printf "%s\n" "$as_me: Assuming installed \`ptexenc' headers and library" >&6;} - with_system_ptexenc=yes - fi - ac_configure_args="$ac_configure_args '--with-system-ptexenc=$with_system_ptexenc'" -elif test "x$with_system_ptexenc" = xyes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using installed \`ptexenc' headers and library" >&5 -printf "%s\n" "$as_me: Using installed \`ptexenc' headers and library" >&6;} -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using \`ptexenc' headers and library from TL tree" >&5 -printf "%s\n" "$as_me: Using \`ptexenc' headers and library from TL tree" >&6;} - if test "x$with_system_ptexenc" != xno; then - with_system_ptexenc=no - ac_configure_args="$ac_configure_args '--without-system-ptexenc'" - fi -fi -if test "x$with_system_ptexenc" = xyes; then - if test "x$with_system_kpathsea" = x; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -> installed \`kpathsea' headers and library" >&5 -printf "%s\n" "$as_me: -> installed \`kpathsea' headers and library" >&6;} - with_system_kpathsea=yes - ac_configure_args="$ac_configure_args '--with-system-kpathsea'" - elif test "x$with_system_kpathsea" != xyes; then - as_fn_error $? "Sorry, \`--with-system-ptexenc' requires \`--with-system-kpathsea'" "$LINENO" 5 + ac_configure_args="$ac_configure_args '--without-system-zlib'" fi fi -test "x$need_ptexenc" = xyes && { - need_kpathsea=yes -} ## texk/kpathsea/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/kpathsea/ ## configure options and TL libraries required for kpathsea @@ -22552,12 +20658,6 @@ printf %s "checking for TeX specific libraries to build... " >&6; } echo 'tldbg:_KPSE_RECURSE called: list=texlibs, text=TeX specific libraries, cond=test "x$with_system_[]Kpse_pkg" != xyes && test "x$need_[]Kpse_pkg" = xyes, prefix=texk/.' >&5 MAKE_SUBDIRS= CONF_SUBDIRS= -if test -x $srcdir/texk/ptexenc/configure; then - test "x$with_system_ptexenc" != xyes && test "x$need_ptexenc" = xyes && MAKE_SUBDIRS="texk/ptexenc $MAKE_SUBDIRS" - CONF_SUBDIRS="texk/ptexenc $CONF_SUBDIRS" -else - echo 'tldbg:_KPSE_RECURSE skipping subdir, no (executable) configure: '"$srcdir"'/texk/ptexenc/configure' >&5 -fi if test -x $srcdir/texk/kpathsea/configure; then test "x$with_system_kpathsea" != xyes && test "x$need_kpathsea" = xyes && MAKE_SUBDIRS="texk/kpathsea $MAKE_SUBDIRS" CONF_SUBDIRS="texk/kpathsea $CONF_SUBDIRS" @@ -22705,11 +20805,13 @@ elif test "x$need_PPLIB:$with_system_PPLIB" = xyes:yes; then as_fn_error $? "did not find PPLIB" "$LINENO" 5 fi -if $PKG_CONFIG POTRACE; then - POTRACE_INCLUDES=`$PKG_CONFIG POTRACE --cflags` - POTRACE_LIBS=`$PKG_CONFIG POTRACE --libs` -elif test "x$need_POTRACE:$with_system_POTRACE" = xyes:yes; then - as_fn_error $? "did not find POTRACE" "$LINENO" 5 +##tldbg _KPSE_LIB_FLAGS_SYSTEM: potrace (potrace). +if test "x$with_potrace_includes" != x && test "x$with_potrace_includes" != xyes; then + POTRACE_INCLUDES="-I$with_potrace_includes" +fi +POTRACE_LIBS="-lpotrace" +if test "x$with_potrace_libdir" != x && test "x$with_potrace_libdir" != xyes; then + POTRACE_LIBS="-L$with_potrace_libdir $POTRACE_LIBS" fi ##tldbg _KPSE_LIB_FLAGS_SYSTEM: libpaper (paper). @@ -23138,420 +21240,113 @@ done IFS=$as_save_IFS fi -fi -PKG_CONFIG=$ac_cv_prog_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -printf "%s\n" "$PKG_CONFIG" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_PKG_CONFIG"; then - ac_ct_PKG_CONFIG=$PKG_CONFIG - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_PKG_CONFIG+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_PKG_CONFIG"; then - ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG -if test -n "$ac_ct_PKG_CONFIG"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5 -printf "%s\n" "$ac_ct_PKG_CONFIG" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_PKG_CONFIG" = x; then - PKG_CONFIG="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - PKG_CONFIG=$ac_ct_PKG_CONFIG - fi -else - PKG_CONFIG="$ac_cv_prog_PKG_CONFIG" -fi -if $ICU_CONFIG --version >/dev/null 2>&1; then - ICU_INCLUDES=`$ICU_CONFIG --cppflags` - ICU_LIBS=`$ICU_CONFIG --ldflags-searchpath --ldflags-libsonly --ldflags-system` -elif $PKG_CONFIG --libs icu-uc icu-io >/dev/null 2>&1; then - ICU_INCLUDES=`$PKG_CONFIG --cflags icu-uc icu-io` - ICU_LIBS=`$PKG_CONFIG --libs icu-uc icu-io` -elif test "x$need_icu:$with_system_icu" = xyes:yes; then - as_fn_error $? "did not find either pkg-config or icu-config; one is required for system icu library support" "$LINENO" 5 -fi - -if $PKG_CONFIG harfbuzz; then - HARFBUZZ_INCLUDES=`$PKG_CONFIG harfbuzz --cflags` - HARFBUZZ_LIBS=`$PKG_CONFIG harfbuzz --libs` -elif test "x$need_harfbuzz:$with_system_harfbuzz" = xyes:yes; then - as_fn_error $? "did not find harfbuzz" "$LINENO" 5 -fi - - - - - - -## texk/kpathsea/ac/kpathsea.ac: configure.ac fragment for the TeX Live subdirectory texk/kpathsea/ -## basic check of system kpathsea -if test "x$need_kpathsea:$with_system_kpathsea" = xyes:yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking requested system \`kpathsea' library" >&5 -printf %s "checking requested system \`kpathsea' library... " >&6; } - CPPFLAGS="$KPATHSEA_INCLUDES $CPPFLAGS" - LIBS="$KPATHSEA_LIBS $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <kpathsea/kpathsea.h> -#include <kpathsea/version.h> -int -main (void) -{ -const char *version = kpathsea_version_string; -kpse_set_program_name("prog", "name"); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - syslib_used=yes kpse_res=ok -else $as_nop - syslib_status=no kpse_res=failed -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $kpse_res" >&5 -printf "%s\n" "$kpse_res" >&6; } -fi - -## texk/ptexenc/ac/ptexenc.ac: configure.ac fragment for the TeX Live subdirectory texk/ptexenc/ -## basic check of system ptexenc -if test "x$need_ptexenc:$with_system_ptexenc" = xyes:yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking requested system \`ptexenc' library" >&5 -printf %s "checking requested system \`ptexenc' library... " >&6; } - CPPFLAGS="$PTEXENC_INCLUDES $CPPFLAGS" - LIBS="$PTEXENC_LIBS $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <ptexenc/ptexenc.h> -int -main (void) -{ -const char *version = ptexenc_version_string; -set_enc_string("prog", "name"); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - syslib_used=yes kpse_res=ok -else $as_nop - syslib_status=no kpse_res=failed -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $kpse_res" >&5 -printf "%s\n" "$kpse_res" >&6; } -fi - -## libs/zlib/ac/zlib.ac: configure.ac fragment for the TeX Live subdirectory libs/zlib/ -## basic check of system zlib -if test "x$need_zlib:$with_system_zlib" = xyes:yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking requested system \`zlib' library" >&5 -printf %s "checking requested system \`zlib' library... " >&6; } - CPPFLAGS="$ZLIB_INCLUDES $CPPFLAGS" - LIBS="$ZLIB_LIBS $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <zlib.h> -int -main (void) -{ -z_stream stream; -const char *version = zlibVersion(); -deflate(&stream, 0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - syslib_used=yes kpse_res=ok -else $as_nop - syslib_status=no kpse_res=failed -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $kpse_res" >&5 -printf "%s\n" "$kpse_res" >&6; } -fi - -## libs/libpaper/ac/libpaper.ac: configure.ac fragment for the TeX Live subdirectory libs/libpaper/ -## basic check of system libpaper -if test "x$need_libpaper:$with_system_libpaper" = xyes:yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking requested system \`libpaper' library" >&5 -printf %s "checking requested system \`libpaper' library... " >&6; } - CPPFLAGS="$LIBPAPER_INCLUDES $CPPFLAGS" - LIBS="$LIBPAPER_LIBS $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <paper.h> -int -main (void) -{ -const char *v = defaultpapername(); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - syslib_used=yes kpse_res=ok -else $as_nop - syslib_status=no kpse_res=failed -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $kpse_res" >&5 -printf "%s\n" "$kpse_res" >&6; } -fi - -## libs/libpng/ac/libpng.ac: configure.ac fragment for the TeX Live subdirectory libs/libpng/ -## basic check of system libpng -if test "x$need_libpng:$with_system_libpng" = xyes:yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking requested system \`libpng' library" >&5 -printf %s "checking requested system \`libpng' library... " >&6; } - CPPFLAGS="$LIBPNG_INCLUDES $CPPFLAGS" - LIBS="$LIBPNG_LIBS $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <png.h> -int -main (void) -{ -png_structp png; png_voidp io; png_rw_ptr fn; -png_set_read_fn(png, io, fn); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - syslib_used=yes kpse_res=ok -else $as_nop - syslib_status=no kpse_res=failed -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $kpse_res" >&5 -printf "%s\n" "$kpse_res" >&6; } -fi - -## libs/freetype2/ac/freetype2.ac: configure.ac fragment for the TeX Live subdirectory libs/freetype2/ -## basic check of system freetype2 -if test "x$need_freetype2:$with_system_freetype2" = xyes:yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking requested system \`freetype2' library" >&5 -printf %s "checking requested system \`freetype2' library... " >&6; } - CPPFLAGS="$FREETYPE2_INCLUDES $CPPFLAGS" - LIBS="$FREETYPE2_LIBS $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <ft2build.h> -#include FT_FREETYPE_H -int -main (void) -{ -FT_Library library; FT_Init_FreeType(&library); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - syslib_used=yes kpse_res=ok -else $as_nop - syslib_status=no kpse_res=failed -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $kpse_res" >&5 -printf "%s\n" "$kpse_res" >&6; } -fi - -## libs/potrace/ac/potrace.ac: configure.ac fragment for the TeX Live subdirectory libs/potrace/ -## basic check of system potrace -if test "x$need_potrace:$with_system_potrace" = xyes:yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking requested system \`potrace' library" >&5 -printf %s "checking requested system \`potrace' library... " >&6; } - CPPFLAGS="$POTRACE_INCLUDES $CPPFLAGS" - LIBS="$POTRACE_LIBS $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <potracelib.h> -int -main (void) -{ -potrace_state_t st; -const char *version = potrace_version(); -potrace_state_free(&st); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - syslib_used=yes kpse_res=ok -else $as_nop - syslib_status=no kpse_res=failed -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $kpse_res" >&5 -printf "%s\n" "$kpse_res" >&6; } +fi +PKG_CONFIG=$ac_cv_prog_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +printf "%s\n" "$PKG_CONFIG" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -## libs/gd/ac/gd.ac: configure.ac fragment for the TeX Live subdirectory libs/gd/ -## basic check of system gd -if test "x$need_gd:$with_system_gd" = xyes:yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking requested system \`gd' library" >&5 -printf %s "checking requested system \`gd' library... " >&6; } - CPPFLAGS="$GD_INCLUDES $CPPFLAGS" - LIBS="$GD_LIBS $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <gd.h> -int -main (void) -{ -gdImageCreate(1, 2); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" + +fi +if test -z "$ac_cv_prog_PKG_CONFIG"; then + ac_ct_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_PKG_CONFIG+y} then : - syslib_used=yes kpse_res=ok + printf %s "(cached) " >&6 else $as_nop - syslib_status=no kpse_res=failed + if test -n "$ac_ct_PKG_CONFIG"; then + ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $kpse_res" >&5 -printf "%s\n" "$kpse_res" >&6; } +fi +ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG +if test -n "$ac_ct_PKG_CONFIG"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5 +printf "%s\n" "$ac_ct_PKG_CONFIG" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -## libs/pixman/ac/pixman.ac: configure.ac fragment for the TeX Live subdirectory libs/pixman/ -## basic check of system pixman -if test "x$need_pixman:$with_system_pixman" = xyes:yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking requested system \`pixman' library" >&5 -printf %s "checking requested system \`pixman' library... " >&6; } - CPPFLAGS="$PIXMAN_INCLUDES $CPPFLAGS" - LIBS="$PIXMAN_LIBS $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <pixman.h> -int -main (void) -{ -const char *s = pixman_version_string(); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - syslib_used=yes kpse_res=ok -else $as_nop - syslib_status=no kpse_res=failed + if test "x$ac_ct_PKG_CONFIG" = x; then + PKG_CONFIG="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKG_CONFIG=$ac_ct_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_prog_PKG_CONFIG" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $kpse_res" >&5 -printf "%s\n" "$kpse_res" >&6; } +if $ICU_CONFIG --version >/dev/null 2>&1; then + ICU_INCLUDES=`$ICU_CONFIG --cppflags` + ICU_LIBS=`$ICU_CONFIG --ldflags-searchpath --ldflags-libsonly --ldflags-system` +elif $PKG_CONFIG --libs icu-uc icu-io >/dev/null 2>&1; then + ICU_INCLUDES=`$PKG_CONFIG --cflags icu-uc icu-io` + ICU_LIBS=`$PKG_CONFIG --libs icu-uc icu-io` +elif test "x$need_icu:$with_system_icu" = xyes:yes; then + as_fn_error $? "did not find either pkg-config or icu-config; one is required for system icu library support" "$LINENO" 5 fi -## libs/cairo/ac/cairo.ac: configure.ac fragment for the TeX Live subdirectory libs/cairo/ -## basic check of system cairo -if test "x$need_cairo:$with_system_cairo" = xyes:yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking requested system \`cairo' library" >&5 -printf %s "checking requested system \`cairo' library... " >&6; } - CPPFLAGS="$CAIRO_INCLUDES $CPPFLAGS" - LIBS="$CAIRO_LIBS $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <cairo.h> -int -main (void) -{ -const char *s = cairo_version_string(); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - syslib_used=yes kpse_res=ok -else $as_nop - syslib_status=no kpse_res=failed -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $kpse_res" >&5 -printf "%s\n" "$kpse_res" >&6; } +if $PKG_CONFIG harfbuzz; then + HARFBUZZ_INCLUDES=`$PKG_CONFIG harfbuzz --cflags` + HARFBUZZ_LIBS=`$PKG_CONFIG harfbuzz --libs` +elif test "x$need_harfbuzz:$with_system_harfbuzz" = xyes:yes; then + as_fn_error $? "did not find harfbuzz" "$LINENO" 5 fi -## libs/gmp/ac/gmp.ac: configure.ac fragment for the TeX Live subdirectory libs/gmp/ -## basic check of system gmp -if test "x$need_gmp:$with_system_gmp" = xyes:yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking requested system \`gmp' library" >&5 -printf %s "checking requested system \`gmp' library... " >&6; } - CPPFLAGS="$GMP_INCLUDES $CPPFLAGS" - LIBS="$GMP_LIBS $LIBS" + + + + + +## texk/kpathsea/ac/kpathsea.ac: configure.ac fragment for the TeX Live subdirectory texk/kpathsea/ +## basic check of system kpathsea +if test "x$need_kpathsea:$with_system_kpathsea" = xyes:yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking requested system \`kpathsea' library" >&5 +printf %s "checking requested system \`kpathsea' library... " >&6; } + CPPFLAGS="$KPATHSEA_INCLUDES $CPPFLAGS" + LIBS="$KPATHSEA_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include <gmp.h> +#include <kpathsea/kpathsea.h> +#include <kpathsea/version.h> int main (void) { -const char *s = gmp_version; +const char *version = kpathsea_version_string; +kpse_set_program_name("prog", "name"); ; return 0; } @@ -23568,20 +21363,22 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ printf "%s\n" "$kpse_res" >&6; } fi -## libs/mpfr/ac/mpfr.ac: configure.ac fragment for the TeX Live subdirectory libs/mpfr/ -## basic check of system mpfr -if test "x$need_mpfr:$with_system_mpfr" = xyes:yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking requested system \`mpfr' library" >&5 -printf %s "checking requested system \`mpfr' library... " >&6; } - CPPFLAGS="$MPFR_INCLUDES $CPPFLAGS" - LIBS="$MPFR_LIBS $LIBS" +## libs/zlib/ac/zlib.ac: configure.ac fragment for the TeX Live subdirectory libs/zlib/ +## basic check of system zlib +if test "x$need_zlib:$with_system_zlib" = xyes:yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking requested system \`zlib' library" >&5 +printf %s "checking requested system \`zlib' library... " >&6; } + CPPFLAGS="$ZLIB_INCLUDES $CPPFLAGS" + LIBS="$ZLIB_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include <mpfr.h> +#include <zlib.h> int main (void) { -const char *s = mpfr_get_version(); +z_stream stream; +const char *version = zlibVersion(); +deflate(&stream, 0); ; return 0; } @@ -23598,31 +21395,26 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ printf "%s\n" "$kpse_res" >&6; } fi -## libs/xpdf/ac/xpdf.ac: configure.ac fragment for the TeX Live subdirectory libs/xpdf/ -## basic check of system xpdf (a.k.a. poppler, no longer supported in -## TL sources) -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test "x$need_xpdf:$with_system_xpdf" = xyes:yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking requested system \`xpdf' library" >&5 -printf %s "checking requested system \`xpdf' library... " >&6; } - CPPFLAGS="$XPDF_INCLUDES $CPPFLAGS" - LIBS="$XPDF_LIBS $LIBS" +## libs/libpng/ac/libpng.ac: configure.ac fragment for the TeX Live subdirectory libs/libpng/ +## basic check of system libpng +if test "x$need_libpng:$with_system_libpng" = xyes:yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking requested system \`libpng' library" >&5 +printf %s "checking requested system \`libpng' library... " >&6; } + CPPFLAGS="$LIBPNG_INCLUDES $CPPFLAGS" + LIBS="$LIBPNG_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include <GfxFont.h> +#include <png.h> int main (void) { -GfxFont *gfxFont; gfxFont->decRefCnt(); +png_structp png; png_voidp io; png_rw_ptr fn; +png_set_read_fn(png, io, fn); ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" +if ac_fn_c_try_link "$LINENO" then : syslib_used=yes kpse_res=ok else $as_nop @@ -23633,11 +21425,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $kpse_res" >&5 printf "%s\n" "$kpse_res" >&6; } fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu ## libs/zziplib/ac/zziplib.ac: configure.ac fragment for the TeX Live subdirectory libs/zziplib/ ## basic check of system zziplib @@ -23700,87 +21487,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ printf "%s\n" "$kpse_res" >&6; } fi -## libs/teckit/ac/teckit.ac: configure.ac fragment for the TeX Live subdirectory libs/teckit/ -## basic check of system teckit -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test "x$need_teckit:$with_system_teckit" = xyes:yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking requested system \`teckit' library" >&5 -printf %s "checking requested system \`teckit' library... " >&6; } - CPPFLAGS="$TECKIT_INCLUDES $CPPFLAGS" - LIBS="$TECKIT_LIBS $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <teckit/TECkit_Engine.h> -int -main (void) -{ -TECkit_Converter converter; TECkit_DisposeConverter(converter); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : - syslib_used=yes kpse_res=ok -else $as_nop - syslib_status=no kpse_res=failed -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $kpse_res" >&5 -printf "%s\n" "$kpse_res" >&6; } -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -## libs/icu/ac/icu.ac: configure.ac fragment for the TeX Live subdirectory libs/icu/ -## basic check of system icu -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test "x$need_icu:$with_system_icu" = xyes:yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking requested system \`icu' library" >&5 -printf %s "checking requested system \`icu' library... " >&6; } - CPPFLAGS="$ICU_INCLUDES $CPPFLAGS" - LIBS="$ICU_LIBS $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <unicode/ustring.h> -int -main (void) -{ -UErrorCode code; const UChar *src; UChar *dst; -u_strToLower(dst, -1, src, -1, NULL, &code); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : - syslib_used=yes kpse_res=ok -else $as_nop - syslib_status=no kpse_res=failed -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $kpse_res" >&5 -printf "%s\n" "$kpse_res" >&6; } -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - ## libs/harfbuzz/ac/harfbuzz.ac: configure.ac fragment for the TeX Live subdirectory libs/harfbuzz/ ## basic check of system harfbuzz if test "x$need_harfbuzz:$with_system_harfbuzz" = xyes:yes; then @@ -26430,11 +24136,11 @@ msg_compiling="$msg_compiling test "x$srcdir" = x. || msg_compiling="$msg_compiling from sources in $kpse_src" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: -** Configuration summary for $PACKAGE_STRING (2023/dev$with_banner_add): +** Configuration summary for $PACKAGE_STRING (2023$with_banner_add): $msg_compiling" >&5 printf "%s\n" " -** Configuration summary for $PACKAGE_STRING (2023/dev$with_banner_add): +** Configuration summary for $PACKAGE_STRING (2023$with_banner_add): $msg_compiling" >&6; } case $kpse_src$kpse_bld in diff --git a/source/doc/build-tools.txt b/source/doc/build-tools.txt index f1dbc8fc8d0777957d0ba354e42a46289bedca34..1765f87433c7a565043e814666c1491cfdd54e7c 100644 --- a/source/doc/build-tools.txt +++ b/source/doc/build-tools.txt @@ -2,6 +2,6 @@ autoconf (GNU Autoconf) 2.71 automake (GNU automake) 1.16.5 bison (GNU Bison) 3.8.2 flex 2.6.0 -ltmain.sh (GNU libtool) 2.4.6 +ltmain.sh (GNU libtool) 2.4.7 m4 (GNU M4) 1.4.19 -makeinfo (GNU texinfo) 6.7 +makeinfo (GNU texinfo) 7.0.2 diff --git a/source/doc/tlbuild.info b/source/doc/tlbuild.info index c273c1b874d31473b7b712e771446fa69afa3c8e..89b4ae36582da7702e2c3b2549379908920403ff 100644 --- a/source/doc/tlbuild.info +++ b/source/doc/tlbuild.info @@ -1,10 +1,10 @@ -This is tlbuild.info, produced by makeinfo version 5.1 from +This is tlbuild.info, produced by makeinfo version 7.0.2 from tlbuild.texi. This file documents the TeX Live build system and more. -Copyright (C) 2016-2022 Karl Berry. -Copyright (C) 2013-2015 Karl Berry & Peter Breitenlohner. +Copyright © 2016–2023 Karl Berry. +Copyright © 2013–2015 Karl Berry & Peter Breitenlohner. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are @@ -33,7 +33,7 @@ END-INFO-DIR-ENTRY File: tlbuild.info, Node: Top, Next: Introduction, Up: (dir) -Building TeX Live (2022) +Building TeX Live (2023) ************************ For an overview of this manual, *note Introduction::. @@ -59,17 +59,18 @@ File: tlbuild.info, Node: Introduction, Next: Overview of build system, Prev: 1 Introduction ************** -This manual (dated May 2022) corresponds to the TeX Live 2022 release. +This manual (dated February 2023) corresponds to the TeX Live 2023 +release. This manual is aimed at system installers and programmers, and focuses on how to configure, build, and develop the TeX Live (TL) sources. It is also available as plain text files in the source tree: -'source/README.*'. +‘source/README.*’. - The main 'source/README' file in the TL source tree provides + The main ‘source/README’ file in the TL source tree provides maximally-terse information for doing a build, and portability information for different systems, along with -'source/doc/README.solaris'. +‘source/doc/README.solaris’. For information on acquiring the TL sources, see <https://tug.org/texlive/svn>. The canonical source repository uses @@ -78,27 +79,27 @@ Subversion, and we have no plans to change this. This manual does not duplicate the information found in other TL documentation resources, such as: - * The TeX Live web pages: <https://tug.org/texlive>. + • The TeX Live web pages: <https://tug.org/texlive>. - * The web page describing how to build the binaries which are + • The web page describing how to build the binaries which are distributed with TeX Live: <https://tug.org/texlive/build.html>. - * The TeX Live user manual: <https://tug.org/texlive/doc.html>, or - run 'texdoc texlive'. + • The TeX Live user manual: <https://tug.org/texlive/doc.html>, or + run ‘texdoc texlive’. - * Other TeX-related Texinfo manuals (*note (web2c)::, *note + • Other TeX-related Texinfo manuals (*note (web2c)::, *note (kpathsea)::, etc.): <https://tug.org/texinfohtml/>, or check the - 'TeX' category in the GNU Info system. + ‘TeX’ category in the GNU Info system. - * Package documentation: - <https://tug.org/texlive/Contents/live/doc.html>, or the 'doc.html' + • Package documentation: + <https://tug.org/texlive/Contents/live/doc.html>, or the ‘doc.html’ file at the top level of the installed TL. - As an exception, the full documentation for 'install-tl' and 'tlmgr' + As an exception, the full documentation for ‘install-tl’ and ‘tlmgr’ is included here as appendices, simply because it is easy to do so. The same text is available online (linked from <https://tug.org/texlive/doc.html>, or by invoking the program with -'--help' (or look at the end of the source). +‘--help’ (or look at the end of the source). File: tlbuild.info, Node: Overview of build system, Next: Prerequisites, Prev: Introduction, Up: Top @@ -108,34 +109,34 @@ File: tlbuild.info, Node: Overview of build system, Next: Prerequisites, Prev The TeX Live build system was redesigned in 2009 to consistently use Autoconf, Automake, and Libtool. Thus, running - 'configure && make && make check && make install' -or the essentially-equivalent top-level 'Build' script suffices to build -and install the TL programs. The 'make check' clause performs various -tests of the generated programs--not strictly required but strongly -recommended. Running 'configure --help' will display a comprehensive -list of all 'configure' options. + ‘configure && make && make check && make install’ +or the essentially-equivalent top-level ‘Build’ script suffices to build +and install the TL programs. The ‘make check’ clause performs various +tests of the generated programs—not strictly required but strongly +recommended. Running ‘configure --help’ will display a comprehensive +list of all ‘configure’ options. The main components of the TL build system are: -'libs/LIB' +‘libs/LIB’ Generic libraries. -'texk/LIB' - TeX-specific libraries in subdirectories, notably LIB='kpathsea'. - (The other one is 'texk/ptexenc'.) +‘texk/LIB’ + TeX-specific libraries in subdirectories, notably LIB=‘kpathsea’. + (The other one is ‘texk/ptexenc’.) -'texk/PROG' +‘texk/PROG’ TeX-specific programs (that use Kpathsea). -'utils/PROG' - Other programs (that don't use Kpathsea). +‘utils/PROG’ + Other programs (that don’t use Kpathsea). The primary design goal of the build system is modularity. Each program and library module (or package) specifies its own requirements and properties, such as required libraries, whether an installed -(system) version of a library can be used, 'configure' options to be +(system) version of a library can be used, ‘configure’ options to be seen at the top level, and more. An explicit list of all available -modules is kept in a single central place: 'm4/kpse-pkgs.m4'. +modules is kept in a single central place: ‘m4/kpse-pkgs.m4’. A second, related goal is to configure and build each library before configuring any other (program or library) module which uses that @@ -158,78 +159,78 @@ File: tlbuild.info, Node: Prerequisites, Next: Building, Prev: Overview of bu *************** Overall, building the TeX Live programs, when using all libraries from -the TL source tree, requires C and C++11 compilers, GNU 'make', and +the TL source tree, requires C and C++11 compilers, GNU ‘make’, and Python. - * If 'make' from your 'PATH' is not GNU 'make', you can set the - 'MAKE' environment variable to whatever is necessary. + • If ‘make’ from your ‘PATH’ is not GNU ‘make’, you can set the + ‘MAKE’ environment variable to whatever is necessary. - GNU 'make' is required only because of third-party libraries, + GNU ‘make’ is required only because of third-party libraries, notably FreeType. Automake/Autoconf output in general, and the - TL-maintained directories, work with any reasonable 'make'.(1) + TL-maintained directories, work with any reasonable ‘make’.(1) - * A C++11 compiler is similarly required because of the third-party - libraries ICU and HarfBuzz (at least); the program 'dvisvgm' also + • A C++11 compiler is similarly required because of the third-party + libraries ICU and HarfBuzz (at least); the program ‘dvisvgm’ also requires C++11. It is possible to build what remains with older compilers, but you have to remove the C++11-dependent sources. *Note Build one package::. - * Python is required by ICU tests. (If you know how to disable these + • Python is required by ICU tests. (If you know how to disable these tests and thus eliminate the requirement, please write.) A few programs in the tree have additional requirements: -'web2c' - requires 'perl' for some tests run by 'make check'. Incidentally, - the TeX Live installer ('install-tl') and manager ('tlmgr') are +‘web2c’ + requires ‘perl’ for some tests run by ‘make check’. Incidentally, + the TeX Live installer (‘install-tl’) and manager (‘tlmgr’) are also written in Perl, but this does not matter for compiling the sources. -'xdvik' -'xpdfopen' +‘xdvik’ +‘xpdfopen’ require X11 headers and libraries, typically in devel(opment) packages that are not installed by default. -'xetex' - requires 'fontconfig' (again both headers and library), or, for - MacOS only, the 'ApplicationServices' and 'Cocoa' frameworks. +‘xetex’ + requires ‘fontconfig’ (again both headers and library), or, for + MacOS only, the ‘ApplicationServices’ and ‘Cocoa’ frameworks. -'xindy' - requires GNU 'clisp', 'libsigsegv', and 'libiconv'; additionally, - to build the rules and/or documentation: 'perl', 'latex', - 'pdflatex'. +‘xindy’ + requires GNU ‘clisp’, ‘libsigsegv’, and ‘libiconv’; additionally, + to build the rules and/or documentation: ‘perl’, ‘latex’, + ‘pdflatex’. Lacking the required tools, building these programs must avoided, e.g., -'configure --without-x --disable-xetex --disable-xindy' +‘configure --without-x --disable-xetex --disable-xindy’ Modifying source files induces more requirements, as one might expect: - * Modification of any '.y' or '.l' source files requires 'bison' or - 'flex' to update the corresponding C sources. + • Modification of any ‘.y’ or ‘.l’ source files requires ‘bison’ or + ‘flex’ to update the corresponding C sources. - * Modification of the sources for '.info' files requires 'makeinfo'. + • Modification of the sources for ‘.info’ files requires ‘makeinfo’. - * Modification of any part of the build system (M4 macros, - 'configure.ac', 'Makefile.am', or their fragments) requires GNU M4, + • Modification of any part of the build system (M4 macros, + ‘configure.ac’, ‘Makefile.am’, or their fragments) requires GNU M4, GNU Autoconf, GNU Automake, and GNU Libtool to update the generated files. Furthermore, to reliably reproduce the build files, the original GNU releases of these tools must be used, not any distro packaging of them. *Note Build system tools::, for more discussion. - If you haven't modified any source files, and infrastructure tools -such as 'autoconf' or 'makeinfo' are still being run, check your -timestamps--notably, 'use-commit-times' must be set to 'yes' in your + If you haven’t modified any source files, and infrastructure tools +such as ‘autoconf’ or ‘makeinfo’ are still being run, check your +timestamps—notably, ‘use-commit-times’ must be set to ‘yes’ in your Subversion configuration (*note Build system tools::). No infrastructure tools are needed to do a normal build (barring bugs). ---------- Footnotes ---------- - (1) There is one exception in TL: the 'tangle-sh' and related rules -use '$@' to mean the target name, a feature not present in all 'make's. -This could be alleviated by laborious editing, but since there's no way -to avoid GNU 'make' for builds of the entire tree, it does not seem + (1) There is one exception in TL: the ‘tangle-sh’ and related rules +use ‘$@’ to mean the target name, a feature not present in all ‘make’s. +This could be alleviated by laborious editing, but since there’s no way +to avoid GNU ‘make’ for builds of the entire tree, it does not seem worth the trouble. @@ -238,25 +239,25 @@ File: tlbuild.info, Node: Building, Next: Installing, Prev: Prerequisites, U 4 Building ********** -The top-level 'Build' script is intended to simplify building the -binaries distributed with TeX Live itself--we call this the "native" TL -build. It runs 'configure && make world', which builds everything in a -subdirectory of the main source tree (default 'Work/'), installs -everything in another subdirectory (default 'inst/'), and finally runs -'make check'. The exact directory and command names can be specified +The top-level ‘Build’ script is intended to simplify building the +binaries distributed with TeX Live itself—we call this the “native†TL +build. It runs ‘configure && make world’, which builds everything in a +subdirectory of the main source tree (default ‘Work/’), installs +everything in another subdirectory (default ‘inst/’), and finally runs +‘make check’. The exact directory and command names can be specified via environment variables and a few leading options. All remaining -arguments (assignments or options) are passed to the 'configure' script. -Please take a look at the './Build' source file for more information; it +arguments (assignments or options) are passed to the ‘configure’ script. +Please take a look at the ‘./Build’ source file for more information; it is a straightforward shell script. An alternative, and the one we will mainly discuss here, is to run -'configure' and 'make' in a suitable empty subdirectory. Building in +‘configure’ and ‘make’ in a suitable empty subdirectory. Building in the source directory itself is not supported (sorry). * Menu: -* Build iteration:: What 'configure' and 'make' do in TL. -* Build in parallel:: Simultaneous 'make' processes. +* Build iteration:: What ‘configure’ and ‘make’ do in TL. +* Build in parallel:: Simultaneous ‘make’ processes. * Build distribution:: Making a distribution tarball. * Build one package:: Example of working on just one program. * Build one engine:: Example of building just one TeX engine. @@ -268,22 +269,22 @@ File: tlbuild.info, Node: Build iteration, Next: Build in parallel, Up: Build 4.1 Build iteration =================== -Running the top-level 'configure' script configures the top level and -the subdirectories 'libs', 'utils', and 'texk'. Running 'make' at the +Running the top-level ‘configure’ script configures the top level and +the subdirectories ‘libs’, ‘utils’, and ‘texk’. Running ‘make’ at the top level first iterates over the TeX-specific libraries, and then runs -'make' in 'libs', 'utils', and 'texk' to iterate over the generic +‘make’ in ‘libs’, ‘utils’, and ‘texk’ to iterate over the generic libraries, utility programs, and TeX-specific programs, respectively. These iterations consist of two steps: 1. For each library or program module not yet configured, run - 'configure', adding the configure option '--disable-build' if the - module need not be built, otherwise running 'make all'. + ‘configure’, adding the configure option ‘--disable-build’ if the + module need not be built, otherwise running ‘make all’. - 2. For each library or program module that must be built, run 'make' - for the selected target(s): 'default' or 'all' to (re-)build, - 'check' to run tests, 'install', etc. + 2. For each library or program module that must be built, run ‘make’ + for the selected target(s): ‘default’ or ‘all’ to (re-)build, + ‘check’ to run tests, ‘install’, etc. - Running the top-level 'make' a second time iterates again over all + Running the top-level ‘make’ a second time iterates again over all the library and program modules, and finds (should find) nothing to be done. @@ -293,14 +294,14 @@ File: tlbuild.info, Node: Build in parallel, Next: Build distribution, Prev: 4.2 Build in parallel ===================== -The TL build system carefully formulates dependencies as well as 'make' -rules when a tool (such as 'tangle', 'ctangle', and 'convert') creates -several output files. This allows for parallel builds ('make -j N' with -N>1 or even 'make -j') that can considerably speed up the TL build. +The TL build system carefully formulates dependencies as well as ‘make’ +rules when a tool (such as ‘tangle’, ‘ctangle’, and ‘convert’) creates +several output files. This allows for parallel builds (‘make -j N’ with +N>1 or even ‘make -j’) that can considerably speed up the TL build. Incidentally, a noticeable speed-up can be independently gained by -using a configure cache file, i.e., specifying the 'configure' option -'-C' (recommended). +using a configure cache file, i.e., specifying the ‘configure’ option +‘-C’ (recommended). File: tlbuild.info, Node: Build distribution, Next: Build one package, Prev: Build in parallel, Up: Building @@ -308,9 +309,9 @@ File: tlbuild.info, Node: Build distribution, Next: Build one package, Prev: 4.3 Build distribution ====================== -Running 'make dist' at the top level creates a tarball -'tex-live-YYYY-MM-DD.tar.xz' from the TL source tree. Running 'make -distcheck' also verifies that this tarball suffices to build and install +Running ‘make dist’ at the top level creates a tarball +‘tex-live-YYYY-MM-DD.tar.xz’ from the TL source tree. Running ‘make +distcheck’ also verifies that this tarball suffices to build and install all of TL. This is useful for checking consistency of the source tree and @@ -324,14 +325,14 @@ File: tlbuild.info, Node: Build one package, Next: Build one engine, Prev: Bu 4.4 Build one package ===================== -To build one package, the basic idea is to use the 'configure' option -'--disable-all-pkgs' (*note '--disable-all-pkgs'::). Then all program -and library modules are configured but none are made. However, the -'Makefile's still contain all build rules and dependencies and can be +To build one package, the basic idea is to use the ‘configure’ option +‘--disable-all-pkgs’ (*note --disable-all-pkgs::). Then all program and +library modules are configured but none are made. However, the +‘Makefile’s still contain all build rules and dependencies and can be invoked to build an individual program or library, first building any required libraries. - Here is an example from start to finish for working on 'dvipdfm-x'. + Here is an example from start to finish for working on ‘dvipdfm-x’. Unfortunately, this does not suffice for building the TeX engines; see the next section. @@ -362,20 +363,20 @@ the next section. TEXMFCNF=$TEXMFROOT/texmf-dist/web2c \ ./xdvipdfmx ... - Then you can modify source files in 'mydir/texk/dvipdfm-x' and rerun -'make' in 'mydir/Work/texk/dvipdfm-x' to rebuild; that build directory + Then you can modify source files in ‘mydir/texk/dvipdfm-x’ and rerun +‘make’ in ‘mydir/Work/texk/dvipdfm-x’ to rebuild; that build directory is where the binary ends up and where you can run a debugger, etc. - The second line of the 'configure' invocation shows examples of extra + The second line of the ‘configure’ invocation shows examples of extra things you likely want to specify if you intend to hack the sources (and -not just build binaries): the '-C' speeds 'configure' by enabling a -cache file, and the 'CFLAGS' and 'CXXFLAGS' settings eliminate compiler +not just build binaries): the ‘-C’ speeds ‘configure’ by enabling a +cache file, and the ‘CFLAGS’ and ‘CXXFLAGS’ settings eliminate compiler optimization for debugging purposes. Of course, you need to actually look at the output and check that -things are working. There are many 'configure' options you can tweak as -desired; check the output from 'configure --help'. It is also a good -idea to run 'make check' after making any changes, to ensure that +things are working. There are many ‘configure’ options you can tweak as +desired; check the output from ‘configure --help’. It is also a good +idea to run ‘make check’ after making any changes, to ensure that whatever tests have been written still pass. Reducing source download size @@ -385,48 +386,48 @@ The above retrieves the entire TL source tree (several hundred megabytes). It is natural to ask if this is really necessary. Strictly speaking, the answer is no, but it is vastly more convenient to do so. If you cut down the source tree, you must also give additional -'configure' flags to individually disable using system versions of -libraries, or the intricacies of the dependencies (such as 'teckit' -requiring 'zlib') will have undesired side effects. For an example of -this approach, see the 'build-pdftex.sh' script in the 'pdftex' +‘configure’ flags to individually disable using system versions of +libraries, or the intricacies of the dependencies (such as ‘teckit’ +requiring ‘zlib’) will have undesired side effects. For an example of +this approach, see the ‘build-pdftex.sh’ script in the ‘pdftex’ development source (details at <http://pdftex.org>), which is indeed such a cut-down TL source tree. GCC used by default ................... -By default, the 'gcc' compilers will be used if present; otherwise, +By default, the ‘gcc’ compilers will be used if present; otherwise, individual packages may use something different. You can explicitly -specify the compilers to be used with the environment variables 'CC', -'CXX', and 'OBJCXX'. +specify the compilers to be used with the environment variables ‘CC’, +‘CXX’, and ‘OBJCXX’. Removing C+11 dependency ........................ Some libraries and programs require C++11; one such is XeTeX. If you want to build with an older compiler lacking such support, you need to -(re)move those source directories; unfortunately, specifying '--disable' -for them does not suffice. It's also necessary to specify -'--disable-xetex' explicitly. Specifically, before running 'configure ---disable-xetex ...': +(re)move those source directories; unfortunately, specifying ‘--disable’ +for them does not suffice. It’s also necessary to specify +‘--disable-xetex’ explicitly. Specifically, before running ‘configure +--disable-xetex ...’: rm -rf libs/icu libs/graphite2 texk/dvisvgm texk/web2c/xetexdir - Also, even with '--disable-all-pkgs', dependencies are (currently) + Also, even with ‘--disable-all-pkgs’, dependencies are (currently) checked. One notable case: if a (non-MacOS) system does not have -'fontconfig', XeTeX cannot be built (*note Prerequisites::), and -'configure' will terminate even with '--disable-xetex'. To proceed -without such dependencies, specify '--enable-missing' also. +‘fontconfig’, XeTeX cannot be built (*note Prerequisites::), and +‘configure’ will terminate even with ‘--disable-xetex’. To proceed +without such dependencies, specify ‘--enable-missing’ also. As of 2022, HarfBuzz also requires C++11. Therefore even more would -have to be disabled and removed, notably including 'luahbtex', the +have to be disabled and removed, notably including ‘luahbtex’, the standard engine used for LuaLaTeX. Removing that would not be acceptable for builds intended for distribution; but perhaps for testing the above information could still be useful. - In general, the TL 'configure' will run in all directories. + In general, the TL ‘configure’ will run in all directories. Therefore a general workaround for build problems is to remove failing -directories from the tree, and also specify the relevant '--disable-...' +directories from the tree, and also specify the relevant ‘--disable-...’ option(s). Patches to improve all this would be most welcome. @@ -454,45 +455,45 @@ original TeX: cd texk/web2c # cd engine build directory make tex # must specify target - The first 'make' run will configure everything, and even build the + The first ‘make’ run will configure everything, and even build the libraries, even though the packages are disabled. The source tree can be cut down to just what is needed for the given engine (the separate pdfTeX and LuaTeX source repositories do this, for example), but see caveats in previous section. When the -'--disable-xetex' and '--enable-missing' options are needed is also +‘--disable-xetex’ and ‘--enable-missing’ options are needed is also explained in the previous section. If you want to debug an X-related program or shared library setup, or -other variants, change the 'configure' options accordingly. Either -'../Build' or '../configure' can be run. +other variants, change the ‘configure’ options accordingly. Either +‘../Build’ or ‘../configure’ can be run. - Then it is necessary to again specify the target engine ('tex', in -the above) in the 'make'. + Then it is necessary to again specify the target engine (‘tex’, in +the above) in the ‘make’. All these complications are rather unfortunate. Patches are welcome. Testing one engine .................. -To run only the tests for a given engine, say 'hitex': +To run only the tests for a given engine, say ‘hitex’: make -C $ww check SUBDIRS=. TESTS='$(hitex_tests)' -where '$ww' is the web2c build directory, that is, -'ww=/wherever/Build/source/Work/texk/web2c'. +where ‘$ww’ is the web2c build directory, that is, +‘ww=/wherever/Build/source/Work/texk/web2c’. - It's also possible to run individual tests the same way, using the -test name exactly as specified in the '.am' file: + It’s also possible to run individual tests the same way, using the +test name exactly as specified in the ‘.am’ file: make -C $ww check SUBDIRS=. TESTS=hitexdir/tests/hello.test - If you get tired of looking at the 'Entering'/'Leaving directory' -lines, you can add the (GNU) make option '--no-print-dir'. + If you get tired of looking at the ‘Entering’/‘Leaving directory’ +lines, you can add the (GNU) make option ‘--no-print-dir’. You may find it useful to put lengthy incantations like this into a -trivial shell script with a short name (say, 'hitst'). Then you just -run 'hitst' and edit the file when necessary to change things around. +trivial shell script with a short name (say, ‘hitst’). Then you just +run ‘hitst’ and edit the file when necessary to change things around. File: tlbuild.info, Node: Cross compilation, Prev: Build one engine, Up: Building @@ -500,21 +501,21 @@ File: tlbuild.info, Node: Cross compilation, Prev: Build one engine, Up: Buil 4.6 Cross compilation ===================== -In a cross compilation a "build" system is used to create binaries to be -executed on a "host" system with different hardware and/or operating +In a cross compilation a “build†system is used to create binaries to be +executed on a “host†system with different hardware and/or operating system. In simple cases, the build system can execute binaries for the host system. This typically occurs for bi-arch systems where, e.g., -'i386-linux' binaries can run on 'x86_64-linux' systems and 'win32' -binaries can run on 'win64' systems. Although sometimes called "native -cross", technically this is not cross compilation at all. In most such +‘i386-linux’ binaries can run on ‘x86_64-linux’ systems and ‘win32’ +binaries can run on ‘win64’ systems. Although sometimes called “native +crossâ€, technically this is not cross compilation at all. In most such cases it suffices to specify suitable compiler flags. It might be -useful to add the configure option '--build=HOST' to get the correct -canonical host name, but note that this should _not_ be '--host=HOST' +useful to add the configure option ‘--build=HOST’ to get the correct +canonical host name, but note that this should _not_ be ‘--host=HOST’ (*note (autoconf)Hosts and Cross-Compilation::). - In order to build, e.g., 32-bit binaries with 'clang' on a 64-bit + In order to build, e.g., 32-bit binaries with ‘clang’ on a 64-bit MacOS system one could use: TL_BUILD_ENV="CC='clang -arch i386' \ @@ -535,13 +536,13 @@ File: tlbuild.info, Node: Cross configuring, Next: Cross problems, Up: Cross In a standard cross compilation, binaries for the host system cannot execute on the build system and it is necessary to specify the configure -options '--host=HOST' and '--build=BUILD' with two different values. +options ‘--host=HOST’ and ‘--build=BUILD’ with two different values. - Building binaries requires suitable "cross" tools, e.g., compiler, -linker, and archiver, and perhaps a "cross" version of 'pkg-config' and + Building binaries requires suitable “cross†tools, e.g., compiler, +linker, and archiver, and perhaps a “cross†version of ‘pkg-config’ and similar to locate host system libraries. Autoconf expects that these cross tools are given by their usual variables or found under their -usual name prefixed with 'HOST-'. Here a list of such tools and +usual name prefixed with ‘HOST-’. Here a list of such tools and corresponding variables: ar AR @@ -554,8 +555,8 @@ corresponding variables: ranlib RANLIB strip STRIP -In order to, e.g., build 'mingw32' binaries on 'x86_64-linux' with a -cross compiler found as 'i386-pc-mingw32-gcc' one would specify +In order to, e.g., build ‘mingw32’ binaries on ‘x86_64-linux’ with a +cross compiler found as ‘i386-pc-mingw32-gcc’ one would specify --host=i386-pc-mingw32 --build=x86_64-linux-gnu @@ -563,9 +564,9 @@ or perhaps --host=mingw32 --build=x86_64-linux CC=i386-pc-mingw32-gcc -but this latter, especially, might require adding 'CXX' and others. +but this latter, especially, might require adding ‘CXX’ and others. - Configure arguments such as 'CFLAGS=...' refer to the cross compiler. + Configure arguments such as ‘CFLAGS=...’ refer to the cross compiler. If necessary, you can specify compilers and flags for the few auxiliary C and C++ programs required for the build process as configure arguments @@ -585,31 +586,31 @@ File: tlbuild.info, Node: Cross problems, Prev: Cross configuring, Up: Cross The fact that binaries for the host system cannot be executed on the build system causes some problems. - One problem is that configure tests using 'AC_RUN_IFELSE' can compile + One problem is that configure tests using ‘AC_RUN_IFELSE’ can compile and link the test program but cannot execute it. Such tests should be avoided if possible and otherwise must supply a pessimistic test result. Another problem arises if the build process must execute some (auxiliary or installable) programs. Auxiliary programs can be placed into a subdirectory that is configured natively as is done for -'texk/web2c/web2c', 'texk/dvipsk/squeeze', and 'texk/xdvik/squeeze'. -The module 'libs/freetype2' uses the value of 'CC_BUILD', 'BUILD-gcc', -'gcc', or 'cc' as the compiler for the auxiliary program. +‘texk/web2c/web2c’, ‘texk/dvipsk/squeeze’, and ‘texk/xdvik/squeeze’. +The module ‘libs/freetype2’ uses the value of ‘CC_BUILD’, ‘BUILD-gcc’, +‘gcc’, or ‘cc’ as the compiler for the auxiliary program. The situation for installable programs needed by the build process is somewhat different. A rather expensive possibility, chosen for the ICU -libraries in module 'libs/icu', is to first compile natively for the +libraries in module ‘libs/icu’, is to first compile natively for the build system and in a second step to use these (uninstalled) programs during the cross compilation. - This approach would also be possible for the tools such as 'tangle' -used in the module 'texk/web2c' to build the WEB programs, but that -would require first building a native 'kpathsea' library. To avoid this + This approach would also be possible for the tools such as ‘tangle’ +used in the module ‘texk/web2c’ to build the WEB programs, but that +would require first building a native ‘kpathsea’ library. To avoid this complication, cross compilation of programs written in (C)WEB requires -sufficiently recent installed versions of 'tangle', 'ctangle', -'otangle', and 'tie'. +sufficiently recent installed versions of ‘tangle’, ‘ctangle’, +‘otangle’, and ‘tie’. - Building 'xindy' requires running the host system 'clisp' binary, + Building ‘xindy’ requires running the host system ‘clisp’ binary, thus cross compilation is painful, but possible. @@ -618,22 +619,22 @@ File: tlbuild.info, Node: Installing, Next: Layout and infrastructure, Prev: 5 Installing ************ -This section discusses the results of 'make install' in the source tree. +This section discusses the results of ‘make install’ in the source tree. - The main consideration is that 'make install' is not enough to make a + The main consideration is that ‘make install’ is not enough to make a usable TeX installation. Beyond the compiled binaries, (thousands of) -support files are needed; just as a first example, 'plain.tex' is not in +support files are needed; just as a first example, ‘plain.tex’ is not in the source tree. These support files are maintained completely independently and are not present in the TL source tree. The best basis for dealing with them -is the TeX Live (plain text) database in 'Master/tlpkg/texlive.tlpdb', -and/or the TeX Live installer, 'install-tl'. More information is under -'Master/tlpkg' and at <https://tug.org/texlive/distro.html>. +is the TeX Live (plain text) database in ‘Master/tlpkg/texlive.tlpdb’, +and/or the TeX Live installer, ‘install-tl’. More information is under +‘Master/tlpkg’ and at <https://tug.org/texlive/distro.html>. * Menu: -* Installation directories:: The prefix, 'bindir', etc., directories. +* Installation directories:: The prefix, ‘bindir’, etc., directories. * Linked scripts:: Scripts not maintained in the sources. * Distro builds:: Configuring and building for OS distributions. @@ -643,15 +644,15 @@ File: tlbuild.info, Node: Installation directories, Next: Linked scripts, Up: 5.1 Installation directories ============================ -Running 'make install' (or 'make install-strip') installs executables in -'BINDIR', libraries in 'LIBDIR', headers in 'INCLUDEDIR', general data -(including "linked scripts", *note Linked scripts::) in -'DATAROOTDIR/texmf-dist', man pages in 'MANDIR', and Info files in -'INFODIR'. +Running ‘make install’ (or ‘make install-strip’) installs executables in +‘BINDIR’, libraries in ‘LIBDIR’, headers in ‘INCLUDEDIR’, general data +(including “linked scriptsâ€, *note Linked scripts::) in +‘DATAROOTDIR/texmf-dist’, man pages in ‘MANDIR’, and Info files in +‘INFODIR’. - The values of these directories are determined by 'configure' and can -be specified explicitly as options such as '--prefix=PREFIX' or -'--bindir=BINDIR'; otherwise, they are given by their usual Autoconf + The values of these directories are determined by ‘configure’ and can +be specified explicitly as options such as ‘--prefix=PREFIX’ or +‘--bindir=BINDIR’; otherwise, they are given by their usual Autoconf defaults: PREFIX /usr/local @@ -665,22 +666,22 @@ defaults: except possibly modified as follows: - * If the option '--enable-multiplatform' is given, '/PLATFORM' (i.e., - the canonical platform name) is appended to 'BINDIR' and 'LIBDIR'. + • If the option ‘--enable-multiplatform’ is given, ‘/PLATFORM’ (i.e., + the canonical platform name) is appended to ‘BINDIR’ and ‘LIBDIR’. This is implied for a native TL build. - * In a native TL build, 'DATAROOTDIR' is set to 'PREFIX', 'INFODIR' - is set to 'PREFIX/texmf-dist/doc/info', and 'MANDIR' to - 'PREFIX/texmf-dist/doc/man', corresponding to the directories used + • In a native TL build, ‘DATAROOTDIR’ is set to ‘PREFIX’, ‘INFODIR’ + is set to ‘PREFIX/texmf-dist/doc/info’, and ‘MANDIR’ to + ‘PREFIX/texmf-dist/doc/man’, corresponding to the directories used in the TL distribution. -The top-level 'configure' script displays all these installation paths. +The top-level ‘configure’ script displays all these installation paths. - For the native TL build, the 'Build' script leaves the binaries in -'./inst/bin/STD-SYSTEM-TRIPLET'. The new binaries are not directly + For the native TL build, the ‘Build’ script leaves the binaries in +‘./inst/bin/STD-SYSTEM-TRIPLET’. The new binaries are not directly usable from that location; they need to be copied to -'Master/bin/TL-PLATFORM'. The other files and directories that end up -in './inst/' are ignored. +‘Master/bin/TL-PLATFORM’. The other files and directories that end up +in ‘./inst/’ are ignored. File: tlbuild.info, Node: Linked scripts, Next: Distro builds, Prev: Installation directories, Up: Installing @@ -691,26 +692,26 @@ File: tlbuild.info, Node: Linked scripts, Next: Distro builds, Prev: Installa Quite a few executables are architecture-independent shell, Perl, or other interpreted scripts, rather than compiled binaries. A few are maintained as part of the TL source tree, but most are maintained -elsewhere with copies under 'texk/texlive/linked_scripts'. +elsewhere with copies under ‘texk/texlive/linked_scripts’. - These so-called "linked scripts" are installed under -'DATAROOTDIR/texmf-dist/scripts'; for Unix-like systems a symbolic link -is made in 'BINDIR'. For example, a symlink points from 'BINDIR/ps2eps' -to 'DATAROOTDIR/texmf-dist/scripts/ps2eps/ps2eps.pl'. For Windows, a -standard wrapper binary (copied to, e.g., 'BINDIR/ps2eps.exe') serves + These so-called “linked scripts†are installed under +‘DATAROOTDIR/texmf-dist/scripts’; for Unix-like systems a symbolic link +is made in ‘BINDIR’. For example, a symlink points from ‘BINDIR/ps2eps’ +to ‘DATAROOTDIR/texmf-dist/scripts/ps2eps/ps2eps.pl’. For Windows, a +standard wrapper binary (copied to, e.g., ‘BINDIR/ps2eps.exe’) serves the same purpose. The source for the wrapper is in -'texk/texlive/w32_wrapper'. +‘texk/texlive/w32_wrapper’. One reason for this is to avoid having many copies of the same script; a more important reason is that it guarantees the scripts will stay in sync across the different supported operating systems. - Most important of all, we want the 'BINDIR' resulting from the build + Most important of all, we want the ‘BINDIR’ resulting from the build to be as close as possible to what is in the TL distribution. At -present, there are a few exceptions--Asymptote, Biber, Xindy--and each -one creates considerable extra work. We don't want to add more. (See +present, there are a few exceptions—Asymptote, Biber, Xindy—and each one +creates considerable extra work. We don’t want to add more. (See <https://tug.org/texlive/build.html> for information about building -those exceptions, as well as the 'xz' and 'wget' programs that are used +those exceptions, as well as the ‘xz’ and ‘wget’ programs that are used in the TL infrastructure.) @@ -721,50 +722,50 @@ File: tlbuild.info, Node: Distro builds, Prev: Linked scripts, Up: Installing Although they use the same code base, building for the native TL distribution as shipped by the TeX user groups is typically quite -different from a "distro" build needed by, e.g., a full GNU/Linux or BSD +different from a “distro†build needed by, e.g., a full GNU/Linux or BSD operating system distribution. The native TL distribution uses shared libraries only when absolutely -necessary ('libc', 'libm', X11 libraries, and 'libfontconfig'). In +necessary (‘libc’, ‘libm’, X11 libraries, and ‘libfontconfig’). In contrast, a distro typically wants to use as many shared libraries as possible from elsewhere on the system, including TeX-specific libraries -such as 'libkpathsea' (even though Kpathsea has never officially been +such as ‘libkpathsea’ (even though Kpathsea has never officially been released as a shared library). In addition, the installation paths will, in general, be completely different. - Here are the 'configure' options that distro builds are likely to + Here are the ‘configure’ options that distro builds are likely to find most relevant: -'--disable-native-texlive-build' +‘--disable-native-texlive-build’ This must be specified to avoid interference from the many tweaks we do for the native TL build. -'--with-banner-add=/SOMEDISTRO' - This isn't technically required, but is strongly recommended, so +‘--with-banner-add=/SOMEDISTRO’ + This isn’t technically required, but is strongly recommended, so your build and your distro can be distinguished from others. -'--enable-shared' +‘--enable-shared’ Build shared versions of the TeX-specific libraries (uses - 'libtool'). + ‘libtool’). -'--disable-static' +‘--disable-static’ Do not build the static versions of the TeX-specific libraries. -'--with-system-LIB' - Look for and use a system version of the library LIB. 'configure - --help' will give you the list of possibilities. +‘--with-system-LIB’ + Look for and use a system version of the library LIB. ‘configure + --help’ will give you the list of possibilities. -'--with-LIB-includes=DIR' -'--with-LIB-libdir=DIR' +‘--with-LIB-includes=DIR’ +‘--with-LIB-libdir=DIR’ If needed, allows you to specify where the headers/code are for the given library LIB. -'--prefix=/usr' -'--prefix=/opt/TeXLive' - Or whatever your convention is. The default is '/usr/local' and - you shouldn't install there for a distro. +‘--prefix=/usr’ +‘--prefix=/opt/TeXLive’ + Or whatever your convention is. The default is ‘/usr/local’ and + you shouldn’t install there for a distro. -'--libdir=\${exec_prefix}/lib64' +‘--libdir=\${exec_prefix}/lib64’ May be needed for 64-bit bi-architecture (GNU/Linux) systems. You will need to take care of the support files mentioned above @@ -781,9 +782,9 @@ File: tlbuild.info, Node: Layout and infrastructure, Next: Configure options, 6 Layout and infrastructure *************************** -The TeX Live source tree is the subtree rooted at 'Build/source' of the +The TeX Live source tree is the subtree rooted at ‘Build/source’ of the complete TL distribution and contains the sources for all executables -distributed by TL, as well as 'configure' scripts and 'make' rules to +distributed by TL, as well as ‘configure’ scripts and ‘make’ rules to build and install them together with some of their support files. * Menu: @@ -803,15 +804,15 @@ File: tlbuild.info, Node: Build system tools, Next: Top-level directories, Up As mentioned above (*note Prerequisites::), a normal build has few requirements. On the other hand, if you want to modify the TeX Live -infrastructure sources, such as 'configure.ac' or 'Makefile.am' files, +infrastructure sources, such as ‘configure.ac’ or ‘Makefile.am’ files, you will need to have several additional tools installed. In general, the TL build system uses the latest released versions of the GNU build tools, installed directly from the original GNU releases -(e.g., by building them with 'configure --prefix=/usr/local/gnu' and -having 'PATH' start with '/usr/local/gnu/bin'). We have found that +(e.g., by building them with ‘configure --prefix=/usr/local/gnu’ and +having ‘PATH’ start with ‘/usr/local/gnu/bin’). We have found that trying to use the versions of these tools packaged for distros causes -many extra hassles, so don't do that, tempting as it may be. +many extra hassles, so don’t do that, tempting as it may be. Currently the versions we use are: @@ -819,30 +820,30 @@ many extra hassles, so don't do that, tempting as it may be. automake (GNU automake) 1.16.5 bison (GNU Bison) 3.8.2 flex 2.6.0 - ltmain.sh (GNU libtool) 2.4.6 + ltmain.sh (GNU libtool) 2.4.7 m4 (GNU M4) 1.4.19 - makeinfo (GNU texinfo) 6.7 + makeinfo (GNU texinfo) 7.0.2 These versions should be used to update the generated files (e.g., -'configure' or 'Makefile.in') in all or parts of the TL tree after their +‘configure’ or ‘Makefile.in’) in all or parts of the TL tree after their dependencies have been changed. This can be done explicitly with the -top-level 'reautoconf' script or implicitly by using the configure -option '--enable-maintainer-mode'. +top-level ‘reautoconf’ script or implicitly by using the configure +option ‘--enable-maintainer-mode’. It has often turned out that the bison and flex versions are not -critical; however, the autotools versions are. If you don't have the +critical; however, the autotools versions are. If you don’t have the given versions, get them before modifying the build infrastructure. The files in the Subversion repository (see <https://tug.org/texlive/svn>) are all up to date (barring bugs). For this to be reflected by their timestamps in your checkout, be sure to -set 'use-commit-times=yes' in '~/.subversion/config' or the equivalent. +set ‘use-commit-times=yes’ in ‘~/.subversion/config’ or the equivalent. If timestamps are wrong, you may also be able to avoid unnecessary -runs of 'bison', 'flex', or 'makeinfo' with 'touch' of the generated -('.c', '.h', or '.info') files. With '--enable-maintainer-mode' it may -also be necessary to 'touch' first 'aclocal.m4', then 'configure' and -'config.h.in' (or 'c-auto.in'), and finally all 'Makefile.in' files. +runs of ‘bison’, ‘flex’, or ‘makeinfo’ with ‘touch’ of the generated +(‘.c’, ‘.h’, or ‘.info’) files. With ‘--enable-maintainer-mode’ it may +also be necessary to ‘touch’ first ‘aclocal.m4’, then ‘configure’ and +‘config.h.in’ (or ‘c-auto.in’), and finally all ‘Makefile.in’ files. File: tlbuild.info, Node: Top-level directories, Next: Autoconf macros, Prev: Build system tools, Up: Layout and infrastructure @@ -854,39 +855,39 @@ Here is a brief description of the top-level directories in the TeX Live source tree. As mentioned at the beginning of *note Overview of build system::, -the main source directories are 'texk/' (TeX-specific programs and -libraries), 'utils/' (additional programs), and 'libs/' (generic +the main source directories are ‘texk/’ (TeX-specific programs and +libraries), ‘utils/’ (additional programs), and ‘libs/’ (generic libraries). - In addition, the top-level directories 'am/' and 'm4/' contain -'Makefile.am' fragments and Autoconf macros, respectively, used in many -places. Specifically, the file 'm4/kpse-pkgs.m4' contains lists of all + In addition, the top-level directories ‘am/’ and ‘m4/’ contain +‘Makefile.am’ fragments and Autoconf macros, respectively, used in many +places. Specifically, the file ‘m4/kpse-pkgs.m4’ contains lists of all program and library modules; missing modules are silently ignored. (This helps in creating cut-down source trees.) Each module contributes fragments (in separate files) defining its -capabilities and requirements to the 'configure.ac' scripts at the -top-level and in the subdirectories 'libs', 'utils', and 'texk'. The -fragments from program modules supply 'configure' options to disable or +capabilities and requirements to the ‘configure.ac’ scripts at the +top-level and in the subdirectories ‘libs’, ‘utils’, and ‘texk’. The +fragments from program modules supply ‘configure’ options to disable or enable building them; those from library modules specify if an installed (system) version of that library can be used. This ultimately -determines which modules need to be built--although all modules must be -configured for the benefit of 'make' targets such as 'dist' or -'distcheck'. +determines which modules need to be built—although all modules must be +configured for the benefit of ‘make’ targets such as ‘dist’ or +‘distcheck’. - The top-level 'build-aux/' directory contains the common files -'compile', 'config.guess', 'config.sub', 'depcomp', etc. used by most + The top-level ‘build-aux/’ directory contains the common files +‘compile’, ‘config.guess’, ‘config.sub’, ‘depcomp’, etc. used by most packages. These are taken from the GNU Gnulib sources (<https://www.gnu.org/software/gnulib>), which in turn synchronizes with any ultimate upstream repository. There are independent copies of some of these in a few other places, e.g., -'libs/freetype2/freetype-*/builds/unix/'. The 'reautoconf' script does +‘libs/freetype2/freetype-*/builds/unix/’. The ‘reautoconf’ script does not touch those, but a TL cron job keeps them in sync (nightly). - When the top-level './Build' script is used to build TL, two more two -more top-level directories appear: 'Work/' for the build tree, and -'inst/' for the install tree (from 'make install'). These names (and -everything else about 'Build''s operation) can be changed by setting + When the top-level ‘./Build’ script is used to build TL, two more two +more top-level directories appear: ‘Work/’ for the build tree, and +‘inst/’ for the install tree (from ‘make install’). These names (and +everything else about ‘Build’’s operation) can be changed by setting environment variables before running it; see the script source. @@ -896,9 +897,9 @@ File: tlbuild.info, Node: Autoconf macros, Next: Library modules, Prev: Top-l =================== Here we describe a few of the Autoconf macros used in several -modules--many more are defined in the sources; see the top-level 'm4/' +modules—many more are defined in the sources; see the top-level ‘m4/’ directory. These general macros are supplemented by module-specific -macros in directories such as 'texk/dvipng/m4/'; some of those are +macros in directories such as ‘texk/dvipng/m4/’; some of those are described in following sections (*note Library modules:: and *note Program modules::). @@ -921,18 +922,18 @@ The TL sources use two general setup macros: -- Macro: KPSE_BASIC (NAME, [MORE-OPTIONS]) Initialize the basic TL infrastructure for module NAME: - 'AM_INIT_AUTOMAKE([foreign MORE-OPTIONS])' - 'AM_MAINTAINER_MODE' - 'KPSE_COMPILER_WARNINGS' + ‘AM_INIT_AUTOMAKE([foreign MORE-OPTIONS])’ + ‘AM_MAINTAINER_MODE’ + ‘KPSE_COMPILER_WARNINGS’ and make sure the C compiler understands function prototypes. This is used for all generic library and program modules. -- Macro: KPSE_COMMON (NAME, [MORE-OPTIONS]) - Like 'KPSE_BASIC' but add: - 'LT_PREREQ([2.2.6])' - 'LT_INIT([win32-dll])' - 'AC_SYS_LARGEFILE' - 'AC_FUNC_FSEEKO' + Like ‘KPSE_BASIC’ but add: + ‘LT_PREREQ([2.2.6])’ + ‘LT_INIT([win32-dll])’ + ‘AC_SYS_LARGEFILE’ + ‘AC_FUNC_FSEEKO’ along with checks for frequently used functions, headers, types, and structures. This is used for TeX-specific modules. @@ -945,20 +946,20 @@ File: tlbuild.info, Node: Macros for programs, Next: Macros for compilers, Pr Macros for program checks: -- Macro: KPSE_CHECK_LATEX - Set 'LATEX' to the first of 'latex', 'elatex', or 'lambda' which - exists in 'PATH', or to 'no' if none of them exists. Call - 'AC_SUBST' for 'LATEX'. The result of this test can be overridden - by setting the 'LATEX' environment variable or the cache variable - 'ac_cv_prog_LATEX'. + Set ‘LATEX’ to the first of ‘latex’, ‘elatex’, or ‘lambda’ which + exists in ‘PATH’, or to ‘no’ if none of them exists. Call + ‘AC_SUBST’ for ‘LATEX’. The result of this test can be overridden + by setting the ‘LATEX’ environment variable or the cache variable + ‘ac_cv_prog_LATEX’. -- Macro: KPSE_CHECK_PDFLATEX - Check for 'pdflatex' in 'PATH' and set 'PDFLATEX'. + Check for ‘pdflatex’ in ‘PATH’ and set ‘PDFLATEX’. -- Macro: KPSE_CHECK_PERL - Check for 'perl' or 'perl5' in 'PATH' and set 'PERL'. + Check for ‘perl’ or ‘perl5’ in ‘PATH’ and set ‘PERL’. -- Macro: KPSE_PROG_LEX - Call 'AC_PROG_LEX' and add the flag '-l' for 'flex'. + Call ‘AC_PROG_LEX’ and add the flag ‘-l’ for ‘flex’. File: tlbuild.info, Node: Macros for compilers, Next: Macros for libraries, Prev: Macros for programs, Up: Autoconf macros @@ -970,30 +971,30 @@ Macros for compiler-related checks: -- Macro: KPSE_COMPILER_WARNINGS When using the (Objective) C/C++ compiler, set - 'WARNING_[OBJ]C[XX]FLAGS' to suitable warning flags (depending on - the value given to or implied for '--enable-compiler-warnings'). - Call 'AC_SUBST' for them. At present this assumes GNU compiler + ‘WARNING_[OBJ]C[XX]FLAGS’ to suitable warning flags (depending on + the value given to or implied for ‘--enable-compiler-warnings’). + Call ‘AC_SUBST’ for them. At present this assumes GNU compiler warning options, but could be extended to others if necessary. - This macro caches its results in the 'kpse_cv_warning_cflags', ... + This macro caches its results in the ‘kpse_cv_warning_cflags’, ... variables. -- Macro: KPSE_COMPILER_VISIBILITY When using the C or C++ compiler, try to set - 'VISIBILITY_C[XX]FLAGS' to flags to hide external symbols. Call - 'AC_SUBST' for this variable. At present this only tests for the - compiler option '-fvisibility=hidden', but could be extended if + ‘VISIBILITY_C[XX]FLAGS’ to flags to hide external symbols. Call + ‘AC_SUBST’ for this variable. At present this only tests for the + compiler option ‘-fvisibility=hidden’, but could be extended if necessary. - This macro caches its results in the 'kpse_cv_visibility_cflags' or - 'kpse_cv_visibility_cxxflags' variable. + This macro caches its results in the ‘kpse_cv_visibility_cflags’ or + ‘kpse_cv_visibility_cxxflags’ variable. -- Macro: KPSE_CXX_HACK - Provide the configure option '--enable-cxx-runtime-hack'. If - enabled and when using 'g++', try to statically link with - 'libstdc++', notably improving portability of the resulting binary. + Provide the configure option ‘--enable-cxx-runtime-hack’. If + enabled and when using ‘g++’, try to statically link with + ‘libstdc++’, notably improving portability of the resulting binary. - This macro caches its result in the 'kpse_cv_cxx_hack' variable. + This macro caches its result in the ‘kpse_cv_cxx_hack’ variable. File: tlbuild.info, Node: Macros for libraries, Next: Macros for library and header flags, Prev: Macros for compilers, Up: Autoconf macros @@ -1004,8 +1005,8 @@ File: tlbuild.info, Node: Macros for libraries, Next: Macros for library and h One macro for a library check: -- Macro: KPSE_LARGEFILE (VARIABLE, [EXTRA-DEFINE]) - Call 'AC_SYS_LARGEFILE' and 'AC_FUNC_FSEEKO' and append suitable - '-D' flags (optionally including '-DEXTRA-DEFINE') to VARIABLE. + Call ‘AC_SYS_LARGEFILE’ and ‘AC_FUNC_FSEEKO’ and append suitable + ‘-D’ flags (optionally including ‘-DEXTRA-DEFINE’) to VARIABLE. File: tlbuild.info, Node: Macros for library and header flags, Next: Macros for Windows, Prev: Macros for libraries, Up: Autoconf macros @@ -1013,33 +1014,33 @@ File: tlbuild.info, Node: Macros for library and header flags, Next: Macros fo 6.3.5 Macros for library and header flags ----------------------------------------- -Each library module 'libs/LIB' or 'texk/LIB' is supplemented by a macro -'KPSE_LIB_FLAGS' (all uppercase) that provides make variables for that -library. E.g., for 'libs/libpng': +Each library module ‘libs/LIB’ or ‘texk/LIB’ is supplemented by a macro +‘KPSE_LIB_FLAGS’ (all uppercase) that provides make variables for that +library. E.g., for ‘libs/libpng’: -- Macro: KPSE_LIBPNG_FLAGS - Provide the configure option '--with-system-libpng'. Set and - 'AC_SUBST' 'make' variables for modules using this library (either + Provide the configure option ‘--with-system-libpng’. Set and + ‘AC_SUBST’ ‘make’ variables for modules using this library (either an installed version or from the TeX Live tree): - 'LIBPNG_INCLUDES' for use in 'CPPFLAGS', - 'LIBPNG_LIBS' for use in 'LDADD', - 'LIBPNG_DEPEND' for use as a Makefile dependency, - 'LIBPNG_RULE' for the 'make' rules to rebuild the library. + ‘LIBPNG_INCLUDES’ for use in ‘CPPFLAGS’, + ‘LIBPNG_LIBS’ for use in ‘LDADD’, + ‘LIBPNG_DEPEND’ for use as a Makefile dependency, + ‘LIBPNG_RULE’ for the ‘make’ rules to rebuild the library. -- Macro: KPSE_ADD_FLAGS (NAME) - Temporarily extend 'CPPFLAGS' and 'LIBS' with the values required - for the library module 'NAME'. + Temporarily extend ‘CPPFLAGS’ and ‘LIBS’ with the values required + for the library module ‘NAME’. -- Macro: KPSE_RESTORE_FLAGS - Restore 'CPPFLAGS' and 'LIBS' to their original values. + Restore ‘CPPFLAGS’ and ‘LIBS’ to their original values. - As an example, the 'configure.ac' file for a hypothetical program -'utils/foo' using 'libpng', and hence 'zlib', would contain + As an example, the ‘configure.ac’ file for a hypothetical program +‘utils/foo’ using ‘libpng’, and hence ‘zlib’, would contain KPSE_ZLIB_FLAGS KPSE_LIBPNG_FLAGS -and its 'Makefile.am' would be along these lines: +and its ‘Makefile.am’ would be along these lines: bin_PROGRAMS = foo AM_CPPFLAGS = ${LIBPNG_INCLUDES} ${ZLIB_INCLUDES} foo_LDADD = ${LIBPNG_LIBS} ${ZLIB_LIBS} @@ -1049,13 +1050,13 @@ and its 'Makefile.am' would be along these lines: ## Rebuild libpng @LIBPNG_RULE@ - If it were necessary to examine whether certain 'zlib' or 'libpng' -features were available, 'configure.ac' should be continued this way: + If it were necessary to examine whether certain ‘zlib’ or ‘libpng’ +features were available, ‘configure.ac’ should be continued this way: KPSE_ADD_FLAGS([zlib]) - ... # tests for 'zlib' features, if any + ... # tests for ‘zlib’ features, if any KPSE_ADD_FLAGS([libpng]) - ... # tests for 'libpng' features - KPSE_RESTORE_FLAGS # restore 'CPPFLAGS' and 'LIBS' + ... # tests for ‘libpng’ features + KPSE_RESTORE_FLAGS # restore ‘CPPFLAGS’ and ‘LIBS’ File: tlbuild.info, Node: Macros for Windows, Prev: Macros for library and header flags, Up: Autoconf macros @@ -1067,33 +1068,33 @@ Windows differs in several aspects from Unix-like systems, many of them due to the lack of symbolic links. -- Macro: KPSE_CHECK_WIN32 - Check if compiling for a Windows system. The result is either 'no' - for Unix-like systems (including Cygwin), 'mingw32' for Windows - with GCC, or 'native' for Windows with MSVC. The result is cached - in the 'kpse_cv_have_win32' variable. + Check if compiling for a Windows system. The result is either ‘no’ + for Unix-like systems (including Cygwin), ‘mingw32’ for Windows + with GCC, or ‘native’ for Windows with MSVC. The result is cached + in the ‘kpse_cv_have_win32’ variable. -- Macro: KPSE_COND_WIN32 - Call 'KPSE_CHECK_WIN32' and define the Automake conditional 'WIN32' - ('true' if the value of 'kpse_cv_have_win32' is not 'no'). + Call ‘KPSE_CHECK_WIN32’ and define the Automake conditional ‘WIN32’ + (‘true’ if the value of ‘kpse_cv_have_win32’ is not ‘no’). -- Macro: KPSE_COND_MINGW32 - Call 'KPSE_COND_WIN32' and define the Automake conditional - 'MINGW32' ('true' if the value of 'kpse_cv_have_win32' is - 'mingw32'). + Call ‘KPSE_COND_WIN32’ and define the Automake conditional + ‘MINGW32’ (‘true’ if the value of ‘kpse_cv_have_win32’ is + ‘mingw32’). -- Macro: KPSE_COND_WIN32_WRAP - Call 'KPSE_COND_WIN32' and define the Automake conditional - 'WIN32_WRAP' ('true' if the standard Windows wrapper - ('texk/texlive/w32_wrapper/runscript.exe') exists. This wrapper is - used on Windows instead of symlinks for the "linked scripts" (*note + Call ‘KPSE_COND_WIN32’ and define the Automake conditional + ‘WIN32_WRAP’ (‘true’ if the standard Windows wrapper + (‘texk/texlive/w32_wrapper/runscript.exe’) exists. This wrapper is + used on Windows instead of symlinks for the “linked scripts†(*note Linked scripts::). -- Macro: KPSE_WIN32_CALL - Call 'KPSE_COND_WIN32' and check if the file - 'texk/texlive/w32_wrapper/callexe.c' exists; if it does, create a - symlink in the build tree. Compiling 'callexe.c' with - '-DEXEPROG='"FOO.exe"'' and installing 'callexe.exe' as 'BAR.exe' - is used on Windows instead of a symlink 'BAR->FOO' for Unix-like + Call ‘KPSE_COND_WIN32’ and check if the file + ‘texk/texlive/w32_wrapper/callexe.c’ exists; if it does, create a + symlink in the build tree. Compiling ‘callexe.c’ with + ‘-DEXEPROG='"FOO.exe"'’ and installing ‘callexe.exe’ as ‘BAR.exe’ + is used on Windows instead of a symlink ‘BAR->FOO’ for Unix-like systems. @@ -1108,27 +1109,27 @@ structure and variation. * Menu: -* 'png' library:: 'libs/libpng' -* 'zlib' library:: 'libs/zlib' -* 'freetype' library:: 'libs/freetype2' -* 'kpathsea' library:: 'texk/kpathsea' +* png library:: ‘libs/libpng’ +* zlib library:: ‘libs/zlib’ +* freetype library:: ‘libs/freetype2’ +* kpathsea library:: ‘texk/kpathsea’ -File: tlbuild.info, Node: 'png' library, Next: 'zlib' library, Up: Library modules +File: tlbuild.info, Node: png library, Next: zlib library, Up: Library modules -6.4.1 The 'png' library in 'libs/libpng' +6.4.1 The ‘png’ library in ‘libs/libpng’ ---------------------------------------- -The "generic" 'png' library uses the source tree in the subdirectory -'libpng-src/', with all modifications for TL recorded in 'TLpatches/*'. -The 'configure.ac' fragment 'ac/withenable.ac' contains +The “generic†‘png’ library uses the source tree in the subdirectory +‘libpng-src/’, with all modifications for TL recorded in ‘TLpatches/*’. +The ‘configure.ac’ fragment ‘ac/withenable.ac’ contains KPSE_WITH_LIB([libpng], [zlib]) -to specify the module name and indicate the dependency on 'zlib'. A -third literal argument ''tree'' would specify that the library from the +to specify the module name and indicate the dependency on ‘zlib’. A +third literal argument ‘‘tree’’ would specify that the library from the TeX Live tree cannot be replaced by a system version. That not being -the case here, a second fragment 'ac/libpng.ac' contains +the case here, a second fragment ‘ac/libpng.ac’ contains KPSE_TRY_LIB([libpng], [#include <png.h>], @@ -1144,85 +1145,85 @@ thus providing the simple C code return 0; } which Autoconf uses to verify the usability of a system version with C -code. The analogous macro 'KPSE_TRY_LIBXX' would check using C++. -These fragments are included by the 'configure.ac' at the top level of -TL ('Build/source/configure.ac'). +code. The analogous macro ‘KPSE_TRY_LIBXX’ would check using C++. +These fragments are included by the ‘configure.ac’ at the top level of +TL (‘Build/source/configure.ac’). For this library, like many other modules, a proxy build system for -TL is used, consisting of our own 'configure.ac', 'Makefile.am', -'include/Makefile.am'; the distributed build system is not used. +TL is used, consisting of our own ‘configure.ac’, ‘Makefile.am’, +‘include/Makefile.am’; the distributed build system is not used. (Consequently, a few generated files and auxiliary scripts are removed from the distributed source tree.) - The public headers 'png.h', 'pngconf.h', and 'pnglibconf.h' are -"installed" (as symlinks) under 'include/' in the build tree exactly as -they are for a system version under, e.g., '/usr/include/'. + The public headers ‘png.h’, ‘pngconf.h’, and ‘pnglibconf.h’ are +“installed†(as symlinks) under ‘include/’ in the build tree exactly as +they are for a system version under, e.g., ‘/usr/include/’. - The module is supplemented by the file 'm4/kpse-libpng-flags.m4' that -defines the M4 macro 'KPSE_LIBPNG_FLAGS' used by all modules depending -on this library in their 'configure.ac' to generate the 'make' variables -'LIBPNG_INCLUDES' for use in 'CPPFLAGS', 'LIBPNG_LIBS' for use in -'LDADD', 'LIBPNG_DEPEND' for use as dependencies, and 'LIBPNG_RULE' for -the 'make' rules to rebuild the library. + The module is supplemented by the file ‘m4/kpse-libpng-flags.m4’ that +defines the M4 macro ‘KPSE_LIBPNG_FLAGS’ used by all modules depending +on this library in their ‘configure.ac’ to generate the ‘make’ variables +‘LIBPNG_INCLUDES’ for use in ‘CPPFLAGS’, ‘LIBPNG_LIBS’ for use in +‘LDADD’, ‘LIBPNG_DEPEND’ for use as dependencies, and ‘LIBPNG_RULE’ for +the ‘make’ rules to rebuild the library. - 'm4/kpse-libpng-flags.m4' also supplies the configure option -'--with-system-libpng', which then uses 'pkg-config' to determine the + ‘m4/kpse-libpng-flags.m4’ also supplies the configure option +‘--with-system-libpng’, which then uses ‘pkg-config’ to determine the flags required for the system library. -File: tlbuild.info, Node: 'zlib' library, Next: 'freetype' library, Prev: 'png' library, Up: Library modules +File: tlbuild.info, Node: zlib library, Next: freetype library, Prev: png library, Up: Library modules -6.4.2 The 'zlib' library in 'libs/zlib' +6.4.2 The ‘zlib’ library in ‘libs/zlib’ --------------------------------------- -This generic library is very much analogous to 'libpng', but without the -dependency on any other library. The file 'm4/kpse-zlib-flags.m4' -supplies the configure option '--with-system-zlib', as well as -'--with-zlib-includes' and '--with-zlib-libdir' to specify non-standard -locations of the 'zlib' headers and/or library. +This generic library is very much analogous to ‘libpng’, but without the +dependency on any other library. The file ‘m4/kpse-zlib-flags.m4’ +supplies the configure option ‘--with-system-zlib’, as well as +‘--with-zlib-includes’ and ‘--with-zlib-libdir’ to specify non-standard +locations of the ‘zlib’ headers and/or library. -File: tlbuild.info, Node: 'freetype' library, Next: 'kpathsea' library, Prev: 'zlib' library, Up: Library modules +File: tlbuild.info, Node: freetype library, Next: kpathsea library, Prev: zlib library, Up: Library modules -6.4.3 The 'freetype' library in 'libs/freetype2' +6.4.3 The ‘freetype’ library in ‘libs/freetype2’ ------------------------------------------------ This module uses a wrapper build system. In contrast to the proxy build described earlier, the wrapper build has an almost trivial -'configure.ac' and a 'Makefile.am' which invokes the 'configure' and -'make' in the distributed source, followed by 'make install' with the TL +‘configure.ac’ and a ‘Makefile.am’ which invokes the ‘configure’ and +‘make’ in the distributed source, followed by ‘make install’ with the TL build tree as destination. In other words, this actually uses the build system provided by upstream (possibly patched). The flags required for the system library are obtained through -'freetype-config'. +‘freetype-config’. -File: tlbuild.info, Node: 'kpathsea' library, Prev: 'freetype' library, Up: Library modules +File: tlbuild.info, Node: kpathsea library, Prev: freetype library, Up: Library modules -6.4.4 The 'kpathsea' library in 'texk/kpathsea' +6.4.4 The ‘kpathsea’ library in ‘texk/kpathsea’ ----------------------------------------------- This is one of the TeX-specific libraries that are maintained as part of -TeX Live (*note (kpathsea)::); the other is 'ptexenc'. These TeX +TeX Live (*note (kpathsea)::); the other is ‘ptexenc’. These TeX libraries are Libtool libraries (static and/or shared) and are installed -by 'make install' together with the programs. They are, however, not +by ‘make install’ together with the programs. They are, however, not part of the TL DVD as distributed by TeX user groups, and have never been officially released for standalone use. It is possible, and probably useful for distro builds (*note Distro -builds::), to specify the configure option '--with-system-kpathsea' in +builds::), to specify the configure option ‘--with-system-kpathsea’ in order to use a system version of the library. Programs outside the TL -tree should use 'pkg-config' for the required flags. - - In addition to 'kpathsea/ac/withenable.ac' and -'kpathsea/ac/kpathsea.ac' here there is a third fragment -'kpathsea.ac/mktex.ac', included by both 'withenable.ac' and -'configure.ac', which supplies configure options such as -'--enable-mktextfm-default'. These determine the compile time default -of whether or not to run 'mktextfm' (and similar) to generate a missing -'.tfm' (or whatever) file. In any case, however, the command line -options '-mktex=tfm' or '-no-mktex=tfm' for the TeX-like engines +tree should use ‘pkg-config’ for the required flags. + + In addition to ‘kpathsea/ac/withenable.ac’ and +‘kpathsea/ac/kpathsea.ac’ here there is a third fragment +‘kpathsea.ac/mktex.ac’, included by both ‘withenable.ac’ and +‘configure.ac’, which supplies configure options such as +‘--enable-mktextfm-default’. These determine the compile time default +of whether or not to run ‘mktextfm’ (and similar) to generate a missing +‘.tfm’ (or whatever) file. In any case, however, the command line +options ‘-mktex=tfm’ or ‘-no-mktex=tfm’ for the TeX-like engines override this default. @@ -1236,85 +1237,85 @@ for a few of the programs in TL. * Menu: -* 't1utils' package:: 'utils/t1utils' -* 'xindy' package:: 'utils/xindy' -* 'xdvik' package:: 'texk/xdvik' -* 'asymptote':: 'utils/asymptote' +* t1utils package:: ‘utils/t1utils’ +* xindy package:: ‘utils/xindy’ +* xdvik package:: ‘texk/xdvik’ +* asymptote:: ‘utils/asymptote’ -File: tlbuild.info, Node: 't1utils' package, Next: 'xindy' package, Up: Program modules +File: tlbuild.info, Node: t1utils package, Next: xindy package, Up: Program modules -6.5.1 The 't1utils' package in 'utils/t1utils' +6.5.1 The ‘t1utils’ package in ‘utils/t1utils’ ---------------------------------------------- -Here we use the distributed source tree 't1utils-src' with modifications -documented in 'TLpatches/*' and a proxy build system consisting of -'configure.ac' and 'Makefile.am'. The fragment 'ac/withenable.ac' +Here we use the distributed source tree ‘t1utils-src’ with modifications +documented in ‘TLpatches/*’ and a proxy build system consisting of +‘configure.ac’ and ‘Makefile.am’. The fragment ‘ac/withenable.ac’ contains KPSE_ENABLE_PROG([t1utils]) specifying the module name without any dependencies, and supplies the -configure option '--disable-t1utils'. +configure option ‘--disable-t1utils’. -File: tlbuild.info, Node: 'xindy' package, Next: 'xdvik' package, Prev: 't1utils' package, Up: Program modules +File: tlbuild.info, Node: xindy package, Next: xdvik package, Prev: t1utils package, Up: Program modules -6.5.2 The 'xindy' package in 'utils/xindy' +6.5.2 The ‘xindy’ package in ‘utils/xindy’ ------------------------------------------ -This module uses the distributed source tree 'xindy-src/' with -modifications documented in 'TLpatches/*', and a wrapper 'configure.ac' -and 'Makefile.am' that descends into 'xindy-src'. +This module uses the distributed source tree ‘xindy-src/’ with +modifications documented in ‘TLpatches/*’, and a wrapper ‘configure.ac’ +and ‘Makefile.am’ that descends into ‘xindy-src’. - The 'xindy' build requires a 'make' that supports a 'VPATH' build, -can handle all targets, and does not refer to '${top_srcdir}' or -'${top_builddir}'. The fragment 'xindy/ac/withenable.ac' contains + The ‘xindy’ build requires a ‘make’ that supports a ‘VPATH’ build, +can handle all targets, and does not refer to ‘${top_srcdir}’ or +‘${top_builddir}’. The fragment ‘xindy/ac/withenable.ac’ contains KPSE_ENABLE_PROG([xindy], , [disable]) m4_include(kpse_TL[utils/xindy/ac/xindy.ac]) m4_include(kpse_TL[utils/xindy/ac/clisp.ac]) -where 'disable' in the third argument indicates that 'xindy' is only -built if explicitly enabled by the user with 'configure --enable-xindy' -(the need for 'clisp' makes it too painful to enable by default). +where ‘disable’ in the third argument indicates that ‘xindy’ is only +built if explicitly enabled by the user with ‘configure --enable-xindy’ +(the need for ‘clisp’ makes it too painful to enable by default). - The additional fragments 'ac/xindy.ac' and 'ac/clisp.ac' specify more -'configure' options to be seen at the top level, with 'ac/xindy.ac' also -included by 'configure.ac'. + The additional fragments ‘ac/xindy.ac’ and ‘ac/clisp.ac’ specify more +‘configure’ options to be seen at the top level, with ‘ac/xindy.ac’ also +included by ‘configure.ac’. -File: tlbuild.info, Node: 'xdvik' package, Next: 'asymptote', Prev: 'xindy' package, Up: Program modules +File: tlbuild.info, Node: xdvik package, Next: asymptote, Prev: xindy package, Up: Program modules -6.5.3 The 'xdvik' package in 'texk/xdvik' +6.5.3 The ‘xdvik’ package in ‘texk/xdvik’ ----------------------------------------- This package is maintained as part of the TeX Live tree with sources in -its own directory ('texk/xdvik/'). The fragment -'xdvik/ac/withenable.ac' contains +its own directory (‘texk/xdvik/’). The fragment +‘xdvik/ac/withenable.ac’ contains dnl extra_dirs = texk/xdvik/squeeze KPSE_ENABLE_PROG([xdvik], [kpathsea freetype2], [x]) m4_include(kpse_TL[texk/xdvik/ac/xdvik.ac]) -thus specifying dependencies on the 'kpathsea', 'freetype', and X11 -libraries. The M4 comment (following 'dnl') signals the subsidiary -'squeeze/configure.ac'. This is needed because the main executable -'xdvi-bin' (to be installed as, e.g., 'xdvi-xaw') is for the 'host' -system whereas the auxiliary program 'squeeze/squeeze' has to run on the -'build' system; in a cross compilation, these differ. +thus specifying dependencies on the ‘kpathsea’, ‘freetype’, and X11 +libraries. The M4 comment (following ‘dnl’) signals the subsidiary +‘squeeze/configure.ac’. This is needed because the main executable +‘xdvi-bin’ (to be installed as, e.g., ‘xdvi-xaw’) is for the ‘host’ +system whereas the auxiliary program ‘squeeze/squeeze’ has to run on the +‘build’ system; in a cross compilation, these differ. - The additional fragment 'ac/xdvik.ac' is also included by -'configure.ac' and supplies the configure option '--with-xdvi-x-toolkit' + The additional fragment ‘ac/xdvik.ac’ is also included by +‘configure.ac’ and supplies the configure option ‘--with-xdvi-x-toolkit’ also seen at the top level. -File: tlbuild.info, Node: 'asymptote', Prev: 'xdvik' package, Up: Program modules +File: tlbuild.info, Node: asymptote, Prev: xdvik package, Up: Program modules -6.5.4 The subdirectory 'utils/asymptote' +6.5.4 The subdirectory ‘utils/asymptote’ ---------------------------------------- -This subdirectory contains the sources for 'asy' and 'xasy' but due to +This subdirectory contains the sources for ‘asy’ and ‘xasy’ but due to its complexity and prerequisites (e.g., OpenGL) it is not part of the TL build system. These programs must be built and installed independently, but are included on the TL DVD together with their support files. See @@ -1329,12 +1330,12 @@ File: tlbuild.info, Node: Extending TeX Live, Prev: Program modules, Up: Layo This section outlines the basic process for adding new packages to the TL build system. - In any case, a new package directory 'foo' should contain the + In any case, a new package directory ‘foo’ should contain the original sources, modified only with changes necessary for TL, in -'foo/foo-src'. The changes should be documented in 'foo/TLpatches/*', -and also be submitted upstream whenever reasonable. In addition, 'foo/' -will need the usual Automake build-related files ('configure.ac', -'Makefile.am', etc. Please maintain 'foo/ChangeLog' for all TL changes. +‘foo/foo-src’. The changes should be documented in ‘foo/TLpatches/*’, +and also be submitted upstream whenever reasonable. In addition, ‘foo/’ +will need the usual Automake build-related files (‘configure.ac’, +‘Makefile.am’, etc. Please maintain ‘foo/ChangeLog’ for all TL changes. * Menu: @@ -1349,102 +1350,102 @@ File: tlbuild.info, Node: Adding a new program module, Next: Adding a new engi 6.6.1 Adding a new program module --------------------------------- -A TeX-specific program module in a subdirectory 'texk/PROG' may use the -TeX-specific libraries and is included by adding its name 'PROG' to the -M4 list 'kpse_texk_pkgs' defined in 'm4/kpse-pkgs.m4'. +A TeX-specific program module in a subdirectory ‘texk/PROG’ may use the +TeX-specific libraries and is included by adding its name ‘PROG’ to the +M4 list ‘kpse_texk_pkgs’ defined in ‘m4/kpse-pkgs.m4’. - A generic program module in a subdirectory 'utils/PROG' must not use -the TeX-specific libraries and is included by adding its name 'PROG' to -the M4 list 'kpse_utils_pkgs' in 'm4/kpse-pkgs.m4'. + A generic program module in a subdirectory ‘utils/PROG’ must not use +the TeX-specific libraries and is included by adding its name ‘PROG’ to +the M4 list ‘kpse_utils_pkgs’ in ‘m4/kpse-pkgs.m4’. - In either case, the subdirectory 'texk/PROG' or 'utils/PROG' must -provide a fragment 'ac/withenable.ac' that contains the M4 macro -'KPSE_ENABLE_PROG' defined in 'm4/kpse-setup.m4' with 'PROG' as the + In either case, the subdirectory ‘texk/PROG’ or ‘utils/PROG’ must +provide a fragment ‘ac/withenable.ac’ that contains the M4 macro +‘KPSE_ENABLE_PROG’ defined in ‘m4/kpse-setup.m4’ with ‘PROG’ as the mandatory first argument and three optional arguments: 1. a list of required libraries from the TL tree; - 2. a list of options: 'disable' if this module is not to be built - without the configure option '--enable-PROG', 'native' if cross - compilation is not possible, 'x' if the program requires X11 + 2. a list of options: ‘disable’ if this module is not to be built + without the configure option ‘--enable-PROG’, ‘native’ if cross + compilation is not possible, ‘x’ if the program requires X11 libraries; - 3. a comment added to the help text for the 'configure' option - '--enable-PROG' or '--disable-PROG'. + 3. a comment added to the help text for the ‘configure’ option + ‘--enable-PROG’ or ‘--disable-PROG’. - If the module requires specific 'configure' options to be seen at the -top level, they should be defined in an additional fragment 'ac/PROG.ac' -included from 'ac/withenable.ac' and 'configure.ac'. + If the module requires specific ‘configure’ options to be seen at the +top level, they should be defined in an additional fragment ‘ac/PROG.ac’ +included from ‘ac/withenable.ac’ and ‘configure.ac’. Usually, the new program is maintained somewhere outside of TeX Live. In that case, as above, we put the upstream sources into a subdirectory -'PROG-src' (e.g., 'utils/newprog/newprog-src'). We do not typically run -'configure' in this original '...-src' directory, but only in our own -directory; but we do compile using the source files in '...-src'. +‘PROG-src’ (e.g., ‘utils/newprog/newprog-src’). We do not typically run +‘configure’ in this original ‘...-src’ directory, but only in our own +directory; but we do compile using the source files in ‘...-src’. So, to summarize the files that must (usually) be created inside a -new TL source directory ('texk/newprog' or 'utils/newprog'): +new TL source directory (‘texk/newprog’ or ‘utils/newprog’): -'ac/withenable.ac' - The 'KPSE_ENABLE_PROG' call just explained. +‘ac/withenable.ac’ + The ‘KPSE_ENABLE_PROG’ call just explained. -'configure.ac' -'Makefile.am' - By merging the contents of the original 'configure.ac' (if +‘configure.ac’ +‘Makefile.am’ + By merging the contents of the original ‘configure.ac’ (if provided) and a comparable program already in TL. In the above - example, one line that will be needed in 'configure.ac' (can be - added before the 'AC_CONFIG_FILES' at the end) is: + example, one line that will be needed in ‘configure.ac’ (can be + added before the ‘AC_CONFIG_FILES’ at the end) is: AC_SUBST([NEWPROG_TREE], [newprog-src]) - and then use '@NEWPROG_TREE@' in 'Makefile.am' where needed. + and then use ‘@NEWPROG_TREE@’ in ‘Makefile.am’ where needed. In general, there is no magic recipe for this part of the job. - It's necessary to think about what needs to be done in the original - vs. in TeX Live. It's useful to look at the setup for the most - comparable programs already in TL that you can find. It's also - useful to grep the entire 'Build/source' tree for whatever you can + It’s necessary to think about what needs to be done in the original + vs. in TeX Live. It’s useful to look at the setup for the most + comparable programs already in TL that you can find. It’s also + useful to grep the entire ‘Build/source’ tree for whatever you can think of to investigate how something is done. Most of the - TL-specific macros are defined in 'Build/source/m4/*'. + TL-specific macros are defined in ‘Build/source/m4/*’. -'TLpatches/TL-Changes' +‘TLpatches/TL-Changes’ First actions taken after getting the original source tree; typically removal of derived or unused common files. -'TLpatches/patch-...' +‘TLpatches/patch-...’ If any changes are needed to the original sources, record the patches here so they can be applied next time. Also, send them - upstream so that we don't have to maintain them forever. + upstream so that we don’t have to maintain them forever. -'ChangeLog' +‘ChangeLog’ Record all TL-specific changes, now and in the future. - After populating the new TL source directory ('.../newprog/', in the -above), run GNU 'autoreconf' there (*note Build system tools::). Once -that works, if you are the one who's eventually going to commit the new -package, 'svn add' the necessary files, including the generated -'Makefile.in aclocal.m4 configure', and 'svn:ignore' the Automake cache -'autom4te.cache'. (This is so people checking out the TL source tree do -not have to run any autotools, but can simply run 'configure'.) - - To reiterate: do not fail to commit the generated 'configure' and -other files. The m4 code in 'kpse-pkgs.m4' uses the existence of -'configure' to determine whether to descend into (and configure) a given + After populating the new TL source directory (‘.../newprog/’, in the +above), run GNU ‘autoreconf’ there (*note Build system tools::). Once +that works, if you are the one who’s eventually going to commit the new +package, ‘svn add’ the necessary files, including the generated +‘Makefile.in aclocal.m4 configure’, and ‘svn:ignore’ the Automake cache +‘autom4te.cache’. (This is so people checking out the TL source tree do +not have to run any autotools, but can simply run ‘configure’.) + + To reiterate: do not fail to commit the generated ‘configure’ and +other files. The m4 code in ‘kpse-pkgs.m4’ uses the existence of +‘configure’ to determine whether to descend into (and configure) a given subdirectory. - Then, run the TL tool 'reautoconf' in the top-level TL -'Build/source/' directory, to incorporate the new program into the build -tree. It is good to then rebuild the whole tree (e.g., using TL's -'Build/Build' script) to get all the necessary files generated. + Then, run the TL tool ‘reautoconf’ in the top-level TL +‘Build/source/’ directory, to incorporate the new program into the build +tree. It is good to then rebuild the whole tree (e.g., using TL’s +‘Build/Build’ script) to get all the necessary files generated. It will probably fail. So then you need to keep at it until the program compiles and tests successfully. The most efficient way is to -rerun 'autoreconf' as needed in the new source directory -('Build/source/.../newprog'), then 'make' in the corresponding build -directory ('Build/work/.../newprog'), then 'make check', etc. In the +rerun ‘autoreconf’ as needed in the new source directory +(‘Build/source/.../newprog’), then ‘make’ in the corresponding build +directory (‘Build/work/.../newprog’), then ‘make check’, etc. In the end, also make sure that the whole tree builds from scratch. - After final success, don't forget to commit. (Or email the TL + After final success, don’t forget to commit. (Or email the TL maintainers with the patch.) @@ -1454,32 +1455,32 @@ File: tlbuild.info, Node: Adding a new engine, Next: Adding a new generic libr ------------------------- Adding a new TeX engine is not completely different from adding a -program, but it's not all that similar, either. In this case, the main -work is done by creating a new subdirectory of 'texk/web2c/' for the -engine. The subdirectory is conventionally named ending in 'dir', like -'pdftexdir' and 'xetexdir', to avoid clashes with executable names. +program, but it’s not all that similar, either. In this case, the main +work is done by creating a new subdirectory of ‘texk/web2c/’ for the +engine. The subdirectory is conventionally named ending in ‘dir’, like +‘pdftexdir’ and ‘xetexdir’, to avoid clashes with executable names. The source files for the new engine should be put in this -'NEWENGINEdir' subdirectory. Also, a file -'NEWENGINEdir/am/NEWENGINE.am' (e.g., 'pdftexdir/am/pdftex.am' is needed +‘NEWENGINEdir’ subdirectory. Also, a file +‘NEWENGINEdir/am/NEWENGINE.am’ (e.g., ‘pdftexdir/am/pdftex.am’ is needed with the Makefile fragment needed to build it. - The overall 'web2c/Makefile.am' needs to have an 'include' statement -added to insert that 'NEWENGINE.am' file. + The overall ‘web2c/Makefile.am’ needs to have an ‘include’ statement +added to insert that ‘NEWENGINE.am’ file. - In 'web2c/ac/web2c.ac', a line needs to be added in the definition of -the 'kpse_tex_progs' variable to include it in the build. That line + In ‘web2c/ac/web2c.ac’, a line needs to be added in the definition of +the ‘kpse_tex_progs’ variable to include it in the build. That line specifies whether the new engine is built by default, and the additional libraries requires. For examples of building engines in CWEB, you can check the existing -'hitexdir' and 'mplibdir' directories; these are somewhat simpler than +‘hitexdir’ and ‘mplibdir’ directories; these are somewhat simpler than LuaTeX. Of course, every engine will have its own unique features and requirements, so existing examples will only take you so far. - Web2c is built as one "package", with each subdirectory's '.am' -fragment inserted with an Automake 'include'. This means that, for -instance, '$(srcdir)' is '.../web2c', not '.../webdir/enginedir'. It is + Web2c is built as one “packageâ€, with each subdirectory’s ‘.am’ +fragment inserted with an Automake ‘include’. This means that, for +instance, ‘$(srcdir)’ is ‘.../web2c’, not ‘.../webdir/enginedir’. It is a difficult setup to come to terms with, but the alternative is to recurse into each engine subdirectory, and that would be far worse (*note (automake)Directories::). @@ -1490,41 +1491,41 @@ File: tlbuild.info, Node: Adding a new generic library module, Next: Adding a 6.6.3 Adding a new generic library module ----------------------------------------- -A generic library module in a subdirectory 'libs/LIB' must not depend on +A generic library module in a subdirectory ‘libs/LIB’ must not depend on TeX-specific libraries, by definition. It is included by adding its -name 'LIB' to the M4 macro 'kpse_libs_pkgs' in 'm4/kpse-pkgs.m4'--before +name ‘LIB’ to the M4 macro ‘kpse_libs_pkgs’ in ‘m4/kpse-pkgs.m4’—before any other libraries from the TeX Live tree on which it depends. - As with program modules, the subdirectory 'libs/LIB' must contain the + As with program modules, the subdirectory ‘libs/LIB’ must contain the sources and build system for the library (and any installable support -programs) and a fragment 'ac/withenable.ac' that contains the M4 macro -'KPSE_WITH_LIB' defined in 'm4/kpse-setup.m4' with 'LIB' as the +programs) and a fragment ‘ac/withenable.ac’ that contains the M4 macro +‘KPSE_WITH_LIB’ defined in ‘m4/kpse-setup.m4’ with ‘LIB’ as the mandatory first argument and two optional arguments: a list of required libraries from the TL tree, and a list of options: for libraries, -currently there is only one--specify 'tree' if this library cannot be +currently there is only one—specify ‘tree’ if this library cannot be replaced by a system version. - If a system version can be used, a second fragment 'ac/LIB.ac' is -needed, containing the M4 macro 'KPSE_TRY_LIB' (or 'KPSE_TRY_LIBXX') -with 'LIB' as the mandatory first argument and two additional arguments -for the Autoconf macro 'AC_LANG_PROGRAM' used to compile and link a + If a system version can be used, a second fragment ‘ac/LIB.ac’ is +needed, containing the M4 macro ‘KPSE_TRY_LIB’ (or ‘KPSE_TRY_LIBXX’) +with ‘LIB’ as the mandatory first argument and two additional arguments +for the Autoconf macro ‘AC_LANG_PROGRAM’ used to compile and link a small C (or C++) program as sanity check for using the system library. - In addition a file 'm4/kpse-LIB-flags' (at the top level) must define -the M4 macro 'KPSE_LIB_FLAGS' (all uppercase) setting up the 'make' -variables 'LIB_INCLUDES', 'LIB_LIBS', 'LIB_DEPEND', and 'LIB_RULE' with -the values required for 'CPPFLAGS', 'LDADD', dependencies, and a -(multi-line) 'make' rule to rebuild the library when necessary. All of + In addition a file ‘m4/kpse-LIB-flags’ (at the top level) must define +the M4 macro ‘KPSE_LIB_FLAGS’ (all uppercase) setting up the ‘make’ +variables ‘LIB_INCLUDES’, ‘LIB_LIBS’, ‘LIB_DEPEND’, and ‘LIB_RULE’ with +the values required for ‘CPPFLAGS’, ‘LDADD’, dependencies, and a +(multi-line) ‘make’ rule to rebuild the library when necessary. All of that is needed for the library from the TL tree and, if supported, for a system version. - If a system library is allowed, 'KPSE_LIB_FLAGS' also provides the -configure option '--with-system-LIB' and uses the additional M4 macro -'KPSE_LIB_SYSTEM_FLAGS' to generate the 'make' variables for a system + If a system library is allowed, ‘KPSE_LIB_FLAGS’ also provides the +configure option ‘--with-system-LIB’ and uses the additional M4 macro +‘KPSE_LIB_SYSTEM_FLAGS’ to generate the ‘make’ variables for a system library. In addition, the definition of the M4 macro -'KPSE_ALL_SYSTEM_FLAGS' in 'm4/kpse-pkgs.m4' must be extended by the +‘KPSE_ALL_SYSTEM_FLAGS’ in ‘m4/kpse-pkgs.m4’ must be extended by the line: - 'AC_REQUIRE([KPSE_LIB_SYSTEM_FLAGS])' + ‘AC_REQUIRE([KPSE_LIB_SYSTEM_FLAGS])’ File: tlbuild.info, Node: Adding a new TeX-specific library module, Prev: Adding a new generic library module, Up: Extending TeX Live @@ -1532,15 +1533,15 @@ File: tlbuild.info, Node: Adding a new TeX-specific library module, Prev: Addi 6.6.4 Adding a new TeX-specific library module ---------------------------------------------- -A TeX-specific library module in a subdirectory 'texk/LIB' may depend on +A TeX-specific library module in a subdirectory ‘texk/LIB’ may depend on other TeX-specific libraries but must not depend on any generic library from the TL tree. It is included in the same general ways as a generic library (see the previous section), with these modifications: - * The library name 'LIB' is added to the M4 macro - 'kpse_texlibs_pkgs', which is also in 'm4/kpse-pkgs.m4'. + • The library name ‘LIB’ is added to the M4 macro + ‘kpse_texlibs_pkgs’, which is also in ‘m4/kpse-pkgs.m4’. - * The fragment 'ac/withenable.ac' must use 'KPSE_WITH_TEXLIB'. + • The fragment ‘ac/withenable.ac’ must use ‘KPSE_WITH_TEXLIB’. File: tlbuild.info, Node: Configure options, Next: Coding conventions, Prev: Layout and infrastructure, Up: Top @@ -1549,23 +1550,23 @@ File: tlbuild.info, Node: Configure options, Next: Coding conventions, Prev: ******************* Corresponding to the large number of program and library modules there -are a large number 'configure' options, most of which are described +are a large number ‘configure’ options, most of which are described here. The command - 'configure --help' + ‘configure --help’ at the top level gives an exhaustive list of all global options and a few important module-specific ones, whereas, e.g., - 'texk/lcdf-typetools/configure --help' -also displays the 'lcdf-typetools' specific options, which are not shown + ‘texk/lcdf-typetools/configure --help’ +also displays the ‘lcdf-typetools’ specific options, which are not shown at the top level. The help text also mentions several influential environment variables, but for TeX Live it is better to specify them as assignments on the command line. - The './Build' script used to make the binaries shipped with TeX Live -invokes the top-level 'configure' with a few additional options (*note + The ‘./Build’ script used to make the binaries shipped with TeX Live +invokes the top-level ‘configure’ with a few additional options (*note Building::). The defaults discussed below are those for the actual -'configure' script; invoking 'configure' via './Build' yields different +‘configure’ script; invoking ‘configure’ via ‘./Build’ yields different results. Defaults for most options are set at the top level and propagated @@ -1589,71 +1590,71 @@ Here are the global configure options. * Menu: -* '--disable-native-texlive-build':: -* '--prefix' '--bindir' ...:: -* '--disable-largefile':: -* '--disable-missing':: -* '--enable-compiler-warnings='LEVEL:: -* '--enable-cxx-runtime-hack':: -* '--enable-maintainer-mode':: -* '--enable-multiplatform':: -* '--enable-shared':: -* '--enable-silent-rules':: -* '--without-ln-s':: -* '--without-x':: +* --disable-native-texlive-build:: +* --prefix --bindir ...:: +* --disable-largefile:: +* --disable-missing:: +* --enable-compiler-warnings=LEVEL:: +* --enable-cxx-runtime-hack:: +* --enable-maintainer-mode:: +* --enable-multiplatform:: +* --enable-shared:: +* --enable-silent-rules:: +* --without-ln-s:: +* --without-x:: -File: tlbuild.info, Node: '--disable-native-texlive-build', Next: '--prefix' '--bindir' ..., Up: Global configure options +File: tlbuild.info, Node: --disable-native-texlive-build, Next: --prefix --bindir ..., Up: Global configure options -7.1.1 '--disable-native-texlive-build' +7.1.1 ‘--disable-native-texlive-build’ -------------------------------------- If enabled (the default), build for a TL binary distribution as shipped -by the TeX user groups. This requires GNU 'make' and implies -'--enable-multiplatform' and '--enable-cxx-runtime-hack' (unless they -are explicitly disabled), and enforces '--disable-shared'. +by the TeX user groups. This requires GNU ‘make’ and implies +‘--enable-multiplatform’ and ‘--enable-cxx-runtime-hack’ (unless they +are explicitly disabled), and enforces ‘--disable-shared’. If building TL for a GNU/Linux or other distribution, this should be disabled and system versions of most libraries should be used (*note Distro builds::). - A related option, '--enable-texlive-build', is automatically passed + A related option, ‘--enable-texlive-build’, is automatically passed to all subdirectories (and cannot be disabled). Subdirectories that can -also be built independently from the TL tree (such as 'utils/xindy' and -'texk/dvipng') but cooperate with TL can use this option to enable +also be built independently from the TL tree (such as ‘utils/xindy’ and +‘texk/dvipng’) but cooperate with TL can use this option to enable TL-specific adaptations, such as installation paths. -File: tlbuild.info, Node: '--prefix' '--bindir' ..., Next: '--disable-largefile', Prev: '--disable-native-texlive-build', Up: Global configure options +File: tlbuild.info, Node: --prefix --bindir ..., Next: --disable-largefile, Prev: --disable-native-texlive-build, Up: Global configure options -7.1.2 '--prefix', '--bindir', ... +7.1.2 ‘--prefix’, ‘--bindir’, ... --------------------------------- These standard Autoconf options specify various installation directories as usual. For the complete list, *note Installation directories::. - Also as usual, all values are prefixed by the value of 'DESTDIR', if -set, on the 'make' command line (*note Installation in a temporary + Also as usual, all values are prefixed by the value of ‘DESTDIR’, if +set, on the ‘make’ command line (*note Installation in a temporary location: (automake)Staged Installs.). -File: tlbuild.info, Node: '--disable-largefile', Next: '--disable-missing', Prev: '--prefix' '--bindir' ..., Up: Global configure options +File: tlbuild.info, Node: --disable-largefile, Next: --disable-missing, Prev: --prefix --bindir ..., Up: Global configure options -7.1.3 '--disable-largefile' +7.1.3 ‘--disable-largefile’ --------------------------- Omit large file support (LFS), which is needed on most 32-bit Unix systems for files with 2GB or more. Regardless of this option, the size -of 'DVI' and 'GF' files must always be <2GB, due to the file format +of ‘DVI’ and ‘GF’ files must always be <2GB, due to the file format specifications. With LFS, there is no fixed limit on the size of PDF files created by -'pdftex' or PostScript files created by 'dvips'. +‘pdftex’ or PostScript files created by ‘dvips’. -File: tlbuild.info, Node: '--disable-missing', Next: '--enable-compiler-warnings='LEVEL, Prev: '--disable-largefile', Up: Global configure options +File: tlbuild.info, Node: --disable-missing, Next: --enable-compiler-warnings=LEVEL, Prev: --disable-largefile, Up: Global configure options -7.1.4 '--disable-missing' +7.1.4 ‘--disable-missing’ ------------------------- Immediately terminate the build process if a requested program or @@ -1661,88 +1662,88 @@ feature must be disabled, e.g., due to missing libraries. This can help when figuring out a specific (sub)set of modules to enable. -File: tlbuild.info, Node: '--enable-compiler-warnings='LEVEL, Next: '--enable-cxx-runtime-hack', Prev: '--disable-missing', Up: Global configure options +File: tlbuild.info, Node: --enable-compiler-warnings=LEVEL, Next: --enable-cxx-runtime-hack, Prev: --disable-missing, Up: Global configure options -7.1.5 '--enable-compiler-warnings='LEVEL +7.1.5 ‘--enable-compiler-warnings=’LEVEL ---------------------------------------- Enable various levels of compiler warnings for C, C++, and/or -Objective C: the LEVEL value can be one of: 'no min yes max all'. The -default is 'yes' in 'maintainer-mode' (see below) and 'min' otherwise. -This option defines the variables 'WARNING_[OBJ]C[XX]FLAGS', but these +Objective C: the LEVEL value can be one of: ‘no min yes max all’. The +default is ‘yes’ in ‘maintainer-mode’ (see below) and ‘min’ otherwise. +This option defines the variables ‘WARNING_[OBJ]C[XX]FLAGS’, but these variables are not consistently used in all library and program modules. At present, these warning flags assume options from the GNU compilers. -File: tlbuild.info, Node: '--enable-cxx-runtime-hack', Next: '--enable-maintainer-mode', Prev: '--enable-compiler-warnings='LEVEL, Up: Global configure options +File: tlbuild.info, Node: --enable-cxx-runtime-hack, Next: --enable-maintainer-mode, Prev: --enable-compiler-warnings=LEVEL, Up: Global configure options -7.1.6 '--enable-cxx-runtime-hack' +7.1.6 ‘--enable-cxx-runtime-hack’ --------------------------------- -If enabled (as it is for the native TL build), when using 'g++', try to -statically link with 'libstdc++', thus improving portability of the +If enabled (as it is for the native TL build), when using ‘g++’, try to +statically link with ‘libstdc++’, thus improving portability of the resulting binary. *Note Macros for compilers::. -File: tlbuild.info, Node: '--enable-maintainer-mode', Next: '--enable-multiplatform', Prev: '--enable-cxx-runtime-hack', Up: Global configure options +File: tlbuild.info, Node: --enable-maintainer-mode, Next: --enable-multiplatform, Prev: --enable-cxx-runtime-hack, Up: Global configure options -7.1.7 '--enable-maintainer-mode' +7.1.7 ‘--enable-maintainer-mode’ -------------------------------- -Enable 'make' rules and dependencies not useful (and sometimes +Enable ‘make’ rules and dependencies not useful (and sometimes confusing) to the casual user. This requires current versions of the GNU build tools (*note Build system tools::), as it automatically -rebuilds infrastructure files as needed. *Note 'missing' and -'AM_MAINTAINER_MODE': (automake)maintainer-mode. +rebuilds infrastructure files as needed. *Note ‘missing’ and +‘AM_MAINTAINER_MODE’: (automake)maintainer-mode. -File: tlbuild.info, Node: '--enable-multiplatform', Next: '--enable-shared', Prev: '--enable-maintainer-mode', Up: Global configure options +File: tlbuild.info, Node: --enable-multiplatform, Next: --enable-shared, Prev: --enable-maintainer-mode, Up: Global configure options -7.1.8 '--enable-multiplatform' +7.1.8 ‘--enable-multiplatform’ ------------------------------ -If enabled (as it is for the native TL build) and '--bindir=DIR' or -'--libdir=DIR' are not specified, install executables and libraries in -per-platform subdirectories of 'EPREFIX/bin' and 'EPREFIX/lib' where -EPREFIX is the value given or implied for 'exec_prefix'. In any case, -the values for 'bindir' and 'libdir' are automatically propagated to all +If enabled (as it is for the native TL build) and ‘--bindir=DIR’ or +‘--libdir=DIR’ are not specified, install executables and libraries in +per-platform subdirectories of ‘EPREFIX/bin’ and ‘EPREFIX/lib’ where +EPREFIX is the value given or implied for ‘exec_prefix’. In any case, +the values for ‘bindir’ and ‘libdir’ are automatically propagated to all subdirectories. -File: tlbuild.info, Node: '--enable-shared', Next: '--enable-silent-rules', Prev: '--enable-multiplatform', Up: Global configure options +File: tlbuild.info, Node: --enable-shared, Next: --enable-silent-rules, Prev: --enable-multiplatform, Up: Global configure options -7.1.9 '--enable-shared' +7.1.9 ‘--enable-shared’ ----------------------- Build shared versions of the TeX-specific libraries such as -'libkpathsea'. This is not allowed for a native TL build (i.e., -'--disable-native-texlive-build' must also be specified). +‘libkpathsea’. This is not allowed for a native TL build (i.e., +‘--disable-native-texlive-build’ must also be specified). -File: tlbuild.info, Node: '--enable-silent-rules', Next: '--without-ln-s', Prev: '--enable-shared', Up: Global configure options +File: tlbuild.info, Node: --enable-silent-rules, Next: --without-ln-s, Prev: --enable-shared, Up: Global configure options -7.1.10 '--enable-silent-rules' +7.1.10 ‘--enable-silent-rules’ ------------------------------ -Enable the use of less verbose build rules. When using GNU 'make' (or -any 'make' implementation supporting nested variable expansions), you -can specify 'V=1' on the 'make' command line to get more verbosity, or -'V=0' to get less, regardless of this option. +Enable the use of less verbose build rules. When using GNU ‘make’ (or +any ‘make’ implementation supporting nested variable expansions), you +can specify ‘V=1’ on the ‘make’ command line to get more verbosity, or +‘V=0’ to get less, regardless of this option. -File: tlbuild.info, Node: '--without-ln-s', Next: '--without-x', Prev: '--enable-silent-rules', Up: Global configure options +File: tlbuild.info, Node: --without-ln-s, Next: --without-x, Prev: --enable-silent-rules, Up: Global configure options -7.1.11 '--without-ln-s' +7.1.11 ‘--without-ln-s’ ----------------------- -Required when using a system without a working 'ln -s' to build binaries -for a Unix-like system. However, 'make install' will not create +Required when using a system without a working ‘ln -s’ to build binaries +for a Unix-like system. However, ‘make install’ will not create anything useful, and might fail. -File: tlbuild.info, Node: '--without-x', Prev: '--without-ln-s', Up: Global configure options +File: tlbuild.info, Node: --without-x, Prev: --without-ln-s, Up: Global configure options -7.1.12 '--without-x' +7.1.12 ‘--without-x’ -------------------- Disable all programs using the X Window System. @@ -1753,214 +1754,214 @@ File: tlbuild.info, Node: Program-specific configure options, Next: Library-sp 7.2 Program-specific configure options ====================================== -Here are (some of) the program-specific 'configure' options. +Here are (some of) the program-specific ‘configure’ options. * Menu: -* '--enable-PROG' '--disable-PROG':: -* '--disable-all-pkgs':: -* Configure options for 'texk/web2c':: -* Configure options for 'texk/bibtex-x':: -* Configure options for 'texk/dvipdfm-x':: -* Configure options for 'texk/dvisvgm':: -* Configure options for 'texk/texlive':: -* Configure options for 'texk/xdvik':: -* Configure options for 'utils/xindy':: +* --enable-PROG --disable-PROG:: +* --disable-all-pkgs:: +* Configure options for texk/web2c:: +* Configure options for texk/bibtex-x:: +* Configure options for texk/dvipdfm-x:: +* Configure options for texk/dvisvgm:: +* Configure options for texk/texlive:: +* Configure options for texk/xdvik:: +* Configure options for utils/xindy:: -File: tlbuild.info, Node: '--enable-PROG' '--disable-PROG', Next: '--disable-all-pkgs', Up: Program-specific configure options +File: tlbuild.info, Node: --enable-PROG --disable-PROG, Next: --disable-all-pkgs, Up: Program-specific configure options -7.2.1 '--enable-PROG', '--disable-PROG' +7.2.1 ‘--enable-PROG’, ‘--disable-PROG’ --------------------------------------- -Do or do not build and install the program(s) of module 'PROG'. +Do or do not build and install the program(s) of module ‘PROG’. -File: tlbuild.info, Node: '--disable-all-pkgs', Next: Configure options for 'texk/web2c', Prev: '--enable-PROG' '--disable-PROG', Up: Program-specific configure options +File: tlbuild.info, Node: --disable-all-pkgs, Next: Configure options for texk/web2c, Prev: --enable-PROG --disable-PROG, Up: Program-specific configure options -7.2.2 '--disable-all-pkgs' +7.2.2 ‘--disable-all-pkgs’ -------------------------- -Do not build any program modules by default--only those explicitly +Do not build any program modules by default—only those explicitly enabled. This is useful when one wants to work on only a single -program, which is specified with an additional '--enable' option, e.g., -'--enable-dvipdfm-x'. It's still simplest to check out and configure +program, which is specified with an additional ‘--enable’ option, e.g., +‘--enable-dvipdfm-x’. It’s still simplest to check out and configure the whole source tree, but at least only the program you are interested in, and its dependencies, are built. *Note Build one package::. Without this option, all modules are built except those that are -explicitly disabled or specify 'disable' in their 'ac/withenable.ac' +explicitly disabled or specify ‘disable’ in their ‘ac/withenable.ac’ fragment. -File: tlbuild.info, Node: Configure options for 'texk/web2c', Next: Configure options for 'texk/bibtex-x', Prev: '--disable-all-pkgs', Up: Program-specific configure options +File: tlbuild.info, Node: Configure options for texk/web2c, Next: Configure options for texk/bibtex-x, Prev: --disable-all-pkgs, Up: Program-specific configure options -7.2.3 Configure options for 'texk/web2c' +7.2.3 Configure options for ‘texk/web2c’ ---------------------------------------- -'--with-banner-add=STR' -Add 'STR' to the default version string (which is ''TeX Live YEAR'' or -''Web2C YEAR'') appended to banner lines. This is ignored for a native -TL build, but distro builds should specify, e.g., '/SOMEDISTRO'. +‘--with-banner-add=STR’ +Add ‘STR’ to the default version string (which is ‘‘TeX Live YEAR’’ or +‘‘Web2C YEAR’’) appended to banner lines. This is ignored for a native +TL build, but distro builds should specify, e.g., ‘/SOMEDISTRO’. -'--with-editor=CMD' -Specify the command 'CMD' to invoke from the 'e' option of TeX and -friends, replacing the default 'vi +%d '%s'' for Unix or 'texworks ---position=%d "%s"' for Windows. +‘--with-editor=CMD’ +Specify the command ‘CMD’ to invoke from the ‘e’ option of TeX and +friends, replacing the default ‘vi +%d '%s'’ for Unix or ‘texworks +--position=%d "%s"’ for Windows. -'--with-fontconfig-includes=DIR', '--with-fontconfig-libdir=DIR' -Building XeTeX on non-Mac systems requires the 'fontconfig' library +‘--with-fontconfig-includes=DIR’, ‘--with-fontconfig-libdir=DIR’ +Building XeTeX on non-Mac systems requires the ‘fontconfig’ library headers and code. If one or both of these options are given, the required flags are derived from them; otherwise, they are determined via -'pkg-config' (if present). +‘pkg-config’ (if present). -'--with-mf-x-toolkit' -Use the X toolkit ('libXt') for Metafont (the default is to use the -lowest-level 'Xlib' support; it seems this has the best chance of +‘--with-mf-x-toolkit’ +Use the X toolkit (‘libXt’) for Metafont (the default is to use the +lowest-level ‘Xlib’ support; it seems this has the best chance of working across X installations nowadays). -'--disable-dump-share' -Make the 'fmt'/'base' dump files architecture dependent (somewhat faster +‘--disable-dump-share’ +Make the ‘fmt’/‘base’ dump files architecture dependent (somewhat faster on LittleEndian architectures). -'--disable-ipc' -Disable TeX's '--ipc' option. +‘--disable-ipc’ +Disable TeX’s ‘--ipc’ option. -'--disable-mf-nowin' -Do not build a separate non-graphically-capable Metafont ('mf-nowin'). +‘--disable-mf-nowin’ +Do not build a separate non-graphically-capable Metafont (‘mf-nowin’). -'--disable-tex', '--enable-etex', ... +‘--disable-tex’, ‘--enable-etex’, ... Do not or do build the various TeX, Metafont, and MetaPost engines -(defaults are defined in the fragment 'texk/web2c/ac/web2c.ac'). +(defaults are defined in the fragment ‘texk/web2c/ac/web2c.ac’). -'--disable-web-progs' -Do not build the original WEB programs 'bibtex', ..., 'weave'. Useful +‘--disable-web-progs’ +Do not build the original WEB programs ‘bibtex’, ..., ‘weave’. Useful if, e.g., you only want to (re)build some engines. -'--enable-auto-core' +‘--enable-auto-core’ This option causes TeX and Metafont to produce a core dump when a particular hacky filename is encountered, for use in creating preloaded binaries. This is rarely done nowadays. -'--enable-libtool-hack' -If enabled (which is the default for all platforms), prevents 'libtool' -from linking explicitly with dependencies of 'libfontconfig' such as -'libexpat'. +‘--enable-libtool-hack’ +If enabled (which is the default for all platforms), prevents ‘libtool’ +from linking explicitly with dependencies of ‘libfontconfig’ such as +‘libexpat’. -'--enable-*win' +‘--enable-*win’ Include various types of non-X window support for Metafont (EPSF output, -'mftalk', old graphics terminals, ...). +‘mftalk’, old graphics terminals, ...). -'--enable-tex-synctex', '--disable-etex-synctex', ... -Build the TeX engines with or without 'SyncTeX' support; ignored for a +‘--enable-tex-synctex’, ‘--disable-etex-synctex’, ... +Build the TeX engines with or without ‘SyncTeX’ support; ignored for a native TeX Live build. Defaults are defined in -'texk/web2c/ac/web2c.ac'. +‘texk/web2c/ac/web2c.ac’. -'--disable-synctex' -Do not build the 'SyncTeX' library and tool. +‘--disable-synctex’ +Do not build the ‘SyncTeX’ library and tool. -File: tlbuild.info, Node: Configure options for 'texk/bibtex-x', Next: Configure options for 'texk/dvipdfm-x', Prev: Configure options for 'texk/web2c', Up: Program-specific configure options +File: tlbuild.info, Node: Configure options for texk/bibtex-x, Next: Configure options for texk/dvipdfm-x, Prev: Configure options for texk/web2c, Up: Program-specific configure options -7.2.4 Configure options for 'texk/bibtex-x' +7.2.4 Configure options for ‘texk/bibtex-x’ ------------------------------------------- -The programs 'bibtex8' and 'bibtexu' have been merged into the module -'bibtex-x' (extended BibTeX). +The programs ‘bibtex8’ and ‘bibtexu’ have been merged into the module +‘bibtex-x’ (extended BibTeX). -'--disable-bibtex8' -Do not build the 'bibtex8' program. +‘--disable-bibtex8’ +Do not build the ‘bibtex8’ program. -'--disable-bibtexu' -Do not build the 'bibtexu' program (building 'bibtexu' requires 'ICU' +‘--disable-bibtexu’ +Do not build the ‘bibtexu’ program (building ‘bibtexu’ requires ‘ICU’ libraries). -File: tlbuild.info, Node: Configure options for 'texk/dvipdfm-x', Next: Configure options for 'texk/dvisvgm', Prev: Configure options for 'texk/bibtex-x', Up: Program-specific configure options +File: tlbuild.info, Node: Configure options for texk/dvipdfm-x, Next: Configure options for texk/dvisvgm, Prev: Configure options for texk/bibtex-x, Up: Program-specific configure options -7.2.5 Configure options for 'texk/dvipdfm-x' +7.2.5 Configure options for ‘texk/dvipdfm-x’ -------------------------------------------- -The former modules 'dvipdfmx' (extended DVI to PDF converter) and -'xdvipdfmx' (the same, as used by XeTeX) have been merged into -'dvipdfm-x' at the source level. Two separate binaries are still -created by default. In addition, 'dvipdfm' is created as a symlink to -'dvipdfmx', with backward-compatible (very slightly different) behavior. +The former modules ‘dvipdfmx’ (extended DVI to PDF converter) and +‘xdvipdfmx’ (the same, as used by XeTeX) have been merged into +‘dvipdfm-x’ at the source level. Two separate binaries are still +created by default. In addition, ‘dvipdfm’ is created as a symlink to +‘dvipdfmx’, with backward-compatible (very slightly different) behavior. -'--disable-dvipdfmx' -Do not build the 'dvipdfmx' program or make the 'dvipdfm' symlink. +‘--disable-dvipdfmx’ +Do not build the ‘dvipdfmx’ program or make the ‘dvipdfm’ symlink. -'--disable-xdvipdfmx' -Do not build the 'xdvipdfmx' program. +‘--disable-xdvipdfmx’ +Do not build the ‘xdvipdfmx’ program. -File: tlbuild.info, Node: Configure options for 'texk/dvisvgm', Next: Configure options for 'texk/texlive', Prev: Configure options for 'texk/dvipdfm-x', Up: Program-specific configure options +File: tlbuild.info, Node: Configure options for texk/dvisvgm, Next: Configure options for texk/texlive, Prev: Configure options for texk/dvipdfm-x, Up: Program-specific configure options -7.2.6 Configure options for 'texk/dvisvgm' +7.2.6 Configure options for ‘texk/dvisvgm’ ------------------------------------------ -'--with-system-libgs' -Build 'dvisvgm' using installed Ghostscript ('gs') headers and library -(not allowed for a native TL build). The default is to load the 'gs' +‘--with-system-libgs’ +Build ‘dvisvgm’ using installed Ghostscript (‘gs’) headers and library +(not allowed for a native TL build). The default is to load the ‘gs’ library at runtime if possible, else to disable support for PostScript specials. -'--without-libgs' -Build 'dvisvgm' without PostScript support at all. Because the dynamic +‘--without-libgs’ +Build ‘dvisvgm’ without PostScript support at all. Because the dynamic loading just mentioned defeats all attempts at static linking, the result can crash due to library incompatibilities, e.g., on CentOS 5. -'--with-libgs-includes=DIR', '--with-libgs-libdir=DIR' +‘--with-libgs-includes=DIR’, ‘--with-libgs-libdir=DIR’ Specify non-standard locations of the Ghostscript headers and library. -File: tlbuild.info, Node: Configure options for 'texk/texlive', Next: Configure options for 'texk/xdvik', Prev: Configure options for 'texk/dvisvgm', Up: Program-specific configure options +File: tlbuild.info, Node: Configure options for texk/texlive, Next: Configure options for texk/xdvik, Prev: Configure options for texk/dvisvgm, Up: Program-specific configure options -7.2.7 Configure options for 'texk/texlive' +7.2.7 Configure options for ‘texk/texlive’ ------------------------------------------ -'--disable-linked-scripts' -Do not install the "linked scripts" (*note Linked scripts::), except for -the TL scripts required to run 'texlinks'. +‘--disable-linked-scripts’ +Do not install the “linked scripts†(*note Linked scripts::), except for +the TL scripts required to run ‘texlinks’. -File: tlbuild.info, Node: Configure options for 'texk/xdvik', Next: Configure options for 'utils/xindy', Prev: Configure options for 'texk/texlive', Up: Program-specific configure options +File: tlbuild.info, Node: Configure options for texk/xdvik, Next: Configure options for utils/xindy, Prev: Configure options for texk/texlive, Up: Program-specific configure options -7.2.8 Configure options for 'texk/xdvik' +7.2.8 Configure options for ‘texk/xdvik’ ---------------------------------------- -'--with-gs=FILENAME' -Hardwire the location of Ghostscript ('gs') as called by Xdvik. +‘--with-gs=FILENAME’ +Hardwire the location of Ghostscript (‘gs’) as called by Xdvik. -'--with-xdvi-x-toolkit=KIT' -Use toolkit 'KIT' for 'xdvik', one of: 'motif xaw xaw3d neXtaw'. The -default is 'motif' if available, else 'xaw'. +‘--with-xdvi-x-toolkit=KIT’ +Use toolkit ‘KIT’ for ‘xdvik’, one of: ‘motif xaw xaw3d neXtaw’. The +default is ‘motif’ if available, else ‘xaw’. -'--enable-xi2-scrolling' -Use XInput 2.1 "smooth scrolling" if available (default: yes, except for +‘--enable-xi2-scrolling’ +Use XInput 2.1 “smooth scrolling†if available (default: yes, except for a native TL build). -File: tlbuild.info, Node: Configure options for 'utils/xindy', Prev: Configure options for 'texk/xdvik', Up: Program-specific configure options +File: tlbuild.info, Node: Configure options for utils/xindy, Prev: Configure options for texk/xdvik, Up: Program-specific configure options -7.2.9 Configure options for 'utils/xindy' +7.2.9 Configure options for ‘utils/xindy’ ----------------------------------------- -'--enable-xindy-rules' -Build and install 'xindy' rules (default: yes, except for a native TL +‘--enable-xindy-rules’ +Build and install ‘xindy’ rules (default: yes, except for a native TL build). -'--enable-xindy-docs' -Build and install 'xindy' documentation (default: yes, except for a +‘--enable-xindy-docs’ +Build and install ‘xindy’ documentation (default: yes, except for a native TL build). -'--with-clisp-runtime=FILENAME' -Specifies the full path for the Clisp runtime file ('lisp.run' or -'lisp.exe') to be installed. When specified as 'default' (the default +‘--with-clisp-runtime=FILENAME’ +Specifies the full path for the Clisp runtime file (‘lisp.run’ or +‘lisp.exe’) to be installed. When specified as ‘default’ (the default for a native TL build) the path is determined by the Clisp executable; -the value 'system' (not allowed for a native TL build, but the default -otherwise) indicates that 'xindy' will use the installed version of -'clisp' (which must be identical to the one used to build 'xindy'). +the value ‘system’ (not allowed for a native TL build, but the default +otherwise) indicates that ‘xindy’ will use the installed version of +‘clisp’ (which must be identical to the one used to build ‘xindy’). File: tlbuild.info, Node: Library-specific configure options, Next: Variables for configure, Prev: Program-specific configure options, Up: Configure options @@ -1968,53 +1969,53 @@ File: tlbuild.info, Node: Library-specific configure options, Next: Variables 7.3 Library-specific configure options ====================================== -Here are (some of) the library-specific 'configure' options, starting +Here are (some of) the library-specific ‘configure’ options, starting with this generic one: -'--with-system-LIB' +‘--with-system-LIB’ - Use an installed (system) version of the library 'LIB'; this option + Use an installed (system) version of the library ‘LIB’; this option exists for most libraries, but is not allowed for a native TL build. Using a system version implies also using the system versions of all libraries that LIB depends on. - For many libraries '--with-LIB-includes=DIR' and -'--with-LIB-libdir=DIR' can specify non-standard search locations; -others use 'pkg-config' or similar to determine the required flags. + For many libraries ‘--with-LIB-includes=DIR’ and +‘--with-LIB-libdir=DIR’ can specify non-standard search locations; +others use ‘pkg-config’ or similar to determine the required flags. - The top-level 'configure' script performs a consistency check for all + The top-level ‘configure’ script performs a consistency check for all required system libraries and bails out if tests fail. * Menu: -* Configure options for 'kpathsea':: +* Configure options for kpathsea:: -File: tlbuild.info, Node: Configure options for 'kpathsea', Up: Library-specific configure options +File: tlbuild.info, Node: Configure options for kpathsea, Up: Library-specific configure options -7.3.1 Configure options for 'kpathsea' +7.3.1 Configure options for ‘kpathsea’ -------------------------------------- -'--enable-CMD-default', '--disable-CMD-default' +‘--enable-CMD-default’, ‘--disable-CMD-default’ Determine the compile time default for whether or not to run CMD, which is one of: -'mkocp' +‘mkocp’ (Omega compiled translation process file) -'mkofm' +‘mkofm’ (Omega font metrics file) -'mktexfmt' +‘mktexfmt’ (format/base dump file) -'mktexmf' +‘mktexmf’ (Metafont source) -'mktexpk' +‘mktexpk’ (PK bitmap font) -'mktextex' +‘mktextex’ (TeX source) -'mktextfm' +‘mktextfm’ (TFM file) to generate the specified type of file dynamically. The default can be -overridden by the user in any case (*note 'kpathsea' library::). +overridden by the user in any case (*note kpathsea library::). File: tlbuild.info, Node: Variables for configure, Prev: Library-specific configure options, Up: Configure options @@ -2022,44 +2023,44 @@ File: tlbuild.info, Node: Variables for configure, Prev: Library-specific conf 7.4 Variables for configure =========================== -The values for these variables can be specified as 'configure' arguments -of the form 'VAR=VALUE'. They can also be defined in the environment, +The values for these variables can be specified as ‘configure’ arguments +of the form ‘VAR=VALUE’. They can also be defined in the environment, but that might not work for cross compilations. -'CC' -'CXX' -'CPPFLAGS' +‘CC’ +‘CXX’ +‘CPPFLAGS’ And plenty more. As usual with Autoconf, these variables specify the name (or full path) of compilers, preprocessor flags, and similar. *Note (autoconf)Preset Output Variables::. -'CLISP' - Name (or full path) of the 'clisp' executable, used to build - 'xindy'. +‘CLISP’ + Name (or full path) of the ‘clisp’ executable, used to build + ‘xindy’. -'FT2_CONFIG' -'ICU_CONFIG' -'PKG_CONFIG' - These specify the name (or path) for the 'freetype-config', - 'icu-config', and 'pkg-config' commands used to determine the flags - required for system versions of 'libfreetype', the ICU libraries, +‘FT2_CONFIG’ +‘ICU_CONFIG’ +‘PKG_CONFIG’ + These specify the name (or path) for the ‘freetype-config’, + ‘icu-config’, and ‘pkg-config’ commands used to determine the flags + required for system versions of ‘libfreetype’, the ICU libraries, and other libraries, respectively. -'KPSEWHICH' - Name (or path) of an installed 'kpsewhich' binary, used by 'make - check' to determine the location of, e.g., 'cmbx10.tfm'. +‘KPSEWHICH’ + Name (or path) of an installed ‘kpsewhich’ binary, used by ‘make + check’ to determine the location of, e.g., ‘cmbx10.tfm’. -'MAKE' -'SED' - And more. Name (or path) of the 'make', 'sed', and similar +‘MAKE’ +‘SED’ + And more. Name (or path) of the ‘make’, ‘sed’, and similar programs; used at the top level and propagated to all subdirectories. -'PERL' -'LATEX' -'PDFLATEX' - Name (or full path) for the 'perl', 'latex', and 'pdflatex' - commands used, e.g., to build the 'xindy' documentation. +‘PERL’ +‘LATEX’ +‘PDFLATEX’ + Name (or full path) for the ‘perl’, ‘latex’, and ‘pdflatex’ + commands used, e.g., to build the ‘xindy’ documentation. File: tlbuild.info, Node: Coding conventions, Next: Continuous integration, Prev: Configure options, Up: Top @@ -2067,12 +2068,12 @@ File: tlbuild.info, Node: Coding conventions, Next: Continuous integration, P 8 Coding conventions ******************** -Ideally, building all of TeX Live with '--enable-compiler-warnings=max' +Ideally, building all of TeX Live with ‘--enable-compiler-warnings=max’ should produce no (GCC) compiler warnings at all. In spite of considerable efforts into that direction we are still far from that goal and there are reasons that we may never fully reach it. Below are some rules about declarations of functions or variables and the use of -'const'. These rules should be applied to the code maintained in the +‘const’. These rules should be applied to the code maintained in the TeX Live tree and for other packages whose maintainers are willing to accept patches. @@ -2092,7 +2093,7 @@ C standards The TeX Live build system no longer supports pre-ANSI C compilers. Thus all function prototypes and definitions must conform to the ANSI C -standard (including 'void' in the declaration of C functions with no +standard (including ‘void’ in the declaration of C functions with no parameters). On the other hand, TL is built for a wide variety of systems, not all of which support the C99 standard. Therefore using C99 features should be avoided if that can easily be done. In particular, C @@ -2101,10 +2102,10 @@ comments. If some C99 (or later) constructs must be used, the module should verify that they are available and otherwise provide an alternative. -For example, the module 'texk/chktex' uses the C99 function 'stpcpy()' +For example, the module ‘texk/chktex’ uses the C99 function ‘stpcpy()’ that may or may not be available on a particular system. It uses -'AC_CHECK_DECLS([stpcpy])' in 'configure.ac' to test this, and provides -a perhaps less efficient alternative (in the file 'Utility.h'): +‘AC_CHECK_DECLS([stpcpy])’ in ‘configure.ac’ to test this, and provides +a perhaps less efficient alternative (in the file ‘Utility.h’): #if !(defined HAVE_DECL_STPCPY && HAVE_DECL_STPCPY) static inline char *stpcpy(char *dest, const char *src) @@ -2116,17 +2117,17 @@ a perhaps less efficient alternative (in the file 'Utility.h'): Static functions ................ -Functions used in only one file should be declared 'static'; they +Functions used in only one file should be declared ‘static’; they require no prototype except in forward declarations. Extern functions ................ -Functions not declared 'static', usually because they are used in -several files, require an ('extern') prototype in exactly one header +Functions not declared ‘static’, usually because they are used in +several files, require an (‘extern’) prototype in exactly one header file, which is included in the file defining the function and in all -files using that function--this is the only way to guarantee consistency -between definition and use. There should be no 'extern' declarations +files using that function—this is the only way to guarantee consistency +between definition and use. There should be no ‘extern’ declarations sprinkled throughout the C code (with or without comments as to where that function is defined). @@ -2134,7 +2135,7 @@ Variable declarations ..................... The declaration of global variables follows analogous rules: they are -either declared 'static' if used in only one file or declared 'extern' +either declared ‘static’ if used in only one file or declared ‘extern’ in exactly one header and instantiated in exactly one file. @@ -2143,39 +2144,39 @@ File: tlbuild.info, Node: Const, Prev: Declarations and definitions, Up: Codi 8.2 Const ========= -The 'const' feature of C is valuable, but easy to mis-use. +The ‘const’ feature of C is valuable, but easy to mis-use. Function parameters ................... Ideally, a function parameter not modified by the function should be -declared as 'const'. This is important in particular for strings -('char*') because the actual arguments are often string literals. It is -perfectly legitimate and safe to use a type 'char*' value for a type -'const char*' variable (in an assignment, as initializer, as function +declared as ‘const’. This is important in particular for strings +(‘char*’) because the actual arguments are often string literals. It is +perfectly legitimate and safe to use a type ‘char*’ value for a type +‘const char*’ variable (in an assignment, as initializer, as function argument, or as return value). It is equally safe to use a type -'char**' value for a type 'const char*const*' variable, but not for a -type 'const char**' variable since that might cause modification of a +‘char**’ value for a type ‘const char*const*’ variable, but not for a +type ‘const char**’ variable since that might cause modification of a quantity supposed to be constant. - Getting all 'const' qualifiers right can get quite involved but can + Getting all ‘const’ qualifiers right can get quite involved but can almost always be done. There are only a couple notable exceptions: the -X11 headers are full of declarations that ought to use 'const' but do -not; at one time, 'libfreetype' also did not fully specify 'const', but +X11 headers are full of declarations that ought to use ‘const’ but do +not; at one time, ‘libfreetype’ also did not fully specify ‘const’, but this has not been checked recently. -What must be avoided with 'const' +What must be avoided with ‘const’ ................................. -The GCC compiler warnings "assignment discards qualifiers..." and -analogous warnings for "initialization", "passing arg", or "return" must +The GCC compiler warnings “assignment discards qualifiers...†and +analogous warnings for “initializationâ€, “passing argâ€, or “return†must be strenuously avoided in our own code. The only exception is when they are caused by X11 declarations or other third party code. -What should be avoided with 'const' +What should be avoided with ‘const’ ................................... -A type cast, e.g., from 'const char*' to 'char*' does not solve any +A type cast, e.g., from ‘const char*’ to ‘char*’ does not solve any problems; depending on warning options, it may only hide them. Therefore such casts should be avoided whenever possible and otherwise must be carefully analyzed to make sure that they cannot cause the @@ -2208,7 +2209,7 @@ File: tlbuild.info, Node: Transfer from Subversion to Github, Next: Automatic ====================================== The git-svn program (<https://git-scm.com/docs/git-svn>) is used to -check out the subtree 'Build/source' of the canonical Subversion +check out the subtree ‘Build/source’ of the canonical Subversion repository. The author index file used is not maintained in either Git or Subversion but can be provided on request. @@ -2216,36 +2217,36 @@ or Subversion but can be provided on request. git svn --authors-file usermap clone \ svn://USER@tug.org/texlive/trunk/Build/source -where the 'usermap' file maps Subversion user names to name and emails +where the ‘usermap’ file maps Subversion user names to name and emails of the authors. Anonymous checkout is also possible: git svn --authors-file usermap clone \ svn://tug.org/texlive/trunk/Build/source In the following, we will use _admin_ to refer to a user who has read/write access to the TeX Live subversion repository, and is also an -administrator of the ''TeX-Live'' team at Github. The above initial -checkout has been carried out by _admin_ on the server 'texlive.info'. +administrator of the ‘‘TeX-Live’’ team at Github. The above initial +checkout has been carried out by _admin_ on the server ‘texlive.info’. - On Github, a new git repository named 'texlive-source' was created by -_admin_ within the 'TeX-Live' "organization" + On Github, a new git repository named ‘texlive-source’ was created by +_admin_ within the ‘TeX-Live’ “organization†(<https://github.com/TeX-Live>). The remote was added to the checkout -with 'git remote add origin git@github.com:TeX-Live/texlive-source.git'. +with ‘git remote add origin git@github.com:TeX-Live/texlive-source.git’. To automate the update on Github, a new ssh key was generated and -added to the 'texlive-source' repository on Github as deployment key. -Thus, pushes using this key can only go to the 'texlive-source' +added to the ‘texlive-source’ repository on Github as deployment key. +Thus, pushes using this key can only go to the ‘texlive-source’ repository and not anywhere else. - The usage of 'git-svn' requires a strict discipline to keep a linear + The usage of ‘git-svn’ requires a strict discipline to keep a linear history in the master branch. Since we are aiming at a pure mirror -facility on Github, we have decided to further restrict the 'master' -branch of the 'texlive-source' repository on Github to changes by +facility on Github, we have decided to further restrict the ‘master’ +branch of the ‘texlive-source’ repository on Github to changes by _admin_. - This setup allows other developers to branch off 'master' and push + This setup allows other developers to branch off ‘master’ and push their branches to the Github repository, but all updates need to come -from the local 'master' (not the one on Github) to Subversion, back to -'master' on 'texlive.info', and from there to Github. +from the local ‘master’ (not the one on Github) to Subversion, back to +‘master’ on ‘texlive.info’, and from there to Github. File: tlbuild.info, Node: Automatic update of the Git mirror, Next: CI testing on Travis-CI, Prev: Transfer from Subversion to Github, Up: Continuous integration @@ -2253,10 +2254,10 @@ File: tlbuild.info, Node: Automatic update of the Git mirror, Next: CI testing 9.2 Automatic update of the Git mirror ====================================== -_admin_ has installed a cron job on 'texlive.info' running every 30 -minute which essentially runs 'git svn rebase' and 'git push' in the -'master' branch of the checkout. The first command fetches the changes -from the Subversion repository and updates the 'master' branch with +_admin_ has installed a cron job on ‘texlive.info’ running every 30 +minute which essentially runs ‘git svn rebase’ and ‘git push’ in the +‘master’ branch of the checkout. The first command fetches the changes +from the Subversion repository and updates the ‘master’ branch with them, and the second pushes changes (if any) to Github. @@ -2265,10 +2266,10 @@ File: tlbuild.info, Node: CI testing on Travis-CI, Next: Releases on Github, 9.3 CI testing on Travis-CI =========================== -The 'source' tree of TeX Live contains a top-level file '.travis.yml' +The ‘source’ tree of TeX Live contains a top-level file ‘.travis.yml’ which controls the automatic testing on Travis-CI. _admin_ has -registered with Travis-CI and allowed access to the Github's 'TeX-Live' -organization's 'texlive-source' repository. The default settings are to +registered with Travis-CI and allowed access to the Github’s ‘TeX-Live’ +organization’s ‘texlive-source’ repository. The default settings are to build the last commit of each push. No further action is necessary on Travis-CI. @@ -2281,7 +2282,7 @@ File: tlbuild.info, Node: Releases on Github, Prev: CI testing on Travis-CI, 9.4 Releases on Github ====================== -Given a git checkout of 'texlive-source': +Given a git checkout of ‘texlive-source’: git pull git tag build-svnNNNN @@ -2289,7 +2290,7 @@ Given a git checkout of 'texlive-source': and the result will appear at <https://github.com/TeX-Live/texlive-source/releases>. Releases can -also be made manually from that web page (see 'tl-update-bindir' for +also be made manually from that web page (see ‘tl-update-bindir’ for hints). @@ -2346,10 +2347,10 @@ and a package is what contains actual files. Within the installer, you can choose a scheme, and further customize the set of collections to install, but not the set of the packages. To -work at the package level, use 'tlmgr' (reference just below) after the +work at the package level, use ‘tlmgr’ (reference just below) after the initial installation is complete. - The default is 'scheme-full', which installs everything, and this is + The default is ‘scheme-full’, which installs everything, and this is highly recommended. @@ -2375,8 +2376,8 @@ A.5 OPTIONS =========== As usual, all options can be specified in any order, and with either a -leading '-' or '--'. An argument value can be separated from its option -by either a space or '='. +leading ‘-’ or ‘--’. An argument value can be separated from its option +by either a space or ‘=’. *-gui* [[=]_module_] @@ -2386,18 +2387,18 @@ by either a space or '='. If _module_ is given loads the given installer module. Currently the following modules are supported: - 'text' + ‘text’ The text mode user interface (default on Unix systems, - including Macs). Same as the '-no-gui' option. + including Macs). Same as the ‘-no-gui’ option. - 'tcl' (or "perltk" or "wizard" or "expert" or nothing) + ‘tcl’ (or "perltk" or "wizard" or "expert" or nothing) The Tcl/Tk user interface (default on Windows). It starts with a small number of configuration options, roughly equivalent to what the former wizard option offers, but a - button 'Advanced' takes you to a screen with roughly the same - options as the former 'perltk' interface. + button ‘Advanced’ takes you to a screen with roughly the same + options as the former ‘perltk’ interface. The default GUI requires Tcl/Tk. This is standard on Macs (although it is considered deprecated since Catalina) and is often @@ -2425,13 +2426,13 @@ by either a space or '='. Specify the package repository to be used as the source of the installation. In short, this can be a directory name or a url - using http(s), ftp, or scp. The documentation for 'tlmgr' has the + using http(s), ftp, or scp. The documentation for ‘tlmgr’ has the details (<https://tug.org/texlive/doc/tlmgr.html#OPTIONS>). For installation, the default is to pick a mirror automatically, using <https://mirror.ctan.org/systems/texlive/tlnet>; the chosen mirror is used for the entire download. You can use the special - argument 'ctan' as an abbreviation for this. (See + argument ‘ctan’ as an abbreviation for this. (See <https://ctan.org> for more about CTAN and its mirrors.) After installation is complete, you can use that installation as @@ -2443,9 +2444,9 @@ by either a space or '='. This option allows you to choose a particular mirror from the current list of active CTAN mirrors. This option is supported in - the 'text' and 'gui' installer modes, and will also offer to + the ‘text’ and ‘gui’ installer modes, and will also offer to install from local media if available, or from a repository - specified on the command line. It's useful when the (default) + specified on the command line. It’s useful when the (default) automatic redirection does not choose a good host for you. *-all-options* @@ -2462,10 +2463,10 @@ by either a space or '='. box), this option allows you to specify the _path_ to a directory where the binaries for the current system are present. The installation will continue as usual, but at the end all files from - _path_ are copied over to 'bin/custom/' under your installation - directory and this 'bin/custom/' directory is what will be added to + _path_ are copied over to ‘bin/custom/’ under your installation + directory and this ‘bin/custom/’ directory is what will be added to the path for the post-install actions. To install multiple custom - binary sets, manually rename 'custom' before doing each. + binary sets, manually rename ‘custom’ before doing each. For more information on custom binaries, see <https://tug.org/texlive/custom-bin.html>. For general information @@ -2473,7 +2474,7 @@ by either a space or '='. *-debug-fakenet* - Pretend we're doing a network install, for the sole purpose of + Pretend we’re doing a network install, for the sole purpose of testing broken downloads via moving package files aside in a tlnet mirror. @@ -2488,24 +2489,24 @@ by either a space or '='. Instead of auto-detecting the current platform, use _platform_. Binaries for this platform must be present and they must actually - be runnable, or installation will fail. '-force-arch' is a + be runnable, or installation will fail. ‘-force-arch’ is a synonym. -*-help*, *-help*, *-?* +*-help*, *–help*, *-?* Display this help and exit. (This help is also on the web at <https://tug.org/texlive/doc/install-tl.html>). Sometimes the - 'perldoc' and/or 'PAGER' programs on the system have problems, + ‘perldoc’ and/or ‘PAGER’ programs on the system have problems, possibly resulting in control characters being literally output. - This can't always be detected, but you can set the 'NOPERLDOC' - environment variable and 'perldoc' will not be used. + This can’t always be detected, but you can set the ‘NOPERLDOC’ + environment variable and ‘perldoc’ will not be used. *-in-place* This is a quick-and-dirty installation option in case you already have an rsync or svn checkout of TeX Live. It will use the checkout as-is and will just do the necessary post-install. Be - warned that the file 'tlpkg/texlive.tlpdb' may be rewritten, that + warned that the file ‘tlpkg/texlive.tlpdb’ may be rewritten, that removal has to be done manually, and that the only realistic way to maintain this installation is to redo it from time to time. This option is not available via the installer interfaces. USE AT YOUR @@ -2525,7 +2526,7 @@ by either a space or '='. If this option is not given, the installer will create a log file in the root of the writable installation tree, for example, - '/usr/local/texlive/YYYY/install-tl.log' for the _YYYY_ release. + ‘/usr/local/texlive/YYYY/install-tl.log’ for the _YYYY_ release. *-no-cls* @@ -2537,23 +2538,23 @@ by either a space or '='. *-persistent-downloads* For network installs, activating this option makes the installer - try to set up a persistent connection using the 'Net::LWP' Perl + try to set up a persistent connection using the ‘Net::LWP’ Perl module. This opens only one connection between your computer and the server per session and reuses it, instead of initiating a new download for each package, which typically yields a significant speed-up. This option is turned on by default, and the installation program - will fall back to using 'wget' if this is not possible. To disable + will fall back to using ‘wget’ if this is not possible. To disable usage of LWP and persistent connections, use - '-no-persistent-downloads'. + ‘-no-persistent-downloads’. *-no-verify-downloads* - By default, if a GnuPG 'gpg' binary is found in PATH, downloads are + By default, if a GnuPG ‘gpg’ binary is found in PATH, downloads are verified against a cryptographic signature. This option disables such verification. The full description is in the Crytographic - Verification section of the 'tlmgr' documentation, e.g., + Verification section of the ‘tlmgr’ documentation, e.g., <https://tug.org/texlive/doc/tlmgr.html#CRYPTOGRAPHIC-VERIFICATION> *-non-admin* @@ -2570,7 +2571,7 @@ by either a space or '='. Print the TeX Live identifier for the detected platform (hardware/operating system) combination to standard output, and - exit. '-print-arch' is a synonym. + exit. ‘-print-arch’ is a synonym. *-profile* _profile_file_ @@ -2586,21 +2587,21 @@ by either a space or '='. *-scheme* _scheme_ Schemes are the highest level of package grouping in TeX Live; the - default is to use the 'full' scheme, which includes everything. + default is to use the ‘full’ scheme, which includes everything. This option overrides that default. You can change the scheme again before the actual installation with the usual menu. The - _scheme_ argument may optionally have a prefix 'scheme-'. The list + _scheme_ argument may optionally have a prefix ‘scheme-’. The list of supported scheme names depends on what your package repository provides; see the interactive menu list. *-v* Include verbose debugging messages; repeat for maximum debugging: - '-v -v'. (Further repeats are accepted but ignored.) + ‘-v -v’. (Further repeats are accepted but ignored.) -*-version*, *-version* +*-version*, *–version* - Output version information and exit. If '-v' is also given, the + Output version information and exit. If ‘-v’ is also given, the versions of the TeX Live modules used are also reported. @@ -2611,11 +2612,11 @@ A.6 PROFILES A _profile_ file contains all the values needed to perform an installation. After a normal installation has finished, a profile for -that exact installation is written to the file 'tlpkg/texlive.profile'. -In addition, from the text menu one can select 'P' to save the current +that exact installation is written to the file ‘tlpkg/texlive.profile’. +In addition, from the text menu one can select ‘P’ to save the current setup as a profile at any time. - Such a profile file can be given as the argument to '-profile', for + Such a profile file can be given as the argument to ‘-profile’, for example to redo the exact same installation on a different system. Alternatively, you can use a custom profile, most easily created by starting from a generated one and changing values, or an empty file, @@ -2623,19 +2624,19 @@ which will take all the defaults. As mentioned above, the installer only supports selection by scheme and collections, not individual packages, so packages cannot be -specified in profile files either. Use 'tlmgr' to work at the package +specified in profile files either. Use ‘tlmgr’ to work at the package level. Within a profile file, each line consists of _variable_ [_value_] - except for comment lines starting with '#'. The possible variable -names are listed below. Values, when present, are either '0' or '1' for + except for comment lines starting with ‘#’. The possible variable +names are listed below. Values, when present, are either ‘0’ or ‘1’ for booleans, or strings (which must be specified without any quote characters). Leading whitespace is ignored. - If the variable 'selected_scheme' is defined and _no_ collection + If the variable ‘selected_scheme’ is defined and _no_ collection variables at all are defined, then the collections required by the specified scheme (which might change over time) are installed, without explicitly listing them. This eases maintenance of profile files. If @@ -2648,21 +2649,21 @@ collections must be given explicitly. along with definitions for the installation directories (given below under "path options") suffices to install the "small" scheme with all -default options. The schemes are described in the 'S' menu in the text +default options. The schemes are described in the ‘S’ menu in the text installer, or equivalent. - Besides 'selected_scheme', here is the list of variable names + Besides ‘selected_scheme’, here is the list of variable names supported in a profile: - *collection options* (prefix 'collection-') + *collection options* (prefix ‘collection-’) Collections are specified with a variable name with the prefix -'collection-' followed by a collection name; there is no value. For -instance, 'collection-basic'. The collections are described in the 'C' +‘collection-’ followed by a collection name; there is no value. For +instance, ‘collection-basic’. The collections are described in the ‘C’ menu. Schemes and collections (and packages) are ultimately defined by the -files in the 'tlpkg/tlpsrc/' source directory. +files in the ‘tlpkg/tlpsrc/’ source directory. *path options* @@ -2678,34 +2679,34 @@ value that could cause problems later. TEXMFSYSCONFIG TEXMFSYSVAR - *installer options* (prefix 'instopt_') + *installer options* (prefix ‘instopt_’) -'instopt_adjustpath' (default 0 on Unix, 1 on Windows) +‘instopt_adjustpath’ (default 0 on Unix, 1 on Windows) - Adjust 'PATH' environment variable. + Adjust ‘PATH’ environment variable. -'instopt_adjustrepo' (default 1) +‘instopt_adjustrepo’ (default 1) Set remote repository to a multiplexed CTAN mirror after - installation; see '-repository' above. + installation; see ‘-repository’ above. -'instopt_letter' (default 0) +‘instopt_letter’ (default 0) Set letter size paper as the default, instead of a4. -'instopt_portable' (default 0) +‘instopt_portable’ (default 0) Install for portable use, e.g., on a USB stick. -'instopt_write18_restricted' (default 1) +‘instopt_write18_restricted’ (default 1) - Enable '\write18' for a restricted set of programs. + Enable ‘\write18’ for a restricted set of programs. - *tlpdb options* (prefix 'tlpdbopt_') + *tlpdb options* (prefix ‘tlpdbopt_’) - The definitive list is given in 'tlpkg/TeXLive/TLConfig.pm', in the -hash '%TeXLive::TLConfig::TLPDBOptions', together with explanations. -All items given there _except_ for 'tlpdbopt_location' can be specified. + The definitive list is given in ‘tlpkg/TeXLive/TLConfig.pm’, in the +hash ‘%TeXLive::TLConfig::TLPDBOptions’, together with explanations. +All items given there _except_ for ‘tlpdbopt_location’ can be specified. Here is the current list: tlpdbopt_autobackup @@ -2722,18 +2723,18 @@ Here is the current list: tlpdbopt_sys_man tlpdbopt_w32_multi_user - *platform options* (prefix 'binary_') + *platform options* (prefix ‘binary_’) - For each supported platform in TeX Live (directories under 'bin/'), -the variable 'binary_'_PLATFORM_ can be set with value 1. For example: + For each supported platform in TeX Live (directories under ‘bin/’), +the variable ‘binary_’_PLATFORM_ can be set with value 1. For example: binary_x86_64-linux 1 - If no 'binary_' settings are made, the default is whatever the + If no ‘binary_’ settings are made, the default is whatever the current machine is running. In releases before 2017, many profile variables had different names -(not documented here; see the 'install-tl' source). They are accepted +(not documented here; see the ‘install-tl’ source). They are accepted and transformed to the names given above. When a profile is written, the names above are always used. @@ -2746,72 +2747,72 @@ File: tlbuild.info, Node: install-tl ENVIRONMENT VARIABLES, Next: install-tl A A.7 ENVIRONMENT VARIABLES ========================= -For ease in scripting and debugging, 'install-tl' looks for the +For ease in scripting and debugging, ‘install-tl’ looks for the following environment variables. They are not of interest for normal user installations. -'TEXLIVE_DOWNLOADER' +‘TEXLIVE_DOWNLOADER’ -'TL_DOWNLOAD_PROGRAM' +‘TL_DOWNLOAD_PROGRAM’ -'TL_DOWNLOAD_ARGS' +‘TL_DOWNLOAD_ARGS’ These override the normal choice of a download program; see the - 'tlmgr' documentation, e.g., + ‘tlmgr’ documentation, e.g., <https://tug.org/texlive/doc/tlmgr.html#ENVIRONMENT-VARIABLES>. -'TEXLIVE_INSTALL_ENV_NOCHECK' +‘TEXLIVE_INSTALL_ENV_NOCHECK’ Omit the check for environment variables containing the string - 'tex'. People developing TeX-related software are likely to have + ‘tex’. People developing TeX-related software are likely to have many such variables. -'TEXLIVE_INSTALL_NO_CONTEXT_CACHE' +‘TEXLIVE_INSTALL_NO_CONTEXT_CACHE’ Omit creating the ConTeXt cache. This is useful for redistributors. -'TEXLIVE_INSTALL_NO_RESUME' +‘TEXLIVE_INSTALL_NO_RESUME’ Omit check for installing on top of a previous installation and then asking about importing previous settings. -'TEXLIVE_INSTALL_NO_WELCOME' +‘TEXLIVE_INSTALL_NO_WELCOME’ Omit printing the welcome message after successful installation, e.g., when testing. -'TEXLIVE_INSTALL_PAPER' +‘TEXLIVE_INSTALL_PAPER’ Set the default paper size for all relevant programs; must be - either 'letter' or 'a4'. The default is 'a4'. + either ‘letter’ or ‘a4’. The default is ‘a4’. -'TEXLIVE_INSTALL_PREFIX' +‘TEXLIVE_INSTALL_PREFIX’ -'TEXLIVE_INSTALL_TEXMFCONFIG' +‘TEXLIVE_INSTALL_TEXMFCONFIG’ -'TEXLIVE_INSTALL_TEXMFVAR' +‘TEXLIVE_INSTALL_TEXMFVAR’ -'TEXLIVE_INSTALL_TEXMFHOME' +‘TEXLIVE_INSTALL_TEXMFHOME’ -'TEXLIVE_INSTALL_TEXMFLOCAL' +‘TEXLIVE_INSTALL_TEXMFLOCAL’ -'TEXLIVE_INSTALL_TEXMFSYSCONFIG' +‘TEXLIVE_INSTALL_TEXMFSYSCONFIG’ -'TEXLIVE_INSTALL_TEXMFSYSVAR' +‘TEXLIVE_INSTALL_TEXMFSYSVAR’ - Specify the respective directories. 'TEXLIVE_INSTALL_PREFIX' - defaults to '/usr/local/texlive'. All the defaults can be seen by - running the installer interactively and then typing 'D' for the + Specify the respective directories. ‘TEXLIVE_INSTALL_PREFIX’ + defaults to ‘/usr/local/texlive’. All the defaults can be seen by + running the installer interactively and then typing ‘D’ for the directory menu. - To override the so-called 'TEXDIR', which defaults to the release - directory within that prefix, e.g., '/usr/local/texlive/2020', use + To override the so-called ‘TEXDIR’, which defaults to the release + directory within that prefix, e.g., ‘/usr/local/texlive/2020’, use a profile file (q.v.). -'NOPERLDOC' +‘NOPERLDOC’ - Don't try to run the '--help' message through 'perldoc'. + Don’t try to run the ‘--help’ message through ‘perldoc’. File: tlbuild.info, Node: install-tl AUTHORS AND COPYRIGHT, Prev: install-tl ENVIRONMENT VARIABLES, Up: install-tl @@ -2877,7 +2878,7 @@ installing TeX Live, see <https://tug.org/texlive/acquire.html>. The most up-to-date version of this documentation (updated nightly from the development sources) is available at <https://tug.org/texlive/tlmgr.html>, along with procedures for updating -'tlmgr' itself and information about test versions. +‘tlmgr’ itself and information about test versions. TeX Live is organized into a few top-level _schemes_, each of which is specified as a different set of _collections_ and _packages_, where a @@ -2896,39 +2897,39 @@ B.4 EXAMPLES ============ After successfully installing TeX Live, here are a few common operations -with 'tlmgr': +with ‘tlmgr’: -'tlmgr option repository ctan' +‘tlmgr option repository ctan’ -'tlmgr option repository https://mirror.ctan.org/systems/texlive/tlnet' +‘tlmgr option repository https://mirror.ctan.org/systems/texlive/tlnet’ - Tell 'tlmgr' to use a nearby CTAN mirror for future updates; useful + Tell ‘tlmgr’ to use a nearby CTAN mirror for future updates; useful if you installed TeX Live from the DVD image and want to have - continuing updates. The two commands are equivalent; 'ctan' is + continuing updates. The two commands are equivalent; ‘ctan’ is just an alias for the given url. - Caveat: 'mirror.ctan.org' resolves to many different hosts, and + Caveat: ‘mirror.ctan.org’ resolves to many different hosts, and they are not perfectly synchronized; we recommend updating only daily (at most), and not more often. You can choose a particular mirror if problems; the list of all CTAN mirrors with the status of each is at <https://ctan.org/mirrors/mirmon>. -'tlmgr update --list' +‘tlmgr update --list’ Report what would be updated without actually updating anything. -'tlmgr update --all' +‘tlmgr update --all’ Make your local TeX installation correspond to what is in the package repository (typically useful when updating from CTAN). -'tlmgr info' _what_ +‘tlmgr info’ _what_ Display detailed information about a package _what_, such as the installation status and description, of searches for _what_ in all packages. - For all the capabilities and details of 'tlmgr', please read the + For all the capabilities and details of ‘tlmgr’, please read the following voluminous information. @@ -2937,23 +2938,23 @@ File: tlbuild.info, Node: tlmgr OPTIONS, Next: tlmgr ACTIONS, Prev: tlmgr EXA B.5 OPTIONS =========== -The following options to 'tlmgr' are global options, not specific to any +The following options to ‘tlmgr’ are global options, not specific to any action. All options, whether global or action-specific, can be given anywhere on the command line, and in any order. The first non-option -argument will be the main action. In all cases, '--'_option_ and -'-'_option_ are equivalent, and an '=' is optional between an option +argument will be the main action. In all cases, ‘--’_option_ and +‘-’_option_ are equivalent, and an ‘=’ is optional between an option name and its value. -*-repository* _url|path_ +*–repository* _url|path_ Specify the package repository from which packages should be installed or updated, either a local directory or network location, as below. This overridesthe default package repository found in - the installation's TeX Live Package Database (a.k.a. the TLPDB, - which is given entirely in the file 'tlpkg/texlive.tlpdb'). + the installation’s TeX Live Package Database (a.k.a. the TLPDB, + which is given entirely in the file ‘tlpkg/texlive.tlpdb’). - This '--repository' option changes the location only for the - current run; to make a permanent change, use 'option repository' + This ‘--repository’ option changes the location only for the + current run; to make a permanent change, use ‘option repository’ (see the *note option: tlmgr option. action). As an example, you can choose a particular CTAN mirror with @@ -2965,75 +2966,75 @@ name and its value. directory have to be specified. The list of CTAN mirrors is available at <https://ctan.org/mirrors/mirmon>. - Here's an example of using a local directory: + Here’s an example of using a local directory: -repository /local/TL/repository - For backward compatibility and convenience, '--location' and - '--repo' are accepted as aliases for this option. + For backward compatibility and convenience, ‘--location’ and + ‘--repo’ are accepted as aliases for this option. Locations can be specified as any of the following: - '/some/local/dir' + ‘/some/local/dir’ - 'file:/some/local/dir' + ‘file:/some/local/dir’ Equivalent ways of specifying a local directory. - 'ctan' + ‘ctan’ - 'https://mirror.ctan.org/systems/texlive/tlnet' + ‘https://mirror.ctan.org/systems/texlive/tlnet’ Pick a CTAN mirror automatically, trying for one that is both nearby and up-to-date. The chosen mirror is used for the - entire download. The bare 'ctan' is merely an alias for the + entire download. The bare ‘ctan’ is merely an alias for the full url. (See <https://ctan.org> for more about CTAN and its mirrors.) - 'http://server/path/to/tlnet' + ‘http://server/path/to/tlnet’ Standard HTTP. If the (default) LWP method is used, persistent - connections are supported. TL can also use 'curl' or 'wget' + connections are supported. TL can also use ‘curl’ or ‘wget’ to do the downloads, or an arbitrary user-specified program, - as described in the 'tlmgr' documentation + as described in the ‘tlmgr’ documentation (<https://tug.org/texlive/doc/tlmgr.html#ENVIRONMENT-VARIABLES>). - 'https://server/path/to/tlnet' + ‘https://server/path/to/tlnet’ Again, if the (default) LWP method is used, this supports persistent connections. Unfortunately, some versions of - 'wget' and 'curl' do not support https, and even when 'wget' + ‘wget’ and ‘curl’ do not support https, and even when ‘wget’ supports https, certificates may be rejected even when the certificate is fine, due to a lack of local certificate roots. The simplest workaround for this problem is to use http or ftp. - 'ftp://server/path/to/tlnet' + ‘ftp://server/path/to/tlnet’ If the (default) LWP method is used, persistent connections are supported. - 'user@machine:/path/to/tlnet' + ‘user@machine:/path/to/tlnet’ - 'scp://user@machine/path/to/tlnet' + ‘scp://user@machine/path/to/tlnet’ - 'ssh://user@machine/path/to/tlnet' + ‘ssh://user@machine/path/to/tlnet’ - These forms are equivalent; they all use 'scp' to transfer - files. Using 'ssh-agent' is recommended. (Info: + These forms are equivalent; they all use ‘scp’ to transfer + files. Using ‘ssh-agent’ is recommended. (Info: <https://en.wikipedia.org/wiki/OpenSSH>, <https://en.wikipedia.org/wiki/Ssh-agent>.) - If the repository is on the network, trailing '/' characters and/or - trailing '/tlpkg' and/or '/archive' components are ignored. + If the repository is on the network, trailing ‘/’ characters and/or + trailing ‘/tlpkg’ and/or ‘/archive’ components are ignored. -*-gui* [_action_] +*–gui* [_action_] - Two notable GUI front-ends for 'tlmgr', 'tlshell' and 'tlcockpit', + Two notable GUI front-ends for ‘tlmgr’, ‘tlshell’ and ‘tlcockpit’, are started up as separate programs; see their own documentation. - 'tlmgr' itself has a graphical interface as well as the command - line interface. You can give the option to invoke it, '--gui', + ‘tlmgr’ itself has a graphical interface as well as the command + line interface. You can give the option to invoke it, ‘--gui’, together with an action to be brought directly into the respective screen of the GUI. For example, running @@ -3044,14 +3045,14 @@ name and its value. TLMGR: tlmgr GUI FOR TLMGR. However, the native GUI requires Perl/TK, which is no longer - included in TeX Live's Perl distribution for Windows. You may find - 'tlshell' or 'tlcockpit' easier to work with. + included in TeX Live’s Perl distribution for Windows. You may find + ‘tlshell’ or ‘tlcockpit’ easier to work with. -*-gui-lang* _llcode_ +*–gui-lang* _llcode_ By default, the GUI tries to deduce your language from the environment (on Windows via the registry, on Unix via - 'LC_MESSAGES'). If that fails you can select a different language + ‘LC_MESSAGES’). If that fails you can select a different language by giving this option with a language code (based on ISO 639-1). Currently supported (but not necessarily completely translated) are: English (en, default), Czech (cs), German (de), French (fr), @@ -3062,92 +3063,92 @@ name and its value. tlshell shares its message catalog with tlmgr. -*-command-logfile* _file_ +*–command-logfile* _file_ - 'tlmgr' logs the output of all programs invoked (mktexlr, mtxrun, + ‘tlmgr’ logs the output of all programs invoked (mktexlr, mtxrun, fmtutil, updmap) to a separate log file, by default - 'TEXMFSYSVAR/web2c/tlmgr-commands.log'. This option allows you to + ‘TEXMFSYSVAR/web2c/tlmgr-commands.log’. This option allows you to specify a different file for the log. -*-debug-translation* +*–debug-translation* - In GUI mode, this switch tells 'tlmgr' to report any untranslated + In GUI mode, this switch tells ‘tlmgr’ to report any untranslated (or missing) messages to standard error. This can help translators to see what remains to be done. -*-machine-readable* +*–machine-readable* Instead of the normal output intended for human consumption, write (to standard output) a fixed format more suitable for machine parsing. See the *note MACHINE-READABLE OUTPUT: tlmgr MACHINE-READABLE OUTPUT. section below. -*-no-execute-actions* +*–no-execute-actions* Suppress the execution of the execute actions as defined in the tlpsrc files. Documented only for completeness, as this is only useful in debugging. -*-package-logfile* _file_ +*–package-logfile* _file_ - 'tlmgr' logs all package actions (install, remove, update, failed + ‘tlmgr’ logs all package actions (install, remove, update, failed updates, failed restores) to a separate log file, by default - 'TEXMFSYSVAR/web2c/tlmgr.log'. This option allows you to specify a + ‘TEXMFSYSVAR/web2c/tlmgr.log’. This option allows you to specify a different file for the log. -*-pause* +*–pause* - This option makes 'tlmgr' wait for user input before exiting. + This option makes ‘tlmgr’ wait for user input before exiting. Useful on Windows to avoid disappearing command windows. -*-persistent-downloads* +*–persistent-downloads* -*-no-persistent-downloads* +*–no-persistent-downloads* For network-based installations, this option (on by default) makes - 'tlmgr' try to set up a persistent connection (using the 'LWP' Perl + ‘tlmgr’ try to set up a persistent connection (using the ‘LWP’ Perl module). The idea is to open and reuse only one connection per session between your computer and the server, instead of initiating a new download for each package. - If this is not possible, 'tlmgr' will fall back to using 'wget'. + If this is not possible, ‘tlmgr’ will fall back to using ‘wget’. To disable these persistent connections, use - '--no-persistent-downloads'. + ‘--no-persistent-downloads’. -*-pin-file* +*–pin-file* Change the pinning file location from - 'TEXMFLOCAL/tlpkg/pinning.txt' (see *note Pinning: tlmgr Pinning. + ‘TEXMFLOCAL/tlpkg/pinning.txt’ (see *note Pinning: tlmgr Pinning. below). Documented only for completeness, as this is only useful in debugging. -*-usermode* +*–usermode* - Activates user mode for this run of 'tlmgr'; see *note USER MODE: + Activates user mode for this run of ‘tlmgr’; see *note USER MODE: tlmgr USER MODE. below. -*-usertree* _dir_ +*–usertree* _dir_ Uses _dir_ for the tree in user mode; see *note USER MODE: tlmgr USER MODE. below. -*-verify-repo=[none|main|all]* +*–verify-repo=[none|main|all]* - Defines the level of verification done: If 'none' is specified, no - verification whatsoever is done. If 'main' is given and a working - GnuPG ('gpg') binary is available, all repositories are checked, - but only the main repository is required to be signed. If 'all' is + Defines the level of verification done: If ‘none’ is specified, no + verification whatsoever is done. If ‘main’ is given and a working + GnuPG (‘gpg’) binary is available, all repositories are checked, + but only the main repository is required to be signed. If ‘all’ is given, then all repositories need to be signed. See *note CRYPTOGRAPHIC VERIFICATION: tlmgr CRYPTOGRAPHIC VERIFICATION. below for details. The standard options for TeX Live programs are also accepted: -'--help/-h/-?', '--version', '-q' (no informational messages), '-v' +‘--help/-h/-?’, ‘--version’, ‘-q’ (no informational messages), ‘-v’ (debugging messages, can be repeated). For the details about these, see -the 'TeXLive::TLUtils' documentation. +the ‘TeXLive::TLUtils’ documentation. - The '--version' option shows version information about the TeX Live -release and about the 'tlmgr' script itself. If '-v' is also given, + The ‘--version’ option shows version information about the TeX Live +release and about the ‘tlmgr’ script itself. If ‘-v’ is also given, revision number for the loaded TeX Live Perl modules are shown, too. @@ -3195,12 +3196,12 @@ File: tlbuild.info, Node: tlmgr help, Next: tlmgr version, Up: tlmgr ACTIONS B.6.1 help ---------- -Display this help information and exit (same as '--help', and on the web -at <https://tug.org/texlive/doc/tlmgr.html>). Sometimes the 'perldoc' -and/or 'PAGER' programs on the system have problems, resulting in -control characters being literally output. This can't always be -detected, but you can set the 'NOPERLDOC' environment variable and -'perldoc' will not be used. +Display this help information and exit (same as ‘--help’, and on the web +at <https://tug.org/texlive/doc/tlmgr.html>). Sometimes the ‘perldoc’ +and/or ‘PAGER’ programs on the system have problems, resulting in +control characters being literally output. This can’t always be +detected, but you can set the ‘NOPERLDOC’ environment variable and +‘perldoc’ will not be used. File: tlbuild.info, Node: tlmgr version, Next: tlmgr backup, Prev: tlmgr help, Up: tlmgr ACTIONS @@ -3208,9 +3209,9 @@ File: tlbuild.info, Node: tlmgr version, Next: tlmgr backup, Prev: tlmgr help B.6.2 version ------------- -Gives version information (same as '--version'). +Gives version information (same as ‘--version’). - If '-v' has been given the revisions of the used modules are + If ‘-v’ has been given the revisions of the used modules are reported, too. @@ -3219,51 +3220,51 @@ File: tlbuild.info, Node: tlmgr backup, Next: tlmgr candidates _pkg_, Prev: t B.6.3 backup ------------ -*backup [_option_...] -all* +*backup [_option_...] –all* *backup [_option_...] _pkg_...* - If the '--clean' option is not specified, this action makes a - backup of the given packages, or all packages given '--all'. These - backups are saved to the value of the '--backupdir' option, if that - is an existing and writable directory. If '--backupdir' is not - given, the 'backupdir' option setting in the TLPDB is used, if + If the ‘--clean’ option is not specified, this action makes a + backup of the given packages, or all packages given ‘--all’. These + backups are saved to the value of the ‘--backupdir’ option, if that + is an existing and writable directory. If ‘--backupdir’ is not + given, the ‘backupdir’ option setting in the TLPDB is used, if present. If both are missing, no backups are made. (The installer - sets 'backupdir' to '.../tlpkg/backups', under the TL root + sets ‘backupdir’ to ‘.../tlpkg/backups’, under the TL root installation directory, so it is usually defined; see the *note option: tlmgr option. description for more information.) - If the '--clean' option is specified, backups are pruned (removed) + If the ‘--clean’ option is specified, backups are pruned (removed) instead of saved. The optional integer value _N_ may be specified to set the number of backups that will be retained when cleaning. - If 'N' is not given, the value of the 'autobackup' option is used. + If ‘N’ is not given, the value of the ‘autobackup’ option is used. If both are missing, an error is issued. For more details of - backup pruning, see the 'option' action. + backup pruning, see the ‘option’ action. Options: - *-backupdir* _directory_ + *–backupdir* _directory_ - Overrides the 'backupdir' option setting in the TLPDB. The + Overrides the ‘backupdir’ option setting in the TLPDB. The _directory_ argument is required and must specify an existing, writable directory where backups are to be placed. - *-all* + *–all* - If '--clean' is not specified, make a backup of all packages + If ‘--clean’ is not specified, make a backup of all packages in the TeX Live installation; this will take quite a lot of - space and time. If '--clean' is specified, all packages are + space and time. If ‘--clean’ is specified, all packages are pruned. - *-clean*[=_N_] + *–clean*[=_N_] Instead of making backups, prune the backup directory of old backups, as explained above. The optional integer argument - _N_ overrides the 'autobackup' option set in the TLPDB. You - must use '--all' or a list of packages together with this + _N_ overrides the ‘autobackup’ option set in the TLPDB. You + must use ‘--all’ or a list of packages together with this option, as desired. - *-dry-run* + *–dry-run* Nothing is actually backed up or removed; instead, the actions to be performed are written to the terminal. @@ -3285,7 +3286,7 @@ B.6.5 check [_option_...] [depends|executes|files|runfiles|texmfdbs|all] Execute one (or all) check(s) of the consistency of the installation. If no problems are found, there will be no output. (To get a view of -what is being done, run 'tlmgr -v check'.) +what is being done, run ‘tlmgr -v check’.) *depends* @@ -3293,17 +3294,17 @@ what is being done, run 'tlmgr -v check'.) collection, but are themselves not installed, and those packages which are not contained in any collection. - If you call 'tlmgr check collections' this test will be carried out - instead since former versions for 'tlmgr' called it that way. + If you call ‘tlmgr check collections’ this test will be carried out + instead since former versions for ‘tlmgr’ called it that way. *executes* - Check that the files referred to by 'execute' directives in the TeX + Check that the files referred to by ‘execute’ directives in the TeX Live Database are present. *files* - Checks that all files listed in the local TLPDB ('texlive.tlpdb') + Checks that all files listed in the local TLPDB (‘texlive.tlpdb’) are actually present, and lists those missing. *runfiles* @@ -3313,23 +3314,23 @@ what is being done, run 'tlmgr -v check'.) *texmfdbs* - Checks related to the 'ls-R' files. If you have defined new trees, - or changed the 'TEXMF' or 'TEXMFDBS' variables, it can't hurt to + Checks related to the ‘ls-R’ files. If you have defined new trees, + or changed the ‘TEXMF’ or ‘TEXMFDBS’ variables, it can’t hurt to run this. It checks that: - - all items in 'TEXMFDBS' have the '!!' prefix. + - all items in ‘TEXMFDBS’ have the ‘!!’ prefix. - - all items in 'TEXMFBDS' have an 'ls-R' file (if they exist at all). + - all items in ‘TEXMFBDS’ have an ‘ls-R’ file (if they exist at all). - - all items in 'TEXMF' with '!!' are listed in 'TEXMFDBS'. + - all items in ‘TEXMF’ with ‘!!’ are listed in ‘TEXMFDBS’. - - all items in 'TEXMF' with an 'ls-R' file are listed in 'TEXMFDBS'. + - all items in ‘TEXMF’ with an ‘ls-R’ file are listed in ‘TEXMFDBS’. Options: -*-use-svn* +*–use-svn* - Use the output of 'svn status' instead of listing the files; for + Use the output of ‘svn status’ instead of listing the files; for checking the TL development repository. (This is run nightly.) @@ -3338,52 +3339,52 @@ File: tlbuild.info, Node: tlmgr conf, Next: tlmgr dump-tlpdb [_option_...] [-- B.6.6 conf ---------- -*conf [texmf|tlmgr|updmap [-conffile _file_] [-delete] [_key_ [_value_]]]* +*conf [texmf|tlmgr|updmap [–conffile _file_] [–delete] [_key_ [_value_]]]* -*conf auxtrees [-conffile _file_] [show|add|remove] [_value_]* +*conf auxtrees [–conffile _file_] [show|add|remove] [_value_]* - With only 'conf', show general configuration information for TeX + With only ‘conf’, show general configuration information for TeX Live, including active configuration files, path settings, and - more. This is like running 'texconfig conf', but works on all + more. This is like running ‘texconfig conf’, but works on all supported platforms. - With one of 'conf texmf', 'conf tlmgr', or 'conf updmap', shows all - key/value pairs (i.e., all settings) as saved in 'ROOT/texmf.cnf', - the user-specific 'tlmgr' configuration file (see below), or the - first found (via 'kpsewhich') 'updmap.cfg' file, respectively. + With one of ‘conf texmf’, ‘conf tlmgr’, or ‘conf updmap’, shows all + key/value pairs (i.e., all settings) as saved in ‘ROOT/texmf.cnf’, + the user-specific ‘tlmgr’ configuration file (see below), or the + first found (via ‘kpsewhich’) ‘updmap.cfg’ file, respectively. If _key_ is given in addition, shows the value of only that _key_ - in the respective file. If option _-delete_ is also given, the + in the respective file. If option _–delete_ is also given, the value in the given configuration file is entirely removed (not just commented out). If _value_ is given in addition, _key_ is set to _value_ in the respective file. _No error checking is done!_ - The 'PATH' value shown by 'conf' is as used by 'tlmgr'. The - directory in which the 'tlmgr' executable is found is automatically + The ‘PATH’ value shown by ‘conf’ is as used by ‘tlmgr’. The + directory in which the ‘tlmgr’ executable is found is automatically prepended to the PATH value inherited from the environment. Here is a practical example of changing configuration values. If - the execution of (some or all) system commands via '\write18' was + the execution of (some or all) system commands via ‘\write18’ was left enabled during installation, you can disable it afterwards: tlmgr conf texmf shell_escape 0 - The subcommand 'auxtrees' allows adding and removing arbitrary - additional texmf trees, completely under user control. 'auxtrees - show' shows the list of additional trees, 'auxtrees add' _tree_ - adds a tree to the list, and 'auxtrees remove' _tree_ removes a + The subcommand ‘auxtrees’ allows adding and removing arbitrary + additional texmf trees, completely under user control. ‘auxtrees + show’ shows the list of additional trees, ‘auxtrees add’ _tree_ + adds a tree to the list, and ‘auxtrees remove’ _tree_ removes a tree from the list (if present). The trees should not contain an - 'ls-R' file (or files will not be found if the 'ls-R' becomes + ‘ls-R’ file (or files will not be found if the ‘ls-R’ becomes stale). This works by manipulating the Kpathsea variable - 'TEXMFAUXTREES', in (by default) 'ROOT/texmf.cnf'. Example: + ‘TEXMFAUXTREES’, in (by default) ‘ROOT/texmf.cnf’. Example: tlmgr conf auxtrees add /quick/test/tree tlmgr conf auxtrees remove /quick/test/tree In all cases the configuration file can be explicitly specified via - the option '--conffile' _file_, e.g., if you don't want to change + the option ‘--conffile’ _file_, e.g., if you don’t want to change the system-wide configuration. Warning: The general facility for changing configuration values is @@ -3394,37 +3395,37 @@ B.6.6 conf File: tlbuild.info, Node: tlmgr dump-tlpdb [_option_...] [--json], Next: tlmgr generate, Prev: tlmgr conf, Up: tlmgr ACTIONS -B.6.7 dump-tlpdb [_option_...] [-json] +B.6.7 dump-tlpdb [_option_...] [–json] -------------------------------------- Dump complete local or remote TLPDB to standard output, as-is. The -output is analogous to the '--machine-readable' output; see *note +output is analogous to the ‘--machine-readable’ output; see *note MACHINE-READABLE OUTPUT: tlmgr MACHINE-READABLE OUTPUT. section. Options: -*-local* +*–local* Dump the local TLPDB. -*-remote* +*–remote* Dump the remote TLPDB. -*-json* +*–json* Instead of dumping the actual content, the database is dumped as JSON. For the format of JSON output see - 'tlpkg/doc/JSON-formats.txt', format definition 'TLPDB'. + ‘tlpkg/doc/JSON-formats.txt’, format definition ‘TLPDB’. - Exactly one of '--local' and '--remote' must be given. + Exactly one of ‘--local’ and ‘--remote’ must be given. In either case, the first line of the output specifies the repository location, in this format: "location-url" "\t" location - where 'location-url' is the literal field name, followed by a tab, + where ‘location-url’ is the literal field name, followed by a tab, and _location_ is the file or url to the repository. Line endings may be either LF or CRLF depending on the current @@ -3444,34 +3445,34 @@ B.6.8 generate *generate [_option_...] language.dat.lua* - The 'generate' action overwrites any manual changes made in the + The ‘generate’ action overwrites any manual changes made in the respective files: it recreates them from scratch based on the information of the installed packages, plus local adaptions. The TeX -Live installer and 'tlmgr' routinely call 'generate' for all of these +Live installer and ‘tlmgr’ routinely call ‘generate’ for all of these files. - For managing your own fonts, please read the 'updmap --help' + For managing your own fonts, please read the ‘updmap --help’ information and/or <https://tug.org/fonts/fontinstall.html>. - For managing your own formats, please read the 'fmtutil --help' + For managing your own formats, please read the ‘fmtutil --help’ information. - In more detail: 'generate' remakes any of the configuration files -'language.dat', 'language.def', and 'language.dat.lua' from the + In more detail: ‘generate’ remakes any of the configuration files +‘language.dat’, ‘language.def’, and ‘language.dat.lua’ from the information present in the local TLPDB, plus locally-maintained files. - The locally-maintained files are 'language-local.dat', -'language-local.def', or 'language-local.dat.lua', searched for in -'TEXMFLOCAL' in the respective directories. If local additions are + The locally-maintained files are ‘language-local.dat’, +‘language-local.def’, or ‘language-local.dat.lua’, searched for in +‘TEXMFLOCAL’ in the respective directories. If local additions are present, the final file is made by starting with the main file, omitting any entries that the local file specifies to be disabled, and finally appending the local file. - (Historical note: The formerly supported 'updmap-local.cfg' and -'fmtutil-local.cnf' are no longer read, since 'updmap' and 'fmtutil' now + (Historical note: The formerly supported ‘updmap-local.cfg’ and +‘fmtutil-local.cnf’ are no longer read, since ‘updmap’ and ‘fmtutil’ now reads and supports multiple configuration files. Thus, local additions -can and should be put into an 'updmap.cfg' of 'fmtutil.cnf' file in -'TEXMFLOCAL'. The 'generate updmap' and 'generate fmtutil' actions no +can and should be put into an ‘updmap.cfg’ of ‘fmtutil.cnf’ file in +‘TEXMFLOCAL’. The ‘generate updmap’ and ‘generate fmtutil’ actions no longer exist.) Local files specify entries to be disabled with a comment line, @@ -3480,50 +3481,50 @@ namely one of these: %!NAME --!NAME - where 'language.dat' and 'language.def' use '%', and -'language.dat.lua' use '--'. In all cases, the _name_ is the respective + where ‘language.dat’ and ‘language.def’ use ‘%’, and +‘language.dat.lua’ use ‘--’. In all cases, the _name_ is the respective format name or hyphenation pattern identifier. Examples: %!german --!usenglishmax - (Of course, you're not likely to actually want to disable those -particular items. They're just examples.) + (Of course, you’re not likely to actually want to disable those +particular items. They’re just examples.) After such a disabling line, the local file can include another entry for the same item, if a different definition is desired. In general, except for the special disabling lines, the local files follow the same syntax as the master files. - The form 'generate language' recreates all three files -'language.dat', 'language.def', and 'language.dat.lua', while the forms + The form ‘generate language’ recreates all three files +‘language.dat’, ‘language.def’, and ‘language.dat.lua’, while the forms with an extension recreates only that given language file. Options: -*-dest* _output_file_ +*–dest* _output_file_ specifies the output file (defaults to the respective location in - 'TEXMFSYSVAR'). If '--dest' is given to 'generate language', it - serves as a basename onto which '.dat' will be appended for the - name of the 'language.dat' output file, '.def' will be appended to - the value for the name of the 'language.def' output file, and - '.dat.lua' to the name of the 'language.dat.lua' file. (This is + ‘TEXMFSYSVAR’). If ‘--dest’ is given to ‘generate language’, it + serves as a basename onto which ‘.dat’ will be appended for the + name of the ‘language.dat’ output file, ‘.def’ will be appended to + the value for the name of the ‘language.def’ output file, and + ‘.dat.lua’ to the name of the ‘language.dat.lua’ file. (This is just to avoid overwriting; if you want a specific name for each - output file, we recommend invoking 'tlmgr' twice.) + output file, we recommend invoking ‘tlmgr’ twice.) -*-localcfg* _local_conf_file_ +*–localcfg* _local_conf_file_ specifies the (optional) local additions (defaults to the - respective location in 'TEXMFLOCAL'). + respective location in ‘TEXMFLOCAL’). -*-rebuild-sys* +*–rebuild-sys* - tells 'tlmgr' to run necessary programs after config files have - been regenerated. These are: 'fmtutil-sys --all' after 'generate - fmtutil', 'fmtutil-sys --byhyphen .../language.dat' after 'generate - language.dat', and 'fmtutil-sys --byhyphen .../language.def' after - 'generate language.def'. + tells ‘tlmgr’ to run necessary programs after config files have + been regenerated. These are: ‘fmtutil-sys --all’ after ‘generate + fmtutil’, ‘fmtutil-sys --byhyphen .../language.dat’ after ‘generate + language.dat’, and ‘fmtutil-sys --byhyphen .../language.def’ after + ‘generate language.def’. These subsequent calls cause the newly-generated files to actually take effect. This is not done by default since those calls are @@ -3557,9 +3558,9 @@ B.6.10 info *info [_option_...] schemes* With no argument, lists all packages available at the package - repository, prefixing those already installed with 'i'. + repository, prefixing those already installed with ‘i’. - With the single word 'collections' or 'schemes' as the argument, + With the single word ‘collections’ or ‘schemes’ as the argument, lists the request type instead of all packages. With any other arguments, display information about _pkg_: the @@ -3580,70 +3581,70 @@ B.6.10 info It also displays information taken from the TeX Catalogue, namely the package version, date, and license. Consider these, especially the package version, as approximations only, due to timing skew of - the updates of the different pieces. By contrast, the 'revision' + the updates of the different pieces. By contrast, the ‘revision’ value comes directly from TL and is reliable. - The former actions 'show' and 'list' are merged into this action, + The former actions ‘show’ and ‘list’ are merged into this action, but are still supported for backward compatibility. Options: - *-list* + *–list* - If the option '--list' is given with a package, the list of + If the option ‘--list’ is given with a package, the list of contained files is also shown, including those for platform-specific dependencies. When given with schemes and - collections, '--list' outputs their dependencies in a similar + collections, ‘--list’ outputs their dependencies in a similar way. - *-only-installed* + *–only-installed* If this option is given, the installation source will not be used; only locally installed packages, collections, or schemes are listed. - *-only-remote* + *–only-remote* Only list packages from the remote repository. Useful when - checking what is available in a remote repository using 'tlmgr - --repo ... --only-remote info'. Note that '--only-installed' - and '--only-remote' cannot both be specified. + checking what is available in a remote repository using ‘tlmgr + --repo ... --only-remote info’. Note that ‘--only-installed’ + and ‘--only-remote’ cannot both be specified. - *-data 'item1,item2,...'* + *–data ‘item1,item2,...’* - If the option '--data' is given, its argument must be a comma - or colon separated list of field names from: 'name', - 'category', 'localrev', 'remoterev', 'shortdesc', 'longdesc', - 'installed', 'size', 'relocatable', 'depends', 'cat-version', - 'cat-date', 'cat-license', plus various 'cat-contact-*' fields + If the option ‘--data’ is given, its argument must be a comma + or colon separated list of field names from: ‘name’, + ‘category’, ‘localrev’, ‘remoterev’, ‘shortdesc’, ‘longdesc’, + ‘installed’, ‘size’, ‘relocatable’, ‘depends’, ‘cat-version’, + ‘cat-date’, ‘cat-license’, plus various ‘cat-contact-*’ fields (see below). - The 'cat-*' fields all come from the TeX Catalogue + The ‘cat-*’ fields all come from the TeX Catalogue (<https://ctan.org/pkg/catalogue>). For each, there are two - more variants with prefix 'l' and 'r', e.g., 'lcat-version' - and 'rcat-version', which indicate the local and remote - information, respectively. The variants without 'l' and 'r' + more variants with prefix ‘l’ and ‘r’, e.g., ‘lcat-version’ + and ‘rcat-version’, which indicate the local and remote + information, respectively. The variants without ‘l’ and ‘r’ show the most current one, which is normally the remote value. - The requested packages' information is listed in CSV format, + The requested packages’ information is listed in CSV format, one package per line, and the column information is given by - the 'itemN'. The 'depends' column contains the names of all - the dependencies separated by ':' characters. + the ‘itemN’. The ‘depends’ column contains the names of all + the dependencies separated by ‘:’ characters. - At this writing, the 'cat-contact-*' fields include: 'home', - 'repository', 'support', 'bugs', 'announce', 'development'. + At this writing, the ‘cat-contact-*’ fields include: ‘home’, + ‘repository’, ‘support’, ‘bugs’, ‘announce’, ‘development’. Each may be empty or a url value. A brief description is on the CTAN upload page for new packages: <https://ctan.org/upload>. - *-json* + *–json* - In case '--json' is specified, the output is a JSON encoded + In case ‘--json’ is specified, the output is a JSON encoded array where each array element is the JSON representation of a - single 'TLPOBJ' but with additional information. For details - see 'tlpkg/doc/JSON-formats.txt', format definition: - 'TLPOBJINFO'. If both '--json' and '--data' are given, - '--json' takes precedence. + single ‘TLPOBJ’ but with additional information. For details + see ‘tlpkg/doc/JSON-formats.txt’, format definition: + ‘TLPOBJINFO’. If both ‘--json’ and ‘--data’ are given, + ‘--json’ takes precedence. File: tlbuild.info, Node: tlmgr init-usertree, Next: tlmgr install [_option_...] _pkg_..., Prev: tlmgr info, Up: tlmgr ACTIONS @@ -3652,8 +3653,8 @@ B.6.11 init-usertree -------------------- Sets up a texmf tree for so-called user mode management, either the -default user tree ('TEXMFHOME'), or one specified on the command line -with '--usertree'. See *note USER MODE: tlmgr USER MODE. below. +default user tree (‘TEXMFHOME’), or one specified on the command line +with ‘--usertree’. See *note USER MODE: tlmgr USER MODE. below. File: tlbuild.info, Node: tlmgr install [_option_...] _pkg_..., Next: tlmgr key, Prev: tlmgr init-usertree, Up: tlmgr ACTIONS @@ -3662,44 +3663,44 @@ B.6.12 install [_option_...] _pkg_... ------------------------------------- Install each _pkg_ given on the command line, if it is not already -installed. It does not touch existing packages; see the 'update' action +installed. It does not touch existing packages; see the ‘update’ action for how to get the latest version of a package. By default this also installs all packages on which the given _pkg_s are dependent. Options: -*-dry-run* +*–dry-run* Nothing is actually installed; instead, the actions to be performed are written to the terminal. -*-file* +*–file* Instead of fetching a package from the installation repository, use the package files given on the command line. These files must be standard TeX Live package files (with contained tlpobj file). -*-force* +*–force* - If updates to 'tlmgr' itself (or other parts of the basic - infrastructure) are present, 'tlmgr' will bail out and not perform + If updates to ‘tlmgr’ itself (or other parts of the basic + infrastructure) are present, ‘tlmgr’ will bail out and not perform the installation unless this option is given. Not recommended. -*-no-depends* +*–no-depends* Do not install dependencies. (By default, installing a package ensures that all dependencies of this package are fulfilled.) -*-no-depends-at-all* +*–no-depends-at-all* Normally, when you install a package which ships binary files the respective binary package will also be installed. That is, for a - package 'foo', the package 'foo.i386-linux' will also be installed - on an 'i386-linux' system. This option suppresses this behavior, - and also implies '--no-depends'. Don't use it unless you are sure + package ‘foo’, the package ‘foo.i386-linux’ will also be installed + on an ‘i386-linux’ system. This option suppresses this behavior, + and also implies ‘--no-depends’. Don’t use it unless you are sure of what you are doing. -*-reinstall* +*–reinstall* Reinstall a package (including dependencies for collections) even if it already seems to be installed (i.e, is present in the TLPDB). @@ -3709,22 +3710,22 @@ are dependent. Options: When re-installing, only dependencies on normal packages are followed (i.e., not those of category Scheme or Collection). -*-with-doc* +*–with-doc* -*-with-src* +*–with-src* - While not recommended, the 'install-tl' program provides an option + While not recommended, the ‘install-tl’ program provides an option to omit installation of all documentation and/or source files. (By default, everything is installed.) After such an installation, you may find that you want the documentation or source files for a given package after all. You can get them by using these options - in conjunction with '--reinstall', as in (using the 'fontspec' + in conjunction with ‘--reinstall’, as in (using the ‘fontspec’ package as the example): tlmgr install --reinstall --with-doc --with-src fontspec This action does not automatically add new symlinks in system -directories; you need to run 'tlmgr path add' (*note path: tlmgr path.) +directories; you need to run ‘tlmgr path add’ (*note path: tlmgr path.) yourself if you are using this feature and want new symlinks added. @@ -3739,18 +3740,18 @@ B.6.13 key *key remove _keyid_* - The action 'key' allows listing, adding and removing additional GPG + The action ‘key’ allows listing, adding and removing additional GPG keys to the set of trusted keys, that is, those that are used to verify the TeX Live databases. - With the 'list' argument, 'key' lists all keys. + With the ‘list’ argument, ‘key’ lists all keys. - The 'add' argument requires another argument, either a filename or - '-' for stdin, from which the key is added. The key is added to - the local keyring 'GNUPGHOME/repository-keys.gpg', which is - normally 'tlpkg/gpg/repository-keys.gpg'. + The ‘add’ argument requires another argument, either a filename or + ‘-’ for stdin, from which the key is added. The key is added to + the local keyring ‘GNUPGHOME/repository-keys.gpg’, which is + normally ‘tlpkg/gpg/repository-keys.gpg’. - The 'remove' argument requires a key id and removes the requested + The ‘remove’ argument requires a key id and removes the requested id from the local keyring. @@ -3767,29 +3768,29 @@ File: tlbuild.info, Node: tlmgr option, Next: tlmgr paper, Prev: tlmgr list, B.6.15 option ------------- -*option [-json] [show]* +*option [–json] [show]* -*option [-json] showall|help* +*option [–json] showall|help* *option _key_ [_value_]* - The first form, 'show', shows the global TeX Live settings currently -saved in the TLPDB with a short description and the 'key' used for + The first form, ‘show’, shows the global TeX Live settings currently +saved in the TLPDB with a short description and the ‘key’ used for changing it in parentheses. - The second form, 'showall', is similar, but also shows options which -can be defined but are not currently set to any value ('help' is a + The second form, ‘showall’, is similar, but also shows options which +can be defined but are not currently set to any value (‘help’ is a synonym). - Both 'show...' forms take an option '--json', which dumps the option + Both ‘show...’ forms take an option ‘--json’, which dumps the option information in JSON format. In this case, both forms dump the same data. For the format of the JSON output see -'tlpkg/doc/JSON-formats.txt', format definition 'TLOPTION'. +‘tlpkg/doc/JSON-formats.txt’, format definition ‘TLOPTION’. In the third form, with _key_, if _value_ is not given, the setting for _key_ is displayed. If _value_ is present, _key_ is set to _value_. - Possible values for _key_ are (run 'tlmgr option showall' for the + Possible values for _key_ are (run ‘tlmgr option showall’ for the definitive list): repository (default package repository), @@ -3806,64 +3807,64 @@ definitive list): fileassocs (Windows-only: change file associations) multiuser (Windows-only: install for all users) - One common use of 'option' is to permanently change the installation + One common use of ‘option’ is to permanently change the installation to get further updates from the Internet, after originally installing from DVD. To do this, you can run tlmgr option repository https://mirror.ctan.org/systems/texlive/tlnet - The 'install-tl' documentation has more information about the -possible values for 'repository'. (For backward compatibility, -'location' can be used as a synonym for 'repository'.) + The ‘install-tl’ documentation has more information about the +possible values for ‘repository’. (For backward compatibility, +‘location’ can be used as a synonym for ‘repository’.) - If 'formats' is set (this is the default), then formats are + If ‘formats’ is set (this is the default), then formats are regenerated when either the engine or the format files have changed. Disable this only when you know how and want to regenerate formats yourself whenever needed (which is often, in practice). - The 'postcode' option controls execution of per-package + The ‘postcode’ option controls execution of per-package postinstallation action code. It is set by default, and again disabling is not likely to be of interest except to developers doing debugging. - The 'docfiles' and 'srcfiles' options control the installation of + The ‘docfiles’ and ‘srcfiles’ options control the installation of their respective file groups (documentation, sources; grouping is approximate) per package. By default both are enabled (1). Either or both can be disabled (set to 0) if disk space is limited or for minimal testing installations, etc. When disabled, the respective files are not downloaded at all. - The options 'autobackup' and 'backupdir' determine the defaults for -the actions 'update', 'backup' and 'restore'. These three actions need -a directory in which to read or write the backups. If '--backupdir' is -not specified on the command line, the 'backupdir' option value is used -(if set). The TL installer sets 'backupdir' to '.../tlpkg/backups', + The options ‘autobackup’ and ‘backupdir’ determine the defaults for +the actions ‘update’, ‘backup’ and ‘restore’. These three actions need +a directory in which to read or write the backups. If ‘--backupdir’ is +not specified on the command line, the ‘backupdir’ option value is used +(if set). The TL installer sets ‘backupdir’ to ‘.../tlpkg/backups’, under the TL root installation directory. - The 'autobackup' option (de)activates automatic generation of -backups. Its value is an integer. If the 'autobackup' value is '-1', -no backups are removed. If 'autobackup' is 0 or more, it specifies the + The ‘autobackup’ option (de)activates automatic generation of +backups. Its value is an integer. If the ‘autobackup’ value is ‘-1’, +no backups are removed. If ‘autobackup’ is 0 or more, it specifies the number of backups to keep. Thus, backups are disabled if the value is -0. In the '--clean' mode of the 'backup' action this option also +0. In the ‘--clean’ mode of the ‘backup’ action this option also specifies the number to be kept. The default value is 1, so that backups are made, but only one backup is kept. - To setup 'autobackup' to '-1' on the command line, use: + To setup ‘autobackup’ to ‘-1’ on the command line, use: tlmgr option -- autobackup -1 - The '--' avoids having the '-1' treated as an option. (The '--' + The ‘--’ avoids having the ‘-1’ treated as an option. (The ‘--’ stops parsing for options at the point where it appears; this is a general feature across most Unix programs.) - The 'sys_bin', 'sys_man', and 'sys_info' options are used on Unix + The ‘sys_bin’, ‘sys_man’, and ‘sys_info’ options are used on Unix systems to control the generation of links for executables, Info files -and man pages. See the 'path' action for details. +and man pages. See the ‘path’ action for details. The last three options affect behavior on Windows installations. If -'desktop_integration' is set, then some packages will install items in a -sub-folder of the Start menu for 'tlmgr gui', documentation, etc. If -'fileassocs' is set, Windows file associations are made (see also the -'postaction' action). Finally, if 'multiuser' is set, then adaptions to +‘desktop_integration’ is set, then some packages will install items in a +sub-folder of the Start menu for ‘tlmgr gui’, documentation, etc. If +‘fileassocs’ is set, Windows file associations are made (see also the +‘postaction’ action). Finally, if ‘multiuser’ is set, then adaptions to the registry and the menus are done for all users on the system instead of only the current user. All three options are on by default. @@ -3875,36 +3876,36 @@ B.6.16 paper *paper [a4|letter]* -*<[xdvi|pdftex|dvips|dvipdfmx|context|psutils] paper [_papersize_|-list]*> +*<[xdvi|pdftex|dvips|dvipdfmx|context|psutils] paper [_papersize_|–list]*> -*paper -json* +*paper –json* - With no arguments ('tlmgr paper'), shows the default paper size + With no arguments (‘tlmgr paper’), shows the default paper size setting for all known programs. - With one argument (e.g., 'tlmgr paper a4'), sets the default for all + With one argument (e.g., ‘tlmgr paper a4’), sets the default for all known programs to that paper size. With a program given as the first argument and no paper size -specified (e.g., 'tlmgr dvips paper'), shows the default paper size for +specified (e.g., ‘tlmgr dvips paper’), shows the default paper size for that program. With a program given as the first argument and a paper size as the -last argument (e.g., 'tlmgr dvips paper a4'), set the default for that +last argument (e.g., ‘tlmgr dvips paper a4’), set the default for that program to that paper size. - With a program given as the first argument and '--list' given as the -last argument (e.g., 'tlmgr dvips paper --list'), shows all valid paper + With a program given as the first argument and ‘--list’ given as the +last argument (e.g., ‘tlmgr dvips paper --list’), shows all valid paper sizes for that program. The first size shown is the default. - If '--json' is specified without other options, the paper setup is + If ‘--json’ is specified without other options, the paper setup is dumped in JSON format. For the format of JSON output see -'tlpkg/doc/JSON-formats.txt', format definition 'TLPAPER'. +‘tlpkg/doc/JSON-formats.txt’, format definition ‘TLPAPER’. Incidentally, this syntax of having a specific program name before -the 'paper' keyword is unusual. It is inherited from the longstanding -'texconfig' script, which supports other configuration settings for some -programs, notably 'dvips'. 'tlmgr' does not support those extra +the ‘paper’ keyword is unusual. It is inherited from the longstanding +‘texconfig’ script, which supports other configuration settings for some +programs, notably ‘dvips’. ‘tlmgr’ does not support those extra settings. @@ -3913,9 +3914,9 @@ File: tlbuild.info, Node: tlmgr path, Next: tlmgr pinning, Prev: tlmgr paper, B.6.17 path ----------- -*path [-w32mode=user|admin] add* +*path [–w32mode=user|admin] add* -*path [-w32mode=user|admin] remove* +*path [–w32mode=user|admin] remove* On Unix, adds or removes symlinks for executables, man pages, and info pages in the system directories specified by the respective @@ -3928,22 +3929,22 @@ B.6.17 path On Windows, the registry part where the binary directory is added or removed is determined in the following way: - If the user has admin rights, and the option '--w32mode' is not + If the user has admin rights, and the option ‘--w32mode’ is not given, the setting _w32_multi_user_ determines the location (i.e., if it is on then the system path, otherwise the user path is changed). - If the user has admin rights, and the option '--w32mode' is given, + If the user has admin rights, and the option ‘--w32mode’ is given, this option determines the path to be adjusted. - If the user does not have admin rights, and the option '--w32mode' + If the user does not have admin rights, and the option ‘--w32mode’ is not given, and the setting _w32_multi_user_ is off, the user path is changed, while if the setting _w32_multi_user_ is on, a warning is issued that the caller does not have enough privileges. - If the user does not have admin rights, and the option '--w32mode' - is given, it must be 'user' and the user path will be adjusted. If - a user without admin rights uses the option '--w32mode admin' a + If the user does not have admin rights, and the option ‘--w32mode’ + is given, it must be ‘user’ and the user path will be adjusted. If + a user without admin rights uses the option ‘--w32mode admin’ a warning is issued that the caller does not have enough privileges. @@ -3952,24 +3953,24 @@ File: tlbuild.info, Node: tlmgr pinning, Next: tlmgr platform, Prev: tlmgr pa B.6.18 pinning -------------- -The 'pinning' action manages the pinning file, see *note Pinning: tlmgr +The ‘pinning’ action manages the pinning file, see *note Pinning: tlmgr Pinning. below. -'pinning show' +‘pinning show’ Shows the current pinning data. -'pinning add' _repo_ _pkgglob_... +‘pinning add’ _repo_ _pkgglob_... Pins the packages matching the _pkgglob_(s) to the repository _repo_. -'pinning remove' _repo_ _pkgglob_... +‘pinning remove’ _repo_ _pkgglob_... Any packages recorded in the pinning file matching the <pkgglob>s for the given repository _repo_ are removed. -'pinning remove _repo_ --all' +‘pinning remove _repo_ --all’ Remove all pinning data for repository _repo_. @@ -3985,31 +3986,31 @@ B.6.19 platform *platform set auto* - 'platform list' lists the TeX Live names of all the platforms - (a.k.a. architectures), ('i386-linux', ...) available at the + ‘platform list’ lists the TeX Live names of all the platforms + (a.k.a. architectures), (‘i386-linux’, ...) available at the package repository. - 'platform add' _platform_... adds the executables for each given + ‘platform add’ _platform_... adds the executables for each given platform _platform_ to the installation from the repository. - 'platform remove' _platform_... removes the executables for each + ‘platform remove’ _platform_... removes the executables for each given platform _platform_ from the installation, but keeps the currently running platform in any case. - 'platform set' _platform_ switches TeX Live to always use the given + ‘platform set’ _platform_ switches TeX Live to always use the given platform instead of auto detection. - 'platform set auto' switches TeX Live to auto detection mode for + ‘platform set auto’ switches TeX Live to auto detection mode for platform. - Platform detection is needed to select the proper 'xz' and 'wget' + Platform detection is needed to select the proper ‘xz’ and ‘wget’ binaries that are shipped with TeX Live. - 'arch' is a synonym for 'platform'. + ‘arch’ is a synonym for ‘platform’. Options: - *-dry-run* + *–dry-run* Nothing is actually installed; instead, the actions to be performed are written to the terminal. @@ -4024,30 +4025,30 @@ B.6.20 postaction *postaction [_option_...] remove [shortcut|fileassoc|script] [_pkg_...]* - Carry out the postaction 'shortcut', 'fileassoc', or 'script' given + Carry out the postaction ‘shortcut’, ‘fileassoc’, or ‘script’ given as the second required argument in install or remove mode (which is the first required argument), for either the packages given on the - command line, or for all if '--all' is given. + command line, or for all if ‘--all’ is given. Options: - *-w32mode=[user|admin]* + *–w32mode=[user|admin]* - If the option '--w32mode' is given the value 'user', all + If the option ‘--w32mode’ is given the value ‘user’, all actions will only be carried out in the user-accessible parts - of the registry/filesystem, while the value 'admin' selects + of the registry/filesystem, while the value ‘admin’ selects the system-wide parts of the registry for the file associations. If you do not have enough permissions, using - '--w32mode=admin' will not succeed. + ‘--w32mode=admin’ will not succeed. - *-fileassocmode=[1|2]* + *–fileassocmode=[1|2]* - '--fileassocmode' specifies the action for file associations. + ‘--fileassocmode’ specifies the action for file associations. If it is set to 1 (the default), only new associations are added; if it is set to 2, all associations are set to the TeX - Live programs. (See also 'option fileassocs'.) + Live programs. (See also ‘option fileassocs’.) - *-all* + *–all* Carry out the postactions for all packages @@ -4059,7 +4060,7 @@ B.6.21 print-platform Print the TeX Live identifier for the detected platform (hardware/operating system) combination to standard output, and exit. -'--print-arch' is a synonym. +‘--print-arch’ is a synonym. File: tlbuild.info, Node: tlmgr print-platform-info, Next: tlmgr remove [_option_...] _pkg_..., Prev: tlmgr print-platform, Up: tlmgr ACTIONS @@ -4077,21 +4078,21 @@ B.6.23 remove [_option_...] _pkg_... ------------------------------------ Remove each _pkg_ specified. Removing a collection removes all package -dependencies (unless '--no-depends' is specified), but not any +dependencies (unless ‘--no-depends’ is specified), but not any collection dependencies of that collection. However, when removing a package, dependencies are never removed. Options: -*-all* +*–all* Uninstalls all of TeX Live, asking for confirmation unless - '--force' is also specified. + ‘--force’ is also specified. -*-backup* +*–backup* -*-backupdir* _directory_ +*–backupdir* _directory_ - These options behave just as with the *note update: (update)tlmgr - update [_option_...] [...]. action (q.v.), except they apply to + These options behave just as with the *note update: (update)tlmgr + update [_option_...] [...]. action (q.v.), except they apply to making backups of packages before they are removed. The default is to make such a backup, that is, to save a copy of packages before removal. @@ -4099,34 +4100,34 @@ package, dependencies are never removed. Options: The *note restore: tlmgr restore. action explains how to restore from a backup. -*-no-depends* +*–no-depends* Do not remove dependent packages. -*-no-depends-at-all* +*–no-depends-at-all* - See above under *note install: tlmgr install [_option_...] _pkg_... - (and beware). + See above under *note install: tlmgr install [_option_...] + _pkg_.... (and beware). -*-force* +*–force* By default, removal of a package or collection that is a dependency of another collection or scheme is not allowed. With this option, the package will be removed unconditionally. Use with care. - A package that has been removed using the '--force' option because + A package that has been removed using the ‘--force’ option because it is still listed in an installed collection or scheme will not be - updated, and will be mentioned as 'forcibly removed' in the output - of 'tlmgr update --list'. + updated, and will be mentioned as ‘forcibly removed’ in the output + of ‘tlmgr update --list’. -*-dry-run* +*–dry-run* Nothing is actually removed; instead, the actions to be performed are written to the terminal. - Except with '--all', this 'remove' action does not automatically + Except with ‘--all’, this ‘remove’ action does not automatically remove symlinks to executables from system directories; you need to run -'tlmgr path remove' (*note path: tlmgr path.) yourself if you remove an +‘tlmgr path remove’ (*note path: tlmgr path.) yourself if you remove an individual package with a symlink in a system directory. @@ -4150,24 +4151,24 @@ B.6.24 repository This action manages the list of repositories. See *note (MULTIPLE_REPOSITORIES):: below for detailed explanations. - The first form, 'repository list', lists all configured + The first form, ‘repository list’, lists all configured repositories and the respective tags if set. If a path, url, or - tag is given after the 'list' keyword, it is interpreted as the + tag is given after the ‘list’ keyword, it is interpreted as the source from which to initialize a TL database and lists the contained packages. This can also be an otherwise-unused repository, either local or remote. If the option - '--with-platforms' is specified in addition, for each package the + ‘--with-platforms’ is specified in addition, for each package the available platforms (if any) are also listed. - The form 'repository add' adds a repository (optionally attaching a - tag) to the list of repositories, while 'repository remove' removes + The form ‘repository add’ adds a repository (optionally attaching a + tag) to the list of repositories, while ‘repository remove’ removes a repository, either by full path/url, or by tag. - The form 'repository set' sets the list of available repositories + The form ‘repository set’ sets the list of available repositories to the items given on the command line, overwriting previous settings. - The form 'repository status' reports the verification status of the + The form ‘repository status’ reports the verification status of the loaded repositories with the format of one repository per line with fields separated by a single space: @@ -4184,7 +4185,7 @@ B.6.24 repository That is, in normal (not machine-readable) output, the third field (numeric verification status) is not present. - In all cases, one of the repositories must be tagged as 'main'; + In all cases, one of the repositories must be tagged as ‘main’; otherwise, all operations will fail! @@ -4195,18 +4196,18 @@ B.6.25 restore *restore [_option_...] _pkg_ [_rev_]* -*restore [_option_...] -all* +*restore [_option_...] –all* Restore a package from a previously-made backup. - If '--all' is given, try to restore the latest revision of all + If ‘--all’ is given, try to restore the latest revision of all package backups found in the backup directory. Otherwise, if neither _pkg_ nor _rev_ are given, list the available backup revisions for all packages. With _pkg_ given but no _rev_, list all available backup revisions of _pkg_. - When listing available packages, 'tlmgr' shows the revision, and in + When listing available packages, ‘tlmgr’ shows the revision, and in parenthesis the creation time if available (in format yyyy-mm-dd hh:mm). @@ -4215,34 +4216,34 @@ B.6.25 restore Options: - *-all* + *–all* Try to restore the latest revision of all package backups found in the backup directory. Additional non-option arguments (like _pkg_) are not allowed. - *-backupdir* _directory_ + *–backupdir* _directory_ Specify the directory where the backups are to be found. If not given it will be taken from the configuration setting in the TLPDB. - *-dry-run* + *–dry-run* Nothing is actually restored; instead, the actions to be performed are written to the terminal. - *-force* + *–force* - Don't ask questions. + Don’t ask questions. - *-json* + *–json* - When listing backups, the option '--json' turn on JSON output. - The format is an array of JSON objects ('name', 'rev', - 'date'). For details see 'tlpkg/doc/JSON-formats.txt', format - definition: 'TLBACKUPS'. If both '--json' and '--data' are - given, '--json' takes precedence. + When listing backups, the option ‘--json’ turn on JSON output. + The format is an array of JSON objects (‘name’, ‘rev’, + ‘date’). For details see ‘tlpkg/doc/JSON-formats.txt’, format + definition: ‘TLBACKUPS’. If both ‘--json’ and ‘--data’ are + given, ‘--json’ takes precedence. File: tlbuild.info, Node: tlmgr search, Next: tlmgr shell, Prev: tlmgr restore, Up: tlmgr ACTIONS @@ -4252,9 +4253,9 @@ B.6.26 search *search [_option_...] _what_* -*search [_option_...] -file _what_* +*search [_option_...] –file _what_* -*search [_option_...] -all _what_* +*search [_option_...] –all _what_* By default, search the names, short descriptions, and long descriptions of all locally installed packages for the argument @@ -4262,26 +4263,26 @@ B.6.26 search Options: - *-file* + *–file* List all filenames containing _what_. - *-all* + *–all* Search everything: package names, descriptions and filenames. - *-global* + *–global* Search the TeX Live Database of the installation medium, instead of the local installation. - *-word* + *–word* Restrict the search of package names and descriptions (but not filenames) to match only full words. For example, searching - for 'table' with this option will not output packages - containing the word 'tables' (unless they also contain the - word 'table' on its own). + for ‘table’ with this option will not output packages + containing the word ‘tables’ (unless they also contain the + word ‘table’ on its own). File: tlbuild.info, Node: tlmgr shell, Next: tlmgr show, Prev: tlmgr search, Up: tlmgr ACTIONS @@ -4291,12 +4292,12 @@ B.6.27 shell Starts an interactive mode, where tlmgr prompts for commands. This can be used directly, or for scripting. The first line of output is -'protocol' _n_, where _n_ is an unsigned number identifying the protocol +‘protocol’ _n_, where _n_ is an unsigned number identifying the protocol version (currently 1). In general, tlmgr actions that can be given on the command line translate to commands in this shell mode. For example, you can say -'update --list' to see what would be updated. The TLPDB is loaded the +‘update --list’ to see what would be updated. The TLPDB is loaded the first time it is needed (not at the beginning), and used for the rest of the session. @@ -4304,7 +4305,7 @@ the session. protocol - Print 'protocol _n_', the current protocol version. + Print ‘protocol _n_’, the current protocol version. help @@ -4320,8 +4321,8 @@ quit, end, bye, byebye, EOF restart - Restart 'tlmgr shell' with the original command line; most useful - when developing 'tlmgr'. + Restart ‘tlmgr shell’ with the original command line; most useful + when developing ‘tlmgr’. load [local|remote] @@ -4335,12 +4336,12 @@ save get [_var_] =item set [_var_ [_val_]] Get the value of _var_, or set it to _val_. Possible _var_ names: - 'debug-translation', 'machine-readable', 'no-execute-actions', - 'require-verification', 'verify-downloads', 'repository', and - 'prompt'. All except 'repository' and 'prompt' are booleans, + ‘debug-translation’, ‘machine-readable’, ‘no-execute-actions’, + ‘require-verification’, ‘verify-downloads’, ‘repository’, and + ‘prompt’. All except ‘repository’ and ‘prompt’ are booleans, taking values 0 and 1, and behave like the corresponding command - line option. The 'repository' variable takes a string, and sets - the remote repository location. The 'prompt' variable takes a + line option. The ‘repository’ variable takes a string, and sets + the remote repository location. The ‘prompt’ variable takes a string, and sets the current default prompt. If _var_ or then _val_ is not specified, it is prompted for. @@ -4359,7 +4360,7 @@ File: tlbuild.info, Node: tlmgr uninstall, Next: tlmgr update [_option_...] [_ B.6.29 uninstall ---------------- -Synonym for *note remove: tlmgr remove [_option_...] _pkg_.... +Synonym for *note remove: tlmgr remove [_option_...] _pkg_.... File: tlbuild.info, Node: tlmgr update [_option_...] [_pkg_...], Prev: tlmgr uninstall, Up: tlmgr ACTIONS @@ -4368,14 +4369,14 @@ B.6.30 update [_option_...] [_pkg_...] -------------------------------------- Updates the packages given as arguments to the latest version available -at the installation source. Either '--all' or at least one _pkg_ name +at the installation source. Either ‘--all’ or at least one _pkg_ name must be specified. Options: -*-all* +*–all* - Update all installed packages except for 'tlmgr' itself. If - updates to 'tlmgr' itself are present, this gives an error, unless - also the option '--force' or '--self' is given. (See below.) + Update all installed packages except for ‘tlmgr’ itself. If + updates to ‘tlmgr’ itself are present, this gives an error, unless + also the option ‘--force’ or ‘--self’ is given. (See below.) In addition to updating the installed packages, during the update of a collection the local installation is (by default) synchronized @@ -4383,45 +4384,45 @@ must be specified. Options: and removals. This means that if a package has been removed on the server (and - thus has also been removed from the respective collection), 'tlmgr' + thus has also been removed from the respective collection), ‘tlmgr’ will remove the package in the local installation. This is called - "auto-remove" and is announced as such when using the option - '--list'. This auto-removal can be suppressed using the option - '--no-auto-remove' (not recommended, see option description). + “auto-remove†and is announced as such when using the option + ‘--list’. This auto-removal can be suppressed using the option + ‘--no-auto-remove’ (not recommended, see option description). Analogously, if a package has been added to a collection on the server that is also installed locally, it will be added to the - local installation. This is called "auto-install" and is announced - as such when using the option '--list'. This auto-installation can - be suppressed using the option '--no-auto-install' (also not + local installation. This is called “auto-install†and is announced + as such when using the option ‘--list’. This auto-installation can + be suppressed using the option ‘--no-auto-install’ (also not recommended). An exception to the collection dependency checks (including the auto-installation of packages just mentioned) are those that have - been "forcibly removed" by you, that is, you called 'tlmgr remove - --force' on them. (See the 'remove' action documentation.) To + been “forcibly removed†by you, that is, you called ‘tlmgr remove + --force’ on them. (See the ‘remove’ action documentation.) To reinstall any such forcibly removed packages use - '--reinstall-forcibly-removed'. + ‘--reinstall-forcibly-removed’. To reiterate: automatic removals and additions are entirely determined by comparison of collections. Thus, if you manually - install an individual package 'foo' which is later removed from the - server, 'tlmgr' will not notice and will not remove it locally. + install an individual package ‘foo’ which is later removed from the + server, ‘tlmgr’ will not notice and will not remove it locally. (It has to be this way, without major rearchitecture work, because the tlpdb does not record the repository from which packages come from.) If you want to exclude some packages from the current update run - (e.g., due to a slow link), see the '--exclude' option below. + (e.g., due to a slow link), see the ‘--exclude’ option below. -*-self* +*–self* - Update 'tlmgr' itself (that is, the infrastructure packages) if + Update ‘tlmgr’ itself (that is, the infrastructure packages) if updates to it are present. On Windows this includes updates to the private Perl interpreter shipped inside TeX Live. - If this option is given together with either '--all' or a list of - packages, then 'tlmgr' will be updated first and, if this update + If this option is given together with either ‘--all’ or a list of + packages, then ‘tlmgr’ will be updated first and, if this update succeeds, the new version will be restarted to complete the rest of the updates. @@ -4432,26 +4433,26 @@ must be specified. Options: tlmgr update --force --all # update all packages but *not* infrastructure # ... this last at your own risk, not recommended! -*-dry-run* +*–dry-run* Nothing is actually installed; instead, the actions to be performed are written to the terminal. This is a more detailed report than - '--list'. + ‘--list’. -*-list* [_pkg_] +*–list* [_pkg_] Concisely list the packages which would be updated, newly installed, or removed, without actually changing anything. If - '--all' is also given, all available updates are listed. If - '--self' is given, but not '--all', only updates to the critical + ‘--all’ is also given, all available updates are listed. If + ‘--self’ is given, but not ‘--all’, only updates to the critical packages (tlmgr, texlive infrastructure, perl on Windows, etc.) - are listed. If neither '--all' nor '--self' is given, and in - addition no _pkg_ is given, then '--all' is assumed (thus, 'tlmgr - update --list' is the same as 'tlmgr update --list --all'). If - neither '--all' nor '--self' is given, but specific package names + are listed. If neither ‘--all’ nor ‘--self’ is given, and in + addition no _pkg_ is given, then ‘--all’ is assumed (thus, ‘tlmgr + update --list’ is the same as ‘tlmgr update --list --all’). If + neither ‘--all’ nor ‘--self’ is given, but specific package names are given, those packages are checked for updates. -*-exclude* _pkg_ +*–exclude* _pkg_ Exclude _pkg_ from the update process. If this option is given more than once, its arguments accumulate. @@ -4461,37 +4462,37 @@ must be specified. Options: tlmgr update --all --exclude a2ping - will not update 'a2ping', 'a2ping.i386-linux', or any other - 'a2ping.'_ARCH_ package. + will not update ‘a2ping’, ‘a2ping.i386-linux’, or any other + ‘a2ping.’_ARCH_ package. If this option specifies a package that would otherwise be a candidate for auto-installation, auto-removal, or reinstallation of - a forcibly removed package, 'tlmgr' quits with an error message. + a forcibly removed package, ‘tlmgr’ quits with an error message. Excludes are not supported in these circumstances. This option can also be set permanently in the tlmgr config file - with the key 'update-exclude'. + with the key ‘update-exclude’. -*-no-auto-remove* [_pkg_...] +*–no-auto-remove* [_pkg_...] - By default, 'tlmgr' tries to remove packages in an existing + By default, ‘tlmgr’ tries to remove packages in an existing collection which have disappeared on the server, as described above - under '--all'. This option prevents such removals, either for all - packages (with '--all'), or for just the given _pkg_ names. This + under ‘--all’. This option prevents such removals, either for all + packages (with ‘--all’), or for just the given _pkg_ names. This can lead to an inconsistent TeX installation, since packages are not infrequently renamed or replaced by their authors. Therefore this is not recommended. -*-no-auto-install* [_pkg_...] +*–no-auto-install* [_pkg_...] - Under normal circumstances 'tlmgr' will install packages which are - new on the server, as described above under '--all'. This option + Under normal circumstances ‘tlmgr’ will install packages which are + new on the server, as described above under ‘--all’. This option prevents any such automatic installation, either for all packages - (with '--all'), or the given _pkg_ names. + (with ‘--all’), or the given _pkg_ names. - Furthermore, after the 'tlmgr' run using this has finished, the + Furthermore, after the ‘tlmgr’ run using this has finished, the packages that would have been auto-installed _will be considered as - forcibly removed_. So, if 'foobar' is the only new package on the + forcibly removed_. So, if ‘foobar’ is the only new package on the server, then tlmgr update --all --no-auto-install @@ -4504,29 +4505,29 @@ must be specified. Options: Again, since packages are sometimes renamed or replaced, using this option is not recommended. -*-reinstall-forcibly-removed* +*–reinstall-forcibly-removed* - Under normal circumstances 'tlmgr' will not install packages that + Under normal circumstances ‘tlmgr’ will not install packages that have been forcibly removed by the user; that is, removed with - 'remove --force', or whose installation was prohibited by - '--no-auto-install' during an earlier update. + ‘remove --force’, or whose installation was prohibited by + ‘--no-auto-install’ during an earlier update. - This option makes 'tlmgr' ignore the forcible removals and + This option makes ‘tlmgr’ ignore the forcible removals and re-install all such packages. This can be used to completely - synchronize an installation with the server's idea of what is + synchronize an installation with the server’s idea of what is available: tlmgr update --reinstall-forcibly-removed --all -*-backup* +*–backup* -*-backupdir* _directory_ +*–backupdir* _directory_ These two options control the creation of backups of packages _before_ updating; that is, backing up packages as currently installed. If neither option is given, no backup will made. If - '--backupdir' is given and specifies a writable directory then a - backup will be made in that location. If only '--backup' is given, + ‘--backupdir’ is given and specifies a writable directory then a + backup will be made in that location. If only ‘--backup’ is given, then a backup will be made to the directory previously set via the *note option: tlmgr option. action (see below). If both are given then a backup will be made to the specified _directory_. @@ -4535,47 +4536,47 @@ must be specified. Options: to automatically make backups for all packages, and/or keep only a certain number of backups. - 'tlmgr' always makes a temporary backup when updating packages, in + ‘tlmgr’ always makes a temporary backup when updating packages, in case of download or other failure during an update. In contrast, - the purpose of this '--backup' option is to save a persistent + the purpose of this ‘--backup’ option is to save a persistent backup in case the actual _content_ of the update causes problems, e.g., introduces an TeX incompatibility. The *note restore: tlmgr restore. action explains how to restore from a backup. -*-no-depends* +*–no-depends* If you call for updating a package normally all depending packages will also be checked for updates and updated if necessary. This switch suppresses this behavior. -*-no-depends-at-all* +*–no-depends-at-all* - See above under *note install: tlmgr install [_option_...] _pkg_... - (and beware). + See above under *note install: tlmgr install [_option_...] + _pkg_.... (and beware). -*-force* +*–force* - Force update of normal packages, without updating 'tlmgr' itself - (unless the '--self' option is also given). Not recommended. + Force update of normal packages, without updating ‘tlmgr’ itself + (unless the ‘--self’ option is also given). Not recommended. - Also, 'update --list' is still performed regardless of this option. + Also, ‘update --list’ is still performed regardless of this option. If the package on the server is older than the package already -installed (e.g., if the selected mirror is out of date), 'tlmgr' does +installed (e.g., if the selected mirror is out of date), ‘tlmgr’ does not downgrade. Also, packages for uninstalled platforms are not installed. - 'tlmgr' saves one copy of the main 'texlive.tlpdb' file used for an + ‘tlmgr’ saves one copy of the main ‘texlive.tlpdb’ file used for an update with a suffix representing the repository url, as in -'tlpkg/texlive.tlpdb.main.'_long-hash-string_. Thus, even when many -mirrors are used, only one main 'tlpdb' backup is kept. For non-main +‘tlpkg/texlive.tlpdb.main.’_long-hash-string_. Thus, even when many +mirrors are used, only one main ‘tlpdb’ backup is kept. For non-main repositories, which do not generally have (m)any mirrors, no pruning of backups is done. This action does not automatically add or remove new symlinks in -system directories; you need to run 'tlmgr' *note path: tlmgr path. +system directories; you need to run ‘tlmgr’ *note path: tlmgr path. yourself if you are using this feature and want new symlinks added. @@ -4584,11 +4585,11 @@ File: tlbuild.info, Node: tlmgr CONFIGURATION FILE FOR TLMGR, Next: tlmgr CRYP B.7 CONFIGURATION FILE FOR TLMGR ================================ -'tlmgr' reads two configuration files: one is system-wide, in -'TEXMFSYSCONFIG/tlmgr/config', and the other is user-specific, in -'TEXMFCONFIG/tlmgr/config'. The user-specific one is the default for -the 'conf tlmgr' action. (Run 'kpsewhich -var-value=TEXMFSYSCONFIG' or -'... TEXMFCONFIG ...' to see the actual directory names.) +‘tlmgr’ reads two configuration files: one is system-wide, in +‘TEXMFSYSCONFIG/tlmgr/config’, and the other is user-specific, in +‘TEXMFCONFIG/tlmgr/config’. The user-specific one is the default for +the ‘conf tlmgr’ action. (Run ‘kpsewhich -var-value=TEXMFSYSCONFIG’ or +‘... TEXMFCONFIG ...’ to see the actual directory names.) A few defaults corresponding to command-line options can be set in these configuration files. In addition, the system-wide file can @@ -4599,43 +4600,43 @@ ignored. All other lines must look like: key = value - where the spaces are optional but the '=' is required. + where the spaces are optional but the ‘=’ is required. The allowed keys are: -'auto-remove =' 0 or 1 (default 1), same as command-line option. +‘auto-remove =’ 0 or 1 (default 1), same as command-line option. -'gui-expertmode =' 0 or 1 (default 1). This switches between the full GUI and a simplified GUI with only the most common settings. +‘gui-expertmode =’ 0 or 1 (default 1). This switches between the full GUI and a simplified GUI with only the most common settings. -'gui-lang =' _llcode_, with a language code value as with the command-line option. +‘gui-lang =’ _llcode_, with a language code value as with the command-line option. -'no-checksums =' 0 or 1 (default 0, see below). +‘no-checksums =’ 0 or 1 (default 0, see below). -'persistent-downloads =' 0 or 1 (default 1), same as command-line option. +‘persistent-downloads =’ 0 or 1 (default 1), same as command-line option. -'require-verification =' 0 or 1 (default 0), same as command-line option. +‘require-verification =’ 0 or 1 (default 0), same as command-line option. -'tkfontscale =' _floating-point number_ (default 1.0); scaling factor for fonts in the Tk-based frontends. +‘tkfontscale =’ _floating-point number_ (default 1.0); scaling factor for fonts in the Tk-based frontends. -'update-exclude =' _comma-separated list of packages_ (no spaces allowed). Same as the command line option '--exclude' for the 'update' action. +‘update-exclude =’ _comma-separated list of packages_ (no spaces allowed). Same as the command line option ‘--exclude’ for the ‘update’ action. -'verify-downloads =' 0 or 1 (default 1), same as command-line option. +‘verify-downloads =’ 0 or 1 (default 1), same as command-line option. The system-wide config file can contain one additional key: -'allowed-actions =' _action1_[,_action2_,...] The value is a comma-separated list (no spaces) of 'tlmgr' actions which are allowed to be executed when 'tlmgr' is invoked in system mode (that is, without '--usermode'). This allows distributors to include 'tlmgr' in their packaging, but allow only a restricted set of actions that do not interfere with their distro package manager. For native TeX Live installations, it doesn't make sense to set this. +‘allowed-actions =’ _action1_[,_action2_,...] The value is a comma-separated list (no spaces) of ‘tlmgr’ actions which are allowed to be executed when ‘tlmgr’ is invoked in system mode (that is, without ‘--usermode’). This allows distributors to include ‘tlmgr’ in their packaging, but allow only a restricted set of actions that do not interfere with their distro package manager. For native TeX Live installations, it doesn’t make sense to set this. - Finally, the 'no-checksums' key needs more explanation. By default, + Finally, the ‘no-checksums’ key needs more explanation. By default, package checksums computed and stored on the server (in the TLPDB) are compared to checksums computed locally after downloading. -'no-checksums' disables this process. The checksum algorithm is +‘no-checksums’ disables this process. The checksum algorithm is SHA-512. Your system must have one of (looked for in this order) the -Perl 'Digest::SHA' module, the 'openssl' program -(<https://openssl.org>), the 'sha512sum' program (from GNU Coreutils, -<https://www.gnu.org/software/coreutils>), or finally the 'shasum' +Perl ‘Digest::SHA’ module, the ‘openssl’ program +(<https://openssl.org>), the ‘sha512sum’ program (from GNU Coreutils, +<https://www.gnu.org/software/coreutils>), or finally the ‘shasum’ program (just to support old Macs). If none of these are available, a -warning is issued and 'tlmgr' proceeds without checking checksums. -'no-checksums' avoids the warning. (Incidentally, other SHA +warning is issued and ‘tlmgr’ proceeds without checking checksums. +‘no-checksums’ avoids the warning. (Incidentally, other SHA implementations, such as the pure Perl and pure Lua modules, are much too slow to be usable in our context.) @@ -4645,41 +4646,41 @@ File: tlbuild.info, Node: tlmgr CRYPTOGRAPHIC VERIFICATION, Next: tlmgr USER M B.8 CRYPTOGRAPHIC VERIFICATION ============================== -'tlmgr' and 'install-tl' perform cryptographic verification if possible. +‘tlmgr’ and ‘install-tl’ perform cryptographic verification if possible. If verification is performed and successful, the programs report -'(verified)' after loading the TLPDB; otherwise, they report '(not -verified)'. But either way, by default the installation and/or updates +‘(verified)’ after loading the TLPDB; otherwise, they report ‘(not +verified)’. But either way, by default the installation and/or updates proceed normally. - If a program named 'gpg' is available (that is, found in 'PATH'), by + If a program named ‘gpg’ is available (that is, found in ‘PATH’), by default cryptographic signatures will be checked: we require the main -repository be signed, but not any additional repositories. If 'gpg' is +repository be signed, but not any additional repositories. If ‘gpg’ is not available, by default signatures are not checked and no verification -is carried out, but 'tlmgr' still proceeds normally. +is carried out, but ‘tlmgr’ still proceeds normally. The behavior of the verification can be controlled by the command -line and config file option 'verify-repo' which takes one of the -following values: 'none', 'main', or 'all'. With 'none', no -verification whatsoever is attempted. With 'main' (the default) -verification is required only for the main repository, and only if 'gpg' +line and config file option ‘verify-repo’ which takes one of the +following values: ‘none’, ‘main’, or ‘all’. With ‘none’, no +verification whatsoever is attempted. With ‘main’ (the default) +verification is required only for the main repository, and only if ‘gpg’ is available; though attempted for all, missing signatures of subsidiary repositories will not result in an error. Finally, in the case of -'all', 'gpg' must be available and all repositories need to be signed. +‘all’, ‘gpg’ must be available and all repositories need to be signed. In all cases, if a signature is checked and fails to verify, an error is raised. Cryptographic verification requires checksum checking (described just -above) to succeed, and a working GnuPG ('gpg') program (see below for +above) to succeed, and a working GnuPG (‘gpg’) program (see below for search method). Then, unless cryptographic verification has been -disabled, a signature file ('texlive.tlpdb.*.asc') of the checksum file +disabled, a signature file (‘texlive.tlpdb.*.asc’) of the checksum file is downloaded and the signature verified. The signature is created by the TeX Live Distribution GPG key 0x0D5E5D9106BAB6BC, which in turn is -signed by Karl Berry's key 0x0716748A30D155AD and Norbert Preining's key +signed by Karl Berry’s key 0x0716748A30D155AD and Norbert Preining’s key 0x6CACA448860CDC13. All of these keys are obtainable from the standard key servers. - Additional trusted keys can be added using the 'key' action. + Additional trusted keys can be added using the ‘key’ action. * Menu: @@ -4692,13 +4693,13 @@ B.8.1 Configuration of GnuPG invocation --------------------------------------- The executable used for GnuPG is searched as follows: If the environment -variable 'TL_GNUPG' is set, it is tested and used; otherwise 'gpg' is -checked; finally 'gpg2' is checked. +variable ‘TL_GNUPG’ is set, it is tested and used; otherwise ‘gpg’ is +checked; finally ‘gpg2’ is checked. - Further adaptation of the 'gpg' invocation can be made using the two -environment variables 'TL_GNUPGHOME', which is passed to 'gpg' as the -value for '--homedir', and 'TL_GNUPGARGS', which replaces the default -options '--no-secmem-warning --no-permission-warning'. + Further adaptation of the ‘gpg’ invocation can be made using the two +environment variables ‘TL_GNUPGHOME’, which is passed to ‘gpg’ as the +value for ‘--homedir’, and ‘TL_GNUPGARGS’, which replaces the default +options ‘--no-secmem-warning --no-permission-warning’. File: tlbuild.info, Node: tlmgr USER MODE, Next: tlmgr MULTIPLE REPOSITORIES, Prev: tlmgr CRYPTOGRAPHIC VERIFICATION, Up: tlmgr @@ -4706,52 +4707,52 @@ File: tlbuild.info, Node: tlmgr USER MODE, Next: tlmgr MULTIPLE REPOSITORIES, B.9 USER MODE ============= -'tlmgr' provides a restricted way, called "user mode", to manage +‘tlmgr’ provides a restricted way, called “user modeâ€, to manage arbitrary texmf trees in the same way as the main installation. For example, this allows people without write permissions on the installation location to update/install packages into a tree of their own. - 'tlmgr' is switched into user mode with the command line option -'--usermode'. It does not switch automatically, nor is there any + ‘tlmgr’ is switched into user mode with the command line option +‘--usermode’. It does not switch automatically, nor is there any configuration file setting for it. Thus, this option has to be explicitly given every time user mode is to be activated. - This mode of 'tlmgr' works on a user tree, by default the value of -the 'TEXMFHOME' variable. This can be overridden with the command line -option '--usertree'. In the following when we speak of the user tree we -mean either 'TEXMFHOME' or the one given on the command line. + This mode of ‘tlmgr’ works on a user tree, by default the value of +the ‘TEXMFHOME’ variable. This can be overridden with the command line +option ‘--usertree’. In the following when we speak of the user tree we +mean either ‘TEXMFHOME’ or the one given on the command line. - Not all actions are allowed in user mode; 'tlmgr' will warn you and + Not all actions are allowed in user mode; ‘tlmgr’ will warn you and not carry out any problematic actions. Currently not supported (and -probably will never be) is the 'platform' action. The 'gui' action is +probably will never be) is the ‘platform’ action. The ‘gui’ action is currently not supported, but may be in a future release. - Some 'tlmgr' actions don't need any write permissions and thus work -the same in user mode and normal mode. Currently these are: 'check', -'help', 'list', 'print-platform', 'print-platform-info', 'search', -'show', 'version'. + Some ‘tlmgr’ actions don’t need any write permissions and thus work +the same in user mode and normal mode. Currently these are: ‘check’, +‘help’, ‘list’, ‘print-platform’, ‘print-platform-info’, ‘search’, +‘show’, ‘version’. On the other hand, most of the actions dealing with package management do need write permissions, and thus behave differently in -user mode, as described below: 'install', 'update', 'remove', 'option', -'paper', 'generate', 'backup', 'restore', 'uninstall', 'symlinks'. - - Before using 'tlmgr' in user mode, you have to set up the user tree -with the 'init-usertree' action. This creates _usertree_'/web2c' and -_usertree_'/tlpkg/tlpobj', and a minimal -_usertree_'/tlpkg/texlive.tlpdb'. At that point, you can tell 'tlmgr' -to do the (supported) actions by adding the '--usermode' command line +user mode, as described below: ‘install’, ‘update’, ‘remove’, ‘option’, +‘paper’, ‘generate’, ‘backup’, ‘restore’, ‘uninstall’, ‘symlinks’. + + Before using ‘tlmgr’ in user mode, you have to set up the user tree +with the ‘init-usertree’ action. This creates _usertree_‘/web2c’ and +_usertree_‘/tlpkg/tlpobj’, and a minimal +_usertree_‘/tlpkg/texlive.tlpdb’. At that point, you can tell ‘tlmgr’ +to do the (supported) actions by adding the ‘--usermode’ command line option. - In user mode the file _usertree_'/tlpkg/texlive.tlpdb' contains only -the packages that have been installed into the user tree using 'tlmgr', -plus additional options from the "virtual" package -'00texlive.installation' (similar to the main installation's -'texlive.tlpdb'). + In user mode the file _usertree_‘/tlpkg/texlive.tlpdb’ contains only +the packages that have been installed into the user tree using ‘tlmgr’, +plus additional options from the “virtual†package +‘00texlive.installation’ (similar to the main installation’s +‘texlive.tlpdb’). All actions on packages in user mode can only be carried out on -packages that are known as 'relocatable'. This excludes all packages +packages that are known as ‘relocatable’. This excludes all packages containing executables and a few other core packages. Of the 2500 or so packages currently in TeX Live the vast majority are relocatable and can be installed into a user tree. @@ -4765,31 +4766,31 @@ be installed into a user tree. * tlmgr User mode generate, option, paper:: -File: tlbuild.info, Node: tlmgr User mode install, Next: tlmgr User mode backup, restore, remove, update, Up: tlmgr USER MODE +File: tlbuild.info, Node: tlmgr User mode install, Next: tlmgr User mode backup, restore, remove, update, Up: tlmgr USER MODE B.9.1 User mode install ----------------------- -In user mode, the 'install' action checks that the package and all +In user mode, the ‘install’ action checks that the package and all dependencies are all either relocated or already installed in the system installation. If this is the case, it unpacks all containers to be -installed into the user tree (to repeat, that's either 'TEXMFHOME' or -the value of '--usertree') and add the respective packages to the user -tree's 'texlive.tlpdb' (creating it if need be). +installed into the user tree (to repeat, that’s either ‘TEXMFHOME’ or +the value of ‘--usertree’) and add the respective packages to the user +tree’s ‘texlive.tlpdb’ (creating it if need be). Currently installing a collection in user mode installs all dependent packages, but in contrast to normal mode, does _not_ install dependent -collections. For example, in normal mode 'tlmgr install -collection-context' would install 'collection-basic' and other +collections. For example, in normal mode ‘tlmgr install +collection-context’ would install ‘collection-basic’ and other collections, while in user mode, _only_ the packages mentioned in -'collection-context' are installed. +‘collection-context’ are installed. If a package shipping map files is installed in user mode, a backup -of the user's 'updmap.cfg' in 'USERTREE/web2c/' is made, and then this +of the user’s ‘updmap.cfg’ in ‘USERTREE/web2c/’ is made, and then this file regenerated from the list of installed packages. -File: tlbuild.info, Node: tlmgr User mode backup, restore, remove, update, Next: tlmgr User mode generate, option, paper, Prev: tlmgr User mode install, Up: tlmgr USER MODE +File: tlbuild.info, Node: tlmgr User mode backup, restore, remove, update, Next: tlmgr User mode generate, option, paper, Prev: tlmgr User mode install, Up: tlmgr USER MODE B.9.2 User mode backup, restore, remove, update ----------------------------------------------- @@ -4799,13 +4800,13 @@ installed in the user tree before proceeding; otherwise, they behave just as in normal mode. -File: tlbuild.info, Node: tlmgr User mode generate, option, paper, Prev: tlmgr User mode backup, restore, remove, update, Up: tlmgr USER MODE +File: tlbuild.info, Node: tlmgr User mode generate, option, paper, Prev: tlmgr User mode backup, restore, remove, update, Up: tlmgr USER MODE B.9.3 User mode generate, option, paper --------------------------------------- -In user mode, these actions operate only on the user tree's -configuration files and/or 'texlive.tlpdb'. +In user mode, these actions operate only on the user tree’s +configuration files and/or ‘texlive.tlpdb’. File: tlbuild.info, Node: tlmgr MULTIPLE REPOSITORIES, Next: tlmgr GUI FOR TLMGR, Prev: tlmgr USER MODE, Up: tlmgr @@ -4820,13 +4821,13 @@ Also, alternative package repositories distribute packages that cannot or should not be included in TeX Live, for whatever reason. The simplest and most reliable method is to temporarily set the -installation source to any repository (with the '-repository' or 'option -repository' command line options), and perform your operations. +installation source to any repository (with the ‘-repository’ or ‘option +repository’ command line options), and perform your operations. When you are using multiple repositories over a sustained length of time, however, explicitly switching between them becomes inconvenient. -Thus, it's possible to tell 'tlmgr' about additional repositories you -want to use. The basic command is 'tlmgr repository add'. The rest of +Thus, it’s possible to tell ‘tlmgr’ about additional repositories you +want to use. The basic command is ‘tlmgr repository add’. The rest of this section explains further. When using multiple repositories, one of them has to be set as the @@ -4839,7 +4840,7 @@ main repository. are _still_ _only_ installed from the main repository. Thus, simply adding a second repository does not actually enable installation of anything from there. You also have to specify which packages should be -taken from the new repository, by specifying so-called "pinning" rules, +taken from the new repository, by specifying so-called “pinning†rules, described next. * Menu: @@ -4852,12 +4853,12 @@ File: tlbuild.info, Node: tlmgr Pinning, Up: tlmgr MULTIPLE REPOSITORIES B.10.1 Pinning -------------- -When a package 'foo' is pinned to a repository, a package 'foo' in any +When a package ‘foo’ is pinned to a repository, a package ‘foo’ in any other repository, even if it has a higher revision number, will not be considered an installable candidate. As mentioned above, by default everything is pinned to the main -repository. Let's now go through an example of setting up a second +repository. Let’s now go through an example of setting up a second repository and enabling updates of a package from it. First, check that we have support for multiple repositories, and have @@ -4867,8 +4868,8 @@ only one enabled (as is the case by default): List of repositories (with tags if set): /var/www/norbert/tlnet - Ok. Let's add the 'tlcontrib' repository (this is a real repository -hosted at <http://contrib.texlive.info>) with the tag 'tlcontrib': + Ok. Let’s add the ‘tlcontrib’ repository (this is a real repository +hosted at <http://contrib.texlive.info>) with the tag ‘tlcontrib’: $ tlmgr repository add http://contrib.texlive.info/current tlcontrib @@ -4879,12 +4880,12 @@ hosted at <http://contrib.texlive.info>) with the tag 'tlcontrib': http://contrib.texlive.info/current (tlcontrib) /var/www/norbert/tlnet (main) - Now we specify a pinning entry to get the package 'classico' from -'tlcontrib': + Now we specify a pinning entry to get the package ‘classico’ from +‘tlcontrib’: $ tlmgr pinning add tlcontrib classico - Check that we can find 'classico': + Check that we can find ‘classico’: $ tlmgr show classico package: classico @@ -4892,23 +4893,23 @@ hosted at <http://contrib.texlive.info>) with the tag 'tlcontrib': shortdesc: URW Classico fonts ... - - install 'classico': + - install ‘classico’: $ tlmgr install classico tlmgr: package repositories: ... [1/1, ??:??/??:??] install: classico @tlcontrib [737k] - In the output here you can see that the 'classico' package has been -installed from the 'tlcontrib' repository ('@tlcontrib'). + In the output here you can see that the ‘classico’ package has been +installed from the ‘tlcontrib’ repository (‘@tlcontrib’). - Finally, 'tlmgr pinning' also supports removing certain or all + Finally, ‘tlmgr pinning’ also supports removing certain or all packages from a given repository: $ tlmgr pinning remove tlcontrib classico # remove just classico $ tlmgr pinning remove tlcontrib --all # take nothing from tlcontrib - A summary of 'tlmgr pinning' actions is given above. + A summary of ‘tlmgr pinning’ actions is given above. File: tlbuild.info, Node: tlmgr GUI FOR TLMGR, Next: tlmgr MACHINE-READABLE OUTPUT, Prev: tlmgr MULTIPLE REPOSITORIES, Up: tlmgr @@ -4916,12 +4917,12 @@ File: tlbuild.info, Node: tlmgr GUI FOR TLMGR, Next: tlmgr MACHINE-READABLE OU B.11 GUI FOR TLMGR ================== -The graphical user interface for 'tlmgr' requires Perl/Tk +The graphical user interface for ‘tlmgr’ requires Perl/Tk <https://search.cpan.org/search?query=perl%2Ftk>. For Unix-based systems Perl/Tk (as well as Perl of course) has to be installed outside of TL. <https://tug.org/texlive/distro.html#perltk> has a list of invocations for some distros. For Windows the necessary modules are no -longer shipped within TeX Live, so you'll have to have an external Perl +longer shipped within TeX Live, so you’ll have to have an external Perl available that includes them. We are talking here about the GUI built into tlmgr itself, not about @@ -4929,17 +4930,17 @@ the other tlmgr GUIs, which are: tlshell (Tcl/Tk-based), tlcockpit (Java-based) and, only on Macs, TeX Live Utility. These are invoked as separate programs. - The GUI mode of tlmgr is started with the invocation 'tlmgr gui'; + The GUI mode of tlmgr is started with the invocation ‘tlmgr gui’; assuming Tk is loadable, the graphical user interface will be shown. The main window contains a menu bar, the main display, and a status area where messages normally shown on the console are displayed. - Within the main display there are three main parts: the 'Display -configuration' area, the list of packages, and the action buttons. + Within the main display there are three main parts: the ‘Display +configuration’ area, the list of packages, and the action buttons. Also, at the top right the currently loaded repository is shown; this also acts as a button and when clicked will try to load the default -repository. To load a different repository, see the 'tlmgr' menu item. +repository. To load a different repository, see the ‘tlmgr’ menu item. Finally, the status area at the bottom of the window gives additional information about what is going on. @@ -4993,7 +4994,7 @@ Match Selection Select packages to those selected, those not selected, or all. - Here, "selected" means that the checkbox in the beginning of the + Here, “selected†means that the checkbox in the beginning of the line of a package is ticked. Display configuration buttons @@ -5055,7 +5056,7 @@ Below the list of packages are several buttons: Update all installed - This calls 'tlmgr update --all', i.e., tries to update all + This calls ‘tlmgr update --all’, i.e., tries to update all available packages. Below this button is a toggle to allow reinstallation of previously removed packages as part of this action. @@ -5070,20 +5071,20 @@ Update Install - Install the selected packages; acts like 'tlmgr install', i.e., + Install the selected packages; acts like ‘tlmgr install’, i.e., also installs dependencies. Thus, installing a collection installs all its constituent packages. Remove - Removes the selected packages; acts like 'tlmgr remove', i.e., it + Removes the selected packages; acts like ‘tlmgr remove’, i.e., it will also remove dependencies of collections (but not dependencies of normal packages). Backup - Makes a backup of the selected packages; acts like 'tlmgr backup'. - This action needs the option 'backupdir' set (see 'Options -' + Makes a backup of the selected packages; acts like ‘tlmgr backup’. + This action needs the option ‘backupdir’ set (see ‘Options -’ General>). @@ -5094,51 +5095,51 @@ B.11.2 Menu bar The following entries can be found in the menu bar: -'tlmgr' menu +‘tlmgr’ menu The items here load various repositories: the default as specified in the TeX Live database, the default network repository, the repository specified on the command line (if any), and an - arbitrarily manually-entered one. Also has the so-necessary 'quit' + arbitrarily manually-entered one. Also has the so-necessary ‘quit’ operation. -'Options menu' +‘Options menu’ - Provides access to several groups of options: 'Paper' - (configuration of default paper sizes), 'Platforms' (only on Unix, - configuration of the supported/installed platforms), 'GUI Language' - (select language used in the GUI interface), and 'General' + Provides access to several groups of options: ‘Paper’ + (configuration of default paper sizes), ‘Platforms’ (only on Unix, + configuration of the supported/installed platforms), ‘GUI Language’ + (select language used in the GUI interface), and ‘General’ (everything else). - Several toggles are also here. The first is 'Expert options', + Several toggles are also here. The first is ‘Expert options’, which is set by default. If you turn this off, the next time you start the GUI a simplified screen will be shown that display only the most important functionality. This setting is saved in the - configuration file of 'tlmgr'; see *note CONFIGURATION FILE FOR + configuration file of ‘tlmgr’; see *note CONFIGURATION FILE FOR TLMGR: tlmgr CONFIGURATION FILE FOR TLMGR. for details. The other toggles are all off by default: for debugging output, to disable the automatic installation of new packages, and to disable the automatic removal of packages deleted from the server. Playing - with the choices of what is or isn't installed may lead to an + with the choices of what is or isn’t installed may lead to an inconsistent TeX Live installation; e.g., when a package is renamed. -'Actions menu' +‘Actions menu’ Provides access to several actions: update the filename database - (aka 'ls-R', 'mktexlsr', 'texhash'), rebuild all formats - ('fmtutil-sys --all'), update the font map database ('updmap-sys'), + (aka ‘ls-R’, ‘mktexlsr’, ‘texhash’), rebuild all formats + (‘fmtutil-sys --all’), update the font map database (‘updmap-sys’), restore from a backup of a package, and use of symbolic links in system directories (not on Windows). The final action is to remove the entire TeX Live installation (also not on Windows). -'Help menu' +‘Help menu’ Provides access to the TeX Live manual (also on the web at - <https://tug.org/texlive/doc.html>) and the usual "About" box. + <https://tug.org/texlive/doc.html>) and the usual “About†box. File: tlbuild.info, Node: tlmgr GUI options, Prev: tlmgr Menu bar, Up: tlmgr GUI FOR TLMGR @@ -5146,29 +5147,29 @@ File: tlbuild.info, Node: tlmgr GUI options, Prev: tlmgr Menu bar, Up: tlmgr B.11.3 GUI options ------------------ -Some generic Perl/Tk options can be specified with 'tlmgr gui' to +Some generic Perl/Tk options can be specified with ‘tlmgr gui’ to control the display: -'-background' _color_ +‘-background’ _color_ Set background color. -'-font "' _fontname_ _fontsize_ '"' +‘-font "’ _fontname_ _fontsize_ ‘"’ - Set font, e.g., 'tlmgr gui -font "helvetica 18"'. The argument to - '-font' must be quoted, i.e., passed as a single string. + Set font, e.g., ‘tlmgr gui -font "helvetica 18"’. The argument to + ‘-font’ must be quoted, i.e., passed as a single string. -'-foreground' _color_ +‘-foreground’ _color_ Set foreground color. -'-geometry' _geomspec_ +‘-geometry’ _geomspec_ - Set the X geometry, e.g., 'tlmgr gui -geometry 1024x512-0+0' + Set the X geometry, e.g., ‘tlmgr gui -geometry 1024x512-0+0’ creates the window of (approximately) the given size in the upper-right corner of the display. -'-xrm' _xresource_ +‘-xrm’ _xresource_ Pass the arbitrary X resource string _xresource_. @@ -5182,25 +5183,25 @@ File: tlbuild.info, Node: tlmgr MACHINE-READABLE OUTPUT, Next: tlmgr ENVIRONME B.12 MACHINE-READABLE OUTPUT ============================ -With the '--machine-readable' option, 'tlmgr' writes to stdout in the +With the ‘--machine-readable’ option, ‘tlmgr’ writes to stdout in the fixed line-oriented format described here, and the usual informational messages for human consumption are written to stderr (normally they are written to stdout). The idea is that a program can get all the information it needs by reading stdout. - Currently this option only applies to the *note update: tlmgr update -[_option_...] [_pkg_...], *note install: tlmgr install [_option_...] -_pkg_..., and *note option: tlmgr option. actions. + Currently this option only applies to the *note update: tlmgr update +[_option_...] [_pkg_...], *note install: tlmgr install [_option_...] +_pkg_..., and *note option: tlmgr option. actions. * Menu: -* tlmgr Machine-readable 'update' and 'install' output:: -* tlmgr Machine-readable 'option' output:: +* tlmgr Machine-readable update and install output:: +* tlmgr Machine-readable option output:: -File: tlbuild.info, Node: tlmgr Machine-readable 'update' and 'install' output, Next: tlmgr Machine-readable 'option' output, Up: tlmgr MACHINE-READABLE OUTPUT +File: tlbuild.info, Node: tlmgr Machine-readable update and install output, Next: tlmgr Machine-readable option output, Up: tlmgr MACHINE-READABLE OUTPUT -B.12.1 Machine-readable 'update' and 'install' output +B.12.1 Machine-readable ‘update’ and ‘install’ output ----------------------------------------------------- The output format is as follows: @@ -5213,8 +5214,8 @@ The output format is as follows: "end-of-updates" other output from post actions, not in machine readable form - The header section currently has two fields: 'location-url' (the -repository source from which updates are being drawn), and 'total-bytes' + The header section currently has two fields: ‘location-url’ (the +repository source from which updates are being drawn), and ‘total-bytes’ (the total number of bytes to be downloaded). The _localrev_ and _serverrev_ fields for each package are the @@ -5228,83 +5229,83 @@ time since start of installation/updates and the estimated total time. Line endings may be either LF or CRLF depending on the current platform. -'location-url' _location_ +‘location-url’ _location_ - The _location_ may be a url (including 'file:///foo/bar/...'), or a - directory name ('/foo/bar'). It is the package repository from + The _location_ may be a url (including ‘file:///foo/bar/...’), or a + directory name (‘/foo/bar’). It is the package repository from which the new package information was drawn. -'total-bytes' _count_ +‘total-bytes’ _count_ The _count_ is simply a decimal number, the sum of the sizes of all the packages that need updating or installing (which are listed subsequently). - Then comes a line with only the literal string 'end-of-header'. + Then comes a line with only the literal string ‘end-of-header’. - Each following line until a line with literal string 'end-of-updates' + Each following line until a line with literal string ‘end-of-updates’ reports on one package. The fields on each line are separated by a tab. Here are the fields. _pkgname_ The TeX Live package identifier, with a possible platform suffix - for executables. For instance, 'pdftex' and 'pdftex.i386-linux' + for executables. For instance, ‘pdftex’ and ‘pdftex.i386-linux’ are given as two separate packages, one on each line. _status_ The status of the package update. One character, as follows: - 'd' + ‘d’ The package was removed on the server. - 'f' + ‘f’ The package was removed in the local installation, even though - a collection depended on it. (E.g., the user ran 'tlmgr - remove --force'.) + a collection depended on it. (E.g., the user ran ‘tlmgr + remove --force’.) - 'u' + ‘u’ Normal update is needed. - 'r' + ‘r’ Reversed non-update: the locally-installed version is newer than the version on the server. - 'a' + ‘a’ Automatically-determined need for installation, the package is new on the server and is (most probably) part of an installed collection. - 'i' + ‘i’ - Package will be installed and isn't present in the local + Package will be installed and isn’t present in the local installation (action install). - 'I' + ‘I’ Package is already present but will be reinstalled (action install). _localrev_ - The revision number of the installed package, or '-' if it is not + The revision number of the installed package, or ‘-’ if it is not present locally. _serverrev_ - The revision number of the package on the server, or '-' if it is + The revision number of the package on the server, or ‘-’ if it is not present on the server. _size_ The size in bytes of the package on the server. The sum of all the - package sizes is given in the 'total-bytes' header field mentioned + package sizes is given in the ‘total-bytes’ header field mentioned above. _runtime_ @@ -5316,16 +5317,16 @@ _esttot_ The estimated total time. -File: tlbuild.info, Node: tlmgr Machine-readable 'option' output, Prev: tlmgr Machine-readable 'update' and 'install' output, Up: tlmgr MACHINE-READABLE OUTPUT +File: tlbuild.info, Node: tlmgr Machine-readable option output, Prev: tlmgr Machine-readable update and install output, Up: tlmgr MACHINE-READABLE OUTPUT -B.12.2 Machine-readable 'option' output +B.12.2 Machine-readable ‘option’ output --------------------------------------- The output format is as follows: key "\t" value - If a value is not saved in the database the string '(not set)' is + If a value is not saved in the database the string ‘(not set)’ is shown. If you are developing a program that uses this output, and find that @@ -5337,22 +5338,22 @@ File: tlbuild.info, Node: tlmgr ENVIRONMENT VARIABLES, Next: tlmgr AUTHORS AND B.13 ENVIRONMENT VARIABLES ========================== -'tlmgr' uses many of the standard TeX environment variables, as reported -by, e.g., 'tlmgr conf' (*note conf: tlmgr conf.). +‘tlmgr’ uses many of the standard TeX environment variables, as reported +by, e.g., ‘tlmgr conf’ (*note conf: tlmgr conf.). - In addition, for ease in scripting and debugging, 'tlmgr' looks for + In addition, for ease in scripting and debugging, ‘tlmgr’ looks for the following environment variables. These are not of interest for normal user installations. -'TEXLIVE_COMPRESSOR' +‘TEXLIVE_COMPRESSOR’ This variable allows selecting a different compressor program for backups and intermediate rollback containers. The order of selection is: - 1. If the environment variable 'TEXLIVE_COMPRESSOR' is defined, - use it; abort if it doesn't work. Possible values: 'lz4', - 'gzip', 'xz'. The necessary options are added internally. + 1. If the environment variable ‘TEXLIVE_COMPRESSOR’ is defined, + use it; abort if it doesn’t work. Possible values: ‘lz4’, + ‘gzip’, ‘xz’. The necessary options are added internally. 2. If lz4 is available (either from the system or TL) and working, use that. @@ -5362,28 +5363,28 @@ normal user installations. 4. If xz is available (either from the system or TL) and working, use that. - lz4 and gzip are faster in creating tlmgr's local backups, hence + lz4 and gzip are faster in creating tlmgr’s local backups, hence they are preferred. The unconditional use of xz for the tlnet containers is unaffected, to minimize download sizes. -'TEXLIVE_DOWNLOADER' +‘TEXLIVE_DOWNLOADER’ -'TL_DOWNLOAD_PROGRAM' +‘TL_DOWNLOAD_PROGRAM’ -'TL_DOWNLOAD_ARGS' +‘TL_DOWNLOAD_ARGS’ These options allow selecting different download programs then the ones automatically selected by the installer. The order of selection is: - 1. If the environment variable 'TEXLIVE_DOWNLOADER' is defined, - use it; abort if the specified program doesn't work. Possible - values: 'lwp', 'curl', 'wget'. The necessary options are + 1. If the environment variable ‘TEXLIVE_DOWNLOADER’ is defined, + use it; abort if the specified program doesn’t work. Possible + values: ‘lwp’, ‘curl’, ‘wget’. The necessary options are added internally. - 2. If the environment variable 'TL_DOWNLOAD_PROGRAM' is defined - (can be any value), use it together with 'TL_DOWNLOAD_ARGS'; - abort if it doesn't work. + 2. If the environment variable ‘TL_DOWNLOAD_PROGRAM’ is defined + (can be any value), use it together with ‘TL_DOWNLOAD_ARGS’; + abort if it doesn’t work. 3. If LWP is available and working, use that (by far the most efficient method, as it supports persistent downloads). @@ -5393,27 +5394,27 @@ normal user installations. 5. If wget is available (either from the system or TL) and working, use that. - TL provides 'wget' binaries for platforms where necessary, so some + TL provides ‘wget’ binaries for platforms where necessary, so some download method should always be available. -'TEXLIVE_PREFER_OWN' +‘TEXLIVE_PREFER_OWN’ By default, compression and download programs provided by the - system, i.e., found along 'PATH' are preferred over those shipped + system, i.e., found along ‘PATH’ are preferred over those shipped with TeX Live. This can create problems with systems that are too old, and so can be overridden by setting the environment variable - 'TEXLIVE_PREFER_OWN' to 1. In this case, executables shipped with + ‘TEXLIVE_PREFER_OWN’ to 1. In this case, executables shipped with TL will be preferred. Extra compression/download programs not provided by TL, such as gzip, lwp, and curl, are still checked for on the system and used - if available, per the above. 'TEXLIVE_PREFER_OWN' only applies + if available, per the above. ‘TEXLIVE_PREFER_OWN’ only applies when the program being checked for is shipped with TL, namely the lz4 and xz compressors and wget downloader. - Exception: on Windows, the 'tar.exe' shipped with TL is always + Exception: on Windows, the ‘tar.exe’ shipped with TL is always used, regardless of any setting. @@ -5437,116 +5438,114 @@ Index �[index�] * Menu: -* '$@' target in normal 'make' rules: Prerequisites. (line 13) -* --bindir configure option: '--prefix' '--bindir' .... +* $@ target in normal make rules: Prerequisites. (line 13) +* --bindir configure option: --prefix --bindir .... (line 6) -* --bindir configure option <1>: '--enable-multiplatform'. +* --bindir configure option <1>: --enable-multiplatform. (line 6) * --build=HOST: Cross configuring. (line 6) * --disable-all-packages: Build one package. (line 6) -* --disable-all-pkgs: '--disable-all-pkgs'. - (line 6) -* --disable-bibtex8: Configure options for 'texk/bibtex-x'. +* --disable-all-pkgs: --disable-all-pkgs. (line 6) +* --disable-bibtex8: Configure options for texk/bibtex-x. (line 9) -* --disable-bibtexu: Configure options for 'texk/bibtex-x'. +* --disable-bibtexu: Configure options for texk/bibtex-x. (line 12) -* --disable-dump-share: Configure options for 'texk/web2c'. +* --disable-dump-share: Configure options for texk/web2c. (line 27) -* --disable-dvipdfmx: Configure options for 'texk/dvipdfm-x'. +* --disable-dvipdfmx: Configure options for texk/dvipdfm-x. (line 12) -* --disable-etex-synctex: Configure options for 'texk/web2c'. +* --disable-etex-synctex: Configure options for texk/web2c. (line 59) -* --disable-ipc: Configure options for 'texk/web2c'. +* --disable-ipc: Configure options for texk/web2c. (line 31) -* --disable-largefile: '--disable-largefile'. - (line 6) -* --disable-linked-scripts: Configure options for 'texk/texlive'. +* --disable-largefile: --disable-largefile. (line 6) +* --disable-linked-scripts: Configure options for texk/texlive. (line 6) -* --disable-mf-nowin: Configure options for 'texk/web2c'. +* --disable-mf-nowin: Configure options for texk/web2c. (line 34) -* --disable-missing: '--disable-missing'. (line 6) -* --disable-native-texlive-build: '--disable-native-texlive-build'. +* --disable-missing: --disable-missing. (line 6) +* --disable-native-texlive-build: --disable-native-texlive-build. (line 6) -* --disable-PROG: '--enable-PROG' '--disable-PROG'. +* --disable-PROG: --enable-PROG --disable-PROG. (line 6) -* --disable-synctex: Configure options for 'texk/web2c'. +* --disable-synctex: Configure options for texk/web2c. (line 64) -* --disable-tex: Configure options for 'texk/web2c'. +* --disable-tex: Configure options for texk/web2c. (line 37) -* --disable-web-progs: Configure options for 'texk/web2c'. +* --disable-web-progs: Configure options for texk/web2c. (line 41) -* --disable-xdvipdfmx: Configure options for 'texk/dvipdfm-x'. +* --disable-xdvipdfmx: Configure options for texk/dvipdfm-x. (line 15) -* --enable-*win for Metafont window support: Configure options for 'texk/web2c'. +* --enable-*win for Metafont window support: Configure options for texk/web2c. (line 55) -* --enable-auto-core: Configure options for 'texk/web2c'. +* --enable-auto-core: Configure options for texk/web2c. (line 45) -* --enable-compiler-warnings=LEVEL: '--enable-compiler-warnings='LEVEL. +* --enable-compiler-warnings=LEVEL: --enable-compiler-warnings=LEVEL. (line 6) * --enable-cxx-runtime-hack: Macros for compilers. (line 29) -* --enable-etex: Configure options for 'texk/web2c'. +* --enable-etex: Configure options for texk/web2c. (line 37) -* --enable-libtool-hack: Configure options for 'texk/web2c'. +* --enable-libtool-hack: Configure options for texk/web2c. (line 50) * --enable-maintainer-mode: Build system tools. (line 28) -* --enable-maintainer-mode <1>: '--enable-maintainer-mode'. +* --enable-maintainer-mode <1>: --enable-maintainer-mode. (line 6) * --enable-missing to ignore dependencies: Build one package. (line 94) -* --enable-mktextfm-default: 'kpathsea' library. (line 18) -* --enable-multiplatform: '--enable-multiplatform'. +* --enable-mktextfm-default: kpathsea library. (line 18) +* --enable-multiplatform: --enable-multiplatform. (line 6) -* --enable-PROG: '--enable-PROG' '--disable-PROG'. +* --enable-PROG: --enable-PROG --disable-PROG. (line 6) -* --enable-shared: '--enable-shared'. (line 6) -* --enable-silent-rules: '--enable-silent-rules'. +* --enable-shared: --enable-shared. (line 6) +* --enable-silent-rules: --enable-silent-rules. (line 6) -* --enable-tex-synctex: Configure options for 'texk/web2c'. +* --enable-tex-synctex: Configure options for texk/web2c. (line 59) -* --enable-texlive-build: '--disable-native-texlive-build'. +* --enable-texlive-build: --disable-native-texlive-build. (line 15) -* --enable-xi2-scrolling: Configure options for 'texk/xdvik'. +* --enable-xi2-scrolling: Configure options for texk/xdvik. (line 13) -* --enable-xindy-docs: Configure options for 'utils/xindy'. +* --enable-xindy-docs: Configure options for utils/xindy. (line 10) -* --enable-xindy-rules: Configure options for 'utils/xindy'. +* --enable-xindy-rules: Configure options for utils/xindy. (line 6) * --host=HOST: Cross configuring. (line 6) -* --libdir configure option: '--enable-multiplatform'. +* --libdir configure option: --enable-multiplatform. (line 6) * --no-print-directory GNU make option: Build one engine. (line 56) -* --prefix configure option: '--prefix' '--bindir' .... +* --prefix configure option: --prefix --bindir .... (line 6) -* --with-banner-add=STR: Configure options for 'texk/web2c'. +* --with-banner-add=STR: Configure options for texk/web2c. (line 6) -* --with-clisp-runtime=FILENAME: Configure options for 'utils/xindy'. +* --with-clisp-runtime=FILENAME: Configure options for utils/xindy. (line 14) -* --with-editor=CMD: Configure options for 'texk/web2c'. +* --with-editor=CMD: Configure options for texk/web2c. (line 11) -* --with-fontconfig-includes=DIR: Configure options for 'texk/web2c'. +* --with-fontconfig-includes=DIR: Configure options for texk/web2c. (line 16) -* --with-fontconfig-libdir=DIR: Configure options for 'texk/web2c'. +* --with-fontconfig-libdir=DIR: Configure options for texk/web2c. (line 16) -* --with-gs=FILENAME: Configure options for 'texk/xdvik'. +* --with-gs=FILENAME: Configure options for texk/xdvik. (line 6) * --with-LIB-includes=DIR, -libdir: Library-specific configure options. (line 16) -* --with-libgs-includes, -libdir: Configure options for 'texk/dvisvgm'. +* --with-libgs-includes, -libdir: Configure options for texk/dvisvgm. (line 17) -* --with-system-kpathsea: 'kpathsea' library. (line 13) +* --with-system-kpathsea: kpathsea library. (line 13) * --with-system-LIB: Adding a new generic library module. (line 34) * --with-system-LIB <1>: Library-specific configure options. (line 9) -* --with-system-libgs: Configure options for 'texk/dvisvgm'. +* --with-system-libgs: Configure options for texk/dvisvgm. (line 6) -* --with-xdvi-x-toolkit: 'xdvik' package. (line 21) -* --with-xdvi-x-toolkit=KIT: Configure options for 'texk/xdvik'. +* --with-xdvi-x-toolkit: xdvik package. (line 21) +* --with-xdvi-x-toolkit=KIT: Configure options for texk/xdvik. (line 9) -* --without-libgs: Configure options for 'texk/dvisvgm'. +* --without-libgs: Configure options for texk/dvisvgm. (line 12) -* --without-ln-s: '--without-ln-s'. (line 6) -* --without-x: '--without-x'. (line 6) +* --without-ln-s: --without-ln-s. (line 6) +* --without-x: --without-x. (line 6) * -C configure option: Build in parallel. (line 11) * -j make option: Build in parallel. (line 6) * ac/withenable.ac: Adding a new program module. @@ -5560,14 +5559,14 @@ Index * adding a new TeX-specific library: Adding a new TeX-specific library module. (line 6) * adding to TeX Live: Extending TeX Live. (line 6) -* 'am/' top-level directory: Top-level directories. +* am/ top-level directory: Top-level directories. (line 14) * ANSI C: Declarations and definitions. (line 6) -* 'ApplicationServices' Mac framework, required by 'xetex': Prerequisites. +* ApplicationServices Mac framework, required by xetex: Prerequisites. (line 40) * asymptote: Linked scripts. (line 23) -* asymptote <1>: 'asymptote'. (line 6) +* asymptote <1>: asymptote. (line 6) * Autoconf: Overview of build system. (line 6) * autoconf macros: Autoconf macros. (line 6) @@ -5576,11 +5575,11 @@ Index * autoreconf, for new program: Adding a new program module. (line 76) * biber: Linked scripts. (line 23) -* bibtex-x: Configure options for 'texk/bibtex-x'. +* bibtex-x: Configure options for texk/bibtex-x. (line 6) -* bibtex8: Configure options for 'texk/bibtex-x'. +* bibtex8: Configure options for texk/bibtex-x. (line 6) -* bibtexu: Configure options for 'texk/bibtex-x'. +* bibtexu: Configure options for texk/bibtex-x. (line 6) * BSD distro: Distro builds. (line 6) * build directory, required: Building. (line 17) @@ -5591,7 +5590,7 @@ Index * Build script: Building. (line 6) * build system, design of: Overview of build system. (line 6) -* 'build-aux/' top-level directory: Top-level directories. +* build-aux/ top-level directory: Top-level directories. (line 30) * BUILDCC, BUILDCFLAGS, ...: Cross configuring. (line 42) * building: Building. (line 6) @@ -5603,8 +5602,8 @@ Index (line 6) * C99, avoided: Declarations and definitions. (line 6) -* cache file, for 'configure': Build in parallel. (line 11) -* cache for 'configure': Build in parallel. (line 6) +* cache file, for configure: Build in parallel. (line 11) +* cache for configure: Build in parallel. (line 6) * callexe.c: Macros for Windows. (line 32) * CC: Variables for configure. (line 10) @@ -5618,45 +5617,45 @@ Index (line 18) * CLISP: Variables for configure. (line 17) -* CLISP <1>: Configure options for 'utils/xindy'. +* CLISP <1>: Configure options for utils/xindy. (line 14) -* 'clisp', required by 'xindy': Prerequisites. (line 44) -* 'Cocoa' Mac framework, required by 'xetex': Prerequisites. (line 40) +* clisp, required by xindy: Prerequisites. (line 44) +* Cocoa Mac framework, required by xetex: Prerequisites. (line 40) * coding conventions: Coding conventions. (line 6) * compilers, C and C++11: Prerequisites. (line 6) * config.guess, config.sub, ...: Top-level directories. (line 30) -* 'configure' options: Configure options. (line 6) -* 'configure' options, for 'bibtex-x': Configure options for 'texk/bibtex-x'. +* configure options: Configure options. (line 6) +* configure options, for bibtex-x: Configure options for texk/bibtex-x. (line 6) -* 'configure' options, for 'dvipdfm-x': Configure options for 'texk/dvipdfm-x'. +* configure options, for dvipdfm-x: Configure options for texk/dvipdfm-x. (line 6) -* 'configure' options, for 'dvisvgm': Configure options for 'texk/dvisvgm'. +* configure options, for dvisvgm: Configure options for texk/dvisvgm. (line 6) -* 'configure' options, for 'kpathsea': Configure options for 'kpathsea'. +* configure options, for kpathsea: Configure options for kpathsea. (line 6) -* 'configure' options, for 'texk/texlive': Configure options for 'texk/texlive'. +* configure options, for texk/texlive: Configure options for texk/texlive. (line 6) -* 'configure' options, for 'web2c': Configure options for 'texk/web2c'. +* configure options, for web2c: Configure options for texk/web2c. (line 6) -* 'configure' options, for 'xdvik': Configure options for 'texk/xdvik'. +* configure options, for xdvik: Configure options for texk/xdvik. (line 6) -* 'configure' options, for 'xindy': Configure options for 'utils/xindy'. +* configure options, for xindy: Configure options for utils/xindy. (line 6) -* 'configure' options, global: Global configure options. +* configure options, global: Global configure options. (line 6) -* 'configure' options, library-specific: Library-specific configure options. +* configure options, library-specific: Library-specific configure options. (line 6) -* 'configure' options, program-specific: Program-specific configure options. +* configure options, program-specific: Program-specific configure options. (line 6) -* 'configure' problems, work around by removing: Build one package. +* configure problems, work around by removing: Build one package. (line 106) -* 'configure' variables: Variables for configure. +* configure variables: Variables for configure. (line 6) * configure.ac: Adding a new program module. (line 45) * configuring, for cross compilation: Cross configuring. (line 6) -* 'const': Const. (line 6) +* const: Const. (line 6) * continuous integration: Continuous integration. (line 6) * conventions, coding: Coding conventions. (line 6) @@ -5665,7 +5664,7 @@ Index * cross compilation: Cross compilation. (line 6) * cross compilation configuring: Cross configuring. (line 6) * cross compilation problems: Cross problems. (line 6) -* cross compilation, with host binary: 'xdvik' package. (line 14) +* cross compilation, with host binary: xdvik package. (line 14) * ctangle: Cross problems. (line 26) * CXX: Variables for configure. (line 11) @@ -5675,39 +5674,38 @@ Index * declarations before statements, avoiding: Declarations and definitions. (line 6) * dependencies, with several output files: Build in parallel. (line 6) -* DESTDIR: '--prefix' '--bindir' .... +* DESTDIR: --prefix --bindir .... (line 9) * directories, for installation: Installation directories. (line 6) * directories, top-level: Top-level directories. (line 6) * discards qualifiers warning: Const. (line 30) -* 'dist' and 'distcheck' targets for 'make': Build distribution. - (line 6) +* dist and distcheck targets for make: Build distribution. (line 6) * distribution tarball, making: Build distribution. (line 6) * distro, building for: Distro builds. (line 6) -* dvipdfm-x: Configure options for 'texk/dvipdfm-x'. +* dvipdfm-x: Configure options for texk/dvipdfm-x. (line 6) -* dvipdfmx: Configure options for 'texk/dvipdfm-x'. +* dvipdfmx: Configure options for texk/dvipdfm-x. (line 6) -* dvisvgm: Configure options for 'texk/dvisvgm'. +* dvisvgm: Configure options for texk/dvisvgm. (line 6) -* 'dvisvgm', requires C++11: Prerequisites. (line 17) +* dvisvgm, requires C++11: Prerequisites. (line 17) * engine, adding new: Adding a new engine. (line 6) * engine, building one: Build one engine. (line 6) -* environment variables, for 'configure': Configure options. (line 16) -* exec_prefix: '--enable-multiplatform'. +* environment variables, for configure: Configure options. (line 16) +* exec_prefix: --enable-multiplatform. (line 6) * extending TeX Live: Extending TeX Live. (line 6) -* 'extern' functions: Declarations and definitions. +* extern functions: Declarations and definitions. (line 41) * flags, macros for library and header: Macros for library and header flags. (line 6) -* 'fontconfig' library, required by 'xetex': Prerequisites. (line 40) -* 'freetype' cross compiling: Cross problems. (line 13) -* freetype library: 'freetype' library. (line 6) -* FreeType, requires 'gmake': Prerequisites. (line 13) -* freetype-config: 'freetype' library. (line 13) +* fontconfig library, required by xetex: Prerequisites. (line 40) +* freetype cross compiling: Cross problems. (line 13) +* freetype library: freetype library. (line 6) +* FreeType, requires gmake: Prerequisites. (line 13) +* freetype-config: freetype library. (line 13) * freetype-config <1>: Variables for configure. (line 24) * FT2_CONFIG: Variables for configure. @@ -5717,14 +5715,14 @@ Index (line 6) * generic library module, adding: Adding a new generic library module. (line 6) -* Ghostscript location for Xdvik: Configure options for 'texk/xdvik'. +* Ghostscript location for Xdvik: Configure options for texk/xdvik. (line 6) * git-svn: Transfer from Subversion to Github. (line 6) -* global 'configure' options: Global configure options. +* global configure options: Global configure options. (line 6) -* 'gmake', required: Prerequisites. (line 13) -* GNU 'make', required: Prerequisites. (line 13) +* gmake, required: Prerequisites. (line 13) +* GNU make, required: Prerequisites. (line 13) * GNU tools, needed for building: Build system tools. (line 6) * GNU/Linux distro: Distro builds. (line 6) * Gnulib, used for common files: Top-level directories. @@ -5739,23 +5737,23 @@ Index * ICU_CONFIG: Variables for configure. (line 22) * infrastructure, tools needed for: Build system tools. (line 6) -* 'inst/' top-level directory: Top-level directories. +* inst/ top-level directory: Top-level directories. (line 39) * install-tl, TeX Live installer: Installing. (line 8) * installation directories: Installation directories. (line 6) * installing: Installing. (line 6) -* interprocess communication: Configure options for 'texk/web2c'. +* interprocess communication: Configure options for texk/web2c. (line 31) * introduction: Introduction. (line 6) -* iteration through sources, by 'configure' and 'make': Build iteration. +* iteration through sources, by configure and make: Build iteration. (line 6) -* kpathsea library: 'kpathsea' library. (line 6) -* kpathsea.ac: 'kpathsea' library. (line 18) -* kpse-libpng-flags.m4: 'png' library. (line 46) +* kpathsea library: kpathsea library. (line 6) +* kpathsea.ac: kpathsea library. (line 18) +* kpse-libpng-flags.m4: png library. (line 45) * kpse-pkgs.m4: Overview of build system. (line 30) -* kpse-zlib-flags.m4: 'zlib' library. (line 6) +* kpse-zlib-flags.m4: zlib library. (line 6) * kpsewhich: Variables for configure. (line 30) * KPSEWHICH: Variables for configure. @@ -5794,7 +5792,7 @@ Index (line 8) * KPSE_LIBPNG_FLAGS: Macros for library and header flags. (line 10) -* KPSE_LIBPNG_FLAGS <1>: 'png' library. (line 46) +* KPSE_LIBPNG_FLAGS <1>: png library. (line 45) * kpse_libs_pkgs: Adding a new generic library module. (line 6) * KPSE_LIB_FLAGS: Macros for library and header flags. @@ -5810,10 +5808,10 @@ Index (line 6) * kpse_texlibs_pkgs: Adding a new TeX-specific library module. (line 11) -* KPSE_TRY_LIB: 'png' library. (line 18) +* KPSE_TRY_LIB: png library. (line 17) * KPSE_TRY_LIB <1>: Adding a new generic library module. (line 20) -* KPSE_TRY_LIBXX: 'png' library. (line 31) +* KPSE_TRY_LIBXX: png library. (line 30) * KPSE_TRY_LIBXX <1>: Adding a new generic library module. (line 20) * kpse_utils_pkgs: Adding a new program module. @@ -5823,46 +5821,44 @@ Index (line 11) * KPSE_WITH_TEXLIB: Adding a new TeX-specific library module. (line 14) -* large file support: '--disable-largefile'. - (line 6) +* large file support: --disable-largefile. (line 6) * LATEX: Variables for configure. (line 40) * layout of sources: Layout and infrastructure. (line 6) -* LFS (large file support): '--disable-largefile'. - (line 6) -* libexpat, dependency of 'libfontconfig': Configure options for 'texk/web2c'. +* LFS (large file support): --disable-largefile. (line 6) +* libexpat, dependency of libfontconfig: Configure options for texk/web2c. (line 50) -* libfontconfig, hack for avoiding linking dependencies: Configure options for 'texk/web2c'. +* libfontconfig, hack for avoiding linking dependencies: Configure options for texk/web2c. (line 50) * libfreetype: Variables for configure. (line 24) -* 'libfreetype', and 'const': Const. (line 21) -* libpng library: 'png' library. (line 6) +* libfreetype, and const: Const. (line 21) +* libpng library: png library. (line 6) * library module, generic, adding: Adding a new generic library module. (line 6) * library module, TeX-specific, adding: Adding a new TeX-specific library module. (line 6) * library modules: Library modules. (line 6) -* library-specific 'configure' options: Library-specific configure options. +* library-specific configure options: Library-specific configure options. (line 6) -* 'libsigsegv', required by 'xindy': Prerequisites. (line 44) +* libsigsegv, required by xindy: Prerequisites. (line 44) * libstc++, statically linking: Macros for compilers. (line 29) * Libtool: Overview of build system. (line 6) -* libtool, hack for avoiding excessive linking: Configure options for 'texk/web2c'. +* libtool, hack for avoiding excessive linking: Configure options for texk/web2c. (line 50) -* libXt: Configure options for 'texk/web2c'. +* libXt: Configure options for texk/web2c. (line 22) * linked scripts: Linked scripts. (line 6) * linking C++ libraries statically: Macros for compilers. (line 29) -* lisp.run, lisp.exe: Configure options for 'utils/xindy'. +* lisp.run, lisp.exe: Configure options for utils/xindy. (line 14) -* LittleEndian architectures: Configure options for 'texk/web2c'. +* LittleEndian architectures: Configure options for texk/web2c. (line 27) -* 'm4/' top-level directory: Top-level directories. +* m4/ top-level directory: Top-level directories. (line 14) * macros, for compilers: Macros for compilers. (line 6) @@ -5877,19 +5873,19 @@ Index * MAKE: Variables for configure. (line 33) * make -t: Build system tools. (line 43) -* 'make' rules, verbose vs. silent: '--enable-silent-rules'. +* make rules, verbose vs. silent: --enable-silent-rules. (line 6) * Makefile.am: Adding a new program module. (line 46) -* mf-nowin: Configure options for 'texk/web2c'. +* mf-nowin: Configure options for texk/web2c. (line 34) -* 'mingw32': Cross configuring. (line 27) +* mingw32: Cross configuring. (line 27) * MINGW32, Automake conditional: Macros for Windows. (line 20) -* mktex.ac: 'kpathsea' library. (line 18) -* mktextfm: 'kpathsea' library. (line 18) +* mktex.ac: kpathsea library. (line 18) +* mktextfm: kpathsea library. (line 18) * modules, for libraries: Library modules. (line 6) * modules, for programs: Program modules. (line 6) -* motif: Configure options for 'texk/xdvik'. +* motif: Configure options for texk/xdvik. (line 9) * native cross compilation: Cross compilation. (line 10) * NEWPROG-SRC, original source subdirectory: Adding a new program module. @@ -5897,36 +5893,34 @@ Index * OBJCXX=OBJC-COMPILER: Build one package. (line 77) * one engine, building: Build one engine. (line 6) * one package, building: Build one package. (line 6) -* OpenGL, required for Asymptote: 'asymptote'. (line 6) +* OpenGL, required for Asymptote: asymptote. (line 6) * operating system distribution, building for: Distro builds. (line 6) * otangle: Cross problems. (line 26) * overall build process: Building. (line 6) * parallel build: Build in parallel. (line 6) * paths, for installation: Installation directories. (line 6) -* PDF files, size of: '--disable-largefile'. - (line 11) +* PDF files, size of: --disable-largefile. (line 11) * PDFLATEX: Variables for configure. (line 41) * PERL: Variables for configure. (line 39) -* 'perl', required by 'web2c', etc.: Prerequisites. (line 29) +* perl, required by web2c, etc.: Prerequisites. (line 29) * PKG_CONFIG: Variables for configure. (line 23) * plain.tex, not in source tree: Installing. (line 8) -* png library: 'png' library. (line 6) -* PostScript files, size of: '--disable-largefile'. - (line 11) +* png library: png library. (line 6) +* PostScript files, size of: --disable-largefile. (line 11) * Preining, Norbert: Distro builds. (line 54) -* preloaded binaries: Configure options for 'texk/web2c'. +* preloaded binaries: Configure options for texk/web2c. (line 45) * prerequisites for building: Prerequisites. (line 6) * program module, adding: Adding a new program module. (line 6) * program modules: Program modules. (line 6) -* program-specific 'configure' options: Program-specific configure options. +* program-specific configure options: Program-specific configure options. (line 6) -* proxy build system: 'png' library. (line 36) +* proxy build system: png library. (line 35) * Python, required by ICU: Prerequisites. (line 23) * reautoconf: Build system tools. (line 28) * reautoconf, for new program: Adding a new program module. @@ -5935,15 +5929,14 @@ Index * requirements for building: Prerequisites. (line 6) * runscript.exe: Macros for Windows. (line 25) * scripts, linked and not maintained: Linked scripts. (line 6) -* scrolling, smooth: Configure options for 'texk/xdvik'. +* scrolling, smooth: Configure options for texk/xdvik. (line 13) * SED: Variables for configure. (line 34) * setup macros, general: General setup macros. (line 6) * shared libraries, using vs. avoiding: Distro builds. (line 11) -* size of PDF and PS files: '--disable-largefile'. - (line 11) +* size of PDF and PS files: --disable-largefile. (line 11) * size of source tree: Build one package. (line 63) * source code declarations: Declarations and definitions. (line 6) @@ -5951,8 +5944,8 @@ Index * source tree: Layout and infrastructure. (line 6) * squeeze: Cross problems. (line 13) -* squeeze/configure.ac: 'xdvik' package. (line 14) -* 'static' functions: Declarations and definitions. +* squeeze/configure.ac: xdvik package. (line 14) +* static functions: Declarations and definitions. (line 35) * static linking for C++: Macros for compilers. (line 29) @@ -5961,12 +5954,12 @@ Index * Subversion repository: Build system tools. (line 38) * support files, separate from build: Installing. (line 8) * symlinks, used for scripts: Linked scripts. (line 6) -* synctex: Configure options for 'texk/web2c'. +* synctex: Configure options for texk/web2c. (line 59) -* synctex <1>: Configure options for 'texk/web2c'. +* synctex <1>: Configure options for texk/web2c. (line 64) * system distribution, building for: Distro builds. (line 6) -* t1utils package: 't1utils' package. (line 6) +* t1utils package: t1utils package. (line 6) * tangle: Cross problems. (line 26) * tests, running: Overview of build system. (line 6) @@ -5993,13 +5986,13 @@ Index * use-commit-times, Subversion: Build system tools. (line 38) * variable declarations, in source code: Declarations and definitions. (line 52) -* variables for 'configure': Variables for configure. +* variables for configure: Variables for configure. (line 6) * warning, discards qualifiers: Const. (line 30) * WARNING_C[XX]FLAGS: Macros for compilers. (line 9) * web2c program: Cross problems. (line 13) -* web2c.ac: Configure options for 'texk/web2c'. +* web2c.ac: Configure options for texk/web2c. (line 37) * wget: Linked scripts. (line 23) * WIN32, Automake conditional: Macros for Windows. (line 16) @@ -6008,433 +6001,438 @@ Index * Windows, macros for: Macros for Windows. (line 6) * withenable.ac, for new modules: Adding a new program module. (line 14) -* 'Work/' top-level directory: Top-level directories. +* Work/ top-level directory: Top-level directories. (line 39) * wrapper binary for scripts on Windows: Linked scripts. (line 6) -* wrapper build system: 'freetype' library. (line 6) -* X toolkit: Configure options for 'texk/web2c'. +* wrapper build system: freetype library. (line 6) +* X toolkit: Configure options for texk/web2c. (line 22) * X11 development, required by X clients: Prerequisites. (line 36) -* X11 headers, and 'const': Const. (line 21) -* xasy: 'asymptote'. (line 6) -* xaw: Configure options for 'texk/xdvik'. +* X11 headers, and const: Const. (line 21) +* xasy: asymptote. (line 6) +* xaw: Configure options for texk/xdvik. (line 9) -* xdvik: 'xdvik' package. (line 6) -* xdvik <1>: Configure options for 'texk/xdvik'. +* xdvik: xdvik package. (line 6) +* xdvik <1>: Configure options for texk/xdvik. (line 6) -* xdvipdfmx: Configure options for 'texk/dvipdfm-x'. +* xdvipdfmx: Configure options for texk/dvipdfm-x. (line 6) * xindy: Linked scripts. (line 23) -* xindy <1>: 'xindy' package. (line 6) -* xindy <2>: Configure options for 'utils/xindy'. +* xindy <1>: xindy package. (line 6) +* xindy <2>: Configure options for utils/xindy. (line 6) -* 'xindy' cross compiling requires 'clisp': Cross problems. (line 33) -* XInput: Configure options for 'texk/xdvik'. +* xindy cross compiling requires clisp: Cross problems. (line 33) +* XInput: Configure options for texk/xdvik. (line 13) -* Xlib: Configure options for 'texk/web2c'. +* Xlib: Configure options for texk/web2c. (line 22) * xz: Linked scripts. (line 23) -* zlib library: 'zlib' library. (line 6) +* zlib library: zlib library. (line 6) Tag Table: -Node: Top1208 -Node: Introduction2118 -Node: Overview of build system3941 -Node: Prerequisites5992 -Ref: Prerequisites-Footnote-18991 -Node: Building9294 -Node: Build iteration10636 -Node: Build in parallel11680 -Node: Build distribution12285 -Node: Build one package12933 -Node: Build one engine17648 -Node: Cross compilation20073 -Node: Cross configuring21352 -Node: Cross problems23029 -Node: Installing24691 -Node: Installation directories25711 -Node: Linked scripts27529 -Node: Distro builds29020 -Node: Layout and infrastructure31396 -Node: Build system tools32227 -Node: Top-level directories34444 -Node: Autoconf macros36680 -Node: General setup macros37442 -Node: Macros for programs38317 -Node: Macros for compilers39118 -Node: Macros for libraries40526 -Node: Macros for library and header flags40952 -Node: Macros for Windows42863 -Node: Library modules44450 -Node: 'png' library44947 -Node: 'zlib' library47299 -Node: 'freetype' library47820 -Node: 'kpathsea' library48522 -Node: Program modules49905 -Node: 't1utils' package50341 -Node: 'xindy' package50890 -Node: 'xdvik' package52012 -Node: 'asymptote'53077 -Node: Extending TeX Live53585 -Node: Adding a new program module54392 -Node: Adding a new engine59155 -Node: Adding a new generic library module60940 -Node: Adding a new TeX-specific library module63161 -Node: Configure options63859 -Node: Global configure options65240 -Node: '--disable-native-texlive-build'65808 -Node: '--prefix' '--bindir' ...66776 -Node: '--disable-largefile'67324 -Node: '--disable-missing'67874 -Node: '--enable-compiler-warnings='LEVEL68281 -Node: '--enable-cxx-runtime-hack'68943 -Node: '--enable-maintainer-mode'69369 -Node: '--enable-multiplatform'69904 -Node: '--enable-shared'70483 -Node: '--enable-silent-rules'70860 -Node: '--without-ln-s'71318 -Node: '--without-x'71671 -Node: Program-specific configure options71863 -Node: '--enable-PROG' '--disable-PROG'72526 -Node: '--disable-all-pkgs'72805 -Node: Configure options for 'texk/web2c'73596 -Node: Configure options for 'texk/bibtex-x'76140 -Node: Configure options for 'texk/dvipdfm-x'76689 -Node: Configure options for 'texk/dvisvgm'77471 -Node: Configure options for 'texk/texlive'78358 -Node: Configure options for 'texk/xdvik'78785 -Node: Configure options for 'utils/xindy'79412 -Node: Library-specific configure options80306 -Node: Configure options for 'kpathsea'81269 -Node: Variables for configure81977 -Node: Coding conventions83403 -Node: Declarations and definitions84118 -Node: Const86292 -Node: Continuous integration88156 -Node: Transfer from Subversion to Github88820 -Node: Automatic update of the Git mirror90982 -Node: CI testing on Travis-CI91564 -Node: Releases on Github92273 -Node: install-tl92713 -Node: install-tl NAME93082 -Node: install-tl SYNOPSIS93240 -Node: install-tl DESCRIPTION93456 -Node: install-tl REFERENCES94516 -Node: install-tl OPTIONS95040 -Ref: install-tl *-gui* [[=]_module_]95381 -Ref: install-tl 'text'95589 -Ref: install-tl 'tcl' (or "perltk" or "wizard" or "expert" or nothing)95774 -Ref: install-tl *-no-gui*96406 -Ref: install-tl *-lang* _llcode_96496 -Ref: install-tl *-repository* _url|path_97120 -Ref: install-tl *-select-repository*98009 -Ref: install-tl *-all-options*98427 -Ref: install-tl *-custom-bin* _path_98682 -Ref: install-tl *-debug-fakenet*99512 -Ref: install-tl *-debug-translation*99688 -Ref: install-tl *-force-platform* _platform_99964 -Ref: install-tl *-help*, *--help*, *-?*100208 -Ref: install-tl *-in-place*100621 -Ref: install-tl *-init-from-profile* _profile_file_101166 -Ref: install-tl *-logfile* _file_101435 -Ref: install-tl *-no-cls*101786 -Ref: install-tl *-no-persistent-downloads*101934 -Ref: install-tl *-persistent-downloads*101959 -Ref: install-tl *-no-verify-downloads*102577 -Ref: install-tl *-non-admin*102940 -Ref: install-tl *-portable*103033 -Ref: install-tl *-print-platform*103172 -Ref: install-tl *-profile* _profile_file_103370 -Ref: install-tl *-q*103591 -Ref: install-tl *-scheme* _scheme_103653 -Ref: install-tl *-v*104127 -Ref: install-tl *-version*, *--version*104282 -Node: install-tl PROFILES104416 -Ref: install-tl 'instopt_adjustpath' (default 0 on Unix, 1 on Windows)107282 -Ref: install-tl 'instopt_adjustrepo' (default 1)107358 -Ref: install-tl 'instopt_letter' (default 0)107495 -Ref: install-tl 'instopt_portable' (default 0)107586 -Ref: install-tl 'instopt_write18_restricted' (default 1)107682 -Node: install-tl ENVIRONMENT VARIABLES109021 -Ref: install-tl 'TEXLIVE_DOWNLOADER'109399 -Ref: install-tl 'TL_DOWNLOAD_PROGRAM'109422 -Ref: install-tl 'TL_DOWNLOAD_ARGS'109442 -Ref: install-tl 'TEXLIVE_INSTALL_ENV_NOCHECK'109646 -Ref: install-tl 'TEXLIVE_INSTALL_NO_CONTEXT_CACHE'109848 -Ref: install-tl 'TEXLIVE_INSTALL_NO_RESUME'109957 -Ref: install-tl 'TEXLIVE_INSTALL_NO_WELCOME'110109 -Ref: install-tl 'TEXLIVE_INSTALL_PAPER'110230 -Ref: install-tl 'TEXLIVE_INSTALL_PREFIX'110376 -Ref: install-tl 'TEXLIVE_INSTALL_TEXMFCONFIG'110407 -Ref: install-tl 'TEXLIVE_INSTALL_TEXMFVAR'110435 -Ref: install-tl 'TEXLIVE_INSTALL_TEXMFHOME'110464 -Ref: install-tl 'TEXLIVE_INSTALL_TEXMFLOCAL'110494 -Ref: install-tl 'TEXLIVE_INSTALL_TEXMFSYSCONFIG'110528 -Ref: install-tl 'TEXLIVE_INSTALL_TEXMFSYSVAR'110559 -Ref: install-tl 'NOPERLDOC'110974 -Node: install-tl AUTHORS AND COPYRIGHT111038 -Node: tlmgr111451 -Node: tlmgr NAME111936 -Node: tlmgr SYNOPSIS112068 -Node: tlmgr DESCRIPTION112258 -Node: tlmgr EXAMPLES113357 -Ref: tlmgr 'tlmgr option repository ctan'113608 -Ref: tlmgr 'tlmgr option repository https://mirror.ctan.org/systems/texlive/tlnet'113681 -Ref: tlmgr 'tlmgr update --list'114286 -Ref: tlmgr 'tlmgr update --all'114379 -Ref: tlmgr 'tlmgr info' _what_114536 -Node: tlmgr OPTIONS114798 -Ref: tlmgr *--repository* _url|path_115318 -Ref: tlmgr '/some/local/dir'116504 -Ref: tlmgr 'file:/some/local/dir'116533 -Ref: tlmgr 'ctan'116606 -Ref: tlmgr 'https://mirror.ctan.org/systems/texlive/tlnet'116660 -Ref: tlmgr 'http://server/path/to/tlnet'117001 -Ref: tlmgr 'https://server/path/to/tlnet'117382 -Ref: tlmgr 'ftp://server/path/to/tlnet'117850 -Ref: tlmgr 'user@machine:/path/to/tlnet'117982 -Ref: tlmgr 'scp://user@machine/path/to/tlnet'118023 -Ref: tlmgr 'ssh://user@machine/path/to/tlnet'118064 -Ref: tlmgr *--gui* [_action_]118457 -Ref: tlmgr *--gui-lang* _llcode_119270 -Ref: tlmgr *--command-logfile* _file_120011 -Ref: tlmgr *--debug-translation*120277 -Ref: tlmgr *--machine-readable*120480 -Ref: tlmgr *--no-execute-actions*120748 -Ref: tlmgr *--package-logfile* _file_120941 -Ref: tlmgr *--pause*121195 -Ref: tlmgr *--persistent-downloads*121350 -Ref: tlmgr *--no-persistent-downloads*121378 -Ref: tlmgr *--pin-file*121872 -Ref: tlmgr *--usermode*122090 -Ref: tlmgr *--usertree* _dir_122210 -Ref: tlmgr *--verify-repo=[none|main|all]*122336 -Node: tlmgr ACTIONS123235 -Node: tlmgr help124096 -Node: tlmgr version124573 -Node: tlmgr backup124836 -Ref: tlmgr *backup [_option_...] --all*125007 -Ref: tlmgr *backup [_option_...] _pkg_...*125040 -Ref: tlmgr *--backupdir* _directory_126106 -Ref: tlmgr *--all*126323 -Ref: tlmgr *--clean*[=_N_]126575 -Ref: tlmgr *--dry-run*126902 -Node: tlmgr candidates _pkg_127032 -Node: tlmgr check [_option_...] [depends|executes|files|runfiles|texmfdbs|all]127387 -Ref: tlmgr *depends*127901 -Ref: tlmgr *executes*128243 -Ref: tlmgr *files*128358 -Ref: tlmgr *runfiles*128494 -Ref: tlmgr *texmfdbs*128631 -Ref: tlmgr - all items in 'TEXMFDBS' have the '!!' prefix.128861 -Ref: tlmgr - all items in 'TEXMFBDS' have an 'ls-R' file (if they exist at all).128937 -Ref: tlmgr - all items in 'TEXMF' with '!!' are listed in 'TEXMFDBS'.129002 -Ref: tlmgr - all items in 'TEXMF' with an 'ls-R' file are listed in 'TEXMFDBS'.129077 -Ref: tlmgr *--use-svn*129102 -Node: tlmgr conf129243 -Ref: tlmgr *conf [texmf|tlmgr|updmap [--conffile _file_] [--delete] [_key_ [_value_]]]*129531 -Ref: tlmgr *conf auxtrees [--conffile _file_] [show|add|remove] [_value_]*129595 -Node: tlmgr dump-tlpdb [_option_...] [--json]132010 -Ref: tlmgr *--local*132443 -Ref: tlmgr *--remote*132482 -Ref: tlmgr *--json*132520 -Node: tlmgr generate133091 -Ref: tlmgr *generate [_option_...] language*133287 -Ref: tlmgr *generate [_option_...] language.dat*133326 -Ref: tlmgr *generate [_option_...] language.def*133365 -Ref: tlmgr *generate [_option_...] language.dat.lua*133408 -Ref: tlmgr *--dest* _output_file_135735 -Ref: tlmgr *--localcfg* _local_conf_file_136311 -Ref: tlmgr *--rebuild-sys*136434 -Node: tlmgr gui137249 -Node: tlmgr info137427 -Ref: tlmgr *info [_option_...] _pkg_...*137589 -Ref: tlmgr *info [_option_...] collections*137623 -Ref: tlmgr *info [_option_...] schemes*137653 -Ref: tlmgr *--list*139183 -Ref: tlmgr *--only-installed*139497 -Ref: tlmgr *--only-remote*139685 -Ref: tlmgr *--data 'item1,item2,...'*139989 -Ref: tlmgr *--json* 1141361 -Node: tlmgr init-usertree141744 -Node: tlmgr install [_option_...] _pkg_...142125 -Ref: tlmgr *--dry-run* 1142633 -Ref: tlmgr *--file*142750 -Ref: tlmgr *--force*142972 -Ref: tlmgr *--no-depends*143192 -Ref: tlmgr *--no-depends-at-all*143351 -Ref: tlmgr *--reinstall*143751 -Ref: tlmgr *--with-doc*144129 -Ref: tlmgr *--with-src*144142 -Node: tlmgr key144870 -Ref: tlmgr *key list*145028 -Ref: tlmgr *key add _file_*145046 -Ref: tlmgr *key remove _keyid_*145068 -Node: tlmgr list145662 -Node: tlmgr option145824 -Ref: tlmgr *option [--json] [show]*145979 -Ref: tlmgr *option [--json] showall|help*146010 -Ref: tlmgr *option _key_ [_value_]*146036 -Node: tlmgr paper150615 -Ref: tlmgr *paper [a4|letter]*150764 -Ref: tlmgr *<[xdvi|pdftex|dvips|dvipdfmx|context|psutils] paper [_papersize_|--list]*>150840 -Ref: tlmgr *paper --json*150855 -Node: tlmgr path152070 -Ref: tlmgr *path [--w32mode=user|admin] add*152231 -Ref: tlmgr *path [--w32mode=user|admin] remove*152268 -Node: tlmgr pinning153753 -Ref: tlmgr 'pinning show'153994 -Ref: tlmgr 'pinning add' _repo_ _pkgglob_...154067 -Ref: tlmgr 'pinning remove' _repo_ _pkgglob_...154186 -Ref: tlmgr 'pinning remove _repo_ --all'154339 -Node: tlmgr platform154393 -Ref: tlmgr *platform list|add|remove _platform_...*154579 -Ref: tlmgr *platform set _platform_*154606 -Ref: tlmgr *platform set auto*154627 -Ref: tlmgr *--dry-run* 2155504 -Node: tlmgr postaction155623 -Ref: tlmgr *postaction [_option_...] install [shortcut|fileassoc|script] [_pkg_...]*155853 -Ref: tlmgr *postaction [_option_...] remove [shortcut|fileassoc|script] [_pkg_...]*155927 -Ref: tlmgr *--w32mode=[user|admin]*156242 -Ref: tlmgr *--fileassocmode=[1|2]*156658 -Ref: tlmgr *--all* 1156943 -Node: tlmgr print-platform156998 -Node: tlmgr print-platform-info157329 -Node: tlmgr remove [_option_...] _pkg_...157629 -Ref: tlmgr *--all* 2158113 -Ref: tlmgr *--backup*158223 -Ref: tlmgr *--backupdir* _directory_ 1158249 -Ref: tlmgr *--no-depends* 1158654 -Ref: tlmgr *--no-depends-at-all* 1158716 -Ref: tlmgr *--force* 1158819 -Ref: tlmgr *--dry-run* 3159292 -Node: tlmgr repository159669 -Ref: tlmgr *repository list*159857 -Ref: tlmgr *repository list _path|url|tag_*159891 -Ref: tlmgr *repository add _path_ [_tag_]*159924 -Ref: tlmgr *repository remove _path|tag_*159956 -Ref: tlmgr *repository set _path_[#_tag_] [_path_[#_tag_] ...]*160010 -Ref: tlmgr *repository status*160031 -Ref: tlmgr The tag (which can be the same as the url);161258 -Node: tlmgr restore161736 -Ref: tlmgr *restore [_option_...] _pkg_ [_rev_]*161915 -Ref: tlmgr *restore [_option_...] --all*161945 -Ref: tlmgr *--all* 3162645 -Ref: tlmgr *--backupdir* _directory_ 2162859 -Ref: tlmgr *--dry-run* 4163040 -Ref: tlmgr *--force* 2163172 -Ref: tlmgr *--json* 2163218 -Node: tlmgr search163545 -Ref: tlmgr *search [_option_...] _what_*163709 -Ref: tlmgr *search [_option_...] --file _what_*163746 -Ref: tlmgr *search [_option_...] --all _what_*163782 -Ref: tlmgr *--file* 1164002 -Ref: tlmgr *--all* 4164064 -Ref: tlmgr *--global*164153 -Ref: tlmgr *--word*164280 -Node: tlmgr shell164595 -Ref: tlmgr protocol165330 -Ref: tlmgr help 1165394 -Ref: tlmgr version 1165447 -Ref: tlmgr quit, end, bye, byebye, EOF165515 -Ref: tlmgr restart165536 -Ref: tlmgr load [local|remote]165659 -Ref: tlmgr save165729 -Ref: tlmgr get [_var_] =item set [_var_ [_val_]]165852 -Node: tlmgr show166453 -Node: tlmgr uninstall166620 -Node: tlmgr update [_option_...] [_pkg_...]166850 -Ref: tlmgr *--all* 5167221 -Ref: tlmgr *--self*169400 -Ref: tlmgr *--dry-run* 5170164 -Ref: tlmgr *--list* [_pkg_]170341 -Ref: tlmgr *--exclude* _pkg_171030 -Ref: tlmgr *--no-auto-remove* [_pkg_...]171830 -Ref: tlmgr *--no-auto-install* [_pkg_...]172314 -Ref: tlmgr *--reinstall-forcibly-removed*173076 -Ref: tlmgr *--backup* 1173611 -Ref: tlmgr *--backupdir* _directory_ 3173637 -Ref: tlmgr *--no-depends* 2174803 -Ref: tlmgr *--no-depends-at-all* 2175006 -Ref: tlmgr *--force* 3175109 -Node: tlmgr CONFIGURATION FILE FOR TLMGR176100 -Ref: tlmgr 'auto-remove =' 0 or 1 (default 1), same as command-line option.177102 -Ref: tlmgr 'gui-expertmode =' 0 or 1 (default 1). This switches between the full GUI and a simplified GUI with only the most common settings.177234 -Ref: tlmgr 'gui-lang =' _llcode_, with a language code value as with the command-line option.177318 -Ref: tlmgr 'no-checksums =' 0 or 1 (default 0, see below).177367 -Ref: tlmgr 'persistent-downloads =' 0 or 1 (default 1), same as command-line option.177442 -Ref: tlmgr 'require-verification =' 0 or 1 (default 0), same as command-line option.177517 -Ref: tlmgr 'tkfontscale =' _floating-point number_ (default 1.0); scaling factor for fonts in the Tk-based frontends.177625 -Ref: tlmgr 'update-exclude =' _comma-separated list of packages_ (no spaces allowed). Same as the command line option '--exclude' for the 'update' action.177770 -Ref: tlmgr 'verify-downloads =' 0 or 1 (default 1), same as command-line option.177841 -Ref: tlmgr 'allowed-actions =' _action1_[,_action2_,...] The value is a comma-separated list (no spaces) of 'tlmgr' actions which are allowed to be executed when 'tlmgr' is invoked in system mode (that is, without '--usermode'). This allows distributors to include 'tlmgr' in their packaging, but allow only a restricted set of actions that do not interfere with their distro package manager. For native TeX Live installations, it doesn't make sense to set this.178358 -Node: tlmgr CRYPTOGRAPHIC VERIFICATION179190 -Node: tlmgr Configuration of GnuPG invocation181363 -Node: tlmgr USER MODE182001 -Node: tlmgr User mode install184847 -Node: tlmgr User mode backup, restore, remove, update185991 -Node: tlmgr User mode generate, option, paper186433 -Node: tlmgr MULTIPLE REPOSITORIES186767 -Node: tlmgr Pinning188496 -Node: tlmgr GUI FOR TLMGR190419 -Node: tlmgr Main display192068 -Node: tlmgr Display configuration area192320 -Ref: tlmgr Status192681 -Ref: tlmgr Category192845 -Ref: tlmgr Match193031 -Ref: tlmgr Selection193212 -Ref: tlmgr Display configuration buttons193416 -Node: tlmgr Package list area193599 -Ref: tlmgr a checkbox194183 -Ref: tlmgr package name194319 -Ref: tlmgr local revision (and version)194418 -Ref: tlmgr remote revision (and version)194793 -Ref: tlmgr short description195090 -Node: tlmgr Main display action buttons195135 -Ref: tlmgr Update all installed195401 -Ref: tlmgr Update195773 -Ref: tlmgr Install195823 -Ref: tlmgr Remove196009 -Ref: tlmgr Backup196187 -Node: tlmgr Menu bar196344 -Ref: tlmgr 'tlmgr' menu196567 -Ref: tlmgr 'Options menu'196875 -Ref: tlmgr 'Actions menu'197958 -Ref: tlmgr 'Help menu'198386 -Node: tlmgr GUI options198520 -Ref: tlmgr '-background' _color_198766 -Ref: tlmgr '-font "' _fontname_ _fontsize_ '"'198831 -Ref: tlmgr '-foreground' _color_198989 -Ref: tlmgr '-geometry' _geomspec_199041 -Ref: tlmgr '-xrm' _xresource_199233 -Node: tlmgr MACHINE-READABLE OUTPUT199502 -Node: tlmgr Machine-readable 'update' and 'install' output200318 -Ref: tlmgr 'location-url' _location_201600 -Ref: tlmgr 'total-bytes' _count_201816 -Ref: tlmgr _pkgname_202226 -Ref: tlmgr _status_202436 -Ref: tlmgr 'd'202514 -Ref: tlmgr 'f'202574 -Ref: tlmgr 'u'202753 -Ref: tlmgr 'r'202799 -Ref: tlmgr 'a'202922 -Ref: tlmgr 'i'203100 -Ref: tlmgr 'I'203219 -Ref: tlmgr _localrev_203321 -Ref: tlmgr _serverrev_203428 -Ref: tlmgr _size_203540 -Ref: tlmgr _runtime_203709 -Ref: tlmgr _esttot_203779 -Node: tlmgr Machine-readable 'option' output203812 -Node: tlmgr ENVIRONMENT VARIABLES204330 -Ref: tlmgr 'TEXLIVE_COMPRESSOR'204841 -Ref: tlmgr 'TEXLIVE_DOWNLOADER'205689 -Ref: tlmgr 'TL_DOWNLOAD_PROGRAM'205712 -Ref: tlmgr 'TL_DOWNLOAD_ARGS'205732 -Ref: tlmgr 'TEXLIVE_PREFER_OWN'206758 -Node: tlmgr AUTHORS AND COPYRIGHT207582 -Node: Index207984 +Node: Top1212 +Node: Introduction2122 +Node: Overview of build system3996 +Node: Prerequisites6102 +Ref: Prerequisites-Footnote-19272 +Node: Building9593 +Node: Build iteration10988 +Node: Build in parallel12104 +Node: Build distribution12741 +Node: Build one package13401 +Node: Build one engine18256 +Node: Cross compilation20751 +Node: Cross configuring22070 +Node: Cross problems23791 +Node: Installing25529 +Node: Installation directories26577 +Node: Linked scripts28507 +Node: Distro builds30046 +Node: Layout and infrastructure32502 +Node: Build system tools33345 +Node: Top-level directories35668 +Node: Autoconf macros38015 +Node: General setup macros38786 +Node: Macros for programs39693 +Node: Macros for compilers40574 +Node: Macros for libraries42034 +Node: Macros for library and header flags42476 +Node: Macros for Windows44511 +Node: Library modules46202 +Node: png library46707 +Node: zlib library49207 +Node: freetype library49754 +Node: kpathsea library50482 +Node: Program modules51925 +Node: t1utils package52369 +Node: xindy package52946 +Node: xdvik package54150 +Node: asymptote55273 +Node: Extending TeX Live55789 +Node: Adding a new program module56624 +Node: Adding a new engine61657 +Node: Adding a new generic library module63526 +Node: Adding a new TeX-specific library module65877 +Node: Configure options66603 +Node: Global configure options68020 +Node: --disable-native-texlive-build68562 +Node: --prefix --bindir ...69556 +Node: --disable-largefile70112 +Node: --disable-missing70674 +Node: --enable-compiler-warnings=LEVEL71079 +Node: --enable-cxx-runtime-hack71759 +Node: --enable-maintainer-mode72191 +Node: --enable-multiplatform72736 +Node: --enable-shared73341 +Node: --enable-silent-rules73724 +Node: --without-ln-s74200 +Node: --without-x74559 +Node: Program-specific configure options74751 +Node: --enable-PROG --disable-PROG75398 +Node: --disable-all-pkgs75683 +Node: Configure options for texk/web2c76489 +Node: Configure options for texk/bibtex-x79213 +Node: Configure options for texk/dvipdfm-x79796 +Node: Configure options for texk/dvisvgm80616 +Node: Configure options for texk/texlive81533 +Node: Configure options for texk/xdvik81970 +Node: Configure options for utils/xindy82635 +Node: Library-specific configure options83577 +Node: Configure options for kpathsea84566 +Node: Variables for configure85310 +Node: Coding conventions86856 +Node: Declarations and definitions87579 +Node: Const89802 +Node: Continuous integration91746 +Node: Transfer from Subversion to Github92410 +Node: Automatic update of the Git mirror94644 +Node: CI testing on Travis-CI95246 +Node: Releases on Github95975 +Node: install-tl96423 +Node: install-tl NAME96792 +Node: install-tl SYNOPSIS96950 +Node: install-tl DESCRIPTION97166 +Node: install-tl REFERENCES98234 +Node: install-tl OPTIONS98758 +Ref: install-tl *-gui* [[=]_module_]99111 +Ref: install-tl text99323 +Ref: install-tl tcl (or "perltk" or "wizard" or "expert" or nothing)99516 +Ref: install-tl *-no-gui*100156 +Ref: install-tl *-lang* _llcode_100246 +Ref: install-tl *-repository* _url|path_100870 +Ref: install-tl *-select-repository*101767 +Ref: install-tl *-all-options*102195 +Ref: install-tl *-custom-bin* _path_102450 +Ref: install-tl *-debug-fakenet*103292 +Ref: install-tl *-debug-translation*103470 +Ref: install-tl *-force-platform* _platform_103746 +Ref: install-tl *-help*, *--help*, *-?*103996 +Ref: install-tl *-in-place*104427 +Ref: install-tl *-init-from-profile* _profile_file_104976 +Ref: install-tl *-logfile* _file_105245 +Ref: install-tl *-no-cls*105600 +Ref: install-tl *-no-persistent-downloads*105748 +Ref: install-tl *-persistent-downloads*105773 +Ref: install-tl *-no-verify-downloads*106403 +Ref: install-tl *-non-admin*106774 +Ref: install-tl *-portable*106867 +Ref: install-tl *-print-platform*107006 +Ref: install-tl *-profile* _profile_file_107208 +Ref: install-tl *-q*107429 +Ref: install-tl *-scheme* _scheme_107491 +Ref: install-tl *-v*107973 +Ref: install-tl *-version*, *--version*108134 +Node: install-tl PROFILES108272 +Ref: install-tl instopt_adjustpath (default 0 on Unix, 1 on Windows)111206 +Ref: install-tl instopt_adjustrepo (default 1)111290 +Ref: install-tl instopt_letter (default 0)111435 +Ref: install-tl instopt_portable (default 0)111530 +Ref: install-tl instopt_write18_restricted (default 1)111630 +Node: install-tl ENVIRONMENT VARIABLES113009 +Ref: install-tl TEXLIVE_DOWNLOADER113395 +Ref: install-tl TL_DOWNLOAD_PROGRAM113422 +Ref: install-tl TL_DOWNLOAD_ARGS113446 +Ref: install-tl TEXLIVE_INSTALL_ENV_NOCHECK113658 +Ref: install-tl TEXLIVE_INSTALL_NO_CONTEXT_CACHE113868 +Ref: install-tl TEXLIVE_INSTALL_NO_RESUME113981 +Ref: install-tl TEXLIVE_INSTALL_NO_WELCOME114137 +Ref: install-tl TEXLIVE_INSTALL_PAPER114262 +Ref: install-tl TEXLIVE_INSTALL_PREFIX114424 +Ref: install-tl TEXLIVE_INSTALL_TEXMFCONFIG114459 +Ref: install-tl TEXLIVE_INSTALL_TEXMFVAR114491 +Ref: install-tl TEXLIVE_INSTALL_TEXMFHOME114524 +Ref: install-tl TEXLIVE_INSTALL_TEXMFLOCAL114558 +Ref: install-tl TEXLIVE_INSTALL_TEXMFSYSCONFIG114596 +Ref: install-tl TEXLIVE_INSTALL_TEXMFSYSVAR114631 +Ref: install-tl NOPERLDOC115070 +Node: install-tl AUTHORS AND COPYRIGHT115144 +Node: tlmgr115557 +Node: tlmgr NAME116042 +Node: tlmgr SYNOPSIS116174 +Node: tlmgr DESCRIPTION116364 +Node: tlmgr EXAMPLES117467 +Ref: tlmgr tlmgr option repository ctan117726 +Ref: tlmgr tlmgr option repository https://mirror.ctan.org/systems/texlive/tlnet117803 +Ref: tlmgr tlmgr update --list118424 +Ref: tlmgr tlmgr update --all118521 +Ref: tlmgr tlmgr info _what_118682 +Node: tlmgr OPTIONS118948 +Ref: tlmgr *--repository* _url|path_119486 +Ref: tlmgr /some/local/dir120700 +Ref: tlmgr file:/some/local/dir120733 +Ref: tlmgr ctan120810 +Ref: tlmgr https://mirror.ctan.org/systems/texlive/tlnet120868 +Ref: tlmgr http://server/path/to/tlnet121217 +Ref: tlmgr https://server/path/to/tlnet121614 +Ref: tlmgr ftp://server/path/to/tlnet122098 +Ref: tlmgr user@machine:/path/to/tlnet122234 +Ref: tlmgr scp://user@machine/path/to/tlnet122279 +Ref: tlmgr ssh://user@machine/path/to/tlnet122324 +Ref: tlmgr *--gui* [_action_]122739 +Ref: tlmgr *--gui-lang* _llcode_123584 +Ref: tlmgr *--command-logfile* _file_124331 +Ref: tlmgr *--debug-translation*124607 +Ref: tlmgr *--machine-readable*124816 +Ref: tlmgr *--no-execute-actions*125086 +Ref: tlmgr *--package-logfile* _file_125281 +Ref: tlmgr *--pause*125545 +Ref: tlmgr *--persistent-downloads*125706 +Ref: tlmgr *--no-persistent-downloads*125736 +Ref: tlmgr *--pin-file*126252 +Ref: tlmgr *--usermode*126476 +Ref: tlmgr *--usertree* _dir_126602 +Ref: tlmgr *--verify-repo=[none|main|all]*126730 +Node: tlmgr ACTIONS127677 +Node: tlmgr help128538 +Node: tlmgr version129037 +Node: tlmgr backup129308 +Ref: tlmgr *backup [_option_...] --all*129481 +Ref: tlmgr *backup [_option_...] _pkg_...*129514 +Ref: tlmgr *--backupdir* _directory_130626 +Ref: tlmgr *--all*130849 +Ref: tlmgr *--clean*[=_N_]131111 +Ref: tlmgr *--dry-run*131448 +Node: tlmgr candidates _pkg_131578 +Node: tlmgr check [_option_...] [depends|executes|files|runfiles|texmfdbs|all]131933 +Ref: tlmgr *depends*132451 +Ref: tlmgr *executes*132801 +Ref: tlmgr *files*132920 +Ref: tlmgr *runfiles*133060 +Ref: tlmgr *texmfdbs*133197 +Ref: tlmgr - all items in TEXMFDBS have the !! prefix.133449 +Ref: tlmgr - all items in TEXMFBDS have an ls-R file (if they exist at all).133533 +Ref: tlmgr - all items in TEXMF with !! are listed in TEXMFDBS.133610 +Ref: tlmgr - all items in TEXMF with an ls-R file are listed in TEXMFDBS.133697 +Ref: tlmgr *--use-svn*133724 +Node: tlmgr conf133869 +Ref: tlmgr *conf [texmf|tlmgr|updmap [--conffile _file_] [--delete] [_key_ [_value_]]]*134161 +Ref: tlmgr *conf auxtrees [--conffile _file_] [show|add|remove] [_value_]*134227 +Node: tlmgr dump-tlpdb [_option_...] [--json]136738 +Ref: tlmgr *--local*137179 +Ref: tlmgr *--remote*137220 +Ref: tlmgr *--json*137260 +Node: tlmgr generate137851 +Ref: tlmgr *generate [_option_...] language*138047 +Ref: tlmgr *generate [_option_...] language.dat*138086 +Ref: tlmgr *generate [_option_...] language.def*138125 +Ref: tlmgr *generate [_option_...] language.dat.lua*138168 +Ref: tlmgr *--dest* _output_file_140625 +Ref: tlmgr *--localcfg* _local_conf_file_141243 +Ref: tlmgr *--rebuild-sys*141372 +Node: tlmgr gui142215 +Node: tlmgr info142393 +Ref: tlmgr *info [_option_...] _pkg_...*142555 +Ref: tlmgr *info [_option_...] collections*142589 +Ref: tlmgr *info [_option_...] schemes*142619 +Ref: tlmgr *--list*144175 +Ref: tlmgr *--only-installed*144499 +Ref: tlmgr *--only-remote*144689 +Ref: tlmgr *--data item1,item2,...*145011 +Ref: tlmgr *--json* 1146515 +Node: tlmgr init-usertree146926 +Node: tlmgr install [_option_...] _pkg_...147315 +Ref: tlmgr *--dry-run* 1147829 +Ref: tlmgr *--file*147948 +Ref: tlmgr *--force*148172 +Ref: tlmgr *--no-depends*148402 +Ref: tlmgr *--no-depends-at-all*148563 +Ref: tlmgr *--reinstall*148983 +Ref: tlmgr *--with-doc*149363 +Ref: tlmgr *--with-src*149378 +Node: tlmgr key150122 +Ref: tlmgr *key list*150280 +Ref: tlmgr *key add _file_*150298 +Ref: tlmgr *key remove _keyid_*150320 +Node: tlmgr list150946 +Node: tlmgr option151108 +Ref: tlmgr *option [--json] [show]*151265 +Ref: tlmgr *option [--json] showall|help*151298 +Ref: tlmgr *option _key_ [_value_]*151324 +Node: tlmgr paper156091 +Ref: tlmgr *paper [a4|letter]*156240 +Ref: tlmgr *<[xdvi|pdftex|dvips|dvipdfmx|context|psutils] paper [_papersize_|--list]*>156318 +Ref: tlmgr *paper --json*156335 +Node: tlmgr path157602 +Ref: tlmgr *path [--w32mode=user|admin] add*157765 +Ref: tlmgr *path [--w32mode=user|admin] remove*157804 +Node: tlmgr pinning159313 +Ref: tlmgr pinning show159562 +Ref: tlmgr pinning add _repo_ _pkgglob_...159639 +Ref: tlmgr pinning remove _repo_ _pkgglob_...159762 +Ref: tlmgr pinning remove _repo_ --all159919 +Node: tlmgr platform159973 +Ref: tlmgr *platform list|add|remove _platform_...*160159 +Ref: tlmgr *platform set _platform_*160186 +Ref: tlmgr *platform set auto*160207 +Ref: tlmgr *--dry-run* 2161126 +Node: tlmgr postaction161245 +Ref: tlmgr *postaction [_option_...] install [shortcut|fileassoc|script] [_pkg_...]*161475 +Ref: tlmgr *postaction [_option_...] remove [shortcut|fileassoc|script] [_pkg_...]*161549 +Ref: tlmgr *--w32mode=[user|admin]*161882 +Ref: tlmgr *--fileassocmode=[1|2]*162316 +Ref: tlmgr *--all* 1162611 +Node: tlmgr print-platform162666 +Node: tlmgr print-platform-info163001 +Node: tlmgr remove [_option_...] _pkg_...163301 +Ref: tlmgr *--all* 2163791 +Ref: tlmgr *--backup*163907 +Ref: tlmgr *--backupdir* _directory_ 1163935 +Ref: tlmgr *--no-depends* 1164344 +Ref: tlmgr *--no-depends-at-all* 1164408 +Ref: tlmgr *--force* 1164516 +Ref: tlmgr *--dry-run* 3165003 +Node: tlmgr repository165392 +Ref: tlmgr *repository list*165580 +Ref: tlmgr *repository list _path|url|tag_*165614 +Ref: tlmgr *repository add _path_ [_tag_]*165647 +Ref: tlmgr *repository remove _path|tag_*165679 +Ref: tlmgr *repository set _path_[#_tag_] [_path_[#_tag_] ...]*165733 +Ref: tlmgr *repository status*165754 +Ref: tlmgr The tag (which can be the same as the url);167009 +Node: tlmgr restore167491 +Ref: tlmgr *restore [_option_...] _pkg_ [_rev_]*167670 +Ref: tlmgr *restore [_option_...] --all*167702 +Ref: tlmgr *--all* 3168412 +Ref: tlmgr *--backupdir* _directory_ 2168628 +Ref: tlmgr *--dry-run* 4168811 +Ref: tlmgr *--force* 2168945 +Ref: tlmgr *--json* 2168995 +Node: tlmgr search169358 +Ref: tlmgr *search [_option_...] _what_*169522 +Ref: tlmgr *search [_option_...] --file _what_*169561 +Ref: tlmgr *search [_option_...] --all _what_*169599 +Ref: tlmgr *--file* 1169821 +Ref: tlmgr *--all* 4169885 +Ref: tlmgr *--global*169976 +Ref: tlmgr *--word*170105 +Node: tlmgr shell170432 +Ref: tlmgr protocol171175 +Ref: tlmgr help 1171243 +Ref: tlmgr version 1171296 +Ref: tlmgr quit, end, bye, byebye, EOF171364 +Ref: tlmgr restart171385 +Ref: tlmgr load [local|remote]171516 +Ref: tlmgr save171586 +Ref: tlmgr get [_var_] =item set [_var_ [_val_]]171709 +Node: tlmgr show172354 +Node: tlmgr uninstall172521 +Node: tlmgr update [_option_...] [_pkg_...]172753 +Ref: tlmgr *--all* 5173130 +Ref: tlmgr *--self*175383 +Ref: tlmgr *--dry-run* 5176161 +Ref: tlmgr *--list* [_pkg_]176344 +Ref: tlmgr *--exclude* _pkg_177075 +Ref: tlmgr *--no-auto-remove* [_pkg_...]177897 +Ref: tlmgr *--no-auto-install* [_pkg_...]178395 +Ref: tlmgr *--reinstall-forcibly-removed*179179 +Ref: tlmgr *--backup* 1179734 +Ref: tlmgr *--backupdir* _directory_ 3179762 +Ref: tlmgr *--no-depends* 2180946 +Ref: tlmgr *--no-depends-at-all* 2181151 +Ref: tlmgr *--force* 3181259 +Node: tlmgr CONFIGURATION FILE FOR TLMGR182286 +Ref: tlmgr auto-remove = 0 or 1 (default 1), same as command-line option.183320 +Ref: tlmgr gui-expertmode = 0 or 1 (default 1). This switches between the full GUI and a simplified GUI with only the most common settings.183456 +Ref: tlmgr gui-lang = _llcode_, with a language code value as with the command-line option.183544 +Ref: tlmgr no-checksums = 0 or 1 (default 0, see below).183597 +Ref: tlmgr persistent-downloads = 0 or 1 (default 1), same as command-line option.183676 +Ref: tlmgr require-verification = 0 or 1 (default 0), same as command-line option.183755 +Ref: tlmgr tkfontscale = _floating-point number_ (default 1.0); scaling factor for fonts in the Tk-based frontends.183867 +Ref: tlmgr update-exclude = _comma-separated list of packages_ (no spaces allowed). Same as the command line option --exclude for the update action.184024 +Ref: tlmgr verify-downloads = 0 or 1 (default 1), same as command-line option.184099 +Ref: tlmgr allowed-actions = _action1_[,_action2_,...] The value is a comma-separated list (no spaces) of tlmgr actions which are allowed to be executed when tlmgr is invoked in system mode (that is, without --usermode). This allows distributors to include tlmgr in their packaging, but allow only a restricted set of actions that do not interfere with their distro package manager. For native TeX Live installations, it doesn't make sense to set this.184638 +Node: tlmgr CRYPTOGRAPHIC VERIFICATION185502 +Node: tlmgr Configuration of GnuPG invocation187759 +Node: tlmgr USER MODE188433 +Node: tlmgr User mode install191455 +Node: tlmgr User mode backup, restore, remove, update192643 +Node: tlmgr User mode generate, option, paper193089 +Node: tlmgr MULTIPLE REPOSITORIES193433 +Node: tlmgr Pinning195184 +Node: tlmgr GUI FOR TLMGR197163 +Node: tlmgr Main display198830 +Node: tlmgr Display configuration area199082 +Ref: tlmgr Status199443 +Ref: tlmgr Category199607 +Ref: tlmgr Match199793 +Ref: tlmgr Selection199974 +Ref: tlmgr Display configuration buttons200182 +Node: tlmgr Package list area200365 +Ref: tlmgr a checkbox200949 +Ref: tlmgr package name201085 +Ref: tlmgr local revision (and version)201184 +Ref: tlmgr remote revision (and version)201559 +Ref: tlmgr short description201856 +Node: tlmgr Main display action buttons201901 +Ref: tlmgr Update all installed202167 +Ref: tlmgr Update202543 +Ref: tlmgr Install202593 +Ref: tlmgr Remove202783 +Ref: tlmgr Backup202965 +Node: tlmgr Menu bar203134 +Ref: tlmgr tlmgr menu203361 +Ref: tlmgr Options menu203677 +Ref: tlmgr Actions menu204790 +Ref: tlmgr Help menu205242 +Node: tlmgr GUI options205380 +Ref: tlmgr -background _color_205634 +Ref: tlmgr -font " _fontname_ _fontsize_ "205707 +Ref: tlmgr -foreground _color_205877 +Ref: tlmgr -geometry _geomspec_205933 +Ref: tlmgr -xrm _xresource_206133 +Node: tlmgr MACHINE-READABLE OUTPUT206402 +Node: tlmgr Machine-readable update and install output207224 +Ref: tlmgr location-url _location_208520 +Ref: tlmgr total-bytes _count_208748 +Ref: tlmgr _pkgname_209166 +Ref: tlmgr _status_209384 +Ref: tlmgr d209466 +Ref: tlmgr f209530 +Ref: tlmgr u209717 +Ref: tlmgr r209767 +Ref: tlmgr a209894 +Ref: tlmgr i210076 +Ref: tlmgr I210201 +Ref: tlmgr _localrev_210303 +Ref: tlmgr _serverrev_210414 +Ref: tlmgr _size_210530 +Ref: tlmgr _runtime_210703 +Ref: tlmgr _esttot_210773 +Node: tlmgr Machine-readable option output210806 +Node: tlmgr ENVIRONMENT VARIABLES211326 +Ref: tlmgr TEXLIVE_COMPRESSOR211853 +Ref: tlmgr TEXLIVE_DOWNLOADER212725 +Ref: tlmgr TL_DOWNLOAD_PROGRAM212752 +Ref: tlmgr TL_DOWNLOAD_ARGS212776 +Ref: tlmgr TEXLIVE_PREFER_OWN213838 +Node: tlmgr AUTHORS AND COPYRIGHT214678 +Node: Index215080 End Tag Table + + +Local Variables: +coding: utf-8 +End: diff --git a/source/doc/tlbuild.texi b/source/doc/tlbuild.texi index d5cdcb22502021b9707de37970848ba3b694e8c6..a4959088ded30076474c6dfbba880da01b09f501 100644 --- a/source/doc/tlbuild.texi +++ b/source/doc/tlbuild.texi @@ -1,8 +1,8 @@ \input texinfo @setfilename tlbuild.info -@set version 2022 -@set month-year May 2022 +@set version 2023 +@set month-year February 2023 @set mytitle Building @TeX{} Live (@value{version}) @settitle @value{mytitle} @@ -15,7 +15,7 @@ This file documents the @TL{} build system and more. @noindent -Copyright @copyright{} 2016--2022 Karl Berry.@* +Copyright @copyright{} 2016--2023 Karl Berry.@* Copyright @copyright{} 2013--2015 Karl Berry & Peter Breitenlohner. Permission is granted to make and distribute verbatim copies of this diff --git a/source/libs/README b/source/libs/README index 834af5f351142f5d2becae35abc9fa4c43d52618..04503a894aaf6306b1bc7d9cf1ac128cfd52892d 100644 --- a/source/libs/README +++ b/source/libs/README @@ -1,4 +1,4 @@ -$Id: README 65526 2023-01-12 04:40:09Z kakuto $ +$Id: README 65992 2023-02-20 23:13:30Z kakuto $ Public domain. Originally created by Karl Berry, 2005. Libraries we compile for TeX Live. @@ -12,7 +12,7 @@ See also comments in ../texk/README. cairo 1.16.0 - checked 20oct18 http://cairographics.org/releases/ -freetype2 2.12.1 - checked 07may22 +freetype2 2.13.0 - checked 11feb23 http://download.savannah.gnu.org/releases/freetype/ gd 2.3.3 - checked 13sep21 @@ -25,8 +25,8 @@ graphite2 1.3.14 - checked 10apr20 http://sourceforge.net/projects/silgraphite/files/graphite2/ (requires C++11) -harfbuzz 6.0.0 - checked 18dec22 - https://github.com/harfbuzz/harfbuzz/releases/tag/6.0.0 +harfbuzz 7.0.1 - checked 21feb23 + https://github.com/harfbuzz/harfbuzz/releases/tag/7.0.1 icu 70.1 - checked 16jan22 https://github.com/unicode-org/icu/releases/ diff --git a/source/libs/configure b/source/libs/configure index 4f1e9e1316545689aff4600058c5ab7b6f7202db..053d69e9079c326a609d562263028f4c385664b0 100755 --- a/source/libs/configure +++ b/source/libs/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for TeX Live libs 2023/dev. +# Generated by GNU Autoconf 2.71 for TeX Live libs 2023. # # Report bugs to <tex-k@tug.org>. # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='TeX Live libs' PACKAGE_TARNAME='tex-live-libs' -PACKAGE_VERSION='2023/dev' -PACKAGE_STRING='TeX Live libs 2023/dev' +PACKAGE_VERSION='2023' +PACKAGE_STRING='TeX Live libs 2023' PACKAGE_BUGREPORT='tex-k@tug.org' PACKAGE_URL='' @@ -739,8 +739,12 @@ enable_tex enable_tex_synctex enable_etex enable_etex_synctex +enable_ptex +enable_ptex_synctex enable_eptex enable_eptex_synctex +enable_uptex +enable_uptex_synctex enable_euptex enable_euptex_synctex enable_aleph @@ -1351,7 +1355,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures TeX Live libs 2023/dev to adapt to many kinds of systems. +\`configure' configures TeX Live libs 2023 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1422,7 +1426,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of TeX Live libs 2023/dev:";; + short | recursive ) echo "Configuration of TeX Live libs 2023:";; esac cat <<\_ACEOF @@ -1449,8 +1453,12 @@ Optional Features: --enable-tex-synctex build TeX with SyncTeX support --enable-etex compile and install e-TeX --disable-etex-synctex build e-TeX without SyncTeX support + --enable-ptex compile and install pTeX + --disable-ptex-synctex build pTeX without SyncTeX support --disable-eptex do not compile and install e-pTeX --disable-eptex-synctex build e-pTeX without SyncTeX support + --enable-uptex compile and install upTeX + --disable-uptex-synctex build upTeX without SyncTeX support --disable-euptex do not compile and install e-upTeX --disable-euptex-synctex build e-upTeX without SyncTeX support --disable-aleph do not compile and install Aleph @@ -1603,7 +1611,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -TeX Live libs configure 2023/dev +TeX Live libs configure 2023 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1726,7 +1734,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by TeX Live libs $as_me 2023/dev, which was +It was created by TeX Live libs $as_me 2023, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3944,6 +3952,28 @@ fi test "x$enable_web2c:$enable_etex" = xyes:yes && { need_zlib=yes } +# Check whether --enable-ptex was given. +if test ${enable_ptex+y} +then : + enableval=$enable_ptex; +fi +case $enable_ptex in #( + yes | no) : + ;; #( + *) : + enable_ptex=no ;; +esac + +# Check whether --enable-ptex-synctex was given. +if test ${enable_ptex_synctex+y} +then : + enableval=$enable_ptex_synctex; +fi + +test "x$enable_web2c:$enable_ptex" = xyes:yes && { + need_ptexenc=yes + need_zlib=yes +} # Check whether --enable-eptex was given. if test ${enable_eptex+y} then : @@ -3966,6 +3996,28 @@ test "x$enable_web2c:$enable_eptex" = xyes:yes && { need_ptexenc=yes need_zlib=yes } +# Check whether --enable-uptex was given. +if test ${enable_uptex+y} +then : + enableval=$enable_uptex; +fi +case $enable_uptex in #( + yes | no) : + ;; #( + *) : + enable_uptex=no ;; +esac + +# Check whether --enable-uptex-synctex was given. +if test ${enable_uptex_synctex+y} +then : + enableval=$enable_uptex_synctex; +fi + +test "x$enable_web2c:$enable_uptex" = xyes:yes && { + need_ptexenc=yes + need_zlib=yes +} # Check whether --enable-euptex was given. if test ${enable_euptex+y} then : @@ -5190,7 +5242,7 @@ fi # Define the identity of the package. PACKAGE='tex-live-libs' - VERSION='2023/dev' + VERSION='2023' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -6159,7 +6211,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by TeX Live libs $as_me 2023/dev, which was +This file was extended by TeX Live libs $as_me 2023, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -6218,7 +6270,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -TeX Live libs config.status 2023/dev +TeX Live libs config.status 2023 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/source/libs/harfbuzz/ChangeLog b/source/libs/harfbuzz/ChangeLog index 197652e7692fbca5db2dbdb4ee7ff4a1abc0920a..c22536bc5862a82c9b6c77d38ed7e6a0eeee9754 100644 --- a/source/libs/harfbuzz/ChangeLog +++ b/source/libs/harfbuzz/ChangeLog @@ -1,3 +1,13 @@ +2023-02-21 Akira Kakuto <kakuto@jcom.zaq.ne.jp> + + Import harfbuzz-7.0.1. + * version.ac: Adjusted. + +2023-02-12 Akira Kakuto <kakuto@jcom.zaq.ne.jp> + + Import harfbuzz-7.0.0. + * version.ac, Makefile.am, include/Makefile.am: Adjusted. + 2022-12-18 Akira Kakuto <kakuto@jcom.zaq.ne.jp> Import harfbuzz-6.0.0. diff --git a/source/libs/harfbuzz/Makefile.am b/source/libs/harfbuzz/Makefile.am index f554f2d79a06975bb8ef87f2ea5424152287a996..2c990f24ab90a78793bff943de4ed3f94f4336be 100644 --- a/source/libs/harfbuzz/Makefile.am +++ b/source/libs/harfbuzz/Makefile.am @@ -1,4 +1,4 @@ -## $Id: Makefile.am 65304 2022-12-18 01:06:39Z kakuto $ +## $Id: Makefile.am 65798 2023-02-12 04:02:23Z kakuto $ ## Proxy Makefile.am to build harfbuzz for TeX Live. ## ## Copyright 2016-2017 Karl Berry <tex-live@tug.org> @@ -59,12 +59,14 @@ libharfbuzz_a_SOURCES = \ @HARFBUZZ_TREE@/src/hb-dispatch.hh \ @HARFBUZZ_TREE@/src/hb-draw.cc \ @HARFBUZZ_TREE@/src/hb-draw.hh \ + @HARFBUZZ_TREE@/src/hb-face-builder.cc \ @HARFBUZZ_TREE@/src/hb-face.hh \ @HARFBUZZ_TREE@/src/hb-face.cc \ @HARFBUZZ_TREE@/src/hb-font.hh \ @HARFBUZZ_TREE@/src/hb-font.cc \ @HARFBUZZ_TREE@/src/hb-iter.hh \ @HARFBUZZ_TREE@/src/hb-kern.hh \ + @HARFBUZZ_TREE@/src/hb-limits.hh \ @HARFBUZZ_TREE@/src/hb-map.hh \ @HARFBUZZ_TREE@/src/hb-map.cc \ @HARFBUZZ_TREE@/src/hb-machinery.hh \ @@ -85,8 +87,6 @@ libharfbuzz_a_SOURCES = \ @HARFBUZZ_TREE@/src/hb-ot-cff2-table.cc \ @HARFBUZZ_TREE@/src/hb-ot-cff2-table.hh \ @HARFBUZZ_TREE@/src/hb-ot-gasp-table.hh \ - @HARFBUZZ_TREE@/src/hb-ot-color-cbdt-table.hh \ - @HARFBUZZ_TREE@/src/hb-ot-color-colrv1-closure.hh \ @HARFBUZZ_TREE@/src/hb-ot-cmap-table.hh \ @HARFBUZZ_TREE@/src/hb-ot-face.cc \ @HARFBUZZ_TREE@/src/hb-ot-face.hh \ @@ -112,6 +112,12 @@ libharfbuzz_a_SOURCES = \ @HARFBUZZ_TREE@/src/hb-ot-tag.cc \ @HARFBUZZ_TREE@/src/hb-ot-tag-table.hh \ @HARFBUZZ_TREE@/src/hb-ot-var-common.hh \ + @HARFBUZZ_TREE@/src/hb-outline.cc \ + @HARFBUZZ_TREE@/src/hb-outline.hh \ + @HARFBUZZ_TREE@/src/hb-paint-extents.cc \ + @HARFBUZZ_TREE@/src/hb-paint-extents.hh \ + @HARFBUZZ_TREE@/src/hb-paint.cc \ + @HARFBUZZ_TREE@/src/hb-paint.hh \ @HARFBUZZ_TREE@/src/hb-sanitize.hh \ @HARFBUZZ_TREE@/src/hb-serialize.hh \ @HARFBUZZ_TREE@/src/hb-set-digest.hh \ @@ -135,6 +141,7 @@ libharfbuzz_a_SOURCES = \ @HARFBUZZ_TREE@/src/hb-subset-cff2.cc \ @HARFBUZZ_TREE@/src/hb-subset-cff2.hh \ @HARFBUZZ_TREE@/src/hb-subset-input.hh \ + @HARFBUZZ_TREE@/src/hb-subset-instancer-solver.cc \ @HARFBUZZ_TREE@/src/hb-subset.hh \ @HARFBUZZ_TREE@/src/hb-ucd-table.hh \ @HARFBUZZ_TREE@/src/hb-ucd.cc \ @@ -144,7 +151,8 @@ libharfbuzz_a_SOURCES = \ @HARFBUZZ_TREE@/src/hb-vector.hh \ @HARFBUZZ_TREE@/src/hb-utf.hh \ @HARFBUZZ_TREE@/src/hb-buffer-deserialize-json.hh \ - @HARFBUZZ_TREE@/src/hb-buffer-deserialize-text.hh \ + @HARFBUZZ_TREE@/src/hb-buffer-deserialize-text-glyphs.hh \ + @HARFBUZZ_TREE@/src/hb-buffer-deserialize-text-unicode.hh \ @HARFBUZZ_TREE@/src/hb-fallback-shape.cc \ @HARFBUZZ_TREE@/src/hb.hh @@ -177,10 +185,6 @@ libharfbuzz_a_SOURCES += \ @HARFBUZZ_TREE@/src/hb-ot-layout-jstf-table.hh \ @HARFBUZZ_TREE@/src/hb-ot-layout.hh \ @HARFBUZZ_TREE@/src/hb-ot-color.cc \ - @HARFBUZZ_TREE@/src/hb-ot-color-colr-table.hh \ - @HARFBUZZ_TREE@/src/hb-ot-color-cpal-table.hh \ - @HARFBUZZ_TREE@/src/hb-ot-color-sbix-table.hh \ - @HARFBUZZ_TREE@/src/hb-ot-color-svg-table.hh \ @HARFBUZZ_TREE@/src/hb-ot-map.cc \ @HARFBUZZ_TREE@/src/hb-ot-map.hh \ @HARFBUZZ_TREE@/src/hb-ot-math.cc \ @@ -231,6 +235,12 @@ libharfbuzz_a_SOURCES += \ @HARFBUZZ_TREE@/src/hb-ot-vorg-table.hh ## libharfbuzz_a_SOURCES += \ + @HARFBUZZ_TREE@/src/OT/Color/CBDT/CBDT.hh \ + @HARFBUZZ_TREE@/src/OT/Color/COLR/COLR.hh \ + @HARFBUZZ_TREE@/src/OT/Color/COLR/colrv1-closure.hh \ + @HARFBUZZ_TREE@/src/OT/Color/CPAL/CPAL.hh \ + @HARFBUZZ_TREE@/src/OT/Color/sbix/sbix.hh \ + @HARFBUZZ_TREE@/src/OT/Color/svg/svg.hh \ @HARFBUZZ_TREE@/src/OT/glyf/glyf.hh \ @HARFBUZZ_TREE@/src/OT/glyf/glyf-helpers.hh \ @HARFBUZZ_TREE@/src/OT/glyf/loca.hh \ @@ -247,6 +257,7 @@ libharfbuzz_a_SOURCES += \ @HARFBUZZ_TREE@/src/OT/Layout/Common/CoverageFormat1.hh \ @HARFBUZZ_TREE@/src/OT/Layout/Common/CoverageFormat2.hh \ @HARFBUZZ_TREE@/src/OT/Layout/Common/RangeRecord.hh \ + @HARFBUZZ_TREE@/src/OT/Layout/GDEF/GDEF.hh \ @HARFBUZZ_TREE@/src/OT/Layout/GSUB/Common.hh \ @HARFBUZZ_TREE@/src/OT/Layout/GSUB/Sequence.hh \ @HARFBUZZ_TREE@/src/OT/Layout/GSUB/SingleSubstFormat1.hh \ @@ -301,6 +312,7 @@ libharfbuzz_a_SOURCES += \ @HARFBUZZ_TREE@/src/OT/Layout/GPOS/SinglePosFormat2.hh \ @HARFBUZZ_TREE@/src/OT/Layout/GPOS/SinglePos.hh \ @HARFBUZZ_TREE@/src/OT/Layout/GPOS/ValueFormat.hh \ + @HARFBUZZ_TREE@/src/OT/name/name.hh \ @HARFBUZZ_TREE@/src/OT/Layout/types.hh \ @HARFBUZZ_TREE@/src/graph/graph.hh \ @HARFBUZZ_TREE@/src/graph/serialize.hh diff --git a/source/libs/harfbuzz/Makefile.in b/source/libs/harfbuzz/Makefile.in index 4fe8081fc3900a44e0aa7285913bbbc990cd73de..c1eee96eac9a434ed8d85218083bb7b5d2224b63 100644 --- a/source/libs/harfbuzz/Makefile.in +++ b/source/libs/harfbuzz/Makefile.in @@ -125,6 +125,7 @@ am_libharfbuzz_a_OBJECTS = @HARFBUZZ_TREE@/src/hb-blob.$(OBJEXT) \ @HARFBUZZ_TREE@/src/hb-buffer.$(OBJEXT) \ @HARFBUZZ_TREE@/src/hb-common.$(OBJEXT) \ @HARFBUZZ_TREE@/src/hb-draw.$(OBJEXT) \ + @HARFBUZZ_TREE@/src/hb-face-builder.$(OBJEXT) \ @HARFBUZZ_TREE@/src/hb-face.$(OBJEXT) \ @HARFBUZZ_TREE@/src/hb-font.$(OBJEXT) \ @HARFBUZZ_TREE@/src/hb-map.$(OBJEXT) \ @@ -134,6 +135,9 @@ am_libharfbuzz_a_OBJECTS = @HARFBUZZ_TREE@/src/hb-blob.$(OBJEXT) \ @HARFBUZZ_TREE@/src/hb-ot-face.$(OBJEXT) \ @HARFBUZZ_TREE@/src/hb-ot-name.$(OBJEXT) \ @HARFBUZZ_TREE@/src/hb-ot-tag.$(OBJEXT) \ + @HARFBUZZ_TREE@/src/hb-outline.$(OBJEXT) \ + @HARFBUZZ_TREE@/src/hb-paint-extents.$(OBJEXT) \ + @HARFBUZZ_TREE@/src/hb-paint.$(OBJEXT) \ @HARFBUZZ_TREE@/src/hb-set.$(OBJEXT) \ @HARFBUZZ_TREE@/src/hb-shape.$(OBJEXT) \ @HARFBUZZ_TREE@/src/hb-shape-plan.$(OBJEXT) \ @@ -143,6 +147,7 @@ am_libharfbuzz_a_OBJECTS = @HARFBUZZ_TREE@/src/hb-blob.$(OBJEXT) \ @HARFBUZZ_TREE@/src/hb-subset-cff-common.$(OBJEXT) \ @HARFBUZZ_TREE@/src/hb-subset-cff1.$(OBJEXT) \ @HARFBUZZ_TREE@/src/hb-subset-cff2.$(OBJEXT) \ + @HARFBUZZ_TREE@/src/hb-subset-instancer-solver.$(OBJEXT) \ @HARFBUZZ_TREE@/src/hb-ucd.$(OBJEXT) \ @HARFBUZZ_TREE@/src/hb-unicode.$(OBJEXT) \ @HARFBUZZ_TREE@/src/hb-fallback-shape.$(OBJEXT) \ @@ -204,6 +209,7 @@ am__depfiles_remade = ./$(DEPDIR)/hbtest-dummy.Po \ @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-buffer.Po \ @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-common.Po \ @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-draw.Po \ + @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-face-builder.Po \ @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-face.Po \ @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-fallback-shape.Po \ @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-font.Po \ @@ -238,6 +244,9 @@ am__depfiles_remade = ./$(DEPDIR)/hbtest-dummy.Po \ @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-shaper-vowel-constraints.Po \ @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-tag.Po \ @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-var.Po \ + @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-outline.Po \ + @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-paint-extents.Po \ + @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-paint.Po \ @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-set.Po \ @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-shape-plan.Po \ @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-shape.Po \ @@ -247,6 +256,7 @@ am__depfiles_remade = ./$(DEPDIR)/hbtest-dummy.Po \ @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-subset-cff-common.Po \ @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-subset-cff1.Po \ @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-subset-cff2.Po \ + @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-subset-instancer-solver.Po \ @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ucd.Po \ @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-unicode.Po am__mv = mv -f @@ -739,10 +749,12 @@ libharfbuzz_a_SOURCES = @HARFBUZZ_TREE@/src/hb-algs.hh \ @HARFBUZZ_TREE@/src/hb-debug.hh \ @HARFBUZZ_TREE@/src/hb-dispatch.hh \ @HARFBUZZ_TREE@/src/hb-draw.cc @HARFBUZZ_TREE@/src/hb-draw.hh \ + @HARFBUZZ_TREE@/src/hb-face-builder.cc \ @HARFBUZZ_TREE@/src/hb-face.hh @HARFBUZZ_TREE@/src/hb-face.cc \ @HARFBUZZ_TREE@/src/hb-font.hh @HARFBUZZ_TREE@/src/hb-font.cc \ @HARFBUZZ_TREE@/src/hb-iter.hh @HARFBUZZ_TREE@/src/hb-kern.hh \ - @HARFBUZZ_TREE@/src/hb-map.hh @HARFBUZZ_TREE@/src/hb-map.cc \ + @HARFBUZZ_TREE@/src/hb-limits.hh @HARFBUZZ_TREE@/src/hb-map.hh \ + @HARFBUZZ_TREE@/src/hb-map.cc \ @HARFBUZZ_TREE@/src/hb-machinery.hh \ @HARFBUZZ_TREE@/src/hb-meta.hh \ @HARFBUZZ_TREE@/src/hb-ms-feature-ranges.hh \ @@ -760,8 +772,6 @@ libharfbuzz_a_SOURCES = @HARFBUZZ_TREE@/src/hb-algs.hh \ @HARFBUZZ_TREE@/src/hb-ot-cff2-table.cc \ @HARFBUZZ_TREE@/src/hb-ot-cff2-table.hh \ @HARFBUZZ_TREE@/src/hb-ot-gasp-table.hh \ - @HARFBUZZ_TREE@/src/hb-ot-color-cbdt-table.hh \ - @HARFBUZZ_TREE@/src/hb-ot-color-colrv1-closure.hh \ @HARFBUZZ_TREE@/src/hb-ot-cmap-table.hh \ @HARFBUZZ_TREE@/src/hb-ot-face.cc \ @HARFBUZZ_TREE@/src/hb-ot-face.hh \ @@ -787,6 +797,12 @@ libharfbuzz_a_SOURCES = @HARFBUZZ_TREE@/src/hb-algs.hh \ @HARFBUZZ_TREE@/src/hb-ot-tag.cc \ @HARFBUZZ_TREE@/src/hb-ot-tag-table.hh \ @HARFBUZZ_TREE@/src/hb-ot-var-common.hh \ + @HARFBUZZ_TREE@/src/hb-outline.cc \ + @HARFBUZZ_TREE@/src/hb-outline.hh \ + @HARFBUZZ_TREE@/src/hb-paint-extents.cc \ + @HARFBUZZ_TREE@/src/hb-paint-extents.hh \ + @HARFBUZZ_TREE@/src/hb-paint.cc \ + @HARFBUZZ_TREE@/src/hb-paint.hh \ @HARFBUZZ_TREE@/src/hb-sanitize.hh \ @HARFBUZZ_TREE@/src/hb-serialize.hh \ @HARFBUZZ_TREE@/src/hb-set-digest.hh \ @@ -809,6 +825,7 @@ libharfbuzz_a_SOURCES = @HARFBUZZ_TREE@/src/hb-algs.hh \ @HARFBUZZ_TREE@/src/hb-subset-cff2.cc \ @HARFBUZZ_TREE@/src/hb-subset-cff2.hh \ @HARFBUZZ_TREE@/src/hb-subset-input.hh \ + @HARFBUZZ_TREE@/src/hb-subset-instancer-solver.cc \ @HARFBUZZ_TREE@/src/hb-subset.hh \ @HARFBUZZ_TREE@/src/hb-ucd-table.hh \ @HARFBUZZ_TREE@/src/hb-ucd.cc \ @@ -817,7 +834,8 @@ libharfbuzz_a_SOURCES = @HARFBUZZ_TREE@/src/hb-algs.hh \ @HARFBUZZ_TREE@/src/hb-unicode-emoji-table.hh \ @HARFBUZZ_TREE@/src/hb-vector.hh @HARFBUZZ_TREE@/src/hb-utf.hh \ @HARFBUZZ_TREE@/src/hb-buffer-deserialize-json.hh \ - @HARFBUZZ_TREE@/src/hb-buffer-deserialize-text.hh \ + @HARFBUZZ_TREE@/src/hb-buffer-deserialize-text-glyphs.hh \ + @HARFBUZZ_TREE@/src/hb-buffer-deserialize-text-unicode.hh \ @HARFBUZZ_TREE@/src/hb-fallback-shape.cc \ @HARFBUZZ_TREE@/src/hb.hh @HARFBUZZ_TREE@/src/hb-aat-layout.cc \ @HARFBUZZ_TREE@/src/hb-aat-layout-common.hh \ @@ -846,10 +864,6 @@ libharfbuzz_a_SOURCES = @HARFBUZZ_TREE@/src/hb-algs.hh \ @HARFBUZZ_TREE@/src/hb-ot-layout-jstf-table.hh \ @HARFBUZZ_TREE@/src/hb-ot-layout.hh \ @HARFBUZZ_TREE@/src/hb-ot-color.cc \ - @HARFBUZZ_TREE@/src/hb-ot-color-colr-table.hh \ - @HARFBUZZ_TREE@/src/hb-ot-color-cpal-table.hh \ - @HARFBUZZ_TREE@/src/hb-ot-color-sbix-table.hh \ - @HARFBUZZ_TREE@/src/hb-ot-color-svg-table.hh \ @HARFBUZZ_TREE@/src/hb-ot-map.cc \ @HARFBUZZ_TREE@/src/hb-ot-map.hh \ @HARFBUZZ_TREE@/src/hb-ot-math.cc \ @@ -898,6 +912,12 @@ libharfbuzz_a_SOURCES = @HARFBUZZ_TREE@/src/hb-algs.hh \ @HARFBUZZ_TREE@/src/hb-ot-var-hvar-table.hh \ @HARFBUZZ_TREE@/src/hb-ot-var-mvar-table.hh \ @HARFBUZZ_TREE@/src/hb-ot-vorg-table.hh \ + @HARFBUZZ_TREE@/src/OT/Color/CBDT/CBDT.hh \ + @HARFBUZZ_TREE@/src/OT/Color/COLR/COLR.hh \ + @HARFBUZZ_TREE@/src/OT/Color/COLR/colrv1-closure.hh \ + @HARFBUZZ_TREE@/src/OT/Color/CPAL/CPAL.hh \ + @HARFBUZZ_TREE@/src/OT/Color/sbix/sbix.hh \ + @HARFBUZZ_TREE@/src/OT/Color/svg/svg.hh \ @HARFBUZZ_TREE@/src/OT/glyf/glyf.hh \ @HARFBUZZ_TREE@/src/OT/glyf/glyf-helpers.hh \ @HARFBUZZ_TREE@/src/OT/glyf/loca.hh \ @@ -914,6 +934,7 @@ libharfbuzz_a_SOURCES = @HARFBUZZ_TREE@/src/hb-algs.hh \ @HARFBUZZ_TREE@/src/OT/Layout/Common/CoverageFormat1.hh \ @HARFBUZZ_TREE@/src/OT/Layout/Common/CoverageFormat2.hh \ @HARFBUZZ_TREE@/src/OT/Layout/Common/RangeRecord.hh \ + @HARFBUZZ_TREE@/src/OT/Layout/GDEF/GDEF.hh \ @HARFBUZZ_TREE@/src/OT/Layout/GSUB/Common.hh \ @HARFBUZZ_TREE@/src/OT/Layout/GSUB/Sequence.hh \ @HARFBUZZ_TREE@/src/OT/Layout/GSUB/SingleSubstFormat1.hh \ @@ -968,6 +989,7 @@ libharfbuzz_a_SOURCES = @HARFBUZZ_TREE@/src/hb-algs.hh \ @HARFBUZZ_TREE@/src/OT/Layout/GPOS/SinglePosFormat2.hh \ @HARFBUZZ_TREE@/src/OT/Layout/GPOS/SinglePos.hh \ @HARFBUZZ_TREE@/src/OT/Layout/GPOS/ValueFormat.hh \ + @HARFBUZZ_TREE@/src/OT/name/name.hh \ @HARFBUZZ_TREE@/src/OT/Layout/types.hh \ @HARFBUZZ_TREE@/src/graph/graph.hh \ @HARFBUZZ_TREE@/src/graph/serialize.hh \ @@ -1075,6 +1097,9 @@ clean-noinstLIBRARIES: @HARFBUZZ_TREE@/src/hb-draw.$(OBJEXT): \ @HARFBUZZ_TREE@/src/$(am__dirstamp) \ @HARFBUZZ_TREE@/src/$(DEPDIR)/$(am__dirstamp) +@HARFBUZZ_TREE@/src/hb-face-builder.$(OBJEXT): \ + @HARFBUZZ_TREE@/src/$(am__dirstamp) \ + @HARFBUZZ_TREE@/src/$(DEPDIR)/$(am__dirstamp) @HARFBUZZ_TREE@/src/hb-face.$(OBJEXT): \ @HARFBUZZ_TREE@/src/$(am__dirstamp) \ @HARFBUZZ_TREE@/src/$(DEPDIR)/$(am__dirstamp) @@ -1102,6 +1127,15 @@ clean-noinstLIBRARIES: @HARFBUZZ_TREE@/src/hb-ot-tag.$(OBJEXT): \ @HARFBUZZ_TREE@/src/$(am__dirstamp) \ @HARFBUZZ_TREE@/src/$(DEPDIR)/$(am__dirstamp) +@HARFBUZZ_TREE@/src/hb-outline.$(OBJEXT): \ + @HARFBUZZ_TREE@/src/$(am__dirstamp) \ + @HARFBUZZ_TREE@/src/$(DEPDIR)/$(am__dirstamp) +@HARFBUZZ_TREE@/src/hb-paint-extents.$(OBJEXT): \ + @HARFBUZZ_TREE@/src/$(am__dirstamp) \ + @HARFBUZZ_TREE@/src/$(DEPDIR)/$(am__dirstamp) +@HARFBUZZ_TREE@/src/hb-paint.$(OBJEXT): \ + @HARFBUZZ_TREE@/src/$(am__dirstamp) \ + @HARFBUZZ_TREE@/src/$(DEPDIR)/$(am__dirstamp) @HARFBUZZ_TREE@/src/hb-set.$(OBJEXT): \ @HARFBUZZ_TREE@/src/$(am__dirstamp) \ @HARFBUZZ_TREE@/src/$(DEPDIR)/$(am__dirstamp) @@ -1129,6 +1163,9 @@ clean-noinstLIBRARIES: @HARFBUZZ_TREE@/src/hb-subset-cff2.$(OBJEXT): \ @HARFBUZZ_TREE@/src/$(am__dirstamp) \ @HARFBUZZ_TREE@/src/$(DEPDIR)/$(am__dirstamp) +@HARFBUZZ_TREE@/src/hb-subset-instancer-solver.$(OBJEXT): \ + @HARFBUZZ_TREE@/src/$(am__dirstamp) \ + @HARFBUZZ_TREE@/src/$(DEPDIR)/$(am__dirstamp) @HARFBUZZ_TREE@/src/hb-ucd.$(OBJEXT): \ @HARFBUZZ_TREE@/src/$(am__dirstamp) \ @HARFBUZZ_TREE@/src/$(DEPDIR)/$(am__dirstamp) @@ -1243,6 +1280,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-buffer.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-common.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-draw.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-face-builder.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-face.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-fallback-shape.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-font.Po@am__quote@ # am--include-marker @@ -1277,6 +1315,9 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-shaper-vowel-constraints.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-tag.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-var.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-outline.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-paint-extents.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-paint.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-set.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-shape-plan.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-shape.Po@am__quote@ # am--include-marker @@ -1286,6 +1327,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-subset-cff-common.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-subset-cff1.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-subset-cff2.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-subset-instancer-solver.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ucd.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@@HARFBUZZ_TREE@/src/$(DEPDIR)/hb-unicode.Po@am__quote@ # am--include-marker @@ -1894,6 +1936,7 @@ distclean: distclean-recursive -rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-buffer.Po -rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-common.Po -rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-draw.Po + -rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-face-builder.Po -rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-face.Po -rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-fallback-shape.Po -rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-font.Po @@ -1928,6 +1971,9 @@ distclean: distclean-recursive -rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-shaper-vowel-constraints.Po -rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-tag.Po -rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-var.Po + -rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-outline.Po + -rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-paint-extents.Po + -rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-paint.Po -rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-set.Po -rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-shape-plan.Po -rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-shape.Po @@ -1937,6 +1983,7 @@ distclean: distclean-recursive -rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-subset-cff-common.Po -rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-subset-cff1.Po -rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-subset-cff2.Po + -rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-subset-instancer-solver.Po -rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ucd.Po -rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-unicode.Po -rm -f Makefile @@ -1996,6 +2043,7 @@ maintainer-clean: maintainer-clean-recursive -rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-buffer.Po -rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-common.Po -rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-draw.Po + -rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-face-builder.Po -rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-face.Po -rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-fallback-shape.Po -rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-font.Po @@ -2030,6 +2078,9 @@ maintainer-clean: maintainer-clean-recursive -rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-shaper-vowel-constraints.Po -rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-tag.Po -rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ot-var.Po + -rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-outline.Po + -rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-paint-extents.Po + -rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-paint.Po -rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-set.Po -rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-shape-plan.Po -rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-shape.Po @@ -2039,6 +2090,7 @@ maintainer-clean: maintainer-clean-recursive -rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-subset-cff-common.Po -rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-subset-cff1.Po -rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-subset-cff2.Po + -rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-subset-instancer-solver.Po -rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-ucd.Po -rm -f @HARFBUZZ_TREE@/src/$(DEPDIR)/hb-unicode.Po -rm -f Makefile diff --git a/source/libs/harfbuzz/TLpatches/ChangeLog b/source/libs/harfbuzz/TLpatches/ChangeLog index 99ea10526b103a7990e2f08dff7d891eda543d7c..3a45c304827664d87ff015add523fe0954bb349f 100644 --- a/source/libs/harfbuzz/TLpatches/ChangeLog +++ b/source/libs/harfbuzz/TLpatches/ChangeLog @@ -1,3 +1,13 @@ +2023-02-21 Akira Kakuto <kakuto@jcom.zaq.ne.jp> + + Imported harfbuzz-7.0.1 source tree from: + https://github.com/harfbuzz/harfbuzz/releases/download/7.0.1/ + +2023-02-12 Akira Kakuto <kakuto@jcom.zaq.ne.jp> + + Imported harfbuzz-7.0.0 source tree from: + https://github.com/harfbuzz/harfbuzz/releases/download/7.0.0/ + 2022-12-18 Akira Kakuto <kakuto@jcom.zaq.ne.jp> Imported harfbuzz-6.0.0 source tree from: diff --git a/source/libs/harfbuzz/TLpatches/TL-Changes b/source/libs/harfbuzz/TLpatches/TL-Changes index e52fabccd35ab091b17dcada911af48051c76326..383772522f4d0b678e11cc96aa2bc7f061fd20b1 100644 --- a/source/libs/harfbuzz/TLpatches/TL-Changes +++ b/source/libs/harfbuzz/TLpatches/TL-Changes @@ -1,5 +1,5 @@ -Changes applied to the harfbuzz-6.0.0/ tree as obtained from: - https://github.com/harfbuzz/harfbuzz/releases/download/6.0.0/ +Changes applied to the harfbuzz-7.0.1/ tree as obtained from: + https://github.com/harfbuzz/harfbuzz/releases/download/7.0.1/ Removed: COPYING diff --git a/source/libs/harfbuzz/configure b/source/libs/harfbuzz/configure index 6db9dda0629b2173c4160902db1e2440e6fa2034..cc3ba6db2a76a0c57d649608d9ad4b849c18e567 100755 --- a/source/libs/harfbuzz/configure +++ b/source/libs/harfbuzz/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for harfbuzz (TeX Live) 6.0.0. +# Generated by GNU Autoconf 2.71 for harfbuzz (TeX Live) 7.0.1. # # Report bugs to <tex-k@tug.org>. # @@ -611,8 +611,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='harfbuzz (TeX Live)' PACKAGE_TARNAME='harfbuzz--tex-live-' -PACKAGE_VERSION='6.0.0' -PACKAGE_STRING='harfbuzz (TeX Live) 6.0.0' +PACKAGE_VERSION='7.0.1' +PACKAGE_STRING='harfbuzz (TeX Live) 7.0.1' PACKAGE_BUGREPORT='tex-k@tug.org' PACKAGE_URL='' @@ -1346,7 +1346,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures harfbuzz (TeX Live) 6.0.0 to adapt to many kinds of systems. +\`configure' configures harfbuzz (TeX Live) 7.0.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1418,7 +1418,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of harfbuzz (TeX Live) 6.0.0:";; + short | recursive ) echo "Configuration of harfbuzz (TeX Live) 7.0.1:";; esac cat <<\_ACEOF @@ -1523,7 +1523,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -harfbuzz (TeX Live) configure 6.0.0 +harfbuzz (TeX Live) configure 7.0.1 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2064,7 +2064,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by harfbuzz (TeX Live) $as_me 6.0.0, which was +It was created by harfbuzz (TeX Live) $as_me 7.0.1, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -4823,7 +4823,7 @@ fi # Define the identity of the package. PACKAGE='harfbuzz--tex-live-' - VERSION='6.0.0' + VERSION='7.0.1' # Some tools Automake needs. @@ -5033,10 +5033,10 @@ WARNING_CFLAGS=$kpse_cv_warning_cflags -HB_VERSION_MAJOR=6 +HB_VERSION_MAJOR=7 HB_VERSION_MINOR=0 -HB_VERSION_MICRO=0 -HB_VERSION=6.0.0 +HB_VERSION_MICRO=1 +HB_VERSION=7.0.1 ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -8817,7 +8817,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by harfbuzz (TeX Live) $as_me 6.0.0, which was +This file was extended by harfbuzz (TeX Live) $as_me 7.0.1, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -8885,7 +8885,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -harfbuzz (TeX Live) config.status 6.0.0 +harfbuzz (TeX Live) config.status 7.0.1 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/source/libs/harfbuzz/harfbuzz-src/CMakeLists.txt b/source/libs/harfbuzz/harfbuzz-src/CMakeLists.txt index 97980ef59d8b4291fee316a3c81bfd393bd1707b..e22f2cfdd57cb660dc93a9da0db40c3d96c42be7 100644 --- a/source/libs/harfbuzz/harfbuzz-src/CMakeLists.txt +++ b/source/libs/harfbuzz/harfbuzz-src/CMakeLists.txt @@ -566,7 +566,7 @@ if (HB_HAVE_INTROSPECTION) # We need to account for the varying output directories # when we build using Visual Studio projects if ("${CMAKE_GENERATOR}" MATCHES "Visual Studio*") - set (hb_libpath "${CMAKE_CURRENT_BINARY_DIR}/$<CONFIGURATION>") + set (hb_libpath "${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>") else () set (hb_libpath "$<TARGET_FILE_DIR:harfbuzz-gobject>") endif () @@ -816,7 +816,7 @@ if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL) make_pkgconfig_pc_file("harfbuzz-gobject") if (HB_HAVE_INTROSPECTION) if ("${CMAKE_GENERATOR}" MATCHES "Visual Studio*") - set (hb_libpath "${CMAKE_CURRENT_BINARY_DIR}/$<CONFIGURATION>") + set (hb_libpath "${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>") else () set (hb_libpath "$<TARGET_FILE_DIR:harfbuzz-gobject>") endif () diff --git a/source/libs/harfbuzz/harfbuzz-src/ChangeLog b/source/libs/harfbuzz/harfbuzz-src/ChangeLog index 72f9886b1bdac46a79c05dc3624afb246062e30d..759594e33bbd85fcf3afc3fb0ea3e81cab525e23 100644 --- a/source/libs/harfbuzz/harfbuzz-src/ChangeLog +++ b/source/libs/harfbuzz/harfbuzz-src/ChangeLog @@ -1,3 +1,11613 @@ +commit 1d1f93a612ed071b703abab7deb0951f46a12433 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Mon Feb 20 15:54:12 2023 +0200 + + 7.0.1 + + NEWS | 6 ++++++ + configure.ac | 2 +- + meson.build | 2 +- + src/hb-version.h | 4 ++-- + 4 files changed, 10 insertions(+), 4 deletions(-) + +commit 6db871eb3aab5d4e47397b58025e678380a6fb34 +Merge: 8c1b47d7e 5b50b0771 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Feb 19 21:08:14 2023 -0700 + + Merge pull request #4126 from harfbuzz/cff2-instancer + + CFF2 instancer make ots-sanitize happy + +commit 5b50b07717a0adf353e866c1f5502f1c5b374d22 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Feb 19 20:30:38 2023 -0700 + + [subset-cff] Make BCD writing locale-independent + + src/hb-common.cc | 26 -------------------------- + src/hb-subset-cff-common.hh | 10 ++++++++-- + src/hb.hh | 31 +++++++++++++++++++++++++++++++ + 3 files changed, 39 insertions(+), 28 deletions(-) + +commit 4a735b30c4e31489779a06722c66f8d820b9666d +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Feb 19 19:51:03 2023 -0700 + + [cff2-subset] Update test + + test/api/fonts/AdobeVFPrototype.abc.static.otf | Bin 86112 -> 2576 bytes + 1 file changed, 0 insertions(+), 0 deletions(-) + +commit 21ff66cbd4445899f37c6aa6827a2d349292119b +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Feb 19 20:00:39 2023 -0700 + + [subset-cff2] Round blended Private values when instancing + + Hopefully no one blends BlueScale... + + src/hb-subset-cff2.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit a4b7033d0159b6372e631927b98b1963838bcc54 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Feb 19 17:48:02 2023 -0700 + + [cff2-subset] Blend Private values when instancing + + src/hb-serialize.hh | 7 ++ + src/hb-subset-cff-common.hh | 80 ++++++++++++++++++++++ + src/hb-subset-cff2.cc | 159 ++++++++++++++++++++++++++++++++++++++++++-- + 3 files changed, 239 insertions(+), 7 deletions(-) + +commit f10a4c9d6aebcc60b525a2342b0cdc6970ba32a3 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Feb 19 17:11:30 2023 -0700 + + [cff] Rename encode_num to encode_num_cs + + src/hb-subset-cff-common.hh | 4 ++-- + src/hb-subset-cff1.cc | 4 ++-- + src/hb-subset-cff2.cc | 6 +++--- + 3 files changed, 7 insertions(+), 7 deletions(-) + +commit c65eb5a82e4a9a0f3fe60b770741f3f4d3391bc2 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Feb 19 15:15:57 2023 -0700 + + [cff] Specialize cff_private_dict_op_serializer_t for CFF1/2 + + src/hb-subset-cff-common.hh | 33 --------------------------------- + src/hb-subset-cff1.cc | 32 +++++++++++++++++++++++++++++++- + src/hb-subset-cff2.cc | 36 +++++++++++++++++++++++++++++++++++- + 3 files changed, 66 insertions(+), 35 deletions(-) + +commit bf4b34e87e5d7428b7b206a38ce6d7948657a9cb +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Feb 19 11:16:51 2023 -0700 + + [subset-cff2] Don't encode vsindex in Private dict + + src/hb-subset-cff-common.hh | 14 +++++++++----- + src/hb-subset-cff2.cc | 2 +- + 2 files changed, 10 insertions(+), 6 deletions(-) + +commit 220caa7e095b62fef55b03f32b65ddc564d8dc63 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Feb 19 11:01:27 2023 -0700 + + [subset-cff2] Only encode VarStore link if any varstore + + src/hb-subset-cff2.cc | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +commit 82d9940a938d20bc2a4864a10e53bff4e34762ad +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Feb 19 10:51:55 2023 -0700 + + [subset-cff2] Don't encode vsindex if pinned + + src/hb-subset-cff-common.hh | 8 ++++---- + src/hb-subset-cff2.cc | 2 +- + 2 files changed, 5 insertions(+), 5 deletions(-) + +commit a88f3e8d379b7fbb0e4374f8ce1feb48ae681911 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Feb 19 10:47:36 2023 -0700 + + [subset-cff2] Don't serialize VarStore if pinned + + src/hb-subset-cff2.cc | 13 ++++++++----- + 1 file changed, 8 insertions(+), 5 deletions(-) + +commit 8c1b47d7e23910c632993aa444df12cc2338d89a +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Feb 19 20:38:43 2023 -0700 + + [font] Fix compiler warnings + + src/hb-font.hh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 7c74fc96319b57499e1e3defc3e346fd3cc6848e +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Feb 19 14:43:07 2023 -0700 + + [CFF] Remove unused member single_val + + src/hb-cff-interp-dict-common.hh | 4 +--- + src/hb-ot-cff1-table.hh | 3 --- + src/hb-ot-cff2-table.hh | 3 --- + 3 files changed, 1 insertion(+), 9 deletions(-) + +commit 2746597b69c10b7aa1c0df2a4d36a3d92fb0769f +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Feb 19 12:14:35 2023 -0700 + + [subset-cff2] Add flush_hintmask + + Fixes https://github.com/harfbuzz/harfbuzz/issues/4125 + + src/hb-subset-cff2.cc | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +commit adccc5355b695cfaaf6403a3187c67c7fcae623d +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Feb 17 12:29:42 2023 -0700 + + [MarkBase] Adjust base-finding logic + + Fixes https://github.com/harfbuzz/harfbuzz/issues/4124 + + src/OT/Layout/GPOS/MarkBasePosFormat1.hh | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +commit 946477fa5472bb93f6ac099a45ec13a34d87a732 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Feb 16 15:03:50 2023 -0700 + + [font] Fix a MSVC "error" + + Oh well. + + Fixes https://github.com/harfbuzz/harfbuzz/issues/4122 + + src/hb-font.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit b41efb6c4da9b1180b5178a55ceb31c68791dfdc +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Feb 13 21:16:16 2023 -0700 + + [atomic] Use no-op asm for compiler barrier + + Fixes https://github.com/harfbuzz/harfbuzz/pull/4119 + + src/hb-atomic.hh | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +commit 2f1aa032b4c43a76953036c6a90d108fe9358711 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Mon Feb 13 09:50:04 2023 +0200 + + [doc] Give this section a nice URL + + docs/usermanual-fonts-and-faces.xml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 552f0714e854af0ed41d54fad710a2e4ce872af3 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Mon Feb 13 09:21:05 2023 +0200 + + [meson] Fix test failure with experimental_api + + Pass --experimental-api to all gen-def.py when generating all .def + files, not only harfbuzz.def. + + Fixes https://github.com/harfbuzz/harfbuzz/issues/4117 + + src/meson.build | 17 ++++++++--------- + 1 file changed, 8 insertions(+), 9 deletions(-) + +commit 40fa046cf311718665496d0516495e9c139221ba +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Feb 12 10:54:07 2023 -0700 + + [hb-info] Declare a variable unused + + Fixes https://github.com/harfbuzz/harfbuzz/issues/4115 + + util/hb-info.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 8bdaeddfcd86aa66f560ff1ae1ae71b1e1723463 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Sat Feb 11 23:44:58 2023 +0200 + + 7.0.0 + + NEWS | 130 +++++++++++++++++++++++++++++++++++++++++++++++++ + configure.ac | 2 +- + docs/harfbuzz-docs.xml | 1 + + meson.build | 2 +- + src/hb-cairo.cc | 18 +++---- + src/hb-cairo.h | 2 +- + src/hb-draw.cc | 6 +-- + src/hb-face.cc | 2 +- + src/hb-font.cc | 13 ++--- + src/hb-font.h | 16 +++--- + src/hb-map.cc | 8 +-- + src/hb-ot-color.cc | 4 +- + src/hb-ot-layout.cc | 2 +- + src/hb-ot-name.h | 2 +- + src/hb-paint.cc | 46 ++++++++--------- + src/hb-paint.h | 72 +++++++++++++-------------- + src/hb-set.cc | 2 +- + src/hb-subset-input.cc | 2 +- + src/hb-version.h | 4 +- + 19 files changed, 232 insertions(+), 102 deletions(-) + +commit df6324cbe7f1ebf43f243cbefe60902e0e0d6085 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Sat Feb 11 22:35:09 2023 +0200 + + [ci] Build with default wrap mode + + Forcing fallback forces checking the subproject even if the option is + disabled. + + .ci/build-win32.sh | 2 +- + .ci/build-win64.sh | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +commit 5b82fa91c5b955ed5bea4b848e9afcda1f4a519b +Author: Khaled Hosny <khaled@aliftype.com> +Date: Sat Feb 11 22:22:48 2023 +0200 + + [meson] Update Glib subproject + + subprojects/glib.wrap | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +commit 31e099fd212491045b9743d5b3b4ed718f80902a +Author: Khaled Hosny <khaled@aliftype.com> +Date: Sat Feb 11 22:21:53 2023 +0200 + + [meson] Update Cairo subproject + + subprojects/cairo.wrap | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 8f0da5e5e6d6fb5b827ec090ece871bf13324c87 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Sat Feb 11 22:20:41 2023 +0200 + + [meson] Update FreeType subproject + + subprojects/freetype2.wrap | 9 ++++----- + subprojects/zlib.wrap | 13 ------------- + 2 files changed, 4 insertions(+), 18 deletions(-) + +commit 59cd1b17a96e6a8024f4fb5c1de1c1c8c3896633 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Sat Feb 11 20:24:49 2023 +0200 + + [ci] Don’t build docs on macos-aat-fonts job + + It fails ninja test, but superfluous anyway. + + .circleci/config.yml | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 7188c5643a45c11d82a04589d03a970fdffe8c0a +Author: Khaled Hosny <khaled@aliftype.com> +Date: Sat Feb 11 20:02:34 2023 +0200 + + [doc] Enable gtkdoc-check + + Should catch the most blatant issues. + + docs/meson.build | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +commit 0ea8bbd91a5addd10d1c5e4c1f4098937840f1e8 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Sat Feb 11 20:01:06 2023 +0200 + + [doc] Use XSince for REPLACEME/EXPERIMENTAL + + To hide them from gtk-doc so that we can finally enable gtkdoc-check. + + RELEASING.md | 2 +- + src/hb-cairo.cc | 18 ++++++------ + src/hb-cairo.h | 2 +- + src/hb-draw.cc | 6 ++-- + src/hb-face.cc | 2 +- + src/hb-font.cc | 10 +++---- + src/hb-font.h | 10 +++---- + src/hb-map.cc | 8 +++--- + src/hb-ot-color.cc | 4 +-- + src/hb-ot-layout.cc | 2 +- + src/hb-ot-name.h | 2 +- + src/hb-paint.cc | 46 +++++++++++++++--------------- + src/hb-paint.h | 72 +++++++++++++++++++++++------------------------ + src/hb-set.cc | 2 +- + src/hb-subset-input.cc | 4 +-- + src/hb-subset-repacker.cc | 2 +- + 16 files changed, 96 insertions(+), 96 deletions(-) + +commit 16dfd263b143e343973bfda478975457841f225d +Author: Khaled Hosny <khaled@aliftype.com> +Date: Sat Feb 11 19:31:29 2023 +0200 + + [subset] Remove docs for unimplemented flags + + GTK-Doc does not like this. + + src/hb-subset.h | 10 ---------- + 1 file changed, 10 deletions(-) + +commit 4d25941315b785f711562216241a674fbfa01509 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Sat Feb 11 19:25:52 2023 +0200 + + [doc] Fix hb_ot_name_[id|predefined]_t + + Shuffle the docs around, so that the enum values appear in documentation + as they now belong to hb_ot_name_predefined_t. The Since field will be + misleading now, though. + + src/hb-ot-name.h | 23 +++++++++++------------ + 1 file changed, 11 insertions(+), 12 deletions(-) + +commit 13741e68f8db429e432677f12e227de6e014dec0 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Sat Feb 11 19:17:37 2023 +0200 + + [doc] Minor + + src/hb-font.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit ab191d9dc7eb126759cd6224131db8df4b730b81 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Feb 11 09:31:07 2023 -0700 + + [ot-font] Minor division rounding + + src/hb-ot-font.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit c6c1c6ddf12e9e4f7fd343f0641288d62432962f +Merge: af1e605be 6ddd49019 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Feb 11 09:20:51 2023 -0700 + + Merge pull request #4107 from harfbuzz/cubic-glyf + + [glyf] Support cubic curves + +commit 6ddd490191b11ae7ac02f8d69486c771e0803a00 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Feb 10 14:24:03 2023 -0700 + + [path-builder] Comment re cubic + + src/OT/glyf/path-builder.hh | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +commit 91c2f098d09b36c25e4e849bf65483aa030c3f22 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Feb 10 14:15:16 2023 -0700 + + [cubic-glyf] Add HB_NO_CUBIC_GLYF + + src/OT/glyf/path-builder.hh | 4 ++++ + src/hb-config.hh | 1 + + 2 files changed, 5 insertions(+) + +commit af1e605be27afc79c293fdd0a45e6f6e2edd9054 +Author: Qunxin Liu <qxliu@google.com> +Date: Fri Feb 10 11:08:05 2023 -0800 + + [instancer] bug fix + + It's possible that length of all_points equals to 4 for non-empty + glyphs: a composite glyph which contains only one child glyph that is + empty. + + src/OT/glyf/Glyph.hh | 2 +- + test/subset/data/Makefile.am | 1 + + test/subset/data/Makefile.sources | 1 + + .../RobotoMono.default.retain-all-codepoint.wght=700.ttf | Bin 0 -> 1264 bytes + test/subset/data/fonts/RobotoMono.ttf | Bin 0 -> 1932 bytes + .../data/tests/instance_comp_glyph_empty_child.tests | 11 +++++++++++ + test/subset/meson.build | 1 + + 7 files changed, 15 insertions(+), 1 deletion(-) + +commit 8302da86303f68b1c9308ce2984cca0d28f1716a +Merge: 219e2f12f 737b15c5a +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Feb 10 12:50:45 2023 -0700 + + Merge pull request #4097 from harfbuzz/embolden + + Embolden + +commit 219e2f12f0d0ce02ef06351faa1ccb14fd69258c +Author: Jens Kutilek <webmail@kutilek.de> +Date: Fri Feb 10 17:23:31 2023 +0100 + + Clarify that those two test fonts are CC0-licensed + + .../fonts/TestGVAR-Composite-0.ttf | Bin 3136 -> 3592 bytes + .../fonts/TestGVAR-Composite-Missing.ttf | Bin 2984 -> 3440 bytes + 2 files changed, 0 insertions(+), 0 deletions(-) + +commit b1680e914362000de04a494d7134efbabc5fb3bc +Author: Pedro J. Estébanez <pedrojrulez@gmail.com> +Date: Fri Feb 10 14:14:43 2023 +0100 + + Use proper preprocessor checks for UWP + + src/hb-blob.cc | 6 +++--- + src/hb-mutex.hh | 2 +- + 2 files changed, 4 insertions(+), 4 deletions(-) + +commit 96d9e8624c410842ee3bf32bfc45f3240dc6d720 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Feb 9 12:53:17 2023 -0700 + + [docs] Improve cluster-level docs + + docs/usermanual-clusters.xml | 22 +++++++++++++--------- + 1 file changed, 13 insertions(+), 9 deletions(-) + +commit 737b15c5a0251d1579bc4b6a41cb08bc8c66e275 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Feb 8 17:45:59 2023 -0700 + + [embolden] Docs + + src/hb-font.cc | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +commit 00a6f8945c5c8c4174619c0703b4edf8a96db47d +Author: Khaled Hosny <khaled@aliftype.com> +Date: Wed Feb 8 22:43:39 2023 +0200 + + [meson] Minor + + alias_target() is variadic function. + + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 1d9dafbfd5a59143a009403798beae1e1ad1753a +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Feb 7 22:19:45 2023 -0700 + + [glyf] Support cubic curves + + https://github.com/harfbuzz/boring-expansion-spec/issues/41 + + src/OT/glyf/SimpleGlyph.hh | 2 +- + src/OT/glyf/path-builder.hh | 55 ++++++++++++++++++++++++++++++++++++--------- + 2 files changed, 45 insertions(+), 12 deletions(-) + +commit 64fa5cd482d0be2e215998aa1c2a05b978133e7c +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Feb 7 15:50:36 2023 -0700 + + [GPOS] Fix assert fail introduced recently + + Was introduced in 8708b9e081192786c027bb7f5f23d76dbe5c19e8. + + If these lookups are recursed to from (Chain)Context out-of-order, + it was possible that last_base > buffer->idx, in which case we + were attaching marks to a base after them... and an assertion + was failing fortunately. + + Fixes https://oss-fuzz.com/testcase-detail/6377756666757120 + + src/OT/Layout/GPOS/MarkBasePosFormat1.hh | 5 +++++ + src/OT/Layout/GPOS/MarkLigPosFormat1.hh | 5 +++++ + ...zz-testcase-minimized-hb-shape-fuzzer-6377756666757120 | Bin 0 -> 607 bytes + 3 files changed, 10 insertions(+) + +commit 840e1b6b84e8c421ab695f8fa99eae8cfc08e3e8 +Author: Qunxin Liu <qxliu@google.com> +Date: Tue Feb 7 13:49:19 2023 -0800 + + [instancer] bug fix + + src/hb-subset-plan.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 3fd9311649e2e0e5e2bfbe27c082e3f2dbc797f5 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Feb 7 14:16:24 2023 -0700 + + [indic] Use a hb_swap() + + src/hb-ot-shaper-indic.cc | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +commit be1c14ee0ad7702250f2a8b1969387d8018d4012 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Feb 7 13:52:53 2023 -0700 + + [embolden] Adjust font_h_extents + + src/hb-ft.cc | 2 +- + src/hb-ot-font.cc | 13 ++++++++++--- + 2 files changed, 11 insertions(+), 4 deletions(-) + +commit b350122fb3af6d4eff9a2cf9c8fc3b7157601944 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Feb 7 13:49:16 2023 -0700 + + [embolden] Fix glyph_extents in hb-ft + + src/hb-ft.cc | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +commit 61a1a88940f808f0f1184c6afdfbf025f21c1527 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Feb 7 13:47:04 2023 -0700 + + [hb-ft] Fix --font-grade + + src/hb-ft.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 560a65e456275e927d64f650235bdaa10049ee50 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Feb 7 13:46:13 2023 -0700 + + [embolden] Update glyph_extents in hb-ot-font + + src/hb-font.hh | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +commit aef002e0d92caeed512ae1f40904d02ebcb8d506 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Feb 7 11:29:49 2023 -0700 + + [embolden] Add in-place option + + Adds --font-grade to hb-view and hb-shape. + + src/hb-font.cc | 44 ++++++++++++++++++++++++++++++-------------- + src/hb-font.h | 8 ++++++-- + src/hb-font.hh | 9 +++++---- + src/hb-ft.cc | 43 +++++++++++++++++++++++++++++++++++++------ + src/hb-ot-font.cc | 22 ++++++++++++++-------- + src/hb-outline.cc | 7 ++++--- + src/hb-outline.hh | 3 ++- + util/font-options.hh | 37 ++++++++++++++++++++++++++++++++----- + 8 files changed, 130 insertions(+), 43 deletions(-) + +commit 0b92c579844a666e679c1741beded1edd0860611 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Feb 7 10:20:46 2023 -0700 + + [meson] Add alias "libs" target + + Builds libharfbuzz and libharfbuzz-subset. + + meson.build | 1 + + 1 file changed, 1 insertion(+) + +commit 434c98d4c672a95f380eed0b4c08b94f16426cf9 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Tue Feb 7 10:06:13 2023 +0200 + + [meson] Add alias "lib" target + + Fixes https://github.com/harfbuzz/harfbuzz/issues/4105 + + meson.build | 2 ++ + 1 file changed, 2 insertions(+) + +commit ce6440fceb0c0213dd4a39cc999efc67fe5dfb41 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Feb 6 16:12:03 2023 -0700 + + [buffer] Speed up merge_clusters_impl + + src/hb-buffer.cc | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +commit 1930760bc2c2b4185a772e38b6ecc174a95a47b2 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Feb 6 15:54:09 2023 -0700 + + [buffer] Fix up previous commit + + https://github.com/harfbuzz/harfbuzz/commit/85be877925ddbf34f74a1229f3ca1716bb6170dc#commitcomment-99547060 + + src/hb-buffer.hh | 22 ++++++++++------------ + 1 file changed, 10 insertions(+), 12 deletions(-) + +commit 30b84faba7811bed1b7c9828afd719f20e0086da +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Feb 6 15:27:13 2023 -0700 + + [buffer] Optimize _infos_set_glyph_flags to avoid O(n^2) behavior + + https://github.com/harfbuzz/harfbuzz/commit/85be877925ddbf34f74a1229f3ca1716bb6170dc#commitcomment-99547060 + + src/hb-buffer.hh | 44 ++++++++++++++++++++++++++++++++++++++------ + 1 file changed, 38 insertions(+), 6 deletions(-) + +commit 0b97ac39ac0bbe4d0027d1bb96668f456aaf634b +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Feb 6 15:17:09 2023 -0700 + + [buffer] Optimize _infos_find_min_cluster for monotone clusters + + src/hb-buffer.hh | 16 ++++++++++++---- + 1 file changed, 12 insertions(+), 4 deletions(-) + +commit 8708b9e081192786c027bb7f5f23d76dbe5c19e8 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Feb 6 14:51:25 2023 -0700 + + [GPOS] Avoid O(n^2) behavior in mark-attachment + + Better implementation; avoids arbitrary limit on look-back. + + src/OT/Layout/GPOS/MarkBasePosFormat1.hh | 76 ++++++++++++++++++++------------ + src/OT/Layout/GPOS/MarkLigPosFormat1.hh | 24 +++++++--- + src/hb-ot-layout-gsubgpos.hh | 5 ++- + 3 files changed, 69 insertions(+), 36 deletions(-) + +commit 661050b4659ee490dfe622821bc7fde7d1c40510 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Feb 6 12:38:17 2023 -0700 + + Revert "[layout] Limit how far we skip when looking back" + + This reverts commit 85be877925ddbf34f74a1229f3ca1716bb6170dc. + + src/hb-ot-layout-gsubgpos.hh | 7 ------- + 1 file changed, 7 deletions(-) + +commit b29fbd16fa82b82bdf0dcb2f13a63f7dc23cf324 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Feb 6 13:08:52 2023 -0700 + + [gsubgpos] Refactor skippy_iter.match() + + src/hb-ot-layout-gsubgpos.hh | 94 +++++++++++++++++++++++++------------------- + 1 file changed, 54 insertions(+), 40 deletions(-) + +commit ef2a8f722fc0ec12f5a59d44d4d60d376907fd31 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Feb 6 12:04:16 2023 -0700 + + [VarComposite] Adjust for RESET_UNSPECIFIED_AXES semantic change + + https://github.com/harfbuzz/boring-expansion-spec/issues/81 + + src/OT/glyf/Glyph.hh | 2 +- + src/hb-array.hh | 3 +++ + 2 files changed, 4 insertions(+), 1 deletion(-) + +commit 474b99d12238d4c401c970874688a2567c017534 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Feb 4 10:16:11 2023 -0700 + + [test-paint] Fix build without FreeType + + Fixes https://github.com/harfbuzz/harfbuzz/issues/4103 + + test/api/test-paint.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit d250fd979b54d26b7f432c809a153c3f90f020a9 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Feb 2 10:57:30 2023 -0700 + + [font] Docs + + docs/harfbuzz-sections.txt | 2 ++ + 1 file changed, 2 insertions(+) + +commit cf39d316d86edb253873143596484baaeddce30e +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Feb 2 10:45:35 2023 -0700 + + [outline] Add FreeType authors copyrights + + COPYING | 4 ++-- + src/hb-outline.cc | 8 +++++++- + 2 files changed, 9 insertions(+), 3 deletions(-) + +commit 061f995845f347a481e4ff6f66fd66c6b50bfcfb +Author: Matthias Clasen <mclasen@redhat.com> +Date: Thu Feb 2 08:15:02 2023 +0100 + + [font] Document synthetic boldness APIs + + src/hb-font.cc | 31 +++++++++++++++++++++++++++++++ + 1 file changed, 31 insertions(+) + +commit 2119eab69f5e8c5323fa23ab6c7dc26c2ab5aab3 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Feb 1 17:37:10 2023 -0700 + + [embolden] Adjust advance values + + src/hb-ft.cc | 16 +++++++++++++++- + src/hb-ot-font.cc | 29 +++++++++++++++++++++++++++++ + 2 files changed, 44 insertions(+), 1 deletion(-) + +commit b087266e511d21b5c63b02fa7eed45af4061e543 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Feb 1 17:09:29 2023 -0700 + + [ot-font] Conditionalize emboldening + + src/hb-ot-font.cc | 14 ++++++++------ + 1 file changed, 8 insertions(+), 6 deletions(-) + +commit 36dcc9a4327f824ccaa5751412707731504e1023 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Feb 1 17:06:15 2023 -0700 + + [ot-font] Fix emboldening CFF + + src/hb-ot-font.cc | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +commit 6b3fe8ac1beeb97194e5171b5fe3873236879fdd +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Feb 1 17:00:14 2023 -0700 + + [embolden] Semi-handle with negative scales + + src/hb-font.hh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit e39104ba1920a1bd2f6b4a56ace6cb66f7fcab6e +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Feb 1 16:56:56 2023 -0700 + + [font/util] Add emboldening API, --font-bold + + Needs documentation. + + src/hb-font.cc | 34 ++++++++++++++++++++++++++++++++-- + src/hb-font.h | 6 ++++++ + src/hb-font.hh | 12 ++++++++++++ + src/hb-ft.cc | 4 +--- + src/hb-ot-font.cc | 4 +--- + util/font-options.hh | 25 ++++++++++++++++++++++++- + 6 files changed, 76 insertions(+), 9 deletions(-) + +commit 4247b78e31e00d02d3a6951888d5cae89d4e9060 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Feb 1 16:26:07 2023 -0700 + + [outline] Comment + + src/hb-outline.cc | 2 ++ + 1 file changed, 2 insertions(+) + +commit ae522a1372c34bd013990de1b09d5cfa84433590 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Feb 1 16:24:44 2023 -0700 + + [embolden] Rename to hb-outline + + src/Makefile.sources | 2 + + src/harfbuzz-subset.cc | 1 + + src/harfbuzz.cc | 1 + + src/hb-ot-font.cc | 2 +- + src/{hb-draw-embolden.hh => hb-outline.cc} | 54 ++------------------ + src/hb-outline.hh | 82 ++++++++++++++++++++++++++++++ + src/meson.build | 2 + + 7 files changed, 94 insertions(+), 50 deletions(-) + +commit fda2f6f64e5033c824187b50fcdd07b1d65d1080 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Feb 1 16:16:10 2023 -0700 + + [embolden] Shuffle under hb_outline_t + + src/hb-draw-embolden.hh | 377 ++++++++++++++++++++++++------------------------ + src/hb-ot-font.cc | 10 +- + 2 files changed, 192 insertions(+), 195 deletions(-) + +commit 7774bccb48404f4b998d16b701463039bf0955da +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Feb 1 16:12:10 2023 -0700 + + [embolden] Renames + + src/hb-draw-embolden.hh | 134 ++++++++++++++++++++++++------------------------ + 1 file changed, 66 insertions(+), 68 deletions(-) + +commit c06f95ebe18e7f6a093e28e8dcb322ca6e4d5a8d +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Feb 1 16:02:48 2023 -0700 + + [embolden] Move code + + src/hb-draw-embolden.hh | 72 +++++++++++++++++++++++-------------------------- + 1 file changed, 34 insertions(+), 38 deletions(-) + +commit 6b4a6fbedded342182cca5356707050696912753 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Feb 1 15:59:37 2023 -0700 + + [embolden] Add orientation detection + + src/hb-draw-embolden.hh | 24 ++++++++++++++++++++++-- + 1 file changed, 22 insertions(+), 2 deletions(-) + +commit 1817f18085a7476759e794cfb0b4a627fc1487cc +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Feb 1 15:49:05 2023 -0700 + + [embolden] Simplify recording-pen + + src/hb-draw-embolden.hh | 109 +++++++++++++++++++++++------------------------- + 1 file changed, 53 insertions(+), 56 deletions(-) + +commit 70149885a78017475ebedd732ca5d3b0d4d8c595 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Feb 1 14:27:45 2023 -0700 + + [font] Towards implementing emboldening + + src/hb-draw-embolden.hh | 349 ++++++++++++++++++++++++++++++++++++++++++++++++ + src/hb-ft.cc | 6 +- + src/hb-ot-font.cc | 20 ++- + src/hb-vector.hh | 5 +- + 4 files changed, 373 insertions(+), 7 deletions(-) + +commit b5c68c1cf3a64b1be0708201bf433e7ae73c1f34 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Feb 2 15:50:53 2023 -0700 + + [codecov] Enable information patch mode + + .codecov.yml | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +commit fda200658e3d3e2db466c9eb81be349df94c6704 +Author: Garret Rieger <grieger@google.com> +Date: Thu Feb 2 22:03:36 2023 +0000 + + [subset] fix missing compiled glyph cleanup when serialization succeeds. + + src/OT/glyf/glyf.hh | 11 +++++------ + 1 file changed, 5 insertions(+), 6 deletions(-) + +commit 9bd3259335322338e2181935dc031fb9d7805e10 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Feb 2 13:36:23 2023 -0700 + + [cairo] Fix uninitialized value + + Ouch! + + src/hb-cairo-utils.cc | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit 85be877925ddbf34f74a1229f3ca1716bb6170dc +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Feb 1 20:00:43 2023 -0700 + + [layout] Limit how far we skip when looking back + + See comments. + + src/hb-ot-layout-gsubgpos.hh | 7 +++++++ + 1 file changed, 7 insertions(+) + +commit d18fd3f7ebcd75e99c928c52fabfc51359000d26 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jan 31 16:28:49 2023 -0700 + + [layout] Comment + + src/hb-ot-layout-gsubgpos.hh | 5 +++++ + 1 file changed, 5 insertions(+) + +commit 7a4bd97e4a3633429675a91df069b927ff3c580c +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jan 31 14:59:39 2023 -0700 + + [layout] Build lookup accelerators lazily on-demand + + Reduces memory consumption for large multi-script fonts + drastically. + + src/hb-ot-font.cc | 3 +- + src/hb-ot-layout-gpos-table.hh | 7 ++-- + src/hb-ot-layout-gsub-table.hh | 7 ++-- + src/hb-ot-layout-gsubgpos.hh | 66 ++++++++++++++++++++++++------------- + src/hb-ot-layout.cc | 35 +++++++++++--------- + src/hb-ot-shaper-arabic-fallback.hh | 15 +++++---- + 6 files changed, 76 insertions(+), 57 deletions(-) + +commit 83353f13f45fefbf0ad1eb0d5388b2c8bf2f7702 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jan 31 14:32:14 2023 -0700 + + [layout] Reduce memory use slightly + + By using raw pointer instead of vector for subtable accelerator. + + To be used for more memory saving by making subtable accelerators + lazy-loaded by shape-plans for large fonts. + + src/hb-ot-layout-gpos-table.hh | 2 +- + src/hb-ot-layout-gsub-table.hh | 2 +- + src/hb-ot-layout-gsubgpos.hh | 37 +++++++++++++++++++++---------------- + src/hb-ot-layout.cc | 15 +++++++++------ + 4 files changed, 32 insertions(+), 24 deletions(-) + +commit 2b6d74b42e2320f2caf8a99dcf98ef692819d689 +Author: Garret Rieger <grieger@google.com> +Date: Tue Jan 31 17:37:37 2023 +0000 + + [subset] for keep everything, don't drop any tables. + + src/hb-subset-input.cc | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +commit 277003d553293c7af0b5b6d25be02fac0925e597 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 30 22:43:01 2023 -0700 + + [ft] Fit advance cache into short int + + src/hb-ft.cc | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +commit a924bbcfce67fed3da4ad6cf92178f7135a3359a +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 30 14:13:33 2023 -0700 + + [atomic/cache] Add hb_atomic_short_t + + src/hb-atomic.hh | 30 +++++++++++++++++++++++++----- + src/hb-cache.hh | 4 +++- + 2 files changed, 28 insertions(+), 6 deletions(-) + +commit e7a71ea15b1df6feb3ca9811eb3abe721a63e21f +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 30 11:21:08 2023 -0700 + + [font] Docs + + src/hb-font.cc | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit cb47dca74cbf6d147aac9cf3067f249555aa68b1 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 29 10:03:52 2023 -0700 + + [object] Handle mallocation error in set_user_data + + Should make bots happy. + + src/hb-object.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 548bad221c6ba8a82fc3387923ca0382d183ab5e +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 29 10:10:48 2023 -0700 + + [user-data] Move methods to header file + + No idea why they were in hb-static. + + src/hb-object.hh | 32 ++++++++++++++++++++++++++------ + src/hb-static.cc | 32 -------------------------------- + 2 files changed, 26 insertions(+), 38 deletions(-) + +commit 02f79f60f26d800d55194be174210bf47968812e +Merge: 6622e04aa 784fe9ac6 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 29 09:36:46 2023 -0700 + + Merge pull request #4092 from harfbuzz/more-cmap-cache + + [ot-font] Use the cmap cache more + +commit 784fe9ac67f9c0a203367222671d431a85c98cfa +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 29 09:26:52 2023 -0700 + + [cmap] Simplify caching + + src/hb-ot-cmap-table.hh | 19 ++++++------------- + 1 file changed, 6 insertions(+), 13 deletions(-) + +commit a451aa5465ed80963f09c9f0290979608b1d675e +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sun Jan 29 11:25:28 2023 -0500 + + Add back a null check + + This was accidentally dropped in the previous commit. + + src/hb-ot-cmap-table.hh | 2 ++ + 1 file changed, 2 insertions(+) + +commit 6622e04aa1b9d8b38e53cbe3e71c0b7066fd7208 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 29 09:06:52 2023 -0700 + + [solver] Fix unused-variable error + + https://github.com/harfbuzz/harfbuzz/commit/223abd72b9f48c951ce1e99d89328edbcff43515 + + src/hb-subset-instancer-solver.cc | 13 +++---------- + 1 file changed, 3 insertions(+), 10 deletions(-) + +commit 318aa107082cf4ab1c2fcc5f0bf2ead145216e1d +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sun Jan 29 09:17:17 2023 -0500 + + [ot-font] Use the cmap cache more + + Use the cmap cache for get_nominal_glyph and + get_variation_glyph as well. The first of these + is used a lot in pango. + + src/hb-ot-cmap-table.hh | 21 +++++++++++++++------ + src/hb-ot-font.cc | 6 ++++-- + 2 files changed, 19 insertions(+), 8 deletions(-) + +commit 5da829eaf534b78ee2fee7fbea86e8deb36bfef3 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Jan 28 22:18:53 2023 -0700 + + [font] Comments + + src/hb-ot-font.cc | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +commit 544dd9678c51458c9a19a951a873a0a259cdfe7a +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Jan 28 22:06:46 2023 -0700 + + [font] Fix unlikely + + src/hb-ot-font.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit c1d0daf5f12caf2b13f267941d761fd9c37d4fd6 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Jan 28 22:05:24 2023 -0700 + + [font] unlikely + + src/hb-ot-font.cc | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +commit 30ee7a21e174e56a2f9caf750e666d16f002247a +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Jan 28 21:48:16 2023 -0700 + + [font] Typo + + src/hb-ot-font.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 04056d44e2265a44fe3090ff7eb5a7a493d3221c +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sat Jan 28 22:52:25 2023 -0500 + + [layout] Optimize more buffer message calls + + Continuation of da7b66c1f8bbf7147f8113. + + src/hb-ot-layout.cc | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +commit f8a744d9d52d64f69778c2bfc2848ae2f2d1f63b +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Jan 28 13:37:43 2023 -0700 + + [ot-font] Add a cmap cache + + Speeds up Roboto shaping by 7%, for 1kb per face. + + src/hb-ot-cmap-table.hh | 27 ++++++++++++++++++++++----- + src/hb-ot-font.cc | 33 ++++++++++++++++++++++++++++++++- + 2 files changed, 54 insertions(+), 6 deletions(-) + +commit 1b53ed3c418298c760c42c612e2b6a2126237ee1 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Jan 28 13:22:52 2023 -0700 + + [cache] Remove empty fini() + + src/hb-cache.hh | 1 - + src/hb-ft.cc | 2 -- + src/hb-ot-font.cc | 3 --- + 3 files changed, 6 deletions(-) + +commit 115d572571fbd5fdb3bf677a0248dc8fdd29b31d +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Jan 28 13:22:08 2023 -0700 + + [cache] Add constructor + + src/hb-cache.hh | 2 ++ + 1 file changed, 2 insertions(+) + +commit ae96295d6737a9e6f925ffb8043118d3e051cdaa +Author: Khaled Hosny <khaled@aliftype.com> +Date: Sat Jan 28 22:12:33 2023 +0200 + + Delete commented out include + + src/OT/Color/COLR/colrv1-closure.hh | 1 - + 1 file changed, 1 deletion(-) + +commit 09b7fce857c4cde4f1a8e7925aa5c96052e5c050 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sat Jan 28 13:21:27 2023 -0500 + + Make includes relative + + src/OT/Layout/GDEF/GDEF.hh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit e25e4c9a52233056bfda866fbbe635dc490726fc +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sat Jan 28 00:10:47 2023 -0500 + + Move GDEF table to src/OT/Layout/GDEF + + src/Makefile.sources | 1 + + src/OT/Layout/GDEF/GDEF.hh | 918 +++++++++++++++++++++++++++++++++++++++++ + src/hb-ot-layout-gdef-table.hh | 886 +-------------------------------------- + src/meson.build | 1 + + 4 files changed, 921 insertions(+), 885 deletions(-) + +commit f89fa6dcfe8fc9ea53c9502f51024ec1dfac9a39 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Fri Jan 27 23:54:34 2023 -0500 + + Move name table to src/OT/name + + src/Makefile.sources | 1 + + src/OT/name/name.hh | 589 ++++++++++++++++++++++++++++++++++++++++++++++++ + src/hb-ot-name-table.hh | 559 +-------------------------------------------- + src/meson.build | 1 + + 4 files changed, 592 insertions(+), 558 deletions(-) + +commit b8193357c1a0ce5013d074beaffda5cb6f6ae9c6 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sat Jan 28 00:00:30 2023 -0500 + + [OT::Color] Drop unused includes + + src/OT/Color/COLR/COLR.hh | 1 - + src/OT/Color/COLR/colrv1-closure.hh | 2 +- + src/OT/Color/sbix/sbix.hh | 1 - + 3 files changed, 1 insertion(+), 3 deletions(-) + +commit da7b66c1f8bbf7147f8113922f81c02002af818c +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 27 16:39:06 2023 -0700 + + [layout] Optimize buffer message calls + + Those aren't exactly free. They were showing up in profiles. + + src/hb-ot-layout.cc | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +commit 49d75ef331a372fc6545fbf0643ce053dbe39341 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 27 15:37:11 2023 -0700 + + [gsubgpos] Fix bug in cached ChainContextFormat2 application + + src/hb-ot-layout-gsubgpos.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit d2279a204f4452ac88a08eec07958fea7a70e549 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 27 12:32:55 2023 -0700 + + [gsubgpos] Avoid a copy into the vector + + src/hb-ot-layout-gsubgpos.hh | 14 ++++++-------- + 1 file changed, 6 insertions(+), 8 deletions(-) + +commit 615595689c9b0e5ee8af3c689e78cbbca7d7c4be +Author: Qunxin Liu <qxliu@google.com> +Date: Fri Jan 27 11:05:13 2023 -0800 + + [subset/COLR] add tests for copying varStore + + test/subset/data/Makefile.am | 1 + + test/subset/data/Makefile.sources | 1 + + .../colrv1_copy_varstore/Foldit.default.41,42.ttf | Bin 0 -> 43860 bytes + .../expected/colrv1_copy_varstore/Foldit.default.41.ttf | Bin 0 -> 43048 bytes + .../Foldit.default.retain-all-codepoint.ttf | Bin 0 -> 44336 bytes + .../Foldit.drop-hints-retain-gids.41,42.ttf | Bin 0 -> 43836 bytes + .../Foldit.drop-hints-retain-gids.41.ttf | Bin 0 -> 43032 bytes + ...ldit.drop-hints-retain-gids.retain-all-codepoint.ttf | Bin 0 -> 44300 bytes + .../colrv1_copy_varstore/Foldit.drop-hints.41,42.ttf | Bin 0 -> 43820 bytes + .../colrv1_copy_varstore/Foldit.drop-hints.41.ttf | Bin 0 -> 43016 bytes + .../Foldit.drop-hints.retain-all-codepoint.ttf | Bin 0 -> 44300 bytes + .../colrv1_copy_varstore/Foldit.retain-gids.41,42.ttf | Bin 0 -> 43876 bytes + .../colrv1_copy_varstore/Foldit.retain-gids.41.ttf | Bin 0 -> 43064 bytes + .../Foldit.retain-gids.retain-all-codepoint.ttf | Bin 0 -> 44336 bytes + test/subset/data/fonts/Foldit.ttf | Bin 0 -> 44340 bytes + test/subset/data/tests/colrv1_copy_varstore.tests | 13 +++++++++++++ + test/subset/meson.build | 1 + + 17 files changed, 16 insertions(+) + +commit 0f33ea8c4fe39ee1b39a2ce87f07a7522a99808c +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 27 11:26:57 2023 -0700 + + [subset/COLR] Copy VarStore + + Fixes https://github.com/harfbuzz/harfbuzz/issues/4085 + + src/OT/Color/COLR/COLR.hh | 2 +- + src/hb-ot-layout-common.hh | 26 ++++++++++++++++++++++++++ + 2 files changed, 27 insertions(+), 1 deletion(-) + +commit 6c46da7710616b7f085da789ce4131d1169fce5d +Author: Khaled Hosny <khaled@aliftype.com> +Date: Fri Jan 27 10:34:50 2023 +0200 + + [test] Fix shell script quoting + + test/shape/record-test.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit c03c8548f48c08434957ec4de4f59c2af422fe0a +Merge: 950c7ab3f 7a714d1a8 +Author: Matthias Clasen <matthias.clasen@gmail.com> +Date: Thu Jan 26 23:17:11 2023 -0500 + + Merge pull request #4084 from harfbuzz/cairo-check-funcs + + [meson] Enable all checked for Cairo functions for internal Cairo + +commit 7a714d1a8d28f626efeb7e1785acda104ffce29f +Author: Khaled Hosny <khaled@aliftype.com> +Date: Fri Jan 27 03:12:36 2023 +0200 + + [meson] Enable all checked for Cairo functions for internal Cairo + + Similar to what we do with FreeType ones. + + meson.build | 16 +++++++++++----- + 1 file changed, 11 insertions(+), 5 deletions(-) + +commit 950c7ab3f0486b5baa0f602c7b12fc85cadd5428 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 26 15:26:05 2023 -0700 + + [gsubgpos] Use accelerator when recursing + + src/hb-ot-layout-gpos-table.hh | 12 ++++++++++-- + src/hb-ot-layout-gsub-table.hh | 12 ++++++++++-- + 2 files changed, 20 insertions(+), 4 deletions(-) + +commit e377888990239dc6d108777c1be61a99bade6e01 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 26 13:26:47 2023 -0700 + + [ft-colr] Conditionalize on (unreleased0 FreeType 2.13.0 + + That's the version that the color API is called stable, and + includes changes that we rely on. + + src/hb-ft.cc | 6 +++--- + test/api/test-paint.c | 10 +++++----- + 2 files changed, 8 insertions(+), 8 deletions(-) + +commit 281db89a688f253ea91c780ebe2c0c9494d234f2 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 26 13:05:12 2023 -0700 + + [cairo] Try to handle failure in set_user_data + + src/hb-cairo.cc | 42 ++++++++++++++++++++++++++---------------- + 1 file changed, 26 insertions(+), 16 deletions(-) + +commit 2fede3ef4a95184d831fae698c20d5616cccb89a +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 26 12:23:12 2023 -0700 + + [layout] Fix a return_trace + + src/hb-ot-layout-common.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 05a2f31592711e02c359d5f1d9955052df9455e2 +Merge: aea37bfd3 e484d6b99 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 26 12:56:02 2023 -0700 + + Merge pull request #4065 from harfbuzz/cairo-fix-foreground-color + + hb-cairo: Fix handling of foreground color + +commit e484d6b990171ba28e7ee8811f3a41d32b1d0418 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 26 12:55:25 2023 -0700 + + [cairo] Handle malloc failure + + src/hb-cairo-utils.cc | 22 ++++++++++++++++++---- + 1 file changed, 18 insertions(+), 4 deletions(-) + +commit 29a36010a1514c72c207fec8b5ab8361617a0078 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 25 17:26:33 2023 -0700 + + [cairo] Adapt to cairo foreground API change again + + src/hb-cairo-utils.cc | 2 +- + src/hb-cairo.cc | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +commit 30d0d9c56c5f481b93141ca2742f6c992443ac46 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Tue Jan 24 15:43:17 2023 -0500 + + Adapt to cairo changes + + Adapt to the api in the cairo MR that will be used, + and make the code build with older cairo. + + meson.build | 1 + + src/hb-cairo-utils.cc | 4 +++- + src/hb-cairo.cc | 4 +++- + 3 files changed, 7 insertions(+), 2 deletions(-) + +commit 034d4d26f2dc31b73db72b94ca265ee45da44ddd +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 23 16:22:26 2023 -0700 + + [hb-cairo] Minor simplify + + src/hb-cairo-utils.cc | 4 +--- + src/hb-cairo.cc | 4 +--- + 2 files changed, 2 insertions(+), 6 deletions(-) + +commit 26d34392e2dd2ea0e9908c1d53e1223487f021cc +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 23 16:21:13 2023 -0700 + + [hb-cairo] Fix condition + + src/hb-cairo.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit f9b3c79047aaedbffe4690b3bc6093c241ca5e90 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Mon Jan 23 18:09:09 2023 -0500 + + Update to different cairo API + + The cairo will likely end up begin a getter for + a cairo_pattern_t instead of a color. + + src/hb-cairo-utils.cc | 11 ++++++++--- + src/hb-cairo.cc | 12 +++++++----- + 2 files changed, 15 insertions(+), 8 deletions(-) + +commit 4afdbcbad55e5b5a4718c52398663cfd889a92ae +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 23 15:53:26 2023 -0700 + + [hb-cairo] Don't call get_foreground_color unnecessarily + + That would invalidate cairo cache on foreground change, even + if the glyph doesn't need that. + + src/hb-cairo-utils.cc | 42 +++++++++++++++++++++++++++--------------- + src/hb-cairo.cc | 23 +++++++++++++++-------- + 2 files changed, 42 insertions(+), 23 deletions(-) + +commit c37ea4f93ed726c37739325e3f181b3973182e29 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Mon Jan 23 08:31:24 2023 -0500 + + hb-cairo: Fix handling of foreground color + + Use the new cairo_user_scaled_font_get_foreground_color + to obtain the foreground color, since the cr's source + can't be trusted. + + Requires https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/420 + + src/hb-cairo.cc | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +commit aea37bfd370b880c553c1b5c80b7ddba59a28be6 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 26 12:18:50 2023 -0700 + + Fix c++20 build + + src/hb-subset-instancer-solver.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit e1dc4920eeb220b5cb3d5f20446748e63b158623 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 26 12:11:35 2023 -0700 + + [iter] Allow hb_len() to fetch c.len as non-function + + src/hb-iter.hh | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +commit 8d29be39b2fa777f70a4481629ac0c29fb1813fe +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 26 11:41:58 2023 -0700 + + [gsubgpos] Minor drop an unnecessary hb_iter + + src/hb-ot-layout-gsubgpos.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 06b9b3b5b66b0883d2274c6a6522378df6f4859c +Merge: c1a5d2095 4a632dec7 +Author: Matthias Clasen <matthias.clasen@gmail.com> +Date: Thu Jan 26 14:15:52 2023 -0500 + + Merge pull request #4083 from harfbuzz/bump-cairo + + build: Bump to newer cairo + +commit 4a632dec788fbb90d61d196e563f342440448240 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Thu Jan 26 13:19:50 2023 -0500 + + build: Bump to newer cairo + + subprojects/cairo.wrap | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit c1a5d20951803f8619094b98bac76d474963e264 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Wed Jan 25 21:52:05 2023 -0500 + + [doc] Add a missing comma + + src/hb-paint.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 8d80d1dd184c06a94d07afe5f06b1513e1ccae3a +Author: Matthias Clasen <mclasen@redhat.com> +Date: Wed Jan 25 19:06:51 2023 -0500 + + [paint] Update expected test results + + These tests were affected by recent fixes. + + test/api/results/test-106 | 6 +++--- + test/api/results/testvf-106 | 6 +++--- + 2 files changed, 6 insertions(+), 6 deletions(-) + +commit 570fe998c942e1042c66bbab2f848a9e05ad777a +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 25 15:42:24 2023 -0700 + + [cairo] Another sweep_gradient fix + + k was -1 sometimes. + + Fixes the rest of https://roettsch.es/var_colrv1.html + + src/hb-cairo-utils.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 13bfef9f01d2e11e5520c25d884ac51162d33cf2 +Author: Andres Salomon <dilinger@queued.net> +Date: Wed Jan 25 16:14:59 2023 -0500 + + [COPYING] Another update + + Adobe, Inc has copyright in src/hb-subset-cff*, test/api/test-subset*, and + misc other places. + + Ebrahim Byagowi has copyright as far back as 2015 in places like + src/hb-directwrite.cc. + + Google, Inc has newer copyright into 2022 in places like + src/graph/test-classdef-graph.cc. Also, listing every year was getting a bit + unwieldy, so just do 2010-2022. + + Igalia S.L. contributed the stuff in src/hb-ot-math*. + + The only references I could find to Martin Hosken & SIL were in + src/hb-graphite2*, and they were 2011, not 2009. + + Mozilla's got a bunch of 2015 code in src/hb-ot-shaper-*. + + Red Hat has copyright up to 2023 (eg, test/api/test-glyph-names.c). + + COPYING | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +commit ea316b56a0ef1e84c29cd31b45b083bbe0120f83 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 25 15:31:29 2023 -0700 + + [cairo] Flip offsets when reversing + + Fixes many of the var_colrv1 first row tests. + + https://roettsch.es/var_colrv1.html + + src/hb-cairo-utils.cc | 2 ++ + 1 file changed, 2 insertions(+) + +commit 5b05e198cf047335ee9d421d60a0d57e6693424a +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 25 15:24:14 2023 -0700 + + [cairo] More hb_malloc + + src/hb-cairo-utils.cc | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +commit 57352b8bd4cc35ca6f2e3db7127c266e1a6a938d +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 25 15:22:27 2023 -0700 + + [cairo] Use hb_malloc / hb_free + + src/hb-cairo-utils.cc | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +commit a9392c0cbb44111c2d5424257aafdebf2de8604c +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 25 14:54:52 2023 -0700 + + [cairo] Use hb_swap() + + src/hb-cairo-utils.cc | 10 ++-------- + 1 file changed, 2 insertions(+), 8 deletions(-) + +commit 5e868703788057696eb062fc30de0898058fdc41 +Author: Qunxin Liu <qxliu@google.com> +Date: Wed Jan 25 12:27:16 2023 -0800 + + [instancer] compute head/maxp values using only non-empty glyphs + + src/OT/glyf/Glyph.hh | 14 +++++++++++++- + ...fault.retain-all-codepoint.wght=100,ELGR=1,ELSH=2.ttf | Bin 0 -> 2244 bytes + test/subset/data/tests/instance_no_double_free.tests | 1 + + 3 files changed, 14 insertions(+), 1 deletion(-) + +commit d15551c6f394e8a7732f81fd51b8a0304e8e050c +Author: Qunxin Liu <qxliu@google.com> +Date: Wed Jan 25 11:01:08 2023 -0800 + + [instancer] update head table flagbit: allXMinIsLsb + + src/OT/glyf/Glyph.hh | 3 +++ + src/OT/glyf/glyf-helpers.hh | 7 +++++++ + src/hb-ot-head-table.hh | 2 ++ + src/hb-subset-plan.hh | 4 +++- + 4 files changed, 15 insertions(+), 1 deletion(-) + +commit 2c49eba044be55d81470ffaa9f854734c607e6e4 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 25 14:52:39 2023 -0700 + + [cairo] Indent + + src/hb-cairo-utils.cc | 398 +++++++++++++++++++++++++------------------------- + 1 file changed, 199 insertions(+), 199 deletions(-) + +commit 2accbdc0b6cbee4b6d9f581d8a890601881506fb +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 25 14:40:04 2023 -0700 + + [paint] Minor skew + + src/hb-paint.hh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit a4420479a8f2d4d9b11039f5b7862f7f5f684db1 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 25 14:37:10 2023 -0700 + + Revert "[VarComposite] Fix skew" + + This reverts commit 8cf7076309da014e8e2af033b1c636785ae407cd. + + src/OT/glyf/VarCompositeGlyph.hh | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +commit 8cf7076309da014e8e2af033b1c636785ae407cd +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 25 14:35:35 2023 -0700 + + [VarComposite] Fix skew + + src/OT/glyf/VarCompositeGlyph.hh | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit 626f8e4de3060376d12c77ac4967fd6fb908169a +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 25 14:33:46 2023 -0700 + + [paint] Fix skew to match Chrome + + src/hb-paint.hh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit b44ff062e1dcddb51c13d3df9e66b31339d7e4b5 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 25 14:16:46 2023 -0700 + + [deserialize] Some more + + src/hb-buffer-deserialize-text-glyphs.hh | 9 ++++++++- + src/hb-buffer-deserialize-text-glyphs.rl | 9 ++++++++- + src/hb-buffer-deserialize-text-unicode.hh | 9 ++++++++- + src/hb-buffer-deserialize-text-unicode.rl | 9 ++++++++- + src/test-buffer-serialize.cc | 2 +- + 5 files changed, 33 insertions(+), 5 deletions(-) + +commit 57ff696430bf28072aa9b532250ea556f04d40e2 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 25 14:09:22 2023 -0700 + + [deserialize] One more fix + + src/hb-buffer-deserialize-text-unicode.hh | 128 +++++++++++++++++------------- + src/hb-buffer-deserialize-text-unicode.rl | 4 +- + 2 files changed, 77 insertions(+), 55 deletions(-) + +commit e973050986b298458ef95c77356b2cdfdbb0c227 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 25 14:07:01 2023 -0700 + + [hb-buffer-deserialize] Fixups + + src/hb-buffer-deserialize-text-glyphs.hh | 689 +++++++++++++++++------------- + src/hb-buffer-deserialize-text-glyphs.rl | 20 +- + src/hb-buffer-deserialize-text-unicode.hh | 27 +- + src/hb-buffer-deserialize-text-unicode.rl | 19 +- + src/hb-buffer-serialize.cc | 6 +- + src/test-buffer-serialize.cc | 27 +- + 6 files changed, 480 insertions(+), 308 deletions(-) + +commit a1101f09ca896610cdb9361e3f924da74e9d043d +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 25 13:10:57 2023 -0700 + + [test-buffer-serialize] Handle too-small out buffer + + Need to handle too-small in buffer still. + + src/test-buffer-serialize.cc | 20 +++++++++++--------- + 1 file changed, 11 insertions(+), 9 deletions(-) + +commit 39d50008f85d087c4ccb09b4954416c39c29cf1a +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 25 12:53:50 2023 -0700 + + [hb-info] Format + + util/hb-info.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 4e2267b729e6f97f4697d5332d8f6b6e601cb516 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 25 12:51:53 2023 -0700 + + [hb-info] Add --get-meta + + util/hb-info.cc | 22 ++++++++++++++++++++++ + 1 file changed, 22 insertions(+) + +commit 42ed6abb6a9ee832025d29c96e77e5fcc10cc2fd +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 25 12:47:16 2023 -0700 + + [hb-info] Add --list-meta + + util/hb-info.cc | 37 +++++++++++++++++++++++++++++++++++++ + 1 file changed, 37 insertions(+) + +commit 2fec4f1c3db4e3ab6f3cc6a7a6bff81b756614f2 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 25 12:09:12 2023 -0700 + + [subset] Finish out hb-subset-instancer-solver.cc + + src/hb-subset-instancer-solver.cc | 100 +++++++++++++++++++++++++++++++------- + 1 file changed, 83 insertions(+), 17 deletions(-) + +commit 90a98dd62a3b8e9eb416b6777f36951c7f5a56a4 +Author: Qunxin Liu <qxliu@google.com> +Date: Wed Jan 25 10:06:23 2023 -0800 + + [instancer] fix potential memory leak for compiled glyph bytes + + Also calculate max_offsets after glyph bytes are compiled, cause byte + length of a glyph might change after compile + + src/OT/glyf/SubsetGlyph.hh | 10 +----- + src/OT/glyf/glyf.hh | 81 ++++++++++++++++++++++++++++------------------ + 2 files changed, 51 insertions(+), 40 deletions(-) + +commit 223abd72b9f48c951ce1e99d89328edbcff43515 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 25 11:36:47 2023 -0700 + + [subset] Add unfinished port of fonttools instancer solver + + src/Makefile.sources | 1 + + src/harfbuzz-subset.cc | 1 + + src/hb-subset-instancer-solver.cc | 405 ++++++++++++++++++++++++++++++++++++++ + src/meson.build | 1 + + 4 files changed, 408 insertions(+) + +commit 167443e9fc4f25b661ba7f17e7ea39691839297a +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 25 10:32:01 2023 -0700 + + [hb-info] Respect HB_CHAFA=0 + + util/hb-info.cc | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +commit 87df84c386d2c03e8df75507b680b02044ee8cdd +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 25 10:20:48 2023 -0700 + + [hb-info] Fix copyright header + + util/hb-info.cc | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +commit 0bbc9d5256b3ba0f350b0d5136d2253113723c8b +Author: Andres Salomon <dilinger@queued.net> +Date: Wed Jan 25 00:44:38 2023 -0500 + + [fonts] move OFL-1.1 license to a higher directory + + There's a bunch of font directories inside of test/ for which the vast + majority of fonts are licensed under the SIL open font license. We currently + have a COPYING file in test/shape/data/in-house/COPYING that says that most + of the fonts are OFL-1.1, but that doesn't apply to the fonts in, say, + test/api/fonts/ or test/fuzzing/fonts/. Since there are so many OFL-1.1 + fonts all over test, let's move the COPYING file to the top-level test/ + directory. + + test/{shape/data/in-house => }/COPYING | 0 + test/Makefile.am | 2 +- + test/shape/data/in-house/Makefile.am | 1 - + 3 files changed, 1 insertion(+), 2 deletions(-) + +commit 44a9c4bf596ce5da51ab3844de6a685aa5e9e211 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 25 09:58:29 2023 -0700 + + [COPYING] Update + + COPYING | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +commit c622c6b883f514982888a8a40be8223f672c21da +Author: Andres Salomon <dilinger@queued.net> +Date: Tue Jan 24 23:52:10 2023 -0500 + + [font] update the license url for TestGVAREight.ttf + + The url in the exif data incorrectly links to a proprietary license. However, + permission was granted for distribution under Apache-2 as part of another project, + so link to that project's license instead. + + fixes #4062 + + test/api/fonts/TestGVAREight.ttf | Bin 4692 -> 4680 bytes + .../data/text-rendering-tests/fonts/TestGVAREight.ttf | Bin 4692 -> 4680 bytes + 2 files changed, 0 insertions(+), 0 deletions(-) + +commit eb0a025e491a6e2c600836b0a440cd782048b025 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Tue Jan 24 20:40:32 2023 -0500 + + Add a test for glyph names + + This verifies that hb_font_get_glyph_name + returns false for nonexisting glyphs. + + test/api/Makefile.am | 1 + + test/api/meson.build | 1 + + test/api/test-glyph-names.c | 112 ++++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 114 insertions(+) + +commit 1b143b0f0c1f0fbd1675f077d03c997a6b72b613 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jan 24 18:34:04 2023 -0700 + + [font] Docs + + src/hb-font.cc | 3 +++ + 1 file changed, 3 insertions(+) + +commit 64ed03c9be0ddb0cba2674e22e8f377090ec5124 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jan 24 18:30:49 2023 -0700 + + [cff1] Return no name for out-of-range glyph IDs + + Was returning .notdef before. + + src/hb-ot-cff1-table.hh | 1 + + 1 file changed, 1 insertion(+) + +commit c89aebc40b2c29ad6bcae8e5fff7189f70b35d55 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Tue Jan 24 20:24:27 2023 -0500 + + hb-font: Document length limit for glyph names + + This is useful information for users of the + hb_font_get_glyph_name() API. + + src/hb-font.cc | 3 +++ + 1 file changed, 3 insertions(+) + +commit dd64266ea444baa4507ce29d88f63d81132d9577 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Tue Jan 24 19:26:20 2023 -0500 + + Add a test for glyph extents + + This verifies a recent fix for COLRv1 returning + 0,0,-1,1 for extents of non-painting glyphs. + + test/api/Makefile.am | 1 + + test/api/fonts/adwaita.ttf | Bin 0 -> 1332 bytes + test/api/meson.build | 1 + + test/api/test-extents.c | 104 +++++++++++++++++++++++++++++++++++++++++++++ + 4 files changed, 106 insertions(+) + +commit 73e6f6cc88f6656e6061067fbd4170073c068975 +Author: Qunxin Liu <qxliu@google.com> +Date: Tue Jan 24 16:14:11 2023 -0800 + + [instancer] enable the missing test + + test/subset/data/Makefile.am | 1 + + test/subset/data/Makefile.sources | 1 + + test/subset/meson.build | 1 + + 3 files changed, 3 insertions(+) + +commit 27f72f0deb12ac99868da28d77c8b60f37d8d893 +Author: Qunxin Liu <qxliu@google.com> +Date: Tue Jan 24 16:08:32 2023 -0800 + + [instancer] avoid double free for compiled glyph bytes + + also increase the HB_GLYF_MAX_POINTS limit to 20000 cause the test file has a + .notdef glyph which is a composite glyph and has 10176 points after + get_points() call + + src/OT/glyf/glyf.hh | 4 +++- + src/hb-limits.hh | 2 +- + test/subset/data/Makefile.am | 1 + + test/subset/data/Makefile.sources | 1 + + ...line.retain-all-codepoint.wght=100,ELGR=1,ELSH=2.ttf | Bin 0 -> 2696 bytes + test/subset/data/fonts/Handjet.ttf | Bin 0 -> 58944 bytes + test/subset/data/tests/instance_no_double_free.tests | 11 +++++++++++ + test/subset/meson.build | 1 + + 8 files changed, 18 insertions(+), 2 deletions(-) + +commit ac969fffa287dc67d3e3c78cbb28a34b48bafa05 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Tue Jan 24 19:06:15 2023 -0500 + + Update meson summary + + Include builtin font callbacks and Cairo integration + in the configuration summary. + + meson.build | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +commit 192361cb4dd6fa522a6871c6cbb11151bbc8e1b1 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jan 24 17:05:38 2023 -0700 + + [hb-info] Show color swatch only if printing to terminal + + util/hb-info.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 817ec182eb8bcd78de06947602e189aa09308660 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jan 24 17:02:08 2023 -0700 + + [hb-info] Format + + util/hb-info.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 66ddeb0737df78a73c91f5cd32239ca2cfa435c9 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jan 24 17:01:01 2023 -0700 + + [hb-info] Change Chafa repeat to 16 + + util/hb-info.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 7a29ded1691ba0f3bfcac74045f0c14c6e53b138 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jan 24 16:59:44 2023 -0700 + + [hb-info] Render colors in --list-palette + + Uses chafa if available + + util/hb-info.cc | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++++++- + util/meson.build | 2 +- + 2 files changed, 91 insertions(+), 2 deletions(-) + +commit b684c6edd4b024f0c3b7d237dd0c9a1308c28c4b +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 23 15:44:22 2023 -0700 + + [hb-cairo] Add hb_cairo_context_t + + src/hb-cairo-utils.cc | 16 +++++++++---- + src/hb-cairo-utils.hh | 15 ++++++++---- + src/hb-cairo.cc | 63 ++++++++++++++++++++++++++++++--------------------- + 3 files changed, 60 insertions(+), 34 deletions(-) + +commit 279f13c1870148c0b649d8c435b58d4edf2bade2 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jan 24 11:50:59 2023 -0700 + + [hb-shape] Write trace output to stderr + + util/shape-output.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 161d8f9d26ff2725a9965b2b36d2f6045373973d +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jan 24 11:48:10 2023 -0700 + + [util] Rename a variable + + util/shape-options.hh | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +commit 68a790261c75e35466952b231e4d2b9f3979cc6e +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jan 24 11:44:32 2023 -0700 + + [util] If --glyphs doesn't have positions, use glyph advances + + Such that eg --glyphs=10 works. + + util/shape-options.hh | 23 +++++++++++++++++++++-- + 1 file changed, 21 insertions(+), 2 deletions(-) + +commit 91a174f151f20ede983eb879fc62631f83919098 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jan 24 11:27:35 2023 -0700 + + [hb-view] Hide --annotate and make it alias for --show-extents + + util/helper-cairo.hh | 2 +- + util/view-cairo.hh | 13 ++++--------- + util/view-options.hh | 10 ++-------- + 3 files changed, 7 insertions(+), 18 deletions(-) + +commit 8cfb0ed07289dc8982003e53277f064b65a7a1eb +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jan 24 11:24:31 2023 -0700 + + [hb-view] --annotate enables --show-extents + + util/view-options.hh | 6 ++++++ + 1 file changed, 6 insertions(+) + +commit 20fcf5c5b8c2c068dc4956b3100d4d9b150c2a41 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jan 24 11:22:55 2023 -0700 + + [hb-view] Add --show-extents + + util/view-cairo.hh | 25 ++++++++++++++++++++++++- + util/view-options.hh | 2 ++ + 2 files changed, 26 insertions(+), 1 deletion(-) + +commit 72e13fff6537febcd4dd316954b52a2a0d3cf1a0 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jan 24 11:05:38 2023 -0700 + + [COLRv1] Handle void extents + + src/OT/Color/COLR/COLR.hh | 18 ++++++++++++++---- + 1 file changed, 14 insertions(+), 4 deletions(-) + +commit 20318feddf71e5d275bb48ebee12829f2e113f70 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jan 24 11:04:10 2023 -0700 + + [COLRv1] Don't return extents if glyph has no paint + + Fixes https://github.com/harfbuzz/harfbuzz/issues/4068 + + src/OT/Color/COLR/COLR.hh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 32afdcdb46dbb9e54272a142f4d6fa742ca724f4 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 23 21:10:11 2023 -0700 + + [hb-buffer-deserialize-text-unicode] Relax parsing + + src/hb-buffer-deserialize-text-unicode.hh | 88 ++++++++++++++++++------------- + src/hb-buffer-deserialize-text-unicode.rl | 2 +- + 2 files changed, 53 insertions(+), 37 deletions(-) + +commit 328ee9b4ad2fcdb5f78db0dfb6a9c168b1c9b918 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 23 21:06:27 2023 -0700 + + [hb-buffer-deserialize-text-unicodes] Rename + + src/Makefile.sources | 4 +- + ...es.hh => hb-buffer-deserialize-text-unicode.hh} | 78 +++++++++++----------- + ...es.rl => hb-buffer-deserialize-text-unicode.rl} | 18 ++--- + src/hb-buffer-serialize.cc | 8 +-- + src/meson.build | 4 +- + 5 files changed, 56 insertions(+), 56 deletions(-) + +commit bc596b8ccae15502f641cc88ddf5fa52e3c6473d +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 23 21:03:59 2023 -0700 + + [buffer-deserialize-text-unicode] Simplify + + src/hb-buffer-deserialize-text-unicodes.hh | 21 ++++++++++----------- + src/hb-buffer-deserialize-text-unicodes.rl | 3 +-- + 2 files changed, 11 insertions(+), 13 deletions(-) + +commit 649973a316ef4616b26210a553727a3cdd33ed98 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 23 21:02:14 2023 -0700 + + Fix build + + src/hb-buffer-deserialize-text-glyphs.hh | 570 ++++++++++++++++++++ + src/hb-buffer-deserialize-text-unicodes.hh | 275 ++++++++++ + src/hb-buffer-deserialize-text.hh | 801 ----------------------------- + 3 files changed, 845 insertions(+), 801 deletions(-) + +commit f798cf225ec4dab7fa4683224e26f3df08c59189 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 23 20:57:30 2023 -0700 + + [util] Don't require final ']' in --glyphs + + util/shape-options.hh | 17 ++++++++++++++++- + 1 file changed, 16 insertions(+), 1 deletion(-) + +commit 4268283e5463f72cc93a8c66f6b0537b991017a1 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 23 20:53:17 2023 -0700 + + [buffer-deserialize-text] Accept initial comma + + src/hb-buffer-deserialize-json.hh | 10 ++++------ + src/hb-buffer-deserialize-json.rl | 2 -- + src/hb-buffer-deserialize-text-glyphs.rl | 4 +++- + src/hb-buffer-deserialize-text-unicodes.rl | 4 +++- + 4 files changed, 10 insertions(+), 10 deletions(-) + +commit 2c29b81e7f36cf56e92f5b5eb406cc46e6394178 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 23 20:49:19 2023 -0700 + + [buffer-deserialize-text] Separate glyphs / unicodes machines + + src/Makefile.sources | 6 +- + ...ext.rl => hb-buffer-deserialize-text-glyphs.rl} | 31 ++---- + src/hb-buffer-deserialize-text-unicodes.rl | 108 +++++++++++++++++++++ + src/hb-buffer-serialize.cc | 15 +-- + src/meson.build | 6 +- + 5 files changed, 130 insertions(+), 36 deletions(-) + +commit d0355eb4bd778adae86d9e0e3c17ceea29a115bd +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 23 20:37:53 2023 -0700 + + [buffer-deserialize] Parse whole items at a time + + Previous logic would fail if char buffer was partial. + + src/hb-buffer-deserialize-json.hh | 362 +++++++++++------------ + src/hb-buffer-deserialize-json.rl | 2 +- + src/hb-buffer-deserialize-text.hh | 586 +++++++++++++++----------------------- + src/hb-buffer-deserialize-text.rl | 6 +- + 4 files changed, 420 insertions(+), 536 deletions(-) + +commit f65b04c17c45587f4500c8af52418b4f0ca39886 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Mon Jan 23 21:57:05 2023 -0500 + + Tweak wording + + src/hb-paint.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit 7e01976bcc573a1cdd40649be3e2d8d68ca0af01 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Mon Jan 23 20:44:22 2023 -0500 + + [hb-paint] Add some details to the docs + + src/hb-paint.h | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +commit e4fff64ce31902674a5b8c667c6a7b61e5429381 +Author: Garret Rieger <grieger@google.com> +Date: Tue Jan 24 00:52:26 2023 +0000 + + [repacker] check duplicate() for success. + + Fixes fuzzer testcase https://oss-fuzz.com/testcase-detail/5475787333828608. + + src/graph/graph.hh | 9 ++++++++- + ...tcase-minimized-hb-repacker-fuzzer-5475787333828608 | Bin 0 -> 127193 bytes + 2 files changed, 8 insertions(+), 1 deletion(-) + +commit 6b72a4ddb05c7226d58d0f156db13153dec4a0e8 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 23 18:36:04 2023 -0700 + + Revert "[sanitize] Simplify(?) check_range" + + This reverts commit af0b1ef8a72d4f6b778dbba3606ebe7df39d5288. + + src/hb-sanitize.hh | 16 +++++++++++++--- + 1 file changed, 13 insertions(+), 3 deletions(-) + +commit 00cf322e237eaf81086130e989b8bf88402b959e +Merge: af0b1ef8a 699485b34 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 23 16:06:26 2023 -0700 + + Merge pull request #4046 from harfbuzz/hb-features-docs + + [doc] Try to fix generating hb-features docs + +commit 699485b349030b1b8fdbb742758718b88bee1212 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Tue Jan 24 00:07:45 2023 +0200 + + [meson] Further simplify generating hb-features.h + + src/meson.build | 38 +++++++++++++++++--------------------- + 1 file changed, 17 insertions(+), 21 deletions(-) + +commit 2486d6d22fcbdeb2ec89bb33265665e60dc8461a +Author: Khaled Hosny <khaled@aliftype.com> +Date: Mon Jan 23 23:57:16 2023 +0200 + + [meson] Reduce repetitions + + src/meson.build | 46 +++++++++++++++++++++------------------------- + 1 file changed, 21 insertions(+), 25 deletions(-) + +commit 12f2ecbddb65328a6e3312921ccb6946a76a665e +Author: Khaled Hosny <khaled@aliftype.com> +Date: Mon Jan 23 23:41:11 2023 +0200 + + [doc] Generate hb-supported-features.h + + See inline comment. + + docs/meson.build | 1 + + src/meson.build | 19 +++++++++++++++++++ + 2 files changed, 20 insertions(+) + +commit 0bbd3360eeb00fbbb9544524a330e405450f44e5 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Thu Jan 19 20:11:35 2023 +0200 + + [doc] Try to fix generating hb-features docs + + Move it to a separate section, since hb-common says include hb.h, while + we want to include hb-features.h here. + + This still does not fix generating documentation of undefined macros + (e.g. HB_HAS_GDI since we build docs on Linux). + + docs/harfbuzz-docs.xml | 1 + + docs/harfbuzz-sections.txt | 24 ++++++++++++++---------- + src/hb-features.h.in | 8 ++++++++ + 3 files changed, 23 insertions(+), 10 deletions(-) + +commit af0b1ef8a72d4f6b778dbba3606ebe7df39d5288 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 23 14:31:10 2023 -0700 + + [sanitize] Simplify(?) check_range + + src/hb-sanitize.hh | 16 +++------------- + 1 file changed, 3 insertions(+), 13 deletions(-) + +commit fe94c760e1cc9a5f3824c48accd4d1cfd86ebcb0 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 23 14:05:28 2023 -0700 + + [algs] Build fix for clang and __builtin_mul_overflow + + Fixes https://github.com/harfbuzz/harfbuzz/issues/4066 + + src/hb-algs.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 1cf61f3053e2c0a5c4df3623ac08f68834ccf7b4 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Mon Jan 23 13:43:35 2023 +0200 + + [meson] Fix build with -Dgobject=disabled + + src/meson.build | 14 ++++++++------ + util/meson.build | 2 +- + 2 files changed, 9 insertions(+), 7 deletions(-) + +commit 2b87af808bb55c0635b16ecc39331b2e6ab7ae6b +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 22 17:37:51 2023 -0700 + + [hb-info] Typo + + util/hb-info.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit fe22afe7f9ba4440ddb19dc2b262358555374f07 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 22 16:47:50 2023 -0700 + + [hb-info] Simplify + + util/hb-info.cc | 129 ++++++++++++++++++++++++++------------------------------ + 1 file changed, 59 insertions(+), 70 deletions(-) + +commit eba5762919ab02f5dd9b2b9dd319d106ddaf9de9 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Mon Jan 23 01:10:56 2023 +0200 + + Another try + + util/meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 37ab12a372a74c25b34cae909ac89c79aef8c376 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Mon Jan 23 01:02:51 2023 +0200 + + [util] Try to fix hb-info build + + util/meson.build | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 5880ab06030dd7e3f77711319480cd908ca19195 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 22 16:20:23 2023 -0700 + + [hb-info] More build fix try + + util/Makefile.am | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +commit d76ef46d0a25ee8d0093afde3424dc9589bcc6d9 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 22 16:17:39 2023 -0700 + + Try to fix autotools build + + util/Makefile.am | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +commit 6e58598520069ab144f0705c6960fc3109858b5d +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 22 15:22:30 2023 -0700 + + [hb-info] Subfamily + + util/hb-info.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 4142a460af34cdbca705b5a2309dda03dcd2deb3 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 22 15:11:50 2023 -0700 + + [hb-info] Add --list-baselines + + util/hb-info.cc | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 67 insertions(+), 1 deletion(-) + +commit 9c62022dedfecf5bc423ff142a8181d6b829595b +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 22 15:02:21 2023 -0700 + + [hb-info] Format + + util/hb-info.cc | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +commit 0b7d3952bade88c066fbdde78f461613c89a1eea +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 22 15:00:10 2023 -0700 + + [hb-info] Add --list-style + + util/hb-info.cc | 29 ++++++++++++++++++++++++++++- + 1 file changed, 28 insertions(+), 1 deletion(-) + +commit 090a6d0dde90bc1ee393e70f7064e13f8fea86fe +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 22 14:56:25 2023 -0700 + + [hb-info] Add --get-style + + util/hb-info.cc | 17 +++++++++++++++++ + 1 file changed, 17 insertions(+) + +commit 5b291d49e80f4e2b79e91e046f4858a45eb2f0ad +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 22 14:51:17 2023 -0700 + + [hb-info] Rename style to subfamily + + util/hb-info.cc | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +commit c300bf00f0c1297516658917f1e001be8259c569 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 22 14:46:20 2023 -0700 + + [hb-info] Move include around + + util/hb-info.cc | 4 ++++ + util/options.hh | 3 --- + 2 files changed, 4 insertions(+), 3 deletions(-) + +commit b839f53cdecee5b0c7fed1bd543753ece9e10e86 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 22 14:39:26 2023 -0700 + + [hb-info] Write fallback metrics in --list-metrics + + util/hb-info.cc | 21 +++++++++++++++++++-- + 1 file changed, 19 insertions(+), 2 deletions(-) + +commit 7ba3d0c419b61ddb07b9f38fb5fa0bb36ecb4fd6 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 22 14:27:31 2023 -0700 + + [hb-info] Add --list-metrics + + Requires hb-gobject + + util/hb-info.cc | 39 ++++++++++++++++++++++++++++++++++++++- + 1 file changed, 38 insertions(+), 1 deletion(-) + +commit 4ec3d2e32ac0ec805518137ef887805377ee4143 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 22 14:12:44 2023 -0700 + + [hb-info List enum nicks in --list-names + + util/hb-info.cc | 16 ++++++++++++++-- + util/meson.build | 4 ++-- + util/options.hh | 6 ++++++ + 3 files changed, 22 insertions(+), 4 deletions(-) + +commit def94aa8c5575f1bbaa8c3ea07356e78c0af6067 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 22 14:01:34 2023 -0700 + + [features] Add HB_HAS_GOBJECT + + docs/harfbuzz-sections.txt | 1 + + src/Makefile.am | 4 ++++ + src/hb-features.h.in | 7 +++++++ + src/meson.build | 4 ++++ + 4 files changed, 16 insertions(+) + +commit b3006ba9cbc1fdb8cc2a8c7600b0fc0aa975fd2d +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 22 13:46:35 2023 -0700 + + Docs + + docs/harfbuzz-sections.txt | 1 + + src/hb-ot-name.h | 7 +++++++ + 2 files changed, 8 insertions(+) + +commit e3e4d1ecdcd0c07be352e9d19775bbd9a207cbd5 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 22 13:41:43 2023 -0700 + + [name] Add hb_ot_name_id_predefined_t + + Not sure what to do about its docs. + + src/hb-ot-name.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 3feac1a408429c78f1470164976b266d0095d96d +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 22 10:15:14 2023 -0700 + + [hb-info] Use tab in --list-palettes + + util/hb-info.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 752ad51cce0c3e6033ed6de6d8257f46129fac06 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 22 10:07:24 2023 -0700 + + [hb-info] Move some initialization to post_parse + + util/hb-info.cc | 19 ++++++++++++------- + 1 file changed, 12 insertions(+), 7 deletions(-) + +commit 334f59c955088e840004e85cb0c4bd10e4175b41 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 22 10:06:05 2023 -0700 + + [hb-info] If name not found, fall back to English + + util/hb-info.cc | 69 +++++++++++++++++++++++++++++++++++++-------------------- + 1 file changed, 45 insertions(+), 24 deletions(-) + +commit 7cae55359220da8310dc1257b3fd7177359e2235 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 22 09:33:25 2023 -0700 + + [hb-info] Rename --dump-table to --get-table + + util/hb-info.cc | 30 +++++++++++++----------------- + 1 file changed, 13 insertions(+), 17 deletions(-) + +commit 9b499a48bbcb7a1bc8b95e5c23df2eae29549e02 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 22 09:27:05 2023 -0700 + + [hb-info] Add --get-name + + util/hb-info.cc | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +commit 7a47a369d3a15716fa4d9c5ccd5681c72a155a99 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 22 09:09:45 2023 -0700 + + [hmtx] Fix typo + + src/hb-ot-hmtx-table.hh | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit b9879181254b94a38f9a478d8fcae7daed0dd6c6 +Merge: e4cdaa1d3 89d332559 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 22 09:08:51 2023 -0700 + + Merge pull request #4052 from googlefonts/instancer_recalc_bounds + + [instancer] recalc bounds by default when --instance option is enabled + +commit e4cdaa1d3f7aa9725ba1d2beed4096287a8d59ce +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 22 08:36:51 2023 -0700 + + [test] Fix build + + test/shape/data/in-house/Makefile.sources | 1 - + test/shape/data/in-house/meson.build | 1 - + 2 files changed, 2 deletions(-) + +commit 9ba1e400d6831d5cd08f104b460f05346234a1d7 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 22 08:31:39 2023 -0700 + + [test] Remove non-free font and its test + + Fixes https://github.com/harfbuzz/harfbuzz/issues/4059 + + .../fonts/641ca9d7808b01cafa9a666c13811c9b56eb9c52.ttf | Bin 11492 -> 0 bytes + test/shape/data/in-house/tests/arabic-mark-attach.tests | 1 - + 2 files changed, 1 deletion(-) + +commit 749df4ee8449107b39d76df353785a6f96b1cfa0 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Jan 21 16:00:54 2023 -0700 + + [PairPosFormat1] One more + + src/OT/Layout/GPOS/PairPosFormat1.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit b648ceb72f281e739ec8bd73cbc243624854238d +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Jan 21 15:58:59 2023 -0700 + + [PairSet] Optimize last commit + + src/OT/Layout/GPOS/PairSet.hh | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +commit 891623243c167217fcbd9480b111b110cc004c9c +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Jan 21 15:57:18 2023 -0700 + + [PairSet] Unify get_size() + + src/OT/Layout/GPOS/PairPosFormat1.hh | 4 +--- + src/OT/Layout/GPOS/PairSet.hh | 24 ++++++++++++------------ + 2 files changed, 13 insertions(+), 15 deletions(-) + +commit b63159e8bf579345a6f56d04ad1b2c28eee66bac +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Jan 21 15:50:48 2023 -0700 + + [PairPosFormat1] Fix stride + + Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=55287 + and generally the lookup with MediumTypes. + + src/OT/Layout/GPOS/PairPosFormat1.hh | 4 ++-- + src/OT/Layout/GPOS/PairPosFormat2.hh | 2 +- + src/OT/Layout/GPOS/PairSet.hh | 13 ++++++------- + src/OT/Layout/GPOS/ValueFormat.hh | 2 +- + ...z-testcase-minimized-hb-shape-fuzzer-5965759719538688 | Bin 0 -> 1154 bytes + 5 files changed, 10 insertions(+), 11 deletions(-) + +commit be8a87c453473b4ac0d1895f89fdf4e50bcf5e52 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Jan 21 15:00:41 2023 -0700 + + Move TRACE_DISPATCH after may_recurse() + + Such that we don't get memory access issues if DEBUG_SANITIZE is + on and may_recurse() returns false. + + src/OT/Color/COLR/COLR.hh | 4 ++-- + src/OT/Layout/GPOS/CursivePos.hh | 2 +- + src/OT/Layout/GPOS/MarkBasePos.hh | 2 +- + src/OT/Layout/GPOS/MarkLigPos.hh | 2 +- + src/OT/Layout/GPOS/MarkMarkPos.hh | 2 +- + src/OT/Layout/GPOS/PairPos.hh | 2 +- + src/OT/Layout/GPOS/SinglePos.hh | 2 +- + src/OT/Layout/GSUB/AlternateSubst.hh | 2 +- + src/OT/Layout/GSUB/LigatureSubst.hh | 2 +- + src/OT/Layout/GSUB/MultipleSubst.hh | 2 +- + src/OT/Layout/GSUB/ReverseChainSingleSubst.hh | 2 +- + src/OT/Layout/GSUB/SingleSubst.hh | 2 +- + src/hb-ot-layout-common.hh | 2 +- + src/hb-ot-layout-gdef-table.hh | 2 +- + src/hb-ot-layout-gsubgpos.hh | 8 ++++---- + src/hb-ot-stat-table.hh | 2 +- + 16 files changed, 20 insertions(+), 20 deletions(-) + +commit 84b9a632ed6d9cf0a5eb00722c6409025cb839a6 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Jan 21 14:36:26 2023 -0700 + + [debug] Fix printf signness warnings + + src/hb-debug.hh | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +commit c54a7022feeb42aa89c0e9aeb80fd3c959d02c97 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Jan 21 14:07:41 2023 -0700 + + [hb-view] Require cairo 1.17.5 for HB_DRAW=1 default again + + Fixes https://github.com/harfbuzz/harfbuzz/issues/4051 + + util/helper-cairo.hh | 12 ++++-------- + 1 file changed, 4 insertions(+), 8 deletions(-) + +commit 67e652cd5d875f2c78ee97885039c180cacab39d +Author: Khaled Hosny <khaled@aliftype.com> +Date: Sat Jan 21 15:57:13 2023 +0200 + + [meson] Update Cairo subproject + + meson.build | 1 + + subprojects/cairo.wrap | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) + +commit ed68db2c010a14c0613becd1685586836d4099aa +Author: Khaled Hosny <khaled@aliftype.com> +Date: Sat Jan 21 03:54:57 2023 +0200 + + [util] Fix MSVC warning + + Apparently \e is non-standard extension not supported by MSVC. Use \033 + instead. + + Fixes: + + warning C4129: 'e': unrecognized character escape sequence + + util/ansi-print.hh | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +commit c08e5d094a3bd7e6c3b9d6475a30aa8883429a89 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Sat Jan 21 03:40:09 2023 +0200 + + [hb-draw] Fix MSVC warning + + warning C4305: 'initializing': truncation from 'double' to 'float' + + src/hb-cairo-utils.cc | 4 ++-- + test/api/test-paint.c | 6 +++--- + 2 files changed, 5 insertions(+), 5 deletions(-) + +commit e1a0705128c2e6fd068374c47c13220ede9ee5a2 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Sat Jan 21 03:16:20 2023 +0200 + + [meson] Enabled needlessly disabled MSVC warnings + + We don’t seem to hot any of these warnings currently. + + meson.build | 3 --- + 1 file changed, 3 deletions(-) + +commit f96e32a0aad4092f3f551ed390f3e3b884a8e4fe +Author: Khaled Hosny <khaled@aliftype.com> +Date: Sat Jan 21 00:39:00 2023 +0200 + + [meson] Try to make MSVC build less spammy + + Enable exceptions in ragel subproject, and revert the exceptions part of: + + commit 22cbd038d3578c344e265a098fc98ef168f8d18b + Author: Khaled Hosny <khaled@aliftype.com> + Date: Tue Sep 14 12:34:25 2021 +0200 + + [meson] Add ragel subproject + + To get ride of the following warnings: + + cl : Command line warning D9025 : overriding '/EHs' with '/EHs-' + + meson.build | 5 ++--- + subprojects/packagefiles/ragel/meson.build | 10 +++++++++- + 2 files changed, 11 insertions(+), 4 deletions(-) + +commit 32f9b467d6265498dc4d8023bc4b6dc947896576 +Merge: 179c93c5c 7f59bed52 +Author: Matthias Clasen <matthias.clasen@gmail.com> +Date: Sat Jan 21 02:20:39 2023 -0500 + + Merge pull request #4045 from harfbuzz/custom-palette-cairo + + Custom palette cairo + +commit 179c93c5c21dc7dda7840d2bfc1ef27bcebdad71 +Merge: 54d5321d1 c574eda74 +Author: Matthias Clasen <matthias.clasen@gmail.com> +Date: Sat Jan 21 02:20:00 2023 -0500 + + Merge pull request #4054 from harfbuzz/hb-info-color-format + + [hb-info] Fix output for CPAL + +commit 54d5321d136ebd4be799d8c3dcf4e433b1c3778f +Merge: fcb5111cc 47baa1da6 +Author: Matthias Clasen <matthias.clasen@gmail.com> +Date: Sat Jan 21 02:19:43 2023 -0500 + + Merge pull request #4056 from harfbuzz/fix-sweep-gradient-hang + + [hb-cairo] Fixes for sweep gradients + +commit 47baa1da6bbf386d7be73ca4a79d2c819ca2a3c9 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Fri Jan 20 23:38:22 2023 -0500 + + [hb-cairo] Fixes for sweep gradients + + Make reversed angles not infloop, and + cap the number of interval repetitions + at 1000. + + Fixes: https://github.com/harfbuzz/harfbuzz/issues/4055 + + src/hb-cairo-utils.cc | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit c574eda74b027b514665c978d32cef0aa284bee5 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Fri Jan 20 22:06:47 2023 -0500 + + [hb-info] Fix output for CPAL + + The output for palette names was mangled. + This commit makes things come out ok. + + For flags, we use "Both" when both LIGHT + and DARK are set. + + util/hb-info.cc | 19 +++++++++++++------ + 1 file changed, 13 insertions(+), 6 deletions(-) + +commit 7f59bed528e75e5336ace1d9cdbee20932e3e211 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 20 16:42:55 2023 -0700 + + [hb-cairo] Round foreground color + + src/hb-cairo.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 76b059cadb805df3df860be6a130ab5480cb8846 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 20 16:41:47 2023 -0700 + + [hb-cairo] Simplify foreground color fetching + + src/hb-cairo.cc | 7 ++----- + 1 file changed, 2 insertions(+), 5 deletions(-) + +commit f70f7194de5f24625d12d40cf639a7a0e7ef48b9 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 20 16:30:59 2023 -0700 + + [hb-cairo] Remove unused prototype + + src/hb-cairo.cc | 6 ------ + 1 file changed, 6 deletions(-) + +commit 61719a835089ea2c2cda36702f630c9343b029c7 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 20 15:52:09 2023 -0700 + + [hb-view] Support specifying color indices again + + src/hb-number.cc | 1 - + util/helper-cairo.hh | 16 ++++++++++++++-- + 2 files changed, 14 insertions(+), 3 deletions(-) + +commit 89d332559ee4d5349315b35e64b34c27116ba441 +Author: Qunxin Liu <qxliu@google.com> +Date: Fri Jan 20 14:15:19 2023 -0800 + + [instancer] add tests + + ...fault.retain-all-codepoint.wght=150,wdth=80.ttf | Bin 114200 -> 114200 bytes + ...fault.retain-all-codepoint.wght=300,wdth=90.ttf | Bin 114300 -> 114300 bytes + ...anges.retain-all-codepoint.wght=150,wdth=80.ttf | Bin 114200 -> 114200 bytes + ...anges.retain-all-codepoint.wght=300,wdth=90.ttf | Bin 114300 -> 114300 bytes + .../MPLUS1-Variable.default.30DD.wght=100.ttf | Bin 1460 -> 1460 bytes + .../MPLUS1-Variable.default.30DD.wght=400.ttf | Bin 1712 -> 1712 bytes + ...fault.retain-all-codepoint.wght=200,wdth=90.ttf | Bin 6760 -> 6760 bytes + ...fault.retain-all-codepoint.wght=650,wdth=85.ttf | Bin 6712 -> 6712 bytes + ...fault.retain-all-codepoint.wght=200,wdth=90.ttf | Bin 6440 -> 6440 bytes + ...fault.retain-all-codepoint.wght=650,wdth=85.ttf | Bin 6392 -> 6392 bytes + ...etain-all-codepoint.wght=150,wdth=80,CTGR=0.ttf | Bin 1396 -> 1396 bytes + ...etain-all-codepoint.wght=300,wdth=90,CTGR=0.ttf | Bin 1432 -> 1432 bytes + ...lt.retain-all-codepoint.wght=400,wdth=100.0.ttf | Bin 6804 -> 6804 bytes + ...ult.retain-all-codepoint.wght=drop,wdth=100.ttf | Bin 6804 -> 6804 bytes + test/subset/generate-expected-outputs.py | 3 ++- + 15 files changed, 2 insertions(+), 1 deletion(-) + +commit 30058f489a43c39b7bd9278c1e04baf1952bba48 +Author: Qunxin Liu <qxliu@google.com> +Date: Wed Jan 18 15:23:24 2023 -0800 + + [instancer] trim .notdef outline data after recalc bounds + + If outline data present, we use it to recalc bounds and then trim it + accordingly + + src/OT/glyf/Glyph.hh | 4 ++++ + src/OT/glyf/glyf.hh | 2 +- + 2 files changed, 5 insertions(+), 1 deletion(-) + +commit 0de7f83a9fe2054ad2d63c3f8e08dc61e1397c62 +Author: Qunxin Liu <qxliu@google.com> +Date: Wed Jan 18 13:33:34 2023 -0800 + + [instancer] update maxp table + + src/hb-ot-maxp-table.hh | 13 +++++++++++++ + src/hb-subset.cc | 1 + + 2 files changed, 14 insertions(+) + +commit 94c390d07835727c201bfdbe0b4d208dc3fe3fc2 +Author: Qunxin Liu <qxliu@google.com> +Date: Wed Jan 18 10:15:47 2023 -0800 + + [instancer] update head table + + src/OT/glyf/glyf-helpers.hh | 7 +++++++ + src/hb-ot-head-table.hh | 2 ++ + src/hb-subset.cc | 2 +- + 3 files changed, 10 insertions(+), 1 deletion(-) + +commit 2ecb1c31e90657a5a264f4b84907bad6f07673c1 +Author: Qunxin Liu <qxliu@google.com> +Date: Wed Jan 18 09:52:00 2023 -0800 + + [instancer] always recalculate bounds when --instance option enabled + + But don't recompile glyph bytes if pinned at default + + src/OT/glyf/Glyph.hh | 48 ++++++++++++++++++++++++++---------------------- + src/OT/glyf/glyf.hh | 5 +++-- + 2 files changed, 29 insertions(+), 24 deletions(-) + +commit 1f948e7fd55ff6a65aa3a6b038284db3d211493e +Author: Qunxin Liu <qxliu@google.com> +Date: Tue Jan 17 15:16:17 2023 -0800 + + [instancer] store recalculated head/maxp info in subset plan + + src/OT/glyf/Glyph.hh | 50 ++++++++++++++++++++++++++++++++++++++++++++------ + src/OT/glyf/glyf.hh | 2 +- + src/hb-subset-plan.hh | 27 +++++++++++++++++++++++++++ + 3 files changed, 72 insertions(+), 7 deletions(-) + +commit 92122421c951f6f126eff902f917b403bdf027a5 +Author: Qunxin Liu <qxliu@google.com> +Date: Fri Jan 13 11:42:58 2023 -0800 + + [instancer] update vhea/hhea tables + + src/OT/glyf/Glyph.hh | 11 +++++++++-- + src/hb-ot-hmtx-table.hh | 43 +++++++++++++++++++++++++++++++++++++------ + src/hb-subset-plan.hh | 4 ++++ + 3 files changed, 50 insertions(+), 8 deletions(-) + +commit ab7c91442536086f0baebe2d419827bb9e4cce06 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 20 15:43:01 2023 -0700 + + [hb-cairo] Macro shuffle again + + src/hb-cairo.cc | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +commit 4759932bcfb5af5f576868cc96dfe2755361fe9d +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 20 15:33:38 2023 -0700 + + [hb-cairo] Round colors + + src/hb-cairo.cc | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +commit 876675e090e2b55fdb5f3e8b187022184145b2f3 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 20 15:31:43 2023 -0700 + + [hb-cairo] Macro shuffling + + src/hb-cairo.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 68a73e436a37851465b1b8b59e3b7a2c552d28f2 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 20 15:30:07 2023 -0700 + + [hb-cairo] Macro hygiene + + src/hb-cairo.cc | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +commit fcb5111cc6db8e310d62e27d93980a0f67ee936a +Author: Khaled Hosny <khaled@aliftype.com> +Date: Sat Jan 21 00:24:50 2023 +0200 + + [doc] Fix gtk-doc warning + + src/hb-cairo.cc | 6 +++--- + src/hb-face.cc | 2 +- + 2 files changed, 4 insertions(+), 4 deletions(-) + +commit 574d9344dccdd7c79a02070dac48bf825c8095de +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 20 15:22:50 2023 -0700 + + [hb-cairo] Fix build with old cairo + + src/hb-cairo.cc | 2 ++ + 1 file changed, 2 insertions(+) + +commit 4f19c3b3be07b75235684b969677725fe50494f3 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 20 15:15:52 2023 -0700 + + [hb-cairo] Move color-cache to scaled-font + + src/hb-cairo.cc | 13 +++++++++++-- + 1 file changed, 11 insertions(+), 2 deletions(-) + +commit beba43eebe235dac402a66ffd58fa29a9689fe15 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 20 15:02:24 2023 -0700 + + [hb-cairo] Fix color cache on not-found + + src/hb-cairo.cc | 2 ++ + 1 file changed, 2 insertions(+) + +commit cc9b55c79469b93583f21f8a45cd3cb0759aa789 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 20 14:57:57 2023 -0700 + + [hb-cairo] Add a color cache + + src/hb-cairo.cc | 24 ++++++++++++++++++++++++ + 1 file changed, 24 insertions(+) + +commit 10def9b3df1241eec912b94ba82d43cd8f93caa4 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 20 14:06:18 2023 -0700 + + meson fix + + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit eb00088bcfea640d2d1d591d08cdcdd01d5acf91 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 20 13:55:13 2023 -0700 + + [paint] Docs + + docs/harfbuzz-sections.txt | 2 -- + src/hb-paint.cc | 3 ++- + src/hb-paint.h | 4 +++- + 3 files changed, 5 insertions(+), 4 deletions(-) + +commit f21b15dcc318aa62d256443be3ccec7953a64242 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 20 13:38:22 2023 -0700 + + [hb-view] Update to alternative cairo custom-palette API + + meson.build | 1 + + src/hb-cairo.cc | 5 +++-- + util/helper-cairo.hh | 2 +- + 3 files changed, 5 insertions(+), 3 deletions(-) + +commit 638e0ed4fdd06a6215f2d7c74786b6436074d564 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 20 13:01:22 2023 -0700 + + [paint] Overlay custom-palette on top of chosen palette + + Got to agree this is more ergonomic. + + src/OT/Color/COLR/COLR.hh | 4 +--- + src/hb-cairo.cc | 8 +++++--- + src/hb-font.cc | 3 +-- + src/hb-ft-colr.hh | 7 +++---- + src/hb-paint.cc | 12 +++++++----- + src/hb-paint.h | 25 ++++++++----------------- + src/hb-paint.hh | 6 ++++-- + util/helper-cairo.hh | 10 ++++------ + 8 files changed, 33 insertions(+), 42 deletions(-) + +commit 03e2e586423ada331ae433db7dea705a8b6ad3fe +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 20 11:24:35 2023 -0700 + + [hb-view] Improve color parsing + + Now supports 3, 4, 6, 8 digit colors. + + util/helper-cairo.hh | 13 +++++++------ + util/options.hh | 40 ++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 47 insertions(+), 6 deletions(-) + +commit dc4af478d14ca5d0270e317a87d60dfba111381d +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 20 11:11:02 2023 -0700 + + [hb-view] Default background to white when parsing + + util/helper-cairo.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit b81db8d3d82af7a369a2b26ec35dcec81060a965 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Thu Jan 19 08:19:04 2023 -0500 + + Avoid a compiler warning + + src/hb-cairo.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit e998cec1d94f32ac44ff0dca42941b28a4fdd546 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 18 23:33:21 2023 -0700 + + [hb-view] Move palette options to --help-view + + util/font-options.hh | 5 ----- + util/helper-cairo.hh | 9 +++++---- + util/view-cairo.hh | 3 ++- + util/view-options.hh | 5 +++++ + 4 files changed, 12 insertions(+), 10 deletions(-) + +commit 253b4cecae0729330ec04fab93972db86ee1b203 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 18 23:28:25 2023 -0700 + + [hb-view] Simplify palette format + + util/font-options.hh | 2 +- + util/helper-cairo.hh | 6 +++--- + 2 files changed, 4 insertions(+), 4 deletions(-) + +commit 52b78d526b522f95897bfcb4d9652ea328fbdb6a +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 18 23:06:08 2023 -0700 + + [hb-view] Fix leak + + util/helper-cairo.hh | 1 + + 1 file changed, 1 insertion(+) + +commit 5847ec24ff65d7f7c59d105b2cca86ac235ac7eb +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 18 22:37:54 2023 -0700 + + Fix bots + + util/helper-cairo.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 4fe6ece425c19e8fd63e346179de5bd14415d732 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 18 22:33:56 2023 -0700 + + [cairo] Don't fallback to CPAL if cairo doesn't support custom palette + + src/hb-cairo.cc | 11 +---------- + 1 file changed, 1 insertion(+), 10 deletions(-) + +commit 0bff5704912fb99789ca7e09d3fafb640c2ccfed +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 18 22:33:32 2023 -0700 + + [hb-view] Use custom palette if any set + + util/helper-cairo.hh | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +commit c41892a01229404d4d0c31b8056fd7b72ac3a58a +Author: Matthias Clasen <mclasen@redhat.com> +Date: Wed Jan 18 23:45:53 2023 -0500 + + hb-view: Add a --custom-palette option + + util/font-options.hh | 3 +++ + util/helper-cairo.hh | 12 ++++++++++++ + 2 files changed, 15 insertions(+) + +commit ab37ade7e46ac00152113c275dd8cd7fc9d1a11c +Author: Matthias Clasen <mclasen@redhat.com> +Date: Wed Jan 18 23:29:37 2023 -0500 + + Hook up custom palettes for cairo + + src/hb-cairo.cc | 36 ++++++++++++++++++++++++++++++++++++ + 1 file changed, 36 insertions(+) + +commit cce7c441eb0bd097f63016aa7e5962aa6615951b +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 20 13:57:05 2023 -0700 + + [name] Fix doc + + That's part of an enum now. + + docs/harfbuzz-sections.txt | 1 - + 1 file changed, 1 deletion(-) + +commit 3711455154373d0400bad77221cb02a785882623 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 20 12:32:41 2023 -0700 + + [hb-info] Minor set parse hooks + + Unused. + + util/hb-info.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 89371419a91f88ae503dbbb99fb9ebbb5c1239ab +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 20 12:20:38 2023 -0700 + + [hb-info] Move code around + + util/hb-info.cc | 28 ++++++++++++++-------------- + 1 file changed, 14 insertions(+), 14 deletions(-) + +commit 32b42eb5687bf0bc4fd27545e19753066620af60 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 20 12:18:04 2023 -0700 + + [hb-info] Add --show-face-count + + util/hb-info.cc | 16 +++++++++++++++- + 1 file changed, 15 insertions(+), 1 deletion(-) + +commit fd84605b5898e6cb9738c4d821e2893edd0a2cf6 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 20 12:10:03 2023 -0700 + + [hb-info] Add --show-technology + + util/hb-info.cc | 44 ++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 44 insertions(+) + +commit c05230256d52e8c62135e8133cd2a6b75296e54a +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 20 12:08:31 2023 -0700 + + [util] Add -y for --face-index + + Ala ttx. + + util/face-options.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 6bf9237e5f467073021483cd06251955ef28c84f +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 20 11:54:08 2023 -0700 + + [hb-info] Format --list-palettes + + util/hb-info.cc | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +commit 64625ed85d27102fcd4b499e007b88229c4b0221 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 20 11:48:01 2023 -0700 + + [hb-info] Write palette flags + + util/hb-info.cc | 13 +++++++++++-- + 1 file changed, 11 insertions(+), 2 deletions(-) + +commit d811dcdbde935cd8ec897d84332a572b76e772a3 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 20 11:42:51 2023 -0700 + + [hb-info] Add --list-palettes + + util/hb-info.cc | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 58 insertions(+), 1 deletion(-) + +commit 2590578162692e24afe4a333f9c6b1c9423d6937 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 20 11:04:22 2023 -0700 + + [hb-info] Add --get-baseline + + util/hb-info.cc | 50 +++++++++++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 49 insertions(+), 1 deletion(-) + +commit b77baa31c36d4b8375ebb3fe97a7bbe36b71b463 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 20 10:13:21 2023 -0700 + + [hb-info] Show whether --get-metric value is fallback + + util/hb-info.cc | 26 +++++++++++++++++++------- + 1 file changed, 19 insertions(+), 7 deletions(-) + +commit 2a8df82aca15df45c5abfd6d8e18e294a8d6dadf +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 20 09:57:28 2023 -0700 + + [hb-info] Add --get-metric + + util/hb-info.cc | 31 ++++++++++++++++++++++++++----- + 1 file changed, 26 insertions(+), 5 deletions(-) + +commit ba4f5e9f220b7e33c5ea0438c824a99f433f41d9 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 20 09:29:39 2023 -0700 + + [hb-info] Add --ot-script and --ot-language + + util/hb-info.cc | 46 ++++++++++++++++++++++++++++++++++++++++------ + 1 file changed, 40 insertions(+), 6 deletions(-) + +commit edec8946ed376c2888f9444b038b80dad57c162e +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 20 09:28:59 2023 -0700 + + New API: hb_ot_layout_script_select_language2() + + Variant that outputs chosen_language. + + Not sure why the original API didn't have this. The script + counterpart has. + + docs/harfbuzz-sections.txt | 1 + + src/hb-ot-layout.cc | 66 +++++++++++++++++++++++++++++++++++++++------- + src/hb-ot-layout.h | 9 +++++++ + 3 files changed, 66 insertions(+), 10 deletions(-) + +commit 2fd8e36ea5891f462f4bff8b6657c4421943a4f8 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 20 09:09:14 2023 -0700 + + [layout] Fix return value of chosen_script when matching fails + + src/hb-ot-layout.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit d06976e68fd475eb12fcec538b207354ddcffd92 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 20 08:21:43 2023 -0700 + + [glyf] Add an edge-count limit + + Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=55246 + + src/OT/glyf/Glyph.hh | 13 ++++++++++--- + src/hb-limits.hh | 4 ++++ + 2 files changed, 14 insertions(+), 3 deletions(-) + +commit 2cfd4133fb7e42237fbe47f09e448285fdbd1975 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 20 07:11:16 2023 -0700 + + [hb-info] Print Zyyy for DFLT script + + util/hb-info.cc | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +commit 178c5bed39c66595ca4198c2e377fd5bee719351 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Fri Jan 20 00:42:29 2023 +0200 + + [ci] Use unique ccache cache keys per job + + .github/workflows/linux-ci.yml | 2 ++ + .github/workflows/macos-ci.yml | 2 ++ + 2 files changed, 4 insertions(+) + +commit a0afde70c53a6e7b64dbbc932236a8d9b124b9e6 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Thu Jan 19 22:55:11 2023 +0200 + + [ci] Re-enable coverage reporting on macOS + + .github/workflows/macos-ci.yml | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +commit 8785d515d073679fa15db97ed01f2f6525ae6566 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Thu Jan 19 22:43:16 2023 +0200 + + [ci] Don’t install glib-utils on macOS + + Homebrew can’t make up their mind, they seem to have merged the glib + packages again. + + .github/workflows/macos-ci.yml | 1 - + 1 file changed, 1 deletion(-) + +commit 5ddb5fb847c741201bca382780e4cde9d627f2bb +Author: Khaled Hosny <khaled@aliftype.com> +Date: Thu Jan 19 22:41:49 2023 +0200 + + [ci] Don’t install gtk-doc on macOS + + We are not building the documentation here. + + .github/workflows/macos-ci.yml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 48df846a413a3734a18bfe13e661e41a1bafed88 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Thu Jan 19 22:38:36 2023 +0200 + + [ci] Make homebrew do less work + + .github/workflows/macos-ci.yml | 1 + + 1 file changed, 1 insertion(+) + +commit 35f0184bfd260f08eab869a7911453c8e612a122 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Tue Jan 17 20:48:11 2023 +0200 + + [ci] Clean a bit and add some consistency + + .github/workflows/linux-ci.yml | 70 ++++++++++++++++++++----------------- + .github/workflows/macos-ci.yml | 39 ++++++++++++++++----- + .github/workflows/msvc-ci.yml | 64 +++++++++++++++++----------------- + .github/workflows/msys2-ci.yml | 79 +++++++++++++++++++++--------------------- + 4 files changed, 141 insertions(+), 111 deletions(-) + +commit edd5a37e791569ed1df9291d95e6c8ee0839987e +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 19 18:39:32 2023 -0700 + + [hb-info] Implement script/language-sensitive --list-features + + I'm not very confident in the implementation. + + util/hb-info.cc | 106 +++++++++++++++++++++++++++++++++++++++++++++++++++----- + 1 file changed, 97 insertions(+), 9 deletions(-) + +commit a67b6aad925e31aace8d81647ce341e448af22b5 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 19 18:07:05 2023 -0700 + + [hb-info] Format + + util/hb-info.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 4927e215a4065045d64786fd0cf74be38656b708 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 19 18:03:31 2023 -0700 + + [hb-info] Format + + util/hb-info.cc | 18 +++++++++++++----- + 1 file changed, 13 insertions(+), 5 deletions(-) + +commit 9ca320d69ee99025977d76a4228bc4e786ade6e9 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 19 17:54:46 2023 -0700 + + [hb-info] Format + + util/hb-info.cc | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +commit b24c7add808bae277bd2b3246d7efdb72f7387ad +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 19 17:53:07 2023 -0700 + + [hb-info] Write ISO/BCP script/language in --scripts + + util/hb-info.cc | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +commit b8dacd46f5558b4d6313392a536309ddd49bfbeb +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 19 17:46:24 2023 -0700 + + [hb-info] Format + + util/hb-info.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit b9a2917c2ea4b81bcbf7510c054369a8edbc170b +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 19 17:34:10 2023 -0700 + + [hb-info] Simplify direction/script/language handling + + util/hb-info.cc | 30 ++++++++++-------------------- + 1 file changed, 10 insertions(+), 20 deletions(-) + +commit e6544148b590c2d846eee608b39501de6826a9a0 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 19 17:28:41 2023 -0700 + + [hb-info] Enlarge name buffer + + util/hb-info.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit d759918d181b1e8b53ae618dc476506a49b913e1 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 19 17:26:00 2023 -0700 + + [hb-info] TODO + + util/hb-info.cc | 2 ++ + 1 file changed, 2 insertions(+) + +commit 4baf0ada694602f63a6fd34bafc5a75f74872ad4 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 19 17:24:05 2023 -0700 + + [hb-info] Add --direction, --script, --language + + util/hb-info.cc | 46 +++++++++++++++++++++++++++++++++++++++------- + 1 file changed, 39 insertions(+), 7 deletions(-) + +commit 66692c82e925b2ca8d9e6fc567b1f0abbc32d331 +Merge: f43ba351e e52a23c5f +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 19 16:26:15 2023 -0700 + + Merge pull request #4048 from harfbuzz/hb-info + + hb-info + +commit e52a23c5f8d25441bf164b4e63b28aae8082acfb +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 19 16:01:29 2023 -0700 + + [hb-info] Add --show-extents + + util/hb-info.cc | 29 +++++++++++++++++++++++++---- + 1 file changed, 25 insertions(+), 4 deletions(-) + +commit 1302a88b25f38dfb0cf463ed0cbb3bb21811f590 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 19 15:51:46 2023 -0700 + + [hb-info] Add --dump-table + + util/hb-info.cc | 17 +++++++++++++++++ + 1 file changed, 17 insertions(+) + +commit 148ee3e0c73dd9c00988ad46b01fcd18ef5f5cc4 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 19 15:41:13 2023 -0700 + + [hb-info] Make --show-style and --show-postscript-name show named-instance + + util/hb-info.cc | 23 +++++++++++++++++++++-- + 1 file changed, 21 insertions(+), 2 deletions(-) + +commit 2a3903b37fbfdf49e56ba6a343f98b4f60a0196e +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 19 15:34:14 2023 -0700 + + [hb-info] TODO items + + util/hb-info.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 5540367ee2e0be55b782bb6ff33df48613c4d904 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 19 15:30:27 2023 -0700 + + [hb-info] Add --show-version + + util/hb-info.cc | 5 +++++ + 1 file changed, 5 insertions(+) + +commit 3c734f4479068c0b9a6a768ff55d9ecd0d73d6f7 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 19 15:27:13 2023 -0700 + + [hb-info] Add --show-postscript-name + + util/hb-info.cc | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +commit 895d3f9e3e146e0f185000962f0897c1fc693dac +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 19 15:24:32 2023 -0700 + + [hb-info] Mark --show-all as default + + util/hb-info.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit dec320a4630a1d71f94d6e81ea95b5c855dfe01a +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 19 15:18:06 2023 -0700 + + [hb-info] Put back -l for --list-tables + + util/hb-info.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 9395bbaa6710ad3b7c8415340d068c467cc31f8f +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 19 15:17:33 2023 -0700 + + [hb-info] Format + + util/hb-info.cc | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +commit d7cf69ede2fe9ad7f1eb9559a4f8638b11c550f2 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 19 15:15:56 2023 -0700 + + [hb-info] Format + + util/hb-info.cc | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +commit 7af0624bdf9d2c8d712eacb5dd46787deeb5cfd6 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 19 15:11:55 2023 -0700 + + [hb-info] Remove unintended short option + + util/hb-info.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 21151401219a4f6b4a907f14b783bc61d397136f +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 19 15:10:00 2023 -0700 + + [hb-info] Add --show-unique-name and --show-full-name + + util/hb-info.cc | 22 ++++++++++++---------- + 1 file changed, 12 insertions(+), 10 deletions(-) + +commit 2d9ba17a535d2c466dce1f09064dfba73a92e387 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 19 15:06:21 2023 -0700 + + [hb-info] Add --show-style + + util/hb-info.cc | 9 +++++++++ + 1 file changed, 9 insertions(+) + +commit fecb2eeca0120e4cf9d06f3164e38d4daa983bd0 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 19 15:05:00 2023 -0700 + + [hb-info] Add --show-family + + util/hb-info.cc | 27 +++++++++++++++++++++++++++ + 1 file changed, 27 insertions(+) + +commit f25c03162b2b6132199712bdd165faee0075b2f6 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 19 14:57:45 2023 -0700 + + [hb-info] Change separator to === + + util/hb-info.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 5b05edd221d85b9d6c83dfc2d8e0aa32781b8b1f +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 19 14:57:30 2023 -0700 + + [hb-info] Add --list-names + + util/hb-info.cc | 31 ++++++++++++++++++++++++++++++- + 1 file changed, 30 insertions(+), 1 deletion(-) + +commit 67c9845301a317dae5a33ba0de003ec060427ee4 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 19 14:45:04 2023 -0700 + + [hb-info] Make -l list tables ala ttx + + util/hb-info.cc | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit 972e3b76da8330faec20883f978c40d701908d98 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 19 14:42:18 2023 -0700 + + [hb-info] Minor formatting + + util/hb-info.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit c1679e02662d1589dfcdc8802a8ae7889807405b +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 19 14:41:13 2023 -0700 + + [hb-info] Default to --show-all + + util/hb-info.cc | 4 ++++ + 1 file changed, 4 insertions(+) + +commit 1eca2c88a29c2a29c6f7687c79f567598ecae869 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 19 14:38:12 2023 -0700 + + [hb-info] Add a few short option forms + + util/hb-info.cc | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit e5a07c883c90ad8c0108c967f664e7468b4ca14a +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 19 14:34:32 2023 -0700 + + [hb-info] --help format + + util/hb-info.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit b215f6a84f38725a628248ea25cbb88e57f2c464 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 19 14:31:45 2023 -0700 + + [hb-info] Add --show-unicode-count + + util/hb-info.cc | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) + +commit 3189b614b1d3ac3343c17b1b67acadb8d4f4e6e1 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 19 14:24:26 2023 -0700 + + [hb-info] Format + + util/hb-info.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit fd20a7e143e2e2dfa4c13ab255570200510cd508 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 19 14:23:36 2023 -0700 + + [hb-info] Add --show-glyph-count + + util/hb-info.cc | 22 ++++++++++++++++++---- + 1 file changed, 18 insertions(+), 4 deletions(-) + +commit 38c71cebd070ee0e1e25836ab1fb485bebfd066e +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 19 14:19:05 2023 -0700 + + [hb-info] Add --show-upem --show-all --all + + util/hb-info.cc | 38 +++++++++++++++++++++++++++++++++++++- + 1 file changed, 37 insertions(+), 1 deletion(-) + +commit aee7454d05256b206a4aa5892d9ca6211c7d3189 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 19 14:09:45 2023 -0700 + + [hb-info] Add --list-scripts + + util/hb-info.cc | 31 +++++++++++++++++++++++++++---- + 1 file changed, 27 insertions(+), 4 deletions(-) + +commit 9ca2f86fe0807c7abf8e967130734be76a25f52d +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 19 14:04:37 2023 -0700 + + [hb-info] Minor verbose print + + util/hb-info.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 9a94c06052e6dd6e752aaac7ce5924f205b73072 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 19 13:56:36 2023 -0700 + + [hb-info] Minor we have face available + + util/hb-info.cc | 4 ---- + 1 file changed, 4 deletions(-) + +commit 8921f593f953947760ab97bd844b20b0c9edc1be +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 19 13:49:22 2023 -0700 + + [hb-info] Print "---" separator + + util/hb-info.cc | 38 +++++++++++++++++++++++++++----------- + 1 file changed, 27 insertions(+), 11 deletions(-) + +commit f514f697246bd9a19429c5e42038532b48bbab4f +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 19 13:35:15 2023 -0700 + + [hb-info] Add --quiet + + util/hb-info.cc | 60 +++++++++++++++++++++++++++++++++++++++++++++++++-------- + 1 file changed, 52 insertions(+), 8 deletions(-) + +commit dc717ced8d378aa455a3ca749b8b932bf2b53b97 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 19 13:16:34 2023 -0700 + + [hb-info] Simplify + + util/hb-info.cc | 42 ++++++++++++++++++++++++++---------------- + 1 file changed, 26 insertions(+), 16 deletions(-) + +commit 1816d3664d52b94547a6f0882173a8d5d7f93d19 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 19 12:59:26 2023 -0700 + + [hb-info] Flesh out + + util/face-options.hh | 29 ----- + util/font-options.hh | 281 --------------------------------------------- + util/hb-info.cc | 318 ++++++++++++++++++++++++++++++++++++++++++++++++++- + 3 files changed, 316 insertions(+), 312 deletions(-) + +commit ca903f7531f71a81c06a4e9fc4f7166af3f04968 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 19 12:40:27 2023 -0700 + + [hb-info] Start adding + + util/Makefile.am | 3 ++ + util/Makefile.sources | 8 ++++ + util/hb-info.cc | 108 ++++++++++++++++++++++++++++++++++++++++++++++++++ + util/meson.build | 13 ++++++ + 4 files changed, 132 insertions(+) + +commit f43ba351e87e6abc084c4c67ab0cdb093689d415 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 19 12:17:30 2023 -0700 + + [util] Limit chafa to one thread + + util/helper-cairo-ansi.hh | 2 ++ + 1 file changed, 2 insertions(+) + +commit 2b010d8017c18375d16e897eee22a092f65d80c4 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 19 12:14:50 2023 -0700 + + [util] Minor hide --font-ptem sometimes + + util/font-options.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 06c064a351bca485cc7d1245b57835b413459e32 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 19 11:17:49 2023 -0700 + + [util] Use hb_font_glyph_to_string + + util/font-options.hh | 15 ++++++--------- + 1 file changed, 6 insertions(+), 9 deletions(-) + +commit 0c7d386748e7cf0bfb09598f82b84b8927d78190 +Merge: ea291493d 0b32cf902 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 18 21:50:10 2023 -0700 + + Merge pull request #4044 from harfbuzz/custom-palette + + Custom palette + +commit 0b32cf902322a38b067ef7748380d91430dd4151 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 18 21:16:38 2023 -0700 + + [COLR] Rename a variable + + src/OT/Color/COLR/COLR.hh | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +commit 1d58c8fb0ec78ee92e3274e9cb07d56c1f5b342f +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 18 21:14:24 2023 -0700 + + [paint] Typo + + src/hb-paint.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 7aca3b509039b3a522cfd03e3aaaca9fe7017dba +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 18 20:49:06 2023 -0700 + + [COLRv1] Hook up custom palette colors + + src/OT/Color/COLR/COLR.hh | 12 +++++++++--- + src/hb-ft-colr.hh | 50 +++++++++++++++++++++++++++++++++++------------ + 2 files changed, 46 insertions(+), 16 deletions(-) + +commit d695cc87353f59f1647351e2194d513b42ae55ce +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 18 20:45:19 2023 -0700 + + [paint] Docs + + docs/harfbuzz-sections.txt | 5 +++++ + 1 file changed, 5 insertions(+) + +commit 53bd9039e77d822d2d258dc5b056509cb758ad24 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 18 20:44:05 2023 -0700 + + [paint] Doc + + src/hb-font.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 8afd3ccb106196c230741417d8364722df7f6e32 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 18 20:43:10 2023 -0700 + + [paint] Add HB_PAINT_PALETTE_INDEX_CUSTOM + + src/hb-font.cc | 3 ++- + src/hb-paint.h | 12 ++++++++++++ + 2 files changed, 14 insertions(+), 1 deletion(-) + +commit 9a2f2b593eca24fc5e4a412d7ab2d776d28953e1 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 18 20:39:36 2023 -0700 + + [font] Rename palette to palette_index + + src/hb-font.cc | 8 ++++---- + src/hb-font.h | 6 +++--- + 2 files changed, 7 insertions(+), 7 deletions(-) + +commit bd733146168bce4cb0ea6dd6dc314d5366d85f0a +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 18 20:37:21 2023 -0700 + + [paint] Add API for custom palettes + + src/hb-paint.cc | 23 +++++++++++++++++++++++ + src/hb-paint.h | 39 +++++++++++++++++++++++++++++++++++++++ + src/hb-paint.hh | 6 ++++++ + 3 files changed, 68 insertions(+) + +commit ea291493d2d52480accfb2402946b19ef00ce74b +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 18 19:51:22 2023 -0700 + + [hb-shape/view] List variation sequences in --list-unicodes + + util/font-options.hh | 36 ++++++++++++++++++++++++++++++++---- + 1 file changed, 32 insertions(+), 4 deletions(-) + +commit 8564d2266bc7988b6744e20bfb188d9328ef56e8 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 18 19:43:33 2023 -0700 + + [hb-shape/view] Add --list-glyphs + + util/font-options.hh | 28 +++++++++++++++++++++++++++- + 1 file changed, 27 insertions(+), 1 deletion(-) + +commit bf8bb9fb83575e99484f953d078fe0328d3dc344 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 18 19:39:30 2023 -0700 + + [hb-shape/view] Add --list-unicodes + + util/font-options.hh | 37 +++++++++++++++++++++++++++++++++++++ + 1 file changed, 37 insertions(+) + +commit 13c70066de00b46a0c30a32daa9e10647fd2e531 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 18 17:29:26 2023 -0700 + + Shut up gcc 13 -Wdangling-reference + + Fixes https://github.com/harfbuzz/harfbuzz/issues/4043 + + src/hb.hh | 1 + + 1 file changed, 1 insertion(+) + +commit 1abcc32137be9cce13bd8dc63b11a2759e5f8679 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Wed Jan 18 18:22:00 2023 +0200 + + Revert "[ci] Use sccache with msys2" + + This reverts commit b9646dfd6290dbf7819cc042bb6f541b80ef8b68. + + For some reason using sccache re-introduces the random CI crashes that + was previously fixed in 80dd751564e8a9153f7466e687b8699a5e7e27c6. + + .github/workflows/msys2-ci.yml | 6 ------ + 1 file changed, 6 deletions(-) + +commit eed5d5efdd37bfbf06f52b67a5dd9d170576d2ee +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 18 14:13:12 2023 -0700 + + [VarComposite] Implement RESET_UNSPECIFIED_AXES + + Fixes https://github.com/harfbuzz/boring-expansion-spec/issues/79 + + src/OT/glyf/Glyph.hh | 6 +++++- + src/OT/glyf/VarCompositeGlyph.hh | 2 ++ + 2 files changed, 7 insertions(+), 1 deletion(-) + +commit 4300a18b852f67ad2b45fb9c1c04474c9f234eb2 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 18 10:44:13 2023 -0700 + + [arabic-fallback] Fix ligature code + + Fixes https://github.com/harfbuzz/harfbuzz/issues/4042 + + This was broken in 20e9f0b. + + src/hb-ot-shaper-arabic-fallback.hh | 14 ++++++++++---- + 1 file changed, 10 insertions(+), 4 deletions(-) + +commit b9646dfd6290dbf7819cc042bb6f541b80ef8b68 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Tue Jan 17 20:46:33 2023 +0200 + + [ci] Use sccache with msys2 + + .github/workflows/msys2-ci.yml | 6 ++++++ + 1 file changed, 6 insertions(+) + +commit 22a4fca375e54c5b3fabb56559ef2400cc5807a3 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Tue Jan 17 18:10:36 2023 +0200 + + [ci] Use sccache for msvc jobs + + Meson will not use ccache with MSVC, so we use sccache here. + + .github/workflows/msvc-ci.yml | 5 +++++ + 1 file changed, 5 insertions(+) + +commit 582636bce035e655392d82c400a2953ccb815a2c +Author: Khaled Hosny <khaled@aliftype.com> +Date: Tue Jan 17 18:09:41 2023 +0200 + + [ci] Use ccache for linux and macos jobs + + .github/workflows/linux-ci.yml | 5 ++++- + .github/workflows/macos-ci.yml | 6 +++++- + 2 files changed, 9 insertions(+), 2 deletions(-) + +commit 99146e76090787fd3e2f39289556da9bcf911e60 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Tue Jan 17 17:20:19 2023 +0200 + + [ci] We don’t need to install ragel on msys2 + + .github/workflows/msys2-ci.yml | 1 - + 1 file changed, 1 deletion(-) + +commit 842e26d32ca42ed7715eb3f1018be6fd86f3d036 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Tue Jan 17 17:02:56 2023 +0200 + + [ci] Remove no longer needed workaround + + Meson seems to take care of this itself now. + + .github/workflows/msvc-ci.yml | 3 --- + 1 file changed, 3 deletions(-) + +commit 4d86c65c7ab544fe614c1c8f49d6154ea7b1ee04 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jan 17 07:34:45 2023 -0700 + + [hb-cairo] Fix linear-gradient reduce_anchors + + src/hb-cairo-utils.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 910adc7e9263fb6f8456e282c5d5b62faa0bc923 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Tue Jan 17 14:23:46 2023 +0200 + + [test-paint] Update expectations + + test/api/results/bad-154 | 622 ++++++++++++++++++++++++-------------------- + test/api/results/test-154 | 28 +- + test/api/results/testvf-154 | 28 +- + 3 files changed, 375 insertions(+), 303 deletions(-) + +commit 4f4b6e03f43e651bc18d8c9b724d779855e62e03 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Tue Jan 17 14:08:58 2023 +0200 + + [wrap] Add fallback source URL for zlib + + Hopefully this fixes the intermittent CI failures due to download + failures. + + subprojects/zlib.wrap | 1 + + 1 file changed, 1 insertion(+) + +commit c86bab3fb4d2a52d6970d1fffd00e1b112b0b3c9 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jan 17 06:29:17 2023 -0700 + + [test-paint] Use G_GNUC_PRINTF + + test/api/test-paint.c | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +commit 92d5ec2f1618c3b899c74216f7f05ea85f815b8e +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jan 17 05:59:19 2023 -0700 + + [bit-page] Mark len() function static + + src/hb-bit-page.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 0a3e4c12ac770f36e52a1934862c1f98429d9b1b +Author: Amir Masoud Abdol <amirmasoudabdol@icloud.com> +Date: Tue Jan 17 09:36:03 2023 +0100 + + Replace the deprecated $<CONFIGURATION> with $<CONFIG> + + CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit f38e35ebc317eaf311a334af40488a607c693194 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 16 18:07:39 2023 -0700 + + [cairo] Internal function renames + + src/hb-cairo-utils.cc | 42 +++++++++++++++++++++--------------------- + src/hb-cairo-utils.hh | 42 +++++++++++++++++++++--------------------- + src/hb-cairo.cc | 10 +++++----- + 3 files changed, 47 insertions(+), 47 deletions(-) + +commit e4a41f5e16b56a7c84055960dcac34e7b5ac94df +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 16 16:27:04 2023 -0700 + + [COLRv1] Implement recursive clip boxes + + Tests need update. + + hb-view test_glyphs-glyf_colr_1_variable.ttf -u f0c00 + + src/OT/Color/COLR/COLR.hh | 31 ++++++++++++++++++++++++------- + src/hb-ft-colr.hh | 24 ++++++++++++++++-------- + 2 files changed, 40 insertions(+), 15 deletions(-) + +commit f02c4ebb409befa41857d4df9465c5944f25e87b +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 16 14:17:16 2023 -0700 + + [test-paint] Adjust condition for enabling ft backend + + test/api/test-paint.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 7dfa672dac958bdbc7703ab0920e167eaa126754 +Author: Sergei Trofimovich <slyich@gmail.com> +Date: Mon Jan 16 19:49:53 2023 +0000 + + test/threads/hb-subset-threads.cc: add missing <cstdio> include + + This week's `gcc-13` snapshot cleaned further up it's standard headers + and exposed missing declaration as a build failure: + + ../test/threads/hb-subset-threads.cc: In function 'void test_operation(operation_t, const char*, const test_input_t&)': + ../test/threads/hb-subset-threads.cc:127:3: error: 'printf' was not declared in this scope + + ../test/threads/hb-subset-threads.cc: In function 'int main(int, char**)': + ../test/threads/hb-subset-threads.cc:157:19: error: 'atoi' was not declared in this scope + + test/threads/hb-subset-threads.cc | 2 ++ + 1 file changed, 2 insertions(+) + +commit f11271cc036ae6ecee5e75a93da13078a6b97d11 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 16 13:14:58 2023 -0700 + + [cairo] Version-check the variations code + + src/hb-cairo.cc | 2 ++ + 1 file changed, 2 insertions(+) + +commit a180ae43ce0ae8bccc45913a6443c0d109ce7ee9 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 16 13:06:30 2023 -0700 + + [bit-set] Use for loop instead of memset for page clear + + Produces faster code. + + src/hb-bit-page.hh | 15 ++++++++++++--- + 1 file changed, 12 insertions(+), 3 deletions(-) + +commit 8e8ca03b2a970f816e024d21ad9ab7dcd4ed76ad +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 16 12:38:53 2023 -0700 + + [hb-fc] Minor remove unused variable + + util/hb-fc.cc | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +commit e903397bc33a202410255b56abdbe05aa4963b78 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 16 12:33:17 2023 -0700 + + Whitespace + + util/ansi-print.hh | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +commit ca1de29e0a85508b9938defd5e7a4b08e3134c7b +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 16 12:08:11 2023 -0700 + + [set] Adjust hb_set_copy() + + src/hb-set.cc | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +commit b7f1c30c2062837932d70bd7fbd5fb69289e4f36 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 16 12:07:15 2023 -0700 + + [map] Adjust hb_map_copy() + + src/hb-map.cc | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +commit e0883d60e4203e9a01e6276c7c56dc5d427c60b6 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 16 12:02:21 2023 -0700 + + Whitespace + + src/hb-paint-extents.hh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 82a3b2dbb5fa65c2dba8f2ec81796f45e4ffe9a1 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 16 11:18:22 2023 -0700 + + [util] Fix --named-instance + + util/font-options.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit ad6b9c417d240b82ed4e03f6cd9a1b4bec993064 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 16 11:07:03 2023 -0700 + + [util] Format --list-features + + util/font-options.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 0f4da85074a0de1c0221d8af1d100eba4e78e3b9 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 16 11:04:38 2023 -0700 + + [util] Minor in --list-features clear feature set between GSUB/GPOS + + util/font-options.hh | 1 + + 1 file changed, 1 insertion(+) + +commit f25e3696eb315e3bccc24b9d4b89ce22c9f05c5f +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 16 10:54:23 2023 -0700 + + [hb-shape/hb-view] Better --list-features + + util/font-options.hh | 111 +++++++++++++++++++++++++++++++++------------------ + 1 file changed, 72 insertions(+), 39 deletions(-) + +commit 32d439596d8d6157f4b621570f120afea6b3ca38 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 15 22:34:14 2023 -0700 + + [hb-shape/view] Print feature names in --list-features + + util/font-options.hh | 41 ++++++++++++++++++++++++++++++++++++++--- + 1 file changed, 38 insertions(+), 3 deletions(-) + +commit cc6a9bfa6f4eca07b8dec693acfc557cd21c073c +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 15 18:16:19 2023 -0700 + + [hb-shape/view] Print table length in --list-tables + + util/face-options.hh | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +commit 880d65c9056dc029140af0084693189dbab5fb71 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 15 18:14:14 2023 -0700 + + [hb-shape/view] Add --list-tables + + util/face-options.hh | 23 +++++++++++++++++++++++ + 1 file changed, 23 insertions(+) + +commit 3d5a922bcac06a47a589070b49f58b44d0c7ba2d +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 15 16:15:52 2023 -0700 + + Fix really + + util/font-options.hh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 484831be3dd1e113c92370cc5df781432b770ccd +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 15 16:14:53 2023 -0700 + + [util] Fix build + + util/font-options.hh | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +commit 8a6ecc5c89c524bf0a2d985dc39eaf793bfe5a01 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 15 13:54:27 2023 -0700 + + [hb-view/shape] Add --list-features + + util/font-options.hh | 39 +++++++++++++++++++++++++++++++++++++++ + 1 file changed, 39 insertions(+) + +commit 40a8145acc7e90535c0089e393216a5602f7f9e4 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 15 11:30:24 2023 -0700 + + [util] Don't use hb_vector_t + + util/font-options.hh | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +commit d769e8ae7c125cf2ed0686f3c9e99e9525ecbbd4 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 15 10:58:15 2023 -0700 + + [hb-shape/view] Add --named-instance + + src/hb-font.cc | 11 ++++++----- + util/font-options.hh | 3 +++ + 2 files changed, 9 insertions(+), 5 deletions(-) + +commit 99838770abbd810caf63db7957d524537cb34290 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 15 10:54:01 2023 -0700 + + [font] Add hb_font_get_var_named_instance() + + Two new API: + +HB_FONT_NO_VAR_NAMED_INSTANCE + +hb_font_get_var_named_instance + + docs/harfbuzz-sections.txt | 2 ++ + src/hb-font.cc | 28 ++++++++++++++++++++++------ + src/hb-font.h | 15 ++++++++++++++- + 3 files changed, 38 insertions(+), 7 deletions(-) + +commit 40bf30bfeb5cda9a8e147313f7b3a7ba8f671275 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 15 10:45:47 2023 -0700 + + [util] Print named-instance index in --list-variations + + util/font-options.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit d195e077e9ba22c2c54c2efc1677a4ded6ff250b +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 15 10:44:04 2023 -0700 + + [font] Remember named_instance index + + Specially, in hb_font_set_variations() default to the named_instance + for unspecified axes. + + Fixes https://github.com/harfbuzz/harfbuzz/issues/1883 + + src/hb-font.cc | 36 ++++++++++++++++++++---------------- + src/hb-font.hh | 1 + + 2 files changed, 21 insertions(+), 16 deletions(-) + +commit 14a83d6cc7c6da9f82d1d048ad930d9654c3e479 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 15 10:11:54 2023 -0700 + + [hb-shape/view] --list-variations cleanup + + util/font-options.hh | 14 +++++++++----- + 1 file changed, 9 insertions(+), 5 deletions(-) + +commit e1a5448306a555a66cb337a419e275bb5d98d461 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 15 10:00:26 2023 -0700 + + [hb-shape/view] Print named-instances in --list-variations + + Might remove the coordinates. + + util/font-options.hh | 30 +++++++++++++++++++++++++++++- + 1 file changed, 29 insertions(+), 1 deletion(-) + +commit 9abc21072b34b4170fbc73bdec7e6b7dcd70d123 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 15 09:46:19 2023 -0700 + + [hb-shape/view] Add --list-variations + + util/font-options.hh | 46 ++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 46 insertions(+) + +commit d015e9016c4c4028996ba6ea2be11756963d2a2c +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 12 18:50:16 2023 -0700 + + [ms-features] Comment + + src/hb-ms-feature-ranges.hh | 3 +++ + 1 file changed, 3 insertions(+) + +commit ea1ee0d4b6e283b025cf37cee9f8359c8b848ac1 +Author: Garret Rieger <grieger@google.com> +Date: Sat Jan 14 00:23:53 2023 +0000 + + [instance] drop and don't collect lookups from feature variations when fully instancing. + + This previously incorrectly collected lookups that could be reached via feature variations that are dropped and not activated by the current instance position. + + src/hb-ot-layout-gsubgpos.hh | 23 ++++++++++++++++++--- + src/hb-subset-plan.cc | 12 ++++++++++- + .../MPLUS1-Variable.default.30DD.wght=100.ttf | Bin 0 -> 1460 bytes + .../MPLUS1-Variable.default.30DD.wght=400.ttf | Bin 0 -> 1712 bytes + ...iable.default.retain-all-codepoint.wght=400.ttf | Bin 1660624 -> 0 bytes + ...otdef-outline.retain-all-codepoint.wght=400.ttf | Bin 1660668 -> 0 bytes + ...ototype.layout-test-retain-gids.41,42,43,57.otf | Bin 5924 -> 5920 bytes + ...FPrototype.layout-test-retain-gids.41,42,43.otf | Bin 5212 -> 5208 bytes + ...beVFPrototype.layout-test-retain-gids.41,42.otf | Bin 4732 -> 4728 bytes + ...FPrototype.layout-test-retain-gids.41,56,57.otf | Bin 5048 -> 5044 bytes + ...AdobeVFPrototype.layout-test-retain-gids.41.otf | Bin 3996 -> 3992 bytes + ...beVFPrototype.layout-test-retain-gids.42,57.otf | Bin 5040 -> 5036 bytes + .../AdobeVFPrototype.layout-test.41,42,43,57.otf | Bin 5480 -> 5476 bytes + .../AdobeVFPrototype.layout-test.41,42,43.otf | Bin 4952 -> 4948 bytes + .../AdobeVFPrototype.layout-test.41,42.otf | Bin 4468 -> 4464 bytes + .../AdobeVFPrototype.layout-test.41,56,57.otf | Bin 4620 -> 4616 bytes + .../AdobeVFPrototype.layout-test.41.otf | Bin 3768 -> 3764 bytes + .../AdobeVFPrototype.layout-test.42,57.otf | Bin 4600 -> 4596 bytes + .../data/expected/variable/Fraunces.default.61.ttf | Bin 4232 -> 4228 bytes + .../data/tests/instance_feature_variations.tests | 4 ++-- + 20 files changed, 33 insertions(+), 6 deletions(-) + +commit d250148db08f620022092487578f36474f35b127 +Merge: 81b942e36 60a4f2e6f +Author: Matthias Clasen <matthias.clasen@gmail.com> +Date: Thu Jan 12 21:26:24 2023 -0500 + + Merge pull request #4024 from harfbuzz/test-paint-variable + + test-paint: Add variable font tests + +commit 60a4f2e6f5fd8896cd09a1274a4e772c987d695d +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 12 19:12:46 2023 -0700 + + [test-paint] Detect FreeType COLRv1 from struct size + + test/api/test-paint.c | 55 +++++++++++++++++++++++++++++---------------------- + 1 file changed, 31 insertions(+), 24 deletions(-) + +commit b783967242cce70e814fc817c49f08e4ec0599ce +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 12 18:58:07 2023 -0700 + + [test] Minor save glyph_count + + test/api/test-paint.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit cca0ed9bcd91fbdb4611cfba51ebf068d50081ed +Author: Matthias Clasen <mclasen@redhat.com> +Date: Wed Jan 11 06:44:25 2023 -0500 + + test-paint: Add variable font tests + + These needs freetype master to work. + + .../api/fonts/test_glyphs-glyf_colr_1_variable.ttf | Bin 0 -> 70336 bytes + test/api/results/testvf-10 | 22 +++++++++ + test/api/results/testvf-106 | 30 ++++++++++++ + test/api/results/testvf-116 | 26 +++++++++++ + test/api/results/testvf-123 | 47 +++++++++++++++++++ + test/api/results/testvf-154 | 30 ++++++++++++ + test/api/results/testvf-165 | 22 +++++++++ + test/api/results/testvf-175 | 36 +++++++++++++++ + test/api/results/testvf-6 | 21 +++++++++ + test/api/results/testvf-92 | 21 +++++++++ + test/api/test-paint.c | 51 +++++++++++++++++---- + 11 files changed, 296 insertions(+), 10 deletions(-) + +commit 81b942e363f3ca7b156e2a1ba21f74c1f3de8848 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 12 18:42:22 2023 -0700 + + [os2] Comment + + src/hb-ot-os2-table.hh | 3 +++ + 1 file changed, 3 insertions(+) + +commit 9fb9be8d43262f46c8a639d80fa049dcb0e440f0 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 12 18:37:45 2023 -0700 + + [os2] Rewrite a loop + + src/hb-ot-os2-table.hh | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +commit 082e5c5defec424856fdc82c94a388eac1c409c2 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 12 18:37:07 2023 -0700 + + [os2] Minor add a cast + + src/hb-ot-os2-unicode-ranges.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 45fe897e89f348bc16db538d2da7583e5fa4808a +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 12 18:36:16 2023 -0700 + + [os2] Rename a couple of variables + + src/hb-ot-os2-unicode-ranges.hh | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit 2dcbf3bd07ea10bf81548f4407afead2cc1ea2b0 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 12 18:29:16 2023 -0700 + + [os2] Inline a trivial function + + src/hb-ot-os2-table.hh | 16 ++-------------- + 1 file changed, 2 insertions(+), 14 deletions(-) + +commit 075fe33446aa66ee36004f23a309b41e18991d49 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 12 17:14:42 2023 -0700 + + Enable -Wunsafe-loop-optimizations + + I don't get any. + + src/hb.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit ed023f66df642b58e486da855e871c7dbc0a9576 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 12 17:04:24 2023 -0700 + + Enable -Wformat-signedness + + And fix the codebase. + + src/OT/Layout/GPOS/CursivePosFormat1.hh | 4 +-- + src/OT/Layout/GPOS/MarkArray.hh | 4 +-- + src/OT/Layout/GPOS/PairPosFormat2.hh | 6 ++-- + src/OT/Layout/GPOS/PairSet.hh | 6 ++-- + src/OT/Layout/GPOS/SinglePosFormat1.hh | 4 +-- + src/OT/Layout/GPOS/SinglePosFormat2.hh | 4 +-- + src/OT/Layout/GSUB/AlternateSet.hh | 6 ++-- + src/OT/Layout/GSUB/Ligature.hh | 8 ++--- + .../Layout/GSUB/ReverseChainSingleSubstFormat1.hh | 4 +-- + src/OT/Layout/GSUB/Sequence.hh | 12 ++++---- + src/OT/Layout/GSUB/SingleSubstFormat1.hh | 6 ++-- + src/OT/Layout/GSUB/SingleSubstFormat2.hh | 6 ++-- + src/OT/glyf/SubsetGlyph.hh | 2 +- + src/OT/glyf/glyf-helpers.hh | 4 +-- + src/graph/graph.hh | 8 ++--- + src/graph/serialize.hh | 6 ++-- + src/hb-aat-layout-kerx-table.hh | 4 +-- + src/hb-aat-layout-morx-table.hh | 6 ++-- + src/hb-buffer-verify.cc | 4 +-- + src/hb-debug.hh | 2 +- + src/hb-ot-layout-gsubgpos.hh | 2 +- + src/hb-ot-layout.cc | 6 ++-- + src/hb-ot-shaper-arabic.cc | 16 +++++----- + src/hb-ot-shaper-indic-machine.hh | 2 +- + src/hb-ot-shaper-indic-machine.rl | 2 +- + src/hb-ot-shaper-khmer-machine.hh | 2 +- + src/hb-ot-shaper-khmer-machine.rl | 2 +- + src/hb-ot-shaper-myanmar-machine.hh | 2 +- + src/hb-ot-shaper-myanmar-machine.rl | 2 +- + src/hb-ot-shaper-use-machine.hh | 2 +- + src/hb-ot-shaper-use-machine.rl | 2 +- + src/hb-ot-tag.cc | 4 +-- + src/hb-repacker.hh | 4 +-- + src/hb-sanitize.hh | 8 ++--- + src/hb-shape-plan.cc | 6 ++-- + src/hb-subset-plan.hh | 2 +- + src/hb.hh | 2 +- + src/main.cc | 36 +++++++++++----------- + src/test-ot-meta.cc | 4 +-- + src/test-unicode-ranges.cc | 2 +- + src/test.cc | 2 +- + util/font-options.hh | 2 +- + util/shape-format.hh | 2 +- + 43 files changed, 110 insertions(+), 110 deletions(-) + +commit 7b5f0dd3a8b4a126b7952fea1c4c30b8b456083e +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 12 15:05:19 2023 -0700 + + Move hb-ot-name-language-static.hh out of hb-static.cc + + Since hb-static.cc is used by libharfbuzz-cairo as well. + + src/hb-ot-name.cc | 2 ++ + src/hb-static.cc | 1 - + src/hb-subset.cc | 5 +++++ + 3 files changed, 7 insertions(+), 1 deletion(-) + +commit 449f6df7622c2e363841823c92ca5fd4faee9d62 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 12 14:52:00 2023 -0700 + + [mutex] Add constructor/destructor + + Use in one place. + + src/hb-mutex.hh | 3 +++ + src/hb-subset-accelerator.hh | 7 +------ + 2 files changed, 4 insertions(+), 6 deletions(-) + +commit 8e71f7e8eda4ab4c664ee5c073db56f223bf6b20 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 12 14:46:44 2023 -0700 + + [subset-accelerator] Streamline constructor/destructor + + src/hb-subset-accelerator.hh | 52 +++++++++++++++++++++++++++++--------------- + 1 file changed, 34 insertions(+), 18 deletions(-) + +commit c4c646280fd2b6e3141ecc0f45d477c8f2b43bc7 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 12 13:58:46 2023 -0700 + + [unicode] Adjust error message + + src/hb-unicode.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 0d665291358f2648725e605e7deb88cbe4ee0490 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 12 13:14:24 2023 -0700 + + [bit-page] Minor simplify bit-page specification + + src/hb-bit-page.hh | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit 32866a331e49da465812f329d494bb8612dc14db +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 12 13:02:30 2023 -0700 + + [subset-input] Simplify destruction + + src/hb-subset-input.hh | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +commit d5b826fd0910f68dcdc4c6f6e990c7b188a95255 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 12 12:55:47 2023 -0700 + + [subset-input] Fix leak + + src/hb-subset-input.hh | 3 +++ + 1 file changed, 3 insertions(+) + +commit c52810529e8eae366b0d7d94b8077b5e2ab5f06b +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 12 12:53:46 2023 -0700 + + [subset-plan] Move construction to constructor + + src/hb-subset-plan.cc | 157 ++++++++++++++++++++++++++------------------------ + src/hb-subset-plan.hh | 3 + + 2 files changed, 84 insertions(+), 76 deletions(-) + +commit 26d69e059dc2fbf03ae28e52a08c1bd38f7ce2bf +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 12 12:46:44 2023 -0700 + + [subset-input] Move constructor to .cc file + + src/hb-subset-input.cc | 160 +++++++++++++++++++++++++++++++++++++++++++++++++ + src/hb-subset-input.hh | 158 +----------------------------------------------- + 2 files changed, 161 insertions(+), 157 deletions(-) + +commit a916ad9ea9b8cfc1cc34608fd4a3e608a4ef76f0 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 12 12:44:16 2023 -0700 + + [subset-input] Move initialization to constructor + + src/hb-subset-input.cc | 157 ------------------------------------------------ + src/hb-subset-input.hh | 158 ++++++++++++++++++++++++++++++++++++++++++++++++- + 2 files changed, 157 insertions(+), 158 deletions(-) + +commit 875f9f6f22451f1cc02782a8269f7e1e4bce0ca0 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 12 12:37:48 2023 -0700 + + [subset-input] Use shared_ptr for sets + + src/hb-subset-input.cc | 2 +- + src/hb-subset-input.hh | 29 ++++++++++++++--------------- + 2 files changed, 15 insertions(+), 16 deletions(-) + +commit ef005bc82a48d8ee0acd073a17c7d3481ecb702e +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 12 12:09:14 2023 -0700 + + [subset-input] Fix destruction + + Ouch! Object was already destroyed at that point before. + + src/hb-subset-input.cc | 8 -------- + src/hb-subset-input.hh | 11 +++++++++++ + src/hb-subset-plan.hh | 3 --- + 3 files changed, 11 insertions(+), 11 deletions(-) + +commit c60c5995bb36a4796c747243d1e43bca04b1332f +Merge: 8c83de139 cfb672f1e +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 12 11:59:51 2023 -0700 + + Merge pull request #4028 from harfbuzz/mvar-instancing + + [instancer] Add MVAR values to OS/2 + +commit cfb672f1e5cb0e855cec3e5baacee1507e973ce3 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 12 10:36:39 2023 -0700 + + [glyf] Revert sign of advance widths back + + src/OT/glyf/Glyph.hh | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +commit c324d999521d3886af4560a810dcd34ef779125f +Author: Garret Rieger <grieger@google.com> +Date: Thu Jan 12 18:15:07 2023 +0000 + + [instancing] Add tests for MVAR instancing. + + ...out.retain-all-codepoint.wght=150,wdth=80,CTGR=0.ttf | Bin 0 -> 1396 bytes + ...out.retain-all-codepoint.wght=300,wdth=90,CTGR=0.ttf | Bin 0 -> 1432 bytes + test/subset/data/fonts/NotoSans-VF.abc.ttf | Bin 0 -> 11156 bytes + test/subset/data/profiles/no-layout.txt | 1 + + test/subset/data/tests/mvar_full_instance.tests | 12 ++++++++++++ + 5 files changed, 13 insertions(+) + +commit 8c83de1396c7b51acfd1ba1482e2dbe816048363 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 12 10:44:08 2023 -0700 + + [aat] Initialize values + + src/hb-aat-map.hh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit ca1909154938084be149bf84e1f38edec5bb682b +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 11 14:36:02 2023 -0700 + + [hhea/vhea] Add MVAR during instancing + + src/hb-ot-hmtx-table.hh | 28 ++++++++++++++++++++++++---- + 1 file changed, 24 insertions(+), 4 deletions(-) + +commit f4550001380bf1c8f70119908d83538d4bafb918 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 11 14:25:37 2023 -0700 + + [post] Add MVAR to subsetting + + src/hb-ot-post-table.hh | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +commit 9dc3e785aad419c832b69fb6d8ad53258dc8273a +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 11 14:09:47 2023 -0700 + + [instancer] Add MVAR values to OS/2 + + src/hb-ot-os2-table.hh | 33 +++++++++++++++++++++++++++++++++ + src/hb-ot-var-mvar-table.hh | 9 +++++++++ + 2 files changed, 42 insertions(+) + +commit e78a68bf467b86daa17377dc08f382cadb8d748c +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 11 15:34:11 2023 -0700 + + [subset-input] Don't RETAIN_GIDs in keep-everything + + src/hb-subset-input.cc | 1 - + 1 file changed, 1 deletion(-) + +commit d675f0d4f2d6269ac1dd92fa0ea0db79ce5ee3a1 +Merge: 52c8c5a05 bfd7548e2 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 11 15:06:31 2023 -0700 + + Merge pull request #4023 from harfbuzz/aat-features2 + + [aat] Support feature ranges + +commit 52c8c5a058dbbfe9373d786718b69568a25b41e0 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Wed Jan 11 18:50:24 2023 +0200 + + [doc] Fix API indices generation + + For whatever reason, GTK-Doc 1.33.1 will not generate HTML files for + indices that has these role attributes. + + docs/harfbuzz-docs.xml | 128 ++++++++++++++++++++++++------------------------- + 1 file changed, 64 insertions(+), 64 deletions(-) + +commit 1135f0b8cc9fc00129012f7022986c75732ffd60 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 11 13:45:16 2023 -0700 + + Another try at fixing arm build + + src/hb-ot-hmtx-table.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 527e2d7ce2a2659c69f90c6bc86b5bb8838ed682 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 11 13:41:44 2023 -0700 + + [gobject] Add another value type hb_ot_var_axis_info + + src/hb-gobject-structs.cc | 1 + + src/hb-gobject-structs.h | 4 ++++ + 2 files changed, 5 insertions(+) + +commit 8206569d6373a0fe97602788c7a43a0cf1f0345a +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 11 13:24:50 2023 -0700 + + [map] Remove hashmap create/destroy/vtable + + Unused now. + + src/hb-map.hh | 32 -------------------------------- + src/test-map.cc | 10 ---------- + 2 files changed, 42 deletions(-) + +commit 1426f1c8ea29a6b71ab0f1ce9d9c79b41f407eb0 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 11 13:23:34 2023 -0700 + + [subset-plan] Simplify name_table_overrides allocation + + src/hb-subset-input.cc | 20 ++++---------------- + src/hb-subset-input.hh | 4 ++-- + src/hb-subset-plan.cc | 21 +++++++++------------ + 3 files changed, 15 insertions(+), 30 deletions(-) + +commit 5cab4a55d28ec51abe1cf4a7bd09c1814378fc67 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 11 13:21:57 2023 -0700 + + [subset-input] Simplify axes_location allocation + + src/hb-subset-input.cc | 9 +++------ + src/hb-subset-input.hh | 4 ++-- + src/hb-subset-plan.cc | 3 +-- + 3 files changed, 6 insertions(+), 10 deletions(-) + +commit df721e05628daa0d5dd9998ff22dec98db9433e7 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 11 12:50:52 2023 -0700 + + [gobject] Add draw/paint value types + + src/hb-gobject-structs.cc | 3 +++ + src/hb-gobject-structs.h | 12 ++++++++++++ + 2 files changed, 15 insertions(+) + +commit 41352c08b8baa2a731331126a64978df80371b0f +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 11 12:42:14 2023 -0700 + + [hmtx] Fix types + + src/hb-ot-hmtx-table.hh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 4e7c80396928aef328a31b84f1d8df479e31d340 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 11 12:38:26 2023 -0700 + + [subset-plan] Simplify name_table_overrides allocation + + src/hb-ot-name-table.hh | 2 +- + src/hb-subset-plan.cc | 5 ++--- + src/hb-subset-plan.hh | 10 +++------- + 3 files changed, 6 insertions(+), 11 deletions(-) + +commit 65d3db375cb51204ac971dcd2d978684ab8a9422 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 11 12:36:54 2023 -0700 + + [subset-plan] Simplify user_axes_location allocation + + src/OT/glyf/glyf.hh | 6 +++--- + src/hb-ot-layout-common.hh | 4 ++-- + src/hb-ot-os2-table.hh | 8 ++++---- + src/hb-ot-post-table.hh | 4 ++-- + src/hb-ot-stat-table.hh | 8 ++++---- + src/hb-ot-var-fvar-table.hh | 2 +- + src/hb-subset-plan.cc | 23 +++++++++++------------ + src/hb-subset-plan.hh | 4 +--- + src/hb-subset.cc | 2 +- + 9 files changed, 29 insertions(+), 32 deletions(-) + +commit 60418fcb95519013d1cf7ef57d9e63431401dc6a +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 11 12:33:25 2023 -0700 + + [subset-plan] Simplify axes_index_map allocation + + src/hb-ot-layout-common.hh | 2 +- + src/hb-ot-var-fvar-table.hh | 6 +++--- + src/hb-subset-plan.cc | 3 +-- + src/hb-subset-plan.hh | 3 +-- + 4 files changed, 6 insertions(+), 8 deletions(-) + +commit 8265277c2ee60c6d9f4e6b87f86bc2b3b296338a +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 11 12:32:04 2023 -0700 + + [subset-plan] Simplify axes_location allocation + + src/hb-subset-plan.cc | 5 ++--- + src/hb-subset-plan.hh | 3 +-- + 2 files changed, 3 insertions(+), 5 deletions(-) + +commit d54902c6598045112374f1f51e1775677dd77d94 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 11 12:29:25 2023 -0700 + + [subset-plan] Simplify axes_old_index_tag_map allocation + + src/hb-ot-var-fvar-table.hh | 2 +- + src/hb-subset-plan.cc | 5 ++--- + src/hb-subset-plan.hh | 3 +-- + 3 files changed, 4 insertions(+), 6 deletions(-) + +commit 9f4c8fb7004bfce2bcc29f3be900a5f907e92fb3 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 11 12:28:18 2023 -0700 + + [subset-plan] Minor move code around + + src/hb-subset-plan.hh | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit a34a204bf74ee0c08a67c97444ce803d6f0a0b6d +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 11 12:27:19 2023 -0700 + + [subset-plan] Simplify unicodes allocation + + src/hb-ot-cmap-table.hh | 2 +- + src/hb-ot-os2-table.hh | 4 ++-- + src/hb-subset-plan.cc | 9 ++++----- + src/hb-subset-plan.hh | 3 +-- + 4 files changed, 8 insertions(+), 10 deletions(-) + +commit 75b33cb04b783f9f8473df46b603b6e94dc226b3 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 11 12:24:35 2023 -0700 + + [subset-plan] Simplify hmtx_map / vmtx_map allocation + + src/OT/glyf/Glyph.hh | 4 ++-- + src/hb-ot-hmtx-table.hh | 2 +- + src/hb-subset-plan.cc | 3 --- + src/hb-subset-plan.hh | 6 ++---- + 4 files changed, 5 insertions(+), 10 deletions(-) + +commit 33ce3a0d446bef5b26fb11032849115ad948d76b +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 11 12:21:26 2023 -0700 + + [subset] Minor adjust a couple types + + src/OT/glyf/Glyph.hh | 4 ++-- + src/hb-subset-plan.cc | 4 ++-- + src/hb-subset-plan.hh | 4 ++-- + 3 files changed, 6 insertions(+), 6 deletions(-) + +commit 865d1747066a4dc91bf99cff182ae4504a53aa4f +Merge: 5f51dd276 67eefebf8 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 11 12:14:17 2023 -0700 + + Merge pull request #4027 from harfbuzz/plan-simplify + + Plan simplify + +commit 67eefebf8d61796a63e6e8e7c79a40564c45d723 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 11 11:44:09 2023 -0700 + + [subset-plan] Simplify user_axes_location destruction + + src/hb-subset-plan.hh | 12 ++++-------- + 1 file changed, 4 insertions(+), 8 deletions(-) + +commit b2007abff75f0d5d8b472e66e3b84947c9d06a70 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 11 11:27:22 2023 -0700 + + [subset-plan] Simplify glyph_map_gsub allocation + + src/hb-ot-layout-common.hh | 4 ++-- + src/hb-subset-plan.cc | 3 +-- + src/hb-subset-plan.hh | 3 +-- + 3 files changed, 4 insertions(+), 6 deletions(-) + +commit bd4b040e7f6c34afd811d5b8d37e967f18ffe728 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 11 11:23:48 2023 -0700 + + [shape-plan] Simplify glyphs_requested allocation + + src/hb-ot-cmap-table.hh | 2 +- + src/hb-subset-plan.cc | 2 +- + src/hb-subset-plan.hh | 3 +-- + 3 files changed, 3 insertions(+), 4 deletions(-) + +commit c51d33685db7a85243260585f2e8f0aba904f982 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 11 11:22:22 2023 -0700 + + [subset-plan] Simplify no_subset_tables allocation + + src/hb-subset-plan.cc | 2 +- + src/hb-subset-plan.hh | 3 +-- + src/hb-subset.cc | 6 +++--- + 3 files changed, 5 insertions(+), 6 deletions(-) + +commit 999be72135a45f1e1e36b32d1944a6d6b7335f17 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 11 11:21:17 2023 -0700 + + [subset-plan] Simplify drop_tables allocation + + src/hb-subset-plan.cc | 2 +- + src/hb-subset-plan.hh | 3 +-- + src/hb-subset.cc | 2 +- + 3 files changed, 3 insertions(+), 4 deletions(-) + +commit b33eb9ecfc255f43006ccd422f0f6807f4f7a100 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 11 11:20:04 2023 -0700 + + [subset-plan] Simplify layout_variation_idx_delta_map allocation + + src/OT/Layout/GPOS/AnchorFormat3.hh | 12 ++++++------ + src/OT/Layout/GPOS/PairPosFormat2.hh | 4 ++-- + src/OT/Layout/GPOS/PairSet.hh | 2 +- + src/OT/Layout/GPOS/SinglePosFormat1.hh | 2 +- + src/OT/Layout/GPOS/SinglePosFormat2.hh | 2 +- + src/hb-ot-layout-gdef-table.hh | 6 +++--- + src/hb-subset-plan.cc | 5 ++--- + src/hb-subset-plan.hh | 3 +-- + 8 files changed, 17 insertions(+), 19 deletions(-) + +commit 9c45d98f732304e59ec2f81b3c7bb3c1f55fa78c +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 11 11:16:18 2023 -0700 + + [subset-plan] Simplify colr_palettes allocation + + src/OT/Color/COLR/COLR.hh | 6 +++--- + src/OT/Color/CPAL/CPAL.hh | 2 +- + src/hb-subset-plan.cc | 3 +-- + src/hb-subset-plan.hh | 3 +-- + 4 files changed, 6 insertions(+), 8 deletions(-) + +commit b74a26519614c816a92bdcc8f6cd920647da90d0 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 11 11:15:15 2023 -0700 + + [subset-plan] Simplify colrv1_layers allocation + + src/OT/Color/COLR/COLR.hh | 2 +- + src/hb-subset-plan.cc | 3 +-- + src/hb-subset-plan.hh | 3 +-- + 3 files changed, 3 insertions(+), 5 deletions(-) + +commit 89905368ca75496fac663710ea03f1bb90cd33cb +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 11 11:13:49 2023 -0700 + + [subset-plan] Simplify sanitized_table_cache allocation + + src/hb-subset-plan.cc | 1 - + src/hb-subset-plan.hh | 5 ++--- + 2 files changed, 2 insertions(+), 4 deletions(-) + +commit 9e24873c1e2459a78bb97ef31e0c42779aa88ae8 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 11 11:12:07 2023 -0700 + + [subset-plan] Simplify gsub/gpos_feature_substitutes_map allocation + + src/hb-ot-layout-common.hh | 4 ++-- + src/hb-subset-plan.cc | 7 ++----- + src/hb-subset-plan.hh | 6 ++---- + 3 files changed, 6 insertions(+), 11 deletions(-) + +commit 01208c7c02b779fb816391eb4a7ea6b76bd91cdc +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 11 11:10:28 2023 -0700 + + [subset-plan] Simplify gsub/gpos_feature_record_cond_idx_map allocation + + src/hb-ot-layout-common.hh | 4 ++-- + src/hb-subset-plan.cc | 7 ++----- + src/hb-subset-plan.hh | 6 ++---- + 3 files changed, 6 insertions(+), 11 deletions(-) + +commit 06039db0801f68bfe93dcff1c733595d77a1580e +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 11 11:07:31 2023 -0700 + + [subset-plan] Simplify gsub_langsys and gpos_langsys allocation + + src/hb-ot-layout-common.hh | 4 ++-- + src/hb-subset-plan.cc | 7 ++----- + src/hb-subset-plan.hh | 6 ++---- + 3 files changed, 6 insertions(+), 11 deletions(-) + +commit 5fc91de2c0f32f0e067950ce004f498a378690e9 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 11 11:04:17 2023 -0700 + + [shape-plan] Simplify _glyphset_colred allocation + + src/OT/Color/COLR/COLR.hh | 6 +++--- + src/hb-subset-plan.cc | 3 +-- + src/hb-subset-plan.hh | 3 +-- + 3 files changed, 5 insertions(+), 7 deletions(-) + +commit efafe7aa3bef6d4367ca10caefb24802f809b299 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 11 11:03:19 2023 -0700 + + [subset-plan] Simplify _glyphset_mathed allocation + + src/hb-ot-math-table.hh | 10 +++++----- + src/hb-subset-plan.cc | 9 ++++----- + src/hb-subset-plan.hh | 3 +-- + 3 files changed, 10 insertions(+), 12 deletions(-) + +commit 113a1700df64b4ade259fac37bf434925664b050 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 11 11:01:11 2023 -0700 + + [subset-plan] Simplify _glyphset_gsub allocation + + src/hb-subset-plan.cc | 21 ++++++++++----------- + src/hb-subset-plan.hh | 5 ++--- + 2 files changed, 12 insertions(+), 14 deletions(-) + +commit 4a9268f2807db09f3b6480b7a1deb544d99b6f87 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 11 11:00:02 2023 -0700 + + [subset-plan] Simplify _glyphset allocation + + src/hb-subset-plan.cc | 11 +++++------ + src/hb-subset-plan.hh | 7 +++---- + 2 files changed, 8 insertions(+), 10 deletions(-) + +commit 1a00ab69ec012e296f9ec11a9c5619d637012b3b +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 11 10:56:16 2023 -0700 + + [subset-plan] Simplify gsub_lookups and gpos_lookups allocation + + src/hb-ot-layout-common.hh | 4 ++-- + src/hb-ot-layout-gsubgpos.hh | 12 ++++++------ + src/hb-subset-plan.cc | 8 +++----- + src/hb-subset-plan.hh | 6 ++---- + 4 files changed, 13 insertions(+), 17 deletions(-) + +commit 1a716bad03a9d628a97d8212f37cd83b7ad3e76f +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 11 10:51:48 2023 -0700 + + [subset-plan] Simplify gsub_features and gpos_features allocation + + src/hb-ot-layout-common.hh | 4 ++-- + src/hb-subset-plan.cc | 7 ++----- + src/hb-subset-plan.hh | 6 ++---- + 3 files changed, 6 insertions(+), 11 deletions(-) + +commit 78aa9f1e9c5f68249628746178c4088c2eb3e8d5 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 11 10:47:40 2023 -0700 + + [subset-plan] Simplify name_ids allocation + + src/hb-subset-plan.cc | 4 ++-- + src/hb-subset-plan.hh | 3 +-- + 2 files changed, 3 insertions(+), 4 deletions(-) + +commit cfb48f91da9089c8f9ea0069c4e001562980b7e9 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 11 10:45:02 2023 -0700 + + [subset-plan] Simplify name_languages allocation + + src/hb-subset-plan.cc | 2 +- + src/hb-subset-plan.hh | 3 +-- + 2 files changed, 2 insertions(+), 3 deletions(-) + +commit e4ca0fe436b691bba3f405a722cb178c3e62a828 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 11 10:43:01 2023 -0700 + + [subset-plan] Simplify layout_features allocation + + src/hb-subset-plan.cc | 4 ++-- + src/hb-subset-plan.hh | 3 +-- + 2 files changed, 3 insertions(+), 4 deletions(-) + +commit 4de66eec5751e57eee64730aec271313b2f3ea2f +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 11 10:40:54 2023 -0700 + + [subset-plan] Simplify layout_scripts allocation + + src/hb-ot-layout-common.hh | 2 +- + src/hb-subset-plan.cc | 6 +++--- + src/hb-subset-plan.hh | 3 +-- + 3 files changed, 5 insertions(+), 6 deletions(-) + +commit 5f51dd276b5636d541d4a6b94314f48432b08ff2 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jan 10 22:57:07 2023 -0700 + + [ft-colr] Minor use false instead of 0 + + src/hb-ft-colr.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit f84a8e3289212b261fa9d9847c4628a1dd4b2153 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jan 10 22:43:30 2023 -0700 + + [ft-colr] Comment + + src/hb-ft-colr.hh | 3 +++ + 1 file changed, 3 insertions(+) + +commit 1cb5a87febb84dd3c8323e82da1db33d539310be +Author: Matthias Clasen <mclasen@redhat.com> +Date: Tue Jan 10 22:13:44 2023 -0500 + + test-pain: Print out extend for color lines + + Update all expected results to include this value. + + test/api/results/bad-154 | 2 +- + test/api/results/hand-10 | 10 +++++----- + test/api/results/hand-10.2 | 10 +++++----- + test/api/results/rocher-1 | 2 +- + test/api/results/rocher-2 | 2 +- + test/api/results/rocher-3 | 2 +- + test/api/results/test-10 | 4 ++-- + test/api/results/test-106 | 2 +- + test/api/results/test-116 | 2 +- + test/api/results/test-123 | 2 +- + test/api/results/test-154 | 4 ++-- + test/api/results/test-165 | 4 ++-- + test/api/results/test-175 | 4 ++-- + test/api/results/test-6 | 4 ++-- + test/api/results/test-92 | 4 ++-- + test/api/test-paint.c | 2 +- + 16 files changed, 30 insertions(+), 30 deletions(-) + +commit 6648e6e3e5b0d93dee8fcc3cbe7fd886ba324ee3 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Tue Jan 10 22:07:44 2023 -0500 + + Add one more paint test + + Add a test for the clip_box_top_left_glyph, + since we've seen broken rendering with it. + + test/api/results/test-154 | 30 ++++++++++++++++++++++++++++++ + test/api/test-paint.c | 1 + + 2 files changed, 31 insertions(+) + +commit bf16dad55aac9225a7b857a392267959600568e0 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jan 10 17:29:25 2023 -0700 + + [paint-extents] Return unbounded on memory allocation failure + + src/hb-paint-extents.hh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 3e1c524e64c9829234f9c89f99a31af3aabe3ab8 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jan 10 17:18:34 2023 -0700 + + [bit-page] Comment + + src/hb-bit-page.hh | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit 626def03f8abbc818661a4178b2463ce6b108093 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jan 10 17:12:50 2023 -0700 + + [hmtx] Remove TODO items + + src/hb-ot-hmtx-table.hh | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +commit adf0bd6dcd20b684dc3a64bcb219fced5918a1be +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jan 10 17:04:58 2023 -0700 + + [test-map] Add a test + + src/test-map.cc | 1 + + 1 file changed, 1 insertion(+) + +commit 4fd03540679b3630cd023825ed2ee2a5ecc60457 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jan 10 14:32:08 2023 -0700 + + [font] Docs + + src/hb-font.cc | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +commit bfd7548e243ab92ed02e66c95d244c78dd6e622b +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jan 10 13:31:58 2023 -0700 + + [aat] Optimize feature-range application + + src/hb-aat-layout-morx-table.hh | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit dd42939e318c90f2c0f7d0efc1c4354182552f72 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jan 10 13:23:19 2023 -0700 + + [aat] Reduce unsafe_to_concat calls + + src/hb-aat-layout-common.hh | 2 -- + src/hb-aat-layout-kerx-table.hh | 2 ++ + src/hb-aat-layout-morx-table.hh | 3 +++ + 3 files changed, 5 insertions(+), 2 deletions(-) + +commit fecce62a45d996fbca11cea6c34bdbadec283ba4 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jan 10 13:13:43 2023 -0700 + + [ft] Docs + + src/hb-ft.cc | 4 ++++ + 1 file changed, 4 insertions(+) + +commit cb509d9c894a8b9aa586eebf896526578fdd8822 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jan 10 13:11:48 2023 -0700 + + [face] Docs + + src/hb-face.cc | 4 ++++ + 1 file changed, 4 insertions(+) + +commit 8a2efbd8a113ec885b3a437c014912ca9ee22460 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jan 10 13:10:36 2023 -0700 + + [upem] More docs + + src/hb-face.cc | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +commit ccffce58cc5bcb07d82b2085a3ebb42ea04b2579 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jan 10 13:09:30 2023 -0700 + + [scale] More docs + + src/hb-font.cc | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +commit c4580d8670218c750e9c8e058b4e10841526acd0 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jan 10 12:56:02 2023 -0700 + + [scale] More docs + + src/hb-font.cc | 1 + + 1 file changed, 1 insertion(+) + +commit f0e695a3a96cc2396c47a2a29966a8e0f9f682cb +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jan 10 12:55:17 2023 -0700 + + [scale] Comment + + src/hb-font.cc | 2 ++ + 1 file changed, 2 insertions(+) + +commit 8c47580ac85b3eed0b932d50236d589e8c8747cf +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jan 10 12:53:54 2023 -0700 + + [scale] Document + + src/hb-font.cc | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +commit 8b17c6ca302e969ab285e0ea7da067cfe6a1a27d +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jan 10 12:17:38 2023 -0700 + + [aat] Comment + + src/hb-aat-layout-common.hh | 1 + + src/hb-aat-layout-morx-table.hh | 1 + + 2 files changed, 2 insertions(+) + +commit 0e11d317ee329f1c6afd8473e0f8a2daa6b91e25 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jan 10 12:16:04 2023 -0700 + + [aat] Optimize feature application + + src/hb-aat-layout-common.hh | 3 ++- + src/hb-aat-layout-morx-table.hh | 3 ++- + 2 files changed, 4 insertions(+), 2 deletions(-) + +commit 4ee60941140924f7247bf8dc7720fa1bf43a5bff +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jan 10 11:52:12 2023 -0700 + + [aat] Add test for feature range + + test/shape/data/in-house/tests/macos.tests | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +commit a70543daf3f5f88c0bb4d1fc1515a9c0803297fc +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jan 10 11:49:48 2023 -0700 + + [aat] Always unsafe-to-concat in state machine + + src/hb-aat-layout-common.hh | 2 ++ + 1 file changed, 2 insertions(+) + +commit 62383315fafd973415fa9ea9454f7a1db34b2d4c +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jan 10 11:29:04 2023 -0700 + + [aat] Try fix leak on memory allocation failure + + src/hb-aat-layout-morx-table.hh | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit e122fe2acfde26b8b95ee96ebd7a33f20c02c77c +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jan 10 11:06:20 2023 -0700 + + [aat] Adjust last range + + Otherwise a user cluster value of -1 would have tripped us. + + src/hb-aat-map.cc | 4 ++++ + 1 file changed, 4 insertions(+) + +commit e28c158c35081c1f412f8d2dd10471fae360a574 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jan 10 11:03:38 2023 -0700 + + [aat] Run subtable across ranges if flags match + + src/hb-aat-layout-common.hh | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +commit 2c9c49fd3289b7c27135f8379b92f413c6f5f1f0 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jan 10 10:53:21 2023 -0700 + + [aat] Support ranges in NonContextual subtable as well + + src/hb-aat-layout-common.hh | 1 - + src/hb-aat-layout-morx-table.hh | 17 +++++++++++++++++ + 2 files changed, 17 insertions(+), 1 deletion(-) + +commit c08308a83ca3c1c24a7013df976c3d753c633d56 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 9 21:42:19 2023 -0700 + + [aat] Always generate a feature range + + src/hb-aat-map.cc | 127 +++++++++++++++++++++++++++--------------------------- + 1 file changed, 64 insertions(+), 63 deletions(-) + +commit db4c87475867bea79069132544b736c19895cfe2 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 9 21:32:15 2023 -0700 + + Revert "Revert "[aat] Support feature ranges"" + + This reverts commit 6a7a38521f940216f1e9e2fa2bf22f7b45ce2aef. + + src/hb-aat-layout-common.hh | 105 +++++++++++++++++++++------------ + src/hb-aat-layout-kerx-table.hh | 4 +- + src/hb-aat-layout-morx-table.hh | 27 +++++---- + src/hb-aat-layout.cc | 14 ++++- + src/hb-aat-layout.hh | 4 +- + src/hb-aat-map.cc | 125 ++++++++++++++++++++++++++++++---------- + src/hb-aat-map.hh | 45 +++++++++++---- + src/hb-ot-shape.cc | 43 +++----------- + src/hb-ot-shape.hh | 2 - + 9 files changed, 239 insertions(+), 130 deletions(-) + +commit 0728098e454bb4adfb2fa9a3dc824c75a653d0d6 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jan 10 10:18:29 2023 -0700 + + [Coverage] Speed up subset for too-large Coverage tables + + Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=54980 + + src/OT/Layout/Common/Coverage.hh | 1 + + 1 file changed, 1 insertion(+) + +commit 8460909e0c8e6d045550fd50206946ee15ad48bd +Author: Khaled Hosny <khaled@aliftype.com> +Date: Tue Jan 10 17:43:10 2023 +0200 + + [build] Fix make dist + + test/api/Makefile.am | 2 ++ + 1 file changed, 2 insertions(+) + +commit 6a7a38521f940216f1e9e2fa2bf22f7b45ce2aef +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 9 21:29:19 2023 -0700 + + Revert "[aat] Support feature ranges" + + This reverts commit 1b7994cb3a3c35f3618d7f40c7289496bdab6f06. + + Broke Zapfino with partial ligature disabling. Debugging. + + src/hb-aat-layout-common.hh | 105 ++++++++++++--------------------- + src/hb-aat-layout-kerx-table.hh | 4 +- + src/hb-aat-layout-morx-table.hh | 27 ++++----- + src/hb-aat-layout.cc | 14 +---- + src/hb-aat-layout.hh | 4 +- + src/hb-aat-map.cc | 125 ++++++++++------------------------------ + src/hb-aat-map.hh | 45 ++++----------- + src/hb-ot-shape.cc | 43 +++++++++++--- + src/hb-ot-shape.hh | 2 + + 9 files changed, 130 insertions(+), 239 deletions(-) + +commit adfd5dd7a9df70f76e777627c7a0f44e89f5b0c4 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 9 21:18:12 2023 -0700 + + Fix TINY build + + src/hb-ot-shape.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 1b7994cb3a3c35f3618d7f40c7289496bdab6f06 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 9 19:38:50 2023 -0700 + + [aat] Support feature ranges + + The hard way... + + A bit uglier than I liked it to be, but is proper at least. + + Fixes https://github.com/harfbuzz/harfbuzz/issues/4020 + + src/hb-aat-layout-common.hh | 105 +++++++++++++++++++++------------ + src/hb-aat-layout-kerx-table.hh | 4 +- + src/hb-aat-layout-morx-table.hh | 27 +++++---- + src/hb-aat-layout.cc | 14 ++++- + src/hb-aat-layout.hh | 4 +- + src/hb-aat-map.cc | 125 ++++++++++++++++++++++++++++++---------- + src/hb-aat-map.hh | 45 +++++++++++---- + src/hb-ot-shape.cc | 43 +++----------- + src/hb-ot-shape.hh | 2 - + 9 files changed, 239 insertions(+), 130 deletions(-) + +commit 622a68695256d8505517ed58885b94b8520efe07 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 9 18:14:40 2023 -0700 + + Revert "Revert "Revert "[aat] Allow disable feature ranges""" + + This reverts commit 5202053c2c5fb2c8af9704e690b25a26bf2a0295. + + src/hb-aat-layout-common.hh | 12 +++--------- + src/hb-aat-layout-kerx-table.hh | 4 ++-- + src/hb-aat-layout-morx-table.hh | 38 ++++++++++++++------------------------ + src/hb-aat-layout.cc | 8 +++----- + src/hb-aat-layout.hh | 3 +-- + src/hb-aat-map.cc | 8 +++----- + src/hb-aat-map.hh | 17 ++++------------- + src/hb-ot-shape.cc | 12 +++--------- + 8 files changed, 33 insertions(+), 69 deletions(-) + +commit 0f01a8362221129729553b3b0f87bff812b32d14 +Author: Garret Rieger <grieger@google.com> +Date: Tue Jan 10 01:09:44 2023 +0000 + + [subset] add basic test for CFF2 subsetting. + + FontTools does not yet support CFF2 subsetting so we can't add a comparison test. Instead add a golden file test. + + test/api/fonts/AdobeVFPrototype.abc.static.otf | Bin 0 -> 86112 bytes + test/api/meson.build | 9 ++- + test/api/test-instance-cff2.c | 75 +++++++++++++++++++++++++ + 3 files changed, 83 insertions(+), 1 deletion(-) + +commit 5202053c2c5fb2c8af9704e690b25a26bf2a0295 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 9 17:29:43 2023 -0700 + + Revert "Revert "[aat] Allow disable feature ranges"" + + This reverts commit 82b3e8af69b09fd908d1cd27b669234328d4a500. + + Another try. + + Fixes https://github.com/harfbuzz/harfbuzz/issues/4020 + + src/hb-aat-layout-common.hh | 12 +++++++++--- + src/hb-aat-layout-kerx-table.hh | 4 ++-- + src/hb-aat-layout-morx-table.hh | 38 ++++++++++++++++++++++++-------------- + src/hb-aat-layout.cc | 8 +++++--- + src/hb-aat-layout.hh | 3 ++- + src/hb-aat-map.cc | 8 +++++--- + src/hb-aat-map.hh | 17 +++++++++++++---- + src/hb-ot-shape.cc | 12 +++++++++--- + 8 files changed, 69 insertions(+), 33 deletions(-) + +commit 82b3e8af69b09fd908d1cd27b669234328d4a500 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 9 17:28:52 2023 -0700 + + Revert "[aat] Allow disable feature ranges" + + This reverts commit 24a4d397bae6b614215086c85a714dc789af3e7f. + + This was broken. + + src/hb-aat-layout-common.hh | 12 +++--------- + src/hb-aat-layout-kerx-table.hh | 4 ++-- + src/hb-aat-layout-morx-table.hh | 40 +++++++++++++++------------------------- + src/hb-aat-layout.cc | 7 +++---- + src/hb-aat-layout.hh | 3 +-- + src/hb-aat-map.cc | 8 +++----- + src/hb-aat-map.hh | 17 ++++------------- + src/hb-ot-shape.cc | 12 +++--------- + 8 files changed, 34 insertions(+), 69 deletions(-) + +commit 24a4d397bae6b614215086c85a714dc789af3e7f +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 9 17:26:08 2023 -0700 + + [aat] Allow disable feature ranges + + Fixes https://github.com/harfbuzz/harfbuzz/issues/4020 + + This is a hack. + + To implement this properly we need to treat runs with different features + as independent runs for running the state machine, as the subtable flags + might be different. That would be a significant change to our internal + implementation. + + src/hb-aat-layout-common.hh | 12 +++++++++--- + src/hb-aat-layout-kerx-table.hh | 4 ++-- + src/hb-aat-layout-morx-table.hh | 40 +++++++++++++++++++++++++--------------- + src/hb-aat-layout.cc | 7 ++++--- + src/hb-aat-layout.hh | 3 ++- + src/hb-aat-map.cc | 8 +++++--- + src/hb-aat-map.hh | 17 +++++++++++++---- + src/hb-ot-shape.cc | 12 +++++++++--- + 8 files changed, 69 insertions(+), 34 deletions(-) + +commit b20871322f02415e5d336ee1807d2c2175c7c07b +Author: Matthias Clasen <mclasen@redhat.com> +Date: Mon Jan 9 16:30:25 2023 -0500 + + test-paint: Fix use of g_test_skip + + test/api/test-paint.c | 9 +++------ + 1 file changed, 3 insertions(+), 6 deletions(-) + +commit 3ff713ab80a4fd8c8de168863eaffae9cd410c81 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 9 13:59:50 2023 -0700 + + [coretext] Remove unused variable + + src/hb-coretext.cc | 1 - + 1 file changed, 1 deletion(-) + +commit 414848755696ff47e65b614f5201cbf9f5de15eb +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 9 13:47:59 2023 -0700 + + [ft] Comment + + src/hb-ft.cc | 2 ++ + 1 file changed, 2 insertions(+) + +commit d2aa2397bae6a6550060686da4cad1426eb2ad1f +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 9 13:43:56 2023 -0700 + + Optimize non-slant extents code + + src/hb-font.hh | 7 +++++-- + src/hb-ft.cc | 7 +++++-- + 2 files changed, 10 insertions(+), 4 deletions(-) + +commit 73dab7f784856b44f9f8f97f354e4286ac2e03e9 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 9 13:36:55 2023 -0700 + + [ft] Fix slanting code + + src/hb-ft.cc | 18 ++++++++++++------ + 1 file changed, 12 insertions(+), 6 deletions(-) + +commit eb0f0279d2bd31045e58711b75dc70fe0946d2bc +Author: Matthias Clasen <mclasen@redhat.com> +Date: Mon Jan 9 15:33:34 2023 -0500 + + test-paint: Avoid g_test_skip_printf + + This is relatively recent api we don't need. + + test/api/test-paint.c | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +commit e61c2be41cadd2ef304d1d47777618d2da2e1726 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Mon Jan 9 15:25:29 2023 -0500 + + test-paint: Skip tests if ft COLRv1 is missing + + test/api/test-paint.c | 17 ++++++++++++----- + 1 file changed, 12 insertions(+), 5 deletions(-) + +commit 1d662632d961ab588b35ad8a33d4ff85b5c465a1 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Mon Jan 9 15:01:59 2023 -0500 + + test-paint: More output for failures + + test/api/test-paint.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 64e3f53fc238443cbbf96f0ba16941093757a76c +Merge: 027515149 d0108d31a +Author: Matthias Clasen <matthias.clasen@gmail.com> +Date: Mon Jan 9 14:43:33 2023 -0500 + + Merge pull request #4015 from harfbuzz/more-paint-tests + + Add more paint tests + +commit d0108d31a283a8bb3a4dd61696b416059346050b +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sun Jan 8 11:20:21 2023 -0500 + + Add more paint tests + + These tests compare the output of the ft and ot + implementations for all the glyphs in the test_glyphs + font. + + test/api/results/bad-154 | 10 ++++ + test/api/results/hand-10 | 2 +- + test/api/results/hand-10.2 | 2 +- + test/api/results/rocher-1 | 2 +- + test/api/results/rocher-2 | 2 +- + test/api/results/rocher-3 | 2 +- + test/api/results/test-10 | 2 +- + test/api/results/test-106 | 2 +- + test/api/results/test-116 | 2 +- + test/api/results/test-123 | 2 +- + test/api/results/test-165 | 2 +- + test/api/results/test-175 | 2 +- + test/api/results/test-6 | 2 +- + test/api/results/test-92 | 2 +- + test/api/test-paint.c | 124 +++++++++++++++++++++++++++++++++++---------- + 15 files changed, 121 insertions(+), 39 deletions(-) + +commit 0275151490902461d2680056820b766c7d39c208 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 9 12:26:39 2023 -0700 + + [paint] Align deptch/edge count conditions across two backends + + src/OT/Color/COLR/COLR.hh | 4 ++-- + src/hb-ft-colr.hh | 3 +-- + 2 files changed, 3 insertions(+), 4 deletions(-) + +commit 5f976d86a7a24cfe186129294d4779cd1fe67d8c +Author: Matthias Clasen <mclasen@redhat.com> +Date: Mon Jan 9 13:42:22 2023 -0500 + + test-paint: Use %.3g for results + + This produces more readable output. + + test/api/results/bad-154 | 132 ++++++++++++++++++++++----------------------- + test/api/results/hand-10 | 90 +++++++++++++++---------------- + test/api/results/hand-10.2 | 90 +++++++++++++++---------------- + test/api/results/rocher-1 | 2 +- + test/api/results/rocher-2 | 2 +- + test/api/results/rocher-3 | 2 +- + test/api/results/test-10 | 22 ++++---- + test/api/results/test-106 | 20 +++---- + test/api/results/test-116 | 16 +++--- + test/api/results/test-123 | 30 +++++------ + test/api/results/test-165 | 22 ++++---- + test/api/results/test-175 | 28 +++++----- + test/api/results/test-6 | 20 +++---- + test/api/results/test-92 | 20 +++---- + test/api/test-paint.c | 52 +++++++++--------- + 15 files changed, 271 insertions(+), 277 deletions(-) + +commit ec78a486bf4f81ce3bacf1f10558443c64483344 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Mon Jan 9 13:38:19 2023 -0500 + + Run paint tests at upem scale + + This avoids problems with rouding. + + test/api/results/bad-154 | 2 +- + test/api/results/hand-10 | 44 ++++++++++++++++++++++++-------------------- + test/api/results/hand-10.2 | 42 +++++++++++++++++++++--------------------- + test/api/results/rocher-1 | 2 +- + test/api/results/rocher-2 | 2 +- + test/api/results/rocher-3 | 2 +- + test/api/results/test-10 | 2 +- + test/api/results/test-106 | 2 +- + test/api/results/test-116 | 2 +- + test/api/results/test-123 | 2 +- + test/api/results/test-165 | 2 +- + test/api/results/test-175 | 2 +- + test/api/results/test-6 | 2 +- + test/api/results/test-92 | 2 +- + 14 files changed, 57 insertions(+), 53 deletions(-) + +commit 839f4b64941be2e4a6f1ec5325fe5ee8def11277 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 9 12:01:46 2023 -0700 + + [ft] Fix slanting clip box + + src/hb-ft-colr.hh | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +commit 30adbc22d9a93d825ff9418eacf16737379a6987 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 9 11:54:44 2023 -0700 + + hb-font: Fix scale_glyph_extents() again + + And better fix this time. + + src/hb-font.hh | 18 ++++++++++++------ + 1 file changed, 12 insertions(+), 6 deletions(-) + +commit 6c1a4bed4a94619898052bfe3bd03e1dfb71806f +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 9 11:37:39 2023 -0700 + + Better rounding clip boxes + + src/hb-font.hh | 4 ++-- + src/hb-ft-colr.hh | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +commit a085efa69922784850ef4ae68e6b43bf933d3d6d +Author: Matthias Clasen <mclasen@redhat.com> +Date: Mon Jan 9 13:11:16 2023 -0500 + + test-paint: Fix font setup for ft + + We must call hb_ft_font_set_funcs after + setting the font scale. + + test/api/test-paint.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit 26f713a7f5bed1c0543e070473008bd6ff065233 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Mon Jan 9 12:54:06 2023 -0500 + + paint-test: Use larger scales + + A scale of 20 is noise, so use 1000. + + test/api/results/{bad-20-0-154 => bad-154} | 134 ++++++++++++------------ + test/api/results/{hand-20-0.2-10 => hand-10} | 48 ++++----- + test/api/results/{hand-20-0-10 => hand-10.2} | 46 ++++---- + test/api/results/{rocher-120-0.3-1 => rocher-1} | 4 + + test/api/results/{rocher-120-0.3-2 => rocher-2} | 4 + + test/api/results/{rocher-120-0-3 => rocher-3} | 4 + + test/api/results/{test-20-0-10 => test-10} | 14 +-- + test/api/results/{test-20-0-106 => test-106} | 18 ++-- + test/api/results/test-116 | 26 +++++ + test/api/results/{test-20-0-123 => test-123} | 22 ++-- + test/api/results/{test-20-0-165 => test-165} | 14 +-- + test/api/results/{test-20-0-175 => test-175} | 18 ++-- + test/api/results/test-20-0-116 | 26 ----- + test/api/results/{test-20-0-6 => test-6} | 14 +-- + test/api/results/{test-20-0-92 => test-92} | 14 +-- + test/api/test-paint.c | 28 ++--- + 16 files changed, 221 insertions(+), 213 deletions(-) + +commit e886b6b8a6f165c57498760e3e8a3e40dfcec4b7 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 9 10:26:01 2023 -0700 + + [test-draw] Use a larger scale + + A scale of 20 is in the noise category for us. Using a larger + scale makes the test pass. + + test/api/test-draw.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 347910fd4c7fe9327e45d3cef02a184b486eb710 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sun Jan 8 20:06:24 2023 -0500 + + Add a draw test + + This test compares output between ft and ot + font funcs. + + test/api/test-draw.c | 36 ++++++++++++++++++++++++++++++++++++ + 1 file changed, 36 insertions(+) + +commit f46dcf147b0bc8be6e8d78093a049aaec01089b8 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 8 14:33:54 2023 -0700 + + [paint/COLR] Fix clip transform + + Sigh. So complicated. + + src/OT/Color/COLR/COLR.hh | 13 +++---------- + 1 file changed, 3 insertions(+), 10 deletions(-) + +commit 42047070ddec3d8182fd7591d3a97e2b16aef4b3 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sun Jan 8 16:08:16 2023 -0500 + + test-paint: More helpful output + + No need to print ASCII chars as hex. + + test/api/test-paint.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit f283d4d366e1c10ec7e7a89b468911b00d948b9d +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 8 12:42:34 2023 -0700 + + [paint] Try to adjust both renderers to use same clip order + + src/OT/Color/COLR/COLR.hh | 20 ++++++++++++++------ + src/hb-ft-colr.hh | 1 - + 2 files changed, 14 insertions(+), 7 deletions(-) + +commit 3fd6c0d97aa33758005a45a3c8d8bd98f8e79df8 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 8 12:30:26 2023 -0700 + + [test-paint] Remove unused FT_Library + + test/api/test-paint.c | 8 -------- + 1 file changed, 8 deletions(-) + +commit 28be4f8805f2f69167930f30b9e4c27fc84429ea +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 8 12:19:41 2023 -0700 + + [test-paint] Actually run against hb-ft + + test/api/test-paint.c | 49 ++++++++----------------------------------------- + 1 file changed, 8 insertions(+), 41 deletions(-) + +commit ed7d0234e12aa82f60b9e37a823d55cfc8805c3d +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sun Jan 8 11:47:19 2023 -0500 + + test-paint: Limit the precision of clip boxes + + Update expected test results. + + test/api/results/bad-20-0-154 | 6 +++++- + test/api/results/hand-20-0-10 | 6 +++++- + test/api/results/hand-20-0.2-10 | 6 +++++- + test/api/results/test-20-0-10 | 6 +++++- + test/api/results/test-20-0-106 | 4 ++-- + test/api/results/test-20-0-116 | 4 ++-- + test/api/results/test-20-0-123 | 6 +++++- + test/api/results/test-20-0-165 | 6 +++++- + test/api/results/test-20-0-175 | 6 +++++- + test/api/results/test-20-0-6 | 6 +++++- + test/api/results/test-20-0-92 | 6 +++++- + test/api/test-paint.c | 2 +- + 12 files changed, 50 insertions(+), 14 deletions(-) + +commit 5d94eb61b883eb194bd952d6d5c552a614c68c19 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 8 11:55:13 2023 -0700 + + [hb-cairo] Fix hb_cairo_glyphs_from_buffer() when utf8 missing + + Fixes https://github.com/harfbuzz/harfbuzz/issues/4016 + + src/hb-cairo.cc | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +commit 10390ec5c6b6a133f5dcf3a2908249f6c7b40ef6 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sun Jan 8 09:06:03 2023 -0500 + + Update expected test results + + test/api/results/test-20-0-106 | 12 ++++++++---- + test/api/results/test-20-0-116 | 12 ++++++++---- + 2 files changed, 16 insertions(+), 8 deletions(-) + +commit f3ce137420721cb689179afadae812011739a129 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sun Jan 8 09:01:31 2023 -0500 + + test-paint: Be more flexible for expected results + + When generating the expected output with GENERATE_DATA=1, + Glib's test framework puts out some comments at the top + of the file. Ignore them when comparing the expected + output. This makes it possible to directly use the output + of + + GENERATE_DATA=1 ./test-paint -p TESTCASE + + as expected result for TESTCASE. + + test/api/test-paint.c | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +commit 5bd6fc1acedfc17b65262f6a96ab3aa282852df7 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Jan 7 16:32:50 2023 -0700 + + Comment + + src/OT/Color/COLR/COLR.hh | 4 ++-- + src/hb-ft-colr.hh | 1 + + 2 files changed, 3 insertions(+), 2 deletions(-) + +commit 432afa9dffd17df382b17c473e5c4d8199cdf8a4 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Jan 7 16:25:30 2023 -0700 + + [paint] Fix paint_extents usage + + It was broken all this time :(. + + The two backends do this slightly differently... + + src/OT/Color/COLR/COLR.hh | 13 +++---------- + src/hb-ft-colr.hh | 3 +++ + 2 files changed, 6 insertions(+), 10 deletions(-) + +commit a63d329261b552126f1bae67ef175bb9a7e0cd90 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Jan 7 16:05:24 2023 -0700 + + [paint-extents] Simplify transform_extents + + src/hb-paint-extents.hh | 13 +++---------- + 1 file changed, 3 insertions(+), 10 deletions(-) + +commit e062f982600c8e275931c7666f9658c78ea67b4e +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Jan 7 16:02:21 2023 -0700 + + [paint-extents] Fix transform_extents + + Ouch! + + src/hb-paint-extents.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 70ca146033dd513b91468c53ff3f89d03b277f09 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Jan 7 15:48:57 2023 -0700 + + [chafa] Re-enable truecolor mode + + See 42bf8e3d49 + https://github.com/harfbuzz/harfbuzz/pull/2959#issuecomment-827056111 + + util/helper-cairo-ansi.hh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 823a9b18d93cb8a7520d175da7834de1bcd62891 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Jan 7 14:49:02 2023 -0700 + + [cairo] Return COMPOSITE mode CLEAR for unknown values + + As per the spec. + + src/hb-cairo-utils.hh | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +commit d0aaea2319a3c32e129c58bf5b3464409ab83df7 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sat Jan 7 16:27:13 2023 -0500 + + Update test results for paint-test + + These were affected by the PaintComposite optimization. + + test/api/results/bad-20-0-154 | 620 ++++++++++++++++++----------------------- + test/api/results/test-20-0-106 | 38 ++- + test/api/results/test-20-0-116 | 34 ++- + test/api/results/test-20-0-123 | 38 ++- + 4 files changed, 330 insertions(+), 400 deletions(-) + +commit 65c3cde5dac3c64f24dd1837daad494d63b78960 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Jan 7 14:29:18 2023 -0700 + + [COLRv1] Fix scale variation + + src/OT/Color/COLR/COLR.hh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 004cdc10f87d7259a7192706c2996f9a9d0a26ed +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Jan 7 14:27:15 2023 -0700 + + [open-type] More tweaks to fixed types + + Add set_int(). + + src/hb-open-type.hh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit c8486b63019e77257a9d30361a9fdc5f2eaaa837 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Jan 7 14:15:17 2023 -0700 + + [open-type] Add to_int to fixed types + + To make sure we don't accidentally forget to_float(). + As we did recently in COLRv1 code. + + src/OT/glyf/VarCompositeGlyph.hh | 14 +++++++------- + src/hb-open-type.hh | 3 +++ + src/hb-ot-layout-common.hh | 10 +++++----- + src/hb-ot-var-avar-table.hh | 4 ++-- + src/hb-ot-var-fvar-table.hh | 8 ++++---- + src/hb-ot-var-gvar-table.hh | 6 +++--- + 6 files changed, 24 insertions(+), 21 deletions(-) + +commit dfd9bf8a50f9597e55e7811dc0c6c237546e6aef +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Jan 7 14:05:02 2023 -0700 + + [COLRv1] Fix a couple of missing to_float() calls + + Ouch! + + src/OT/Color/COLR/COLR.hh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit d045de78c1ff7b32f3d7082591f4112d1f8f796a +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Jan 7 13:55:17 2023 -0700 + + [paint] Optimize PAINT_COMPOSITE + + At the start of each paint call the current group is clear. + So we don't need to start a new group for the backdrop paint. + + A paint composite really needs one group push, not two. + + src/OT/Color/COLR/COLR.hh | 2 -- + src/hb-ft-colr.hh | 2 -- + 2 files changed, 4 deletions(-) + +commit 5ea5aacda9d14833a66e9d9869c69eda0bb4034a +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Jan 7 13:24:41 2023 -0700 + + [ft-colr] Adjust for FreeType master color-stop change + + Part of https://github.com/harfbuzz/harfbuzz/issues/4013 + + src/hb-ft-colr.hh | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +commit 1eb5445e7575c828c552a914708ca1650f146377 +Author: Qunxin Liu <qxliu@google.com> +Date: Fri Jan 6 15:19:16 2023 -0800 + + [subset] Fix issue in hb_subset_input_override_name_table() + + If a nameRecord with provided name_id/platform_id/encoding_id/lang_id + is not retained after subsetting, create it and insert it to + the name table. So we need to check against retained name_records + rather than name_record in the original name table. + + src/hb-ot-name-table.hh | 28 +++++++++++----------------- + test/api/test-subset-nameids.c | 2 +- + 2 files changed, 12 insertions(+), 18 deletions(-) + +commit 30d4a7347387a1e3e0bd7db3f5159ba42c89e642 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 6 16:00:53 2023 -0700 + + [hb-subset] Adjust help for instancing + + util/hb-subset.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 3bcf153ad8dba1dc518b61ac3f19b865d8508b80 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 6 15:51:13 2023 -0700 + + Change library numbering scheme + + Fixes https://github.com/harfbuzz/harfbuzz/issues/1431 + + configure.ac | 2 +- + meson.build | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +commit 02948263f9a9ab8ef28078e69ed349e2d89b301d +Author: Khaled Hosny <khaled@aliftype.com> +Date: Fri Jan 6 22:53:19 2023 +0200 + + [subset] Document that CFF2 instancing is now supported + + src/hb-subset-input.cc | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +commit aba6cbe867ce1bf23673d44baef820e35001f487 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 6 13:09:10 2023 -0700 + + [hb-subset] Adjust --help-all formatting + + Meh. + + util/hb-subset.cc | 11 ++++++----- + 1 file changed, 6 insertions(+), 5 deletions(-) + +commit 82c863a50b9de8df7094b7267b50b4e191c03de8 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 6 12:51:58 2023 -0700 + + Whitespace + + src/hb-ot-os2-table.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 76879c5763643bf83680efbc610fede3d9faab00 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 6 11:47:04 2023 -0700 + + [subset-cff] Minor hide num_coords again + + src/hb-cff2-interp-cs.hh | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +commit 576b36a31b6623092e5ff36f632390198a57d1b5 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 6 11:40:21 2023 -0700 + + [cff2] Undo rounding change in draw() codepath + + src/hb-cff2-interp-cs.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 4867e0b192b1efcc28e12bfd8f997ca9377d65ce +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 6 11:39:13 2023 -0700 + + [subset-cff2] Faster instancing + + Instantiate blends during parsing. Dedups code as well. + + src/hb-cff2-interp-cs.hh | 12 +++++++----- + src/hb-subset-cff2.cc | 37 +------------------------------------ + 2 files changed, 8 insertions(+), 41 deletions(-) + +commit 3757baab2c039d1cad959ffc4ead4e746cc52960 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 6 11:23:37 2023 -0700 + + [subset-cff2] Better condition + + Previous condition wasn't working for dropping axes. + + src/hb-subset-cff2.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit acc6c13f05c0c43ffa3e3e1053626ca4186428a5 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 6 11:20:41 2023 -0700 + + [subset-cff] Round numbers when instancing + + src/hb-subset-cff2.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 2f174f23c38f5a14ec4c0535249b8b7ce247322f +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 6 11:11:14 2023 -0700 + + Rename + + src/hb-subset-cff2.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit a59116cd8f20e34a8cd7f5d1179ab7ba96aa4113 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 6 11:09:09 2023 -0700 + + Oops + + src/hb-subset-plan.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit c632a164b98de695b5cd3366689df8dd45021b6f +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 6 11:01:25 2023 -0700 + + [subset/cff] Support instancing + + src/hb-cff1-interp-cs.hh | 3 ++- + src/hb-cff2-interp-cs.hh | 2 ++ + src/hb-subset-cff-common.hh | 9 +++++++-- + src/hb-subset-cff2.cc | 38 +++++++++++++++++++++++++++++++++++++- + src/hb-subset-plan.cc | 6 ++++++ + src/hb-subset-plan.hh | 1 + + 6 files changed, 55 insertions(+), 4 deletions(-) + +commit 5153218b41a5984673900d080daf4e3273e1d117 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 5 16:26:41 2023 -0700 + + [set] Add hb_set_is_inverted() + + docs/harfbuzz-sections.txt | 1 + + src/hb-bit-set-invertible.hh | 5 +++++ + src/hb-set.cc | 16 ++++++++++++++++ + src/hb-set.h | 3 +++ + src/hb-set.hh | 1 + + src/test-set.cc | 3 ++- + 6 files changed, 28 insertions(+), 1 deletion(-) + +commit e8ac0ef2fd3cacccaf3bd5dec8a9cab324d13467 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 5 16:20:43 2023 -0700 + + [face] Minor rename a variable + + src/hb-face.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 14ff7470248c4ed1bfddb846237514c56b7b59bb +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 5 16:19:41 2023 -0700 + + [set] Add tests for inverted set range iteration + + src/test-set.cc | 29 +++++++++++++++++++++++++++++ + 1 file changed, 29 insertions(+) + +commit 381ac2fd78220b0ab521cfb0cc5b5f850e5c3964 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Thu Jan 5 17:48:09 2023 -0500 + + docs: Fix a typo + + src/hb-face.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 2764a6169141a09f354abedee39c3430179e90e6 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 5 15:14:54 2023 -0700 + + Revert "[gsubgpos] Use swap instead of move" + + This reverts commit 8a17cc4ecf21f6754e2d90562d0ced7496870f74. + + src/hb-ot-layout-gsubgpos.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 167b7c604603d8a70e15c89714fa601e59248f08 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 5 14:48:20 2023 -0700 + + Revert "[gsubgpos] Reduce hb_set_t allocations" + + This reverts commit 0b7f6d6cf0e2deba637783ab3880fdfb90ca8ac3. + + Not much benefit as the main allocations come from other places. + + src/hb-ot-layout-gsubgpos.hh | 9 +-------- + 1 file changed, 1 insertion(+), 8 deletions(-) + +commit 3947cedd09a2386be5774400ac0b582d8173d078 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 5 14:47:47 2023 -0700 + + Revert "[gsubgpos] Cache pos_glyphs allocation in closure" + + This reverts commit 3961cc46bf438947b19063cb7e735247358f1d4f. + + This was wrong... + + src/hb-ot-layout-gsubgpos.hh | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +commit 097fb8b8aa220e209c7673a5713def137c91924c +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 5 14:38:10 2023 -0700 + + [priority-queue] Use resize instead of shrink + + To avoid reallocation of smaller array. Not desirable here. + + src/hb-priority-queue.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 8a17cc4ecf21f6754e2d90562d0ced7496870f74 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 5 14:15:38 2023 -0700 + + [gsubgpos] Use swap instead of move + + Move is wrong when we want to reuse the object. + + src/hb-ot-layout-gsubgpos.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 4401dd24822a07332b271d700fbab8612da5de45 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 5 14:13:57 2023 -0700 + + [gsubgpos] Minor use ->clear() directly + + src/hb-ot-layout-gsubgpos.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 207ae11ab9f539272cd1969461a1023658b6e4b7 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 5 14:08:47 2023 -0700 + + [set] Allocate first page exact + + src/hb-bit-set.hh | 4 ++++ + 1 file changed, 4 insertions(+) + +commit 0b7f6d6cf0e2deba637783ab3880fdfb90ca8ac3 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 5 13:58:57 2023 -0700 + + [gsubgpos] Reduce hb_set_t allocations + + src/hb-ot-layout-gsubgpos.hh | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +commit 3961cc46bf438947b19063cb7e735247358f1d4f +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 5 13:58:57 2023 -0700 + + [gsubgpos] Cache pos_glyphs allocation in closure + + Saves some 3% in Gulzar-Regular subsetting. + + src/hb-ot-layout-gsubgpos.hh | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +commit a90f149e1b9ce1dfb1295465ddc3d49bda175383 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 5 13:52:11 2023 -0700 + + [gsubgpos] Minor drop an allocation + + src/hb-ot-layout-gsubgpos.hh | 13 ++++++------- + 1 file changed, 6 insertions(+), 7 deletions(-) + +commit c54debc76dc120a696f24e9fd3dc9a9c4829b928 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 5 11:54:06 2023 -0700 + + [face] Add hb_face_collect_nominal_glyph_mapping + + Fixes https://github.com/harfbuzz/harfbuzz/issues/3973 + + docs/harfbuzz-sections.txt | 1 + + src/hb-face.cc | 27 ++++++++++++++++++++++++--- + src/hb-face.h | 6 ++++++ + test/api/test-collect-unicodes.c | 12 ++++++++++++ + 4 files changed, 43 insertions(+), 3 deletions(-) + +commit ec70a3f7975907a4fc413255eec3b645f0a67c81 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 5 11:52:12 2023 -0700 + + [map] Include + + src/hb-map.h | 1 + + 1 file changed, 1 insertion(+) + +commit 8b12c195738024107d5a8308ac29170d3f716f1d +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 5 11:42:21 2023 -0700 + + [face] Split hb-face-builder.cc + + src/Makefile.sources | 1 + + src/harfbuzz-subset.cc | 1 + + src/harfbuzz.cc | 1 + + src/hb-face-builder.cc | 246 +++++++++++++++++++++++++++++++++++++++++++++++++ + src/hb-face.cc | 212 ------------------------------------------ + src/meson.build | 1 + + 6 files changed, 250 insertions(+), 212 deletions(-) + +commit b0d9421b1100ca00ac66ff83297affd3e9926529 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 5 11:21:46 2023 -0700 + + [docs] Remove reference to 2.x.x + + Fixes https://github.com/harfbuzz/harfbuzz/issues/4006 + + docs/harfbuzz-docs.xml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit dc7b3a627db66afe948610a46d0c4a9e7201464b +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 5 10:49:10 2023 -0700 + + [test-map] Another test + + src/test-map.cc | 3 +++ + 1 file changed, 3 insertions(+) + +commit a8df5cb07ddb4b5c0054564858e063a8c35c9a15 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 5 10:47:31 2023 -0700 + + [test-map] Test keys() / values() + + src/test-map.cc | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) + +commit a349eef6a6da1064368ab5c0c09123ed1b748c59 +Author: Konstantin Käfer <mail@kkaefer.com> +Date: Thu Jan 5 10:54:21 2023 +0100 + + Disable hb_paint_extents_* functions if HB_NO_PAINT is defined + + src/hb-paint-extents.cc | 6 ++++++ + 1 file changed, 6 insertions(+) + +commit 9420966f5b8df976c4c1514fbd1346556980c907 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Jan 5 10:17:24 2023 -0700 + + [map] Fix next() + + src/hb-map.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 35f46e74d1126b3db6dd342399e90874171f7ac8 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 4 17:12:08 2023 -0700 + + [map] Add hb_map_keys() and hb_map_values() + + docs/harfbuzz-sections.txt | 2 ++ + src/hb-machinery.hh | 1 - + src/hb-map.cc | 32 ++++++++++++++++++++++++++++++++ + src/hb-map.h | 8 ++++++++ + src/hb-map.hh | 12 ++++++++++++ + src/hb-set.hh | 5 +++++ + src/hb-subset.hh | 1 + + 7 files changed, 60 insertions(+), 1 deletion(-) + +commit 07f2d8d5384943445ca00c0e127de81d37539e65 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 4 15:42:56 2023 -0700 + + Comment + + src/hb-buffer.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 4f6079138d74c1958c6345de28a08a8816e0c4af +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 4 13:58:46 2023 -0700 + + [map] Add hb_map_update() + + docs/harfbuzz-sections.txt | 1 + + src/hb-map.cc | 16 ++++++++++++++++ + src/hb-map.h | 4 ++++ + src/hb-map.hh | 7 +++++++ + src/test-map.cc | 16 ++++++++++++++-- + 5 files changed, 42 insertions(+), 2 deletions(-) + +commit c350458539ee16bb06fde317ad440cd3c8159471 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 4 13:25:03 2023 -0700 + + [subset-plan] Relax const return type of a few functions + + Fixes https://github.com/harfbuzz/harfbuzz/issues/4003 + + src/hb-subset-plan.cc | 6 +++--- + src/hb-subset.h | 6 +++--- + 2 files changed, 6 insertions(+), 6 deletions(-) + +commit dbf0964a0ff2fd36730c4179ab7ec7e8f0bd11cb +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 4 13:17:14 2023 -0700 + + [map] Doc + + src/hb-map.cc | 2 ++ + 1 file changed, 2 insertions(+) + +commit 0875a420f7e04a27971b6b69a3364ba3eff9ed0b +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 4 13:11:37 2023 -0700 + + [map] Doc + + src/hb-map.cc | 2 ++ + 1 file changed, 2 insertions(+) + +commit ffafcf9633eae1c679b8835a31e9b00dca740dde +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 4 12:55:59 2023 -0700 + + [map] Add hb_map_next() + + docs/harfbuzz-sections.txt | 1 + + src/hb-map.cc | 25 ++++++++++++++++++++++++- + src/hb-map.h | 6 ++++++ + src/hb-map.hh | 24 ++++++++++++++++++++++++ + src/test-map.cc | 27 +++++++++++++++++++++++++++ + 5 files changed, 82 insertions(+), 1 deletion(-) + +commit 3e471bbc0801d8fc0093d4e536633e6a89d4d32b +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 4 11:53:49 2023 -0700 + + [vector] Better test + + src/hb-vector.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 45fc919a10dc7d13ea386904bddb601512ba2f28 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 4 11:35:44 2023 -0700 + + [bit-set] Minor setting length on allocation failure + + src/hb-bit-set.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit d8509061e6167a7132c7d4aa414df65d95703ee6 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Jan 4 11:33:54 2023 -0700 + + [vector] It's okay if shrinking fails + + src/hb-vector.hh | 3 +++ + 1 file changed, 3 insertions(+) + +commit 6c272b920d14f34494a8415bad15e794be313fc5 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jan 3 13:00:41 2023 -0700 + + [set] Don't discard allocation in operator= + + That had caused memory thrashing. + + Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=54789 + + src/hb-bit-set.hh | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +commit e6bbf112ea05482e48136f910518f57b2b153256 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Jan 3 12:35:48 2023 -0700 + + [buffer] Better document set_content_type + + Fixes https://github.com/harfbuzz/harfbuzz/issues/4000 + + src/hb-buffer.cc | 26 ++++++++++++++++++++++++++ + 1 file changed, 26 insertions(+) + +commit 8f2345ca365de26d3d4888c9087181ebccde29d4 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 2 18:08:45 2023 -0700 + + Use more vector resize_exact + + src/hb-bit-set.hh | 7 ++----- + src/hb-cff2-interp-cs.hh | 6 ++---- + 2 files changed, 4 insertions(+), 9 deletions(-) + +commit b6be4550209af5cf33f3d0a35602ca8edeafcc5d +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 2 18:05:43 2023 -0700 + + [vector] Add resize_exact() + + src/hb-subset-cff-common.hh | 21 +++++++-------------- + src/hb-vector.hh | 8 ++++++-- + 2 files changed, 13 insertions(+), 16 deletions(-) + +commit a516ce97e03877389bdb60a62234302e19266894 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 2 17:58:51 2023 -0700 + + [subset-cff] Add a few exact-allocation calls + + src/hb-subset-cff-common.hh | 7 +++++++ + 1 file changed, 7 insertions(+) + +commit 4a435dc0243329a409d4c23ca0ec07ca19fea9cb +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 2 17:41:31 2023 -0700 + + [subset-cff] Remove an unlikely + + src/hb-subset-cff-common.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit f8c578fd93b22a144f5a28e504e629b8adcb3f5c +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 2 17:33:04 2023 -0700 + + [subset-cff] Remove commented-out line + + src/hb-subset-cff-common.hh | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +commit d5e1748f31231d5283e6c006d4114c139f9d261b +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 2 12:26:43 2023 -0700 + + [cff] Simplify add_op() + + src/hb-cff-interp-common.hh | 12 +----------- + 1 file changed, 1 insertion(+), 11 deletions(-) + +commit 27531d853e36ba1050da6158d7349bdf85b0f9e2 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 2 12:05:11 2023 -0700 + + [subset-cff] Move code around + + src/hb-subset-cff-common.hh | 64 ++++++++++++++++++++++----------------------- + 1 file changed, 32 insertions(+), 32 deletions(-) + +commit 9afe5f973ea62957542830662f4c61d3ce795678 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 2 11:44:29 2023 -0700 + + [vector] Fix leak + + Discovered by https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=54767 + + src/hb-vector.hh | 21 ++++++++++++++++++--- + 1 file changed, 18 insertions(+), 3 deletions(-) + +commit 4f013c42f0c0d87b068ff349fd96cb3dcff1831d +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 2 10:38:30 2023 -0700 + + [subset-cff] Always compact charstrings + + Reduces non-preprocessed subsetting memory footprint significantly. + + src/hb-subset-cff-common.hh | 19 ++++++++++++------- + 1 file changed, 12 insertions(+), 7 deletions(-) + +commit d3ed6eed437d3123195d436a43babfaab6266edf +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 1 23:29:35 2023 -0700 + + [cff] Initialize a member variable + + For good hygiene. + + src/hb-cff-interp-common.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 8ccc704c9af497cfeca5d58d80e42e043203c738 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Mon Jan 2 18:14:55 2023 +0200 + + [ci/win32] Disable Cairo tests as well + + .ci/build-win32.sh | 2 +- + .ci/build-win64.sh | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +commit 5d81fc0f1cec0ddece4e083e9befa4c4b429c546 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Wed Mar 23 06:07:15 2022 +0200 + + [meson] Update Cairo subproject + + Update to the latest master to get color fonts working. Disable dwrite + on Windows builds as it does not compile and we don’t need it. + + .ci/build-win32.sh | 1 + + .ci/build-win64.sh | 1 + + subprojects/cairo.wrap | 4 ++-- + 3 files changed, 4 insertions(+), 2 deletions(-) + +commit 55a7d81740fd4e932ac101cb0c869eaa384fedc3 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 1 23:07:42 2023 -0700 + + [vector] Allocate exact size in operator= + + src/hb-vector.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 449910d43118b6f935fa1231531cc16c072cd455 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 1 19:27:10 2023 -0700 + + [vector] Allocate exact size in constructor + + src/hb-vector.hh | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit 4dda1f7881d7584598467efb641927b56230250b +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 1 19:00:04 2023 -0700 + + [cff-subset] Compact charstrings just after parsing + + Massive peak-memory saving when processing face. + + src/hb-subset-cff-common.hh | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) + +commit a7617c3cf194dfd5d2b96095f43915b60b41fb44 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 1 18:58:08 2023 -0700 + + [cff-subset] Drop hints just after parsing charstring + + In prep for next commit. + + src/hb-subset-cff-common.hh | 36 ++++++++++++------------------------ + 1 file changed, 12 insertions(+), 24 deletions(-) + +commit b1c4cb0caeae6c750c0cfd42fabb7fcb79ea30fd +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 1 18:41:19 2023 -0700 + + [cff2] Use a shrink instead of resize + + Such that we can free the allocation. + + src/hb-cff2-interp-cs.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit b87360763ece0494951071793140c1e4336cf19b +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 1 18:38:28 2023 -0700 + + [vector] Support shrinking storage if exact size provided + + Only do it if requested size is less than quarter of allocated size. + + This has massive benefit during CFF subset preprocessing. + + src/hb-vector.hh | 33 +++++++++++++++++++++++++-------- + 1 file changed, 25 insertions(+), 8 deletions(-) + +commit 1119e6029609e31cc7548ddfb7ac5ba2c3001f0c +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 1 18:31:32 2023 -0700 + + [subset-cff] Tweak another storage allocation + + src/hb-subset-cff-common.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 85e8f2b53ff373abf108053201d31742f6b24a79 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 1 18:26:08 2023 -0700 + + [hb-subset] Initialize preprocess variable + + util/hb-subset.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit f0b5286b36fb9eb45bf53ee3a6e2d8b5ee807471 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 1 17:04:59 2023 -0700 + + [features] Sort + + src/hb-features.h.in | 48 ++++++++++++++++++++++++------------------------ + 1 file changed, 24 insertions(+), 24 deletions(-) + +commit 4a5bd7a9267973c134c3fe1198d8cf8cf94cb4f1 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 1 16:53:28 2023 -0700 + + [subset] Add hb_subset_input_keep_everything() + + Fixes https://github.com/harfbuzz/harfbuzz/issues/3998 + + New API: + + hb_subset_input_keep_everything() + + docs/harfbuzz-sections.txt | 1 + + src/hb-subset-input.cc | 56 ++++++++++++++++++++++++++++++---------------- + src/hb-subset.h | 3 +++ + util/hb-subset.cc | 15 +++++++++++++ + 4 files changed, 56 insertions(+), 19 deletions(-) + +commit d87add41b3ff6ce19cf387cf20542525e8237b14 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 1 16:27:26 2023 -0700 + + [hb-subset] Rename --preprocess-face to --preprocess + + Keep old name working but hidden. + + util/hb-subset.cc | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +commit 52110f13b02678c24daa3c1b588683a8fb13e125 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 1 16:22:02 2023 -0700 + + [subset-input] Refactor copy-pasta code + + src/hb-subset-input.cc | 39 ++++++++++++++------------------------- + 1 file changed, 14 insertions(+), 25 deletions(-) + +commit 4adc748b13c3fdcb60162a269982590925750ce3 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sun Jan 1 09:46:11 2023 -0500 + + Move Color tables to src/OT/Color/ + + src/Makefile.sources | 12 ++++++------ + .../Color/CBDT/CBDT.hh} | 10 +++++----- + .../Color/COLR/COLR.hh} | 18 +++++++++--------- + .../Color/COLR/colrv1-closure.hh} | 12 ++++++------ + .../Color/CPAL/CPAL.hh} | 12 ++++++------ + .../Color/sbix/sbix.hh} | 12 ++++++------ + src/{hb-ot-color-svg-table.hh => OT/Color/svg/svg.hh} | 12 ++++++------ + src/hb-ot-color.cc | 10 +++++----- + src/hb-ot-face.cc | 6 +++--- + src/hb-ot-font.cc | 8 ++++---- + src/hb-static.cc | 2 +- + src/hb-subset-plan.cc | 4 ++-- + src/hb-subset.cc | 8 ++++---- + src/meson.build | 10 +++++----- + 14 files changed, 68 insertions(+), 68 deletions(-) + +commit a5f1f3a05cc72a127ac29aa78c3b775ed4d63adc +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Jan 1 13:14:04 2023 -0700 + + [ft] Conditionalize all COLOR code on >= 2.11.1 + + Fixes https://github.com/harfbuzz/harfbuzz/issues/3994 + + src/hb-ft-colr.hh | 9 --------- + src/hb-ft.cc | 6 ++++++ + 2 files changed, 6 insertions(+), 9 deletions(-) + +commit dc5179d465e5d39a60897a4c8cf14da6c2f6fefa +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sun Jan 1 09:23:07 2023 -0500 + + Drop hb-ot-color-colr-table.cc + + Move everything into the .hh file. + + src/Makefile.sources | 1 - + src/harfbuzz-subset.cc | 1 - + src/harfbuzz.cc | 1 - + src/hb-ot-color-colr-table.cc | 27 --------------------------- + src/hb-ot-color-colr-table.hh | 26 ++++++++++++++++++++++++-- + src/meson.build | 1 - + 6 files changed, 24 insertions(+), 33 deletions(-) + +commit 27684f14be2a72b8aab863844931a980ace76db5 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Sun Jan 1 00:41:55 2023 +0200 + + [introspection] Skip sources not usable with GObject Introspection + + There is no point in generating GIR for code interfacing with libraries + without introspection integration. This fixes spurious warnings on macOS + when g-ir-scanner mistakenly tries to scan system headers. + + src/meson.build | 21 +++++++++++++-------- + 1 file changed, 13 insertions(+), 8 deletions(-) + +commit 2bd09a99c1b1e84fe69c854f2b42cf9a55a006d8 +Merge: 3ff91c449 f60e7e3f8 +Author: Matthias Clasen <matthias.clasen@gmail.com> +Date: Sun Jan 1 10:30:40 2023 -0500 + + Merge pull request #3996 from harfbuzz/drop-unused-file + + Drop an unused file + +commit f60e7e3f8c91c81c21f401e654389767e182db41 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sun Jan 1 09:50:27 2023 -0500 + + Drop an unused file + + src/hb-ot-color-colrv1-paint.hh | 286 ---------------------------------------- + 1 file changed, 286 deletions(-) + +commit 3ff91c449f52d5cccdc24639a836d30878a62188 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 31 14:49:41 2022 -0700 + + [paint] Optimize transform operations again + + src/hb-ft-colr.hh | 46 +++++++++++----------- + src/hb-ot-color-colr-table.hh | 74 +++++++++++++++++------------------ + src/hb-paint.hh | 90 ++++++++++++++++--------------------------- + 3 files changed, 94 insertions(+), 116 deletions(-) + +commit 1a0dd49f1ef09af11235645b65f32c65704bcae6 +Merge: edb812345 9f3b59fe6 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 31 14:38:06 2022 -0700 + + Merge pull request #3991 from harfbuzz/paint-optimize-transform + + Paint optimize transform + +commit 9f3b59fe6b27e3f8c2a32a89263264ceaceaa5be +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sat Dec 31 16:19:20 2022 -0500 + + Update expected test results + + These need updates, because they record + every callback, and we've changed what + callbacks are happening. + + test/api/results/test-20-0-106 | 4 ++-- + test/api/results/test-20-0-123 | 8 ++++---- + 2 files changed, 6 insertions(+), 6 deletions(-) + +commit edb812345a10a4eb737e2ab96578a49b533cddd7 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 31 13:55:41 2022 -0700 + + [subset-cff] Another exact allocation + + src/hb-subset-cff-common.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 54dd01b86538f91dbbb75dab937bff01266fa4f8 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 31 13:33:25 2022 -0700 + + [set] Use exact-allocation in copying + + Significantly reduces memory consumption. + + src/hb-bit-set.hh | 2 ++ + 1 file changed, 2 insertions(+) + +commit 2c64048bc4b91cc45427faa437ae8368a5443c5f +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 31 13:26:00 2022 -0700 + + [subset] Another exact-allocation + + src/hb-subset.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 0ec0214f10ee17786531d54416d4f006ff9c818b +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 31 13:18:32 2022 -0700 + + [cff-subset] Adjust pre-allocation + + Reduces memory use significantly. + + src/hb-cff-interp-common.hh | 2 +- + src/hb-subset-cff-common.hh | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +commit b88ca81814059c71c0361d741c70b71b652240b7 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 31 12:51:28 2022 -0700 + + [paint-extents] Minor reorder + + src/hb-paint-extents.hh | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +commit 0c6a72133766240c13649a69e783e12ad30ae08d +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 31 12:42:29 2022 -0700 + + [set] Another exact-size allocation + + src/hb-bit-set.hh | 1 + + 1 file changed, 1 insertion(+) + +commit b803024cafc76a5f23c88b8f248e4d19125d7933 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 31 12:40:07 2022 -0700 + + [cff2] Another exact-size allocation + + src/hb-cff2-interp-cs.hh | 1 + + 1 file changed, 1 insertion(+) + +commit 3d4659beaad042fe0b3f0a750ced96e8ca361cb9 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 31 12:38:58 2022 -0700 + + [cff2] Use exact-size vector allocation for blends + + src/hb-cff2-interp-cs.hh | 1 + + 1 file changed, 1 insertion(+) + +commit 92e5933ee6c6382ea168ee5fdd30d80cece131d1 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 31 12:35:30 2022 -0700 + + [vector] A couple more exact-size allocations + + src/hb-ot-name-table.hh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 2eacc37e08a07c2e79139056ae09c1047cbff5cd +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 31 12:27:13 2022 -0700 + + [vector] Add internal API for exact-size allocation + + Use it from a couple of places. + + src/OT/glyf/SimpleGlyph.hh | 8 ++++---- + src/OT/glyf/glyf.hh | 2 +- + src/hb-ot-layout-gsubgpos.hh | 2 +- + src/hb-repacker.hh | 2 +- + src/hb-serialize.hh | 4 ++-- + src/hb-vector.hh | 6 +++--- + 6 files changed, 12 insertions(+), 12 deletions(-) + +commit a0b46f3f6bd4be906cde1f8a7fab765690c13f2f +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 31 12:15:14 2022 -0700 + + [machinery] Refactor shared code into a macro + + src/hb-machinery.hh | 48 ++++++++++++++++-------------------------------- + 1 file changed, 16 insertions(+), 32 deletions(-) + +commit ebb475bae7b8e7af300251e4fd2d14a56e292b90 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 31 12:11:14 2022 -0700 + + [multimap] Add consts + + src/hb-multimap.hh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 9e3ff0e9f0078aa17d616ae9670a3843949a212d +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 31 11:55:45 2022 -0700 + + [paint] Fixup + + src/hb-ft-colr.hh | 4 ++++ + src/hb-ot-color-colr-table.hh | 13 +++++++++++-- + 2 files changed, 15 insertions(+), 2 deletions(-) + +commit 6b47fcb17aa138d1c60e07516ce4323c9fe594cc +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 31 11:40:12 2022 -0700 + + [paint] Add internal push_skew/pop_skew API + + src/hb-ft-colr.hh | 8 ++++---- + src/hb-ot-color-colr-table.hh | 16 ++++++++-------- + src/hb-paint.hh | 17 +++++++++++++++++ + 3 files changed, 29 insertions(+), 12 deletions(-) + +commit 46adf31b4c6ac45c213c7ac492f27a18de8e1af5 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 31 11:35:39 2022 -0700 + + [paint] Add internal push_rotate/pop_rotate API + + src/hb-ft-colr.hh | 6 ++---- + src/hb-ot-color-colr-table.hh | 12 ++++-------- + src/hb-paint.hh | 17 +++++++++++++++++ + 3 files changed, 23 insertions(+), 12 deletions(-) + +commit ce7835124a741a75748b941ef1ff228e70437dfe +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 31 11:32:15 2022 -0700 + + [paint] Add internal push_scale/pop_scale API + + src/hb-ft-colr.hh | 10 ++++------ + src/hb-ot-color-colr-table.hh | 28 ++++++++++++---------------- + src/hb-paint.hh | 14 ++++++++++++++ + 3 files changed, 30 insertions(+), 22 deletions(-) + +commit 7363eb373a14310a3d15b5a5889e4c158a55e533 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 31 11:24:42 2022 -0700 + + [paint] Add internal push_translate/pop_translate + + src/hb-ft-colr.hh | 63 +++++++++++++++---------------------------- + src/hb-ot-color-colr-table.hh | 41 ++++++++++++++-------------- + src/hb-paint.hh | 14 ++++++++++ + 3 files changed, 56 insertions(+), 62 deletions(-) + +commit df91677997c42cf5639718755267488af1389140 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 31 11:12:02 2022 -0700 + + [paint] Call internal API internally + + src/hb-paint.hh | 13 +++++++------ + 1 file changed, 7 insertions(+), 6 deletions(-) + +commit 99da0e6cc3433a86710c9ce6fec662afa677f03f +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 31 11:04:40 2022 -0700 + + [paint] Avoid div-by-zero + + src/hb-paint.hh | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +commit 4e94b65cffe4b2308c2c74fc113a93d597602b0b +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 31 10:53:40 2022 -0700 + + [paint-extents] Const-correctness + + src/hb-paint-extents.hh | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +commit f6dc4698ef4ea042dd4858fd32fd0916b779b954 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 31 10:52:32 2022 -0700 + + [paint-extents] Minor move variable + + src/hb-paint-extents.hh | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +commit 4e7807a09028a27f0240e6b8cee879a848c96f99 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 31 10:50:30 2022 -0700 + + [paint-extents] Rename variable + + src/hb-paint-extents.hh | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +commit c86d1892ad32a6ef07ae0e67fe6e5deaaababc00 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 31 10:46:46 2022 -0700 + + [paint-extents] Move code around + + src/hb-paint-extents.cc | 32 +++++++------------------------- + src/hb-paint-extents.hh | 18 ++++++++++++++++++ + 2 files changed, 25 insertions(+), 25 deletions(-) + +commit d9a9bd8fa8feda041ef39f78085d314677842159 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 31 10:41:30 2022 -0700 + + [paint-extents] Add HB_UNUSED + + src/hb-paint-extents.cc | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +commit 956ccb11a8e29289302ff85f76713ceb31cfecc7 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sat Dec 31 10:14:37 2022 -0500 + + [docs] Add a section about rendering + + docs/usermanual-fonts-and-faces.xml | 42 +++++++++++++++++++++++++++++++++++++ + 1 file changed, 42 insertions(+) + +commit 63cd1cce67c8459696cf49c53aad5e4f1830ccb7 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sat Dec 31 08:56:12 2022 -0500 + + [docs] Drop stale commented-out section + + Freetype integration is documented elsewhere now. + + docs/usermanual-fonts-and-faces.xml | 14 -------------- + 1 file changed, 14 deletions(-) + +commit a390590451ef75e069ea5c67c3843b526f01fcde +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sat Dec 31 08:51:19 2022 -0500 + + Mention named instances in the var-fonts section + + docs/usermanual-fonts-and-faces.xml | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +commit 37e90c64c17656e74f83e932ae750aed347855a7 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 30 15:41:40 2022 -0700 + + [cairo] Fix warnings + + src/hb-cairo-utils.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 04464c55b2644de67a9599a72c3c9126a8718a18 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 30 14:55:32 2022 -0700 + + [pool] Change chunk-len from 16 to 32 + + src/hb-pool.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit d7941e04df605549f97c9a48469c5c204609610a +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 30 14:47:47 2022 -0700 + + [paint-extents] Unlikely + + src/hb-paint-extents.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit ca844b69759c0d7b6c7511267c935330392dab00 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 30 14:47:24 2022 -0700 + + [paint-extents] Whitespace + + src/hb-paint-extents.cc | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +commit 62ca2be39dd1bb03a99417ba57e0d8a18e407534 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 30 14:41:36 2022 -0700 + + [paint-extents] Implement quadratic callback + + src/hb-paint-extents.cc | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +commit 7389efd8e0d5ee18b5139932214d326c7901ab15 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 30 13:58:34 2022 -0700 + + [post] Pre-alloc name index array + + src/hb-ot-post-table.hh | 1 + + 1 file changed, 1 insertion(+) + +commit 36bef5dccf0ba3b437fdf4246e39e7e1c5219ce8 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 30 13:17:23 2022 -0700 + + [gsubgpos] Prealloc subtables vector + + src/hb-ot-layout-gsubgpos.hh | 1 + + 1 file changed, 1 insertion(+) + +commit 00060d99f300575dab95b255e31f75787f34078e +Author: Khaled Hosny <khaled@aliftype.com> +Date: Fri Dec 30 22:55:56 2022 +0200 + + [hb-cairo] Silence warning when building with FreeType + + In file included from ../util/hb-view.cc:33: + In file included from ../util/view-cairo.hh:32: + ../util/helper-cairo.hh:102:7: warning: variable 'cairo_face' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] + if (use_hb_draw) + ^~~~~~~~~~~ + ../util/helper-cairo.hh:129:64: note: uninitialized use occurs here + cairo_scaled_font_t *scaled_font = cairo_scaled_font_create (cairo_face, + ^~~~~~~~~~ + ../util/helper-cairo.hh:102:3: note: remove the 'if' if its condition is always true + if (use_hb_draw) + ^~~~~~~~~~~~~~~~ + ../util/helper-cairo.hh:101:32: note: initialize the variable 'cairo_face' to silence this warning + cairo_font_face_t *cairo_face; + ^ + = nullptr + + We know that cairo_face will always be assigned since use_hb_draw will + always be true, but the compiler does not know that. + + util/helper-cairo.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit a45bf5b04c907c7071a41bac3235459f02eb1f8f +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 30 11:19:36 2022 -0700 + + [ft-colr] Require FreeType >= 2.11.1 + + Fixes https://github.com/harfbuzz/harfbuzz/issues/3989 + + src/hb-ft-colr.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit ceba6c9a90751fa82264889d31b0d8d6794bd2d9 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 30 10:44:34 2022 -0700 + + [config] Sort + + src/hb-config.hh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 0d98c79b103a5bb2dfb684549077096853e08c55 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Dec 29 21:07:38 2022 -0700 + + [util] Centralize includes again + + util/helper-cairo.hh | 5 ----- + util/options.hh | 4 ++++ + 2 files changed, 4 insertions(+), 5 deletions(-) + +commit d90ccc1c5c28eb0480c10d57a53daea2c17c0384 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Dec 29 21:02:06 2022 -0700 + + [view] More includes + + util/helper-cairo.hh | 1 + + 1 file changed, 1 insertion(+) + +commit 969914b2b526a8017dfc85efa6a23a8453d17666 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Dec 29 21:01:16 2022 -0700 + + [view] Clean up includes + + util/ansi-print.hh | 5 ----- + util/helper-cairo.hh | 4 ++++ + util/options.hh | 3 --- + 3 files changed, 4 insertions(+), 8 deletions(-) + +commit 2bbc57c3c4ed4c54cd9f0fcab48b17a1d57a5823 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Dec 29 20:41:55 2022 -0700 + + [chafa] Residual + + util/helper-cairo-ansi.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 962d4925b27a3adf3805b98e5b8d221161ded421 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Dec 29 20:39:02 2022 -0700 + + [ansi] Optimize write + + util/ansi-print.hh | 21 ++++++++++++--------- + 1 file changed, 12 insertions(+), 9 deletions(-) + +commit a35f8e340baee34d5b31df425b3044e520626c96 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Dec 29 20:34:23 2022 -0700 + + [ansi] Whitespace + + util/ansi-print.hh | 25 +++++++++++++++++-------- + 1 file changed, 17 insertions(+), 8 deletions(-) + +commit 0004ec13a6334f6a279922c4f7111277bec20a60 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Dec 29 20:26:42 2022 -0700 + + [view] Write ansi output to --output-file + + Was writing to stdout all this time! + + util/ansi-print.hh | 23 ++++++++++++++++------- + util/helper-cairo-ansi.hh | 12 ++++++++---- + 2 files changed, 24 insertions(+), 11 deletions(-) + +commit 3a319b59bd4e52a20dbe7cd34ab85efe71a4831d +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Dec 29 20:26:09 2022 -0700 + + [ansi] Write \e directly + + util/ansi-print.hh | 10 ++++------ + 1 file changed, 4 insertions(+), 6 deletions(-) + +commit ab8b9b444305dc01f5205ef0b7398a78184511b2 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Dec 29 18:33:12 2022 -0700 + + [view] Streamline cairo-ft face lifecycle management + + util/helper-cairo-ft.hh | 10 ++++++++++ + util/helper-cairo.hh | 7 ------- + 2 files changed, 10 insertions(+), 7 deletions(-) + +commit 228a415470dec6c58b5543d00ca1fd7f72980be3 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Dec 29 18:19:06 2022 -0700 + + [view-cairo] Minor subpixel-bits + + util/helper-cairo.hh | 4 ++-- + util/view-cairo.hh | 12 ++++++------ + 2 files changed, 8 insertions(+), 8 deletions(-) + +commit 74d29cd16890b013302626bf566dabe26e3300e2 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Dec 29 18:11:41 2022 -0700 + + [helper-cairo] Remove a method + + util/helper-cairo.hh | 66 ++++++++++++++++++++++++---------------------------- + util/view-cairo.hh | 3 +-- + 2 files changed, 32 insertions(+), 37 deletions(-) + +commit f2a6643fc15da58c5aec60a90b3eeea6af4d0ea2 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Dec 29 18:00:39 2022 -0700 + + [cairo] Docs + + src/hb-cairo.cc | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +commit bfce4a60465e47f8c5f2cb916972e07242bbadc5 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Dec 29 10:43:37 2022 -0700 + + [cairo] Remove error path + + Assume cairo API always returns non-NULL. + + src/hb-cairo.cc | 19 ------------------- + 1 file changed, 19 deletions(-) + +commit b1de87b7f1ebe62fc9325679489718494ec1d3a2 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Dec 29 10:34:47 2022 -0700 + + [cairo] Document get_glyphs() arguments as inout + + src/hb-cairo.cc | 41 ++++++++++++++++++++++++++++++++++------- + util/helper-cairo.hh | 2 ++ + 2 files changed, 36 insertions(+), 7 deletions(-) + +commit 3be9fa07f65130b3b534095d0c6cb2b36b85acdd +Author: Matthias Clasen <mclasen@redhat.com> +Date: Thu Dec 29 10:14:51 2022 -0500 + + [docs] Mention new font-funcs in the user manual + + docs/usermanual-fonts-and-faces.xml | 14 +++++++++++++- + 1 file changed, 13 insertions(+), 1 deletion(-) + +commit 2c2121784a6b162b2cdbb31b1388e8abc15691b8 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Thu Dec 29 09:57:56 2022 -0500 + + [docs] Add a Cairo integration section + + docs/usermanual-integration.xml | 44 ++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 43 insertions(+), 1 deletion(-) + +commit 89bd7f64ae91d9dfe2cf498233f38ecf054ec484 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Thu Dec 29 08:05:16 2022 -0500 + + [hb-cairo] Small docs fixes + + src/hb-cairo.cc | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit c9206df1667101fa4fa5c54ac6e0d9750a0d2d1f +Author: Khaled Hosny <khaled@aliftype.com> +Date: Thu Dec 29 16:05:19 2022 +0200 + + [hb-cairo] Fix warnings + + src/hb-cairo-utils.cc | 58 +++++++++++++++++++++++++-------------------------- + 1 file changed, 29 insertions(+), 29 deletions(-) + +commit 723e7a48e213ad9216f49762d6881745c36f6678 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Thu Dec 29 15:49:21 2022 +0200 + + [docs] Small fixes + + src/hb-cairo.cc | 6 +++--- + src/hb-font.h | 2 +- + 2 files changed, 4 insertions(+), 4 deletions(-) + +commit 313f74a6931eef76d3d35a09c38c90851342a88f +Author: Matthias Clasen <mclasen@redhat.com> +Date: Wed Jun 29 07:32:58 2022 -0400 + + Add a basic test for hb-coretext api + + This tests what would be my minimum assumption + about this api. It was written blindly. + + test/api/Makefile.am | 6 ++++ + test/api/meson.build | 6 ++++ + test/api/test-coretext.c | 79 ++++++++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 91 insertions(+) + +commit 661baf403c9c6e8a8c7562adaf8cf39e21185101 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Wed Jun 29 07:31:46 2022 -0400 + + Add a basic test for hb-ft api + + This tests what would be my minimum assumption + about this api. + + test/api/Makefile.am | 4 ++ + test/api/meson.build | 5 ++- + test/api/test-ft.c | 120 +++++++++++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 128 insertions(+), 1 deletion(-) + +commit 67456a7a02feee7bf9644f01402cbfade85bcac2 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Wed Dec 28 13:07:54 2022 -0500 + + [ft] Some more docs clarifications + + src/hb-ft.cc | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +commit c612d068e8a5b90675c4e27a8ca2bd90ba8798eb +Author: Matthias Clasen <mclasen@redhat.com> +Date: Wed Dec 28 10:42:59 2022 -0500 + + [ft] Clarify docs around faces too + + src/hb-ft.cc | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +commit 4dc955bb46f9f945e2cf0d79c0a12b15d200e3f7 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Wed Dec 28 10:04:21 2022 -0500 + + [ft] Clarify docs + + Add some clarifications on what fonts these apis + work with. + + src/hb-ft.cc | 20 +++++++++++++++++--- + 1 file changed, 17 insertions(+), 3 deletions(-) + +commit ef20b5e66f3e693b2c9e08f0e03802d2b8c2456c +Author: Matthias Clasen <mclasen@redhat.com> +Date: Wed Dec 28 08:51:27 2022 -0500 + + Typo fix + + src/meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit dc9ca63763234d5082db5e88944d1fccb65ed565 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Dec 27 17:49:02 2022 -0700 + + [hb-view] Remove stale disabled code path + + With color rendering that code path is wrong anyway. + And cairo now supports subpixel text positioning. + + util/view-cairo.hh | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +commit 5efb3bc6919f771f68780e3879e4be0d5121e99e +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Dec 27 17:47:46 2022 -0700 + + [hb-view] Set hb-cairo scale-factor + + Unused. + + util/helper-cairo.hh | 3 +++ + 1 file changed, 3 insertions(+) + +commit 81c04b0c2176b6dce850a76ace059b74d59bbee5 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Dec 27 17:46:25 2022 -0700 + + [cairo] Add separate x/y scale factors + + src/hb-cairo.cc | 43 ++++++++++++++++++++++--------------------- + src/hb-cairo.h | 3 ++- + util/helper-cairo.hh | 2 +- + 3 files changed, 25 insertions(+), 23 deletions(-) + +commit 50b7fff0c6f38819a66735d66ebd670655b4e961 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Dec 27 17:37:42 2022 -0700 + + [cairo] Fix text_to_glyphs scale factor + + src/hb-cairo.cc | 8 +------- + 1 file changed, 1 insertion(+), 7 deletions(-) + +commit 8f62b8c6bb1ecf1ef5abcdf88798076d48ef28b5 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Dec 27 17:26:39 2022 -0700 + + [cairo] Fix cluster conversion + + src/hb-cairo.cc | 13 +++---------- + 1 file changed, 3 insertions(+), 10 deletions(-) + +commit 326db329f84793152838ff8c45d284f4766c0a7a +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Dec 27 14:38:17 2022 -0700 + + [directwrite] Simplify delete + + Fixes https://github.com/harfbuzz/harfbuzz/issues/3981 + + src/hb-directwrite.cc | 12 ++++-------- + 1 file changed, 4 insertions(+), 8 deletions(-) + +commit 7b0f9abc897f656addc55ad875bd4737cbb17128 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Dec 27 12:37:53 2022 -0700 + + [paint] Add back "remote-control" API + + This reverts commit f146299a405b8338542a245b85e664de29f0c972. + + docs/harfbuzz-sections.txt | 13 +++ + src/hb-paint.cc | 246 +++++++++++++++++++++++++++++++++++++++++++++ + src/hb-paint.h | 67 ++++++++++++ + 3 files changed, 326 insertions(+) + +commit 43b0364edacaa487ea18bc0261d72e3e45e42197 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Dec 27 12:29:53 2022 -0700 + + [paint] Document composition modes + + src/hb-paint.h | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 60 insertions(+) + +commit ec9e8a5993727174c765572cd71eba6fd3b38f90 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Dec 27 12:22:56 2022 -0700 + + [paint] Document extend modes. + + src/hb-paint.h | 8 ++++++++ + 1 file changed, 8 insertions(+) + +commit fa3fa9422deb7bf9330f62412bbe24fe11eb7c4d +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Dec 27 11:54:23 2022 -0700 + + [cairo] Doc + + src/hb-cairo.cc | 4 ++++ + 1 file changed, 4 insertions(+) + +commit bbf6f42d3b3b7d5310255013eb1bb17528565121 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Dec 27 11:50:06 2022 -0700 + + [cairo] TODO + + src/hb-cairo.cc | 3 +++ + 1 file changed, 3 insertions(+) + +commit f9fc13287b5b384cb3485687c150d284a9fe53b2 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Dec 27 11:08:34 2022 -0700 + + [hb-cairo] Return hb_font_t* from init-func + + src/hb-cairo.cc | 2 +- + src/hb-cairo.h | 8 +++++--- + 2 files changed, 6 insertions(+), 4 deletions(-) + +commit d18903e44334d198e1d5445a4316da17887a75dc +Author: Matthias Clasen <mclasen@redhat.com> +Date: Tue Dec 27 09:25:05 2022 -0500 + + Add def files for libharfbuzz-cairo + + src/Makefile.am | 7 ++++++- + src/meson.build | 6 ++++++ + 2 files changed, 12 insertions(+), 1 deletion(-) + +commit d88787b6cab610ab961648e9f6c000a69c25d43b +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Dec 27 10:59:17 2022 -0700 + + [cairo] Add func to init fonts on creation + + To set, for example, font-funcs. + + docs/harfbuzz-sections.txt | 6 +- + src/hb-cairo.cc | 138 ++++++++++++++++++++++++++++++--------------- + src/hb-cairo.h | 30 ++++++++-- + 3 files changed, 121 insertions(+), 53 deletions(-) + +commit c52bff2d6132c5716825f45bf7e0a64e48e83a51 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Dec 27 10:42:13 2022 -0700 + + [cairo] Hide internal symbols + + src/hb-cairo-utils.hh | 44 ++++++++++++++++++++++++-------------------- + 1 file changed, 24 insertions(+), 20 deletions(-) + +commit 7d3b3739253a901b88cd4da9916007ae7166c9de +Author: Matthias Clasen <mclasen@redhat.com> +Date: Tue Dec 27 08:37:46 2022 -0500 + + Fix the autotools build + + util/Makefile.sources | 1 - + 1 file changed, 1 deletion(-) + +commit 34aa8b0148dc03fcaff7dfe09ca7dab7f3c91a97 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Dec 26 16:54:31 2022 -0700 + + [cairo] Add to library tests + + src/check-libstdc++.py | 2 +- + src/check-symbols.py | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +commit 5fdfe6ae5d8118d7e2c0f90a8a7014e4d60a3a28 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Dec 26 16:52:53 2022 -0700 + + [cairo] Use hb_qsort + + src/hb-cairo-utils.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 21573265e92006eedac5bd5a3d43dc5b28e108b4 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Dec 26 16:52:13 2022 -0700 + + [cairo] More namespacing + + src/hb-cairo-utils.cc | 196 +++++++++++++++++++++++++------------------------- + 1 file changed, 98 insertions(+), 98 deletions(-) + +commit 84d1b00cd4e29d428d60b45610231b9b93967693 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Dec 26 16:45:23 2022 -0700 + + [cairo] More namespacing + + src/hb-cairo-utils.cc | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +commit 8f16e98c1b645d7374f0e61388d8e6a427a53c63 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Dec 26 16:44:07 2022 -0700 + + [cairo] Namespace types + + src/hb-cairo-utils.cc | 84 +++++++++++++++++++++++++-------------------------- + 1 file changed, 42 insertions(+), 42 deletions(-) + +commit 488be5246778b8e4f7177b84bb452f48e4217b41 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Dec 26 16:42:22 2022 -0700 + + [cairo] Try fix msvc build + + src/hb-cairo-utils.cc | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +commit c652e8e1b7a2a92d898b08941dc081546a26c101 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Dec 26 16:25:22 2022 -0700 + + [cairo] Docs + + src/hb-cairo.cc | 13 ++++++++----- + 1 file changed, 8 insertions(+), 5 deletions(-) + +commit 23980d3cb2e0d374933f28e58ff0631b4a59e1e0 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Dec 26 16:22:35 2022 -0700 + + [cairo] Docs + + src/hb-cairo.cc | 1 + + 1 file changed, 1 insertion(+) + +commit f5fd46aa3d905a7c69c12fa35c48d8c3b64f0cf2 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Dec 26 16:18:27 2022 -0700 + + [cairo] Docs + + src/hb-cairo.cc | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +commit 36482b684b16f752965485b41c39558c1f144504 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Dec 26 16:15:06 2022 -0700 + + [cairo] Err, utf8_clusters + + src/hb-cairo.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 48cb25dd36a83f48748b295eebdfd74de170dc41 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Dec 26 16:13:57 2022 -0700 + + [cairo] Implement (untested) text_to_glyphs callback + + src/hb-cairo.cc | 41 +++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 41 insertions(+) + +commit c38abcb3fbe30d835988f2a0920c5eb80cf42266 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Dec 26 16:03:25 2022 -0700 + + [cairo] Add x,y args to get_glyphs + + src/hb-cairo.cc | 18 +++++++++++------- + src/hb-cairo.h | 2 ++ + util/helper-cairo.hh | 10 ++++------ + 3 files changed, 17 insertions(+), 13 deletions(-) + +commit 847ed695473306e76c3084df893e2c24bf79c440 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Dec 26 15:59:57 2022 -0700 + + [cairo] Reorder arguments of a call + + src/hb-cairo.cc | 22 +++++++++++----------- + src/hb-cairo.h | 4 ++-- + util/helper-cairo.hh | 4 ++-- + 3 files changed, 15 insertions(+), 15 deletions(-) + +commit 726cfffc0d37c0bb5aa4bd98403e369c829cbbed +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Dec 26 15:55:56 2022 -0700 + + [cairo] Doc fix + + src/hb-cairo.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 0fe0cdf066791b8805826a149cd438d56ba7e2f3 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Dec 26 15:52:55 2022 -0700 + + [cairo] Document scale-factor business + + src/hb-cairo.cc | 32 ++++++++++++++++++++++++++++++++ + 1 file changed, 32 insertions(+) + +commit 4e3e879c1cb25eb87bf0c0076067024184f875b7 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Dec 26 15:33:04 2022 -0700 + + [cairo] Add [sg]et_scale_factor + + docs/harfbuzz-sections.txt | 2 ++ + src/hb-cairo.cc | 58 +++++++++++++++++++++++++++++++++++++++++++--- + src/hb-cairo.h | 7 ++++++ + 3 files changed, 64 insertions(+), 3 deletions(-) + +commit 186bfa99f54747698bcebea35cb52fff680b3807 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Dec 26 15:15:40 2022 -0700 + + [cairo] Make scale_factor a double + + src/hb-cairo.cc | 4 ++-- + src/hb-cairo.h | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +commit 120419e180843b1183345d50d73585bc55805a17 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Dec 26 15:10:26 2022 -0700 + + [hb-view] Fix autotools build + + src/Makefile.am | 1 + + util/Makefile.am | 1 + + util/Makefile.sources | 2 -- + 3 files changed, 2 insertions(+), 2 deletions(-) + +commit 650a46d919dec6f55cbeb21685ab064086b5bf92 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Dec 26 15:02:01 2022 -0700 + + [cairo] Fix autotools build + + src/Makefile.am | 4 ++-- + src/Makefile.sources | 11 +++++++++-- + 2 files changed, 11 insertions(+), 4 deletions(-) + +commit b417ac8a19ed09df3702722a9af4e74296d4bee2 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Mon Dec 26 08:43:52 2022 -0500 + + Try to fix autotools build + + src/Makefile.am | 10 ++++++++++ + src/Makefile.sources | 3 +++ + src/harfbuzz-cairo.pc.in | 12 ++++++++++++ + 3 files changed, 25 insertions(+) + +commit 8d0e18b51d37c7f7e4d49e42e612d82e40f88656 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sun Dec 25 22:12:29 2022 -0500 + + [cairo] More details in the docs + + Mention slant as well. + + src/hb-cairo.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 30605e09b9e9be7469bd4b6989af3c99da36a691 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sun Dec 25 22:04:22 2022 -0500 + + [cairo] Mention variations in the docs + + src/hb-cairo.cc | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit c4f7563f8178eee8ec1dbf9de5a3198efc1a9e18 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Dec 25 19:40:44 2022 -0700 + + [cairo] Fix build + + src/meson.build | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit 7a52ac4bbe5951626756ccd3cb8e50e382bbbe44 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Dec 25 19:39:02 2022 -0700 + + [cairo] Set variations + + src/hb-cairo.cc | 20 +++++++++++++++++++- + 1 file changed, 19 insertions(+), 1 deletion(-) + +commit 4be4e017fc0685745e6e9d3d44c40d191f26ff5a +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Dec 25 19:27:53 2022 -0700 + + [cairo] Make font immutable + + src/hb-cairo.cc | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +commit ea993af8e7819826b98573a98b4b11363fed0e57 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Dec 25 19:17:18 2022 -0700 + + [view] Don't double-slant + + util/helper-cairo.hh | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit 70babda6adcadeac883b1ba14ed2b8c46d09cd99 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Dec 25 19:10:11 2022 -0700 + + [cairo] docs + + docs/harfbuzz-sections.txt | 5 ++++- + src/hb-cairo.cc | 31 +++++++++++++++++++++++++++++++ + 2 files changed, 35 insertions(+), 1 deletion(-) + +commit 1c67180d6dd7be650c47eddfcaa1ea1b73220fe2 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Dec 25 19:07:02 2022 -0700 + + [cairo] Add typed destroy funcs + + src/hb-cairo.cc | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +commit 43da222e6dca2117fd2bbd4cd428dfe3cf056d23 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Dec 25 19:05:24 2022 -0700 + + [cairo] Rename + + src/hb-cairo.cc | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit cf001f6ec777e40bd01c2087d8f9c5a4575e33f3 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Dec 25 19:01:28 2022 -0700 + + [cairo] Add constructor from hb_face_t + + src/hb-cairo.cc | 70 +++++++++++++++++++++++++++++++++++++++++----------- + src/hb-cairo.h | 11 ++++++++- + util/helper-cairo.hh | 2 +- + 3 files changed, 67 insertions(+), 16 deletions(-) + +commit 2e897cc90b754e67240cba2589e7e28027b436cc +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sun Dec 25 20:03:59 2022 -0500 + + Add a pc file for harfbuzz-cairo + + src/meson.build | 7 +++++++ + 1 file changed, 7 insertions(+) + +commit ddb52e4a30375c2455f6c019c355d3bcf1adc196 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sun Dec 25 19:52:39 2022 -0500 + + [cairo] Add docs + + docs/harfbuzz-docs.xml | 1 + + docs/harfbuzz-sections.txt | 7 ++++++ + src/hb-cairo.cc | 53 +++++++++++++++++++++++++++++++++++++++++++++- + 3 files changed, 60 insertions(+), 1 deletion(-) + +commit dc2bf2664deb7700dd32b82612a49f363a51c443 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Dec 25 18:02:34 2022 -0700 + + [cairo] Set scaled-font extents + + src/hb-cairo.cc | 46 +++++++++++++++++++++++++++++++--------------- + 1 file changed, 31 insertions(+), 15 deletions(-) + +commit d6ecda36bf43aad91de016771e2176b990225eea +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Dec 25 17:39:26 2022 -0700 + + [cairo] Renames + + src/hb-cairo.cc | 28 ++++++++++++++-------------- + 1 file changed, 14 insertions(+), 14 deletions(-) + +commit ffa45f243c6ae9977b67340cad7beaa8ce7110b4 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Dec 25 17:14:45 2022 -0700 + + [cairo] #ifdef HAVE_CAIRO + + src/hb-cairo-utils.cc | 4 ++++ + src/hb-cairo.cc | 4 ++++ + src/hb-ft.cc | 1 - + 3 files changed, 8 insertions(+), 1 deletion(-) + +commit 9e61fd770562967c7ac9fa4f7ddfa64a04167cfd +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Dec 25 17:09:43 2022 -0700 + + [hb-cairo] Lazy-load funcs thread-safe + + src/hb-cairo.cc | 68 ++++++++++++++++++++++++++++++++++++------------- + src/hb-paint-extents.cc | 3 +++ + 2 files changed, 54 insertions(+), 17 deletions(-) + +commit 49a6aa97d97ccbd8d17deefbbdadb1edd2227e42 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sun Dec 25 19:09:19 2022 -0500 + + [docs] Add missing HB_HAS macros + + docs/harfbuzz-sections.txt | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +commit 306645503d1d019b4ec011e9bacec43bb7a46a9a +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sun Dec 25 19:03:50 2022 -0500 + + Work on proper build integration + + Install hb-cairo.h and define HB_HAS_CAIRO. + + docs/harfbuzz-sections.txt | 1 + + src/hb-features.h.in | 7 +++++++ + src/meson.build | 51 +++++++++++++++++++++++++++++++--------------- + 3 files changed, 43 insertions(+), 16 deletions(-) + +commit a7c2e839e1850c875aab2d563be2fd9f89530430 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Dec 25 16:59:58 2022 -0700 + + [hb-cairo] Prefix internal methods + + src/hb-cairo.cc | 224 +++++++++++++++++++++++++++++--------------------------- + 1 file changed, 116 insertions(+), 108 deletions(-) + +commit bb640d403141c7f2b32e2d1f080d155d23c33e52 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Dec 25 16:55:27 2022 -0700 + + [hb-cairo] Use nullptr instead of NULL + + src/hb-cairo.cc | 32 ++++++++++++++++---------------- + 1 file changed, 16 insertions(+), 16 deletions(-) + +commit b3a3656683fedabbe8f5e5e1e7d71fee6b61a91b +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Dec 25 16:53:54 2022 -0700 + + [hb-cairo] Minor + + src/hb-cairo-utils.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 3a11a09f542715aa92d956614089050a7b83d318 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Dec 25 16:53:21 2022 -0700 + + [hb-cairo] Rename cairo_extend + + src/hb-cairo-utils.cc | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +commit 20a50acc91946f1ae3421dd7dd5657b81e1ffd24 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Dec 25 16:09:26 2022 -0700 + + [hb-cairo] Make hb_cairo_glyphs_from_buffer public + + src/hb-cairo.cc | 125 +++++++++++++++++++++++++++++++++++++++++++++++++++ + src/hb-cairo.h | 12 +++++ + src/hb-utf.hh | 30 ++++++++++++- + util/helper-cairo.hh | 121 ------------------------------------------------- + 4 files changed, 166 insertions(+), 122 deletions(-) + +commit bf52386cfa6ca0c41750e40950b48727d67c7441 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Dec 25 16:10:31 2022 -0700 + + [cairo] Silence warning + + src/hb-cairo.cc | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +commit e594780e2893ca3b5c0e4c252225258964a7ffd6 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Dec 25 16:05:33 2022 -0700 + + [hb-cairo] Some header tweaks + + src/hb-cairo-utils.hh | 11 ++++++----- + src/hb-cairo.h | 1 + + 2 files changed, 7 insertions(+), 5 deletions(-) + +commit 1ad24421a67ec4ce2d62587586aaf0eace71d866 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Dec 25 15:55:14 2022 -0700 + + [hb-cairo] Rename files to C++ + + src/{hb-cairo-utils.c => hb-cairo-utils.cc} | 78 +++++++++++------------------ + src/{hb-cairo-utils.h => hb-cairo-utils.hh} | 0 + src/{hb-cairo.c => hb-cairo.cc} | 11 ++-- + src/meson.build | 4 +- + 4 files changed, 36 insertions(+), 57 deletions(-) + +commit a230eb8cf587cd00140f5361e119967524125438 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Dec 25 15:49:14 2022 -0700 + + [hb-cairo] Factorize hb_cairo_glyphs_from_buffer + + To be made public. + + util/helper-cairo.hh | 146 +++++++++++++++++++++++++++++++++++---------------- + 1 file changed, 100 insertions(+), 46 deletions(-) + +commit 5c3da76a439cb00d3cb45eacd51de40959c73cc1 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Dec 25 15:04:13 2022 -0700 + + [hb-cairo] Change API again + + We need to work with a hb-font for variations and font-funcs + to be fetched properly. + + src/hb-cairo.c | 21 ++++++--------------- + src/hb-cairo.h | 6 +++--- + util/helper-cairo.hh | 8 +++++--- + 3 files changed, 14 insertions(+), 21 deletions(-) + +commit 9f7538c2606d330f64bed5e71d7676195bb74975 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Dec 25 13:46:37 2022 -0700 + + [hb-cairo] Change API + + src/hb-cairo.c | 46 ++++++++++++---------------------------------- + src/hb-cairo.h | 9 ++++----- + util/helper-cairo.hh | 23 ++++++++++------------- + 3 files changed, 26 insertions(+), 52 deletions(-) + +commit 0d6ee4621e7cc20f273430d4a041e31355cf716d +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sun Dec 25 10:50:56 2022 -0500 + + wip: Make hb-view use hb-cairo + + This is a quick hack to prove that the + hb-cairo apis work + + util/hb-cairo-utils.c | 847 ---------------------------------------------- + util/hb-cairo-utils.h | 97 ------ + util/helper-cairo-user.hh | 541 ----------------------------- + util/helper-cairo.hh | 43 +-- + util/meson.build | 3 +- + 5 files changed, 25 insertions(+), 1506 deletions(-) + +commit 767bdd43a63cf50a9b0339cea8bb1a7a3311410a +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sun Dec 25 10:32:33 2022 -0500 + + wip: Add libharfbuzz-cairo + + This library will provide integration with cairo + for font rendering. + + src/hb-cairo-utils.c | 847 +++++++++++++++++++++++++++++++++++++++++++++++++++ + src/hb-cairo-utils.h | 97 ++++++ + src/hb-cairo.c | 432 ++++++++++++++++++++++++++ + src/hb-cairo.h | 44 +++ + src/meson.build | 19 ++ + 5 files changed, 1439 insertions(+) + +commit 2a515679251116e3058fc43bf7ff54e08e14e3e4 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Mon Dec 26 16:50:32 2022 -0500 + + [paint] Add a test for recursion + + test/api/fonts/bad_colrv1.ttf | Bin 0 -> 16708 bytes + test/api/results/bad-20-0-154 | 349 ++++++++++++++++++++++++++++++++++++++++++ + test/api/test-paint.c | 2 + + 3 files changed, 351 insertions(+) + +commit c3a8c6bb8b0a44fb338b85014bd88615ecf5c79f +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Dec 26 15:38:24 2022 -0700 + + [paint] More docs + + src/hb-paint.cc | 4 +++- + src/hb-paint.h | 28 ++++++++++++++++++++++++++++ + 2 files changed, 31 insertions(+), 1 deletion(-) + +commit 5f168db884d2db7321cfbc251a98819a6ba0e4a4 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Dec 26 15:12:27 2022 -0700 + + [hb-view] Build with autotools if cairo-ft is not available + + Like with meson. + + util/Makefile.am | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +commit ae208963dfd9bf3354b2eaa194bf2f4b5ec60c99 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Dec 26 12:30:39 2022 -0700 + + Add hb-limits.hh + + src/Makefile.sources | 1 + + src/OT/glyf/Glyph.hh | 5 -- + src/hb-buffer.hh | 20 -------- + src/hb-cff-interp-cs-common.hh | 3 +- + src/hb-ft-colr.hh | 9 +--- + src/hb-limits.hh | 105 +++++++++++++++++++++++++++++++++++++++++ + src/hb-ot-color-colr-table.hh | 14 ++---- + src/hb-ot-layout-common.hh | 36 -------------- + src/hb.hh | 1 + + src/meson.build | 1 + + 10 files changed, 113 insertions(+), 82 deletions(-) + +commit 5f5fa4b219320461a39c2d5c30a413574db6f628 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Mon Dec 26 13:47:35 2022 -0500 + + [ft-colr] Limit the size of the graph we follow + + This adds the same check that we already do in + the native implementation. + + src/hb-ft-colr.hh | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +commit ea2892c30e6be7f073d2fc70237b7f6a77efff82 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Mon Dec 26 10:10:39 2022 -0500 + + [paint] Limit the size of the graph we follow + + In addition to checking the depth, also count + the number of edges in the graph we've followed, + and give up after 1024. + + src/hb-ot-color-colr-table.hh | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +commit 1eb4d002f21354216c2fc7df973c7ca671e2af34 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Mon Dec 26 12:56:33 2022 -0500 + + Try to fix the build with msvc + + test/api/test-paint.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +commit 00e93102a63058aac9354edd87cdc16611e51168 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Mon Dec 26 08:31:22 2022 -0500 + + Add a test for hb_ot_color_glyph_has_paint + + test/api/test-ot-color.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +commit e7b0947afd7caddbd865788f96af71a282eefdbc +Author: Matthias Clasen <mclasen@redhat.com> +Date: Mon Dec 26 08:24:39 2022 -0500 + + Add a test for hb_ot_color_has_paint + + test/api/test-ot-color.c | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +commit 5dd69d81b0d2a1e2323dd780a684c041ffb310ed +Author: Matthias Clasen <mclasen@redhat.com> +Date: Mon Dec 26 08:23:55 2022 -0500 + + Fix hb_ot_color_has_paint + + We must no access v1 data without checking that + version is 1. A bit of a trap. + + src/hb-ot-color-colr-table.hh | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +commit b8f2281c6c1546853821d9b26bdb61f9fe5acd0a +Author: Matthias Clasen <mclasen@redhat.com> +Date: Mon Dec 26 07:59:01 2022 -0500 + + Add hb_ot_color_glyph_has_paint + + docs/harfbuzz-sections.txt | 1 + + src/hb-ot-color-colr-table.hh | 13 +++++++++++++ + src/hb-ot-color.cc | 19 +++++++++++++++++++ + src/hb-ot-color.h | 4 ++++ + 4 files changed, 37 insertions(+) + +commit 79c5bb92ce0609af093f23d8bfa5b092cfe09111 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 24 12:57:33 2022 -0700 + + [ft] Work around a freetype bug + + src/hb-ft.cc | 3 +++ + 1 file changed, 3 insertions(+) + +commit a7a93b85e655dd947db23fd7350c2209729ab140 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sat Dec 24 14:05:12 2022 -0500 + + Drop accidentally added ttx files + + test/api/fonts/RocherColorGX.abc.ttx | 2714 --------- + test/api/fonts/test_glyphs-glyf_colr_1.ttx | 8458 ---------------------------- + 2 files changed, 11172 deletions(-) + +commit fa1cf15e5d53b3c7bd7e75c21ef3e9225f5b8b7d +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 24 11:56:23 2022 -0700 + + [ft-colr] Whitespace + + src/hb-ft-colr.hh | 102 +++++++++++++++++++++++++++--------------------------- + 1 file changed, 51 insertions(+), 51 deletions(-) + +commit 5343eac16188e0cee6b50e452ea5590bc6cce2d2 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 24 11:53:43 2022 -0700 + + [ft-colr] Minor use context instead of direct access + + src/hb-ft-colr.hh | 45 ++++++++++++++++++++++++--------------------- + 1 file changed, 24 insertions(+), 21 deletions(-) + +commit 0b6468b820d5f65259fc900e97e9e796cadbbd38 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 24 11:50:57 2022 -0700 + + [ft-colr] Minor + + src/hb-ft-colr.hh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 1c595ec17fe11288dd133db243ba5c5c75ed808d +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 24 11:40:44 2022 -0700 + + [paint-extents] Lazy-load paint_extents funcs + + src/hb-ft-colr.hh | 2 -- + src/hb-ot-color-colr-table.hh | 4 ---- + src/hb-paint-extents.cc | 53 ++++++++++++++++++++++++++++++------------- + 3 files changed, 37 insertions(+), 22 deletions(-) + +commit 4280ed290d4b773f94228f746688bde7be33971e +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 24 11:38:32 2022 -0700 + + [paint-extents] Add missing file + + src/hb-paint-extents.hh | 282 ++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 282 insertions(+) + +commit 2c0ab34d03477a5ad15bf8cddd4c99e61572efee +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 24 11:37:59 2022 -0700 + + [paint-extents] Lazy-load draw-funcs + + src/hb-machinery.hh | 16 ++++++++++++++++ + src/hb-paint-extents.cc | 37 +++++++++++++++++++++++++++++-------- + 2 files changed, 45 insertions(+), 8 deletions(-) + +commit 11036ed71ed4fb6b7eb1cc365100be8628161727 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 24 11:30:45 2022 -0700 + + [paint] Add hb-paint-extents.cc + + src/Makefile.sources | 1 + + src/harfbuzz-subset.cc | 1 + + src/harfbuzz.cc | 1 + + src/{hb-paint-extents.hh => hb-paint-extents.cc} | 255 +---------------------- + src/meson.build | 1 + + 5 files changed, 6 insertions(+), 253 deletions(-) + +commit 959996d709dad7ce4a8087b2eef9dd4d6169493f +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 24 11:22:16 2022 -0700 + + [paint-extents] Namespace + + src/hb-paint-extents.hh | 52 ++++++++++++++++++++++--------------------------- + 1 file changed, 23 insertions(+), 29 deletions(-) + +commit 62bd26dda3950bb879c1cf9907bb7e6f1b8a7b2c +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 24 11:01:32 2022 -0700 + + [ft] Pick largest bitmap size + + src/hb-ft.cc | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit d35dff020f7852d4b3d48966b4bcb69b2452330b +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 24 10:59:17 2022 -0700 + + [cbdt] Remove extra clip + + src/hb-ot-color-cbdt-table.hh | 7 ------- + 1 file changed, 7 deletions(-) + +commit f70c5d6f0da2cca2c2df4765ba45dbe5fee0cc79 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 24 10:56:06 2022 -0700 + + [paint] Continue returning bool from paint_image() + + https://github.com/harfbuzz/harfbuzz/commit/6ccbfabd4fcc5d4cca99be10552c270205fd7792#commitcomment-94127307 + + src/hb-ft.cc | 17 ++++++++++------- + src/hb-ot-color-cbdt-table.hh | 14 +++++++------- + src/hb-ot-color-sbix-table.hh | 14 +++++++------- + src/hb-paint.hh | 8 ++++---- + 4 files changed, 28 insertions(+), 25 deletions(-) + +commit 6ccbfabd4fcc5d4cca99be10552c270205fd7792 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 24 10:44:25 2022 -0700 + + [paint] Return bool from paint_image() + + Fixes https://github.com/harfbuzz/harfbuzz/issues/3974 + + src/hb-paint-extents.hh | 4 +++- + src/hb-paint.cc | 4 ++-- + src/hb-paint.h | 20 +++++++++++--------- + test/api/test-paint.c | 8 ++++++-- + util/hb-cairo-utils.c | 12 +++++++----- + util/hb-cairo-utils.h | 14 +++++++------- + util/helper-cairo-user.hh | 4 ++-- + 7 files changed, 38 insertions(+), 28 deletions(-) + +commit 346331d37518f6de411f28bc09917fee475cad15 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 24 10:35:26 2022 -0700 + + [ft] Fix negative xscale + + src/hb-ft.cc | 6 ++++++ + 1 file changed, 6 insertions(+) + +commit 9376e7a93096b6eff1872063823278a569dbfdb0 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 24 10:31:30 2022 -0700 + + [ft] Remove stale TODO + + src/hb-ft.cc | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +commit a7fd48c408e13a0979a418739e73d5e196be1252 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 24 10:28:41 2022 -0700 + + [ft] Comment + + src/hb-ft.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit bb45ba2f9f4469b8bf326118ffe8003fb487f1f9 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 24 10:25:43 2022 -0700 + + [ft] Fix negative y-scale + + src/hb-ft.cc | 1 + + 1 file changed, 1 insertion(+) + +commit aba2063c22629308fac59bf91e3b4c9a8eaa2fa1 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 24 10:15:47 2022 -0700 + + [paint-extents] Comments + + src/hb-paint-extents.hh | 7 +++++++ + 1 file changed, 7 insertions(+) + +commit 988ca459f33f1ac1b580d935fa0612ed985ae987 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 24 10:12:35 2022 -0700 + + [paint-extents] Minor refactor + + src/hb-paint-extents.hh | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +commit f8bf98798d8cba184c2a623c35d0b1202ded48bd +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 24 10:04:48 2022 -0700 + + [paint-extents] Refactor code + + src/hb-paint-extents.hh | 111 ++++++++++++++++++++++-------------------------- + 1 file changed, 51 insertions(+), 60 deletions(-) + +commit f9081fc358f6673ce289992b6cdfb0b63068142c +Merge: 1f3c042ff dfd371e97 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 24 09:51:11 2022 -0700 + + Merge pull request #3938 from harfbuzz/wip/matthiasc/paint-api + + hb-paint API + +commit 1f3c042ff50ca231441b006825aa089e3a54fab1 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Sat Dec 24 17:03:57 2022 +0200 + + [doc] Don’t automatically skip building docs on Windows + + Respect the option setting. + + .github/workflows/msys2-ci.yml | 1 + + docs/meson.build | 5 ----- + 2 files changed, 1 insertion(+), 5 deletions(-) + +commit dfd371e97653b704326e04c2436ee3edab6c9d64 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sat Dec 24 09:57:48 2022 -0500 + + Cosmetics + + util/helper-cairo-user.hh | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +commit d00e97f16cb72ce12ef8c93ccc34fb1be2023a10 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sat Dec 24 06:58:44 2022 -0500 + + Add test-paint to the autotools build + + test/api/Makefile.am | 7 + + test/api/fonts/RocherColorGX.abc.ttx | 2714 +++++++++ + test/api/fonts/test_glyphs-glyf_colr_1.ttx | 8458 ++++++++++++++++++++++++++++ + 3 files changed, 11179 insertions(+) + +commit 3478728edb32787bcc52cf262563c140a958031e +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sat Dec 24 08:51:23 2022 -0500 + + Fix test-paint build without freetype + + test/api/test-paint.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +commit 4816be9ab5c0afdc7019728620c6761838236bd3 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sat Dec 24 07:37:04 2022 -0500 + + Work around cairo limitations + + If we just draw an image, cairos recording surface + complains that it is unbounded. Its not true of course. + + To make things work, clip to the extents. + + src/hb-ot-color-cbdt-table.hh | 7 +++++++ + util/hb-cairo-utils.c | 11 +++++++++++ + 2 files changed, 18 insertions(+) + +commit 9b9d7c7b8eac99116eeb9cead68c9f926881841c +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sat Dec 24 05:34:47 2022 -0500 + + Plug a memory lek in paint tests + + test/api/test-paint.c | 1 + + 1 file changed, 1 insertion(+) + +commit 76c16095fa9a15d719ce78e3adc6d890439e62e1 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sat Dec 24 05:30:11 2022 -0500 + + Fix the build on Windows + + No __BYTE_ORDER there. + + util/hb-cairo-utils.c | 2 ++ + 1 file changed, 2 insertions(+) + +commit f9c865a8998d6d41b756526f1053b7f55e3c2218 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Fri Dec 23 20:20:33 2022 -0500 + + Update test results + + These were changed by the introduction of + clip boxes. + + test/api/results/hand-20-0-10 | 188 ++++++++++++++++++++-------------------- + test/api/results/hand-20-0.2-10 | 188 ++++++++++++++++++++-------------------- + test/api/results/test-20-0-10 | 30 ++++--- + test/api/results/test-20-0-106 | 46 +++++----- + test/api/results/test-20-0-116 | 42 ++++----- + test/api/results/test-20-0-123 | 54 ++++++------ + test/api/results/test-20-0-165 | 30 ++++--- + test/api/results/test-20-0-175 | 54 ++++++------ + test/api/results/test-20-0-6 | 28 +++--- + test/api/results/test-20-0-92 | 28 +++--- + 10 files changed, 354 insertions(+), 334 deletions(-) + +commit f7eebc397c87d4e8c14c5c0e9f892c0dc8b2e269 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 23 18:52:46 2022 -0700 + + [paint-extents] Shorten enum addressing + + src/hb-paint-extents.hh | 42 +++++++++++++++++++++--------------------- + 1 file changed, 21 insertions(+), 21 deletions(-) + +commit 0110bdb3eaa46a6a60f2d5bc0f9cd2f782c6d446 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 23 18:17:05 2022 -0700 + + [paint-extents] Streamline extents_t more + + src/hb-paint-extents.hh | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +commit 9f3e050b990e7006a34648faa62a1fd912b8e3c1 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 23 18:15:21 2022 -0700 + + [paint-extents] Streamline extents_t + + src/hb-paint-extents.hh | 13 ++++++++++--- + 1 file changed, 10 insertions(+), 3 deletions(-) + +commit 0d129ae308d7ac8d0d676b302118229e5add655d +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 23 18:00:38 2022 -0700 + + Fix warning + + src/hb-ot-color-colr-table.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 73e48b9357ae8efb1526d64f6978efa8f22d80e3 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 23 17:55:09 2022 -0700 + + [colr] Push clipbox or computed clip + + src/hb-ot-color-colr-table.hh | 59 ++++++++++++++++++++++++++++++++++++++++--- + 1 file changed, 56 insertions(+), 3 deletions(-) + +commit 02684751bd6c4f76e6377862136611cf12f66762 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 23 17:33:13 2022 -0700 + + [paint-extents] Clean up + + src/hb-ft-colr.hh | 15 ++++++++++----- + src/hb-ot-color-colr-table.hh | 9 +++++---- + src/hb-paint-extents.hh | 10 ++++++++++ + 3 files changed, 25 insertions(+), 9 deletions(-) + +commit dbea503a38878d8cab0d2106d5b7e44d6550ff5b +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 23 17:28:46 2022 -0700 + + [colr] Return true extents + + src/hb-ot-color-colr-table.hh | 14 +++++--------- + 1 file changed, 5 insertions(+), 9 deletions(-) + +commit f9c2e30e0173f29ce5c05b3163561b1dab3889f7 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 23 17:13:35 2022 -0700 + + [paint-extents] Better handle empty glyphs + + src/hb-paint-extents.hh | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +commit 885dbcfba0e1bbc22255ab54f8f76096cb35fdeb +Author: Matthias Clasen <mclasen@redhat.com> +Date: Fri Dec 23 19:07:32 2022 -0500 + + Skip empty outlines + + src/hb-paint-extents.hh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit bd61e645ffea3fdc421f7dc17c0ac0c5fb0d2357 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 23 16:59:12 2022 -0700 + + [paint-extents] Use hb_min/hb_max + + src/hb-paint-extents.hh | 16 ++++------------ + 1 file changed, 4 insertions(+), 12 deletions(-) + +commit 56a48f8b0a881dd0c211f76668a36b477f22e100 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 23 16:44:06 2022 -0700 + + [paint] Don't use extents in hb-view + + Let the clipbox do its magic. Currently works for ft backend only. + + src/hb-ft-colr.hh | 1 - + util/helper-cairo-user.hh | 7 ------- + 2 files changed, 8 deletions(-) + +commit 79229cea1743acaf12c5736f8d7d0e2a8308a961 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Fri Dec 23 18:33:53 2022 -0500 + + Get outline extents manually + + src/hb-paint-extents.hh | 96 +++++++++++++++++++++++++++++++++++++++++++++---- + 1 file changed, 89 insertions(+), 7 deletions(-) + +commit 55b7af6b621daf2b02d49d4b43d54c67298865fd +Author: Matthias Clasen <mclasen@redhat.com> +Date: Fri Dec 23 18:01:45 2022 -0500 + + Tweak paint-tests + + test/api/test-paint.c | 26 +++++++++++++------------- + 1 file changed, 13 insertions(+), 13 deletions(-) + +commit 47c896f0040c4fd6b6c91cdbc0f4f0fa2e9f6582 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 23 16:20:44 2022 -0700 + + [paint-extents] Hook it up, kinda + + src/hb-ft-colr.hh | 25 +++++++++++++++++++------ + src/hb-ot-color-colr-table.hh | 16 ++++++++++++++++ + 2 files changed, 35 insertions(+), 6 deletions(-) + +commit 7fbaaebe8bf61523f1c69ba50c4c29c5e5230fa1 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 23 15:37:16 2022 -0700 + + [paint-extents] Finish off + + Untested and unused. + + src/hb-paint-extents.hh | 61 +++++++++++++++++++++++++++++++++++++++++++++---- + 1 file changed, 56 insertions(+), 5 deletions(-) + +commit 8ca78d1520cf9c4ee1720ed80abc3167cdf6f963 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 23 15:21:48 2022 -0700 + + [paint-extend] More + + src/hb-paint-extents.hh | 56 +++++++++++++++++++++++++++++++++++++++++++------ + 1 file changed, 50 insertions(+), 6 deletions(-) + +commit 23a2d4dbabf812c75dec6bfe7ceb3a4fbf0b039e +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 23 15:10:26 2022 -0700 + + [paint-extents] More + + src/hb-paint-extents.hh | 30 +++++++++++++++++++++++++++++- + 1 file changed, 29 insertions(+), 1 deletion(-) + +commit d7435b10095bf035f41539de5e1ddd39c14719ce +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 23 15:05:30 2022 -0700 + + [paint-extents] Flesh out more + + src/hb-paint-extents.hh | 23 ++++++++++++++--------- + 1 file changed, 14 insertions(+), 9 deletions(-) + +commit c37a1eadef4c99d7c95cefb8341c40c7b3159246 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 23 14:57:12 2022 -0700 + + [paint-extents] Flesh out some more + + src/hb-paint-extents.hh | 64 ++++++++++++++++++++++++++++++++++++------------- + 1 file changed, 48 insertions(+), 16 deletions(-) + +commit 268d8b7dedf35b8c097075c2726753fb1462a04d +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 23 14:45:56 2022 -0700 + + [paint-extents] Start out + + src/Makefile.sources | 1 + + src/hb-ft-colr.hh | 2 + + src/hb-paint-extents.hh | 288 ++++++++++++++++++++++++++++++++++++++++++++++++ + src/meson.build | 1 + + 4 files changed, 292 insertions(+) + +commit 44b48845b7200a74f4ea01711f30a7c3ebe6fee4 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Fri Dec 23 16:26:05 2022 -0500 + + Add tests for hb_color_line_t + + Test a few things that were broken with the + ft implementation before. + + test/api/test-paint.c | 108 ++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 108 insertions(+) + +commit a4a86c0ec281e0e5ce0cd90822d6b6d633457342 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 23 13:52:22 2022 -0700 + + [test-paint] g_test_message + + test/api/test-paint.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit dcab5679889ff47db6765e1ea853963cf9ee4286 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 23 13:47:37 2022 -0700 + + [test-paint] Don't use g_test_fail_print() for older glib + + test/api/test-paint.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 8e197f50daf6d89a1e6f14cbd9836160d5d3d8c7 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Fri Dec 23 15:31:16 2022 -0500 + + Add missing paint test results + + test/api/results/rocher-120-0-3 | 12 ++++++++++++ + test/api/results/rocher-120-0.3-1 | 12 ++++++++++++ + test/api/results/rocher-120-0.3-2 | 12 ++++++++++++ + 3 files changed, 36 insertions(+) + +commit d9875ddc9d7a6b7078906929d98e0606a49f5da4 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 23 12:37:42 2022 -0700 + + [ft-colr] Add depth counter + + src/hb-ft-colr.hh | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +commit 3b021c5568bf8fe26b9691075211dad2408ae3b9 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Fri Dec 23 14:30:29 2022 -0500 + + Run paint tests with ft font funcs + + test/api/test-paint.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++++--- + 1 file changed, 56 insertions(+), 3 deletions(-) + +commit ca190aaba4878b00bfeda39ae4f8ba6b669e90d3 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Fri Dec 23 14:03:03 2022 -0500 + + Split off the hb-paint tests + + They belong in their own file. + + test/api/meson.build | 1 + + test/api/test-ot-color.c | 370 ------------------------------------------- + test/api/test-paint.c | 400 +++++++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 401 insertions(+), 370 deletions(-) + +commit ecd7420456619dcfffd51b943468ed828c07d5a1 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Fri Dec 23 13:32:31 2022 -0500 + + Debug spew + + To get a dump of the hb-paint callbacks, + set HB_PAINT_DEBUG=1 when running hb-view. + + For now, leave this code in place, since it + comes in handy for various debugging. + + util/helper-cairo-user.hh | 131 ++++++++++++++++++++++++++++++++++++++++++++-- + 1 file changed, 126 insertions(+), 5 deletions(-) + +commit 583f010b0506cec061e5a6849da649fe3d2cb22e +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 23 12:10:22 2022 -0700 + + [ft] Move lock only around clip_glyph + + src/hb-ft.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 276290390952d0ad26f77247675ad023e0651856 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 23 12:09:17 2022 -0700 + + [ft-colr] Minor + + src/hb-ft-colr.hh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 3a1385f019082575e93bb92be870e1b5d9c76134 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 23 12:06:18 2022 -0700 + + [ft-colr] Simplify color-stop callback + + src/hb-ft-colr.hh | 98 +++++++++++++++++++++++++------------------------------ + 1 file changed, 44 insertions(+), 54 deletions(-) + +commit 1cc3b10008a2ae52b83466bb0039e2b8d99f7a28 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 23 11:55:55 2022 -0700 + + [ft-colr] Ifdef build for older freetype + + src/hb-ft-colr.hh | 7 +++++++ + 1 file changed, 7 insertions(+) + +commit 882c2bca2dcc898b6aa884605013c2609dd775ba +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 23 11:48:41 2022 -0700 + + [ft-colr] Add a paint context + + src/hb-ft-colr.hh | 167 +++++++++++++++++++++++++++++++----------------------- + 1 file changed, 95 insertions(+), 72 deletions(-) + +commit 7a4b4c64f2f71e3b66833222a153a3f7b56300b3 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 23 11:36:04 2022 -0700 + + [ft-colr] Minor macro + + src/hb-ft-colr.hh | 9 +++------ + 1 file changed, 3 insertions(+), 6 deletions(-) + +commit c453c2fce990b066155ccb72d8a39eba55e42a2d +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 23 11:33:23 2022 -0700 + + [ft-colr] Fix color-stop iteration + + src/hb-ft-colr.hh | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +commit bbb89e62aa5f876dc0b9348f11ce6a24ab032e47 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Fri Dec 23 13:30:26 2022 -0500 + + [paint] Document color lines as transient + + Just so people don't get ideas. + + src/hb-paint.h | 9 +++++++++ + 1 file changed, 9 insertions(+) + +commit 15582d5fc164f8e0a4b5f2df5ef246e213cd85d2 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 23 11:14:16 2022 -0700 + + [ft-colr] Apply slant to clipbox + + src/hb-ft-colr.hh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 7abd5dcf10ea06fb5ba48077734222e7acc41065 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Fri Dec 23 11:49:06 2022 -0500 + + [ft-paint] Fix handling of colorstop iters + + src/hb-ft-colr.hh | 5 +++++ + 1 file changed, 5 insertions(+) + +commit 393bab4ba1e5938843f83cc824e4a4142b42ff56 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Fri Dec 23 11:02:38 2022 -0500 + + [ft-paint] Apply ClipBox to all glyphs + + src/hb-ft-colr.hh | 41 +++++++++++++++++++++++++++-------------- + 1 file changed, 27 insertions(+), 14 deletions(-) + +commit c11ae85cbfa7b7a13577a058544a39146fc81bbf +Author: Matthias Clasen <mclasen@redhat.com> +Date: Fri Dec 23 09:20:45 2022 -0500 + + [ft-paint] Apply root transform + + src/hb-ft-colr.hh | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +commit 7fc3fdac761670d9c223768c128f5225a87b47df +Author: Matthias Clasen <mclasen@redhat.com> +Date: Fri Dec 23 09:16:26 2022 -0500 + + [ft-paint] Optimize away some transforms + + src/hb-ft-colr.hh | 26 ++++++++++++++++---------- + 1 file changed, 16 insertions(+), 10 deletions(-) + +commit 586d1758c1aecf995de85020cb608f3fe5d859cf +Author: Matthias Clasen <mclasen@redhat.com> +Date: Fri Dec 23 09:21:14 2022 -0500 + + [ft-paint] Fix an oversight + + src/hb-ft-colr.hh | 1 + + 1 file changed, 1 insertion(+) + +commit 092637f94c60bc56ba135bbce1905275bde0925d +Author: Matthias Clasen <mclasen@redhat.com> +Date: Fri Dec 23 09:14:11 2022 -0500 + + [ft-paint] Fix rounding + + src/hb-ft-colr.hh | 28 ++++++++++++++-------------- + 1 file changed, 14 insertions(+), 14 deletions(-) + +commit fe08e956e0eb89ca26547b00d0a3191db9011af9 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Fri Dec 23 09:08:10 2022 -0500 + + [ft-paint] Fix a case of x/y confusion + + src/hb-ft-colr.hh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 0d5256e5a729552a6c9b292c42928fc3734a95a7 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Fri Dec 23 02:41:08 2022 -0500 + + [ft-paint] Fix some fixed->float conversions + + src/hb-ft-colr.hh | 30 +++++++++++++++--------------- + 1 file changed, 15 insertions(+), 15 deletions(-) + +commit 07ba5be393f43ea8584074c61a463717ef33d72f +Author: Matthias Clasen <mclasen@redhat.com> +Date: Fri Dec 23 01:10:35 2022 -0500 + + [paint] Documentation tweaks + + src/hb-paint.cc | 9 +++++---- + src/hb-paint.h | 15 +++++---------- + 2 files changed, 10 insertions(+), 14 deletions(-) + +commit 13e0cb64f47f54c54651a239c8633f6d836ea9eb +Author: Matthias Clasen <mclasen@redhat.com> +Date: Fri Dec 23 00:54:05 2022 -0500 + + hb-view: Interpolate gradients premultiplied + + This is what the specs demand. + + util/hb-cairo-utils.c | 24 ++++++++++++++++++++++++ + 1 file changed, 24 insertions(+) + +commit 21f78c87744c8a119f999f4b02c50009f681db33 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Fri Dec 23 00:30:40 2022 -0500 + + [paint] Document that colors are unpremultiplied + + And mention that gradient interpolation must happen + in premultiplied space. + + src/hb-paint.h | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +commit b6e98cf758b8f38c14dee28b57d63514ace1a97d +Author: Matthias Clasen <mclasen@redhat.com> +Date: Fri Dec 23 00:18:40 2022 -0500 + + [colr] Add more docs + + State explicitly that palette entries are + unpremultipled, and link to the spec. + + src/hb-font.cc | 15 ++++++++------- + 1 file changed, 8 insertions(+), 7 deletions(-) + +commit 7a2dc5cf5b41058c6d598cd89f714d81ea325632 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Dec 22 22:29:52 2022 -0700 + + [docs] Hook up a couple + + docs/harfbuzz-sections.txt | 2 ++ + 1 file changed, 2 insertions(+) + +commit a634f6b48699b72b3f5bc57aad0c88c713e138f8 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Fri Dec 23 00:18:40 2022 -0500 + + [colr] Add more docs + + State explicitly that palette entries are + unpremultipled, and link to the spec. + + src/hb-ot-color.cc | 4 ++++ + 1 file changed, 4 insertions(+) + +commit a02c2a911cc59985db00b86b09ed77b755238291 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Dec 22 22:05:09 2022 -0700 + + [ft-paint] Apply alpha correctly + + src/hb-ft-colr.hh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit ee7bbdf372833a5705a0ba9e012d9665f5731726 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Fri Dec 23 00:01:20 2022 -0500 + + tests: Update expected results + + These were changed by fixes for glyph transforms. + + test/api/results/hand-20-0-10 | 92 ++++++++++++++++++++++++---------------- + test/api/results/hand-20-0.2-10 | 92 ++++++++++++++++++++++++---------------- + test/api/results/rocher-20-0-2 | 12 ------ + test/api/results/rocher-20-0-3 | 12 ------ + test/api/results/rocher-20-0.3-1 | 12 ------ + test/api/results/test-20-0-10 | 18 ++++---- + test/api/results/test-20-0-106 | 8 +++- + test/api/results/test-20-0-116 | 8 +++- + test/api/results/test-20-0-123 | 12 ++++-- + test/api/results/test-20-0-165 | 18 ++++---- + test/api/results/test-20-0-175 | 20 +++++---- + test/api/results/test-20-0-6 | 16 ++++--- + test/api/results/test-20-0-92 | 16 ++++--- + test/api/test-ot-color.c | 6 +-- + 14 files changed, 184 insertions(+), 158 deletions(-) + +commit 3993a407037477e384650a1394c27c15596c9a45 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Thu Dec 22 23:55:27 2022 -0500 + + test: Add some verification hints + + test/api/test-ot-color.c | 16 +++++++++++----- + 1 file changed, 11 insertions(+), 5 deletions(-) + +commit 6ebcc9d2e16ca4d7eaad2002ea8209dce5e9ed90 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Dec 22 21:23:45 2022 -0700 + + [ft-paint] Hook up gradients + + src/hb-ft-colr.hh | 125 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- + 1 file changed, 122 insertions(+), 3 deletions(-) + +commit fe4e9bd93070daa2b8ac3bb8201e3736faab752b +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Dec 22 20:14:19 2022 -0700 + + [colr] Add public vtable for hb_color_line_t + + src/hb-ot-color-colr-table.cc | 47 --------------------------------- + src/hb-ot-color-colr-table.hh | 44 ++++++++++++++++++++++++------- + src/hb-paint.cc | 49 +++++++++++++++++++++++++++++++++++ + src/hb-paint.h | 60 ++++++++++++++++++++++++++++++++----------- + 4 files changed, 129 insertions(+), 71 deletions(-) + +commit 7c9e42ed924d7e286b666e9206532cf1dac76955 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Dec 22 19:49:06 2022 -0700 + + [colr] Fix transform hell + + src/hb-ot-color-colr-table.hh | 2 ++ + 1 file changed, 2 insertions(+) + +commit 569d5b436cff95fbd7753aebb443ecc682d248c8 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Dec 22 18:00:02 2022 -0700 + + [ft-paint] Remove dead code + + src/hb-ft-colr.hh | 6 ------ + 1 file changed, 6 deletions(-) + +commit cfdc34b44d97bedfe482612f885f52641452390f +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Dec 22 17:58:36 2022 -0700 + + [ft-paint] Implement FT_COLR_PAINTFORMAT_SKEW + + src/hb-ft-colr.hh | 21 ++++++++++++++++++++- + 1 file changed, 20 insertions(+), 1 deletion(-) + +commit 64cf17ec8b616dcf0a6254c56498b3b53cd4b933 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Dec 22 17:55:25 2022 -0700 + + [ft-paint] Fix center translation + + src/hb-ft-colr.hh | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +commit ddbe4e52ec05bca0c284192af41df7479edd2ecd +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Dec 22 17:54:01 2022 -0700 + + [ft-paint] Implement FT_COLR_PAINTFORMAT_ROTATE + + src/hb-ft-colr.hh | 20 +++++++++++++++++++- + 1 file changed, 19 insertions(+), 1 deletion(-) + +commit 16598e024bd79796878650b9e723b02269e8f9d4 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Dec 22 17:51:35 2022 -0700 + + [ft-paint] Default + + src/hb-ft-colr.hh | 2 ++ + 1 file changed, 2 insertions(+) + +commit a0f7f9e61cca50dfbf6969c1dfd088301ac89318 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Dec 22 17:50:35 2022 -0700 + + [ft-paint] Implement FT_COLR_PAINTFORMAT_COMPOSITE + + src/hb-ft-colr.hh | 67 ++++++++++++++++++++++++++++++++++++++++++++++--------- + 1 file changed, 57 insertions(+), 10 deletions(-) + +commit 0ec201446bf0f8b776a8820e97d76b4357036e2f +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Dec 22 17:40:53 2022 -0700 + + [ft] Implement FT_COLR_PAINTFORMAT_COLR_GLYPH + + src/hb-ft-colr.hh | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +commit ac2682c610e64d47d9de0f5c742779a3b8f48f80 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Dec 22 17:36:54 2022 -0700 + + [ft] Start of a COLRv1 renderer + + src/hb-ft-colr.hh | 164 +++++++++++++++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 161 insertions(+), 3 deletions(-) + +commit e2546f5ab0fa440206ef501b382c19e8409ada61 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Dec 22 15:50:43 2022 -0700 + + [ft] Add hb-ft-colr.hh + + src/Makefile.sources | 2 +- + src/hb-ft-colr.hh | 102 +++++++++++++++++++++++++++++++++++++++++++++++++++ + src/hb-ft.cc | 60 ++++-------------------------- + src/meson.build | 2 +- + 4 files changed, 112 insertions(+), 54 deletions(-) + +commit 5bd3c07b5475dac69e33403f8c33b137cf9281d2 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Thu Dec 22 16:23:50 2022 -0500 + + [colr] Don't access baseGlyphList unless v1 + + This was showing up sporadic crashes due to + invalid reads. + + src/hb-ot-color-colr-table.hh | 22 ++++++++++++---------- + 1 file changed, 12 insertions(+), 10 deletions(-) + +commit 47dbebff393dcb121f058b43977bf8d931b19b1e +Author: Matthias Clasen <mclasen@redhat.com> +Date: Thu Dec 22 16:06:51 2022 -0500 + + [paint] Add COLRv0 tests + + test/api/fonts/RocherColorGX.abc.ttf | Bin 0 -> 7588 bytes + test/api/results/rocher-20-0-2 | 12 ++++++++++++ + test/api/results/rocher-20-0-3 | 12 ++++++++++++ + test/api/results/rocher-20-0.3-1 | 12 ++++++++++++ + test/api/test-ot-color.c | 35 +++++++++++++++++++++++------------ + 5 files changed, 59 insertions(+), 12 deletions(-) + +commit 6909701b36e989a9bd0f581bf4959f8c706116a7 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Thu Dec 22 15:32:09 2022 -0500 + + [paint] Update docs + + src/hb-paint.h | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +commit 381d410b1eae1a292741a78920ff2e0fb436df55 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Dec 22 13:21:48 2022 -0700 + + [paint] Add HB_PAINT_IMAGE_FORMAT_BGRA and use it in hb-ft + + Now hb-ft can render color emoji as well. + + Just left COLRv2. + + docs/harfbuzz-sections.txt | 4 +++ + src/hb-ft.cc | 39 ++++++++++++++++++++++- + src/hb-paint.h | 18 +++++++++-- + util/hb-cairo-utils.c | 78 +++++++++++++++++++++++++++++++++++++++------- + 4 files changed, 125 insertions(+), 14 deletions(-) + +commit 63db0d2aed3cda83470bae5c2c8128d1bc54ac46 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Dec 22 12:19:33 2022 -0700 + + [util] Speculatively fix build against non-PNG builds + + util/hb-cairo-utils.c | 2 ++ + 1 file changed, 2 insertions(+) + +commit c5f903872fdb9d7221acd6910a9c5c5acabf99a9 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Dec 22 12:16:55 2022 -0700 + + [paint] Add bitmap width/height to paint_image callback + + Such that we can add raw data as well. + + src/hb-ot-color-cbdt-table.hh | 45 ++++++++++++++++++++++++++++--------------- + src/hb-ot-color-sbix-table.hh | 31 ++++++++++++++++------------- + src/hb-ot-color-svg-table.hh | 7 ++++++- + src/hb-paint.cc | 2 ++ + src/hb-paint.h | 8 ++++++-- + src/hb-paint.hh | 3 ++- + util/hb-cairo-utils.c | 9 +++++++-- + util/hb-cairo-utils.h | 2 ++ + util/helper-cairo-user.hh | 4 +++- + 9 files changed, 75 insertions(+), 36 deletions(-) + +commit eef47f2379a3509a2f306fb3e6207f4541b96b73 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Thu Dec 22 14:16:02 2022 -0500 + + [paint] Fix the docs + + src/hb-paint.h | 1 + + 1 file changed, 1 insertion(+) + +commit 3c972867b97a0fbca5bef25ebfd7cbdab008a102 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Dec 22 11:40:06 2022 -0700 + + More s/hb_font_get_glyph_shape/hb_font_draw_glyph/ + + perf/benchmark-font.cc | 2 +- + src/hb-draw.h | 10 ++--- + test/api/test-draw.c | 88 +++++++++++++++++++++--------------------- + test/fuzzing/hb-draw-fuzzer.cc | 2 +- + 4 files changed, 51 insertions(+), 51 deletions(-) + +commit 72a169c846c9be92d5ac5d0b2bc051d6ef5e8e6f +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Dec 22 11:26:10 2022 -0700 + + [ft] Paint COLRv0 glyphs + + src/hb-ft.cc | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++---------- + 1 file changed, 64 insertions(+), 13 deletions(-) + +commit bb807f47d22f23a2da348f0498282c9ae7b81ab9 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Dec 22 10:51:26 2022 -0700 + + [ft] Implement paint_glyph() for outline glyphs + + src/hb-ft.cc | 46 +++++++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 45 insertions(+), 1 deletion(-) + +commit 91c880503e7b194c9fc15cfe43eae4c70b1b19f9 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Dec 22 10:42:27 2022 -0700 + + [ft] Use new name for draw API + + src/hb-ft.cc | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +commit c27eefec1df85d1648106c3d0ae7d2e740c5cedc +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Dec 22 10:41:13 2022 -0700 + + Revert "Drop the deprecation" + + This reverts commit 3904e66777339a3d420ece1c2b7d550949aa3946. + + src/hb-font.h | 4 ++++ + 1 file changed, 4 insertions(+) + +commit f3985d948279c00518d5f3dea925a71a8e2be23f +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Dec 22 10:11:28 2022 -0700 + + [paint] Fix drawing non-color glyphs + + src/OT/glyf/glyf.hh | 6 +----- + src/hb-ot-cff1-table.cc | 6 +----- + src/hb-ot-cff2-table.cc | 6 +----- + 3 files changed, 3 insertions(+), 15 deletions(-) + +commit 237955dffca19bc320ca1b94808b52265ef653ed +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Dec 22 08:12:47 2022 -0700 + + [paint] Add slant to image() callback + + And slant images in hb-view. + + src/hb-ot-color-cbdt-table.hh | 2 +- + src/hb-ot-color-sbix-table.hh | 2 +- + src/hb-ot-color-svg-table.hh | 2 +- + src/hb-paint.cc | 1 + + src/hb-paint.h | 1 + + src/hb-paint.hh | 3 ++- + util/hb-cairo-utils.c | 7 +++++++ + util/hb-cairo-utils.h | 1 + + util/helper-cairo-user.hh | 3 ++- + 9 files changed, 17 insertions(+), 5 deletions(-) + +commit c221933977bdcf272fd9f2ded5e1182de8ae1939 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Wed Dec 21 18:39:27 2022 -0500 + + [paint] Preserve foreground information + + src/OT/glyf/glyf.hh | 2 +- + src/hb-ot-cff1-table.cc | 2 +- + src/hb-ot-cff2-table.cc | 2 +- + src/hb-ot-color-colr-table.hh | 23 +++++++++++++++++------ + src/hb-paint.cc | 1 + + src/hb-paint.h | 4 ++++ + src/hb-paint.hh | 3 ++- + test/api/test-ot-color.c | 1 + + util/helper-cairo-user.hh | 1 + + 9 files changed, 29 insertions(+), 10 deletions(-) + +commit f146299a405b8338542a245b85e664de29f0c972 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Wed Dec 21 17:24:02 2022 -0500 + + [paint] Drop unnecessary api + + docs/harfbuzz-sections.txt | 13 --- + src/hb-paint.cc | 237 --------------------------------------------- + src/hb-paint.h | 59 ----------- + 3 files changed, 309 deletions(-) + +commit 6387004cadd8f5bc755f5b14c95fd71153bcc48b +Author: Matthias Clasen <mclasen@redhat.com> +Date: Wed Dec 21 16:43:19 2022 -0500 + + [paint] Simplify api + + Drop the hb_paint_context_t struct from the API, and + only pass the font where we need it. + + docs/harfbuzz-sections.txt | 1 - + src/OT/glyf/glyf.hh | 16 +-- + src/hb-font.cc | 12 +-- + src/hb-ot-cff1-table.cc | 16 +-- + src/hb-ot-cff2-table.cc | 16 +-- + src/hb-ot-color-cbdt-table.hh | 7 +- + src/hb-ot-color-colr-table.cc | 12 +-- + src/hb-ot-color-colr-table.hh | 242 +++++++++++++++++++++--------------------- + src/hb-ot-color-sbix-table.hh | 3 +- + src/hb-ot-color-svg-table.hh | 4 +- + src/hb-paint.cc | 85 +++++---------- + src/hb-paint.h | 84 +++------------ + src/hb-paint.hh | 90 ++++------------ + test/api/test-ot-color.c | 13 +-- + util/hb-cairo-utils.c | 31 +----- + util/hb-cairo-utils.h | 9 -- + util/helper-cairo-user.hh | 23 ++-- + 17 files changed, 216 insertions(+), 448 deletions(-) + +commit 71bd5a0dfc34efdf61a641b8ba98303524adeb9a +Author: Matthias Clasen <mclasen@redhat.com> +Date: Wed Dec 21 16:18:46 2022 -0500 + + [paint] Resolve colors + + We don't need to pass the index/alpha pairs to + client callbacks, and can just resolve the colors + internally. + + Update test results. + + src/OT/glyf/glyf.hh | 2 +- + src/hb-ot-cff1-table.cc | 3 ++- + src/hb-ot-cff2-table.cc | 2 +- + src/hb-ot-color-colr-table.cc | 4 ++-- + src/hb-ot-color-colr-table.hh | 31 ++++++++++++++++++------------- + src/hb-paint.cc | 11 ++++------- + src/hb-paint.h | 33 +++++++-------------------------- + src/hb-paint.hh | 27 ++++++++++++++++++++++++--- + test/api/results/hand-20-0-10 | 34 +++++++++++++++++----------------- + test/api/results/hand-20-0.2-10 | 34 +++++++++++++++++----------------- + test/api/results/test-20-0-10 | 8 ++++---- + test/api/results/test-20-0-106 | 4 ++-- + test/api/results/test-20-0-116 | 4 ++-- + test/api/results/test-20-0-123 | 6 +++--- + test/api/results/test-20-0-165 | 6 +++--- + test/api/results/test-20-0-175 | 6 +++--- + test/api/results/test-20-0-6 | 4 ++-- + test/api/results/test-20-0-92 | 6 +++--- + test/api/test-ot-color.c | 18 +++++++++++++----- + util/hb-cairo-utils.c | 29 ++++++++++++++++++++++------- + util/helper-cairo-user.hh | 11 ++++++----- + 21 files changed, 156 insertions(+), 127 deletions(-) + +commit bd1389bedf891311177b3aa9804aa4474c6758d0 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Wed Dec 21 15:23:43 2022 -0500 + + [paint] Add hb_paint_context_t to docs + + docs/harfbuzz-sections.txt | 1 + + 1 file changed, 1 insertion(+) + +commit 5d7553d38f178c1c071f356f98bbf43d21b4ce29 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Wed Dec 21 15:18:02 2022 -0500 + + view: Add a --font-palette option + + util/font-options.hh | 2 ++ + util/helper-cairo-user.hh | 10 +++++++++- + util/helper-cairo.hh | 3 +++ + 3 files changed, 14 insertions(+), 1 deletion(-) + +commit d094e76cbc84dc13de35e2837ffe6d1a8aa51fab +Author: Matthias Clasen <mclasen@redhat.com> +Date: Wed Dec 21 15:02:41 2022 -0500 + + hb-view: Pass fg color to hb_font_paint_glyph + + util/helper-cairo-user.hh | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +commit 9be01b6bff054e3edb516ca680a1e33b05a74e9b +Author: Matthias Clasen <mclasen@redhat.com> +Date: Wed Dec 21 14:04:32 2022 -0500 + + [paint] Pass hb_paint_context_t along + + Replace the font argument with a hb_paint_context_t + that carries the font, the palette index and the + foreground color. + + The hb_font_paint_glyph() api now takes the palette + index and the foreground color as extra arguments. + + Update all callers and regenerate test results. + + src/OT/glyf/glyf.hh | 18 ++++-- + src/hb-font.cc | 24 ++++++-- + src/hb-font.h | 9 ++- + src/hb-font.hh | 5 +- + src/hb-ot-cff1-table.cc | 19 ++++--- + src/hb-ot-cff1-table.hh | 2 +- + src/hb-ot-cff2-table.cc | 20 ++++--- + src/hb-ot-cff2-table.hh | 2 +- + src/hb-ot-color-cbdt-table.hh | 8 ++- + src/hb-ot-color-colr-table.cc | 4 +- + src/hb-ot-color-colr-table.hh | 119 ++++++++++++++++++++-------------------- + src/hb-ot-color-sbix-table.hh | 3 +- + src/hb-ot-color-svg-table.hh | 4 +- + src/hb-ot-font.cc | 10 ++-- + src/hb-paint.cc | 98 ++++++++++++++++----------------- + src/hb-paint.h | 95 ++++++++++++++++++++------------ + src/hb-paint.hh | 66 +++++++++++----------- + test/api/results/hand-20-0-10 | 18 +++--- + test/api/results/hand-20-0.2-10 | 18 +++--- + test/api/results/test-20-0-10 | 2 +- + test/api/results/test-20-0-106 | 4 +- + test/api/results/test-20-0-116 | 4 +- + test/api/results/test-20-0-123 | 6 +- + test/api/results/test-20-0-165 | 2 +- + test/api/results/test-20-0-175 | 4 +- + test/api/results/test-20-0-6 | 2 +- + test/api/results/test-20-0-92 | 2 +- + test/api/test-ot-color.c | 26 ++++----- + util/hb-cairo-utils.c | 51 +++++++---------- + util/hb-cairo-utils.h | 17 +++--- + util/helper-cairo-user.hh | 38 ++++++------- + 31 files changed, 384 insertions(+), 316 deletions(-) + +commit 6c71c530caaa40c0038ac1f33549a5a7f96266c3 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Dec 21 10:54:22 2022 -0700 + + [paint] Rename hb_paint_context_t to hb_ot_paint_context_t + + src/hb-ot-color-colr-table.cc | 4 ++-- + src/hb-ot-color-colr-table.hh | 56 +++++++++++++++++++++---------------------- + 2 files changed, 30 insertions(+), 30 deletions(-) + +commit 8495395397e5a26dacad0cad689a41b06ef5314c +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Dec 21 09:03:13 2022 -0700 + + [paint] Fix slant + + src/hb-paint.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit b1500babaae38cb6d81bc4287adeb4678dfde1b3 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Wed Dec 21 09:49:42 2022 -0500 + + utils: Some cairo helper tweaks + + util/hb-cairo-utils.c | 64 +++++++++++++++++++++++------------------------ + util/hb-cairo-utils.h | 10 ++++---- + util/helper-cairo-user.hh | 19 ++++++++------ + 3 files changed, 48 insertions(+), 45 deletions(-) + +commit 97224f3b63e7d8ec74acabc1270ebf021c19afd6 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Wed Dec 21 02:11:36 2022 -0500 + + [paint] Pass font to all callbacks + + This will lead to easier implementations. + + At the same time, we change the push_clip_glyph + callback to use the font as-is, no unscaling needed. + + Update all callers and expected test results. + + src/OT/glyf/glyf.hh | 8 +- + src/hb-font.cc | 5 +- + src/hb-ot-cff1-table.cc | 8 +- + src/hb-ot-cff2-table.cc | 8 +- + src/hb-ot-color-cbdt-table.hh | 2 +- + src/hb-ot-color-colr-table.cc | 4 +- + src/hb-ot-color-colr-table.hh | 137 ++++++++++++--------- + src/hb-ot-color-sbix-table.hh | 2 +- + src/hb-ot-color-svg-table.hh | 2 +- + src/hb-paint.cc | 84 +++++++++---- + src/hb-paint.h | 65 +++++++--- + src/hb-paint.hh | 79 +++++++++--- + src/hb.h | 2 +- + test/api/results/hand-20-0-10 | 97 +++++++++++++++ + test/api/results/hand-20-0-10.txt | 79 ------------ + test/api/results/hand-20-0.2-10 | 97 +++++++++++++++ + test/api/results/hand-20-0.2-10.txt | 79 ------------ + test/api/results/test-20-0-10 | 14 +++ + test/api/results/test-20-0-10.txt | 12 -- + .../results/{test-20-0-106.txt => test-20-0-106} | 16 ++- + test/api/results/test-20-0-116 | 18 +++ + test/api/results/test-20-0-116.txt | 14 --- + .../results/{test-20-0-123.txt => test-20-0-123} | 24 ++-- + test/api/results/test-20-0-165 | 14 +++ + test/api/results/test-20-0-165.txt | 12 -- + test/api/results/test-20-0-175 | 26 ++++ + test/api/results/test-20-0-175.txt | 22 ---- + test/api/results/test-20-0-6 | 13 ++ + test/api/results/test-20-0-6.txt | 11 -- + test/api/results/test-20-0-92 | 13 ++ + test/api/results/test-20-0-92.txt | 11 -- + test/api/test-ot-color.c | 40 +++--- + util/helper-cairo-user.hh | 78 +++++------- + 33 files changed, 639 insertions(+), 457 deletions(-) + +commit 32ce29f99ea7387ce32de1114b1ce1c876fb6fbe +Author: Matthias Clasen <mclasen@redhat.com> +Date: Wed Dec 21 07:42:36 2022 -0500 + + [font] Move hb_font_t typedef + + This is needed to avoid circular header dependencies. + + src/hb-common.h | 8 ++++++++ + src/hb-font.h | 9 --------- + src/hb-paint.h | 3 +-- + 3 files changed, 9 insertions(+), 11 deletions(-) + +commit 8364d9130f72a80802153efc7e22ac85bb38fe8f +Author: Matthias Clasen <mclasen@redhat.com> +Date: Wed Dec 21 00:59:13 2022 -0500 + + Document hb_font_set_draw_glyph_func + + src/hb-font.h | 11 ++++++----- + 1 file changed, 6 insertions(+), 5 deletions(-) + +commit a20999b9df313702643f012845cee4e266236985 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Wed Dec 21 00:20:37 2022 -0500 + + [font] Fix a few documentation mistakes + + src/hb-font.cc | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) + +commit 754528914d98db1e30192cc07de4e3df879d5d8a +Author: Matthias Clasen <mclasen@redhat.com> +Date: Wed Dec 21 00:09:25 2022 -0500 + + [docs] Reorder paint section + + docs/harfbuzz-sections.txt | 23 +++++++++++------------ + 1 file changed, 11 insertions(+), 12 deletions(-) + +commit 2333a566edbe99402d66086dd820a02335f56899 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Tue Dec 20 22:43:04 2022 -0500 + + Drop the deprecation + + No need to drop hb_font_get_glyph_shape, just + because hb_font_draw_glyph does the same. + + Its fine to keep both around. + + src/hb-font.h | 4 ---- + 1 file changed, 4 deletions(-) + +commit cf02d13302941b964e2c3b63485eeb023698d26b +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Dec 20 11:52:39 2022 -0700 + + [cairo] Remove unused struct + + util/hb-cairo-utils.c | 7 ------- + 1 file changed, 7 deletions(-) + +commit 14b026ff86f55436897702e268cf6c7eddbb0859 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Mon Dec 19 13:53:49 2022 -0500 + + [draw] Add hb_font_draw_glyph + + hb_font_draw_glyph(), hb_font_draw_glyph_func_t and + hb_font_funcs_set_draw_glyph_func() are just alternative + names for hb_font_get_glyph_shape and friends, to better + align with hb_font_paint_glyph. + + src/hb-draw.cc | 2 ++ + src/hb-font.cc | 76 +++++++++++++++++++++++++++++++++++++++---------------- + src/hb-font.h | 46 ++++++++++++++++++++++++++++++++- + src/hb-font.hh | 14 +++++----- + src/hb-ot-font.cc | 12 ++++----- + 5 files changed, 114 insertions(+), 36 deletions(-) + +commit 08da126523d1cdfdcd527f7bdf10c2d3525196e4 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Mon Dec 19 14:36:29 2022 -0500 + + [docs] Linkify links + + src/hb-paint.h | 26 +++++++++++++------------- + 1 file changed, 13 insertions(+), 13 deletions(-) + +commit 9437f719a7217ddb2231709ead03c4b62cbdb42f +Author: Matthias Clasen <mclasen@redhat.com> +Date: Mon Dec 19 14:29:39 2022 -0500 + + [paint] Document hb_paint_extend_t + + src/hb-paint.h | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +commit 3a2634e27cf6f1df164aacb70b2e107eab2a15e6 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Mon Dec 19 13:48:08 2022 -0500 + + [paint] Document hb_font_paint_glyph_func_t + + docs/harfbuzz-sections.txt | 2 ++ + src/hb-font.h | 13 +++++++++++++ + 2 files changed, 15 insertions(+) + +commit 0f287e75ece6364bc3fcdd752de837f8ef51529d +Author: Matthias Clasen <mclasen@redhat.com> +Date: Mon Dec 19 13:45:45 2022 -0500 + + [paint] Rename hb_font_get_glyph_paint_func_t + + The 'get' was just there due to implementation + choices. Work around that and call the vfunc + what it should be: hb_font_paint_glyph_func_t. + + src/hb-font.cc | 40 ++++++++++++++++++++-------------------- + src/hb-font.h | 16 ++++++++-------- + src/hb-font.hh | 54 +++++++++++++++++++++++++++--------------------------- + src/hb-ot-font.cc | 12 ++++++------ + 4 files changed, 61 insertions(+), 61 deletions(-) + +commit b0fa40b2ece482818bfc9e71b2f173e43b9dd6dd +Author: Matthias Clasen <mclasen@redhat.com> +Date: Mon Dec 19 13:16:10 2022 -0500 + + tests: More diagnostics + + test/api/test-ot-color.c | 1 + + 1 file changed, 1 insertion(+) + +commit ddd2039265e3bf20bb4809d57905f83c42e61b97 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Mon Dec 19 12:20:07 2022 -0500 + + [paint] Improve the docs + + src/hb-paint.cc | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +commit 3a219cfa6a2bef8eb79dd86c2210485a71aece1d +Author: Matthias Clasen <mclasen@redhat.com> +Date: Mon Dec 19 11:15:37 2022 -0500 + + [config] Make HB_LEAN imply HB_NO_PAINT + + src/hb-config.hh | 1 + + 1 file changed, 1 insertion(+) + +commit 0ef2dc9be557cc247621019933ca5151a4bd80cd +Author: Matthias Clasen <mclasen@redhat.com> +Date: Mon Dec 19 10:02:17 2022 -0500 + + Drop a TODO + + This was addressed in 61bd602791d801 + + src/hb-font.cc | 1 - + 1 file changed, 1 deletion(-) + +commit 96cda3886ceffc4264587576100d56f16c150ad0 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Mon Dec 19 09:59:33 2022 -0500 + + [paint] Clarify docs + + Spell out where the different datas originate. + + src/hb-paint.h | 50 +++++++++++++++++++++++++------------------------- + 1 file changed, 25 insertions(+), 25 deletions(-) + +commit 290bb338bf9a881e38899cd0391146ef7a52b2b1 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Mon Dec 19 02:39:14 2022 -0500 + + Dist test result files + + test/api/Makefile.am | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +commit a3ba723876d4da299cd13d70a3accab1b0672ffb +Author: Matthias Clasen <mclasen@redhat.com> +Date: Mon Dec 19 02:22:34 2022 -0500 + + Drop an unneeded include + + util/hb-cairo-utils.c | 1 - + 1 file changed, 1 deletion(-) + +commit 74ccc1e76df3dafbc48e02818403d0f0688cf8ca +Author: Matthias Clasen <mclasen@redhat.com> +Date: Mon Dec 19 00:49:02 2022 -0500 + + tests: Produce useful output on failure + + test/api/test-ot-color.c | 32 ++++++++++++++++++++++++++++++-- + 1 file changed, 30 insertions(+), 2 deletions(-) + +commit 084291108ac59a0a99b2cde58073ad4377dfdd82 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Mon Dec 19 01:08:41 2022 -0500 + + Tests: Fix memleak pointed out by valgrind + + test/api/test-ot-color.c | 1 + + 1 file changed, 1 insertion(+) + +commit 0800d1879c7aafb038e47793c9f3495da0221969 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Mon Dec 19 00:59:40 2022 -0500 + + Try to fix autotools build + + src/Makefile.sources | 3 +++ + util/Makefile.sources | 2 ++ + 2 files changed, 5 insertions(+) + +commit 5ac218865ad7df1643c8b70e527cc792415c28d0 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Dec 19 10:26:54 2022 -0700 + + [paint] A doc fix + + src/hb-font.h | 4 ++++ + src/hb-paint.cc | 2 +- + 2 files changed, 5 insertions(+), 1 deletion(-) + +commit 5451b78f4a4d97277d3a411762844e97adda62cd +Author: Matthias Clasen <mclasen@redhat.com> +Date: Mon Dec 19 00:07:18 2022 -0500 + + Don't use alloca + + It complicates things on Windows, for no + big win. Just preallocate a reasonable amount. + + util/hb-cairo-utils.c | 58 +++++++++++++++++++++++++++++++++++++++------------ + 1 file changed, 45 insertions(+), 13 deletions(-) + +commit 7c12db46ff3fd771db4cc2d2cc6fea8937b34532 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sun Dec 18 23:36:05 2022 -0500 + + Try to fix msvc build + + src/hb-ot-color-colr-table.hh | 2 +- + util/hb-cairo-utils.c | 5 +++++ + 2 files changed, 6 insertions(+), 1 deletion(-) + +commit d2b420589bb65e92385383966cf2a8c9865abc49 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sun Dec 18 16:43:19 2022 -0500 + + [docs] Add hb-paint apis + + docs/harfbuzz-docs.xml | 1 + + docs/harfbuzz-sections.txt | 62 ++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 63 insertions(+) + +commit d8cb7ceefb31600b288da05c2c09476953dafc91 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Dec 18 14:35:36 2022 -0700 + + [test] Try fixing bots with old glib + + test/api/test-ot-color.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 5d1fc9ee9dcec13a45bfc19f53894ad83f42a2a0 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Dec 18 14:25:39 2022 -0700 + + [paint] Fix annotations + + src/hb-paint.cc | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +commit 3590ee74f49fa571af145f788f2db6e122021116 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Dec 18 13:59:56 2022 -0700 + + [util] Fix bot + + util/helper-cairo-user.hh | 2 ++ + 1 file changed, 2 insertions(+) + +commit ee2204469ebfe3a3e9c76e856a7e0c8aab1dd946 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Dec 18 13:50:34 2022 -0700 + + [paint] Add get_empty / [sg]et_user_data + + src/hb-cplusplus.hh | 2 +- + src/hb-draw.cc | 1 - + src/hb-paint.cc | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++ + src/hb-paint.h | 15 ++++++++++++++ + 4 files changed, 74 insertions(+), 2 deletions(-) + +commit 21a9db875ed9204ac45093e97354158012b4b35f +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Dec 18 13:47:22 2022 -0700 + + [draw] Add get_empty / [sg]et_user_data + + docs/harfbuzz-sections.txt | 3 +++ + src/hb-cplusplus.hh | 2 ++ + src/hb-draw.cc | 58 ++++++++++++++++++++++++++++++++++++++++++++++ + src/hb-draw.h | 15 ++++++++++++ + 4 files changed, 78 insertions(+) + +commit 9a7422c5fb9eefa3c73cde387512e1de4adaa946 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Dec 18 13:46:32 2022 -0700 + + [font] Minor doc fix + + src/hb-font.cc | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit a9b37206eb1e254b24226b5115932aa40f20f7d9 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Dec 18 13:37:32 2022 -0700 + + [font] Minor rename + + src/hb-font.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 815544a1f7ce0cd9da6cb632e7309ba31ed53faf +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Dec 18 13:33:54 2022 -0700 + + [font] Adapt paint_glyph to parent transform + + src/hb-font.cc | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +commit 81bf08927361ae57563b02774523f7ce83903ea1 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Dec 18 13:15:49 2022 -0700 + + [hb-view] Use color render callback if HB_DRAW >= 2 + + util/helper-cairo-user.hh | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +commit c65f580b932daf7492d09c30462bf470247f794d +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sun Dec 18 15:13:55 2022 -0500 + + Drop hb-test + + This was a test binary to assist in developing + the hb-paint code. Not needed anymore, now that + hb-view has the same code in the cairo userfont + backend. + + util/hb-test.c | 350 ------------------------------------------------------- + util/meson.build | 7 -- + 2 files changed, 357 deletions(-) + +commit 85917e5b2143e212224e7950d8ee97ccd14b9ee0 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Dec 18 13:08:45 2022 -0700 + + [paint] Fix docs + + src/hb-paint.h | 24 ++++++++++++------------ + 1 file changed, 12 insertions(+), 12 deletions(-) + +commit 14bf3aaa8d276470c826f095bc0f8d57ff930b38 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Dec 18 12:59:35 2022 -0700 + + [colr] Make paint_image work again + + src/hb-ot-color-cbdt-table.hh | 4 ---- + src/hb-ot-color-sbix-table.hh | 4 ---- + 2 files changed, 8 deletions(-) + +commit 9672aa8610d605617fc2465b0c5d5dc2fc33079f +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Dec 18 12:57:42 2022 -0700 + + [util] Fix compiler warning + + util/hb-cairo-utils.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 955bd30365d8bb7998515e0714c3aec94e284440 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sun Dec 18 14:55:56 2022 -0500 + + Fix hb-cairo-utils + + This was a stupid mistake, and hard to track down. + + util/hb-cairo-utils.c | 2 ++ + util/hb-cairo-utils.h | 1 + + 2 files changed, 3 insertions(+) + +commit 35739567058b61a4545228ea5b832576f2824f63 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Dec 18 12:56:01 2022 -0700 + + [util] Include stdio.h + + util/hb-cairo-utils.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 7accbe97d8dd0e55484fd4d1e76acea1c89c8ae1 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Dec 18 12:51:26 2022 -0700 + + [util] Fix argument order and root transform PNGs + + src/hb-ot-color-cbdt-table.hh | 6 +++++- + src/hb-ot-color-sbix-table.hh | 6 +++++- + util/hb-cairo-utils.c | 9 +++------ + 3 files changed, 13 insertions(+), 8 deletions(-) + +commit 529dc40d7db9bee1075fc16ba0971ad265ffac11 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Dec 18 12:35:50 2022 -0700 + + [util] Adjust scaling + + Still doesn't render PNGs. + + Fix a few compiler warnings + + util/hb-cairo-utils.c | 14 +++++++++----- + 1 file changed, 9 insertions(+), 5 deletions(-) + +commit bcc9ab27fcf02d57333a9bfc06261eede85c0746 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Dec 18 11:59:54 2022 -0700 + + [hb-view] Fix transformation + + No need for cairo patch; that patch was wrong. + + util/helper-cairo-user.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit c996fc58ec8997242d853b8bfac4f4f9c3d96605 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Dec 18 11:36:58 2022 -0700 + + [hb-view] Remove redundant check + + util/helper-cairo-user.hh | 3 --- + 1 file changed, 3 deletions(-) + +commit bec5354030e003e17aff2c0394c0b706d69cda73 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Dec 18 11:26:46 2022 -0700 + + [hb-view] Fix render_color_glyph extents coordinate system + + Needs cairo fix: + https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/371 + + util/helper-cairo-user.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 95ccd66481768d443ac7aaeb1588823a79948944 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sun Dec 18 11:08:25 2022 -0700 + + [hb-view] Set glyph extents in render_color_glyph + + Works around limitation in cairo-recording-surface unboundedness. + + Extents are wrong but at least renders something now. + + util/helper-cairo-user.hh | 7 +++++++ + 1 file changed, 7 insertions(+) + +commit 6cadf280f286f5ad59466d71fd2b7f8c2fd5d267 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sun Dec 18 09:42:18 2022 -0500 + + Use hb-cairo-utils in hb-test + + Just to prove that it works. + + util/hb-test.c | 1029 ++++++++---------------------------------------------- + util/meson.build | 2 +- + 2 files changed, 144 insertions(+), 887 deletions(-) + +commit 8bcd13dd91916a436fa357fa73f9d4477d8a02ff +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sun Dec 18 09:41:00 2022 -0500 + + small fixup to hb-cairo-utils + + util/hb-cairo-utils.h | 11 +++++------ + 1 file changed, 5 insertions(+), 6 deletions(-) + +commit f1f8d1e855a4628a59bfc9b8b55d94a9e35e31de +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sun Dec 18 02:43:25 2022 -0500 + + Small documentation addition + + src/hb-font.cc | 3 +++ + 1 file changed, 3 insertions(+) + +commit 6c49822cad38b071212823a303059e0917aeedfa +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sun Dec 18 01:52:39 2022 -0500 + + wip: Use hb-paint in hb-view + + This doesn't paint anything yet. + + util/hb-cairo-utils.c | 727 ++++++++++++++++++++++++++++++++++++++++++++++ + util/hb-cairo-utils.h | 104 +++++++ + util/helper-cairo-user.hh | 362 ++++++++++++++--------- + util/meson.build | 1 + + 4 files changed, 1061 insertions(+), 133 deletions(-) + +commit 021618e91ae26ef7af1fae4eb0693258e48a7d2a +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sun Dec 18 00:12:32 2022 -0500 + + [colr] Add hb_ot_color_has_paint + + This is a counterpart to hb_ot_color_has_layers + for COLRv1 data. + + src/hb-ot-color-colr-table.hh | 3 ++- + src/hb-ot-color.cc | 30 ++++++++++++++++++++---------- + src/hb-ot-color.h | 5 +++++ + 3 files changed, 27 insertions(+), 11 deletions(-) + +commit 63fcb26c9b771f6ab492dad896a4da911fb0427e +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sat Dec 17 22:41:34 2022 -0500 + + Add some more docs + + src/hb-ot-color.cc | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +commit 2d4678b6478874288312cfe773d735c351d04b0f +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sat Dec 17 22:30:31 2022 -0500 + + Add a comment + + test/api/test-ot-color.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +commit 3b32eab38e3212464239f32ad294d30d943a3ae2 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 17 17:13:30 2022 -0700 + + [colr] Fix compiler warning + + util/hb-test.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 30a6fd04d00624129b13b20fb755d6c1c4982637 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sat Dec 17 18:20:00 2022 -0500 + + [colr] Add some tests + + test/api/fonts/noto_handwriting-cff2_colr_1.otf | Bin 0 -> 4172 bytes + test/api/fonts/test_glyphs-glyf_colr_1.ttf | Bin 0 -> 16704 bytes + test/api/results/hand-20-0-10.txt | 79 ++++++ + test/api/results/hand-20-0.2-10.txt | 79 ++++++ + test/api/results/test-20-0-10.txt | 12 + + test/api/results/test-20-0-106.txt | 18 ++ + test/api/results/test-20-0-116.txt | 14 ++ + test/api/results/test-20-0-123.txt | 31 +++ + test/api/results/test-20-0-165.txt | 12 + + test/api/results/test-20-0-175.txt | 22 ++ + test/api/results/test-20-0-6.txt | 11 + + test/api/results/test-20-0-92.txt | 11 + + test/api/test-ot-color.c | 312 ++++++++++++++++++++++++ + 13 files changed, 601 insertions(+) + +commit 451414a27eeee7b47bed7cd8c5bb88b81f7f5cca +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sat Dec 17 18:14:31 2022 -0500 + + [paint] Documentation fixes + + src/hb-ot-color-colr-table.cc | 42 ++++++++++++++++++++++++++++++++++-------- + src/hb-paint.cc | 4 +++- + 2 files changed, 37 insertions(+), 9 deletions(-) + +commit e3153654cbb5132a9b06231fb4402a3849a0fb68 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 17 13:56:22 2022 -0700 + + [colr] Fix PNG placement + + util/hb-test.c | 17 ++++++++++------- + 1 file changed, 10 insertions(+), 7 deletions(-) + +commit f07ce68f9cf8d5fd4eb37141a16e89cb0ec2bbae +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 17 13:48:05 2022 -0700 + + Remove unused function + + util/hb-test.c | 7 ------- + 1 file changed, 7 deletions(-) + +commit 0c77f1d9abf5f8dcd931ca1ae5856039daf3e3fc +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sat Dec 17 14:10:28 2022 -0500 + + [paint] Documentation tweaks + + src/hb-paint.cc | 149 +++++++++++++++++++++++++++++++++++++++++++++++++++++++- + src/hb-paint.h | 25 ++++++++-- + 2 files changed, 168 insertions(+), 6 deletions(-) + +commit 0a2f3673b9cbe340cdf329f3b303832b16f7d2ee +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sat Dec 17 13:51:23 2022 -0500 + + [paint] Use tags for image formats + + This fits better with the rest of the + HarfBuzz API. + + src/hb-ot-color-cbdt-table.hh | 2 +- + src/hb-ot-color-sbix-table.hh | 2 +- + src/hb-ot-color-svg-table.hh | 2 +- + src/hb-paint.cc | 6 +++--- + src/hb-paint.h | 30 +++++++++++++++++++++++------- + src/hb-paint.hh | 4 ++-- + util/hb-test.c | 4 ++-- + 7 files changed, 33 insertions(+), 17 deletions(-) + +commit 4c728e952b5f7fa29b6da6c674ac289fddaf875b +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sat Dec 17 13:33:56 2022 -0500 + + [colr] Add a todo + + src/hb-ot-color-colr-table.cc | 1 + + 1 file changed, 1 insertion(+) + +commit 4b0285bae60554c914f0b572fdaa5586be9f0611 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 17 11:18:42 2022 -0700 + + [colr] Use slant_xy + + src/hb-paint.hh | 20 ++++++++++++-------- + 1 file changed, 12 insertions(+), 8 deletions(-) + +commit b9314400eccb2dadce788f6af5d843d5341f2c11 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 17 10:58:52 2022 -0700 + + [colr] Hook up color-line variation + + src/hb-ot-color-colr-table.cc | 4 ++-- + src/hb-ot-color-colr-table.hh | 37 ++++++++++++++++++++++++------------- + 2 files changed, 26 insertions(+), 15 deletions(-) + +commit a935e4b0c256451f50b2c0886f4fed5152735b62 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sat Dec 17 12:59:58 2022 -0500 + + [paint] Add synthetic slant to root transform + + src/hb-paint.hh | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +commit edf27382630a30070a33d9f65f005741fb15d95b +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 17 10:47:55 2022 -0700 + + [colr] Try fixing bot build + + I don't get the error. Let's see. + + ../../src/harfbuzz/src/hb-ot-color-colr-table.hh:574:66: error: incomplete definition of type 'OT::NoVariable<OT::ColorLine<OT::NoVariable>>' + + src/hb-ot-color-colr-table.hh | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit 686e627bdf1ef28f0ced44c146d0b3cd7f2def33 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sat Dec 17 12:44:16 2022 -0500 + + [paint] Set up root transform in one place + + Instead of spreading this in all the tables, + make hb_paint_funcs_t provide a push/pop_root_transform + that does all the setup. + + src/OT/glyf/glyf.hh | 12 ++---------- + src/hb-ot-cff1-table.cc | 12 ++---------- + src/hb-ot-cff2-table.cc | 12 ++---------- + src/hb-ot-color-colr-table.hh | 20 ++++---------------- + src/hb-paint.hh | 12 ++++++++++++ + 5 files changed, 22 insertions(+), 46 deletions(-) + +commit c6dd56cc64d08defd661b3152a1ecd9b4b786db4 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 17 10:38:23 2022 -0700 + + [colr] Simplify color-stop handling + + src/hb-ot-color-colr-table.cc | 42 +++++++------------------------------ + src/hb-ot-color-colr-table.hh | 49 ++++++++----------------------------------- + 2 files changed, 17 insertions(+), 74 deletions(-) + +commit 485ba9beb36d16f91330f50fa6f403cdb192f294 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sat Dec 17 12:25:04 2022 -0500 + + [paint] Spell out rectangle in the API + + No need to abbreviate this. + + src/hb-paint.cc | 12 ++++++------ + src/hb-paint.h | 32 ++++++++++++++++---------------- + src/hb-paint.hh | 12 ++++++------ + util/hb-test.c | 12 ++++++------ + 4 files changed, 34 insertions(+), 34 deletions(-) + +commit 37f3f0fcc25ed5cc0ea822b1a780705ab842d7bd +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sat Dec 17 11:49:18 2022 -0500 + + [paint] Change the image callback + + Instead of passing the glyph ID, give + it the image blob, a mimetype, and + glyph extents (if available). + + Update all callers. + + src/hb-ot-color-cbdt-table.hh | 6 +++++- + src/hb-ot-color-sbix-table.hh | 6 +++++- + src/hb-ot-color-svg-table.hh | 2 +- + src/hb-paint.cc | 10 +++++++--- + src/hb-paint.h | 18 ++++++++++++++---- + src/hb-paint.hh | 6 ++++-- + util/hb-test.c | 16 ++++++++++------ + 7 files changed, 46 insertions(+), 18 deletions(-) + +commit ea48d6c292bd248a6607a0cfe1d17f05fc4f018f +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sat Dec 17 11:51:37 2022 -0500 + + Move hb_glyph_extents_t definition + + src/hb-common.h | 18 ++++++++++++++++++ + src/hb-font.h | 20 +------------------- + 2 files changed, 19 insertions(+), 19 deletions(-) + +commit b722039c48b41c1e96c7a1bcbad072a2332d4e46 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 17 10:22:32 2022 -0700 + + [colr] Simplify + + src/hb-ot-color-colr-table.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 452cfb95997cbc0a81f5533e1fa365cbf6888157 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 17 10:04:55 2022 -0700 + + [colr] Simplify loop using iterators + + Or complexify?! + + src/hb-ot-color-colr-table.hh | 10 ++++------ + 1 file changed, 4 insertions(+), 6 deletions(-) + +commit 601a596ca0837e36b45e117f70a5b7072c30d4e8 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 17 09:22:55 2022 -0700 + + [paint] Fix include path + + src/OT/glyf/glyf.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 8a9069d55fdfe738103a2fea83317a7fd1857727 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 17 09:21:08 2022 -0700 + + [colr] Fix radial gradient + + Broke it when adding variations. + + src/hb-ot-color-colr-table.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit e799c33bb59b8699a6c6b0f43e7e5854515c5075 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 17 09:00:20 2022 -0700 + + [paint] Fix function prototype + + src/hb-paint.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 1953d26a8a9cc0e70055c8cf5e8e876d7b6ac664 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 17 08:59:33 2022 -0700 + + [colr] Limit recursion depth + + src/hb-ot-color-colr-table.hh | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +commit 378bbeea015f492756cbe7ffc39e6144a0ffe5ee +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sat Dec 17 10:02:30 2022 -0500 + + Add more docs + + src/hb-font.cc | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +commit 9876e30c6ee8fc53ae4d26692b9482e6011d04a5 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sat Dec 17 02:46:37 2022 -0500 + + test: Support png images via paint_image + + util/hb-test.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 59 insertions(+) + +commit 6079173a5229b8f51a0ee15f4e4ea957f1e2e722 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sat Dec 17 01:04:35 2022 -0500 + + Try paint_glyph for more tables + + If the COLR table does not paint the glyph, + try SVG, CBDT and sbix too, before giving up + on color. + + src/hb-ot-font.cc | 6 ++++++ + 1 file changed, 6 insertions(+) + +commit e6c5a616aaf081d0603a6f6e74be66d89c2b1832 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sat Dec 17 02:13:38 2022 -0500 + + SVG Implement paint-glyph + + src/hb-ot-color-svg-table.hh | 20 ++++++++++++++++++++ + 1 file changed, 20 insertions(+) + +commit 23c60fd9b293f09461926f47cdd0779af766aff8 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sat Dec 17 01:04:23 2022 -0500 + + sbix: Implement paint_glyph + + src/hb-ot-color-sbix-table.hh | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) + +commit 7996ae4c3d4d99066efa738a8ddca3851ff94ec5 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sat Dec 17 01:04:00 2022 -0500 + + CBDT: Implement paint glyph + + src/hb-ot-color-cbdt-table.hh | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +commit 82e23f322a5e58e8fe7e74069f90507c09694c93 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sat Dec 17 00:33:59 2022 -0500 + + paint: Add a paint-image callback + + This will be used for image blobs like pngs and svgs. + + FIXME: nail down and document sizing. + + src/hb-paint.cc | 12 ++++++++++++ + src/hb-paint.h | 43 +++++++++++++++++++++++++++++++++++++++++++ + src/hb-paint.hh | 6 ++++++ + 3 files changed, 61 insertions(+) + +commit 56b02b6599168aec8743145021fbc9cec0163113 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Fri Dec 16 23:58:37 2022 -0500 + + Update the docs + + Mention that the color index will always be 0xFFFF + when using hb_paint API with fonts that don't have + color palettes. + + And add an outline about which kinds of glyphs + require which callbacks. + + src/hb-paint.h | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +commit 9461ab70883c4fa0492f5f71c902cdabba627d4f +Author: Matthias Clasen <mclasen@redhat.com> +Date: Fri Dec 16 23:46:45 2022 -0500 + + Try paint_glyph for more tables + + If the COLR table can't paint the glyph, + try glyf, cff1 and cff2 too. + + src/hb-ot-font.cc | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +commit 3e39dd492bd566e55183ff4e2b136288dfd5458c +Author: Matthias Clasen <mclasen@redhat.com> +Date: Fri Dec 16 23:46:15 2022 -0500 + + cff2: Implement paint_glyph + + src/hb-ot-cff2-table.cc | 21 +++++++++++++++++++++ + src/hb-ot-cff2-table.hh | 2 ++ + 2 files changed, 23 insertions(+) + +commit df89b52130ce85ed481f8672f051744b947df6a5 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Fri Dec 16 23:46:05 2022 -0500 + + cff1: Implement paint_glyph + + src/hb-ot-cff1-table.cc | 21 +++++++++++++++++++++ + src/hb-ot-cff1-table.hh | 2 ++ + 2 files changed, 23 insertions(+) + +commit 2edd771cf58de4348d6c760e4fbe77ea0f1ba16a +Author: Matthias Clasen <mclasen@redhat.com> +Date: Fri Dec 16 23:32:15 2022 -0500 + + glyf: Implement paint_glyph + + src/OT/glyf/glyf.hh | 22 ++++++++++++++++++++++ + 1 file changed, 22 insertions(+) + +commit 0b33b35eb0fc50045adc614dc60567fad837762b +Author: Matthias Clasen <mclasen@redhat.com> +Date: Fri Dec 16 23:22:15 2022 -0500 + + COLRv1: Return bool from paint_glyph + + This will let hb_ot_font_paint_glyph() try + multiple tables in turn. + + src/hb-ot-color-colr-table.hh | 41 ++++++++++++++++++++++++++++------------- + 1 file changed, 28 insertions(+), 13 deletions(-) + +commit 0d890061d139a9a8b59d8aef7e73a02bec1489ee +Author: Matthias Clasen <mclasen@redhat.com> +Date: Sat Dec 17 00:07:30 2022 -0500 + + Rename 'solid' to 'color' + + 'solid' does not really describe well what + the function does, and there is no strong + reason to stick 1:1 to the terminology used + in the spec. + + src/hb-ot-color-colr-table.hh | 4 +- + src/hb-ot-color-colrv1-paint.hh | 286 ++++++++++++++++++++++++++++++++++++++++ + src/hb-paint.cc | 6 +- + src/hb-paint.h | 18 +-- + src/hb-paint.hh | 8 +- + util/hb-test.c | 58 ++++---- + 6 files changed, 333 insertions(+), 47 deletions(-) + +commit 2c07828603847892fe2759d2397530910f3f42e2 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Fri Dec 16 23:23:51 2022 -0500 + + test: More debug spew + + util/hb-test.c | 20 ++++++++++++++++++++ + 1 file changed, 20 insertions(+) + +commit 46286275f7f49149ef9e1db45d703880f094c1ee +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 16 15:27:18 2022 -0700 + + [colr] More dispatch functionality + + src/hb-ot-color-colr-table.cc | 4 ++-- + src/hb-ot-color-colr-table.hh | 39 ++++++++++++++++++--------------------- + 2 files changed, 20 insertions(+), 23 deletions(-) + +commit 81f232afb509bf94d8d909236c5bc1f507b08b5e +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 16 15:17:35 2022 -0700 + + [colr] Use dispatch machinery for paint_glyph context + + src/hb-ot-color-colr-table.hh | 48 +++++++------------------------------------ + 1 file changed, 7 insertions(+), 41 deletions(-) + +commit a96300d42cf0a85ba6fa84eacfe583d8faf9c906 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 16 15:11:35 2022 -0700 + + [colr] Hide internal symbols + + src/harfbuzz-subset.cc | 1 + + src/harfbuzz.cc | 1 + + src/hb-ot-color-colr-table.hh | 4 ++-- + 3 files changed, 4 insertions(+), 2 deletions(-) + +commit fdf17dbf34666918979cb53c89e85b0c92fcf12b +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 16 15:00:06 2022 -0700 + + Try fixing bots + + util/hb-test.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit b4cab86d94affa5b610154623a393afffac9728c +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 16 14:58:39 2022 -0700 + + Fix autotools build + + src/Makefile.sources | 1 + + src/harfbuzz-subset.cc | 1 - + src/harfbuzz.cc | 1 - + 3 files changed, 1 insertion(+), 2 deletions(-) + +commit 07575190928ff7bcb72885943d9b7073a27e4e3c +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 16 12:45:02 2022 -0700 + + [colr] Add variation to rest of the paints + + src/hb-ot-color-colr-table.hh | 80 +++++++++++++++++++++++++++++-------------- + 1 file changed, 54 insertions(+), 26 deletions(-) + +commit 5bce0053463ff29386f1442f3720fd847d972263 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 16 12:31:08 2022 -0700 + + [colr] Flesh out variations for a few paints + + src/hb-ot-color-colr-table.hh | 22 +++++++++++++++------- + 1 file changed, 15 insertions(+), 7 deletions(-) + +commit 9d3440b74299da8beb59c55e88aaf61fec39c507 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 16 12:12:21 2022 -0700 + + [colr] Add variation infrastructure to paint_glyph + + No paint applies variations yet. + + src/hb-ot-color-colr-table.hh | 80 ++++++++++++++++++++++++------------------- + 1 file changed, 45 insertions(+), 35 deletions(-) + +commit 5c6329555e6171e82cdf151a119166666a08426b +Author: Matthias Clasen <mclasen@redhat.com> +Date: Fri Dec 16 12:04:17 2022 -0500 + + Apply root transform + + This commit applies scale, slant is still missing. + + src/hb-ot-color-colr-table.hh | 15 +++++++++++++-- + util/hb-test.c | 22 +++++++++++++--------- + 2 files changed, 26 insertions(+), 11 deletions(-) + +commit 5afca91ff22c76fbe65da1f2084b5029a66bee14 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Fri Dec 16 06:43:43 2022 -0500 + + Add some docs + + src/hb-paint.cc | 48 +++++++++++- + src/hb-paint.h | 226 +++++++++++++++++++++++++++++++++++++------------------- + 2 files changed, 196 insertions(+), 78 deletions(-) + +commit 44c68594f197f325fd9c50c3ca3d8ca1dca0be01 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Fri Dec 16 00:48:28 2022 -0500 + + Some docs + + src/hb-paint.cc | 9 +++ + src/hb-paint.h | 230 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 239 insertions(+) + +commit d7c2eacf454e1345c15978bae9fff791d23effde +Author: Matthias Clasen <mclasen@redhat.com> +Date: Thu Dec 15 23:42:40 2022 -0500 + + Handle COLRv0 layers in paint_glyph + + src/hb-ot-color-colr-table.hh | 26 ++++++++++++++++++++------ + 1 file changed, 20 insertions(+), 6 deletions(-) + +commit 55ca6ed230b74f84345258217e51d4865e763f2c +Author: Matthias Clasen <mclasen@redhat.com> +Date: Thu Dec 15 23:16:54 2022 -0500 + + minor fixes + + src/hb-ot-color-colr-table.cc | 73 +++++++++++++++++++++++++++++++++++++++++++ + src/hb-ot-color-colr-table.hh | 9 ++++-- + 2 files changed, 80 insertions(+), 2 deletions(-) + +commit 794fa4c3c1d6564477a0885b95f80409f9272090 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Thu Dec 15 22:22:31 2022 -0500 + + sweep gradients etc + + util/hb-test.c | 819 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 817 insertions(+), 2 deletions(-) + +commit 1880e547531a8f137564e9c5bf7421005e8cffbd +Author: Matthias Clasen <mclasen@redhat.com> +Date: Thu Dec 15 01:06:00 2022 -0500 + + Assorted fixes + + src/hb-ot-color-colr-table.hh | 62 ++++++++++++++++++++++++++----------------- + 1 file changed, 37 insertions(+), 25 deletions(-) + +commit 684df8a82a81e01412dc951c251abab77165ae66 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Thu Dec 15 00:32:48 2022 -0500 + + add some todos + + src/hb-font.cc | 1 + + src/hb-ot-color-colr-table.hh | 2 ++ + 2 files changed, 3 insertions(+) + +commit a6f813b68009325f9b5cc478ed83b312b06ad996 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Thu Dec 15 00:05:27 2022 -0500 + + Implement hb_color_line_get_extend + + src/hb-ot-color-colr-table.hh | 30 ++++++++++++++++++++++++++++++ + 1 file changed, 30 insertions(+) + +commit d07fdc69dd66ad520f9ce24438fbef5c7c41f28e +Author: Matthias Clasen <mclasen@redhat.com> +Date: Wed Dec 14 23:58:59 2022 -0500 + + test: dump color lines + + util/hb-test.c | 26 +++++++++++++++++++++----- + 1 file changed, 21 insertions(+), 5 deletions(-) + +commit 3937d6b0aaff5b5937bb513430e7df30f3517315 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Wed Dec 14 23:58:47 2022 -0500 + + Implement hb_color_line_t + + src/hb-ot-color-colr-table.hh | 139 +++++++++++++++++++++++++++++++++++++----- + 1 file changed, 123 insertions(+), 16 deletions(-) + +commit 64f1b55d01afa0a8424b0336fcaad626d9814126 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Wed Dec 14 23:58:25 2022 -0500 + + api fixes: use floats consistently + + src/hb-paint.cc | 14 +++++++------- + src/hb-paint.h | 11 ++++++----- + src/hb-paint.hh | 8 ++++---- + 3 files changed, 17 insertions(+), 16 deletions(-) + +commit 627c857f8b8ea5c5efab1525daef2d7e5ec04401 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Wed Dec 14 22:36:54 2022 -0500 + + rename pop_group_and_composite + + src/hb-ot-color-colr-table.hh | 4 ++-- + src/hb-paint.cc | 12 ++++++------ + src/hb-paint.h | 28 ++++++++++++++-------------- + src/hb-paint.hh | 12 ++++++------ + util/hb-test.c | 10 +++++----- + 5 files changed, 33 insertions(+), 33 deletions(-) + +commit c9350838c7a039b87408ff2686759d0bd0c05377 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Wed Dec 14 22:32:40 2022 -0500 + + assorted fixes and changes + + src/hb-ot-color-colr-table.hh | 4 +- + src/hb-paint.cc | 112 +++++++++++++++++++++++------------------- + src/hb-paint.h | 73 +++++++++++++++++---------- + src/hb-paint.hh | 37 ++++++++------ + util/hb-test.c | 43 ++++++++++------ + 5 files changed, 158 insertions(+), 111 deletions(-) + +commit 5a123e8691ae839e6409fdcd51edab0c62c0e9a4 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Wed Dec 14 22:05:02 2022 -0500 + + quick testcase + + util/hb-test.c | 168 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ + util/meson.build | 7 +++ + 2 files changed, 175 insertions(+) + +commit 42324aef2b18728d6318ffd4de08a21b54126c92 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Wed Dec 14 22:04:46 2022 -0500 + + hb-paint: annotation fix + + src/hb-paint.h | 20 ++++++++++---------- + 1 file changed, 10 insertions(+), 10 deletions(-) + +commit 8377341b289f47a8e63d448b5a3376dfdd464734 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Wed Dec 14 22:03:52 2022 -0500 + + wip: implement paint_glyph + + src/harfbuzz-subset.cc | 1 + + src/harfbuzz.cc | 1 + + src/hb-ot-color-colr-table.hh | 204 ++++++++++++++++++++++++++++++++++++++++-- + src/meson.build | 1 + + 4 files changed, 199 insertions(+), 8 deletions(-) + +commit efe13a191df504df4a38f633c35a73477cf93b01 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Wed Dec 14 09:50:52 2022 -0500 + + fix introspection + + src/hb-font.h | 8 +++++- + src/hb-gobject-structs.cc | 1 + + src/hb-gobject-structs.h | 4 +++ + src/hb-paint.cc | 5 ++++ + src/hb-paint.h | 70 +++++++++++++++++++++++++++++++++++++++++++++++ + 5 files changed, 87 insertions(+), 1 deletion(-) + +commit 6a48ac42f4f8404ecf64fda876141a0d1c48a56c +Author: Matthias Clasen <mclasen@redhat.com> +Date: Wed Dec 14 06:55:01 2022 -0500 + + COLR implementation + + src/hb-ot-color-colr-table.hh | 5 +++++ + src/hb-ot-font.cc | 18 ++++++++++++++++++ + 2 files changed, 23 insertions(+) + +commit 71efa0dcf12eb3924697f96d3a4ed203bb71962b +Author: Matthias Clasen <mclasen@redhat.com> +Date: Wed Dec 14 06:22:00 2022 -0500 + + wip: hb_font_paint_glyph + + src/hb-font.cc | 30 ++++++++++++++++++++++++++++++ + src/hb-font.h | 16 ++++++++++++++++ + src/hb-font.hh | 9 +++++++++ + 3 files changed, 55 insertions(+) + +commit 83d0a49f7100008937fcf7e69e31fe9625365259 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Tue Dec 13 21:14:25 2022 -0500 + + wip: hb-paint + + src/harfbuzz-subset.cc | 1 + + src/harfbuzz.cc | 1 + + src/hb-ot-color-colr-table.hh | 5 + + src/hb-paint.cc | 311 ++++++++++++++++++++++++++++++++++++++++++ + src/hb-paint.h | 276 +++++++++++++++++++++++++++++++++++++ + src/hb-paint.hh | 125 +++++++++++++++++ + src/hb.h | 1 + + src/meson.build | 3 + + 8 files changed, 723 insertions(+) + +commit 0066e824f02efce79e026f60391f3fd95214e1ac +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 23 13:37:38 2022 -0700 + + [util] Fix vertical positioning with --glyphs + + util/shape-options.hh | 4 ++++ + 1 file changed, 4 insertions(+) + +commit 265b699fbd3c74c1c4324d5f7044e7236d3b0b89 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 23 13:31:48 2022 -0700 + + [util] Improve --glyphs + + util/shape-consumer.hh | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +commit d45f7265e9dfbb053ae3ed88575136d75979c02b +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Dec 23 13:13:29 2022 -0700 + + [hb-view/hb-shape] Add --glyphs + + This makes hb-view take output of hb-shape and render it. + + util/shape-consumer.hh | 2 +- + util/shape-options.hh | 44 +++++++++++++++++++++++++++++++++++++++----- + 2 files changed, 40 insertions(+), 6 deletions(-) + +commit 30c5402e3d0cc156fd5f04560864a88723173cf2 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Fri Dec 23 14:29:25 2022 -0500 + + Make hb-features.h usable standalone + + The intended use for hb-features.h is to + be included standalone, so we can't put + the single-include guards in here. + + src/hb-features.h.in | 6 ------ + 1 file changed, 6 deletions(-) + +commit d628aff9db826671b1612ed1865f5cdbd763c9f8 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Dec 22 10:53:24 2022 -0700 + + [ft] Apply slant in get_glyph_extents + + src/hb-ft.cc | 4 ++++ + 1 file changed, 4 insertions(+) + +commit 9a0ebd2b2ab4b7fa5e1463c0ac4549cb24b21896 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Dec 22 10:21:07 2022 -0700 + + [glyf] Fix slant-scaling in GlyphHeader too + + src/OT/glyf/GlyphHeader.hh | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +commit 392463bff591fd0cec2ea2476b30427251f7c9f4 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Dec 22 08:34:01 2022 -0700 + + [cff] Fix extent rounding + + I broke it in b0abbfd8684e9970ed2cac78781643edb7cce0ae. + + src/hb-ot-cff1-table.cc | 8 ++++---- + src/hb-ot-cff2-table.cc | 8 ++++---- + 2 files changed, 8 insertions(+), 8 deletions(-) + +commit 897c102703e482f8ed0842e63c6fb96f15dface3 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Dec 22 08:14:13 2022 -0700 + + [font] Fix scale_glyph_extents + + src/hb-font.hh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 9194e13e25563f7170c68b0126f5852925c526ff +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Dec 22 07:31:16 2022 -0700 + + [font] Apply slant to glyph extents + + Fixes https://github.com/harfbuzz/harfbuzz/issues/3952 + + hb-ft not fixed since doesn't use this code. + + src/hb-font.hh | 4 ++++ + 1 file changed, 4 insertions(+) + +commit b0abbfd8684e9970ed2cac78781643edb7cce0ae +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Dec 22 07:26:14 2022 -0700 + + [font] Centralize glyph-extents scaling + + Needs more testing... + + Some rounding was removed, namely in cff1 and cff2. + + src/OT/glyf/glyf.hh | 11 +++-------- + src/hb-font.hh | 8 ++++++++ + src/hb-ot-cff1-table.cc | 10 ++++++---- + src/hb-ot-cff2-table.cc | 10 ++++++---- + src/hb-ot-color-cbdt-table.hh | 10 ++++++---- + src/hb-ot-color-colr-table.hh | 5 +---- + src/hb-ot-color-sbix-table.hh | 18 ++++++++++-------- + 7 files changed, 40 insertions(+), 32 deletions(-) + +commit 4622be7f84b22ad3fb1c7141c0e4ec88dd5672c8 +Author: Chun-wei Fan <fanc999@yahoo.com.tw> +Date: Thu Dec 22 12:05:11 2022 +0800 + + test/fuzzing: Fix dist + + We need to dist the repacker fuzzer test items into the tarball, along + with the items in graphs/ and sets/. + + test/fuzzing/Makefile.am | 7 +++++++ + 1 file changed, 7 insertions(+) + +commit 97b8ada8652ef7ca7e33f6fe927ab8bf3c18396e +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Wed Dec 21 19:52:20 2022 -0700 + + [varc] Reset component coordinates to that of the font + + Fixes https://github.com/harfbuzz/boring-expansion-spec/issues/78 + + src/OT/glyf/Glyph.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 40342c9437712cd51e37dc54f1f535bb24ae7529 +Author: Garret Rieger <grieger@google.com> +Date: Wed Dec 21 21:52:28 2022 +0000 + + [subset] check for addition overflow in hdmx size calculation. + + Fixes https://oss-fuzz.com/testcase-detail/4877336988483584. + + src/hb-ot-hdmx-table.hh | 1 + + ...z-testcase-minimized-hb-subset-fuzzer-4877336988483584 | Bin 0 -> 738 bytes + 2 files changed, 1 insertion(+) + +commit d77fca997ed0e9526e98eb78be2e469886123da0 +Author: Garret Rieger <grieger@google.com> +Date: Wed Dec 21 21:18:20 2022 +0000 + + [subset] when subsetting preprocessor fails, reference the returned face. + + The caller of the method is expected to destroy the returned result. + + src/hb-subset-input.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit fc8fa184183d7eaa49d789963d6ae9456e32680c +Author: Khaled Hosny <khaled@aliftype.com> +Date: Tue Dec 20 19:04:41 2022 +0200 + + Revert "[doc] Don’t skip building on Windows" + + This reverts commit 196e739cf28456cd8b7989377c3df6a5fe468dd7. + + docs/meson.build | 5 +++++ + 1 file changed, 5 insertions(+) + +commit 6d80aba49e20f5915545dcc4116f5e68eab8c57f +Author: Khaled Hosny <khaled@aliftype.com> +Date: Tue Dec 20 19:01:04 2022 +0200 + + Revert "[doc] Remove redundant check for gtkdoc-scan" + + This reverts commit 0409363f77cab416b34aab66d647a3d61f46d9d8. + + Broke lots of bots. + + docs/meson.build | 5 +++++ + 1 file changed, 5 insertions(+) + +commit 9b5b4da0e471a16be46ddc60b0e2a233a84abd8d +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Dec 20 09:57:32 2022 -0700 + + [varc] Set coordinates as absolute values + + src/OT/glyf/VarCompositeGlyph.hh | 1 - + 1 file changed, 1 deletion(-) + +commit 0409363f77cab416b34aab66d647a3d61f46d9d8 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Tue Dec 20 18:42:13 2022 +0200 + + [doc] Remove redundant check for gtkdoc-scan + + If docs are enabled, meson will fail earlier of gtkdoc-scan is missing. + + docs/meson.build | 5 ----- + 1 file changed, 5 deletions(-) + +commit 196e739cf28456cd8b7989377c3df6a5fe468dd7 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Tue Dec 20 18:41:01 2022 +0200 + + [doc] Don’t skip building on Windows + + We don’t enable building docs by default, so if one asked explicitly for + it we shouldn’t be overriding that. + + docs/meson.build | 5 ----- + 1 file changed, 5 deletions(-) + +commit 80e68f09c5daef0c3dfef4fb44ebfbd22899bf8a +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Dec 19 19:15:44 2022 -0700 + + [VarC] Change rotation/skew representation + + Fixes https://github.com/harfbuzz/boring-expansion-spec/issues/77 + + src/OT/glyf/VarCompositeGlyph.hh | 12 ++++++------ + src/hb-open-type.hh | 3 +-- + 2 files changed, 7 insertions(+), 8 deletions(-) + +commit 1840b02e6a61d030cf485ea6c36126cd6dbd984e +Author: Garret Rieger <grieger@google.com> +Date: Mon Dec 19 20:06:32 2022 +0000 + + [subset] Don't gate access to the table repacker. + + Any table with an object graph should repack correctly. + + src/hb-subset.cc | 7 ------- + 1 file changed, 7 deletions(-) + +commit 03a1685693e59f0c31803daf6647a80b4a111e9b +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Dec 19 17:11:34 2022 -0700 + + [VarC] Change representation of scale from 4.12 to 6.10 + + Fixes https://github.com/harfbuzz/boring-expansion-spec/issues/76 + + src/OT/glyf/VarCompositeGlyph.hh | 12 ++++++------ + src/hb-open-type.hh | 4 ++-- + 2 files changed, 8 insertions(+), 8 deletions(-) + +commit 1a51f71afd794a52a24cbcb7547000e0c563b0f6 +Author: Garret Rieger <grieger@google.com> +Date: Mon Dec 19 22:40:11 2022 +0000 + + [subset] don't segfault when --help-all is specified w/ instancing options. + + util/hb-subset.cc | 4 ++++ + 1 file changed, 4 insertions(+) + +commit c292e577ff7d6b6b9d98e95dabd7ed71a02021fc +Author: Matthias Clasen <mclasen@redhat.com> +Date: Mon Dec 19 12:40:11 2022 -0500 + + Fix a typo + + src/hb-draw.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit b795246fff2246266287a728475b97e8873f3f14 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Mon Dec 19 06:30:28 2022 -0500 + + [draw] Clarify the docs + + Disambiguate the origin of draw_data and user_data, + this had me confused a few times. + + Fixes: https://github.com/harfbuzz/harfbuzz/issues/3955 + + src/hb-draw.h | 20 ++++++++++---------- + 1 file changed, 10 insertions(+), 10 deletions(-) + +commit eddb408f9c9c42991c8b8427ca81e33a03fc9060 +Author: Matthias Clasen <mclasen@redhat.com> +Date: Mon Dec 19 12:19:48 2022 -0500 + + [draw] Small doc fix + + src/hb-draw.cc | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +commit bc4c290b7581bbcb7632d74a2ebebc24bd5df9f1 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Mon Dec 19 00:39:35 2022 +0200 + + [doc] Workaround gtk-doc limitation with HB_DEPRECATED_FOR + + See https://github.com/harfbuzz/harfbuzz/issues/3957#issuecomment-1356890525 + + src/hb-deprecated.h | 3 ++- + src/hb-graphite2.h | 3 ++- + src/hb-ot-deprecated.h | 18 ++++++++++++------ + 3 files changed, 16 insertions(+), 8 deletions(-) + +commit 734e5f7cf412e421568963e5a5fe3ee51365163e +Author: Khaled Hosny <khaled@aliftype.com> +Date: Mon Dec 19 00:15:04 2022 +0200 + + [doc] Add HB_DEPRECATED_FOR to --ignore-decorators + + Does not make a difference, though. + + docs/Makefile.am | 2 +- + docs/meson.build | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +commit f9e1192d58e54f6719993a1694aee0a73198d63d +Author: Khaled Hosny <khaled@aliftype.com> +Date: Sun Dec 18 23:58:36 2022 +0200 + + [ot-tag] Document two deprecated symbols + + See https://github.com/harfbuzz/harfbuzz/issues/3957 + + src/hb-ot-tag.cc | 20 ++++++++++++++++++++ + 1 file changed, 20 insertions(+) + +commit 947e01a7c1bc7eede4077ced24923acd8f45e0f5 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Sun Dec 18 23:40:01 2022 +0200 + + [subset] Suppress gtk-doc warning + + src/hb-subset-input.cc | 2 ++ + 1 file changed, 2 insertions(+) + +commit 9ca8e7564b52ae889961144d6533e8143a0f3771 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Sun Dec 18 17:44:41 2022 +0200 + + Revert "[circleci] Make dist tarball with meson" + + This reverts commit 80157cc60baf0f1b26c442c336dc1854216468be. + + That was a thinko, meson generated dist tarballs are not usable for + autotools build as they will miss generated autotools files. + + .circleci/config.yml | 33 +++++++++++---------------------- + 1 file changed, 11 insertions(+), 22 deletions(-) + +commit c7dd63d1a04e797f21ba3fd7bb5aa5d08524c9dd +Author: Nirbheek Chauhan <nirbheek@centricular.com> +Date: Sun Dec 18 09:28:47 2022 +0530 + + meson: Provide binaries when built as a subproject + + util/meson.build | 4 ++++ + 1 file changed, 4 insertions(+) + +commit 7be06f63779e3221333d3162f2025b1c497c5c8c +Author: Nirbheek Chauhan <nirbheek@centricular.com> +Date: Sun Dec 18 07:10:32 2022 +0530 + + meson: Override dependencies to improve usage as a subproject + + With this change, harfbuzz can be consumed as a subproject without + making any changes to the build files of a project. All you need to do + is provide a wrap file with a `[provide]` section: + + https://mesonbuild.com/Wrap-dependency-system-manual.html#provide-section + + This is also necessary because otherwise projects need to hard-code + the subproject name, which might be `harfbuzz` when using `wrap-git` or + `harfbuzz-6.0.0` when using `wrap-file` (to build from a release + tarball). This can cause conflicts between different subprojects that + consume harfbuzz differently. + + Other projects like glib, cairo, pango, etc already do this. + + src/meson.build | 4 ++++ + 1 file changed, 4 insertions(+) + +commit 206957aee4a4479ca19a4065b2c5603e99379fcf +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Sat Dec 17 08:57:40 2022 -0700 + + [COLR] Change recursion limit back to 128 + + src/hb-ot-color-colr-table.hh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 31ba950b71acbcb8d71a82bde0675785d24ff791 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Sat Dec 17 01:11:20 2022 +0200 + + [circleci] Don’t run tests in dist + + .circleci/config.yml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit f22e42d7376f980fbb32e35a194f1dc1bfc3af0e +Author: Khaled Hosny <khaled@aliftype.com> +Date: Sat Dec 17 00:57:26 2022 +0200 + + [circleci] Remove cruft + + .circleci/config.yml | 16 ---------------- + 1 file changed, 16 deletions(-) + +commit 21e866b8b5006ee99f40077fe1c494faf9ccb014 +Author: Khaled Hosny <khaled@aliftype.com> +Date: Sat Dec 17 00:34:46 2022 +0200 + + [circleci] Unify meson commands a bit + + .circleci/config.yml | 33 ++++++++++++++++++--------------- + 1 file changed, 18 insertions(+), 15 deletions(-) + +commit 80157cc60baf0f1b26c442c336dc1854216468be +Author: Khaled Hosny <khaled@aliftype.com> +Date: Sat Dec 17 00:19:27 2022 +0200 + + [circleci] Make dist tarball with meson + + .circleci/config.yml | 33 ++++++++++++++++++++++----------- + 1 file changed, 22 insertions(+), 11 deletions(-) + commit afcae83a064843d71d47624bc162e121cc56c08b Author: Khaled Hosny <khaled@aliftype.com> Date: Fri Dec 16 23:14:57 2022 +0200 diff --git a/source/libs/harfbuzz/harfbuzz-src/NEWS b/source/libs/harfbuzz/harfbuzz-src/NEWS index 73dcef083ab643e1a50c2f87be8eba251c3ecdd5..9a5914525c51e97231817bb9e7ed579000dadbd7 100644 --- a/source/libs/harfbuzz/harfbuzz-src/NEWS +++ b/source/libs/harfbuzz/harfbuzz-src/NEWS @@ -1,3 +1,139 @@ +Overview of changes leading to 7.0.1 +Monday, February 20, 2023 +==================================== +- Various build and bug fixes. + + +Overview of changes leading to 7.0.0 +Saturday, February 11, 2023 +==================================== +- New hb-paint API that is designed mainly to paint “COLRv1†glyphs, but can be + also used as a unified API to paint any of the glyph representations + supported by HarfBuzz (B/W outlines, color layers, or color bitmaps). + (Behdad Esfahbod, Matthias Clasen) +- New hb-cairo API for integrating with cairo graphics library. This is provided + as a separate harfbuzz-cairo library. (Behdad Esfahbod, Matthias Clasen) +- Support for instancing “CFF2†table. (Behdad Esfahbod) +- Support font emboldening. (Behdad Esfahbod) +- Support feature ranges with AAT shaping. (Behdad Esfahbod) +- Experimental support to cubic curves in “glyf†table, see + https://github.com/harfbuzz/boring-expansion-spec/blob/main/glyf1-cubicOutlines.md + for spec. (Behdad Esfahbod) +- Various subsetter improvements. (Garret Rieger, Qunxin Liu, Behdad Esfahbod) +- Various documentation improvements. + (Behdad Esfahbod, Matthias Clasen, Khaled Hosny) +- Significantly reduced memory use during shaping. (Behdad Esfahbod) +- Greatly reduced memory use during subsetting “CFF†table. (Behdad Esfahbod) +- New command line utility, hb-info, for querying various font information. + (Behdad Esfahbod, Matthias Clasen) +- New hb-shape/hb-view options: --glyphs, --color-palette, --font-bold, + --font-grade, and --named-instance. (Behdad Esfahbod) +- Miscellaneous fixes and improvements. + (Amir Masoud Abdol, Andres Salomon, Behdad Esfahbod, Chun-wei Fan, + Garret Rieger, Jens Kutilek, Khaled Hosny, Konstantin Käfer, Matthias Clasen, + Nirbheek Chauhan, Pedro J. Estébanez, Qunxin Liu, Sergei Trofimovich) + +- New API: ++HB_FONT_NO_VAR_NAMED_INSTANCE ++HB_PAINT_IMAGE_FORMAT_BGRA ++HB_PAINT_IMAGE_FORMAT_PNG ++HB_PAINT_IMAGE_FORMAT_SVG ++hb_cairo_font_face_create_for_face ++hb_cairo_font_face_create_for_font ++hb_cairo_font_face_get_face ++hb_cairo_font_face_get_font ++hb_cairo_font_face_get_scale_factor ++hb_cairo_font_face_set_font_init_func ++hb_cairo_font_face_set_scale_factor ++hb_cairo_font_init_func_t ++hb_cairo_glyphs_from_buffer ++hb_cairo_scaled_font_get_font ++hb_color_line_get_color_stops ++hb_color_line_get_color_stops_func_t ++hb_color_line_get_extend ++hb_color_line_get_extend_func_t ++hb_color_line_t ++hb_color_stop_t ++hb_draw_funcs_get_empty ++hb_draw_funcs_get_user_data ++hb_draw_funcs_set_user_data ++hb_face_collect_nominal_glyph_mapping ++hb_font_draw_glyph ++hb_font_draw_glyph_func_t ++hb_font_funcs_set_draw_glyph_func ++hb_font_funcs_set_paint_glyph_func ++hb_font_get_synthetic_bold ++hb_font_get_var_named_instance ++hb_font_paint_glyph ++hb_font_paint_glyph_func_t ++hb_font_set_synthetic_bold ++hb_map_keys ++hb_map_next ++hb_map_update ++hb_map_values ++hb_ot_color_glyph_has_paint ++hb_ot_color_has_paint ++hb_ot_layout_script_select_language2 ++hb_ot_name_id_predefined_t ++hb_paint_color ++hb_paint_color_func_t ++hb_paint_composite_mode_t ++hb_paint_custom_palette_color ++hb_paint_custom_palette_color_func_t ++hb_paint_extend_t ++hb_paint_funcs_create ++hb_paint_funcs_destroy ++hb_paint_funcs_get_empty ++hb_paint_funcs_get_user_data ++hb_paint_funcs_is_immutable ++hb_paint_funcs_make_immutable ++hb_paint_funcs_reference ++hb_paint_funcs_set_color_func ++hb_paint_funcs_set_custom_palette_color_func ++hb_paint_funcs_set_image_func ++hb_paint_funcs_set_linear_gradient_func ++hb_paint_funcs_set_pop_clip_func ++hb_paint_funcs_set_pop_group_func ++hb_paint_funcs_set_pop_transform_func ++hb_paint_funcs_set_push_clip_glyph_func ++hb_paint_funcs_set_push_clip_rectangle_func ++hb_paint_funcs_set_push_group_func ++hb_paint_funcs_set_push_transform_func ++hb_paint_funcs_set_radial_gradient_func ++hb_paint_funcs_set_sweep_gradient_func ++hb_paint_funcs_set_user_data ++hb_paint_funcs_t ++hb_paint_image ++hb_paint_image_func_t ++hb_paint_linear_gradient ++hb_paint_linear_gradient_func_t ++hb_paint_pop_clip ++hb_paint_pop_clip_func_t ++hb_paint_pop_group ++hb_paint_pop_group_func_t ++hb_paint_pop_transform ++hb_paint_pop_transform_func_t ++hb_paint_push_clip_glyph ++hb_paint_push_clip_glyph_func_t ++hb_paint_push_clip_rectangle ++hb_paint_push_clip_rectangle_func_t ++hb_paint_push_group ++hb_paint_push_group_func_t ++hb_paint_push_transform ++hb_paint_push_transform_func_t ++hb_paint_radial_gradient ++hb_paint_radial_gradient_func_t ++hb_paint_sweep_gradient ++hb_paint_sweep_gradient_func_t ++hb_set_is_inverted ++hb_subset_input_keep_everything + +- Deprecated API: ++hb_font_funcs_set_glyph_shape_func ++hb_font_get_glyph_shape_func_t ++hb_font_get_glyph_shape + + Overview of changes leading to 6.0.0 Friday, December 16, 2022 ==================================== diff --git a/source/libs/harfbuzz/harfbuzz-src/RELEASING.md b/source/libs/harfbuzz/harfbuzz-src/RELEASING.md index 8d5a4060b6e1d62f8fc354fdb32c1f12cf1013f4..2e5f2bd82ebd1f6161034c1c2791daf617ac61e3 100644 --- a/source/libs/harfbuzz/harfbuzz-src/RELEASING.md +++ b/source/libs/harfbuzz/harfbuzz-src/RELEASING.md @@ -17,7 +17,7 @@ - [ ] Based on severity of changes, decide whether it's a minor or micro release number bump. -- [ ] Search for REPLACEME on the repository and replace it with the chosen version for the release. +- [ ] Search for 'XSince: REPLACEME' on the repository and replace it with the chosen version for the release, e.g. 'Since: 1.4.7'. - [ ] Make sure you have correct date and new version at the top of NEWS file. diff --git a/source/libs/harfbuzz/harfbuzz-src/configure.ac b/source/libs/harfbuzz/harfbuzz-src/configure.ac index abe86ede58734329b8f31b61b68493ded13783bd..099259a2752cbf3d6053a4305c277a6abfd8f730 100644 --- a/source/libs/harfbuzz/harfbuzz-src/configure.ac +++ b/source/libs/harfbuzz/harfbuzz-src/configure.ac @@ -1,6 +1,6 @@ AC_PREREQ([2.64]) AC_INIT([HarfBuzz], - [6.0.0], + [7.0.1], [https://github.com/harfbuzz/harfbuzz/issues/new], [harfbuzz], [http://harfbuzz.org/]) @@ -45,7 +45,7 @@ AC_SUBST(HB_VERSION) # Libtool version m4_define([hb_version_int], - m4_eval(hb_version_major*10000 + hb_version_minor*100 + hb_version_micro)) + m4_eval(60000 + hb_version_major*100 + hb_version_minor*10 + hb_version_micro)) HB_LIBTOOL_VERSION_INFO=hb_version_int:0:hb_version_int AC_SUBST(HB_LIBTOOL_VERSION_INFO) diff --git a/source/libs/harfbuzz/harfbuzz-src/meson.build b/source/libs/harfbuzz/harfbuzz-src/meson.build index cc802f2f5cf98d515542eb4706b4fc521766ffb1..1515257c9c980dcb9258bf1146d99e8c7e7cb964 100644 --- a/source/libs/harfbuzz/harfbuzz-src/meson.build +++ b/source/libs/harfbuzz/harfbuzz-src/meson.build @@ -1,8 +1,9 @@ project('harfbuzz', 'c', 'cpp', meson_version: '>= 0.55.0', - version: '6.0.0', + version: '7.0.1', default_options: [ - 'cpp_rtti=false', # Just to support msvc, we are passing -fno-exceptions also anyway + 'cpp_eh=none', # Just to support msvc, we are passing -fno-exceptions also anyway + 'cpp_rtti=false', # Just to support msvc, we are passing -fno-rtti also anyway 'cpp_std=c++11', 'wrap_mode=nofallback', # Use --wrap-mode=default to revert, https://github.com/harfbuzz/harfbuzz/pull/2548 ], @@ -14,7 +15,7 @@ hb_version_minor = hb_version_arr[1].to_int() hb_version_micro = hb_version_arr[2].to_int() # libtool versioning -hb_version_int = hb_version_major*10000 + hb_version_minor*100 + hb_version_micro +hb_version_int = 60000 + hb_version_major*100 + hb_version_minor*10 + hb_version_micro hb_libtool_version_info = '@0@:0:@0@'.format(hb_version_int) pkgmod = import('pkgconfig') @@ -27,17 +28,12 @@ if cpp.get_argument_syntax() == 'msvc' # If a warning is harmless but hard to fix, use '/woXXXX' so it's shown once # NOTE: Only add warnings here if you are sure they're spurious msvc_args = [ - '/wd4018', # implicit signed/unsigned conversion - '/wd4146', # unary minus on unsigned (beware INT_MIN) '/wd4244', # lossy type conversion (e.g. double -> int) - '/wd4305', # truncating type conversion (e.g. double -> float) cpp.get_supported_arguments(['/utf-8']), # set the input encoding to utf-8 ] add_project_arguments(msvc_args, language: ['c', 'cpp']) # Disable SAFESEH with MSVC for libs that use external deps that are built with MinGW # noseh_link_args = ['/SAFESEH:NO'] - # disable exception handling - add_project_arguments(['/EHs-', '/EHc-'], language: 'cpp') endif add_project_link_arguments(cpp.get_supported_link_arguments([ @@ -209,10 +205,19 @@ endif if cairo_dep.found() conf.set('HAVE_CAIRO', 1) + check_cairo_funcs = [ + ['cairo_user_font_face_set_render_color_glyph_func', {'deps': cairo_dep}], + ['cairo_font_options_get_custom_palette_color', {'deps': cairo_dep}], + ['cairo_user_scaled_font_get_foreground_source', {'deps': cairo_dep}], + ] + if cairo_dep.type_name() == 'internal' - conf.set('HAVE_CAIRO_USER_FONT_FACE_SET_RENDER_COLOR_GLYPH_FUNC', 1) + foreach func: check_cairo_funcs + name = func[0] + conf.set('HAVE_@0@'.format(name.to_upper()), 1) + endforeach else - check_funcs += [['cairo_user_font_face_set_render_color_glyph_func', {'deps': cairo_dep}]] + check_funcs += check_cairo_funcs endif endif @@ -384,6 +389,9 @@ endif configure_file(output: 'config.h', configuration: conf) +alias_target('lib', libharfbuzz) +alias_target('libs', libharfbuzz, libharfbuzz_subset) + build_summary = { 'Directories': {'prefix': get_option('prefix'), @@ -398,7 +406,8 @@ build_summary = { 'ICU': conf.get('HAVE_ICU', 0) == 1, }, 'Font callbacks (the more the merrier)': - {'FreeType': conf.get('HAVE_FREETYPE', 0) == 1, + {'Builtin' : true, + 'FreeType': conf.get('HAVE_FREETYPE', 0) == 1, }, 'Dependencies used for command-line utilities': {'Cairo': conf.get('HAVE_CAIRO', 0) == 1, @@ -415,6 +424,7 @@ build_summary = { 'Other features': {'Documentation': conf.get('HAVE_GTK_DOC', 0) == 1, 'GObject bindings': conf.get('HAVE_GOBJECT', 0) == 1, + 'Cairo integration': conf.get('HAVE_CAIRO', 0) == 1, 'Introspection': conf.get('HAVE_INTROSPECTION', 0) == 1, 'Experimental APIs': conf.get('HB_EXPERIMENTAL_API', 0) == 1, }, diff --git a/source/libs/harfbuzz/harfbuzz-src/src/Makefile.am b/source/libs/harfbuzz/harfbuzz-src/src/Makefile.am index 31399a6aa090dbe9dc35f88793f483272d25ed4a..52bd92b79b9aca06e7e68daeedf728ad8c02cc53 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/Makefile.am +++ b/source/libs/harfbuzz/harfbuzz-src/src/Makefile.am @@ -135,6 +135,8 @@ export_symbols = -export-symbols harfbuzz.def harfbuzz_def_dependency = harfbuzz.def export_symbols_subset = -export-symbols harfbuzz-subset.def harfbuzz_subset_def_dependency = harfbuzz-subset.def +export_symbols_cairo = -export-symbols harfbuzz-cairo.def +harfbuzz_cairo_def_dependency = harfbuzz-cairo.def export_symbols_icu = -export-symbols harfbuzz-icu.def harfbuzz_icu_def_dependency = harfbuzz-icu.def export_symbols_gobject = -export-symbols harfbuzz-gobject.def @@ -193,6 +195,17 @@ harfbuzz-subset.cc: Makefile.sources || ($(RM) $(srcdir)/harfbuzz-subset.cc; false) BUILT_SOURCES += harfbuzz-subset.cc +lib_LTLIBRARIES += libharfbuzz-cairo.la +libharfbuzz_cairo_la_LINK = $(chosen_linker) $(libharfbuzz_cairo_la_LDFLAGS) +libharfbuzz_cairo_la_SOURCES = $(HB_CAIRO_sources) +libharfbuzz_cairo_la_CPPFLAGS = $(HBCFLAGS) $(CAIRO_CFLAGS) $(CODE_COVERAGE_CFLAGS) +libharfbuzz_cairo_la_LDFLAGS = $(base_link_flags) $(export_symbols_cairo) $(CODE_COVERAGE_LDFLAGS) +libharfbuzz_cairo_la_LIBADD = $(CAIRO_LIBS) libharfbuzz.la +EXTRA_libharfbuzz_cairo_la_DEPENDENCIES = $(harfbuzz_cairo_def_dependency) +pkginclude_HEADERS += $(HB_CAIRO_headers) +pkgconfig_DATA += harfbuzz-cairo.pc +EXTRA_DIST += harfbuzz-cairo.pc.in + if HAVE_ICU if HAVE_ICU_BUILTIN HBCFLAGS += $(ICU_CFLAGS) @@ -241,6 +254,9 @@ hb-gobject-enums.%: hb-gobject-enums.%.tmpl $(HBHEADERS) --template $^ | \ sed 's/_t_get_type/_get_type/g; s/_T (/ (/g' > "$@" \ || ($(RM) "$@"; false) +HB_HAS_GOBJECT_DEF = define HB_HAS_GOBJECT 1 +else +HB_HAS_GOBJECT_DEF = undef HB_HAS_GOBJECT endif EXTRA_DIST += \ harfbuzz-gobject.pc.in \ @@ -256,11 +272,13 @@ DISTCLEANFILES += \ hb-features.h: hb-features.h.in $(top_builddir)/config.status $(AM_V_GEN) $(SED) \ + -e 's/mesondefine HB_HAS_CAIRO/$(HB_HAS_CAIRO_DEF)/' \ -e 's/mesondefine HB_HAS_FREETYPE/$(HB_HAS_FREETYPE_DEF)/' \ -e 's/mesondefine HB_HAS_GDI/$(HB_HAS_GDI_DEF)/' \ -e 's/mesondefine HB_HAS_GDI/$(HB_HAS_GDI_DEF)/' \ -e 's/mesondefine HB_HAS_GRAPHITE/$(HB_HAS_GRAPHITE_DEF)/' \ -e 's/mesondefine HB_HAS_GLIB/$(HB_HAS_GLIB_DEF)/' \ + -e 's/mesondefine HB_HAS_GOBJECT/$(HB_HAS_GOBJECT_DEF)/' \ -e 's/mesondefine HB_HAS_UNISCRIBE/$(HB_HAS_UNISCRIBE_DEF)/' \ -e 's/mesondefine HB_HAS_DIRECTWRITE/$(HB_HAS_DIRECTWRITE_DEF)/' \ -e 's/mesondefine HB_HAS_CORETEXT/$(HB_HAS_CORETEXT_DEF)/' \ @@ -294,6 +312,8 @@ harfbuzz.def: $(HBHEADERS) $(AM_V_GEN) $(srcdir)/gen-def.py "$@" $^ harfbuzz-subset.def: $(HB_SUBSET_headers) $(AM_V_GEN) $(srcdir)/gen-def.py "$@" $^ +harfbuzz-cairo.def: $(HB_CAIRO_headers) + $(AM_V_GEN) $(srcdir)/gen-def.py "$@" $^ harfbuzz-icu.def: $(HB_ICU_headers) $(AM_V_GEN) $(srcdir)/gen-def.py "$@" $^ harfbuzz-gobject.def: $(HB_GOBJECT_headers) diff --git a/source/libs/harfbuzz/harfbuzz-src/src/Makefile.sources b/source/libs/harfbuzz/harfbuzz-src/src/Makefile.sources index 6c4fc5de71160185a96f70f6969e80182472b41e..9a96ad69ffc926f1300898e2864e06ecb3a283a0 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/Makefile.sources +++ b/source/libs/harfbuzz/harfbuzz-src/src/Makefile.sources @@ -42,11 +42,13 @@ HB_BASE_sources = \ hb-draw.hh \ hb-face.cc \ hb-face.hh \ + hb-face-builder.cc \ hb-fallback-shape.cc \ hb-font.cc \ hb-font.hh \ hb-iter.hh \ hb-kern.hh \ + hb-limits.hh \ hb-machinery.hh \ hb-map.cc \ hb-map.hh \ @@ -67,11 +69,6 @@ HB_BASE_sources = \ hb-ot-cff2-table.cc \ hb-ot-cff2-table.hh \ hb-ot-cmap-table.hh \ - hb-ot-color-cbdt-table.hh \ - hb-ot-color-colr-table.hh \ - hb-ot-color-cpal-table.hh \ - hb-ot-color-sbix-table.hh \ - hb-ot-color-svg-table.hh \ hb-ot-color.cc \ hb-ot-face-table-list.hh \ hb-ot-face.cc \ @@ -88,7 +85,18 @@ HB_BASE_sources = \ hb-ot-layout-common.hh \ hb-ot-layout-gdef-table.hh \ hb-ot-layout-gpos-table.hh \ + hb-outline.hh \ + hb-outline.cc \ + hb-paint.cc \ + hb-paint.hh \ + hb-paint-extents.cc \ + hb-paint-extents.hh \ hb-ot-layout-gsub-table.hh \ + OT/Color/CBDT/CBDT.hh \ + OT/Color/COLR/COLR.hh \ + OT/Color/CPAL/CPAL.hh \ + OT/Color/sbix/sbix.hh \ + OT/Color/svg/svg.hh \ OT/glyf/glyf.hh \ OT/glyf/glyf-helpers.hh \ OT/glyf/loca.hh \ @@ -106,6 +114,7 @@ HB_BASE_sources = \ OT/Layout/Common/CoverageFormat1.hh \ OT/Layout/Common/CoverageFormat2.hh \ OT/Layout/Common/RangeRecord.hh \ + OT/Layout/GDEF/GDEF.hh \ OT/Layout/GPOS/AnchorFormat1.hh \ OT/Layout/GPOS/AnchorFormat2.hh \ OT/Layout/GPOS/AnchorFormat3.hh \ @@ -160,6 +169,7 @@ HB_BASE_sources = \ OT/Layout/GSUB/SingleSubst.hh \ OT/Layout/GSUB/SubstLookup.hh \ OT/Layout/GSUB/SubstLookupSubTable.hh \ + OT/name/name.hh \ hb-ot-layout-gsubgpos.hh \ hb-ot-layout-jstf-table.hh \ hb-ot-layout.cc \ @@ -250,7 +260,8 @@ HB_BASE_sources = \ HB_BASE_RAGEL_GENERATED_sources = \ hb-buffer-deserialize-json.hh \ - hb-buffer-deserialize-text.hh \ + hb-buffer-deserialize-text-glyphs.hh \ + hb-buffer-deserialize-text-unicode.hh \ hb-number-parser.hh \ hb-ot-shaper-indic-machine.hh \ hb-ot-shaper-khmer-machine.hh \ @@ -259,7 +270,8 @@ HB_BASE_RAGEL_GENERATED_sources = \ $(NULL) HB_BASE_RAGEL_sources = \ hb-buffer-deserialize-json.rl \ - hb-buffer-deserialize-text.rl \ + hb-buffer-deserialize-text-glyphs.rl \ + hb-buffer-deserialize-text-unicode.rl \ hb-number-parser.rl \ hb-ot-shaper-indic-machine.rl \ hb-ot-shaper-khmer-machine.rl \ @@ -290,6 +302,7 @@ HB_BASE_headers = \ hb-ot-shape.h \ hb-ot-var.h \ hb-ot.h \ + hb-paint.h \ hb-set.h \ hb-shape-plan.h \ hb-shape.h \ @@ -301,7 +314,7 @@ HB_BASE_headers = \ # Optional Sources and Headers with external deps -HB_FT_sources = hb-ft.cc +HB_FT_sources = hb-ft.cc hb-ft-colr.hh HB_FT_headers = hb-ft.h HB_GLIB_sources = hb-glib.cc @@ -334,7 +347,6 @@ HB_SUBSET_sources = \ hb-number.hh \ hb-ot-cff1-table.cc \ hb-ot-cff2-table.cc \ - hb-ot-color-colrv1-closure.hh \ hb-ot-post-table-v2subset.hh \ hb-static.cc \ hb-subset-cff-common.cc \ @@ -345,6 +357,7 @@ HB_SUBSET_sources = \ hb-subset-cff2.hh \ hb-subset-input.cc \ hb-subset-input.hh \ + hb-subset-instancer-solver.cc \ hb-subset-accelerator.hh \ hb-subset-plan.cc \ hb-subset-plan.hh \ @@ -362,6 +375,7 @@ HB_SUBSET_sources = \ graph/markbasepos-graph.hh \ graph/split-helpers.hh \ graph/serialize.hh \ + OT/Color/COLR/colrv1-closure.hh \ $(NULL) HB_SUBSET_headers = \ @@ -369,6 +383,16 @@ HB_SUBSET_headers = \ hb-subset-repacker.h \ $(NULL) +HB_CAIRO_sources = \ + hb-cairo.cc \ + hb-cairo-utils.cc \ + hb-cairo-utils.hh \ + hb-static.cc \ + $(NULL) +HB_CAIRO_headers = \ + hb-cairo.h \ + $(NULL) + HB_GOBJECT_DIST_sources = hb-gobject-structs.cc HB_GOBJECT_DIST_headers = hb-gobject.h hb-gobject-structs.h HB_GOBJECT_ENUM_sources = hb-gobject-enums.cc diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-cbdt-table.hh b/source/libs/harfbuzz/harfbuzz-src/src/OT/Color/CBDT/CBDT.hh similarity index 93% rename from source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-cbdt-table.hh rename to source/libs/harfbuzz/harfbuzz-src/src/OT/Color/CBDT/CBDT.hh index 3246894d3987a2ee4c230c68ef82d77c9916171e..b125052344f991930cc6fcf681dd48ad9f42efac 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-cbdt-table.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/OT/Color/CBDT/CBDT.hh @@ -24,10 +24,11 @@ * Google Author(s): Seigo Nonaka, Calder Kitagawa */ -#ifndef HB_OT_COLOR_CBDT_TABLE_HH -#define HB_OT_COLOR_CBDT_TABLE_HH +#ifndef OT_COLOR_CBDT_CBDT_HH +#define OT_COLOR_CBDT_CBDT_HH -#include "hb-open-type.hh" +#include "../../../hb-open-type.hh" +#include "../../../hb-paint.hh" /* * CBLC -- Color Bitmap Location @@ -80,12 +81,15 @@ struct SmallGlyphMetrics return_trace (c->check_struct (this)); } - void get_extents (hb_font_t *font, hb_glyph_extents_t *extents) const + void get_extents (hb_font_t *font, hb_glyph_extents_t *extents, bool scale) const { - extents->x_bearing = font->em_scale_x (bearingX); - extents->y_bearing = font->em_scale_y (bearingY); - extents->width = font->em_scale_x (width); - extents->height = font->em_scale_y (-static_cast<int>(height)); + extents->x_bearing = bearingX; + extents->y_bearing = bearingY; + extents->width = width; + extents->height = -static_cast<int> (height); + + if (scale) + font->scale_glyph_extents (extents); } HBUINT8 height; @@ -307,7 +311,7 @@ struct IndexSubtable } } - bool get_extents (hb_glyph_extents_t *extents HB_UNUSED) const + bool get_extents (hb_glyph_extents_t *extents HB_UNUSED, bool scale HB_UNUSED) const { switch (u.header.indexFormat) { @@ -504,8 +508,8 @@ struct IndexSubtableRecord return num_missing; } - bool get_extents (hb_glyph_extents_t *extents, const void *base) const - { return (base+offsetToSubtable).get_extents (extents); } + bool get_extents (hb_glyph_extents_t *extents, const void *base, bool scale) const + { return (base+offsetToSubtable).get_extents (extents, scale); } bool get_image_data (unsigned int gid, const void *base, @@ -833,7 +837,7 @@ struct CBDT } bool - get_extents (hb_font_t *font, hb_codepoint_t glyph, hb_glyph_extents_t *extents) const + get_extents (hb_font_t *font, hb_codepoint_t glyph, hb_glyph_extents_t *extents, bool scale = true) const { const void *base; const BitmapSizeTable &strike = this->cblc->choose_strike (font); @@ -841,7 +845,7 @@ struct CBDT if (!subtable_record || !strike.ppemX || !strike.ppemY) return false; - if (subtable_record->get_extents (extents, base)) + if (subtable_record->get_extents (extents, base, scale)) return true; unsigned int image_offset = 0, image_length = 0, image_format = 0; @@ -858,26 +862,29 @@ struct CBDT if (unlikely (image_length < GlyphBitmapDataFormat17::min_size)) return false; auto &glyphFormat17 = StructAtOffset<GlyphBitmapDataFormat17> (this->cbdt, image_offset); - glyphFormat17.glyphMetrics.get_extents (font, extents); + glyphFormat17.glyphMetrics.get_extents (font, extents, scale); break; } case 18: { if (unlikely (image_length < GlyphBitmapDataFormat18::min_size)) return false; auto &glyphFormat18 = StructAtOffset<GlyphBitmapDataFormat18> (this->cbdt, image_offset); - glyphFormat18.glyphMetrics.get_extents (font, extents); + glyphFormat18.glyphMetrics.get_extents (font, extents, scale); break; } default: return false; /* TODO: Support other image formats. */ } /* Convert to font units. */ - float x_scale = upem / (float) strike.ppemX; - float y_scale = upem / (float) strike.ppemY; - extents->x_bearing = roundf (extents->x_bearing * x_scale); - extents->y_bearing = roundf (extents->y_bearing * y_scale); - extents->width = roundf (extents->width * x_scale); - extents->height = roundf (extents->height * y_scale); + if (scale) + { + float x_scale = upem / (float) strike.ppemX; + float y_scale = upem / (float) strike.ppemY; + extents->x_bearing = roundf (extents->x_bearing * x_scale); + extents->y_bearing = roundf (extents->y_bearing * y_scale); + extents->width = roundf (extents->width * x_scale); + extents->height = roundf (extents->height * y_scale); + } return true; } @@ -934,6 +941,32 @@ struct CBDT bool has_data () const { return cbdt.get_length (); } + bool paint_glyph (hb_font_t *font, hb_codepoint_t glyph, hb_paint_funcs_t *funcs, void *data) const + { + hb_glyph_extents_t extents; + hb_glyph_extents_t pixel_extents; + hb_blob_t *blob = reference_png (font, glyph); + + if (unlikely (blob == hb_blob_get_empty ())) + return false; + + if (unlikely (!hb_font_get_glyph_extents (font, glyph, &extents))) + return false; + + if (unlikely (!get_extents (font, glyph, &pixel_extents, false))) + return false; + + bool ret = funcs->image (data, + blob, + pixel_extents.width, -pixel_extents.height, + HB_PAINT_IMAGE_FORMAT_PNG, + font->slant_xy, + &extents); + + hb_blob_destroy (blob); + return ret; + } + private: hb_blob_ptr_t<CBLC> cblc; hb_blob_ptr_t<CBDT> cbdt; @@ -994,4 +1027,4 @@ struct CBDT_accelerator_t : CBDT::accelerator_t { } /* namespace OT */ -#endif /* HB_OT_COLOR_CBDT_TABLE_HH */ +#endif /* OT_COLOR_CBDT_CBDT_HH */ diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-colr-table.hh b/source/libs/harfbuzz/harfbuzz-src/src/OT/Color/COLR/COLR.hh similarity index 72% rename from source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-colr-table.hh rename to source/libs/harfbuzz/harfbuzz-src/src/OT/Color/COLR/COLR.hh index 1af9d3093750a6e82402581f0b7c7ea634c370e9..31be6585dd4764cb66cb2fbe57cb7e2023faf53d 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-colr-table.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/OT/Color/COLR/COLR.hh @@ -25,12 +25,14 @@ * Google Author(s): Calder Kitagawa */ -#ifndef HB_OT_COLOR_COLR_TABLE_HH -#define HB_OT_COLOR_COLR_TABLE_HH +#ifndef OT_COLOR_COLR_COLR_HH +#define OT_COLOR_COLR_COLR_HH -#include "hb-open-type.hh" -#include "hb-ot-layout-common.hh" -#include "hb-ot-var-common.hh" +#include "../../../hb.hh" +#include "../../../hb-open-type.hh" +#include "../../../hb-ot-var-common.hh" +#include "../../../hb-paint.hh" +#include "../../../hb-paint-extents.hh" /* * COLR -- Color @@ -38,13 +40,82 @@ */ #define HB_OT_TAG_COLR HB_TAG('C','O','L','R') -#ifndef HB_COLRV1_MAX_NESTING_LEVEL -#define HB_COLRV1_MAX_NESTING_LEVEL 16 -#endif + +namespace OT { +struct hb_paint_context_t; +} namespace OT { struct COLR; + +struct Paint; + +struct hb_paint_context_t : + hb_dispatch_context_t<hb_paint_context_t> +{ + template <typename T> + return_t dispatch (const T &obj) { obj.paint_glyph (this); return hb_empty_t (); } + static return_t default_return_value () { return hb_empty_t (); } + + const COLR* get_colr_table () const + { return reinterpret_cast<const COLR *> (base); } + +public: + const void *base; + hb_paint_funcs_t *funcs; + void *data; + hb_font_t *font; + unsigned int palette_index; + hb_color_t foreground; + VarStoreInstancer &instancer; + int depth_left = HB_MAX_NESTING_LEVEL; + int edge_count = HB_COLRV1_MAX_EDGE_COUNT; + + hb_paint_context_t (const void *base_, + hb_paint_funcs_t *funcs_, + void *data_, + hb_font_t *font_, + unsigned int palette_, + hb_color_t foreground_, + VarStoreInstancer &instancer_) : + base (base_), + funcs (funcs_), + data (data_), + font (font_), + palette_index (palette_), + foreground (foreground_), + instancer (instancer_) + { } + + hb_color_t get_color (unsigned int color_index, float alpha, hb_bool_t *is_foreground) + { + hb_color_t color = foreground; + + *is_foreground = true; + + if (color_index != 0xffff) + { + if (!funcs->custom_palette_color (data, color_index, &color)) + { + unsigned int clen = 1; + hb_face_t *face = hb_font_get_face (font); + + hb_ot_color_palette_get_colors (face, palette_index, color_index, &clen, &color); + } + + *is_foreground = false; + } + + return HB_COLOR (hb_color_get_blue (color), + hb_color_get_green (color), + hb_color_get_red (color), + hb_color_get_alpha (color) * alpha); + } + + inline void recurse (const Paint &paint); +}; + struct hb_colrv1_closure_context_t : hb_dispatch_context_t<hb_colrv1_closure_context_t> { @@ -98,7 +169,7 @@ struct hb_colrv1_closure_context_t : hb_set_t *glyphs_, hb_set_t *layer_indices_, hb_set_t *palette_indices_, - unsigned nesting_level_left_ = HB_COLRV1_MAX_NESTING_LEVEL) : + unsigned nesting_level_left_ = HB_MAX_NESTING_LEVEL) : base (base_), glyphs (glyphs_), layer_indices (layer_indices_), @@ -160,6 +231,8 @@ struct BaseGlyphRecord template <typename T> struct Variable { + static constexpr bool is_variable = true; + Variable<T>* copy (hb_serialize_context_t *c) const { TRACE_SERIALIZE (this); @@ -182,6 +255,23 @@ struct Variable return_trace (c->check_struct (this) && value.sanitize (c)); } + void paint_glyph (hb_paint_context_t *c) const + { + value.paint_glyph (c, varIdxBase); + } + + void get_color_stop (hb_paint_context_t *c, + hb_color_stop_t *stop, + const VarStoreInstancer &instancer) const + { + value.get_color_stop (c, stop, varIdxBase, instancer); + } + + hb_paint_extend_t get_extend () const + { + return value.get_extend (); + } + protected: T value; public: @@ -193,6 +283,8 @@ struct Variable template <typename T> struct NoVariable { + static constexpr bool is_variable = false; + static constexpr uint32_t varIdxBase = VarIdx::NO_VARIATION; NoVariable<T>* copy (hb_serialize_context_t *c) const @@ -216,6 +308,23 @@ struct NoVariable return_trace (c->check_struct (this) && value.sanitize (c)); } + void paint_glyph (hb_paint_context_t *c) const + { + value.paint_glyph (c, varIdxBase); + } + + void get_color_stop (hb_paint_context_t *c, + hb_color_stop_t *stop, + const VarStoreInstancer &instancer) const + { + value.get_color_stop (c, stop, VarIdx::NO_VARIATION, instancer); + } + + hb_paint_extend_t get_extend () const + { + return value.get_extend (); + } + T value; public: DEFINE_SIZE_STATIC (T::static_size); @@ -233,7 +342,7 @@ struct ColorStop TRACE_SUBSET (this); auto *out = c->serializer->embed (*this); if (unlikely (!out)) return_trace (false); - return_trace (c->serializer->check_assign (out->paletteIndex, c->plan->colr_palettes->get (paletteIndex), + return_trace (c->serializer->check_assign (out->paletteIndex, c->plan->colr_palettes.get (paletteIndex), HB_SERIALIZE_ERROR_INT_OVERFLOW)); } @@ -243,6 +352,17 @@ struct ColorStop return_trace (c->check_struct (this)); } + void get_color_stop (hb_paint_context_t *c, + hb_color_stop_t *out, + uint32_t varIdx, + const VarStoreInstancer &instancer) const + { + out->offset = stopOffset.to_float(instancer (varIdx, 0)); + out->color = c->get_color (paletteIndex, + alpha.to_float (instancer (varIdx, 1)), + &out->is_foreground); + } + F2DOT14 stopOffset; HBUINT16 paletteIndex; F2DOT14 alpha; @@ -294,6 +414,52 @@ struct ColorLine stops.sanitize (c)); } + /* get up to count stops from start */ + unsigned int + get_color_stops (hb_paint_context_t *c, + unsigned int start, + unsigned int *count, + hb_color_stop_t *color_stops, + const VarStoreInstancer &instancer) const + { + unsigned int len = stops.len; + + if (count && color_stops) + { + unsigned int i; + for (i = 0; i < *count && start + i < len; i++) + stops[start + i].get_color_stop (c, &color_stops[i], instancer); + *count = i; + } + + return len; + } + + HB_INTERNAL static unsigned int static_get_color_stops (hb_color_line_t *color_line, + void *color_line_data, + unsigned int start, + unsigned int *count, + hb_color_stop_t *color_stops, + void *user_data) + { + const ColorLine *thiz = (const ColorLine *) color_line_data; + hb_paint_context_t *c = (hb_paint_context_t *) user_data; + return thiz->get_color_stops (c, start, count, color_stops, c->instancer); + } + + hb_paint_extend_t get_extend () const + { + return (hb_paint_extend_t) (unsigned int) extend; + } + + HB_INTERNAL static hb_paint_extend_t static_get_extend (hb_color_line_t *color_line, + void *color_line_data, + void *user_data) + { + const ColorLine *thiz = (const ColorLine *) color_line_data; + return thiz->get_extend (); + } + Extend extend; Array16Of<Var<ColorStop>> stops; public: @@ -357,6 +523,17 @@ struct Affine2x3 return_trace (c->check_struct (this)); } + void paint_glyph (hb_paint_context_t *c, uint32_t varIdxBase) const + { + c->funcs->push_transform (c->data, + xx.to_float (c->instancer (varIdxBase, 0)), + yx.to_float (c->instancer (varIdxBase, 1)), + xy.to_float (c->instancer (varIdxBase, 2)), + yy.to_float (c->instancer (varIdxBase, 3)), + dx.to_float (c->instancer (varIdxBase, 4)), + dy.to_float (c->instancer (varIdxBase, 5))); + } + F16DOT16 xx; F16DOT16 yx; F16DOT16 xy; @@ -376,7 +553,7 @@ struct PaintColrLayers TRACE_SUBSET (this); auto *out = c->serializer->embed (this); if (unlikely (!out)) return_trace (false); - return_trace (c->serializer->check_assign (out->firstLayerIndex, c->plan->colrv1_layers->get (firstLayerIndex), + return_trace (c->serializer->check_assign (out->firstLayerIndex, c->plan->colrv1_layers.get (firstLayerIndex), HB_SERIALIZE_ERROR_INT_OVERFLOW)); return_trace (true); @@ -388,6 +565,8 @@ struct PaintColrLayers return_trace (c->check_struct (this)); } + inline void paint_glyph (hb_paint_context_t *c) const; + HBUINT8 format; /* format = 1 */ HBUINT8 numLayers; HBUINT32 firstLayerIndex; /* index into COLRv1::layerList */ @@ -405,7 +584,7 @@ struct PaintSolid TRACE_SUBSET (this); auto *out = c->serializer->embed (*this); if (unlikely (!out)) return_trace (false); - return_trace (c->serializer->check_assign (out->paletteIndex, c->plan->colr_palettes->get (paletteIndex), + return_trace (c->serializer->check_assign (out->paletteIndex, c->plan->colr_palettes.get (paletteIndex), HB_SERIALIZE_ERROR_INT_OVERFLOW)); } @@ -415,6 +594,17 @@ struct PaintSolid return_trace (c->check_struct (this)); } + void paint_glyph (hb_paint_context_t *c, uint32_t varIdxBase) const + { + hb_bool_t is_foreground; + hb_color_t color; + + color = c->get_color (paletteIndex, + alpha.to_float (c->instancer (varIdxBase, 0)), + &is_foreground); + c->funcs->color (c->data, is_foreground, color); + } + HBUINT8 format; /* format = 2(noVar) or 3(Var)*/ HBUINT16 paletteIndex; F2DOT14 alpha; @@ -443,6 +633,23 @@ struct PaintLinearGradient return_trace (c->check_struct (this) && colorLine.sanitize (c, this)); } + void paint_glyph (hb_paint_context_t *c, uint32_t varIdxBase) const + { + hb_color_line_t cl = { + (void *) &(this+colorLine), + (this+colorLine).static_get_color_stops, c, + (this+colorLine).static_get_extend, nullptr + }; + + c->funcs->linear_gradient (c->data, &cl, + x0 + c->instancer (varIdxBase, 0), + y0 + c->instancer (varIdxBase, 1), + x1 + c->instancer (varIdxBase, 2), + y1 + c->instancer (varIdxBase, 3), + x2 + c->instancer (varIdxBase, 4), + y2 + c->instancer (varIdxBase, 5)); + } + HBUINT8 format; /* format = 4(noVar) or 5 (Var) */ Offset24To<ColorLine<Var>> colorLine; /* Offset (from beginning of PaintLinearGradient * table) to ColorLine subtable. */ @@ -477,6 +684,23 @@ struct PaintRadialGradient return_trace (c->check_struct (this) && colorLine.sanitize (c, this)); } + void paint_glyph (hb_paint_context_t *c, uint32_t varIdxBase) const + { + hb_color_line_t cl = { + (void *) &(this+colorLine), + (this+colorLine).static_get_color_stops, c, + (this+colorLine).static_get_extend, nullptr + }; + + c->funcs->radial_gradient (c->data, &cl, + x0 + c->instancer (varIdxBase, 0), + y0 + c->instancer (varIdxBase, 1), + radius0 + c->instancer (varIdxBase, 2), + x1 + c->instancer (varIdxBase, 3), + y1 + c->instancer (varIdxBase, 4), + radius1 + c->instancer (varIdxBase, 5)); + } + HBUINT8 format; /* format = 6(noVar) or 7 (Var) */ Offset24To<ColorLine<Var>> colorLine; /* Offset (from beginning of PaintRadialGradient * table) to ColorLine subtable. */ @@ -511,6 +735,21 @@ struct PaintSweepGradient return_trace (c->check_struct (this) && colorLine.sanitize (c, this)); } + void paint_glyph (hb_paint_context_t *c, uint32_t varIdxBase) const + { + hb_color_line_t cl = { + (void *) &(this+colorLine), + (this+colorLine).static_get_color_stops, c, + (this+colorLine).static_get_extend, nullptr + }; + + c->funcs->sweep_gradient (c->data, &cl, + centerX + c->instancer (varIdxBase, 0), + centerY + c->instancer (varIdxBase, 1), + (startAngle.to_float (c->instancer (varIdxBase, 2)) + 1) * (float) M_PI, + (endAngle.to_float (c->instancer (varIdxBase, 3)) + 1) * (float) M_PI); + } + HBUINT8 format; /* format = 8(noVar) or 9 (Var) */ Offset24To<ColorLine<Var>> colorLine; /* Offset (from beginning of PaintSweepGradient * table) to ColorLine subtable. */ @@ -522,8 +761,6 @@ struct PaintSweepGradient DEFINE_SIZE_STATIC (4 + 2 * FWORD::static_size + 2 * F2DOT14::static_size); }; -struct Paint; - // Paint a non-COLR glyph, filled as indicated by paint. struct PaintGlyph { @@ -548,6 +785,17 @@ struct PaintGlyph return_trace (c->check_struct (this) && paint.sanitize (c, this)); } + void paint_glyph (hb_paint_context_t *c) const + { + c->funcs->push_inverse_root_transform (c->data, c->font); + c->funcs->push_clip_glyph (c->data, gid, c->font); + c->funcs->push_root_transform (c->data, c->font); + c->recurse (this+paint); + c->funcs->pop_transform (c->data); + c->funcs->pop_clip (c->data); + c->funcs->pop_transform (c->data); + } + HBUINT8 format; /* format = 10 */ Offset24To<Paint> paint; /* Offset (from beginning of PaintGlyph table) to Paint subtable. */ HBUINT16 gid; @@ -575,6 +823,8 @@ struct PaintColrGlyph return_trace (c->check_struct (this)); } + inline void paint_glyph (hb_paint_context_t *c) const; + HBUINT8 format; /* format = 11 */ HBUINT16 gid; public: @@ -603,6 +853,13 @@ struct PaintTransform transform.sanitize (c, this)); } + void paint_glyph (hb_paint_context_t *c) const + { + (this+transform).paint_glyph (c); + c->recurse (this+src); + c->funcs->pop_transform (c->data); + } + HBUINT8 format; /* format = 12(noVar) or 13 (Var) */ Offset24To<Paint> src; /* Offset (from beginning of PaintTransform table) to Paint subtable. */ Offset24To<Var<Affine2x3>> transform; @@ -629,6 +886,16 @@ struct PaintTranslate return_trace (c->check_struct (this) && src.sanitize (c, this)); } + void paint_glyph (hb_paint_context_t *c, uint32_t varIdxBase) const + { + float ddx = dx + c->instancer (varIdxBase, 0); + float ddy = dy + c->instancer (varIdxBase, 1); + + bool p1 = c->funcs->push_translate (c->data, ddx, ddy); + c->recurse (this+src); + if (p1) c->funcs->pop_transform (c->data); + } + HBUINT8 format; /* format = 14(noVar) or 15 (Var) */ Offset24To<Paint> src; /* Offset (from beginning of PaintTranslate table) to Paint subtable. */ FWORD dx; @@ -656,6 +923,16 @@ struct PaintScale return_trace (c->check_struct (this) && src.sanitize (c, this)); } + void paint_glyph (hb_paint_context_t *c, uint32_t varIdxBase) const + { + float sx = scaleX.to_float (c->instancer (varIdxBase, 0)); + float sy = scaleY.to_float (c->instancer (varIdxBase, 1)); + + bool p1 = c->funcs->push_scale (c->data, sx, sy); + c->recurse (this+src); + if (p1) c->funcs->pop_transform (c->data); + } + HBUINT8 format; /* format = 16 (noVar) or 17(Var) */ Offset24To<Paint> src; /* Offset (from beginning of PaintScale table) to Paint subtable. */ F2DOT14 scaleX; @@ -683,6 +960,22 @@ struct PaintScaleAroundCenter return_trace (c->check_struct (this) && src.sanitize (c, this)); } + void paint_glyph (hb_paint_context_t *c, uint32_t varIdxBase) const + { + float sx = scaleX.to_float (c->instancer (varIdxBase, 0)); + float sy = scaleY.to_float (c->instancer (varIdxBase, 1)); + float tCenterX = centerX + c->instancer (varIdxBase, 2); + float tCenterY = centerY + c->instancer (varIdxBase, 3); + + bool p1 = c->funcs->push_translate (c->data, +tCenterX, +tCenterY); + bool p2 = c->funcs->push_scale (c->data, sx, sy); + bool p3 = c->funcs->push_translate (c->data, -tCenterX, -tCenterY); + c->recurse (this+src); + if (p3) c->funcs->pop_transform (c->data); + if (p2) c->funcs->pop_transform (c->data); + if (p1) c->funcs->pop_transform (c->data); + } + HBUINT8 format; /* format = 18 (noVar) or 19(Var) */ Offset24To<Paint> src; /* Offset (from beginning of PaintScaleAroundCenter table) to Paint subtable. */ F2DOT14 scaleX; @@ -712,6 +1005,15 @@ struct PaintScaleUniform return_trace (c->check_struct (this) && src.sanitize (c, this)); } + void paint_glyph (hb_paint_context_t *c, uint32_t varIdxBase) const + { + float s = scale.to_float (c->instancer (varIdxBase, 0)); + + bool p1 = c->funcs->push_scale (c->data, s, s); + c->recurse (this+src); + if (p1) c->funcs->pop_transform (c->data); + } + HBUINT8 format; /* format = 20 (noVar) or 21(Var) */ Offset24To<Paint> src; /* Offset (from beginning of PaintScaleUniform table) to Paint subtable. */ F2DOT14 scale; @@ -738,6 +1040,21 @@ struct PaintScaleUniformAroundCenter return_trace (c->check_struct (this) && src.sanitize (c, this)); } + void paint_glyph (hb_paint_context_t *c, uint32_t varIdxBase) const + { + float s = scale.to_float (c->instancer (varIdxBase, 0)); + float tCenterX = centerX + c->instancer (varIdxBase, 1); + float tCenterY = centerY + c->instancer (varIdxBase, 2); + + bool p1 = c->funcs->push_translate (c->data, +tCenterX, +tCenterY); + bool p2 = c->funcs->push_scale (c->data, s, s); + bool p3 = c->funcs->push_translate (c->data, -tCenterX, -tCenterY); + c->recurse (this+src); + if (p3) c->funcs->pop_transform (c->data); + if (p2) c->funcs->pop_transform (c->data); + if (p1) c->funcs->pop_transform (c->data); + } + HBUINT8 format; /* format = 22 (noVar) or 23(Var) */ Offset24To<Paint> src; /* Offset (from beginning of PaintScaleUniformAroundCenter table) to Paint subtable. */ F2DOT14 scale; @@ -766,6 +1083,15 @@ struct PaintRotate return_trace (c->check_struct (this) && src.sanitize (c, this)); } + void paint_glyph (hb_paint_context_t *c, uint32_t varIdxBase) const + { + float a = angle.to_float (c->instancer (varIdxBase, 0)); + + bool p1 = c->funcs->push_rotate (c->data, a); + c->recurse (this+src); + if (p1) c->funcs->pop_transform (c->data); + } + HBUINT8 format; /* format = 24 (noVar) or 25(Var) */ Offset24To<Paint> src; /* Offset (from beginning of PaintRotate table) to Paint subtable. */ F2DOT14 angle; @@ -792,6 +1118,21 @@ struct PaintRotateAroundCenter return_trace (c->check_struct (this) && src.sanitize (c, this)); } + void paint_glyph (hb_paint_context_t *c, uint32_t varIdxBase) const + { + float a = angle.to_float (c->instancer (varIdxBase, 0)); + float tCenterX = centerX + c->instancer (varIdxBase, 1); + float tCenterY = centerY + c->instancer (varIdxBase, 2); + + bool p1 = c->funcs->push_translate (c->data, +tCenterX, +tCenterY); + bool p2 = c->funcs->push_rotate (c->data, a); + bool p3 = c->funcs->push_translate (c->data, -tCenterX, -tCenterY); + c->recurse (this+src); + if (p3) c->funcs->pop_transform (c->data); + if (p2) c->funcs->pop_transform (c->data); + if (p1) c->funcs->pop_transform (c->data); + } + HBUINT8 format; /* format = 26 (noVar) or 27(Var) */ Offset24To<Paint> src; /* Offset (from beginning of PaintRotateAroundCenter table) to Paint subtable. */ F2DOT14 angle; @@ -820,6 +1161,16 @@ struct PaintSkew return_trace (c->check_struct (this) && src.sanitize (c, this)); } + void paint_glyph (hb_paint_context_t *c, uint32_t varIdxBase) const + { + float sx = xSkewAngle.to_float(c->instancer (varIdxBase, 0)); + float sy = ySkewAngle.to_float(c->instancer (varIdxBase, 1)); + + bool p1 = c->funcs->push_skew (c->data, sx, sy); + c->recurse (this+src); + if (p1) c->funcs->pop_transform (c->data); + } + HBUINT8 format; /* format = 28(noVar) or 29 (Var) */ Offset24To<Paint> src; /* Offset (from beginning of PaintSkew table) to Paint subtable. */ F2DOT14 xSkewAngle; @@ -847,6 +1198,22 @@ struct PaintSkewAroundCenter return_trace (c->check_struct (this) && src.sanitize (c, this)); } + void paint_glyph (hb_paint_context_t *c, uint32_t varIdxBase) const + { + float sx = xSkewAngle.to_float(c->instancer (varIdxBase, 0)); + float sy = ySkewAngle.to_float(c->instancer (varIdxBase, 1)); + float tCenterX = centerX + c->instancer (varIdxBase, 2); + float tCenterY = centerY + c->instancer (varIdxBase, 3); + + bool p1 = c->funcs->push_translate (c->data, +tCenterX, +tCenterY); + bool p2 = c->funcs->push_skew (c->data, sx, sy); + bool p3 = c->funcs->push_translate (c->data, -tCenterX, -tCenterY); + c->recurse (this+src); + if (p3) c->funcs->pop_transform (c->data); + if (p2) c->funcs->pop_transform (c->data); + if (p1) c->funcs->pop_transform (c->data); + } + HBUINT8 format; /* format = 30(noVar) or 31 (Var) */ Offset24To<Paint> src; /* Offset (from beginning of PaintSkewAroundCenter table) to Paint subtable. */ F2DOT14 xSkewAngle; @@ -879,6 +1246,14 @@ struct PaintComposite backdrop.sanitize (c, this)); } + void paint_glyph (hb_paint_context_t *c) const + { + c->recurse (this+backdrop); + c->funcs->push_group (c->data); + c->recurse (this+src); + c->funcs->pop_group (c->data, (hb_paint_composite_mode_t) (int) mode); + } + HBUINT8 format; /* format = 32 */ Offset24To<Paint> src; /* Offset (from beginning of PaintComposite table) to source Paint subtable. */ CompositeMode mode; /* If mode is unrecognized use COMPOSITE_CLEAR */ @@ -948,8 +1323,8 @@ struct ClipBox template <typename context_t, typename ...Ts> typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const { + if (unlikely (!c->may_dispatch (this, &u.format))) return c->no_dispatch_return_value (); TRACE_DISPATCH (this, u.format); - if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ()); switch (u.format) { case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...)); case 2: return_trace (c->dispatch (u.format2, std::forward<Ts> (ds)...)); @@ -1084,7 +1459,7 @@ struct ClipList if (unlikely (!c->serializer->extend_min (out))) return_trace (false); if (!c->serializer->check_assign (out->format, format, HB_SERIALIZE_ERROR_INT_OVERFLOW)) return_trace (false); - const hb_set_t& glyphset = *c->plan->_glyphset_colred; + const hb_set_t& glyphset = c->plan->_glyphset_colred; const hb_map_t &glyph_map = *c->plan->glyph_map; hb_map_t new_gid_offset_map; @@ -1142,7 +1517,7 @@ struct Paint { TRACE_SANITIZE (this); - if (unlikely (!c->check_start_recursion (HB_COLRV1_MAX_NESTING_LEVEL))) + if (unlikely (!c->check_start_recursion (HB_MAX_NESTING_LEVEL))) return_trace (c->no_dispatch_return_value ()); return_trace (c->end_recursion (this->dispatch (c, std::forward<Ts> (ds)...))); @@ -1151,8 +1526,8 @@ struct Paint template <typename context_t, typename ...Ts> typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const { + if (unlikely (!c->may_dispatch (this, &u.format))) return c->no_dispatch_return_value (); TRACE_DISPATCH (this, u.format); - if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ()); switch (u.format) { case 1: return_trace (c->dispatch (u.paintformat1, std::forward<Ts> (ds)...)); case 2: return_trace (c->dispatch (u.paintformat2, std::forward<Ts> (ds)...)); @@ -1194,35 +1569,35 @@ struct Paint union { HBUINT8 format; PaintColrLayers paintformat1; - PaintSolid paintformat2; + NoVariable<PaintSolid> paintformat2; Variable<PaintSolid> paintformat3; - PaintLinearGradient<NoVariable> paintformat4; + NoVariable<PaintLinearGradient<NoVariable>> paintformat4; Variable<PaintLinearGradient<Variable>> paintformat5; - PaintRadialGradient<NoVariable> paintformat6; + NoVariable<PaintRadialGradient<NoVariable>> paintformat6; Variable<PaintRadialGradient<Variable>> paintformat7; - PaintSweepGradient<NoVariable> paintformat8; + NoVariable<PaintSweepGradient<NoVariable>> paintformat8; Variable<PaintSweepGradient<Variable>> paintformat9; PaintGlyph paintformat10; PaintColrGlyph paintformat11; PaintTransform<NoVariable> paintformat12; PaintTransform<Variable> paintformat13; - PaintTranslate paintformat14; + NoVariable<PaintTranslate> paintformat14; Variable<PaintTranslate> paintformat15; - PaintScale paintformat16; + NoVariable<PaintScale> paintformat16; Variable<PaintScale> paintformat17; - PaintScaleAroundCenter paintformat18; + NoVariable<PaintScaleAroundCenter> paintformat18; Variable<PaintScaleAroundCenter> paintformat19; - PaintScaleUniform paintformat20; + NoVariable<PaintScaleUniform> paintformat20; Variable<PaintScaleUniform> paintformat21; - PaintScaleUniformAroundCenter paintformat22; + NoVariable<PaintScaleUniformAroundCenter> paintformat22; Variable<PaintScaleUniformAroundCenter> paintformat23; - PaintRotate paintformat24; + NoVariable<PaintRotate> paintformat24; Variable<PaintRotate> paintformat25; - PaintRotateAroundCenter paintformat26; + NoVariable<PaintRotateAroundCenter> paintformat26; Variable<PaintRotateAroundCenter> paintformat27; - PaintSkew paintformat28; + NoVariable<PaintSkew> paintformat28; Variable<PaintSkew> paintformat29; - PaintSkewAroundCenter paintformat30; + NoVariable<PaintSkewAroundCenter> paintformat30; Variable<PaintSkewAroundCenter> paintformat31; PaintComposite paintformat32; } u; @@ -1269,7 +1644,7 @@ struct BaseGlyphList : SortedArray32Of<BaseGlyphPaintRecord> TRACE_SUBSET (this); auto *out = c->serializer->start_embed (this); if (unlikely (!c->serializer->extend_min (out))) return_trace (false); - const hb_set_t* glyphset = c->plan->_glyphset_colred; + const hb_set_t* glyphset = &c->plan->_glyphset_colred; for (const auto& _ : as_array ()) { @@ -1323,7 +1698,14 @@ struct COLR { static constexpr hb_tag_t tableTag = HB_OT_TAG_COLR; - bool has_data () const { return numBaseGlyphs; } + bool has_v0_data () const { return numBaseGlyphs; } + bool has_v1_data () const + { + if (version == 1) + return (this+baseGlyphList).len > 0; + + return false; + } unsigned int get_glyph_layers (hb_codepoint_t glyph, unsigned int start_offset, @@ -1503,7 +1885,7 @@ struct COLR TRACE_SUBSET (this); const hb_map_t &reverse_glyph_map = *c->plan->reverse_glyph_map; - const hb_set_t& glyphset = *c->plan->_glyphset_colred; + const hb_set_t& glyphset = c->plan->_glyphset_colred; auto base_it = + hb_range (c->plan->num_output_glyphs ()) @@ -1552,7 +1934,7 @@ struct COLR if (unlikely (!c->plan->new_gid_for_old_gid (out_layers[i].glyphId, &new_gid))) return hb_pair_t<bool, hb_vector_t<LayerRecord>> (false, out_layers); out_layers[i].glyphId = new_gid; - out_layers[i].colorIdx = c->plan->colr_palettes->get (layers[i].colorIdx); + out_layers[i].colorIdx = c->plan->colr_palettes.get (layers[i].colorIdx); } return hb_pair_t<bool, hb_vector_t<LayerRecord>> (true, out_layers); @@ -1585,10 +1967,23 @@ struct COLR colr_prime->layerList.serialize_subset (c, layerList, this); colr_prime->clipList.serialize_subset (c, clipList, this); colr_prime->varIdxMap.serialize_copy (c->serializer, varIdxMap, this); - //TODO: subset varStore once it's implemented in fonttools + colr_prime->varStore.serialize_copy (c->serializer, varStore, this); return_trace (true); } + const Paint *get_base_glyph_paint (hb_codepoint_t glyph) const + { + const BaseGlyphList &baseglyph_paintrecords = this+baseGlyphList; + const BaseGlyphPaintRecord* record = get_base_glyph_paintrecord (glyph); + if (record) + { + const Paint &paint = &baseglyph_paintrecords+record->paint; + return &paint; + } + else + return nullptr; + } + bool get_extents (hb_font_t *font, hb_codepoint_t glyph, hb_glyph_extents_t *extents) const { @@ -1599,14 +1994,138 @@ struct COLR this+varIdxMap, hb_array (font->coords, font->num_coords)); - if ((this+clipList).get_extents (glyph, - extents, - instancer)) + if (get_clip (glyph, extents, instancer)) { - extents->x_bearing = font->em_scale_x (extents->x_bearing); - extents->y_bearing = font->em_scale_x (extents->y_bearing); - extents->width = font->em_scale_x (extents->width); - extents->height = font->em_scale_x (extents->height); + font->scale_glyph_extents (extents); + return true; + } + + auto *extents_funcs = hb_paint_extents_get_funcs (); + hb_paint_extents_context_t extents_data; + bool ret = paint_glyph (font, glyph, extents_funcs, &extents_data, 0, HB_COLOR(0,0,0,0)); + + hb_extents_t e = extents_data.get_extents (); + if (e.is_void ()) + { + extents->x_bearing = 0; + extents->y_bearing = 0; + extents->width = 0; + extents->height = 0; + } + else + { + extents->x_bearing = e.xmin; + extents->y_bearing = e.ymax; + extents->width = e.xmax - e.xmin; + extents->height = e.ymin - e.ymax; + } + + return ret; + } + + bool + has_paint_for_glyph (hb_codepoint_t glyph) const + { + if (version == 1) + { + const Paint *paint = get_base_glyph_paint (glyph); + + return paint != nullptr; + } + + return false; + } + + bool get_clip (hb_codepoint_t glyph, + hb_glyph_extents_t *extents, + const VarStoreInstancer instancer) const + { + return (this+clipList).get_extents (glyph, + extents, + instancer); + } + + bool + paint_glyph (hb_font_t *font, hb_codepoint_t glyph, hb_paint_funcs_t *funcs, void *data, unsigned int palette_index, hb_color_t foreground, bool clip = true) const + { + VarStoreInstancer instancer (this+varStore, + this+varIdxMap, + hb_array (font->coords, font->num_coords)); + hb_paint_context_t c (this, funcs, data, font, palette_index, foreground, instancer); + + if (version == 1) + { + const Paint *paint = get_base_glyph_paint (glyph); + if (paint) + { + // COLRv1 glyph + + VarStoreInstancer instancer (this+varStore, + this+varIdxMap, + hb_array (font->coords, font->num_coords)); + + bool is_bounded = true; + if (clip) + { + hb_glyph_extents_t extents; + if (get_clip (glyph, &extents, instancer)) + { + font->scale_glyph_extents (&extents); + c.funcs->push_clip_rectangle (c.data, + extents.x_bearing, + extents.y_bearing + extents.height, + extents.x_bearing + extents.width, + extents.y_bearing); + } + else + { + auto *extents_funcs = hb_paint_extents_get_funcs (); + hb_paint_extents_context_t extents_data; + + paint_glyph (font, glyph, + extents_funcs, &extents_data, + palette_index, foreground, + false); + + hb_extents_t extents = extents_data.get_extents (); + is_bounded = extents_data.is_bounded (); + + c.funcs->push_clip_rectangle (c.data, + extents.xmin, + extents.ymin, + extents.xmax, + extents.ymax); + } + } + + c.funcs->push_root_transform (c.data, font); + + if (is_bounded) + c.recurse (*paint); + + c.funcs->pop_transform (c.data); + + if (clip) + c.funcs->pop_clip (c.data); + + return true; + } + } + + const BaseGlyphRecord *record = get_base_glyph_record (glyph); + if (record && ((hb_codepoint_t) record->glyphId == glyph)) + { + // COLRv0 glyph + for (const auto &r : (this+layersZ).as_array (numLayers) + .sub_array (record->firstLayerIdx, record->numLayers)) + { + hb_bool_t is_foreground; + hb_color_t color = c.get_color (r.colorIdx, 1., &is_foreground); + c.funcs->push_clip_glyph (c.data, r.glyphId, c.font); + c.funcs->color (c.data, is_foreground, color); + c.funcs->pop_clip (c.data); + } + return true; } @@ -1635,7 +2154,50 @@ struct COLR_accelerator_t : COLR::accelerator_t { COLR_accelerator_t (hb_face_t *face) : COLR::accelerator_t (face) {} }; -} /* namespace OT */ +void +hb_paint_context_t::recurse (const Paint &paint) +{ + if (unlikely (depth_left <= 0 || edge_count <= 0)) return; + depth_left--; + edge_count--; + paint.dispatch (this); + depth_left++; +} + +void PaintColrLayers::paint_glyph (hb_paint_context_t *c) const +{ + const LayerList &paint_offset_lists = c->get_colr_table ()->get_layerList (); + for (unsigned i = firstLayerIndex; i < firstLayerIndex + numLayers; i++) + { + const Paint &paint = paint_offset_lists.get_paint (i); + c->funcs->push_group (c->data); + c->recurse (paint); + c->funcs->pop_group (c->data, HB_PAINT_COMPOSITE_MODE_SRC_OVER); + } +} + +void PaintColrGlyph::paint_glyph (hb_paint_context_t *c) const +{ + const COLR *colr_table = c->get_colr_table (); + const Paint *paint = colr_table->get_base_glyph_paint (gid); + hb_glyph_extents_t extents = {0}; + bool has_clip_box = colr_table->get_clip (gid, &extents, c->instancer); + + if (has_clip_box) + c->funcs->push_clip_rectangle (c->data, + extents.x_bearing, + extents.y_bearing + extents.height, + extents.x_bearing + extents.width, + extents.y_bearing); + + if (paint) + c->recurse (*paint); + + if (has_clip_box) + c->funcs->pop_clip (c->data); +} + +} /* namespace OT */ -#endif /* HB_OT_COLOR_COLR_TABLE_HH */ +#endif /* OT_COLOR_COLR_COLR_HH */ diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-colrv1-closure.hh b/source/libs/harfbuzz/harfbuzz-src/src/OT/Color/COLR/colrv1-closure.hh similarity index 94% rename from source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-colrv1-closure.hh rename to source/libs/harfbuzz/harfbuzz-src/src/OT/Color/COLR/colrv1-closure.hh index fbaf2ec26b6b4696190eb75ec1798cfcad21b290..705863d4ade5cfc5ff5bcb78f08a51084723096f 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-colrv1-closure.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/OT/Color/COLR/colrv1-closure.hh @@ -24,12 +24,11 @@ * */ -#ifndef HB_OT_COLR_COLRV1_CLOSURE_HH -#define HB_OT_COLR_COLRV1_CLOSURE_HH +#ifndef OT_COLOR_COLR_COLRV1_CLOSURE_HH +#define OT_COLOR_COLR_COLRV1_CLOSURE_HH -#include "hb-open-type.hh" -#include "hb-ot-layout-common.hh" -#include "hb-ot-color-colr-table.hh" +#include "../../../hb-open-type.hh" +#include "COLR.hh" /* * COLR -- Color @@ -105,4 +104,4 @@ HB_INTERNAL void PaintComposite::closurev1 (hb_colrv1_closure_context_t* c) cons } /* namespace OT */ -#endif /* HB_OT_COLR_COLRV1_CLOSURE_HH */ +#endif /* OT_COLOR_COLR_COLRV1_CLOSURE_HH */ diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-cpal-table.hh b/source/libs/harfbuzz/harfbuzz-src/src/OT/Color/CPAL/CPAL.hh similarity index 97% rename from source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-cpal-table.hh rename to source/libs/harfbuzz/harfbuzz-src/src/OT/Color/CPAL/CPAL.hh index bcab77f79dc7cdecb36e071b60f6363e2eafe6c8..4914a0ed57af416392da57d4f32bb12209b00a5a 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-cpal-table.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/OT/Color/CPAL/CPAL.hh @@ -25,12 +25,12 @@ * Google Author(s): Sascha Brawer */ -#ifndef HB_OT_COLOR_CPAL_TABLE_HH -#define HB_OT_COLOR_CPAL_TABLE_HH +#ifndef OT_COLOR_CPAL_CPAL_HH +#define OT_COLOR_CPAL_CPAL_HH -#include "hb-open-type.hh" -#include "hb-ot-color.h" -#include "hb-ot-name.h" +#include "../../../hb-open-type.hh" +#include "../../../hb-ot-color.h" +#include "../../../hb-ot-name.h" /* @@ -239,7 +239,7 @@ struct CPAL TRACE_SUBSET (this); if (!numPalettes) return_trace (false); - const hb_map_t *color_index_map = c->plan->colr_palettes; + const hb_map_t *color_index_map = &c->plan->colr_palettes; if (color_index_map->is_empty ()) return_trace (false); hb_set_t retained_color_indices; @@ -319,4 +319,4 @@ struct CPAL } /* namespace OT */ -#endif /* HB_OT_COLOR_CPAL_TABLE_HH */ +#endif /* OT_COLOR_CPAL_CPAL_HH */ diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-sbix-table.hh b/source/libs/harfbuzz/harfbuzz-src/src/OT/Color/sbix/sbix.hh similarity index 88% rename from source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-sbix-table.hh rename to source/libs/harfbuzz/harfbuzz-src/src/OT/Color/sbix/sbix.hh index d0e2235fb2f0125a8dabeeb7439cf8b04ce3427e..46ad3fd58e1003bdf94692eed19a6cc9424c6b7f 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-sbix-table.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/OT/Color/sbix/sbix.hh @@ -25,11 +25,11 @@ * Google Author(s): Calder Kitagawa */ -#ifndef HB_OT_COLOR_SBIX_TABLE_HH -#define HB_OT_COLOR_SBIX_TABLE_HH +#ifndef OT_COLOR_SBIX_SBIX_HH +#define OT_COLOR_SBIX_SBIX_HH -#include "hb-open-type.hh" -#include "hb-ot-layout-common.hh" +#include "../../../hb-open-type.hh" +#include "../../../hb-paint.hh" /* * sbix -- Standard Bitmap Graphics @@ -213,10 +213,11 @@ struct sbix bool get_extents (hb_font_t *font, hb_codepoint_t glyph, - hb_glyph_extents_t *extents) const + hb_glyph_extents_t *extents, + bool scale = true) const { /* We only support PNG right now, and following function checks type. */ - return get_png_extents (font, glyph, extents); + return get_png_extents (font, glyph, extents, scale); } hb_blob_t *reference_png (hb_font_t *font, @@ -231,6 +232,37 @@ struct sbix num_glyphs, available_ppem); } + bool paint_glyph (hb_font_t *font, hb_codepoint_t glyph, hb_paint_funcs_t *funcs, void *data) const + { + if (!has_data ()) + return false; + + int x_offset = 0, y_offset = 0; + unsigned int strike_ppem = 0; + hb_blob_t *blob = reference_png (font, glyph, &x_offset, &y_offset, &strike_ppem); + hb_glyph_extents_t extents; + hb_glyph_extents_t pixel_extents; + + if (blob == hb_blob_get_empty ()) + return false; + + if (!hb_font_get_glyph_extents (font, glyph, &extents)) + return false; + + if (unlikely (!get_extents (font, glyph, &pixel_extents, false))) + return false; + + bool ret = funcs->image (data, + blob, + pixel_extents.width, -pixel_extents.height, + HB_PAINT_IMAGE_FORMAT_PNG, + font->slant_xy, + &extents); + + hb_blob_destroy (blob); + return ret; + } + private: const SBIXStrike &choose_strike (hb_font_t *font) const @@ -285,7 +317,8 @@ struct sbix bool get_png_extents (hb_font_t *font, hb_codepoint_t glyph, - hb_glyph_extents_t *extents) const + hb_glyph_extents_t *extents, + bool scale = true) const { /* Following code is safe to call even without data. * But faster to short-circuit. */ @@ -310,22 +343,18 @@ struct sbix extents->height = -1 * png.IHDR.height; /* Convert to font units. */ - if (strike_ppem) + if (strike_ppem && scale) { float scale = font->face->get_upem () / (float) strike_ppem; - extents->x_bearing = font->em_scalef_x (extents->x_bearing * scale); - extents->y_bearing = font->em_scalef_y (extents->y_bearing * scale); - extents->width = font->em_scalef_x (extents->width * scale); - extents->height = font->em_scalef_y (extents->height * scale); - } - else - { - extents->x_bearing = font->em_scale_x (extents->x_bearing); - extents->y_bearing = font->em_scale_y (extents->y_bearing); - extents->width = font->em_scale_x (extents->width); - extents->height = font->em_scale_y (extents->height); + extents->x_bearing = roundf (extents->x_bearing * scale); + extents->y_bearing = roundf (extents->y_bearing * scale); + extents->width = roundf (extents->width * scale); + extents->height = roundf (extents->height * scale); } + if (scale) + font->scale_glyph_extents (extents); + hb_blob_destroy (blob); return strike_ppem; @@ -420,4 +449,4 @@ struct sbix_accelerator_t : sbix::accelerator_t { } /* namespace OT */ -#endif /* HB_OT_COLOR_SBIX_TABLE_HH */ +#endif /* OT_COLOR_SBIX_SBIX_HH */ diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-svg-table.hh b/source/libs/harfbuzz/harfbuzz-src/src/OT/Color/svg/svg.hh similarity index 83% rename from source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-svg-table.hh rename to source/libs/harfbuzz/harfbuzz-src/src/OT/Color/svg/svg.hh index fc649f1006d350a9edaa39ed59bfbc0d6bf8e9a1..c7d91b88ee0e91454a701598d7f405e4531547d1 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color-svg-table.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/OT/Color/svg/svg.hh @@ -22,10 +22,12 @@ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ -#ifndef HB_OT_COLOR_SVG_TABLE_HH -#define HB_OT_COLOR_SVG_TABLE_HH +#ifndef OT_COLOR_SVG_SVG_HH +#define OT_COLOR_SVG_SVG_HH -#include "hb-open-type.hh" +#include "../../../hb-open-type.hh" +#include "../../../hb-blob.hh" +#include "../../../hb-paint.hh" /* * SVG -- SVG (Scalable Vector Graphics) @@ -91,8 +93,31 @@ struct SVG bool has_data () const { return table->has_data (); } + bool paint_glyph (hb_font_t *font HB_UNUSED, hb_codepoint_t glyph, hb_paint_funcs_t *funcs, void *data) const + { + if (!has_data ()) + return false; + + hb_blob_t *blob = reference_blob_for_glyph (glyph); + + if (blob == hb_blob_get_empty ()) + return false; + + funcs->image (data, + blob, + 0, 0, + HB_PAINT_IMAGE_FORMAT_SVG, + font->slant_xy, + nullptr); + + hb_blob_destroy (blob); + return true; + } + private: hb_blob_ptr_t<SVG> table; + public: + DEFINE_SIZE_STATIC (sizeof (hb_blob_ptr_t<SVG>)); }; const SVGDocumentIndexEntry &get_glyph_entry (hb_codepoint_t glyph_id) const @@ -123,4 +148,4 @@ struct SVG_accelerator_t : SVG::accelerator_t { } /* namespace OT */ -#endif /* HB_OT_COLOR_SVG_TABLE_HH */ +#endif /* OT_COLOR_SVG_SVG_HH */ diff --git a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/Common/Coverage.hh b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/Common/Coverage.hh index fbd7c642abdf62eac61d5112c5bcb4e40d73e041..d35654e24573dec77d9cd74c5743bb402df73cde 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/Common/Coverage.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/Common/Coverage.hh @@ -147,6 +147,7 @@ struct Coverage TRACE_SUBSET (this); auto it = + iter () + | hb_take (c->plan->source->get_num_glyphs ()) | hb_filter (c->plan->glyph_map_gsub) | hb_map_retains_sorting (c->plan->glyph_map_gsub) ; diff --git a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GDEF/GDEF.hh b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GDEF/GDEF.hh new file mode 100644 index 0000000000000000000000000000000000000000..0551fcf812a3e327f2b9714a8a8c8fc19c70d783 --- /dev/null +++ b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GDEF/GDEF.hh @@ -0,0 +1,918 @@ +/* + * Copyright © 2007,2008,2009 Red Hat, Inc. + * Copyright © 2010,2011,2012 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * 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. + * + * Red Hat Author(s): Behdad Esfahbod + * Google Author(s): Behdad Esfahbod + */ + +#ifndef OT_LAYOUT_GDEF_GDEF_HH +#define OT_LAYOUT_GDEF_GDEF_HH + +#include "../../../hb-ot-layout-common.hh" + +#include "../../../hb-font.hh" + + +namespace OT { + + +/* + * Attachment List Table + */ + +/* Array of contour point indices--in increasing numerical order */ +struct AttachPoint : Array16Of<HBUINT16> +{ + bool subset (hb_subset_context_t *c) const + { + TRACE_SUBSET (this); + auto *out = c->serializer->start_embed (*this); + if (unlikely (!out)) return_trace (false); + + return_trace (out->serialize (c->serializer, + iter ())); + } +}; + +struct AttachList +{ + unsigned int get_attach_points (hb_codepoint_t glyph_id, + unsigned int start_offset, + unsigned int *point_count /* IN/OUT */, + unsigned int *point_array /* OUT */) const + { + unsigned int index = (this+coverage).get_coverage (glyph_id); + if (index == NOT_COVERED) + { + if (point_count) + *point_count = 0; + return 0; + } + + const AttachPoint &points = this+attachPoint[index]; + + if (point_count) + { + + points.as_array ().sub_array (start_offset, point_count) + | hb_sink (hb_array (point_array, *point_count)) + ; + } + + return points.len; + } + + bool subset (hb_subset_context_t *c) const + { + TRACE_SUBSET (this); + const hb_set_t &glyphset = *c->plan->glyphset_gsub (); + const hb_map_t &glyph_map = *c->plan->glyph_map; + + auto *out = c->serializer->start_embed (*this); + if (unlikely (!c->serializer->extend_min (out))) return_trace (false); + + hb_sorted_vector_t<hb_codepoint_t> new_coverage; + + hb_zip (this+coverage, attachPoint) + | hb_filter (glyphset, hb_first) + | hb_filter (subset_offset_array (c, out->attachPoint, this), hb_second) + | hb_map (hb_first) + | hb_map (glyph_map) + | hb_sink (new_coverage) + ; + out->coverage.serialize_serialize (c->serializer, new_coverage.iter ()); + return_trace (bool (new_coverage)); + } + + bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + return_trace (coverage.sanitize (c, this) && attachPoint.sanitize (c, this)); + } + + protected: + Offset16To<Coverage> + coverage; /* Offset to Coverage table -- from + * beginning of AttachList table */ + Array16OfOffset16To<AttachPoint> + attachPoint; /* Array of AttachPoint tables + * in Coverage Index order */ + public: + DEFINE_SIZE_ARRAY (4, attachPoint); +}; + +/* + * Ligature Caret Table + */ + +struct CaretValueFormat1 +{ + friend struct CaretValue; + bool subset (hb_subset_context_t *c) const + { + TRACE_SUBSET (this); + auto *out = c->serializer->embed (this); + if (unlikely (!out)) return_trace (false); + return_trace (true); + } + + private: + hb_position_t get_caret_value (hb_font_t *font, hb_direction_t direction) const + { + return HB_DIRECTION_IS_HORIZONTAL (direction) ? font->em_scale_x (coordinate) : font->em_scale_y (coordinate); + } + + bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + return_trace (c->check_struct (this)); + } + + protected: + HBUINT16 caretValueFormat; /* Format identifier--format = 1 */ + FWORD coordinate; /* X or Y value, in design units */ + public: + DEFINE_SIZE_STATIC (4); +}; + +struct CaretValueFormat2 +{ + friend struct CaretValue; + bool subset (hb_subset_context_t *c) const + { + TRACE_SUBSET (this); + auto *out = c->serializer->embed (this); + if (unlikely (!out)) return_trace (false); + return_trace (true); + } + + private: + hb_position_t get_caret_value (hb_font_t *font, hb_direction_t direction, hb_codepoint_t glyph_id) const + { + hb_position_t x, y; + font->get_glyph_contour_point_for_origin (glyph_id, caretValuePoint, direction, &x, &y); + return HB_DIRECTION_IS_HORIZONTAL (direction) ? x : y; + } + + bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + return_trace (c->check_struct (this)); + } + + protected: + HBUINT16 caretValueFormat; /* Format identifier--format = 2 */ + HBUINT16 caretValuePoint; /* Contour point index on glyph */ + public: + DEFINE_SIZE_STATIC (4); +}; + +struct CaretValueFormat3 +{ + friend struct CaretValue; + + hb_position_t get_caret_value (hb_font_t *font, hb_direction_t direction, + const VariationStore &var_store) const + { + return HB_DIRECTION_IS_HORIZONTAL (direction) ? + font->em_scale_x (coordinate) + (this+deviceTable).get_x_delta (font, var_store) : + font->em_scale_y (coordinate) + (this+deviceTable).get_y_delta (font, var_store); + } + + bool subset (hb_subset_context_t *c) const + { + TRACE_SUBSET (this); + auto *out = c->serializer->start_embed (*this); + if (unlikely (!out)) return_trace (false); + if (!c->serializer->embed (caretValueFormat)) return_trace (false); + if (!c->serializer->embed (coordinate)) return_trace (false); + + unsigned varidx = (this+deviceTable).get_variation_index (); + if (c->plan->layout_variation_idx_delta_map.has (varidx)) + { + int delta = hb_second (c->plan->layout_variation_idx_delta_map.get (varidx)); + if (delta != 0) + { + if (!c->serializer->check_assign (out->coordinate, coordinate + delta, HB_SERIALIZE_ERROR_INT_OVERFLOW)) + return_trace (false); + } + } + + if (c->plan->all_axes_pinned) + return_trace (c->serializer->check_assign (out->caretValueFormat, 1, HB_SERIALIZE_ERROR_INT_OVERFLOW)); + + if (!c->serializer->embed (deviceTable)) + return_trace (false); + + return_trace (out->deviceTable.serialize_copy (c->serializer, deviceTable, this, c->serializer->to_bias (out), + hb_serialize_context_t::Head, &c->plan->layout_variation_idx_delta_map)); + } + + void collect_variation_indices (hb_collect_variation_indices_context_t *c) const + { (this+deviceTable).collect_variation_indices (c); } + + bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + return_trace (c->check_struct (this) && deviceTable.sanitize (c, this)); + } + + protected: + HBUINT16 caretValueFormat; /* Format identifier--format = 3 */ + FWORD coordinate; /* X or Y value, in design units */ + Offset16To<Device> + deviceTable; /* Offset to Device table for X or Y + * value--from beginning of CaretValue + * table */ + public: + DEFINE_SIZE_STATIC (6); +}; + +struct CaretValue +{ + hb_position_t get_caret_value (hb_font_t *font, + hb_direction_t direction, + hb_codepoint_t glyph_id, + const VariationStore &var_store) const + { + switch (u.format) { + case 1: return u.format1.get_caret_value (font, direction); + case 2: return u.format2.get_caret_value (font, direction, glyph_id); + case 3: return u.format3.get_caret_value (font, direction, var_store); + default:return 0; + } + } + + template <typename context_t, typename ...Ts> + typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const + { + if (unlikely (!c->may_dispatch (this, &u.format))) return c->no_dispatch_return_value (); + TRACE_DISPATCH (this, u.format); + switch (u.format) { + case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...)); + case 2: return_trace (c->dispatch (u.format2, std::forward<Ts> (ds)...)); + case 3: return_trace (c->dispatch (u.format3, std::forward<Ts> (ds)...)); + default:return_trace (c->default_return_value ()); + } + } + + void collect_variation_indices (hb_collect_variation_indices_context_t *c) const + { + switch (u.format) { + case 1: + case 2: + return; + case 3: + u.format3.collect_variation_indices (c); + return; + default: return; + } + } + + bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + if (!u.format.sanitize (c)) return_trace (false); + switch (u.format) { + case 1: return_trace (u.format1.sanitize (c)); + case 2: return_trace (u.format2.sanitize (c)); + case 3: return_trace (u.format3.sanitize (c)); + default:return_trace (true); + } + } + + protected: + union { + HBUINT16 format; /* Format identifier */ + CaretValueFormat1 format1; + CaretValueFormat2 format2; + CaretValueFormat3 format3; + } u; + public: + DEFINE_SIZE_UNION (2, format); +}; + +struct LigGlyph +{ + unsigned get_lig_carets (hb_font_t *font, + hb_direction_t direction, + hb_codepoint_t glyph_id, + const VariationStore &var_store, + unsigned start_offset, + unsigned *caret_count /* IN/OUT */, + hb_position_t *caret_array /* OUT */) const + { + if (caret_count) + { + + carets.as_array ().sub_array (start_offset, caret_count) + | hb_map (hb_add (this)) + | hb_map ([&] (const CaretValue &value) { return value.get_caret_value (font, direction, glyph_id, var_store); }) + | hb_sink (hb_array (caret_array, *caret_count)) + ; + } + + return carets.len; + } + + bool subset (hb_subset_context_t *c) const + { + TRACE_SUBSET (this); + auto *out = c->serializer->start_embed (*this); + if (unlikely (!c->serializer->extend_min (out))) return_trace (false); + + + hb_iter (carets) + | hb_apply (subset_offset_array (c, out->carets, this)) + ; + + return_trace (bool (out->carets)); + } + + void collect_variation_indices (hb_collect_variation_indices_context_t *c) const + { + for (const Offset16To<CaretValue>& offset : carets.iter ()) + (this+offset).collect_variation_indices (c); + } + + bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + return_trace (carets.sanitize (c, this)); + } + + protected: + Array16OfOffset16To<CaretValue> + carets; /* Offset array of CaretValue tables + * --from beginning of LigGlyph table + * --in increasing coordinate order */ + public: + DEFINE_SIZE_ARRAY (2, carets); +}; + +struct LigCaretList +{ + unsigned int get_lig_carets (hb_font_t *font, + hb_direction_t direction, + hb_codepoint_t glyph_id, + const VariationStore &var_store, + unsigned int start_offset, + unsigned int *caret_count /* IN/OUT */, + hb_position_t *caret_array /* OUT */) const + { + unsigned int index = (this+coverage).get_coverage (glyph_id); + if (index == NOT_COVERED) + { + if (caret_count) + *caret_count = 0; + return 0; + } + const LigGlyph &lig_glyph = this+ligGlyph[index]; + return lig_glyph.get_lig_carets (font, direction, glyph_id, var_store, start_offset, caret_count, caret_array); + } + + bool subset (hb_subset_context_t *c) const + { + TRACE_SUBSET (this); + const hb_set_t &glyphset = *c->plan->glyphset_gsub (); + const hb_map_t &glyph_map = *c->plan->glyph_map; + + auto *out = c->serializer->start_embed (*this); + if (unlikely (!c->serializer->extend_min (out))) return_trace (false); + + hb_sorted_vector_t<hb_codepoint_t> new_coverage; + + hb_zip (this+coverage, ligGlyph) + | hb_filter (glyphset, hb_first) + | hb_filter (subset_offset_array (c, out->ligGlyph, this), hb_second) + | hb_map (hb_first) + | hb_map (glyph_map) + | hb_sink (new_coverage) + ; + out->coverage.serialize_serialize (c->serializer, new_coverage.iter ()); + return_trace (bool (new_coverage)); + } + + void collect_variation_indices (hb_collect_variation_indices_context_t *c) const + { + + hb_zip (this+coverage, ligGlyph) + | hb_filter (c->glyph_set, hb_first) + | hb_map (hb_second) + | hb_map (hb_add (this)) + | hb_apply ([c] (const LigGlyph& _) { _.collect_variation_indices (c); }) + ; + } + + bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + return_trace (coverage.sanitize (c, this) && ligGlyph.sanitize (c, this)); + } + + protected: + Offset16To<Coverage> + coverage; /* Offset to Coverage table--from + * beginning of LigCaretList table */ + Array16OfOffset16To<LigGlyph> + ligGlyph; /* Array of LigGlyph tables + * in Coverage Index order */ + public: + DEFINE_SIZE_ARRAY (4, ligGlyph); +}; + + +struct MarkGlyphSetsFormat1 +{ + bool covers (unsigned int set_index, hb_codepoint_t glyph_id) const + { return (this+coverage[set_index]).get_coverage (glyph_id) != NOT_COVERED; } + + bool subset (hb_subset_context_t *c) const + { + TRACE_SUBSET (this); + auto *out = c->serializer->start_embed (*this); + if (unlikely (!c->serializer->extend_min (out))) return_trace (false); + out->format = format; + + bool ret = true; + for (const Offset32To<Coverage>& offset : coverage.iter ()) + { + auto *o = out->coverage.serialize_append (c->serializer); + if (unlikely (!o)) + { + ret = false; + break; + } + + //not using o->serialize_subset (c, offset, this, out) here because + //OTS doesn't allow null offset. + //See issue: https://github.com/khaledhosny/ots/issues/172 + c->serializer->push (); + c->dispatch (this+offset); + c->serializer->add_link (*o, c->serializer->pop_pack ()); + } + + return_trace (ret && out->coverage.len); + } + + bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + return_trace (coverage.sanitize (c, this)); + } + + protected: + HBUINT16 format; /* Format identifier--format = 1 */ + Array16Of<Offset32To<Coverage>> + coverage; /* Array of long offsets to mark set + * coverage tables */ + public: + DEFINE_SIZE_ARRAY (4, coverage); +}; + +struct MarkGlyphSets +{ + bool covers (unsigned int set_index, hb_codepoint_t glyph_id) const + { + switch (u.format) { + case 1: return u.format1.covers (set_index, glyph_id); + default:return false; + } + } + + bool subset (hb_subset_context_t *c) const + { + TRACE_SUBSET (this); + switch (u.format) { + case 1: return_trace (u.format1.subset (c)); + default:return_trace (false); + } + } + + bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + if (!u.format.sanitize (c)) return_trace (false); + switch (u.format) { + case 1: return_trace (u.format1.sanitize (c)); + default:return_trace (true); + } + } + + protected: + union { + HBUINT16 format; /* Format identifier */ + MarkGlyphSetsFormat1 format1; + } u; + public: + DEFINE_SIZE_UNION (2, format); +}; + + +/* + * GDEF -- Glyph Definition + * https://docs.microsoft.com/en-us/typography/opentype/spec/gdef + */ + + +template <typename Types> +struct GDEFVersion1_2 +{ + friend struct GDEF; + + protected: + FixedVersion<>version; /* Version of the GDEF table--currently + * 0x00010003u */ + typename Types::template OffsetTo<ClassDef> + glyphClassDef; /* Offset to class definition table + * for glyph type--from beginning of + * GDEF header (may be Null) */ + typename Types::template OffsetTo<AttachList> + attachList; /* Offset to list of glyphs with + * attachment points--from beginning + * of GDEF header (may be Null) */ + typename Types::template OffsetTo<LigCaretList> + ligCaretList; /* Offset to list of positioning points + * for ligature carets--from beginning + * of GDEF header (may be Null) */ + typename Types::template OffsetTo<ClassDef> + markAttachClassDef; /* Offset to class definition table for + * mark attachment type--from beginning + * of GDEF header (may be Null) */ + typename Types::template OffsetTo<MarkGlyphSets> + markGlyphSetsDef; /* Offset to the table of mark set + * definitions--from beginning of GDEF + * header (may be NULL). Introduced + * in version 0x00010002. */ + Offset32To<VariationStore> + varStore; /* Offset to the table of Item Variation + * Store--from beginning of GDEF + * header (may be NULL). Introduced + * in version 0x00010003. */ + public: + DEFINE_SIZE_MIN (4 + 4 * Types::size); + + unsigned int get_size () const + { + return min_size + + (version.to_int () >= 0x00010002u ? markGlyphSetsDef.static_size : 0) + + (version.to_int () >= 0x00010003u ? varStore.static_size : 0); + } + + bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + return_trace (version.sanitize (c) && + glyphClassDef.sanitize (c, this) && + attachList.sanitize (c, this) && + ligCaretList.sanitize (c, this) && + markAttachClassDef.sanitize (c, this) && + (version.to_int () < 0x00010002u || markGlyphSetsDef.sanitize (c, this)) && + (version.to_int () < 0x00010003u || varStore.sanitize (c, this))); + } + + bool subset (hb_subset_context_t *c) const + { + TRACE_SUBSET (this); + auto *out = c->serializer->embed (*this); + if (unlikely (!out)) return_trace (false); + + bool subset_glyphclassdef = out->glyphClassDef.serialize_subset (c, glyphClassDef, this, nullptr, false, true); + bool subset_attachlist = out->attachList.serialize_subset (c, attachList, this); + bool subset_ligcaretlist = out->ligCaretList.serialize_subset (c, ligCaretList, this); + bool subset_markattachclassdef = out->markAttachClassDef.serialize_subset (c, markAttachClassDef, this, nullptr, false, true); + + bool subset_markglyphsetsdef = false; + if (version.to_int () >= 0x00010002u) + { + subset_markglyphsetsdef = out->markGlyphSetsDef.serialize_subset (c, markGlyphSetsDef, this); + } + + bool subset_varstore = false; + if (version.to_int () >= 0x00010003u) + { + if (c->plan->all_axes_pinned) + out->varStore = 0; + else + subset_varstore = out->varStore.serialize_subset (c, varStore, this, c->plan->gdef_varstore_inner_maps.as_array ()); + } + + if (subset_varstore) + { + out->version.minor = 3; + } else if (subset_markglyphsetsdef) { + out->version.minor = 2; + } else { + out->version.minor = 0; + } + + return_trace (subset_glyphclassdef || subset_attachlist || + subset_ligcaretlist || subset_markattachclassdef || + (out->version.to_int () >= 0x00010002u && subset_markglyphsetsdef) || + (out->version.to_int () >= 0x00010003u && subset_varstore)); + } +}; + +struct GDEF +{ + static constexpr hb_tag_t tableTag = HB_OT_TAG_GDEF; + + enum GlyphClasses { + UnclassifiedGlyph = 0, + BaseGlyph = 1, + LigatureGlyph = 2, + MarkGlyph = 3, + ComponentGlyph = 4 + }; + + unsigned int get_size () const + { + switch (u.version.major) { + case 1: return u.version1.get_size (); +#ifndef HB_NO_BEYOND_64K + case 2: return u.version2.get_size (); +#endif + default: return u.version.static_size; + } + } + + bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + if (unlikely (!u.version.sanitize (c))) return_trace (false); + switch (u.version.major) { + case 1: return_trace (u.version1.sanitize (c)); +#ifndef HB_NO_BEYOND_64K + case 2: return_trace (u.version2.sanitize (c)); +#endif + default: return_trace (true); + } + } + + bool subset (hb_subset_context_t *c) const + { + switch (u.version.major) { + case 1: return u.version1.subset (c); +#ifndef HB_NO_BEYOND_64K + case 2: return u.version2.subset (c); +#endif + default: return false; + } + } + + bool has_glyph_classes () const + { + switch (u.version.major) { + case 1: return u.version1.glyphClassDef != 0; +#ifndef HB_NO_BEYOND_64K + case 2: return u.version2.glyphClassDef != 0; +#endif + default: return false; + } + } + const ClassDef &get_glyph_class_def () const + { + switch (u.version.major) { + case 1: return this+u.version1.glyphClassDef; +#ifndef HB_NO_BEYOND_64K + case 2: return this+u.version2.glyphClassDef; +#endif + default: return Null(ClassDef); + } + } + bool has_attach_list () const + { + switch (u.version.major) { + case 1: return u.version1.attachList != 0; +#ifndef HB_NO_BEYOND_64K + case 2: return u.version2.attachList != 0; +#endif + default: return false; + } + } + const AttachList &get_attach_list () const + { + switch (u.version.major) { + case 1: return this+u.version1.attachList; +#ifndef HB_NO_BEYOND_64K + case 2: return this+u.version2.attachList; +#endif + default: return Null(AttachList); + } + } + bool has_lig_carets () const + { + switch (u.version.major) { + case 1: return u.version1.ligCaretList != 0; +#ifndef HB_NO_BEYOND_64K + case 2: return u.version2.ligCaretList != 0; +#endif + default: return false; + } + } + const LigCaretList &get_lig_caret_list () const + { + switch (u.version.major) { + case 1: return this+u.version1.ligCaretList; +#ifndef HB_NO_BEYOND_64K + case 2: return this+u.version2.ligCaretList; +#endif + default: return Null(LigCaretList); + } + } + bool has_mark_attachment_types () const + { + switch (u.version.major) { + case 1: return u.version1.markAttachClassDef != 0; +#ifndef HB_NO_BEYOND_64K + case 2: return u.version2.markAttachClassDef != 0; +#endif + default: return false; + } + } + const ClassDef &get_mark_attach_class_def () const + { + switch (u.version.major) { + case 1: return this+u.version1.markAttachClassDef; +#ifndef HB_NO_BEYOND_64K + case 2: return this+u.version2.markAttachClassDef; +#endif + default: return Null(ClassDef); + } + } + bool has_mark_glyph_sets () const + { + switch (u.version.major) { + case 1: return u.version.to_int () >= 0x00010002u && u.version1.markGlyphSetsDef != 0; +#ifndef HB_NO_BEYOND_64K + case 2: return u.version2.markGlyphSetsDef != 0; +#endif + default: return false; + } + } + const MarkGlyphSets &get_mark_glyph_sets () const + { + switch (u.version.major) { + case 1: return u.version.to_int () >= 0x00010002u ? this+u.version1.markGlyphSetsDef : Null(MarkGlyphSets); +#ifndef HB_NO_BEYOND_64K + case 2: return this+u.version2.markGlyphSetsDef; +#endif + default: return Null(MarkGlyphSets); + } + } + bool has_var_store () const + { + switch (u.version.major) { + case 1: return u.version.to_int () >= 0x00010003u && u.version1.varStore != 0; +#ifndef HB_NO_BEYOND_64K + case 2: return u.version2.varStore != 0; +#endif + default: return false; + } + } + const VariationStore &get_var_store () const + { + switch (u.version.major) { + case 1: return u.version.to_int () >= 0x00010003u ? this+u.version1.varStore : Null(VariationStore); +#ifndef HB_NO_BEYOND_64K + case 2: return this+u.version2.varStore; +#endif + default: return Null(VariationStore); + } + } + + + bool has_data () const { return u.version.to_int (); } + unsigned int get_glyph_class (hb_codepoint_t glyph) const + { return get_glyph_class_def ().get_class (glyph); } + void get_glyphs_in_class (unsigned int klass, hb_set_t *glyphs) const + { get_glyph_class_def ().collect_class (glyphs, klass); } + + unsigned int get_mark_attachment_type (hb_codepoint_t glyph) const + { return get_mark_attach_class_def ().get_class (glyph); } + + unsigned int get_attach_points (hb_codepoint_t glyph_id, + unsigned int start_offset, + unsigned int *point_count /* IN/OUT */, + unsigned int *point_array /* OUT */) const + { return get_attach_list ().get_attach_points (glyph_id, start_offset, point_count, point_array); } + + unsigned int get_lig_carets (hb_font_t *font, + hb_direction_t direction, + hb_codepoint_t glyph_id, + unsigned int start_offset, + unsigned int *caret_count /* IN/OUT */, + hb_position_t *caret_array /* OUT */) const + { return get_lig_caret_list ().get_lig_carets (font, + direction, glyph_id, get_var_store(), + start_offset, caret_count, caret_array); } + + bool mark_set_covers (unsigned int set_index, hb_codepoint_t glyph_id) const + { return get_mark_glyph_sets ().covers (set_index, glyph_id); } + + /* glyph_props is a 16-bit integer where the lower 8-bit have bits representing + * glyph class and other bits, and high 8-bit the mark attachment type (if any). + * Not to be confused with lookup_props which is very similar. */ + unsigned int get_glyph_props (hb_codepoint_t glyph) const + { + unsigned int klass = get_glyph_class (glyph); + + static_assert (((unsigned int) HB_OT_LAYOUT_GLYPH_PROPS_BASE_GLYPH == (unsigned int) LookupFlag::IgnoreBaseGlyphs), ""); + static_assert (((unsigned int) HB_OT_LAYOUT_GLYPH_PROPS_LIGATURE == (unsigned int) LookupFlag::IgnoreLigatures), ""); + static_assert (((unsigned int) HB_OT_LAYOUT_GLYPH_PROPS_MARK == (unsigned int) LookupFlag::IgnoreMarks), ""); + + switch (klass) { + default: return HB_OT_LAYOUT_GLYPH_CLASS_UNCLASSIFIED; + case BaseGlyph: return HB_OT_LAYOUT_GLYPH_PROPS_BASE_GLYPH; + case LigatureGlyph: return HB_OT_LAYOUT_GLYPH_PROPS_LIGATURE; + case MarkGlyph: + klass = get_mark_attachment_type (glyph); + return HB_OT_LAYOUT_GLYPH_PROPS_MARK | (klass << 8); + } + } + + HB_INTERNAL bool is_blocklisted (hb_blob_t *blob, + hb_face_t *face) const; + + struct accelerator_t + { + accelerator_t (hb_face_t *face) + { + table = hb_sanitize_context_t ().reference_table<GDEF> (face); + if (unlikely (table->is_blocklisted (table.get_blob (), face))) + { + hb_blob_destroy (table.get_blob ()); + table = hb_blob_get_empty (); + } + } + ~accelerator_t () { table.destroy (); } + + hb_blob_ptr_t<GDEF> table; + }; + + void collect_variation_indices (hb_collect_variation_indices_context_t *c) const + { get_lig_caret_list ().collect_variation_indices (c); } + + void remap_layout_variation_indices (const hb_set_t *layout_variation_indices, + hb_hashmap_t<unsigned, hb_pair_t<unsigned, int>> *layout_variation_idx_delta_map /* OUT */) const + { + if (!has_var_store ()) return; + if (layout_variation_indices->is_empty ()) return; + + unsigned new_major = 0, new_minor = 0; + unsigned last_major = (layout_variation_indices->get_min ()) >> 16; + for (unsigned idx : layout_variation_indices->iter ()) + { + uint16_t major = idx >> 16; + if (major >= get_var_store ().get_sub_table_count ()) break; + if (major != last_major) + { + new_minor = 0; + ++new_major; + } + + unsigned new_idx = (new_major << 16) + new_minor; + if (!layout_variation_idx_delta_map->has (idx)) + continue; + int delta = hb_second (layout_variation_idx_delta_map->get (idx)); + + layout_variation_idx_delta_map->set (idx, hb_pair_t<unsigned, int> (new_idx, delta)); + ++new_minor; + last_major = major; + } + } + + protected: + union { + FixedVersion<> version; /* Version identifier */ + GDEFVersion1_2<SmallTypes> version1; +#ifndef HB_NO_BEYOND_64K + GDEFVersion1_2<MediumTypes> version2; +#endif + } u; + public: + DEFINE_SIZE_MIN (4); +}; + +struct GDEF_accelerator_t : GDEF::accelerator_t { + GDEF_accelerator_t (hb_face_t *face) : GDEF::accelerator_t (face) {} +}; + +} /* namespace OT */ + + +#endif /* OT_LAYOUT_GDEF_GDEF_HH */ diff --git a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/AnchorFormat3.hh b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/AnchorFormat3.hh index 2e30ab33c3611f9f58304bc9244da75b9b0a26da..e7e3c5c6d1ea48614187cfd11743b4f83bc95342 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/AnchorFormat3.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/AnchorFormat3.hh @@ -51,9 +51,9 @@ struct AnchorFormat3 if (unlikely (!c->serializer->embed (yCoordinate))) return_trace (false); unsigned x_varidx = xDeviceTable ? (this+xDeviceTable).get_variation_index () : HB_OT_LAYOUT_NO_VARIATIONS_INDEX; - if (c->plan->layout_variation_idx_delta_map->has (x_varidx)) + if (c->plan->layout_variation_idx_delta_map.has (x_varidx)) { - int delta = hb_second (c->plan->layout_variation_idx_delta_map->get (x_varidx)); + int delta = hb_second (c->plan->layout_variation_idx_delta_map.get (x_varidx)); if (delta != 0) { if (!c->serializer->check_assign (out->xCoordinate, xCoordinate + delta, @@ -63,9 +63,9 @@ struct AnchorFormat3 } unsigned y_varidx = yDeviceTable ? (this+yDeviceTable).get_variation_index () : HB_OT_LAYOUT_NO_VARIATIONS_INDEX; - if (c->plan->layout_variation_idx_delta_map->has (y_varidx)) + if (c->plan->layout_variation_idx_delta_map.has (y_varidx)) { - int delta = hb_second (c->plan->layout_variation_idx_delta_map->get (y_varidx)); + int delta = hb_second (c->plan->layout_variation_idx_delta_map.get (y_varidx)); if (delta != 0) { if (!c->serializer->check_assign (out->yCoordinate, yCoordinate + delta, @@ -80,8 +80,8 @@ struct AnchorFormat3 if (!c->serializer->embed (xDeviceTable)) return_trace (false); if (!c->serializer->embed (yDeviceTable)) return_trace (false); - out->xDeviceTable.serialize_copy (c->serializer, xDeviceTable, this, 0, hb_serialize_context_t::Head, c->plan->layout_variation_idx_delta_map); - out->yDeviceTable.serialize_copy (c->serializer, yDeviceTable, this, 0, hb_serialize_context_t::Head, c->plan->layout_variation_idx_delta_map); + out->xDeviceTable.serialize_copy (c->serializer, xDeviceTable, this, 0, hb_serialize_context_t::Head, &c->plan->layout_variation_idx_delta_map); + out->yDeviceTable.serialize_copy (c->serializer, yDeviceTable, this, 0, hb_serialize_context_t::Head, &c->plan->layout_variation_idx_delta_map); return_trace (out); } diff --git a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/CursivePos.hh b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/CursivePos.hh index c105cfb0916504ceaa6fb7b1bc317cf7771f3fe9..0105a9b85427533b207a69aab804a38cdf110038 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/CursivePos.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/CursivePos.hh @@ -19,8 +19,8 @@ struct CursivePos template <typename context_t, typename ...Ts> typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const { + if (unlikely (!c->may_dispatch (this, &u.format))) return c->no_dispatch_return_value (); TRACE_DISPATCH (this, u.format); - if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ()); switch (u.format) { case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...)); default:return_trace (c->default_return_value ()); diff --git a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/CursivePosFormat1.hh b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/CursivePosFormat1.hh index 7f58fac8b8ed1bacd4a62417437e4a39c003e99e..ff255e090a285716a65b51c92688c5ade2b49767 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/CursivePosFormat1.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/CursivePosFormat1.hh @@ -143,7 +143,7 @@ struct CursivePosFormat1 if (HB_BUFFER_MESSAGE_MORE && c->buffer->messaging ()) { c->buffer->message (c->font, - "cursive attaching glyph at %d to glyph at %d", + "cursive attaching glyph at %u to glyph at %u", i, j); } @@ -241,7 +241,7 @@ struct CursivePosFormat1 if (HB_BUFFER_MESSAGE_MORE && c->buffer->messaging ()) { c->buffer->message (c->font, - "cursive attached glyph at %d to glyph at %d", + "cursive attached glyph at %u to glyph at %u", i, j); } diff --git a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/MarkArray.hh b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/MarkArray.hh index cb5e8b26896eb8fccb925fe62c41616f2b631a51..ff43ffb8c571428ee35181da1e3f9bc25b3512d6 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/MarkArray.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/MarkArray.hh @@ -42,7 +42,7 @@ struct MarkArray : Array16Of<MarkRecord> /* Array of MarkRecords--in Cove if (HB_BUFFER_MESSAGE_MORE && c->buffer->messaging ()) { c->buffer->message (c->font, - "attaching mark glyph at %d to glyph at %d", + "attaching mark glyph at %u to glyph at %u", c->buffer->idx, glyph_pos); } @@ -56,7 +56,7 @@ struct MarkArray : Array16Of<MarkRecord> /* Array of MarkRecords--in Cove if (HB_BUFFER_MESSAGE_MORE && c->buffer->messaging ()) { c->buffer->message (c->font, - "attached mark glyph at %d to glyph at %d", + "attached mark glyph at %u to glyph at %u", c->buffer->idx, glyph_pos); } diff --git a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/MarkBasePos.hh b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/MarkBasePos.hh index edf7099c072b564c23bb7e24424496007ba769da..cd2fc7ccfdd2eb039983b81a690911ec35bb5c16 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/MarkBasePos.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/MarkBasePos.hh @@ -22,8 +22,8 @@ struct MarkBasePos template <typename context_t, typename ...Ts> typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const { + if (unlikely (!c->may_dispatch (this, &u.format))) return c->no_dispatch_return_value (); TRACE_DISPATCH (this, u.format); - if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ()); switch (u.format) { case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...)); #ifndef HB_NO_BEYOND_64K diff --git a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/MarkBasePosFormat1.hh b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/MarkBasePosFormat1.hh index ebb8c31c679ce16f6a7adfd0913b16a2dda14a03..eb4712049b16883359de9003b4c6aa4ae2dee74d 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/MarkBasePosFormat1.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/MarkBasePosFormat1.hh @@ -90,6 +90,25 @@ struct MarkBasePosFormat1_2 const Coverage &get_coverage () const { return this+markCoverage; } + static inline bool accept (hb_buffer_t *buffer, unsigned idx) + { + /* We only want to attach to the first of a MultipleSubst sequence. + * https://github.com/harfbuzz/harfbuzz/issues/740 + * Reject others... + * ...but stop if we find a mark in the MultipleSubst sequence: + * https://github.com/harfbuzz/harfbuzz/issues/1020 */ + return !_hb_glyph_info_multiplied (&buffer->info[idx]) || + 0 == _hb_glyph_info_get_lig_comp (&buffer->info[idx]) || + (idx == 0 || + _hb_glyph_info_is_mark (&buffer->info[idx - 1]) || + !_hb_glyph_info_multiplied (&buffer->info[idx - 1]) || + _hb_glyph_info_get_lig_id (&buffer->info[idx]) != + _hb_glyph_info_get_lig_id (&buffer->info[idx - 1]) || + _hb_glyph_info_get_lig_comp (&buffer->info[idx]) != + _hb_glyph_info_get_lig_comp (&buffer->info[idx - 1]) + 1 + ); + } + bool apply (hb_ot_apply_context_t *c) const { TRACE_APPLY (this); @@ -97,48 +116,54 @@ struct MarkBasePosFormat1_2 unsigned int mark_index = (this+markCoverage).get_coverage (buffer->cur().codepoint); if (likely (mark_index == NOT_COVERED)) return_trace (false); - /* Now we search backwards for a non-mark glyph */ + /* Now we search backwards for a non-mark glyph. + * We don't use skippy_iter.prev() to avoid O(n^2) behavior. */ + hb_ot_apply_context_t::skipping_iterator_t &skippy_iter = c->iter_input; - skippy_iter.reset (buffer->idx, 1); skippy_iter.set_lookup_props (LookupFlag::IgnoreMarks); - do { - unsigned unsafe_from; - if (!skippy_iter.prev (&unsafe_from)) + + if (c->last_base_until > buffer->idx) + { + c->last_base_until = 0; + c->last_base = -1; + } + unsigned j; + for (j = buffer->idx; j > c->last_base_until; j--) + { + auto match = skippy_iter.match (buffer->info[j - 1]); + if (match == skippy_iter.MATCH) + { + // https://github.com/harfbuzz/harfbuzz/issues/4124 + if (!accept (buffer, j - 1) && + NOT_COVERED == (this+baseCoverage).get_coverage (buffer->info[j - 1].codepoint)) + match = skippy_iter.SKIP; + } + if (match == skippy_iter.MATCH) { - buffer->unsafe_to_concat_from_outbuffer (unsafe_from, buffer->idx + 1); - return_trace (false); + c->last_base = (signed) j - 1; + break; } + } + c->last_base_until = buffer->idx; + if (c->last_base == -1) + { + buffer->unsafe_to_concat_from_outbuffer (0, buffer->idx + 1); + return_trace (false); + } - /* We only want to attach to the first of a MultipleSubst sequence. - * https://github.com/harfbuzz/harfbuzz/issues/740 - * Reject others... - * ...but stop if we find a mark in the MultipleSubst sequence: - * https://github.com/harfbuzz/harfbuzz/issues/1020 */ - if (!_hb_glyph_info_multiplied (&buffer->info[skippy_iter.idx]) || - 0 == _hb_glyph_info_get_lig_comp (&buffer->info[skippy_iter.idx]) || - (skippy_iter.idx == 0 || - _hb_glyph_info_is_mark (&buffer->info[skippy_iter.idx - 1]) || - !_hb_glyph_info_multiplied (&buffer->info[skippy_iter.idx - 1]) || - _hb_glyph_info_get_lig_id (&buffer->info[skippy_iter.idx]) != - _hb_glyph_info_get_lig_id (&buffer->info[skippy_iter.idx - 1]) || - _hb_glyph_info_get_lig_comp (&buffer->info[skippy_iter.idx]) != - _hb_glyph_info_get_lig_comp (&buffer->info[skippy_iter.idx - 1]) + 1 - )) - break; - skippy_iter.reject (); - } while (true); + unsigned idx = (unsigned) c->last_base; /* Checking that matched glyph is actually a base glyph by GDEF is too strong; disabled */ - //if (!_hb_glyph_info_is_base_glyph (&buffer->info[skippy_iter.idx])) { return_trace (false); } + //if (!_hb_glyph_info_is_base_glyph (&buffer->info[idx])) { return_trace (false); } - unsigned int base_index = (this+baseCoverage).get_coverage (buffer->info[skippy_iter.idx].codepoint); + unsigned int base_index = (this+baseCoverage).get_coverage (buffer->info[idx].codepoint); if (base_index == NOT_COVERED) { - buffer->unsafe_to_concat_from_outbuffer (skippy_iter.idx, buffer->idx + 1); + buffer->unsafe_to_concat_from_outbuffer (idx, buffer->idx + 1); return_trace (false); } - return_trace ((this+markArray).apply (c, mark_index, base_index, this+baseArray, classCount, skippy_iter.idx)); + return_trace ((this+markArray).apply (c, mark_index, base_index, this+baseArray, classCount, idx)); } bool subset (hb_subset_context_t *c) const diff --git a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/MarkLigPos.hh b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/MarkLigPos.hh index 09152fd876e257e7cd90c8c46396744990c3b525..739c325411ccbfaf0f4687646face9c6c7f2aae1 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/MarkLigPos.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/MarkLigPos.hh @@ -22,8 +22,8 @@ struct MarkLigPos template <typename context_t, typename ...Ts> typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const { + if (unlikely (!c->may_dispatch (this, &u.format))) return c->no_dispatch_return_value (); TRACE_DISPATCH (this, u.format); - if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ()); switch (u.format) { case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...)); #ifndef HB_NO_BEYOND_64K diff --git a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/MarkLigPosFormat1.hh b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/MarkLigPosFormat1.hh index 1a8021237e2bd06a95358a06521b77b69337fd46..7e7b438aa7daed57d12eac51cfa01ed131739eab 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/MarkLigPosFormat1.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/MarkLigPosFormat1.hh @@ -100,20 +100,37 @@ struct MarkLigPosFormat1_2 if (likely (mark_index == NOT_COVERED)) return_trace (false); /* Now we search backwards for a non-mark glyph */ + hb_ot_apply_context_t::skipping_iterator_t &skippy_iter = c->iter_input; - skippy_iter.reset (buffer->idx, 1); skippy_iter.set_lookup_props (LookupFlag::IgnoreMarks); - unsigned unsafe_from; - if (!skippy_iter.prev (&unsafe_from)) + + if (c->last_base_until > buffer->idx) { - buffer->unsafe_to_concat_from_outbuffer (unsafe_from, buffer->idx + 1); + c->last_base_until = 0; + c->last_base = -1; + } + unsigned j; + for (j = buffer->idx; j > c->last_base_until; j--) + { + auto match = skippy_iter.match (buffer->info[j - 1]); + if (match == skippy_iter.MATCH) + { + c->last_base = (signed) j - 1; + break; + } + } + c->last_base_until = buffer->idx; + if (c->last_base == -1) + { + buffer->unsafe_to_concat_from_outbuffer (0, buffer->idx + 1); return_trace (false); } + j = (unsigned) c->last_base; + /* Checking that matched glyph is actually a ligature by GDEF is too strong; disabled */ - //if (!_hb_glyph_info_is_ligature (&buffer->info[skippy_iter.idx])) { return_trace (false); } + //if (!_hb_glyph_info_is_ligature (&buffer->info[j])) { return_trace (false); } - unsigned int j = skippy_iter.idx; unsigned int lig_index = (this+ligatureCoverage).get_coverage (buffer->info[j].codepoint); if (lig_index == NOT_COVERED) { diff --git a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/MarkMarkPos.hh b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/MarkMarkPos.hh index 4118fc304ffc81f0f1b061d22ce7e83b1958ef20..cddd2a3d507790f77d4bcf4b8a40744190a65ea1 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/MarkMarkPos.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/MarkMarkPos.hh @@ -22,8 +22,8 @@ struct MarkMarkPos template <typename context_t, typename ...Ts> typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const { + if (unlikely (!c->may_dispatch (this, &u.format))) return c->no_dispatch_return_value (); TRACE_DISPATCH (this, u.format); - if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ()); switch (u.format) { case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...)); #ifndef HB_NO_BEYOND_64K diff --git a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/PairPos.hh b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/PairPos.hh index 9823768cbc19305ea1423c0cd1d93c31b32f573c..c13d4f48941c716cb0a7535bced7f74b873ce04a 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/PairPos.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/PairPos.hh @@ -25,8 +25,8 @@ struct PairPos template <typename context_t, typename ...Ts> typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const { + if (unlikely (!c->may_dispatch (this, &u.format))) return c->no_dispatch_return_value (); TRACE_DISPATCH (this, u.format); - if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ()); switch (u.format) { case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...)); case 2: return_trace (c->dispatch (u.format2, std::forward<Ts> (ds)...)); diff --git a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/PairPosFormat1.hh b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/PairPosFormat1.hh index 9c9b268889f28c55c43a8e5fa29b71e7d3ad2296..b4a9a9ad539ccd14add1985270c5e602e62e8132 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/PairPosFormat1.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/PairPosFormat1.hh @@ -43,7 +43,7 @@ struct PairPosFormat1_3 { valueFormat, len1, - 1 + len1 + len2 + PairSet::get_size (len1, len2) }; return_trace (coverage.sanitize (c, this) && pairSet.sanitize (c, this, &closure)); @@ -177,9 +177,7 @@ struct PairPosFormat1_3 hb_pair_t<unsigned, unsigned> compute_effective_value_formats (const hb_set_t& glyphset) const { - unsigned len1 = valueFormat[0].get_len (); - unsigned len2 = valueFormat[1].get_len (); - unsigned record_size = HBUINT16::static_size + Value::static_size * (len1 + len2); + unsigned record_size = PairSet::get_size (valueFormat); unsigned format1 = 0; unsigned format2 = 0; diff --git a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/PairPosFormat2.hh b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/PairPosFormat2.hh index 9c87ac2b0380f2cddb79ae164ba449a7fb730680..de15a29e3cf5e3e8e8d1bcde6534cf0985498a1c 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/PairPosFormat2.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/PairPosFormat2.hh @@ -49,7 +49,7 @@ struct PairPosFormat2_4 unsigned int len1 = valueFormat1.get_len (); unsigned int len2 = valueFormat2.get_len (); - unsigned int stride = len1 + len2; + unsigned int stride = HBUINT16::static_size * (len1 + len2); unsigned int record_size = valueFormat1.get_size () + valueFormat2.get_size (); unsigned int count = (unsigned int) class1Count * (unsigned int) class2Count; return_trace (c->check_range ((const void *) values, @@ -220,7 +220,7 @@ struct PairPosFormat2_4 if (HB_BUFFER_MESSAGE_MORE && c->buffer->messaging ()) { c->buffer->message (c->font, - "try kerning glyphs at %d,%d", + "try kerning glyphs at %u,%u", c->buffer->idx, skippy_iter.idx); } @@ -231,14 +231,14 @@ struct PairPosFormat2_4 if (HB_BUFFER_MESSAGE_MORE && c->buffer->messaging ()) { c->buffer->message (c->font, - "kerned glyphs at %d,%d", + "kerned glyphs at %u,%u", c->buffer->idx, skippy_iter.idx); } if (HB_BUFFER_MESSAGE_MORE && c->buffer->messaging ()) { c->buffer->message (c->font, - "tried kerning glyphs at %d,%d", + "tried kerning glyphs at %u,%u", c->buffer->idx, skippy_iter.idx); } @@ -298,8 +298,8 @@ struct PairPosFormat2_4 for (unsigned class2_idx : + hb_range ((unsigned) class2Count) | hb_filter (klass2_map)) { unsigned idx = (class1_idx * (unsigned) class2Count + class2_idx) * (len1 + len2); - valueFormat1.copy_values (c->serializer, out->valueFormat1, this, &values[idx], c->plan->layout_variation_idx_delta_map); - valueFormat2.copy_values (c->serializer, out->valueFormat2, this, &values[idx + len1], c->plan->layout_variation_idx_delta_map); + valueFormat1.copy_values (c->serializer, out->valueFormat1, this, &values[idx], &c->plan->layout_variation_idx_delta_map); + valueFormat2.copy_values (c->serializer, out->valueFormat2, this, &values[idx + len1], &c->plan->layout_variation_idx_delta_map); } } diff --git a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/PairSet.hh b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/PairSet.hh index a318f3991367ef022be776039ba66c19bbd71ac1..147b8e00ea63229f576933e690085a01d6eea6df 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/PairSet.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/PairSet.hh @@ -24,11 +24,22 @@ struct PairSet public: DEFINE_SIZE_MIN (2); + static unsigned get_size (unsigned len1, unsigned len2) + { + return Types::HBGlyphID::static_size + Value::static_size * (len1 + len2); + } + static unsigned get_size (const ValueFormat valueFormats[2]) + { + unsigned len1 = valueFormats[0].get_len (); + unsigned len2 = valueFormats[1].get_len (); + return get_size (len1, len2); + } + struct sanitize_closure_t { const ValueFormat *valueFormats; unsigned int len1; /* valueFormats[0].get_len() */ - unsigned int stride; /* 1 + len1 + len2 */ + unsigned int stride; /* bytes */ }; bool sanitize (hb_sanitize_context_t *c, const sanitize_closure_t *closure) const @@ -37,7 +48,6 @@ struct PairSet if (!(c->check_struct (this) && c->check_range (&firstPairValueRecord, len, - HBUINT16::static_size, closure->stride))) return_trace (false); unsigned int count = len; @@ -49,9 +59,7 @@ struct PairSet bool intersects (const hb_set_t *glyphs, const ValueFormat *valueFormats) const { - unsigned int len1 = valueFormats[0].get_len (); - unsigned int len2 = valueFormats[1].get_len (); - unsigned int record_size = HBUINT16::static_size * (1 + len1 + len2); + unsigned record_size = get_size (valueFormats); const PairValueRecord *record = &firstPairValueRecord; unsigned int count = len; @@ -67,9 +75,7 @@ struct PairSet void collect_glyphs (hb_collect_glyphs_context_t *c, const ValueFormat *valueFormats) const { - unsigned int len1 = valueFormats[0].get_len (); - unsigned int len2 = valueFormats[1].get_len (); - unsigned int record_size = HBUINT16::static_size * (1 + len1 + len2); + unsigned record_size = get_size (valueFormats); const PairValueRecord *record = &firstPairValueRecord; c->input->add_array (&record->secondGlyph, len, record_size); @@ -78,9 +84,7 @@ struct PairSet void collect_variation_indices (hb_collect_variation_indices_context_t *c, const ValueFormat *valueFormats) const { - unsigned len1 = valueFormats[0].get_len (); - unsigned len2 = valueFormats[1].get_len (); - unsigned record_size = HBUINT16::static_size * (1 + len1 + len2); + unsigned record_size = get_size (valueFormats); const PairValueRecord *record = &firstPairValueRecord; unsigned count = len; @@ -101,7 +105,7 @@ struct PairSet hb_buffer_t *buffer = c->buffer; unsigned int len1 = valueFormats[0].get_len (); unsigned int len2 = valueFormats[1].get_len (); - unsigned int record_size = HBUINT16::static_size * (1 + len1 + len2); + unsigned record_size = get_size (len1, len2); const PairValueRecord *record = hb_bsearch (buffer->info[pos].codepoint, &firstPairValueRecord, @@ -112,7 +116,7 @@ struct PairSet if (HB_BUFFER_MESSAGE_MORE && c->buffer->messaging ()) { c->buffer->message (c->font, - "try kerning glyphs at %d,%d", + "try kerning glyphs at %u,%u", c->buffer->idx, pos); } @@ -123,14 +127,14 @@ struct PairSet if (HB_BUFFER_MESSAGE_MORE && c->buffer->messaging ()) { c->buffer->message (c->font, - "kerned glyphs at %d,%d", + "kerned glyphs at %u,%u", c->buffer->idx, pos); } if (HB_BUFFER_MESSAGE_MORE && c->buffer->messaging ()) { c->buffer->message (c->font, - "tried kerning glyphs at %d,%d", + "tried kerning glyphs at %u,%u", c->buffer->idx, pos); } @@ -168,7 +172,7 @@ struct PairSet unsigned len1 = valueFormats[0].get_len (); unsigned len2 = valueFormats[1].get_len (); - unsigned record_size = HBUINT16::static_size + Value::static_size * (len1 + len2); + unsigned record_size = get_size (len1, len2); typename PairValueRecord::context_t context = { @@ -177,7 +181,7 @@ struct PairSet newFormats, len1, &glyph_map, - c->plan->layout_variation_idx_delta_map + &c->plan->layout_variation_idx_delta_map }; const PairValueRecord *record = &firstPairValueRecord; diff --git a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/SinglePos.hh b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/SinglePos.hh index 6dce3e6343683a29ab3e9d20c4e9b88ed89326d8..3af6c49965943a1e1cdb1e95a8d99675e4817647 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/SinglePos.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/SinglePos.hh @@ -72,8 +72,8 @@ struct SinglePos template <typename context_t, typename ...Ts> typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const { + if (unlikely (!c->may_dispatch (this, &u.format))) return c->no_dispatch_return_value (); TRACE_DISPATCH (this, u.format); - if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ()); switch (u.format) { case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...)); case 2: return_trace (c->dispatch (u.format2, std::forward<Ts> (ds)...)); diff --git a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/SinglePosFormat1.hh b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/SinglePosFormat1.hh index b4c9fc3db005cdec41a30c66d9334c4b6b38f744..f7a170f34e05815cc31a5ec4dfaee7a792b06d6f 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/SinglePosFormat1.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/SinglePosFormat1.hh @@ -63,7 +63,7 @@ struct SinglePosFormat1 if (HB_BUFFER_MESSAGE_MORE && c->buffer->messaging ()) { c->buffer->message (c->font, - "positioning glyph at %d", + "positioning glyph at %u", c->buffer->idx); } @@ -72,7 +72,7 @@ struct SinglePosFormat1 if (HB_BUFFER_MESSAGE_MORE && c->buffer->messaging ()) { c->buffer->message (c->font, - "positioned glyph at %d", + "positioned glyph at %u", c->buffer->idx); } @@ -144,7 +144,7 @@ struct SinglePosFormat1 ; bool ret = bool (it); - SinglePos_serialize (c->serializer, this, it, c->plan->layout_variation_idx_delta_map, c->plan->all_axes_pinned); + SinglePos_serialize (c->serializer, this, it, &c->plan->layout_variation_idx_delta_map, c->plan->all_axes_pinned); return_trace (ret); } }; diff --git a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/SinglePosFormat2.hh b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/SinglePosFormat2.hh index c77951156b984d09795948c7fa9c4a54b4f3892a..e8f2d7c2c6e2e730dfa36f21e07bc8c092ab9715 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/SinglePosFormat2.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/SinglePosFormat2.hh @@ -73,7 +73,7 @@ struct SinglePosFormat2 if (HB_BUFFER_MESSAGE_MORE && c->buffer->messaging ()) { c->buffer->message (c->font, - "positioning glyph at %d", + "positioning glyph at %u", c->buffer->idx); } @@ -84,7 +84,7 @@ struct SinglePosFormat2 if (HB_BUFFER_MESSAGE_MORE && c->buffer->messaging ()) { c->buffer->message (c->font, - "positioned glyph at %d", + "positioned glyph at %u", c->buffer->idx); } @@ -163,7 +163,7 @@ struct SinglePosFormat2 ; bool ret = bool (it); - SinglePos_serialize (c->serializer, this, it, c->plan->layout_variation_idx_delta_map, c->plan->all_axes_pinned); + SinglePos_serialize (c->serializer, this, it, &c->plan->layout_variation_idx_delta_map, c->plan->all_axes_pinned); return_trace (ret); } }; diff --git a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/ValueFormat.hh b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/ValueFormat.hh index 26a40f01a327ed83d5038734be9d78f778713814..1aa451abcc83bd9c47d7cf5b2ff3c6e492a7b1ca 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/ValueFormat.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GPOS/ValueFormat.hh @@ -371,7 +371,7 @@ struct ValueFormat : HBUINT16 for (unsigned int i = 0; i < count; i++) { if (!sanitize_value_devices (c, base, values)) return_trace (false); - values += stride; + values = &StructAtOffset<const Value> (values, stride); } return_trace (true); diff --git a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/AlternateSet.hh b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/AlternateSet.hh index 6c50c9717a91cee2ef2f9c241d1d270c2bcfadeb..b4466119be0bb933508a865dcec42b03572635ae 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/AlternateSet.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/AlternateSet.hh @@ -61,7 +61,7 @@ struct AlternateSet { c->buffer->sync_so_far (); c->buffer->message (c->font, - "replacing glyph at %d (alternate substitution)", + "replacing glyph at %u (alternate substitution)", c->buffer->idx); } @@ -70,8 +70,8 @@ struct AlternateSet if (HB_BUFFER_MESSAGE_MORE && c->buffer->messaging ()) { c->buffer->message (c->font, - "replaced glyph at %d (alternate substitution)", - c->buffer->idx - 1); + "replaced glyph at %u (alternate substitution)", + c->buffer->idx - 1u); } return_trace (true); diff --git a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/AlternateSubst.hh b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/AlternateSubst.hh index 9d7cd6fddf157162c6a75185411b9a57665a0c68..04a052a7836ceffe5ab96704523341f203bb3868 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/AlternateSubst.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/AlternateSubst.hh @@ -23,8 +23,8 @@ struct AlternateSubst template <typename context_t, typename ...Ts> typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const { + if (unlikely (!c->may_dispatch (this, &u.format))) return c->no_dispatch_return_value (); TRACE_DISPATCH (this, u.format); - if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ()); switch (u.format) { case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...)); #ifndef HB_NO_BEYOND_64K diff --git a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/Ligature.hh b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/Ligature.hh index cdb35f525bef244c635166d86637bd3ce188c589..ffe39d52abd74598ddb0fe3e3c3025aeb6dfa35d 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/Ligature.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/Ligature.hh @@ -69,7 +69,7 @@ struct Ligature { c->buffer->sync_so_far (); c->buffer->message (c->font, - "replacing glyph at %d (ligature substitution)", + "replacing glyph at %u (ligature substitution)", c->buffer->idx); } @@ -78,8 +78,8 @@ struct Ligature if (HB_BUFFER_MESSAGE_MORE && c->buffer->messaging ()) { c->buffer->message (c->font, - "replaced glyph at %d (ligature substitution)", - c->buffer->idx - 1); + "replaced glyph at %u (ligature substitution)", + c->buffer->idx - 1u); } return_trace (true); @@ -138,7 +138,7 @@ struct Ligature { c->buffer->sync_so_far (); c->buffer->message (c->font, - "ligated glyph at %d", + "ligated glyph at %u", pos); } diff --git a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/LigatureSubst.hh b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/LigatureSubst.hh index 7ba19e844c537b98fd33e422131d2d3c910f335e..18f6e355816df533c4ca88ec67d61da48cd3cbf1 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/LigatureSubst.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/LigatureSubst.hh @@ -23,8 +23,8 @@ struct LigatureSubst template <typename context_t, typename ...Ts> typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const { + if (unlikely (!c->may_dispatch (this, &u.format))) return c->no_dispatch_return_value (); TRACE_DISPATCH (this, u.format); - if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ()); switch (u.format) { case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...)); #ifndef HB_NO_BEYOND_64K diff --git a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/MultipleSubst.hh b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/MultipleSubst.hh index 95710ed2be82c3886f264b1026bf9d6cd7cc71e5..742c8587ee3bdd8dacb78721d0e9216add028c10 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/MultipleSubst.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/MultipleSubst.hh @@ -24,8 +24,8 @@ struct MultipleSubst template <typename context_t, typename ...Ts> typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const { + if (unlikely (!c->may_dispatch (this, &u.format))) return c->no_dispatch_return_value (); TRACE_DISPATCH (this, u.format); - if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ()); switch (u.format) { case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...)); #ifndef HB_NO_BEYOND_64K diff --git a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/ReverseChainSingleSubst.hh b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/ReverseChainSingleSubst.hh index 48e208efb9c6694d2cc0ca5101fe504c0e6494c2..5ad463fea792798531322e9fb93a67bf927c2485 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/ReverseChainSingleSubst.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/ReverseChainSingleSubst.hh @@ -20,8 +20,8 @@ struct ReverseChainSingleSubst template <typename context_t, typename ...Ts> typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const { + if (unlikely (!c->may_dispatch (this, &u.format))) return c->no_dispatch_return_value (); TRACE_DISPATCH (this, u.format); - if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ()); switch (u.format) { case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...)); default:return_trace (c->default_return_value ()); diff --git a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/ReverseChainSingleSubstFormat1.hh b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/ReverseChainSingleSubstFormat1.hh index a23e92028ed96644b3f332816d08efd2805c5cd9..2c2e1aa44fdc22bf9421a7e947f8a2b59b6cd6cd 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/ReverseChainSingleSubstFormat1.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/ReverseChainSingleSubstFormat1.hh @@ -135,7 +135,7 @@ struct ReverseChainSingleSubstFormat1 if (HB_BUFFER_MESSAGE_MORE && c->buffer->messaging ()) { c->buffer->message (c->font, - "replacing glyph at %d (reverse chaining substitution)", + "replacing glyph at %u (reverse chaining substitution)", c->buffer->idx); } @@ -144,7 +144,7 @@ struct ReverseChainSingleSubstFormat1 if (HB_BUFFER_MESSAGE_MORE && c->buffer->messaging ()) { c->buffer->message (c->font, - "replaced glyph at %d (reverse chaining substitution)", + "replaced glyph at %u (reverse chaining substitution)", c->buffer->idx); } diff --git a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/Sequence.hh b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/Sequence.hh index e2190078b808bdaf1197faeb412dc215be033a30..ae3292f3295b00fdb6d7c4e9eee3b3458a762583 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/Sequence.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/Sequence.hh @@ -44,7 +44,7 @@ struct Sequence { c->buffer->sync_so_far (); c->buffer->message (c->font, - "replacing glyph at %d (multiple substitution)", + "replacing glyph at %u (multiple substitution)", c->buffer->idx); } @@ -53,8 +53,8 @@ struct Sequence if (HB_BUFFER_MESSAGE_MORE && c->buffer->messaging ()) { c->buffer->message (c->font, - "replaced glyph at %d (multiple subtitution)", - c->buffer->idx - 1); + "replaced glyph at %u (multiple subtitution)", + c->buffer->idx - 1u); } return_trace (true); @@ -67,7 +67,7 @@ struct Sequence { c->buffer->sync_so_far (); c->buffer->message (c->font, - "deleting glyph at %d (multiple substitution)", + "deleting glyph at %u (multiple substitution)", c->buffer->idx); } @@ -77,7 +77,7 @@ struct Sequence { c->buffer->sync_so_far (); c->buffer->message (c->font, - "deleted glyph at %d (multiple substitution)", + "deleted glyph at %u (multiple substitution)", c->buffer->idx); } @@ -88,7 +88,7 @@ struct Sequence { c->buffer->sync_so_far (); c->buffer->message (c->font, - "multiplying glyph at %d", + "multiplying glyph at %u", c->buffer->idx); } diff --git a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/SingleSubst.hh b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/SingleSubst.hh index 7da8103168f7302d40d4bb478daf34b41ae7a4aa..4529927ba6d78635b42e21cae3941bbae03e055c 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/SingleSubst.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/SingleSubst.hh @@ -27,8 +27,8 @@ struct SingleSubst template <typename context_t, typename ...Ts> typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const { + if (unlikely (!c->may_dispatch (this, &u.format))) return c->no_dispatch_return_value (); TRACE_DISPATCH (this, u.format); - if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ()); switch (u.format) { case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...)); case 2: return_trace (c->dispatch (u.format2, std::forward<Ts> (ds)...)); diff --git a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/SingleSubstFormat1.hh b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/SingleSubstFormat1.hh index 1be21b98bc41fbe7d925c6dd513723b8cb160138..78725352c2840890d29861a2b3ef90391352ff4a 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/SingleSubstFormat1.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/SingleSubstFormat1.hh @@ -103,7 +103,7 @@ struct SingleSubstFormat1_3 { c->buffer->sync_so_far (); c->buffer->message (c->font, - "replacing glyph at %d (single substitution)", + "replacing glyph at %u (single substitution)", c->buffer->idx); } @@ -112,8 +112,8 @@ struct SingleSubstFormat1_3 if (HB_BUFFER_MESSAGE_MORE && c->buffer->messaging ()) { c->buffer->message (c->font, - "replaced glyph at %d (single substitution)", - c->buffer->idx - 1); + "replaced glyph at %u (single substitution)", + c->buffer->idx - 1u); } return_trace (true); diff --git a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/SingleSubstFormat2.hh b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/SingleSubstFormat2.hh index 01df714525c98b7eaaaa2786065360edda197460..17aa0873632f24324368cd34d41c5ce4090e896e 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/SingleSubstFormat2.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/OT/Layout/GSUB/SingleSubstFormat2.hh @@ -87,7 +87,7 @@ struct SingleSubstFormat2_4 { c->buffer->sync_so_far (); c->buffer->message (c->font, - "replacing glyph at %d (single substitution)", + "replacing glyph at %u (single substitution)", c->buffer->idx); } @@ -96,8 +96,8 @@ struct SingleSubstFormat2_4 if (HB_BUFFER_MESSAGE_MORE && c->buffer->messaging ()) { c->buffer->message (c->font, - "replaced glyph at %d (single substitution)", - c->buffer->idx - 1); + "replaced glyph at %u (single substitution)", + c->buffer->idx - 1u); } return_trace (true); diff --git a/source/libs/harfbuzz/harfbuzz-src/src/OT/glyf/Glyph.hh b/source/libs/harfbuzz/harfbuzz-src/src/OT/glyf/Glyph.hh index b7215b017008ac237867063ff7909aadd259ffdc..5574ae0722d0738fc371453aeb0cbf4d38357368 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/OT/glyf/Glyph.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/OT/glyf/Glyph.hh @@ -18,11 +18,6 @@ struct glyf_accelerator_t; namespace glyf_impl { -#ifndef HB_GLYF_MAX_POINTS -#define HB_GLYF_MAX_POINTS 10000 -#endif - - enum phantom_point_index_t { PHANTOM_LEFT = 0, @@ -85,28 +80,38 @@ struct Glyph } void update_mtx (const hb_subset_plan_t *plan, - int xMin, int yMax, + int xMin, int xMax, + int yMin, int yMax, const contour_point_vector_t &all_points) const { hb_codepoint_t new_gid = 0; if (!plan->new_gid_for_old_gid (gid, &new_gid)) return; + if (type != EMPTY) + { + plan->bounds_width_map.set (new_gid, xMax - xMin); + plan->bounds_height_map.set (new_gid, yMax - yMin); + } + unsigned len = all_points.length; float leftSideX = all_points[len - 4].x; float rightSideX = all_points[len - 3].x; float topSideY = all_points[len - 2].y; float bottomSideY = all_points[len - 1].y; - int hori_aw = roundf (rightSideX - leftSideX); + signed hori_aw = roundf (rightSideX - leftSideX); if (hori_aw < 0) hori_aw = 0; int lsb = roundf (xMin - leftSideX); - plan->hmtx_map->set (new_gid, hb_pair (hori_aw, lsb)); + plan->hmtx_map.set (new_gid, hb_pair ((unsigned) hori_aw, lsb)); + //flag value should be computed using non-empty glyphs + if (type != EMPTY && lsb != xMin) + plan->head_maxp_info.allXMinIsLsb = false; - int vert_aw = roundf (topSideY - bottomSideY); + signed vert_aw = roundf (topSideY - bottomSideY); if (vert_aw < 0) vert_aw = 0; int tsb = roundf (topSideY - yMax); - plan->vmtx_map->set (new_gid, hb_pair (vert_aw, tsb)); + plan->vmtx_map.set (new_gid, hb_pair ((unsigned) vert_aw, tsb)); } bool compile_header_bytes (const hb_subset_plan_t *plan, @@ -114,7 +119,7 @@ struct Glyph hb_bytes_t &dest_bytes /* OUT */) const { GlyphHeader *glyph_header = nullptr; - if (type != EMPTY && all_points.length > 4) + if (!plan->pinned_at_default && type != EMPTY && all_points.length >= 4) { glyph_header = (GlyphHeader *) hb_calloc (1, GlyphHeader::static_size); if (unlikely (!glyph_header)) return false; @@ -138,18 +143,33 @@ struct Glyph yMax = hb_max (yMax, y); } - update_mtx (plan, roundf (xMin), roundf (yMax), all_points); + update_mtx (plan, roundf (xMin), roundf (xMax), roundf (yMin), roundf (yMax), all_points); + + int rounded_xMin = roundf (xMin); + int rounded_xMax = roundf (xMax); + int rounded_yMin = roundf (yMin); + int rounded_yMax = roundf (yMax); + + if (type != EMPTY) + { + plan->head_maxp_info.xMin = hb_min (plan->head_maxp_info.xMin, rounded_xMin); + plan->head_maxp_info.yMin = hb_min (plan->head_maxp_info.yMin, rounded_yMin); + plan->head_maxp_info.xMax = hb_max (plan->head_maxp_info.xMax, rounded_xMax); + plan->head_maxp_info.yMax = hb_max (plan->head_maxp_info.yMax, rounded_yMax); + } - /*for empty glyphs: all_points only include phantom points. - *just update metrics and then return */ + /* when pinned at default, no need to compile glyph header + * and for empty glyphs: all_points only include phantom points. + * just update metrics and then return */ if (!glyph_header) return true; glyph_header->numberOfContours = header->numberOfContours; - glyph_header->xMin = roundf (xMin); - glyph_header->yMin = roundf (yMin); - glyph_header->xMax = roundf (xMax); - glyph_header->yMax = roundf (yMax); + + glyph_header->xMin = rounded_xMin; + glyph_header->yMin = rounded_yMin; + glyph_header->xMax = rounded_xMax; + glyph_header->yMax = rounded_yMax; dest_bytes = hb_bytes_t ((const char *)glyph_header, GlyphHeader::static_size); return true; @@ -162,34 +182,54 @@ struct Glyph hb_bytes_t &dest_end /* OUT */) { contour_point_vector_t all_points, deltas; - if (!get_points (font, glyf, all_points, &deltas, false, false)) + unsigned composite_contours = 0; + head_maxp_info_t *head_maxp_info_p = &plan->head_maxp_info; + unsigned *composite_contours_p = &composite_contours; + + // don't compute head/maxp values when glyph has no contours(type is EMPTY) + // also ignore .notdef glyph when --notdef-outline is not enabled + if (type == EMPTY || + (gid == 0 && !(plan->flags & HB_SUBSET_FLAGS_NOTDEF_OUTLINE))) + { + head_maxp_info_p = nullptr; + composite_contours_p = nullptr; + } + + if (!get_points (font, glyf, all_points, &deltas, head_maxp_info_p, composite_contours_p, false, false)) return false; // .notdef, set type to empty so we only update metrics and don't compile bytes for // it if (gid == 0 && !(plan->flags & HB_SUBSET_FLAGS_NOTDEF_OUTLINE)) + { type = EMPTY; - - switch (type) { - case COMPOSITE: - if (!CompositeGlyph (*header, bytes).compile_bytes_with_deltas (dest_start, - deltas, - dest_end)) - return false; - break; - case SIMPLE: - if (!SimpleGlyph (*header, bytes).compile_bytes_with_deltas (all_points, - plan->flags & HB_SUBSET_FLAGS_NO_HINTING, - dest_end)) - return false; - break; - default: - /* set empty bytes for empty glyph - * do not use source glyph's pointers */ dest_start = hb_bytes_t (); dest_end = hb_bytes_t (); - break; + } + + //dont compile bytes when pinned at default, just recalculate bounds + if (!plan->pinned_at_default) { + switch (type) { + case COMPOSITE: + if (!CompositeGlyph (*header, bytes).compile_bytes_with_deltas (dest_start, + deltas, + dest_end)) + return false; + break; + case SIMPLE: + if (!SimpleGlyph (*header, bytes).compile_bytes_with_deltas (all_points, + plan->flags & HB_SUBSET_FLAGS_NO_HINTING, + dest_end)) + return false; + break; + default: + /* set empty bytes for empty glyph + * do not use source glyph's pointers */ + dest_start = hb_bytes_t (); + dest_end = hb_bytes_t (); + break; + } } if (!compile_header_bytes (plan, all_points, dest_start)) @@ -208,13 +248,25 @@ struct Glyph bool get_points (hb_font_t *font, const accelerator_t &glyf_accelerator, contour_point_vector_t &all_points /* OUT */, contour_point_vector_t *deltas = nullptr, /* OUT */ + head_maxp_info_t * head_maxp_info = nullptr, /* OUT */ + unsigned *composite_contours = nullptr, /* OUT */ bool shift_points_hori = true, bool use_my_metrics = true, bool phantom_only = false, hb_array_t<int> coords = hb_array_t<int> (), - unsigned int depth = 0) const + unsigned int depth = 0, + unsigned *edge_count = nullptr) const { if (unlikely (depth > HB_MAX_NESTING_LEVEL)) return false; + unsigned stack_edge_count = 0; + if (!edge_count) edge_count = &stack_edge_count; + if (unlikely (*edge_count > HB_GLYF_MAX_EDGE_COUNT)) return false; + (*edge_count)++; + + if (head_maxp_info) + { + head_maxp_info->maxComponentDepth = hb_max (head_maxp_info->maxComponentDepth, depth); + } if (!coords) coords = hb_array (font->coords, font->num_coords); @@ -226,6 +278,10 @@ struct Glyph switch (type) { case SIMPLE: + if (depth == 0 && head_maxp_info) + head_maxp_info->maxContours = hb_max (head_maxp_info->maxContours, (unsigned) header->numberOfContours); + if (depth > 0 && composite_contours) + *composite_contours += (unsigned) header->numberOfContours; if (unlikely (!SimpleGlyph (*header, bytes).get_contour_points (points, phantom_only))) return false; break; @@ -301,6 +357,8 @@ struct Glyph switch (type) { case SIMPLE: + if (depth == 0 && head_maxp_info) + head_maxp_info->maxPoints = hb_max (head_maxp_info->maxPoints, points.length - 4); if (!inplace) all_points.extend (points.as_array ()); break; @@ -311,17 +369,19 @@ struct Glyph for (auto &item : get_composite_iterator ()) { comp_points.reset (); - if (unlikely (!glyf_accelerator.glyph_for_gid (item.get_gid ()) .get_points (font, glyf_accelerator, comp_points, deltas, + head_maxp_info, + composite_contours, shift_points_hori, use_my_metrics, phantom_only, coords, - depth + 1))) + depth + 1, + edge_count))) return false; /* Copy phantom points from component if USE_MY_METRICS flag set */ @@ -357,6 +417,13 @@ struct Glyph comp_index++; } + if (head_maxp_info && depth == 0) + { + if (composite_contours) + head_maxp_info->maxCompositeContours = hb_max (head_maxp_info->maxCompositeContours, *composite_contours); + head_maxp_info->maxCompositePoints = hb_max (head_maxp_info->maxCompositePoints, all_points.length); + head_maxp_info->maxComponentElements = hb_max (head_maxp_info->maxComponentElements, comp_index); + } all_points.extend (phantoms); } break; #ifndef HB_NO_VAR_COMPOSITES @@ -370,7 +437,11 @@ struct Glyph comp_points.reset (); - coord_setter_t coord_setter (coords); + auto component_coords = coords; + if (item.is_reset_unspecified_axes ()) + component_coords = hb_array<int> (); + + coord_setter_t coord_setter (component_coords); item.set_variations (coord_setter, record_points); if (unlikely (!glyf_accelerator.glyph_for_gid (item.get_gid ()) @@ -378,11 +449,14 @@ struct Glyph glyf_accelerator, comp_points, deltas, + head_maxp_info, + nullptr, shift_points_hori, use_my_metrics, phantom_only, coord_setter.get_coords (), - depth + 1))) + depth + 1, + edge_count))) return false; /* Apply component transformation */ diff --git a/source/libs/harfbuzz/harfbuzz-src/src/OT/glyf/GlyphHeader.hh b/source/libs/harfbuzz/harfbuzz-src/src/OT/glyf/GlyphHeader.hh index e4a9168b79f0c703c4ae45c3f2db0887ca8bbbc9..a43b6691ab497f81176815601ff78ca59a0bbfa7 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/OT/glyf/GlyphHeader.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/OT/glyf/GlyphHeader.hh @@ -21,10 +21,12 @@ struct GlyphHeader /* extents->x_bearing = hb_min (glyph_header.xMin, glyph_header.xMax); */ int lsb = hb_min (xMin, xMax); (void) glyf_accelerator.hmtx->get_leading_bearing_without_var_unscaled (gid, &lsb); - extents->x_bearing = font->em_scale_x (lsb); - extents->y_bearing = font->em_scale_y (hb_max (yMin, yMax)); - extents->width = font->em_scale_x (hb_max (xMin, xMax) - hb_min (xMin, xMax)); - extents->height = font->em_scale_y (hb_min (yMin, yMax) - hb_max (yMin, yMax)); + extents->x_bearing = lsb; + extents->y_bearing = hb_max (yMin, yMax); + extents->width = hb_max (xMin, xMax) - hb_min (xMin, xMax); + extents->height = hb_min (yMin, yMax) - hb_max (yMin, yMax); + + font->scale_glyph_extents (extents); return true; } diff --git a/source/libs/harfbuzz/harfbuzz-src/src/OT/glyf/SimpleGlyph.hh b/source/libs/harfbuzz/harfbuzz-src/src/OT/glyf/SimpleGlyph.hh index 2b4aa99d25d34174600392b4cec48331473dfbde..b6fefce1ac99532cdfa98c5f0b20f377b47a266d 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/OT/glyf/SimpleGlyph.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/OT/glyf/SimpleGlyph.hh @@ -20,7 +20,7 @@ struct SimpleGlyph FLAG_X_SAME = 0x10, FLAG_Y_SAME = 0x20, FLAG_OVERLAP_SIMPLE = 0x40, - FLAG_RESERVED2 = 0x80 + FLAG_CUBIC = 0x80 }; const GlyphHeader &header; @@ -184,7 +184,7 @@ struct SimpleGlyph if (unlikely (!bytes.check_range (&endPtsOfContours[num_contours]))) return false; unsigned int num_points = endPtsOfContours[num_contours - 1] + 1; - points_.alloc (num_points + 4); // Allocate for phantom points, to avoid a possible copy + points_.alloc (num_points + 4, true); // Allocate for phantom points, to avoid a possible copy if (!points_.resize (num_points)) return false; if (phantom_only) return true; @@ -272,9 +272,9 @@ struct SimpleGlyph unsigned num_points = all_points.length - 4; hb_vector_t<uint8_t> flags, x_coords, y_coords; - if (unlikely (!flags.alloc (num_points))) return false; - if (unlikely (!x_coords.alloc (2*num_points))) return false; - if (unlikely (!y_coords.alloc (2*num_points))) return false; + if (unlikely (!flags.alloc (num_points, true))) return false; + if (unlikely (!x_coords.alloc (2*num_points, true))) return false; + if (unlikely (!y_coords.alloc (2*num_points, true))) return false; uint8_t lastflag = 255, repeat = 0; int prev_x = 0, prev_y = 0; diff --git a/source/libs/harfbuzz/harfbuzz-src/src/OT/glyf/SubsetGlyph.hh b/source/libs/harfbuzz/harfbuzz-src/src/OT/glyf/SubsetGlyph.hh index 1a0370c7577338bc93117a36c873e5678dca2fc0..795925bba525bae439b0f8ed776023bb9034c1fd 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/OT/glyf/SubsetGlyph.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/OT/glyf/SubsetGlyph.hh @@ -21,22 +21,14 @@ struct SubsetGlyph bool serialize (hb_serialize_context_t *c, bool use_short_loca, - const hb_subset_plan_t *plan, - hb_font_t *font) + const hb_subset_plan_t *plan) { TRACE_SERIALIZE (this); - if (font) - { - const OT::glyf_accelerator_t &glyf = *font->face->table.glyf; - if (!this->compile_bytes_with_deltas (plan, font, glyf)) - return_trace (false); - } - hb_bytes_t dest_glyph = dest_start.copy (c); dest_glyph = hb_bytes_t (&dest_glyph, dest_glyph.length + dest_end.copy (c).length); unsigned int pad_length = use_short_loca ? padding () : 0; - DEBUG_MSG (SUBSET, nullptr, "serialize %d byte glyph, width %d pad %d", dest_glyph.length, dest_glyph.length + pad_length, pad_length); + DEBUG_MSG (SUBSET, nullptr, "serialize %u byte glyph, width %u pad %u", dest_glyph.length, dest_glyph.length + pad_length, pad_length); HBUINT8 pad; pad = 0; diff --git a/source/libs/harfbuzz/harfbuzz-src/src/OT/glyf/VarCompositeGlyph.hh b/source/libs/harfbuzz/harfbuzz-src/src/OT/glyf/VarCompositeGlyph.hh index 0f4c71c83d59dc5d8e573cbce6be74fa4a894def..3685da7913a2b129924f83c0b9a69509cb3175e4 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/OT/glyf/VarCompositeGlyph.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/OT/glyf/VarCompositeGlyph.hh @@ -29,6 +29,7 @@ struct VarCompositeGlyphRecord HAVE_TCENTER_Y = 0x0800, GID_IS_24 = 0x1000, AXES_HAVE_VARIATION = 0x2000, + RESET_UNSPECIFIED_AXES = 0x4000, }; public: @@ -60,6 +61,7 @@ struct VarCompositeGlyphRecord bool has_more () const { return true; } bool is_use_my_metrics () const { return flags & USE_MY_METRICS; } + bool is_reset_unspecified_axes () const { return flags & RESET_UNSPECIFIED_AXES; } hb_codepoint_t get_gid () const { @@ -165,8 +167,8 @@ struct VarCompositeGlyphRecord float translateX = 0.f; float translateY = 0.f; float rotation = 0.f; - float scaleX = 1.f * (1 << 12); - float scaleY = 1.f * (1 << 12); + float scaleX = 1.f * (1 << 10); + float scaleY = 1.f * (1 << 10); float skewX = 0.f; float skewY = 0.f; float tCenterX = 0.f; @@ -187,7 +189,7 @@ struct VarCompositeGlyphRecord if (flags & AXES_HAVE_VARIATION) { for (unsigned i = 0; i < count; i++) - rec_points[i].x = *q++; + rec_points[i].x = q++->to_int (); rec_points += count; } else @@ -197,11 +199,11 @@ struct VarCompositeGlyphRecord if (flags & HAVE_TRANSLATE_X) translateX = * (const FWORD *) p++; if (flags & HAVE_TRANSLATE_Y) translateY = * (const FWORD *) p++; - if (flags & HAVE_ROTATION) rotation = * (const F2DOT14 *) p++; - if (flags & HAVE_SCALE_X) scaleX = * (const F4DOT12 *) p++; - if (flags & HAVE_SCALE_Y) scaleY = * (const F4DOT12 *) p++; - if (flags & HAVE_SKEW_X) skewX = * (const F2DOT14 *) p++; - if (flags & HAVE_SKEW_Y) skewY = * (const F2DOT14 *) p++; + if (flags & HAVE_ROTATION) rotation = ((const F4DOT12 *) p++)->to_int (); + if (flags & HAVE_SCALE_X) scaleX = ((const F6DOT10 *) p++)->to_int (); + if (flags & HAVE_SCALE_Y) scaleY = ((const F6DOT10 *) p++)->to_int (); + if (flags & HAVE_SKEW_X) skewX = ((const F4DOT12 *) p++)->to_int (); + if (flags & HAVE_SKEW_Y) skewY = ((const F4DOT12 *) p++)->to_int (); if (flags & HAVE_TCENTER_X) tCenterX = * (const FWORD *) p++; if (flags & HAVE_TCENTER_Y) tCenterY = * (const FWORD *) p++; @@ -270,19 +272,19 @@ struct VarCompositeGlyphRecord } if (flags & HAVE_ROTATION) { - rotation = rec_points[0].x / (1 << 14); + rotation = rec_points[0].x / (1 << 12); rec_points++; } if (flags & (HAVE_SCALE_X | HAVE_SCALE_Y)) { - scaleX = rec_points[0].x / (1 << 12); - scaleY = rec_points[0].y / (1 << 12); + scaleX = rec_points[0].x / (1 << 10); + scaleY = rec_points[0].y / (1 << 10); rec_points++; } if (flags & (HAVE_SKEW_X | HAVE_SKEW_Y)) { - skewX = rec_points[0].x / (1 << 14); - skewY = rec_points[0].y / (1 << 14); + skewX = rec_points[0].x / (1 << 12); + skewY = rec_points[0].y / (1 << 12); rec_points++; } if (flags & (HAVE_TCENTER_X | HAVE_TCENTER_Y)) @@ -316,9 +318,8 @@ struct VarCompositeGlyphRecord { unsigned axis_index = axis_width == 1 ? (unsigned) *p++ : (unsigned) *q++; - signed v = have_variations ? rec_points[i].x : *a++; + signed v = have_variations ? rec_points[i].x : a++->to_int (); - v += setter[axis_index]; v = hb_clamp (v, -(1<<14), (1<<14)); setter[axis_index] = v; } diff --git a/source/libs/harfbuzz/harfbuzz-src/src/OT/glyf/glyf-helpers.hh b/source/libs/harfbuzz/harfbuzz-src/src/OT/glyf/glyf-helpers.hh index 181c33d06d627ddeb6be0e31f98110aac3a6b14c..30106b2b98baaf5ad20119f8ec598fa1a6554feb 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/OT/glyf/glyf-helpers.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/OT/glyf/glyf-helpers.hh @@ -25,7 +25,7 @@ _write_loca (IteratorIn&& it, bool short_offsets, IteratorOut&& dest) | hb_map ([=, &offset] (unsigned int padded_size) { offset += padded_size; - DEBUG_MSG (SUBSET, nullptr, "loca entry offset %d", offset); + DEBUG_MSG (SUBSET, nullptr, "loca entry offset %u", offset); return offset >> right_shift; }) | hb_sink (dest) @@ -44,6 +44,20 @@ _add_head_and_set_loca_version (hb_subset_plan_t *plan, bool use_short_loca) head *head_prime = (head *) hb_blob_get_data_writable (head_prime_blob, nullptr); head_prime->indexToLocFormat = use_short_loca ? 0 : 1; + if (plan->normalized_coords) + { + head_prime->xMin = plan->head_maxp_info.xMin; + head_prime->xMax = plan->head_maxp_info.xMax; + head_prime->yMin = plan->head_maxp_info.yMin; + head_prime->yMax = plan->head_maxp_info.yMax; + + unsigned orig_flag = head_prime->flags; + if (plan->head_maxp_info.allXMinIsLsb) + orig_flag |= 1 << 1; + else + orig_flag &= ~(1 << 1); + head_prime->flags = orig_flag; + } bool success = plan->add_table (HB_OT_TAG_head, head_prime_blob); hb_blob_destroy (head_prime_blob); @@ -61,7 +75,7 @@ _add_loca_and_head (hb_subset_plan_t * plan, Iterator padded_offsets, bool use_s if (unlikely (!loca_prime_data)) return false; - DEBUG_MSG (SUBSET, nullptr, "loca entry_size %d num_offsets %d size %d", + DEBUG_MSG (SUBSET, nullptr, "loca entry_size %u num_offsets %u size %u", entry_size, num_offsets, entry_size * num_offsets); if (use_short_loca) diff --git a/source/libs/harfbuzz/harfbuzz-src/src/OT/glyf/glyf.hh b/source/libs/harfbuzz/harfbuzz-src/src/OT/glyf/glyf.hh index e6e985c38c8e7dd7d6fe91e7ddcd14c50cbea150..29328c7627b96535e2c4e8811c35502f13659170 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/OT/glyf/glyf.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/OT/glyf/glyf.hh @@ -7,6 +7,7 @@ #include "../../hb-ot-hmtx-table.hh" #include "../../hb-ot-var-gvar-table.hh" #include "../../hb-draw.hh" +#include "../../hb-paint.hh" #include "glyf-helpers.hh" #include "Glyph.hh" @@ -42,14 +43,13 @@ struct glyf bool serialize (hb_serialize_context_t *c, Iterator it, bool use_short_loca, - const hb_subset_plan_t *plan, - hb_font_t *font) + const hb_subset_plan_t *plan) { TRACE_SERIALIZE (this); unsigned init_len = c->length (); for (auto &_ : it) - if (unlikely (!_.serialize (c, use_short_loca, plan, font))) + if (unlikely (!_.serialize (c, use_short_loca, plan))) return false; /* As a special case when all glyph in the font are empty, add a zero byte @@ -75,59 +75,66 @@ struct glyf glyf *glyf_prime = c->serializer->start_embed <glyf> (); if (unlikely (!c->serializer->check_success (glyf_prime))) return_trace (false); - hb_vector_t<glyf_impl::SubsetGlyph> glyphs; - _populate_subset_glyphs (c->plan, glyphs); - hb_font_t *font = nullptr; - if (!c->plan->pinned_at_default) + if (c->plan->normalized_coords) { font = _create_font_for_instancing (c->plan); if (unlikely (!font)) return false; } - auto padded_offsets = - + hb_iter (glyphs) - | hb_map (&glyf_impl::SubsetGlyph::padded_size) - ; + hb_vector_t<unsigned> padded_offsets; + unsigned num_glyphs = c->plan->num_output_glyphs (); + if (unlikely (!padded_offsets.resize (num_glyphs))) + return false; + + hb_vector_t<glyf_impl::SubsetGlyph> glyphs; + if (!_populate_subset_glyphs (c->plan, font, glyphs)) + return false; + + if (font) + hb_font_destroy (font); + + unsigned max_offset = 0; + for (unsigned i = 0; i < num_glyphs; i++) + { + padded_offsets[i] = glyphs[i].padded_size (); + max_offset += padded_offsets[i]; + } bool use_short_loca = false; if (likely (!c->plan->force_long_loca)) - { - unsigned max_offset = + padded_offsets | hb_reduce (hb_add, 0); use_short_loca = max_offset < 0x1FFFF; - } - glyf_prime->serialize (c->serializer, glyphs.writer (), use_short_loca, c->plan, font); if (!use_short_loca) { - padded_offsets = - + hb_iter (glyphs) - | hb_map (&glyf_impl::SubsetGlyph::length) - ; + for (unsigned i = 0; i < num_glyphs; i++) + padded_offsets[i] = glyphs[i].length (); } - if (font) - { - _free_compiled_subset_glyphs (&glyphs); - hb_font_destroy (font); - } + bool result = glyf_prime->serialize (c->serializer, glyphs.writer (), use_short_loca, c->plan); + if (c->plan->normalized_coords && !c->plan->pinned_at_default) + _free_compiled_subset_glyphs (glyphs, glyphs.length - 1); + + if (!result) return false; if (unlikely (c->serializer->in_error ())) return_trace (false); + return_trace (c->serializer->check_success (glyf_impl::_add_loca_and_head (c->plan, - padded_offsets, + padded_offsets.iter (), use_short_loca))); } - void + bool _populate_subset_glyphs (const hb_subset_plan_t *plan, + hb_font_t *font, hb_vector_t<glyf_impl::SubsetGlyph> &glyphs /* OUT */) const; hb_font_t * _create_font_for_instancing (const hb_subset_plan_t *plan) const; - void _free_compiled_subset_glyphs (hb_vector_t<glyf_impl::SubsetGlyph> *glyphs) const + void _free_compiled_subset_glyphs (hb_vector_t<glyf_impl::SubsetGlyph> &glyphs, unsigned index) const { - for (auto _ : *glyphs) - _.free_compiled_bytes (); + for (unsigned i = 0; i <= index && i < glyphs.length; i++) + glyphs[i].free_compiled_bytes (); } protected: @@ -193,7 +200,7 @@ struct glyf_accelerator_t contour_point_vector_t all_points; bool phantom_only = !consumer.is_consuming_contour_points (); - if (unlikely (!glyph_for_gid (gid).get_points (font, *this, all_points, nullptr, true, true, phantom_only))) + if (unlikely (!glyph_for_gid (gid).get_points (font, *this, all_points, nullptr, nullptr, nullptr, true, true, phantom_only))) return false; if (consumer.is_consuming_contour_points ()) @@ -247,19 +254,14 @@ struct glyf_accelerator_t extents->y_bearing = 0; return; } - if (scaled) - { - extents->x_bearing = font->em_scalef_x (min_x); - extents->width = font->em_scalef_x (max_x) - extents->x_bearing; - extents->y_bearing = font->em_scalef_y (max_y); - extents->height = font->em_scalef_y (min_y) - extents->y_bearing; - } - else { extents->x_bearing = roundf (min_x); extents->width = roundf (max_x - extents->x_bearing); extents->y_bearing = roundf (max_y); extents->height = roundf (min_y - extents->y_bearing); + + if (scaled) + font->scale_glyph_extents (extents); } } @@ -337,6 +339,15 @@ struct glyf_accelerator_t return glyph_for_gid (gid).get_extents_without_var_scaled (font, *this, extents); } + bool paint_glyph (hb_font_t *font, hb_codepoint_t gid, hb_paint_funcs_t *funcs, void *data, hb_color_t foreground) const + { + funcs->push_clip_glyph (data, gid, font); + funcs->color (data, true, foreground); + funcs->pop_clip (data); + + return true; + } + const glyf_impl::Glyph glyph_for_gid (hb_codepoint_t gid, bool needs_padding_removal = false) const { @@ -385,14 +396,16 @@ struct glyf_accelerator_t }; -inline void +inline bool glyf::_populate_subset_glyphs (const hb_subset_plan_t *plan, + hb_font_t *font, hb_vector_t<glyf_impl::SubsetGlyph>& glyphs /* OUT */) const { OT::glyf_accelerator_t glyf (plan->source); unsigned num_glyphs = plan->num_output_glyphs (); - if (!glyphs.resize (num_glyphs)) return; + if (!glyphs.resize (num_glyphs)) return false; + unsigned idx = 0; for (auto p : plan->glyph_map->iter ()) { unsigned new_gid = p.second; @@ -401,7 +414,7 @@ glyf::_populate_subset_glyphs (const hb_subset_plan_t *plan, if (unlikely (new_gid == 0 && !(plan->flags & HB_SUBSET_FLAGS_NOTDEF_OUTLINE)) && - plan->pinned_at_default) + !plan->normalized_coords) subset_glyph.source_glyph = glyf_impl::Glyph (); else { @@ -414,7 +427,20 @@ glyf::_populate_subset_glyphs (const hb_subset_plan_t *plan, subset_glyph.drop_hints_bytes (); else subset_glyph.dest_start = subset_glyph.source_glyph.get_bytes (); + + if (font) + { + if (unlikely (!subset_glyph.compile_bytes_with_deltas (plan, font, glyf))) + { + // when pinned at default, only bounds are updated, thus no need to free + if (!plan->pinned_at_default && idx > 0) + _free_compiled_subset_glyphs (glyphs, idx - 1); + return false; + } + idx++; + } } + return true; } inline hb_font_t * @@ -424,10 +450,10 @@ glyf::_create_font_for_instancing (const hb_subset_plan_t *plan) const if (unlikely (font == hb_font_get_empty ())) return nullptr; hb_vector_t<hb_variation_t> vars; - if (unlikely (!vars.alloc (plan->user_axes_location->get_population ()))) + if (unlikely (!vars.alloc (plan->user_axes_location.get_population (), true))) return nullptr; - for (auto _ : *plan->user_axes_location) + for (auto _ : plan->user_axes_location) { hb_variation_t var; var.tag = _.first; @@ -436,7 +462,7 @@ glyf::_create_font_for_instancing (const hb_subset_plan_t *plan) const } #ifndef HB_NO_VAR - hb_font_set_variations (font, vars.arrayZ, plan->user_axes_location->get_population ()); + hb_font_set_variations (font, vars.arrayZ, plan->user_axes_location.get_population ()); #endif return font; } diff --git a/source/libs/harfbuzz/harfbuzz-src/src/OT/glyf/path-builder.hh b/source/libs/harfbuzz/harfbuzz-src/src/OT/glyf/path-builder.hh index 9bfc45a1a6078c35e1e025e3f08350d329498e25..e35a4dafde0d5c08a335c3320c3e20b922652cdd 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/OT/glyf/path-builder.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/OT/glyf/path-builder.hh @@ -26,22 +26,29 @@ struct path_builder_t optional_point_t lerp (optional_point_t p, float t) { return optional_point_t (x + t * (p.x - x), y + t * (p.y - y)); } - } first_oncurve, first_offcurve, last_offcurve; + } first_oncurve, first_offcurve, last_offcurve, last_offcurve2; path_builder_t (hb_font_t *font_, hb_draw_session_t &draw_session_) { font = font_; draw_session = &draw_session_; - first_oncurve = first_offcurve = last_offcurve = optional_point_t (); + first_oncurve = first_offcurve = last_offcurve = last_offcurve2 = optional_point_t (); } /* based on https://github.com/RazrFalcon/ttf-parser/blob/4f32821/src/glyf.rs#L287 See also: * https://developer.apple.com/fonts/TrueType-Reference-Manual/RM01/Chap1.html - * https://stackoverflow.com/a/20772557 */ + * https://stackoverflow.com/a/20772557 + * + * Cubic support added (incomplete). */ void consume_point (const contour_point_t &point) { bool is_on_curve = point.flag & glyf_impl::SimpleGlyph::FLAG_ON_CURVE; +#ifdef HB_NO_CUBIC_GLYF + bool is_cubic = false; +#else + bool is_cubic = !is_on_curve && (point.flag & glyf_impl::SimpleGlyph::FLAG_CUBIC); +#endif optional_point_t p (font->em_fscalef_x (point.x), font->em_fscalef_y (point.y)); if (!first_oncurve) { @@ -69,16 +76,41 @@ struct path_builder_t { if (is_on_curve) { - draw_session->quadratic_to (last_offcurve.x, last_offcurve.y, - p.x, p.y); + if (last_offcurve2) + { + draw_session->cubic_to (last_offcurve2.x, last_offcurve2.y, + last_offcurve.x, last_offcurve.y, + p.x, p.y); + last_offcurve2 = optional_point_t (); + } + else + draw_session->quadratic_to (last_offcurve.x, last_offcurve.y, + p.x, p.y); last_offcurve = optional_point_t (); } else { - optional_point_t mid = last_offcurve.lerp (p, .5f); - draw_session->quadratic_to (last_offcurve.x, last_offcurve.y, - mid.x, mid.y); - last_offcurve = p; + if (is_cubic && !last_offcurve2) + { + last_offcurve2 = last_offcurve; + last_offcurve = p; + } + else + { + optional_point_t mid = last_offcurve.lerp (p, .5f); + + if (is_cubic) + { + draw_session->cubic_to (last_offcurve2.x, last_offcurve2.y, + last_offcurve.x, last_offcurve.y, + mid.x, mid.y); + last_offcurve2 = optional_point_t (); + } + else + draw_session->quadratic_to (last_offcurve.x, last_offcurve.y, + mid.x, mid.y); + last_offcurve = p; + } } } else @@ -105,8 +137,15 @@ struct path_builder_t draw_session->quadratic_to (first_offcurve.x, first_offcurve.y, first_oncurve.x, first_oncurve.y); else if (last_offcurve && first_oncurve) - draw_session->quadratic_to (last_offcurve.x, last_offcurve.y, - first_oncurve.x, first_oncurve.y); + { + if (last_offcurve2) + draw_session->cubic_to (last_offcurve2.x, last_offcurve2.y, + last_offcurve.x, last_offcurve.y, + first_oncurve.x, first_oncurve.y); + else + draw_session->quadratic_to (last_offcurve.x, last_offcurve.y, + first_oncurve.x, first_oncurve.y); + } else if (first_oncurve) draw_session->line_to (first_oncurve.x, first_oncurve.y); else if (first_offcurve) @@ -117,7 +156,7 @@ struct path_builder_t } /* Getting ready for the next contour */ - first_oncurve = first_offcurve = last_offcurve = optional_point_t (); + first_oncurve = first_offcurve = last_offcurve = last_offcurve2 = optional_point_t (); draw_session->close_path (); } } diff --git a/source/libs/harfbuzz/harfbuzz-src/src/OT/name/name.hh b/source/libs/harfbuzz/harfbuzz-src/src/OT/name/name.hh new file mode 100644 index 0000000000000000000000000000000000000000..c1839f3b683c045a9e1cf9992d7d59b51a5aabe4 --- /dev/null +++ b/source/libs/harfbuzz/harfbuzz-src/src/OT/name/name.hh @@ -0,0 +1,589 @@ +/* + * Copyright © 2011,2012 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * 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. + * + * Google Author(s): Behdad Esfahbod + */ + +#ifndef OT_NAME_NAME_HH +#define OT_NAME_NAME_HH + +#include "../../hb-open-type.hh" +#include "../../hb-ot-name-language.hh" +#include "../../hb-aat-layout.hh" +#include "../../hb-utf.hh" + + +namespace OT { + +template <typename in_utf_t, typename out_utf_t> +inline unsigned int +hb_ot_name_convert_utf (hb_bytes_t bytes, + unsigned int *text_size /* IN/OUT */, + typename out_utf_t::codepoint_t *text /* OUT */) +{ + unsigned int src_len = bytes.length / sizeof (typename in_utf_t::codepoint_t); + const typename in_utf_t::codepoint_t *src = (const typename in_utf_t::codepoint_t *) bytes.arrayZ; + const typename in_utf_t::codepoint_t *src_end = src + src_len; + + typename out_utf_t::codepoint_t *dst = text; + + hb_codepoint_t unicode; + const hb_codepoint_t replacement = HB_BUFFER_REPLACEMENT_CODEPOINT_DEFAULT; + + if (text_size && *text_size) + { + (*text_size)--; /* Save room for NUL-termination. */ + const typename out_utf_t::codepoint_t *dst_end = text + *text_size; + + while (src < src_end && dst < dst_end) + { + const typename in_utf_t::codepoint_t *src_next = in_utf_t::next (src, src_end, &unicode, replacement); + typename out_utf_t::codepoint_t *dst_next = out_utf_t::encode (dst, dst_end, unicode); + if (dst_next == dst) + break; /* Out-of-room. */ + + dst = dst_next; + src = src_next; + } + + *text_size = dst - text; + *dst = 0; /* NUL-terminate. */ + } + + /* Accumulate length of rest. */ + unsigned int dst_len = dst - text; + while (src < src_end) + { + src = in_utf_t::next (src, src_end, &unicode, replacement); + dst_len += out_utf_t::encode_len (unicode); + } + return dst_len; +} + +#define entry_score var.u16[0] +#define entry_index var.u16[1] + + +/* + * name -- Naming + * https://docs.microsoft.com/en-us/typography/opentype/spec/name + */ +#define HB_OT_TAG_name HB_TAG('n','a','m','e') + +#define UNSUPPORTED 42 + +struct NameRecord +{ + hb_language_t language (hb_face_t *face) const + { +#ifndef HB_NO_OT_NAME_LANGUAGE + unsigned int p = platformID; + unsigned int l = languageID; + + if (p == 3) + return _hb_ot_name_language_for_ms_code (l); + + if (p == 1) + return _hb_ot_name_language_for_mac_code (l); + +#ifndef HB_NO_OT_NAME_LANGUAGE_AAT + if (p == 0) + return face->table.ltag->get_language (l); +#endif + +#endif + return HB_LANGUAGE_INVALID; + } + + uint16_t score () const + { + /* Same order as in cmap::find_best_subtable(). */ + unsigned int p = platformID; + unsigned int e = encodingID; + + /* 32-bit. */ + if (p == 3 && e == 10) return 0; + if (p == 0 && e == 6) return 1; + if (p == 0 && e == 4) return 2; + + /* 16-bit. */ + if (p == 3 && e == 1) return 3; + if (p == 0 && e == 3) return 4; + if (p == 0 && e == 2) return 5; + if (p == 0 && e == 1) return 6; + if (p == 0 && e == 0) return 7; + + /* Symbol. */ + if (p == 3 && e == 0) return 8; + + /* We treat all Mac Latin names as ASCII only. */ + if (p == 1 && e == 0) return 10; /* 10 is magic number :| */ + + return UNSUPPORTED; + } + + NameRecord* copy (hb_serialize_context_t *c, const void *base +#ifdef HB_EXPERIMENTAL_API + , const hb_hashmap_t<hb_ot_name_record_ids_t, hb_bytes_t> *name_table_overrides +#endif + ) const + { + TRACE_SERIALIZE (this); + HB_UNUSED auto snap = c->snapshot (); + auto *out = c->embed (this); + if (unlikely (!out)) return_trace (nullptr); +#ifdef HB_EXPERIMENTAL_API + hb_ot_name_record_ids_t record_ids (platformID, encodingID, languageID, nameID); + hb_bytes_t* name_bytes; + + if (name_table_overrides->has (record_ids, &name_bytes)) { + hb_bytes_t encoded_bytes = *name_bytes; + char *name_str_utf16_be = nullptr; + + if (platformID != 1) + { + unsigned text_size = hb_ot_name_convert_utf<hb_utf8_t, hb_utf16_be_t> (*name_bytes, nullptr, nullptr); + + text_size++; // needs to consider NULL terminator for use in hb_ot_name_convert_utf() + unsigned byte_len = text_size * hb_utf16_be_t::codepoint_t::static_size; + name_str_utf16_be = (char *) hb_calloc (byte_len, 1); + if (!name_str_utf16_be) + { + c->revert (snap); + return_trace (nullptr); + } + hb_ot_name_convert_utf<hb_utf8_t, hb_utf16_be_t> (*name_bytes, &text_size, + (hb_utf16_be_t::codepoint_t *) name_str_utf16_be); + + unsigned encoded_byte_len = text_size * hb_utf16_be_t::codepoint_t::static_size; + if (!encoded_byte_len || !c->check_assign (out->length, encoded_byte_len, HB_SERIALIZE_ERROR_INT_OVERFLOW)) { + c->revert (snap); + hb_free (name_str_utf16_be); + return_trace (nullptr); + } + + encoded_bytes = hb_bytes_t (name_str_utf16_be, encoded_byte_len); + } + else + { + // mac platform, copy the UTF-8 string(all ascii characters) as is + if (!c->check_assign (out->length, encoded_bytes.length, HB_SERIALIZE_ERROR_INT_OVERFLOW)) { + c->revert (snap); + return_trace (nullptr); + } + } + + out->offset = 0; + c->push (); + encoded_bytes.copy (c); + c->add_link (out->offset, c->pop_pack (), hb_serialize_context_t::Tail, 0); + hb_free (name_str_utf16_be); + } + else +#endif + { + out->offset.serialize_copy (c, offset, base, 0, hb_serialize_context_t::Tail, length); + } + return_trace (out); + } + + bool isUnicode () const + { + unsigned int p = platformID; + unsigned int e = encodingID; + + return (p == 0 || + (p == 3 && (e == 0 || e == 1 || e == 10))); + } + + static int cmp (const void *pa, const void *pb) + { + const NameRecord *a = (const NameRecord *)pa; + const NameRecord *b = (const NameRecord *)pb; + + if (a->platformID != b->platformID) + return a->platformID - b->platformID; + + if (a->encodingID != b->encodingID) + return a->encodingID - b->encodingID; + + if (a->languageID != b->languageID) + return a->languageID - b->languageID; + + if (a->nameID != b->nameID) + return a->nameID - b->nameID; + + if (a->length != b->length) + return a->length - b->length; + + return 0; + } + + bool sanitize (hb_sanitize_context_t *c, const void *base) const + { + TRACE_SANITIZE (this); + return_trace (c->check_struct (this) && offset.sanitize (c, base, length)); + } + + HBUINT16 platformID; /* Platform ID. */ + HBUINT16 encodingID; /* Platform-specific encoding ID. */ + HBUINT16 languageID; /* Language ID. */ + HBUINT16 nameID; /* Name ID. */ + HBUINT16 length; /* String length (in bytes). */ + NNOffset16To<UnsizedArrayOf<HBUINT8>> + offset; /* String offset from start of storage area (in bytes). */ + public: + DEFINE_SIZE_STATIC (12); +}; + +static int +_hb_ot_name_entry_cmp_key (const void *pa, const void *pb, bool exact) +{ + const hb_ot_name_entry_t *a = (const hb_ot_name_entry_t *) pa; + const hb_ot_name_entry_t *b = (const hb_ot_name_entry_t *) pb; + + /* Compare by name_id, then language. */ + + if (a->name_id != b->name_id) + return a->name_id - b->name_id; + + if (a->language == b->language) return 0; + if (!a->language) return -1; + if (!b->language) return +1; + + const char *astr = hb_language_to_string (a->language); + const char *bstr = hb_language_to_string (b->language); + + signed c = strcmp (astr, bstr); + + // 'a' is the user request, and 'b' is string in the font. + // If eg. user asks for "en-us" and font has "en", approve. + if (!exact && c && + hb_language_matches (b->language, a->language)) + return 0; + + return c; +} + +static int +_hb_ot_name_entry_cmp (const void *pa, const void *pb) +{ + /* Compare by name_id, then language, then score, then index. */ + + int v = _hb_ot_name_entry_cmp_key (pa, pb, true); + if (v) + return v; + + const hb_ot_name_entry_t *a = (const hb_ot_name_entry_t *) pa; + const hb_ot_name_entry_t *b = (const hb_ot_name_entry_t *) pb; + + if (a->entry_score != b->entry_score) + return a->entry_score - b->entry_score; + + if (a->entry_index != b->entry_index) + return a->entry_index - b->entry_index; + + return 0; +} + +struct name +{ + static constexpr hb_tag_t tableTag = HB_OT_TAG_name; + + unsigned int get_size () const + { return min_size + count * nameRecordZ.item_size; } + + template <typename Iterator, + hb_requires (hb_is_source_of (Iterator, const NameRecord &))> + bool serialize (hb_serialize_context_t *c, + Iterator it, + const void *src_string_pool +#ifdef HB_EXPERIMENTAL_API + , const hb_vector_t<hb_ot_name_record_ids_t>& insert_name_records + , const hb_hashmap_t<hb_ot_name_record_ids_t, hb_bytes_t> *name_table_overrides +#endif + ) + { + TRACE_SERIALIZE (this); + + if (unlikely (!c->extend_min ((*this)))) return_trace (false); + + unsigned total_count = it.len () +#ifdef HB_EXPERIMENTAL_API + + insert_name_records.length +#endif + ; + this->format = 0; + if (!c->check_assign (this->count, total_count, HB_SERIALIZE_ERROR_INT_OVERFLOW)) + return false; + + NameRecord *name_records = (NameRecord *) hb_calloc (total_count, NameRecord::static_size); + if (unlikely (!name_records)) return_trace (false); + + hb_array_t<NameRecord> records (name_records, total_count); + + for (const NameRecord& record : it) + { + hb_memcpy (name_records, &record, NameRecord::static_size); + name_records++; + } + +#ifdef HB_EXPERIMENTAL_API + for (unsigned i = 0; i < insert_name_records.length; i++) + { + const hb_ot_name_record_ids_t& ids = insert_name_records[i]; + NameRecord record; + record.platformID = ids.platform_id; + record.encodingID = ids.encoding_id; + record.languageID = ids.language_id; + record.nameID = ids.name_id; + record.length = 0; // handled in NameRecord copy() + record.offset = 0; + memcpy (name_records, &record, NameRecord::static_size); + name_records++; + } +#endif + + records.qsort (); + + c->copy_all (records, + src_string_pool +#ifdef HB_EXPERIMENTAL_API + , name_table_overrides +#endif + ); + hb_free (records.arrayZ); + + + if (unlikely (c->ran_out_of_room ())) return_trace (false); + + this->stringOffset = c->length (); + + return_trace (true); + } + + bool subset (hb_subset_context_t *c) const + { + TRACE_SUBSET (this); + + name *name_prime = c->serializer->start_embed<name> (); + if (unlikely (!name_prime)) return_trace (false); + +#ifdef HB_EXPERIMENTAL_API + const hb_hashmap_t<hb_ot_name_record_ids_t, hb_bytes_t> *name_table_overrides = + &c->plan->name_table_overrides; +#endif + + auto it = + + nameRecordZ.as_array (count) + | hb_filter (c->plan->name_ids, &NameRecord::nameID) + | hb_filter (c->plan->name_languages, &NameRecord::languageID) + | hb_filter ([&] (const NameRecord& namerecord) { + return + (c->plan->flags & HB_SUBSET_FLAGS_NAME_LEGACY) + || namerecord.isUnicode (); + }) +#ifdef HB_EXPERIMENTAL_API + | hb_filter ([&] (const NameRecord& namerecord) { + if (name_table_overrides->is_empty ()) + return true; + hb_ot_name_record_ids_t rec_ids (namerecord.platformID, + namerecord.encodingID, + namerecord.languageID, + namerecord.nameID); + + hb_bytes_t *p; + if (name_table_overrides->has (rec_ids, &p) && + (*p).length == 0) + return false; + return true; + }) +#endif + ; + +#ifdef HB_EXPERIMENTAL_API + hb_hashmap_t<hb_ot_name_record_ids_t, unsigned> retained_name_record_ids; + for (const NameRecord& rec : it) + { + hb_ot_name_record_ids_t rec_ids (rec.platformID, + rec.encodingID, + rec.languageID, + rec.nameID); + retained_name_record_ids.set (rec_ids, 1); + } + + hb_vector_t<hb_ot_name_record_ids_t> insert_name_records; + if (!name_table_overrides->is_empty ()) + { + if (unlikely (!insert_name_records.alloc (name_table_overrides->get_population (), true))) + return_trace (false); + for (const auto& record_ids : name_table_overrides->keys ()) + { + if (name_table_overrides->get (record_ids).length == 0) + continue; + if (retained_name_record_ids.has (record_ids)) + continue; + insert_name_records.push (record_ids); + } + } +#endif + + return (name_prime->serialize (c->serializer, it, + std::addressof (this + stringOffset) +#ifdef HB_EXPERIMENTAL_API + , insert_name_records + , name_table_overrides +#endif + )); + } + + bool sanitize_records (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + const void *string_pool = (this+stringOffset).arrayZ; + return_trace (nameRecordZ.sanitize (c, count, string_pool)); + } + + bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + return_trace (c->check_struct (this) && + likely (format == 0 || format == 1) && + c->check_array (nameRecordZ.arrayZ, count) && + c->check_range (this, stringOffset) && + sanitize_records (c)); + } + + struct accelerator_t + { + accelerator_t (hb_face_t *face) + { + this->table = hb_sanitize_context_t ().reference_table<name> (face); + assert (this->table.get_length () >= this->table->stringOffset); + this->pool = (const char *) (const void *) (this->table+this->table->stringOffset); + this->pool_len = this->table.get_length () - this->table->stringOffset; + const hb_array_t<const NameRecord> all_names (this->table->nameRecordZ.arrayZ, + this->table->count); + + this->names.alloc (all_names.length, true); + + for (unsigned int i = 0; i < all_names.length; i++) + { + hb_ot_name_entry_t *entry = this->names.push (); + + entry->name_id = all_names[i].nameID; + entry->language = all_names[i].language (face); + entry->entry_score = all_names[i].score (); + entry->entry_index = i; + } + + this->names.qsort (_hb_ot_name_entry_cmp); + /* Walk and pick best only for each name_id,language pair, + * while dropping unsupported encodings. */ + unsigned int j = 0; + for (unsigned int i = 0; i < this->names.length; i++) + { + if (this->names[i].entry_score == UNSUPPORTED || + this->names[i].language == HB_LANGUAGE_INVALID) + continue; + if (i && + this->names[i - 1].name_id == this->names[i].name_id && + this->names[i - 1].language == this->names[i].language) + continue; + this->names[j++] = this->names[i]; + } + this->names.resize (j); + } + ~accelerator_t () + { + this->table.destroy (); + } + + int get_index (hb_ot_name_id_t name_id, + hb_language_t language, + unsigned int *width=nullptr) const + { + const hb_ot_name_entry_t key = {name_id, {0}, language}; + const hb_ot_name_entry_t *entry = hb_bsearch (key, (const hb_ot_name_entry_t *) this->names, + this->names.length, + sizeof (hb_ot_name_entry_t), + _hb_ot_name_entry_cmp_key, + true); + + if (!entry) + { + entry = hb_bsearch (key, (const hb_ot_name_entry_t *) this->names, + this->names.length, + sizeof (hb_ot_name_entry_t), + _hb_ot_name_entry_cmp_key, + false); + } + + if (!entry) + return -1; + + if (width) + *width = entry->entry_score < 10 ? 2 : 1; + + return entry->entry_index; + } + + hb_bytes_t get_name (unsigned int idx) const + { + const hb_array_t<const NameRecord> all_names (table->nameRecordZ.arrayZ, table->count); + const NameRecord &record = all_names[idx]; + const hb_bytes_t string_pool (pool, pool_len); + return string_pool.sub_array (record.offset, record.length); + } + + private: + const char *pool; + unsigned int pool_len; + public: + hb_blob_ptr_t<name> table; + hb_vector_t<hb_ot_name_entry_t> names; + }; + + public: + /* We only implement format 0 for now. */ + HBUINT16 format; /* Format selector (=0/1). */ + HBUINT16 count; /* Number of name records. */ + NNOffset16To<UnsizedArrayOf<HBUINT8>> + stringOffset; /* Offset to start of string storage (from start of table). */ + UnsizedArrayOf<NameRecord> + nameRecordZ; /* The name records where count is the number of records. */ + public: + DEFINE_SIZE_ARRAY (6, nameRecordZ); +}; + +#undef entry_index +#undef entry_score + +struct name_accelerator_t : name::accelerator_t { + name_accelerator_t (hb_face_t *face) : name::accelerator_t (face) {} +}; + +} /* namespace OT */ + + +#endif /* OT_NAME_NAME_HH */ diff --git a/source/libs/harfbuzz/harfbuzz-src/src/check-libstdc++.py b/source/libs/harfbuzz/harfbuzz-src/src/check-libstdc++.py index 85b7265312f339767ccc411265b29495df0a8d6d..e70d5f80b23d4a8961aebb009fe4421f89b7aa01 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/check-libstdc++.py +++ b/source/libs/harfbuzz/harfbuzz-src/src/check-libstdc++.py @@ -19,7 +19,7 @@ stat = 0 tested = False # harfbuzz-icu links to libstdc++ because icu does. -for soname in ['harfbuzz', 'harfbuzz-subset', 'harfbuzz-gobject']: +for soname in ['harfbuzz', 'harfbuzz-subset', 'harfbuzz-gobject', 'harfbuzz-cairo']: for suffix in ['so', 'dylib']: so = os.path.join (libs, 'lib%s.%s' % (soname, suffix)) if not os.path.exists (so): continue diff --git a/source/libs/harfbuzz/harfbuzz-src/src/check-symbols.py b/source/libs/harfbuzz/harfbuzz-src/src/check-symbols.py index d0b8bd3c82dd1f3abe3797104545059594906d65..91bf8b0671a350efffee1e8f7fed7edd706084bb 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/check-symbols.py +++ b/source/libs/harfbuzz/harfbuzz-src/src/check-symbols.py @@ -22,7 +22,7 @@ cxxfilt = shutil.which ('c++filt') tested = False stat = 0 -for soname in ['harfbuzz', 'harfbuzz-subset', 'harfbuzz-icu', 'harfbuzz-gobject']: +for soname in ['harfbuzz', 'harfbuzz-subset', 'harfbuzz-icu', 'harfbuzz-gobject', 'harfbuzz-cairo']: for suffix in ['so', 'dylib']: so = os.path.join (builddir, libs, 'lib%s.%s' % (soname, suffix)) if not os.path.exists (so): continue diff --git a/source/libs/harfbuzz/harfbuzz-src/src/graph/graph.hh b/source/libs/harfbuzz/harfbuzz-src/src/graph/graph.hh index dc5b6a36fef231a64a6f2b409890053c842c9b8d..38ca5db09618644c2d5b620718834bd5fcd47339 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/graph/graph.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/graph/graph.hh @@ -123,7 +123,7 @@ struct graph_t while (a || b) { DEBUG_MSG (SUBSET_REPACK, nullptr, - " 0x%x %s 0x%x", *a, (*a == *b) ? "==" : "!=", *b); + " 0x%x %s 0x%x", (unsigned) *a, (*a == *b) ? "==" : "!=", (unsigned) *b); a++; b++; } @@ -700,6 +700,9 @@ struct graph_t } } + if (in_error ()) + return false; + if (!made_changes) return false; @@ -833,7 +836,11 @@ struct graph_t if (index_map.has (node_idx)) return; - index_map.set (node_idx, duplicate (node_idx)); + unsigned clone_idx = duplicate (node_idx); + if (!check_success (clone_idx != (unsigned) -1)) + return; + + index_map.set (node_idx, clone_idx); for (const auto& l : object (node_idx).all_links ()) { duplicate_subgraph (l.objidx, index_map); } @@ -918,12 +925,12 @@ struct graph_t { // Can't duplicate this node, doing so would orphan the original one as all remaining links // to child are from parent. - DEBUG_MSG (SUBSET_REPACK, nullptr, " Not duplicating %d => %d", + DEBUG_MSG (SUBSET_REPACK, nullptr, " Not duplicating %u => %u", parent_idx, child_idx); return -1; } - DEBUG_MSG (SUBSET_REPACK, nullptr, " Duplicating %d => %d", + DEBUG_MSG (SUBSET_REPACK, nullptr, " Duplicating %u => %u", parent_idx, child_idx); unsigned clone_idx = duplicate (child_idx); @@ -981,7 +988,7 @@ struct graph_t */ bool raise_childrens_priority (unsigned parent_idx) { - DEBUG_MSG (SUBSET_REPACK, nullptr, " Raising priority of all children of %d", + DEBUG_MSG (SUBSET_REPACK, nullptr, " Raising priority of all children of %u", parent_idx); // This operation doesn't change ordering until a sort is run, so no need // to invalidate positions. It does not change graph structure so no need diff --git a/source/libs/harfbuzz/harfbuzz-src/src/graph/serialize.hh b/source/libs/harfbuzz/harfbuzz-src/src/graph/serialize.hh index d03a61bd19e4b39aaf4679f88b9939cff7591f69..040fd1de5fd5be0368ae750ac9aa39dc5184657f 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/graph/serialize.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/graph/serialize.hh @@ -153,8 +153,8 @@ void print_overflows (graph_t& graph, const auto& child = graph.vertices_[o.child]; DEBUG_MSG (SUBSET_REPACK, nullptr, " overflow from " - "%4d (%4d in, %4d out, space %2d) => " - "%4d (%4d in, %4d out, space %2d)", + "%4u (%4u in, %4u out, space %2u) => " + "%4u (%4u in, %4u out, space %2u)", o.parent, parent.incoming_edges (), parent.obj.real_links.length + parent.obj.virtual_links.length, @@ -165,7 +165,7 @@ void print_overflows (graph_t& graph, graph.space_for (o.child)); } if (overflows.length > 10) { - DEBUG_MSG (SUBSET_REPACK, nullptr, " ... plus %d more overflows.", overflows.length - 10); + DEBUG_MSG (SUBSET_REPACK, nullptr, " ... plus %u more overflows.", overflows.length - 10); } } diff --git a/source/libs/harfbuzz/harfbuzz-src/src/harfbuzz-cairo.pc.in b/source/libs/harfbuzz/harfbuzz-src/src/harfbuzz-cairo.pc.in new file mode 100644 index 0000000000000000000000000000000000000000..df97ff151288631fe205436c17d7de7bd1f59e99 --- /dev/null +++ b/source/libs/harfbuzz/harfbuzz-src/src/harfbuzz-cairo.pc.in @@ -0,0 +1,12 @@ +prefix=%prefix% +exec_prefix=%exec_prefix% +libdir=%libdir% +includedir=%includedir% + +Name: harfbuzz cairo integration +Description: HarfBuzz cairo integration +Version: %VERSION% + +Requires: harfbuzz = %VERSION% +Libs: -L${libdir} -lharfbuzz-cairo +Cflags: -I${includedir}/harfbuzz diff --git a/source/libs/harfbuzz/harfbuzz-src/src/harfbuzz-subset.cc b/source/libs/harfbuzz/harfbuzz-src/src/harfbuzz-subset.cc index a43485e6fbae881c36affb384e4ec520d788b93f..c0e23b3eb820420ca41da5ae92a88d164a9e857a 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/harfbuzz-subset.cc +++ b/source/libs/harfbuzz/harfbuzz-src/src/harfbuzz-subset.cc @@ -7,6 +7,7 @@ #include "hb-buffer.cc" #include "hb-common.cc" #include "hb-draw.cc" +#include "hb-face-builder.cc" #include "hb-face.cc" #include "hb-fallback-shape.cc" #include "hb-font.cc" @@ -40,6 +41,9 @@ #include "hb-ot-shaper-vowel-constraints.cc" #include "hb-ot-tag.cc" #include "hb-ot-var.cc" +#include "hb-outline.cc" +#include "hb-paint-extents.cc" +#include "hb-paint.cc" #include "hb-set.cc" #include "hb-shape-plan.cc" #include "hb-shape.cc" @@ -50,6 +54,7 @@ #include "hb-subset-cff1.cc" #include "hb-subset-cff2.cc" #include "hb-subset-input.cc" +#include "hb-subset-instancer-solver.cc" #include "hb-subset-plan.cc" #include "hb-subset-repacker.cc" #include "hb-subset.cc" diff --git a/source/libs/harfbuzz/harfbuzz-src/src/harfbuzz.cc b/source/libs/harfbuzz/harfbuzz-src/src/harfbuzz.cc index fe4e21db07ff41a9bcad8f6286a00b995662ee3d..d7e8a93f393256915271bf4361f30fd69939c4ba 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/harfbuzz.cc +++ b/source/libs/harfbuzz/harfbuzz-src/src/harfbuzz.cc @@ -8,6 +8,7 @@ #include "hb-coretext.cc" #include "hb-directwrite.cc" #include "hb-draw.cc" +#include "hb-face-builder.cc" #include "hb-face.cc" #include "hb-fallback-shape.cc" #include "hb-font.cc" @@ -45,6 +46,9 @@ #include "hb-ot-shaper-vowel-constraints.cc" #include "hb-ot-tag.cc" #include "hb-ot-var.cc" +#include "hb-outline.cc" +#include "hb-paint-extents.cc" +#include "hb-paint.cc" #include "hb-set.cc" #include "hb-shape-plan.cc" #include "hb-shape.cc" diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-common.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-common.hh index 6cbed826921dd60ebadb34d7448d7ba6d401e921..efbb623efcaf918d24f515c32ed4e9433ac4e1ee 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-common.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-common.hh @@ -28,6 +28,7 @@ #define HB_AAT_LAYOUT_COMMON_HH #include "hb-aat-layout.hh" +#include "hb-aat-map.hh" #include "hb-open-type.hh" namespace OT { @@ -39,6 +40,43 @@ namespace AAT { using namespace OT; +struct ankr; + +struct hb_aat_apply_context_t : + hb_dispatch_context_t<hb_aat_apply_context_t, bool, HB_DEBUG_APPLY> +{ + const char *get_name () { return "APPLY"; } + template <typename T> + return_t dispatch (const T &obj) { return obj.apply (this); } + static return_t default_return_value () { return false; } + bool stop_sublookup_iteration (return_t r) const { return r; } + + const hb_ot_shape_plan_t *plan; + hb_font_t *font; + hb_face_t *face; + hb_buffer_t *buffer; + hb_sanitize_context_t sanitizer; + const ankr *ankr_table; + const OT::GDEF *gdef_table; + const hb_sorted_vector_t<hb_aat_map_t::range_flags_t> *range_flags = nullptr; + hb_mask_t subtable_flags = 0; + + /* Unused. For debug tracing only. */ + unsigned int lookup_index; + + HB_INTERNAL hb_aat_apply_context_t (const hb_ot_shape_plan_t *plan_, + hb_font_t *font_, + hb_buffer_t *buffer_, + hb_blob_t *blob = const_cast<hb_blob_t *> (&Null (hb_blob_t))); + + HB_INTERNAL ~hb_aat_apply_context_t (); + + HB_INTERNAL void set_ankr_table (const AAT::ankr *ankr_table_); + + void set_lookup_index (unsigned int i) { lookup_index = i; } +}; + + /* * Lookup Table */ @@ -740,16 +778,44 @@ struct StateTableDriver num_glyphs (face_->get_num_glyphs ()) {} template <typename context_t> - void drive (context_t *c) + void drive (context_t *c, hb_aat_apply_context_t *ac) { if (!c->in_place) buffer->clear_output (); int state = StateTableT::STATE_START_OF_TEXT; + // If there's only one range, we already checked the flag. + auto *last_range = ac->range_flags && (ac->range_flags->length > 1) ? &(*ac->range_flags)[0] : nullptr; for (buffer->idx = 0; buffer->successful;) { + /* This block is copied in NoncontextualSubtable::apply. Keep in sync. */ + if (last_range) + { + auto *range = last_range; + if (buffer->idx < buffer->len) + { + unsigned cluster = buffer->cur().cluster; + while (cluster < range->cluster_first) + range--; + while (cluster > range->cluster_last) + range++; + + + last_range = range; + } + if (!(range->flags & ac->subtable_flags)) + { + if (buffer->idx == buffer->len || unlikely (!buffer->successful)) + break; + + state = StateTableT::STATE_START_OF_TEXT; + (void) buffer->next_glyph (); + continue; + } + } + unsigned int klass = buffer->idx < buffer->len ? - machine.get_class (buffer->info[buffer->idx].codepoint, num_glyphs) : + machine.get_class (buffer->cur().codepoint, num_glyphs) : (unsigned) StateTableT::CLASS_END_OF_TEXT; DEBUG_MSG (APPLY, nullptr, "c%u at %u", klass, buffer->idx); const EntryT &entry = machine.get_entry (state, klass); @@ -845,41 +911,6 @@ struct StateTableDriver }; -struct ankr; - -struct hb_aat_apply_context_t : - hb_dispatch_context_t<hb_aat_apply_context_t, bool, HB_DEBUG_APPLY> -{ - const char *get_name () { return "APPLY"; } - template <typename T> - return_t dispatch (const T &obj) { return obj.apply (this); } - static return_t default_return_value () { return false; } - bool stop_sublookup_iteration (return_t r) const { return r; } - - const hb_ot_shape_plan_t *plan; - hb_font_t *font; - hb_face_t *face; - hb_buffer_t *buffer; - hb_sanitize_context_t sanitizer; - const ankr *ankr_table; - const OT::GDEF *gdef_table; - - /* Unused. For debug tracing only. */ - unsigned int lookup_index; - - HB_INTERNAL hb_aat_apply_context_t (const hb_ot_shape_plan_t *plan_, - hb_font_t *font_, - hb_buffer_t *buffer_, - hb_blob_t *blob = const_cast<hb_blob_t *> (&Null (hb_blob_t))); - - HB_INTERNAL ~hb_aat_apply_context_t (); - - HB_INTERNAL void set_ankr_table (const AAT::ankr *ankr_table_); - - void set_lookup_index (unsigned int i) { lookup_index = i; } -}; - - } /* namespace AAT */ diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-kerx-table.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-kerx-table.hh index 995492cd5a703b5f41c182f1fded5efbebbd50d7..35d7c84c2bcbe3f50d460197c53c3f9debcec9f2 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-kerx-table.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-kerx-table.hh @@ -350,7 +350,7 @@ struct KerxSubTableFormat1 driver_context_t dc (this, c); StateTableDriver<Types, EntryData> driver (machine, c->buffer, c->font->face); - driver.drive (&dc); + driver.drive (&dc, c); return_trace (true); } @@ -594,7 +594,7 @@ struct KerxSubTableFormat4 driver_context_t dc (this, c); StateTableDriver<Types, EntryData> driver (machine, c->buffer, c->font->face); - driver.drive (&dc); + driver.drive (&dc, c); return_trace (true); } @@ -869,6 +869,8 @@ struct KerxTable bool apply (AAT::hb_aat_apply_context_t *c) const { + c->buffer->unsafe_to_concat (); + typedef typename T::SubTable SubTable; bool ret = false; @@ -889,7 +891,7 @@ struct KerxTable reverse = bool (st->u.header.coverage & st->u.header.Backwards) != HB_DIRECTION_IS_BACKWARD (c->buffer->props.direction); - if (!c->buffer->message (c->font, "start subtable %d", c->lookup_index)) + if (!c->buffer->message (c->font, "start subtable %u", c->lookup_index)) goto skip; if (!seenCrossStream && @@ -921,7 +923,7 @@ struct KerxTable if (reverse) c->buffer->reverse (); - (void) c->buffer->message (c->font, "end subtable %d", c->lookup_index); + (void) c->buffer->message (c->font, "end subtable %u", c->lookup_index); skip: st = &StructAfter<SubTable> (*st); diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-morx-table.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-morx-table.hh index 8b9190d0be399dd21569d71783e89daff4ff1012..f41ecc197fb8c1518804595e66f98c91e2ea3948 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-morx-table.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-morx-table.hh @@ -169,7 +169,7 @@ struct RearrangementSubtable driver_context_t dc (this); StateTableDriver<Types, EntryData> driver (machine, c->buffer, c->face); - driver.drive (&dc); + driver.drive (&dc, c); return_trace (dc.ret); } @@ -325,7 +325,7 @@ struct ContextualSubtable driver_context_t dc (this, c); StateTableDriver<Types, EntryData> driver (machine, c->buffer, c->face); - driver.drive (&dc); + driver.drive (&dc, c); return_trace (dc.ret); } @@ -525,7 +525,7 @@ struct LigatureSubtable if (unlikely (!componentData.sanitize (&c->sanitizer))) break; ligature_idx += componentData; - DEBUG_MSG (APPLY, nullptr, "Action store %u last %u", + DEBUG_MSG (APPLY, nullptr, "Action store %d last %d", bool (action & LigActionStore), bool (action & LigActionLast)); if (action & (LigActionStore | LigActionLast)) @@ -577,7 +577,7 @@ struct LigatureSubtable driver_context_t dc (this, c); StateTableDriver<Types, EntryData> driver (machine, c->buffer, c->face); - driver.drive (&dc); + driver.drive (&dc, c); return_trace (dc.ret); } @@ -618,8 +618,27 @@ struct NoncontextualSubtable hb_glyph_info_t *info = c->buffer->info; unsigned int count = c->buffer->len; + // If there's only one range, we already checked the flag. + auto *last_range = c->range_flags && (c->range_flags->length > 1) ? &(*c->range_flags)[0] : nullptr; for (unsigned int i = 0; i < count; i++) { + /* This block copied from StateTableDriver::drive. Keep in sync. */ + if (last_range) + { + auto *range = last_range; + { + unsigned cluster = info[i].cluster; + while (cluster < range->cluster_first) + range--; + while (cluster > range->cluster_last) + range++; + + last_range = range; + } + if (!(range->flags & c->subtable_flags)) + continue; + } + const HBGlyphID16 *replacement = substitute.get_value (info[i].codepoint, num_glyphs); if (replacement) { @@ -820,7 +839,7 @@ struct InsertionSubtable driver_context_t dc (this, c); StateTableDriver<Types, EntryData> driver (machine, c->buffer, c->face); - driver.drive (&dc); + driver.drive (&dc, c); return_trace (dc.ret); } @@ -968,7 +987,7 @@ struct Chain // Check whether this type/setting pair was requested in the map, and if so, apply its flags. // (The search here only looks at the type and setting fields of feature_info_t.) hb_aat_map_builder_t::feature_info_t info = { type, setting, false, 0 }; - if (map->features.bsearch (info)) + if (map->current_features.bsearch (info)) { flags &= feature.disableFlags; flags |= feature.enableFlags; @@ -994,8 +1013,7 @@ struct Chain return flags; } - void apply (hb_aat_apply_context_t *c, - hb_mask_t flags) const + void apply (hb_aat_apply_context_t *c) const { const ChainSubtable<Types> *subtable = &StructAfter<ChainSubtable<Types>> (featureZ.as_array (featureCount)); unsigned int count = subtableCount; @@ -1003,8 +1021,10 @@ struct Chain { bool reverse; - if (!(subtable->subFeatureFlags & flags)) + if (hb_none (hb_iter (c->range_flags) | + hb_map ([&subtable] (const hb_aat_map_t::range_flags_t _) -> bool { return subtable->subFeatureFlags & (_.flags); }))) goto skip; + c->subtable_flags = subtable->subFeatureFlags; if (!(subtable->get_coverage() & ChainSubtable<Types>::AllDirections) && HB_DIRECTION_IS_VERTICAL (c->buffer->props.direction) != @@ -1043,7 +1063,7 @@ struct Chain bool (subtable->get_coverage () & ChainSubtable<Types>::Backwards) != HB_DIRECTION_IS_BACKWARD (c->buffer->props.direction); - if (!c->buffer->message (c->font, "start chainsubtable %d", c->lookup_index)) + if (!c->buffer->message (c->font, "start chainsubtable %u", c->lookup_index)) goto skip; if (reverse) @@ -1054,7 +1074,7 @@ struct Chain if (reverse) c->buffer->reverse (); - (void) c->buffer->message (c->font, "end chainsubtable %d", c->lookup_index); + (void) c->buffer->message (c->font, "end chainsubtable %u", c->lookup_index); if (unlikely (!c->buffer->successful)) return; @@ -1120,22 +1140,31 @@ struct mortmorx { const Chain<Types> *chain = &firstChain; unsigned int count = chainCount; + if (unlikely (!map->chain_flags.resize (count))) + return; for (unsigned int i = 0; i < count; i++) { - map->chain_flags.push (chain->compile_flags (mapper)); + map->chain_flags[i].push (hb_aat_map_t::range_flags_t {chain->compile_flags (mapper), + mapper->range_first, + mapper->range_last}); chain = &StructAfter<Chain<Types>> (*chain); } } - void apply (hb_aat_apply_context_t *c) const + void apply (hb_aat_apply_context_t *c, + const hb_aat_map_t &map) const { if (unlikely (!c->buffer->successful)) return; + + c->buffer->unsafe_to_concat (); + c->set_lookup_index (0); const Chain<Types> *chain = &firstChain; unsigned int count = chainCount; for (unsigned int i = 0; i < count; i++) { - chain->apply (c, c->plan->aat_map.chain_flags[i]); + c->range_flags = &map.chain_flags[i]; + chain->apply (c); if (unlikely (!c->buffer->successful)) return; chain = &StructAfter<Chain<Types>> (*chain); } diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout.cc b/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout.cc index 78427b0d5a7a76fa43c0bca5603b0190399c9794..c9147ff73b18bab476035b50e75a9a171de2b89b 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout.cc +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout.cc @@ -244,15 +244,23 @@ hb_aat_layout_has_substitution (hb_face_t *face) void hb_aat_layout_substitute (const hb_ot_shape_plan_t *plan, hb_font_t *font, - hb_buffer_t *buffer) + hb_buffer_t *buffer, + const hb_feature_t *features, + unsigned num_features) { + hb_aat_map_builder_t builder (font->face, plan->props); + for (unsigned i = 0; i < num_features; i++) + builder.add_feature (features[i]); + hb_aat_map_t map; + builder.compile (map); + hb_blob_t *morx_blob = font->face->table.morx.get_blob (); const AAT::morx& morx = *morx_blob->as<AAT::morx> (); if (morx.has_data ()) { AAT::hb_aat_apply_context_t c (plan, font, buffer, morx_blob); if (!buffer->message (font, "start table morx")) return; - morx.apply (&c); + morx.apply (&c, map); (void) buffer->message (font, "end table morx"); return; } @@ -263,7 +271,7 @@ hb_aat_layout_substitute (const hb_ot_shape_plan_t *plan, { AAT::hb_aat_apply_context_t c (plan, font, buffer, mort_blob); if (!buffer->message (font, "start table mort")) return; - mort.apply (&c); + mort.apply (&c, map); (void) buffer->message (font, "end table mort"); return; } diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout.hh index 5e4e3bda154574d1cafec2a46cb8f10682ff2cd6..15c382aa92dd0a7a73d106d5657f25a9dfd0ecf6 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout.hh @@ -53,7 +53,9 @@ hb_aat_layout_compile_map (const hb_aat_map_builder_t *mapper, HB_INTERNAL void hb_aat_layout_substitute (const hb_ot_shape_plan_t *plan, hb_font_t *font, - hb_buffer_t *buffer); + hb_buffer_t *buffer, + const hb_feature_t *features, + unsigned num_features); HB_INTERNAL void hb_aat_layout_zero_width_deleted_glyphs (hb_buffer_t *buffer); diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-map.cc b/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-map.cc index 2c38c3502968937d8f61e37114a6d2ae0643c574..5bdb8004f2f82602eee83e93f4b2015f77dfbb29 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-map.cc +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-map.cc @@ -36,27 +36,29 @@ #include "hb-aat-layout-feat-table.hh" -void hb_aat_map_builder_t::add_feature (hb_tag_t tag, unsigned value) +void hb_aat_map_builder_t::add_feature (const hb_feature_t &feature) { if (!face->table.feat->has_data ()) return; - if (tag == HB_TAG ('a','a','l','t')) + if (feature.tag == HB_TAG ('a','a','l','t')) { if (!face->table.feat->exposes_feature (HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_ALTERNATIVES)) return; - feature_info_t *info = features.push(); - info->type = HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_ALTERNATIVES; - info->setting = (hb_aat_layout_feature_selector_t) value; - info->seq = features.length; - info->is_exclusive = true; + feature_range_t *range = features.push(); + range->start = feature.start; + range->end = feature.end; + range->info.type = HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_ALTERNATIVES; + range->info.setting = (hb_aat_layout_feature_selector_t) feature.value; + range->info.seq = features.length; + range->info.is_exclusive = true; return; } - const hb_aat_feature_mapping_t *mapping = hb_aat_layout_find_feature_mapping (tag); + const hb_aat_feature_mapping_t *mapping = hb_aat_layout_find_feature_mapping (feature.tag); if (!mapping) return; - const AAT::FeatureName* feature = &face->table.feat->get_feature (mapping->aatFeatureType); - if (!feature->has_data ()) + const AAT::FeatureName* feature_name = &face->table.feat->get_feature (mapping->aatFeatureType); + if (!feature_name->has_data ()) { /* Special case: Chain::compile_flags will fall back to the deprecated version of * small-caps if necessary, so we need to check for that possibility. @@ -64,38 +66,106 @@ void hb_aat_map_builder_t::add_feature (hb_tag_t tag, unsigned value) if (mapping->aatFeatureType == HB_AAT_LAYOUT_FEATURE_TYPE_LOWER_CASE && mapping->selectorToEnable == HB_AAT_LAYOUT_FEATURE_SELECTOR_LOWER_CASE_SMALL_CAPS) { - feature = &face->table.feat->get_feature (HB_AAT_LAYOUT_FEATURE_TYPE_LETTER_CASE); - if (!feature->has_data ()) return; + feature_name = &face->table.feat->get_feature (HB_AAT_LAYOUT_FEATURE_TYPE_LETTER_CASE); + if (!feature_name->has_data ()) return; } else return; } - feature_info_t *info = features.push(); - info->type = mapping->aatFeatureType; - info->setting = value ? mapping->selectorToEnable : mapping->selectorToDisable; - info->seq = features.length; - info->is_exclusive = feature->is_exclusive (); + feature_range_t *range = features.push(); + range->start = feature.start; + range->end = feature.end; + range->info.type = mapping->aatFeatureType; + range->info.setting = feature.value ? mapping->selectorToEnable : mapping->selectorToDisable; + range->info.seq = features.length; + range->info.is_exclusive = feature_name->is_exclusive (); } void hb_aat_map_builder_t::compile (hb_aat_map_t &m) { - /* Sort features and merge duplicates */ - if (features.length) + /* Compute active features per range, and compile each. */ + + /* Sort features by start/end events. */ + hb_vector_t<feature_event_t> feature_events; + for (unsigned int i = 0; i < features.length; i++) + { + auto &feature = features[i]; + + if (features[i].start == features[i].end) + continue; + + feature_event_t *event; + + event = feature_events.push (); + event->index = features[i].start; + event->start = true; + event->feature = feature.info; + + event = feature_events.push (); + event->index = features[i].end; + event->start = false; + event->feature = feature.info; + } + feature_events.qsort (); + /* Add a strategic final event. */ + { + feature_info_t feature; + feature.seq = features.length + 1; + + feature_event_t *event = feature_events.push (); + event->index = -1; /* This value does magic. */ + event->start = false; + event->feature = feature; + } + + /* Scan events and save features for each range. */ + hb_sorted_vector_t<feature_info_t> active_features; + unsigned int last_index = 0; + for (unsigned int i = 0; i < feature_events.length; i++) { - features.qsort (); - unsigned int j = 0; - for (unsigned int i = 1; i < features.length; i++) - if (features[i].type != features[j].type || - /* Nonexclusive feature selectors come in even/odd pairs to turn a setting on/off - * respectively, so we mask out the low-order bit when checking for "duplicates" - * (selectors referring to the same feature setting) here. */ - (!features[i].is_exclusive && ((features[i].setting & ~1) != (features[j].setting & ~1)))) - features[++j] = features[i]; - features.shrink (j + 1); + feature_event_t *event = &feature_events[i]; + + if (event->index != last_index) + { + /* Save a snapshot of active features and the range. */ + + /* Sort features and merge duplicates */ + current_features = active_features; + range_first = last_index; + range_last = event->index - 1; + if (current_features.length) + { + current_features.qsort (); + unsigned int j = 0; + for (unsigned int i = 1; i < current_features.length; i++) + if (current_features[i].type != current_features[j].type || + /* Nonexclusive feature selectors come in even/odd pairs to turn a setting on/off + * respectively, so we mask out the low-order bit when checking for "duplicates" + * (selectors referring to the same feature setting) here. */ + (!current_features[i].is_exclusive && ((current_features[i].setting & ~1) != (current_features[j].setting & ~1)))) + current_features[++j] = current_features[i]; + current_features.shrink (j + 1); + } + + hb_aat_layout_compile_map (this, &m); + + last_index = event->index; + } + + if (event->start) + { + active_features.push (event->feature); + } else { + feature_info_t *feature = active_features.lsearch (event->feature); + if (feature) + active_features.remove_ordered (feature - active_features.arrayZ); + } } - hb_aat_layout_compile_map (this, &m); + for (auto &chain_flags : m.chain_flags) + // With our above setup this value is one less than desired; adjust it. + chain_flags.tail().cluster_last = HB_FEATURE_GLOBAL_END; } diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-map.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-map.hh index d0ee7d672c917cef0a1fb0d9726990257940c516..cb22ffee42d283dcacbbec09a52a009780cd2c8a 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-map.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-map.hh @@ -35,16 +35,15 @@ struct hb_aat_map_t friend struct hb_aat_map_builder_t; public: - - void init () + struct range_flags_t { - hb_memset (this, 0, sizeof (*this)); - chain_flags.init (); - } - void fini () { chain_flags.fini (); } + hb_mask_t flags; + unsigned cluster_first; + unsigned cluster_last; // end - 1 + }; public: - hb_vector_t<hb_mask_t> chain_flags; + hb_vector_t<hb_sorted_vector_t<range_flags_t>> chain_flags; }; struct hb_aat_map_builder_t @@ -56,7 +55,7 @@ struct hb_aat_map_builder_t face (face_), props (props_) {} - HB_INTERNAL void add_feature (hb_tag_t tag, unsigned int value=1); + HB_INTERNAL void add_feature (const hb_feature_t &feature); HB_INTERNAL void compile (hb_aat_map_t &m); @@ -78,7 +77,7 @@ struct hb_aat_map_builder_t return (a->seq < b->seq ? -1 : a->seq > b->seq ? 1 : 0); } - /* compares type & setting only, not is_exclusive flag or seq number */ + /* compares type & setting only */ int cmp (const feature_info_t& f) const { return (f.type != type) ? (f.type < type ? -1 : 1) : @@ -86,12 +85,38 @@ struct hb_aat_map_builder_t } }; + struct feature_range_t + { + feature_info_t info; + unsigned start; + unsigned end; + }; + + private: + struct feature_event_t + { + unsigned int index; + bool start; + feature_info_t feature; + + HB_INTERNAL static int cmp (const void *pa, const void *pb) { + const feature_event_t *a = (const feature_event_t *) pa; + const feature_event_t *b = (const feature_event_t *) pb; + return a->index < b->index ? -1 : a->index > b->index ? 1 : + a->start < b->start ? -1 : a->start > b->start ? 1 : + feature_info_t::cmp (&a->feature, &b->feature); + } + }; + public: hb_face_t *face; hb_segment_properties_t props; public: - hb_sorted_vector_t<feature_info_t> features; + hb_sorted_vector_t<feature_range_t> features; + hb_sorted_vector_t<feature_info_t> current_features; + unsigned range_first = HB_FEATURE_GLOBAL_START; + unsigned range_last = HB_FEATURE_GLOBAL_END; }; diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-algs.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-algs.hh index d85a4afe102e1053c8786f99d8235ab5149c6517..e98645e3e3b7204a5d52deaa1d98d466c4ef0ce1 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-algs.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-algs.hh @@ -875,7 +875,7 @@ hb_in_ranges (T u, T lo1, T hi1, Ts... ds) static inline bool hb_unsigned_mul_overflows (unsigned int count, unsigned int size, unsigned *result = nullptr) { -#if (defined(__GNUC__) && (__GNUC__ >= 4)) || defined(__clang__) +#if (defined(__GNUC__) && (__GNUC__ >= 4)) || (defined(__clang__) && (__clang_major__ >= 8)) unsigned stack_result; if (!result) result = &stack_result; diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-array.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-array.hh index 17562bc3366846e46d4c301c692be1d4cd3ea14f..e82c081535e4f239213c18d95ed88f6532483520 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-array.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-array.hh @@ -304,6 +304,9 @@ struct hb_array_t : hb_iter_with_fallback_t<hb_array_t<Type>, Type&> unsigned int backwards_length = 0; }; template <typename T> inline hb_array_t<T> +hb_array () +{ return hb_array_t<T> (); } +template <typename T> inline hb_array_t<T> hb_array (T *array, unsigned int length) { return hb_array_t<T> (array, length); } template <typename T, unsigned int length_> inline hb_array_t<T> diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-atomic.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-atomic.hh index 14c6fb3264ebc491a62dee0ad609b137babb8544..a6283de1408aa5f4e30f02fdd5f3bfd16dd3e6e6 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-atomic.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-atomic.hh @@ -84,11 +84,11 @@ _hb_atomic_ptr_impl_cmplexch (const void **P, const void *O_, const void *N) #define _hb_memory_r_barrier() std::atomic_thread_fence(std::memory_order_acquire) #define _hb_memory_w_barrier() std::atomic_thread_fence(std::memory_order_release) -#define hb_atomic_int_impl_add(AI, V) (reinterpret_cast<std::atomic<int> *> (AI)->fetch_add ((V), std::memory_order_acq_rel)) -#define hb_atomic_int_impl_set_relaxed(AI, V) (reinterpret_cast<std::atomic<int> *> (AI)->store ((V), std::memory_order_relaxed)) -#define hb_atomic_int_impl_set(AI, V) (reinterpret_cast<std::atomic<int> *> (AI)->store ((V), std::memory_order_release)) -#define hb_atomic_int_impl_get_relaxed(AI) (reinterpret_cast<std::atomic<int> const *> (AI)->load (std::memory_order_relaxed)) -#define hb_atomic_int_impl_get(AI) (reinterpret_cast<std::atomic<int> const *> (AI)->load (std::memory_order_acquire)) +#define hb_atomic_int_impl_add(AI, V) (reinterpret_cast<std::atomic<std::decay<decltype (*(AI))>::type> *> (AI)->fetch_add ((V), std::memory_order_acq_rel)) +#define hb_atomic_int_impl_set_relaxed(AI, V) (reinterpret_cast<std::atomic<std::decay<decltype (*(AI))>::type> *> (AI)->store ((V), std::memory_order_relaxed)) +#define hb_atomic_int_impl_set(AI, V) (reinterpret_cast<std::atomic<std::decay<decltype (*(AI))>::type> *> (AI)->store ((V), std::memory_order_release)) +#define hb_atomic_int_impl_get_relaxed(AI) (reinterpret_cast<std::atomic<std::decay<decltype (*(AI))>::type> const *> (AI)->load (std::memory_order_relaxed)) +#define hb_atomic_int_impl_get(AI) (reinterpret_cast<std::atomic<std::decay<decltype (*(AI))>::type> const *> (AI)->load (std::memory_order_acquire)) #define hb_atomic_ptr_impl_set_relaxed(P, V) (reinterpret_cast<std::atomic<void*> *> (P)->store ((V), std::memory_order_relaxed)) #define hb_atomic_ptr_impl_get_relaxed(P) (reinterpret_cast<std::atomic<void*> const *> (P)->load (std::memory_order_relaxed)) @@ -111,10 +111,15 @@ _hb_atomic_ptr_impl_cmplexch (const void **P, const void *O_, const void *N) #endif +/* This should never be disabled, even under HB_NO_MT. + * except that MSVC gives me an internal compiler error, so disabled there. + * + * https://github.com/harfbuzz/harfbuzz/pull/4119 + */ #ifndef _hb_compiler_memory_r_barrier -/* This we always use std::atomic for; and should never be disabled... - * except that MSVC gives me an internal compiler error on it. */ -#if !defined(_MSC_VER) +#if defined(__ATOMIC_ACQUIRE) // gcc-like +#define _hb_compiler_memory_r_barrier() asm volatile("": : :"memory") +#elif !defined(_MSC_VER) #include <atomic> #define _hb_compiler_memory_r_barrier() std::atomic_signal_fence (std::memory_order_acquire) #else @@ -145,15 +150,35 @@ _hb_atomic_ptr_impl_cmplexch (const void **P, const void *O_, const void *N) #endif #ifndef hb_atomic_int_impl_set inline void hb_atomic_int_impl_set (int *AI, int v) { _hb_memory_w_barrier (); *AI = v; } +inline void hb_atomic_int_impl_set (short *AI, short v) { _hb_memory_w_barrier (); *AI = v; } #endif #ifndef hb_atomic_int_impl_get inline int hb_atomic_int_impl_get (const int *AI) { int v = *AI; _hb_memory_r_barrier (); return v; } +inline short hb_atomic_int_impl_get (const short *AI) { short v = *AI; _hb_memory_r_barrier (); return v; } #endif #ifndef hb_atomic_ptr_impl_get inline void *hb_atomic_ptr_impl_get (void ** const P) { void *v = *P; _hb_memory_r_barrier (); return v; } #endif +struct hb_atomic_short_t +{ + hb_atomic_short_t () = default; + constexpr hb_atomic_short_t (short v) : v (v) {} + + hb_atomic_short_t& operator = (short v_) { set_relaxed (v_); return *this; } + operator short () const { return get_relaxed (); } + + void set_relaxed (short v_) { hb_atomic_int_impl_set_relaxed (&v, v_); } + void set_release (short v_) { hb_atomic_int_impl_set (&v, v_); } + short get_relaxed () const { return hb_atomic_int_impl_get_relaxed (&v); } + short get_acquire () const { return hb_atomic_int_impl_get (&v); } + short inc () { return hb_atomic_int_impl_add (&v, 1); } + short dec () { return hb_atomic_int_impl_add (&v, -1); } + + short v = 0; +}; + struct hb_atomic_int_t { hb_atomic_int_t () = default; diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-bit-page.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-bit-page.hh index 11987054f85a690d6ea19e5a84a082d864b56bfa..9b027ac59054fded7fd4fe722c494e93df146881 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-bit-page.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-bit-page.hh @@ -34,14 +34,24 @@ /* Compiler-assisted vectorization. */ /* Type behaving similar to vectorized vars defined using __attribute__((vector_size(...))), - * basically a fixed-size bitset. */ + * basically a fixed-size bitset. We can't use the compiler type because hb_vector_t cannot + * guarantee alignment requirements. */ template <typename elt_t, unsigned int byte_size> struct hb_vector_size_t { elt_t& operator [] (unsigned int i) { return v[i]; } const elt_t& operator [] (unsigned int i) const { return v[i]; } - void clear (unsigned char v = 0) { hb_memset (this, v, sizeof (*this)); } + void init0 () + { + for (unsigned int i = 0; i < ARRAY_LENGTH (v); i++) + v[i] = 0; + } + void init1 () + { + for (unsigned int i = 0; i < ARRAY_LENGTH (v); i++) + v[i] = (elt_t) -1; + } template <typename Op> hb_vector_size_t process (const Op& op) const @@ -79,10 +89,10 @@ struct hb_vector_size_t struct hb_bit_page_t { - void init0 () { v.clear (); } - void init1 () { v.clear (0xFF); } + void init0 () { v.init0 (); } + void init1 () { v.init1 (); } - constexpr unsigned len () const + static inline constexpr unsigned len () { return ARRAY_LENGTH_CONST (v); } bool is_empty () const @@ -300,10 +310,10 @@ struct hb_bit_page_t static constexpr hb_codepoint_t INVALID = HB_SET_VALUE_INVALID; typedef unsigned long long elt_t; - static constexpr unsigned PAGE_BITS = 512; - static_assert ((PAGE_BITS & ((PAGE_BITS) - 1)) == 0, ""); - static constexpr unsigned PAGE_BITS_LOG_2 = 9; + static constexpr unsigned PAGE_BITS_LOG_2 = 9; // 512 bits + static constexpr unsigned PAGE_BITS = 1 << PAGE_BITS_LOG_2; static_assert (1 << PAGE_BITS_LOG_2 == PAGE_BITS, ""); + static_assert ((PAGE_BITS & ((PAGE_BITS) - 1)) == 0, ""); static constexpr unsigned PAGE_BITMASK = PAGE_BITS - 1; static unsigned int elt_get_min (const elt_t &elt) { return hb_ctz (elt); } diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-bit-set-invertible.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-bit-set-invertible.hh index ff8aecc60cc43b86ce886b6980f0f48d7c3cc945..1eb1b1c2092007bf697932dd8c3610c431e0c7b8 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-bit-set-invertible.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-bit-set-invertible.hh @@ -74,6 +74,11 @@ struct hb_bit_set_invertible_t inverted = !inverted; } + bool is_inverted () const + { + return inverted; + } + bool is_empty () const { hb_codepoint_t v = INVALID; diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-bit-set.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-bit-set.hh index 8de6e037fbdf98eff53a077bacf79553f43797af..475b07b810bae2528d1522cccc3a6ebea7a80d36 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-bit-set.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-bit-set.hh @@ -38,7 +38,7 @@ struct hb_bit_set_t hb_bit_set_t () = default; ~hb_bit_set_t () = default; - hb_bit_set_t (const hb_bit_set_t& other) : hb_bit_set_t () { set (other); } + hb_bit_set_t (const hb_bit_set_t& other) : hb_bit_set_t () { set (other, true); } hb_bit_set_t ( hb_bit_set_t&& other) : hb_bit_set_t () { hb_swap (*this, other); } hb_bit_set_t& operator= (const hb_bit_set_t& other) { set (other); return *this; } hb_bit_set_t& operator= (hb_bit_set_t&& other) { hb_swap (*this, other); return *this; } @@ -85,12 +85,16 @@ struct hb_bit_set_t void err () { if (successful) successful = false; } /* TODO Remove */ bool in_error () const { return !successful; } - bool resize (unsigned int count, bool clear = true) + bool resize (unsigned int count, bool clear = true, bool exact_size = false) { if (unlikely (!successful)) return false; - if (unlikely (!pages.resize (count, clear) || !page_map.resize (count, clear))) + + if (pages.length == 0 && count == 1) + exact_size = true; // Most sets are small and local + + if (unlikely (!pages.resize (count, clear, exact_size) || !page_map.resize (count, clear, exact_size))) { - pages.resize (page_map.length); + pages.resize (page_map.length, clear, exact_size); successful = false; return false; } @@ -346,11 +350,11 @@ struct hb_bit_set_t hb_codepoint_t c = first - 1; return next (&c) && c <= last; } - void set (const hb_bit_set_t &other) + void set (const hb_bit_set_t &other, bool exact_size = false) { if (unlikely (!successful)) return; unsigned int count = other.pages.length; - if (unlikely (!resize (count, false))) + if (unlikely (!resize (count, false, exact_size))) return; population = other.population; @@ -422,7 +426,7 @@ struct hb_bit_set_t private: bool allocate_compact_workspace (hb_vector_t<unsigned>& workspace) { - if (unlikely (!workspace.resize (pages.length))) + if (unlikely (!workspace.resize_exact (pages.length))) { successful = false; return false; diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-blob.cc b/source/libs/harfbuzz/harfbuzz-src/src/hb-blob.cc index f0fda1fa4d1a78e0bd55388825179f02bb455647..265effba0379a75dab1ec81cbecde3cae899945b 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-blob.cc +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-blob.cc @@ -676,7 +676,7 @@ fail_without_close: wchar_t * wchar_file_name = (wchar_t *) hb_malloc (sizeof (wchar_t) * size); if (unlikely (!wchar_file_name)) goto fail_without_close; mbstowcs (wchar_file_name, file_name, size); -#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) +#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) { CREATEFILE2_EXTENDED_PARAMETERS ceparams = { 0 }; ceparams.dwSize = sizeof(CREATEFILE2_EXTENDED_PARAMETERS); @@ -697,7 +697,7 @@ fail_without_close: if (unlikely (fd == INVALID_HANDLE_VALUE)) goto fail_without_close; -#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) +#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) { LARGE_INTEGER length; GetFileSizeEx (fd, &length); @@ -710,7 +710,7 @@ fail_without_close: #endif if (unlikely (!file->mapping)) goto fail; -#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) +#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) file->contents = (char *) MapViewOfFileFromApp (file->mapping, FILE_MAP_READ, 0, 0); #else file->contents = (char *) MapViewOfFile (file->mapping, FILE_MAP_READ, 0, 0, 0); diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-json.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-json.hh index 993bb1f6981515d1298e02530fd673aa029d4af8..004a9fb8b701361cec9e651d9c311f0ef4f17337 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-json.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-json.hh @@ -35,34 +35,34 @@ #line 33 "hb-buffer-deserialize-json.hh" static const unsigned char _deserialize_json_trans_keys[] = { 0u, 0u, 9u, 123u, 9u, 34u, 97u, 117u, 120u, 121u, 34u, 34u, 9u, 58u, 9u, 57u, - 48u, 57u, 9u, 125u, 9u, 125u, 9u, 125u, 34u, 34u, 9u, 58u, 9u, 57u, 48u, 57u, - 9u, 125u, 9u, 125u, 108u, 108u, 34u, 34u, 9u, 58u, 9u, 57u, 9u, 125u, 9u, 125u, - 120u, 121u, 34u, 34u, 9u, 58u, 9u, 57u, 48u, 57u, 9u, 125u, 9u, 125u, 34u, 34u, - 9u, 58u, 9u, 57u, 48u, 57u, 9u, 125u, 9u, 125u, 108u, 108u, 34u, 34u, 9u, 58u, - 9u, 57u, 9u, 125u, 9u, 125u, 34u, 34u, 9u, 58u, 9u, 57u, 34u, 92u, 9u, 125u, - 34u, 92u, 9u, 125u, 9u, 125u, 34u, 34u, 9u, 58u, 9u, 57u, 9u, 125u, 9u, 93u, + 48u, 57u, 9u, 125u, 9u, 125u, 9u, 93u, 9u, 125u, 34u, 34u, 9u, 58u, 9u, 57u, + 48u, 57u, 9u, 125u, 9u, 125u, 108u, 108u, 34u, 34u, 9u, 58u, 9u, 57u, 9u, 125u, + 9u, 125u, 120u, 121u, 34u, 34u, 9u, 58u, 9u, 57u, 48u, 57u, 9u, 125u, 9u, 125u, + 34u, 34u, 9u, 58u, 9u, 57u, 48u, 57u, 9u, 125u, 9u, 125u, 108u, 108u, 34u, 34u, + 9u, 58u, 9u, 57u, 9u, 125u, 9u, 125u, 34u, 34u, 9u, 58u, 9u, 57u, 34u, 92u, + 9u, 125u, 34u, 92u, 9u, 125u, 9u, 125u, 34u, 34u, 9u, 58u, 9u, 57u, 9u, 125u, 9u, 123u, 0u, 0u, 0 }; static const char _deserialize_json_key_spans[] = { 0, 115, 26, 21, 2, 1, 50, 49, - 10, 117, 117, 117, 1, 50, 49, 10, - 117, 117, 1, 1, 50, 49, 117, 117, - 2, 1, 50, 49, 10, 117, 117, 1, - 50, 49, 10, 117, 117, 1, 1, 50, - 49, 117, 117, 1, 50, 49, 59, 117, - 59, 117, 117, 1, 50, 49, 117, 85, + 10, 117, 117, 85, 117, 1, 50, 49, + 10, 117, 117, 1, 1, 50, 49, 117, + 117, 2, 1, 50, 49, 10, 117, 117, + 1, 50, 49, 10, 117, 117, 1, 1, + 50, 49, 117, 117, 1, 50, 49, 59, + 117, 59, 117, 117, 1, 50, 49, 117, 115, 0 }; static const short _deserialize_json_index_offsets[] = { 0, 0, 116, 143, 165, 168, 170, 221, - 271, 282, 400, 518, 636, 638, 689, 739, - 750, 868, 986, 988, 990, 1041, 1091, 1209, - 1327, 1330, 1332, 1383, 1433, 1444, 1562, 1680, - 1682, 1733, 1783, 1794, 1912, 2030, 2032, 2034, - 2085, 2135, 2253, 2371, 2373, 2424, 2474, 2534, - 2652, 2712, 2830, 2948, 2950, 3001, 3051, 3169, + 271, 282, 400, 518, 604, 722, 724, 775, + 825, 836, 954, 1072, 1074, 1076, 1127, 1177, + 1295, 1413, 1416, 1418, 1469, 1519, 1530, 1648, + 1766, 1768, 1819, 1869, 1880, 1998, 2116, 2118, + 2120, 2171, 2221, 2339, 2457, 2459, 2510, 2560, + 2620, 2738, 2798, 2916, 3034, 3036, 3087, 3137, 3255, 3371 }; @@ -131,57 +131,54 @@ static const char _deserialize_json_indicies[] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 24, 1, 20, - 20, 20, 20, 20, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 20, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 21, 1, 1, 1, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, - 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 24, 1, 25, + 25, 25, 25, 25, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 25, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 26, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 22, 1, 25, 1, 25, - 25, 25, 25, 25, 1, 1, 1, 1, + 1, 1, 1, 27, 1, 20, 20, 20, + 20, 20, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 25, 1, + 1, 1, 1, 1, 20, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 21, 1, 1, 1, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 26, 1, 26, 26, 26, 26, 26, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 26, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 27, 1, - 1, 28, 29, 29, 29, 29, 29, 29, - 29, 29, 29, 1, 30, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 1, 32, - 32, 32, 32, 32, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 32, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 33, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 22, 1, 28, 1, 28, 28, 28, + 28, 28, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 28, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 29, 1, + 29, 29, 29, 29, 29, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 29, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 30, 1, 1, 31, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 1, 33, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 1, 35, 35, 35, + 35, 35, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 35, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 34, 1, 32, 32, 32, - 32, 32, 1, 1, 1, 1, 1, 1, + 36, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 32, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 33, 1, 1, 1, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -189,291 +186,294 @@ static const char _deserialize_json_indicies[] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 37, 1, 35, 35, 35, 35, 35, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 34, 1, 35, 1, 36, 1, 36, - 36, 36, 36, 36, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 35, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 36, 1, + 1, 1, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 37, 1, 37, 37, 37, 37, 37, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 37, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 38, 39, 39, 39, 39, 39, 39, - 39, 39, 39, 1, 40, 40, 40, 40, - 40, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 40, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 41, + 1, 1, 1, 1, 1, 1, 1, 37, + 1, 38, 1, 39, 1, 39, 39, 39, + 39, 39, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 39, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 40, 1, + 40, 40, 40, 40, 40, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 40, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 41, + 42, 42, 42, 42, 42, 42, 42, 42, + 42, 1, 43, 43, 43, 43, 43, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 43, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 44, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 42, 1, 40, 40, 40, 40, 40, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 40, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 41, 1, 1, - 1, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 45, 1, + 43, 43, 43, 43, 43, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 43, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 44, 1, 1, 1, 46, + 46, 46, 46, 46, 46, 46, 46, 46, + 46, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 42, 1, - 44, 45, 1, 46, 1, 46, 46, 46, - 46, 46, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 46, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 47, 1, - 47, 47, 47, 47, 47, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 47, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 48, 1, 1, 49, - 50, 50, 50, 50, 50, 50, 50, 50, - 50, 1, 51, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 1, 53, 53, 53, - 53, 53, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 53, 1, 1, 1, + 1, 1, 1, 1, 45, 1, 47, 48, + 1, 49, 1, 49, 49, 49, 49, 49, 1, 1, 1, 1, 1, 1, 1, 1, - 54, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 49, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 50, 1, 50, 50, + 50, 50, 50, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 50, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 51, 1, 1, 52, 53, 53, + 53, 53, 53, 53, 53, 53, 53, 1, + 54, 55, 55, 55, 55, 55, 55, 55, + 55, 55, 1, 56, 56, 56, 56, 56, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 56, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 57, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 55, 1, 53, 53, 53, 53, 53, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 53, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 54, 1, - 1, 1, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 58, + 1, 56, 56, 56, 56, 56, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 55, - 1, 56, 1, 56, 56, 56, 56, 56, + 56, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 57, 1, 1, 1, + 55, 55, 55, 55, 55, 55, 55, 55, + 55, 55, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 56, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 57, 1, 57, 57, - 57, 57, 57, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 57, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 58, 1, 1, 59, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 1, - 61, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 1, 63, 63, 63, 63, 63, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 58, 1, 59, + 1, 59, 59, 59, 59, 59, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 63, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 64, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 59, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 60, 1, 60, 60, 60, 60, + 60, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 60, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 61, 1, 1, 62, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 1, 64, 65, + 65, 65, 65, 65, 65, 65, 65, 65, + 1, 66, 66, 66, 66, 66, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 66, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 67, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 65, - 1, 63, 63, 63, 63, 63, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 63, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 64, 1, 1, 1, - 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 68, 1, 66, + 66, 66, 66, 66, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 66, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 65, 1, 66, - 1, 67, 1, 67, 67, 67, 67, 67, + 1, 1, 67, 1, 1, 1, 65, 65, + 65, 65, 65, 65, 65, 65, 65, 65, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 67, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 68, 1, 68, 68, - 68, 68, 68, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 68, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 69, 70, 70, - 70, 70, 70, 70, 70, 70, 70, 1, - 71, 71, 71, 71, 71, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 71, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 72, 1, 1, 1, 1, + 1, 1, 1, 68, 1, 69, 1, 70, + 1, 70, 70, 70, 70, 70, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 70, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 71, 1, 71, 71, 71, 71, + 71, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 71, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 72, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 1, 74, 74, + 74, 74, 74, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 74, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 75, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 73, 1, 71, 71, - 71, 71, 71, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 71, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 72, 1, 1, 1, 74, 74, 74, - 74, 74, 74, 74, 74, 74, 74, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 76, 1, 74, 74, 74, 74, + 74, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 74, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 75, + 1, 1, 1, 77, 77, 77, 77, 77, + 77, 77, 77, 77, 77, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 73, 1, 75, 1, 75, 75, - 75, 75, 75, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 75, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 76, - 1, 76, 76, 76, 76, 76, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 76, 1, 77, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 78, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 1, 81, 80, 80, 80, 80, - 80, 80, 80, 80, 80, 80, 80, 80, - 80, 80, 80, 80, 80, 80, 80, 80, - 80, 80, 80, 80, 80, 80, 80, 80, - 80, 80, 80, 80, 80, 80, 80, 80, - 80, 80, 80, 80, 80, 80, 80, 80, - 80, 80, 80, 80, 80, 80, 80, 80, - 80, 80, 80, 80, 80, 82, 80, 83, - 83, 83, 83, 83, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 83, 1, + 76, 1, 78, 1, 78, 78, 78, 78, + 78, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 84, 1, 1, 1, 1, 1, + 1, 1, 1, 78, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 79, 1, 79, + 79, 79, 79, 79, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 79, 1, + 80, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 81, 82, + 82, 82, 82, 82, 82, 82, 82, 82, + 1, 84, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 85, 83, 86, 86, 86, + 86, 86, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 86, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 87, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 85, 1, 80, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 88, 1, 83, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 80, - 1, 86, 86, 86, 86, 86, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 86, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 87, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 83, 1, 89, + 89, 89, 89, 89, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 89, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 90, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 88, 1, 86, - 86, 86, 86, 86, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 86, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 87, 1, 1, 1, 89, 89, - 89, 89, 89, 89, 89, 89, 89, 89, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 91, 1, 89, 89, 89, + 89, 89, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 89, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 90, 1, 1, 1, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 88, 1, 90, 1, 90, - 90, 90, 90, 90, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 90, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 91, 1, 91, 91, 91, 91, 91, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 91, 1, 93, 1, 93, 93, 93, + 93, 93, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 91, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 93, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 92, 93, 93, 93, 93, 93, 93, - 93, 93, 93, 1, 86, 86, 86, 86, - 86, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 86, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 87, - 1, 1, 1, 94, 94, 94, 94, 94, + 1, 1, 1, 1, 1, 1, 94, 1, 94, 94, 94, 94, 94, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 94, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 95, + 96, 96, 96, 96, 96, 96, 96, 96, + 96, 1, 89, 89, 89, 89, 89, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 89, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 90, 1, 1, + 1, 97, 97, 97, 97, 97, 97, 97, + 97, 97, 97, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 88, 1, 95, 95, 95, 95, 95, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 95, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 96, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 97, 1, + 1, 1, 1, 1, 1, 1, 91, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, @@ -492,39 +492,39 @@ static const char _deserialize_json_indicies[] = { }; static const char _deserialize_json_trans_targs[] = { - 1, 0, 2, 2, 3, 4, 18, 24, - 37, 43, 51, 5, 12, 6, 7, 8, - 9, 11, 9, 11, 10, 2, 55, 10, - 55, 13, 14, 15, 16, 17, 16, 17, - 10, 2, 55, 19, 20, 21, 22, 23, - 10, 2, 55, 23, 25, 31, 26, 27, - 28, 29, 30, 29, 30, 10, 2, 55, - 32, 33, 34, 35, 36, 35, 36, 10, - 2, 55, 38, 39, 40, 41, 42, 10, - 2, 55, 42, 44, 45, 46, 49, 50, - 46, 47, 48, 10, 2, 55, 10, 2, - 55, 50, 52, 53, 49, 54, 54, 55, - 56, 57 + 1, 0, 2, 2, 3, 4, 19, 25, + 38, 44, 52, 5, 13, 6, 7, 8, + 9, 12, 9, 12, 10, 2, 11, 10, + 11, 11, 56, 57, 14, 15, 16, 17, + 18, 17, 18, 10, 2, 11, 20, 21, + 22, 23, 24, 10, 2, 11, 24, 26, + 32, 27, 28, 29, 30, 31, 30, 31, + 10, 2, 11, 33, 34, 35, 36, 37, + 36, 37, 10, 2, 11, 39, 40, 41, + 42, 43, 10, 2, 11, 43, 45, 46, + 47, 50, 51, 47, 48, 49, 10, 2, + 11, 10, 2, 11, 51, 53, 54, 50, + 55, 55 }; static const char _deserialize_json_trans_actions[] = { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 0, 0, 3, 3, 4, 0, - 5, 0, 0, 2, 2, 2, 0, 0, - 6, 6, 7, 0, 0, 0, 2, 2, - 8, 8, 9, 0, 0, 0, 0, 0, - 2, 2, 2, 0, 0, 10, 10, 11, - 0, 0, 2, 2, 2, 0, 0, 12, - 12, 13, 0, 0, 0, 2, 2, 14, - 14, 15, 0, 0, 0, 2, 16, 16, - 0, 17, 0, 18, 18, 19, 20, 20, - 21, 17, 0, 0, 22, 22, 23, 0, - 0, 0 + 5, 0, 0, 0, 0, 0, 2, 2, + 2, 0, 0, 6, 6, 7, 0, 0, + 0, 2, 2, 8, 8, 9, 0, 0, + 0, 0, 0, 2, 2, 2, 0, 0, + 10, 10, 11, 0, 0, 2, 2, 2, + 0, 0, 12, 12, 13, 0, 0, 0, + 2, 2, 14, 14, 15, 0, 0, 0, + 2, 16, 16, 0, 17, 0, 18, 18, + 19, 20, 20, 21, 17, 0, 0, 22, + 22, 23 }; static const int deserialize_json_start = 1; -static const int deserialize_json_first_final = 55; +static const int deserialize_json_first_final = 56; static const int deserialize_json_error = 0; static const int deserialize_json_en_main = 1; @@ -548,21 +548,19 @@ _hb_buffer_deserialize_json (hb_buffer_t *buffer, while (p < pe && ISSPACE (*p)) p++; if (p < pe && *p == (buffer->len ? ',' : '[')) - { *end_ptr = ++p; - } const char *tok = nullptr; int cs; hb_glyph_info_t info = {0}; hb_glyph_position_t pos = {0}; -#line 554 "hb-buffer-deserialize-json.hh" +#line 552 "hb-buffer-deserialize-json.hh" { cs = deserialize_json_start; } -#line 557 "hb-buffer-deserialize-json.hh" +#line 555 "hb-buffer-deserialize-json.hh" { int _slen; int _trans; @@ -774,7 +772,7 @@ _resume: *end_ptr = p; } break; -#line 735 "hb-buffer-deserialize-json.hh" +#line 733 "hb-buffer-deserialize-json.hh" } _again: @@ -786,7 +784,7 @@ _again: _out: {} } -#line 139 "hb-buffer-deserialize-json.rl" +#line 137 "hb-buffer-deserialize-json.rl" *end_ptr = p; diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-json.rl b/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-json.rl index d6fbfe89cdbfb7ae2478a23c03ab8f9c21c9597a..b12dd0f1a1e6bb10a457d753123b11a37b5b5ce7 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-json.rl +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-json.rl @@ -106,7 +106,7 @@ item = @add_item ; -main := space* item (comma item)* space* (','|']')?; +main := space* item (comma item)* space* (','|']'); }%% @@ -125,9 +125,7 @@ _hb_buffer_deserialize_json (hb_buffer_t *buffer, while (p < pe && ISSPACE (*p)) p++; if (p < pe && *p == (buffer->len ? ',' : '[')) - { *end_ptr = ++p; - } const char *tok = nullptr; int cs; diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-text-glyphs.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-text-glyphs.hh new file mode 100644 index 0000000000000000000000000000000000000000..ea81273b31ca3b086b2425df0046ff3b524893fd --- /dev/null +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-text-glyphs.hh @@ -0,0 +1,692 @@ + +#line 1 "hb-buffer-deserialize-text-glyphs.rl" +/* + * Copyright © 2013 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * 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. + * + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_BUFFER_DESERIALIZE_TEXT_GLYPHS_HH +#define HB_BUFFER_DESERIALIZE_TEXT_GLYPHS_HH + +#include "hb.hh" + + +#line 36 "hb-buffer-deserialize-text-glyphs.hh" +static const unsigned char _deserialize_text_glyphs_trans_keys[] = { + 0u, 0u, 48u, 57u, 45u, 57u, 48u, 57u, 45u, 57u, 48u, 57u, 48u, 57u, 45u, 57u, + 48u, 57u, 44u, 44u, 45u, 57u, 48u, 57u, 44u, 57u, 43u, 124u, 9u, 124u, 9u, 124u, + 9u, 124u, 9u, 124u, 9u, 124u, 9u, 124u, 9u, 124u, 9u, 124u, 9u, 124u, 9u, 124u, + 9u, 124u, 9u, 124u, 9u, 124u, 0 +}; + +static const char _deserialize_text_glyphs_key_spans[] = { + 0, 10, 13, 10, 13, 10, 10, 13, + 10, 1, 13, 10, 14, 82, 116, 116, + 116, 116, 116, 116, 116, 116, 116, 116, + 116, 116, 116 +}; + +static const short _deserialize_text_glyphs_index_offsets[] = { + 0, 0, 11, 25, 36, 50, 61, 72, + 86, 97, 99, 113, 124, 139, 222, 339, + 456, 573, 690, 807, 924, 1041, 1158, 1275, + 1392, 1509, 1626 +}; + +static const char _deserialize_text_glyphs_indicies[] = { + 0, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 1, 3, 1, 1, 4, + 5, 5, 5, 5, 5, 5, 5, 5, + 5, 1, 6, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 1, 8, 1, 1, + 9, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 1, 11, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 1, 13, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 1, 15, 1, 1, 16, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 1, 18, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 1, 20, 1, 21, 1, 1, 22, + 23, 23, 23, 23, 23, 23, 23, 23, + 23, 1, 24, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 1, 20, 1, 1, + 1, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 1, 26, 26, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 26, 1, + 1, 26, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 26, 26, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 26, 1, 28, + 28, 28, 28, 28, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 28, 27, + 27, 29, 27, 27, 27, 27, 27, 27, + 27, 30, 1, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 31, 27, 27, 32, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 33, 1, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 28, 27, 34, 34, 34, 34, + 34, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 34, 26, 26, 35, 26, + 26, 26, 26, 26, 26, 26, 36, 1, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 37, 26, 26, 38, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 39, + 1, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 40, + 26, 41, 41, 41, 41, 41, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 41, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 42, 1, 43, 43, + 43, 43, 43, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 43, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 44, 1, 41, 41, 41, 41, 41, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 41, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 42, 1, + 46, 46, 46, 46, 46, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 46, + 1, 1, 47, 1, 1, 1, 1, 1, + 1, 1, 1, 48, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 49, 1, 50, 50, 50, + 50, 50, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 50, 1, 1, 51, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 52, 1, 50, 50, 50, 50, 50, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 50, 1, 1, 51, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 52, 1, 46, + 46, 46, 46, 46, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 46, 1, + 1, 47, 1, 1, 1, 1, 1, 1, + 1, 1, 48, 1, 1, 1, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 49, 1, 53, 53, 53, 53, + 53, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 53, 1, 1, 54, 1, + 1, 1, 1, 1, 1, 1, 55, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 56, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 57, + 1, 58, 58, 58, 58, 58, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 58, 1, 1, 59, 1, 1, 1, 1, + 1, 1, 1, 60, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 61, 1, 58, 58, + 58, 58, 58, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 58, 1, 1, + 59, 1, 1, 1, 1, 1, 1, 1, + 60, 1, 1, 1, 1, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 61, 1, 53, 53, 53, 53, 53, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 53, 1, 1, 54, 1, 1, + 1, 1, 1, 1, 1, 55, 1, 1, + 1, 1, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 1, 1, 1, 1, + 1, 1, 56, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 57, 1, + 0 +}; + +static const char _deserialize_text_glyphs_trans_targs[] = { + 16, 0, 18, 3, 19, 22, 19, 22, + 5, 20, 21, 20, 21, 23, 26, 8, + 9, 12, 9, 12, 10, 11, 24, 25, + 24, 25, 15, 15, 14, 1, 2, 6, + 7, 13, 15, 1, 2, 6, 7, 13, + 14, 17, 14, 17, 14, 18, 17, 1, + 4, 14, 17, 1, 14, 17, 1, 2, + 7, 14, 17, 1, 2, 14, 26 +}; + +static const char _deserialize_text_glyphs_trans_actions[] = { + 1, 0, 1, 1, 1, 1, 0, 0, + 1, 1, 1, 0, 0, 1, 1, 1, + 1, 1, 0, 0, 2, 1, 1, 1, + 0, 0, 0, 4, 3, 5, 5, 5, + 5, 4, 6, 7, 7, 7, 7, 0, + 6, 8, 8, 0, 0, 0, 9, 10, + 10, 9, 11, 12, 11, 13, 14, 14, + 14, 13, 15, 16, 16, 15, 0 +}; + +static const char _deserialize_text_glyphs_eof_actions[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 3, 6, + 8, 0, 8, 9, 11, 11, 9, 13, + 15, 15, 13 +}; + +static const int deserialize_text_glyphs_start = 14; +static const int deserialize_text_glyphs_first_final = 14; +static const int deserialize_text_glyphs_error = 0; + +static const int deserialize_text_glyphs_en_main = 14; + + +#line 98 "hb-buffer-deserialize-text-glyphs.rl" + + +static hb_bool_t +_hb_buffer_deserialize_text_glyphs (hb_buffer_t *buffer, + const char *buf, + unsigned int buf_len, + const char **end_ptr, + hb_font_t *font) +{ + const char *p = buf, *pe = buf + buf_len, *eof = pe, *orig_pe = pe; + + /* Ensure we have positions. */ + (void) hb_buffer_get_glyph_positions (buffer, nullptr); + + while (p < pe && ISSPACE (*p)) + p++; + if (p < pe && *p == (buffer->len ? '|' : '[')) + *end_ptr = ++p; + + const char *end = strchr ((char *) p, ']'); + if (end) + pe = eof = end; + else + { + end = strrchr ((char *) p, '|'); + if (end) + pe = eof = end; + else + pe = eof = p; + } + + const char *tok = nullptr; + int cs; + hb_glyph_info_t info = {0}; + hb_glyph_position_t pos = {0}; + +#line 353 "hb-buffer-deserialize-text-glyphs.hh" + { + cs = deserialize_text_glyphs_start; + } + +#line 358 "hb-buffer-deserialize-text-glyphs.hh" + { + int _slen; + int _trans; + const unsigned char *_keys; + const char *_inds; + if ( p == pe ) + goto _test_eof; + if ( cs == 0 ) + goto _out; +_resume: + _keys = _deserialize_text_glyphs_trans_keys + (cs<<1); + _inds = _deserialize_text_glyphs_indicies + _deserialize_text_glyphs_index_offsets[cs]; + + _slen = _deserialize_text_glyphs_key_spans[cs]; + _trans = _inds[ _slen > 0 && _keys[0] <=(*p) && + (*p) <= _keys[1] ? + (*p) - _keys[0] : _slen ]; + + cs = _deserialize_text_glyphs_trans_targs[_trans]; + + if ( _deserialize_text_glyphs_trans_actions[_trans] == 0 ) + goto _again; + + switch ( _deserialize_text_glyphs_trans_actions[_trans] ) { + case 1: +#line 51 "hb-buffer-deserialize-text-glyphs.rl" + { + tok = p; +} + break; + case 7: +#line 55 "hb-buffer-deserialize-text-glyphs.rl" + { + /* TODO Unescape delimiters. */ + if (!hb_font_glyph_from_string (font, + tok, p - tok, + &info.codepoint)) + return false; +} + break; + case 14: +#line 63 "hb-buffer-deserialize-text-glyphs.rl" + { if (!parse_uint (tok, p, &info.cluster )) return false; } + break; + case 2: +#line 64 "hb-buffer-deserialize-text-glyphs.rl" + { if (!parse_int (tok, p, &pos.x_offset )) return false; } + break; + case 16: +#line 65 "hb-buffer-deserialize-text-glyphs.rl" + { if (!parse_int (tok, p, &pos.y_offset )) return false; } + break; + case 10: +#line 66 "hb-buffer-deserialize-text-glyphs.rl" + { if (!parse_int (tok, p, &pos.x_advance)) return false; } + break; + case 12: +#line 67 "hb-buffer-deserialize-text-glyphs.rl" + { if (!parse_int (tok, p, &pos.y_advance)) return false; } + break; + case 4: +#line 38 "hb-buffer-deserialize-text-glyphs.rl" + { + hb_memset (&info, 0, sizeof (info)); + hb_memset (&pos , 0, sizeof (pos )); +} +#line 51 "hb-buffer-deserialize-text-glyphs.rl" + { + tok = p; +} + break; + case 6: +#line 55 "hb-buffer-deserialize-text-glyphs.rl" + { + /* TODO Unescape delimiters. */ + if (!hb_font_glyph_from_string (font, + tok, p - tok, + &info.codepoint)) + return false; +} +#line 43 "hb-buffer-deserialize-text-glyphs.rl" + { + buffer->add_info (info); + if (unlikely (!buffer->successful)) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; +} + break; + case 13: +#line 63 "hb-buffer-deserialize-text-glyphs.rl" + { if (!parse_uint (tok, p, &info.cluster )) return false; } +#line 43 "hb-buffer-deserialize-text-glyphs.rl" + { + buffer->add_info (info); + if (unlikely (!buffer->successful)) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; +} + break; + case 15: +#line 65 "hb-buffer-deserialize-text-glyphs.rl" + { if (!parse_int (tok, p, &pos.y_offset )) return false; } +#line 43 "hb-buffer-deserialize-text-glyphs.rl" + { + buffer->add_info (info); + if (unlikely (!buffer->successful)) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; +} + break; + case 9: +#line 66 "hb-buffer-deserialize-text-glyphs.rl" + { if (!parse_int (tok, p, &pos.x_advance)) return false; } +#line 43 "hb-buffer-deserialize-text-glyphs.rl" + { + buffer->add_info (info); + if (unlikely (!buffer->successful)) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; +} + break; + case 11: +#line 67 "hb-buffer-deserialize-text-glyphs.rl" + { if (!parse_int (tok, p, &pos.y_advance)) return false; } +#line 43 "hb-buffer-deserialize-text-glyphs.rl" + { + buffer->add_info (info); + if (unlikely (!buffer->successful)) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; +} + break; + case 8: +#line 68 "hb-buffer-deserialize-text-glyphs.rl" + { if (!parse_uint (tok, p, &info.mask )) return false; } +#line 43 "hb-buffer-deserialize-text-glyphs.rl" + { + buffer->add_info (info); + if (unlikely (!buffer->successful)) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; +} + break; + case 5: +#line 38 "hb-buffer-deserialize-text-glyphs.rl" + { + hb_memset (&info, 0, sizeof (info)); + hb_memset (&pos , 0, sizeof (pos )); +} +#line 51 "hb-buffer-deserialize-text-glyphs.rl" + { + tok = p; +} +#line 55 "hb-buffer-deserialize-text-glyphs.rl" + { + /* TODO Unescape delimiters. */ + if (!hb_font_glyph_from_string (font, + tok, p - tok, + &info.codepoint)) + return false; +} + break; + case 3: +#line 38 "hb-buffer-deserialize-text-glyphs.rl" + { + hb_memset (&info, 0, sizeof (info)); + hb_memset (&pos , 0, sizeof (pos )); +} +#line 51 "hb-buffer-deserialize-text-glyphs.rl" + { + tok = p; +} +#line 55 "hb-buffer-deserialize-text-glyphs.rl" + { + /* TODO Unescape delimiters. */ + if (!hb_font_glyph_from_string (font, + tok, p - tok, + &info.codepoint)) + return false; +} +#line 43 "hb-buffer-deserialize-text-glyphs.rl" + { + buffer->add_info (info); + if (unlikely (!buffer->successful)) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; +} + break; +#line 554 "hb-buffer-deserialize-text-glyphs.hh" + } + +_again: + if ( cs == 0 ) + goto _out; + if ( ++p != pe ) + goto _resume; + _test_eof: {} + if ( p == eof ) + { + switch ( _deserialize_text_glyphs_eof_actions[cs] ) { + case 6: +#line 55 "hb-buffer-deserialize-text-glyphs.rl" + { + /* TODO Unescape delimiters. */ + if (!hb_font_glyph_from_string (font, + tok, p - tok, + &info.codepoint)) + return false; +} +#line 43 "hb-buffer-deserialize-text-glyphs.rl" + { + buffer->add_info (info); + if (unlikely (!buffer->successful)) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; +} + break; + case 13: +#line 63 "hb-buffer-deserialize-text-glyphs.rl" + { if (!parse_uint (tok, p, &info.cluster )) return false; } +#line 43 "hb-buffer-deserialize-text-glyphs.rl" + { + buffer->add_info (info); + if (unlikely (!buffer->successful)) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; +} + break; + case 15: +#line 65 "hb-buffer-deserialize-text-glyphs.rl" + { if (!parse_int (tok, p, &pos.y_offset )) return false; } +#line 43 "hb-buffer-deserialize-text-glyphs.rl" + { + buffer->add_info (info); + if (unlikely (!buffer->successful)) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; +} + break; + case 9: +#line 66 "hb-buffer-deserialize-text-glyphs.rl" + { if (!parse_int (tok, p, &pos.x_advance)) return false; } +#line 43 "hb-buffer-deserialize-text-glyphs.rl" + { + buffer->add_info (info); + if (unlikely (!buffer->successful)) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; +} + break; + case 11: +#line 67 "hb-buffer-deserialize-text-glyphs.rl" + { if (!parse_int (tok, p, &pos.y_advance)) return false; } +#line 43 "hb-buffer-deserialize-text-glyphs.rl" + { + buffer->add_info (info); + if (unlikely (!buffer->successful)) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; +} + break; + case 8: +#line 68 "hb-buffer-deserialize-text-glyphs.rl" + { if (!parse_uint (tok, p, &info.mask )) return false; } +#line 43 "hb-buffer-deserialize-text-glyphs.rl" + { + buffer->add_info (info); + if (unlikely (!buffer->successful)) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; +} + break; + case 3: +#line 38 "hb-buffer-deserialize-text-glyphs.rl" + { + hb_memset (&info, 0, sizeof (info)); + hb_memset (&pos , 0, sizeof (pos )); +} +#line 51 "hb-buffer-deserialize-text-glyphs.rl" + { + tok = p; +} +#line 55 "hb-buffer-deserialize-text-glyphs.rl" + { + /* TODO Unescape delimiters. */ + if (!hb_font_glyph_from_string (font, + tok, p - tok, + &info.codepoint)) + return false; +} +#line 43 "hb-buffer-deserialize-text-glyphs.rl" + { + buffer->add_info (info); + if (unlikely (!buffer->successful)) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; +} + break; +#line 671 "hb-buffer-deserialize-text-glyphs.hh" + } + } + + _out: {} + } + +#line 136 "hb-buffer-deserialize-text-glyphs.rl" + + + if (pe < orig_pe && *pe == ']') + { + pe++; + if (p == pe) + p++; + } + + *end_ptr = p; + + return p == pe; +} + +#endif /* HB_BUFFER_DESERIALIZE_TEXT_GLYPHS_HH */ diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-text.rl b/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-text-glyphs.rl similarity index 76% rename from source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-text.rl rename to source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-text-glyphs.rl index f82d5ab821f9c29c7e53ebb804e6cf32b28509bd..21db14b568bbfd930d6218eb9599e21f5c2c3f60 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-text.rl +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-text-glyphs.rl @@ -24,14 +24,14 @@ * Google Author(s): Behdad Esfahbod */ -#ifndef HB_BUFFER_DESERIALIZE_TEXT_HH -#define HB_BUFFER_DESERIALIZE_TEXT_HH +#ifndef HB_BUFFER_DESERIALIZE_TEXT_GLYPHS_HH +#define HB_BUFFER_DESERIALIZE_TEXT_GLYPHS_HH #include "hb.hh" %%{ -machine deserialize_text; +machine deserialize_text_glyphs; alphtype unsigned char; write data; @@ -52,9 +52,6 @@ action tok { tok = p; } -action ensure_glyphs { if (unlikely (!buffer->ensure_glyphs ())) return false; } -action ensure_unicode { if (unlikely (!buffer->ensure_unicode ())) return false; } - action parse_glyph { /* TODO Unescape delimiters. */ if (!hb_font_glyph_from_string (font, @@ -63,8 +60,6 @@ action parse_glyph { return false; } -action parse_hexdigits {if (!parse_hex (tok, p, &info.codepoint )) return false; } - action parse_cluster { if (!parse_uint (tok, p, &info.cluster )) return false; } action parse_x_offset { if (!parse_int (tok, p, &pos.x_offset )) return false; } action parse_y_offset { if (!parse_int (tok, p, &pos.y_offset )) return false; } @@ -93,45 +88,45 @@ glyph_item = glyphflags? ) >clear_item - @ensure_glyphs - %add_item - ; - -unicode = 'U' '+' xdigit+ >tok %parse_hexdigits; - -unicode_item = - ( - unicode - cluster? - ) - >clear_item - @ensure_unicode %add_item ; -glyphs = glyph_item (space* '|' space* glyph_item)* space* ('|'|']')?; -unicodes = unicode_item (space* '|' space* unicode_item)* space* ('|'|'>')?; +glyphs = glyph_item (space* '|' space* glyph_item)* space*; -main := space* ( ('[' glyphs) | ('<' unicodes) ); +main := space* glyphs; }%% static hb_bool_t -_hb_buffer_deserialize_text (hb_buffer_t *buffer, +_hb_buffer_deserialize_text_glyphs (hb_buffer_t *buffer, const char *buf, unsigned int buf_len, const char **end_ptr, hb_font_t *font) { - const char *p = buf, *pe = buf + buf_len; + const char *p = buf, *pe = buf + buf_len, *eof = pe, *orig_pe = pe; /* Ensure we have positions. */ (void) hb_buffer_get_glyph_positions (buffer, nullptr); while (p < pe && ISSPACE (*p)) p++; - - const char *eof = pe, *tok = nullptr; + if (p < pe && *p == (buffer->len ? '|' : '[')) + *end_ptr = ++p; + + const char *end = strchr ((char *) p, ']'); + if (end) + pe = eof = end; + else + { + end = strrchr ((char *) p, '|'); + if (end) + pe = eof = end; + else + pe = eof = p; + } + + const char *tok = nullptr; int cs; hb_glyph_info_t info = {0}; hb_glyph_position_t pos = {0}; @@ -140,9 +135,16 @@ _hb_buffer_deserialize_text (hb_buffer_t *buffer, write exec; }%% + if (pe < orig_pe && *pe == ']') + { + pe++; + if (p == pe) + p++; + } + *end_ptr = p; - return p == pe && *(p-1) != ']'; + return p == pe; } -#endif /* HB_BUFFER_DESERIALIZE_TEXT_HH */ +#endif /* HB_BUFFER_DESERIALIZE_TEXT_GLYPHS_HH */ diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-text-unicode.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-text-unicode.hh new file mode 100644 index 0000000000000000000000000000000000000000..8ca73bf25f41ff60084205b2647c8efc5773abe7 --- /dev/null +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-text-unicode.hh @@ -0,0 +1,332 @@ + +#line 1 "hb-buffer-deserialize-text-unicode.rl" +/* + * Copyright © 2013 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * 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. + * + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_BUFFER_DESERIALIZE_TEXT_UNICODE_HH +#define HB_BUFFER_DESERIALIZE_TEXT_UNICODE_HH + +#include "hb.hh" + + +#line 33 "hb-buffer-deserialize-text-unicode.hh" +static const unsigned char _deserialize_text_unicode_trans_keys[] = { + 0u, 0u, 9u, 117u, 43u, 102u, 48u, 102u, 48u, 57u, 9u, 124u, 9u, 124u, 9u, 124u, + 9u, 124u, 0 +}; + +static const char _deserialize_text_unicode_key_spans[] = { + 0, 109, 60, 55, 10, 116, 116, 116, + 116 +}; + +static const short _deserialize_text_unicode_index_offsets[] = { + 0, 0, 110, 171, 227, 238, 355, 472, + 589 +}; + +static const char _deserialize_text_unicode_indicies[] = { + 0, 0, 0, 0, 0, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 0, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 2, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 2, 1, 3, + 1, 1, 1, 1, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 1, 1, + 1, 1, 1, 1, 1, 4, 4, 4, + 4, 4, 4, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 4, 4, 4, + 4, 4, 4, 1, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 1, 1, + 1, 1, 1, 1, 1, 4, 4, 4, + 4, 4, 4, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 4, 4, 4, + 4, 4, 4, 1, 5, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 1, 7, + 7, 7, 7, 7, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 7, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 1, 1, 1, 9, 1, 1, 1, 8, + 8, 8, 8, 8, 8, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 8, + 8, 8, 8, 8, 8, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 10, 1, 11, 11, 11, 11, + 11, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 11, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 0, + 1, 12, 12, 12, 12, 12, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 12, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 13, 1, 12, 12, + 12, 12, 12, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 12, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 13, 1, 0 +}; + +static const char _deserialize_text_unicode_trans_targs[] = { + 1, 0, 2, 3, 5, 7, 8, 6, + 5, 4, 1, 6, 6, 1, 8 +}; + +static const char _deserialize_text_unicode_trans_actions[] = { + 0, 0, 1, 0, 2, 2, 2, 3, + 0, 4, 3, 0, 5, 5, 0 +}; + +static const char _deserialize_text_unicode_eof_actions[] = { + 0, 0, 0, 0, 0, 3, 0, 5, + 5 +}; + +static const int deserialize_text_unicode_start = 1; +static const int deserialize_text_unicode_first_final = 5; +static const int deserialize_text_unicode_error = 0; + +static const int deserialize_text_unicode_en_main = 1; + + +#line 79 "hb-buffer-deserialize-text-unicode.rl" + + +static hb_bool_t +_hb_buffer_deserialize_text_unicode (hb_buffer_t *buffer, + const char *buf, + unsigned int buf_len, + const char **end_ptr, + hb_font_t *font) +{ + const char *p = buf, *pe = buf + buf_len, *eof = pe, *orig_pe = pe; + + while (p < pe && ISSPACE (*p)) + p++; + if (p < pe && *p == (buffer->len ? '|' : '<')) + *end_ptr = ++p; + + const char *end = strchr ((char *) p, '>'); + if (end) + pe = eof = end; + else + { + end = strrchr ((char *) p, '|'); + if (end) + pe = eof = end; + else + pe = eof = p; + } + + + const char *tok = nullptr; + int cs; + hb_glyph_info_t info = {0}; + const hb_glyph_position_t pos = {0}; + +#line 194 "hb-buffer-deserialize-text-unicode.hh" + { + cs = deserialize_text_unicode_start; + } + +#line 197 "hb-buffer-deserialize-text-unicode.hh" + { + int _slen; + int _trans; + const unsigned char *_keys; + const char *_inds; + if ( p == pe ) + goto _test_eof; + if ( cs == 0 ) + goto _out; +_resume: + _keys = _deserialize_text_unicode_trans_keys + (cs<<1); + _inds = _deserialize_text_unicode_indicies + _deserialize_text_unicode_index_offsets[cs]; + + _slen = _deserialize_text_unicode_key_spans[cs]; + _trans = _inds[ _slen > 0 && _keys[0] <=(*p) && + (*p) <= _keys[1] ? + (*p) - _keys[0] : _slen ]; + + cs = _deserialize_text_unicode_trans_targs[_trans]; + + if ( _deserialize_text_unicode_trans_actions[_trans] == 0 ) + goto _again; + + switch ( _deserialize_text_unicode_trans_actions[_trans] ) { + case 1: +#line 38 "hb-buffer-deserialize-text-unicode.rl" + { + hb_memset (&info, 0, sizeof (info)); +} + break; + case 2: +#line 51 "hb-buffer-deserialize-text-unicode.rl" + { + tok = p; +} + break; + case 4: +#line 55 "hb-buffer-deserialize-text-unicode.rl" + {if (!parse_hex (tok, p, &info.codepoint )) return false; } + break; + case 3: +#line 55 "hb-buffer-deserialize-text-unicode.rl" + {if (!parse_hex (tok, p, &info.codepoint )) return false; } +#line 42 "hb-buffer-deserialize-text-unicode.rl" + { + buffer->add_info (info); + if (unlikely (!buffer->successful)) + return false; + if (buffer->have_positions) + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; +} + break; + case 5: +#line 57 "hb-buffer-deserialize-text-unicode.rl" + { if (!parse_uint (tok, p, &info.cluster )) return false; } +#line 42 "hb-buffer-deserialize-text-unicode.rl" + { + buffer->add_info (info); + if (unlikely (!buffer->successful)) + return false; + if (buffer->have_positions) + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; +} + break; +#line 256 "hb-buffer-deserialize-text-unicode.hh" + } + +_again: + if ( cs == 0 ) + goto _out; + if ( ++p != pe ) + goto _resume; + _test_eof: {} + if ( p == eof ) + { + switch ( _deserialize_text_unicode_eof_actions[cs] ) { + case 3: +#line 55 "hb-buffer-deserialize-text-unicode.rl" + {if (!parse_hex (tok, p, &info.codepoint )) return false; } +#line 42 "hb-buffer-deserialize-text-unicode.rl" + { + buffer->add_info (info); + if (unlikely (!buffer->successful)) + return false; + if (buffer->have_positions) + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; +} + break; + case 5: +#line 57 "hb-buffer-deserialize-text-unicode.rl" + { if (!parse_uint (tok, p, &info.cluster )) return false; } +#line 42 "hb-buffer-deserialize-text-unicode.rl" + { + buffer->add_info (info); + if (unlikely (!buffer->successful)) + return false; + if (buffer->have_positions) + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; +} + break; +#line 289 "hb-buffer-deserialize-text-unicode.hh" + } + } + + _out: {} + } + +#line 115 "hb-buffer-deserialize-text-unicode.rl" + + + if (pe < orig_pe && *pe == '>') + { + pe++; + if (p == pe) + p++; + } + + *end_ptr = p; + + return p == pe; +} + +#endif /* HB_BUFFER_DESERIALIZE_TEXT_UNICODE_HH */ diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-text-unicode.rl b/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-text-unicode.rl new file mode 100644 index 0000000000000000000000000000000000000000..92873b804f3b18f663fb71df50c6d3c36e925153 --- /dev/null +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-text-unicode.rl @@ -0,0 +1,129 @@ +/* + * Copyright © 2013 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * 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. + * + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_BUFFER_DESERIALIZE_TEXT_UNICODE_HH +#define HB_BUFFER_DESERIALIZE_TEXT_UNICODE_HH + +#include "hb.hh" + +%%{ + +machine deserialize_text_unicode; +alphtype unsigned char; +write data; + +action clear_item { + hb_memset (&info, 0, sizeof (info)); +} + +action add_item { + buffer->add_info (info); + if (unlikely (!buffer->successful)) + return false; + if (buffer->have_positions) + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; +} + +action tok { + tok = p; +} + +action parse_hexdigits {if (!parse_hex (tok, p, &info.codepoint )) return false; } + +action parse_cluster { if (!parse_uint (tok, p, &info.cluster )) return false; } + +unum = '0' | [1-9] digit*; +num = '-'? unum; + +cluster = '=' (unum >tok %parse_cluster); + +unicode = [Uu] '+'? xdigit+ >tok %parse_hexdigits; + +unicode_item = + ( + unicode + cluster? + ) + >clear_item + %add_item + ; + +unicodes = unicode_item (space* '|' space* unicode_item)* space*; + +main := space* unicodes; + +}%% + +static hb_bool_t +_hb_buffer_deserialize_text_unicode (hb_buffer_t *buffer, + const char *buf, + unsigned int buf_len, + const char **end_ptr, + hb_font_t *font) +{ + const char *p = buf, *pe = buf + buf_len, *eof = pe, *orig_pe = pe; + + while (p < pe && ISSPACE (*p)) + p++; + if (p < pe && *p == (buffer->len ? '|' : '<')) + *end_ptr = ++p; + + const char *end = strchr ((char *) p, '>'); + if (end) + pe = eof = end; + else + { + end = strrchr ((char *) p, '|'); + if (end) + pe = eof = end; + else + pe = eof = p; + } + + + const char *tok = nullptr; + int cs; + hb_glyph_info_t info = {0}; + const hb_glyph_position_t pos = {0}; + %%{ + write init; + write exec; + }%% + + if (pe < orig_pe && *pe == '>') + { + pe++; + if (p == pe) + p++; + } + + *end_ptr = p; + + return p == pe; +} + +#endif /* HB_BUFFER_DESERIALIZE_TEXT_UNICODE_HH */ diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-text.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-text.hh deleted file mode 100644 index 6b9b4282fccbffbdc46a19920a913558f75f9e78..0000000000000000000000000000000000000000 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-deserialize-text.hh +++ /dev/null @@ -1,917 +0,0 @@ - -#line 1 "hb-buffer-deserialize-text.rl" -/* - * Copyright © 2013 Google, Inc. - * - * This is part of HarfBuzz, a text shaping library. - * - * 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. - * - * Google Author(s): Behdad Esfahbod - */ - -#ifndef HB_BUFFER_DESERIALIZE_TEXT_HH -#define HB_BUFFER_DESERIALIZE_TEXT_HH - -#include "hb.hh" - - -#line 33 "hb-buffer-deserialize-text.hh" -static const unsigned char _deserialize_text_trans_keys[] = { - 0u, 0u, 9u, 91u, 85u, 85u, 43u, 43u, 48u, 102u, 9u, 85u, 48u, 57u, 48u, 57u, - 45u, 57u, 48u, 57u, 45u, 57u, 48u, 57u, 48u, 57u, 45u, 57u, 48u, 57u, 44u, 44u, - 45u, 57u, 48u, 57u, 44u, 57u, 43u, 124u, 9u, 124u, 9u, 124u, 0u, 0u, 9u, 85u, - 9u, 124u, 9u, 124u, 9u, 124u, 9u, 124u, 9u, 124u, 9u, 124u, 9u, 124u, 9u, 124u, - 9u, 124u, 9u, 124u, 9u, 124u, 9u, 124u, 9u, 124u, 9u, 124u, 9u, 124u, 9u, 124u, - 0 -}; - -static const char _deserialize_text_key_spans[] = { - 0, 83, 1, 1, 55, 77, 10, 10, - 13, 10, 13, 10, 10, 13, 10, 1, - 13, 10, 14, 82, 116, 116, 0, 77, - 116, 116, 116, 116, 116, 116, 116, 116, - 116, 116, 116, 116, 116, 116, 116, 116 -}; - -static const short _deserialize_text_index_offsets[] = { - 0, 0, 84, 86, 88, 144, 222, 233, - 244, 258, 269, 283, 294, 305, 319, 330, - 332, 346, 357, 372, 455, 572, 689, 690, - 768, 885, 1002, 1119, 1236, 1353, 1470, 1587, - 1704, 1821, 1938, 2055, 2172, 2289, 2406, 2523 -}; - -static const char _deserialize_text_indicies[] = { - 0, 0, 0, 0, 0, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 0, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 2, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 3, 1, 4, 1, 5, - 1, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 1, 1, 1, 1, 1, - 1, 1, 6, 6, 6, 6, 6, 6, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 6, 6, 6, 6, 6, 6, - 1, 7, 7, 7, 7, 7, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 7, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 4, 1, 8, - 9, 9, 9, 9, 9, 9, 9, 9, - 9, 1, 10, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 1, 12, 1, 1, - 13, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 1, 15, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 1, 17, 1, - 1, 18, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 1, 20, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 1, 22, - 23, 23, 23, 23, 23, 23, 23, 23, - 23, 1, 24, 1, 1, 25, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 1, - 27, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 1, 29, 1, 30, 1, 1, - 31, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 1, 33, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 1, 29, 1, - 1, 1, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 1, 35, 35, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 35, - 1, 1, 35, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 35, 35, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 35, 1, - 36, 36, 36, 36, 36, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 36, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 37, - 37, 37, 37, 37, 37, 37, 37, 37, - 37, 1, 1, 1, 38, 39, 1, 1, - 37, 37, 37, 37, 37, 37, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 37, 37, 37, 37, 37, 37, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 40, 1, 41, 41, 41, - 41, 41, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 41, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 42, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 43, 1, 1, 7, 7, 7, 7, 7, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 7, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 4, - 1, 44, 44, 44, 44, 44, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 44, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 45, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 46, 1, 44, 44, - 44, 44, 44, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 44, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 1, - 1, 1, 1, 45, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 46, 1, 49, 49, 49, 49, 49, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 49, 48, 48, 50, 48, 48, - 48, 48, 48, 48, 48, 51, 1, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 52, - 48, 48, 53, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 54, 55, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 56, 48, - 57, 57, 57, 57, 57, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 57, - 35, 35, 58, 35, 35, 35, 35, 35, - 35, 35, 59, 1, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 60, 35, 35, 61, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 62, 63, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 64, 35, 65, 65, 65, - 65, 65, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 65, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 66, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 67, 1, 68, 68, 68, 68, 68, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 68, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 42, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 69, 1, 70, - 70, 70, 70, 70, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 70, 48, - 48, 50, 48, 48, 48, 48, 48, 48, - 48, 51, 1, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 52, 48, 48, 53, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 54, 55, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 56, 48, 71, 71, 71, 71, - 71, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 71, 1, 1, 72, 1, - 1, 1, 1, 1, 1, 1, 1, 73, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 74, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 75, - 1, 76, 76, 76, 76, 76, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 76, 1, 1, 77, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 78, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 79, 1, 76, 76, - 76, 76, 76, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 76, 1, 1, - 77, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 78, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 79, 1, 71, 71, 71, 71, 71, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 71, 1, 1, 72, 1, 1, - 1, 1, 1, 1, 1, 1, 73, 1, - 1, 1, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 74, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 75, 1, - 80, 80, 80, 80, 80, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 80, - 1, 1, 81, 1, 1, 1, 1, 1, - 1, 1, 82, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 83, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 45, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 84, 1, 85, 85, 85, - 85, 85, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 85, 1, 1, 86, - 1, 1, 1, 1, 1, 1, 1, 87, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 88, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 89, 1, 85, 85, 85, 85, 85, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 85, 1, 1, 86, 1, 1, 1, - 1, 1, 1, 1, 87, 1, 1, 1, - 1, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 88, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 89, 1, 80, - 80, 80, 80, 80, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 80, 1, - 1, 81, 1, 1, 1, 1, 1, 1, - 1, 82, 1, 1, 1, 1, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, - 1, 1, 1, 1, 1, 1, 83, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 45, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 84, 1, 65, 65, 65, 65, - 65, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 65, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 91, 91, 91, 91, 91, - 91, 91, 91, 91, 91, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 66, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 67, - 1, 0 -}; - -static const char _deserialize_text_trans_targs[] = { - 1, 0, 2, 26, 3, 4, 20, 5, - 24, 25, 28, 39, 9, 31, 34, 31, - 34, 11, 32, 33, 32, 33, 35, 38, - 14, 15, 18, 15, 18, 16, 17, 36, - 37, 36, 37, 27, 21, 20, 6, 22, - 23, 21, 22, 23, 21, 22, 23, 25, - 27, 27, 7, 8, 12, 13, 19, 22, - 30, 27, 7, 8, 12, 13, 19, 22, - 30, 29, 22, 30, 29, 30, 30, 29, - 7, 10, 22, 30, 29, 7, 22, 30, - 29, 7, 8, 13, 30, 29, 7, 8, - 22, 30, 38, 39 -}; - -static const char _deserialize_text_trans_actions[] = { - 0, 0, 0, 0, 1, 0, 2, 0, - 2, 2, 3, 3, 4, 3, 3, 5, - 5, 4, 3, 3, 5, 5, 3, 3, - 4, 4, 4, 0, 0, 6, 4, 3, - 3, 5, 5, 5, 7, 8, 9, 7, - 7, 0, 0, 0, 10, 10, 10, 8, - 12, 13, 14, 14, 14, 14, 15, 11, - 11, 17, 18, 18, 18, 18, 0, 16, - 16, 19, 19, 19, 0, 0, 13, 20, - 21, 21, 20, 20, 22, 23, 22, 22, - 10, 24, 24, 24, 10, 25, 26, 26, - 25, 25, 5, 5 -}; - -static const char _deserialize_text_eof_actions[] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 7, 0, 0, 0, - 10, 10, 11, 16, 19, 0, 11, 20, - 22, 22, 20, 10, 25, 25, 10, 19 -}; - -static const int deserialize_text_start = 1; -static const int deserialize_text_first_final = 20; -static const int deserialize_text_error = 0; - -static const int deserialize_text_en_main = 1; - - -#line 117 "hb-buffer-deserialize-text.rl" - - -static hb_bool_t -_hb_buffer_deserialize_text (hb_buffer_t *buffer, - const char *buf, - unsigned int buf_len, - const char **end_ptr, - hb_font_t *font) -{ - const char *p = buf, *pe = buf + buf_len; - - /* Ensure we have positions. */ - (void) hb_buffer_get_glyph_positions (buffer, nullptr); - - while (p < pe && ISSPACE (*p)) - p++; - - const char *eof = pe, *tok = nullptr; - int cs; - hb_glyph_info_t info = {0}; - hb_glyph_position_t pos = {0}; - -#line 457 "hb-buffer-deserialize-text.hh" - { - cs = deserialize_text_start; - } - -#line 460 "hb-buffer-deserialize-text.hh" - { - int _slen; - int _trans; - const unsigned char *_keys; - const char *_inds; - if ( p == pe ) - goto _test_eof; - if ( cs == 0 ) - goto _out; -_resume: - _keys = _deserialize_text_trans_keys + (cs<<1); - _inds = _deserialize_text_indicies + _deserialize_text_index_offsets[cs]; - - _slen = _deserialize_text_key_spans[cs]; - _trans = _inds[ _slen > 0 && _keys[0] <=(*p) && - (*p) <= _keys[1] ? - (*p) - _keys[0] : _slen ]; - - cs = _deserialize_text_trans_targs[_trans]; - - if ( _deserialize_text_trans_actions[_trans] == 0 ) - goto _again; - - switch ( _deserialize_text_trans_actions[_trans] ) { - case 1: -#line 38 "hb-buffer-deserialize-text.rl" - { - hb_memset (&info, 0, sizeof (info)); - hb_memset (&pos , 0, sizeof (pos )); -} - break; - case 4: -#line 51 "hb-buffer-deserialize-text.rl" - { - tok = p; -} - break; - case 5: -#line 55 "hb-buffer-deserialize-text.rl" - { if (unlikely (!buffer->ensure_glyphs ())) return false; } - break; - case 8: -#line 56 "hb-buffer-deserialize-text.rl" - { if (unlikely (!buffer->ensure_unicode ())) return false; } - break; - case 18: -#line 58 "hb-buffer-deserialize-text.rl" - { - /* TODO Unescape delimiters. */ - if (!hb_font_glyph_from_string (font, - tok, p - tok, - &info.codepoint)) - return false; -} - break; - case 9: -#line 66 "hb-buffer-deserialize-text.rl" - {if (!parse_hex (tok, p, &info.codepoint )) return false; } - break; - case 24: -#line 68 "hb-buffer-deserialize-text.rl" - { if (!parse_uint (tok, p, &info.cluster )) return false; } - break; - case 6: -#line 69 "hb-buffer-deserialize-text.rl" - { if (!parse_int (tok, p, &pos.x_offset )) return false; } - break; - case 26: -#line 70 "hb-buffer-deserialize-text.rl" - { if (!parse_int (tok, p, &pos.y_offset )) return false; } - break; - case 21: -#line 71 "hb-buffer-deserialize-text.rl" - { if (!parse_int (tok, p, &pos.x_advance)) return false; } - break; - case 23: -#line 72 "hb-buffer-deserialize-text.rl" - { if (!parse_int (tok, p, &pos.y_advance)) return false; } - break; - case 15: -#line 38 "hb-buffer-deserialize-text.rl" - { - hb_memset (&info, 0, sizeof (info)); - hb_memset (&pos , 0, sizeof (pos )); -} -#line 51 "hb-buffer-deserialize-text.rl" - { - tok = p; -} - break; - case 3: -#line 51 "hb-buffer-deserialize-text.rl" - { - tok = p; -} -#line 55 "hb-buffer-deserialize-text.rl" - { if (unlikely (!buffer->ensure_glyphs ())) return false; } - break; - case 2: -#line 51 "hb-buffer-deserialize-text.rl" - { - tok = p; -} -#line 56 "hb-buffer-deserialize-text.rl" - { if (unlikely (!buffer->ensure_unicode ())) return false; } - break; - case 16: -#line 58 "hb-buffer-deserialize-text.rl" - { - /* TODO Unescape delimiters. */ - if (!hb_font_glyph_from_string (font, - tok, p - tok, - &info.codepoint)) - return false; -} -#line 43 "hb-buffer-deserialize-text.rl" - { - buffer->add_info (info); - if (unlikely (!buffer->successful)) - return false; - buffer->pos[buffer->len - 1] = pos; - *end_ptr = p; -} - break; - case 7: -#line 66 "hb-buffer-deserialize-text.rl" - {if (!parse_hex (tok, p, &info.codepoint )) return false; } -#line 43 "hb-buffer-deserialize-text.rl" - { - buffer->add_info (info); - if (unlikely (!buffer->successful)) - return false; - buffer->pos[buffer->len - 1] = pos; - *end_ptr = p; -} - break; - case 10: -#line 68 "hb-buffer-deserialize-text.rl" - { if (!parse_uint (tok, p, &info.cluster )) return false; } -#line 43 "hb-buffer-deserialize-text.rl" - { - buffer->add_info (info); - if (unlikely (!buffer->successful)) - return false; - buffer->pos[buffer->len - 1] = pos; - *end_ptr = p; -} - break; - case 25: -#line 70 "hb-buffer-deserialize-text.rl" - { if (!parse_int (tok, p, &pos.y_offset )) return false; } -#line 43 "hb-buffer-deserialize-text.rl" - { - buffer->add_info (info); - if (unlikely (!buffer->successful)) - return false; - buffer->pos[buffer->len - 1] = pos; - *end_ptr = p; -} - break; - case 20: -#line 71 "hb-buffer-deserialize-text.rl" - { if (!parse_int (tok, p, &pos.x_advance)) return false; } -#line 43 "hb-buffer-deserialize-text.rl" - { - buffer->add_info (info); - if (unlikely (!buffer->successful)) - return false; - buffer->pos[buffer->len - 1] = pos; - *end_ptr = p; -} - break; - case 22: -#line 72 "hb-buffer-deserialize-text.rl" - { if (!parse_int (tok, p, &pos.y_advance)) return false; } -#line 43 "hb-buffer-deserialize-text.rl" - { - buffer->add_info (info); - if (unlikely (!buffer->successful)) - return false; - buffer->pos[buffer->len - 1] = pos; - *end_ptr = p; -} - break; - case 19: -#line 73 "hb-buffer-deserialize-text.rl" - { if (!parse_uint (tok, p, &info.mask )) return false; } -#line 43 "hb-buffer-deserialize-text.rl" - { - buffer->add_info (info); - if (unlikely (!buffer->successful)) - return false; - buffer->pos[buffer->len - 1] = pos; - *end_ptr = p; -} - break; - case 12: -#line 38 "hb-buffer-deserialize-text.rl" - { - hb_memset (&info, 0, sizeof (info)); - hb_memset (&pos , 0, sizeof (pos )); -} -#line 51 "hb-buffer-deserialize-text.rl" - { - tok = p; -} -#line 55 "hb-buffer-deserialize-text.rl" - { if (unlikely (!buffer->ensure_glyphs ())) return false; } - break; - case 14: -#line 38 "hb-buffer-deserialize-text.rl" - { - hb_memset (&info, 0, sizeof (info)); - hb_memset (&pos , 0, sizeof (pos )); -} -#line 51 "hb-buffer-deserialize-text.rl" - { - tok = p; -} -#line 58 "hb-buffer-deserialize-text.rl" - { - /* TODO Unescape delimiters. */ - if (!hb_font_glyph_from_string (font, - tok, p - tok, - &info.codepoint)) - return false; -} - break; - case 17: -#line 58 "hb-buffer-deserialize-text.rl" - { - /* TODO Unescape delimiters. */ - if (!hb_font_glyph_from_string (font, - tok, p - tok, - &info.codepoint)) - return false; -} -#line 55 "hb-buffer-deserialize-text.rl" - { if (unlikely (!buffer->ensure_glyphs ())) return false; } -#line 43 "hb-buffer-deserialize-text.rl" - { - buffer->add_info (info); - if (unlikely (!buffer->successful)) - return false; - buffer->pos[buffer->len - 1] = pos; - *end_ptr = p; -} - break; - case 11: -#line 38 "hb-buffer-deserialize-text.rl" - { - hb_memset (&info, 0, sizeof (info)); - hb_memset (&pos , 0, sizeof (pos )); -} -#line 51 "hb-buffer-deserialize-text.rl" - { - tok = p; -} -#line 58 "hb-buffer-deserialize-text.rl" - { - /* TODO Unescape delimiters. */ - if (!hb_font_glyph_from_string (font, - tok, p - tok, - &info.codepoint)) - return false; -} -#line 43 "hb-buffer-deserialize-text.rl" - { - buffer->add_info (info); - if (unlikely (!buffer->successful)) - return false; - buffer->pos[buffer->len - 1] = pos; - *end_ptr = p; -} - break; - case 13: -#line 38 "hb-buffer-deserialize-text.rl" - { - hb_memset (&info, 0, sizeof (info)); - hb_memset (&pos , 0, sizeof (pos )); -} -#line 51 "hb-buffer-deserialize-text.rl" - { - tok = p; -} -#line 58 "hb-buffer-deserialize-text.rl" - { - /* TODO Unescape delimiters. */ - if (!hb_font_glyph_from_string (font, - tok, p - tok, - &info.codepoint)) - return false; -} -#line 55 "hb-buffer-deserialize-text.rl" - { if (unlikely (!buffer->ensure_glyphs ())) return false; } -#line 43 "hb-buffer-deserialize-text.rl" - { - buffer->add_info (info); - if (unlikely (!buffer->successful)) - return false; - buffer->pos[buffer->len - 1] = pos; - *end_ptr = p; -} - break; -#line 715 "hb-buffer-deserialize-text.hh" - } - -_again: - if ( cs == 0 ) - goto _out; - if ( ++p != pe ) - goto _resume; - _test_eof: {} - if ( p == eof ) - { - switch ( _deserialize_text_eof_actions[cs] ) { - case 16: -#line 58 "hb-buffer-deserialize-text.rl" - { - /* TODO Unescape delimiters. */ - if (!hb_font_glyph_from_string (font, - tok, p - tok, - &info.codepoint)) - return false; -} -#line 43 "hb-buffer-deserialize-text.rl" - { - buffer->add_info (info); - if (unlikely (!buffer->successful)) - return false; - buffer->pos[buffer->len - 1] = pos; - *end_ptr = p; -} - break; - case 7: -#line 66 "hb-buffer-deserialize-text.rl" - {if (!parse_hex (tok, p, &info.codepoint )) return false; } -#line 43 "hb-buffer-deserialize-text.rl" - { - buffer->add_info (info); - if (unlikely (!buffer->successful)) - return false; - buffer->pos[buffer->len - 1] = pos; - *end_ptr = p; -} - break; - case 10: -#line 68 "hb-buffer-deserialize-text.rl" - { if (!parse_uint (tok, p, &info.cluster )) return false; } -#line 43 "hb-buffer-deserialize-text.rl" - { - buffer->add_info (info); - if (unlikely (!buffer->successful)) - return false; - buffer->pos[buffer->len - 1] = pos; - *end_ptr = p; -} - break; - case 25: -#line 70 "hb-buffer-deserialize-text.rl" - { if (!parse_int (tok, p, &pos.y_offset )) return false; } -#line 43 "hb-buffer-deserialize-text.rl" - { - buffer->add_info (info); - if (unlikely (!buffer->successful)) - return false; - buffer->pos[buffer->len - 1] = pos; - *end_ptr = p; -} - break; - case 20: -#line 71 "hb-buffer-deserialize-text.rl" - { if (!parse_int (tok, p, &pos.x_advance)) return false; } -#line 43 "hb-buffer-deserialize-text.rl" - { - buffer->add_info (info); - if (unlikely (!buffer->successful)) - return false; - buffer->pos[buffer->len - 1] = pos; - *end_ptr = p; -} - break; - case 22: -#line 72 "hb-buffer-deserialize-text.rl" - { if (!parse_int (tok, p, &pos.y_advance)) return false; } -#line 43 "hb-buffer-deserialize-text.rl" - { - buffer->add_info (info); - if (unlikely (!buffer->successful)) - return false; - buffer->pos[buffer->len - 1] = pos; - *end_ptr = p; -} - break; - case 19: -#line 73 "hb-buffer-deserialize-text.rl" - { if (!parse_uint (tok, p, &info.mask )) return false; } -#line 43 "hb-buffer-deserialize-text.rl" - { - buffer->add_info (info); - if (unlikely (!buffer->successful)) - return false; - buffer->pos[buffer->len - 1] = pos; - *end_ptr = p; -} - break; - case 11: -#line 38 "hb-buffer-deserialize-text.rl" - { - hb_memset (&info, 0, sizeof (info)); - hb_memset (&pos , 0, sizeof (pos )); -} -#line 51 "hb-buffer-deserialize-text.rl" - { - tok = p; -} -#line 58 "hb-buffer-deserialize-text.rl" - { - /* TODO Unescape delimiters. */ - if (!hb_font_glyph_from_string (font, - tok, p - tok, - &info.codepoint)) - return false; -} -#line 43 "hb-buffer-deserialize-text.rl" - { - buffer->add_info (info); - if (unlikely (!buffer->successful)) - return false; - buffer->pos[buffer->len - 1] = pos; - *end_ptr = p; -} - break; -#line 825 "hb-buffer-deserialize-text.hh" - } - } - - _out: {} - } - -#line 141 "hb-buffer-deserialize-text.rl" - - - *end_ptr = p; - - return p == pe && *(p-1) != ']'; -} - -#endif /* HB_BUFFER_DESERIALIZE_TEXT_HH */ diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-serialize.cc b/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-serialize.cc index a458f2318f104d905b1df21649c23d937b57972d..16f189519b199c817ef9afe64aafb222edc28da2 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-serialize.cc +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-serialize.cc @@ -721,7 +721,8 @@ parse_hex (const char *pp, const char *end, uint32_t *pv) } #include "hb-buffer-deserialize-json.hh" -#include "hb-buffer-deserialize-text.hh" +#include "hb-buffer-deserialize-text-glyphs.hh" +#include "hb-buffer-deserialize-text-unicode.hh" /** * hb_buffer_deserialize_glyphs: @@ -736,7 +737,8 @@ parse_hex (const char *pp, const char *end, uint32_t *pv) * Deserializes glyphs @buffer from textual representation in the format * produced by hb_buffer_serialize_glyphs(). * - * Return value: `true` if @buf is not fully consumed, `false` otherwise. + * Return value: `true` if parse was successful, `false` if an error + * occurred. * * Since: 0.9.7 **/ @@ -779,9 +781,9 @@ hb_buffer_deserialize_glyphs (hb_buffer_t *buffer, switch (format) { case HB_BUFFER_SERIALIZE_FORMAT_TEXT: - return _hb_buffer_deserialize_text (buffer, - buf, buf_len, end_ptr, - font); + return _hb_buffer_deserialize_text_glyphs (buffer, + buf, buf_len, end_ptr, + font); case HB_BUFFER_SERIALIZE_FORMAT_JSON: return _hb_buffer_deserialize_json (buffer, @@ -808,7 +810,8 @@ hb_buffer_deserialize_glyphs (hb_buffer_t *buffer, * Deserializes Unicode @buffer from textual representation in the format * produced by hb_buffer_serialize_unicode(). * - * Return value: `true` if @buf is not fully consumed, `false` otherwise. + * Return value: `true` if parse was successful, `false` if an error + * occurred. * * Since: 2.7.3 **/ @@ -849,9 +852,9 @@ hb_buffer_deserialize_unicode (hb_buffer_t *buffer, switch (format) { case HB_BUFFER_SERIALIZE_FORMAT_TEXT: - return _hb_buffer_deserialize_text (buffer, - buf, buf_len, end_ptr, - font); + return _hb_buffer_deserialize_text_unicode (buffer, + buf, buf_len, end_ptr, + font); case HB_BUFFER_SERIALIZE_FORMAT_JSON: return _hb_buffer_deserialize_json (buffer, diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-verify.cc b/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-verify.cc index 1cd52b39b1536a60a97dccdb7d03c933d6f3a545..f111b2d8dcf8e56dbddfc27dcd01efcb32bdbbc3 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-verify.cc +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-verify.cc @@ -150,7 +150,7 @@ buffer_verify_unsafe_to_break (hb_buffer_t *buffer, assert (text_start < text_end); if (0) - printf("start %d end %d text start %d end %d\n", start, end, text_start, text_end); + printf("start %u end %u text start %u end %u\n", start, end, text_start, text_end); hb_buffer_clear_contents (fragment); @@ -292,7 +292,7 @@ buffer_verify_unsafe_to_concat (hb_buffer_t *buffer, assert (text_start < text_end); if (0) - printf("start %d end %d text start %d end %d\n", start, end, text_start, text_end); + printf("start %u end %u text start %u end %u\n", start, end, text_start, text_end); #if 0 hb_buffer_flags_t flags = hb_buffer_get_flags (fragment); diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.cc b/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.cc index 4b6c2d9eaae5f76fed8e8f2550faa3c52f6beb7e..f557ceee561459fa88acbb332b40737fb0a1dea6 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.cc +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.cc @@ -522,15 +522,17 @@ hb_buffer_t::merge_clusters_impl (unsigned int start, cluster = hb_min (cluster, info[i].cluster); /* Extend end */ - while (end < len && info[end - 1].cluster == info[end].cluster) - end++; + if (cluster != info[end - 1].cluster) + while (end < len && info[end - 1].cluster == info[end].cluster) + end++; /* Extend start */ - while (idx < start && info[start - 1].cluster == info[start].cluster) - start--; + if (cluster != info[start].cluster) + while (idx < start && info[start - 1].cluster == info[start].cluster) + start--; /* If we hit the start of buffer, continue in out-buffer. */ - if (idx == start) + if (idx == start && info[start].cluster != cluster) for (unsigned int i = out_len; i && out_info[i - 1].cluster == info[start].cluster; i--) set_cluster (out_info[i - 1], cluster); @@ -893,6 +895,32 @@ hb_buffer_get_user_data (const hb_buffer_t *buffer, * Sets the type of @buffer contents. Buffers are either empty, contain * characters (before shaping), or contain glyphs (the result of shaping). * + * You rarely need to call this function, since a number of other + * functions transition the content type for you. Namely: + * + * - A newly created buffer starts with content type + * %HB_BUFFER_CONTENT_TYPE_INVALID. Calling hb_buffer_reset(), + * hb_buffer_clear_contents(), as well as calling hb_buffer_set_length() + * with an argument of zero all set the buffer content type to invalid + * as well. + * + * - Calling hb_buffer_add_utf8(), hb_buffer_add_utf16(), + * hb_buffer_add_utf32(), hb_buffer_add_codepoints() and + * hb_buffer_add_latin1() expect that buffer is either empty and + * have a content type of invalid, or that buffer content type is + * %HB_BUFFER_CONTENT_TYPE_UNICODE, and they also set the content + * type to Unicode if they added anything to an empty buffer. + * + * - Finally hb_shape() and hb_shape_full() expect that the buffer + * is either empty and have content type of invalid, or that buffer + * content type is %HB_BUFFER_CONTENT_TYPE_UNICODE, and upon + * success they set the buffer content type to + * %HB_BUFFER_CONTENT_TYPE_GLYPHS. + * + * The above transitions are designed such that one can use a buffer + * in a loop of "reset : add-text : shape" without needing to ever + * modify the content type manually. + * * Since: 0.9.5 **/ void diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.h b/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.h index 8c17489835825a28f613b8433159b5cb436bc3bc..bff78543c8761348bed8e710648d3622b1e2e838 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.h +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.h @@ -763,7 +763,7 @@ hb_buffer_diff (hb_buffer_t *buffer, /* - * Debugging. + * Tracing. */ /** diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.hh index bb1efe9dd31ce90a519972c88274dd768736875d..5a43cabcb75718f40d1455a2e932e6be1798b3d6 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer.hh @@ -35,26 +35,6 @@ #include "hb-set-digest.hh" -#ifndef HB_BUFFER_MAX_LEN_FACTOR -#define HB_BUFFER_MAX_LEN_FACTOR 64 -#endif -#ifndef HB_BUFFER_MAX_LEN_MIN -#define HB_BUFFER_MAX_LEN_MIN 16384 -#endif -#ifndef HB_BUFFER_MAX_LEN_DEFAULT -#define HB_BUFFER_MAX_LEN_DEFAULT 0x3FFFFFFF /* Shaping more than a billion chars? Let us know! */ -#endif - -#ifndef HB_BUFFER_MAX_OPS_FACTOR -#define HB_BUFFER_MAX_OPS_FACTOR 1024 -#endif -#ifndef HB_BUFFER_MAX_OPS_MIN -#define HB_BUFFER_MAX_OPS_MIN 16384 -#endif -#ifndef HB_BUFFER_MAX_OPS_DEFAULT -#define HB_BUFFER_MAX_OPS_DEFAULT 0x1FFFFFFF /* Shaping more than a billion operations? Let us know! */ -#endif - static_assert ((sizeof (hb_glyph_info_t) == 20), ""); static_assert ((sizeof (hb_glyph_info_t) == sizeof (hb_glyph_position_t)), ""); @@ -601,21 +581,59 @@ struct hb_buffer_t unsigned int cluster, hb_mask_t mask) { - for (unsigned int i = start; i < end; i++) - if (cluster != infos[i].cluster) + if (unlikely (start == end)) + return; + + unsigned cluster_first = infos[start].cluster; + unsigned cluster_last = infos[end - 1].cluster; + + if (cluster_level == HB_BUFFER_CLUSTER_LEVEL_CHARACTERS || + (cluster != cluster_first && cluster != cluster_last)) + { + for (unsigned int i = start; i < end; i++) + if (cluster != infos[i].cluster) + { + scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_GLYPH_FLAGS; + infos[i].mask |= mask; + } + return; + } + + /* Monotone clusters */ + + if (cluster == cluster_first) + { + for (unsigned int i = end; start < i && infos[i - 1].cluster != cluster_first; i--) + { + scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_GLYPH_FLAGS; + infos[i - 1].mask |= mask; + } + } + else /* cluster == cluster_last */ + { + for (unsigned int i = start; i < end && infos[i].cluster != cluster_last; i++) { scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_GLYPH_FLAGS; infos[i].mask |= mask; } + } } - static unsigned + unsigned _infos_find_min_cluster (const hb_glyph_info_t *infos, unsigned start, unsigned end, unsigned cluster = UINT_MAX) { - for (unsigned int i = start; i < end; i++) - cluster = hb_min (cluster, infos[i].cluster); - return cluster; + if (unlikely (start == end)) + return cluster; + + if (cluster_level == HB_BUFFER_CLUSTER_LEVEL_CHARACTERS) + { + for (unsigned int i = start; i < end; i++) + cluster = hb_min (cluster, infos[i].cluster); + return cluster; + } + + return hb_min (cluster, hb_min (infos[start].cluster, infos[end - 1].cluster)); } void clear_glyph_flags (hb_mask_t mask = 0) diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-cache.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-cache.hh index f8c8108f1f1135cd5c0d68cefc103d7f72fea89d..2e98187b5021a9bcaf346185d3d55136984ef44b 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-cache.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-cache.hh @@ -39,7 +39,9 @@ template <unsigned int key_bits=16, struct hb_cache_t { using item_t = typename std::conditional<thread_safe, - hb_atomic_int_t, + typename std::conditional<key_bits + value_bits - cache_bits <= 16, + hb_atomic_short_t, + hb_atomic_int_t>::type, typename std::conditional<key_bits + value_bits - cache_bits <= 16, short, int>::type @@ -48,8 +50,9 @@ struct hb_cache_t static_assert ((key_bits >= cache_bits), ""); static_assert ((key_bits + value_bits <= cache_bits + 8 * sizeof (item_t)), ""); + hb_cache_t () { init (); } + void init () { clear (); } - void fini () {} void clear () { diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-cairo-utils.cc b/source/libs/harfbuzz/harfbuzz-src/src/hb-cairo-utils.cc new file mode 100644 index 0000000000000000000000000000000000000000..3e5118f213f0f9ee2769adf07cd9cf3190ab46a5 --- /dev/null +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-cairo-utils.cc @@ -0,0 +1,869 @@ +/* + * Copyright © 2022 Red Hat, Inc + * + * This is part of HarfBuzz, a text shaping library. + * + * 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. + * + * Google Author(s): Matthias Clasen + */ + +#include "hb.hh" + +#ifdef HAVE_CAIRO + +#include "hb-cairo-utils.hh" + +#include <cairo.h> + +#define PREALLOCATED_COLOR_STOPS 16 + +#define _2_M_PIf (2.f * float (M_PI)) + +typedef struct { + float r, g, b, a; +} hb_cairo_color_t; + +static inline cairo_extend_t +hb_cairo_extend (hb_paint_extend_t extend) +{ + switch (extend) + { + case HB_PAINT_EXTEND_PAD: return CAIRO_EXTEND_PAD; + case HB_PAINT_EXTEND_REPEAT: return CAIRO_EXTEND_REPEAT; + case HB_PAINT_EXTEND_REFLECT: return CAIRO_EXTEND_REFLECT; + default: break; + } + + return CAIRO_EXTEND_PAD; +} + +#ifdef CAIRO_HAS_PNG_FUNCTIONS +typedef struct +{ + hb_blob_t *blob; + unsigned int offset; +} hb_cairo_read_blob_data_t; + +static cairo_status_t +hb_cairo_read_blob (void *closure, + unsigned char *data, + unsigned int length) +{ + hb_cairo_read_blob_data_t *r = (hb_cairo_read_blob_data_t *) closure; + const char *d; + unsigned int size; + + d = hb_blob_get_data (r->blob, &size); + + if (r->offset + length > size) + return CAIRO_STATUS_READ_ERROR; + + memcpy (data, d + r->offset, length); + r->offset += length; + + return CAIRO_STATUS_SUCCESS; +} +#endif + +static const cairo_user_data_key_t *_hb_cairo_surface_blob_user_data_key = {0}; + +static void +_hb_cairo_destroy_blob (void *p) +{ + hb_blob_destroy ((hb_blob_t *) p); +} + +hb_bool_t +_hb_cairo_paint_glyph_image (hb_cairo_context_t *c, + hb_blob_t *blob, + unsigned width, + unsigned height, + hb_tag_t format, + float slant, + hb_glyph_extents_t *extents) +{ + cairo_t *cr = c->cr; + + if (!extents) /* SVG currently. */ + return false; + + cairo_surface_t *surface = nullptr; + +#ifdef CAIRO_HAS_PNG_FUNCTIONS + if (format == HB_PAINT_IMAGE_FORMAT_PNG) + { + hb_cairo_read_blob_data_t r; + r.blob = blob; + r.offset = 0; + surface = cairo_image_surface_create_from_png_stream (hb_cairo_read_blob, &r); + + /* For PNG, width,height can be unreliable, as is the case for NotoColorEmoji :(. + * Just pull them out of the surface. */ + width = cairo_image_surface_get_width (surface); + height = cairo_image_surface_get_width (surface); + } + else +#endif + if (format == HB_PAINT_IMAGE_FORMAT_BGRA) + { + /* Byte-endian conversion. */ + unsigned data_size = hb_blob_get_length (blob); + if (data_size < width * height * 4) + return false; + + unsigned char *data; +#ifdef __BYTE_ORDER + if (__BYTE_ORDER == __BIG_ENDIAN) + { + data = (unsigned char *) hb_blob_get_data_writable (blob, nullptr); + if (!data) + return false; + + unsigned count = width * height * 4; + for (unsigned i = 0; i < count; i += 4) + { + unsigned char b; + b = data[i]; + data[i] = data[i+3]; + data[i+3] = b; + b = data[i+1]; + data[i+1] = data[i+2]; + data[i+2] = b; + } + } + else +#endif + data = (unsigned char *) hb_blob_get_data (blob, nullptr); + + surface = cairo_image_surface_create_for_data (data, + CAIRO_FORMAT_ARGB32, + width, height, + width * 4); + + cairo_surface_set_user_data (surface, + _hb_cairo_surface_blob_user_data_key, + hb_blob_reference (blob), + _hb_cairo_destroy_blob); + } + + if (!surface) + return false; + + cairo_save (cr); + /* this clip is here to work around recording surface limitations */ + cairo_rectangle (cr, + extents->x_bearing, + extents->y_bearing, + extents->width, + extents->height); + cairo_clip (cr); + + cairo_pattern_t *pattern = cairo_pattern_create_for_surface (surface); + cairo_pattern_set_extend (pattern, CAIRO_EXTEND_PAD); + + cairo_matrix_t matrix = {(double) width, 0, 0, (double) height, 0, 0}; + cairo_pattern_set_matrix (pattern, &matrix); + + /* Undo slant in the extents and apply it in the context. */ + extents->width -= extents->height * slant; + extents->x_bearing -= extents->y_bearing * slant; + cairo_matrix_t cairo_matrix = {1., 0., (double) slant, 1., 0., 0.}; + cairo_transform (cr, &cairo_matrix); + + cairo_translate (cr, extents->x_bearing, extents->y_bearing); + cairo_scale (cr, extents->width, extents->height); + cairo_set_source (cr, pattern); + + cairo_paint (cr); + + cairo_pattern_destroy (pattern); + cairo_surface_destroy (surface); + + cairo_restore (cr); + + return true; +} + +static void +_hb_cairo_reduce_anchors (float x0, float y0, + float x1, float y1, + float x2, float y2, + float *xx0, float *yy0, + float *xx1, float *yy1) +{ + float q1x, q1y, q2x, q2y; + float s; + float k; + + q2x = x2 - x0; + q2y = y2 - y0; + q1x = x1 - x0; + q1y = y1 - y0; + + s = q2x * q2x + q2y * q2y; + if (s < 0.000001f) + { + *xx0 = x0; *yy0 = y0; + *xx1 = x1; *yy1 = y1; + return; + } + + k = (q2x * q1x + q2y * q1y) / s; + *xx0 = x0; + *yy0 = y0; + *xx1 = x1 - k * q2x; + *yy1 = y1 - k * q2y; +} + +static int +_hb_cairo_cmp_color_stop (const void *p1, + const void *p2) +{ + const hb_color_stop_t *c1 = (const hb_color_stop_t *) p1; + const hb_color_stop_t *c2 = (const hb_color_stop_t *) p2; + + if (c1->offset < c2->offset) + return -1; + else if (c1->offset > c2->offset) + return 1; + else + return 0; +} + +static void +_hb_cairo_normalize_color_line (hb_color_stop_t *stops, + unsigned int len, + float *omin, + float *omax) +{ + float min, max; + + hb_qsort (stops, len, sizeof (hb_color_stop_t), _hb_cairo_cmp_color_stop); + + min = max = stops[0].offset; + for (unsigned int i = 0; i < len; i++) + { + min = hb_min (min, stops[i].offset); + max = hb_max (max, stops[i].offset); + } + + if (min != max) + { + for (unsigned int i = 0; i < len; i++) + stops[i].offset = (stops[i].offset - min) / (max - min); + } + + *omin = min; + *omax = max; +} + +static bool +_hb_cairo_get_color_stops (hb_cairo_context_t *c, + hb_color_line_t *color_line, + unsigned *count, + hb_color_stop_t **stops) +{ + unsigned len = hb_color_line_get_color_stops (color_line, 0, nullptr, nullptr); + if (len > *count) + { + *stops = (hb_color_stop_t *) hb_malloc (len * sizeof (hb_color_stop_t)); + if (unlikely (!stops)) + return false; + } + hb_color_line_get_color_stops (color_line, 0, &len, *stops); + for (unsigned i = 0; i < len; i++) + if ((*stops)[i].is_foreground) + { +#ifdef HAVE_CAIRO_USER_SCALED_FONT_GET_FOREGROUND_SOURCE + double r, g, b, a; + cairo_pattern_t *foreground = cairo_user_scaled_font_get_foreground_source (c->scaled_font); + if (cairo_pattern_get_rgba (foreground, &r, &g, &b, &a) == CAIRO_STATUS_SUCCESS) + (*stops)[i].color = HB_COLOR (round (b * 255.), round (g * 255.), round (r * 255.), + round (a * hb_color_get_alpha ((*stops)[i].color))); + else +#endif + (*stops)[i].color = HB_COLOR (0, 0, 0, hb_color_get_alpha ((*stops)[i].color)); + } + + *count = len; + return true; +} + +void +_hb_cairo_paint_linear_gradient (hb_cairo_context_t *c, + hb_color_line_t *color_line, + float x0, float y0, + float x1, float y1, + float x2, float y2) +{ + cairo_t *cr = c->cr; + + unsigned int len = PREALLOCATED_COLOR_STOPS; + hb_color_stop_t stops_[PREALLOCATED_COLOR_STOPS]; + hb_color_stop_t *stops = stops_; + float xx0, yy0, xx1, yy1; + float xxx0, yyy0, xxx1, yyy1; + float min, max; + cairo_pattern_t *pattern; + + if (unlikely (!_hb_cairo_get_color_stops (c, color_line, &len, &stops))) + return; + _hb_cairo_normalize_color_line (stops, len, &min, &max); + + _hb_cairo_reduce_anchors (x0, y0, x1, y1, x2, y2, &xx0, &yy0, &xx1, &yy1); + + xxx0 = xx0 + min * (xx1 - xx0); + yyy0 = yy0 + min * (yy1 - yy0); + xxx1 = xx0 + max * (xx1 - xx0); + yyy1 = yy0 + max * (yy1 - yy0); + + pattern = cairo_pattern_create_linear ((double) xxx0, (double) yyy0, (double) xxx1, (double) yyy1); + cairo_pattern_set_extend (pattern, hb_cairo_extend (hb_color_line_get_extend (color_line))); + for (unsigned int i = 0; i < len; i++) + { + double r, g, b, a; + r = hb_color_get_red (stops[i].color) / 255.; + g = hb_color_get_green (stops[i].color) / 255.; + b = hb_color_get_blue (stops[i].color) / 255.; + a = hb_color_get_alpha (stops[i].color) / 255.; + cairo_pattern_add_color_stop_rgba (pattern, (double) stops[i].offset, r, g, b, a); + } + + cairo_set_source (cr, pattern); + cairo_paint (cr); + + cairo_pattern_destroy (pattern); + + if (stops != stops_) + hb_free (stops); +} + +void +_hb_cairo_paint_radial_gradient (hb_cairo_context_t *c, + hb_color_line_t *color_line, + float x0, float y0, float r0, + float x1, float y1, float r1) +{ + cairo_t *cr = c->cr; + + unsigned int len = PREALLOCATED_COLOR_STOPS; + hb_color_stop_t stops_[PREALLOCATED_COLOR_STOPS]; + hb_color_stop_t *stops = stops_; + float min, max; + float xx0, yy0, xx1, yy1; + float rr0, rr1; + cairo_pattern_t *pattern; + + if (unlikely (!_hb_cairo_get_color_stops (c, color_line, &len, &stops))) + return; + _hb_cairo_normalize_color_line (stops, len, &min, &max); + + xx0 = x0 + min * (x1 - x0); + yy0 = y0 + min * (y1 - y0); + xx1 = x0 + max * (x1 - x0); + yy1 = y0 + max * (y1 - y0); + rr0 = r0 + min * (r1 - r0); + rr1 = r0 + max * (r1 - r0); + + pattern = cairo_pattern_create_radial ((double) xx0, (double) yy0, (double) rr0, (double) xx1, (double) yy1, (double) rr1); + cairo_pattern_set_extend (pattern, hb_cairo_extend (hb_color_line_get_extend (color_line))); + + for (unsigned int i = 0; i < len; i++) + { + double r, g, b, a; + r = hb_color_get_red (stops[i].color) / 255.; + g = hb_color_get_green (stops[i].color) / 255.; + b = hb_color_get_blue (stops[i].color) / 255.; + a = hb_color_get_alpha (stops[i].color) / 255.; + cairo_pattern_add_color_stop_rgba (pattern, (double) stops[i].offset, r, g, b, a); + } + + cairo_set_source (cr, pattern); + cairo_paint (cr); + + cairo_pattern_destroy (pattern); + + if (stops != stops_) + hb_free (stops); +} + +typedef struct { + float x, y; +} hb_cairo_point_t; + +static inline float +_hb_cairo_interpolate (float f0, float f1, float f) +{ + return f0 + f * (f1 - f0); +} + +static inline void +_hb_cairo_premultiply (hb_cairo_color_t *c) +{ + c->r *= c->a; + c->g *= c->a; + c->b *= c->a; +} + +static inline void +_hb_cairo_unpremultiply (hb_cairo_color_t *c) +{ + if (c->a != 0.f) + { + c->r /= c->a; + c->g /= c->a; + c->b /= c->a; + } +} + +static void +_hb_cairo_interpolate_colors (hb_cairo_color_t *c0, hb_cairo_color_t *c1, float k, hb_cairo_color_t *c) +{ + // According to the COLR specification, gradients + // should be interpolated in premultiplied form + _hb_cairo_premultiply (c0); + _hb_cairo_premultiply (c1); + c->r = c0->r + k * (c1->r - c0->r); + c->g = c0->g + k * (c1->g - c0->g); + c->b = c0->b + k * (c1->b - c0->b); + c->a = c0->a + k * (c1->a - c0->a); + _hb_cairo_unpremultiply (c); +} + +static inline float +_hb_cairo_dot (hb_cairo_point_t p, hb_cairo_point_t q) +{ + return p.x * q.x + p.y * q.y; +} + +static inline hb_cairo_point_t +_hb_cairo_normalize (hb_cairo_point_t p) +{ + float len = sqrtf (_hb_cairo_dot (p, p)); + + return hb_cairo_point_t { p.x / len, p.y / len }; +} + +static inline hb_cairo_point_t +_hb_cairo_sum (hb_cairo_point_t p, hb_cairo_point_t q) +{ + return hb_cairo_point_t { p.x + q.x, p.y + q.y }; +} + +static inline hb_cairo_point_t +_hb_cairo_difference (hb_cairo_point_t p, hb_cairo_point_t q) +{ + return hb_cairo_point_t { p.x - q.x, p.y - q.y }; +} + +static inline hb_cairo_point_t +_hb_cairo_scale (hb_cairo_point_t p, float f) +{ + return hb_cairo_point_t { p.x * f, p.y * f }; +} + +typedef struct { + hb_cairo_point_t center, p0, c0, c1, p1; + hb_cairo_color_t color0, color1; +} hb_cairo_patch_t; + +static void +_hb_cairo_add_patch (cairo_pattern_t *pattern, hb_cairo_point_t *center, hb_cairo_patch_t *p) +{ + cairo_mesh_pattern_begin_patch (pattern); + cairo_mesh_pattern_move_to (pattern, (double) center->x, (double) center->y); + cairo_mesh_pattern_line_to (pattern, (double) p->p0.x, (double) p->p0.y); + cairo_mesh_pattern_curve_to (pattern, + (double) p->c0.x, (double) p->c0.y, + (double) p->c1.x, (double) p->c1.y, + (double) p->p1.x, (double) p->p1.y); + cairo_mesh_pattern_line_to (pattern, (double) center->x, (double) center->y); + cairo_mesh_pattern_set_corner_color_rgba (pattern, 0, + (double) p->color0.r, + (double) p->color0.g, + (double) p->color0.b, + (double) p->color0.a); + cairo_mesh_pattern_set_corner_color_rgba (pattern, 1, + (double) p->color0.r, + (double) p->color0.g, + (double) p->color0.b, + (double) p->color0.a); + cairo_mesh_pattern_set_corner_color_rgba (pattern, 2, + (double) p->color1.r, + (double) p->color1.g, + (double) p->color1.b, + (double) p->color1.a); + cairo_mesh_pattern_set_corner_color_rgba (pattern, 3, + (double) p->color1.r, + (double) p->color1.g, + (double) p->color1.b, + (double) p->color1.a); + cairo_mesh_pattern_end_patch (pattern); +} + +#define MAX_ANGLE ((float) M_PI / 8.f) + +static void +_hb_cairo_add_sweep_gradient_patches1 (float cx, float cy, float radius, + float a0, hb_cairo_color_t *c0, + float a1, hb_cairo_color_t *c1, + cairo_pattern_t *pattern) +{ + hb_cairo_point_t center = hb_cairo_point_t { cx, cy }; + int num_splits; + hb_cairo_point_t p0; + hb_cairo_color_t color0, color1; + + num_splits = ceilf (fabsf (a1 - a0) / MAX_ANGLE); + p0 = hb_cairo_point_t { cosf (a0), sinf (a0) }; + color0 = *c0; + + for (int a = 0; a < num_splits; a++) + { + float k = (a + 1.) / num_splits; + float angle1; + hb_cairo_point_t p1; + hb_cairo_point_t A, U; + hb_cairo_point_t C0, C1; + hb_cairo_patch_t patch; + + angle1 = _hb_cairo_interpolate (a0, a1, k); + _hb_cairo_interpolate_colors (c0, c1, k, &color1); + + patch.color0 = color0; + patch.color1 = color1; + + p1 = hb_cairo_point_t { cosf (angle1), sinf (angle1) }; + patch.p0 = _hb_cairo_sum (center, _hb_cairo_scale (p0, radius)); + patch.p1 = _hb_cairo_sum (center, _hb_cairo_scale (p1, radius)); + + A = _hb_cairo_normalize (_hb_cairo_sum (p0, p1)); + U = hb_cairo_point_t { -A.y, A.x }; + C0 = _hb_cairo_sum (A, _hb_cairo_scale (U, _hb_cairo_dot (_hb_cairo_difference (p0, A), p0) / _hb_cairo_dot (U, p0))); + C1 = _hb_cairo_sum (A, _hb_cairo_scale (U, _hb_cairo_dot (_hb_cairo_difference (p1, A), p1) / _hb_cairo_dot (U, p1))); + + patch.c0 = _hb_cairo_sum (center, _hb_cairo_scale (_hb_cairo_sum (C0, _hb_cairo_scale (_hb_cairo_difference (C0, p0), 0.33333f)), radius)); + patch.c1 = _hb_cairo_sum (center, _hb_cairo_scale (_hb_cairo_sum (C1, _hb_cairo_scale (_hb_cairo_difference (C1, p1), 0.33333f)), radius)); + + _hb_cairo_add_patch (pattern, ¢er, &patch); + + p0 = p1; + color0 = color1; + } +} + +static void +_hb_cairo_add_sweep_gradient_patches (hb_color_stop_t *stops, + unsigned int n_stops, + cairo_extend_t extend, + float cx, float cy, + float radius, + float start_angle, + float end_angle, + cairo_pattern_t *pattern) +{ + float angles_[PREALLOCATED_COLOR_STOPS]; + float *angles = angles_; + hb_cairo_color_t colors_[PREALLOCATED_COLOR_STOPS]; + hb_cairo_color_t *colors = colors_; + hb_cairo_color_t color0, color1; + + if (start_angle == end_angle) + { + if (extend == CAIRO_EXTEND_PAD) + { + hb_cairo_color_t c; + if (start_angle > 0) + { + c.r = hb_color_get_red (stops[0].color) / 255.; + c.g = hb_color_get_green (stops[0].color) / 255.; + c.b = hb_color_get_blue (stops[0].color) / 255.; + c.a = hb_color_get_alpha (stops[0].color) / 255.; + _hb_cairo_add_sweep_gradient_patches1 (cx, cy, radius, + 0., &c, + start_angle, &c, + pattern); + } + if (end_angle < _2_M_PIf) + { + c.r = hb_color_get_red (stops[n_stops - 1].color) / 255.; + c.g = hb_color_get_green (stops[n_stops - 1].color) / 255.; + c.b = hb_color_get_blue (stops[n_stops - 1].color) / 255.; + c.a = hb_color_get_alpha (stops[n_stops - 1].color) / 255.; + _hb_cairo_add_sweep_gradient_patches1 (cx, cy, radius, + end_angle, &c, + _2_M_PIf, &c, + pattern); + } + } + return; + } + + assert (start_angle != end_angle); + + /* handle directions */ + if (end_angle < start_angle) + { + hb_swap (start_angle, end_angle); + + for (unsigned i = 0; i < n_stops - 1 - i; i++) + hb_swap (stops[i], stops[n_stops - 1 - i]); + for (unsigned i = 0; i < n_stops; i++) + stops[i].offset = 1 - stops[i].offset; + } + + if (n_stops > PREALLOCATED_COLOR_STOPS) + { + angles = (float *) hb_malloc (sizeof (float) * n_stops); + colors = (hb_cairo_color_t *) hb_malloc (sizeof (hb_cairo_color_t) * n_stops); + if (unlikely (!angles || !colors)) + { + hb_free (angles); + hb_free (colors); + return; + } + } + + for (unsigned i = 0; i < n_stops; i++) + { + angles[i] = start_angle + stops[i].offset * (end_angle - start_angle); + colors[i].r = hb_color_get_red (stops[i].color) / 255.; + colors[i].g = hb_color_get_green (stops[i].color) / 255.; + colors[i].b = hb_color_get_blue (stops[i].color) / 255.; + colors[i].a = hb_color_get_alpha (stops[i].color) / 255.; + } + + if (extend == CAIRO_EXTEND_PAD) + { + unsigned pos; + + color0 = colors[0]; + for (pos = 0; pos < n_stops; pos++) + { + if (angles[pos] >= 0) + { + if (pos > 0) + { + float k = (0 - angles[pos - 1]) / (angles[pos] - angles[pos - 1]); + _hb_cairo_interpolate_colors (&colors[pos-1], &colors[pos], k, &color0); + } + break; + } + } + if (pos == n_stops) + { + /* everything is below 0 */ + color0 = colors[n_stops-1]; + _hb_cairo_add_sweep_gradient_patches1 (cx, cy, radius, + 0., &color0, + _2_M_PIf, &color0, + pattern); + goto done; + } + + _hb_cairo_add_sweep_gradient_patches1 (cx, cy, radius, + 0., &color0, + angles[pos], &colors[pos], + pattern); + + for (pos++; pos < n_stops; pos++) + { + if (angles[pos] <= _2_M_PIf) + { + _hb_cairo_add_sweep_gradient_patches1 (cx, cy, radius, + angles[pos - 1], &colors[pos-1], + angles[pos], &colors[pos], + pattern); + } + else + { + float k = (_2_M_PIf - angles[pos - 1]) / (angles[pos] - angles[pos - 1]); + _hb_cairo_interpolate_colors (&colors[pos - 1], &colors[pos], k, &color1); + _hb_cairo_add_sweep_gradient_patches1 (cx, cy, radius, + angles[pos - 1], &colors[pos - 1], + _2_M_PIf, &color1, + pattern); + break; + } + } + + if (pos == n_stops) + { + /* everything is below 2*M_PI */ + color0 = colors[n_stops - 1]; + _hb_cairo_add_sweep_gradient_patches1 (cx, cy, radius, + angles[n_stops - 1], &color0, + _2_M_PIf, &color0, + pattern); + goto done; + } + } + else + { + int k; + float span; + + span = angles[n_stops - 1] - angles[0]; + k = 0; + if (angles[0] >= 0) + { + float ss = angles[0]; + while (ss > 0) + { + if (span > 0) + { + ss -= span; + k--; + } + else + { + ss += span; + k++; + } + } + } + else if (angles[0] < 0) + { + float ee = angles[n_stops - 1]; + while (ee < 0) + { + if (span > 0) + { + ee += span; + k++; + } + else + { + ee -= span; + k--; + } + } + } + + //assert (angles[0] + k * span <= 0 && 0 < angles[n_stops - 1] + k * span); + span = fabs (span); + + for (signed l = k; l < 1000; l++) + { + for (unsigned i = 1; i < n_stops; i++) + { + float a0, a1; + hb_cairo_color_t *c0, *c1; + + if ((l % 2 != 0) && (extend == CAIRO_EXTEND_REFLECT)) + { + a0 = angles[0] + angles[n_stops - 1] - angles[n_stops - 1 - (i-1)] + l * span; + a1 = angles[0] + angles[n_stops - 1] - angles[n_stops - 1 - i] + l * span; + c0 = &colors[n_stops - 1 - (i - 1)]; + c1 = &colors[n_stops - 1 - i]; + } + else + { + a0 = angles[i-1] + l * span; + a1 = angles[i] + l * span; + c0 = &colors[i-1]; + c1 = &colors[i]; + } + + if (a1 < 0) + continue; + if (a0 < 0) + { + hb_cairo_color_t color; + float f = (0 - a0)/(a1 - a0); + _hb_cairo_interpolate_colors (c0, c1, f, &color); + _hb_cairo_add_sweep_gradient_patches1 (cx, cy, radius, + 0, &color, + a1, c1, + pattern); + } + else if (a1 >= _2_M_PIf) + { + hb_cairo_color_t color; + float f = (_2_M_PIf - a0)/(a1 - a0); + _hb_cairo_interpolate_colors (c0, c1, f, &color); + _hb_cairo_add_sweep_gradient_patches1 (cx, cy, radius, + a0, c0, + _2_M_PIf, &color, + pattern); + goto done; + } + else + { + _hb_cairo_add_sweep_gradient_patches1 (cx, cy, radius, + a0, c0, + a1, c1, + pattern); + } + } + } + } + +done: + + if (angles != angles_) + hb_free (angles); + if (colors != colors_) + hb_free (colors); +} + +void +_hb_cairo_paint_sweep_gradient (hb_cairo_context_t *c, + hb_color_line_t *color_line, + float cx, float cy, + float start_angle, + float end_angle) +{ + cairo_t *cr = c->cr; + + unsigned int len = PREALLOCATED_COLOR_STOPS; + hb_color_stop_t stops_[PREALLOCATED_COLOR_STOPS]; + hb_color_stop_t *stops = stops_; + cairo_extend_t extend; + double x1, y1, x2, y2; + float max_x, max_y, radius; + cairo_pattern_t *pattern; + + if (unlikely (!_hb_cairo_get_color_stops (c, color_line, &len, &stops))) + return; + + hb_qsort (stops, len, sizeof (hb_color_stop_t), _hb_cairo_cmp_color_stop); + + cairo_clip_extents (cr, &x1, &y1, &x2, &y2); + max_x = (float) hb_max ((x1 - (double) cx) * (x1 - (double) cx), (x2 - (double) cx) * (x2 - (double) cx)); + max_y = (float) hb_max ((y1 - (double) cy) * (y1 - (double) cy), (y2 - (double) cy) * (y2 - (double) cy)); + radius = sqrtf (max_x + max_y); + + extend = hb_cairo_extend (hb_color_line_get_extend (color_line)); + pattern = cairo_pattern_create_mesh (); + + _hb_cairo_add_sweep_gradient_patches (stops, len, extend, cx, cy, + radius, start_angle, end_angle, pattern); + + cairo_set_source (cr, pattern); + cairo_paint (cr); + + cairo_pattern_destroy (pattern); + + if (stops != stops_) + hb_free (stops); +} + +#endif diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-cairo-utils.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-cairo-utils.hh new file mode 100644 index 0000000000000000000000000000000000000000..a26bf59d918959ca8956c99c22eeb2f3f6d66ec2 --- /dev/null +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-cairo-utils.hh @@ -0,0 +1,107 @@ +/* + * Copyright © 2022 Red Hat, Inc + * + * This is part of HarfBuzz, a text shaping library. + * + * 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. + * + * Google Author(s): Matthias Clasen + */ + +#ifndef HB_CAIRO_UTILS_H +#define HB_CAIRO_UTILS_H + +#include "hb.hh" +#include "hb-cairo.h" + + +typedef struct +{ + cairo_scaled_font_t *scaled_font; + cairo_t *cr; + hb_map_t *color_cache; +} hb_cairo_context_t; + +static inline cairo_operator_t +_hb_paint_composite_mode_to_cairo (hb_paint_composite_mode_t mode) +{ + switch (mode) + { + case HB_PAINT_COMPOSITE_MODE_CLEAR: return CAIRO_OPERATOR_CLEAR; + case HB_PAINT_COMPOSITE_MODE_SRC: return CAIRO_OPERATOR_SOURCE; + case HB_PAINT_COMPOSITE_MODE_DEST: return CAIRO_OPERATOR_DEST; + case HB_PAINT_COMPOSITE_MODE_SRC_OVER: return CAIRO_OPERATOR_OVER; + case HB_PAINT_COMPOSITE_MODE_DEST_OVER: return CAIRO_OPERATOR_DEST_OVER; + case HB_PAINT_COMPOSITE_MODE_SRC_IN: return CAIRO_OPERATOR_IN; + case HB_PAINT_COMPOSITE_MODE_DEST_IN: return CAIRO_OPERATOR_DEST_IN; + case HB_PAINT_COMPOSITE_MODE_SRC_OUT: return CAIRO_OPERATOR_OUT; + case HB_PAINT_COMPOSITE_MODE_DEST_OUT: return CAIRO_OPERATOR_DEST_OUT; + case HB_PAINT_COMPOSITE_MODE_SRC_ATOP: return CAIRO_OPERATOR_ATOP; + case HB_PAINT_COMPOSITE_MODE_DEST_ATOP: return CAIRO_OPERATOR_DEST_ATOP; + case HB_PAINT_COMPOSITE_MODE_XOR: return CAIRO_OPERATOR_XOR; + case HB_PAINT_COMPOSITE_MODE_PLUS: return CAIRO_OPERATOR_ADD; + case HB_PAINT_COMPOSITE_MODE_SCREEN: return CAIRO_OPERATOR_SCREEN; + case HB_PAINT_COMPOSITE_MODE_OVERLAY: return CAIRO_OPERATOR_OVERLAY; + case HB_PAINT_COMPOSITE_MODE_DARKEN: return CAIRO_OPERATOR_DARKEN; + case HB_PAINT_COMPOSITE_MODE_LIGHTEN: return CAIRO_OPERATOR_LIGHTEN; + case HB_PAINT_COMPOSITE_MODE_COLOR_DODGE: return CAIRO_OPERATOR_COLOR_DODGE; + case HB_PAINT_COMPOSITE_MODE_COLOR_BURN: return CAIRO_OPERATOR_COLOR_BURN; + case HB_PAINT_COMPOSITE_MODE_HARD_LIGHT: return CAIRO_OPERATOR_HARD_LIGHT; + case HB_PAINT_COMPOSITE_MODE_SOFT_LIGHT: return CAIRO_OPERATOR_SOFT_LIGHT; + case HB_PAINT_COMPOSITE_MODE_DIFFERENCE: return CAIRO_OPERATOR_DIFFERENCE; + case HB_PAINT_COMPOSITE_MODE_EXCLUSION: return CAIRO_OPERATOR_EXCLUSION; + case HB_PAINT_COMPOSITE_MODE_MULTIPLY: return CAIRO_OPERATOR_MULTIPLY; + case HB_PAINT_COMPOSITE_MODE_HSL_HUE: return CAIRO_OPERATOR_HSL_HUE; + case HB_PAINT_COMPOSITE_MODE_HSL_SATURATION: return CAIRO_OPERATOR_HSL_SATURATION; + case HB_PAINT_COMPOSITE_MODE_HSL_COLOR: return CAIRO_OPERATOR_HSL_COLOR; + case HB_PAINT_COMPOSITE_MODE_HSL_LUMINOSITY: return CAIRO_OPERATOR_HSL_LUMINOSITY; + default: return CAIRO_OPERATOR_CLEAR; + } +} + +HB_INTERNAL hb_bool_t +_hb_cairo_paint_glyph_image (hb_cairo_context_t *c, + hb_blob_t *blob, + unsigned width, + unsigned height, + hb_tag_t format, + float slant, + hb_glyph_extents_t *extents); + +HB_INTERNAL void +_hb_cairo_paint_linear_gradient (hb_cairo_context_t *c, + hb_color_line_t *color_line, + float x0, float y0, + float x1, float y1, + float x2, float y2); + +HB_INTERNAL void +_hb_cairo_paint_radial_gradient (hb_cairo_context_t *c, + hb_color_line_t *color_line, + float x0, float y0, float r0, + float x1, float y1, float r1); + +HB_INTERNAL void +_hb_cairo_paint_sweep_gradient (hb_cairo_context_t *c, + hb_color_line_t *color_line, + float x0, float y0, + float start_angle, float end_angle); + + +#endif /* HB_CAIRO_UTILS_H */ diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-cairo.cc b/source/libs/harfbuzz/harfbuzz-src/src/hb-cairo.cc new file mode 100644 index 0000000000000000000000000000000000000000..f005afd17e78e62a6158e010f38593b4b20d5a6f --- /dev/null +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-cairo.cc @@ -0,0 +1,1010 @@ +/* + * Copyright © 2022 Red Hat, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * 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. + * + * Red Hat Author(s): Matthias Clasen + */ + +#include "hb.hh" + +#ifdef HAVE_CAIRO + +#include "hb-cairo.h" + +#include "hb-cairo-utils.hh" + +#include "hb-machinery.hh" +#include "hb-utf.hh" + + +/** + * SECTION:hb-cairo + * @title: hb-cairo + * @short_description: Cairo integration + * @include: hb-cairo.h + * + * Functions for using HarfBuzz with the cairo library. + * + * HarfBuzz supports using cairo for rendering. + **/ + +static void +hb_cairo_move_to (hb_draw_funcs_t *dfuncs HB_UNUSED, + void *draw_data, + hb_draw_state_t *st HB_UNUSED, + float to_x, float to_y, + void *user_data HB_UNUSED) +{ + cairo_t *cr = (cairo_t *) draw_data; + + cairo_move_to (cr, (double) to_x, (double) to_y); +} + +static void +hb_cairo_line_to (hb_draw_funcs_t *dfuncs HB_UNUSED, + void *draw_data, + hb_draw_state_t *st HB_UNUSED, + float to_x, float to_y, + void *user_data HB_UNUSED) +{ + cairo_t *cr = (cairo_t *) draw_data; + + cairo_line_to (cr, (double) to_x, (double) to_y); +} + +static void +hb_cairo_cubic_to (hb_draw_funcs_t *dfuncs HB_UNUSED, + void *draw_data, + hb_draw_state_t *st HB_UNUSED, + float control1_x, float control1_y, + float control2_x, float control2_y, + float to_x, float to_y, + void *user_data HB_UNUSED) +{ + cairo_t *cr = (cairo_t *) draw_data; + + cairo_curve_to (cr, + (double) control1_x, (double) control1_y, + (double) control2_x, (double) control2_y, + (double) to_x, (double) to_y); +} + +static void +hb_cairo_close_path (hb_draw_funcs_t *dfuncs HB_UNUSED, + void *draw_data, + hb_draw_state_t *st HB_UNUSED, + void *user_data HB_UNUSED) +{ + cairo_t *cr = (cairo_t *) draw_data; + + cairo_close_path (cr); +} + +static inline void free_static_cairo_draw_funcs (); + +static struct hb_cairo_draw_funcs_lazy_loader_t : hb_draw_funcs_lazy_loader_t<hb_cairo_draw_funcs_lazy_loader_t> +{ + static hb_draw_funcs_t *create () + { + hb_draw_funcs_t *funcs = hb_draw_funcs_create (); + + hb_draw_funcs_set_move_to_func (funcs, hb_cairo_move_to, nullptr, nullptr); + hb_draw_funcs_set_line_to_func (funcs, hb_cairo_line_to, nullptr, nullptr); + hb_draw_funcs_set_cubic_to_func (funcs, hb_cairo_cubic_to, nullptr, nullptr); + hb_draw_funcs_set_close_path_func (funcs, hb_cairo_close_path, nullptr, nullptr); + + hb_draw_funcs_make_immutable (funcs); + + hb_atexit (free_static_cairo_draw_funcs); + + return funcs; + } +} static_cairo_draw_funcs; + +static inline +void free_static_cairo_draw_funcs () +{ + static_cairo_draw_funcs.free_instance (); +} + +static hb_draw_funcs_t * +hb_cairo_draw_get_funcs () +{ + return static_cairo_draw_funcs.get_unconst (); +} + + +#ifdef HAVE_CAIRO_USER_FONT_FACE_SET_RENDER_COLOR_GLYPH_FUNC + +static void +hb_cairo_push_transform (hb_paint_funcs_t *pfuncs HB_UNUSED, + void *paint_data, + float xx, float yx, + float xy, float yy, + float dx, float dy, + void *user_data HB_UNUSED) +{ + hb_cairo_context_t *c = (hb_cairo_context_t *) paint_data; + cairo_t *cr = c->cr; + + cairo_matrix_t m; + + cairo_save (cr); + cairo_matrix_init (&m, (double) xx, (double) yx, + (double) xy, (double) yy, + (double) dx, (double) dy); + cairo_transform (cr, &m); +} + +static void +hb_cairo_pop_transform (hb_paint_funcs_t *pfuncs HB_UNUSED, + void *paint_data, + void *user_data HB_UNUSED) +{ + hb_cairo_context_t *c = (hb_cairo_context_t *) paint_data; + cairo_t *cr = c->cr; + + cairo_restore (cr); +} + +static void +hb_cairo_push_clip_glyph (hb_paint_funcs_t *pfuncs HB_UNUSED, + void *paint_data, + hb_codepoint_t glyph, + hb_font_t *font, + void *user_data HB_UNUSED) +{ + hb_cairo_context_t *c = (hb_cairo_context_t *) paint_data; + cairo_t *cr = c->cr; + + cairo_save (cr); + cairo_new_path (cr); + hb_font_draw_glyph (font, glyph, hb_cairo_draw_get_funcs (), cr); + cairo_close_path (cr); + cairo_clip (cr); +} + +static void +hb_cairo_push_clip_rectangle (hb_paint_funcs_t *pfuncs HB_UNUSED, + void *paint_data, + float xmin, float ymin, float xmax, float ymax, + void *user_data HB_UNUSED) +{ + hb_cairo_context_t *c = (hb_cairo_context_t *) paint_data; + cairo_t *cr = c->cr; + + cairo_save (cr); + cairo_rectangle (cr, + (double) xmin, (double) ymin, + (double) (xmax - xmin), (double) (ymax - ymin)); + cairo_clip (cr); +} + +static void +hb_cairo_pop_clip (hb_paint_funcs_t *pfuncs HB_UNUSED, + void *paint_data, + void *user_data HB_UNUSED) +{ + hb_cairo_context_t *c = (hb_cairo_context_t *) paint_data; + cairo_t *cr = c->cr; + + cairo_restore (cr); +} + +static void +hb_cairo_push_group (hb_paint_funcs_t *pfuncs HB_UNUSED, + void *paint_data, + void *user_data HB_UNUSED) +{ + hb_cairo_context_t *c = (hb_cairo_context_t *) paint_data; + cairo_t *cr = c->cr; + + cairo_save (cr); + cairo_push_group (cr); +} + +static void +hb_cairo_pop_group (hb_paint_funcs_t *pfuncs HB_UNUSED, + void *paint_data, + hb_paint_composite_mode_t mode, + void *user_data HB_UNUSED) +{ + hb_cairo_context_t *c = (hb_cairo_context_t *) paint_data; + cairo_t *cr = c->cr; + + cairo_pop_group_to_source (cr); + cairo_set_operator (cr, _hb_paint_composite_mode_to_cairo (mode)); + cairo_paint (cr); + + cairo_restore (cr); +} + +static void +hb_cairo_paint_color (hb_paint_funcs_t *pfuncs HB_UNUSED, + void *paint_data, + hb_bool_t use_foreground, + hb_color_t color, + void *user_data HB_UNUSED) +{ + hb_cairo_context_t *c = (hb_cairo_context_t *) paint_data; + cairo_t *cr = c->cr; + + if (use_foreground) + { +#ifdef HAVE_CAIRO_USER_SCALED_FONT_GET_FOREGROUND_SOURCE + double r, g, b, a; + cairo_pattern_t *foreground = cairo_user_scaled_font_get_foreground_source (c->scaled_font); + if (cairo_pattern_get_rgba (foreground, &r, &g, &b, &a) == CAIRO_STATUS_SUCCESS) + cairo_set_source_rgba (cr, r, g, b, a * hb_color_get_alpha (color) / 255.); + else +#endif + cairo_set_source_rgba (cr, 0, 0, 0, hb_color_get_alpha (color) / 255.); + } + else + cairo_set_source_rgba (cr, + hb_color_get_red (color) / 255., + hb_color_get_green (color) / 255., + hb_color_get_blue (color) / 255., + hb_color_get_alpha (color) / 255.); + cairo_paint (cr); +} + +static hb_bool_t +hb_cairo_paint_image (hb_paint_funcs_t *pfuncs HB_UNUSED, + void *paint_data, + hb_blob_t *blob, + unsigned width, + unsigned height, + hb_tag_t format, + float slant, + hb_glyph_extents_t *extents, + void *user_data HB_UNUSED) +{ + hb_cairo_context_t *c = (hb_cairo_context_t *) paint_data; + + return _hb_cairo_paint_glyph_image (c, blob, width, height, format, slant, extents); +} + +static void +hb_cairo_paint_linear_gradient (hb_paint_funcs_t *pfuncs HB_UNUSED, + void *paint_data, + hb_color_line_t *color_line, + float x0, float y0, + float x1, float y1, + float x2, float y2, + void *user_data HB_UNUSED) +{ + hb_cairo_context_t *c = (hb_cairo_context_t *) paint_data; + + _hb_cairo_paint_linear_gradient (c, color_line, x0, y0, x1, y1, x2, y2); +} + +static void +hb_cairo_paint_radial_gradient (hb_paint_funcs_t *pfuncs HB_UNUSED, + void *paint_data, + hb_color_line_t *color_line, + float x0, float y0, float r0, + float x1, float y1, float r1, + void *user_data HB_UNUSED) +{ + hb_cairo_context_t *c = (hb_cairo_context_t *) paint_data; + + _hb_cairo_paint_radial_gradient (c, color_line, x0, y0, r0, x1, y1, r1); +} + +static void +hb_cairo_paint_sweep_gradient (hb_paint_funcs_t *pfuncs HB_UNUSED, + void *paint_data, + hb_color_line_t *color_line, + float x0, float y0, + float start_angle, float end_angle, + void *user_data HB_UNUSED) +{ + hb_cairo_context_t *c = (hb_cairo_context_t *) paint_data; + + _hb_cairo_paint_sweep_gradient (c, color_line, x0, y0, start_angle, end_angle); +} + +static const cairo_user_data_key_t color_cache_key = {0}; + +static void +_hb_cairo_destroy_map (void *p) +{ + hb_map_destroy ((hb_map_t *) p); +} + +static hb_bool_t +hb_cairo_paint_custom_palette_color (hb_paint_funcs_t *funcs, + void *paint_data, + unsigned int color_index, + hb_color_t *color, + void *user_data HB_UNUSED) +{ +#ifdef HAVE_CAIRO_FONT_OPTIONS_GET_CUSTOM_PALETTE_COLOR + hb_cairo_context_t *c = (hb_cairo_context_t *) paint_data; + cairo_t *cr = c->cr; + +#define HB_DEADBEEF HB_TAG(0xDE,0xAD,0xBE,0xEF) + + hb_map_t *color_cache = c->color_cache; + hb_codepoint_t *v; + if (likely (color_cache && color_cache->has (color_index, &v))) + { + if (*v == HB_DEADBEEF) + return false; + *color = *v; + return true; + } + + cairo_font_options_t *options; + double red, green, blue, alpha; + + options = cairo_font_options_create (); + cairo_get_font_options (cr, options); + if (CAIRO_STATUS_SUCCESS == + cairo_font_options_get_custom_palette_color (options, color_index, + &red, &green, &blue, &alpha)) + { + cairo_font_options_destroy (options); + *color = HB_COLOR (round (255 * blue), + round (255 * green), + round (255 * red), + round (255 * alpha)); + + if (likely (color_cache && *color != HB_DEADBEEF)) + color_cache->set (color_index, *color); + + return true; + } + cairo_font_options_destroy (options); + + if (likely (color_cache)) + color_cache->set (color_index, HB_DEADBEEF); + +#undef HB_DEADBEEF + +#endif + + return false; +} + +static inline void free_static_cairo_paint_funcs (); + +static struct hb_cairo_paint_funcs_lazy_loader_t : hb_paint_funcs_lazy_loader_t<hb_cairo_paint_funcs_lazy_loader_t> +{ + static hb_paint_funcs_t *create () + { + hb_paint_funcs_t *funcs = hb_paint_funcs_create (); + + hb_paint_funcs_set_push_transform_func (funcs, hb_cairo_push_transform, nullptr, nullptr); + hb_paint_funcs_set_pop_transform_func (funcs, hb_cairo_pop_transform, nullptr, nullptr); + hb_paint_funcs_set_push_clip_glyph_func (funcs, hb_cairo_push_clip_glyph, nullptr, nullptr); + hb_paint_funcs_set_push_clip_rectangle_func (funcs, hb_cairo_push_clip_rectangle, nullptr, nullptr); + hb_paint_funcs_set_pop_clip_func (funcs, hb_cairo_pop_clip, nullptr, nullptr); + hb_paint_funcs_set_push_group_func (funcs, hb_cairo_push_group, nullptr, nullptr); + hb_paint_funcs_set_pop_group_func (funcs, hb_cairo_pop_group, nullptr, nullptr); + hb_paint_funcs_set_color_func (funcs, hb_cairo_paint_color, nullptr, nullptr); + hb_paint_funcs_set_image_func (funcs, hb_cairo_paint_image, nullptr, nullptr); + hb_paint_funcs_set_linear_gradient_func (funcs, hb_cairo_paint_linear_gradient, nullptr, nullptr); + hb_paint_funcs_set_radial_gradient_func (funcs, hb_cairo_paint_radial_gradient, nullptr, nullptr); + hb_paint_funcs_set_sweep_gradient_func (funcs, hb_cairo_paint_sweep_gradient, nullptr, nullptr); + hb_paint_funcs_set_custom_palette_color_func (funcs, hb_cairo_paint_custom_palette_color, nullptr, nullptr); + + hb_paint_funcs_make_immutable (funcs); + + hb_atexit (free_static_cairo_paint_funcs); + + return funcs; + } +} static_cairo_paint_funcs; + +static inline +void free_static_cairo_paint_funcs () +{ + static_cairo_paint_funcs.free_instance (); +} + +static hb_paint_funcs_t * +hb_cairo_paint_get_funcs () +{ + return static_cairo_paint_funcs.get_unconst (); +} +#endif + +static const cairo_user_data_key_t hb_cairo_face_user_data_key = {0}; +static const cairo_user_data_key_t hb_cairo_font_user_data_key = {0}; +static const cairo_user_data_key_t hb_cairo_font_init_func_user_data_key = {0}; +static const cairo_user_data_key_t hb_cairo_font_init_user_data_user_data_key = {0}; +static const cairo_user_data_key_t hb_cairo_scale_factor_user_data_key = {0}; + +static void hb_cairo_face_destroy (void *p) { hb_face_destroy ((hb_face_t *) p); } +static void hb_cairo_font_destroy (void *p) { hb_font_destroy ((hb_font_t *) p); } + +static cairo_status_t +hb_cairo_init_scaled_font (cairo_scaled_font_t *scaled_font, + cairo_t *cr HB_UNUSED, + cairo_font_extents_t *extents) +{ + cairo_font_face_t *font_face = cairo_scaled_font_get_font_face (scaled_font); + + hb_font_t *font = (hb_font_t *) cairo_font_face_get_user_data (font_face, + &hb_cairo_font_user_data_key); + + if (!font) + { + hb_face_t *face = (hb_face_t *) cairo_font_face_get_user_data (font_face, + &hb_cairo_face_user_data_key); + font = hb_font_create (face); + +#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1,16,0) + cairo_font_options_t *font_options = cairo_font_options_create (); + + // Set variations + cairo_scaled_font_get_font_options (scaled_font, font_options); + const char *variations = cairo_font_options_get_variations (font_options); + hb_vector_t<hb_variation_t> vars; + const char *p = variations; + while (p && *p) + { + const char *end = strpbrk ((char *) p, ", "); + hb_variation_t var; + if (hb_variation_from_string (p, end ? end - p : -1, &var)) + vars.push (var); + p = end ? end + 1 : nullptr; + } + hb_font_set_variations (font, &vars[0], vars.length); + + cairo_font_options_destroy (font_options); +#endif + + // Set scale; Note: should NOT set slant, or we'll double-slant. + unsigned scale_factor = hb_cairo_font_face_get_scale_factor (font_face); + if (scale_factor) + { + cairo_matrix_t font_matrix; + cairo_scaled_font_get_scale_matrix (scaled_font, &font_matrix); + hb_font_set_scale (font, + round (font_matrix.xx * scale_factor), + round (font_matrix.yy * scale_factor)); + } + + auto *init_func = (hb_cairo_font_init_func_t) + cairo_font_face_get_user_data (font_face, + &hb_cairo_font_init_func_user_data_key); + if (init_func) + { + void *user_data = cairo_font_face_get_user_data (font_face, + &hb_cairo_font_init_user_data_user_data_key); + font = init_func (font, scaled_font, user_data); + } + + hb_font_make_immutable (font); + } + + cairo_scaled_font_set_user_data (scaled_font, + &hb_cairo_font_user_data_key, + (void *) hb_font_reference (font), + hb_cairo_font_destroy); + + hb_position_t x_scale, y_scale; + hb_font_get_scale (font, &x_scale, &y_scale); + + hb_font_extents_t hb_extents; + hb_font_get_h_extents (font, &hb_extents); + + extents->ascent = (double) hb_extents.ascender / y_scale; + extents->descent = (double) -hb_extents.descender / y_scale; + extents->height = extents->ascent + extents->descent; + +#ifdef HAVE_CAIRO_USER_FONT_FACE_SET_RENDER_COLOR_GLYPH_FUNC + hb_map_t *color_cache = hb_map_create (); + if (unlikely (CAIRO_STATUS_SUCCESS != cairo_scaled_font_set_user_data (scaled_font, + &color_cache_key, + color_cache, + _hb_cairo_destroy_map))) + hb_map_destroy (color_cache); +#endif + + return CAIRO_STATUS_SUCCESS; +} + +static cairo_status_t +hb_cairo_text_to_glyphs (cairo_scaled_font_t *scaled_font, + const char *utf8, + int utf8_len, + cairo_glyph_t **glyphs, + int *num_glyphs, + cairo_text_cluster_t **clusters, + int *num_clusters, + cairo_text_cluster_flags_t *cluster_flags) +{ + hb_font_t *font = (hb_font_t *) cairo_scaled_font_get_user_data (scaled_font, + &hb_cairo_font_user_data_key); + + hb_buffer_t *buffer = hb_buffer_create (); + hb_buffer_add_utf8 (buffer, utf8, utf8_len, 0, utf8_len); + hb_buffer_guess_segment_properties (buffer); + hb_shape (font, buffer, nullptr, 0); + + hb_cairo_glyphs_from_buffer (buffer, + true, + font->x_scale, font->y_scale, + 0., 0., + utf8, utf8_len, + glyphs, (unsigned *) num_glyphs, + clusters, (unsigned *) num_clusters, + cluster_flags); + + hb_buffer_destroy (buffer); + + return CAIRO_STATUS_SUCCESS; +} + +static cairo_status_t +hb_cairo_render_glyph (cairo_scaled_font_t *scaled_font, + unsigned long glyph, + cairo_t *cr, + cairo_text_extents_t *extents) +{ + hb_font_t *font = (hb_font_t *) cairo_scaled_font_get_user_data (scaled_font, + &hb_cairo_font_user_data_key); + + hb_position_t x_scale, y_scale; + hb_font_get_scale (font, &x_scale, &y_scale); + cairo_scale (cr, +1./x_scale, -1./y_scale); + + hb_font_draw_glyph (font, glyph, hb_cairo_draw_get_funcs (), cr); + + cairo_fill (cr); + + return CAIRO_STATUS_SUCCESS; +} + +#ifdef HAVE_CAIRO_USER_FONT_FACE_SET_RENDER_COLOR_GLYPH_FUNC + +static cairo_status_t +hb_cairo_render_color_glyph (cairo_scaled_font_t *scaled_font, + unsigned long glyph, + cairo_t *cr, + cairo_text_extents_t *extents) +{ + hb_font_t *font = (hb_font_t *) cairo_scaled_font_get_user_data (scaled_font, + &hb_cairo_font_user_data_key); + + unsigned int palette = 0; +#ifdef CAIRO_COLOR_PALETTE_DEFAULT + cairo_font_options_t *options = cairo_font_options_create (); + cairo_scaled_font_get_font_options (scaled_font, options); + palette = cairo_font_options_get_color_palette (options); + cairo_font_options_destroy (options); +#endif + + hb_color_t color = HB_COLOR (0, 0, 0, 255); + hb_position_t x_scale, y_scale; + hb_font_get_scale (font, &x_scale, &y_scale); + cairo_scale (cr, +1./x_scale, -1./y_scale); + + hb_cairo_context_t c; + c.scaled_font = scaled_font; + c.cr = cr; + c.color_cache = (hb_map_t *) cairo_scaled_font_get_user_data (scaled_font, &color_cache_key); + + hb_font_paint_glyph (font, glyph, hb_cairo_paint_get_funcs (), &c, palette, color); + + + return CAIRO_STATUS_SUCCESS; +} + +#endif + +static cairo_font_face_t * +user_font_face_create (hb_face_t *face) +{ + cairo_font_face_t *cairo_face; + + cairo_face = cairo_user_font_face_create (); + cairo_user_font_face_set_init_func (cairo_face, hb_cairo_init_scaled_font); + cairo_user_font_face_set_text_to_glyphs_func (cairo_face, hb_cairo_text_to_glyphs); + cairo_user_font_face_set_render_glyph_func (cairo_face, hb_cairo_render_glyph); +#ifdef HAVE_CAIRO_USER_FONT_FACE_SET_RENDER_COLOR_GLYPH_FUNC + if (hb_ot_color_has_png (face) || hb_ot_color_has_layers (face) || hb_ot_color_has_paint (face)) + cairo_user_font_face_set_render_color_glyph_func (cairo_face, hb_cairo_render_color_glyph); +#endif + + if (unlikely (CAIRO_STATUS_SUCCESS != cairo_font_face_set_user_data (cairo_face, + &hb_cairo_face_user_data_key, + (void *) hb_face_reference (face), + hb_cairo_face_destroy))) + hb_face_destroy (face); + + return cairo_face; +} + +/** + * hb_cairo_font_face_create_for_font: + * @font: a #hb_font_t + * + * Creates a #cairo_font_face_t for rendering text according + * to @font. + * + * Note that the scale of @font does not affect the rendering, + * but the variations and slant that are set on @font do. + * + * Returns: (transfer full): a newly created #cairo_font_face_t + * + * Since: 7.0.0 + */ +cairo_font_face_t * +hb_cairo_font_face_create_for_font (hb_font_t *font) +{ + hb_font_make_immutable (font); + + auto *cairo_face = user_font_face_create (font->face); + + if (unlikely (CAIRO_STATUS_SUCCESS != cairo_font_face_set_user_data (cairo_face, + &hb_cairo_font_user_data_key, + (void *) hb_font_reference (font), + hb_cairo_font_destroy))) + hb_font_destroy (font); + + return cairo_face; +} + +/** + * hb_cairo_font_face_get_font: + * @font_face: a #cairo_font_face_t + * + * Gets the #hb_font_t that @font_face was created from. + * + * Returns: (nullable) (transfer none): the #hb_font_t that @font_face was created from + * + * Since: 7.0.0 + */ +hb_font_t * +hb_cairo_font_face_get_font (cairo_font_face_t *font_face) +{ + return (hb_font_t *) cairo_font_face_get_user_data (font_face, + &hb_cairo_font_user_data_key); +} + +/** + * hb_cairo_font_face_create_for_face: + * @face: a #hb_face_t + * + * Creates a #cairo_font_face_t for rendering text according + * to @face. + * + * Returns: (transfer full): a newly created #cairo_font_face_t + * + * Since: 7.0.0 + */ +cairo_font_face_t * +hb_cairo_font_face_create_for_face (hb_face_t *face) +{ + hb_face_make_immutable (face); + + return user_font_face_create (face); +} + +/** + * hb_cairo_font_face_get_face: + * @font_face: a #cairo_font_face_t + * + * Gets the #hb_face_t associated with @font_face. + * + * Returns: (nullable) (transfer none): the #hb_face_t associated with @font_face + * + * Since: 7.0.0 + */ +hb_face_t * +hb_cairo_font_face_get_face (cairo_font_face_t *font_face) +{ + return (hb_face_t *) cairo_font_face_get_user_data (font_face, + &hb_cairo_face_user_data_key); +} + +/** + * hb_cairo_font_face_set_font_init_func: + * @font_face: a #cairo_font_face_t + * @func: The virtual method to use + * @user_data: user data accompanying the method + * @destroy: function to call when @user_data is not needed anymore + * + * Set the virtual method to be called when a cairo + * face created using hb_cairo_font_face_create_for_face() + * creates an #hb_font_t for a #cairo_scaled_font_t. + * + * Since: 7.0.0 + */ +void +hb_cairo_font_face_set_font_init_func (cairo_font_face_t *font_face, + hb_cairo_font_init_func_t func, + void *user_data, + hb_destroy_func_t destroy) +{ + cairo_font_face_set_user_data (font_face, + &hb_cairo_font_init_func_user_data_key, + (void *) func, + nullptr); + if (unlikely (CAIRO_STATUS_SUCCESS != cairo_font_face_set_user_data (font_face, + &hb_cairo_font_init_user_data_user_data_key, + (void *) user_data, + destroy)) && destroy) + { + destroy (user_data); + cairo_font_face_set_user_data (font_face, + &hb_cairo_font_init_func_user_data_key, + nullptr, + nullptr); + } +} + +/** + * hb_cairo_scaled_font_get_font: + * @scaled_font: a #cairo_scaled_font_t + * + * Gets the #hb_font_t associated with @scaled_font. + * + * Returns: (nullable) (transfer none): the #hb_font_t associated with @scaled_font + * + * Since: 7.0.0 + */ +hb_font_t * +hb_cairo_scaled_font_get_font (cairo_scaled_font_t *scaled_font) +{ + return (hb_font_t *) cairo_scaled_font_get_user_data (scaled_font, &hb_cairo_font_user_data_key); +} + + +/** + * hb_cairo_font_face_set_scale_factor: + * @scale_factor: The scale factor to use. See below + * @font_face: a #cairo_font_face_t + * + * Sets the scale factor of the @font_face. Default scale + * factor is zero. + * + * When a #cairo_font_face_t is created from a #hb_face_t using + * hb_cairo_font_face_create_for_face(), such face will create + * #hb_font_t objects during scaled-font creation. The scale + * factor defines how the scale set on such #hb_font_t objects + * relates to the font-matrix (as such font size) of the cairo + * scaled-font. + * + * If the scale-factor is zero (default), then the scale of the + * #hb_font_t object will be left at default, which is the UPEM + * value of the respective #hb_face_t. + * + * If the scale-factor is set to non-zero, then the X and Y scale + * of the #hb_font_t object will be respectively set to the + * @scale_factor times the xx and yy elements of the scale-matrix + * of the cairo scaled-font being created. + * + * When using the hb_cairo_glyphs_from_buffer() API to convert the + * HarfBuzz glyph buffer that resulted from shaping with such a #hb_font_t, + * if the scale-factor was non-zero, you can pass it directly to + * that API as both X and Y scale factors. + * + * If the scale-factor was zero however, or the cairo face was + * created using the alternative constructor + * hb_cairo_font_face_create_for_font(), you need to calculate the + * correct X/Y scale-factors to pass to hb_cairo_glyphs_from_buffer() + * by dividing the #hb_font_t X/Y scale-factors by the + * cairo scaled-font's scale-matrix XX/YY components respectively + * and use those values. Or if you know that relationship offhand + * (because you set the scale of the #hb_font_t yourself), use + * the conversion rate involved. + * + * Since: 7.0.0 + */ +void +hb_cairo_font_face_set_scale_factor (cairo_font_face_t *font_face, + unsigned int scale_factor) +{ + cairo_font_face_set_user_data (font_face, + &hb_cairo_scale_factor_user_data_key, + (void *) (uintptr_t) scale_factor, + nullptr); +} + +/** + * hb_cairo_font_face_get_scale_factor: + * @font_face: a #cairo_font_face_t + * + * Gets the scale factor set on the @font_face. Defaults to zero. + * See hb_cairo_font_face_set_scale_factor() for details. + * + * Returns: the scale factor of @font_face + * + * Since: 7.0.0 + */ +unsigned int +hb_cairo_font_face_get_scale_factor (cairo_font_face_t *font_face) +{ + return (unsigned int) (uintptr_t) + cairo_font_face_get_user_data (font_face, + &hb_cairo_scale_factor_user_data_key); +} + + +/** + * hb_cairo_glyphs_from_buffer: + * @buffer: a #hb_buffer_t containing glyphs + * @utf8_clusters: `true` if @buffer clusters are in bytes, instead of characters + * @x_scale_factor: scale factor to divide #hb_position_t Y values by + * @y_scale_factor: scale factor to divide #hb_position_t X values by + * @x: X position to place first glyph + * @y: Y position to place first glyph + * @utf8: (nullable): the text that was shaped in @buffer + * @utf8_len: the length of @utf8 in bytes + * @glyphs: (out): return location for an array of #cairo_glyph_t + * @num_glyphs: (inout): return location for the length of @glyphs + * @clusters: (out) (nullable): return location for an array of cluster positions + * @num_clusters: (inout) (nullable): return location for the length of @clusters + * @cluster_flags: (out) (nullable): return location for cluster flags + * + * Extracts information from @buffer in a form that can be + * passed to cairo_show_text_glyphs() or cairo_show_glyphs(). + * This API is modeled after cairo_scaled_font_text_to_glyphs() and + * cairo_user_scaled_font_text_to_glyphs_func_t. + * + * The @num_glyphs argument should be preset to the number of glyph entries available + * in the @glyphs buffer. If the @glyphs buffer is `NULL`, the value of + * @num_glyphs must be zero. If the provided glyph array is too short for + * the conversion (or for convenience), a new glyph array may be allocated + * using cairo_glyph_allocate() and placed in @glyphs. Upon return, + * @num_glyphs should contain the number of generated glyphs. If the value + * @glyphs points at has changed after the call, the caller will free the + * allocated glyph array using cairo_glyph_free(). The caller will also free + * the original value of @glyphs, so this function shouldn't do so. + * + * If @clusters is not `NULL`, then @num_clusters and @cluster_flags + * should not be either, and @utf8 must be provided, and cluster + * mapping will be computed. The semantics of how + * cluster array allocation works is similar to the glyph array. That is, + * if @clusters initially points to a non-`NULL` value, that array may be used + * as a cluster buffer, and @num_clusters points to the number of cluster + * entries available there. If the provided cluster array is too short for + * the conversion (or for convenience), a new cluster array may be allocated + * using cairo_text_cluster_allocate() and placed in @clusters. In this case, + * the original value of @clusters will still be freed by the caller. Upon + * return, @num_clusters will contain the number of generated clusters. + * If the value @clusters points at has changed after the call, the caller + * will free the allocated cluster array using cairo_text_cluster_free(). + * + * See hb_cairo_font_face_set_scale_factor() for the details of + * the @scale_factor argument. + * + * The returned @glyphs vector actually has `@num_glyphs + 1` entries in + * it and the x,y values of the extra entry at the end add up the advance + * x,y of all the glyphs in the @buffer. + * + * Since: 7.0.0 + */ +void +hb_cairo_glyphs_from_buffer (hb_buffer_t *buffer, + hb_bool_t utf8_clusters, + double x_scale_factor, + double y_scale_factor, + double x, + double y, + const char *utf8, + int utf8_len, + cairo_glyph_t **glyphs, + unsigned int *num_glyphs, + cairo_text_cluster_t **clusters, + unsigned int *num_clusters, + cairo_text_cluster_flags_t *cluster_flags) +{ + if (utf8 && utf8_len < 0) + utf8_len = strlen (utf8); + + unsigned orig_num_glyphs = *num_glyphs; + *num_glyphs = hb_buffer_get_length (buffer); + hb_glyph_info_t *hb_glyph = hb_buffer_get_glyph_infos (buffer, nullptr); + hb_glyph_position_t *hb_position = hb_buffer_get_glyph_positions (buffer, nullptr); + if (orig_num_glyphs < *num_glyphs + 1) + *glyphs = cairo_glyph_allocate (*num_glyphs + 1); + + if (clusters && utf8) + { + unsigned orig_num_clusters = *num_clusters; + *num_clusters = *num_glyphs ? 1 : 0; + for (unsigned int i = 1; i < *num_glyphs; i++) + if (hb_glyph[i].cluster != hb_glyph[i-1].cluster) + (*num_clusters)++; + if (orig_num_clusters < *num_clusters) + *clusters = cairo_text_cluster_allocate (*num_clusters); + } + + double x_scale = x_scale_factor ? 1. / x_scale_factor : 0.; + double y_scale = y_scale_factor ? 1. / y_scale_factor : 0.; + hb_position_t hx = 0, hy = 0; + int i; + for (i = 0; i < (int) *num_glyphs; i++) + { + (*glyphs)[i].index = hb_glyph[i].codepoint; + (*glyphs)[i].x = x + (+hb_position->x_offset + hx) * x_scale; + (*glyphs)[i].y = y + (-hb_position->y_offset + hy) * y_scale; + hx += hb_position->x_advance; + hy += -hb_position->y_advance; + + hb_position++; + } + (*glyphs)[i].index = -1; + (*glyphs)[i].x = round (hx * x_scale); + (*glyphs)[i].y = round (hy * y_scale); + + if (clusters && *num_clusters && utf8) + { + memset ((void *) *clusters, 0, *num_clusters * sizeof ((*clusters)[0])); + hb_bool_t backward = HB_DIRECTION_IS_BACKWARD (hb_buffer_get_direction (buffer)); + *cluster_flags = backward ? CAIRO_TEXT_CLUSTER_FLAG_BACKWARD : (cairo_text_cluster_flags_t) 0; + unsigned int cluster = 0; + const char *start = utf8, *end; + (*clusters)[cluster].num_glyphs++; + if (backward) + { + for (i = *num_glyphs - 2; i >= 0; i--) + { + if (hb_glyph[i].cluster != hb_glyph[i+1].cluster) + { + assert (hb_glyph[i].cluster > hb_glyph[i+1].cluster); + if (utf8_clusters) + end = start + hb_glyph[i].cluster - hb_glyph[i+1].cluster; + else + end = (const char *) hb_utf_offset_to_pointer<hb_utf8_t> ((const uint8_t *) start, + (signed) (hb_glyph[i].cluster - hb_glyph[i+1].cluster)); + (*clusters)[cluster].num_bytes = end - start; + start = end; + cluster++; + } + (*clusters)[cluster].num_glyphs++; + } + (*clusters)[cluster].num_bytes = utf8 + utf8_len - start; + } + else + { + for (i = 1; i < (int) *num_glyphs; i++) + { + if (hb_glyph[i].cluster != hb_glyph[i-1].cluster) + { + assert (hb_glyph[i].cluster > hb_glyph[i-1].cluster); + if (utf8_clusters) + end = start + hb_glyph[i].cluster - hb_glyph[i-1].cluster; + else + end = (const char *) hb_utf_offset_to_pointer<hb_utf8_t> ((const uint8_t *) start, + (signed) (hb_glyph[i].cluster - hb_glyph[i-1].cluster)); + (*clusters)[cluster].num_bytes = end - start; + start = end; + cluster++; + } + (*clusters)[cluster].num_glyphs++; + } + (*clusters)[cluster].num_bytes = utf8 + utf8_len - start; + } + } + else if (num_clusters) + *num_clusters = 0; +} + +#endif diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-cairo.h b/source/libs/harfbuzz/harfbuzz-src/src/hb-cairo.h new file mode 100644 index 0000000000000000000000000000000000000000..21e284c8f93a68a1e979d466d9f92778e008569f --- /dev/null +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-cairo.h @@ -0,0 +1,99 @@ +/* + * Copyright © 2022 Red Hat, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * 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. + * + * Red Hat Author(s): Matthias Clasen + */ + +#ifndef HB_CAIRO_H +#define HB_CAIRO_H + +#include "hb.h" + +#include <cairo.h> + +HB_BEGIN_DECLS + +HB_EXTERN cairo_font_face_t * +hb_cairo_font_face_create_for_font (hb_font_t *font); + +HB_EXTERN hb_font_t * +hb_cairo_font_face_get_font (cairo_font_face_t *font_face); + +HB_EXTERN cairo_font_face_t * +hb_cairo_font_face_create_for_face (hb_face_t *face); + +HB_EXTERN hb_face_t * +hb_cairo_font_face_get_face (cairo_font_face_t *font_face); + +/** + * hb_cairo_font_init_func_t: + * @font: The #hb_font_t being created + * @scaled_font: The respective #cairo_scaled_font_t + * @user_data: User data accompanying this method + * + * The type of a virtual method to be called when a cairo + * face created using hb_cairo_font_face_create_for_face() + * creates an #hb_font_t for a #cairo_scaled_font_t. + * + * Return value: the #hb_font_t value to use; in most cases same as @font + * + * Since: 7.0.0 + */ +typedef hb_font_t * (*hb_cairo_font_init_func_t) (hb_font_t *font, + cairo_scaled_font_t *scaled_font, + void *user_data); + +HB_EXTERN void +hb_cairo_font_face_set_font_init_func (cairo_font_face_t *font_face, + hb_cairo_font_init_func_t func, + void *user_data, + hb_destroy_func_t destroy); + +HB_EXTERN hb_font_t * +hb_cairo_scaled_font_get_font (cairo_scaled_font_t *scaled_font); + +HB_EXTERN void +hb_cairo_font_face_set_scale_factor (cairo_font_face_t *font_face, + unsigned int scale_factor); + +HB_EXTERN unsigned int +hb_cairo_font_face_get_scale_factor (cairo_font_face_t *font_face); + +HB_EXTERN void +hb_cairo_glyphs_from_buffer (hb_buffer_t *buffer, + hb_bool_t utf8_clusters, + double x_scale_factor, + double y_scale_factor, + double x, + double y, + const char *utf8, + int utf8_len, + cairo_glyph_t **glyphs, + unsigned int *num_glyphs, + cairo_text_cluster_t **clusters, + unsigned int *num_clusters, + cairo_text_cluster_flags_t *cluster_flags); + +HB_END_DECLS + +#endif /* HB_CAIRO_H */ diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-cff-interp-common.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-cff-interp-common.hh index 49805a89c5a95415dc113e9716806d2fa54b8a25..949bfebf9bec2321b4791e5c27b80402cf4c7f18 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-cff-interp-common.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-cff-interp-common.hh @@ -488,7 +488,7 @@ struct op_str_t const unsigned char *ptr = nullptr; - op_code_t op; + op_code_t op = OpCode_Invalid; uint8_t length = 0; }; @@ -522,20 +522,10 @@ struct parsed_values_t void alloc (unsigned n) { - values.alloc (n); + values.alloc (n, true); } - void add_op (op_code_t op, const byte_str_ref_t& str_ref = byte_str_ref_t ()) - { - VAL *val = values.push (); - val->op = op; - auto arr = str_ref.sub_array (opStart, str_ref.get_offset () - opStart); - val->ptr = arr.arrayZ; - val->length = arr.length; - opStart = str_ref.get_offset (); - } - - void add_op (op_code_t op, const byte_str_ref_t& str_ref, const VAL &v) + void add_op (op_code_t op, const byte_str_ref_t& str_ref = byte_str_ref_t (), const VAL &v = VAL ()) { VAL *val = values.push (v); val->op = op; diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-cff-interp-cs-common.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-cff-interp-cs-common.hh index f93c83ab459249e6da53248c8d89a030a5689a62..f40be51f0d7798e2bb893087876b94102176de1b 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-cff-interp-cs-common.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-cff-interp-cs-common.hh @@ -57,7 +57,6 @@ struct call_context_t /* call stack */ const unsigned int kMaxCallLimit = 10; -const unsigned int kMaxOps = 10000; struct call_stack_t : cff_stack_t<call_context_t, kMaxCallLimit> {}; template <typename SUBRS> @@ -882,7 +881,7 @@ struct cs_interpreter_t : interpreter_t<ENV> { SUPER::env.set_endchar (false); - unsigned max_ops = kMaxOps; + unsigned max_ops = HB_CFF_MAX_OPS; for (;;) { if (unlikely (!--max_ops)) { diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-cff-interp-dict-common.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-cff-interp-dict-common.hh index 79fe9b42c5f79393809d59ca21d6eda48385e11d..53226b227e9f83417d6919fac5730d5a3b475af1 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-cff-interp-dict-common.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-cff-interp-dict-common.hh @@ -35,10 +35,8 @@ using namespace OT; /* an opstr and the parsed out dict value(s) */ struct dict_val_t : op_str_t { - void init () { single_val.set_int (0); } + void init () {} void fini () {} - - number_t single_val; }; typedef dict_val_t num_dict_val_t; diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-cff1-interp-cs.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-cff1-interp-cs.hh index b306c2ecc9a9190c234340e3f904eb56071b3d6f..d8868efa53f9cf95810aca7dd8c8e052e645dc3b 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-cff1-interp-cs.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-cff1-interp-cs.hh @@ -38,7 +38,8 @@ typedef biased_subrs_t<CFF1Subrs> cff1_biased_subrs_t; struct cff1_cs_interp_env_t : cs_interp_env_t<number_t, CFF1Subrs> { template <typename ACC> - cff1_cs_interp_env_t (const hb_ubytes_t &str, ACC &acc, unsigned int fd) + cff1_cs_interp_env_t (const hb_ubytes_t &str, ACC &acc, unsigned int fd, + const int *coords_=nullptr, unsigned int num_coords_=0) : SUPER (str, acc.globalSubrs, acc.privateDicts[fd].localSubrs) { processed_width = false; diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-cff2-interp-cs.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-cff2-interp-cs.hh index 00c25800e68c32cae036864c1987e26797cbadee..915b10cf39a9243ddd91ae81b119e24b409b02c5 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-cff2-interp-cs.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-cff2-interp-cs.hh @@ -45,7 +45,7 @@ struct blend_arg_t : number_t numValues = numValues_; valueIndex = valueIndex_; unsigned numBlends = blends_.length; - if (unlikely (!deltas.resize (numBlends))) + if (unlikely (!deltas.resize_exact (numBlends))) return; for (unsigned int i = 0; i < numBlends; i++) deltas.arrayZ[i] = blends_.arrayZ[i]; @@ -55,7 +55,7 @@ struct blend_arg_t : number_t void reset_blends () { numValues = valueIndex = 0; - deltas.resize (0); + deltas.shrink (0); } unsigned int numValues; @@ -118,7 +118,7 @@ struct cff2_cs_interp_env_t : cs_interp_env_t<ELEM, CFF2Subrs> region_count = varStore->varStore.get_region_index_count (get_ivs ()); if (do_blend) { - if (unlikely (!scalars.resize (region_count))) + if (unlikely (!scalars.resize_exact (region_count))) SUPER::set_error (); else varStore->varStore.get_region_scalars (get_ivs (), coords, num_coords, @@ -163,6 +163,8 @@ struct cff2_cs_interp_env_t : cs_interp_env_t<ELEM, CFF2Subrs> return v; } + bool have_coords () const { return num_coords; } + protected: const int *coords; unsigned int num_coords; @@ -222,7 +224,10 @@ struct cff2_cs_opset_t : cs_opset_t<ELEM, OPSET, cff2_cs_interp_env_t<ELEM>, PAR const hb_array_t<const ELEM> blends, unsigned n, unsigned i) { - arg.set_blends (n, i, blends); + if (env.have_coords ()) + arg.set_int (round (arg.to_real () + env.blend_deltas (blends))); + else + arg.set_blends (n, i, blends); } template <typename T = ELEM, hb_enable_if (!hb_is_same (T, blend_arg_t))> diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-common.cc b/source/libs/harfbuzz/harfbuzz-src/src/hb-common.cc index e9f9cfeb5ff59ea6477ec0927d718ed10e3ad7c1..c9a40295a3d7208ca35119c50834c542c13ee264 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-common.cc +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-common.cc @@ -29,32 +29,6 @@ #include "hb.hh" #include "hb-machinery.hh" -#if !defined(HB_NO_SETLOCALE) && (!defined(HAVE_NEWLOCALE) || !defined(HAVE_USELOCALE)) -#define HB_NO_SETLOCALE 1 -#endif - -#ifndef HB_NO_SETLOCALE - -#include <locale.h> -#ifdef HAVE_XLOCALE_H -#include <xlocale.h> // Needed on BSD/OS X for uselocale -#endif - -#ifdef WIN32 -#define hb_locale_t _locale_t -#else -#define hb_locale_t locale_t -#endif -#define hb_setlocale setlocale -#define hb_uselocale uselocale - -#else - -#define hb_locale_t void * -#define hb_setlocale(Category, Locale) "C" -#define hb_uselocale(Locale) ((hb_locale_t) 0) - -#endif /** * SECTION:hb-common diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-common.h b/source/libs/harfbuzz/harfbuzz-src/src/hb-common.h index e92feb9898b43b4fe44667de83773c3eb86da854..a5da4e76a329250b25ccc31d24c4106b2688ed13 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-common.h +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-common.h @@ -897,6 +897,32 @@ HB_EXTERN uint8_t hb_color_get_blue (hb_color_t color); #define hb_color_get_blue(color) (((color) >> 24) & 0xFF) +/** + * hb_glyph_extents_t: + * @x_bearing: Distance from the x-origin to the left extremum of the glyph. + * @y_bearing: Distance from the top extremum of the glyph to the y-origin. + * @width: Distance from the left extremum of the glyph to the right extremum. + * @height: Distance from the top extremum of the glyph to the bottom extremum. + * + * Glyph extent values, measured in font units. + * + * Note that @height is negative, in coordinate systems that grow up. + **/ +typedef struct hb_glyph_extents_t { + hb_position_t x_bearing; + hb_position_t y_bearing; + hb_position_t width; + hb_position_t height; +} hb_glyph_extents_t; + +/** + * hb_font_t: + * + * Data type for holding fonts. + * + */ +typedef struct hb_font_t hb_font_t; + HB_END_DECLS #endif /* HB_COMMON_H */ diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-config.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-config.hh index 98b1e9d0cf6bb64442c8b5e18a387c9fc5f07bd3..047518b87d4885a5b1b01f232d26217b3d09a28b 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-config.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-config.hh @@ -37,6 +37,7 @@ #ifndef HB_EXPERIMENTAL_API #define HB_NO_BEYOND_64K +#define HB_NO_CUBIC_GLYF #define HB_NO_VAR_COMPOSITES #endif @@ -80,9 +81,10 @@ #define HB_NO_MMAP #define HB_NO_NAME #define HB_NO_OPEN -#define HB_NO_SETLOCALE #define HB_NO_OT_FONT_GLYPH_NAMES #define HB_NO_OT_SHAPE_FRACTIONS +#define HB_NO_PAINT +#define HB_NO_SETLOCALE #define HB_NO_STYLE #define HB_NO_SUBSET_LAYOUT #define HB_NO_VERTICAL diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-coretext.cc b/source/libs/harfbuzz/harfbuzz-src/src/hb-coretext.cc index 4267e0e13e8f8d7f770f41462aa2328bbc9f0f51..a87cb5cd028f0a4b44282e3ab4d151d18f10eb20 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-coretext.cc +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-coretext.cc @@ -511,7 +511,6 @@ _hb_coretext_shape (hb_shape_plan_t *shape_plan, buffer->merge_clusters (i - 1, i + 1); } - hb_vector_t<feature_record_t> feature_records; hb_vector_t<range_record_t> range_records; /* diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-cplusplus.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-cplusplus.hh index a210ab79605bd340ce7a7d9f85688e00a4e3e6b7..531ef1b7c83fa4ede2a09bcc975607bb28b46aa6 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-cplusplus.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-cplusplus.hh @@ -160,6 +160,8 @@ HB_DEFINE_VTABLE (map); HB_DEFINE_VTABLE (set); HB_DEFINE_VTABLE (shape_plan); HB_DEFINE_VTABLE (unicode_funcs); +HB_DEFINE_VTABLE (draw_funcs); +HB_DEFINE_VTABLE (paint_funcs); #undef HB_DEFINE_VTABLE diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-debug.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-debug.hh index cbe13e5214ded76addb1529af4db16d98ddc75db..efab374646b814cceb23552d19d2f2d7577da763 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-debug.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-debug.hh @@ -113,7 +113,7 @@ _hb_print_func (const char *func) const char *paren = strchr (func, '('); if (paren) func_len = paren - func; - fprintf (stderr, "%.*s", func_len, func); + fprintf (stderr, "%.*s", (int) func_len, func); } } @@ -142,9 +142,9 @@ _hb_debug_msg_va (const char *what, fprintf (stderr, "%-10s", what ? what : ""); if (obj) - fprintf (stderr, "(%*p) ", (unsigned int) (2 * sizeof (void *)), obj); + fprintf (stderr, "(%*p) ", (int) (2 * sizeof (void *)), obj); else - fprintf (stderr, " %*s ", (unsigned int) (2 * sizeof (void *)), ""); + fprintf (stderr, " %*s ", (int) (2 * sizeof (void *)), ""); if (indented) { #define VBAR "\342\224\202" /* U+2502 BOX DRAWINGS LIGHT VERTICAL */ @@ -306,7 +306,7 @@ struct hb_auto_trace_t } _hb_debug_msg<max_level> (what, obj, func, true, plevel ? *plevel : 1, -1, - "return %s (line %d)", + "return %s (line %u)", hb_printer_t<hb_decay<decltype (v)>>().print (v), line); if (plevel) --*plevel; plevel = nullptr; @@ -396,7 +396,7 @@ struct hb_no_trace_t { #define TRACE_APPLY(this) \ hb_auto_trace_t<HB_DEBUG_APPLY, bool> trace \ (&c->debug_depth, c->get_name (), this, HB_FUNC, \ - "idx %d gid %u lookup %d", \ + "idx %u gid %u lookup %d", \ c->buffer->idx, c->buffer->cur().codepoint, (int) c->lookup_index) #else #define TRACE_APPLY(this) hb_no_trace_t<bool> trace @@ -454,7 +454,7 @@ struct hb_no_trace_t { #define TRACE_DISPATCH(this, format) \ hb_auto_trace_t<context_t::max_debug_depth, typename context_t::return_t> trace \ (&c->debug_depth, c->get_name (), this, HB_FUNC, \ - "format %d", (int) format) + "format %u", (unsigned) format) #else #define TRACE_DISPATCH(this, format) hb_no_trace_t<typename context_t::return_t> trace #endif diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-deprecated.h b/source/libs/harfbuzz/harfbuzz-src/src/hb-deprecated.h index 333dc3cd4c3572899411f7ab0aab0a3ef612aaff..edacfd064c349148f062b85f7f54127f9852555d 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-deprecated.h +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-deprecated.h @@ -102,7 +102,8 @@ typedef hb_bool_t (*hb_font_get_glyph_func_t) (hb_font_t *font, void *font_data, hb_codepoint_t *glyph, void *user_data); -HB_EXTERN HB_DEPRECATED_FOR(hb_font_funcs_set_nominal_glyph_func and hb_font_funcs_set_variation_glyph_func) void +HB_DEPRECATED_FOR (hb_font_funcs_set_nominal_glyph_func and hb_font_funcs_set_variation_glyph_func) +HB_EXTERN void hb_font_funcs_set_glyph_func (hb_font_funcs_t *ffuncs, hb_font_get_glyph_func_t func, void *user_data, hb_destroy_func_t destroy); diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-directwrite.cc b/source/libs/harfbuzz/harfbuzz-src/src/hb-directwrite.cc index de05b7d871a1099217c97578adab2cea3f24b2d4..42764a244b14bcca93ad2320d1ccf26852676bac 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-directwrite.cc +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-directwrite.cc @@ -251,16 +251,12 @@ _hb_directwrite_shaper_face_data_destroy (hb_directwrite_face_data_t *data) data->dwriteFactory->UnregisterFontFileLoader (data->fontFileLoader); data->dwriteFactory->Release (); } - if (data->fontFileLoader) - delete data->fontFileLoader; - if (data->fontFileStream) - delete data->fontFileStream; - if (data->faceBlob) - hb_blob_destroy (data->faceBlob); + delete data->fontFileLoader; + delete data->fontFileStream; + hb_blob_destroy (data->faceBlob); if (data->dwrite_dll) FreeLibrary (data->dwrite_dll); - if (data) - delete data; + delete data; } diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-draw.cc b/source/libs/harfbuzz/harfbuzz-src/src/hb-draw.cc index 72c203f24fb959e8085debc2031bf2f34d19bd54..f204f56bc7a49f7755c2f3ba09714b6cfb7e3de1 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-draw.cc +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-draw.cc @@ -35,6 +35,8 @@ * @include: hb.h * * Functions for drawing (extracting) glyph shapes. + * + * The #hb_draw_funcs_t struct can be used with hb_font_draw_glyph(). **/ static void @@ -198,13 +200,29 @@ DEFINE_NULL_INSTANCE (hb_draw_funcs_t) = } }; +/** + * hb_draw_funcs_get_empty: + * + * Fetches the singleton empty draw-functions structure. + * + * Return value: (transfer full): The empty draw-functions structure + * + * Since: 7.0.0 + **/ +hb_draw_funcs_t * +hb_draw_funcs_get_empty () +{ + return const_cast<hb_draw_funcs_t *> (&Null (hb_draw_funcs_t)); +} /** * hb_draw_funcs_reference: (skip) * @dfuncs: draw functions * - * Increases the reference count on @dfuncs by one. This prevents @buffer from - * being destroyed until a matching call to hb_draw_funcs_destroy() is made. + * Increases the reference count on @dfuncs by one. + * + * This prevents @dfuncs from being destroyed until a matching + * call to hb_draw_funcs_destroy() is made. * * Return value: (transfer full): * The referenced #hb_draw_funcs_t. @@ -246,6 +264,49 @@ hb_draw_funcs_destroy (hb_draw_funcs_t *dfuncs) hb_free (dfuncs); } +/** + * hb_draw_funcs_set_user_data: (skip) + * @dfuncs: The draw-functions structure + * @key: The user-data key + * @data: A pointer to the user data + * @destroy: (nullable): A callback to call when @data is not needed anymore + * @replace: Whether to replace an existing data with the same key + * + * Attaches a user-data key/data pair to the specified draw-functions structure. + * + * Return value: `true` if success, `false` otherwise + * + * Since: 7.0.0 + **/ +hb_bool_t +hb_draw_funcs_set_user_data (hb_draw_funcs_t *dfuncs, + hb_user_data_key_t *key, + void * data, + hb_destroy_func_t destroy, + hb_bool_t replace) +{ + return hb_object_set_user_data (dfuncs, key, data, destroy, replace); +} + +/** + * hb_draw_funcs_get_user_data: (skip) + * @dfuncs: The draw-functions structure + * @key: The user-data key to query + * + * Fetches the user-data associated with the specified key, + * attached to the specified draw-functions structure. + * + * Return value: (transfer none): A pointer to the user data + * + * Since: 7.0.0 + **/ +void * +hb_draw_funcs_get_user_data (const hb_draw_funcs_t *dfuncs, + hb_user_data_key_t *key) +{ + return hb_object_get_user_data (dfuncs, key); +} + /** * hb_draw_funcs_make_immutable: * @dfuncs: draw functions diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-draw.h b/source/libs/harfbuzz/harfbuzz-src/src/hb-draw.h index c45a53212aefe34556eec740f50c00257f383a2a..9ca0b4006e4497159fbdf1c4e5efa14aec74a654 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-draw.h +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-draw.h @@ -92,11 +92,11 @@ typedef struct hb_draw_funcs_t hb_draw_funcs_t; /** * hb_draw_move_to_func_t: * @dfuncs: draw functions object - * @draw_data: The data accompanying the draw functions + * @draw_data: The data accompanying the draw functions in hb_font_draw_glyph() * @st: current draw state * @to_x: X component of target point * @to_y: Y component of target point - * @user_data: User data pointer passed by the caller + * @user_data: User data pointer passed to hb_draw_funcs_set_move_to_func() * * A virtual method for the #hb_draw_funcs_t to perform a "move-to" draw * operation. @@ -112,11 +112,11 @@ typedef void (*hb_draw_move_to_func_t) (hb_draw_funcs_t *dfuncs, void *draw_data /** * hb_draw_line_to_func_t: * @dfuncs: draw functions object - * @draw_data: The data accompanying the draw functions + * @draw_data: The data accompanying the draw functions in hb_font_draw_glyph() * @st: current draw state * @to_x: X component of target point * @to_y: Y component of target point - * @user_data: User data pointer passed by the caller + * @user_data: User data pointer passed to hb_draw_funcs_set_line_to_func() * * A virtual method for the #hb_draw_funcs_t to perform a "line-to" draw * operation. @@ -132,13 +132,13 @@ typedef void (*hb_draw_line_to_func_t) (hb_draw_funcs_t *dfuncs, void *draw_data /** * hb_draw_quadratic_to_func_t: * @dfuncs: draw functions object - * @draw_data: The data accompanying the draw functions + * @draw_data: The data accompanying the draw functions in hb_font_draw_glyph() * @st: current draw state * @control_x: X component of control point * @control_y: Y component of control point * @to_x: X component of target point * @to_y: Y component of target point - * @user_data: User data pointer passed by the caller + * @user_data: User data pointer passed to hb_draw_funcs_set_quadratic_to_func() * * A virtual method for the #hb_draw_funcs_t to perform a "quadratic-to" draw * operation. @@ -155,7 +155,7 @@ typedef void (*hb_draw_quadratic_to_func_t) (hb_draw_funcs_t *dfuncs, void *draw /** * hb_draw_cubic_to_func_t: * @dfuncs: draw functions object - * @draw_data: The data accompanying the draw functions + * @draw_data: The data accompanying the draw functions in hb_font_draw_glyph() * @st: current draw state * @control1_x: X component of first control point * @control1_y: Y component of first control point @@ -163,7 +163,7 @@ typedef void (*hb_draw_quadratic_to_func_t) (hb_draw_funcs_t *dfuncs, void *draw * @control2_y: Y component of second control point * @to_x: X component of target point * @to_y: Y component of target point - * @user_data: User data pointer passed by the caller + * @user_data: User data pointer passed to hb_draw_funcs_set_cubic_to_func() * * A virtual method for the #hb_draw_funcs_t to perform a "cubic-to" draw * operation. @@ -181,9 +181,9 @@ typedef void (*hb_draw_cubic_to_func_t) (hb_draw_funcs_t *dfuncs, void *draw_dat /** * hb_draw_close_path_func_t: * @dfuncs: draw functions object - * @draw_data: The data accompanying the draw functions + * @draw_data: The data accompanying the draw functions in hb_font_draw_glyph() * @st: current draw state - * @user_data: User data pointer passed by the caller + * @user_data: User data pointer passed to hb_draw_funcs_set_close_path_func() * * A virtual method for the #hb_draw_funcs_t to perform a "close-path" draw * operation. @@ -279,12 +279,27 @@ hb_draw_funcs_set_close_path_func (hb_draw_funcs_t *dfuncs, HB_EXTERN hb_draw_funcs_t * hb_draw_funcs_create (void); +HB_EXTERN hb_draw_funcs_t * +hb_draw_funcs_get_empty (void); + HB_EXTERN hb_draw_funcs_t * hb_draw_funcs_reference (hb_draw_funcs_t *dfuncs); HB_EXTERN void hb_draw_funcs_destroy (hb_draw_funcs_t *dfuncs); +HB_EXTERN hb_bool_t +hb_draw_funcs_set_user_data (hb_draw_funcs_t *dfuncs, + hb_user_data_key_t *key, + void * data, + hb_destroy_func_t destroy, + hb_bool_t replace); + + +HB_EXTERN void * +hb_draw_funcs_get_user_data (const hb_draw_funcs_t *dfuncs, + hb_user_data_key_t *key); + HB_EXTERN void hb_draw_funcs_make_immutable (hb_draw_funcs_t *dfuncs); diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-face-builder.cc b/source/libs/harfbuzz/harfbuzz-src/src/hb-face-builder.cc new file mode 100644 index 0000000000000000000000000000000000000000..84b14d28d60bf96c60c0d5787feb9864e8e550e7 --- /dev/null +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-face-builder.cc @@ -0,0 +1,246 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * Copyright © 2012 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * 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. + * + * Red Hat Author(s): Behdad Esfahbod + * Google Author(s): Behdad Esfahbod + */ + +#include "hb.hh" + +#include "hb-face.hh" + +#include "hb-map.hh" +#include "hb-open-file.hh" +#include "hb-serialize.hh" + + +/* + * face-builder: A face that has add_table(). + */ + +struct face_table_info_t +{ + hb_blob_t* data; + signed order; +}; + +struct hb_face_builder_data_t +{ + hb_hashmap_t<hb_tag_t, face_table_info_t> tables; +}; + +static int compare_entries (const void* pa, const void* pb) +{ + const auto& a = * (const hb_pair_t<hb_tag_t, face_table_info_t> *) pa; + const auto& b = * (const hb_pair_t<hb_tag_t, face_table_info_t> *) pb; + + /* Order by blob size first (smallest to largest) and then table tag */ + + if (a.second.order != b.second.order) + return a.second.order < b.second.order ? -1 : +1; + + if (a.second.data->length != b.second.data->length) + return a.second.data->length < b.second.data->length ? -1 : +1; + + return a.first < b.first ? -1 : a.first == b.first ? 0 : +1; +} + +static hb_face_builder_data_t * +_hb_face_builder_data_create () +{ + hb_face_builder_data_t *data = (hb_face_builder_data_t *) hb_calloc (1, sizeof (hb_face_builder_data_t)); + if (unlikely (!data)) + return nullptr; + + data->tables.init (); + + return data; +} + +static void +_hb_face_builder_data_destroy (void *user_data) +{ + hb_face_builder_data_t *data = (hb_face_builder_data_t *) user_data; + + for (auto info : data->tables.values()) + hb_blob_destroy (info.data); + + data->tables.fini (); + + hb_free (data); +} + +static hb_blob_t * +_hb_face_builder_data_reference_blob (hb_face_builder_data_t *data) +{ + + unsigned int table_count = data->tables.get_population (); + unsigned int face_length = table_count * 16 + 12; + + for (auto info : data->tables.values()) + face_length += hb_ceil_to_4 (hb_blob_get_length (info.data)); + + char *buf = (char *) hb_malloc (face_length); + if (unlikely (!buf)) + return nullptr; + + hb_serialize_context_t c (buf, face_length); + c.propagate_error (data->tables); + OT::OpenTypeFontFile *f = c.start_serialize<OT::OpenTypeFontFile> (); + + bool is_cff = (data->tables.has (HB_TAG ('C','F','F',' ')) + || data->tables.has (HB_TAG ('C','F','F','2'))); + hb_tag_t sfnt_tag = is_cff ? OT::OpenTypeFontFile::CFFTag : OT::OpenTypeFontFile::TrueTypeTag; + + // Sort the tags so that produced face is deterministic. + hb_vector_t<hb_pair_t <hb_tag_t, face_table_info_t>> sorted_entries; + data->tables.iter () | hb_sink (sorted_entries); + if (unlikely (sorted_entries.in_error ())) + { + hb_free (buf); + return nullptr; + } + + sorted_entries.qsort (compare_entries); + + bool ret = f->serialize_single (&c, + sfnt_tag, + + sorted_entries.iter() + | hb_map ([&] (hb_pair_t<hb_tag_t, face_table_info_t> _) { + return hb_pair_t<hb_tag_t, hb_blob_t*> (_.first, _.second.data); + })); + + c.end_serialize (); + + if (unlikely (!ret)) + { + hb_free (buf); + return nullptr; + } + + return hb_blob_create (buf, face_length, HB_MEMORY_MODE_WRITABLE, buf, hb_free); +} + +static hb_blob_t * +_hb_face_builder_reference_table (hb_face_t *face HB_UNUSED, hb_tag_t tag, void *user_data) +{ + hb_face_builder_data_t *data = (hb_face_builder_data_t *) user_data; + + if (!tag) + return _hb_face_builder_data_reference_blob (data); + + return hb_blob_reference (data->tables[tag].data); +} + + +/** + * hb_face_builder_create: + * + * Creates a #hb_face_t that can be used with hb_face_builder_add_table(). + * After tables are added to the face, it can be compiled to a binary + * font file by calling hb_face_reference_blob(). + * + * Return value: (transfer full): New face. + * + * Since: 1.9.0 + **/ +hb_face_t * +hb_face_builder_create () +{ + hb_face_builder_data_t *data = _hb_face_builder_data_create (); + if (unlikely (!data)) return hb_face_get_empty (); + + return hb_face_create_for_tables (_hb_face_builder_reference_table, + data, + _hb_face_builder_data_destroy); +} + +/** + * hb_face_builder_add_table: + * @face: A face object created with hb_face_builder_create() + * @tag: The #hb_tag_t of the table to add + * @blob: The blob containing the table data to add + * + * Add table for @tag with data provided by @blob to the face. @face must + * be created using hb_face_builder_create(). + * + * Since: 1.9.0 + **/ +hb_bool_t +hb_face_builder_add_table (hb_face_t *face, hb_tag_t tag, hb_blob_t *blob) +{ + if (unlikely (face->destroy != (hb_destroy_func_t) _hb_face_builder_data_destroy)) + return false; + + if (tag == HB_MAP_VALUE_INVALID) + return false; + + hb_face_builder_data_t *data = (hb_face_builder_data_t *) face->user_data; + + hb_blob_t* previous = data->tables.get (tag).data; + if (!data->tables.set (tag, face_table_info_t {hb_blob_reference (blob), -1})) + { + hb_blob_destroy (blob); + return false; + } + + hb_blob_destroy (previous); + return true; +} + +/** + * hb_face_builder_sort_tables: + * @face: A face object created with hb_face_builder_create() + * @tags: (array zero-terminated=1): ordered list of table tags terminated by + * %HB_TAG_NONE + * + * Set the ordering of tables for serialization. Any tables not + * specified in the tags list will be ordered after the tables in + * tags, ordered by the default sort ordering. + * + * Since: 5.3.0 + **/ +void +hb_face_builder_sort_tables (hb_face_t *face, + const hb_tag_t *tags) +{ + if (unlikely (face->destroy != (hb_destroy_func_t) _hb_face_builder_data_destroy)) + return; + + hb_face_builder_data_t *data = (hb_face_builder_data_t *) face->user_data; + + // Sort all unspecified tables after any specified tables. + for (auto& info : data->tables.values_ref()) + info.order = (unsigned) -1; + + signed order = 0; + for (const hb_tag_t* tag = tags; + *tag; + tag++) + { + face_table_info_t* info; + if (!data->tables.has (*tag, &info)) continue; + info->order = order++; + } +} diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-face.cc b/source/libs/harfbuzz/harfbuzz-src/src/hb-face.cc index 8b4b635c7a7c33e56465796944922ac360b3a9f5..5fcc4e93d9ab363586932898a8048663425e1331 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-face.cc +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-face.cc @@ -33,7 +33,6 @@ #include "hb-open-file.hh" #include "hb-ot-face.hh" #include "hb-ot-cmap-table.hh" -#include "hb-map.hh" /** @@ -472,6 +471,8 @@ hb_face_get_index (const hb_face_t *face) * * Sets the units-per-em (upem) for a face object to the specified value. * + * This API is used in rare circumstances. + * * Since: 0.9.2 **/ void @@ -488,7 +489,10 @@ hb_face_set_upem (hb_face_t *face, * hb_face_get_upem: * @face: A face object * - * Fetches the units-per-em (upem) value of the specified face object. + * Fetches the units-per-em (UPEM) value of the specified face object. + * + * Typical UPEM values for fonts are 1000, or 2048, but any value + * in between 16 and 16,384 is allowed for OpenType fonts. * * Return value: The upem value of @face * @@ -507,6 +511,8 @@ hb_face_get_upem (const hb_face_t *face) * * Sets the glyph count for a face object to the specified value. * + * This API is used in rare circumstances. + * * Since: 0.9.7 **/ void @@ -581,7 +587,7 @@ hb_face_get_table_tags (const hb_face_t *face, /** * hb_face_collect_unicodes: * @face: A face object - * @out: The set to add Unicode characters to + * @out: (out): The set to add Unicode characters to * * Collects all of the Unicode characters covered by @face and adds * them to the #hb_set_t set @out. @@ -594,10 +600,31 @@ hb_face_collect_unicodes (hb_face_t *face, { face->table.cmap->collect_unicodes (out, face->get_num_glyphs ()); } +/** + * hb_face_collect_nominal_glyph_mapping: + * @face: A face object + * @mapping: (out): The map to add Unicode-to-glyph mapping to + * @unicodes: (nullable) (out): The set to add Unicode characters to, or `NULL` + * + * Collects the mapping from Unicode characters to nominal glyphs of the @face, + * and optionally all of the Unicode characters covered by @face. + * + * Since: 7.0.0 + */ +void +hb_face_collect_nominal_glyph_mapping (hb_face_t *face, + hb_map_t *mapping, + hb_set_t *unicodes) +{ + hb_set_t stack_unicodes; + if (!unicodes) + unicodes = &stack_unicodes; + face->table.cmap->collect_mapping (unicodes, mapping, face->get_num_glyphs ()); +} /** * hb_face_collect_variation_selectors: * @face: A face object - * @out: The set to add Variation Selector characters to + * @out: (out): The set to add Variation Selector characters to * * Collects all Unicode "Variation Selector" characters covered by @face and adds * them to the #hb_set_t set @out. @@ -614,7 +641,7 @@ hb_face_collect_variation_selectors (hb_face_t *face, * hb_face_collect_variation_unicodes: * @face: A face object * @variation_selector: The Variation Selector to query - * @out: The set to add Unicode characters to + * @out: (out): The set to add Unicode characters to * * Collects all Unicode characters for @variation_selector covered by @face and adds * them to the #hb_set_t set @out. @@ -629,214 +656,3 @@ hb_face_collect_variation_unicodes (hb_face_t *face, face->table.cmap->collect_variation_unicodes (variation_selector, out); } #endif - - -/* - * face-builder: A face that has add_table(). - */ - -struct face_table_info_t -{ - hb_blob_t* data; - signed order; -}; - -struct hb_face_builder_data_t -{ - hb_hashmap_t<hb_tag_t, face_table_info_t> tables; -}; - -static int compare_entries (const void* pa, const void* pb) -{ - const auto& a = * (const hb_pair_t<hb_tag_t, face_table_info_t> *) pa; - const auto& b = * (const hb_pair_t<hb_tag_t, face_table_info_t> *) pb; - - /* Order by blob size first (smallest to largest) and then table tag */ - - if (a.second.order != b.second.order) - return a.second.order < b.second.order ? -1 : +1; - - if (a.second.data->length != b.second.data->length) - return a.second.data->length < b.second.data->length ? -1 : +1; - - return a.first < b.first ? -1 : a.first == b.first ? 0 : +1; -} - -static hb_face_builder_data_t * -_hb_face_builder_data_create () -{ - hb_face_builder_data_t *data = (hb_face_builder_data_t *) hb_calloc (1, sizeof (hb_face_builder_data_t)); - if (unlikely (!data)) - return nullptr; - - data->tables.init (); - - return data; -} - -static void -_hb_face_builder_data_destroy (void *user_data) -{ - hb_face_builder_data_t *data = (hb_face_builder_data_t *) user_data; - - for (auto info : data->tables.values()) - hb_blob_destroy (info.data); - - data->tables.fini (); - - hb_free (data); -} - -static hb_blob_t * -_hb_face_builder_data_reference_blob (hb_face_builder_data_t *data) -{ - - unsigned int table_count = data->tables.get_population (); - unsigned int face_length = table_count * 16 + 12; - - for (auto info : data->tables.values()) - face_length += hb_ceil_to_4 (hb_blob_get_length (info.data)); - - char *buf = (char *) hb_malloc (face_length); - if (unlikely (!buf)) - return nullptr; - - hb_serialize_context_t c (buf, face_length); - c.propagate_error (data->tables); - OT::OpenTypeFontFile *f = c.start_serialize<OT::OpenTypeFontFile> (); - - bool is_cff = (data->tables.has (HB_TAG ('C','F','F',' ')) - || data->tables.has (HB_TAG ('C','F','F','2'))); - hb_tag_t sfnt_tag = is_cff ? OT::OpenTypeFontFile::CFFTag : OT::OpenTypeFontFile::TrueTypeTag; - - // Sort the tags so that produced face is deterministic. - hb_vector_t<hb_pair_t <hb_tag_t, face_table_info_t>> sorted_entries; - data->tables.iter () | hb_sink (sorted_entries); - if (unlikely (sorted_entries.in_error ())) - { - hb_free (buf); - return nullptr; - } - - sorted_entries.qsort (compare_entries); - - bool ret = f->serialize_single (&c, - sfnt_tag, - + sorted_entries.iter() - | hb_map ([&] (hb_pair_t<hb_tag_t, face_table_info_t> _) { - return hb_pair_t<hb_tag_t, hb_blob_t*> (_.first, _.second.data); - })); - - c.end_serialize (); - - if (unlikely (!ret)) - { - hb_free (buf); - return nullptr; - } - - return hb_blob_create (buf, face_length, HB_MEMORY_MODE_WRITABLE, buf, hb_free); -} - -static hb_blob_t * -_hb_face_builder_reference_table (hb_face_t *face HB_UNUSED, hb_tag_t tag, void *user_data) -{ - hb_face_builder_data_t *data = (hb_face_builder_data_t *) user_data; - - if (!tag) - return _hb_face_builder_data_reference_blob (data); - - return hb_blob_reference (data->tables[tag].data); -} - - -/** - * hb_face_builder_create: - * - * Creates a #hb_face_t that can be used with hb_face_builder_add_table(). - * After tables are added to the face, it can be compiled to a binary - * font file by calling hb_face_reference_blob(). - * - * Return value: (transfer full): New face. - * - * Since: 1.9.0 - **/ -hb_face_t * -hb_face_builder_create () -{ - hb_face_builder_data_t *data = _hb_face_builder_data_create (); - if (unlikely (!data)) return hb_face_get_empty (); - - return hb_face_create_for_tables (_hb_face_builder_reference_table, - data, - _hb_face_builder_data_destroy); -} - -/** - * hb_face_builder_add_table: - * @face: A face object created with hb_face_builder_create() - * @tag: The #hb_tag_t of the table to add - * @blob: The blob containing the table data to add - * - * Add table for @tag with data provided by @blob to the face. @face must - * be created using hb_face_builder_create(). - * - * Since: 1.9.0 - **/ -hb_bool_t -hb_face_builder_add_table (hb_face_t *face, hb_tag_t tag, hb_blob_t *blob) -{ - if (unlikely (face->destroy != (hb_destroy_func_t) _hb_face_builder_data_destroy)) - return false; - - if (tag == HB_MAP_VALUE_INVALID) - return false; - - hb_face_builder_data_t *data = (hb_face_builder_data_t *) face->user_data; - - hb_blob_t* previous = data->tables.get (tag).data; - if (!data->tables.set (tag, face_table_info_t {hb_blob_reference (blob), -1})) - { - hb_blob_destroy (blob); - return false; - } - - hb_blob_destroy (previous); - return true; -} - -/** - * hb_face_builder_sort_tables: - * @face: A face object created with hb_face_builder_create() - * @tags: (array zero-terminated=1): ordered list of table tags terminated by - * %HB_TAG_NONE - * - * Set the ordering of tables for serialization. Any tables not - * specified in the tags list will be ordered after the tables in - * tags, ordered by the default sort ordering. - * - * Since: 5.3.0 - **/ -void -hb_face_builder_sort_tables (hb_face_t *face, - const hb_tag_t *tags) -{ - if (unlikely (face->destroy != (hb_destroy_func_t) _hb_face_builder_data_destroy)) - return; - - hb_face_builder_data_t *data = (hb_face_builder_data_t *) face->user_data; - - // Sort all unspecified tables after any specified tables. - for (auto& info : data->tables.values_ref()) - info.order = (unsigned) -1; - - signed order = 0; - for (const hb_tag_t* tag = tags; - *tag; - tag++) - { - face_table_info_t* info; - if (!data->tables.has (*tag, &info)) continue; - info->order = order++; - } -} diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-face.h b/source/libs/harfbuzz/harfbuzz-src/src/hb-face.h index 38e7104af64bdb5ceab5473b7273dce971c4ffff..2e54ccf13b77939b6d158058bba20f03146f2232 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-face.h +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-face.h @@ -33,6 +33,7 @@ #include "hb-common.h" #include "hb-blob.h" +#include "hb-map.h" #include "hb-set.h" HB_BEGIN_DECLS @@ -149,6 +150,11 @@ HB_EXTERN void hb_face_collect_unicodes (hb_face_t *face, hb_set_t *out); +HB_EXTERN void +hb_face_collect_nominal_glyph_mapping (hb_face_t *face, + hb_map_t *mapping, + hb_set_t *unicodes); + HB_EXTERN void hb_face_collect_variation_selectors (hb_face_t *face, hb_set_t *out); diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-font.cc b/source/libs/harfbuzz/harfbuzz-src/src/hb-font.cc index 0ce3e2608a73dbff765237eea3e29525c17e7edf..3868863105f9ecda2e55907d67cbfaf1cfa7d36a 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-font.cc +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-font.cc @@ -30,6 +30,7 @@ #include "hb-font.hh" #include "hb-draw.hh" +#include "hb-paint.hh" #include "hb-machinery.hh" #include "hb-ot.h" @@ -503,23 +504,34 @@ hb_font_get_glyph_from_name_default (hb_font_t *font, } static void -hb_font_get_glyph_shape_nil (hb_font_t *font HB_UNUSED, - void *font_data HB_UNUSED, - hb_codepoint_t glyph, - hb_draw_funcs_t *draw_funcs, - void *draw_data, - void *user_data HB_UNUSED) +hb_font_draw_glyph_nil (hb_font_t *font HB_UNUSED, + void *font_data HB_UNUSED, + hb_codepoint_t glyph, + hb_draw_funcs_t *draw_funcs, + void *draw_data, + void *user_data HB_UNUSED) { } +static void +hb_font_paint_glyph_nil (hb_font_t *font HB_UNUSED, + void *font_data HB_UNUSED, + hb_codepoint_t glyph HB_UNUSED, + hb_paint_funcs_t *paint_funcs HB_UNUSED, + void *paint_data HB_UNUSED, + unsigned int palette HB_UNUSED, + hb_color_t foreground HB_UNUSED, + void *user_data HB_UNUSED) +{ +} -typedef struct hb_font_get_glyph_shape_default_adaptor_t { +typedef struct hb_font_draw_glyph_default_adaptor_t { hb_draw_funcs_t *draw_funcs; void *draw_data; float x_scale; float y_scale; float slant; -} hb_font_get_glyph_shape_default_adaptor_t; +} hb_font_draw_glyph_default_adaptor_t; static void hb_draw_move_to_default (hb_draw_funcs_t *dfuncs HB_UNUSED, @@ -528,7 +540,7 @@ hb_draw_move_to_default (hb_draw_funcs_t *dfuncs HB_UNUSED, float to_x, float to_y, void *user_data HB_UNUSED) { - hb_font_get_glyph_shape_default_adaptor_t *adaptor = (hb_font_get_glyph_shape_default_adaptor_t *) draw_data; + hb_font_draw_glyph_default_adaptor_t *adaptor = (hb_font_draw_glyph_default_adaptor_t *) draw_data; float x_scale = adaptor->x_scale; float y_scale = adaptor->y_scale; float slant = adaptor->slant; @@ -543,7 +555,7 @@ hb_draw_line_to_default (hb_draw_funcs_t *dfuncs HB_UNUSED, void *draw_data, float to_x, float to_y, void *user_data HB_UNUSED) { - hb_font_get_glyph_shape_default_adaptor_t *adaptor = (hb_font_get_glyph_shape_default_adaptor_t *) draw_data; + hb_font_draw_glyph_default_adaptor_t *adaptor = (hb_font_draw_glyph_default_adaptor_t *) draw_data; float x_scale = adaptor->x_scale; float y_scale = adaptor->y_scale; float slant = adaptor->slant; @@ -562,7 +574,7 @@ hb_draw_quadratic_to_default (hb_draw_funcs_t *dfuncs HB_UNUSED, void *draw_data float to_x, float to_y, void *user_data HB_UNUSED) { - hb_font_get_glyph_shape_default_adaptor_t *adaptor = (hb_font_get_glyph_shape_default_adaptor_t *) draw_data; + hb_font_draw_glyph_default_adaptor_t *adaptor = (hb_font_draw_glyph_default_adaptor_t *) draw_data; float x_scale = adaptor->x_scale; float y_scale = adaptor->y_scale; float slant = adaptor->slant; @@ -583,7 +595,7 @@ hb_draw_cubic_to_default (hb_draw_funcs_t *dfuncs HB_UNUSED, void *draw_data, float to_x, float to_y, void *user_data HB_UNUSED) { - hb_font_get_glyph_shape_default_adaptor_t *adaptor = (hb_font_get_glyph_shape_default_adaptor_t *) draw_data; + hb_font_draw_glyph_default_adaptor_t *adaptor = (hb_font_draw_glyph_default_adaptor_t *) draw_data; float x_scale = adaptor->x_scale; float y_scale = adaptor->y_scale; float slant = adaptor->slant; @@ -602,7 +614,7 @@ hb_draw_close_path_default (hb_draw_funcs_t *dfuncs HB_UNUSED, void *draw_data, hb_draw_state_t *st, void *user_data HB_UNUSED) { - hb_font_get_glyph_shape_default_adaptor_t *adaptor = (hb_font_get_glyph_shape_default_adaptor_t *) draw_data; + hb_font_draw_glyph_default_adaptor_t *adaptor = (hb_font_draw_glyph_default_adaptor_t *) draw_data; adaptor->draw_funcs->emit_close_path (adaptor->draw_data, *st); } @@ -618,14 +630,14 @@ static const hb_draw_funcs_t _hb_draw_funcs_default = { }; static void -hb_font_get_glyph_shape_default (hb_font_t *font, +hb_font_draw_glyph_default (hb_font_t *font, void *font_data HB_UNUSED, hb_codepoint_t glyph, hb_draw_funcs_t *draw_funcs, void *draw_data, void *user_data HB_UNUSED) { - hb_font_get_glyph_shape_default_adaptor_t adaptor = { + hb_font_draw_glyph_default_adaptor_t adaptor = { draw_funcs, draw_data, font->parent->x_scale ? (float) font->x_scale / (float) font->parent->x_scale : 0.f, @@ -634,11 +646,34 @@ hb_font_get_glyph_shape_default (hb_font_t *font, (float) font->x_scale / (float) font->parent->y_scale : 0.f }; - font->parent->get_glyph_shape (glyph, + font->parent->draw_glyph (glyph, const_cast<hb_draw_funcs_t *> (&_hb_draw_funcs_default), &adaptor); } +static void +hb_font_paint_glyph_default (hb_font_t *font, + void *font_data, + hb_codepoint_t glyph, + hb_paint_funcs_t *paint_funcs, + void *paint_data, + unsigned int palette, + hb_color_t foreground, + void *user_data) +{ + paint_funcs->push_transform (paint_data, + font->parent->x_scale ? (float) font->x_scale / (float) font->parent->x_scale : 0.f, + font->parent->y_scale ? (font->slant - font->parent->slant) * + (float) font->x_scale / (float) font->parent->y_scale : 0.f, + 0.f, + font->parent->y_scale ? (float) font->y_scale / (float) font->parent->y_scale : 0.f, + 0.f, 0.f); + + font->parent->paint_glyph (glyph, paint_funcs, paint_data, palette, foreground); + + paint_funcs->pop_transform (paint_data); +} + DEFINE_NULL_INSTANCE (hb_font_funcs_t) = { HB_OBJECT_HEADER_STATIC, @@ -647,7 +682,7 @@ DEFINE_NULL_INSTANCE (hb_font_funcs_t) = nullptr, { { -#define HB_FONT_FUNC_IMPLEMENT(name) hb_font_get_##name##_nil, +#define HB_FONT_FUNC_IMPLEMENT(get_,name) hb_font_##get_##name##_nil, HB_FONT_FUNCS_IMPLEMENT_CALLBACKS #undef HB_FONT_FUNC_IMPLEMENT } @@ -661,7 +696,7 @@ static const hb_font_funcs_t _hb_font_funcs_default = { nullptr, { { -#define HB_FONT_FUNC_IMPLEMENT(name) hb_font_get_##name##_default, +#define HB_FONT_FUNC_IMPLEMENT(get_,name) hb_font_##get_##name##_default, HB_FONT_FUNCS_IMPLEMENT_CALLBACKS #undef HB_FONT_FUNC_IMPLEMENT } @@ -739,7 +774,7 @@ hb_font_funcs_destroy (hb_font_funcs_t *ffuncs) if (ffuncs->destroy) { -#define HB_FONT_FUNC_IMPLEMENT(name) if (ffuncs->destroy->name) \ +#define HB_FONT_FUNC_IMPLEMENT(get_,name) if (ffuncs->destroy->name) \ ffuncs->destroy->name (!ffuncs->user_data ? nullptr : ffuncs->user_data->name); HB_FONT_FUNCS_IMPLEMENT_CALLBACKS #undef HB_FONT_FUNC_IMPLEMENT @@ -879,11 +914,11 @@ fail: return false; } -#define HB_FONT_FUNC_IMPLEMENT(name) \ +#define HB_FONT_FUNC_IMPLEMENT(get_,name) \ \ void \ hb_font_funcs_set_##name##_func (hb_font_funcs_t *ffuncs, \ - hb_font_get_##name##_func_t func, \ + hb_font_##get_##name##_func_t func, \ void *user_data, \ hb_destroy_func_t destroy) \ { \ @@ -899,7 +934,7 @@ hb_font_funcs_set_##name##_func (hb_font_funcs_t *ffuncs, \ if (func) \ ffuncs->get.f.name = func; \ else \ - ffuncs->get.f.name = hb_font_get_##name##_default; \ + ffuncs->get.f.name = hb_font_##get_##name##_default; \ \ if (ffuncs->user_data) \ ffuncs->user_data->name = user_data; \ @@ -1026,7 +1061,8 @@ hb_font_get_nominal_glyph (hb_font_t *font, * @glyph_stride: The stride between successive glyph IDs * * Fetches the nominal glyph IDs for a sequence of Unicode code points. Glyph - * IDs must be returned in a #hb_codepoint_t output parameter. + * IDs must be returned in a #hb_codepoint_t output parameter. Stopes at the + * first unsupported glyph ID. * * Return value: the number of code points processed * @@ -1308,6 +1344,9 @@ hb_font_get_glyph_contour_point (hb_font_t *font, * * Fetches the glyph-name string for a glyph ID in the specified @font. * + * According to the OpenType specification, glyph names are limited to 63 + * characters and can only contain (a subset of) ASCII. + * * Return value: `true` if data found, `false` otherwise * * Since: 0.9.2 @@ -1357,13 +1396,67 @@ hb_font_get_glyph_from_name (hb_font_t *font, * objects, with @draw_data passed to them. * * Since: 4.0.0 - **/ + * Deprecated: 7.0.0: Use hb_font_draw_glyph() instead + */ void hb_font_get_glyph_shape (hb_font_t *font, + hb_codepoint_t glyph, + hb_draw_funcs_t *dfuncs, void *draw_data) +{ + hb_font_draw_glyph (font, glyph, dfuncs, draw_data); +} + +/** + * hb_font_draw_glyph: + * @font: #hb_font_t to work upon + * @glyph: : The glyph ID + * @dfuncs: #hb_draw_funcs_t to draw to + * @draw_data: User data to pass to draw callbacks + * + * Draws the outline that corresponds to a glyph in the specified @font. + * + * The outline is returned by way of calls to the callbacks of the @dfuncs + * objects, with @draw_data passed to them. + * + * Since: 7.0.0 + **/ +void +hb_font_draw_glyph (hb_font_t *font, hb_codepoint_t glyph, hb_draw_funcs_t *dfuncs, void *draw_data) { - font->get_glyph_shape (glyph, dfuncs, draw_data); + font->draw_glyph (glyph, dfuncs, draw_data); +} + +/** + * hb_font_paint_glyph: + * @font: #hb_font_t to work upon + * @glyph: The glyph ID + * @pfuncs: #hb_paint_funcs_t to paint with + * @paint_data: User data to pass to paint callbacks + * @palette_index: The index of the font's color palette to use + * @foreground: The foreground color, unpremultipled + * + * Paints the glyph. + * + * The painting instructions are returned by way of calls to + * the callbacks of the @funcs object, with @paint_data passed + * to them. + * + * If the font has color palettes (see hb_ot_color_has_palettes()), + * then @palette_index selects the palette to use. If the font only + * has one palette, this will be 0. + * + * Since: 7.0.0 + */ +void +hb_font_paint_glyph (hb_font_t *font, + hb_codepoint_t glyph, + hb_paint_funcs_t *pfuncs, void *paint_data, + unsigned int palette_index, + hb_color_t foreground) +{ + font->paint_glyph (glyph, pfuncs, paint_data, palette_index, foreground); } /* A bit higher-level, and with fallback */ @@ -1624,6 +1717,9 @@ hb_font_get_glyph_contour_point_for_origin (hb_font_t *font, * If the glyph ID has no name in @font, a string of the form `gidDDD` is * generated, with `DDD` being the glyph ID. * + * According to the OpenType specification, glyph names are limited to 63 + * characters and can only contain (a subset of) ASCII. + * * Since: 0.9.2 **/ void @@ -1677,8 +1773,13 @@ DEFINE_NULL_INSTANCE (hb_font_t) = 1000, /* x_scale */ 1000, /* y_scale */ - 0., /* slant */ - 0., /* slant_xy; */ + 0.f, /* x_embolden */ + 0.f, /* y_embolden */ + true, /* embolden_in_place */ + 0, /* x_strength */ + 0, /* y_strength */ + 0.f, /* slant */ + 0.f, /* slant_xy; */ 1.f, /* x_multf */ 1.f, /* y_multf */ 1<<16, /* x_mult */ @@ -1688,6 +1789,7 @@ DEFINE_NULL_INSTANCE (hb_font_t) = 0, /* y_ppem */ 0, /* ptem */ + HB_FONT_NO_VAR_NAMED_INSTANCE, /* instance_index */ 0, /* num_coords */ nullptr, /* coords */ nullptr, /* design_coords */ @@ -1715,8 +1817,10 @@ _hb_font_create (hb_face_t *face) font->klass = hb_font_funcs_get_empty (); font->data.init0 (font); font->x_scale = font->y_scale = face->get_upem (); + font->embolden_in_place = true; font->x_multf = font->y_multf = 1.f; font->x_mult = font->y_mult = 1 << 16; + font->instance_index = HB_FONT_NO_VAR_NAMED_INSTANCE; return font; } @@ -1798,6 +1902,9 @@ hb_font_create_sub_font (hb_font_t *parent) font->x_scale = parent->x_scale; font->y_scale = parent->y_scale; + font->x_embolden = parent->x_embolden; + font->y_embolden = parent->y_embolden; + font->embolden_in_place = parent->embolden_in_place; font->slant = parent->slant; font->x_ppem = parent->x_ppem; font->y_ppem = parent->y_ppem; @@ -2187,6 +2294,31 @@ hb_font_set_funcs_data (hb_font_t *font, * * Sets the horizontal and vertical scale of a font. * + * The font scale is a number related to, but not the same as, + * font size. Typically the client establishes a scale factor + * to be used between the two. For example, 64, or 256, which + * would be the fractional-precision part of the font scale. + * This is necessary because #hb_position_t values are integer + * types and you need to leave room for fractional values + * in there. + * + * For example, to set the font size to 20, with 64 + * levels of fractional precision you would call + * `hb_font_set_scale(font, 20 * 64, 20 * 64)`. + * + * In the example above, even what font size 20 means is up to + * you. It might be 20 pixels, or 20 points, or 20 millimeters. + * HarfBuzz does not care about that. You can set the point + * size of the font using hb_font_set_ptem(), and the pixel + * size using hb_font_set_ppem(). + * + * The choice of scale is yours but needs to be consistent between + * what you set here, and what you expect out of #hb_position_t + * as well has draw / paint API output values. + * + * Fonts default to a scale equal to the UPEM value of their face. + * A font with this setting is sometimes called an "unscaled" font. + * * Since: 0.9.2 **/ void @@ -2232,7 +2364,11 @@ hb_font_get_scale (hb_font_t *font, * @x_ppem: Horizontal ppem value to assign * @y_ppem: Vertical ppem value to assign * - * Sets the horizontal and vertical pixels-per-em (ppem) of a font. + * Sets the horizontal and vertical pixels-per-em (PPEM) of a font. + * + * These values are used for pixel-size-specific adjustment to + * shaping and draw results, though for the most part they are + * unused and can be left unset. * * Since: 0.9.2 **/ @@ -2316,6 +2452,76 @@ hb_font_get_ptem (hb_font_t *font) return font->ptem; } +/** + * hb_font_set_synthetic_bold: + * @font: #hb_font_t to work upon + * @x_embolden: the amount to embolden horizontally + * @y_embolden: the amount to embolden vertically + * @in_place: whether to embolden glyphs in-place + * + * Sets the "synthetic boldness" of a font. + * + * Positive values for @x_embolden / @y_embolden make a font + * bolder, negative values thinner. Typical values are in the + * 0.01 to 0.05 range. The default value is zero. + * + * Synthetic boldness is applied by offsetting the contour + * points of the glyph shape. + * + * Synthetic boldness is applied when rendering a glyph via + * hb_font_draw_glyph(). + * + * If @in_place is `false`, then glyph advance-widths are also + * adjusted, otherwise they are not. The in-place mode is + * useful for simulating [font grading](https://fonts.google.com/knowledge/glossary/grade). + * + * + * Since: 7.0.0 + **/ +void +hb_font_set_synthetic_bold (hb_font_t *font, + float x_embolden, + float y_embolden, + hb_bool_t in_place) +{ + if (hb_object_is_immutable (font)) + return; + + if (font->x_embolden == x_embolden && + font->y_embolden == y_embolden && + font->embolden_in_place == (bool) in_place) + return; + + font->serial++; + + font->x_embolden = x_embolden; + font->y_embolden = y_embolden; + font->embolden_in_place = in_place; + font->mults_changed (); +} + +/** + * hb_font_get_synthetic_bold: + * @font: #hb_font_t to work upon + * @x_embolden: (out): return location for horizontal value + * @y_embolden: (out): return location for vertical value + * @in_place: (out): return location for in-place value + * + * Fetches the "synthetic boldness" parameters of a font. + * + * Since: 7.0.0 + **/ +void +hb_font_get_synthetic_bold (hb_font_t *font, + float *x_embolden, + float *y_embolden, + hb_bool_t *in_place) +{ + if (x_embolden) *x_embolden = font->x_embolden; + if (y_embolden) *y_embolden = font->y_embolden; + if (in_place) *in_place = font->embolden_in_place; +} + /** * hb_font_set_synthetic_slant: * @font: #hb_font_t to work upon @@ -2328,9 +2534,8 @@ hb_font_get_ptem (hb_font_t *font) * HarfBuzz needs to know this value to adjust shaping results, * metrics, and style values to match the slanted rendering. * - * <note>Note: The glyph shape fetched via the - * hb_font_get_glyph_shape() is slanted to reflect this value - * as well.</note> + * <note>Note: The glyph shape fetched via the hb_font_draw_glyph() + * function is slanted to reflect this value as well.</note> * * <note>Note: The slant value is a ratio. For example, a * 20% slant would be represented as a 0.2 value.</note> @@ -2397,7 +2602,7 @@ hb_font_set_variations (hb_font_t *font, font->serial_coords = ++font->serial; - if (!variations_length) + if (!variations_length && font->instance_index == HB_FONT_NO_VAR_NAMED_INSTANCE) { hb_font_set_var_coords_normalized (font, nullptr, 0); return; @@ -2417,9 +2622,18 @@ hb_font_set_variations (hb_font_t *font, return; } - /* Initialize design coords to default from fvar. */ + /* Initialize design coords. */ for (unsigned int i = 0; i < coords_length; i++) design_coords[i] = axes[i].get_default (); + if (font->instance_index != HB_FONT_NO_VAR_NAMED_INSTANCE) + { + unsigned count = coords_length; + /* This may fail if index is out-of-range; + * That's why we initialize design_coords from fvar above + * unconditionally. */ + hb_ot_var_named_instance_get_design_coords (font->face, font->instance_index, + &count, design_coords); + } for (unsigned int i = 0; i < variations_length; i++) { @@ -2427,13 +2641,11 @@ hb_font_set_variations (hb_font_t *font, const auto v = variations[i].value; for (unsigned axis_index = 0; axis_index < coords_length; axis_index++) if (axes[axis_index].axisTag == tag) - { design_coords[axis_index] = v; - normalized[axis_index] = fvar.normalize_axis_value (axis_index, v); - } } font->face->table.avar->map_coords (normalized, coords_length); + hb_ot_var_normalize_coords (font->face, coords_length, design_coords, normalized); _hb_font_adopt_var_coords (font, normalized, design_coords, coords_length); } @@ -2484,28 +2696,40 @@ hb_font_set_var_coords_design (hb_font_t *font, * @font: a font. * @instance_index: named instance index. * - * Sets design coords of a font from a named instance index. + * Sets design coords of a font from a named-instance index. * * Since: 2.6.0 */ void hb_font_set_var_named_instance (hb_font_t *font, - unsigned instance_index) + unsigned int instance_index) { if (hb_object_is_immutable (font)) return; - font->serial_coords = ++font->serial; + if (font->instance_index == instance_index) + return; - unsigned int coords_length = hb_ot_var_named_instance_get_design_coords (font->face, instance_index, nullptr, nullptr); + font->serial_coords = ++font->serial; - float *coords = coords_length ? (float *) hb_calloc (coords_length, sizeof (float)) : nullptr; - if (unlikely (coords_length && !coords)) - return; + font->instance_index = instance_index; + hb_font_set_variations (font, nullptr, 0); +} - hb_ot_var_named_instance_get_design_coords (font->face, instance_index, &coords_length, coords); - hb_font_set_var_coords_design (font, coords, coords_length); - hb_free (coords); +/** + * hb_font_get_var_named_instance: + * @font: a font. + * + * Returns the currently-set named-instance index of the font. + * + * Return value: Named-instance index or %HB_FONT_NO_VAR_NAMED_INSTANCE. + * + * Since: 7.0.0 + **/ +unsigned int +hb_font_get_var_named_instance (hb_font_t *font) +{ + return font->instance_index; } /** @@ -2754,3 +2978,13 @@ hb_font_funcs_set_glyph_func (hb_font_funcs_t *ffuncs, trampoline_destroy); } #endif + + +void +hb_font_funcs_set_glyph_shape_func (hb_font_funcs_t *ffuncs, + hb_font_get_glyph_shape_func_t func, + void *user_data, + hb_destroy_func_t destroy /* May be NULL. */) +{ + hb_font_funcs_set_draw_glyph_func (ffuncs, func, user_data, destroy); +} diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-font.h b/source/libs/harfbuzz/harfbuzz-src/src/hb-font.h index e2c3df4a5accbb7e2d1da0ba1e07e213cc021e4c..69457da5770b81afcfb07833aa46b0bddb4424b6 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-font.h +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-font.h @@ -34,18 +34,10 @@ #include "hb-common.h" #include "hb-face.h" #include "hb-draw.h" +#include "hb-paint.h" HB_BEGIN_DECLS -/** - * hb_font_t: - * - * Data type for holding fonts. - * - */ -typedef struct hb_font_t hb_font_t; - - /* * hb_font_funcs_t */ @@ -97,7 +89,7 @@ HB_EXTERN hb_bool_t hb_font_funcs_is_immutable (hb_font_funcs_t *ffuncs); -/* font and glyph extents */ +/* font extents */ /** * hb_font_extents_t: @@ -126,24 +118,6 @@ typedef struct hb_font_extents_t { hb_position_t reserved1; } hb_font_extents_t; -/** - * hb_glyph_extents_t: - * @x_bearing: Distance from the x-origin to the left extremum of the glyph. - * @y_bearing: Distance from the top extremum of the glyph to the y-origin. - * @width: Distance from the left extremum of the glyph to the right extremum. - * @height: Distance from the top extremum of the glyph to the bottom extremum. - * - * Glyph extent values, measured in font units. - * - * Note that @height is negative, in coordinate systems that grow up. - **/ -typedef struct hb_glyph_extents_t { - hb_position_t x_bearing; - hb_position_t y_bearing; - hb_position_t width; - hb_position_t height; -} hb_glyph_extents_t; - /* func types */ /** @@ -523,13 +497,53 @@ typedef hb_bool_t (*hb_font_get_glyph_from_name_func_t) (hb_font_t *font, void * * A virtual method for the #hb_font_funcs_t of an #hb_font_t object. * * Since: 4.0.0 - * + * Deprecated: 7.0.0: Use #hb_font_draw_glyph_func_t instead **/ typedef void (*hb_font_get_glyph_shape_func_t) (hb_font_t *font, void *font_data, hb_codepoint_t glyph, hb_draw_funcs_t *draw_funcs, void *draw_data, void *user_data); +/** + * hb_font_draw_glyph_func_t: + * @font: #hb_font_t to work upon + * @font_data: @font user data pointer + * @glyph: The glyph ID to query + * @draw_funcs: The draw functions to send the shape data to + * @draw_data: The data accompanying the draw functions + * @user_data: User data pointer passed by the caller + * + * A virtual method for the #hb_font_funcs_t of an #hb_font_t object. + * + * Since: 7.0.0 + * + **/ +typedef void (*hb_font_draw_glyph_func_t) (hb_font_t *font, void *font_data, + hb_codepoint_t glyph, + hb_draw_funcs_t *draw_funcs, void *draw_data, + void *user_data); + +/** + * hb_font_paint_glyph_func_t: + * @font: #hb_font_t to work upon + * @font_data: @font user data pointer + * @glyph: The glyph ID to query + * @paint_funcs: The paint functions to use + * @paint_data: The data accompanying the paint functions + * @palette_index: The color palette to use + * @foreground: The foreground color + * @user_data: User data pointer passed by the caller + * + * A virtual method for the #hb_font_funcs_t of an #hb_font_t object. + * + * Since: 7.0.0 + */ +typedef void (*hb_font_paint_glyph_func_t) (hb_font_t *font, void *font_data, + hb_codepoint_t glyph, + hb_paint_funcs_t *paint_funcs, void *paint_data, + unsigned int palette_index, + hb_color_t foreground, + void *user_data); /* func setters */ @@ -796,15 +810,50 @@ hb_font_funcs_set_glyph_from_name_func (hb_font_funcs_t *ffuncs, * @user_data: Data to pass to @func * @destroy: (nullable): The function to call when @user_data is not needed anymore * - * Sets the implementation function for #hb_font_get_glyph_shape_func_t. + * Sets the implementation function for #hb_font_get_glyph_shape_func_t, + * which is the same as #hb_font_draw_glyph_func_t. * * Since: 4.0.0 + * Deprecated: 7.0.0: Use hb_font_funcs_set_draw_glyph_func() instead **/ HB_EXTERN void hb_font_funcs_set_glyph_shape_func (hb_font_funcs_t *ffuncs, hb_font_get_glyph_shape_func_t func, void *user_data, hb_destroy_func_t destroy); +/** + * hb_font_funcs_set_draw_glyph_func: + * @ffuncs: A font-function structure + * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign + * @user_data: Data to pass to @func + * @destroy: (nullable): The function to call when @user_data is not needed anymore + * + * Sets the implementation function for #hb_font_draw_glyph_func_t, + * which is the same as #hb_font_get_glyph_shape_func_t. + * + * Since: 7.0.0 + **/ +HB_EXTERN void +hb_font_funcs_set_draw_glyph_func (hb_font_funcs_t *ffuncs, + hb_font_draw_glyph_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_paint_glyph_func: + * @ffuncs: A font-function structure + * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign + * @user_data: Data to pass to @func + * @destroy: (nullable): The function to call when @user_data is no longer needed + * + * Sets the implementation function for #hb_font_paint_glyph_func_t. + * + * Since: 7.0.0 + */ +HB_EXTERN void +hb_font_funcs_set_paint_glyph_func (hb_font_funcs_t *ffuncs, + hb_font_paint_glyph_func_t func, + void *user_data, hb_destroy_func_t destroy); + /* func dispatch */ HB_EXTERN hb_bool_t @@ -890,6 +939,17 @@ hb_font_get_glyph_shape (hb_font_t *font, hb_codepoint_t glyph, hb_draw_funcs_t *dfuncs, void *draw_data); +HB_EXTERN void +hb_font_draw_glyph (hb_font_t *font, + hb_codepoint_t glyph, + hb_draw_funcs_t *dfuncs, void *draw_data); + +HB_EXTERN void +hb_font_paint_glyph (hb_font_t *font, + hb_codepoint_t glyph, + hb_paint_funcs_t *pfuncs, void *paint_data, + unsigned int palette_index, + hb_color_t foreground); /* high-level funcs, with fallback */ @@ -1069,6 +1129,16 @@ hb_font_set_ptem (hb_font_t *font, float ptem); HB_EXTERN float hb_font_get_ptem (hb_font_t *font); +HB_EXTERN void +hb_font_set_synthetic_bold (hb_font_t *font, + float x_embolden, float y_embolden, + hb_bool_t in_place); + +HB_EXTERN void +hb_font_get_synthetic_bold (hb_font_t *font, + float *x_embolden, float *y_embolden, + hb_bool_t *in_place); + HB_EXTERN void hb_font_set_synthetic_slant (hb_font_t *font, float slant); @@ -1098,10 +1168,23 @@ HB_EXTERN const int * hb_font_get_var_coords_normalized (hb_font_t *font, unsigned int *length); +/** + * HB_FONT_NO_VAR_NAMED_INSTANCE: + * + * Constant signifying that a font does not have any + * named-instance index set. This is the default of + * a font. + * + * Since: 7.0.0 + */ +#define HB_FONT_NO_VAR_NAMED_INSTANCE 0xFFFFFFFF + HB_EXTERN void hb_font_set_var_named_instance (hb_font_t *font, - unsigned instance_index); + unsigned int instance_index); +HB_EXTERN unsigned int +hb_font_get_var_named_instance (hb_font_t *font); HB_END_DECLS diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-font.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-font.hh index 6942d99c70ae2167911d9c377c023d66a2c78df8..f503575c34adae816b1605b4564d1c35d482551d 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-font.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-font.hh @@ -40,24 +40,25 @@ */ #define HB_FONT_FUNCS_IMPLEMENT_CALLBACKS \ - HB_FONT_FUNC_IMPLEMENT (font_h_extents) \ - HB_FONT_FUNC_IMPLEMENT (font_v_extents) \ - HB_FONT_FUNC_IMPLEMENT (nominal_glyph) \ - HB_FONT_FUNC_IMPLEMENT (nominal_glyphs) \ - HB_FONT_FUNC_IMPLEMENT (variation_glyph) \ - HB_FONT_FUNC_IMPLEMENT (glyph_h_advance) \ - HB_FONT_FUNC_IMPLEMENT (glyph_v_advance) \ - HB_FONT_FUNC_IMPLEMENT (glyph_h_advances) \ - HB_FONT_FUNC_IMPLEMENT (glyph_v_advances) \ - HB_FONT_FUNC_IMPLEMENT (glyph_h_origin) \ - HB_FONT_FUNC_IMPLEMENT (glyph_v_origin) \ - HB_FONT_FUNC_IMPLEMENT (glyph_h_kerning) \ - HB_IF_NOT_DEPRECATED (HB_FONT_FUNC_IMPLEMENT (glyph_v_kerning)) \ - HB_FONT_FUNC_IMPLEMENT (glyph_extents) \ - HB_FONT_FUNC_IMPLEMENT (glyph_contour_point) \ - HB_FONT_FUNC_IMPLEMENT (glyph_name) \ - HB_FONT_FUNC_IMPLEMENT (glyph_from_name) \ - HB_FONT_FUNC_IMPLEMENT (glyph_shape) \ + HB_FONT_FUNC_IMPLEMENT (get_,font_h_extents) \ + HB_FONT_FUNC_IMPLEMENT (get_,font_v_extents) \ + HB_FONT_FUNC_IMPLEMENT (get_,nominal_glyph) \ + HB_FONT_FUNC_IMPLEMENT (get_,nominal_glyphs) \ + HB_FONT_FUNC_IMPLEMENT (get_,variation_glyph) \ + HB_FONT_FUNC_IMPLEMENT (get_,glyph_h_advance) \ + HB_FONT_FUNC_IMPLEMENT (get_,glyph_v_advance) \ + HB_FONT_FUNC_IMPLEMENT (get_,glyph_h_advances) \ + HB_FONT_FUNC_IMPLEMENT (get_,glyph_v_advances) \ + HB_FONT_FUNC_IMPLEMENT (get_,glyph_h_origin) \ + HB_FONT_FUNC_IMPLEMENT (get_,glyph_v_origin) \ + HB_FONT_FUNC_IMPLEMENT (get_,glyph_h_kerning) \ + HB_IF_NOT_DEPRECATED (HB_FONT_FUNC_IMPLEMENT (get_,glyph_v_kerning)) \ + HB_FONT_FUNC_IMPLEMENT (get_,glyph_extents) \ + HB_FONT_FUNC_IMPLEMENT (get_,glyph_contour_point) \ + HB_FONT_FUNC_IMPLEMENT (get_,glyph_name) \ + HB_FONT_FUNC_IMPLEMENT (get_,glyph_from_name) \ + HB_FONT_FUNC_IMPLEMENT (,draw_glyph) \ + HB_FONT_FUNC_IMPLEMENT (,paint_glyph) \ /* ^--- Add new callbacks here */ struct hb_font_funcs_t @@ -65,13 +66,13 @@ struct hb_font_funcs_t hb_object_header_t header; struct { -#define HB_FONT_FUNC_IMPLEMENT(name) void *name; +#define HB_FONT_FUNC_IMPLEMENT(get_,name) void *name; HB_FONT_FUNCS_IMPLEMENT_CALLBACKS #undef HB_FONT_FUNC_IMPLEMENT } *user_data; struct { -#define HB_FONT_FUNC_IMPLEMENT(name) hb_destroy_func_t name; +#define HB_FONT_FUNC_IMPLEMENT(get_,name) hb_destroy_func_t name; HB_FONT_FUNCS_IMPLEMENT_CALLBACKS #undef HB_FONT_FUNC_IMPLEMENT } *destroy; @@ -79,12 +80,12 @@ struct hb_font_funcs_t /* Don't access these directly. Call font->get_*() instead. */ union get_t { struct get_funcs_t { -#define HB_FONT_FUNC_IMPLEMENT(name) hb_font_get_##name##_func_t name; +#define HB_FONT_FUNC_IMPLEMENT(get_,name) hb_font_##get_##name##_func_t name; HB_FONT_FUNCS_IMPLEMENT_CALLBACKS #undef HB_FONT_FUNC_IMPLEMENT } f; void (*array[0 -#define HB_FONT_FUNC_IMPLEMENT(name) +1 +#define HB_FONT_FUNC_IMPLEMENT(get_,name) +1 HB_FONT_FUNCS_IMPLEMENT_CALLBACKS #undef HB_FONT_FUNC_IMPLEMENT ]) (); @@ -112,8 +113,16 @@ struct hb_font_t int32_t x_scale; int32_t y_scale; + + float x_embolden; + float y_embolden; + bool embolden_in_place; + int32_t x_strength; /* x_embolden, in scaled units. */ + int32_t y_strength; /* y_embolden, in scaled units. */ + float slant; float slant_xy; + float x_multf; float y_multf; int64_t x_mult; @@ -125,6 +134,7 @@ struct hb_font_t float ptem; /* Font variation coordinates. */ + unsigned int instance_index; unsigned int num_coords; int *coords; float *design_coords; @@ -179,6 +189,42 @@ struct hb_font_t *y = parent_scale_y_position (*y); } + void scale_glyph_extents (hb_glyph_extents_t *extents) + { + float x1 = em_fscale_x (extents->x_bearing); + float y1 = em_fscale_y (extents->y_bearing); + float x2 = em_fscale_x (extents->x_bearing + extents->width); + float y2 = em_fscale_y (extents->y_bearing + extents->height); + + /* Apply slant. */ + if (slant_xy) + { + x1 += hb_min (y1 * slant_xy, y2 * slant_xy); + x2 += hb_max (y1 * slant_xy, y2 * slant_xy); + } + + extents->x_bearing = floorf (x1); + extents->y_bearing = floorf (y1); + extents->width = ceilf (x2) - extents->x_bearing; + extents->height = ceilf (y2) - extents->y_bearing; + + if (x_strength || y_strength) + { + /* Y */ + int y_shift = y_strength; + if (y_scale < 0) y_shift = -y_shift; + extents->y_bearing += y_shift; + extents->height -= y_shift; + + /* X */ + int x_shift = x_strength; + if (x_scale < 0) x_shift = -x_shift; + if (embolden_in_place) + extents->x_bearing -= x_shift / 2; + extents->width += x_shift; + } + } + /* Public getters */ @@ -186,7 +232,7 @@ struct hb_font_t HB_INTERNAL bool has_func_set (unsigned int i); /* has_* ... */ -#define HB_FONT_FUNC_IMPLEMENT(name) \ +#define HB_FONT_FUNC_IMPLEMENT(get_,name) \ bool \ has_##name##_func () \ { \ @@ -380,15 +426,26 @@ struct hb_font_t !klass->user_data ? nullptr : klass->user_data->glyph_from_name); } - void get_glyph_shape (hb_codepoint_t glyph, - hb_draw_funcs_t *draw_funcs, void *draw_data) + void draw_glyph (hb_codepoint_t glyph, + hb_draw_funcs_t *draw_funcs, void *draw_data) { - klass->get.f.glyph_shape (this, user_data, - glyph, - draw_funcs, draw_data, - !klass->user_data ? nullptr : klass->user_data->glyph_shape); + klass->get.f.draw_glyph (this, user_data, + glyph, + draw_funcs, draw_data, + !klass->user_data ? nullptr : klass->user_data->draw_glyph); } + void paint_glyph (hb_codepoint_t glyph, + hb_paint_funcs_t *paint_funcs, void *paint_data, + unsigned int palette, + hb_color_t foreground) + { + klass->get.f.paint_glyph (this, user_data, + glyph, + paint_funcs, paint_data, + palette, foreground, + !klass->user_data ? nullptr : klass->user_data->paint_glyph); + } /* A bit higher-level, and with fallback */ @@ -632,12 +689,17 @@ struct hb_font_t void mults_changed () { float upem = face->get_upem (); + x_multf = x_scale / upem; y_multf = y_scale / upem; bool x_neg = x_scale < 0; x_mult = (x_neg ? -((int64_t) -x_scale << 16) : ((int64_t) x_scale << 16)) / upem; bool y_neg = y_scale < 0; y_mult = (y_neg ? -((int64_t) -y_scale << 16) : ((int64_t) y_scale << 16)) / upem; + + x_strength = fabsf (roundf (x_scale * x_embolden)); + y_strength = fabsf (roundf (y_scale * y_embolden)); + slant_xy = y_scale ? slant * x_scale / y_scale : 0.f; data.fini (); diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ft-colr.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-ft-colr.hh new file mode 100644 index 0000000000000000000000000000000000000000..b3457933c01d91663efd24dbfaf6210225dde679 --- /dev/null +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ft-colr.hh @@ -0,0 +1,567 @@ +/* + * Copyright © 2022 Behdad Esfahbod + * + * This is part of HarfBuzz, a text shaping library. + * + * 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. + */ + +#ifndef HB_FT_COLR_HH +#define HB_FT_COLR_HH + +#include "hb.hh" + +#include "hb-paint-extents.hh" + +#include FT_COLOR_H + + +static hb_paint_composite_mode_t +_hb_ft_paint_composite_mode (FT_Composite_Mode mode) +{ + switch (mode) + { + case FT_COLR_COMPOSITE_CLEAR: return HB_PAINT_COMPOSITE_MODE_CLEAR; + case FT_COLR_COMPOSITE_SRC: return HB_PAINT_COMPOSITE_MODE_SRC; + case FT_COLR_COMPOSITE_DEST: return HB_PAINT_COMPOSITE_MODE_DEST; + case FT_COLR_COMPOSITE_SRC_OVER: return HB_PAINT_COMPOSITE_MODE_SRC_OVER; + case FT_COLR_COMPOSITE_DEST_OVER: return HB_PAINT_COMPOSITE_MODE_DEST_OVER; + case FT_COLR_COMPOSITE_SRC_IN: return HB_PAINT_COMPOSITE_MODE_SRC_IN; + case FT_COLR_COMPOSITE_DEST_IN: return HB_PAINT_COMPOSITE_MODE_DEST_IN; + case FT_COLR_COMPOSITE_SRC_OUT: return HB_PAINT_COMPOSITE_MODE_SRC_OUT; + case FT_COLR_COMPOSITE_DEST_OUT: return HB_PAINT_COMPOSITE_MODE_DEST_OUT; + case FT_COLR_COMPOSITE_SRC_ATOP: return HB_PAINT_COMPOSITE_MODE_SRC_ATOP; + case FT_COLR_COMPOSITE_DEST_ATOP: return HB_PAINT_COMPOSITE_MODE_DEST_ATOP; + case FT_COLR_COMPOSITE_XOR: return HB_PAINT_COMPOSITE_MODE_XOR; + case FT_COLR_COMPOSITE_PLUS: return HB_PAINT_COMPOSITE_MODE_PLUS; + case FT_COLR_COMPOSITE_SCREEN: return HB_PAINT_COMPOSITE_MODE_SCREEN; + case FT_COLR_COMPOSITE_OVERLAY: return HB_PAINT_COMPOSITE_MODE_OVERLAY; + case FT_COLR_COMPOSITE_DARKEN: return HB_PAINT_COMPOSITE_MODE_DARKEN; + case FT_COLR_COMPOSITE_LIGHTEN: return HB_PAINT_COMPOSITE_MODE_LIGHTEN; + case FT_COLR_COMPOSITE_COLOR_DODGE: return HB_PAINT_COMPOSITE_MODE_COLOR_DODGE; + case FT_COLR_COMPOSITE_COLOR_BURN: return HB_PAINT_COMPOSITE_MODE_COLOR_BURN; + case FT_COLR_COMPOSITE_HARD_LIGHT: return HB_PAINT_COMPOSITE_MODE_HARD_LIGHT; + case FT_COLR_COMPOSITE_SOFT_LIGHT: return HB_PAINT_COMPOSITE_MODE_SOFT_LIGHT; + case FT_COLR_COMPOSITE_DIFFERENCE: return HB_PAINT_COMPOSITE_MODE_DIFFERENCE; + case FT_COLR_COMPOSITE_EXCLUSION: return HB_PAINT_COMPOSITE_MODE_EXCLUSION; + case FT_COLR_COMPOSITE_MULTIPLY: return HB_PAINT_COMPOSITE_MODE_MULTIPLY; + case FT_COLR_COMPOSITE_HSL_HUE: return HB_PAINT_COMPOSITE_MODE_HSL_HUE; + case FT_COLR_COMPOSITE_HSL_SATURATION: return HB_PAINT_COMPOSITE_MODE_HSL_SATURATION; + case FT_COLR_COMPOSITE_HSL_COLOR: return HB_PAINT_COMPOSITE_MODE_HSL_COLOR; + case FT_COLR_COMPOSITE_HSL_LUMINOSITY: return HB_PAINT_COMPOSITE_MODE_HSL_LUMINOSITY; + + case FT_COLR_COMPOSITE_MAX: HB_FALLTHROUGH; + default: return HB_PAINT_COMPOSITE_MODE_CLEAR; + } +} + +typedef struct hb_ft_paint_context_t hb_ft_paint_context_t; + +static void +_hb_ft_paint (hb_ft_paint_context_t *c, + FT_OpaquePaint opaque_paint); + +struct hb_ft_paint_context_t +{ + hb_ft_paint_context_t (const hb_ft_font_t *ft_font, + hb_font_t *font, + hb_paint_funcs_t *paint_funcs, void *paint_data, + FT_Color *palette, + unsigned palette_index, + hb_color_t foreground) : + ft_font (ft_font), font(font), + funcs (paint_funcs), data (paint_data), + palette (palette), palette_index (palette_index), foreground (foreground) {} + + void recurse (FT_OpaquePaint paint) + { + if (unlikely (depth_left <= 0 || edge_count <= 0)) return; + depth_left--; + edge_count--; + _hb_ft_paint (this, paint); + depth_left++; + } + + const hb_ft_font_t *ft_font; + hb_font_t *font; + hb_paint_funcs_t *funcs; + void *data; + FT_Color *palette; + unsigned palette_index; + hb_color_t foreground; + int depth_left = HB_MAX_NESTING_LEVEL; + int edge_count = HB_COLRV1_MAX_EDGE_COUNT; +}; + +static unsigned +_hb_ft_color_line_get_color_stops (hb_color_line_t *color_line, + void *color_line_data, + unsigned int start, + unsigned int *count, + hb_color_stop_t *color_stops, + void *user_data) +{ + FT_ColorLine *cl = (FT_ColorLine *) color_line_data; + hb_ft_paint_context_t *c = (hb_ft_paint_context_t *) user_data; + + if (count) + { + FT_ColorStop stop; + unsigned wrote = 0; + FT_ColorStopIterator iter = cl->color_stop_iterator; + + if (start >= cl->color_stop_iterator.num_color_stops) + { + *count = 0; + return cl->color_stop_iterator.num_color_stops; + } + + while (cl->color_stop_iterator.current_color_stop < start) + FT_Get_Colorline_Stops(c->ft_font->ft_face, + &stop, + &cl->color_stop_iterator); + + while (count && *count && + FT_Get_Colorline_Stops(c->ft_font->ft_face, + &stop, + &cl->color_stop_iterator)) + { + // https://github.com/harfbuzz/harfbuzz/issues/4013 + if (sizeof stop.stop_offset == 2) + color_stops->offset = stop.stop_offset / 16384.f; + else + color_stops->offset = stop.stop_offset / 65536.f; + + color_stops->is_foreground = stop.color.palette_index == 0xFFFF; + if (color_stops->is_foreground) + color_stops->color = HB_COLOR (hb_color_get_blue (c->foreground), + hb_color_get_green (c->foreground), + hb_color_get_red (c->foreground), + (hb_color_get_alpha (c->foreground) * stop.color.alpha) >> 14); + else + { + hb_color_t color; + if (c->funcs->custom_palette_color (c->data, stop.color.palette_index, &color)) + { + color_stops->color = HB_COLOR (hb_color_get_blue (color), + hb_color_get_green (color), + hb_color_get_red (color), + (hb_color_get_alpha (color) * stop.color.alpha) >> 14); + } + else + { + FT_Color ft_color = c->palette[stop.color.palette_index]; + color_stops->color = HB_COLOR (ft_color.blue, + ft_color.green, + ft_color.red, + (ft_color.alpha * stop.color.alpha) >> 14); + } + } + + color_stops++; + wrote++; + } + + *count = wrote; + + // reset the iterator for next time + cl->color_stop_iterator = iter; + } + + return cl->color_stop_iterator.num_color_stops; +} + +static hb_paint_extend_t +_hb_ft_color_line_get_extend (hb_color_line_t *color_line, + void *color_line_data, + void *user_data) +{ + FT_ColorLine *c = (FT_ColorLine *) color_line_data; + switch (c->extend) + { + default: + case FT_COLR_PAINT_EXTEND_PAD: return HB_PAINT_EXTEND_PAD; + case FT_COLR_PAINT_EXTEND_REPEAT: return HB_PAINT_EXTEND_REPEAT; + case FT_COLR_PAINT_EXTEND_REFLECT: return HB_PAINT_EXTEND_REFLECT; + } +} + +void +_hb_ft_paint (hb_ft_paint_context_t *c, + FT_OpaquePaint opaque_paint) +{ + FT_Face ft_face = c->ft_font->ft_face; + FT_COLR_Paint paint; + if (!FT_Get_Paint (ft_face, opaque_paint, &paint)) + return; + + switch (paint.format) + { + case FT_COLR_PAINTFORMAT_COLR_LAYERS: + { + FT_OpaquePaint other_paint = {0}; + while (FT_Get_Paint_Layers (ft_face, + &paint.u.colr_layers.layer_iterator, + &other_paint)) + { + c->funcs->push_group (c->data); + c->recurse (other_paint); + c->funcs->pop_group (c->data, HB_PAINT_COMPOSITE_MODE_SRC_OVER); + } + } + break; + case FT_COLR_PAINTFORMAT_SOLID: + { + bool is_foreground = paint.u.solid.color.palette_index == 0xFFFF; + hb_color_t color; + if (is_foreground) + color = HB_COLOR (hb_color_get_blue (c->foreground), + hb_color_get_green (c->foreground), + hb_color_get_red (c->foreground), + (hb_color_get_alpha (c->foreground) * paint.u.solid.color.alpha) >> 14); + else + { + if (c->funcs->custom_palette_color (c->data, paint.u.solid.color.palette_index, &color)) + { + color = HB_COLOR (hb_color_get_blue (color), + hb_color_get_green (color), + hb_color_get_red (color), + (hb_color_get_alpha (color) * paint.u.solid.color.alpha) >> 14); + } + else + { + FT_Color ft_color = c->palette[paint.u.solid.color.palette_index]; + color = HB_COLOR (ft_color.blue, + ft_color.green, + ft_color.red, + (ft_color.alpha * paint.u.solid.color.alpha) >> 14); + } + } + c->funcs->color (c->data, is_foreground, color); + } + break; + case FT_COLR_PAINTFORMAT_LINEAR_GRADIENT: + { + hb_color_line_t cl = { + &paint.u.linear_gradient.colorline, + _hb_ft_color_line_get_color_stops, c, + _hb_ft_color_line_get_extend, nullptr + }; + + c->funcs->linear_gradient (c->data, &cl, + paint.u.linear_gradient.p0.x / 65536.f, + paint.u.linear_gradient.p0.y / 65536.f, + paint.u.linear_gradient.p1.x / 65536.f, + paint.u.linear_gradient.p1.y / 65536.f, + paint.u.linear_gradient.p2.x / 65536.f, + paint.u.linear_gradient.p2.y / 65536.f); + } + break; + case FT_COLR_PAINTFORMAT_RADIAL_GRADIENT: + { + hb_color_line_t cl = { + &paint.u.linear_gradient.colorline, + _hb_ft_color_line_get_color_stops, c, + _hb_ft_color_line_get_extend, nullptr + }; + + c->funcs->radial_gradient (c->data, &cl, + paint.u.radial_gradient.c0.x / 65536.f, + paint.u.radial_gradient.c0.y / 65536.f, + paint.u.radial_gradient.r0 / 65536.f, + paint.u.radial_gradient.c1.x / 65536.f, + paint.u.radial_gradient.c1.y / 65536.f, + paint.u.radial_gradient.r1 / 65536.f); + } + break; + case FT_COLR_PAINTFORMAT_SWEEP_GRADIENT: + { + hb_color_line_t cl = { + &paint.u.linear_gradient.colorline, + _hb_ft_color_line_get_color_stops, c, + _hb_ft_color_line_get_extend, nullptr + }; + + c->funcs->sweep_gradient (c->data, &cl, + paint.u.sweep_gradient.center.x / 65536.f, + paint.u.sweep_gradient.center.y / 65536.f, + (paint.u.sweep_gradient.start_angle / 65536.f + 1) * (float) M_PI, + (paint.u.sweep_gradient.end_angle / 65536.f + 1) * (float) M_PI); + } + break; + case FT_COLR_PAINTFORMAT_GLYPH: + { + c->funcs->push_inverse_root_transform (c->data, c->font); + c->ft_font->lock.unlock (); + c->funcs->push_clip_glyph (c->data, paint.u.glyph.glyphID, c->font); + c->ft_font->lock.lock (); + c->funcs->push_root_transform (c->data, c->font); + c->recurse (paint.u.glyph.paint); + c->funcs->pop_transform (c->data); + c->funcs->pop_clip (c->data); + c->funcs->pop_transform (c->data); + } + break; + case FT_COLR_PAINTFORMAT_COLR_GLYPH: + { + FT_OpaquePaint other_paint = {0}; + if (FT_Get_Color_Glyph_Paint (ft_face, paint.u.colr_glyph.glyphID, + FT_COLOR_NO_ROOT_TRANSFORM, + &other_paint)) + { + bool has_clip_box; + FT_ClipBox clip_box; + has_clip_box = FT_Get_Color_Glyph_ClipBox (ft_face, paint.u.colr_glyph.glyphID, &clip_box); + + if (has_clip_box) + { + /* The FreeType ClipBox is in scaled coordinates, whereas we need + * unscaled clipbox here. Oh well... + */ + + float upem = c->font->face->get_upem (); + float xscale = upem / (c->font->x_scale ? c->font->x_scale : upem); + float yscale = upem / (c->font->y_scale ? c->font->y_scale : upem); + + c->funcs->push_clip_rectangle (c->data, + clip_box.bottom_left.x * xscale, + clip_box.bottom_left.y * yscale, + clip_box.top_right.x * xscale, + clip_box.top_right.y * yscale); + } + + c->recurse (other_paint); + + if (has_clip_box) + c->funcs->pop_clip (c->data); + } + } + break; + case FT_COLR_PAINTFORMAT_TRANSFORM: + { + c->funcs->push_transform (c->data, + paint.u.transform.affine.xx / 65536.f, + paint.u.transform.affine.yx / 65536.f, + paint.u.transform.affine.xy / 65536.f, + paint.u.transform.affine.yy / 65536.f, + paint.u.transform.affine.dx / 65536.f, + paint.u.transform.affine.dy / 65536.f); + c->recurse (paint.u.transform.paint); + c->funcs->pop_transform (c->data); + } + break; + case FT_COLR_PAINTFORMAT_TRANSLATE: + { + float dx = paint.u.translate.dx / 65536.f; + float dy = paint.u.translate.dy / 65536.f; + + bool p1 = c->funcs->push_translate (c->data, dx, dy); + c->recurse (paint.u.translate.paint); + if (p1) c->funcs->pop_transform (c->data); + } + break; + case FT_COLR_PAINTFORMAT_SCALE: + { + float dx = paint.u.scale.center_x / 65536.f; + float dy = paint.u.scale.center_y / 65536.f; + float sx = paint.u.scale.scale_x / 65536.f; + float sy = paint.u.scale.scale_y / 65536.f; + + bool p1 = c->funcs->push_translate (c->data, +dx, +dy); + bool p2 = c->funcs->push_scale (c->data, sx, sy); + bool p3 = c->funcs->push_translate (c->data, -dx, -dy); + c->recurse (paint.u.scale.paint); + if (p3) c->funcs->pop_transform (c->data); + if (p2) c->funcs->pop_transform (c->data); + if (p1) c->funcs->pop_transform (c->data); + } + break; + case FT_COLR_PAINTFORMAT_ROTATE: + { + float dx = paint.u.rotate.center_x / 65536.f; + float dy = paint.u.rotate.center_y / 65536.f; + float a = paint.u.rotate.angle / 65536.f; + + bool p1 = c->funcs->push_translate (c->data, +dx, +dy); + bool p2 = c->funcs->push_rotate (c->data, a); + bool p3 = c->funcs->push_translate (c->data, -dx, -dy); + c->recurse (paint.u.rotate.paint); + if (p3) c->funcs->pop_transform (c->data); + if (p2) c->funcs->pop_transform (c->data); + if (p1) c->funcs->pop_transform (c->data); + } + break; + case FT_COLR_PAINTFORMAT_SKEW: + { + float dx = paint.u.skew.center_x / 65536.f; + float dy = paint.u.skew.center_y / 65536.f; + float sx = paint.u.skew.x_skew_angle / 65536.f; + float sy = paint.u.skew.y_skew_angle / 65536.f; + + bool p1 = c->funcs->push_translate (c->data, +dx, +dy); + bool p2 = c->funcs->push_skew (c->data, sx, sy); + bool p3 = c->funcs->push_translate (c->data, -dx, -dy); + c->recurse (paint.u.skew.paint); + if (p3) c->funcs->pop_transform (c->data); + if (p2) c->funcs->pop_transform (c->data); + if (p1) c->funcs->pop_transform (c->data); + } + break; + case FT_COLR_PAINTFORMAT_COMPOSITE: + { + c->recurse (paint.u.composite.backdrop_paint); + c->funcs->push_group (c->data); + c->recurse (paint.u.composite.source_paint); + c->funcs->pop_group (c->data, _hb_ft_paint_composite_mode (paint.u.composite.composite_mode)); + } + break; + + case FT_COLR_PAINT_FORMAT_MAX: break; + default: HB_FALLTHROUGH; + case FT_COLR_PAINTFORMAT_UNSUPPORTED: break; + } +} + + +static bool +hb_ft_paint_glyph_colr (hb_font_t *font, + void *font_data, + hb_codepoint_t gid, + hb_paint_funcs_t *paint_funcs, void *paint_data, + unsigned int palette_index, + hb_color_t foreground, + void *user_data) +{ + const hb_ft_font_t *ft_font = (const hb_ft_font_t *) font_data; + FT_Face ft_face = ft_font->ft_face; + + /* Face is locked. */ + + FT_Error error; + FT_Color* palette; + FT_LayerIterator iterator; + + FT_Bool have_layers; + FT_UInt layer_glyph_index; + FT_UInt layer_color_index; + + error = FT_Palette_Select(ft_face, palette_index, &palette); + if (error) + palette = NULL; + + /* COLRv1 */ + FT_OpaquePaint paint = {0}; + if (FT_Get_Color_Glyph_Paint (ft_face, gid, + FT_COLOR_NO_ROOT_TRANSFORM, + &paint)) + { + hb_ft_paint_context_t c (ft_font, font, + paint_funcs, paint_data, + palette, palette_index, foreground); + + bool is_bounded = true; + FT_ClipBox clip_box; + if (FT_Get_Color_Glyph_ClipBox (ft_face, gid, &clip_box)) + { + c.funcs->push_clip_rectangle (c.data, + clip_box.bottom_left.x + + roundf (hb_min (font->slant_xy * clip_box.bottom_left.y, + font->slant_xy * clip_box.top_left.y)), + clip_box.bottom_left.y, + clip_box.top_right.x + + roundf (hb_max (font->slant_xy * clip_box.bottom_right.y, + font->slant_xy * clip_box.top_right.y)), + clip_box.top_right.y); + } + else + { + + auto *extents_funcs = hb_paint_extents_get_funcs (); + hb_paint_extents_context_t extents_data; + hb_ft_paint_context_t ce (ft_font, font, + extents_funcs, &extents_data, + palette, palette_index, foreground); + ce.funcs->push_root_transform (ce.data, font); + ce.recurse (paint); + ce.funcs->pop_transform (ce.data); + hb_extents_t extents = extents_data.get_extents (); + is_bounded = extents_data.is_bounded (); + + c.funcs->push_clip_rectangle (c.data, + extents.xmin, + extents.ymin, + extents.xmax, + extents.ymax); + } + + c.funcs->push_root_transform (c.data, font); + + if (is_bounded) + c.recurse (paint); + + c.funcs->pop_transform (c.data); + c.funcs->pop_clip (c.data); + + return true; + } + + /* COLRv0 */ + iterator.p = NULL; + have_layers = FT_Get_Color_Glyph_Layer(ft_face, + gid, + &layer_glyph_index, + &layer_color_index, + &iterator); + + if (palette && have_layers) + { + do + { + hb_bool_t is_foreground = true; + hb_color_t color = foreground; + + if ( layer_color_index != 0xFFFF ) + { + FT_Color layer_color = palette[layer_color_index]; + color = HB_COLOR (layer_color.blue, + layer_color.green, + layer_color.red, + layer_color.alpha); + is_foreground = false; + } + + ft_font->lock.unlock (); + paint_funcs->push_clip_glyph (paint_data, layer_glyph_index, font); + ft_font->lock.lock (); + paint_funcs->color (paint_data, is_foreground, color); + paint_funcs->pop_clip (paint_data); + + } while (FT_Get_Color_Glyph_Layer(ft_face, + gid, + &layer_glyph_index, + &layer_color_index, + &iterator)); + return true; + } + + return false; +} + + +#endif /* HB_FT_COLR_HH */ diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ft.cc b/source/libs/harfbuzz/harfbuzz-src/src/hb-ft.cc index 3892dedc1333a829c44180028f8d2fa843385cff..4bc10e06202bff64ce07bb344f9c87e94f4f848b 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ft.cc +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ft.cc @@ -33,17 +33,22 @@ #include "hb-ft.h" +#include "hb-cache.hh" #include "hb-draw.hh" #include "hb-font.hh" #include "hb-machinery.hh" -#include "hb-cache.hh" #include "hb-ot-os2-table.hh" #include "hb-ot-shaper-arabic-pua.hh" +#include "hb-paint.hh" #include FT_ADVANCES_H #include FT_MULTIPLE_MASTERS_H #include FT_OUTLINE_H #include FT_TRUETYPE_TABLES_H +#include FT_SYNTHESIS_H +#if (FREETYPE_MAJOR*10000 + FREETYPE_MINOR*100 + FREETYPE_PATCH) >= 21300 +#include FT_COLOR_H +#endif /** @@ -80,7 +85,7 @@ */ -using hb_ft_advance_cache_t = hb_cache_t<16, 24, 8, false>; +using hb_ft_advance_cache_t = hb_cache_t<16, 8, 8, false>; struct hb_ft_font_t { @@ -125,8 +130,6 @@ _hb_ft_font_destroy (void *data) { hb_ft_font_t *ft_font = (hb_ft_font_t *) data; - ft_font->advance_cache.fini (); - if (ft_font->unref) _hb_ft_face_destroy (ft_font->ft_face); @@ -157,9 +160,9 @@ static void _hb_ft_hb_font_changed (hb_font_t *font, FT_Face ft_face) { #ifdef HAVE_FT_GET_TRANSFORM /* Bitmap font, eg. bitmap color emoji. */ - /* TODO Pick largest size? */ - int x_scale = ft_face->available_sizes[0].x_ppem; - int y_scale = ft_face->available_sizes[0].y_ppem; + /* Pick largest size? */ + int x_scale = ft_face->available_sizes[ft_face->num_fixed_sizes - 1].x_ppem; + int y_scale = ft_face->available_sizes[ft_face->num_fixed_sizes - 1].y_ppem; FT_Set_Char_Size (ft_face, x_scale, y_scale, 0, 0); @@ -224,6 +227,9 @@ _hb_ft_hb_font_check_changed (hb_font_t *font, * For more information, see * https://www.freetype.org/freetype2/docs/reference/ft2-base_interface.html#ft_load_xxx * + * This function works with #hb_font_t objects created by + * hb_ft_font_create() or hb_ft_font_create_referenced(). + * * Since: 1.0.5 **/ void @@ -249,7 +255,10 @@ hb_ft_font_set_load_flags (hb_font_t *font, int load_flags) * For more information, see * https://www.freetype.org/freetype2/docs/reference/ft2-base_interface.html#ft_load_xxx * - * Return value: FT_Load_Glyph flags found + * This function works with #hb_font_t objects created by + * hb_ft_font_create() or hb_ft_font_create_referenced(). + * + * Return value: FT_Load_Glyph flags found, or 0 * * Since: 1.0.5 **/ @@ -271,6 +280,9 @@ hb_ft_font_get_load_flags (hb_font_t *font) * Fetches the FT_Face associated with the specified #hb_font_t * font object. * + * This function works with #hb_font_t objects created by + * hb_ft_font_create() or hb_ft_font_create_referenced(). + * * Return value: (nullable): the FT_Face found or `NULL` * * Since: 0.9.2 @@ -290,8 +302,13 @@ hb_ft_font_get_face (hb_font_t *font) * hb_ft_font_lock_face: (skip) * @font: #hb_font_t to work upon * - * Gets the FT_Face associated with @font, This face will be kept around until - * you call hb_ft_font_unlock_face(). + * Gets the FT_Face associated with @font. + * + * This face will be kept around and access to the FT_Face object + * from other HarfBuzz API wil be blocked until you call hb_ft_font_unlock_face(). + * + * This function works with #hb_font_t objects created by + * hb_ft_font_create() or hb_ft_font_create_referenced(). * * Return value: (nullable) (transfer none): the FT_Face associated with @font or `NULL` * Since: 2.6.5 @@ -431,6 +448,7 @@ hb_ft_get_glyph_h_advances (hb_font_t* font, void* font_data, void *user_data HB_UNUSED) { const hb_ft_font_t *ft_font = (const hb_ft_font_t *) font_data; + hb_position_t *orig_first_advance = first_advance; hb_lock_t lock (ft_font->lock); FT_Face ft_face = ft_font->ft_face; int load_flags = ft_font->load_flags; @@ -441,6 +459,7 @@ hb_ft_get_glyph_h_advances (hb_font_t* font, void* font_data, FT_Matrix matrix; FT_Get_Transform (ft_face, &matrix, nullptr); x_mult = sqrtf ((float)matrix.xx * matrix.xx + (float)matrix.xy * matrix.xy) / 65536.f; + x_mult *= font->x_scale < 0 ? -1 : +1; } else #endif @@ -459,13 +478,29 @@ hb_ft_get_glyph_h_advances (hb_font_t* font, void* font_data, else { FT_Get_Advance (ft_face, glyph, load_flags, &v); + /* Work around bug that FreeType seems to return negative advance + * for variable-set fonts if x_scale is negative! */ + v = abs (v); + v = (int) (v * x_mult + (1<<9)) >> 10; ft_font->advance_cache.set (glyph, v); } - *first_advance = (int) (v * x_mult + (1<<9)) >> 10; + *first_advance = v; first_glyph = &StructAtOffsetUnaligned<hb_codepoint_t> (first_glyph, glyph_stride); first_advance = &StructAtOffsetUnaligned<hb_position_t> (first_advance, advance_stride); } + + if (font->x_strength && !font->embolden_in_place) + { + /* Emboldening. */ + hb_position_t x_strength = font->x_scale >= 0 ? font->x_strength : -font->x_strength; + first_advance = orig_first_advance; + for (unsigned int i = 0; i < count; i++) + { + *first_advance += *first_advance ? x_strength : 0; + first_advance = &StructAtOffsetUnaligned<hb_position_t> (first_advance, advance_stride); + } + } } #ifndef HB_NO_VERTICAL @@ -485,6 +520,7 @@ hb_ft_get_glyph_v_advance (hb_font_t *font, FT_Matrix matrix; FT_Get_Transform (ft_font->ft_face, &matrix, nullptr); y_mult = sqrtf ((float)matrix.yx * matrix.yx + (float)matrix.yy * matrix.yy) / 65536.f; + y_mult *= font->y_scale < 0 ? -1 : +1; } else #endif @@ -500,7 +536,8 @@ hb_ft_get_glyph_v_advance (hb_font_t *font, /* Note: FreeType's vertical metrics grows downward while other FreeType coordinates * have a Y growing upward. Hence the extra negation. */ - return (-v + (1<<9)) >> 10; + hb_position_t y_strength = font->y_scale >= 0 ? font->y_strength : -font->y_strength; + return ((-v + (1<<9)) >> 10) + (font->embolden_in_place ? 0 : y_strength); } #endif @@ -523,7 +560,9 @@ hb_ft_get_glyph_v_origin (hb_font_t *font, FT_Matrix matrix; FT_Get_Transform (ft_face, &matrix, nullptr); x_mult = sqrtf ((float)matrix.xx * matrix.xx + (float)matrix.xy * matrix.xy) / 65536.f; + x_mult *= font->x_scale < 0 ? -1 : +1; y_mult = sqrtf ((float)matrix.yx * matrix.yx + (float)matrix.yy * matrix.yy) / 65536.f; + y_mult *= font->y_scale < 0 ? -1 : +1; } else #endif @@ -578,13 +617,16 @@ hb_ft_get_glyph_extents (hb_font_t *font, hb_lock_t lock (ft_font->lock); FT_Face ft_face = ft_font->ft_face; float x_mult, y_mult; + float slant_xy = font->slant_xy; #ifdef HAVE_FT_GET_TRANSFORM if (ft_font->transform) { FT_Matrix matrix; FT_Get_Transform (ft_face, &matrix, nullptr); x_mult = sqrtf ((float)matrix.xx * matrix.xx + (float)matrix.xy * matrix.xy) / 65536.f; + x_mult *= font->x_scale < 0 ? -1 : +1; y_mult = sqrtf ((float)matrix.yx * matrix.yx + (float)matrix.yy * matrix.yy) / 65536.f; + y_mult *= font->y_scale < 0 ? -1 : +1; } else #endif @@ -596,10 +638,40 @@ hb_ft_get_glyph_extents (hb_font_t *font, if (unlikely (FT_Load_Glyph (ft_face, glyph, ft_font->load_flags))) return false; - extents->x_bearing = (hb_position_t) (x_mult * ft_face->glyph->metrics.horiBearingX); - extents->y_bearing = (hb_position_t) (y_mult * ft_face->glyph->metrics.horiBearingY); - extents->width = (hb_position_t) (x_mult * ft_face->glyph->metrics.width); - extents->height = (hb_position_t) (y_mult * -ft_face->glyph->metrics.height); + /* Copied from hb_font_t::scale_glyph_extents. */ + + float x1 = x_mult * ft_face->glyph->metrics.horiBearingX; + float y1 = y_mult * ft_face->glyph->metrics.horiBearingY; + float x2 = x1 + x_mult * ft_face->glyph->metrics.width; + float y2 = y1 + y_mult * -ft_face->glyph->metrics.height; + + /* Apply slant. */ + if (slant_xy) + { + x1 += hb_min (y1 * slant_xy, y2 * slant_xy); + x2 += hb_max (y1 * slant_xy, y2 * slant_xy); + } + + extents->x_bearing = floorf (x1); + extents->y_bearing = floorf (y1); + extents->width = ceilf (x2) - extents->x_bearing; + extents->height = ceilf (y2) - extents->y_bearing; + + if (font->x_strength || font->y_strength) + { + /* Y */ + int y_shift = font->y_strength; + if (font->y_scale < 0) y_shift = -y_shift; + extents->y_bearing += y_shift; + extents->height -= y_shift; + + /* X */ + int x_shift = font->x_strength; + if (font->x_scale < 0) x_shift = -x_shift; + if (font->embolden_in_place) + extents->x_bearing -= x_shift / 2; + extents->width += x_shift; + } return true; } @@ -700,6 +772,7 @@ hb_ft_get_font_h_extents (hb_font_t *font HB_UNUSED, FT_Matrix matrix; FT_Get_Transform (ft_face, &matrix, nullptr); y_mult = sqrtf ((float)matrix.yx * matrix.yx + (float)matrix.yy * matrix.yy) / 65536.f; + y_mult *= font->y_scale < 0 ? -1 : +1; } else #endif @@ -721,7 +794,7 @@ hb_ft_get_font_h_extents (hb_font_t *font HB_UNUSED, metrics->line_gap = ft_face->size->metrics.height - (metrics->ascender - metrics->descender); } - metrics->ascender = (hb_position_t) (y_mult * metrics->ascender); + metrics->ascender = (hb_position_t) (y_mult * (metrics->ascender + font->y_strength)); metrics->descender = (hb_position_t) (y_mult * metrics->descender); metrics->line_gap = (hb_position_t) (y_mult * metrics->line_gap); @@ -773,11 +846,11 @@ _hb_ft_cubic_to (const FT_Vector *control1, } static void -hb_ft_get_glyph_shape (hb_font_t *font HB_UNUSED, - void *font_data, - hb_codepoint_t glyph, - hb_draw_funcs_t *draw_funcs, void *draw_data, - void *user_data HB_UNUSED) +hb_ft_draw_glyph (hb_font_t *font, + void *font_data, + hb_codepoint_t glyph, + hb_draw_funcs_t *draw_funcs, void *draw_data, + void *user_data HB_UNUSED) { const hb_ft_font_t *ft_font = (const hb_ft_font_t *) font_data; hb_lock_t lock (ft_font->lock); @@ -801,12 +874,129 @@ hb_ft_get_glyph_shape (hb_font_t *font HB_UNUSED, hb_draw_session_t draw_session (draw_funcs, draw_data, font->slant_xy); + /* Embolden */ + if (font->x_strength || font->y_strength) + { + FT_Outline_EmboldenXY (&ft_face->glyph->outline, font->x_strength, font->y_strength); + + int x_shift = 0; + int y_shift = 0; + if (font->embolden_in_place) + { + /* Undo the FreeType shift. */ + x_shift = -font->x_strength / 2; + y_shift = 0; + if (font->y_scale < 0) y_shift = -font->y_strength; + } + else + { + /* FreeType applied things in the wrong direction for negative scale; fix up. */ + if (font->x_scale < 0) x_shift = -font->x_strength; + if (font->y_scale < 0) y_shift = -font->y_strength; + } + if (x_shift || y_shift) + { + auto &outline = ft_face->glyph->outline; + for (auto &point : hb_iter (outline.points, outline.contours[outline.n_contours - 1] + 1)) + { + point.x += x_shift; + point.y += y_shift; + } + } + } + + FT_Outline_Decompose (&ft_face->glyph->outline, &outline_funcs, &draw_session); } #endif +#ifndef HB_NO_PAINT +#if (FREETYPE_MAJOR*10000 + FREETYPE_MINOR*100 + FREETYPE_PATCH) >= 21300 + +#include "hb-ft-colr.hh" + +static void +hb_ft_paint_glyph (hb_font_t *font, + void *font_data, + hb_codepoint_t gid, + hb_paint_funcs_t *paint_funcs, void *paint_data, + unsigned int palette_index, + hb_color_t foreground, + void *user_data) +{ + const hb_ft_font_t *ft_font = (const hb_ft_font_t *) font_data; + hb_lock_t lock (ft_font->lock); + FT_Face ft_face = ft_font->ft_face; + + /* We release the lock before calling into glyph callbacks, such that + * eg. draw API can call back into the face.*/ + + if (unlikely (FT_Load_Glyph (ft_face, gid, + ft_font->load_flags | FT_LOAD_COLOR))) + return; + + if (ft_face->glyph->format == FT_GLYPH_FORMAT_OUTLINE) + { + if (hb_ft_paint_glyph_colr (font, font_data, gid, + paint_funcs, paint_data, + palette_index, foreground, + user_data)) + return; + + /* Simple outline. */ + ft_font->lock.unlock (); + paint_funcs->push_clip_glyph (paint_data, gid, font); + ft_font->lock.lock (); + paint_funcs->color (paint_data, true, foreground); + paint_funcs->pop_clip (paint_data); + + return; + } + + auto *glyph = ft_face->glyph; + if (glyph->format == FT_GLYPH_FORMAT_BITMAP) + { + auto &bitmap = glyph->bitmap; + if (bitmap.pixel_mode == FT_PIXEL_MODE_BGRA) + { + if (bitmap.pitch != (signed) bitmap.width * 4) + return; + + ft_font->lock.unlock (); + + hb_blob_t *blob = hb_blob_create ((const char *) bitmap.buffer, + bitmap.pitch * bitmap.rows, + HB_MEMORY_MODE_DUPLICATE, + nullptr, nullptr); + + hb_glyph_extents_t extents; + if (!hb_font_get_glyph_extents (font, gid, &extents)) + goto out; + + if (!paint_funcs->image (paint_data, + blob, + bitmap.width, + bitmap.rows, + HB_PAINT_IMAGE_FORMAT_BGRA, + font->slant_xy, + &extents)) + { + /* TODO Try a forced outline load and paint? */ + } + + out: + hb_blob_destroy (blob); + ft_font->lock.lock (); + } + + return; + } +} +#endif +#endif + static inline void free_static_ft_funcs (); @@ -840,7 +1030,13 @@ static struct hb_ft_font_funcs_lazy_loader_t : hb_font_funcs_lazy_loader_t<hb_ft hb_font_funcs_set_glyph_from_name_func (funcs, hb_ft_get_glyph_from_name, nullptr, nullptr); #ifndef HB_NO_DRAW - hb_font_funcs_set_glyph_shape_func (funcs, hb_ft_get_glyph_shape, nullptr, nullptr); + hb_font_funcs_set_draw_glyph_func (funcs, hb_ft_draw_glyph, nullptr, nullptr); +#endif + +#ifndef HB_NO_PAINT +#if (FREETYPE_MAJOR*10000 + FREETYPE_MINOR*100 + FREETYPE_PATCH) >= 21300 + hb_font_funcs_set_paint_glyph_func (funcs, hb_ft_paint_glyph, nullptr, nullptr); +#endif #endif hb_font_funcs_make_immutable (funcs); @@ -915,6 +1111,10 @@ _hb_ft_reference_table (hb_face_t *face HB_UNUSED, hb_tag_t tag, void *user_data * * Creates an #hb_face_t face object from the specified FT_Face. * + * Note that this is using the FT_Face object just to get at the underlying + * font data, and fonts created from the returned #hb_face_t will use the native + * HarfBuzz font implementation, unless you call hb_ft_font_set_funcs() on them. + * * This variant of the function does not provide any life-cycle management. * * Most client programs should use hb_ft_face_create_referenced() @@ -959,6 +1159,10 @@ hb_ft_face_create (FT_Face ft_face, * * Creates an #hb_face_t face object from the specified FT_Face. * + * Note that this is using the FT_Face object just to get at the underlying + * font data, and fonts created from the returned #hb_face_t will use the native + * HarfBuzz font implementation, unless you call hb_ft_font_set_funcs() on them. + * * This is the preferred variant of the hb_ft_face_create* * function family, because it calls FT_Reference_Face() on @ft_face, * ensuring that @ft_face remains alive as long as the resulting @@ -991,6 +1195,10 @@ hb_ft_face_finalize (void *arg) * * Creates an #hb_face_t face object from the specified FT_Face. * + * Note that this is using the FT_Face object just to get at the underlying + * font data, and fonts created from the returned #hb_face_t will use the native + * HarfBuzz font implementation, unless you call hb_ft_font_set_funcs() on them. + * * This variant of the function caches the newly created #hb_face_t * face object, using the @generic pointer of @ft_face. Subsequent function * calls that are passed the same @ft_face parameter will have the same @@ -1241,10 +1449,14 @@ _release_blob (void *arg) * created with hb_face_create(), and therefore was not * initially configured to use FreeType font functions. * - * An #hb_face_t face object created with hb_ft_face_create() + * An #hb_font_t object created with hb_ft_font_create() * is preconfigured for FreeType font functions and does not * require this function to be used. * + * Note that if you modify the underlying #hb_font_t after + * calling this function, you need to call hb_ft_hb_font_changed() + * to update the underlying FT_Face. + * * <note>Note: Internally, this function creates an FT_Face. * </note> * @@ -1285,5 +1497,4 @@ hb_ft_font_set_funcs (hb_font_t *font) _hb_ft_hb_font_changed (font, ft_face); } - #endif diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-gobject-structs.cc b/source/libs/harfbuzz/harfbuzz-src/src/hb-gobject-structs.cc index ef13f1e966d24ff41aaa5eb3db7339e323d0b6c7..332cc84888dd1844db6e24adb046c52d25af69a0 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-gobject-structs.cc +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-gobject-structs.cc @@ -91,6 +91,7 @@ hb_gobject_##name##_get_type () \ HB_DEFINE_OBJECT_TYPE (buffer) HB_DEFINE_OBJECT_TYPE (blob) HB_DEFINE_OBJECT_TYPE (draw_funcs) +HB_DEFINE_OBJECT_TYPE (paint_funcs) HB_DEFINE_OBJECT_TYPE (face) HB_DEFINE_OBJECT_TYPE (font) HB_DEFINE_OBJECT_TYPE (font_funcs) @@ -102,8 +103,12 @@ HB_DEFINE_VALUE_TYPE (feature) HB_DEFINE_VALUE_TYPE (glyph_info) HB_DEFINE_VALUE_TYPE (glyph_position) HB_DEFINE_VALUE_TYPE (segment_properties) +HB_DEFINE_VALUE_TYPE (draw_state) +HB_DEFINE_VALUE_TYPE (color_stop) +HB_DEFINE_VALUE_TYPE (color_line) HB_DEFINE_VALUE_TYPE (user_data_key) +HB_DEFINE_VALUE_TYPE (ot_var_axis_info) HB_DEFINE_VALUE_TYPE (ot_math_glyph_variant) HB_DEFINE_VALUE_TYPE (ot_math_glyph_part) diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-gobject-structs.h b/source/libs/harfbuzz/harfbuzz-src/src/hb-gobject-structs.h index 3914a2431aedd5f3a3c8ff66067431cd0fb96ae3..b7b5f55ce6712f9b6d9d269049b295102ddb8e0c 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-gobject-structs.h +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-gobject-structs.h @@ -52,6 +52,10 @@ HB_EXTERN GType hb_gobject_draw_funcs_get_type (void); #define HB_GOBJECT_TYPE_DRAW_FUNCS (hb_gobject_draw_funcs_get_type ()) +HB_EXTERN GType +hb_gobject_paint_funcs_get_type (void); +#define HB_GOBJECT_TYPE_PAINT_FUNCS (hb_gobject_paint_funcs_get_type ()) + HB_EXTERN GType hb_gobject_face_get_type (void); #define HB_GOBJECT_TYPE_FACE (hb_gobject_face_get_type ()) @@ -98,10 +102,26 @@ HB_EXTERN GType hb_gobject_segment_properties_get_type (void); #define HB_GOBJECT_TYPE_SEGMENT_PROPERTIES (hb_gobject_segment_properties_get_type ()) +HB_EXTERN GType +hb_gobject_draw_state_get_type (void); +#define HB_GOBJECT_TYPE_DRAW_STATE (hb_gobject_draw_state_get_type ()) + +HB_EXTERN GType +hb_gobject_color_stop_get_type (void); +#define HB_GOBJECT_TYPE_COLOR_STOP (hb_gobject_color_stop_get_type ()) + +HB_EXTERN GType +hb_gobject_color_line_get_type (void); +#define HB_GOBJECT_TYPE_COLOR_LINE (hb_gobject_color_line_get_type ()) + HB_EXTERN GType hb_gobject_user_data_key_get_type (void); #define HB_GOBJECT_TYPE_USER_DATA_KEY (hb_gobject_user_data_key_get_type ()) +HB_EXTERN GType +hb_gobject_ot_var_axis_info_get_type (void); +#define HB_GOBJECT_TYPE_OT_VAR_AXIS_INFO (hb_gobject_ot_var_axis_info_get_type ()) + HB_EXTERN GType hb_gobject_ot_math_glyph_variant_get_type (void); #define HB_GOBJECT_TYPE_OT_MATH_GLYPH_VARIANT (hb_gobject_ot_math_glyph_variant_get_type ()) diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-graphite2.h b/source/libs/harfbuzz/harfbuzz-src/src/hb-graphite2.h index f299da9f71c97d3d860f3bfbdeca0c8645deb779..ee9229b8b00485f47f0ffe9ecc5affffb29574a5 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-graphite2.h +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-graphite2.h @@ -49,7 +49,8 @@ hb_graphite2_face_get_gr_face (hb_face_t *face); #ifndef HB_DISABLE_DEPRECATED -HB_EXTERN HB_DEPRECATED_FOR (hb_graphite2_face_get_gr_face) gr_font * +HB_DEPRECATED_FOR (hb_graphite2_face_get_gr_face) +HB_EXTERN gr_font * hb_graphite2_font_get_gr_font (hb_font_t *font); #endif diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-iter.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-iter.hh index b57f37b1322b6c6d86331bfd629d403be5ce0290..b123b2f27cf9e0d6853d2e96bcc6f10b7fa10302 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-iter.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-iter.hh @@ -172,10 +172,16 @@ struct HB_FUNCOBJ (hb_iter); struct { - template <typename T> unsigned - operator () (T&& c) const - { return c.len (); } + template <typename T> auto + impl (T&& c, hb_priority<1>) const HB_RETURN (unsigned, c.len ()) + + template <typename T> auto + impl (T&& c, hb_priority<0>) const HB_RETURN (unsigned, c.len) + + public: + template <typename T> auto + operator () (T&& c) const HB_RETURN (unsigned, impl (std::forward<T> (c), hb_prioritize)) } HB_FUNCOBJ (hb_len); diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-limits.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-limits.hh new file mode 100644 index 0000000000000000000000000000000000000000..0f60e9e21013b024d169f9c5d30c22c728dcb38b --- /dev/null +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-limits.hh @@ -0,0 +1,109 @@ +/* + * Copyright © 2022 Behdad Esfahbod + * + * This is part of HarfBuzz, a text shaping library. + * + * 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. + */ + +#ifndef HB_LIMITS_HH +#define HB_LIMITS_HH + +#include "hb.hh" + + +#ifndef HB_BUFFER_MAX_LEN_FACTOR +#define HB_BUFFER_MAX_LEN_FACTOR 64 +#endif +#ifndef HB_BUFFER_MAX_LEN_MIN +#define HB_BUFFER_MAX_LEN_MIN 16384 +#endif +#ifndef HB_BUFFER_MAX_LEN_DEFAULT +#define HB_BUFFER_MAX_LEN_DEFAULT 0x3FFFFFFF /* Shaping more than a billion chars? Let us know! */ +#endif + +#ifndef HB_BUFFER_MAX_OPS_FACTOR +#define HB_BUFFER_MAX_OPS_FACTOR 1024 +#endif +#ifndef HB_BUFFER_MAX_OPS_MIN +#define HB_BUFFER_MAX_OPS_MIN 16384 +#endif +#ifndef HB_BUFFER_MAX_OPS_DEFAULT +#define HB_BUFFER_MAX_OPS_DEFAULT 0x1FFFFFFF /* Shaping more than a billion operations? Let us know! */ +#endif + + +#ifndef HB_MAX_NESTING_LEVEL +#define HB_MAX_NESTING_LEVEL 64 +#endif + + +#ifndef HB_MAX_CONTEXT_LENGTH +#define HB_MAX_CONTEXT_LENGTH 64 +#endif + +#ifndef HB_CLOSURE_MAX_STAGES +/* + * The maximum number of times a lookup can be applied during shaping. + * Used to limit the number of iterations of the closure algorithm. + * This must be larger than the number of times add_gsub_pause() is + * called in a collect_features call of any shaper. + */ +#define HB_CLOSURE_MAX_STAGES 12 +#endif + +#ifndef HB_MAX_SCRIPTS +#define HB_MAX_SCRIPTS 500 +#endif + +#ifndef HB_MAX_LANGSYS +#define HB_MAX_LANGSYS 2000 +#endif + +#ifndef HB_MAX_LANGSYS_FEATURE_COUNT +#define HB_MAX_LANGSYS_FEATURE_COUNT 50000 +#endif + +#ifndef HB_MAX_FEATURE_INDICES +#define HB_MAX_FEATURE_INDICES 1500 +#endif + +#ifndef HB_MAX_LOOKUP_VISIT_COUNT +#define HB_MAX_LOOKUP_VISIT_COUNT 35000 +#endif + + +#ifndef HB_GLYF_MAX_POINTS +#define HB_GLYF_MAX_POINTS 20000 +#endif + +#ifndef HB_GLYF_MAX_EDGE_COUNT +#define HB_GLYF_MAX_EDGE_COUNT 1024 +#endif + +#ifndef HB_CFF_MAX_OPS +#define HB_CFF_MAX_OPS 10000 +#endif + +#ifndef HB_COLRV1_MAX_EDGE_COUNT +#define HB_COLRV1_MAX_EDGE_COUNT 1024 +#endif + + +#endif /* HB_LIMITS_HH */ diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-machinery.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-machinery.hh index b555739cfb6b682cf710ad0da36109e740594d00..1084725af2ad9aafe5718aef5f38156f28e8be3a 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-machinery.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-machinery.hh @@ -34,7 +34,6 @@ #include "hb-dispatch.hh" #include "hb-sanitize.hh" -#include "hb-serialize.hh" /* @@ -305,22 +304,22 @@ struct hb_table_lazy_loader_t : hb_lazy_loader_t<T, hb_blob_t* get_blob () const { return this->get_stored (); } }; -template <typename Subclass> -struct hb_font_funcs_lazy_loader_t : hb_lazy_loader_t<hb_font_funcs_t, Subclass> -{ - static void destroy (hb_font_funcs_t *p) - { hb_font_funcs_destroy (p); } - static const hb_font_funcs_t *get_null () - { return hb_font_funcs_get_empty (); } -}; -template <typename Subclass> -struct hb_unicode_funcs_lazy_loader_t : hb_lazy_loader_t<hb_unicode_funcs_t, Subclass> -{ - static void destroy (hb_unicode_funcs_t *p) - { hb_unicode_funcs_destroy (p); } - static const hb_unicode_funcs_t *get_null () - { return hb_unicode_funcs_get_empty (); } -}; +#define HB_DEFINE_TYPE_FUNCS_LAZY_LOADER_T(Type) \ + template <typename Subclass> \ + struct hb_##Type##_funcs_lazy_loader_t : hb_lazy_loader_t<hb_##Type##_funcs_t, Subclass> \ + { \ + static void destroy (hb_##Type##_funcs_t *p) \ + { hb_##Type##_funcs_destroy (p); } \ + static const hb_##Type##_funcs_t *get_null () \ + { return hb_##Type##_funcs_get_empty (); } \ + } + +HB_DEFINE_TYPE_FUNCS_LAZY_LOADER_T (font); +HB_DEFINE_TYPE_FUNCS_LAZY_LOADER_T (unicode); +HB_DEFINE_TYPE_FUNCS_LAZY_LOADER_T (draw); +HB_DEFINE_TYPE_FUNCS_LAZY_LOADER_T (paint); + +#undef HB_DEFINE_TYPE_FUNCS_LAZY_LOADER_T #endif /* HB_MACHINERY_HH */ diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-map.cc b/source/libs/harfbuzz/harfbuzz-src/src/hb-map.cc index 5c5f5de59e93e0d24419616d538a32ed3d6f612b..0014570e8e5d8c8730beaae209ed2ac7af8390cd 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-map.cc +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-map.cc @@ -174,7 +174,7 @@ hb_map_allocation_successful (const hb_map_t *map) * * Allocate a copy of @map. * - * Return value: Newly-allocated map. + * Return value: (transfer full): Newly-allocated map. * * Since: 4.4.0 **/ @@ -182,9 +182,10 @@ hb_map_t * hb_map_copy (const hb_map_t *map) { hb_map_t *copy = hb_map_create (); - if (unlikely (!copy)) return nullptr; - copy->resize (map->population); - hb_copy (*map, *copy); + if (unlikely (copy->in_error ())) + return hb_map_get_empty (); + + *copy = *map; return copy; } @@ -335,9 +336,84 @@ hb_map_is_equal (const hb_map_t *map, * * Since: 4.4.0 **/ -HB_EXTERN unsigned int +unsigned int hb_map_hash (const hb_map_t *map) { return map->hash (); } +/** + * hb_map_update: + * @map: A map + * @other: Another map + * + * Add the contents of @other to @map. + * + * Since: 7.0.0 + **/ +HB_EXTERN void +hb_map_update (hb_map_t *map, + const hb_map_t *other) +{ + map->update (*other); +} + +/** + * hb_map_next: + * @map: A map + * @idx: (inout): Iterator internal state + * @key: (out): Key retrieved + * @value: (out): Value retrieved + * + * Fetches the next key/value paire in @map. + * + * Set @idx to -1 to get started. + * + * If the map is modified during iteration, the behavior is undefined. + * + * The order in which the key/values are returned is undefined. + * + * Return value: `true` if there was a next value, `false` otherwise + * + * Since: 7.0.0 + **/ +hb_bool_t +hb_map_next (const hb_map_t *map, + int *idx, + hb_codepoint_t *key, + hb_codepoint_t *value) +{ + return map->next (idx, key, value); +} + +/** + * hb_map_keys: + * @map: A map + * @keys: A set + * + * Add the keys of @map to @keys. + * + * Since: 7.0.0 + **/ +void +hb_map_keys (const hb_map_t *map, + hb_set_t *keys) +{ + map->keys (*keys); +} + +/** + * hb_map_values: + * @map: A map + * @values: A set + * + * Add the values of @map to @values. + * + * Since: 7.0.0 + **/ +void +hb_map_values (const hb_map_t *map, + hb_set_t *values) +{ + map->values (*values); +} diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-map.h b/source/libs/harfbuzz/harfbuzz-src/src/hb-map.h index 3a067c5c73b069271ea36b34980e2cf29b63fdb5..e928628fa7a2e3b5b78f8f17fc16753a04475e47 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-map.h +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-map.h @@ -32,6 +32,7 @@ #define HB_MAP_H #include "hb-common.h" +#include "hb-set.h" HB_BEGIN_DECLS @@ -118,6 +119,24 @@ HB_EXTERN hb_bool_t hb_map_has (const hb_map_t *map, hb_codepoint_t key); +HB_EXTERN void +hb_map_update (hb_map_t *map, + const hb_map_t *other); + +/* Pass -1 in for idx to get started. */ +HB_EXTERN hb_bool_t +hb_map_next (const hb_map_t *map, + int *idx, + hb_codepoint_t *key, + hb_codepoint_t *value); + +HB_EXTERN void +hb_map_keys (const hb_map_t *map, + hb_set_t *keys); + +HB_EXTERN void +hb_map_values (const hb_map_t *map, + hb_set_t *values); HB_END_DECLS diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-map.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-map.hh index bfb1b3f7680953aa65fc7bf271d50f4b16944182..615d1825edd6250e228d066fd2b6fcc3c6165565 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-map.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-map.hh @@ -29,6 +29,8 @@ #include "hb.hh" +#include "hb-set.hh" + /* * hb_hashmap_t @@ -308,6 +310,23 @@ struct hb_hashmap_t unsigned int get_population () const { return population; } + void update (const hb_hashmap_t &other) + { + if (unlikely (!successful)) return; + + hb_copy (other, *this); + } + + void keys (hb_set_t &keys_) const + { + hb_copy (keys() , keys_); + } + + void values (hb_set_t &values_) const + { + hb_copy (values() , values_); + } + /* * Iterator */ @@ -348,6 +367,30 @@ struct hb_hashmap_t | hb_map (hb_ridentity) ) + /* C iterator. */ + bool next (int *idx, + K *key, + V *value) const + { + unsigned i = (unsigned) (*idx + 1); + + unsigned count = size (); + while (i < count && !items[i].is_real ()) + i++; + + if (i >= count) + { + *idx = -1; + return false; + } + + *key = items[i].key; + *value = items[i].value; + + *idx = (signed) i; + return true; + } + /* Sink interface. */ hb_hashmap_t& operator << (const hb_pair_t<K, V>& v) { set (v.first, v.second); return *this; } @@ -451,37 +494,5 @@ struct hb_map_t : hb_hashmap_t<hb_codepoint_t, hb_map_t (const Iterable &o) : hashmap (o) {} }; -template <typename K, typename V> -static inline -hb_hashmap_t<K, V>* hb_hashmap_create () -{ - using hashmap = hb_hashmap_t<K, V>; - hashmap* map; - if (!(map = hb_object_create<hashmap> ())) - return nullptr; - - return map; -} - -template <typename K, typename V> -static inline -void hb_hashmap_destroy (hb_hashmap_t<K, V>* map) -{ - if (!hb_object_destroy (map)) - return; - - hb_free (map); -} - -namespace hb { - -template <typename K, typename V> -struct vtable<hb_hashmap_t<K, V>> -{ - static constexpr auto destroy = hb_hashmap_destroy<K,V>; -}; - -} - #endif /* HB_MAP_HH */ diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ms-feature-ranges.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-ms-feature-ranges.hh index 46a20c91eab6c54b3247bd4ed98154df240d8172..f7649ab76e4f6860df6d5f31d6518c27f131864a 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ms-feature-ranges.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ms-feature-ranges.hh @@ -30,6 +30,9 @@ #include "hb.hh" +/* Variations of this code exist in hb-coretext.cc as well + * as hb-aat-map.cc... */ + typedef struct hb_ms_feature_t { uint32_t tag_le; uint32_t value; diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-multimap.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-multimap.hh index f0f95917aaaff60db6702db36f628d7f3fa79989..b4a8cc62a3e3cd034c3109bdaf323e7904a2d8ac 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-multimap.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-multimap.hh @@ -65,7 +65,7 @@ struct hb_multimap_t hb_array_t<const hb_codepoint_t> get (hb_codepoint_t k) const { - hb_codepoint_t *v; + const hb_codepoint_t *v; if (singulars.has (k, &v)) return hb_array (v, 1); @@ -73,7 +73,7 @@ struct hb_multimap_t if (multiples_indices.has (k, &i)) return multiples_values[*i].as_array (); - return hb_array_t<hb_codepoint_t> (); + return hb_array_t<const hb_codepoint_t> (); } bool in_error () const diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-mutex.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-mutex.hh index 053f9ddcc4f5cbf827ea27d612701bf08dc8c542..e329d9864f1c5daad3d2ad3941885569510fe228 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-mutex.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-mutex.hh @@ -60,7 +60,7 @@ typedef pthread_mutex_t hb_mutex_impl_t; #elif !defined(HB_NO_MT) && !defined(HB_MUTEX_IMPL_STD_MUTEX) && defined(_WIN32) typedef CRITICAL_SECTION hb_mutex_impl_t; -#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) +#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) #define hb_mutex_impl_init(M) InitializeCriticalSectionEx (M, 0, 0) #else #define hb_mutex_impl_init(M) InitializeCriticalSection (M) @@ -97,6 +97,9 @@ struct hb_mutex_t /* Create space for, but do not initialize m. */ alignas(hb_mutex_impl_t) char m[sizeof (hb_mutex_impl_t)]; + hb_mutex_t () { init (); } + ~hb_mutex_t () { fini (); } + #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wcast-align" void init () { hb_mutex_impl_init ((hb_mutex_impl_t *) m); } diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-number.cc b/source/libs/harfbuzz/harfbuzz-src/src/hb-number.cc index 6e4f3f7ebd0a2f87e938cf36549fbc36fb095c85..c52b284e1d21eb9dc46becdb329edb750bde92de 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-number.cc +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-number.cc @@ -24,7 +24,6 @@ */ #include "hb.hh" -#include "hb-machinery.hh" #include "hb-number.hh" #include "hb-number-parser.hh" diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-object.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-object.hh index a23c25f7ca42a78468b706f5c5658c41d4ad2370..e2c2c3394cb0532f62654103da9212a70fdccb0f 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-object.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-object.hh @@ -69,7 +69,7 @@ struct hb_lockable_set_t item = items.push (v); l.unlock (); } - return item; + return items.in_error () ? nullptr : item; } template <typename T> @@ -175,14 +175,34 @@ struct hb_user_data_array_t void init () { lock.init (); items.init (); } - HB_INTERNAL bool set (hb_user_data_key_t *key, - void * data, - hb_destroy_func_t destroy, - hb_bool_t replace); + void fini () { items.fini (lock); lock.fini (); } - HB_INTERNAL void *get (hb_user_data_key_t *key); + bool set (hb_user_data_key_t *key, + void * data, + hb_destroy_func_t destroy, + hb_bool_t replace) + { + if (!key) + return false; - void fini () { items.fini (lock); lock.fini (); } + if (replace) { + if (!data && !destroy) { + items.remove (key, lock); + return true; + } + } + hb_user_data_item_t item = {key, data, destroy}; + bool ret = !!items.replace_or_insert (item, lock, (bool) replace); + + return ret; + } + + void *get (hb_user_data_key_t *key) + { + hb_user_data_item_t item = {nullptr, nullptr, nullptr}; + + return items.find (key, &item, lock) ? item.data : nullptr; + } }; diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-open-type.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-open-type.hh index 290799127af3b0dbd2c7ae3c9c87696c7830047d..4c9bfebcec1544aa427a4e0c3b309207c7802215 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-open-type.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-open-type.hh @@ -147,7 +147,10 @@ struct HBFixed : Type static constexpr float shift = (float) (1 << fraction_bits); static_assert (Type::static_size * 8 > fraction_bits, ""); - HBFixed& operator = (typename Type::type i ) { Type::operator= (i); return *this; } + operator signed () const = delete; + operator unsigned () const = delete; + typename Type::type to_int () const { return Type::v; } + void set_int (typename Type::type i ) { Type::v = i; } float to_float (float offset = 0) const { return ((int32_t) Type::v + offset) / shift; } void set_float (float f) { Type::v = roundf (f * shift); } public: @@ -156,9 +159,8 @@ struct HBFixed : Type /* 16-bit signed fixed number with the low 14 bits of fraction (2.14). */ using F2DOT14 = HBFixed<HBINT16, 14>; - -/* 16-bit signed fixed number with the low 12 bits of fraction (4.12). */ using F4DOT12 = HBFixed<HBINT16, 12>; +using F6DOT10 = HBFixed<HBINT16, 10>; /* 32-bit signed fixed-point number (16.16). */ using F16DOT16 = HBFixed<HBINT32, 16>; diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cff1-table.cc b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cff1-table.cc index bd9fe5d6d408f5da0c3f88552deda84162f9605a..5040c746234c075f82e1b6dc418c4825268c4e03 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cff1-table.cc +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cff1-table.cc @@ -422,8 +422,8 @@ bool OT::cff1::accelerator_t::get_extents (hb_font_t *font, hb_codepoint_t glyph } else { - extents->x_bearing = font->em_scalef_x (bounds.min.x.to_real ()); - extents->width = font->em_scalef_x (bounds.max.x.to_real ()) - extents->x_bearing; + extents->x_bearing = roundf (bounds.min.x.to_real ()); + extents->width = roundf (bounds.max.x.to_real () - extents->x_bearing); } if (bounds.min.y >= bounds.max.y) { @@ -432,10 +432,12 @@ bool OT::cff1::accelerator_t::get_extents (hb_font_t *font, hb_codepoint_t glyph } else { - extents->y_bearing = font->em_scalef_y (bounds.max.y.to_real ()); - extents->height = font->em_scalef_y (bounds.min.y.to_real ()) - extents->y_bearing; + extents->y_bearing = roundf (bounds.max.y.to_real ()); + extents->height = roundf (bounds.min.y.to_real () - extents->y_bearing); } + font->scale_glyph_extents (extents); + return true; } @@ -551,6 +553,15 @@ bool _get_path (const OT::cff1::accelerator_t *cff, hb_font_t *font, hb_codepoin return true; } +bool OT::cff1::accelerator_t::paint_glyph (hb_font_t *font, hb_codepoint_t glyph, hb_paint_funcs_t *funcs, void *data, hb_color_t foreground) const +{ + funcs->push_clip_glyph (data, glyph, font); + funcs->color (data, true, foreground); + funcs->pop_clip (data); + + return true; +} + bool OT::cff1::accelerator_t::get_path (hb_font_t *font, hb_codepoint_t glyph, hb_draw_session_t &draw_session) const { #ifdef HB_NO_OT_FONT_CFF diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cff1-table.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cff1-table.hh index bb856c9ddbc1854af8e272948b106fefbd0a71c7..f461a230449af4679f4823e99462406b61822478 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cff1-table.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cff1-table.hh @@ -30,6 +30,7 @@ #include "hb-ot-cff-common.hh" #include "hb-subset-cff1.hh" #include "hb-draw.hh" +#include "hb-paint.hh" #define HB_STRING_ARRAY_NAME cff1_std_strings #define HB_STRING_ARRAY_LIST "hb-ot-cff1-std-str.hh" @@ -901,8 +902,6 @@ struct cff1_private_dict_opset_t : dict_opset_t case OpCode_FamilyOtherBlues: case OpCode_StemSnapH: case OpCode_StemSnapV: - env.clear_args (); - break; case OpCode_StdHW: case OpCode_StdVW: case OpCode_BlueScale: @@ -914,7 +913,6 @@ struct cff1_private_dict_opset_t : dict_opset_t case OpCode_initialRandomSeed: case OpCode_defaultWidthX: case OpCode_nominalWidthX: - val.single_val = env.argStack.pop_num (); env.clear_args (); break; case OpCode_Subrs: @@ -1343,6 +1341,7 @@ struct cff1 bool get_glyph_name (hb_codepoint_t glyph, char *buf, unsigned int buf_len) const { + if (unlikely (glyph >= num_glyphs)) return false; if (unlikely (!is_valid ())) return false; if (is_CID()) return false; if (unlikely (!buf_len)) return true; @@ -1426,6 +1425,7 @@ struct cff1 } HB_INTERNAL bool get_extents (hb_font_t *font, hb_codepoint_t glyph, hb_glyph_extents_t *extents) const; + HB_INTERNAL bool paint_glyph (hb_font_t *font, hb_codepoint_t glyph, hb_paint_funcs_t *funcs, void *data, hb_color_t foreground) const; HB_INTERNAL bool get_seac_components (hb_codepoint_t glyph, hb_codepoint_t *base, hb_codepoint_t *accent) const; HB_INTERNAL bool get_path (hb_font_t *font, hb_codepoint_t glyph, hb_draw_session_t &draw_session) const; diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cff2-table.cc b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cff2-table.cc index 50c76daf93e76291ffc069418698b91274907f72..79555655519e9aa383d25ab9b033ca42cdf7fdc6 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cff2-table.cc +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cff2-table.cc @@ -124,8 +124,8 @@ bool OT::cff2::accelerator_t::get_extents (hb_font_t *font, } else { - extents->x_bearing = font->em_scalef_x (param.min_x.to_real ()); - extents->width = font->em_scalef_x (param.max_x.to_real ()) - extents->x_bearing; + extents->x_bearing = roundf (param.min_x.to_real ()); + extents->width = roundf (param.max_x.to_real () - extents->x_bearing); } if (param.min_y >= param.max_y) { @@ -134,10 +134,21 @@ bool OT::cff2::accelerator_t::get_extents (hb_font_t *font, } else { - extents->y_bearing = font->em_scalef_y (param.max_y.to_real ()); - extents->height = font->em_scalef_y (param.min_y.to_real ()) - extents->y_bearing; + extents->y_bearing = roundf (param.max_y.to_real ()); + extents->height = roundf (param.min_y.to_real () - extents->y_bearing); } + font->scale_glyph_extents (extents); + + return true; +} + +bool OT::cff2::accelerator_t::paint_glyph (hb_font_t *font, hb_codepoint_t glyph, hb_paint_funcs_t *funcs, void *data, hb_color_t foreground) const +{ + funcs->push_clip_glyph (data, glyph, font); + funcs->color (data, true, foreground); + funcs->pop_clip (data); + return true; } diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cff2-table.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cff2-table.hh index 9081930bbeb8e30f5d1a35eb2a1817df5a62ac0e..b9a8819ab85ae7ab4e619b5f613cf8d1c20afb1f 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cff2-table.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cff2-table.hh @@ -30,6 +30,7 @@ #include "hb-ot-cff-common.hh" #include "hb-subset-cff2.hh" #include "hb-draw.hh" +#include "hb-paint.hh" namespace CFF { @@ -282,9 +283,6 @@ struct cff2_private_dict_opset_t : dict_opset_t case OpCode_BlueFuzz: case OpCode_ExpansionFactor: case OpCode_LanguageGroup: - val.single_val = env.argStack.pop_num (); - env.clear_args (); - break; case OpCode_BlueValues: case OpCode_OtherBlues: case OpCode_FamilyBlues: @@ -516,6 +514,7 @@ struct cff2 HB_INTERNAL bool get_extents (hb_font_t *font, hb_codepoint_t glyph, hb_glyph_extents_t *extents) const; + HB_INTERNAL bool paint_glyph (hb_font_t *font, hb_codepoint_t glyph, hb_paint_funcs_t *funcs, void *data, hb_color_t foreground) const; HB_INTERNAL bool get_path (hb_font_t *font, hb_codepoint_t glyph, hb_draw_session_t &draw_session) const; }; diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cmap-table.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cmap-table.hh index 523196fa797a4dd7f117d6f31c4086a358e53037..f5a03d2b00ebf4d41f5d055d7b0c62142c96d18b 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cmap-table.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-cmap-table.hh @@ -31,6 +31,7 @@ #include "hb-ot-shaper-arabic-pua.hh" #include "hb-open-type.hh" #include "hb-set.hh" +#include "hb-cache.hh" /* * cmap -- Character to Glyph Index Mapping @@ -1414,7 +1415,7 @@ struct CmapSubtable switch (format) { case 4: return u.format4.serialize (c, it); case 12: return u.format12.serialize (c, it); - case 14: return u.format14.serialize (c, plan->unicodes, plan->glyphs_requested, plan->glyph_map, base); + case 14: return u.format14.serialize (c, &plan->unicodes, &plan->glyphs_requested, plan->glyph_map, base); default: return; } } @@ -1841,6 +1842,8 @@ struct cmap struct accelerator_t { + using cache_t = hb_cache_t<21, 16, 8, true>; + accelerator_t (hb_face_t *face) { this->table = hb_sanitize_context_t ().reference_table<cmap> (face); @@ -1895,26 +1898,43 @@ struct cmap } ~accelerator_t () { this->table.destroy (); } + inline bool _cached_get (hb_codepoint_t unicode, + hb_codepoint_t *glyph, + cache_t *cache) const + { + unsigned v; + if (cache && cache->get (unicode, &v)) + { + *glyph = v; + return true; + } + bool ret = this->get_glyph_funcZ (this->get_glyph_data, unicode, glyph); + + if (cache && ret) + cache->set (unicode, *glyph); + return ret; + } + bool get_nominal_glyph (hb_codepoint_t unicode, - hb_codepoint_t *glyph) const + hb_codepoint_t *glyph, + cache_t *cache = nullptr) const { - if (unlikely (!this->get_glyph_funcZ)) return false; - return this->get_glyph_funcZ (this->get_glyph_data, unicode, glyph); + if (unlikely (!this->get_glyph_funcZ)) return 0; + return _cached_get (unicode, glyph, cache); } + unsigned int get_nominal_glyphs (unsigned int count, const hb_codepoint_t *first_unicode, unsigned int unicode_stride, hb_codepoint_t *first_glyph, - unsigned int glyph_stride) const + unsigned int glyph_stride, + cache_t *cache = nullptr) const { if (unlikely (!this->get_glyph_funcZ)) return 0; - hb_cmap_get_glyph_func_t get_glyph_funcZ = this->get_glyph_funcZ; - const void *get_glyph_data = this->get_glyph_data; - unsigned int done; for (done = 0; - done < count && get_glyph_funcZ (get_glyph_data, *first_unicode, first_glyph); + done < count && _cached_get (*first_unicode, first_glyph, cache); done++) { first_unicode = &StructAtOffsetUnaligned<hb_codepoint_t> (first_unicode, unicode_stride); @@ -1925,7 +1945,8 @@ struct cmap bool get_variation_glyph (hb_codepoint_t unicode, hb_codepoint_t variation_selector, - hb_codepoint_t *glyph) const + hb_codepoint_t *glyph, + cache_t *cache = nullptr) const { switch (this->subtable_uvs->get_glyph_variant (unicode, variation_selector, @@ -1936,7 +1957,7 @@ struct cmap case GLYPH_VARIANT_USE_DEFAULT: break; } - return get_nominal_glyph (unicode, glyph); + return get_nominal_glyph (unicode, glyph, cache); } void collect_unicodes (hb_set_t *out, unsigned int num_glyphs) const diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color.cc b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color.cc index 696ca3e17f7e7443c63a479e90dc5add4c6d624f..37d42e08d94e6f75437574438c203aa6e27d3b66 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color.cc +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color.cc @@ -31,11 +31,11 @@ #include "hb-ot.h" -#include "hb-ot-color-cbdt-table.hh" -#include "hb-ot-color-colr-table.hh" -#include "hb-ot-color-cpal-table.hh" -#include "hb-ot-color-sbix-table.hh" -#include "hb-ot-color-svg-table.hh" +#include "OT/Color/CBDT/CBDT.hh" +#include "OT/Color/COLR/COLR.hh" +#include "OT/Color/CPAL/CPAL.hh" +#include "OT/Color/sbix/sbix.hh" +#include "OT/Color/svg/svg.hh" /** @@ -167,6 +167,10 @@ hb_ot_color_palette_get_flags (hb_face_t *face, * for allocating a buffer of suitable size before calling * hb_ot_color_palette_get_colors() a second time. * + * The RGBA values in the palette are unpremultiplied. See the + * OpenType spec [CPAL](https://learn.microsoft.com/en-us/typography/opentype/spec/cpal) + * section for details. + * * Return value: the total number of colors in the palette * * Since: 2.1.0 @@ -190,7 +194,8 @@ hb_ot_color_palette_get_colors (hb_face_t *face, * hb_ot_color_has_layers: * @face: #hb_face_t to work upon * - * Tests whether a face includes any `COLR` color layers. + * Tests whether a face includes a `COLR` table + * with data according to COLRv0. * * Return value: `true` if data found, `false` otherwise * @@ -199,7 +204,43 @@ hb_ot_color_palette_get_colors (hb_face_t *face, hb_bool_t hb_ot_color_has_layers (hb_face_t *face) { - return face->table.COLR->has_data (); + return face->table.COLR->has_v0_data (); +} + +/** + * hb_ot_color_has_paint: + * @face: #hb_face_t to work upon + * + * Tests where a face includes a `COLR` table + * with data according to COLRv1. + * + * Return value: `true` if data found, `false` otherwise + * + * Since: 7.0.0 + */ +hb_bool_t +hb_ot_color_has_paint (hb_face_t *face) +{ + return face->table.COLR->has_v1_data (); +} + +/** + * hb_ot_color_glyph_has_paint: + * @face: #hb_face_t to work upon + * @glyph: The glyph index to query + * + * Tests where a face includes COLRv1 paint + * data for @glyph. + * + * Return value: `true` if data found, `false` otherwise + * + * Since: 7.0.0 + */ +hb_bool_t +hb_ot_color_glyph_has_paint (hb_face_t *face, + hb_codepoint_t glyph) +{ + return face->table.COLR->has_paint_for_glyph (glyph); } /** diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color.h b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color.h index d11e07e2309ad0f23edd6b906e54bbd04f487733..22ee497e388bf326483353b5ab74ea2e0ecd1574 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color.h +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-color.h @@ -120,6 +120,15 @@ hb_ot_color_glyph_get_layers (hb_face_t *face, unsigned int *layer_count, /* IN/OUT. May be NULL. */ hb_ot_color_layer_t *layers /* OUT. May be NULL. */); +/* COLRv1 */ + +HB_EXTERN hb_bool_t +hb_ot_color_has_paint (hb_face_t *face); + +HB_EXTERN hb_bool_t +hb_ot_color_glyph_has_paint (hb_face_t *face, + hb_codepoint_t glyph); + /* * SVG */ diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-deprecated.h b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-deprecated.h index 5192ff73e3936cd7a954773ecebef9a2bc275ca0..60672ab1283ade94b47510cf54f5aa7242f34d33 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-deprecated.h +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-deprecated.h @@ -67,26 +67,30 @@ HB_BEGIN_DECLS /* Like hb_ot_layout_table_find_script, but takes zero-terminated array of scripts to test */ -HB_EXTERN HB_DEPRECATED_FOR (hb_ot_layout_table_select_script) hb_bool_t +HB_DEPRECATED_FOR (hb_ot_layout_table_select_script) +HB_EXTERN hb_bool_t hb_ot_layout_table_choose_script (hb_face_t *face, hb_tag_t table_tag, const hb_tag_t *script_tags, unsigned int *script_index, hb_tag_t *chosen_script); -HB_EXTERN HB_DEPRECATED_FOR (hb_ot_layout_script_select_language) hb_bool_t +HB_DEPRECATED_FOR (hb_ot_layout_script_select_language) +HB_EXTERN hb_bool_t hb_ot_layout_script_find_language (hb_face_t *face, hb_tag_t table_tag, unsigned int script_index, hb_tag_t language_tag, unsigned int *language_index); -HB_EXTERN HB_DEPRECATED_FOR (hb_ot_tags_from_script_and_language) void +HB_DEPRECATED_FOR (hb_ot_tags_from_script_and_language) +HB_EXTERN void hb_ot_tags_from_script (hb_script_t script, hb_tag_t *script_tag_1, hb_tag_t *script_tag_2); -HB_EXTERN HB_DEPRECATED_FOR (hb_ot_tags_from_script_and_language) hb_tag_t +HB_DEPRECATED_FOR (hb_ot_tags_from_script_and_language) +HB_EXTERN hb_tag_t hb_ot_tag_from_language (hb_language_t language); @@ -121,13 +125,15 @@ typedef struct hb_ot_var_axis_t { float max_value; } hb_ot_var_axis_t; -HB_EXTERN HB_DEPRECATED_FOR (hb_ot_var_get_axis_infos) unsigned int +HB_DEPRECATED_FOR (hb_ot_var_get_axis_infos) +HB_EXTERN unsigned int hb_ot_var_get_axes (hb_face_t *face, unsigned int start_offset, unsigned int *axes_count /* IN/OUT */, hb_ot_var_axis_t *axes_array /* OUT */); -HB_EXTERN HB_DEPRECATED_FOR (hb_ot_var_find_axis_info) hb_bool_t +HB_DEPRECATED_FOR (hb_ot_var_find_axis_info) +HB_EXTERN hb_bool_t hb_ot_var_find_axis (hb_face_t *face, hb_tag_t axis_tag, unsigned int *axis_index, diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-face.cc b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-face.cc index 5ef8df43ce7c03da0c4949889a6bbe08a8aaf535..2243ee0287414521a84386142f8e6a1ec7744d5a 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-face.cc +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-face.cc @@ -35,9 +35,9 @@ #include "hb-ot-meta-table.hh" #include "hb-ot-name-table.hh" #include "hb-ot-post-table.hh" -#include "hb-ot-color-cbdt-table.hh" -#include "hb-ot-color-sbix-table.hh" -#include "hb-ot-color-svg-table.hh" +#include "OT/Color/CBDT/CBDT.hh" +#include "OT/Color/sbix/sbix.hh" +#include "OT/Color/svg/svg.hh" #include "hb-ot-layout-gdef-table.hh" #include "hb-ot-layout-gsub-table.hh" #include "hb-ot-layout-gpos-table.hh" diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-font.cc b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-font.cc index 84051034238a7ce3c814d2c4231acc699c2f66ef..19ae02e28b620967949369a3523f9be95be3c0a7 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-font.cc +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-font.cc @@ -34,6 +34,7 @@ #include "hb-font.hh" #include "hb-machinery.hh" #include "hb-ot-face.hh" +#include "hb-outline.hh" #include "hb-ot-cmap-table.hh" #include "hb-ot-glyf-table.hh" @@ -43,9 +44,10 @@ #include "hb-ot-post-table.hh" #include "hb-ot-stat-table.hh" // Just so we compile it; unused otherwise. #include "hb-ot-vorg-table.hh" -#include "hb-ot-color-cbdt-table.hh" -#include "hb-ot-color-sbix-table.hh" -#include "hb-ot-color-colr-table.hh" +#include "OT/Color/CBDT/CBDT.hh" +#include "OT/Color/COLR/COLR.hh" +#include "OT/Color/sbix/sbix.hh" +#include "OT/Color/svg/svg.hh" /** @@ -59,12 +61,17 @@ * never need to call these functions directly. **/ +using hb_ot_font_cmap_cache_t = hb_cache_t<21, 16, 8, true>; using hb_ot_font_advance_cache_t = hb_cache_t<24, 16, 8, true>; +static hb_user_data_key_t hb_ot_font_cmap_cache_user_data_key; + struct hb_ot_font_t { const hb_ot_face_t *ot_face; + hb_ot_font_cmap_cache_t *cmap_cache; + /* h_advance caching */ mutable hb_atomic_int_t cached_coords_serial; mutable hb_atomic_ptr_t<hb_ot_font_advance_cache_t> advance_cache; @@ -79,6 +86,33 @@ _hb_ot_font_create (hb_font_t *font) ot_font->ot_face = &font->face->table; + // retry: + auto *cmap_cache = (hb_ot_font_cmap_cache_t *) hb_face_get_user_data (font->face, + &hb_ot_font_cmap_cache_user_data_key); + if (!cmap_cache) + { + cmap_cache = (hb_ot_font_cmap_cache_t *) hb_malloc (sizeof (hb_ot_font_cmap_cache_t)); + if (unlikely (!cmap_cache)) goto out; + cmap_cache->init (); + if (unlikely (!hb_face_set_user_data (font->face, + &hb_ot_font_cmap_cache_user_data_key, + cmap_cache, + hb_free, + false))) + { + hb_free (cmap_cache); + cmap_cache = nullptr; + /* Normally we would retry here, but that would + * infinite-loop if the face is the empty-face. + * Just let it go and this font will be uncached if it + * happened to collide with another thread creating the + * cache at the same time. */ + // goto retry; + } + } + out: + ot_font->cmap_cache = cmap_cache; + return ot_font; } @@ -88,11 +122,7 @@ _hb_ot_font_destroy (void *font_data) hb_ot_font_t *ot_font = (hb_ot_font_t *) font_data; auto *cache = ot_font->advance_cache.get_relaxed (); - if (cache) - { - cache->fini (); - hb_free (cache); - } + hb_free (cache); hb_free (ot_font); } @@ -106,7 +136,7 @@ hb_ot_get_nominal_glyph (hb_font_t *font HB_UNUSED, { const hb_ot_font_t *ot_font = (const hb_ot_font_t *) font_data; const hb_ot_face_t *ot_face = ot_font->ot_face; - return ot_face->cmap->get_nominal_glyph (unicode, glyph); + return ot_face->cmap->get_nominal_glyph (unicode, glyph, ot_font->cmap_cache); } static unsigned int @@ -123,7 +153,8 @@ hb_ot_get_nominal_glyphs (hb_font_t *font HB_UNUSED, const hb_ot_face_t *ot_face = ot_font->ot_face; return ot_face->cmap->get_nominal_glyphs (count, first_unicode, unicode_stride, - first_glyph, glyph_stride); + first_glyph, glyph_stride, + ot_font->cmap_cache); } static hb_bool_t @@ -136,7 +167,9 @@ hb_ot_get_variation_glyph (hb_font_t *font HB_UNUSED, { const hb_ot_font_t *ot_font = (const hb_ot_font_t *) font_data; const hb_ot_face_t *ot_face = ot_font->ot_face; - return ot_face->cmap->get_variation_glyph (unicode, variation_selector, glyph); + return ot_face->cmap->get_variation_glyph (unicode, + variation_selector, glyph, + ot_font->cmap_cache); } static void @@ -148,10 +181,13 @@ hb_ot_get_glyph_h_advances (hb_font_t* font, void* font_data, unsigned advance_stride, void *user_data HB_UNUSED) { + const hb_ot_font_t *ot_font = (const hb_ot_font_t *) font_data; const hb_ot_face_t *ot_face = ot_font->ot_face; const OT::hmtx_accelerator_t &hmtx = *ot_face->hmtx; + hb_position_t *orig_first_advance = first_advance; + #ifndef HB_NO_VAR const OT::HVAR &HVAR = *hmtx.var_table; const OT::VariationStore &varStore = &HVAR + HVAR.varStore; @@ -225,6 +261,18 @@ hb_ot_get_glyph_h_advances (hb_font_t* font, void* font_data, #ifndef HB_NO_VAR OT::VariationStore::destroy_cache (varStore_cache); #endif + + if (font->x_strength && !font->embolden_in_place) + { + /* Emboldening. */ + hb_position_t x_strength = font->x_scale >= 0 ? font->x_strength : -font->x_strength; + first_advance = orig_first_advance; + for (unsigned int i = 0; i < count; i++) + { + *first_advance += *first_advance ? x_strength : 0; + first_advance = &StructAtOffsetUnaligned<hb_position_t> (first_advance, advance_stride); + } + } } #ifndef HB_NO_VERTICAL @@ -241,6 +289,8 @@ hb_ot_get_glyph_v_advances (hb_font_t* font, void* font_data, const hb_ot_face_t *ot_face = ot_font->ot_face; const OT::vmtx_accelerator_t &vmtx = *ot_face->vmtx; + hb_position_t *orig_first_advance = first_advance; + if (vmtx.has_data ()) { #ifndef HB_NO_VAR @@ -275,6 +325,18 @@ hb_ot_get_glyph_v_advances (hb_font_t* font, void* font_data, first_advance = &StructAtOffsetUnaligned<hb_position_t> (first_advance, advance_stride); } } + + if (font->y_strength && !font->embolden_in_place) + { + /* Emboldening. */ + hb_position_t y_strength = font->y_scale >= 0 ? font->y_strength : -font->y_strength; + first_advance = orig_first_advance; + for (unsigned int i = 0; i < count; i++) + { + *first_advance += *first_advance ? y_strength : 0; + first_advance = &StructAtOffsetUnaligned<hb_position_t> (first_advance, advance_stride); + } + } } #endif @@ -404,9 +466,16 @@ hb_ot_get_font_h_extents (hb_font_t *font, hb_font_extents_t *metrics, void *user_data HB_UNUSED) { - return _hb_ot_metrics_get_position_common (font, HB_OT_METRICS_TAG_HORIZONTAL_ASCENDER, &metrics->ascender) && - _hb_ot_metrics_get_position_common (font, HB_OT_METRICS_TAG_HORIZONTAL_DESCENDER, &metrics->descender) && - _hb_ot_metrics_get_position_common (font, HB_OT_METRICS_TAG_HORIZONTAL_LINE_GAP, &metrics->line_gap); + bool ret = _hb_ot_metrics_get_position_common (font, HB_OT_METRICS_TAG_HORIZONTAL_ASCENDER, &metrics->ascender) && + _hb_ot_metrics_get_position_common (font, HB_OT_METRICS_TAG_HORIZONTAL_DESCENDER, &metrics->descender) && + _hb_ot_metrics_get_position_common (font, HB_OT_METRICS_TAG_HORIZONTAL_LINE_GAP, &metrics->line_gap); + + /* Embolden */ + int y_shift = font->y_strength; + if (font->y_scale < 0) y_shift = -y_shift; + metrics->ascender += y_shift; + + return ret; } #ifndef HB_NO_VERTICAL @@ -424,17 +493,62 @@ hb_ot_get_font_v_extents (hb_font_t *font, #ifndef HB_NO_DRAW static void -hb_ot_get_glyph_shape (hb_font_t *font, - void *font_data HB_UNUSED, - hb_codepoint_t glyph, - hb_draw_funcs_t *draw_funcs, void *draw_data, - void *user_data) +hb_ot_draw_glyph (hb_font_t *font, + void *font_data HB_UNUSED, + hb_codepoint_t glyph, + hb_draw_funcs_t *draw_funcs, void *draw_data, + void *user_data) +{ + bool embolden = font->x_strength || font->y_strength; + hb_outline_t outline; + + { // Need draw_session to be destructed before emboldening. + hb_draw_session_t draw_session (embolden ? hb_outline_recording_pen_get_funcs () : draw_funcs, + embolden ? &outline : draw_data, font->slant_xy); + if (!font->face->table.glyf->get_path (font, glyph, draw_session)) +#ifndef HB_NO_CFF + if (!font->face->table.cff1->get_path (font, glyph, draw_session)) + if (!font->face->table.cff2->get_path (font, glyph, draw_session)) +#endif + {} + } + + if (embolden) + { + float x_shift = font->embolden_in_place ? 0 : (float) font->x_strength / 2; + float y_shift = (float) font->y_strength / 2; + if (font->x_scale < 0) x_shift = -x_shift; + if (font->y_scale < 0) y_shift = -y_shift; + outline.embolden (font->x_strength, font->y_strength, + x_shift, y_shift); + + outline.replay (draw_funcs, draw_data); + } +} +#endif + +#ifndef HB_NO_PAINT +static void +hb_ot_paint_glyph (hb_font_t *font, + void *font_data, + hb_codepoint_t glyph, + hb_paint_funcs_t *paint_funcs, void *paint_data, + unsigned int palette, + hb_color_t foreground, + void *user_data) { - hb_draw_session_t draw_session (draw_funcs, draw_data, font->slant_xy); - if (font->face->table.glyf->get_path (font, glyph, draw_session)) return; +#ifndef HB_NO_COLOR + if (font->face->table.COLR->paint_glyph (font, glyph, paint_funcs, paint_data, palette, foreground)) return; + if (font->face->table.SVG->paint_glyph (font, glyph, paint_funcs, paint_data)) return; +#ifndef HB_NO_OT_FONT_BITMAP + if (font->face->table.CBDT->paint_glyph (font, glyph, paint_funcs, paint_data)) return; + if (font->face->table.sbix->paint_glyph (font, glyph, paint_funcs, paint_data)) return; +#endif +#endif + if (font->face->table.glyf->paint_glyph (font, glyph, paint_funcs, paint_data, foreground)) return; #ifndef HB_NO_CFF - if (font->face->table.cff1->get_path (font, glyph, draw_session)) return; - if (font->face->table.cff2->get_path (font, glyph, draw_session)) return; + if (font->face->table.cff1->paint_glyph (font, glyph, paint_funcs, paint_data, foreground)) return; + if (font->face->table.cff2->paint_glyph (font, glyph, paint_funcs, paint_data, foreground)) return; #endif } #endif @@ -462,7 +576,11 @@ static struct hb_ot_font_funcs_lazy_loader_t : hb_font_funcs_lazy_loader_t<hb_ot #endif #ifndef HB_NO_DRAW - hb_font_funcs_set_glyph_shape_func (funcs, hb_ot_get_glyph_shape, nullptr, nullptr); + hb_font_funcs_set_draw_glyph_func (funcs, hb_ot_draw_glyph, nullptr, nullptr); +#endif + +#ifndef HB_NO_PAINT + hb_font_funcs_set_paint_glyph_func (funcs, hb_ot_paint_glyph, nullptr, nullptr); #endif hb_font_funcs_set_glyph_extents_func (funcs, hb_ot_get_glyph_extents, nullptr, nullptr); diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-hdmx-table.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-hdmx-table.hh index dea2b7e29a97324191e4781ce3745a19de688e4a..a86cc3c31151cb6f213c4860cb372de17fb5f962 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-hdmx-table.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-hdmx-table.hh @@ -156,6 +156,7 @@ struct hdmx TRACE_SANITIZE (this); return_trace (c->check_struct (this) && !hb_unsigned_mul_overflows (numRecords, sizeDeviceRecord) && + min_size + numRecords * sizeDeviceRecord > numRecords * sizeDeviceRecord && sizeDeviceRecord >= DeviceRecord::min_size && c->check_range (this, get_size ())); } diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-head-table.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-head-table.hh index 20991aab2b3e18fe66fccc7354ab293391bde1f7..798e82da6ca2858d28a2bf49ae64a22d34ffa7e6 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-head-table.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-head-table.hh @@ -97,6 +97,7 @@ struct head * entire font as HBUINT32, then store * 0xB1B0AFBAu - sum. */ HBUINT32 magicNumber; /* Set to 0x5F0F3CF5u. */ + public: HBUINT16 flags; /* Bit 0: Baseline for font at y=0; * Bit 1: Left sidebearing point at x=0; * Bit 2: Instructions may depend on point size; @@ -141,6 +142,7 @@ struct head * encoded in the cmap subtables represent proper * support for those code points. * Bit 15: Reserved, set to 0. */ + protected: HBUINT16 unitsPerEm; /* Valid range is from 16 to 16384. This value * should be a power of 2 for fonts that have * TrueType outlines. */ @@ -148,10 +150,12 @@ struct head January 1, 1904. 64-bit integer */ LONGDATETIME modified; /* Number of seconds since 12:00 midnight, January 1, 1904. 64-bit integer */ + public: HBINT16 xMin; /* For all glyph bounding boxes. */ HBINT16 yMin; /* For all glyph bounding boxes. */ HBINT16 xMax; /* For all glyph bounding boxes. */ HBINT16 yMax; /* For all glyph bounding boxes. */ + protected: HBUINT16 macStyle; /* Bit 0: Bold (if set to 1); * Bit 1: Italic (if set to 1) * Bit 2: Underline (if set to 1) diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-hmtx-table.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-hmtx-table.hh index 96a394ba42786d4e74e799079296a416c7ecae99..16eb1eb912bcb1eb842c2cee5e17c6bdc01421f9 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-hmtx-table.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-hmtx-table.hh @@ -31,6 +31,7 @@ #include "hb-ot-maxp-table.hh" #include "hb-ot-hhea-table.hh" #include "hb-ot-var-hvar-table.hh" +#include "hb-ot-var-mvar-table.hh" #include "hb-ot-metrics.hh" /* @@ -73,13 +74,15 @@ struct hmtxvmtx return_trace (true); } - const hb_hashmap_t<unsigned, hb_pair_t<unsigned, int>>* get_mtx_map (const hb_subset_plan_t *plan) const - { return T::is_horizontal ? plan->hmtx_map : plan->vmtx_map; } + const hb_hashmap_t<hb_codepoint_t, hb_pair_t<unsigned, int>>* get_mtx_map (const hb_subset_plan_t *plan) const + { return T::is_horizontal ? &plan->hmtx_map : &plan->vmtx_map; } - bool subset_update_header (hb_subset_plan_t *plan, - unsigned int num_hmetrics) const + bool subset_update_header (hb_subset_context_t *c, + unsigned int num_hmetrics, + const hb_hashmap_t<hb_codepoint_t, hb_pair_t<unsigned, int>> *mtx_map, + const hb_map_t *bounds_map) const { - hb_blob_t *src_blob = hb_sanitize_context_t ().reference_table<H> (plan->source, H::tableTag); + hb_blob_t *src_blob = hb_sanitize_context_t ().reference_table<H> (c->plan->source, H::tableTag); hb_blob_t *dest_blob = hb_blob_copy_writable_or_fail (src_blob); hb_blob_destroy (src_blob); @@ -91,7 +94,56 @@ struct hmtxvmtx H *table = (H *) hb_blob_get_data (dest_blob, &length); table->numberOfLongMetrics = num_hmetrics; - bool result = plan->add_table (H::tableTag, dest_blob); +#ifndef HB_NO_VAR + if (c->plan->normalized_coords) + { + auto &MVAR = *c->plan->source->table.MVAR; + if (T::is_horizontal) + { + HB_ADD_MVAR_VAR (HB_OT_METRICS_TAG_HORIZONTAL_CARET_RISE, caretSlopeRise); + HB_ADD_MVAR_VAR (HB_OT_METRICS_TAG_HORIZONTAL_CARET_RUN, caretSlopeRun); + HB_ADD_MVAR_VAR (HB_OT_METRICS_TAG_HORIZONTAL_CARET_OFFSET, caretOffset); + } + else + { + HB_ADD_MVAR_VAR (HB_OT_METRICS_TAG_VERTICAL_CARET_RISE, caretSlopeRise); + HB_ADD_MVAR_VAR (HB_OT_METRICS_TAG_VERTICAL_CARET_RUN, caretSlopeRun); + HB_ADD_MVAR_VAR (HB_OT_METRICS_TAG_VERTICAL_CARET_OFFSET, caretOffset); + } + + int min_lsb = 0x7FFF; + int min_rsb = 0x7FFF; + int max_extent = -0x7FFF; + unsigned max_adv = 0; + for (const auto _ : *mtx_map) + { + hb_codepoint_t gid = _.first; + unsigned adv = _.second.first; + int lsb = _.second.second; + max_adv = hb_max (max_adv, adv); + + if (bounds_map->has (gid)) + { + unsigned bound_width = bounds_map->get (gid); + int rsb = adv - lsb - bound_width; + int extent = lsb + bound_width; + min_lsb = hb_min (min_lsb, lsb); + min_rsb = hb_min (min_rsb, rsb); + max_extent = hb_max (max_extent, extent); + } + } + + table->advanceMax = max_adv; + if (!bounds_map->is_empty ()) + { + table->minLeadingBearing = min_lsb; + table->minTrailingBearing = min_rsb; + table->maxExtent = max_extent; + } + } +#endif + + bool result = c->plan->add_table (H::tableTag, dest_blob); hb_blob_destroy (dest_blob); return result; @@ -132,7 +184,7 @@ struct hmtxvmtx accelerator_t _mtx (c->plan->source); unsigned num_long_metrics; - const hb_hashmap_t<unsigned, hb_pair_t<unsigned, int>> *mtx_map = get_mtx_map (c->plan); + const hb_hashmap_t<hb_codepoint_t, hb_pair_t<unsigned, int>> *mtx_map = get_mtx_map (c->plan); { /* Determine num_long_metrics to encode. */ auto& plan = c->plan; @@ -169,7 +221,8 @@ struct hmtxvmtx return_trace (false); // Amend header num hmetrics - if (unlikely (!subset_update_header (c->plan, num_long_metrics))) + if (unlikely (!subset_update_header (c, num_long_metrics, mtx_map, + T::is_horizontal ? &c->plan->bounds_width_map : &c->plan->bounds_height_map))) return_trace (false); return_trace (true); @@ -291,8 +344,6 @@ struct hmtxvmtx /* num_bearings <= glyph < num_glyphs; * num_bearings <= num_advances */ - /* TODO Optimize */ - if (num_bearings == num_advances) return get_advance_without_var_unscaled (num_bearings - 1); @@ -315,7 +366,7 @@ struct hmtxvmtx if (var_table.get_length ()) return advance + roundf (var_table->get_advance_delta_unscaled (glyph, font->coords, font->num_coords, - store_cache)); // TODO Optimize?! + store_cache)); return _glyf_get_advance_with_var_unscaled (font, glyph, T::tableTag == HB_OT_TAG_vmtx); #else @@ -340,19 +391,17 @@ struct hmtxvmtx /* get advance: when no variations, call get_advance_without_var_unscaled. * when there're variations, get advance value from mtx_map in subset_plan*/ unsigned get_new_gid_advance_unscaled (const hb_subset_plan_t *plan, - const hb_hashmap_t<unsigned, hb_pair_t<unsigned, int>> *mtx_map, + const hb_hashmap_t<hb_codepoint_t, hb_pair_t<unsigned, int>> *mtx_map, unsigned new_gid, const accelerator_t &_mtx) const { - if (mtx_map->is_empty () || - (new_gid == 0 && !mtx_map->has (new_gid))) + if (mtx_map->is_empty ()) { hb_codepoint_t old_gid = 0; return plan->old_gid_for_new_gid (new_gid, &old_gid) ? _mtx.get_advance_without_var_unscaled (old_gid) : 0; } - else - { return mtx_map->get (new_gid).first; } + return mtx_map->get (new_gid).first; } protected: diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-common.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-common.hh index 0f424f5aa65ee204d1c274e75da3409aada24131..b53f2e92762a7abc6e96a3dc9561f4dc99392a07 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-common.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-common.hh @@ -44,42 +44,6 @@ using OT::Layout::Common::RangeRecord; using OT::Layout::SmallTypes; using OT::Layout::MediumTypes; -#ifndef HB_MAX_NESTING_LEVEL -#define HB_MAX_NESTING_LEVEL 64 -#endif -#ifndef HB_MAX_CONTEXT_LENGTH -#define HB_MAX_CONTEXT_LENGTH 64 -#endif -#ifndef HB_CLOSURE_MAX_STAGES -/* - * The maximum number of times a lookup can be applied during shaping. - * Used to limit the number of iterations of the closure algorithm. - * This must be larger than the number of times add_gsub_pause() is - * called in a collect_features call of any shaper. - */ -#define HB_CLOSURE_MAX_STAGES 12 -#endif - -#ifndef HB_MAX_SCRIPTS -#define HB_MAX_SCRIPTS 500 -#endif - -#ifndef HB_MAX_LANGSYS -#define HB_MAX_LANGSYS 2000 -#endif - -#ifndef HB_MAX_LANGSYS_FEATURE_COUNT -#define HB_MAX_LANGSYS_FEATURE_COUNT 50000 -#endif - -#ifndef HB_MAX_FEATURE_INDICES -#define HB_MAX_FEATURE_INDICES 1500 -#endif - -#ifndef HB_MAX_LOOKUP_VISIT_COUNT -#define HB_MAX_LOOKUP_VISIT_COUNT 35000 -#endif - namespace OT { @@ -192,19 +156,19 @@ struct hb_subset_layout_context_t : { if (tag_ == HB_OT_TAG_GSUB) { - lookup_index_map = c_->plan->gsub_lookups; - script_langsys_map = c_->plan->gsub_langsys; - feature_index_map = c_->plan->gsub_features; - feature_substitutes_map = c_->plan->gsub_feature_substitutes_map; - feature_record_cond_idx_map = c_->plan->user_axes_location->is_empty () ? nullptr : c_->plan->gsub_feature_record_cond_idx_map; + lookup_index_map = &c_->plan->gsub_lookups; + script_langsys_map = &c_->plan->gsub_langsys; + feature_index_map = &c_->plan->gsub_features; + feature_substitutes_map = &c_->plan->gsub_feature_substitutes_map; + feature_record_cond_idx_map = c_->plan->user_axes_location.is_empty () ? nullptr : &c_->plan->gsub_feature_record_cond_idx_map; } else { - lookup_index_map = c_->plan->gpos_lookups; - script_langsys_map = c_->plan->gpos_langsys; - feature_index_map = c_->plan->gpos_features; - feature_substitutes_map = c_->plan->gpos_feature_substitutes_map; - feature_record_cond_idx_map = c_->plan->user_axes_location->is_empty () ? nullptr : c_->plan->gpos_feature_record_cond_idx_map; + lookup_index_map = &c_->plan->gpos_lookups; + script_langsys_map = &c_->plan->gpos_langsys; + feature_index_map = &c_->plan->gpos_features; + feature_substitutes_map = &c_->plan->gpos_feature_substitutes_map; + feature_record_cond_idx_map = c_->plan->user_axes_location.is_empty () ? nullptr : &c_->plan->gpos_feature_record_cond_idx_map; } } @@ -1181,7 +1145,7 @@ struct Script { TRACE_SUBSET (this); if (!l->visitScript ()) return_trace (false); - if (tag && !c->plan->layout_scripts->has (*tag)) + if (tag && !c->plan->layout_scripts.has (*tag)) return false; auto *out = c->serializer->start_embed (*this); @@ -1389,7 +1353,7 @@ struct Lookup // Generally we shouldn't end up with an empty lookup as we pre-prune them during the planning // phase, but it can happen in rare cases such as when during closure subtable is considered // degenerate (see: https://github.com/harfbuzz/harfbuzz/issues/3853) - return true; + return_trace (true); } template <typename TSubTable> @@ -1568,7 +1532,7 @@ struct ClassDefFormat1_3 const Coverage* glyph_filter = nullptr) const { TRACE_SUBSET (this); - const hb_map_t &glyph_map = *c->plan->glyph_map_gsub; + const hb_map_t &glyph_map = c->plan->glyph_map_gsub; hb_sorted_vector_t<hb_pair_t<hb_codepoint_t, hb_codepoint_t>> glyph_and_klass; hb_set_t orig_klasses; @@ -1813,7 +1777,7 @@ struct ClassDefFormat2_4 const Coverage* glyph_filter = nullptr) const { TRACE_SUBSET (this); - const hb_map_t &glyph_map = *c->plan->glyph_map_gsub; + const hb_map_t &glyph_map = c->plan->glyph_map_gsub; const hb_set_t &glyph_set = *c->plan->glyphset_gsub (); hb_sorted_vector_t<hb_pair_t<hb_codepoint_t, hb_codepoint_t>> glyph_and_klass; @@ -2269,7 +2233,7 @@ struct VarRegionAxis { float evaluate (int coord) const { - int start = startCoord, peak = peakCoord, end = endCoord; + int start = startCoord.to_int (), peak = peakCoord.to_int (), end = endCoord.to_int (); /* TODO Move these to sanitize(). */ if (unlikely (start > peak || peak > end)) @@ -2389,6 +2353,9 @@ struct VarRegionList struct VarData { + unsigned int get_item_count () const + { return itemCount; } + unsigned int get_region_index_count () const { return regionIndices.len; } @@ -2794,6 +2761,29 @@ struct VariationStore return_trace (true); } + VariationStore *copy (hb_serialize_context_t *c) const + { + TRACE_SERIALIZE (this); + auto *out = c->start_embed (this); + if (unlikely (!out)) return_trace (nullptr); + + hb_vector_t <hb_inc_bimap_t> inner_maps; + unsigned count = dataSets.len; + for (unsigned i = 0; i < count; i++) + { + hb_inc_bimap_t *map = inner_maps.push (); + auto &data = this+dataSets[i]; + + unsigned itemCount = data.get_item_count (); + for (unsigned j = 0; j < itemCount; j++) + map->add (j); + } + + if (unlikely (!out->serialize (c, this, inner_maps))) return_trace (nullptr); + + return_trace (out); + } + bool subset (hb_subset_context_t *c, const hb_array_t<const hb_inc_bimap_t> &inner_maps) const { TRACE_SUBSET (this); @@ -2874,7 +2864,7 @@ struct ConditionFormat1 auto *out = c->serializer->embed (this); if (unlikely (!out)) return_trace (false); - const hb_map_t *index_map = c->plan->axes_index_map; + const hb_map_t *index_map = &c->plan->axes_index_map; if (index_map->is_empty ()) return_trace (true); if (!index_map->has (axisIndex)) @@ -2899,8 +2889,8 @@ struct ConditionFormat1 { // add axisIndex->value into the hashmap so we can check if the record is // unique with variations - int16_t min_val = filterRangeMinValue; - int16_t max_val = filterRangeMaxValue; + int16_t min_val = filterRangeMinValue.to_int (); + int16_t max_val = filterRangeMaxValue.to_int (); hb_codepoint_t val = (max_val << 16) + min_val; condition_map->set (axisIndex, val); @@ -2912,7 +2902,7 @@ struct ConditionFormat1 int v = c->axes_location->get (axis_tag); //condition not met, drop the entire record - if (v < filterRangeMinValue || v > filterRangeMaxValue) + if (v < filterRangeMinValue.to_int () || v > filterRangeMaxValue.to_int ()) return DROP_RECORD_WITH_VAR; //axis pinned and condition met, drop the condition @@ -2922,7 +2912,7 @@ struct ConditionFormat1 bool evaluate (const int *coords, unsigned int coord_len) const { int coord = axisIndex < coord_len ? coords[axisIndex] : 0; - return filterRangeMinValue <= coord && coord <= filterRangeMaxValue; + return filterRangeMinValue.to_int () <= coord && coord <= filterRangeMaxValue.to_int (); } bool sanitize (hb_sanitize_context_t *c) const @@ -2962,8 +2952,8 @@ struct Condition template <typename context_t, typename ...Ts> typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const { + if (unlikely (!c->may_dispatch (this, &u.format))) return c->no_dispatch_return_value (); TRACE_DISPATCH (this, u.format); - if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ()); switch (u.format) { case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...)); default:return_trace (c->default_return_value ()); diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gdef-table.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gdef-table.hh index a84edef16283a33a10fb3c7902ddcb0bcc1e659c..c8a2cf817a2aa1c14ddeff1b5188be346e172e12 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gdef-table.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gdef-table.hh @@ -29,890 +29,6 @@ #ifndef HB_OT_LAYOUT_GDEF_TABLE_HH #define HB_OT_LAYOUT_GDEF_TABLE_HH -#include "hb-ot-layout-common.hh" - -#include "hb-font.hh" - - -namespace OT { - - -/* - * Attachment List Table - */ - -/* Array of contour point indices--in increasing numerical order */ -struct AttachPoint : Array16Of<HBUINT16> -{ - bool subset (hb_subset_context_t *c) const - { - TRACE_SUBSET (this); - auto *out = c->serializer->start_embed (*this); - if (unlikely (!out)) return_trace (false); - - return_trace (out->serialize (c->serializer, + iter ())); - } -}; - -struct AttachList -{ - unsigned int get_attach_points (hb_codepoint_t glyph_id, - unsigned int start_offset, - unsigned int *point_count /* IN/OUT */, - unsigned int *point_array /* OUT */) const - { - unsigned int index = (this+coverage).get_coverage (glyph_id); - if (index == NOT_COVERED) - { - if (point_count) - *point_count = 0; - return 0; - } - - const AttachPoint &points = this+attachPoint[index]; - - if (point_count) - { - + points.as_array ().sub_array (start_offset, point_count) - | hb_sink (hb_array (point_array, *point_count)) - ; - } - - return points.len; - } - - bool subset (hb_subset_context_t *c) const - { - TRACE_SUBSET (this); - const hb_set_t &glyphset = *c->plan->glyphset_gsub (); - const hb_map_t &glyph_map = *c->plan->glyph_map; - - auto *out = c->serializer->start_embed (*this); - if (unlikely (!c->serializer->extend_min (out))) return_trace (false); - - hb_sorted_vector_t<hb_codepoint_t> new_coverage; - + hb_zip (this+coverage, attachPoint) - | hb_filter (glyphset, hb_first) - | hb_filter (subset_offset_array (c, out->attachPoint, this), hb_second) - | hb_map (hb_first) - | hb_map (glyph_map) - | hb_sink (new_coverage) - ; - out->coverage.serialize_serialize (c->serializer, new_coverage.iter ()); - return_trace (bool (new_coverage)); - } - - bool sanitize (hb_sanitize_context_t *c) const - { - TRACE_SANITIZE (this); - return_trace (coverage.sanitize (c, this) && attachPoint.sanitize (c, this)); - } - - protected: - Offset16To<Coverage> - coverage; /* Offset to Coverage table -- from - * beginning of AttachList table */ - Array16OfOffset16To<AttachPoint> - attachPoint; /* Array of AttachPoint tables - * in Coverage Index order */ - public: - DEFINE_SIZE_ARRAY (4, attachPoint); -}; - -/* - * Ligature Caret Table - */ - -struct CaretValueFormat1 -{ - friend struct CaretValue; - bool subset (hb_subset_context_t *c) const - { - TRACE_SUBSET (this); - auto *out = c->serializer->embed (this); - if (unlikely (!out)) return_trace (false); - return_trace (true); - } - - private: - hb_position_t get_caret_value (hb_font_t *font, hb_direction_t direction) const - { - return HB_DIRECTION_IS_HORIZONTAL (direction) ? font->em_scale_x (coordinate) : font->em_scale_y (coordinate); - } - - bool sanitize (hb_sanitize_context_t *c) const - { - TRACE_SANITIZE (this); - return_trace (c->check_struct (this)); - } - - protected: - HBUINT16 caretValueFormat; /* Format identifier--format = 1 */ - FWORD coordinate; /* X or Y value, in design units */ - public: - DEFINE_SIZE_STATIC (4); -}; - -struct CaretValueFormat2 -{ - friend struct CaretValue; - bool subset (hb_subset_context_t *c) const - { - TRACE_SUBSET (this); - auto *out = c->serializer->embed (this); - if (unlikely (!out)) return_trace (false); - return_trace (true); - } - - private: - hb_position_t get_caret_value (hb_font_t *font, hb_direction_t direction, hb_codepoint_t glyph_id) const - { - hb_position_t x, y; - font->get_glyph_contour_point_for_origin (glyph_id, caretValuePoint, direction, &x, &y); - return HB_DIRECTION_IS_HORIZONTAL (direction) ? x : y; - } - - bool sanitize (hb_sanitize_context_t *c) const - { - TRACE_SANITIZE (this); - return_trace (c->check_struct (this)); - } - - protected: - HBUINT16 caretValueFormat; /* Format identifier--format = 2 */ - HBUINT16 caretValuePoint; /* Contour point index on glyph */ - public: - DEFINE_SIZE_STATIC (4); -}; - -struct CaretValueFormat3 -{ - friend struct CaretValue; - - hb_position_t get_caret_value (hb_font_t *font, hb_direction_t direction, - const VariationStore &var_store) const - { - return HB_DIRECTION_IS_HORIZONTAL (direction) ? - font->em_scale_x (coordinate) + (this+deviceTable).get_x_delta (font, var_store) : - font->em_scale_y (coordinate) + (this+deviceTable).get_y_delta (font, var_store); - } - - bool subset (hb_subset_context_t *c) const - { - TRACE_SUBSET (this); - auto *out = c->serializer->start_embed (*this); - if (unlikely (!out)) return_trace (false); - if (!c->serializer->embed (caretValueFormat)) return_trace (false); - if (!c->serializer->embed (coordinate)) return_trace (false); - - unsigned varidx = (this+deviceTable).get_variation_index (); - if (c->plan->layout_variation_idx_delta_map->has (varidx)) - { - int delta = hb_second (c->plan->layout_variation_idx_delta_map->get (varidx)); - if (delta != 0) - { - if (!c->serializer->check_assign (out->coordinate, coordinate + delta, HB_SERIALIZE_ERROR_INT_OVERFLOW)) - return_trace (false); - } - } - - if (c->plan->all_axes_pinned) - return_trace (c->serializer->check_assign (out->caretValueFormat, 1, HB_SERIALIZE_ERROR_INT_OVERFLOW)); - - if (!c->serializer->embed (deviceTable)) - return_trace (false); - - return_trace (out->deviceTable.serialize_copy (c->serializer, deviceTable, this, c->serializer->to_bias (out), - hb_serialize_context_t::Head, c->plan->layout_variation_idx_delta_map)); - } - - void collect_variation_indices (hb_collect_variation_indices_context_t *c) const - { (this+deviceTable).collect_variation_indices (c); } - - bool sanitize (hb_sanitize_context_t *c) const - { - TRACE_SANITIZE (this); - return_trace (c->check_struct (this) && deviceTable.sanitize (c, this)); - } - - protected: - HBUINT16 caretValueFormat; /* Format identifier--format = 3 */ - FWORD coordinate; /* X or Y value, in design units */ - Offset16To<Device> - deviceTable; /* Offset to Device table for X or Y - * value--from beginning of CaretValue - * table */ - public: - DEFINE_SIZE_STATIC (6); -}; - -struct CaretValue -{ - hb_position_t get_caret_value (hb_font_t *font, - hb_direction_t direction, - hb_codepoint_t glyph_id, - const VariationStore &var_store) const - { - switch (u.format) { - case 1: return u.format1.get_caret_value (font, direction); - case 2: return u.format2.get_caret_value (font, direction, glyph_id); - case 3: return u.format3.get_caret_value (font, direction, var_store); - default:return 0; - } - } - - template <typename context_t, typename ...Ts> - typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const - { - TRACE_DISPATCH (this, u.format); - if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ()); - switch (u.format) { - case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...)); - case 2: return_trace (c->dispatch (u.format2, std::forward<Ts> (ds)...)); - case 3: return_trace (c->dispatch (u.format3, std::forward<Ts> (ds)...)); - default:return_trace (c->default_return_value ()); - } - } - - void collect_variation_indices (hb_collect_variation_indices_context_t *c) const - { - switch (u.format) { - case 1: - case 2: - return; - case 3: - u.format3.collect_variation_indices (c); - return; - default: return; - } - } - - bool sanitize (hb_sanitize_context_t *c) const - { - TRACE_SANITIZE (this); - if (!u.format.sanitize (c)) return_trace (false); - switch (u.format) { - case 1: return_trace (u.format1.sanitize (c)); - case 2: return_trace (u.format2.sanitize (c)); - case 3: return_trace (u.format3.sanitize (c)); - default:return_trace (true); - } - } - - protected: - union { - HBUINT16 format; /* Format identifier */ - CaretValueFormat1 format1; - CaretValueFormat2 format2; - CaretValueFormat3 format3; - } u; - public: - DEFINE_SIZE_UNION (2, format); -}; - -struct LigGlyph -{ - unsigned get_lig_carets (hb_font_t *font, - hb_direction_t direction, - hb_codepoint_t glyph_id, - const VariationStore &var_store, - unsigned start_offset, - unsigned *caret_count /* IN/OUT */, - hb_position_t *caret_array /* OUT */) const - { - if (caret_count) - { - + carets.as_array ().sub_array (start_offset, caret_count) - | hb_map (hb_add (this)) - | hb_map ([&] (const CaretValue &value) { return value.get_caret_value (font, direction, glyph_id, var_store); }) - | hb_sink (hb_array (caret_array, *caret_count)) - ; - } - - return carets.len; - } - - bool subset (hb_subset_context_t *c) const - { - TRACE_SUBSET (this); - auto *out = c->serializer->start_embed (*this); - if (unlikely (!c->serializer->extend_min (out))) return_trace (false); - - + hb_iter (carets) - | hb_apply (subset_offset_array (c, out->carets, this)) - ; - - return_trace (bool (out->carets)); - } - - void collect_variation_indices (hb_collect_variation_indices_context_t *c) const - { - for (const Offset16To<CaretValue>& offset : carets.iter ()) - (this+offset).collect_variation_indices (c); - } - - bool sanitize (hb_sanitize_context_t *c) const - { - TRACE_SANITIZE (this); - return_trace (carets.sanitize (c, this)); - } - - protected: - Array16OfOffset16To<CaretValue> - carets; /* Offset array of CaretValue tables - * --from beginning of LigGlyph table - * --in increasing coordinate order */ - public: - DEFINE_SIZE_ARRAY (2, carets); -}; - -struct LigCaretList -{ - unsigned int get_lig_carets (hb_font_t *font, - hb_direction_t direction, - hb_codepoint_t glyph_id, - const VariationStore &var_store, - unsigned int start_offset, - unsigned int *caret_count /* IN/OUT */, - hb_position_t *caret_array /* OUT */) const - { - unsigned int index = (this+coverage).get_coverage (glyph_id); - if (index == NOT_COVERED) - { - if (caret_count) - *caret_count = 0; - return 0; - } - const LigGlyph &lig_glyph = this+ligGlyph[index]; - return lig_glyph.get_lig_carets (font, direction, glyph_id, var_store, start_offset, caret_count, caret_array); - } - - bool subset (hb_subset_context_t *c) const - { - TRACE_SUBSET (this); - const hb_set_t &glyphset = *c->plan->glyphset_gsub (); - const hb_map_t &glyph_map = *c->plan->glyph_map; - - auto *out = c->serializer->start_embed (*this); - if (unlikely (!c->serializer->extend_min (out))) return_trace (false); - - hb_sorted_vector_t<hb_codepoint_t> new_coverage; - + hb_zip (this+coverage, ligGlyph) - | hb_filter (glyphset, hb_first) - | hb_filter (subset_offset_array (c, out->ligGlyph, this), hb_second) - | hb_map (hb_first) - | hb_map (glyph_map) - | hb_sink (new_coverage) - ; - out->coverage.serialize_serialize (c->serializer, new_coverage.iter ()); - return_trace (bool (new_coverage)); - } - - void collect_variation_indices (hb_collect_variation_indices_context_t *c) const - { - + hb_zip (this+coverage, ligGlyph) - | hb_filter (c->glyph_set, hb_first) - | hb_map (hb_second) - | hb_map (hb_add (this)) - | hb_apply ([c] (const LigGlyph& _) { _.collect_variation_indices (c); }) - ; - } - - bool sanitize (hb_sanitize_context_t *c) const - { - TRACE_SANITIZE (this); - return_trace (coverage.sanitize (c, this) && ligGlyph.sanitize (c, this)); - } - - protected: - Offset16To<Coverage> - coverage; /* Offset to Coverage table--from - * beginning of LigCaretList table */ - Array16OfOffset16To<LigGlyph> - ligGlyph; /* Array of LigGlyph tables - * in Coverage Index order */ - public: - DEFINE_SIZE_ARRAY (4, ligGlyph); -}; - - -struct MarkGlyphSetsFormat1 -{ - bool covers (unsigned int set_index, hb_codepoint_t glyph_id) const - { return (this+coverage[set_index]).get_coverage (glyph_id) != NOT_COVERED; } - - bool subset (hb_subset_context_t *c) const - { - TRACE_SUBSET (this); - auto *out = c->serializer->start_embed (*this); - if (unlikely (!c->serializer->extend_min (out))) return_trace (false); - out->format = format; - - bool ret = true; - for (const Offset32To<Coverage>& offset : coverage.iter ()) - { - auto *o = out->coverage.serialize_append (c->serializer); - if (unlikely (!o)) - { - ret = false; - break; - } - - //not using o->serialize_subset (c, offset, this, out) here because - //OTS doesn't allow null offset. - //See issue: https://github.com/khaledhosny/ots/issues/172 - c->serializer->push (); - c->dispatch (this+offset); - c->serializer->add_link (*o, c->serializer->pop_pack ()); - } - - return_trace (ret && out->coverage.len); - } - - bool sanitize (hb_sanitize_context_t *c) const - { - TRACE_SANITIZE (this); - return_trace (coverage.sanitize (c, this)); - } - - protected: - HBUINT16 format; /* Format identifier--format = 1 */ - Array16Of<Offset32To<Coverage>> - coverage; /* Array of long offsets to mark set - * coverage tables */ - public: - DEFINE_SIZE_ARRAY (4, coverage); -}; - -struct MarkGlyphSets -{ - bool covers (unsigned int set_index, hb_codepoint_t glyph_id) const - { - switch (u.format) { - case 1: return u.format1.covers (set_index, glyph_id); - default:return false; - } - } - - bool subset (hb_subset_context_t *c) const - { - TRACE_SUBSET (this); - switch (u.format) { - case 1: return_trace (u.format1.subset (c)); - default:return_trace (false); - } - } - - bool sanitize (hb_sanitize_context_t *c) const - { - TRACE_SANITIZE (this); - if (!u.format.sanitize (c)) return_trace (false); - switch (u.format) { - case 1: return_trace (u.format1.sanitize (c)); - default:return_trace (true); - } - } - - protected: - union { - HBUINT16 format; /* Format identifier */ - MarkGlyphSetsFormat1 format1; - } u; - public: - DEFINE_SIZE_UNION (2, format); -}; - - -/* - * GDEF -- Glyph Definition - * https://docs.microsoft.com/en-us/typography/opentype/spec/gdef - */ - - -template <typename Types> -struct GDEFVersion1_2 -{ - friend struct GDEF; - - protected: - FixedVersion<>version; /* Version of the GDEF table--currently - * 0x00010003u */ - typename Types::template OffsetTo<ClassDef> - glyphClassDef; /* Offset to class definition table - * for glyph type--from beginning of - * GDEF header (may be Null) */ - typename Types::template OffsetTo<AttachList> - attachList; /* Offset to list of glyphs with - * attachment points--from beginning - * of GDEF header (may be Null) */ - typename Types::template OffsetTo<LigCaretList> - ligCaretList; /* Offset to list of positioning points - * for ligature carets--from beginning - * of GDEF header (may be Null) */ - typename Types::template OffsetTo<ClassDef> - markAttachClassDef; /* Offset to class definition table for - * mark attachment type--from beginning - * of GDEF header (may be Null) */ - typename Types::template OffsetTo<MarkGlyphSets> - markGlyphSetsDef; /* Offset to the table of mark set - * definitions--from beginning of GDEF - * header (may be NULL). Introduced - * in version 0x00010002. */ - Offset32To<VariationStore> - varStore; /* Offset to the table of Item Variation - * Store--from beginning of GDEF - * header (may be NULL). Introduced - * in version 0x00010003. */ - public: - DEFINE_SIZE_MIN (4 + 4 * Types::size); - - unsigned int get_size () const - { - return min_size + - (version.to_int () >= 0x00010002u ? markGlyphSetsDef.static_size : 0) + - (version.to_int () >= 0x00010003u ? varStore.static_size : 0); - } - - bool sanitize (hb_sanitize_context_t *c) const - { - TRACE_SANITIZE (this); - return_trace (version.sanitize (c) && - glyphClassDef.sanitize (c, this) && - attachList.sanitize (c, this) && - ligCaretList.sanitize (c, this) && - markAttachClassDef.sanitize (c, this) && - (version.to_int () < 0x00010002u || markGlyphSetsDef.sanitize (c, this)) && - (version.to_int () < 0x00010003u || varStore.sanitize (c, this))); - } - - bool subset (hb_subset_context_t *c) const - { - TRACE_SUBSET (this); - auto *out = c->serializer->embed (*this); - if (unlikely (!out)) return_trace (false); - - bool subset_glyphclassdef = out->glyphClassDef.serialize_subset (c, glyphClassDef, this, nullptr, false, true); - bool subset_attachlist = out->attachList.serialize_subset (c, attachList, this); - bool subset_ligcaretlist = out->ligCaretList.serialize_subset (c, ligCaretList, this); - bool subset_markattachclassdef = out->markAttachClassDef.serialize_subset (c, markAttachClassDef, this, nullptr, false, true); - - bool subset_markglyphsetsdef = false; - if (version.to_int () >= 0x00010002u) - { - subset_markglyphsetsdef = out->markGlyphSetsDef.serialize_subset (c, markGlyphSetsDef, this); - } - - bool subset_varstore = false; - if (version.to_int () >= 0x00010003u) - { - if (c->plan->all_axes_pinned) - out->varStore = 0; - else - subset_varstore = out->varStore.serialize_subset (c, varStore, this, c->plan->gdef_varstore_inner_maps.as_array ()); - } - - if (subset_varstore) - { - out->version.minor = 3; - } else if (subset_markglyphsetsdef) { - out->version.minor = 2; - } else { - out->version.minor = 0; - } - - return_trace (subset_glyphclassdef || subset_attachlist || - subset_ligcaretlist || subset_markattachclassdef || - (out->version.to_int () >= 0x00010002u && subset_markglyphsetsdef) || - (out->version.to_int () >= 0x00010003u && subset_varstore)); - } -}; - -struct GDEF -{ - static constexpr hb_tag_t tableTag = HB_OT_TAG_GDEF; - - enum GlyphClasses { - UnclassifiedGlyph = 0, - BaseGlyph = 1, - LigatureGlyph = 2, - MarkGlyph = 3, - ComponentGlyph = 4 - }; - - unsigned int get_size () const - { - switch (u.version.major) { - case 1: return u.version1.get_size (); -#ifndef HB_NO_BEYOND_64K - case 2: return u.version2.get_size (); -#endif - default: return u.version.static_size; - } - } - - bool sanitize (hb_sanitize_context_t *c) const - { - TRACE_SANITIZE (this); - if (unlikely (!u.version.sanitize (c))) return_trace (false); - switch (u.version.major) { - case 1: return_trace (u.version1.sanitize (c)); -#ifndef HB_NO_BEYOND_64K - case 2: return_trace (u.version2.sanitize (c)); -#endif - default: return_trace (true); - } - } - - bool subset (hb_subset_context_t *c) const - { - switch (u.version.major) { - case 1: return u.version1.subset (c); -#ifndef HB_NO_BEYOND_64K - case 2: return u.version2.subset (c); -#endif - default: return false; - } - } - - bool has_glyph_classes () const - { - switch (u.version.major) { - case 1: return u.version1.glyphClassDef != 0; -#ifndef HB_NO_BEYOND_64K - case 2: return u.version2.glyphClassDef != 0; -#endif - default: return false; - } - } - const ClassDef &get_glyph_class_def () const - { - switch (u.version.major) { - case 1: return this+u.version1.glyphClassDef; -#ifndef HB_NO_BEYOND_64K - case 2: return this+u.version2.glyphClassDef; -#endif - default: return Null(ClassDef); - } - } - bool has_attach_list () const - { - switch (u.version.major) { - case 1: return u.version1.attachList != 0; -#ifndef HB_NO_BEYOND_64K - case 2: return u.version2.attachList != 0; -#endif - default: return false; - } - } - const AttachList &get_attach_list () const - { - switch (u.version.major) { - case 1: return this+u.version1.attachList; -#ifndef HB_NO_BEYOND_64K - case 2: return this+u.version2.attachList; -#endif - default: return Null(AttachList); - } - } - bool has_lig_carets () const - { - switch (u.version.major) { - case 1: return u.version1.ligCaretList != 0; -#ifndef HB_NO_BEYOND_64K - case 2: return u.version2.ligCaretList != 0; -#endif - default: return false; - } - } - const LigCaretList &get_lig_caret_list () const - { - switch (u.version.major) { - case 1: return this+u.version1.ligCaretList; -#ifndef HB_NO_BEYOND_64K - case 2: return this+u.version2.ligCaretList; -#endif - default: return Null(LigCaretList); - } - } - bool has_mark_attachment_types () const - { - switch (u.version.major) { - case 1: return u.version1.markAttachClassDef != 0; -#ifndef HB_NO_BEYOND_64K - case 2: return u.version2.markAttachClassDef != 0; -#endif - default: return false; - } - } - const ClassDef &get_mark_attach_class_def () const - { - switch (u.version.major) { - case 1: return this+u.version1.markAttachClassDef; -#ifndef HB_NO_BEYOND_64K - case 2: return this+u.version2.markAttachClassDef; -#endif - default: return Null(ClassDef); - } - } - bool has_mark_glyph_sets () const - { - switch (u.version.major) { - case 1: return u.version.to_int () >= 0x00010002u && u.version1.markGlyphSetsDef != 0; -#ifndef HB_NO_BEYOND_64K - case 2: return u.version2.markGlyphSetsDef != 0; -#endif - default: return false; - } - } - const MarkGlyphSets &get_mark_glyph_sets () const - { - switch (u.version.major) { - case 1: return u.version.to_int () >= 0x00010002u ? this+u.version1.markGlyphSetsDef : Null(MarkGlyphSets); -#ifndef HB_NO_BEYOND_64K - case 2: return this+u.version2.markGlyphSetsDef; -#endif - default: return Null(MarkGlyphSets); - } - } - bool has_var_store () const - { - switch (u.version.major) { - case 1: return u.version.to_int () >= 0x00010003u && u.version1.varStore != 0; -#ifndef HB_NO_BEYOND_64K - case 2: return u.version2.varStore != 0; -#endif - default: return false; - } - } - const VariationStore &get_var_store () const - { - switch (u.version.major) { - case 1: return u.version.to_int () >= 0x00010003u ? this+u.version1.varStore : Null(VariationStore); -#ifndef HB_NO_BEYOND_64K - case 2: return this+u.version2.varStore; -#endif - default: return Null(VariationStore); - } - } - - - bool has_data () const { return u.version.to_int (); } - unsigned int get_glyph_class (hb_codepoint_t glyph) const - { return get_glyph_class_def ().get_class (glyph); } - void get_glyphs_in_class (unsigned int klass, hb_set_t *glyphs) const - { get_glyph_class_def ().collect_class (glyphs, klass); } - - unsigned int get_mark_attachment_type (hb_codepoint_t glyph) const - { return get_mark_attach_class_def ().get_class (glyph); } - - unsigned int get_attach_points (hb_codepoint_t glyph_id, - unsigned int start_offset, - unsigned int *point_count /* IN/OUT */, - unsigned int *point_array /* OUT */) const - { return get_attach_list ().get_attach_points (glyph_id, start_offset, point_count, point_array); } - - unsigned int get_lig_carets (hb_font_t *font, - hb_direction_t direction, - hb_codepoint_t glyph_id, - unsigned int start_offset, - unsigned int *caret_count /* IN/OUT */, - hb_position_t *caret_array /* OUT */) const - { return get_lig_caret_list ().get_lig_carets (font, - direction, glyph_id, get_var_store(), - start_offset, caret_count, caret_array); } - - bool mark_set_covers (unsigned int set_index, hb_codepoint_t glyph_id) const - { return get_mark_glyph_sets ().covers (set_index, glyph_id); } - - /* glyph_props is a 16-bit integer where the lower 8-bit have bits representing - * glyph class and other bits, and high 8-bit the mark attachment type (if any). - * Not to be confused with lookup_props which is very similar. */ - unsigned int get_glyph_props (hb_codepoint_t glyph) const - { - unsigned int klass = get_glyph_class (glyph); - - static_assert (((unsigned int) HB_OT_LAYOUT_GLYPH_PROPS_BASE_GLYPH == (unsigned int) LookupFlag::IgnoreBaseGlyphs), ""); - static_assert (((unsigned int) HB_OT_LAYOUT_GLYPH_PROPS_LIGATURE == (unsigned int) LookupFlag::IgnoreLigatures), ""); - static_assert (((unsigned int) HB_OT_LAYOUT_GLYPH_PROPS_MARK == (unsigned int) LookupFlag::IgnoreMarks), ""); - - switch (klass) { - default: return HB_OT_LAYOUT_GLYPH_CLASS_UNCLASSIFIED; - case BaseGlyph: return HB_OT_LAYOUT_GLYPH_PROPS_BASE_GLYPH; - case LigatureGlyph: return HB_OT_LAYOUT_GLYPH_PROPS_LIGATURE; - case MarkGlyph: - klass = get_mark_attachment_type (glyph); - return HB_OT_LAYOUT_GLYPH_PROPS_MARK | (klass << 8); - } - } - - HB_INTERNAL bool is_blocklisted (hb_blob_t *blob, - hb_face_t *face) const; - - struct accelerator_t - { - accelerator_t (hb_face_t *face) - { - table = hb_sanitize_context_t ().reference_table<GDEF> (face); - if (unlikely (table->is_blocklisted (table.get_blob (), face))) - { - hb_blob_destroy (table.get_blob ()); - table = hb_blob_get_empty (); - } - } - ~accelerator_t () { table.destroy (); } - - hb_blob_ptr_t<GDEF> table; - }; - - void collect_variation_indices (hb_collect_variation_indices_context_t *c) const - { get_lig_caret_list ().collect_variation_indices (c); } - - void remap_layout_variation_indices (const hb_set_t *layout_variation_indices, - hb_hashmap_t<unsigned, hb_pair_t<unsigned, int>> *layout_variation_idx_delta_map /* OUT */) const - { - if (!has_var_store ()) return; - if (layout_variation_indices->is_empty ()) return; - - unsigned new_major = 0, new_minor = 0; - unsigned last_major = (layout_variation_indices->get_min ()) >> 16; - for (unsigned idx : layout_variation_indices->iter ()) - { - uint16_t major = idx >> 16; - if (major >= get_var_store ().get_sub_table_count ()) break; - if (major != last_major) - { - new_minor = 0; - ++new_major; - } - - unsigned new_idx = (new_major << 16) + new_minor; - if (!layout_variation_idx_delta_map->has (idx)) - continue; - int delta = hb_second (layout_variation_idx_delta_map->get (idx)); - - layout_variation_idx_delta_map->set (idx, hb_pair_t<unsigned, int> (new_idx, delta)); - ++new_minor; - last_major = major; - } - } - - protected: - union { - FixedVersion<> version; /* Version identifier */ - GDEFVersion1_2<SmallTypes> version1; -#ifndef HB_NO_BEYOND_64K - GDEFVersion1_2<MediumTypes> version2; -#endif - } u; - public: - DEFINE_SIZE_MIN (4); -}; - -struct GDEF_accelerator_t : GDEF::accelerator_t { - GDEF_accelerator_t (hb_face_t *face) : GDEF::accelerator_t (face) {} -}; - -} /* namespace OT */ - +#include "OT/Layout/GDEF/GDEF.hh" #endif /* HB_OT_LAYOUT_GDEF_TABLE_HH */ diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gpos-table.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gpos-table.hh index 8fe987fc509cfeefbfe02ba07b0787fdfeea7782..0cfa139a2604ea7437b1dedf00ed478587f63621 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gpos-table.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gpos-table.hh @@ -56,12 +56,17 @@ PosLookup::dispatch_recurse_func<hb_closure_lookups_context_t> (hb_closure_looku template <> inline bool PosLookup::dispatch_recurse_func<hb_ot_apply_context_t> (hb_ot_apply_context_t *c, unsigned int lookup_index) { - const PosLookup &l = c->face->table.GPOS.get_relaxed ()->table->get_lookup (lookup_index); + auto *gpos = c->face->table.GPOS.get_relaxed (); + const PosLookup &l = gpos->table->get_lookup (lookup_index); unsigned int saved_lookup_props = c->lookup_props; unsigned int saved_lookup_index = c->lookup_index; c->set_lookup_index (lookup_index); c->set_lookup_props (l.get_props ()); - bool ret = l.dispatch (c); + + bool ret = false; + auto *accel = gpos->get_accel (lookup_index); + ret = accel && accel->apply (c, l.get_subtable_count (), false); + c->set_lookup_index (saved_lookup_index); c->set_lookup_props (saved_lookup_props); return ret; diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsub-table.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsub-table.hh index 50301ff1d93d81d211ce18e0d2c5645282192c1d..fd8a68be02d6ac975a801c8b1e773d12b2d8c367 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsub-table.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsub-table.hh @@ -69,12 +69,17 @@ SubstLookup::dispatch_recurse_func<hb_closure_lookups_context_t> (hb_closure_loo template <> inline bool SubstLookup::dispatch_recurse_func<hb_ot_apply_context_t> (hb_ot_apply_context_t *c, unsigned int lookup_index) { - const SubstLookup &l = c->face->table.GSUB.get_relaxed ()->table->get_lookup (lookup_index); + auto *gsub = c->face->table.GSUB.get_relaxed (); + const SubstLookup &l = gsub->table->get_lookup (lookup_index); unsigned int saved_lookup_props = c->lookup_props; unsigned int saved_lookup_index = c->lookup_index; c->set_lookup_index (lookup_index); c->set_lookup_props (l.get_props ()); - bool ret = l.dispatch (c); + + bool ret = false; + auto *accel = gsub->get_accel (lookup_index); + ret = accel && accel->apply (c, l.get_subtable_count (), false); + c->set_lookup_index (saved_lookup_index); c->set_lookup_props (saved_lookup_props); return ret; diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsubgpos.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsubgpos.hh index 04ccefd10880a221be4f5d7002e77a87e7238bb1..10cc105de4967f0605e6e553ae2201bdb9dd8b1f 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsubgpos.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsubgpos.hh @@ -115,7 +115,7 @@ struct hb_closure_context_t : return true; } - hb_set_clear (done_lookups_glyph_set->get (lookup_index)); + done_lookups_glyph_set->get (lookup_index)->clear (); } hb_set_t *covered_glyph_set = done_lookups_glyph_set->get (lookup_index); @@ -532,6 +532,30 @@ struct hb_ot_apply_context_t : may_skip (const hb_glyph_info_t &info) const { return matcher.may_skip (c, info); } + enum match_t { + MATCH, + NOT_MATCH, + SKIP + }; + + match_t match (hb_glyph_info_t &info) + { + matcher_t::may_skip_t skip = matcher.may_skip (c, info); + if (unlikely (skip == matcher_t::SKIP_YES)) + return SKIP; + + matcher_t::may_match_t match = matcher.may_match (info, get_glyph_data ()); + if (match == matcher_t::MATCH_YES || + (match == matcher_t::MATCH_MAYBE && + skip == matcher_t::SKIP_NO)) + return MATCH; + + if (skip == matcher_t::SKIP_NO) + return NOT_MATCH; + + return SKIP; + } + bool next (unsigned *unsafe_to = nullptr) { assert (num_items > 0); @@ -543,27 +567,22 @@ struct hb_ot_apply_context_t : while ((signed) idx < stop) { idx++; - hb_glyph_info_t &info = c->buffer->info[idx]; - - matcher_t::may_skip_t skip = matcher.may_skip (c, info); - if (unlikely (skip == matcher_t::SKIP_YES)) - continue; - - matcher_t::may_match_t match = matcher.may_match (info, get_glyph_data ()); - if (match == matcher_t::MATCH_YES || - (match == matcher_t::MATCH_MAYBE && - skip == matcher_t::SKIP_NO)) - { - num_items--; - advance_glyph_data (); - return true; - } - - if (skip == matcher_t::SKIP_NO) + switch (match (c->buffer->info[idx])) { - if (unsafe_to) - *unsafe_to = idx + 1; - return false; + case MATCH: + { + num_items--; + advance_glyph_data (); + return true; + } + case NOT_MATCH: + { + if (unsafe_to) + *unsafe_to = idx + 1; + return false; + } + case SKIP: + continue; } } if (unsafe_to) @@ -581,27 +600,22 @@ struct hb_ot_apply_context_t : while (idx > stop) { idx--; - hb_glyph_info_t &info = c->buffer->out_info[idx]; - - matcher_t::may_skip_t skip = matcher.may_skip (c, info); - if (unlikely (skip == matcher_t::SKIP_YES)) - continue; - - matcher_t::may_match_t match = matcher.may_match (info, get_glyph_data ()); - if (match == matcher_t::MATCH_YES || - (match == matcher_t::MATCH_MAYBE && - skip == matcher_t::SKIP_NO)) - { - num_items--; - advance_glyph_data (); - return true; - } - - if (skip == matcher_t::SKIP_NO) + switch (match (c->buffer->out_info[idx])) { - if (unsafe_from) - *unsafe_from = hb_max (1u, idx) - 1u; - return false; + case MATCH: + { + num_items--; + advance_glyph_data (); + return true; + } + case NOT_MATCH: + { + if (unsafe_from) + *unsafe_from = hb_max (1u, idx) - 1u; + return false; + } + case SKIP: + continue; } } if (unsafe_from) @@ -698,6 +712,9 @@ struct hb_ot_apply_context_t : uint32_t random_state = 1; unsigned new_syllables = (unsigned) -1; + signed last_base = -1; // GPOS uses + unsigned last_base_until = 0; // GPOS uses + hb_ot_apply_context_t (unsigned int table_index_, hb_font_t *font_, hb_buffer_t *buffer_) : @@ -736,7 +753,7 @@ struct hb_ot_apply_context_t : iter_context.init (this, true); } - void set_lookup_mask (hb_mask_t mask) { lookup_mask = mask; init_iters (); } + void set_lookup_mask (hb_mask_t mask) { lookup_mask = mask; last_base = -1; last_base_until = 0; init_iters (); } void set_auto_zwj (bool auto_zwj_) { auto_zwj = auto_zwj_; init_iters (); } void set_auto_zwnj (bool auto_zwnj_) { auto_zwnj = auto_zwnj_; init_iters (); } void set_per_syllable (bool per_syllable_) { per_syllable = per_syllable_; init_iters (); } @@ -944,8 +961,6 @@ struct hb_accelerate_subtables_context_t : hb_set_digest_t digest; }; - typedef hb_vector_t<hb_applicable_t> array_t; - #ifndef HB_NO_OT_LAYOUT_LOOKUP_CACHE template <typename T> auto cache_cost (const T &obj, hb_priority<1>) HB_AUTO_RETURN ( obj.cache_cost () ) @@ -957,17 +972,15 @@ struct hb_accelerate_subtables_context_t : template <typename T> return_t dispatch (const T &obj) { - hb_applicable_t entry; + hb_applicable_t *entry = &array[i++]; - entry.init (obj, - apply_to<T> + entry->init (obj, + apply_to<T> #ifndef HB_NO_OT_LAYOUT_LOOKUP_CACHE - , apply_cached_to<T> - , cache_func_to<T> + , apply_cached_to<T> + , cache_func_to<T> #endif - ); - - array.push (entry); + ); #ifndef HB_NO_OT_LAYOUT_LOOKUP_CACHE /* Cache handling @@ -979,9 +992,9 @@ struct hb_accelerate_subtables_context_t : * and we allocate the cache opportunity to the costliest subtable. */ unsigned cost = cache_cost (obj, hb_prioritize); - if (cost > cache_user_cost && !array.in_error ()) + if (cost > cache_user_cost) { - cache_user_idx = array.length - 1; + cache_user_idx = i - 1; cache_user_cost = cost; } #endif @@ -990,10 +1003,11 @@ struct hb_accelerate_subtables_context_t : } static return_t default_return_value () { return hb_empty_t (); } - hb_accelerate_subtables_context_t (array_t &array_) : + hb_accelerate_subtables_context_t (hb_applicable_t *array_) : array (array_) {} - array_t &array; + hb_applicable_t *array; + unsigned i = 0; #ifndef HB_NO_OT_LAYOUT_LOOKUP_CACHE unsigned cache_user_idx = (unsigned) -1; @@ -1538,18 +1552,19 @@ static void context_closure_recurse_lookups (hb_closure_context_t *c, intersected_glyphs_func_t intersected_glyphs_func, void *cache) { - hb_set_t *covered_seq_indicies = hb_set_create (); + hb_set_t covered_seq_indicies; + hb_set_t pos_glyphs; for (unsigned int i = 0; i < lookupCount; i++) { unsigned seqIndex = lookupRecord[i].sequenceIndex; if (seqIndex >= inputCount) continue; bool has_pos_glyphs = false; - hb_set_t pos_glyphs; - if (!hb_set_has (covered_seq_indicies, seqIndex)) + if (!covered_seq_indicies.has (seqIndex)) { has_pos_glyphs = true; + pos_glyphs.clear (); if (seqIndex == 0) { switch (context_format) { @@ -1578,7 +1593,7 @@ static void context_closure_recurse_lookups (hb_closure_context_t *c, } } - covered_seq_indicies->add (seqIndex); + covered_seq_indicies.add (seqIndex); if (has_pos_glyphs) { c->push_cur_active_glyphs () = std::move (pos_glyphs); } else { @@ -1589,12 +1604,10 @@ static void context_closure_recurse_lookups (hb_closure_context_t *c, if (context_format == ContextFormat::CoverageBasedContext) endIndex += 1; - c->recurse (lookupRecord[i].lookupListIndex, covered_seq_indicies, seqIndex, endIndex); + c->recurse (lookupRecord[i].lookupListIndex, &covered_seq_indicies, seqIndex, endIndex); c->pop_cur_done_glyphs (); } - - hb_set_destroy (covered_seq_indicies); } template <typename context_t> @@ -1651,7 +1664,7 @@ static inline void apply_lookup (hb_ot_apply_context_t *c, if (buffer->have_output) c->buffer->sync_so_far (); c->buffer->message (c->font, - "recursing to lookup %u at %d", + "recursing to lookup %u at %u", (unsigned) lookupRecord[i].lookupListIndex, buffer->idx); } @@ -2224,7 +2237,7 @@ struct ContextFormat1_4 if (unlikely (!c->serializer->extend_min (out))) return_trace (false); out->format = format; - const hb_map_t *lookup_map = c->table_tag == HB_OT_TAG_GSUB ? c->plan->gsub_lookups : c->plan->gpos_lookups; + const hb_map_t *lookup_map = c->table_tag == HB_OT_TAG_GSUB ? &c->plan->gsub_lookups : &c->plan->gpos_lookups; hb_sorted_vector_t<hb_codepoint_t> new_coverage; + hb_zip (this+coverage, ruleSet) | hb_filter (glyphset, hb_first) @@ -2461,7 +2474,7 @@ struct ContextFormat2_5 hb_set_t coverage_glyph_classes; (this+classDef).intersected_classes (&retained_coverage_glyphs, &coverage_glyph_classes); - const hb_map_t *lookup_map = c->table_tag == HB_OT_TAG_GSUB ? c->plan->gsub_lookups : c->plan->gpos_lookups; + const hb_map_t *lookup_map = c->table_tag == HB_OT_TAG_GSUB ? &c->plan->gsub_lookups : &c->plan->gpos_lookups; bool ret = true; int non_zero_index = -1, index = 0; auto snapshot = c->serializer->snapshot(); @@ -2641,7 +2654,7 @@ struct ContextFormat3 } const auto& lookupRecord = StructAfter<UnsizedArrayOf<LookupRecord>> (coverageZ.as_array (glyphCount)); - const hb_map_t *lookup_map = c->table_tag == HB_OT_TAG_GSUB ? c->plan->gsub_lookups : c->plan->gpos_lookups; + const hb_map_t *lookup_map = c->table_tag == HB_OT_TAG_GSUB ? &c->plan->gsub_lookups : &c->plan->gpos_lookups; unsigned count = serialize_lookuprecord_array (c->serializer, lookupRecord.as_array (lookupCount), lookup_map); @@ -2681,8 +2694,8 @@ struct Context template <typename context_t, typename ...Ts> typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const { + if (unlikely (!c->may_dispatch (this, &u.format))) return c->no_dispatch_return_value (); TRACE_DISPATCH (this, u.format); - if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ()); switch (u.format) { case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...)); case 2: return_trace (c->dispatch (u.format2, std::forward<Ts> (ds)...)); @@ -3305,7 +3318,7 @@ struct ChainContextFormat1_4 if (unlikely (!c->serializer->extend_min (out))) return_trace (false); out->format = format; - const hb_map_t *lookup_map = c->table_tag == HB_OT_TAG_GSUB ? c->plan->gsub_lookups : c->plan->gpos_lookups; + const hb_map_t *lookup_map = c->table_tag == HB_OT_TAG_GSUB ? &c->plan->gsub_lookups : &c->plan->gpos_lookups; hb_sorted_vector_t<hb_codepoint_t> new_coverage; + hb_zip (this+coverage, ruleSet) | hb_filter (glyphset, hb_first) @@ -3541,7 +3554,7 @@ struct ChainContextFormat2_5 */ struct ChainContextApplyLookupContext lookup_context = { - {{cached && &backtrack_class_def == &input_class_def ? match_class_cached : match_class, + {{cached && &backtrack_class_def == &lookahead_class_def ? match_class_cached : match_class, cached && &input_class_def == &lookahead_class_def ? match_class_cached : match_class, cached ? match_class_cached : match_class}}, {&backtrack_class_def, @@ -3585,7 +3598,7 @@ struct ChainContextFormat2_5 int non_zero_index = -1, index = 0; bool ret = true; - const hb_map_t *lookup_map = c->table_tag == HB_OT_TAG_GSUB ? c->plan->gsub_lookups : c->plan->gpos_lookups; + const hb_map_t *lookup_map = c->table_tag == HB_OT_TAG_GSUB ? &c->plan->gsub_lookups : &c->plan->gpos_lookups; auto last_non_zero = c->serializer->snapshot (); for (const auto& _ : + hb_enumerate (ruleSet) | hb_filter (input_klass_map, hb_first)) @@ -3827,7 +3840,7 @@ struct ChainContextFormat3 return_trace (false); const auto &lookup = StructAfter<decltype (lookupX)> (lookahead); - const hb_map_t *lookup_map = c->table_tag == HB_OT_TAG_GSUB ? c->plan->gsub_lookups : c->plan->gpos_lookups; + const hb_map_t *lookup_map = c->table_tag == HB_OT_TAG_GSUB ? &c->plan->gsub_lookups : &c->plan->gpos_lookups; HBUINT16 *lookupCount = c->serializer->copy<HBUINT16> (lookup.len); if (!lookupCount) return_trace (false); @@ -3875,8 +3888,8 @@ struct ChainContext template <typename context_t, typename ...Ts> typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const { + if (unlikely (!c->may_dispatch (this, &u.format))) return c->no_dispatch_return_value (); TRACE_DISPATCH (this, u.format); - if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ()); switch (u.format) { case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...)); case 2: return_trace (c->dispatch (u.format2, std::forward<Ts> (ds)...)); @@ -3915,8 +3928,8 @@ struct ExtensionFormat1 template <typename context_t, typename ...Ts> typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const { + if (unlikely (!c->may_dispatch (this, this))) return c->no_dispatch_return_value (); TRACE_DISPATCH (this, format); - if (unlikely (!c->may_dispatch (this, this))) return_trace (c->no_dispatch_return_value ()); return_trace (get_subtable<typename T::SubTable> ().dispatch (c, get_type (), std::forward<Ts> (ds)...)); } @@ -3994,8 +4007,8 @@ struct Extension template <typename context_t, typename ...Ts> typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const { + if (unlikely (!c->may_dispatch (this, &u.format))) return c->no_dispatch_return_value (); TRACE_DISPATCH (this, u.format); - if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ()); switch (u.format) { case 1: return_trace (u.format1.dispatch (c, std::forward<Ts> (ds)...)); default:return_trace (c->default_return_value ()); @@ -4017,35 +4030,50 @@ struct Extension struct hb_ot_layout_lookup_accelerator_t { template <typename TLookup> - void init (const TLookup &lookup) + static hb_ot_layout_lookup_accelerator_t *create (const TLookup &lookup) { - subtables.init (); - hb_accelerate_subtables_context_t c_accelerate_subtables (subtables); + unsigned count = lookup.get_subtable_count (); + + unsigned size = sizeof (hb_ot_layout_lookup_accelerator_t) - + HB_VAR_ARRAY * sizeof (hb_accelerate_subtables_context_t::hb_applicable_t) + + count * sizeof (hb_accelerate_subtables_context_t::hb_applicable_t); + + /* The following is a calloc because when we are collecting subtables, + * some of them might be invalid and hence not collect; as a result, + * we might not fill in all the count entries of the subtables array. + * Zeroing it allows the set digest to gatekeep it without having to + * initialize it further. */ + auto *thiz = (hb_ot_layout_lookup_accelerator_t *) hb_calloc (1, size); + if (unlikely (!thiz)) + return nullptr; + + hb_accelerate_subtables_context_t c_accelerate_subtables (thiz->subtables); lookup.dispatch (&c_accelerate_subtables); - digest.init (); - for (auto& subtable : hb_iter (subtables)) - digest.add (subtable.digest); + thiz->digest.init (); + for (auto& subtable : hb_iter (thiz->subtables, count)) + thiz->digest.add (subtable.digest); #ifndef HB_NO_OT_LAYOUT_LOOKUP_CACHE - cache_user_idx = c_accelerate_subtables.cache_user_idx; - for (unsigned i = 0; i < subtables.length; i++) - if (i != cache_user_idx) - subtables[i].apply_cached_func = subtables[i].apply_func; + thiz->cache_user_idx = c_accelerate_subtables.cache_user_idx; + for (unsigned i = 0; i < count; i++) + if (i != thiz->cache_user_idx) + thiz->subtables[i].apply_cached_func = thiz->subtables[i].apply_func; #endif + + return thiz; } - void fini () { subtables.fini (); } bool may_have (hb_codepoint_t g) const { return digest.may_have (g); } - bool apply (hb_ot_apply_context_t *c, bool use_cache) const + bool apply (hb_ot_apply_context_t *c, unsigned subtables_count, bool use_cache) const { #ifndef HB_NO_OT_LAYOUT_LOOKUP_CACHE if (use_cache) { return - + hb_iter (subtables) + + hb_iter (hb_iter (subtables, subtables_count)) | hb_map ([&c] (const hb_accelerate_subtables_context_t::hb_applicable_t &_) { return _.apply_cached (c); }) | hb_any ; @@ -4054,7 +4082,7 @@ struct hb_ot_layout_lookup_accelerator_t #endif { return - + hb_iter (subtables) + + hb_iter (hb_iter (subtables, subtables_count)) | hb_map ([&c] (const hb_accelerate_subtables_context_t::hb_applicable_t &_) { return _.apply (c); }) | hb_any ; @@ -4081,10 +4109,10 @@ struct hb_ot_layout_lookup_accelerator_t hb_set_digest_t digest; private: - hb_accelerate_subtables_context_t::array_t subtables; #ifndef HB_NO_OT_LAYOUT_LOOKUP_CACHE unsigned cache_user_idx = (unsigned) -1; #endif + hb_accelerate_subtables_context_t::hb_applicable_t subtables[HB_VAR_ARRAY]; }; template <typename Types> @@ -4142,8 +4170,11 @@ struct GSUBGPOSVersion1_2 bool subset (hb_subset_layout_context_t *c) const { TRACE_SUBSET (this); - auto *out = c->subset_context->serializer->embed (*this); - if (unlikely (!out)) return_trace (false); + + auto *out = c->subset_context->serializer->start_embed (this); + if (unlikely (!c->subset_context->serializer->extend_min (out))) return_trace (false); + + out->version = version; typedef LookupOffsetList<TLookup, typename Types::HBUINT> TLookupList; reinterpret_cast<typename Types::template OffsetTo<TLookupList> &> (out->lookupList) @@ -4166,9 +4197,23 @@ struct GSUBGPOSVersion1_2 #ifndef HB_NO_VAR if (version.to_int () >= 0x00010001u) { - bool ret = out->featureVars.serialize_subset (c->subset_context, featureVars, this, c); + auto snapshot = c->subset_context->serializer->snapshot (); + if (!c->subset_context->serializer->extend_min (&out->featureVars)) + return_trace (false); + + // TODO(qxliu76): the current implementation doesn't correctly handle feature variations + // that are dropped by instancing when the associated conditions don't trigger. + // Since partial instancing isn't yet supported this isn't an issue yet but will + // need to be fixed for partial instancing. + + + + // if all axes are pinned all feature vars are dropped. + bool ret = !c->subset_context->plan->all_axes_pinned + && out->featureVars.serialize_subset (c->subset_context, featureVars, this, c); if (!ret && version.major == 1) { + c->subset_context->serializer->revert (snapshot); out->version.major = 1; out->version.minor = 0; } @@ -4430,28 +4475,47 @@ struct GSUBGPOS this->lookup_count = table->get_lookup_count (); - this->accels = (hb_ot_layout_lookup_accelerator_t *) hb_calloc (this->lookup_count, sizeof (hb_ot_layout_lookup_accelerator_t)); + this->accels = (hb_atomic_ptr_t<hb_ot_layout_lookup_accelerator_t> *) hb_calloc (this->lookup_count, sizeof (*accels)); if (unlikely (!this->accels)) { this->lookup_count = 0; this->table.destroy (); this->table = hb_blob_get_empty (); } - - for (unsigned int i = 0; i < this->lookup_count; i++) - this->accels[i].init (table->get_lookup (i)); } ~accelerator_t () { for (unsigned int i = 0; i < this->lookup_count; i++) - this->accels[i].fini (); + hb_free (this->accels[i]); hb_free (this->accels); this->table.destroy (); } + hb_ot_layout_lookup_accelerator_t *get_accel (unsigned lookup_index) const + { + if (unlikely (lookup_index >= lookup_count)) return nullptr; + + retry: + auto *accel = accels[lookup_index].get_acquire (); + if (unlikely (!accel)) + { + accel = hb_ot_layout_lookup_accelerator_t::create (table->get_lookup (lookup_index)); + if (unlikely (!accel)) + return nullptr; + + if (unlikely (!accels[lookup_index].cmpexch (nullptr, accel))) + { + hb_free (accel); + goto retry; + } + } + + return accel; + } + hb_blob_ptr_t<T> table; unsigned int lookup_count; - hb_ot_layout_lookup_accelerator_t *accels; + hb_atomic_ptr_t<hb_ot_layout_lookup_accelerator_t> *accels; }; protected: diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.cc b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.cc index e8091ec3e0b9fbab04b36a51349f271143be231d..6c4055e0461b96fc1a40c33c7dbd95fe6b0f0f81 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.cc +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.cc @@ -500,8 +500,8 @@ hb_ot_layout_table_find_script (hb_face_t *face, * @face: #hb_face_t to work upon * @table_tag: #HB_OT_TAG_GSUB or #HB_OT_TAG_GPOS * @script_tags: Array of #hb_tag_t script tags - * @script_index: (out): The index of the requested script tag - * @chosen_script: (out): #hb_tag_t of the script tag requested + * @script_index: (out): The index of the chosen script + * @chosen_script: (out): #hb_tag_t of the chosen script * * Deprecated since 2.0.0 **/ @@ -531,8 +531,8 @@ hb_ot_layout_table_choose_script (hb_face_t *face, * * If the table does not have any of the requested scripts, then `DFLT`, * `dflt`, and `latn` tags are tried in that order. If the table still does not - * have any of these scripts, @script_index and @chosen_script are set to - * #HB_OT_LAYOUT_NO_SCRIPT_INDEX. + * have any of these scripts, @script_index is set to + * #HB_OT_LAYOUT_NO_SCRIPT_INDEX and @chosen_script is set to #HB_TAG_NONE. * * Return value: * `true` if one of the requested scripts is selected, `false` if a fallback @@ -586,7 +586,7 @@ hb_ot_layout_table_select_script (hb_face_t *face, if (script_index) *script_index = HB_OT_LAYOUT_NO_SCRIPT_INDEX; if (chosen_script) - *chosen_script = HB_OT_LAYOUT_NO_SCRIPT_INDEX; + *chosen_script = HB_TAG_NONE; return false; } @@ -727,32 +727,35 @@ hb_ot_layout_script_find_language (hb_face_t *face, /** - * hb_ot_layout_script_select_language: + * hb_ot_layout_script_select_language2: * @face: #hb_face_t to work upon * @table_tag: #HB_OT_TAG_GSUB or #HB_OT_TAG_GPOS * @script_index: The index of the requested script tag * @language_count: The number of languages in the specified script * @language_tags: The array of language tags - * @language_index: (out): The index of the requested language + * @language_index: (out): The index of the chosen language + * @chosen_language: (out): #hb_tag_t of the chosen language * * Fetches the index of the first language tag fom @language_tags that is present * in the specified face's GSUB or GPOS table, underneath the specified script * index. * * If none of the given language tags is found, `false` is returned and - * @language_index is set to the default language index. + * @language_index is set to #HB_OT_LAYOUT_DEFAULT_LANGUAGE_INDEX and + * @chosen_language is set to #HB_TAG_NONE. * * Return value: `true` if one of the given language tags is found, `false` otherwise * - * Since: 2.0.0 + * Since: 7.0.0 **/ hb_bool_t -hb_ot_layout_script_select_language (hb_face_t *face, +hb_ot_layout_script_select_language2 (hb_face_t *face, hb_tag_t table_tag, unsigned int script_index, unsigned int language_count, const hb_tag_t *language_tags, - unsigned int *language_index /* OUT */) + unsigned int *language_index /* OUT */, + hb_tag_t *chosen_language /* OUT */) { static_assert ((OT::Index::NOT_FOUND_INDEX == HB_OT_LAYOUT_DEFAULT_LANGUAGE_INDEX), ""); const OT::Script &s = get_gsubgpos_table (face, table_tag).get_script (script_index); @@ -761,18 +764,61 @@ hb_ot_layout_script_select_language (hb_face_t *face, for (i = 0; i < language_count; i++) { if (s.find_lang_sys_index (language_tags[i], language_index)) + { + if (chosen_language) + *chosen_language = language_tags[i]; return true; + } } /* try finding 'dflt' */ if (s.find_lang_sys_index (HB_OT_TAG_DEFAULT_LANGUAGE, language_index)) + { + if (chosen_language) + *chosen_language = HB_OT_TAG_DEFAULT_LANGUAGE; return false; + } if (language_index) *language_index = HB_OT_LAYOUT_DEFAULT_LANGUAGE_INDEX; + if (chosen_language) + *chosen_language = HB_TAG_NONE; return false; } +/** + * hb_ot_layout_script_select_language: + * @face: #hb_face_t to work upon + * @table_tag: #HB_OT_TAG_GSUB or #HB_OT_TAG_GPOS + * @script_index: The index of the requested script tag + * @language_count: The number of languages in the specified script + * @language_tags: The array of language tags + * @language_index: (out): The index of the requested language + * + * Fetches the index of the first language tag fom @language_tags that is present + * in the specified face's GSUB or GPOS table, underneath the specified script + * index. + * + * If none of the given language tags is found, `false` is returned and + * @language_index is set to the default language index. + * + * Return value: `true` if one of the given language tags is found, `false` otherwise + * + * Since: 2.0.0 + **/ +hb_bool_t +hb_ot_layout_script_select_language (hb_face_t *face, + hb_tag_t table_tag, + unsigned int script_index, + unsigned int language_count, + const hb_tag_t *language_tags, + unsigned int *language_index /* OUT */) +{ + return hb_ot_layout_script_select_language2 (face, table_tag, + script_index, + language_count, language_tags, + language_index, nullptr); +} /** * hb_ot_layout_language_get_required_feature_index: @@ -1441,11 +1487,13 @@ hb_ot_layout_lookup_would_substitute (hb_face_t *face, unsigned int glyphs_length, hb_bool_t zero_context) { - if (unlikely (lookup_index >= face->table.GSUB->lookup_count)) return false; + auto &gsub = face->table.GSUB; + if (unlikely (lookup_index >= gsub->lookup_count)) return false; OT::hb_would_apply_context_t c (face, glyphs, glyphs_length, (bool) zero_context); - const OT::SubstLookup& l = face->table.GSUB->table->get_lookup (lookup_index); - return l.would_apply (&c, &face->table.GSUB->accels[lookup_index]); + const OT::SubstLookup& l = gsub->table->get_lookup (lookup_index); + auto *accel = gsub->get_accel (lookup_index); + return accel && l.would_apply (&c, accel); } @@ -1784,11 +1832,9 @@ struct GSUBProxy typedef OT::SubstLookup Lookup; GSUBProxy (hb_face_t *face) : - table (*face->table.GSUB->table), - accels (face->table.GSUB->accels) {} + accel (*face->table.GSUB) {} - const GSUB &table; - const OT::hb_ot_layout_lookup_accelerator_t *accels; + const GSUB::accelerator_t &accel; }; struct GPOSProxy @@ -1798,17 +1844,16 @@ struct GPOSProxy typedef OT::PosLookup Lookup; GPOSProxy (hb_face_t *face) : - table (*face->table.GPOS->table), - accels (face->table.GPOS->accels) {} + accel (*face->table.GPOS) {} - const GPOS &table; - const OT::hb_ot_layout_lookup_accelerator_t *accels; + const GPOS::accelerator_t &accel; }; static inline bool apply_forward (OT::hb_ot_apply_context_t *c, - const OT::hb_ot_layout_lookup_accelerator_t &accel) + const OT::hb_ot_layout_lookup_accelerator_t &accel, + unsigned subtable_count) { bool use_cache = accel.cache_enter (c); @@ -1821,7 +1866,7 @@ apply_forward (OT::hb_ot_apply_context_t *c, (buffer->cur().mask & c->lookup_mask) && c->check_glyph_property (&buffer->cur(), c->lookup_props)) { - applied = accel.apply (c, use_cache); + applied = accel.apply (c, subtable_count, use_cache); } if (applied) @@ -1838,7 +1883,8 @@ apply_forward (OT::hb_ot_apply_context_t *c, static inline bool apply_backward (OT::hb_ot_apply_context_t *c, - const OT::hb_ot_layout_lookup_accelerator_t &accel) + const OT::hb_ot_layout_lookup_accelerator_t &accel, + unsigned subtable_count) { bool ret = false; hb_buffer_t *buffer = c->buffer; @@ -1847,7 +1893,7 @@ apply_backward (OT::hb_ot_apply_context_t *c, if (accel.digest.may_have (buffer->cur().codepoint) && (buffer->cur().mask & c->lookup_mask) && c->check_glyph_property (&buffer->cur(), c->lookup_props)) - ret |= accel.apply (c, false); + ret |= accel.apply (c, subtable_count, false); /* The reverse lookup doesn't "advance" cursor (for good reason). */ buffer->idx--; @@ -1863,11 +1909,13 @@ apply_string (OT::hb_ot_apply_context_t *c, const typename Proxy::Lookup &lookup, const OT::hb_ot_layout_lookup_accelerator_t &accel) { - bool ret = false; hb_buffer_t *buffer = c->buffer; + unsigned subtable_count = lookup.get_subtable_count (); if (unlikely (!buffer->len || !c->lookup_mask)) - return ret; + return false; + + bool ret = false; c->set_lookup_props (lookup.get_props ()); @@ -1878,7 +1926,7 @@ apply_string (OT::hb_ot_apply_context_t *c, buffer->clear_output (); buffer->idx = 0; - ret = apply_forward (c, accel); + ret = apply_forward (c, accel, subtable_count); if (!Proxy::always_inplace) buffer->sync (); @@ -1888,7 +1936,7 @@ apply_string (OT::hb_ot_apply_context_t *c, /* in-place backward substitution/positioning */ assert (!buffer->have_output); buffer->idx = buffer->len - 1; - ret = apply_backward (c, accel); + ret = apply_backward (c, accel, subtable_count); } return ret; @@ -1913,13 +1961,18 @@ inline void hb_ot_map_t::apply (const Proxy &proxy, auto &lookup = lookups[table_index][i]; unsigned int lookup_index = lookup.index; - if (!buffer->message (font, "start lookup %d feature '%c%c%c%c'", lookup_index, HB_UNTAG (lookup.feature_tag))) continue; + + auto *accel = proxy.accel.get_accel (lookup_index); + if (unlikely (!accel)) continue; + + if (buffer->messaging () && + !buffer->message (font, "start lookup %u feature '%c%c%c%c'", lookup_index, HB_UNTAG (lookup.feature_tag))) continue; /* c.digest is a digest of all the current glyphs in the buffer * (plus some past glyphs). * * Only try applying the lookup if there is any overlap. */ - if (proxy.accels[lookup_index].digest.may_have (c.digest)) + if (accel->digest.may_have (c.digest)) { c.set_lookup_index (lookup_index); c.set_lookup_mask (lookup.mask); @@ -1929,13 +1982,14 @@ inline void hb_ot_map_t::apply (const Proxy &proxy, c.set_per_syllable (lookup.per_syllable); apply_string<Proxy> (&c, - proxy.table.get_lookup (lookup_index), - proxy.accels[lookup_index]); + proxy.accel.table->get_lookup (lookup_index), + *accel); } - else - (void) buffer->message (font, "skipped lookup %d feature '%c%c%c%c' because no glyph matches", lookup_index, HB_UNTAG (lookup.feature_tag)); + else if (buffer->messaging ()) + (void) buffer->message (font, "skipped lookup %u feature '%c%c%c%c' because no glyph matches", lookup_index, HB_UNTAG (lookup.feature_tag)); - (void) buffer->message (font, "end lookup %d feature '%c%c%c%c'", lookup_index, HB_UNTAG (lookup.feature_tag)); + if (buffer->messaging ()) + (void) buffer->message (font, "end lookup %u feature '%c%c%c%c'", lookup_index, HB_UNTAG (lookup.feature_tag)); } if (stage->pause_func) @@ -1952,17 +2006,21 @@ inline void hb_ot_map_t::apply (const Proxy &proxy, void hb_ot_map_t::substitute (const hb_ot_shape_plan_t *plan, hb_font_t *font, hb_buffer_t *buffer) const { GSUBProxy proxy (font->face); - if (!buffer->message (font, "start table GSUB")) return; + if (buffer->messaging () && + !buffer->message (font, "start table GSUB")) return; apply (proxy, plan, font, buffer); - (void) buffer->message (font, "end table GSUB"); + if (buffer->messaging ()) + (void) buffer->message (font, "end table GSUB"); } void hb_ot_map_t::position (const hb_ot_shape_plan_t *plan, hb_font_t *font, hb_buffer_t *buffer) const { GPOSProxy proxy (font->face); - if (!buffer->message (font, "start table GPOS")) return; + if (buffer->messaging () && + !buffer->message (font, "start table GPOS")) return; apply (proxy, plan, font, buffer); - (void) buffer->message (font, "end table GPOS"); + if (buffer->messaging ()) + (void) buffer->message (font, "end table GPOS"); } void diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.h b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.h index f7b488f870b8bf11f75782b30563ee735c151792..10dcc65ac0790b970c2034f5070ac679fc5f0032 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.h +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout.h @@ -254,6 +254,15 @@ hb_ot_layout_script_select_language (hb_face_t *face, const hb_tag_t *language_tags, unsigned int *language_index /* OUT */); +HB_EXTERN hb_bool_t +hb_ot_layout_script_select_language2 (hb_face_t *face, + hb_tag_t table_tag, + unsigned int script_index, + unsigned int language_count, + const hb_tag_t *language_tags, + unsigned int *language_index /* OUT */, + hb_tag_t *chosen_language /* OUT */); + HB_EXTERN hb_bool_t hb_ot_layout_language_get_required_feature_index (hb_face_t *face, hb_tag_t table_tag, diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-math-table.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-math-table.hh index 93953370e273523ee226843a283f3c07b333ee69..dccf720f46b39a5643c4c479784b1eb7ed47eccc 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-math-table.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-math-table.hh @@ -201,7 +201,7 @@ struct MathItalicsCorrectionInfo bool subset (hb_subset_context_t *c) const { TRACE_SUBSET (this); - const hb_set_t &glyphset = *c->plan->_glyphset_mathed; + const hb_set_t &glyphset = c->plan->_glyphset_mathed; const hb_map_t &glyph_map = *c->plan->glyph_map; auto *out = c->serializer->start_embed (*this); @@ -254,7 +254,7 @@ struct MathTopAccentAttachment bool subset (hb_subset_context_t *c) const { TRACE_SUBSET (this); - const hb_set_t &glyphset = *c->plan->_glyphset_mathed; + const hb_set_t &glyphset = c->plan->_glyphset_mathed; const hb_map_t &glyph_map = *c->plan->glyph_map; auto *out = c->serializer->start_embed (*this); @@ -486,7 +486,7 @@ struct MathKernInfo bool subset (hb_subset_context_t *c) const { TRACE_SUBSET (this); - const hb_set_t &glyphset = *c->plan->_glyphset_mathed; + const hb_set_t &glyphset = c->plan->_glyphset_mathed; const hb_map_t &glyph_map = *c->plan->glyph_map; auto *out = c->serializer->start_embed (*this); @@ -567,7 +567,7 @@ struct MathGlyphInfo out->mathItalicsCorrectionInfo.serialize_subset (c, mathItalicsCorrectionInfo, this); out->mathTopAccentAttachment.serialize_subset (c, mathTopAccentAttachment, this); - const hb_set_t &glyphset = *c->plan->_glyphset_mathed; + const hb_set_t &glyphset = c->plan->_glyphset_mathed; const hb_map_t &glyph_map = *c->plan->glyph_map; auto it = @@ -938,7 +938,7 @@ struct MathVariants bool subset (hb_subset_context_t *c) const { TRACE_SUBSET (this); - const hb_set_t &glyphset = *c->plan->_glyphset_mathed; + const hb_set_t &glyphset = c->plan->_glyphset_mathed; const hb_map_t &glyph_map = *c->plan->glyph_map; auto *out = c->serializer->start_embed (*this); diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-maxp-table.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-maxp-table.hh index 3a019ef7821efacd0dc20b976a4e0ca4199c3824..05cbf2cedfeda8772524ac9a733be119781acbdf 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-maxp-table.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-maxp-table.hh @@ -109,11 +109,24 @@ struct maxp if (c->plan->flags & HB_SUBSET_FLAGS_NO_HINTING) drop_hint_fields (dest_v1); + + if (c->plan->normalized_coords) + instancing_update_fields (c->plan->head_maxp_info, dest_v1); } return_trace (true); } + void instancing_update_fields (head_maxp_info_t& maxp_info, maxpV1Tail* dest_v1) const + { + dest_v1->maxPoints = maxp_info.maxPoints; + dest_v1->maxContours = maxp_info.maxContours; + dest_v1->maxCompositePoints = maxp_info.maxCompositePoints; + dest_v1->maxCompositeContours = maxp_info.maxCompositeContours; + dest_v1->maxComponentElements = maxp_info.maxComponentElements; + dest_v1->maxComponentDepth = maxp_info.maxComponentDepth; + } + static void drop_hint_fields (maxpV1Tail* dest_v1) { dest_v1->maxZones = 1; diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-name-table.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-name-table.hh index 6f4461cc153da7b317ce0b485b8602bbd2455808..85653224cc709560ee7fc3d32475af1e2f76ec30 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-name-table.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-name-table.hh @@ -27,569 +27,6 @@ #ifndef HB_OT_NAME_TABLE_HH #define HB_OT_NAME_TABLE_HH -#include "hb-open-type.hh" -#include "hb-ot-name-language.hh" -#include "hb-aat-layout.hh" -#include "hb-utf.hh" - - -namespace OT { - -template <typename in_utf_t, typename out_utf_t> -inline unsigned int -hb_ot_name_convert_utf (hb_bytes_t bytes, - unsigned int *text_size /* IN/OUT */, - typename out_utf_t::codepoint_t *text /* OUT */) -{ - unsigned int src_len = bytes.length / sizeof (typename in_utf_t::codepoint_t); - const typename in_utf_t::codepoint_t *src = (const typename in_utf_t::codepoint_t *) bytes.arrayZ; - const typename in_utf_t::codepoint_t *src_end = src + src_len; - - typename out_utf_t::codepoint_t *dst = text; - - hb_codepoint_t unicode; - const hb_codepoint_t replacement = HB_BUFFER_REPLACEMENT_CODEPOINT_DEFAULT; - - if (text_size && *text_size) - { - (*text_size)--; /* Save room for NUL-termination. */ - const typename out_utf_t::codepoint_t *dst_end = text + *text_size; - - while (src < src_end && dst < dst_end) - { - const typename in_utf_t::codepoint_t *src_next = in_utf_t::next (src, src_end, &unicode, replacement); - typename out_utf_t::codepoint_t *dst_next = out_utf_t::encode (dst, dst_end, unicode); - if (dst_next == dst) - break; /* Out-of-room. */ - - dst = dst_next; - src = src_next; - } - - *text_size = dst - text; - *dst = 0; /* NUL-terminate. */ - } - - /* Accumulate length of rest. */ - unsigned int dst_len = dst - text; - while (src < src_end) - { - src = in_utf_t::next (src, src_end, &unicode, replacement); - dst_len += out_utf_t::encode_len (unicode); - } - return dst_len; -} - -#define entry_score var.u16[0] -#define entry_index var.u16[1] - - -/* - * name -- Naming - * https://docs.microsoft.com/en-us/typography/opentype/spec/name - */ -#define HB_OT_TAG_name HB_TAG('n','a','m','e') - -#define UNSUPPORTED 42 - -struct NameRecord -{ - hb_language_t language (hb_face_t *face) const - { -#ifndef HB_NO_OT_NAME_LANGUAGE - unsigned int p = platformID; - unsigned int l = languageID; - - if (p == 3) - return _hb_ot_name_language_for_ms_code (l); - - if (p == 1) - return _hb_ot_name_language_for_mac_code (l); - -#ifndef HB_NO_OT_NAME_LANGUAGE_AAT - if (p == 0) - return face->table.ltag->get_language (l); -#endif - -#endif - return HB_LANGUAGE_INVALID; - } - - uint16_t score () const - { - /* Same order as in cmap::find_best_subtable(). */ - unsigned int p = platformID; - unsigned int e = encodingID; - - /* 32-bit. */ - if (p == 3 && e == 10) return 0; - if (p == 0 && e == 6) return 1; - if (p == 0 && e == 4) return 2; - - /* 16-bit. */ - if (p == 3 && e == 1) return 3; - if (p == 0 && e == 3) return 4; - if (p == 0 && e == 2) return 5; - if (p == 0 && e == 1) return 6; - if (p == 0 && e == 0) return 7; - - /* Symbol. */ - if (p == 3 && e == 0) return 8; - - /* We treat all Mac Latin names as ASCII only. */ - if (p == 1 && e == 0) return 10; /* 10 is magic number :| */ - - return UNSUPPORTED; - } - - NameRecord* copy (hb_serialize_context_t *c, const void *base -#ifdef HB_EXPERIMENTAL_API - , const hb_hashmap_t<hb_ot_name_record_ids_t, hb_bytes_t> *name_table_overrides -#endif - ) const - { - TRACE_SERIALIZE (this); - HB_UNUSED auto snap = c->snapshot (); - auto *out = c->embed (this); - if (unlikely (!out)) return_trace (nullptr); -#ifdef HB_EXPERIMENTAL_API - hb_ot_name_record_ids_t record_ids (platformID, encodingID, languageID, nameID); - hb_bytes_t* name_bytes; - - if (name_table_overrides->has (record_ids, &name_bytes)) { - hb_bytes_t encoded_bytes = *name_bytes; - char *name_str_utf16_be = nullptr; - - if (platformID != 1) - { - unsigned text_size = hb_ot_name_convert_utf<hb_utf8_t, hb_utf16_be_t> (*name_bytes, nullptr, nullptr); - - text_size++; // needs to consider NULL terminator for use in hb_ot_name_convert_utf() - unsigned byte_len = text_size * hb_utf16_be_t::codepoint_t::static_size; - name_str_utf16_be = (char *) hb_calloc (byte_len, 1); - if (!name_str_utf16_be) - { - c->revert (snap); - return_trace (nullptr); - } - hb_ot_name_convert_utf<hb_utf8_t, hb_utf16_be_t> (*name_bytes, &text_size, - (hb_utf16_be_t::codepoint_t *) name_str_utf16_be); - - unsigned encoded_byte_len = text_size * hb_utf16_be_t::codepoint_t::static_size; - if (!encoded_byte_len || !c->check_assign (out->length, encoded_byte_len, HB_SERIALIZE_ERROR_INT_OVERFLOW)) { - c->revert (snap); - hb_free (name_str_utf16_be); - return_trace (nullptr); - } - - encoded_bytes = hb_bytes_t (name_str_utf16_be, encoded_byte_len); - } - else - { - // mac platform, copy the UTF-8 string(all ascii characters) as is - if (!c->check_assign (out->length, encoded_bytes.length, HB_SERIALIZE_ERROR_INT_OVERFLOW)) { - c->revert (snap); - return_trace (nullptr); - } - } - - out->offset = 0; - c->push (); - encoded_bytes.copy (c); - c->add_link (out->offset, c->pop_pack (), hb_serialize_context_t::Tail, 0); - hb_free (name_str_utf16_be); - } - else -#endif - { - out->offset.serialize_copy (c, offset, base, 0, hb_serialize_context_t::Tail, length); - } - return_trace (out); - } - - bool isUnicode () const - { - unsigned int p = platformID; - unsigned int e = encodingID; - - return (p == 0 || - (p == 3 && (e == 0 || e == 1 || e == 10))); - } - - static int cmp (const void *pa, const void *pb) - { - const NameRecord *a = (const NameRecord *)pa; - const NameRecord *b = (const NameRecord *)pb; - - if (a->platformID != b->platformID) - return a->platformID - b->platformID; - - if (a->encodingID != b->encodingID) - return a->encodingID - b->encodingID; - - if (a->languageID != b->languageID) - return a->languageID - b->languageID; - - if (a->nameID != b->nameID) - return a->nameID - b->nameID; - - if (a->length != b->length) - return a->length - b->length; - - return 0; - } - - bool sanitize (hb_sanitize_context_t *c, const void *base) const - { - TRACE_SANITIZE (this); - return_trace (c->check_struct (this) && offset.sanitize (c, base, length)); - } - - HBUINT16 platformID; /* Platform ID. */ - HBUINT16 encodingID; /* Platform-specific encoding ID. */ - HBUINT16 languageID; /* Language ID. */ - HBUINT16 nameID; /* Name ID. */ - HBUINT16 length; /* String length (in bytes). */ - NNOffset16To<UnsizedArrayOf<HBUINT8>> - offset; /* String offset from start of storage area (in bytes). */ - public: - DEFINE_SIZE_STATIC (12); -}; - -static int -_hb_ot_name_entry_cmp_key (const void *pa, const void *pb, bool exact) -{ - const hb_ot_name_entry_t *a = (const hb_ot_name_entry_t *) pa; - const hb_ot_name_entry_t *b = (const hb_ot_name_entry_t *) pb; - - /* Compare by name_id, then language. */ - - if (a->name_id != b->name_id) - return a->name_id - b->name_id; - - if (a->language == b->language) return 0; - if (!a->language) return -1; - if (!b->language) return +1; - - const char *astr = hb_language_to_string (a->language); - const char *bstr = hb_language_to_string (b->language); - - signed c = strcmp (astr, bstr); - - // 'a' is the user request, and 'b' is string in the font. - // If eg. user asks for "en-us" and font has "en", approve. - if (!exact && c && - hb_language_matches (b->language, a->language)) - return 0; - - return c; -} - -static int -_hb_ot_name_entry_cmp (const void *pa, const void *pb) -{ - /* Compare by name_id, then language, then score, then index. */ - - int v = _hb_ot_name_entry_cmp_key (pa, pb, true); - if (v) - return v; - - const hb_ot_name_entry_t *a = (const hb_ot_name_entry_t *) pa; - const hb_ot_name_entry_t *b = (const hb_ot_name_entry_t *) pb; - - if (a->entry_score != b->entry_score) - return a->entry_score - b->entry_score; - - if (a->entry_index != b->entry_index) - return a->entry_index - b->entry_index; - - return 0; -} - -struct name -{ - static constexpr hb_tag_t tableTag = HB_OT_TAG_name; - - unsigned int get_size () const - { return min_size + count * nameRecordZ.item_size; } - - template <typename Iterator, - hb_requires (hb_is_source_of (Iterator, const NameRecord &))> - bool serialize (hb_serialize_context_t *c, - Iterator it, - const void *src_string_pool -#ifdef HB_EXPERIMENTAL_API - , const hb_vector_t<hb_ot_name_record_ids_t>& insert_name_records - , const hb_hashmap_t<hb_ot_name_record_ids_t, hb_bytes_t> *name_table_overrides -#endif - ) - { - TRACE_SERIALIZE (this); - - if (unlikely (!c->extend_min ((*this)))) return_trace (false); - - unsigned total_count = it.len () -#ifdef HB_EXPERIMENTAL_API - + insert_name_records.length -#endif - ; - this->format = 0; - if (!c->check_assign (this->count, total_count, HB_SERIALIZE_ERROR_INT_OVERFLOW)) - return false; - - NameRecord *name_records = (NameRecord *) hb_calloc (total_count, NameRecord::static_size); - if (unlikely (!name_records)) return_trace (false); - - hb_array_t<NameRecord> records (name_records, total_count); - - for (const NameRecord& record : it) - { - hb_memcpy (name_records, &record, NameRecord::static_size); - name_records++; - } - -#ifdef HB_EXPERIMENTAL_API - for (unsigned i = 0; i < insert_name_records.length; i++) - { - const hb_ot_name_record_ids_t& ids = insert_name_records[i]; - NameRecord record; - record.platformID = ids.platform_id; - record.encodingID = ids.encoding_id; - record.languageID = ids.language_id; - record.nameID = ids.name_id; - record.length = 0; // handled in NameRecord copy() - record.offset = 0; - memcpy (name_records, &record, NameRecord::static_size); - name_records++; - } -#endif - - records.qsort (); - - c->copy_all (records, - src_string_pool -#ifdef HB_EXPERIMENTAL_API - , name_table_overrides -#endif - ); - hb_free (records.arrayZ); - - - if (unlikely (c->ran_out_of_room ())) return_trace (false); - - this->stringOffset = c->length (); - - return_trace (true); - } - - bool subset (hb_subset_context_t *c) const - { - TRACE_SUBSET (this); - - name *name_prime = c->serializer->start_embed<name> (); - if (unlikely (!name_prime)) return_trace (false); - -#ifdef HB_EXPERIMENTAL_API - const hb_hashmap_t<hb_ot_name_record_ids_t, hb_bytes_t> *name_table_overrides = - c->plan->name_table_overrides; -#endif - - auto it = - + nameRecordZ.as_array (count) - | hb_filter (c->plan->name_ids, &NameRecord::nameID) - | hb_filter (c->plan->name_languages, &NameRecord::languageID) - | hb_filter ([&] (const NameRecord& namerecord) { - return - (c->plan->flags & HB_SUBSET_FLAGS_NAME_LEGACY) - || namerecord.isUnicode (); - }) -#ifdef HB_EXPERIMENTAL_API - | hb_filter ([&] (const NameRecord& namerecord) { - if (name_table_overrides->is_empty ()) - return true; - hb_ot_name_record_ids_t rec_ids (namerecord.platformID, - namerecord.encodingID, - namerecord.languageID, - namerecord.nameID); - - hb_bytes_t *p; - if (name_table_overrides->has (rec_ids, &p) && - (*p).length == 0) - return false; - return true; - }) -#endif - ; - -#ifdef HB_EXPERIMENTAL_API - hb_vector_t<hb_ot_name_record_ids_t> insert_name_records; - if (!name_table_overrides->is_empty ()) - { - if (unlikely (!insert_name_records.alloc (name_table_overrides->get_population ()))) - return_trace (false); - for (const auto& record_ids : name_table_overrides->keys ()) - { - if (name_table_overrides->get (record_ids).length == 0) - continue; - if (has_name_record_with_ids (record_ids)) - continue; - insert_name_records.push (record_ids); - } - } -#endif - - return (name_prime->serialize (c->serializer, it, - std::addressof (this + stringOffset) -#ifdef HB_EXPERIMENTAL_API - , insert_name_records - , name_table_overrides -#endif - )); - } - - bool sanitize_records (hb_sanitize_context_t *c) const - { - TRACE_SANITIZE (this); - const void *string_pool = (this+stringOffset).arrayZ; - return_trace (nameRecordZ.sanitize (c, count, string_pool)); - } - - bool sanitize (hb_sanitize_context_t *c) const - { - TRACE_SANITIZE (this); - return_trace (c->check_struct (this) && - likely (format == 0 || format == 1) && - c->check_array (nameRecordZ.arrayZ, count) && - c->check_range (this, stringOffset) && - sanitize_records (c)); - } - - struct accelerator_t - { - accelerator_t (hb_face_t *face) - { - this->table = hb_sanitize_context_t ().reference_table<name> (face); - assert (this->table.get_length () >= this->table->stringOffset); - this->pool = (const char *) (const void *) (this->table+this->table->stringOffset); - this->pool_len = this->table.get_length () - this->table->stringOffset; - const hb_array_t<const NameRecord> all_names (this->table->nameRecordZ.arrayZ, - this->table->count); - - this->names.alloc (all_names.length); - - for (unsigned int i = 0; i < all_names.length; i++) - { - hb_ot_name_entry_t *entry = this->names.push (); - - entry->name_id = all_names[i].nameID; - entry->language = all_names[i].language (face); - entry->entry_score = all_names[i].score (); - entry->entry_index = i; - } - - this->names.qsort (_hb_ot_name_entry_cmp); - /* Walk and pick best only for each name_id,language pair, - * while dropping unsupported encodings. */ - unsigned int j = 0; - for (unsigned int i = 0; i < this->names.length; i++) - { - if (this->names[i].entry_score == UNSUPPORTED || - this->names[i].language == HB_LANGUAGE_INVALID) - continue; - if (i && - this->names[i - 1].name_id == this->names[i].name_id && - this->names[i - 1].language == this->names[i].language) - continue; - this->names[j++] = this->names[i]; - } - this->names.resize (j); - } - ~accelerator_t () - { - this->table.destroy (); - } - - int get_index (hb_ot_name_id_t name_id, - hb_language_t language, - unsigned int *width=nullptr) const - { - const hb_ot_name_entry_t key = {name_id, {0}, language}; - const hb_ot_name_entry_t *entry = hb_bsearch (key, (const hb_ot_name_entry_t *) this->names, - this->names.length, - sizeof (hb_ot_name_entry_t), - _hb_ot_name_entry_cmp_key, - true); - - if (!entry) - { - entry = hb_bsearch (key, (const hb_ot_name_entry_t *) this->names, - this->names.length, - sizeof (hb_ot_name_entry_t), - _hb_ot_name_entry_cmp_key, - false); - } - - if (!entry) - return -1; - - if (width) - *width = entry->entry_score < 10 ? 2 : 1; - - return entry->entry_index; - } - - hb_bytes_t get_name (unsigned int idx) const - { - const hb_array_t<const NameRecord> all_names (table->nameRecordZ.arrayZ, table->count); - const NameRecord &record = all_names[idx]; - const hb_bytes_t string_pool (pool, pool_len); - return string_pool.sub_array (record.offset, record.length); - } - - private: - const char *pool; - unsigned int pool_len; - public: - hb_blob_ptr_t<name> table; - hb_vector_t<hb_ot_name_entry_t> names; - }; - - private: - // sometimes NameRecords are not sorted in the font file, so use linear search - // here - bool has_name_record_with_ids (const hb_ot_name_record_ids_t& record_ids) const - { - for (const auto& record : nameRecordZ.as_array (count)) - { - if (record.platformID == record_ids.platform_id && - record.encodingID == record_ids.encoding_id && - record.languageID == record_ids.language_id && - record.nameID == record_ids.name_id) - return true; - } - return false; - } - - public: - /* We only implement format 0 for now. */ - HBUINT16 format; /* Format selector (=0/1). */ - HBUINT16 count; /* Number of name records. */ - NNOffset16To<UnsizedArrayOf<HBUINT8>> - stringOffset; /* Offset to start of string storage (from start of table). */ - UnsizedArrayOf<NameRecord> - nameRecordZ; /* The name records where count is the number of records. */ - public: - DEFINE_SIZE_ARRAY (6, nameRecordZ); -}; - -#undef entry_index -#undef entry_score - -struct name_accelerator_t : name::accelerator_t { - name_accelerator_t (hb_face_t *face) : name::accelerator_t (face) {} -}; - -} /* namespace OT */ - +#include "OT/name/name.hh" #endif /* HB_OT_NAME_TABLE_HH */ diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-name.cc b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-name.cc index 6adf1e8fbea5a38651625fcebf622eb339bace41..0323364aefed9eec350eba94975aee4431068416 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-name.cc +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-name.cc @@ -181,4 +181,6 @@ hb_ot_name_get_utf32 (hb_face_t *face, return hb_ot_name_get_utf<hb_utf32_t> (face, name_id, language, text_size, text); } +#include "hb-ot-name-language-static.hh" + #endif diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-name.h b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-name.h index 1ea4b55e5c93e8a8ad21cb88b03ecdaf70a4428c..03e664bb93f5423d61d39e28526b3e1ae07fbebc 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-name.h +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-name.h @@ -33,9 +33,8 @@ HB_BEGIN_DECLS - /** - * hb_ot_name_id_t: + * hb_ot_name_id_predefined_t: * @HB_OT_NAME_ID_COPYRIGHT: Copyright notice * @HB_OT_NAME_ID_FONT_FAMILY: Font Family name * @HB_OT_NAME_ID_FONT_SUBFAMILY: Font Subfamily name @@ -65,16 +64,14 @@ HB_BEGIN_DECLS * @HB_OT_NAME_ID_VARIATIONS_PS_PREFIX: Variations PostScript Name Prefix * @HB_OT_NAME_ID_INVALID: Value to represent a nonexistent name ID. * - * An integral type representing an OpenType 'name' table name identifier. - * There are predefined name IDs, as well as name IDs return from other - * API. These can be used to fetch name strings from a font face. + * An enum type representing the pre-defined name IDs. * * For more information on these fields, see the * [OpenType spec](https://docs.microsoft.com/en-us/typography/opentype/spec/name#name-ids). * - * Since: 2.0.0 + * Since: 7.0.0 **/ -enum +typedef enum { HB_OT_NAME_ID_COPYRIGHT = 0, HB_OT_NAME_ID_FONT_FAMILY = 1, @@ -104,8 +101,17 @@ enum HB_OT_NAME_ID_VARIATIONS_PS_PREFIX = 25, HB_OT_NAME_ID_INVALID = 0xFFFF -}; +} hb_ot_name_id_predefined_t; +/** + * hb_ot_name_id_t: + * + * An integral type representing an OpenType 'name' table name identifier. + * There are predefined name IDs, as well as name IDs return from other + * API. These can be used to fetch name strings from a font face. + * + * Since: 2.0.0 + **/ typedef unsigned int hb_ot_name_id_t; diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-os2-table.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-os2-table.hh index 5b017d56a6abbb4aa34b3cc84fd1cf06aa236201..97d18b9d75dfa4d608a5ac1a462c1a2b5e97dbd2 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-os2-table.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-os2-table.hh @@ -30,6 +30,7 @@ #include "hb-open-type.hh" #include "hb-ot-os2-unicode-ranges.hh" +#include "hb-ot-var-mvar-table.hh" #include "hb-set.hh" @@ -62,6 +63,7 @@ struct OS2V2Tail bool has_data () const { return sxHeight || sCapHeight; } const OS2V2Tail * operator -> () const { return this; } + OS2V2Tail * operator -> () { return this; } bool sanitize (hb_sanitize_context_t *c) const { @@ -213,20 +215,51 @@ struct OS2 OS2 *os2_prime = c->serializer->embed (this); if (unlikely (!os2_prime)) return_trace (false); - if (c->plan->user_axes_location->has (HB_TAG ('w','g','h','t')) && +#ifndef HB_NO_VAR + if (c->plan->normalized_coords) + { + auto &MVAR = *c->plan->source->table.MVAR; + auto *table = os2_prime; + + HB_ADD_MVAR_VAR (HB_OT_METRICS_TAG_HORIZONTAL_ASCENDER, sTypoAscender); + HB_ADD_MVAR_VAR (HB_OT_METRICS_TAG_HORIZONTAL_DESCENDER, sTypoDescender); + HB_ADD_MVAR_VAR (HB_OT_METRICS_TAG_HORIZONTAL_LINE_GAP, sTypoLineGap); + HB_ADD_MVAR_VAR (HB_OT_METRICS_TAG_HORIZONTAL_CLIPPING_ASCENT, usWinAscent); + HB_ADD_MVAR_VAR (HB_OT_METRICS_TAG_HORIZONTAL_CLIPPING_DESCENT, usWinDescent); + HB_ADD_MVAR_VAR (HB_OT_METRICS_TAG_SUBSCRIPT_EM_X_SIZE, ySubscriptXSize); + HB_ADD_MVAR_VAR (HB_OT_METRICS_TAG_SUBSCRIPT_EM_Y_SIZE, ySubscriptYSize); + HB_ADD_MVAR_VAR (HB_OT_METRICS_TAG_SUBSCRIPT_EM_X_OFFSET, ySubscriptXOffset); + HB_ADD_MVAR_VAR (HB_OT_METRICS_TAG_SUBSCRIPT_EM_Y_OFFSET, ySubscriptYOffset); + HB_ADD_MVAR_VAR (HB_OT_METRICS_TAG_SUPERSCRIPT_EM_X_SIZE, ySuperscriptXSize); + HB_ADD_MVAR_VAR (HB_OT_METRICS_TAG_SUPERSCRIPT_EM_Y_SIZE, ySuperscriptYSize); + HB_ADD_MVAR_VAR (HB_OT_METRICS_TAG_SUPERSCRIPT_EM_X_OFFSET, ySuperscriptXOffset); + HB_ADD_MVAR_VAR (HB_OT_METRICS_TAG_SUPERSCRIPT_EM_Y_OFFSET, ySuperscriptYOffset); + HB_ADD_MVAR_VAR (HB_OT_METRICS_TAG_STRIKEOUT_SIZE, yStrikeoutSize); + HB_ADD_MVAR_VAR (HB_OT_METRICS_TAG_STRIKEOUT_OFFSET, yStrikeoutPosition); + + if (os2_prime->version >= 2) + { + auto *table = & const_cast<OS2V2Tail &> (os2_prime->v2 ()); + HB_ADD_MVAR_VAR (HB_OT_METRICS_TAG_X_HEIGHT, sxHeight); + HB_ADD_MVAR_VAR (HB_OT_METRICS_TAG_CAP_HEIGHT, sCapHeight); + } + } +#endif + + if (c->plan->user_axes_location.has (HB_TAG ('w','g','h','t')) && !c->plan->pinned_at_default) { - float weight_class = c->plan->user_axes_location->get (HB_TAG ('w','g','h','t')); + float weight_class = c->plan->user_axes_location.get (HB_TAG ('w','g','h','t')); if (!c->serializer->check_assign (os2_prime->usWeightClass, roundf (hb_clamp (weight_class, 1.0f, 1000.0f)), HB_SERIALIZE_ERROR_INT_OVERFLOW)) return_trace (false); } - if (c->plan->user_axes_location->has (HB_TAG ('w','d','t','h')) && + if (c->plan->user_axes_location.has (HB_TAG ('w','d','t','h')) && !c->plan->pinned_at_default) { - float width = c->plan->user_axes_location->get (HB_TAG ('w','d','t','h')); + float width = c->plan->user_axes_location.get (HB_TAG ('w','d','t','h')); if (!c->serializer->check_assign (os2_prime->usWidthClass, roundf (map_wdth_to_widthclass (width)), HB_SERIALIZE_ERROR_INT_OVERFLOW)) @@ -236,14 +269,10 @@ struct OS2 if (c->plan->flags & HB_SUBSET_FLAGS_NO_PRUNE_UNICODE_RANGES) return_trace (true); - /* when --gids option is not used, no need to do collect_mapping that is - * iterating all codepoints in each subtable, which is not efficient */ - uint16_t min_cp, max_cp; - find_min_and_max_codepoint (c->plan->unicodes, &min_cp, &max_cp); - os2_prime->usFirstCharIndex = min_cp; - os2_prime->usLastCharIndex = max_cp; + os2_prime->usFirstCharIndex = hb_min (0xFFFFu, c->plan->unicodes.get_min ()); + os2_prime->usLastCharIndex = hb_min (0xFFFFu, c->plan->unicodes.get_max ()); - _update_unicode_ranges (c->plan->unicodes, os2_prime->ulUnicodeRange); + _update_unicode_ranges (&c->plan->unicodes, os2_prime->ulUnicodeRange); return_trace (true); } @@ -251,12 +280,16 @@ struct OS2 void _update_unicode_ranges (const hb_set_t *codepoints, HBUINT32 ulUnicodeRange[4]) const { - HBUINT32 newBits[4]; + HBUINT32 newBits[4]; for (unsigned int i = 0; i < 4; i++) newBits[i] = 0; - hb_codepoint_t cp = HB_SET_VALUE_INVALID; - while (codepoints->next (&cp)) { + /* This block doesn't show up in profiles. If it ever did, + * we can rewrite it to iterate over OS/2 ranges and use + * set iteration to check if the range matches. */ + for (hb_codepoint_t cp = HB_SET_VALUE_INVALID; + codepoints->next (&cp);) + { unsigned int bit = _hb_ot_os2_get_unicode_range_bit (cp); if (bit < 128) { @@ -278,14 +311,6 @@ struct OS2 ulUnicodeRange[i] = ulUnicodeRange[i] & newBits[i]; // set bits only if set in the original } - static void find_min_and_max_codepoint (const hb_set_t *codepoints, - uint16_t *min_cp, /* OUT */ - uint16_t *max_cp /* OUT */) - { - *min_cp = hb_min (0xFFFFu, codepoints->get_min ()); - *max_cp = hb_min (0xFFFFu, codepoints->get_max ()); - } - /* https://github.com/Microsoft/Font-Validator/blob/520aaae/OTFontFileVal/val_OS2.cs#L644-L681 * https://docs.microsoft.com/en-us/typography/legacy/legacy_arabic_fonts */ enum font_page_t diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-os2-unicode-ranges.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-os2-unicode-ranges.hh index 9613d2d186df0292674fdf2e977fdc2c9562c996..01e6a46e63d199d97c0f09ec8c75fc9d77838a1b 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-os2-unicode-ranges.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-os2-unicode-ranges.hh @@ -34,10 +34,10 @@ namespace OT { struct OS2Range { int cmp (hb_codepoint_t key) const - { return (key < start) ? -1 : key <= end ? 0 : +1; } + { return (key < first) ? -1 : key <= last ? 0 : +1; } - hb_codepoint_t start; - hb_codepoint_t end; + hb_codepoint_t first; + hb_codepoint_t last; unsigned int bit; }; @@ -223,7 +223,7 @@ static unsigned int _hb_ot_os2_get_unicode_range_bit (hb_codepoint_t cp) { auto *range = hb_sorted_array (_hb_os2_unicode_ranges).bsearch (cp); - return range ? range->bit : -1; + return range ? range->bit : (unsigned) -1; } } /* namespace OT */ diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-post-table.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-post-table.hh index a04b80357b36fdb5d05ee4247ef2e43db75426c3..e0eb77094870f2e21db4dc287141875004291b53 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-post-table.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-post-table.hh @@ -28,6 +28,7 @@ #define HB_OT_POST_TABLE_HH #include "hb-open-type.hh" +#include "hb-ot-var-mvar-table.hh" #define HB_STRING_ARRAY_NAME format1_names #define HB_STRING_ARRAY_LIST "hb-ot-post-macroman.hh" @@ -98,14 +99,25 @@ struct post post *post_prime = c->serializer->start_embed<post> (); if (unlikely (!post_prime)) return_trace (false); +#ifndef HB_NO_VAR + if (c->plan->normalized_coords) + { + auto &MVAR = *c->plan->source->table.MVAR; + auto *table = post_prime; + + HB_ADD_MVAR_VAR (HB_OT_METRICS_TAG_UNDERLINE_SIZE, underlineThickness); + HB_ADD_MVAR_VAR (HB_OT_METRICS_TAG_UNDERLINE_OFFSET, underlinePosition); + } +#endif + bool glyph_names = c->plan->flags & HB_SUBSET_FLAGS_GLYPH_NAMES; if (!serialize (c->serializer, glyph_names)) return_trace (false); - if (c->plan->user_axes_location->has (HB_TAG ('s','l','n','t')) && + if (c->plan->user_axes_location.has (HB_TAG ('s','l','n','t')) && !c->plan->pinned_at_default) { - float italic_angle = c->plan->user_axes_location->get (HB_TAG ('s','l','n','t')); + float italic_angle = c->plan->user_axes_location.get (HB_TAG ('s','l','n','t')); italic_angle = hb_max (-90.f, hb_min (italic_angle, 90.f)); post_prime->italicAngle.set_float (italic_angle); } @@ -134,6 +146,7 @@ struct post pool = &StructAfter<uint8_t> (v2.glyphNameIndex); const uint8_t *end = (const uint8_t *) (const void *) table + table_length; + index_to_offset.alloc (hb_min (face->get_num_glyphs (), table_length / 8)); for (const uint8_t *data = pool; index_to_offset.length < 65535 && data < end && data + *data < end; data += 1 + *data) diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.cc b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.cc index bbdfc214a1ab973aadf40bbdeeb03eb8060d5565..3d207e06815323d5bb23864efeb8053c5cbb8335 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.cc +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.cc @@ -80,8 +80,7 @@ hb_ot_shape_planner_t::hb_ot_shape_planner_t (hb_face_t *fac const hb_segment_properties_t &props) : face (face), props (props), - map (face, props), - aat_map (face, props) + map (face, props) #ifndef HB_NO_AAT_SHAPE , apply_morx (_hb_apply_morx (face, props)) #endif @@ -105,10 +104,6 @@ hb_ot_shape_planner_t::compile (hb_ot_shape_plan_t &plan, plan.props = props; plan.shaper = shaper; map.compile (plan.map, key); -#ifndef HB_NO_AAT_SHAPE - if (apply_morx) - aat_map.compile (plan.aat_map); -#endif #ifndef HB_NO_OT_SHAPE_FRACTIONS plan.frac_mask = plan.map.get_1_mask (HB_TAG ('f','r','a','c')); @@ -222,9 +217,6 @@ hb_ot_shape_plan_t::init0 (hb_face_t *face, const hb_shape_plan_key_t *key) { map.init (); -#ifndef HB_NO_AAT_SHAPE - aat_map.init (); -#endif hb_ot_shape_planner_t planner (face, key->props); @@ -241,9 +233,6 @@ hb_ot_shape_plan_t::init0 (hb_face_t *face, if (unlikely (!data)) { map.fini (); -#ifndef HB_NO_AAT_SHAPE - aat_map.fini (); -#endif return false; } } @@ -258,21 +247,13 @@ hb_ot_shape_plan_t::fini () shaper->data_destroy (const_cast<void *> (data)); map.fini (); -#ifndef HB_NO_AAT_SHAPE - aat_map.fini (); -#endif } void hb_ot_shape_plan_t::substitute (hb_font_t *font, hb_buffer_t *buffer) const { -#ifndef HB_NO_AAT_SHAPE - if (unlikely (apply_morx)) - hb_aat_layout_substitute (this, font, buffer); - else -#endif - map.substitute (this, font, buffer); + map.substitute (this, font, buffer); } void @@ -406,18 +387,6 @@ hb_ot_shape_collect_features (hb_ot_shape_planner_t *planner, feature->value); } -#ifndef HB_NO_AAT_SHAPE - if (planner->apply_morx) - { - hb_aat_map_builder_t *aat_map = &planner->aat_map; - for (unsigned int i = 0; i < num_user_features; i++) - { - const hb_feature_t *feature = &user_features[i]; - aat_map->add_feature (feature->tag, feature->value); - } - } -#endif - if (planner->shaper->override_features) planner->shaper->override_features (planner); } @@ -940,7 +909,13 @@ hb_ot_substitute_plan (const hb_ot_shape_context_t *c) if (c->plan->fallback_glyph_classes) hb_synthesize_glyph_classes (c->buffer); - c->plan->substitute (c->font, buffer); +#ifndef HB_NO_AAT_SHAPE + if (unlikely (c->plan->apply_morx)) + hb_aat_layout_substitute (c->plan, c->font, c->buffer, + c->user_features, c->num_user_features); + else +#endif + c->plan->substitute (c->font, buffer); } static inline void diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.hh index ace28602f6b4e18183d80bcba11bd7e9ed2293bf..f84aa5c49ef42bf718e585eac11f1fa31863f2a5 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.hh @@ -65,7 +65,6 @@ struct hb_ot_shape_plan_t hb_segment_properties_t props; const struct hb_ot_shaper_t *shaper; hb_ot_map_t map; - hb_aat_map_t aat_map; const void *data; #ifndef HB_NO_OT_SHAPE_FRACTIONS hb_mask_t frac_mask, numr_mask, dnom_mask; @@ -152,7 +151,6 @@ struct hb_ot_shape_planner_t hb_face_t *face; hb_segment_properties_t props; hb_ot_map_builder_t map; - hb_aat_map_builder_t aat_map; #ifndef HB_NO_AAT_SHAPE bool apply_morx : 1; #else diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shaper-arabic-fallback.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shaper-arabic-fallback.hh index b9f92f72d67c30dc918b85b3917aa4b4c420d518..e7a69008b72f43336a3057e7970c356a85c3a7ed 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shaper-arabic-fallback.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shaper-arabic-fallback.hh @@ -154,16 +154,22 @@ arabic_fallback_synthesize_lookup_ligature (const hb_ot_shape_plan_t *plan HB_UN const auto &components = ligature_table[first_glyph_idx].ligatures[ligature_idx].components; unsigned component_count = ARRAY_LENGTH_CONST (components); - for (unsigned i = 0; i < component_count; i++) + bool matched = true; + for (unsigned j = 0; j < component_count; j++) { - hb_codepoint_t component_u = ligature_table[first_glyph_idx].ligatures[ligature_idx].components[i]; + hb_codepoint_t component_u = ligature_table[first_glyph_idx].ligatures[ligature_idx].components[j]; hb_codepoint_t component_glyph; if (!component_u || - !hb_font_get_glyph (font, component_u, 0, &component_glyph)) - continue; + !hb_font_get_nominal_glyph (font, component_u, &component_glyph)) + { + matched = false; + break; + } component_list[num_components++] = component_glyph; } + if (!matched) + continue; component_count_list[num_ligatures] = 1 + component_count; ligature_list[num_ligatures] = ligature_glyph; @@ -222,7 +228,7 @@ struct arabic_fallback_plan_t hb_mask_t mask_array[ARABIC_FALLBACK_MAX_LOOKUPS]; OT::SubstLookup *lookup_array[ARABIC_FALLBACK_MAX_LOOKUPS]; - OT::hb_ot_layout_lookup_accelerator_t accel_array[ARABIC_FALLBACK_MAX_LOOKUPS]; + OT::hb_ot_layout_lookup_accelerator_t *accel_array[ARABIC_FALLBACK_MAX_LOOKUPS]; }; #if defined(_WIN32) && !defined(HB_NO_WIN1256) @@ -272,7 +278,7 @@ arabic_fallback_plan_init_win1256 (arabic_fallback_plan_t *fallback_plan HB_UNUS fallback_plan->lookup_array[j] = const_cast<OT::SubstLookup*> (&(&manifest+manifest[i].lookupOffset)); if (fallback_plan->lookup_array[j]) { - fallback_plan->accel_array[j].init (*fallback_plan->lookup_array[j]); + fallback_plan->accel_array[j] = OT::hb_ot_layout_lookup_accelerator_t::create (*fallback_plan->lookup_array[j]); j++; } } @@ -302,7 +308,7 @@ arabic_fallback_plan_init_unicode (arabic_fallback_plan_t *fallback_plan, fallback_plan->lookup_array[j] = arabic_fallback_synthesize_lookup (plan, font, i); if (fallback_plan->lookup_array[j]) { - fallback_plan->accel_array[j].init (*fallback_plan->lookup_array[j]); + fallback_plan->accel_array[j] = OT::hb_ot_layout_lookup_accelerator_t::create (*fallback_plan->lookup_array[j]); j++; } } @@ -349,7 +355,7 @@ arabic_fallback_plan_destroy (arabic_fallback_plan_t *fallback_plan) for (unsigned int i = 0; i < fallback_plan->num_lookups; i++) if (fallback_plan->lookup_array[i]) { - fallback_plan->accel_array[i].fini (); + hb_free (fallback_plan->accel_array[i]); if (fallback_plan->free_lookups) hb_free (fallback_plan->lookup_array[i]); } @@ -366,9 +372,10 @@ arabic_fallback_plan_shape (arabic_fallback_plan_t *fallback_plan, for (unsigned int i = 0; i < fallback_plan->num_lookups; i++) if (fallback_plan->lookup_array[i]) { c.set_lookup_mask (fallback_plan->mask_array[i]); - hb_ot_layout_substitute_lookup (&c, - *fallback_plan->lookup_array[i], - fallback_plan->accel_array[i]); + if (fallback_plan->accel_array[i]) + hb_ot_layout_substitute_lookup (&c, + *fallback_plan->lookup_array[i], + *fallback_plan->accel_array[i]); } } diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shaper-arabic.cc b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shaper-arabic.cc index 2332ae3697fef4d17e640397c3fe6e1f7027086b..256f8f1d14eb73c5710f54d65c2b57a7330ea5a1 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shaper-arabic.cc +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shaper-arabic.cc @@ -556,9 +556,9 @@ apply_stch (const hb_ot_shape_plan_t *plan HB_UNUSED, } i++; // Don't touch i again. - DEBUG_MSG (ARABIC, nullptr, "%s stretch at (%d,%d,%d)", + DEBUG_MSG (ARABIC, nullptr, "%s stretch at (%u,%u,%u)", step == MEASURE ? "measuring" : "cutting", context, start, end); - DEBUG_MSG (ARABIC, nullptr, "rest of word: count=%d width %d", start - context, w_total); + DEBUG_MSG (ARABIC, nullptr, "rest of word: count=%u width %d", start - context, w_total); DEBUG_MSG (ARABIC, nullptr, "fixed tiles: count=%d width=%d", n_fixed, w_fixed); DEBUG_MSG (ARABIC, nullptr, "repeating tiles: count=%d width=%d", n_repeating, w_repeating); @@ -597,7 +597,7 @@ apply_stch (const hb_ot_shape_plan_t *plan HB_UNUSED, if (info[k - 1].arabic_shaping_action() == STCH_REPEATING) repeat += n_copies; - DEBUG_MSG (ARABIC, nullptr, "appending %d copies of glyph %d; j=%d", + DEBUG_MSG (ARABIC, nullptr, "appending %u copies of glyph %u; j=%u", repeat, info[k - 1].codepoint, j); for (unsigned int n = 0; n < repeat; n++) { @@ -675,15 +675,15 @@ reorder_marks_arabic (const hb_ot_shape_plan_t *plan HB_UNUSED, { hb_glyph_info_t *info = buffer->info; - DEBUG_MSG (ARABIC, buffer, "Reordering marks from %d to %d", start, end); + DEBUG_MSG (ARABIC, buffer, "Reordering marks from %u to %u", start, end); unsigned int i = start; for (unsigned int cc = 220; cc <= 230; cc += 10) { - DEBUG_MSG (ARABIC, buffer, "Looking for %d's starting at %d", cc, i); + DEBUG_MSG (ARABIC, buffer, "Looking for %u's starting at %u", cc, i); while (i < end && info_cc(info[i]) < cc) i++; - DEBUG_MSG (ARABIC, buffer, "Looking for %d's stopped at %d", cc, i); + DEBUG_MSG (ARABIC, buffer, "Looking for %u's stopped at %u", cc, i); if (i == end) break; @@ -698,10 +698,10 @@ reorder_marks_arabic (const hb_ot_shape_plan_t *plan HB_UNUSED, if (i == j) continue; - DEBUG_MSG (ARABIC, buffer, "Found %d's from %d to %d", cc, i, j); + DEBUG_MSG (ARABIC, buffer, "Found %u's from %u to %u", cc, i, j); /* Shift it! */ - DEBUG_MSG (ARABIC, buffer, "Shifting %d's: %d %d", cc, i, j); + DEBUG_MSG (ARABIC, buffer, "Shifting %u's: %u %u", cc, i, j); hb_glyph_info_t temp[HB_OT_SHAPE_MAX_COMBINING_MARKS]; assert (j - i <= ARRAY_LENGTH (temp)); buffer->merge_clusters (start, j); diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shaper-indic-machine.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shaper-indic-machine.hh index d6c67b81bdc87e384025f2b1284908654a026587..7dd47755af0e4f44904f2d383bba75156e2ed828 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shaper-indic-machine.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shaper-indic-machine.hh @@ -446,7 +446,7 @@ static const int indic_syllable_machine_en_main = 31; #define found_syllable(syllable_type) \ HB_STMT_START { \ - if (0) fprintf (stderr, "syllable %d..%d %s\n", ts, te, #syllable_type); \ + if (0) fprintf (stderr, "syllable %u..%u %s\n", ts, te, #syllable_type); \ for (unsigned int i = ts; i < te; i++) \ info[i].syllable() = (syllable_serial << 4) | syllable_type; \ syllable_serial++; \ diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shaper-indic-machine.rl b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shaper-indic-machine.rl index 46841884df7b79bd12793122c846a6122dd94b13..f568a8462647d2879965ccac624007b5bd0c4ee7 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shaper-indic-machine.rl +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shaper-indic-machine.rl @@ -119,7 +119,7 @@ main := |* #define found_syllable(syllable_type) \ HB_STMT_START { \ - if (0) fprintf (stderr, "syllable %d..%d %s\n", ts, te, #syllable_type); \ + if (0) fprintf (stderr, "syllable %u..%u %s\n", ts, te, #syllable_type); \ for (unsigned int i = ts; i < te; i++) \ info[i].syllable() = (syllable_serial << 4) | syllable_type; \ syllable_serial++; \ diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shaper-indic.cc b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shaper-indic.cc index 7652210d9dc76e40b57195934111d9d53fff8e3d..e3818cc37fbe8a7e1e2c6dff527b881e343cf7eb 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shaper-indic.cc +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shaper-indic.cc @@ -482,9 +482,7 @@ initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan, is_one_of (info[start+2], FLAG (I_Cat(ZWJ)))) { buffer->merge_clusters (start+1, start+3); - hb_glyph_info_t tmp = info[start+1]; - info[start+1] = info[start+2]; - info[start+2] = tmp; + hb_swap (info[start+1], info[start+2]); } /* 1. Find base consonant: diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shaper-khmer-machine.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shaper-khmer-machine.hh index fd91ee0cafde5727e8a2dfdcc63983af9c2359df..848ed231f7148003d28043058a9f138a982c2c18 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shaper-khmer-machine.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shaper-khmer-machine.hh @@ -280,7 +280,7 @@ static const int khmer_syllable_machine_en_main = 21; #define found_syllable(syllable_type) \ HB_STMT_START { \ - if (0) fprintf (stderr, "syllable %d..%d %s\n", ts, te, #syllable_type); \ + if (0) fprintf (stderr, "syllable %u..%u %s\n", ts, te, #syllable_type); \ for (unsigned int i = ts; i < te; i++) \ info[i].syllable() = (syllable_serial << 4) | syllable_type; \ syllable_serial++; \ diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shaper-khmer-machine.rl b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shaper-khmer-machine.rl index d5d429d67aaee39ca5e59404f92fbd160cab9e18..c226e7797ee3caf2a3501801f0124b5ae321dd1e 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shaper-khmer-machine.rl +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shaper-khmer-machine.rl @@ -103,7 +103,7 @@ main := |* #define found_syllable(syllable_type) \ HB_STMT_START { \ - if (0) fprintf (stderr, "syllable %d..%d %s\n", ts, te, #syllable_type); \ + if (0) fprintf (stderr, "syllable %u..%u %s\n", ts, te, #syllable_type); \ for (unsigned int i = ts; i < te; i++) \ info[i].syllable() = (syllable_serial << 4) | syllable_type; \ syllable_serial++; \ diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shaper-myanmar-machine.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shaper-myanmar-machine.hh index 87cded4ed8df180650247c4f9f9e9c0a164f6382..f7b456b11f67afc145086fb79dfa7ea684aa26a9 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shaper-myanmar-machine.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shaper-myanmar-machine.hh @@ -50,7 +50,7 @@ enum myanmar_syllable_type_t { }; -#line 51 "hb-ot-shaper-myanmar-machine.hh" +#line 54 "hb-ot-shaper-myanmar-machine.hh" #define myanmar_syllable_machine_ex_A 9u #define myanmar_syllable_machine_ex_As 32u #define myanmar_syllable_machine_ex_C 1u @@ -77,7 +77,7 @@ enum myanmar_syllable_type_t { #define myanmar_syllable_machine_ex_ZWNJ 5u -#line 76 "hb-ot-shaper-myanmar-machine.hh" +#line 81 "hb-ot-shaper-myanmar-machine.hh" static const unsigned char _myanmar_syllable_machine_trans_keys[] = { 1u, 41u, 3u, 41u, 5u, 39u, 5u, 8u, 3u, 41u, 3u, 39u, 3u, 39u, 5u, 39u, 5u, 39u, 3u, 39u, 3u, 39u, 3u, 41u, 5u, 39u, 1u, 15u, 3u, 39u, 3u, 39u, @@ -429,7 +429,7 @@ static const int myanmar_syllable_machine_en_main = 0; #define found_syllable(syllable_type) \ HB_STMT_START { \ - if (0) fprintf (stderr, "syllable %d..%d %s\n", ts, te, #syllable_type); \ + if (0) fprintf (stderr, "syllable %u..%u %s\n", ts, te, #syllable_type); \ for (unsigned int i = ts; i < te; i++) \ info[i].syllable() = (syllable_serial << 4) | syllable_type; \ syllable_serial++; \ @@ -443,7 +443,7 @@ find_syllables_myanmar (hb_buffer_t *buffer) int cs; hb_glyph_info_t *info = buffer->info; -#line 436 "hb-ot-shaper-myanmar-machine.hh" +#line 447 "hb-ot-shaper-myanmar-machine.hh" { cs = myanmar_syllable_machine_start; ts = 0; @@ -459,7 +459,7 @@ find_syllables_myanmar (hb_buffer_t *buffer) unsigned int syllable_serial = 1; -#line 448 "hb-ot-shaper-myanmar-machine.hh" +#line 463 "hb-ot-shaper-myanmar-machine.hh" { int _slen; int _trans; @@ -473,7 +473,7 @@ _resume: #line 1 "NONE" {ts = p;} break; -#line 460 "hb-ot-shaper-myanmar-machine.hh" +#line 477 "hb-ot-shaper-myanmar-machine.hh" } _keys = _myanmar_syllable_machine_trans_keys + (cs<<1); @@ -519,7 +519,7 @@ _eof_trans: #line 113 "hb-ot-shaper-myanmar-machine.rl" {te = p;p--;{ found_syllable (myanmar_non_myanmar_cluster); }} break; -#line 498 "hb-ot-shaper-myanmar-machine.hh" +#line 523 "hb-ot-shaper-myanmar-machine.hh" } _again: @@ -528,7 +528,7 @@ _again: #line 1 "NONE" {ts = 0;} break; -#line 505 "hb-ot-shaper-myanmar-machine.hh" +#line 532 "hb-ot-shaper-myanmar-machine.hh" } if ( ++p != pe ) diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shaper-myanmar-machine.rl b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shaper-myanmar-machine.rl index db6a44c604bd2c5851587d6c6a804cc0a33e14e6..e8d1e788c936b4d5c506b9e8aac9be89922a3c40 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shaper-myanmar-machine.rl +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shaper-myanmar-machine.rl @@ -118,7 +118,7 @@ main := |* #define found_syllable(syllable_type) \ HB_STMT_START { \ - if (0) fprintf (stderr, "syllable %d..%d %s\n", ts, te, #syllable_type); \ + if (0) fprintf (stderr, "syllable %u..%u %s\n", ts, te, #syllable_type); \ for (unsigned int i = ts; i < te; i++) \ info[i].syllable() = (syllable_serial << 4) | syllable_type; \ syllable_serial++; \ diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shaper-use-machine.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shaper-use-machine.hh index f2fbdb725b5a94e3316edd584896580d9e8f2bdc..7249c33356634aa528e7ef6c9c3621ae0850f472 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shaper-use-machine.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shaper-use-machine.hh @@ -835,7 +835,7 @@ static const int use_syllable_machine_en_main = 0; #define found_syllable(syllable_type) \ HB_STMT_START { \ - if (0) fprintf (stderr, "syllable %d..%d %s\n", (*ts).second.first, (*te).second.first, #syllable_type); \ + if (0) fprintf (stderr, "syllable %u..%u %s\n", (*ts).second.first, (*te).second.first, #syllable_type); \ for (unsigned i = (*ts).second.first; i < (*te).second.first; ++i) \ info[i].syllable() = (syllable_serial << 4) | syllable_type; \ syllable_serial++; \ diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shaper-use-machine.rl b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shaper-use-machine.rl index 8ace1f026fed5d64d75da493d81e085dd83376fb..256e46dc5809a36ee275766d797786e4e49f1512 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shaper-use-machine.rl +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shaper-use-machine.rl @@ -183,7 +183,7 @@ main := |* #define found_syllable(syllable_type) \ HB_STMT_START { \ - if (0) fprintf (stderr, "syllable %d..%d %s\n", (*ts).second.first, (*te).second.first, #syllable_type); \ + if (0) fprintf (stderr, "syllable %u..%u %s\n", (*ts).second.first, (*te).second.first, #syllable_type); \ for (unsigned i = (*ts).second.first; i < (*te).second.first; ++i) \ info[i].syllable() = (syllable_serial << 4) | syllable_type; \ syllable_serial++; \ diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-stat-table.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-stat-table.hh index 59bb2daccd34ab7890a48b1c761ddd2e44277c3a..2006f677d1a6297399be290e16f229ffef856e7d 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-stat-table.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-stat-table.hh @@ -112,7 +112,7 @@ struct AxisValueFormat1 const hb_array_t<const StatAxisRecord> axis_records) const { TRACE_SUBSET (this); - const hb_hashmap_t<hb_tag_t, float>* user_axes_location = c->plan->user_axes_location; + const hb_hashmap_t<hb_tag_t, float>* user_axes_location = &c->plan->user_axes_location; if (keep_axis_value (axis_records, user_axes_location)) return_trace (c->serializer->embed (this)); @@ -171,7 +171,7 @@ struct AxisValueFormat2 const hb_array_t<const StatAxisRecord> axis_records) const { TRACE_SUBSET (this); - const hb_hashmap_t<hb_tag_t, float>* user_axes_location = c->plan->user_axes_location; + const hb_hashmap_t<hb_tag_t, float>* user_axes_location = &c->plan->user_axes_location; if (keep_axis_value (axis_records, user_axes_location)) return_trace (c->serializer->embed (this)); @@ -234,7 +234,7 @@ struct AxisValueFormat3 const hb_array_t<const StatAxisRecord> axis_records) const { TRACE_SUBSET (this); - const hb_hashmap_t<hb_tag_t, float>* user_axes_location = c->plan->user_axes_location; + const hb_hashmap_t<hb_tag_t, float>* user_axes_location = &c->plan->user_axes_location; if (keep_axis_value (axis_records, user_axes_location)) return_trace (c->serializer->embed (this)); @@ -313,7 +313,7 @@ struct AxisValueFormat4 const hb_array_t<const StatAxisRecord> axis_records) const { TRACE_SUBSET (this); - const hb_hashmap_t<hb_tag_t, float> *user_axes_location = c->plan->user_axes_location; + const hb_hashmap_t<hb_tag_t, float> *user_axes_location = &c->plan->user_axes_location; if (!keep_axis_value (axis_records, user_axes_location)) return_trace (false); @@ -390,8 +390,8 @@ struct AxisValue template <typename context_t, typename ...Ts> typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const { + if (unlikely (!c->may_dispatch (this, &u.format))) return c->no_dispatch_return_value (); TRACE_DISPATCH (this, u.format); - if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ()); switch (u.format) { case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...)); case 2: return_trace (c->dispatch (u.format2, std::forward<Ts> (ds)...)); diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-tag.cc b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-tag.cc index f6ba3b0d4741aea8562abc945f842287ca6a99bb..547f9573d05fba649ffe5a483a7d2e93ad6103bb 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-tag.cc +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-tag.cc @@ -119,6 +119,17 @@ hb_ot_new_tag_to_script (hb_tag_t tag) } #ifndef HB_DISABLE_DEPRECATED +/** + * hb_ot_tags_from_script: + * @script: an #hb_script_t to convert. + * @script_tag_1: (out): output #hb_tag_t. + * @script_tag_2: (out): output #hb_tag_t. + * + * Converts an #hb_script_t to script tags. + * + * Since: 0.6.0 + * Deprecated: 2.0.0: use hb_ot_tags_from_script_and_language() instead + **/ void hb_ot_tags_from_script (hb_script_t script, hb_tag_t *script_tag_1, @@ -249,6 +260,15 @@ struct LangTag /*{"zh?", {HB_TAG('Z','H','P',' ')}},*/ /* Chinese Phonetic */ #ifndef HB_DISABLE_DEPRECATED +/** + * hb_ot_tag_from_language: + * @language: an #hb_language_t to convert. + * + * Converts an #hb_language_t to an #hb_tag_t. + * + * Since: 0.6.0 + * Deprecated: 2.0.0: use hb_ot_tags_from_script_and_language() instead + **/ hb_tag_t hb_ot_tag_from_language (hb_language_t language) { @@ -606,7 +626,7 @@ test_langs_sorted () int c = ot_languages2[i].cmp (&ot_languages2[i - 1]); if (c > 0) { - fprintf (stderr, "ot_languages2 not sorted at index %d: %08x %d %08x\n", + fprintf (stderr, "ot_languages2 not sorted at index %u: %08x %d %08x\n", i, ot_languages2[i-1].language, c, ot_languages2[i].language); abort(); } @@ -617,7 +637,7 @@ test_langs_sorted () int c = ot_languages3[i].cmp (&ot_languages3[i - 1]); if (c > 0) { - fprintf (stderr, "ot_languages3 not sorted at index %d: %08x %d %08x\n", + fprintf (stderr, "ot_languages3 not sorted at index %u: %08x %d %08x\n", i, ot_languages3[i-1].language, c, ot_languages3[i].language); abort(); } diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-avar-table.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-avar-table.hh index cc5c5c0068586a063c45cf939e0d24ce428bf076..3449b30499ddef254e44c50637d3ea7e39ec7455 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-avar-table.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-avar-table.hh @@ -86,8 +86,8 @@ struct SegmentMaps : Array16Of<AxisValueMap> { int map (int value, unsigned int from_offset = 0, unsigned int to_offset = 1) const { -#define fromCoord coords[from_offset] -#define toCoord coords[to_offset] +#define fromCoord coords[from_offset].to_int () +#define toCoord coords[to_offset].to_int () /* The following special-cases are not part of OpenType, which requires * that at least -1, 0, and +1 must be mapped. But we include these as * part of a better error recovery scheme. */ diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-fvar-table.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-fvar-table.hh index c1d57a002ae561c7c7f597bdaf3a13774a639e2a..a384dfa531d03289eb2d785f34d2760cbdf251fd 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-fvar-table.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-fvar-table.hh @@ -56,18 +56,18 @@ struct InstanceRecord if (unlikely (!c->serializer->embed (flags))) return_trace (false); const hb_array_t<const F16DOT16> coords = get_coordinates (axis_count); - const hb_hashmap_t<hb_tag_t, float> *axes_location = c->plan->user_axes_location; + const hb_hashmap_t<hb_tag_t, float> *axes_location = &c->plan->user_axes_location; for (unsigned i = 0 ; i < axis_count; i++) { uint32_t *axis_tag; // only keep instances whose coordinates == pinned axis location - if (!c->plan->axes_old_index_tag_map->has (i, &axis_tag)) continue; + if (!c->plan->axes_old_index_tag_map.has (i, &axis_tag)) continue; if (axes_location->has (*axis_tag) && fabsf (axes_location->get (*axis_tag) - coords[i].to_float ()) > 0.001f) return_trace (false); - if (!c->plan->axes_index_map->has (i)) + if (!c->plan->axes_index_map.has (i)) continue; if (!c->serializer->embed (coords[i])) @@ -175,15 +175,15 @@ struct AxisRecord void get_coordinates (float &min, float &default_, float &max) const { - default_ = defaultValue / 65536.f; + default_ = defaultValue.to_float (); /* Ensure order, to simplify client math. */ - min = hb_min (default_, minValue / 65536.f); - max = hb_max (default_, maxValue / 65536.f); + min = hb_min (default_, minValue.to_float ()); + max = hb_max (default_, maxValue.to_float ()); } float get_default () const { - return defaultValue / 65536.f; + return defaultValue.to_float (); } public: @@ -362,7 +362,7 @@ struct fvar bool subset (hb_subset_context_t *c) const { TRACE_SUBSET (this); - unsigned retained_axis_count = c->plan->axes_index_map->get_population (); + unsigned retained_axis_count = c->plan->axes_index_map.get_population (); if (!retained_axis_count) //all axes are pinned return_trace (false); @@ -383,7 +383,7 @@ struct fvar auto axes_records = get_axes (); for (unsigned i = 0 ; i < (unsigned)axisCount; i++) { - if (!c->plan->axes_index_map->has (i)) continue; + if (!c->plan->axes_index_map.has (i)) continue; if (unlikely (!c->serializer->embed (axes_records[i]))) return_trace (false); } diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-gvar-table.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-gvar-table.hh index e02063ca431662f9e8c0ec5b9cee30af27fb048f..1eae6a35324e1dddacc37c0d5e3eed660930a6a0 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-gvar-table.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-gvar-table.hh @@ -128,13 +128,13 @@ struct TupleVariationHeader for (unsigned int i = 0; i < coord_count; i++) { int v = coords[i]; - int peak = peak_tuple[i]; + int peak = peak_tuple[i].to_int (); if (!peak || v == peak) continue; if (has_intermediate ()) { - int start = start_tuple[i]; - int end = end_tuple[i]; + int start = start_tuple[i].to_int (); + int end = end_tuple[i].to_int (); if (unlikely (start > peak || peak > end || (start < 0 && end > 0 && peak))) continue; if (v < start || v > end) return 0.f; diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-mvar-table.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-mvar-table.hh index 420366fbb3cb8bc251e78fe31b3b8a2789a5e586..d27ebb39c0a032e578f734eae805cfb7d6bffa3d 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-mvar-table.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-var-mvar-table.hh @@ -116,4 +116,13 @@ protected: } /* namespace OT */ +#define HB_ADD_MVAR_VAR(tag, field) \ + c->serializer->check_assign (table->field, \ + roundf (table->field + \ + MVAR.get_var (tag, \ + c->plan->normalized_coords.arrayZ, \ + c->plan->normalized_coords.length)), \ + HB_SERIALIZE_ERROR_INT_OVERFLOW) + + #endif /* HB_OT_VAR_MVAR_TABLE_HH */ diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-outline.cc b/source/libs/harfbuzz/harfbuzz-src/src/hb-outline.cc new file mode 100644 index 0000000000000000000000000000000000000000..184e48cfb7a998136169fd81cbc13baadb9f3d57 --- /dev/null +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-outline.cc @@ -0,0 +1,322 @@ +/* + * Copyright © 2023 Behdad Esfahbod + * Copyright © 1999 David Turner + * Copyright © 2005 Werner Lemberg + * Copyright © 2013-2015 Alexei Podtelezhnikov + * + * + * This is part of HarfBuzz, a text shaping library. + * + * 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. + */ + +#include "hb.hh" + +#ifndef HB_NO_OUTLINE + +#include "hb-outline.hh" + +#include "hb-machinery.hh" + + +void hb_outline_t::replay (hb_draw_funcs_t *pen, void *pen_data) const +{ + hb_draw_state_t st = HB_DRAW_STATE_DEFAULT; + + unsigned first = 0; + for (unsigned contour : contours) + { + auto it = points.as_array ().sub_array (first, contour - first); + while (it) + { + hb_outline_point_t p1 = *it++; + switch (p1.type) + { + case hb_outline_point_t::type_t::MOVE_TO: + { + pen->move_to (pen_data, st, + p1.x, p1.y); + } + break; + case hb_outline_point_t::type_t::LINE_TO: + { + pen->line_to (pen_data, st, + p1.x, p1.y); + } + break; + case hb_outline_point_t::type_t::QUADRATIC_TO: + { + hb_outline_point_t p2 = *it++; + pen->quadratic_to (pen_data, st, + p1.x, p1.y, + p2.x, p2.y); + } + break; + case hb_outline_point_t::type_t::CUBIC_TO: + { + hb_outline_point_t p2 = *it++; + hb_outline_point_t p3 = *it++; + pen->cubic_to (pen_data, st, + p1.x, p1.y, + p2.x, p2.y, + p3.x, p3.y); + } + break; + } + } + pen->close_path (pen_data, st); + first = contour; + } +} + +float hb_outline_t::area () const +{ + float a = 0; + unsigned first = 0; + for (unsigned contour : contours) + { + for (unsigned i = first; i < contour; i++) + { + unsigned j = i + 1 < contour ? i + 1 : first; + + auto &pi = points[i]; + auto &pj = points[j]; + a += pi.x * pj.y - pi.y * pj.x; + } + + first = contour; + } + return a * .5f; +} + +void hb_outline_t::embolden (float x_strength, float y_strength, + float x_shift, float y_shift) +{ + /* This function is a straight port of FreeType's FT_Outline_EmboldenXY. + * Permission has been obtained from the FreeType authors of the code + * to relicense it under the HarfBuzz license. */ + + if (!x_strength && !y_strength) return; + if (!points) return; + + x_strength /= 2.f; + y_strength /= 2.f; + + bool orientation_negative = area () < 0; + + signed first = 0; + for (unsigned c = 0; c < contours.length; c++) + { + hb_outline_vector_t in, out, anchor, shift; + float l_in, l_out, l_anchor = 0, l, q, d; + + l_in = 0; + signed last = (int) contours[c] - 1; + + /* pacify compiler */ + in.x = in.y = anchor.x = anchor.y = 0; + + /* Counter j cycles though the points; counter i advances only */ + /* when points are moved; anchor k marks the first moved point. */ + for ( signed i = last, j = first, k = -1; + j != i && i != k; + j = j < last ? j + 1 : first ) + { + if ( j != k ) + { + out.x = points[j].x - points[i].x; + out.y = points[j].y - points[i].y; + l_out = out.normalize_len (); + + if ( l_out == 0 ) + continue; + } + else + { + out = anchor; + l_out = l_anchor; + } + + if ( l_in != 0 ) + { + if ( k < 0 ) + { + k = i; + anchor = in; + l_anchor = l_in; + } + + d = in.x * out.x + in.y * out.y; + + /* shift only if turn is less than ~160 degrees */ + if ( d > -15.f/16.f ) + { + d = d + 1.f; + + /* shift components along lateral bisector in proper orientation */ + shift.x = in.y + out.y; + shift.y = in.x + out.x; + + if ( orientation_negative ) + shift.x = -shift.x; + else + shift.y = -shift.y; + + /* restrict shift magnitude to better handle collapsing segments */ + q = out.x * in.y - out.y * in.x; + if ( orientation_negative ) + q = -q; + + l = hb_min (l_in, l_out); + + /* non-strict inequalities avoid divide-by-zero when q == l == 0 */ + if (x_strength * q <= l * d) + shift.x = shift.x * x_strength / d; + else + shift.x = shift.x * l / q; + + + if (y_strength * q <= l * d) + shift.y = shift.y * y_strength / d; + else + shift.y = shift.y * l / q; + } + else + shift.x = shift.y = 0; + + for ( ; + i != j; + i = i < last ? i + 1 : first ) + { + points[i].x += x_shift + shift.x; + points[i].y += y_shift + shift.y; + } + } + else + i = j; + + in = out; + l_in = l_out; + } + + first = last + 1; + } +} + +static void +hb_outline_recording_pen_move_to (hb_draw_funcs_t *dfuncs HB_UNUSED, + void *data, + hb_draw_state_t *st, + float to_x, float to_y, + void *user_data HB_UNUSED) +{ + hb_outline_t *c = (hb_outline_t *) data; + + c->points.push (hb_outline_point_t {to_x, to_y, hb_outline_point_t::type_t::MOVE_TO}); +} + +static void +hb_outline_recording_pen_line_to (hb_draw_funcs_t *dfuncs HB_UNUSED, + void *data, + hb_draw_state_t *st, + float to_x, float to_y, + void *user_data HB_UNUSED) +{ + hb_outline_t *c = (hb_outline_t *) data; + + c->points.push (hb_outline_point_t {to_x, to_y, hb_outline_point_t::type_t::LINE_TO}); +} + +static void +hb_outline_recording_pen_quadratic_to (hb_draw_funcs_t *dfuncs HB_UNUSED, + void *data, + hb_draw_state_t *st, + float control_x, float control_y, + float to_x, float to_y, + void *user_data HB_UNUSED) +{ + hb_outline_t *c = (hb_outline_t *) data; + + c->points.push (hb_outline_point_t {control_x, control_y, hb_outline_point_t::type_t::QUADRATIC_TO}); + c->points.push (hb_outline_point_t {to_x, to_y, hb_outline_point_t::type_t::QUADRATIC_TO}); +} + +static void +hb_outline_recording_pen_cubic_to (hb_draw_funcs_t *dfuncs HB_UNUSED, + void *data, + hb_draw_state_t *st, + float control1_x, float control1_y, + float control2_x, float control2_y, + float to_x, float to_y, + void *user_data HB_UNUSED) +{ + hb_outline_t *c = (hb_outline_t *) data; + + c->points.push (hb_outline_point_t {control1_x, control1_y, hb_outline_point_t::type_t::CUBIC_TO}); + c->points.push (hb_outline_point_t {control2_x, control2_y, hb_outline_point_t::type_t::CUBIC_TO}); + c->points.push (hb_outline_point_t {to_x, to_y, hb_outline_point_t::type_t::CUBIC_TO}); +} + +static void +hb_outline_recording_pen_close_path (hb_draw_funcs_t *dfuncs HB_UNUSED, + void *data, + hb_draw_state_t *st, + void *user_data HB_UNUSED) +{ + hb_outline_t *c = (hb_outline_t *) data; + + c->contours.push (c->points.length); +} + +static inline void free_static_outline_recording_pen_funcs (); + +static struct hb_outline_recording_pen_funcs_lazy_loader_t : hb_draw_funcs_lazy_loader_t<hb_outline_recording_pen_funcs_lazy_loader_t> +{ + static hb_draw_funcs_t *create () + { + hb_draw_funcs_t *funcs = hb_draw_funcs_create (); + + hb_draw_funcs_set_move_to_func (funcs, hb_outline_recording_pen_move_to, nullptr, nullptr); + hb_draw_funcs_set_line_to_func (funcs, hb_outline_recording_pen_line_to, nullptr, nullptr); + hb_draw_funcs_set_quadratic_to_func (funcs, hb_outline_recording_pen_quadratic_to, nullptr, nullptr); + hb_draw_funcs_set_cubic_to_func (funcs, hb_outline_recording_pen_cubic_to, nullptr, nullptr); + hb_draw_funcs_set_close_path_func (funcs, hb_outline_recording_pen_close_path, nullptr, nullptr); + + hb_draw_funcs_make_immutable (funcs); + + hb_atexit (free_static_outline_recording_pen_funcs); + + return funcs; + } +} static_outline_recording_pen_funcs; + +static inline +void free_static_outline_recording_pen_funcs () +{ + static_outline_recording_pen_funcs.free_instance (); +} + +hb_draw_funcs_t * +hb_outline_recording_pen_get_funcs () +{ + return static_outline_recording_pen_funcs.get_unconst (); +} + + +#endif diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-outline.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-outline.hh new file mode 100644 index 0000000000000000000000000000000000000000..c463993cfbb78c9a10db7a4435f58aa7664daeb7 --- /dev/null +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-outline.hh @@ -0,0 +1,83 @@ +/* + * Copyright © 2023 Behdad Esfahbod + * + * This is part of HarfBuzz, a text shaping library. + * + * 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. + */ + +#ifndef HB_OUTLINE_HH +#define HB_OUTLINE_HH + +#include "hb.hh" + +#include "hb-draw.hh" + + +struct hb_outline_point_t +{ + enum class type_t + { + MOVE_TO, + LINE_TO, + QUADRATIC_TO, + CUBIC_TO, + }; + + hb_outline_point_t (float x, float y, type_t type) : + x (x), y (y), type (type) {} + + float x, y; + type_t type; +}; + +struct hb_outline_vector_t +{ + float normalize_len () + { + float len = hypotf (x, y); + if (len) + { + x /= len; + y /= len; + } + return len; + } + + float x, y; +}; + +struct hb_outline_t +{ + void reset () { points.shrink (0, false); contours.resize (0); } + + HB_INTERNAL void replay (hb_draw_funcs_t *pen, void *pen_data) const; + HB_INTERNAL float area () const; + HB_INTERNAL void embolden (float x_strength, float y_strength, + float x_shift, float y_shift); + + hb_vector_t<hb_outline_point_t> points; + hb_vector_t<unsigned> contours; +}; + +HB_INTERNAL hb_draw_funcs_t * +hb_outline_recording_pen_get_funcs (); + + +#endif /* HB_OUTLINE_HH */ diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-paint-extents.cc b/source/libs/harfbuzz/harfbuzz-src/src/hb-paint-extents.cc new file mode 100644 index 0000000000000000000000000000000000000000..2393322b715aa82036323039585cb4afea016f8e --- /dev/null +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-paint-extents.cc @@ -0,0 +1,330 @@ +/* + * Copyright © 2022 Behdad Esfahbod + * + * This is part of HarfBuzz, a text shaping library. + * + * 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. + */ + +#include "hb.hh" + +#ifndef HB_NO_PAINT + +#include "hb-paint-extents.hh" + +#include "hb-draw.h" + +#include "hb-machinery.hh" + + +/* + * This file implements bounds-extraction as well as boundedness + * computation of COLRv1 fonts as described in: + * + * https://learn.microsoft.com/en-us/typography/opentype/spec/colr#glyph-metrics-and-boundedness + */ + +static void +hb_paint_extents_push_transform (hb_paint_funcs_t *funcs HB_UNUSED, + void *paint_data, + float xx, float yx, + float xy, float yy, + float dx, float dy, + void *user_data HB_UNUSED) +{ + hb_paint_extents_context_t *c = (hb_paint_extents_context_t *) paint_data; + + c->push_transform (hb_transform_t {xx, yx, xy, yy, dx, dy}); +} + +static void +hb_paint_extents_pop_transform (hb_paint_funcs_t *funcs HB_UNUSED, + void *paint_data, + void *user_data HB_UNUSED) +{ + hb_paint_extents_context_t *c = (hb_paint_extents_context_t *) paint_data; + + c->pop_transform (); +} + +static void +hb_draw_extents_move_to (hb_draw_funcs_t *dfuncs HB_UNUSED, + void *data, + hb_draw_state_t *st, + float to_x, float to_y, + void *user_data HB_UNUSED) +{ + hb_extents_t *extents = (hb_extents_t *) data; + + extents->add_point (to_x, to_y); +} + +static void +hb_draw_extents_line_to (hb_draw_funcs_t *dfuncs HB_UNUSED, + void *data, + hb_draw_state_t *st, + float to_x, float to_y, + void *user_data HB_UNUSED) +{ + hb_extents_t *extents = (hb_extents_t *) data; + + extents->add_point (to_x, to_y); +} + +static void +hb_draw_extents_quadratic_to (hb_draw_funcs_t *dfuncs HB_UNUSED, + void *data, + hb_draw_state_t *st, + float control_x, float control_y, + float to_x, float to_y, + void *user_data HB_UNUSED) +{ + hb_extents_t *extents = (hb_extents_t *) data; + + extents->add_point (control_x, control_y); + extents->add_point (to_x, to_y); +} + +static void +hb_draw_extents_cubic_to (hb_draw_funcs_t *dfuncs HB_UNUSED, + void *data, + hb_draw_state_t *st, + float control1_x, float control1_y, + float control2_x, float control2_y, + float to_x, float to_y, + void *user_data HB_UNUSED) +{ + hb_extents_t *extents = (hb_extents_t *) data; + + extents->add_point (control1_x, control1_y); + extents->add_point (control2_x, control2_y); + extents->add_point (to_x, to_y); +} + +static inline void free_static_draw_extents_funcs (); + +static struct hb_draw_extents_funcs_lazy_loader_t : hb_draw_funcs_lazy_loader_t<hb_draw_extents_funcs_lazy_loader_t> +{ + static hb_draw_funcs_t *create () + { + hb_draw_funcs_t *funcs = hb_draw_funcs_create (); + + hb_draw_funcs_set_move_to_func (funcs, hb_draw_extents_move_to, nullptr, nullptr); + hb_draw_funcs_set_line_to_func (funcs, hb_draw_extents_line_to, nullptr, nullptr); + hb_draw_funcs_set_quadratic_to_func (funcs, hb_draw_extents_quadratic_to, nullptr, nullptr); + hb_draw_funcs_set_cubic_to_func (funcs, hb_draw_extents_cubic_to, nullptr, nullptr); + + hb_draw_funcs_make_immutable (funcs); + + hb_atexit (free_static_draw_extents_funcs); + + return funcs; + } +} static_draw_extents_funcs; + +static inline +void free_static_draw_extents_funcs () +{ + static_draw_extents_funcs.free_instance (); +} + +static hb_draw_funcs_t * +hb_draw_extents_get_funcs () +{ + return static_draw_extents_funcs.get_unconst (); +} + +static void +hb_paint_extents_push_clip_glyph (hb_paint_funcs_t *funcs HB_UNUSED, + void *paint_data, + hb_codepoint_t glyph, + hb_font_t *font, + void *user_data HB_UNUSED) +{ + hb_paint_extents_context_t *c = (hb_paint_extents_context_t *) paint_data; + + hb_extents_t extents; + hb_draw_funcs_t *draw_extent_funcs = hb_draw_extents_get_funcs (); + hb_font_draw_glyph (font, glyph, draw_extent_funcs, &extents); + c->push_clip (extents); +} + +static void +hb_paint_extents_push_clip_rectangle (hb_paint_funcs_t *funcs HB_UNUSED, + void *paint_data, + float xmin, float ymin, float xmax, float ymax, + void *user_data) +{ + hb_paint_extents_context_t *c = (hb_paint_extents_context_t *) paint_data; + + hb_extents_t extents = {xmin, ymin, xmax, ymax}; + c->push_clip (extents); +} + +static void +hb_paint_extents_pop_clip (hb_paint_funcs_t *funcs HB_UNUSED, + void *paint_data, + void *user_data HB_UNUSED) +{ + hb_paint_extents_context_t *c = (hb_paint_extents_context_t *) paint_data; + + c->pop_clip (); +} + +static void +hb_paint_extents_push_group (hb_paint_funcs_t *funcs HB_UNUSED, + void *paint_data, + void *user_data HB_UNUSED) +{ + hb_paint_extents_context_t *c = (hb_paint_extents_context_t *) paint_data; + + c->push_group (); +} + +static void +hb_paint_extents_pop_group (hb_paint_funcs_t *funcs HB_UNUSED, + void *paint_data, + hb_paint_composite_mode_t mode, + void *user_data HB_UNUSED) +{ + hb_paint_extents_context_t *c = (hb_paint_extents_context_t *) paint_data; + + c->pop_group (mode); +} + +static hb_bool_t +hb_paint_extents_paint_image (hb_paint_funcs_t *funcs HB_UNUSED, + void *paint_data, + hb_blob_t *blob HB_UNUSED, + unsigned int width HB_UNUSED, + unsigned int height HB_UNUSED, + hb_tag_t format HB_UNUSED, + float slant HB_UNUSED, + hb_glyph_extents_t *glyph_extents, + void *user_data HB_UNUSED) +{ + hb_paint_extents_context_t *c = (hb_paint_extents_context_t *) paint_data; + + hb_extents_t extents = {(float) glyph_extents->x_bearing, + (float) glyph_extents->y_bearing + glyph_extents->height, + (float) glyph_extents->x_bearing + glyph_extents->width, + (float) glyph_extents->y_bearing}; + c->push_clip (extents); + c->paint (); + c->pop_clip (); + + return true; +} + +static void +hb_paint_extents_paint_color (hb_paint_funcs_t *funcs HB_UNUSED, + void *paint_data, + hb_bool_t use_foreground HB_UNUSED, + hb_color_t color HB_UNUSED, + void *user_data HB_UNUSED) +{ + hb_paint_extents_context_t *c = (hb_paint_extents_context_t *) paint_data; + + c->paint (); +} + +static void +hb_paint_extents_paint_linear_gradient (hb_paint_funcs_t *funcs HB_UNUSED, + void *paint_data, + hb_color_line_t *color_line HB_UNUSED, + float x0 HB_UNUSED, float y0 HB_UNUSED, + float x1 HB_UNUSED, float y1 HB_UNUSED, + float x2 HB_UNUSED, float y2 HB_UNUSED, + void *user_data HB_UNUSED) +{ + hb_paint_extents_context_t *c = (hb_paint_extents_context_t *) paint_data; + + c->paint (); +} + +static void +hb_paint_extents_paint_radial_gradient (hb_paint_funcs_t *funcs HB_UNUSED, + void *paint_data, + hb_color_line_t *color_line HB_UNUSED, + float x0 HB_UNUSED, float y0 HB_UNUSED, float r0 HB_UNUSED, + float x1 HB_UNUSED, float y1 HB_UNUSED, float r1 HB_UNUSED, + void *user_data HB_UNUSED) +{ + hb_paint_extents_context_t *c = (hb_paint_extents_context_t *) paint_data; + + c->paint (); +} + +static void +hb_paint_extents_paint_sweep_gradient (hb_paint_funcs_t *funcs HB_UNUSED, + void *paint_data, + hb_color_line_t *color_line HB_UNUSED, + float cx HB_UNUSED, float cy HB_UNUSED, + float start_angle HB_UNUSED, + float end_angle HB_UNUSED, + void *user_data HB_UNUSED) +{ + hb_paint_extents_context_t *c = (hb_paint_extents_context_t *) paint_data; + + c->paint (); +} + +static inline void free_static_paint_extents_funcs (); + +static struct hb_paint_extents_funcs_lazy_loader_t : hb_paint_funcs_lazy_loader_t<hb_paint_extents_funcs_lazy_loader_t> +{ + static hb_paint_funcs_t *create () + { + hb_paint_funcs_t *funcs = hb_paint_funcs_create (); + + hb_paint_funcs_set_push_transform_func (funcs, hb_paint_extents_push_transform, nullptr, nullptr); + hb_paint_funcs_set_pop_transform_func (funcs, hb_paint_extents_pop_transform, nullptr, nullptr); + hb_paint_funcs_set_push_clip_glyph_func (funcs, hb_paint_extents_push_clip_glyph, nullptr, nullptr); + hb_paint_funcs_set_push_clip_rectangle_func (funcs, hb_paint_extents_push_clip_rectangle, nullptr, nullptr); + hb_paint_funcs_set_pop_clip_func (funcs, hb_paint_extents_pop_clip, nullptr, nullptr); + hb_paint_funcs_set_push_group_func (funcs, hb_paint_extents_push_group, nullptr, nullptr); + hb_paint_funcs_set_pop_group_func (funcs, hb_paint_extents_pop_group, nullptr, nullptr); + hb_paint_funcs_set_color_func (funcs, hb_paint_extents_paint_color, nullptr, nullptr); + hb_paint_funcs_set_image_func (funcs, hb_paint_extents_paint_image, nullptr, nullptr); + hb_paint_funcs_set_linear_gradient_func (funcs, hb_paint_extents_paint_linear_gradient, nullptr, nullptr); + hb_paint_funcs_set_radial_gradient_func (funcs, hb_paint_extents_paint_radial_gradient, nullptr, nullptr); + hb_paint_funcs_set_sweep_gradient_func (funcs, hb_paint_extents_paint_sweep_gradient, nullptr, nullptr); + + hb_paint_funcs_make_immutable (funcs); + + hb_atexit (free_static_paint_extents_funcs); + + return funcs; + } +} static_paint_extents_funcs; + +static inline +void free_static_paint_extents_funcs () +{ + static_paint_extents_funcs.free_instance (); +} + +hb_paint_funcs_t * +hb_paint_extents_get_funcs () +{ + return static_paint_extents_funcs.get_unconst (); +} + + +#endif diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-paint-extents.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-paint-extents.hh new file mode 100644 index 0000000000000000000000000000000000000000..f172bd42f932cd7d01b2a0409de2ebbdf72fa557 --- /dev/null +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-paint-extents.hh @@ -0,0 +1,293 @@ +/* + * Copyright © 2022 Behdad Esfahbod + * + * This is part of HarfBuzz, a text shaping library. + * + * 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. + */ + +#ifndef HB_PAINT_EXTENTS_HH +#define HB_PAINT_EXTENTS_HH + +#include "hb.hh" +#include "hb-paint.h" + + +typedef struct hb_extents_t +{ + hb_extents_t () {} + hb_extents_t (float xmin, float ymin, float xmax, float ymax) : + xmin (xmin), ymin (ymin), xmax (xmax), ymax (ymax) {} + + bool is_empty () const { return xmin >= xmax || ymin >= ymax; } + bool is_void () const { return xmin > xmax; } + + void union_ (const hb_extents_t &o) + { + xmin = hb_min (xmin, o.xmin); + ymin = hb_min (ymin, o.ymin); + xmax = hb_max (xmax, o.xmax); + ymax = hb_max (ymax, o.ymax); + } + + void intersect (const hb_extents_t &o) + { + xmin = hb_max (xmin, o.xmin); + ymin = hb_max (ymin, o.ymin); + xmax = hb_min (xmax, o.xmax); + ymax = hb_min (ymax, o.ymax); + } + + void + add_point (float x, float y) + { + if (unlikely (is_void ())) + { + xmin = xmax = x; + ymin = ymax = y; + } + else + { + xmin = hb_min (xmin, x); + ymin = hb_min (ymin, y); + xmax = hb_max (xmax, x); + ymax = hb_max (ymax, y); + } + } + + float xmin = 0.f; + float ymin = 0.f; + float xmax = -1.f; + float ymax = -1.f; +} hb_extents_t; + +typedef struct hb_transform_t +{ + hb_transform_t () {} + hb_transform_t (float xx, float yx, + float xy, float yy, + float x0, float y0) : + xx (xx), yx (yx), xy (xy), yy (yy), x0 (x0), y0 (y0) {} + + void multiply (const hb_transform_t &o) + { + /* Copied from cairo, with "o" being "a" there and "this" being "b" there. */ + hb_transform_t r; + + r.xx = o.xx * xx + o.yx * xy; + r.yx = o.xx * yx + o.yx * yy; + + r.xy = o.xy * xx + o.yy * xy; + r.yy = o.xy * yx + o.yy * yy; + + r.x0 = o.x0 * xx + o.y0 * xy + x0; + r.y0 = o.x0 * yx + o.y0 * yy + y0; + + *this = r; + } + + void transform_distance (float &dx, float &dy) const + { + float new_x = xx * dx + xy * dy; + float new_y = yx * dx + yy * dy; + dx = new_x; + dy = new_y; + } + + void transform_point (float &x, float &y) const + { + transform_distance (x, y); + x += x0; + y += y0; + } + + void transform_extents (hb_extents_t &extents) const + { + float quad_x[4], quad_y[4]; + + quad_x[0] = extents.xmin; + quad_y[0] = extents.ymin; + quad_x[1] = extents.xmin; + quad_y[1] = extents.ymax; + quad_x[2] = extents.xmax; + quad_y[2] = extents.ymin; + quad_x[3] = extents.xmax; + quad_y[3] = extents.ymax; + + extents = hb_extents_t {}; + for (unsigned i = 0; i < 4; i++) + { + transform_point (quad_x[i], quad_y[i]); + extents.add_point (quad_x[i], quad_y[i]); + } + } + + float xx = 1.f; + float yx = 0.f; + float xy = 0.f; + float yy = 1.f; + float x0 = 0.f; + float y0 = 0.f; +} hb_transform_t; + +typedef struct hb_bounds_t +{ + enum status_t { + UNBOUNDED, + BOUNDED, + EMPTY, + }; + + hb_bounds_t (status_t status) : status (status) {} + hb_bounds_t (const hb_extents_t &extents) : + status (extents.is_empty () ? EMPTY : BOUNDED), extents (extents) {} + + void union_ (const hb_bounds_t &o) + { + if (o.status == UNBOUNDED) + status = UNBOUNDED; + else if (o.status == BOUNDED) + { + if (status == EMPTY) + *this = o; + else if (status == BOUNDED) + extents.union_ (o.extents); + } + } + + void intersect (const hb_bounds_t &o) + { + if (o.status == EMPTY) + status = EMPTY; + else if (o.status == BOUNDED) + { + if (status == UNBOUNDED) + *this = o; + else if (status == BOUNDED) + { + extents.intersect (o.extents); + if (extents.is_empty ()) + status = EMPTY; + } + } + } + + status_t status; + hb_extents_t extents; +} hb_bounds_t; + +typedef struct hb_paint_extents_context_t hb_paint_extents_context_t; + +struct hb_paint_extents_context_t +{ + hb_paint_extents_context_t () + { + transforms.push (hb_transform_t{}); + clips.push (hb_bounds_t{hb_bounds_t::UNBOUNDED}); + groups.push (hb_bounds_t{hb_bounds_t::EMPTY}); + } + + hb_extents_t get_extents () + { + return groups.tail().extents; + } + + bool is_bounded () + { + return groups.tail().status != hb_bounds_t::UNBOUNDED; + } + + void push_transform (const hb_transform_t &trans) + { + hb_transform_t t = transforms.tail (); + t.multiply (trans); + transforms.push (t); + } + + void pop_transform () + { + transforms.pop (); + } + + void push_clip (hb_extents_t extents) + { + /* Transform extents and push a new clip. */ + const hb_transform_t &t = transforms.tail (); + t.transform_extents (extents); + + clips.push (hb_bounds_t {extents}); + } + + void pop_clip () + { + clips.pop (); + } + + void push_group () + { + groups.push (hb_bounds_t {hb_bounds_t::EMPTY}); + } + + void pop_group (hb_paint_composite_mode_t mode) + { + const hb_bounds_t src_bounds = groups.pop (); + hb_bounds_t &backdrop_bounds = groups.tail (); + + // https://learn.microsoft.com/en-us/typography/opentype/spec/colr#format-32-paintcomposite + switch ((int) mode) + { + case HB_PAINT_COMPOSITE_MODE_CLEAR: + backdrop_bounds.status = hb_bounds_t::EMPTY; + break; + case HB_PAINT_COMPOSITE_MODE_SRC: + case HB_PAINT_COMPOSITE_MODE_SRC_OUT: + backdrop_bounds = src_bounds; + break; + case HB_PAINT_COMPOSITE_MODE_DEST: + case HB_PAINT_COMPOSITE_MODE_DEST_OUT: + break; + case HB_PAINT_COMPOSITE_MODE_SRC_IN: + case HB_PAINT_COMPOSITE_MODE_DEST_IN: + backdrop_bounds.intersect (src_bounds); + break; + default: + backdrop_bounds.union_ (src_bounds); + break; + } + } + + void paint () + { + const hb_bounds_t &clip = clips.tail (); + hb_bounds_t &group = groups.tail (); + + group.union_ (clip); + } + + protected: + hb_vector_t<hb_transform_t> transforms; + hb_vector_t<hb_bounds_t> clips; + hb_vector_t<hb_bounds_t> groups; +}; + +HB_INTERNAL hb_paint_funcs_t * +hb_paint_extents_get_funcs (); + + +#endif /* HB_PAINT_EXTENTS_HH */ diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-paint.cc b/source/libs/harfbuzz/harfbuzz-src/src/hb-paint.cc new file mode 100644 index 0000000000000000000000000000000000000000..28150f1638d2da862440ffe89f1f8a4a7baa3188 --- /dev/null +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-paint.cc @@ -0,0 +1,703 @@ +/* + * Copyright © 2022 Matthias Clasen + * + * This is part of HarfBuzz, a text shaping library. + * + * 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. + */ + +#include "hb.hh" + +#ifndef HB_NO_PAINT + +#include "hb-paint.hh" + +/** + * SECTION: hb-paint + * @title: hb-paint + * @short_description: Glyph painting + * @include: hb.h + * + * Functions for painting glyphs. + * + * The main purpose of these functions is to paint (extract) color glyph layers + * from the COLRv1 table, but the API works for drawing ordinary outlines and + * images as well. + * + * The #hb_paint_funcs_t struct can be used with hb_font_paint_glyph(). + **/ + +static void +hb_paint_push_transform_nil (hb_paint_funcs_t *funcs, void *paint_data, + float xx, float yx, + float xy, float yy, + float dx, float dy, + void *user_data) {} + +static void +hb_paint_pop_transform_nil (hb_paint_funcs_t *funcs, void *paint_data, + void *user_data) {} + +static void +hb_paint_push_clip_glyph_nil (hb_paint_funcs_t *funcs, void *paint_data, + hb_codepoint_t glyph, + hb_font_t *font, + void *user_data) {} + +static void +hb_paint_push_clip_rectangle_nil (hb_paint_funcs_t *funcs, void *paint_data, + float xmin, float ymin, float xmax, float ymax, + void *user_data) {} + +static void +hb_paint_pop_clip_nil (hb_paint_funcs_t *funcs, void *paint_data, + void *user_data) {} + +static void +hb_paint_color_nil (hb_paint_funcs_t *funcs, void *paint_data, + hb_bool_t is_foreground, + hb_color_t color, + void *user_data) {} + +static hb_bool_t +hb_paint_image_nil (hb_paint_funcs_t *funcs, void *paint_data, + hb_blob_t *image, + unsigned int width, + unsigned int height, + hb_tag_t format, + float slant_xy, + hb_glyph_extents_t *extents, + void *user_data) { return false; } + +static void +hb_paint_linear_gradient_nil (hb_paint_funcs_t *funcs, void *paint_data, + hb_color_line_t *color_line, + float x0, float y0, + float x1, float y1, + float x2, float y2, + void *user_data) {} + +static void +hb_paint_radial_gradient_nil (hb_paint_funcs_t *funcs, void *paint_data, + hb_color_line_t *color_line, + float x0, float y0, float r0, + float x1, float y1, float r1, + void *user_data) {} + +static void +hb_paint_sweep_gradient_nil (hb_paint_funcs_t *funcs, void *paint_data, + hb_color_line_t *color_line, + float x0, float y0, + float start_angle, + float end_angle, + void *user_data) {} + +static void +hb_paint_push_group_nil (hb_paint_funcs_t *funcs, void *paint_data, + void *user_data) {} + +static void +hb_paint_pop_group_nil (hb_paint_funcs_t *funcs, void *paint_data, + hb_paint_composite_mode_t mode, + void *user_data) {} + +static hb_bool_t +hb_paint_custom_palette_color_nil (hb_paint_funcs_t *funcs, void *paint_data, + unsigned int color_index, + hb_color_t *color, + void *user_data) { return false; } + +static bool +_hb_paint_funcs_set_preamble (hb_paint_funcs_t *funcs, + bool func_is_null, + void **user_data, + hb_destroy_func_t *destroy) +{ + if (hb_object_is_immutable (funcs)) + { + if (*destroy) + (*destroy) (*user_data); + return false; + } + + if (func_is_null) + { + if (*destroy) + (*destroy) (*user_data); + *destroy = nullptr; + *user_data = nullptr; + } + + return true; +} + +static bool +_hb_paint_funcs_set_middle (hb_paint_funcs_t *funcs, + void *user_data, + hb_destroy_func_t destroy) +{ + if (user_data && !funcs->user_data) + { + funcs->user_data = (decltype (funcs->user_data)) hb_calloc (1, sizeof (*funcs->user_data)); + if (unlikely (!funcs->user_data)) + goto fail; + } + if (destroy && !funcs->destroy) + { + funcs->destroy = (decltype (funcs->destroy)) hb_calloc (1, sizeof (*funcs->destroy)); + if (unlikely (!funcs->destroy)) + goto fail; + } + + return true; + +fail: + if (destroy) + (destroy) (user_data); + return false; +} + +#define HB_PAINT_FUNC_IMPLEMENT(name) \ + \ +void \ +hb_paint_funcs_set_##name##_func (hb_paint_funcs_t *funcs, \ + hb_paint_##name##_func_t func, \ + void *user_data, \ + hb_destroy_func_t destroy) \ +{ \ + if (!_hb_paint_funcs_set_preamble (funcs, !func, &user_data, &destroy)) \ + return; \ + \ + if (funcs->destroy && funcs->destroy->name) \ + funcs->destroy->name (!funcs->user_data ? nullptr : funcs->user_data->name);\ + \ + if (!_hb_paint_funcs_set_middle (funcs, user_data, destroy)) \ + return; \ + \ + if (func) \ + funcs->func.name = func; \ + else \ + funcs->func.name = hb_paint_##name##_nil; \ + \ + if (funcs->user_data) \ + funcs->user_data->name = user_data; \ + if (funcs->destroy) \ + funcs->destroy->name = destroy; \ +} + +HB_PAINT_FUNCS_IMPLEMENT_CALLBACKS +#undef HB_PAINT_FUNC_IMPLEMENT + +/** + * hb_paint_funcs_create: + * + * Creates a new #hb_paint_funcs_t structure of paint functions. + * + * The initial reference count of 1 should be released with hb_paint_funcs_destroy() + * when you are done using the #hb_paint_funcs_t. This function never returns + * `NULL`. If memory cannot be allocated, a special singleton #hb_paint_funcs_t + * object will be returned. + * + * Returns value: (transfer full): the paint-functions structure + * + * Since: 7.0.0 + */ +hb_paint_funcs_t * +hb_paint_funcs_create () +{ + hb_paint_funcs_t *funcs; + if (unlikely (!(funcs = hb_object_create<hb_paint_funcs_t> ()))) + return const_cast<hb_paint_funcs_t *> (&Null (hb_paint_funcs_t)); + + funcs->func = Null (hb_paint_funcs_t).func; + + return funcs; +} + +DEFINE_NULL_INSTANCE (hb_paint_funcs_t) = +{ + HB_OBJECT_HEADER_STATIC, + + { +#define HB_PAINT_FUNC_IMPLEMENT(name) hb_paint_##name##_nil, + HB_PAINT_FUNCS_IMPLEMENT_CALLBACKS +#undef HB_PAINT_FUNC_IMPLEMENT + } +}; + +/** + * hb_paint_funcs_get_empty: + * + * Fetches the singleton empty paint-functions structure. + * + * Return value: (transfer full): The empty paint-functions structure + * + * Since: 7.0.0 + **/ +hb_paint_funcs_t * +hb_paint_funcs_get_empty () +{ + return const_cast<hb_paint_funcs_t *> (&Null (hb_paint_funcs_t)); +} + +/** + * hb_paint_funcs_reference: (skip) + * @funcs: The paint-functions structure + * + * Increases the reference count on a paint-functions structure. + * + * This prevents @funcs from being destroyed until a matching + * call to hb_paint_funcs_destroy() is made. + * + * Return value: The paint-functions structure + * + * Since: 7.0.0 + */ +hb_paint_funcs_t * +hb_paint_funcs_reference (hb_paint_funcs_t *funcs) +{ + return hb_object_reference (funcs); +} + +/** + * hb_paint_funcs_destroy: (skip) + * @funcs: The paint-functions structure + * + * Decreases the reference count on a paint-functions structure. + * + * When the reference count reaches zero, the structure + * is destroyed, freeing all memory. + * + * Since: 7.0.0 + */ +void +hb_paint_funcs_destroy (hb_paint_funcs_t *funcs) +{ + if (!hb_object_destroy (funcs)) return; + + if (funcs->destroy) + { +#define HB_PAINT_FUNC_IMPLEMENT(name) \ + if (funcs->destroy->name) funcs->destroy->name (!funcs->user_data ? nullptr : funcs->user_data->name); + HB_PAINT_FUNCS_IMPLEMENT_CALLBACKS +#undef HB_PAINT_FUNC_IMPLEMENT + } + + hb_free (funcs->destroy); + hb_free (funcs->user_data); + hb_free (funcs); +} + +/** + * hb_paint_funcs_set_user_data: (skip) + * @funcs: The paint-functions structure + * @key: The user-data key + * @data: A pointer to the user data + * @destroy: (nullable): A callback to call when @data is not needed anymore + * @replace: Whether to replace an existing data with the same key + * + * Attaches a user-data key/data pair to the specified paint-functions structure. + * + * Return value: `true` if success, `false` otherwise + * + * Since: 7.0.0 + **/ +hb_bool_t +hb_paint_funcs_set_user_data (hb_paint_funcs_t *funcs, + hb_user_data_key_t *key, + void * data, + hb_destroy_func_t destroy, + hb_bool_t replace) +{ + return hb_object_set_user_data (funcs, key, data, destroy, replace); +} + +/** + * hb_paint_funcs_get_user_data: (skip) + * @funcs: The paint-functions structure + * @key: The user-data key to query + * + * Fetches the user-data associated with the specified key, + * attached to the specified paint-functions structure. + * + * Return value: (transfer none): A pointer to the user data + * + * Since: 7.0.0 + **/ +void * +hb_paint_funcs_get_user_data (const hb_paint_funcs_t *funcs, + hb_user_data_key_t *key) +{ + return hb_object_get_user_data (funcs, key); +} + +/** + * hb_paint_funcs_make_immutable: + * @funcs: The paint-functions structure + * + * Makes a paint-functions structure immutable. + * + * After this call, all attempts to set one of the callbacks + * on @funcs will fail. + * + * Since: 7.0.0 + */ +void +hb_paint_funcs_make_immutable (hb_paint_funcs_t *funcs) +{ + if (hb_object_is_immutable (funcs)) + return; + + hb_object_make_immutable (funcs); +} + +/** + * hb_paint_funcs_is_immutable: + * @funcs: The paint-functions structure + * + * Tests whether a paint-functions structure is immutable. + * + * Return value: `true` if @funcs is immutable, `false` otherwise + * + * Since: 7.0.0 + */ +hb_bool_t +hb_paint_funcs_is_immutable (hb_paint_funcs_t *funcs) +{ + return hb_object_is_immutable (funcs); +} + + +/** + * hb_color_line_get_color_stops: + * @color_line: a #hb_color_line_t object + * @start: the index of the first color stop to return + * @count: (inout) (optional): Input = the maximum number of feature tags to return; + * Output = the actual number of feature tags returned (may be zero) + * @color_stops: (out) (array length=count) (optional): Array of #hb_color_stop_t to populate + * + * Fetches a list of color stops from the given color line object. + * + * Note that due to variations being applied, the returned color stops + * may be out of order. It is the callers responsibility to ensure that + * color stops are sorted by their offset before they are used. + * + * Return value: the total number of color stops in @color_line + * + * Since: 7.0.0 + */ +unsigned int +hb_color_line_get_color_stops (hb_color_line_t *color_line, + unsigned int start, + unsigned int *count, + hb_color_stop_t *color_stops) +{ + return color_line->get_color_stops (color_line, + color_line->data, + start, count, + color_stops, + color_line->get_color_stops_user_data); +} + +/** + * hb_color_line_get_extend: + * @color_line: a #hb_color_line_t object + * + * Fetches the extend mode of the color line object. + * + * Return value: the extend mode of @color_line + * + * Since: 7.0.0 + */ +hb_paint_extend_t +hb_color_line_get_extend (hb_color_line_t *color_line) +{ + return color_line->get_extend (color_line, + color_line->data, + color_line->get_extend_user_data); +} + + +/** + * hb_paint_push_transform: + * @funcs: paint functions + * @paint_data: associated data passed by the caller + * @xx: xx component of the transform matrix + * @yx: yx component of the transform matrix + * @xy: xy component of the transform matrix + * @yy: yy component of the transform matrix + * @dx: dx component of the transform matrix + * @dy: dy component of the transform matrix + * + * Perform a "push-transform" paint operation. + * + * Since: 7.0.0 + */ +void +hb_paint_push_transform (hb_paint_funcs_t *funcs, void *paint_data, + float xx, float yx, + float xy, float yy, + float dx, float dy) +{ + funcs->push_transform (paint_data, xx, yx, xy, yy, dx, dy); +} + +/** + * hb_paint_pop_transform: + * @funcs: paint functions + * @paint_data: associated data passed by the caller + * + * Perform a "pop-transform" paint operation. + * + * Since: 7.0.0 + */ +void +hb_paint_pop_transform (hb_paint_funcs_t *funcs, void *paint_data) +{ + funcs->pop_transform (paint_data); +} + +/** + * hb_paint_push_clip_glyph: + * @funcs: paint functions + * @paint_data: associated data passed by the caller + * @glyph: the glyph ID + * @font: the font + * + * Perform a "push-clip-glyph" paint operation. + * + * Since: 7.0.0 + */ +void +hb_paint_push_clip_glyph (hb_paint_funcs_t *funcs, void *paint_data, + hb_codepoint_t glyph, + hb_font_t *font) +{ + funcs->push_clip_glyph (paint_data, glyph, font); +} + +/** + * hb_paint_push_clip_rectangle: + * @funcs: paint functions + * @paint_data: associated data passed by the caller + * @xmin: min X for the rectangle + * @ymin: min Y for the rectangle + * @xmax: max X for the rectangle + * @ymax: max Y for the rectangle + * + * Perform a "push-clip-rect" paint operation. + * + * Since: 7.0.0 + */ +void +hb_paint_push_clip_rectangle (hb_paint_funcs_t *funcs, void *paint_data, + float xmin, float ymin, float xmax, float ymax) +{ + funcs->push_clip_rectangle (paint_data, xmin, ymin, xmax, ymax); +} + +/** + * hb_paint_pop_clip: + * @funcs: paint functions + * @paint_data: associated data passed by the caller + * + * Perform a "pop-clip" paint operation. + * + * Since: 7.0.0 + */ +void +hb_paint_pop_clip (hb_paint_funcs_t *funcs, void *paint_data) +{ + funcs->pop_clip (paint_data); +} + +/** + * hb_paint_color: + * @funcs: paint functions + * @paint_data: associated data passed by the caller + * @is_foreground: whether the color is the foreground + * @color: The color to use + * + * Perform a "color" paint operation. + * + * Since: 7.0.0 + */ +void +hb_paint_color (hb_paint_funcs_t *funcs, void *paint_data, + hb_bool_t is_foreground, + hb_color_t color) +{ + funcs->color (paint_data, is_foreground, color); +} + +/** + * hb_paint_image: + * @funcs: paint functions + * @paint_data: associated data passed by the caller + * @image: image data + * @width: width of the raster image in pixels, or 0 + * @height: height of the raster image in pixels, or 0 + * @format: the image format as a tag + * @slant: the synthetic slant ratio to be applied to the image during rendering + * @extents: (nullable): the extents of the glyph + * + * Perform a "image" paint operation. + * + * Since: 7.0.0 + */ +void +hb_paint_image (hb_paint_funcs_t *funcs, void *paint_data, + hb_blob_t *image, + unsigned int width, + unsigned int height, + hb_tag_t format, + float slant, + hb_glyph_extents_t *extents) +{ + funcs->image (paint_data, image, width, height, format, slant, extents); +} + +/** + * hb_paint_linear_gradient: + * @funcs: paint functions + * @paint_data: associated data passed by the caller + * @color_line: Color information for the gradient + * @x0: X coordinate of the first point + * @y0: Y coordinate of the first point + * @x1: X coordinate of the second point + * @y1: Y coordinate of the second point + * @x2: X coordinate of the third point + * @y2: Y coordinate of the third point + * + * Perform a "linear-gradient" paint operation. + * + * Since: 7.0.0 + */ +void +hb_paint_linear_gradient (hb_paint_funcs_t *funcs, void *paint_data, + hb_color_line_t *color_line, + float x0, float y0, + float x1, float y1, + float x2, float y2) +{ + funcs->linear_gradient (paint_data, color_line, x0, y0, x1, y1, x2, y2); +} + +/** + * hb_paint_radial_gradient: + * @funcs: paint functions + * @paint_data: associated data passed by the caller + * @color_line: Color information for the gradient + * @x0: X coordinate of the first circle's center + * @y0: Y coordinate of the first circle's center + * @r0: radius of the first circle + * @x1: X coordinate of the second circle's center + * @y1: Y coordinate of the second circle's center + * @r1: radius of the second circle + * + * Perform a "radial-gradient" paint operation. + * + * Since: 7.0.0 + */ +void +hb_paint_radial_gradient (hb_paint_funcs_t *funcs, void *paint_data, + hb_color_line_t *color_line, + float x0, float y0, float r0, + float x1, float y1, float r1) +{ + funcs->radial_gradient (paint_data, color_line, x0, y0, r0, y1, x1, r1); +} + +/** + * hb_paint_sweep_gradient: + * @funcs: paint functions + * @paint_data: associated data passed by the caller + * @color_line: Color information for the gradient + * @x0: X coordinate of the circle's center + * @y0: Y coordinate of the circle's center + * @start_angle: the start angle + * @end_angle: the end angle + * + * Perform a "sweep-gradient" paint operation. + * + * Since: 7.0.0 + */ +void +hb_paint_sweep_gradient (hb_paint_funcs_t *funcs, void *paint_data, + hb_color_line_t *color_line, + float x0, float y0, + float start_angle, float end_angle) +{ + funcs->sweep_gradient (paint_data, color_line, x0, y0, start_angle, end_angle); +} + +/** + * hb_paint_push_group: + * @funcs: paint functions + * @paint_data: associated data passed by the caller + * + * Perform a "push-group" paint operation. + * + * Since: 7.0.0 + */ +void +hb_paint_push_group (hb_paint_funcs_t *funcs, void *paint_data) +{ + funcs->push_group (paint_data); +} + +/** + * hb_paint_pop_group: + * @funcs: paint functions + * @paint_data: associated data passed by the caller + * @mode: the compositing mode to use + * + * Perform a "pop-group" paint operation. + * + * Since: 7.0.0 + */ +void +hb_paint_pop_group (hb_paint_funcs_t *funcs, void *paint_data, + hb_paint_composite_mode_t mode) +{ + funcs->pop_group (paint_data, mode); +} + +/** + * hb_paint_custom_palette_color: + * @funcs: paint functions + * @paint_data: associated data passed by the caller + * @color_index: color index + * @color: (out): fetched color + * + * Gets the custom palette color for @color_index. + * + * Return value: `true` if found, `false` otherwise + * + * Since: 7.0.0 + */ +hb_bool_t +hb_paint_custom_palette_color (hb_paint_funcs_t *funcs, void *paint_data, + unsigned int color_index, + hb_color_t *color) +{ + return funcs->custom_palette_color (paint_data, color_index, color); +} + +#endif diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-paint.h b/source/libs/harfbuzz/harfbuzz-src/src/hb-paint.h new file mode 100644 index 0000000000000000000000000000000000000000..a734f112cc7e6099316081623876233124b3ab7d --- /dev/null +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-paint.h @@ -0,0 +1,987 @@ +/* + * Copyright © 2022 Matthias Clasen + * + * This is part of HarfBuzz, a text shaping library. + * + * 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. + */ + +#if !defined(HB_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR) +#error "Include <hb.h> instead." +#endif + +#ifndef HB_PAINT_H +#define HB_PAINT_H + +#include "hb-common.h" + +HB_BEGIN_DECLS + + +/** + * hb_paint_funcs_t: + * + * Glyph paint callbacks. + * + * The callbacks assume that the caller maintains a stack + * of current transforms, clips and intermediate surfaces, + * as evidenced by the pairs of push/pop callbacks. The + * push/pop calls will be properly nested, so it is fine + * to store the different kinds of object on a single stack. + * + * Not all callbacks are required for all kinds of glyphs. + * For rendering COLRv0 or non-color outline glyphs, the + * gradient callbacks are not needed, and the composite + * callback only needs to handle simple alpha compositing + * (#HB_PAINT_COMPOSITE_MODE_SRC_OVER). + * + * The paint-image callback is only needed for glyphs + * with image blobs in the CBDT, sbix or SVG tables. + * + * The custom-palette-color callback is only necessary if + * you want to override colors from the font palette with + * custom colors. + * + * Since: 7.0.0 + **/ +typedef struct hb_paint_funcs_t hb_paint_funcs_t; + +HB_EXTERN hb_paint_funcs_t * +hb_paint_funcs_create (void); + +HB_EXTERN hb_paint_funcs_t * +hb_paint_funcs_get_empty (void); + +HB_EXTERN hb_paint_funcs_t * +hb_paint_funcs_reference (hb_paint_funcs_t *funcs); + +HB_EXTERN void +hb_paint_funcs_destroy (hb_paint_funcs_t *funcs); + +HB_EXTERN hb_bool_t +hb_paint_funcs_set_user_data (hb_paint_funcs_t *funcs, + hb_user_data_key_t *key, + void * data, + hb_destroy_func_t destroy, + hb_bool_t replace); + + +HB_EXTERN void * +hb_paint_funcs_get_user_data (const hb_paint_funcs_t *funcs, + hb_user_data_key_t *key); + +HB_EXTERN void +hb_paint_funcs_make_immutable (hb_paint_funcs_t *funcs); + +HB_EXTERN hb_bool_t +hb_paint_funcs_is_immutable (hb_paint_funcs_t *funcs); + +/** + * hb_paint_push_transform_func_t: + * @funcs: paint functions object + * @paint_data: The data accompanying the paint functions in hb_font_paint_glyph() + * @xx: xx component of the transform matrix + * @yx: yx component of the transform matrix + * @xy: xy component of the transform matrix + * @yy: yy component of the transform matrix + * @dx: dx component of the transform matrix + * @dy: dy component of the transform matrix + * @user_data: User data pointer passed to hb_paint_funcs_set_push_transform_func() + * + * A virtual method for the #hb_paint_funcs_t to apply + * a transform to subsequent paint calls. + * + * This transform is applied after the current transform, + * and remains in effect until a matching call to + * the #hb_paint_funcs_pop_transform_func_t vfunc. + * + * Since: 7.0.0 + */ +typedef void (*hb_paint_push_transform_func_t) (hb_paint_funcs_t *funcs, + void *paint_data, + float xx, float yx, + float xy, float yy, + float dx, float dy, + void *user_data); + +/** + * hb_paint_pop_transform_func_t: + * @funcs: paint functions object + * @paint_data: The data accompanying the paint functions in hb_font_paint_glyph() + * @user_data: User data pointer passed to hb_paint_funcs_set_pop_transform_func() + * + * A virtual method for the #hb_paint_funcs_t to undo + * the effect of a prior call to the #hb_paint_funcs_push_transform_func_t + * vfunc. + * + * Since: 7.0.0 + */ +typedef void (*hb_paint_pop_transform_func_t) (hb_paint_funcs_t *funcs, + void *paint_data, + void *user_data); + +/** + * hb_paint_push_clip_glyph_func_t: + * @funcs: paint functions object + * @paint_data: The data accompanying the paint functions in hb_font_paint_glyph() + * @glyph: the glyph ID + * @font: the font + * @user_data: User data pointer passed to hb_paint_funcs_set_push_clip_glyph_func() + * + * A virtual method for the #hb_paint_funcs_t to clip + * subsequent paint calls to the outline of a glyph. + * + * The coordinates of the glyph outline are interpreted according + * to the current transform. + * + * This clip is applied in addition to the current clip, + * and remains in effect until a matching call to + * the #hb_paint_funcs_pop_clip_func_t vfunc. + * + * Since: 7.0.0 + */ +typedef void (*hb_paint_push_clip_glyph_func_t) (hb_paint_funcs_t *funcs, + void *paint_data, + hb_codepoint_t glyph, + hb_font_t *font, + void *user_data); + +/** + * hb_paint_push_clip_rectangle_func_t: + * @funcs: paint functions object + * @paint_data: The data accompanying the paint functions in hb_font_paint_glyph() + * @xmin: min X for the rectangle + * @ymin: min Y for the rectangle + * @xmax: max X for the rectangle + * @ymax: max Y for the rectangle + * @user_data: User data pointer passed to hb_paint_funcs_set_push_clip_rectangle_func() + * + * A virtual method for the #hb_paint_funcs_t to clip + * subsequent paint calls to a rectangle. + * + * The coordinates of the rectangle are interpreted according + * to the current transform. + * + * This clip is applied in addition to the current clip, + * and remains in effect until a matching call to + * the #hb_paint_funcs_pop_clip_func_t vfunc. + * + * Since: 7.0.0 + */ +typedef void (*hb_paint_push_clip_rectangle_func_t) (hb_paint_funcs_t *funcs, + void *paint_data, + float xmin, float ymin, + float xmax, float ymax, + void *user_data); + +/** + * hb_paint_pop_clip_func_t: + * @funcs: paint functions object + * @paint_data: The data accompanying the paint functions in hb_font_paint_glyph() + * @user_data: User data pointer passed to hb_paint_funcs_set_pop_clip_func() + * + * A virtual method for the #hb_paint_funcs_t to undo + * the effect of a prior call to the #hb_paint_funcs_push_clip_glyph_func_t + * or #hb_paint_funcs_push_clip_rectangle_func_t vfuncs. + * + * Since: 7.0.0 + */ +typedef void (*hb_paint_pop_clip_func_t) (hb_paint_funcs_t *funcs, + void *paint_data, + void *user_data); + +/** + * hb_paint_color_func_t: + * @funcs: paint functions object + * @paint_data: The data accompanying the paint functions in hb_font_paint_glyph() + * @is_foreground: whether the color is the foreground + * @color: The color to use, unpremultiplied + * @user_data: User data pointer passed to hb_paint_funcs_set_color_func() + * + * A virtual method for the #hb_paint_funcs_t to paint a + * color everywhere within the current clip. + * + * Since: 7.0.0 + */ +typedef void (*hb_paint_color_func_t) (hb_paint_funcs_t *funcs, + void *paint_data, + hb_bool_t is_foreground, + hb_color_t color, + void *user_data); + +/** + * HB_PAINT_IMAGE_FORMAT_PNG: + * + * Tag identifying PNG images in #hb_paint_image_func_t callbacks. + * + * Since: 7.0.0 + */ +#define HB_PAINT_IMAGE_FORMAT_PNG HB_TAG('p','n','g',' ') + +/** + * HB_PAINT_IMAGE_FORMAT_SVG: + * + * Tag identifying SVG images in #hb_paint_image_func_t callbacks. + * + * Since: 7.0.0 + */ +#define HB_PAINT_IMAGE_FORMAT_SVG HB_TAG('s','v','g',' ') + +/** + * HB_PAINT_IMAGE_FORMAT_BGRA: + * + * Tag identifying raw pixel-data images in #hb_paint_image_func_t callbacks. + * The data is in BGRA pre-multiplied sRGBA color-space format. + * + * Since: 7.0.0 + */ +#define HB_PAINT_IMAGE_FORMAT_BGRA HB_TAG('B','G','R','A') + +/** + * hb_paint_image_func_t: + * @funcs: paint functions object + * @paint_data: The data accompanying the paint functions in hb_font_paint_glyph() + * @image: the image data + * @width: width of the raster image in pixels, or 0 + * @height: height of the raster image in pixels, or 0 + * @format: the image format as a tag + * @slant: the synthetic slant ratio to be applied to the image during rendering + * @extents: (nullable): glyph extents for desired rendering + * @user_data: User data pointer passed to hb_paint_funcs_set_image_func() + * + * A virtual method for the #hb_paint_funcs_t to paint a glyph image. + * + * This method is called for glyphs with image blobs in the CBDT, + * sbix or SVG tables. The @format identifies the kind of data that + * is contained in @image. Possible values include #HB_PAINT_IMAGE_FORMAT_PNG, + * #HB_PAINT_IMAGE_FORMAT_SVG and #HB_PAINT_IMAGE_FORMAT_BGRA. + * + * The image dimensions and glyph extents are provided if available, + * and should be used to size and position the image. + * + * Return value: Whether the operation was successful. + * + * Since: 7.0.0 + */ +typedef hb_bool_t (*hb_paint_image_func_t) (hb_paint_funcs_t *funcs, + void *paint_data, + hb_blob_t *image, + unsigned int width, + unsigned int height, + hb_tag_t format, + float slant, + hb_glyph_extents_t *extents, + void *user_data); + +/** + * hb_color_stop_t: + * @offset: the offset of the color stop + * @is_foreground: whether the color is the foreground + * @color: the color, unpremultiplied + * + * Information about a color stop on a color line. + * + * Color lines typically have offsets ranging between 0 and 1, + * but that is not required. + * + * Note: despite @color being unpremultiplied here, interpolation in + * gradients shall happen in premultiplied space. See the OpenType spec + * [COLR](https://learn.microsoft.com/en-us/typography/opentype/spec/colr) + * section for details. + * + * Since: 7.0.0 + */ +typedef struct { + float offset; + hb_bool_t is_foreground; + hb_color_t color; +} hb_color_stop_t; + +/** + * hb_paint_extend_t: + * @HB_PAINT_EXTEND_PAD: Outside the defined interval, + * the color of the closest color stop is used. + * @HB_PAINT_EXTEND_REPEAT: The color line is repeated over + * repeated multiples of the defined interval + * @HB_PAINT_EXTEND_REFLECT: The color line is repeated over + * repeated intervals, as for the repeat mode. + * However, in each repeated interval, the ordering of + * color stops is the reverse of the adjacent interval. + * + * The values of this enumeration determine how color values + * outside the minimum and maximum defined offset on a #hb_color_line_t + * are determined. + * + * See the OpenType spec [COLR](https://learn.microsoft.com/en-us/typography/opentype/spec/colr) + * section for details. + * + * Since: 7.0.0 + */ +typedef enum { + HB_PAINT_EXTEND_PAD, + HB_PAINT_EXTEND_REPEAT, + HB_PAINT_EXTEND_REFLECT +} hb_paint_extend_t; + +typedef struct hb_color_line_t hb_color_line_t; + +/** + * hb_color_line_get_color_stops_func_t: + * @color_line: a #hb_color_line_t object + * @color_line_data: the data accompanying @color_line + * @start: the index of the first color stop to return + * @count: (inout) (optional): Input = the maximum number of feature tags to return; + * Output = the actual number of feature tags returned (may be zero) + * @color_stops: (out) (array length=count) (optional): Array of #hb_color_stop_t to populate + * @user_data: the data accompanying this method + * + * A virtual method for the #hb_color_line_t to fetch color stops. + * + * Return value: the total number of color stops in @color_line + * + * Since: 7.0.0 + */ +typedef unsigned int (*hb_color_line_get_color_stops_func_t) (hb_color_line_t *color_line, + void *color_line_data, + unsigned int start, + unsigned int *count, + hb_color_stop_t *color_stops, + void *user_data); + +/** + * hb_color_line_get_extend_func_t: + * @color_line: a #hb_color_line_t object + * @color_line_data: the data accompanying @color_line + * @user_data: the data accompanying this method + * + * A virtual method for the @hb_color_line_t to fetches the extend mode. + * + * Return value: the extend mode of @color_line + * + * Since: 7.0.0 + */ +typedef hb_paint_extend_t (*hb_color_line_get_extend_func_t) (hb_color_line_t *color_line, + void *color_line_data, + void *user_data); + +/** + * hb_color_line_t: + * + * A struct containing color information for a gradient. + * + * Since: 7.0.0 + */ +struct hb_color_line_t { + void *data; + + hb_color_line_get_color_stops_func_t get_color_stops; + void *get_color_stops_user_data; + + hb_color_line_get_extend_func_t get_extend; + void *get_extend_user_data; + + void *reserved0; + void *reserved1; + void *reserved2; + void *reserved3; + void *reserved5; + void *reserved6; + void *reserved7; + void *reserved8; +}; + +HB_EXTERN unsigned int +hb_color_line_get_color_stops (hb_color_line_t *color_line, + unsigned int start, + unsigned int *count, + hb_color_stop_t *color_stops); + +HB_EXTERN hb_paint_extend_t +hb_color_line_get_extend (hb_color_line_t *color_line); + +/** + * hb_paint_linear_gradient_func_t: + * @funcs: paint functions object + * @paint_data: The data accompanying the paint functions in hb_font_paint_glyph() + * @color_line: Color information for the gradient + * @x0: X coordinate of the first point + * @y0: Y coordinate of the first point + * @x1: X coordinate of the second point + * @y1: Y coordinate of the second point + * @x2: X coordinate of the third point + * @y2: Y coordinate of the third point + * @user_data: User data pointer passed to hb_paint_funcs_set_linear_gradient_func() + * + * A virtual method for the #hb_paint_funcs_t to paint a linear + * gradient everywhere within the current clip. + * + * The @color_line object contains information about the colors of the gradients. + * It is only valid for the duration of the callback, you cannot keep it around. + * + * The coordinates of the points are interpreted according + * to the current transform. + * + * See the OpenType spec [COLR](https://learn.microsoft.com/en-us/typography/opentype/spec/colr) + * section for details on how the points define the direction + * of the gradient, and how to interpret the @color_line. + * + * Since: 7.0.0 + */ +typedef void (*hb_paint_linear_gradient_func_t) (hb_paint_funcs_t *funcs, + void *paint_data, + hb_color_line_t *color_line, + float x0, float y0, + float x1, float y1, + float x2, float y2, + void *user_data); + +/** + * hb_paint_radial_gradient_func_t: + * @funcs: paint functions object + * @paint_data: The data accompanying the paint functions in hb_font_paint_glyph() + * @color_line: Color information for the gradient + * @x0: X coordinate of the first circle's center + * @y0: Y coordinate of the first circle's center + * @r0: radius of the first circle + * @x1: X coordinate of the second circle's center + * @y1: Y coordinate of the second circle's center + * @r1: radius of the second circle + * @user_data: User data pointer passed to hb_paint_funcs_set_radial_gradient_func() + * + * A virtual method for the #hb_paint_funcs_t to paint a radial + * gradient everywhere within the current clip. + * + * The @color_line object contains information about the colors of the gradients. + * It is only valid for the duration of the callback, you cannot keep it around. + * + * The coordinates of the points are interpreted according + * to the current transform. + * + * See the OpenType spec [COLR](https://learn.microsoft.com/en-us/typography/opentype/spec/colr) + * section for details on how the points define the direction + * of the gradient, and how to interpret the @color_line. + * + * Since: 7.0.0 + */ +typedef void (*hb_paint_radial_gradient_func_t) (hb_paint_funcs_t *funcs, + void *paint_data, + hb_color_line_t *color_line, + float x0, float y0, float r0, + float x1, float y1, float r1, + void *user_data); + +/** + * hb_paint_sweep_gradient_func_t: + * @funcs: paint functions object + * @paint_data: The data accompanying the paint functions in hb_font_paint_glyph() + * @color_line: Color information for the gradient + * @x0: X coordinate of the circle's center + * @y0: Y coordinate of the circle's center + * @start_angle: the start angle, in radians + * @end_angle: the end angle, in radians + * @user_data: User data pointer passed to hb_paint_funcs_set_sweep_gradient_func() + * + * A virtual method for the #hb_paint_funcs_t to paint a sweep + * gradient everywhere within the current clip. + * + * The @color_line object contains information about the colors of the gradients. + * It is only valid for the duration of the callback, you cannot keep it around. + * + * The coordinates of the points are interpreted according + * to the current transform. + * + * See the OpenType spec [COLR](https://learn.microsoft.com/en-us/typography/opentype/spec/colr) + * section for details on how the points define the direction + * of the gradient, and how to interpret the @color_line. + * + * Since: 7.0.0 + */ +typedef void (*hb_paint_sweep_gradient_func_t) (hb_paint_funcs_t *funcs, + void *paint_data, + hb_color_line_t *color_line, + float x0, float y0, + float start_angle, + float end_angle, + void *user_data); + +/** + * hb_paint_composite_mode_t: + * @HB_PAINT_COMPOSITE_MODE_CLEAR: clear destination layer (bounded) + * @HB_PAINT_COMPOSITE_MODE_SRC: replace destination layer (bounded) + * @HB_PAINT_COMPOSITE_MODE_SRC_OVER: draw source layer on top of destination layer + * (bounded) + * @HB_PAINT_COMPOSITE_MODE_SRC_IN: draw source where there was destination content + * (unbounded) + * @HB_PAINT_COMPOSITE_MODE_SRC_OUT: draw source where there was no destination + * content (unbounded) + * @HB_PAINT_COMPOSITE_MODE_SRC_ATOP: draw source on top of destination content and + * only there + * @HB_PAINT_COMPOSITE_MODE_DEST: ignore the source + * @HB_PAINT_COMPOSITE_MODE_DEST_OVER: draw destination on top of source + * @HB_PAINT_COMPOSITE_MODE_DEST_IN: leave destination only where there was + * source content (unbounded) + * @HB_PAINT_COMPOSITE_MODE_DEST_OUT: leave destination only where there was no + * source content + * @HB_PAINT_COMPOSITE_MODE_DEST_ATOP: leave destination on top of source content + * and only there (unbounded) + * @HB_PAINT_COMPOSITE_MODE_XOR: source and destination are shown where there is only + * one of them + * @HB_PAINT_COMPOSITE_MODE_PLUS: source and destination layers are accumulated + * @HB_PAINT_COMPOSITE_MODE_MULTIPLY: source and destination layers are multiplied. + * This causes the result to be at least as dark as the darker inputs. + * @HB_PAINT_COMPOSITE_MODE_SCREEN: source and destination are complemented and + * multiplied. This causes the result to be at least as light as the lighter + * inputs. + * @HB_PAINT_COMPOSITE_MODE_OVERLAY: multiplies or screens, depending on the + * lightness of the destination color. + * @HB_PAINT_COMPOSITE_MODE_DARKEN: replaces the destination with the source if it + * is darker, otherwise keeps the source. + * @HB_PAINT_COMPOSITE_MODE_LIGHTEN: replaces the destination with the source if it + * is lighter, otherwise keeps the source. + * @HB_PAINT_COMPOSITE_MODE_COLOR_DODGE: brightens the destination color to reflect + * the source color. + * @HB_PAINT_COMPOSITE_MODE_COLOR_BURN: darkens the destination color to reflect + * the source color. + * @HB_PAINT_COMPOSITE_MODE_HARD_LIGHT: Multiplies or screens, dependent on source + * color. + * @HB_PAINT_COMPOSITE_MODE_SOFT_LIGHT: Darkens or lightens, dependent on source + * color. + * @HB_PAINT_COMPOSITE_MODE_DIFFERENCE: Takes the difference of the source and + * destination color. + * @HB_PAINT_COMPOSITE_MODE_EXCLUSION: Produces an effect similar to difference, but + * with lower contrast. + * @HB_PAINT_COMPOSITE_MODE_HSL_HUE: Creates a color with the hue of the source + * and the saturation and luminosity of the target. + * @HB_PAINT_COMPOSITE_MODE_HSL_SATURATION: Creates a color with the saturation + * of the source and the hue and luminosity of the target. Painting with + * this mode onto a gray area produces no change. + * @HB_PAINT_COMPOSITE_MODE_HSL_COLOR: Creates a color with the hue and saturation + * of the source and the luminosity of the target. This preserves the gray + * levels of the target and is useful for coloring monochrome images or + * tinting color images. + * @HB_PAINT_COMPOSITE_MODE_HSL_LUMINOSITY: Creates a color with the luminosity of + * the source and the hue and saturation of the target. This produces an + * inverse effect to @HB_PAINT_COMPOSITE_MODE_HSL_COLOR. + * + * The values of this enumeration describe the compositing modes + * that can be used when combining temporary redirected drawing + * with the backdrop. + * + * See the OpenType spec [COLR](https://learn.microsoft.com/en-us/typography/opentype/spec/colr) + * section for details. + * + * Since: 7.0.0 + */ +typedef enum { + HB_PAINT_COMPOSITE_MODE_CLEAR, + HB_PAINT_COMPOSITE_MODE_SRC, + HB_PAINT_COMPOSITE_MODE_DEST, + HB_PAINT_COMPOSITE_MODE_SRC_OVER, + HB_PAINT_COMPOSITE_MODE_DEST_OVER, + HB_PAINT_COMPOSITE_MODE_SRC_IN, + HB_PAINT_COMPOSITE_MODE_DEST_IN, + HB_PAINT_COMPOSITE_MODE_SRC_OUT, + HB_PAINT_COMPOSITE_MODE_DEST_OUT, + HB_PAINT_COMPOSITE_MODE_SRC_ATOP, + HB_PAINT_COMPOSITE_MODE_DEST_ATOP, + HB_PAINT_COMPOSITE_MODE_XOR, + HB_PAINT_COMPOSITE_MODE_PLUS, + HB_PAINT_COMPOSITE_MODE_SCREEN, + HB_PAINT_COMPOSITE_MODE_OVERLAY, + HB_PAINT_COMPOSITE_MODE_DARKEN, + HB_PAINT_COMPOSITE_MODE_LIGHTEN, + HB_PAINT_COMPOSITE_MODE_COLOR_DODGE, + HB_PAINT_COMPOSITE_MODE_COLOR_BURN, + HB_PAINT_COMPOSITE_MODE_HARD_LIGHT, + HB_PAINT_COMPOSITE_MODE_SOFT_LIGHT, + HB_PAINT_COMPOSITE_MODE_DIFFERENCE, + HB_PAINT_COMPOSITE_MODE_EXCLUSION, + HB_PAINT_COMPOSITE_MODE_MULTIPLY, + HB_PAINT_COMPOSITE_MODE_HSL_HUE, + HB_PAINT_COMPOSITE_MODE_HSL_SATURATION, + HB_PAINT_COMPOSITE_MODE_HSL_COLOR, + HB_PAINT_COMPOSITE_MODE_HSL_LUMINOSITY, +} hb_paint_composite_mode_t; + +/** + * hb_paint_push_group_func_t: + * @funcs: paint functions object + * @paint_data: The data accompanying the paint functions in hb_font_paint_glyph() + * @user_data: User data pointer passed to hb_paint_funcs_set_push_group_func() + * + * A virtual method for the #hb_paint_funcs_t to use + * an intermediate surface for subsequent paint calls. + * + * The drawing will be redirected to an intermediate surface + * until a matching call to the #hb_paint_funcs_pop_group_func_t + * vfunc. + * + * Since: 7.0.0 + */ +typedef void (*hb_paint_push_group_func_t) (hb_paint_funcs_t *funcs, + void *paint_data, + void *user_data); + +/** + * hb_paint_pop_group_func_t: + * @funcs: paint functions object + * @paint_data: The data accompanying the paint functions in hb_font_paint_glyph() + * @mode: the compositing mode to use + * @user_data: User data pointer passed to hb_paint_funcs_set_pop_group_func() + * + * A virtual method for the #hb_paint_funcs_t to undo + * the effect of a prior call to the #hb_paint_funcs_push_group_func_t + * vfunc. + * + * This call stops the redirection to the intermediate surface, + * and then composites it on the previous surface, using the + * compositing mode passed to this call. + * + * Since: 7.0.0 + */ +typedef void (*hb_paint_pop_group_func_t) (hb_paint_funcs_t *funcs, + void *paint_data, + hb_paint_composite_mode_t mode, + void *user_data); + +/** + * hb_paint_custom_palette_color_func_t: + * @funcs: paint functions object + * @paint_data: The data accompanying the paint functions in hb_font_paint_glyph() + * @color_index: the color index + * @color: (out): fetched color + * @user_data: User data pointer passed to hb_paint_funcs_set_pop_group_func() + * + * A virtual method for the #hb_paint_funcs_t to fetch a color from the custom + * color palette. + * + * Custom palette colors override the colors from the fonts selected color + * palette. It is not necessary to override all palette entries; for entries + * that should be taken from the font palette, return `false`. + * + * This function might get called multiple times, but the custom palette is + * expected to remain unchanged for duration of a hb_font_paint_glyph() call. + * + * Return value: `true` if found, `false` otherwise + * + * Since: 7.0.0 + */ +typedef hb_bool_t (*hb_paint_custom_palette_color_func_t) (hb_paint_funcs_t *funcs, + void *paint_data, + unsigned int color_index, + hb_color_t *color, + void *user_data); + + +/** + * hb_paint_funcs_set_push_transform_func: + * @funcs: A paint functions struct + * @func: (closure user_data) (destroy destroy) (scope notified): The push-transform callback + * @user_data: Data to pass to @func + * @destroy: (nullable): Function to call when @user_data is no longer needed + * + * Sets the push-transform callback on the paint functions struct. + * + * Since: 7.0.0 + */ +HB_EXTERN void +hb_paint_funcs_set_push_transform_func (hb_paint_funcs_t *funcs, + hb_paint_push_transform_func_t func, + void *user_data, + hb_destroy_func_t destroy); + +/** + * hb_paint_funcs_set_pop_transform_func: + * @funcs: A paint functions struct + * @func: (closure user_data) (destroy destroy) (scope notified): The pop-transform callback + * @user_data: Data to pass to @func + * @destroy: (nullable): Function to call when @user_data is no longer needed + * + * Sets the pop-transform callback on the paint functions struct. + * + * Since: 7.0.0 + */ +HB_EXTERN void +hb_paint_funcs_set_pop_transform_func (hb_paint_funcs_t *funcs, + hb_paint_pop_transform_func_t func, + void *user_data, + hb_destroy_func_t destroy); + +/** + * hb_paint_funcs_set_push_clip_glyph_func: + * @funcs: A paint functions struct + * @func: (closure user_data) (destroy destroy) (scope notified): The push-clip-glyph callback + * @user_data: Data to pass to @func + * @destroy: (nullable): Function to call when @user_data is no longer needed + * + * Sets the push-clip-glyph callback on the paint functions struct. + * + * Since: 7.0.0 + */ +HB_EXTERN void +hb_paint_funcs_set_push_clip_glyph_func (hb_paint_funcs_t *funcs, + hb_paint_push_clip_glyph_func_t func, + void *user_data, + hb_destroy_func_t destroy); + +/** + * hb_paint_funcs_set_push_clip_rectangle_func: + * @funcs: A paint functions struct + * @func: (closure user_data) (destroy destroy) (scope notified): The push-clip-rectangle callback + * @user_data: Data to pass to @func + * @destroy: (nullable): Function to call when @user_data is no longer needed + * + * Sets the push-clip-rect callback on the paint functions struct. + * + * Since: 7.0.0 + */ +HB_EXTERN void +hb_paint_funcs_set_push_clip_rectangle_func (hb_paint_funcs_t *funcs, + hb_paint_push_clip_rectangle_func_t func, + void *user_data, + hb_destroy_func_t destroy); + +/** + * hb_paint_funcs_set_pop_clip_func: + * @funcs: A paint functions struct + * @func: (closure user_data) (destroy destroy) (scope notified): The pop-clip callback + * @user_data: Data to pass to @func + * @destroy: (nullable): Function to call when @user_data is no longer needed + * + * Sets the pop-clip callback on the paint functions struct. + * + * Since: 7.0.0 + */ +HB_EXTERN void +hb_paint_funcs_set_pop_clip_func (hb_paint_funcs_t *funcs, + hb_paint_pop_clip_func_t func, + void *user_data, + hb_destroy_func_t destroy); + +/** + * hb_paint_funcs_set_color_func: + * @funcs: A paint functions struct + * @func: (closure user_data) (destroy destroy) (scope notified): The paint-color callback + * @user_data: Data to pass to @func + * @destroy: (nullable): Function to call when @user_data is no longer needed + * + * Sets the paint-color callback on the paint functions struct. + * + * Since: 7.0.0 + */ +HB_EXTERN void +hb_paint_funcs_set_color_func (hb_paint_funcs_t *funcs, + hb_paint_color_func_t func, + void *user_data, + hb_destroy_func_t destroy); + +/** + * hb_paint_funcs_set_image_func: + * @funcs: A paint functions struct + * @func: (closure user_data) (destroy destroy) (scope notified): The paint-image callback + * @user_data: Data to pass to @func + * @destroy: (nullable): Function to call when @user_data is no longer needed + * + * Sets the paint-image callback on the paint functions struct. + * + * Since: 7.0.0 + */ +HB_EXTERN void +hb_paint_funcs_set_image_func (hb_paint_funcs_t *funcs, + hb_paint_image_func_t func, + void *user_data, + hb_destroy_func_t destroy); + +/** + * hb_paint_funcs_set_linear_gradient_func: + * @funcs: A paint functions struct + * @func: (closure user_data) (destroy destroy) (scope notified): The linear-gradient callback + * @user_data: Data to pass to @func + * @destroy: (nullable): Function to call when @user_data is no longer needed + * + * Sets the linear-gradient callback on the paint functions struct. + * + * Since: 7.0.0 + */ +HB_EXTERN void +hb_paint_funcs_set_linear_gradient_func (hb_paint_funcs_t *funcs, + hb_paint_linear_gradient_func_t func, + void *user_data, + hb_destroy_func_t destroy); + +/** + * hb_paint_funcs_set_radial_gradient_func: + * @funcs: A paint functions struct + * @func: (closure user_data) (destroy destroy) (scope notified): The radial-gradient callback + * @user_data: Data to pass to @func + * @destroy: (nullable): Function to call when @user_data is no longer needed + * + * Sets the radial-gradient callback on the paint functions struct. + * + * Since: 7.0.0 + */ +HB_EXTERN void +hb_paint_funcs_set_radial_gradient_func (hb_paint_funcs_t *funcs, + hb_paint_radial_gradient_func_t func, + void *user_data, + hb_destroy_func_t destroy); + +/** + * hb_paint_funcs_set_sweep_gradient_func: + * @funcs: A paint functions struct + * @func: (closure user_data) (destroy destroy) (scope notified): The sweep-gradient callback + * @user_data: Data to pass to @func + * @destroy: (nullable): Function to call when @user_data is no longer needed + * + * Sets the sweep-gradient callback on the paint functions struct. + * + * Since: 7.0.0 + */ +HB_EXTERN void +hb_paint_funcs_set_sweep_gradient_func (hb_paint_funcs_t *funcs, + hb_paint_sweep_gradient_func_t func, + void *user_data, + hb_destroy_func_t destroy); + +/** + * hb_paint_funcs_set_push_group_func: + * @funcs: A paint functions struct + * @func: (closure user_data) (destroy destroy) (scope notified): The push-group callback + * @user_data: Data to pass to @func + * @destroy: (nullable): Function to call when @user_data is no longer needed + * + * Sets the push-group callback on the paint functions struct. + * + * Since: 7.0.0 + */ +HB_EXTERN void +hb_paint_funcs_set_push_group_func (hb_paint_funcs_t *funcs, + hb_paint_push_group_func_t func, + void *user_data, + hb_destroy_func_t destroy); + +/** + * hb_paint_funcs_set_pop_group_func: + * @funcs: A paint functions struct + * @func: (closure user_data) (destroy destroy) (scope notified): The pop-group callback + * @user_data: Data to pass to @func + * @destroy: (nullable): Function to call when @user_data is no longer needed + * + * Sets the pop-group callback on the paint functions struct. + * + * Since: 7.0.0 + */ +HB_EXTERN void +hb_paint_funcs_set_pop_group_func (hb_paint_funcs_t *funcs, + hb_paint_pop_group_func_t func, + void *user_data, + hb_destroy_func_t destroy); + +/** + * hb_paint_funcs_set_custom_palette_color_func: + * @funcs: A paint functions struct + * @func: (closure user_data) (destroy destroy) (scope notified): The custom-palette-color callback + * @user_data: Data to pass to @func + * @destroy: (nullable): Function to call when @user_data is no longer needed + * + * Sets the custom-palette-color callback on the paint functions struct. + * + * Since: 7.0.0 + */ +HB_EXTERN void +hb_paint_funcs_set_custom_palette_color_func (hb_paint_funcs_t *funcs, + hb_paint_custom_palette_color_func_t func, + void *user_data, + hb_destroy_func_t destroy); +/* + * Manual API + */ + +HB_EXTERN void +hb_paint_push_transform (hb_paint_funcs_t *funcs, void *paint_data, + float xx, float yx, + float xy, float yy, + float dx, float dy); + +HB_EXTERN void +hb_paint_pop_transform (hb_paint_funcs_t *funcs, void *paint_data); + +HB_EXTERN void +hb_paint_push_clip_glyph (hb_paint_funcs_t *funcs, void *paint_data, + hb_codepoint_t glyph, + hb_font_t *font); + +HB_EXTERN void +hb_paint_push_clip_rectangle (hb_paint_funcs_t *funcs, void *paint_data, + float xmin, float ymin, + float xmax, float ymax); + +HB_EXTERN void +hb_paint_pop_clip (hb_paint_funcs_t *funcs, void *paint_data); + +HB_EXTERN void +hb_paint_color (hb_paint_funcs_t *funcs, void *paint_data, + hb_bool_t is_foreground, + hb_color_t color); + +HB_EXTERN void +hb_paint_image (hb_paint_funcs_t *funcs, void *paint_data, + hb_blob_t *image, + unsigned int width, + unsigned int height, + hb_tag_t format, + float slant, + hb_glyph_extents_t *extents); + +HB_EXTERN void +hb_paint_linear_gradient (hb_paint_funcs_t *funcs, void *paint_data, + hb_color_line_t *color_line, + float x0, float y0, + float x1, float y1, + float x2, float y2); + +HB_EXTERN void +hb_paint_radial_gradient (hb_paint_funcs_t *funcs, void *paint_data, + hb_color_line_t *color_line, + float x0, float y0, + float r0, + float x1, float y1, + float r1); + +HB_EXTERN void +hb_paint_sweep_gradient (hb_paint_funcs_t *funcs, void *paint_data, + hb_color_line_t *color_line, + float x0, float y0, + float start_angle, float end_angle); + +HB_EXTERN void +hb_paint_push_group (hb_paint_funcs_t *funcs, void *paint_data); + +HB_EXTERN void +hb_paint_pop_group (hb_paint_funcs_t *funcs, void *paint_data, + hb_paint_composite_mode_t mode); + +HB_EXTERN hb_bool_t +hb_paint_custom_palette_color (hb_paint_funcs_t *funcs, void *paint_data, + unsigned int color_index, + hb_color_t *color); + +HB_END_DECLS + +#endif /* HB_PAINT_H */ diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-paint.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-paint.hh new file mode 100644 index 0000000000000000000000000000000000000000..f7b71aa19b06dcbe059c35b5ef26564a640ff4a1 --- /dev/null +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-paint.hh @@ -0,0 +1,228 @@ +/* + * Copyright © 2022 Matthias Clasen + * + * This is part of HarfBuzz, a text shaping library. + * + * 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. + */ + +#ifndef HB_PAINT_HH +#define HB_PAINT_HH + +#include "hb.hh" +#include "hb-face.hh" +#include "hb-font.hh" + +#define HB_PAINT_FUNCS_IMPLEMENT_CALLBACKS \ + HB_PAINT_FUNC_IMPLEMENT (push_transform) \ + HB_PAINT_FUNC_IMPLEMENT (pop_transform) \ + HB_PAINT_FUNC_IMPLEMENT (push_clip_glyph) \ + HB_PAINT_FUNC_IMPLEMENT (push_clip_rectangle) \ + HB_PAINT_FUNC_IMPLEMENT (pop_clip) \ + HB_PAINT_FUNC_IMPLEMENT (color) \ + HB_PAINT_FUNC_IMPLEMENT (image) \ + HB_PAINT_FUNC_IMPLEMENT (linear_gradient) \ + HB_PAINT_FUNC_IMPLEMENT (radial_gradient) \ + HB_PAINT_FUNC_IMPLEMENT (sweep_gradient) \ + HB_PAINT_FUNC_IMPLEMENT (push_group) \ + HB_PAINT_FUNC_IMPLEMENT (pop_group) \ + HB_PAINT_FUNC_IMPLEMENT (custom_palette_color) \ + /* ^--- Add new callbacks here */ + +struct hb_paint_funcs_t +{ + hb_object_header_t header; + + struct { +#define HB_PAINT_FUNC_IMPLEMENT(name) hb_paint_##name##_func_t name; + HB_PAINT_FUNCS_IMPLEMENT_CALLBACKS +#undef HB_PAINT_FUNC_IMPLEMENT + } func; + + struct { +#define HB_PAINT_FUNC_IMPLEMENT(name) void *name; + HB_PAINT_FUNCS_IMPLEMENT_CALLBACKS +#undef HB_PAINT_FUNC_IMPLEMENT + } *user_data; + + struct { +#define HB_PAINT_FUNC_IMPLEMENT(name) hb_destroy_func_t name; + HB_PAINT_FUNCS_IMPLEMENT_CALLBACKS +#undef HB_PAINT_FUNC_IMPLEMENT + } *destroy; + + void push_transform (void *paint_data, + float xx, float yx, + float xy, float yy, + float dx, float dy) + { func.push_transform (this, paint_data, + xx, yx, xy, yy, dx, dy, + !user_data ? nullptr : user_data->push_transform); } + void pop_transform (void *paint_data) + { func.pop_transform (this, paint_data, + !user_data ? nullptr : user_data->pop_transform); } + void push_clip_glyph (void *paint_data, + hb_codepoint_t glyph, + hb_font_t *font) + { func.push_clip_glyph (this, paint_data, + glyph, + font, + !user_data ? nullptr : user_data->push_clip_glyph); } + void push_clip_rectangle (void *paint_data, + float xmin, float ymin, float xmax, float ymax) + { func.push_clip_rectangle (this, paint_data, + xmin, ymin, xmax, ymax, + !user_data ? nullptr : user_data->push_clip_rectangle); } + void pop_clip (void *paint_data) + { func.pop_clip (this, paint_data, + !user_data ? nullptr : user_data->pop_clip); } + void color (void *paint_data, + hb_bool_t is_foreground, + hb_color_t color) + { func.color (this, paint_data, + is_foreground, color, + !user_data ? nullptr : user_data->color); } + bool image (void *paint_data, + hb_blob_t *image, + unsigned width, unsigned height, + hb_tag_t format, + float slant, + hb_glyph_extents_t *extents) + { return func.image (this, paint_data, + image, width, height, format, slant, extents, + !user_data ? nullptr : user_data->image); } + void linear_gradient (void *paint_data, + hb_color_line_t *color_line, + float x0, float y0, + float x1, float y1, + float x2, float y2) + { func.linear_gradient (this, paint_data, + color_line, x0, y0, x1, y1, x2, y2, + !user_data ? nullptr : user_data->linear_gradient); } + void radial_gradient (void *paint_data, + hb_color_line_t *color_line, + float x0, float y0, float r0, + float x1, float y1, float r1) + { func.radial_gradient (this, paint_data, + color_line, x0, y0, r0, x1, y1, r1, + !user_data ? nullptr : user_data->radial_gradient); } + void sweep_gradient (void *paint_data, + hb_color_line_t *color_line, + float x0, float y0, + float start_angle, + float end_angle) + { func.sweep_gradient (this, paint_data, + color_line, x0, y0, start_angle, end_angle, + !user_data ? nullptr : user_data->sweep_gradient); } + void push_group (void *paint_data) + { func.push_group (this, paint_data, + !user_data ? nullptr : user_data->push_group); } + void pop_group (void *paint_data, + hb_paint_composite_mode_t mode) + { func.pop_group (this, paint_data, + mode, + !user_data ? nullptr : user_data->pop_group); } + bool custom_palette_color (void *paint_data, + unsigned int color_index, + hb_color_t *color) + { return func.custom_palette_color (this, paint_data, + color_index, + color, + !user_data ? nullptr : user_data->custom_palette_color); } + + + /* Internal specializations. */ + + void push_root_transform (void *paint_data, + const hb_font_t *font) + { + float upem = font->face->get_upem (); + int xscale = font->x_scale, yscale = font->y_scale; + float slant = font->slant_xy; + + push_transform (paint_data, + xscale/upem, 0, slant * yscale/upem, yscale/upem, 0, 0); + } + + void push_inverse_root_transform (void *paint_data, + hb_font_t *font) + { + float upem = font->face->get_upem (); + int xscale = font->x_scale ? font->x_scale : upem; + int yscale = font->y_scale ? font->y_scale : upem; + float slant = font->slant_xy; + + push_transform (paint_data, + upem/xscale, 0, -slant * upem/xscale, upem/yscale, 0, 0); + } + + HB_NODISCARD + bool push_translate (void *paint_data, + float dx, float dy) + { + if (!dx && !dy) + return false; + + push_transform (paint_data, + 1.f, 0.f, 0.f, 1.f, dx, dy); + return true; + } + + HB_NODISCARD + bool push_scale (void *paint_data, + float sx, float sy) + { + if (sx == 1.f && sy == 1.f) + return false; + + push_transform (paint_data, + sx, 0.f, 0.f, sy, 0.f, 0.f); + return true; + } + + HB_NODISCARD + bool push_rotate (void *paint_data, + float a) + { + if (!a) + return false; + + float cc = cosf (a * (float) M_PI); + float ss = sinf (a * (float) M_PI); + push_transform (paint_data, cc, ss, -ss, cc, 0.f, 0.f); + return true; + } + + HB_NODISCARD + bool push_skew (void *paint_data, + float sx, float sy) + { + if (!sx && !sy) + return false; + + float x = tanf (-sx * (float) M_PI); + float y = tanf (+sy * (float) M_PI); + push_transform (paint_data, 1.f, y, x, 1.f, 0.f, 0.f); + return true; + } +}; +DECLARE_NULL_INSTANCE (hb_paint_funcs_t); + + +#endif /* HB_PAINT_HH */ diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-pool.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-pool.hh index e4bb64f627d8cdf31a9464b3ad9e81516703b1a2..ee43721a384c162cc3b6c705731d7c24bedf509e 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-pool.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-pool.hh @@ -31,7 +31,7 @@ /* Memory pool for persistent allocation of small objects. */ -template <typename T, unsigned ChunkLen = 16> +template <typename T, unsigned ChunkLen = 32> struct hb_pool_t { hb_pool_t () : next (nullptr) {} diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-priority-queue.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-priority-queue.hh index ac76b7d9556e350473856440afe9e98681821db7..93a7842eb0a2ac6220422879ef79bbf53835097d 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-priority-queue.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-priority-queue.hh @@ -62,7 +62,7 @@ struct hb_priority_queue_t item_t result = heap.arrayZ[0]; heap.arrayZ[0] = heap.arrayZ[heap.length - 1]; - heap.shrink (heap.length - 1); + heap.resize (heap.length - 1); if (!is_empty ()) bubble_down (0); diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-repacker.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-repacker.hh index 7a3143cec3a4f2706549538fa35000937de5cd84..cd57ade0722f98ded5485f90618b5acdcbc7fe2c 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-repacker.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-repacker.hh @@ -115,7 +115,7 @@ bool _promote_extensions_if_needed (graph::gsubgpos_graph_context_t& ext_context if (!ext_context.lookups) return true; hb_vector_t<lookup_size_t> lookup_sizes; - lookup_sizes.alloc (ext_context.lookups.get_population ()); + lookup_sizes.alloc (ext_context.lookups.get_population (), true); for (unsigned lookup_index : ext_context.lookups.keys ()) { @@ -216,7 +216,7 @@ bool _try_isolating_subgraphs (const hb_vector_t<graph::overflow_record_t>& over } DEBUG_MSG (SUBSET_REPACK, nullptr, - "Overflow in space %d (%d roots). Moving %d roots to space %d.", + "Overflow in space %u (%u roots). Moving %u roots to space %u.", space, sorted_graph.num_roots_for_space (space), roots_to_isolate.get_population (), @@ -326,7 +326,7 @@ hb_resolve_graph_overflows (hb_tag_t table_tag, while (!sorted_graph.in_error () && graph::will_overflow (sorted_graph, &overflows) && round < max_rounds) { - DEBUG_MSG (SUBSET_REPACK, nullptr, "=== Overflow resolution round %d ===", round); + DEBUG_MSG (SUBSET_REPACK, nullptr, "=== Overflow resolution round %u ===", round); print_overflows (sorted_graph, overflows); hb_set_t priority_bumped_parents; diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-sanitize.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-sanitize.hh index bd3250e580adeb59a534e94a5725f79a583bcc8e..eb907c6b2af6ae82fb5885771bc61c045d349e53 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-sanitize.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-sanitize.hh @@ -240,7 +240,7 @@ struct hb_sanitize_context_t : DEBUG_MSG_LEVEL (SANITIZE, p, this->debug_depth+1, 0, "check_range [%p..%p]" - " (%d bytes) in [%p..%p] -> %s", + " (%u bytes) in [%p..%p] -> %s", p, p + len, len, this->start, this->end, ok ? "OK" : "OUT-OF-RANGE"); @@ -308,7 +308,7 @@ struct hb_sanitize_context_t : this->edit_count++; DEBUG_MSG_LEVEL (SANITIZE, p, this->debug_depth+1, 0, - "may_edit(%u) [%p..%p] (%d bytes) in [%p..%p] -> %s", + "may_edit(%u) [%p..%p] (%u bytes) in [%p..%p] -> %s", this->edit_count, p, p + len, len, this->start, this->end, @@ -353,13 +353,13 @@ struct hb_sanitize_context_t : { if (edit_count) { - DEBUG_MSG_FUNC (SANITIZE, start, "passed first round with %d edits; going for second round", edit_count); + DEBUG_MSG_FUNC (SANITIZE, start, "passed first round with %u edits; going for second round", edit_count); /* sanitize again to ensure no toe-stepping */ edit_count = 0; sane = t->sanitize (this); if (edit_count) { - DEBUG_MSG_FUNC (SANITIZE, start, "requested %d edits in second round; FAILLING", edit_count); + DEBUG_MSG_FUNC (SANITIZE, start, "requested %u edits in second round; FAILLING", edit_count); sane = false; } } diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-serialize.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-serialize.hh index d5573281f19c4c677cae0e572c71aeb854b8d181..61ec0253a0e10d293fa71496500b88f9f9d4bc57 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-serialize.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-serialize.hh @@ -81,11 +81,11 @@ struct hb_serialize_context_t head = o.head; tail = o.tail; next = nullptr; - real_links.alloc (o.num_real_links); + real_links.alloc (o.num_real_links, true); for (unsigned i = 0 ; i < o.num_real_links; i++) real_links.push (o.real_links[i]); - virtual_links.alloc (o.num_virtual_links); + virtual_links.alloc (o.num_virtual_links, true); for (unsigned i = 0; i < o.num_virtual_links; i++) virtual_links.push (o.virtual_links[i]); } @@ -629,6 +629,13 @@ struct hb_serialize_context_t template <typename Type> Type *embed (const Type &obj) { return embed (std::addressof (obj)); } + char *embed (const char *obj, unsigned size) + { + char *ret = this->allocate_size<char> (size, false); + if (unlikely (!ret)) return nullptr; + hb_memcpy (ret, obj, size); + return ret; + } template <typename Type, typename ...Ts> auto _copy (const Type &src, hb_priority<1>, Ts&&... ds) HB_RETURN diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-set.cc b/source/libs/harfbuzz/harfbuzz-src/src/hb-set.cc index 0270b21998cc81773d36197f838da8b68329b3c4..97caddb226211b351a2268352fa915758954a751 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-set.cc +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-set.cc @@ -174,7 +174,7 @@ hb_set_allocation_successful (const hb_set_t *set) * * Allocate a copy of @set. * - * Return value: Newly-allocated set. + * Return value: (transfer full): Newly-allocated set. * * Since: 2.8.2 **/ @@ -182,7 +182,9 @@ hb_set_t * hb_set_copy (const hb_set_t *set) { hb_set_t *copy = hb_set_create (); - if (unlikely (!copy)) return nullptr; + if (unlikely (copy->in_error ())) + return hb_set_get_empty (); + copy->set (*set); return copy; } @@ -491,6 +493,22 @@ hb_set_invert (hb_set_t *set) set->invert (); } +/** + * hb_set_is_inverted: + * @set: A set + * + * Returns whether the set is inverted. + * + * Return value: `true` if the set is inverted, `false` otherwise + * + * Since: 7.0.0 + **/ +hb_bool_t +hb_set_is_inverted (const hb_set_t *set) +{ + return set->is_inverted (); +} + /** * hb_set_get_population: * @set: A set diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-set.h b/source/libs/harfbuzz/harfbuzz-src/src/hb-set.h index 93636ab5d72b8fbea816cb2b3aa91739af3bbb22..de532310306975197e269c29211ef2078860a2b2 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-set.h +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-set.h @@ -97,6 +97,9 @@ hb_set_is_empty (const hb_set_t *set); HB_EXTERN void hb_set_invert (hb_set_t *set); +HB_EXTERN hb_bool_t +hb_set_is_inverted (const hb_set_t *set); + HB_EXTERN hb_bool_t hb_set_has (const hb_set_t *set, hb_codepoint_t codepoint); diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-set.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-set.hh index f958a081fbb7cdd2b6a8712d911dbf1e54dcab76..604802381b9128ce6fceedfc9743072f409e68d2 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-set.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-set.hh @@ -79,6 +79,7 @@ struct hb_sparseset_t void reset () { s.reset (); } void clear () { s.clear (); } void invert () { s.invert (); } + bool is_inverted () const { return s.is_inverted (); } bool is_empty () const { return s.is_empty (); } uint32_t hash () const { return s.hash (); } @@ -170,6 +171,11 @@ struct hb_set_t : hb_sparseset_t<hb_bit_set_invertible_t> template <typename Iterable, hb_requires (hb_is_iterable (Iterable))> hb_set_t (const Iterable &o) : sparseset (o) {} + + hb_set_t& operator << (hb_codepoint_t v) + { sparseset::operator<< (v); return *this; } + hb_set_t& operator << (const hb_pair_t<hb_codepoint_t, hb_codepoint_t>& range) + { sparseset::operator<< (range); return *this; } }; static_assert (hb_set_t::INVALID == HB_SET_VALUE_INVALID, ""); diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-shape-plan.cc b/source/libs/harfbuzz/harfbuzz-src/src/hb-shape-plan.cc index cabcbd4e7232608f51a9085ac1d6b2ca6e353693..312eeb653e5fdb0bab380f8bdcda250adaaa92aa 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-shape-plan.cc +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-shape-plan.cc @@ -227,7 +227,7 @@ hb_shape_plan_create2 (hb_face_t *face, const char * const *shaper_list) { DEBUG_MSG_FUNC (SHAPE_PLAN, nullptr, - "face=%p num_features=%d num_coords=%d shaper_list=%p", + "face=%p num_features=%u num_coords=%u shaper_list=%p", face, num_user_features, num_coords, @@ -391,7 +391,7 @@ _hb_shape_plan_execute_internal (hb_shape_plan_t *shape_plan, unsigned int num_features) { DEBUG_MSG_FUNC (SHAPE_PLAN, shape_plan, - "num_features=%d shaper_func=%p, shaper_name=%s", + "num_features=%u shaper_func=%p, shaper_name=%s", num_features, shape_plan->key.shaper_func, shape_plan->key.shaper_name); @@ -520,7 +520,7 @@ hb_shape_plan_create_cached2 (hb_face_t *face, const char * const *shaper_list) { DEBUG_MSG_FUNC (SHAPE_PLAN, nullptr, - "face=%p num_features=%d shaper_list=%p", + "face=%p num_features=%u shaper_list=%p", face, num_user_features, shaper_list); diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-static.cc b/source/libs/harfbuzz/harfbuzz-src/src/hb-static.cc index eac50754c2fa2408822a41ea7c5e3640b329ebc2..5f647c6ad9ba520bff086a89520abe9d6692c602 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-static.cc +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-static.cc @@ -33,13 +33,12 @@ #include "hb-aat-layout-feat-table.hh" #include "hb-ot-layout-common.hh" #include "hb-ot-cmap-table.hh" -#include "hb-ot-color-colr-table.hh" +#include "OT/Color/COLR/COLR.hh" #include "hb-ot-glyf-table.hh" #include "hb-ot-head-table.hh" #include "hb-ot-maxp-table.hh" #ifndef HB_NO_VISIBILITY -#include "hb-ot-name-language-static.hh" uint64_t const _hb_NullPool[(HB_NULL_POOL_SIZE + sizeof (uint64_t) - 1) / sizeof (uint64_t)] = {}; /*thread_local*/ uint64_t _hb_CrapPool[(HB_NULL_POOL_SIZE + sizeof (uint64_t) - 1) / sizeof (uint64_t)] = {}; @@ -109,36 +108,4 @@ hb_face_t::load_upem () const } -/* hb_user_data_array_t */ - -bool -hb_user_data_array_t::set (hb_user_data_key_t *key, - void * data, - hb_destroy_func_t destroy, - hb_bool_t replace) -{ - if (!key) - return false; - - if (replace) { - if (!data && !destroy) { - items.remove (key, lock); - return true; - } - } - hb_user_data_item_t item = {key, data, destroy}; - bool ret = !!items.replace_or_insert (item, lock, (bool) replace); - - return ret; -} - -void * -hb_user_data_array_t::get (hb_user_data_key_t *key) -{ - hb_user_data_item_t item = {nullptr, nullptr, nullptr}; - - return items.find (key, &item, lock) ? item.data : nullptr; -} - - #endif diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-accelerator.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-accelerator.hh index 63ae6d77e28dbf47f677153475a234b1fc31a6a8..e523c258203855a23a1a897c4365504634df30b2 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-accelerator.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-accelerator.hh @@ -56,37 +56,48 @@ struct hb_subset_accelerator_t const hb_set_t& unicodes_, bool has_seac_) { hb_subset_accelerator_t* accel = - (hb_subset_accelerator_t*) hb_malloc (sizeof(hb_subset_accelerator_t)); - new (accel) hb_subset_accelerator_t (unicode_to_gid_, gid_to_unicodes_, unicodes_); - accel->has_seac = has_seac_; - return accel; - } + (hb_subset_accelerator_t*) hb_calloc (1, sizeof(hb_subset_accelerator_t)); - static void destroy(void* value) { - if (!value) return; + new (accel) hb_subset_accelerator_t (unicode_to_gid_, + gid_to_unicodes_, + unicodes_, + has_seac_); - hb_subset_accelerator_t* accel = (hb_subset_accelerator_t*) value; + return accel; + } - if (accel->cff_accelerator && accel->destroy_cff_accelerator) - accel->destroy_cff_accelerator ((void*) accel->cff_accelerator); + static void destroy (void* p) + { + if (!p) return; - if (accel->cmap_cache && accel->destroy_cmap_cache) - accel->destroy_cmap_cache ((void*) accel->cmap_cache); + hb_subset_accelerator_t *accel = (hb_subset_accelerator_t *) p; accel->~hb_subset_accelerator_t (); + hb_free (accel); } hb_subset_accelerator_t (const hb_map_t& unicode_to_gid_, const hb_multimap_t& gid_to_unicodes_, - const hb_set_t& unicodes_) - : unicode_to_gid(unicode_to_gid_), gid_to_unicodes (gid_to_unicodes_), unicodes(unicodes_), - cmap_cache(nullptr), destroy_cmap_cache(nullptr), - has_seac(false), cff_accelerator(nullptr), destroy_cff_accelerator(nullptr) - { sanitized_table_cache_lock.init (); } + const hb_set_t& unicodes_, + bool has_seac_) : + unicode_to_gid(unicode_to_gid_), + gid_to_unicodes (gid_to_unicodes_), + unicodes(unicodes_), + cmap_cache(nullptr), + destroy_cmap_cache(nullptr), + has_seac(has_seac_), + cff_accelerator(nullptr), + destroy_cff_accelerator(nullptr) {} ~hb_subset_accelerator_t () - { sanitized_table_cache_lock.fini (); } + { + if (cff_accelerator && destroy_cff_accelerator) + destroy_cff_accelerator ((void*) cff_accelerator); + + if (cmap_cache && destroy_cmap_cache) + destroy_cmap_cache ((void*) cmap_cache); + } // Generic diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-cff-common.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-cff-common.hh index 8bbc017656fd4d41a362067fc39aa219e3bc1c56..ff50b0e5185f3cf5edbb995887400e8e48a5e3d7 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-cff-common.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-cff-common.hh @@ -81,7 +81,8 @@ struct str_encoder_t } } - void encode_num (const number_t& n) + // Encode number for CharString + void encode_num_cs (const number_t& n) { if (n.in_int_range ()) { @@ -98,6 +99,91 @@ struct str_encoder_t } } + // Encode number for TopDict / Private + void encode_num_tp (const number_t& n) + { + if (n.in_int_range ()) + { + // TODO longint + encode_int (n.to_int ()); + } + else + { + // Sigh. BCD + // https://learn.microsoft.com/en-us/typography/opentype/spec/cff2#table-5-nibble-definitions + double v = n.to_real (); + encode_byte (OpCode_BCD); + + // Based on: + // https://github.com/fonttools/fonttools/blob/97ed3a61cde03e17b8be36f866192fbd56f1d1a7/Lib/fontTools/misc/psCharStrings.py#L265-L294 + + char buf[16]; + /* FontTools has the following comment: + * + * # Note: 14 decimal digits seems to be the limitation for CFF real numbers + * # in macOS. However, we use 8 here to match the implementation of AFDKO. + * + * We use 8 here to match FontTools X-). + */ + + hb_locale_t clocale HB_UNUSED; + hb_locale_t oldlocale HB_UNUSED; + oldlocale = hb_uselocale (clocale = newlocale (LC_ALL_MASK, "C", NULL)); + snprintf (buf, sizeof (buf), "%.8G", v); + (void) hb_uselocale (((void) freelocale (clocale), oldlocale)); + + char *s = buf; + if (s[0] == '0' && s[1] == '.') + s++; + else if (s[0] == '-' && s[1] == '0' && s[2] == '.') + { + s[1] = '-'; + s++; + } + hb_vector_t<char> nibbles; + while (*s) + { + char c = s[0]; + s++; + + switch (c) + { + case 'E': + { + char c2 = *s; + if (c2 == '-') + { + s++; + nibbles.push (0x0C); // E- + continue; + } + if (c2 == '+') + s++; + nibbles.push (0x0B); // E + continue; + } + + case '.': case ',': // Comma for some European locales in case no uselocale available. + nibbles.push (0x0A); // . + continue; + + case '-': + nibbles.push (0x0E); // . + continue; + } + + nibbles.push (c - '0'); + } + nibbles.push (0x0F); + if (nibbles.length % 2) + nibbles.push (0x0F); + + unsigned count = nibbles.length; + for (unsigned i = 0; i < count; i += 2) + encode_byte ((nibbles[i] << 4) | nibbles[i+1]); + } + } + void encode_op (op_code_t op) { if (Is_OpCode_ESC (op)) @@ -190,39 +276,11 @@ struct cff_font_dict_op_serializer_t : op_serializer_t } }; -struct cff_private_dict_op_serializer_t : op_serializer_t -{ - cff_private_dict_op_serializer_t (bool desubroutinize_, bool drop_hints_) - : desubroutinize (desubroutinize_), drop_hints (drop_hints_) {} - - bool serialize (hb_serialize_context_t *c, - const op_str_t &opstr, - objidx_t subrs_link) const - { - TRACE_SERIALIZE (this); - - if (drop_hints && dict_opset_t::is_hint_op (opstr.op)) - return true; - if (opstr.op == OpCode_Subrs) - { - if (desubroutinize || !subrs_link) - return_trace (true); - else - return_trace (FontDict::serialize_link2_op (c, opstr.op, subrs_link)); - } - else - return_trace (copy_opstr (c, opstr)); - } - - protected: - const bool desubroutinize; - const bool drop_hints; -}; - struct flatten_param_t { str_buff_t &flatStr; bool drop_hints; + const hb_subset_plan_t *plan; }; template <typename ACC, typename ENV, typename OPSET, op_code_t endchar_op=OpCode_Invalid> @@ -235,7 +293,7 @@ struct subr_flattener_t bool flatten (str_buff_vec_t &flat_charstrings) { unsigned count = plan->num_output_glyphs (); - if (!flat_charstrings.resize (count)) + if (!flat_charstrings.resize_exact (count)) return false; for (unsigned int i = 0; i < count; i++) { @@ -250,11 +308,15 @@ struct subr_flattener_t unsigned int fd = acc.fdSelect->get_fd (glyph); if (unlikely (fd >= acc.fdCount)) return false; - ENV env (str, acc, fd); + + + ENV env (str, acc, fd, + plan->normalized_coords.arrayZ, plan->normalized_coords.length); cs_interpreter_t<ENV, OPSET, flatten_param_t> interp (env); flatten_param_t param = { flat_charstrings.arrayZ[i], - (bool) (plan->flags & HB_SUBSET_FLAGS_NO_HINTING) + (bool) (plan->flags & HB_SUBSET_FLAGS_NO_HINTING), + plan }; if (unlikely (!interp.interpret (param))) return false; @@ -270,7 +332,7 @@ struct subr_closures_t { subr_closures_t (unsigned int fd_count) : global_closure (), local_closures () { - local_closures.resize (fd_count); + local_closures.resize_exact (fd_count); } void reset () @@ -361,6 +423,35 @@ struct parsed_cs_str_t : parsed_values_t<parsed_cs_op_t> bool has_calls () const { return has_calls_; } + void compact () + { + unsigned count = values.length; + if (!count) return; + auto &opstr = values.arrayZ; + unsigned j = 0; + for (unsigned i = 1; i < count; i++) + { + /* See if we can combine op j and op i. */ + bool combine = + (opstr[j].op != OpCode_callsubr && opstr[j].op != OpCode_callgsubr) && + (opstr[i].op != OpCode_callsubr && opstr[i].op != OpCode_callgsubr) && + (opstr[j].is_hinting () == opstr[i].is_hinting ()) && + (opstr[j].ptr + opstr[j].length == opstr[i].ptr) && + (opstr[j].length + opstr[i].length <= 255); + + if (combine) + { + opstr[j].length += opstr[i].length; + opstr[j].op = OpCode_Invalid; + } + else + { + opstr[++j] = opstr[i]; + } + } + values.shrink (j + 1); + } + protected: bool parsed : 1; bool hint_dropped : 1; @@ -486,7 +577,7 @@ struct subr_subset_param_t else { if (!parsed_str->is_parsed ()) - parsed_str->alloc (env.str_ref.total_size () / 2); + parsed_str->alloc (env.str_ref.total_size ()); current_parsed_str = parsed_str; } } @@ -589,12 +680,12 @@ struct subr_subsetter_t if (cff_accelerator) { // If we are not dropping hinting then charstrings are not modified so we can // just use a reference to the cached copies. - cached_charstrings.resize (plan->num_output_glyphs ()); + cached_charstrings.resize_exact (plan->num_output_glyphs ()); parsed_global_subrs = &cff_accelerator->parsed_global_subrs; parsed_local_subrs = &cff_accelerator->parsed_local_subrs; } else { - parsed_charstrings.resize (plan->num_output_glyphs ()); - parsed_global_subrs_storage.resize (acc.globalSubrs->count); + parsed_charstrings.resize_exact (plan->num_output_glyphs ()); + parsed_global_subrs_storage.resize_exact (acc.globalSubrs->count); if (unlikely (!parsed_local_subrs_storage.resize (fd_count))) return false; @@ -644,7 +735,7 @@ struct subr_subsetter_t ENV env (str, acc, fd); cs_interpreter_t<ENV, OPSET, subr_subset_param_t> interp (env); - parsed_charstrings[i].alloc (str.length / 2); + parsed_charstrings[i].alloc (str.length); subr_subset_param_t param (&parsed_charstrings[i], &parsed_global_subrs_storage, &parsed_local_subrs_storage[fd], @@ -657,28 +748,10 @@ struct subr_subsetter_t /* complete parsed string esp. copy CFF1 width or CFF2 vsindex to the parsed charstring for encoding */ SUBSETTER::complete_parsed_str (interp.env, param, parsed_charstrings[i]); - } - - // Since parsed strings were loaded from accelerator, we still need - // to compute the subroutine closures which would have normally happened during - // parsing. - if (cff_accelerator && - !closure_subroutines(*parsed_global_subrs, - *parsed_local_subrs)) - return false; - if ((plan->flags & HB_SUBSET_FLAGS_NO_HINTING && !cff_accelerator) || - plan->inprogress_accelerator) - { /* mark hint ops and arguments for drop */ - for (unsigned int i = 0; i < plan->num_output_glyphs (); i++) + if ((plan->flags & HB_SUBSET_FLAGS_NO_HINTING) || plan->inprogress_accelerator) { - hb_codepoint_t glyph; - if (!plan->old_gid_for_new_gid (i, &glyph)) - continue; - unsigned int fd = acc.fdSelect->get_fd (glyph); - if (unlikely (fd >= acc.fdCount)) - return false; subr_subset_param_t param (&parsed_charstrings[i], &parsed_global_subrs_storage, &parsed_local_subrs_storage[fd], @@ -695,21 +768,36 @@ struct subr_subsetter_t } } - /* after dropping hints recreate closures of actually used subrs */ - if (plan->flags & HB_SUBSET_FLAGS_NO_HINTING && - !cff_accelerator && - !closure_subroutines(*parsed_global_subrs, *parsed_local_subrs)) return false; + /* Doing this here one by one instead of compacting all at the en + * has massive peak-memory saving. + * + * The compacting both saves memory and makes further operations + * faster. + */ + parsed_charstrings[i].compact (); } + /* Since parsed strings were loaded from accelerator, we still need + * to compute the subroutine closures which would have normally happened during + * parsing. + * + * Or if we are dropping hinting, redo closure to get actually used subrs. + */ + if ((cff_accelerator || + (!cff_accelerator && plan->flags & HB_SUBSET_FLAGS_NO_HINTING)) && + !closure_subroutines(*parsed_global_subrs, + *parsed_local_subrs)) + return false; + remaps.create (closures); populate_subset_accelerator (); return true; } - bool encode_charstrings (str_buff_vec_t &buffArray) const + bool encode_charstrings (str_buff_vec_t &buffArray, bool encode_prefix = true) const { - if (unlikely (!buffArray.resize (plan->num_output_glyphs ()))) + if (unlikely (!buffArray.resize_exact (plan->num_output_glyphs ()))) return false; for (unsigned int i = 0; i < plan->num_output_glyphs (); i++) { @@ -723,7 +811,7 @@ struct subr_subsetter_t unsigned int fd = acc.fdSelect->get_fd (glyph); if (unlikely (fd >= acc.fdCount)) return false; - if (unlikely (!encode_str (get_parsed_charstring (i), fd, buffArray.arrayZ[i]))) + if (unlikely (!encode_str (get_parsed_charstring (i), fd, buffArray.arrayZ[i], encode_prefix))) return false; } return true; @@ -733,7 +821,7 @@ struct subr_subsetter_t { unsigned int count = remap.get_population (); - if (unlikely (!buffArray.resize (count))) + if (unlikely (!buffArray.resize_exact (count))) return false; for (unsigned int new_num = 0; new_num < count; new_num++) { @@ -953,16 +1041,16 @@ struct subr_subsetter_t } } - bool encode_str (const parsed_cs_str_t &str, const unsigned int fd, str_buff_t &buff) const + bool encode_str (const parsed_cs_str_t &str, const unsigned int fd, str_buff_t &buff, bool encode_prefix = true) const { str_encoder_t encoder (buff); encoder.reset (); bool hinting = !(plan->flags & HB_SUBSET_FLAGS_NO_HINTING); /* if a prefix (CFF1 width or CFF2 vsindex) has been removed along with hints, * re-insert it at the beginning of charstreing */ - if (str.has_prefix () && !hinting && str.is_hint_dropped ()) + if (encode_prefix && str.has_prefix () && !hinting && str.is_hint_dropped ()) { - encoder.encode_num (str.prefix_num ()); + encoder.encode_num_cs (str.prefix_num ()); if (str.prefix_op () != OpCode_Invalid) encoder.encode_op (str.prefix_op ()); } @@ -974,7 +1062,7 @@ struct subr_subsetter_t if (opstr.op == OpCode_callsubr || opstr.op == OpCode_callgsubr) size += 3; } - if (!buff.alloc (buff.length + size)) + if (!buff.alloc (buff.length + size, true)) return false; for (auto &opstr : str.values) @@ -1002,51 +1090,20 @@ struct subr_subsetter_t return !encoder.in_error (); } - void compact_parsed_strings () const + void compact_parsed_subrs () const { - for (auto &cs : parsed_charstrings) - compact_string (cs); for (auto &cs : parsed_global_subrs_storage) - compact_string (cs); + cs.compact (); for (auto &vec : parsed_local_subrs_storage) for (auto &cs : vec) - compact_string (cs); - } - - static void compact_string (parsed_cs_str_t &str) - { - unsigned count = str.values.length; - if (unlikely (!count)) return; - auto &opstr = str.values.arrayZ; - unsigned j = 0; - for (unsigned i = 1; i < count; i++) - { - /* See if we can combine op j and op i. */ - bool combine = - (opstr[j].op != OpCode_callsubr && opstr[j].op != OpCode_callgsubr) && - (opstr[i].op != OpCode_callsubr && opstr[i].op != OpCode_callgsubr) && - (opstr[j].is_hinting () == opstr[i].is_hinting ()) && - (opstr[j].ptr + opstr[j].length == opstr[i].ptr) && - (opstr[j].length + opstr[i].length <= 255); - - if (combine) - { - opstr[j].length += opstr[i].length; - opstr[j].op = OpCode_Invalid; - } - else - { - opstr[++j] = opstr[i]; - } - } - str.values.shrink (j + 1); + cs.compact (); } void populate_subset_accelerator () const { if (!plan->inprogress_accelerator) return; - compact_parsed_strings (); + compact_parsed_subrs (); plan->inprogress_accelerator->cff_accelerator = cff_subset_accelerator_t::create(acc.blob, diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-cff1.cc b/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-cff1.cc index 538f28f5aaf989f9abf6c31104457787716b9f5a..1d7ed6444ac09843c3a57236902d4a28d5c562fc 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-cff1.cc +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-cff1.cc @@ -234,7 +234,7 @@ struct cff1_cs_opset_flatten_t : cff1_cs_opset_t<cff1_cs_opset_flatten_t, flatte { str_encoder_t encoder (param.flatStr); for (unsigned int i = env.arg_start; i < env.argStack.get_count (); i++) - encoder.encode_num (env.eval_arg (i)); + encoder.encode_num_cs (env.eval_arg (i)); SUPER::flush_args (env, param); } @@ -248,7 +248,7 @@ struct cff1_cs_opset_flatten_t : cff1_cs_opset_t<cff1_cs_opset_flatten_t, flatte { assert (env.has_width); str_encoder_t encoder (param.flatStr); - encoder.encode_num (env.width); + encoder.encode_num_cs (env.width); } static void flush_hintmask (op_code_t op, cff1_cs_interp_env_t &env, flatten_param_t& param) @@ -335,6 +335,36 @@ struct cff1_cs_opset_subr_subset_t : cff1_cs_opset_t<cff1_cs_opset_subr_subset_t typedef cff1_cs_opset_t<cff1_cs_opset_subr_subset_t, subr_subset_param_t> SUPER; }; +struct cff1_private_dict_op_serializer_t : op_serializer_t +{ + cff1_private_dict_op_serializer_t (bool desubroutinize_, bool drop_hints_) + : desubroutinize (desubroutinize_), drop_hints (drop_hints_) {} + + bool serialize (hb_serialize_context_t *c, + const op_str_t &opstr, + objidx_t subrs_link) const + { + TRACE_SERIALIZE (this); + + if (drop_hints && dict_opset_t::is_hint_op (opstr.op)) + return_trace (true); + + if (opstr.op == OpCode_Subrs) + { + if (desubroutinize || !subrs_link) + return_trace (true); + else + return_trace (FontDict::serialize_link2_op (c, opstr.op, subrs_link)); + } + + return_trace (copy_opstr (c, opstr)); + } + + protected: + const bool desubroutinize; + const bool drop_hints; +}; + struct cff1_subr_subsetter_t : subr_subsetter_t<cff1_subr_subsetter_t, CFF1Subrs, const OT::cff1::accelerator_subset_t, cff1_cs_interp_env_t, cff1_cs_opset_subr_subset_t, OpCode_endchar> { cff1_subr_subsetter_t (const OT::cff1::accelerator_subset_t &acc_, const hb_subset_plan_t *plan_) @@ -721,7 +751,7 @@ static bool _serialize_cff1 (hb_serialize_context_t *c, PrivateDict *pd = c->start_embed<PrivateDict> (); if (unlikely (!pd)) return false; c->push (); - cff_private_dict_op_serializer_t privSzr (plan.desubroutinize, plan.drop_hints); + cff1_private_dict_op_serializer_t privSzr (plan.desubroutinize, plan.drop_hints); /* N.B. local subrs immediately follows its corresponding private dict. i.e., subr offset == private dict size */ if (likely (pd->serialize (c, acc.privateDicts[i], privSzr, subrs_link))) { diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-cff2.cc b/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-cff2.cc index 60946b0281a9bdc073d4513a9512438a0441f10e..8ab4620194b9273fd62fb99b2d87991ae27c514d 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-cff2.cc +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-cff2.cc @@ -59,7 +59,10 @@ struct cff2_top_dict_op_serializer_t : cff_top_dict_op_serializer_t<> switch (opstr.op) { case OpCode_vstore: - return_trace (FontDict::serialize_link4_op(c, opstr.op, info.var_store_link)); + if (info.var_store_link) + return_trace (FontDict::serialize_link4_op(c, opstr.op, info.var_store_link)); + else + return_trace (true); default: return_trace (cff_top_dict_op_serializer_t<>::serialize (c, opstr, info)); @@ -115,7 +118,7 @@ struct cff2_cs_opset_flatten_t : cff2_cs_opset_t<cff2_cs_opset_flatten_t, flatte else { str_encoder_t encoder (param.flatStr); - encoder.encode_num (arg); + encoder.encode_num_cs (arg); i++; } } @@ -135,14 +138,14 @@ struct cff2_cs_opset_flatten_t : cff2_cs_opset_t<cff2_cs_opset_flatten_t, flatte env.set_error (); return; } - encoder.encode_num (arg1); + encoder.encode_num_cs (arg1); } /* flatten deltas for each value */ for (unsigned int j = 0; j < arg.numValues; j++) { const blend_arg_t &arg1 = env.argStack[i + j]; for (unsigned int k = 0; k < arg1.deltas.length; k++) - encoder.encode_num (arg1.deltas[k]); + encoder.encode_num_cs (arg1.deltas[k]); } /* flatten the number of values followed by blend operator */ encoder.encode_int (arg.numValues); @@ -162,6 +165,17 @@ struct cff2_cs_opset_flatten_t : cff2_cs_opset_t<cff2_cs_opset_flatten_t, flatte } } + static void flush_hintmask (op_code_t op, cff2_cs_interp_env_t<blend_arg_t> &env, flatten_param_t& param) + { + SUPER::flush_hintmask (op, env, param); + if (!param.drop_hints) + { + str_encoder_t encoder (param.flatStr); + for (unsigned int i = 0; i < env.hintmask_size; i++) + encoder.encode_byte (env.str_ref[i]); + } + } + private: typedef cff2_cs_opset_t<cff2_cs_opset_flatten_t, flatten_param_t, blend_arg_t> SUPER; typedef cs_opset_t<blend_arg_t, cff2_cs_opset_flatten_t, cff2_cs_opset_flatten_t, cff2_cs_interp_env_t<blend_arg_t>, flatten_param_t> CSOPSET; @@ -232,15 +246,193 @@ struct cff2_subr_subsetter_t : subr_subsetter_t<cff2_subr_subsetter_t, CFF2Subrs } }; -struct cff2_subset_plan { +struct cff2_private_blend_encoder_param_t +{ + cff2_private_blend_encoder_param_t (hb_serialize_context_t *c, + const CFF2VariationStore *varStore, + hb_array_t<int> normalized_coords) : + c (c), varStore (varStore), normalized_coords (normalized_coords) {} + + void init () {} + + void process_blend () + { + if (!seen_blend) + { + region_count = varStore->varStore.get_region_index_count (ivs); + scalars.resize_exact (region_count); + varStore->varStore.get_region_scalars (ivs, normalized_coords.arrayZ, normalized_coords.length, + &scalars[0], region_count); + seen_blend = true; + } + } + + double blend_deltas (hb_array_t<const number_t> deltas) const + { + double v = 0; + if (likely (scalars.length == deltas.length)) + { + unsigned count = scalars.length; + for (unsigned i = 0; i < count; i++) + v += (double) scalars.arrayZ[i] * deltas.arrayZ[i].to_real (); + } + return v; + } + + + hb_serialize_context_t *c = nullptr; + bool seen_blend = false; + unsigned ivs = 0; + unsigned region_count = 0; + hb_vector_t<float> scalars; + const CFF2VariationStore *varStore = nullptr; + hb_array_t<int> normalized_coords; +}; + +struct cff2_private_dict_blend_opset_t : dict_opset_t +{ + static void process_arg_blend (cff2_private_blend_encoder_param_t& param, + number_t &arg, + const hb_array_t<const number_t> blends, + unsigned n, unsigned i) + { + arg.set_int (round (arg.to_real () + param.blend_deltas (blends))); + } + + static void process_blend (cff2_priv_dict_interp_env_t& env, cff2_private_blend_encoder_param_t& param) + { + unsigned int n, k; + + param.process_blend (); + k = param.region_count; + n = env.argStack.pop_uint (); + /* copy the blend values into blend array of the default values */ + unsigned int start = env.argStack.get_count () - ((k+1) * n); + /* let an obvious error case fail, but note CFF2 spec doesn't forbid n==0 */ + if (unlikely (start > env.argStack.get_count ())) + { + env.set_error (); + return; + } + for (unsigned int i = 0; i < n; i++) + { + const hb_array_t<const number_t> blends = env.argStack.sub_array (start + n + (i * k), k); + process_arg_blend (param, env.argStack[start + i], blends, n, i); + } + + /* pop off blend values leaving default values now adorned with blend values */ + env.argStack.pop (k * n); + } + + static void process_op (op_code_t op, cff2_priv_dict_interp_env_t& env, cff2_private_blend_encoder_param_t& param) + { + switch (op) { + case OpCode_StdHW: + case OpCode_StdVW: + case OpCode_BlueScale: + case OpCode_BlueShift: + case OpCode_BlueFuzz: + case OpCode_ExpansionFactor: + case OpCode_LanguageGroup: + case OpCode_BlueValues: + case OpCode_OtherBlues: + case OpCode_FamilyBlues: + case OpCode_FamilyOtherBlues: + case OpCode_StemSnapH: + case OpCode_StemSnapV: + break; + case OpCode_vsindexdict: + env.process_vsindex (); + param.ivs = env.get_ivs (); + env.clear_args (); + return; + case OpCode_blenddict: + process_blend (env, param); + return; + + default: + dict_opset_t::process_op (op, env); + if (!env.argStack.is_empty ()) return; + break; + } + + if (unlikely (env.in_error ())) return; + + // Write args then op + + str_buff_t str; + str_encoder_t encoder (str); + + unsigned count = env.argStack.get_count (); + for (unsigned i = 0; i < count; i++) + encoder.encode_num_tp (env.argStack[i]); + + encoder.encode_op (op); + + auto bytes = str.as_bytes (); + param.c->embed (&bytes, bytes.length); + + env.clear_args (); + } +}; + +struct cff2_private_dict_op_serializer_t : op_serializer_t +{ + cff2_private_dict_op_serializer_t (bool desubroutinize_, bool drop_hints_, bool pinned_, + const CFF::CFF2VariationStore* varStore_, + hb_array_t<int> normalized_coords_) + : desubroutinize (desubroutinize_), drop_hints (drop_hints_), pinned (pinned_), + varStore (varStore_), normalized_coords (normalized_coords_) {} + bool serialize (hb_serialize_context_t *c, + const op_str_t &opstr, + objidx_t subrs_link) const + { + TRACE_SERIALIZE (this); + + if (drop_hints && dict_opset_t::is_hint_op (opstr.op)) + return_trace (true); + + if (opstr.op == OpCode_Subrs) + { + if (desubroutinize || !subrs_link) + return_trace (true); + else + return_trace (FontDict::serialize_link2_op (c, opstr.op, subrs_link)); + } + + if (pinned) + { + // Reinterpret opstr and process blends. + cff2_priv_dict_interp_env_t env {hb_ubytes_t (opstr.ptr, opstr.length)}; + cff2_private_blend_encoder_param_t param (c, varStore, normalized_coords); + dict_interpreter_t<cff2_private_dict_blend_opset_t, cff2_private_blend_encoder_param_t, cff2_priv_dict_interp_env_t> interp (env); + return_trace (interp.interpret (param)); + } + + return_trace (copy_opstr (c, opstr)); + } + + protected: + const bool desubroutinize; + const bool drop_hints; + const bool pinned; + const CFF::CFF2VariationStore* varStore; + hb_array_t<int> normalized_coords; +}; + + +struct cff2_subset_plan +{ bool create (const OT::cff2::accelerator_subset_t &acc, hb_subset_plan_t *plan) { orig_fdcount = acc.fdArray->count; drop_hints = plan->flags & HB_SUBSET_FLAGS_NO_HINTING; - desubroutinize = plan->flags & HB_SUBSET_FLAGS_DESUBROUTINIZE; + pinned = (bool) plan->normalized_coords; + desubroutinize = plan->flags & HB_SUBSET_FLAGS_DESUBROUTINIZE || + pinned; // For instancing we need this path if (desubroutinize) { @@ -259,7 +451,7 @@ struct cff2_subset_plan { return false; /* encode charstrings, global subrs, local subrs with new subroutine numbers */ - if (!subr_subsetter.encode_charstrings (subset_charstrings)) + if (!subr_subsetter.encode_charstrings (subset_charstrings, !pinned)) return false; if (!subr_subsetter.encode_globalsubrs (subset_globalsubrs)) @@ -299,8 +491,9 @@ struct cff2_subset_plan { unsigned int orig_fdcount = 0; unsigned int subset_fdcount = 1; - unsigned int subset_fdselect_size = 0; + unsigned int subset_fdselect_size = 0; unsigned int subset_fdselect_format = 0; + bool pinned = false; hb_vector_t<code_pair_t> subset_fdselect_ranges; hb_inc_bimap_t fdmap; @@ -316,7 +509,8 @@ struct cff2_subset_plan { static bool _serialize_cff2 (hb_serialize_context_t *c, cff2_subset_plan &plan, const OT::cff2::accelerator_subset_t &acc, - unsigned int num_glyphs) + unsigned int num_glyphs, + hb_array_t<int> normalized_coords) { /* private dicts & local subrs */ hb_vector_t<table_info_t> private_dict_infos; @@ -344,7 +538,8 @@ static bool _serialize_cff2 (hb_serialize_context_t *c, PrivateDict *pd = c->start_embed<PrivateDict> (); if (unlikely (!pd)) return false; c->push (); - cff_private_dict_op_serializer_t privSzr (plan.desubroutinize, plan.drop_hints); + cff2_private_dict_op_serializer_t privSzr (plan.desubroutinize, plan.drop_hints, plan.pinned, + acc.varStore, normalized_coords); if (likely (pd->serialize (c, acc.privateDicts[i], privSzr, subrs_link))) { unsigned fd = plan.fdmap[i]; @@ -412,7 +607,8 @@ static bool _serialize_cff2 (hb_serialize_context_t *c, } /* variation store */ - if (acc.varStore != &Null (CFF2VariationStore)) + if (acc.varStore != &Null (CFF2VariationStore) && + !plan.pinned) { c->push (); CFF2VariationStore *dest = c->start_embed<CFF2VariationStore> (); @@ -451,7 +647,8 @@ _hb_subset_cff2 (const OT::cff2::accelerator_subset_t &acc, cff2_subset_plan cff2_plan; if (unlikely (!cff2_plan.create (acc, c->plan))) return false; - return _serialize_cff2 (c->serializer, cff2_plan, acc, c->plan->num_output_glyphs ()); + return _serialize_cff2 (c->serializer, cff2_plan, acc, c->plan->num_output_glyphs (), + c->plan->normalized_coords.as_array ()); } bool diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-input.cc b/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-input.cc index 42434ae0ef18d23ca81654a5a975fe2ab71abd4a..ca59de79a2be2e7af6223d2ff82ee624ddeec749 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-input.cc +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-input.cc @@ -27,46 +27,20 @@ #include "hb-subset.hh" #include "hb-set.hh" #include "hb-utf.hh" -/** - * hb_subset_input_create_or_fail: - * - * Creates a new subset input object. - * - * Return value: (transfer full): New subset input, or `NULL` if failed. Destroy - * with hb_subset_input_destroy(). - * - * Since: 1.8.0 - **/ -hb_subset_input_t * -hb_subset_input_create_or_fail (void) -{ - hb_subset_input_t *input = hb_object_create<hb_subset_input_t>(); - - if (unlikely (!input)) - return nullptr; - for (auto& set : input->sets_iter ()) - set = hb_set_create (); - input->axes_location = hb_hashmap_create<hb_tag_t, float> (); -#ifdef HB_EXPERIMENTAL_API - input->name_table_overrides = hb_hashmap_create<hb_ot_name_record_ids_t, hb_bytes_t> (); -#endif +hb_subset_input_t::hb_subset_input_t () +{ + for (auto& set : sets_iter ()) + set = hb::shared_ptr<hb_set_t> (hb_set_create ()); - if (!input->axes_location || -#ifdef HB_EXPERIMENTAL_API - !input->name_table_overrides || -#endif - input->in_error ()) - { - hb_subset_input_destroy (input); - return nullptr; - } + if (in_error ()) + return; - input->flags = HB_SUBSET_FLAGS_DEFAULT; + flags = HB_SUBSET_FLAGS_DEFAULT; - hb_set_add_range (input->sets.name_ids, 0, 6); - hb_set_add (input->sets.name_languages, 0x0409); + hb_set_add_range (sets.name_ids, 0, 6); + hb_set_add (sets.name_languages, 0x0409); hb_tag_t default_drop_tables[] = { // Layout disabled by default @@ -92,7 +66,7 @@ hb_subset_input_create_or_fail (void) HB_TAG ('S', 'i', 'l', 'f'), HB_TAG ('S', 'i', 'l', 'l'), }; - input->sets.drop_tables->add_array (default_drop_tables, ARRAY_LENGTH (default_drop_tables)); + sets.drop_tables->add_array (default_drop_tables, ARRAY_LENGTH (default_drop_tables)); hb_tag_t default_no_subset_tables[] = { HB_TAG ('a', 'v', 'a', 'r'), @@ -105,8 +79,8 @@ hb_subset_input_create_or_fail (void) HB_TAG ('M', 'V', 'A', 'R'), HB_TAG ('c', 'v', 'a', 'r'), }; - input->sets.no_subset_tables->add_array (default_no_subset_tables, - ARRAY_LENGTH (default_no_subset_tables)); + sets.no_subset_tables->add_array (default_no_subset_tables, + ARRAY_LENGTH (default_no_subset_tables)); //copied from _layout_features_groups in fonttools hb_tag_t default_layout_features[] = { @@ -208,15 +182,35 @@ hb_subset_input_create_or_fail (void) HB_TAG ('b', 'l', 'w', 'm'), }; - input->sets.layout_features->add_array (default_layout_features, ARRAY_LENGTH (default_layout_features)); + sets.layout_features->add_array (default_layout_features, ARRAY_LENGTH (default_layout_features)); + + sets.layout_scripts->invert (); // Default to all scripts. +} + +/** + * hb_subset_input_create_or_fail: + * + * Creates a new subset input object. + * + * Return value: (transfer full): New subset input, or `NULL` if failed. Destroy + * with hb_subset_input_destroy(). + * + * Since: 1.8.0 + **/ +hb_subset_input_t * +hb_subset_input_create_or_fail (void) +{ + hb_subset_input_t *input = hb_object_create<hb_subset_input_t>(); - input->sets.layout_scripts->invert (); // Default to all scripts. + if (unlikely (!input)) + return nullptr; if (input->in_error ()) { hb_subset_input_destroy (input); return nullptr; } + return input; } @@ -250,20 +244,6 @@ hb_subset_input_destroy (hb_subset_input_t *input) { if (!hb_object_destroy (input)) return; - for (hb_set_t* set : input->sets_iter ()) - hb_set_destroy (set); - - hb_hashmap_destroy (input->axes_location); - -#ifdef HB_EXPERIMENTAL_API - if (input->name_table_overrides) - { - for (auto _ : *input->name_table_overrides) - _.second.fini (); - } - hb_hashmap_destroy (input->name_table_overrides); -#endif - hb_free (input); } @@ -395,16 +375,56 @@ hb_subset_input_get_user_data (const hb_subset_input_t *input, return hb_object_get_user_data (input, key); } +/** + * hb_subset_input_keep_everything: + * @input: a #hb_subset_input_t object + * + * Configure input object to keep everything in the font face. + * That is, all Unicodes, glyphs, names, layout items, + * glyph names, etc. + * + * The input can be tailored afterwards by the caller. + * + * Since: 7.0.0 + */ +void +hb_subset_input_keep_everything (hb_subset_input_t *input) +{ + const hb_subset_sets_t indices[] = {HB_SUBSET_SETS_UNICODE, + HB_SUBSET_SETS_GLYPH_INDEX, + HB_SUBSET_SETS_NAME_ID, + HB_SUBSET_SETS_NAME_LANG_ID, + HB_SUBSET_SETS_LAYOUT_FEATURE_TAG, + HB_SUBSET_SETS_LAYOUT_SCRIPT_TAG}; + + for (auto idx : hb_iter (indices)) + { + hb_set_t *set = hb_subset_input_set (input, idx); + hb_set_clear (set); + hb_set_invert (set); + } + + // Don't drop any tables + hb_set_clear (hb_subset_input_set (input, HB_SUBSET_SETS_DROP_TABLE_TAG)); + + hb_subset_input_set_flags (input, + HB_SUBSET_FLAGS_NOTDEF_OUTLINE | + HB_SUBSET_FLAGS_GLYPH_NAMES | + HB_SUBSET_FLAGS_NO_PRUNE_UNICODE_RANGES | + HB_SUBSET_FLAGS_PASSTHROUGH_UNRECOGNIZED); +} + #ifndef HB_NO_VAR /** * hb_subset_input_pin_axis_to_default: (skip) * @input: a #hb_subset_input_t object. + * @face: a #hb_face_t object. * @axis_tag: Tag of the axis to be pinned * * Pin an axis to its default location in the given subset input object. * - * Currently only works for fonts with 'glyf' tables. CFF and CFF2 is not - * yet supported. Additionally all axes in a font must be pinned. + * All axes in a font must be pinned. Additionally, `CFF2` table, if present, + * will be de-subroutinized. * * Return value: `true` if success, `false` otherwise * @@ -419,19 +439,20 @@ hb_subset_input_pin_axis_to_default (hb_subset_input_t *input, if (!hb_ot_var_find_axis_info (face, axis_tag, &axis_info)) return false; - return input->axes_location->set (axis_tag, axis_info.default_value); + return input->axes_location.set (axis_tag, axis_info.default_value); } /** * hb_subset_input_pin_axis_location: (skip) * @input: a #hb_subset_input_t object. + * @face: a #hb_face_t object. * @axis_tag: Tag of the axis to be pinned * @axis_value: Location on the axis to be pinned at * * Pin an axis to a fixed location in the given subset input object. * - * Currently only works for fonts with 'glyf' tables. CFF and CFF2 is not - * yet supported. Additionally all axes in a font must be pinned. + * All axes in a font must be pinned. Additionally, `CFF2` table, if present, + * will be de-subroutinized. * * Return value: `true` if success, `false` otherwise * @@ -448,7 +469,7 @@ hb_subset_input_pin_axis_location (hb_subset_input_t *input, return false; float val = hb_clamp(axis_value, axis_info.min_value, axis_info.max_value); - return input->axes_location->set (axis_tag, val); + return input->axes_location.set (axis_tag, val); } #endif @@ -478,39 +499,10 @@ hb_subset_preprocess (hb_face_t *source) { hb_subset_input_t* input = hb_subset_input_create_or_fail (); if (!input) - return source; - - hb_set_clear (hb_subset_input_set(input, HB_SUBSET_SETS_UNICODE)); - hb_set_invert (hb_subset_input_set(input, HB_SUBSET_SETS_UNICODE)); - - hb_set_clear (hb_subset_input_set(input, HB_SUBSET_SETS_GLYPH_INDEX)); - hb_set_invert (hb_subset_input_set(input, HB_SUBSET_SETS_GLYPH_INDEX)); - - hb_set_clear (hb_subset_input_set(input, - HB_SUBSET_SETS_LAYOUT_FEATURE_TAG)); - hb_set_invert (hb_subset_input_set(input, - HB_SUBSET_SETS_LAYOUT_FEATURE_TAG)); - - hb_set_clear (hb_subset_input_set(input, - HB_SUBSET_SETS_LAYOUT_SCRIPT_TAG)); - hb_set_invert (hb_subset_input_set(input, - HB_SUBSET_SETS_LAYOUT_SCRIPT_TAG)); - - hb_set_clear (hb_subset_input_set(input, - HB_SUBSET_SETS_NAME_ID)); - hb_set_invert (hb_subset_input_set(input, - HB_SUBSET_SETS_NAME_ID)); - - hb_set_clear (hb_subset_input_set(input, - HB_SUBSET_SETS_NAME_LANG_ID)); - hb_set_invert (hb_subset_input_set(input, - HB_SUBSET_SETS_NAME_LANG_ID)); - - hb_subset_input_set_flags(input, - HB_SUBSET_FLAGS_NOTDEF_OUTLINE | - HB_SUBSET_FLAGS_GLYPH_NAMES | - HB_SUBSET_FLAGS_RETAIN_GIDS | - HB_SUBSET_FLAGS_NO_PRUNE_UNICODE_RANGES); + return hb_face_reference (source); + + hb_subset_input_keep_everything (input); + input->attach_accelerator_data = true; // Always use long loca in the preprocessed version. This allows @@ -523,7 +515,7 @@ hb_subset_preprocess (hb_face_t *source) if (!new_source) { DEBUG_MSG (SUBSET, nullptr, "Preprocessing failed due to subset failure."); - return source; + return hb_face_reference (source); } return new_source; @@ -547,7 +539,7 @@ hb_subset_preprocess (hb_face_t *source) * Note: for mac platform, we only support name_str with all ascii characters, * name_str with non-ascii characters will be ignored. * - * Since: EXPERIMENTAL + * XSince: EXPERIMENTAL **/ HB_EXTERN hb_bool_t hb_subset_input_override_name_table (hb_subset_input_t *input, @@ -593,7 +585,7 @@ hb_subset_input_override_name_table (hb_subset_input_t *input, hb_memcpy (override_name, name_str, str_len); name_bytes = hb_bytes_t (override_name, str_len); } - input->name_table_overrides->set (hb_ot_name_record_ids_t (platform_id, encoding_id, language_id, name_id), name_bytes); + input->name_table_overrides.set (hb_ot_name_record_ids_t (platform_id, encoding_id, language_id, name_id), name_bytes); return true; } diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-input.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-input.hh index ecd47b7abf72d67e4abd2fd64d1ccb8d0e73cf53..1550e8b2c3071119d7f6bd2936400754b96048e5 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-input.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-input.hh @@ -33,7 +33,7 @@ #include "hb-subset.h" #include "hb-map.hh" #include "hb-set.hh" - +#include "hb-cplusplus.hh" #include "hb-font.hh" struct hb_ot_name_record_ids_t @@ -82,22 +82,34 @@ HB_MARK_AS_FLAG_T (hb_subset_flags_t); struct hb_subset_input_t { + HB_INTERNAL hb_subset_input_t (); + + ~hb_subset_input_t () + { + sets.~sets_t (); + +#ifdef HB_EXPERIMENTAL_API + for (auto _ : name_table_overrides.values ()) + _.fini (); +#endif + } + hb_object_header_t header; struct sets_t { - hb_set_t *glyphs; - hb_set_t *unicodes; - hb_set_t *no_subset_tables; - hb_set_t *drop_tables; - hb_set_t *name_ids; - hb_set_t *name_languages; - hb_set_t *layout_features; - hb_set_t *layout_scripts; + hb::shared_ptr<hb_set_t> glyphs; + hb::shared_ptr<hb_set_t> unicodes; + hb::shared_ptr<hb_set_t> no_subset_tables; + hb::shared_ptr<hb_set_t> drop_tables; + hb::shared_ptr<hb_set_t> name_ids; + hb::shared_ptr<hb_set_t> name_languages; + hb::shared_ptr<hb_set_t> layout_features; + hb::shared_ptr<hb_set_t> layout_scripts; }; union { sets_t sets; - hb_set_t* set_ptrs[sizeof (sets_t) / sizeof (hb_set_t*)]; + hb::shared_ptr<hb_set_t> set_ptrs[sizeof (sets_t) / sizeof (hb_set_t*)]; }; unsigned flags; @@ -106,9 +118,9 @@ struct hb_subset_input_t // If set loca format will always be the long version. bool force_long_loca = false; - hb_hashmap_t<hb_tag_t, float> *axes_location; + hb_hashmap_t<hb_tag_t, float> axes_location; #ifdef HB_EXPERIMENTAL_API - hb_hashmap_t<hb_ot_name_record_ids_t, hb_bytes_t> *name_table_overrides; + hb_hashmap_t<hb_ot_name_record_ids_t, hb_bytes_t> name_table_overrides; #endif inline unsigned num_sets () const @@ -116,9 +128,9 @@ struct hb_subset_input_t return sizeof (set_ptrs) / sizeof (hb_set_t*); } - inline hb_array_t<hb_set_t*> sets_iter () + inline hb_array_t<hb::shared_ptr<hb_set_t>> sets_iter () { - return hb_array_t<hb_set_t*> (set_ptrs, num_sets ()); + return hb_array (set_ptrs); } bool in_error () const @@ -129,9 +141,9 @@ struct hb_subset_input_t return true; } - return axes_location->in_error () + return axes_location.in_error () #ifdef HB_EXPERIMENTAL_API - || name_table_overrides->in_error () + || name_table_overrides.in_error () #endif ; } diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-instancer-solver.cc b/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-instancer-solver.cc new file mode 100644 index 0000000000000000000000000000000000000000..5c0f43ad4b1f1085dfefa5796f013c54420178cc --- /dev/null +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-instancer-solver.cc @@ -0,0 +1,464 @@ +/* + * Copyright © 2023 Behdad Esfahbod + * + * This is part of HarfBuzz, a text shaping library. + * + * 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. + */ + +#include "hb.hh" + +/* This file is a straight port of the following: + * + * https://github.com/fonttools/fonttools/blob/f73220816264fc383b8a75f2146e8d69e455d398/Lib/fontTools/varLib/instancer/solver.py + * + * Where that file returns None for a triple, we return Triple{}. + * This should be safe. + */ + +constexpr static float EPSILON = 1.f / (1 << 14); +constexpr static float MAX_F2DOT14 = float (0x7FFF) / (1 << 14); + +struct Triple { + + Triple () : + minimum (0.f), middle (0.f), maximum (0.f) {} + + Triple (float minimum_, float middle_, float maximum_) : + minimum (minimum_), middle (middle_), maximum (maximum_) {} + + bool operator == (const Triple &o) const + { + return minimum == o.minimum && + middle == o.middle && + maximum == o.maximum; + } + + float minimum; + float middle; + float maximum; +}; + +static inline Triple _reverse_negate(const Triple &v) +{ return {-v.maximum, -v.middle, -v.minimum}; } + + +static inline float supportScalar (float coord, const Triple &tent) +{ + /* Copied from VarRegionAxis::evaluate() */ + float start = tent.minimum, peak = tent.middle, end = tent.maximum; + + if (unlikely (start > peak || peak > end)) + return 1.; + if (unlikely (start < 0 && end > 0 && peak != 0)) + return 1.; + + if (peak == 0 || coord == peak) + return 1.; + + if (coord <= start || end <= coord) + return 0.; + + /* Interpolate */ + if (coord < peak) + return (coord - start) / (peak - start); + else + return (end - coord) / (end - peak); +} + + +using result_item_t = hb_pair_t<float, Triple>; +using result_t = hb_vector_t<result_item_t>; + +static inline result_t +_solve (Triple tent, Triple axisLimit, bool negative = false) +{ + float axisMin = axisLimit.minimum; + float axisDef = axisLimit.middle; + float axisMax = axisLimit.maximum; + float lower = tent.minimum; + float peak = tent.middle; + float upper = tent.maximum; + + // Mirror the problem such that axisDef <= peak + if (axisDef > peak) + { + result_t vec = _solve (_reverse_negate (tent), + _reverse_negate (axisLimit), + !negative); + + for (auto &p : vec) + p = hb_pair (p.first, _reverse_negate (p.second)); + + return vec; + } + // axisDef <= peak + + /* case 1: The whole deltaset falls outside the new limit; we can drop it + * + * peak + * 1.........................................o.......... + * / \ + * / \ + * / \ + * / \ + * 0---|-----------|----------|-------- o o----1 + * axisMin axisDef axisMax lower upper + */ + if (axisMax <= lower && axisMax < peak) + return result_t{}; // No overlap + + /* case 2: Only the peak and outermost bound fall outside the new limit; + * we keep the deltaset, update peak and outermost bound and and scale deltas + * by the scalar value for the restricted axis at the new limit, and solve + * recursively. + * + * |peak + * 1...............................|.o.......... + * |/ \ + * / \ + * /| \ + * / | \ + * 0--------------------------- o | o----1 + * lower | upper + * | + * axisMax + * + * Convert to: + * + * 1............................................ + * | + * o peak + * /| + * /x| + * 0--------------------------- o o upper ----1 + * lower | + * | + * axisMax + */ + if (axisMax < peak) + { + float mult = supportScalar (axisMax, tent); + tent = Triple{lower, axisMax, axisMax}; + + result_t vec = _solve (tent, axisLimit); + + for (auto &p : vec) + p = hb_pair (p.first * mult, p.second); + + return vec; + } + + // lower <= axisDef <= peak <= axisMax + + float gain = supportScalar (axisDef, tent); + result_t out {hb_pair (gain, Triple{})}; + + // First, the positive side + + // outGain is the scalar of axisMax at the tent. + float outGain = supportScalar (axisMax, tent); + + /* Case 3a: Gain is more than outGain. The tent down-slope crosses + * the axis into negative. We have to split it into multiples. + * + * | peak | + * 1...................|.o.....|.............. + * |/x\_ | + * gain................+....+_.|.............. + * /| |y\| + * ................../.|....|..+_......outGain + * / | | | \ + * 0---|-----------o | | | o----------1 + * axisMin lower | | | upper + * | | | + * axisDef | axisMax + * | + * crossing + */ + if (gain > outGain) + { + // Crossing point on the axis. + float crossing = peak + ((1 - gain) * (upper - peak) / (1 - outGain)); + + Triple loc{peak, peak, crossing}; + float scalar = 1.f; + + // The part before the crossing point. + out.push (hb_pair (scalar - gain, loc)); + + /* The part after the crossing point may use one or two tents, + * depending on whether upper is before axisMax or not, in one + * case we need to keep it down to eternity. + * + * Case 3a1, similar to case 1neg; just one tent needed, as in + * the drawing above. + */ + if (upper >= axisMax) + { + Triple loc {crossing, axisMax, axisMax}; + float scalar = supportScalar (axisMax, tent); + + out.push (hb_pair (scalar - gain, loc)); + } + + /* Case 3a2: Similar to case 2neg; two tents needed, to keep + * down to eternity. + * + * | peak | + * 1...................|.o................|... + * |/ \_ | + * gain................+....+_............|... + * /| | \xxxxxxxxxxy| + * / | | \_xxxxxyyyy| + * / | | \xxyyyyyy| + * 0---|-----------o | | o-------|--1 + * axisMin lower | | upper | + * | | | + * axisDef | axisMax + * | + * crossing + */ + else + { + // A tent's peak cannot fall on axis default. Nudge it. + if (upper == axisDef) + upper += EPSILON; + + // Downslope. + Triple loc1 {crossing, upper, axisMax}; + float scalar1 = 0.f; + + // Eternity justify. + Triple loc2 {upper, axisMax, axisMax}; + float scalar2 = 1.f; // supportScalar({"tag": axisMax}, {"tag": tent}) + + out.push (hb_pair (scalar1 - gain, loc1)); + out.push (hb_pair (scalar2 - gain, loc2)); + } + } + + /* Case 3: Outermost limit still fits within F2Dot14 bounds; + * we keep deltas as is and only scale the axes bounds. Deltas beyond -1.0 + * or +1.0 will never be applied as implementations must clamp to that range. + * + * A second tent is needed for cases when gain is positive, though we add it + * unconditionally and it will be dropped because scalar ends up 0. + * + * TODO: See if we can just move upper closer to adjust the slope, instead of + * second tent. + * + * | peak | + * 1.........|............o...|.................. + * | /x\ | + * | /xxx\ | + * | /xxxxx\| + * | /xxxxxxx+ + * | /xxxxxxxx|\ + * 0---|-----|------oxxxxxxxxx|xo---------------1 + * axisMin | lower | upper + * | | + * axisDef axisMax + */ + else if (axisDef + (axisMax - axisDef) * 2 >= upper) + { + if (!negative && axisDef + (axisMax - axisDef) * MAX_F2DOT14 < upper) + { + // we clamp +2.0 to the max F2Dot14 (~1.99994) for convenience + upper = axisDef + (axisMax - axisDef) * MAX_F2DOT14; + assert (peak < upper); + } + + // Special-case if peak is at axisMax. + if (axisMax == peak) + upper = peak; + + Triple loc1 {hb_max (axisDef, lower), peak, upper}; + float scalar1 = 1.f; + + Triple loc2 {peak, upper, upper}; + float scalar2 = 0.f; + + // Don't add a dirac delta! + if (axisDef < upper) + out.push (hb_pair (scalar1 - gain, loc1)); + if (peak < upper) + out.push (hb_pair (scalar2 - gain, loc2)); + } + + /* Case 4: New limit doesn't fit; we need to chop into two tents, + * because the shape of a triangle with part of one side cut off + * cannot be represented as a triangle itself. + * + * | peak | + * 1.........|......o.|................... + * | /x\| + * | |xxy|\_ + * | /xxxy| \_ + * | |xxxxy| \_ + * | /xxxxy| \_ + * 0---|-----|-oxxxxxx| o----------1 + * axisMin | lower | upper + * | | + * axisDef axisMax + */ + else + { + Triple loc1 {hb_max (axisDef, lower), peak, axisMax}; + float scalar1 = 1.f; + + Triple loc2 {peak, axisMax, axisMax}; + float scalar2 = supportScalar (axisMax, tent); + + out.push (hb_pair (scalar1 - gain, loc1)); + // Don't add a dirac delta! + if (peak < axisMax) + out.push (hb_pair (scalar2 - gain, loc2)); + } + + /* Now, the negative side + * + * Case 1neg: Lower extends beyond axisMin: we chop. Simple. + * + * | |peak + * 1..................|...|.o................. + * | |/ \ + * gain...............|...+...\............... + * |x_/| \ + * |/ | \ + * _/| | \ + * 0---------------o | | o----------1 + * lower | | upper + * | | + * axisMin axisDef + */ + if (lower <= axisMin) + { + Triple loc {axisMin, axisMin, axisDef}; + float scalar = supportScalar (axisMin, tent); + + out.push (hb_pair (scalar - gain, loc)); + } + + /* Case 2neg: Lower is betwen axisMin and axisDef: we add two + * tents to keep it down all the way to eternity. + * + * | |peak + * 1...|...............|.o................. + * | |/ \ + * gain|...............+...\............... + * |yxxxxxxxxxxxxx/| \ + * |yyyyyyxxxxxxx/ | \ + * |yyyyyyyyyyyx/ | \ + * 0---|-----------o | o----------1 + * axisMin lower | upper + * | + * axisDef + */ + else + { + // A tent's peak cannot fall on axis default. Nudge it. + if (lower == axisDef) + lower -= EPSILON; + + // Downslope. + Triple loc1 {axisMin, lower, axisDef}; + float scalar1 = 0.f; + + // Eternity justify. + Triple loc2 {axisMin, axisMin, lower}; + float scalar2 = 0.f; + + out.push (hb_pair (scalar1 - gain, loc1)); + out.push (hb_pair (scalar2 - gain, loc2)); + } + + return out; +} + +/* Normalizes value based on a min/default/max triple. */ +static inline float normalizeValue (float v, const Triple &triple, bool extrapolate = false) +{ + /* + >>> normalizeValue(400, (100, 400, 900)) + 0.0 + >>> normalizeValue(100, (100, 400, 900)) + -1.0 + >>> normalizeValue(650, (100, 400, 900)) + 0.5 + */ + float lower = triple.minimum, def = triple.middle, upper = triple.maximum; + assert (lower <= def && def <= upper); + + if (!extrapolate) + v = hb_max (hb_min (v, upper), lower); + + if ((v == def) || (lower == upper)) + return 0.f; + + if ((v < def && lower != def) || (v > def && upper == def)) + return (v - def) / (def - lower); + else + { + assert ((v > def && upper != def) || + (v < def && lower == def)); + return (v - def) / (upper - def); + } +} + +/* Given a tuple (lower,peak,upper) "tent" and new axis limits + * (axisMin,axisDefault,axisMax), solves how to represent the tent + * under the new axis configuration. All values are in normalized + * -1,0,+1 coordinate system. Tent values can be outside this range. + * + * Return value: a list of tuples. Each tuple is of the form + * (scalar,tent), where scalar is a multipler to multiply any + * delta-sets by, and tent is a new tent for that output delta-set. + * If tent value is Triple{}, that is a special deltaset that should + * be always-enabled (called "gain"). + */ +HB_INTERNAL result_t rebase_tent (Triple tent, Triple axisLimit); + +result_t +rebase_tent (Triple tent, Triple axisLimit) +{ + assert (-1.f <= axisLimit.minimum && axisLimit.minimum <= axisLimit.middle && axisLimit.middle <= axisLimit.maximum && axisLimit.maximum <= +1.f); + assert (-2.f <= tent.minimum && tent.minimum <= tent.middle && tent.middle <= tent.maximum && tent.maximum <= +2.f); + assert (tent.middle != 0.f); + + result_t sols = _solve (tent, axisLimit); + + auto n = [&axisLimit] (float v) { return normalizeValue (v, axisLimit, true); }; + + result_t out; + for (auto &p : sols) + { + if (!p.first) continue; + if (p.second == Triple{}) + { + out.push (p); + continue; + } + Triple t = p.second; + out.push (hb_pair (p.first, + Triple{n (t.minimum), n (t.middle), n (t.maximum)})); + } + + return sols; +} diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.cc b/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.cc index 71bc908ffb4964bf44a7183958dede7f3c463979..088fdca07b8e4cfb240456670cb87b3f38a2954b 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.cc +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.cc @@ -36,8 +36,8 @@ #include "hb-ot-layout-gpos-table.hh" #include "hb-ot-layout-gsub-table.hh" #include "hb-ot-cff1-table.hh" -#include "hb-ot-color-colr-table.hh" -#include "hb-ot-color-colrv1-closure.hh" +#include "OT/Color/COLR/COLR.hh" +#include "OT/Color/COLR/colrv1-closure.hh" #include "hb-ot-var-fvar-table.hh" #include "hb-ot-var-avar-table.hh" #include "hb-ot-stat-table.hh" @@ -139,13 +139,13 @@ static void _collect_layout_indices (hb_subset_plan_t *plan, hb_vector_t<hb_tag_t> features; if (!plan->check_success (features.resize (num_features))) return; table.get_feature_tags (0, &num_features, features.arrayZ); - bool retain_all_features = !_filter_tag_list (&features, plan->layout_features); + bool retain_all_features = !_filter_tag_list (&features, &plan->layout_features); unsigned num_scripts = table.get_script_count (); hb_vector_t<hb_tag_t> scripts; if (!plan->check_success (scripts.resize (num_scripts))) return; table.get_script_tags (0, &num_scripts, scripts.arrayZ); - bool retain_all_scripts = !_filter_tag_list (&scripts, plan->layout_scripts); + bool retain_all_scripts = !_filter_tag_list (&scripts, &plan->layout_scripts); if (!plan->check_success (!features.in_error ()) || !features || !plan->check_success (!scripts.in_error ()) || !scripts) @@ -160,13 +160,13 @@ static void _collect_layout_indices (hb_subset_plan_t *plan, #ifndef HB_NO_VAR // collect feature substitutes with variations - if (!plan->user_axes_location->is_empty ()) + if (!plan->user_axes_location.is_empty ()) { hb_hashmap_t<hb::shared_ptr<hb_map_t>, unsigned> conditionset_map; OT::hb_collect_feature_substitutes_with_var_context_t c = { - plan->axes_old_index_tag_map, - plan->axes_location, + &plan->axes_old_index_tag_map, + &plan->axes_location, feature_record_cond_idx_map, feature_substitutes_map, feature_indices, @@ -188,7 +188,17 @@ static void _collect_layout_indices (hb_subset_plan_t *plan, f->add_lookup_indexes_to (lookup_indices); } - table.feature_variation_collect_lookups (feature_indices, feature_substitutes_map, lookup_indices); + // If all axes are pinned then all feature variations will be dropped so there's no need + // to collect lookups from them. + if (!plan->all_axes_pinned) + { + // TODO(qxliu76): this collection doesn't work correctly for feature variations that are dropped + // but not applied. The collection will collect and retain the lookup indices + // associated with those dropped but not activated rules. Since partial instancing + // isn't yet supported this isn't an issue yet but will need to be fixed for + // partial instancing. + table.feature_variation_collect_lookups (feature_indices, feature_substitutes_map, lookup_indices); + } } @@ -228,7 +238,7 @@ _GSUBGPOS_find_duplicate_features (const OT::GSUBGPOS &g, const OT::Feature* other_f = &(g.get_feature (other_f_index)); if (feature_substitutes_map->has (other_f_index, &p)) - f = *p; + other_f = *p; auto f_iter = + hb_iter (f->lookupIndex) @@ -294,14 +304,14 @@ _closure_glyphs_lookups_features (hb_subset_plan_t *plan, // prune features table->prune_features (lookups, - plan->user_axes_location->is_empty () ? nullptr : feature_record_cond_idx_map, + plan->user_axes_location.is_empty () ? nullptr : feature_record_cond_idx_map, feature_substitutes_map, &feature_indices); hb_map_t duplicate_feature_map; _GSUBGPOS_find_duplicate_features (*table, lookups, &feature_indices, feature_substitutes_map, &duplicate_feature_map); feature_indices.clear (); - table->prune_langsys (&duplicate_feature_map, plan->layout_scripts, langsys_map, &feature_indices); + table->prune_langsys (&duplicate_feature_map, &plan->layout_scripts, langsys_map, &feature_indices); _remap_indexes (&feature_indices, features); table.destroy (); @@ -335,9 +345,9 @@ _get_hb_font_with_variations (const hb_subset_plan_t *plan) hb_font_t *font = hb_font_create (plan->source); hb_vector_t<hb_variation_t> vars; - vars.alloc (plan->user_axes_location->get_population ()); + vars.alloc (plan->user_axes_location.get_population ()); - for (auto _ : *plan->user_axes_location) + for (auto _ : plan->user_axes_location) { hb_variation_t var; var.tag = _.first; @@ -346,7 +356,7 @@ _get_hb_font_with_variations (const hb_subset_plan_t *plan) } #ifndef HB_NO_VAR - hb_font_set_variations (font, vars.arrayZ, plan->user_axes_location->get_population ()); + hb_font_set_variations (font, vars.arrayZ, plan->user_axes_location.get_population ()); #endif return font; } @@ -380,10 +390,10 @@ _collect_layout_variation_indices (hb_subset_plan_t* plan) } OT::hb_collect_variation_indices_context_t c (&varidx_set, - plan->layout_variation_idx_delta_map, + &plan->layout_variation_idx_delta_map, font, var_store, - plan->_glyphset_gsub, - plan->gpos_lookups, + &plan->_glyphset_gsub, + &plan->gpos_lookups, store_cache); gdef->collect_variation_indices (&c); @@ -393,7 +403,7 @@ _collect_layout_variation_indices (hb_subset_plan_t* plan) hb_font_destroy (font); var_store->destroy_cache (store_cache); - gdef->remap_layout_variation_indices (&varidx_set, plan->layout_variation_idx_delta_map); + gdef->remap_layout_variation_indices (&varidx_set, &plan->layout_variation_idx_delta_map); unsigned subtable_count = gdef->has_var_store () ? gdef->get_var_store ().get_sub_table_count () : 0; _generate_varstore_inner_maps (varidx_set, subtable_count, plan->gdef_varstore_inner_maps); @@ -569,15 +579,15 @@ _populate_unicodes_to_retain (const hb_set_t *unicodes, { if (gid >= plan->source->get_num_glyphs ()) break; - plan->_glyphset_gsub->add (gid); + plan->_glyphset_gsub.add (gid); } } auto &arr = plan->unicode_to_new_gid_list; if (arr.length) { - plan->unicodes->add_sorted_array (&arr.arrayZ->first, arr.length, sizeof (*arr.arrayZ)); - plan->_glyphset_gsub->add_array (&arr.arrayZ->second, arr.length, sizeof (*arr.arrayZ)); + plan->unicodes.add_sorted_array (&arr.arrayZ->first, arr.length, sizeof (*arr.arrayZ)); + plan->_glyphset_gsub.add_array (&arr.arrayZ->second, arr.length, sizeof (*arr.arrayZ)); } } @@ -619,71 +629,71 @@ _populate_gids_to_retain (hb_subset_plan_t* plan, OT::cff1::accelerator_t cff (plan->source); #endif - plan->_glyphset_gsub->add (0); // Not-def + plan->_glyphset_gsub.add (0); // Not-def - _cmap_closure (plan->source, plan->unicodes, plan->_glyphset_gsub); + _cmap_closure (plan->source, &plan->unicodes, &plan->_glyphset_gsub); #ifndef HB_NO_SUBSET_LAYOUT if (!drop_tables->has (HB_OT_TAG_GSUB)) // closure all glyphs/lookups/features needed for GSUB substitutions. _closure_glyphs_lookups_features<GSUB> ( plan, - plan->_glyphset_gsub, - plan->gsub_lookups, - plan->gsub_features, - plan->gsub_langsys, - plan->gsub_feature_record_cond_idx_map, - plan->gsub_feature_substitutes_map); + &plan->_glyphset_gsub, + &plan->gsub_lookups, + &plan->gsub_features, + &plan->gsub_langsys, + &plan->gsub_feature_record_cond_idx_map, + &plan->gsub_feature_substitutes_map); if (!drop_tables->has (HB_OT_TAG_GPOS)) _closure_glyphs_lookups_features<GPOS> ( plan, - plan->_glyphset_gsub, - plan->gpos_lookups, - plan->gpos_features, - plan->gpos_langsys, - plan->gpos_feature_record_cond_idx_map, - plan->gpos_feature_substitutes_map); + &plan->_glyphset_gsub, + &plan->gpos_lookups, + &plan->gpos_features, + &plan->gpos_langsys, + &plan->gpos_feature_record_cond_idx_map, + &plan->gpos_feature_substitutes_map); #endif - _remove_invalid_gids (plan->_glyphset_gsub, plan->source->get_num_glyphs ()); + _remove_invalid_gids (&plan->_glyphset_gsub, plan->source->get_num_glyphs ()); - hb_set_set (plan->_glyphset_mathed, plan->_glyphset_gsub); + plan->_glyphset_mathed = plan->_glyphset_gsub; if (!drop_tables->has (HB_OT_TAG_MATH)) { - _math_closure (plan, plan->_glyphset_mathed); - _remove_invalid_gids (plan->_glyphset_mathed, plan->source->get_num_glyphs ()); + _math_closure (plan, &plan->_glyphset_mathed); + _remove_invalid_gids (&plan->_glyphset_mathed, plan->source->get_num_glyphs ()); } - hb_set_t cur_glyphset = *plan->_glyphset_mathed; + hb_set_t cur_glyphset = plan->_glyphset_mathed; if (!drop_tables->has (HB_OT_TAG_COLR)) { - _colr_closure (plan->source, plan->colrv1_layers, plan->colr_palettes, &cur_glyphset); + _colr_closure (plan->source, &plan->colrv1_layers, &plan->colr_palettes, &cur_glyphset); _remove_invalid_gids (&cur_glyphset, plan->source->get_num_glyphs ()); } - hb_set_set (plan->_glyphset_colred, &cur_glyphset); + plan->_glyphset_colred = cur_glyphset; /* Populate a full set of glyphs to retain by adding all referenced * composite glyphs. */ if (glyf.has_data ()) for (hb_codepoint_t gid : cur_glyphset) - _glyf_add_gid_and_children (glyf, gid, plan->_glyphset, + _glyf_add_gid_and_children (glyf, gid, &plan->_glyphset, cur_glyphset.get_population () * HB_COMPOSITE_OPERATIONS_PER_GLYPH); else - plan->_glyphset->union_ (cur_glyphset); + plan->_glyphset.union_ (cur_glyphset); #ifndef HB_NO_SUBSET_CFF if (!plan->accelerator || plan->accelerator->has_seac) { bool has_seac = false; if (cff.is_valid ()) for (hb_codepoint_t gid : cur_glyphset) - if (_add_cff_seac_components (cff, gid, plan->_glyphset)) + if (_add_cff_seac_components (cff, gid, &plan->_glyphset)) has_seac = true; plan->has_seac = has_seac; } #endif - _remove_invalid_gids (plan->_glyphset, plan->source->get_num_glyphs ()); + _remove_invalid_gids (&plan->_glyphset, plan->source->get_num_glyphs ()); #ifndef HB_NO_VAR @@ -765,10 +775,11 @@ _nameid_closure (hb_face_t *face, static void _normalize_axes_location (hb_face_t *face, hb_subset_plan_t *plan) { - if (plan->user_axes_location->is_empty ()) + if (plan->user_axes_location.is_empty ()) return; hb_array_t<const OT::AxisRecord> axes = face->table.fvar->get_axes (); + plan->normalized_coords.resize (axes.length); bool has_avar = face->table.avar->has_data (); const OT::SegmentMaps *seg_maps = nullptr; @@ -777,201 +788,175 @@ _normalize_axes_location (hb_face_t *face, hb_subset_plan_t *plan) bool axis_not_pinned = false; unsigned old_axis_idx = 0, new_axis_idx = 0; + unsigned int i = 0; for (const auto& axis : axes) { hb_tag_t axis_tag = axis.get_axis_tag (); - plan->axes_old_index_tag_map->set (old_axis_idx, axis_tag); + plan->axes_old_index_tag_map.set (old_axis_idx, axis_tag); - if (!plan->user_axes_location->has (axis_tag)) + if (!plan->user_axes_location.has (axis_tag)) { axis_not_pinned = true; - plan->axes_index_map->set (old_axis_idx, new_axis_idx); + plan->axes_index_map.set (old_axis_idx, new_axis_idx); new_axis_idx++; } else { - int normalized_v = axis.normalize_axis_value (plan->user_axes_location->get (axis_tag)); + int normalized_v = axis.normalize_axis_value (plan->user_axes_location.get (axis_tag)); if (has_avar && old_axis_idx < face->table.avar->get_axis_count ()) { normalized_v = seg_maps->map (normalized_v); } - plan->axes_location->set (axis_tag, normalized_v); + plan->axes_location.set (axis_tag, normalized_v); if (normalized_v != 0) plan->pinned_at_default = false; + + plan->normalized_coords[i] = normalized_v; } if (has_avar) seg_maps = &StructAfter<OT::SegmentMaps> (*seg_maps); old_axis_idx++; + + i++; } plan->all_axes_pinned = !axis_not_pinned; } #endif -/** - * hb_subset_plan_create_or_fail: - * @face: font face to create the plan for. - * @input: a #hb_subset_input_t input. - * - * Computes a plan for subsetting the supplied face according - * to a provided input. The plan describes - * which tables and glyphs should be retained. - * - * Return value: (transfer full): New subset plan. Destroy with - * hb_subset_plan_destroy(). If there is a failure creating the plan - * nullptr will be returned. - * - * Since: 4.0.0 - **/ -hb_subset_plan_t * -hb_subset_plan_create_or_fail (hb_face_t *face, - const hb_subset_input_t *input) + +hb_subset_plan_t::hb_subset_plan_t (hb_face_t *face, + const hb_subset_input_t *input) { - hb_subset_plan_t *plan; - if (unlikely (!(plan = hb_object_create<hb_subset_plan_t> ()))) - return nullptr; + successful = true; + flags = input->flags; + + unicode_to_new_gid_list.init (); - plan->successful = true; - plan->flags = input->flags; - plan->unicodes = hb_set_create (); - - plan->unicode_to_new_gid_list.init (); - - plan->name_ids = hb_set_copy (input->sets.name_ids); - plan->name_languages = hb_set_copy (input->sets.name_languages); - plan->layout_features = hb_set_copy (input->sets.layout_features); - plan->layout_scripts = hb_set_copy (input->sets.layout_scripts); - plan->glyphs_requested = hb_set_copy (input->sets.glyphs); - plan->drop_tables = hb_set_copy (input->sets.drop_tables); - plan->no_subset_tables = hb_set_copy (input->sets.no_subset_tables); - plan->source = hb_face_reference (face); - plan->dest = hb_face_builder_create (); - - plan->_glyphset = hb_set_create (); - plan->_glyphset_gsub = hb_set_create (); - plan->_glyphset_mathed = hb_set_create (); - plan->_glyphset_colred = hb_set_create (); - plan->codepoint_to_glyph = hb_map_create (); - plan->glyph_map = hb_map_create (); - plan->reverse_glyph_map = hb_map_create (); - plan->glyph_map_gsub = hb_map_create (); - plan->gsub_lookups = hb_map_create (); - plan->gpos_lookups = hb_map_create (); - - plan->check_success (plan->gsub_langsys = hb_hashmap_create<unsigned, hb::unique_ptr<hb_set_t>> ()); - plan->check_success (plan->gpos_langsys = hb_hashmap_create<unsigned, hb::unique_ptr<hb_set_t>> ()); - - plan->gsub_features = hb_map_create (); - plan->gpos_features = hb_map_create (); - - plan->check_success (plan->gsub_feature_record_cond_idx_map = hb_hashmap_create<unsigned, hb::shared_ptr<hb_set_t>> ()); - plan->check_success (plan->gpos_feature_record_cond_idx_map = hb_hashmap_create<unsigned, hb::shared_ptr<hb_set_t>> ()); - - plan->check_success (plan->gsub_feature_substitutes_map = hb_hashmap_create<unsigned, const OT::Feature*> ()); - plan->check_success (plan->gpos_feature_substitutes_map = hb_hashmap_create<unsigned, const OT::Feature*> ()); - - plan->colrv1_layers = hb_map_create (); - plan->colr_palettes = hb_map_create (); - plan->check_success (plan->layout_variation_idx_delta_map = hb_hashmap_create<unsigned, hb_pair_t<unsigned, int>> ()); - plan->gdef_varstore_inner_maps.init (); - - plan->check_success (plan->sanitized_table_cache = hb_hashmap_create<hb_tag_t, hb::unique_ptr<hb_blob_t>> ()); - plan->check_success (plan->axes_location = hb_hashmap_create<hb_tag_t, int> ()); - plan->check_success (plan->user_axes_location = hb_hashmap_create<hb_tag_t, float> ()); - if (plan->user_axes_location && input->axes_location) - *plan->user_axes_location = *input->axes_location; - plan->check_success (plan->axes_index_map = hb_map_create ()); - plan->check_success (plan->axes_old_index_tag_map = hb_map_create ()); - plan->all_axes_pinned = false; - plan->pinned_at_default = true; - - plan->check_success (plan->vmtx_map = hb_hashmap_create<unsigned, hb_pair_t<unsigned, int>> ()); - plan->check_success (plan->hmtx_map = hb_hashmap_create<unsigned, hb_pair_t<unsigned, int>> ()); + name_ids = *input->sets.name_ids; + name_languages = *input->sets.name_languages; + layout_features = *input->sets.layout_features; + layout_scripts = *input->sets.layout_scripts; + glyphs_requested = *input->sets.glyphs; + drop_tables = *input->sets.drop_tables; + no_subset_tables = *input->sets.no_subset_tables; + source = hb_face_reference (face); + dest = hb_face_builder_create (); + + codepoint_to_glyph = hb_map_create (); + glyph_map = hb_map_create (); + reverse_glyph_map = hb_map_create (); + + gdef_varstore_inner_maps.init (); + + user_axes_location = input->axes_location; + all_axes_pinned = false; + pinned_at_default = true; #ifdef HB_EXPERIMENTAL_API - plan->check_success (plan->name_table_overrides = hb_hashmap_create<hb_ot_name_record_ids_t, hb_bytes_t> ()); - if (plan->name_table_overrides && input->name_table_overrides) + for (auto _ : input->name_table_overrides) { - for (auto _ : *input->name_table_overrides) - { - hb_bytes_t name_bytes = _.second; - unsigned len = name_bytes.length; - char *name_str = (char *) hb_malloc (len); - if (unlikely (!plan->check_success (name_str))) - break; - - hb_memcpy (name_str, name_bytes.arrayZ, len); - plan->name_table_overrides->set (_.first, hb_bytes_t (name_str, len)); - } + hb_bytes_t name_bytes = _.second; + unsigned len = name_bytes.length; + char *name_str = (char *) hb_malloc (len); + if (unlikely (!check_success (name_str))) + break; + + hb_memcpy (name_str, name_bytes.arrayZ, len); + name_table_overrides.set (_.first, hb_bytes_t (name_str, len)); } #endif void* accel = hb_face_get_user_data(face, hb_subset_accelerator_t::user_data_key()); - plan->attach_accelerator_data = input->attach_accelerator_data; - plan->force_long_loca = input->force_long_loca; + attach_accelerator_data = input->attach_accelerator_data; + force_long_loca = input->force_long_loca; if (accel) - plan->accelerator = (hb_subset_accelerator_t*) accel; + accelerator = (hb_subset_accelerator_t*) accel; - if (unlikely (plan->in_error ())) { - hb_subset_plan_destroy (plan); - return nullptr; - } + if (unlikely (in_error ())) + return; #ifndef HB_NO_VAR - _normalize_axes_location (face, plan); + _normalize_axes_location (face, this); #endif - _populate_unicodes_to_retain (input->sets.unicodes, input->sets.glyphs, plan); + _populate_unicodes_to_retain (input->sets.unicodes, input->sets.glyphs, this); - _populate_gids_to_retain (plan, input->sets.drop_tables); + _populate_gids_to_retain (this, input->sets.drop_tables); _create_old_gid_to_new_gid_map (face, input->flags & HB_SUBSET_FLAGS_RETAIN_GIDS, - plan->_glyphset, - plan->glyph_map, - plan->reverse_glyph_map, - &plan->_num_output_glyphs); + &_glyphset, + glyph_map, + reverse_glyph_map, + &_num_output_glyphs); _create_glyph_map_gsub ( - plan->_glyphset_gsub, - plan->glyph_map, - plan->glyph_map_gsub); + &_glyphset_gsub, + glyph_map, + &glyph_map_gsub); // Now that we have old to new gid map update the unicode to new gid list. - for (unsigned i = 0; i < plan->unicode_to_new_gid_list.length; i++) + for (unsigned i = 0; i < unicode_to_new_gid_list.length; i++) { // Use raw array access for performance. - plan->unicode_to_new_gid_list.arrayZ[i].second = - plan->glyph_map->get(plan->unicode_to_new_gid_list.arrayZ[i].second); - } - - _nameid_closure (face, plan->name_ids, plan->all_axes_pinned, plan->user_axes_location); - if (unlikely (plan->in_error ())) { - hb_subset_plan_destroy (plan); - return nullptr; + unicode_to_new_gid_list.arrayZ[i].second = + glyph_map->get(unicode_to_new_gid_list.arrayZ[i].second); } + _nameid_closure (face, &name_ids, all_axes_pinned, &user_axes_location); + if (unlikely (in_error ())) + return; - if (plan->attach_accelerator_data) + if (attach_accelerator_data) { hb_multimap_t gid_to_unicodes; - hb_map_t &unicode_to_gid = *plan->codepoint_to_glyph; + hb_map_t &unicode_to_gid = *codepoint_to_glyph; - for (auto unicode : *plan->unicodes) + for (auto unicode : unicodes) { auto gid = unicode_to_gid[unicode]; gid_to_unicodes.add (gid, unicode); } - plan->inprogress_accelerator = - hb_subset_accelerator_t::create (*plan->codepoint_to_glyph, + inprogress_accelerator = + hb_subset_accelerator_t::create (*codepoint_to_glyph, gid_to_unicodes, - *plan->unicodes, - plan->has_seac); + unicodes, + has_seac); } +} +/** + * hb_subset_plan_create_or_fail: + * @face: font face to create the plan for. + * @input: a #hb_subset_input_t input. + * + * Computes a plan for subsetting the supplied face according + * to a provided input. The plan describes + * which tables and glyphs should be retained. + * + * Return value: (transfer full): New subset plan. Destroy with + * hb_subset_plan_destroy(). If there is a failure creating the plan + * nullptr will be returned. + * + * Since: 4.0.0 + **/ +hb_subset_plan_t * +hb_subset_plan_create_or_fail (hb_face_t *face, + const hb_subset_input_t *input) +{ + hb_subset_plan_t *plan; + if (unlikely (!(plan = hb_object_create<hb_subset_plan_t> (face, input)))) + return nullptr; + + if (unlikely (plan->in_error ())) + { + hb_subset_plan_destroy (plan); + return nullptr; + } return plan; } @@ -1005,7 +990,7 @@ hb_subset_plan_destroy (hb_subset_plan_t *plan) * * Since: 4.0.0 **/ -const hb_map_t* +hb_map_t * hb_subset_plan_old_to_new_glyph_mapping (const hb_subset_plan_t *plan) { return plan->glyph_map; @@ -1023,7 +1008,7 @@ hb_subset_plan_old_to_new_glyph_mapping (const hb_subset_plan_t *plan) * * Since: 4.0.0 **/ -const hb_map_t* +hb_map_t * hb_subset_plan_new_to_old_glyph_mapping (const hb_subset_plan_t *plan) { return plan->reverse_glyph_map; @@ -1041,7 +1026,7 @@ hb_subset_plan_new_to_old_glyph_mapping (const hb_subset_plan_t *plan) * * Since: 4.0.0 **/ -const hb_map_t* +hb_map_t * hb_subset_plan_unicode_to_old_glyph_mapping (const hb_subset_plan_t *plan) { return plan->codepoint_to_glyph; diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.hh index 1b2aee7825040567817551cb5dbd10a77fbf3528..c0a85e12dc1e3808de9ff47071284268a11f6377 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.hh @@ -41,69 +41,53 @@ namespace OT { struct Feature; } +struct head_maxp_info_t +{ + head_maxp_info_t () + :xMin (0x7FFF), xMax (-0x7FFF), yMin (0x7FFF), yMax (-0x7FFF), + maxPoints (0), maxContours (0), + maxCompositePoints (0), + maxCompositeContours (0), + maxComponentElements (0), + maxComponentDepth (0), + allXMinIsLsb (true) {} + + int xMin; + int xMax; + int yMin; + int yMax; + unsigned maxPoints; + unsigned maxContours; + unsigned maxCompositePoints; + unsigned maxCompositeContours; + unsigned maxComponentElements; + unsigned maxComponentDepth; + bool allXMinIsLsb; +}; + +typedef struct head_maxp_info_t head_maxp_info_t; + struct hb_subset_plan_t { - hb_subset_plan_t () - {} + HB_INTERNAL hb_subset_plan_t (hb_face_t *, + const hb_subset_input_t *input); ~hb_subset_plan_t() { - hb_set_destroy (unicodes); - hb_set_destroy (name_ids); - hb_set_destroy (name_languages); - hb_set_destroy (layout_features); - hb_set_destroy (layout_scripts); - hb_set_destroy (glyphs_requested); - hb_set_destroy (drop_tables); - hb_set_destroy (no_subset_tables); hb_face_destroy (source); hb_face_destroy (dest); + hb_map_destroy (codepoint_to_glyph); hb_map_destroy (glyph_map); hb_map_destroy (reverse_glyph_map); - hb_map_destroy (glyph_map_gsub); - hb_set_destroy (_glyphset); - hb_set_destroy (_glyphset_gsub); - hb_set_destroy (_glyphset_mathed); - hb_set_destroy (_glyphset_colred); - hb_map_destroy (gsub_lookups); - hb_map_destroy (gpos_lookups); - hb_map_destroy (gsub_features); - hb_map_destroy (gpos_features); - hb_map_destroy (colrv1_layers); - hb_map_destroy (colr_palettes); - hb_map_destroy (axes_index_map); - hb_map_destroy (axes_old_index_tag_map); - - hb_hashmap_destroy (gsub_langsys); - hb_hashmap_destroy (gpos_langsys); - hb_hashmap_destroy (gsub_feature_record_cond_idx_map); - hb_hashmap_destroy (gpos_feature_record_cond_idx_map); - hb_hashmap_destroy (gsub_feature_substitutes_map); - hb_hashmap_destroy (gpos_feature_substitutes_map); - hb_hashmap_destroy (axes_location); - hb_hashmap_destroy (sanitized_table_cache); - hb_hashmap_destroy (hmtx_map); - hb_hashmap_destroy (vmtx_map); - hb_hashmap_destroy (layout_variation_idx_delta_map); #ifdef HB_EXPERIMENTAL_API - if (name_table_overrides) - { - for (auto _ : *name_table_overrides) - _.second.fini (); - } - hb_hashmap_destroy (name_table_overrides); + for (auto _ : name_table_overrides) + _.second.fini (); #endif if (inprogress_accelerator) hb_subset_accelerator_t::destroy ((void*) inprogress_accelerator); - - if (user_axes_location) - { - hb_object_destroy (user_axes_location); - hb_free (user_axes_location); - } } hb_object_header_t header; @@ -114,101 +98,109 @@ struct hb_subset_plan_t bool force_long_loca = false; // For each cp that we'd like to retain maps to the corresponding gid. - hb_set_t *unicodes; + hb_set_t unicodes; hb_sorted_vector_t<hb_pair_t<hb_codepoint_t, hb_codepoint_t>> unicode_to_new_gid_list; // name_ids we would like to retain - hb_set_t *name_ids; + hb_set_t name_ids; // name_languages we would like to retain - hb_set_t *name_languages; + hb_set_t name_languages; //layout features which will be preserved - hb_set_t *layout_features; + hb_set_t layout_features; // layout scripts which will be preserved. - hb_set_t *layout_scripts; + hb_set_t layout_scripts; //glyph ids requested to retain - hb_set_t *glyphs_requested; + hb_set_t glyphs_requested; // Tables which should not be processed, just pass them through. - hb_set_t *no_subset_tables; + hb_set_t no_subset_tables; // Tables which should be dropped. - hb_set_t *drop_tables; + hb_set_t drop_tables; // The glyph subset - hb_map_t *codepoint_to_glyph; + hb_map_t *codepoint_to_glyph; // Needs to be heap-allocated // Old -> New glyph id mapping - hb_map_t *glyph_map; - hb_map_t *reverse_glyph_map; - hb_map_t *glyph_map_gsub; + hb_map_t *glyph_map; // Needs to be heap-allocated + hb_map_t *reverse_glyph_map; // Needs to be heap-allocated + hb_map_t glyph_map_gsub; // Plan is only good for a specific source/dest so keep them with it hb_face_t *source; hb_face_t *dest; unsigned int _num_output_glyphs; - hb_set_t *_glyphset; - hb_set_t *_glyphset_gsub; - hb_set_t *_glyphset_mathed; - hb_set_t *_glyphset_colred; + hb_set_t _glyphset; + hb_set_t _glyphset_gsub; + hb_set_t _glyphset_mathed; + hb_set_t _glyphset_colred; //active lookups we'd like to retain - hb_map_t *gsub_lookups; - hb_map_t *gpos_lookups; + hb_map_t gsub_lookups; + hb_map_t gpos_lookups; //active langsys we'd like to retain - hb_hashmap_t<unsigned, hb::unique_ptr<hb_set_t>> *gsub_langsys; - hb_hashmap_t<unsigned, hb::unique_ptr<hb_set_t>> *gpos_langsys; + hb_hashmap_t<unsigned, hb::unique_ptr<hb_set_t>> gsub_langsys; + hb_hashmap_t<unsigned, hb::unique_ptr<hb_set_t>> gpos_langsys; //active features after removing redundant langsys and prune_features - hb_map_t *gsub_features; - hb_map_t *gpos_features; + hb_map_t gsub_features; + hb_map_t gpos_features; //active feature variation records/condition index with variations - hb_hashmap_t<unsigned, hb::shared_ptr<hb_set_t>> *gsub_feature_record_cond_idx_map; - hb_hashmap_t<unsigned, hb::shared_ptr<hb_set_t>> *gpos_feature_record_cond_idx_map; + hb_hashmap_t<unsigned, hb::shared_ptr<hb_set_t>> gsub_feature_record_cond_idx_map; + hb_hashmap_t<unsigned, hb::shared_ptr<hb_set_t>> gpos_feature_record_cond_idx_map; //feature index-> address of substituation feature table mapping with //variations - hb_hashmap_t<unsigned, const OT::Feature*> *gsub_feature_substitutes_map; - hb_hashmap_t<unsigned, const OT::Feature*> *gpos_feature_substitutes_map; + hb_hashmap_t<unsigned, const OT::Feature*> gsub_feature_substitutes_map; + hb_hashmap_t<unsigned, const OT::Feature*> gpos_feature_substitutes_map; //active layers/palettes we'd like to retain - hb_map_t *colrv1_layers; - hb_map_t *colr_palettes; + hb_map_t colrv1_layers; + hb_map_t colr_palettes; //Old layout item variation index -> (New varidx, delta) mapping - hb_hashmap_t<unsigned, hb_pair_t<unsigned, int>> *layout_variation_idx_delta_map; + hb_hashmap_t<unsigned, hb_pair_t<unsigned, int>> layout_variation_idx_delta_map; //gdef varstore retained varidx mapping hb_vector_t<hb_inc_bimap_t> gdef_varstore_inner_maps; - hb_hashmap_t<hb_tag_t, hb::unique_ptr<hb_blob_t>>* sanitized_table_cache; + hb_hashmap_t<hb_tag_t, hb::unique_ptr<hb_blob_t>> sanitized_table_cache; //normalized axes location map - hb_hashmap_t<hb_tag_t, int> *axes_location; + hb_hashmap_t<hb_tag_t, int> axes_location; + hb_vector_t<int> normalized_coords; //user specified axes location map - hb_hashmap_t<hb_tag_t, float> *user_axes_location; + hb_hashmap_t<hb_tag_t, float> user_axes_location; //retained old axis index -> new axis index mapping in fvar axis array - hb_map_t *axes_index_map; + hb_map_t axes_index_map; //axis_index->axis_tag mapping in fvar axis array - hb_map_t *axes_old_index_tag_map; + hb_map_t axes_old_index_tag_map; bool all_axes_pinned; bool pinned_at_default; bool has_seac; //hmtx metrics map: new gid->(advance, lsb) - hb_hashmap_t<unsigned, hb_pair_t<unsigned, int>> *hmtx_map; + mutable hb_hashmap_t<hb_codepoint_t, hb_pair_t<unsigned, int>> hmtx_map; //vmtx metrics map: new gid->(advance, lsb) - hb_hashmap_t<unsigned, hb_pair_t<unsigned, int>> *vmtx_map; + mutable hb_hashmap_t<hb_codepoint_t, hb_pair_t<unsigned, int>> vmtx_map; + //boundsWidth map: new gid->boundsWidth, boundWidth=xMax - xMin + mutable hb_map_t bounds_width_map; + //boundsHeight map: new gid->boundsHeight, boundsHeight=yMax - yMin + mutable hb_map_t bounds_height_map; + + //recalculated head/maxp table info after instancing + mutable head_maxp_info_t head_maxp_info; #ifdef HB_EXPERIMENTAL_API // name table overrides map: hb_ot_name_record_ids_t-> name string new value or // None to indicate should remove - hb_hashmap_t<hb_ot_name_record_ids_t, hb_bytes_t> *name_table_overrides; + hb_hashmap_t<hb_ot_name_record_ids_t, hb_bytes_t> name_table_overrides; #endif const hb_subset_accelerator_t* accelerator; @@ -221,7 +213,7 @@ struct hb_subset_plan_t { hb_lock_t (accelerator ? &accelerator->sanitized_table_cache_lock : nullptr); - auto *cache = accelerator ? &accelerator->sanitized_table_cache : sanitized_table_cache; + auto *cache = accelerator ? &accelerator->sanitized_table_cache : &sanitized_table_cache; if (cache && !cache->in_error () && cache->has (+T::tableTag)) { @@ -253,7 +245,7 @@ struct hb_subset_plan_t inline const hb_set_t * glyphset () const { - return _glyphset; + return &_glyphset; } /* @@ -262,7 +254,7 @@ struct hb_subset_plan_t inline const hb_set_t * glyphset_gsub () const { - return _glyphset_gsub; + return &_glyphset_gsub; } /* @@ -280,7 +272,7 @@ struct hb_subset_plan_t */ inline bool is_empty_glyph (hb_codepoint_t gid) const { - return !_glyphset->has (gid); + return !_glyphset.has (gid); } inline bool new_gid_for_codepoint (hb_codepoint_t codepoint, @@ -322,7 +314,7 @@ struct hb_subset_plan_t if (HB_DEBUG_SUBSET) { hb_blob_t *source_blob = source->reference_table (tag); - DEBUG_MSG(SUBSET, nullptr, "add table %c%c%c%c, dest %d bytes, source %d bytes", + DEBUG_MSG(SUBSET, nullptr, "add table %c%c%c%c, dest %u bytes, source %u bytes", HB_UNTAG(tag), hb_blob_get_length (contents), hb_blob_get_length (source_blob)); diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-repacker.cc b/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-repacker.cc index 55ca48d709f8cb27480502e54bbc80eeeb09a476..6a29b35be7eb9eb0d64326a7e00c7ec90b88074f 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-repacker.cc +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-repacker.cc @@ -38,7 +38,7 @@ * Table specific optimizations (eg. extension promotion in GSUB/GPOS) may be performed. * Passing HB_TAG_NONE will disable table specific optimizations. * - * Since: EXPERIMENTAL + * XSince: EXPERIMENTAL **/ hb_blob_t* hb_subset_repack_or_fail (hb_tag_t table_tag, hb_object_t* hb_objects, diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.cc b/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.cc index 186b12dbb8f468bc9e61331c9a2121b848034215..82df3386f5d2b47d6351e0127f5772ab13e1bb04 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.cc +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.cc @@ -37,9 +37,10 @@ #include "hb-ot-hhea-table.hh" #include "hb-ot-hmtx-table.hh" #include "hb-ot-maxp-table.hh" -#include "hb-ot-color-sbix-table.hh" -#include "hb-ot-color-colr-table.hh" -#include "hb-ot-color-cpal-table.hh" +#include "OT/Color/CBDT/CBDT.hh" +#include "OT/Color/COLR/COLR.hh" +#include "OT/Color/CPAL/CPAL.hh" +#include "OT/Color/sbix/sbix.hh" #include "hb-ot-os2-table.hh" #include "hb-ot-post-table.hh" #include "hb-ot-post-table-v2subset.hh" @@ -47,7 +48,6 @@ #include "hb-ot-cff2-table.hh" #include "hb-ot-vorg-table.hh" #include "hb-ot-name-table.hh" -#include "hb-ot-color-cbdt-table.hh" #include "hb-ot-layout-gsub-table.hh" #include "hb-ot-layout-gpos-table.hh" #include "hb-ot-var-fvar-table.hh" @@ -168,11 +168,11 @@ _get_table_tags (const hb_subset_plan_t* plan, hb_concat ( + hb_array (known_tables) | hb_filter ([&] (hb_tag_t tag) { - return !_table_is_empty (plan->source, tag) && !plan->no_subset_tables->has (tag); + return !_table_is_empty (plan->source, tag) && !plan->no_subset_tables.has (tag); }) | hb_map ([] (hb_tag_t tag) -> hb_tag_t { return tag; }), - plan->no_subset_tables->iter () + plan->no_subset_tables.iter () | hb_filter([&] (hb_tag_t tag) { return !_table_is_empty (plan->source, tag); })); @@ -208,13 +208,6 @@ _plan_estimate_subset_table_size (hb_subset_plan_t *plan, static hb_blob_t* _repack (hb_tag_t tag, const hb_serialize_context_t& c) { - if (tag != HB_OT_TAG_GPOS - && tag != HB_OT_TAG_GSUB) - { - // Check for overflow in a non-handled table. - return c.successful () ? c.copy_blob () : nullptr; - } - if (!c.offset_overflow ()) return c.copy_blob (); @@ -257,7 +250,7 @@ _try_subset (const TableType *table, HB_UNTAG (c->table_tag), buf_size); if (unlikely (buf_size > c->source_blob->length * 16 || - !buf->alloc (buf_size))) + !buf->alloc (buf_size, true))) { DEBUG_MSG (SUBSET, nullptr, "OT::%c%c%c%c failed to reallocate %u bytes.", HB_UNTAG (c->table_tag), buf_size); @@ -362,7 +355,7 @@ _is_table_present (hb_face_t *source, hb_tag_t tag) static bool _should_drop_table (hb_subset_plan_t *plan, hb_tag_t tag) { - if (plan->drop_tables->has (tag)) + if (plan->drop_tables.has (tag)) return true; switch (tag) @@ -420,7 +413,8 @@ _dependencies_satisfied (hb_subset_plan_t *plan, hb_tag_t tag, { case HB_OT_TAG_hmtx: case HB_OT_TAG_vmtx: - return plan->pinned_at_default || !pending_subset_tags.has (HB_OT_TAG_glyf); + case HB_OT_TAG_maxp: + return !plan->normalized_coords || !pending_subset_tags.has (HB_OT_TAG_glyf); default: return true; } @@ -431,7 +425,7 @@ _subset_table (hb_subset_plan_t *plan, hb_vector_t<char> &buf, hb_tag_t tag) { - if (plan->no_subset_tables->has (tag)) { + if (plan->no_subset_tables.has (tag)) { return _passthrough (plan, tag); } @@ -476,7 +470,7 @@ _subset_table (hb_subset_plan_t *plan, case HB_OT_TAG_VVAR: return _subset<const OT::VVAR> (plan, buf); #endif case HB_OT_TAG_fvar: - if (plan->user_axes_location->is_empty ()) return _passthrough (plan, tag); + if (plan->user_axes_location.is_empty ()) return _passthrough (plan, tag); return _subset<const OT::fvar> (plan, buf); case HB_OT_TAG_STAT: /*TODO(qxliu): change the condition as we support more complex @@ -632,3 +626,8 @@ hb_subset_plan_execute_or_fail (hb_subset_plan_t *plan) end: return success ? hb_face_reference (plan->dest) : nullptr; } + +#ifndef HB_NO_VISIBILITY +/* If NO_VISIBILITY, libharfbuzz has this. */ +#include "hb-ot-name-language-static.hh" +#endif diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.h b/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.h index b83264ea5e1d76fbd6c9829b01ce3565196f8662..c14b1b1803473cbb63432a4fea4e3e14fcd1db33 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.h +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.h @@ -71,14 +71,6 @@ typedef struct hb_subset_plan_t hb_subset_plan_t; * in the final subset. * @HB_SUBSET_FLAGS_NO_PRUNE_UNICODE_RANGES: If set then the unicode ranges in * OS/2 will not be recalculated. - * @HB_SUBSET_FLAGS_PATCH_MODE: If set the subsetter behaviour will be modified - * to produce a subset that is better suited to patching. For example cmap - * subtable format will be kept stable. - * @HB_SUBSET_FLAGS_OMIT_GLYF: If set the subsetter won't actually produce the final - * glyf table bytes. The table directory will include and entry as if the table was - * there but the actual final font blob will be truncated prior to the glyf data. This - * is a useful performance optimization when a font aware binary patching algorithm - * is being used to diff two subsets. * * List of boolean properties that can be configured on the subset input. * @@ -95,8 +87,6 @@ typedef enum { /*< flags >*/ HB_SUBSET_FLAGS_NOTDEF_OUTLINE = 0x00000040u, HB_SUBSET_FLAGS_GLYPH_NAMES = 0x00000080u, HB_SUBSET_FLAGS_NO_PRUNE_UNICODE_RANGES = 0x00000100u, - // Not supported yet: HB_SUBSET_FLAGS_PATCH_MODE = 0x00000200u, - // Not supported yet: HB_SUBSET_FLAGS_OMIT_GLYF = 0x00000400u, } hb_subset_flags_t; /** @@ -149,6 +139,9 @@ HB_EXTERN void * hb_subset_input_get_user_data (const hb_subset_input_t *input, hb_user_data_key_t *key); +HB_EXTERN void +hb_subset_input_keep_everything (hb_subset_input_t *input); + HB_EXTERN hb_set_t * hb_subset_input_unicode_set (hb_subset_input_t *input); @@ -204,13 +197,13 @@ hb_subset_plan_create_or_fail (hb_face_t *face, HB_EXTERN void hb_subset_plan_destroy (hb_subset_plan_t *plan); -HB_EXTERN const hb_map_t* +HB_EXTERN hb_map_t * hb_subset_plan_old_to_new_glyph_mapping (const hb_subset_plan_t *plan); -HB_EXTERN const hb_map_t* +HB_EXTERN hb_map_t * hb_subset_plan_new_to_old_glyph_mapping (const hb_subset_plan_t *plan); -HB_EXTERN const hb_map_t* +HB_EXTERN hb_map_t * hb_subset_plan_unicode_to_old_glyph_mapping (const hb_subset_plan_t *plan); diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.hh index 98c5f06fbfc5976c0c1661c02413e1d24c2ca8c2..4f192aae406b1afc33c40a51e59db645a0fbdf32 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-subset.hh @@ -33,6 +33,7 @@ #include "hb-subset.h" #include "hb-machinery.hh" +#include "hb-serialize.hh" #include "hb-subset-input.hh" #include "hb-subset-plan.hh" diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode.cc b/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode.cc index 9a6471e52c471288b902ab4be67b464800648d16..aa2735bedb0bbd797382a50bbc1e6d28af164d36 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode.cc +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-unicode.cc @@ -165,7 +165,7 @@ hb_unicode_funcs_get_default () #if !defined(HB_NO_UNICODE_FUNCS) && defined(HB_UNICODE_FUNCS_NIL) #error "Could not find any Unicode functions implementation, you have to provide your own" -#error "Consider building hb-ucd.cc. If you absolutely want to build without any, check the code." +#error "Consider building hb-ucd.cc. If you absolutely want to build without any, define HB_NO_UNICODE_FUNCS." #endif /** diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-utf.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-utf.hh index ff5712d16ddb08e7482f6693dc8afc135179689a..1120bd1cccfd283bf8a09faeebc72b0036572a13 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-utf.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-utf.hh @@ -35,6 +35,7 @@ struct hb_utf8_t { typedef uint8_t codepoint_t; + static constexpr unsigned max_len = 4; static const codepoint_t * next (const codepoint_t *text, @@ -182,6 +183,7 @@ struct hb_utf16_xe_t { static_assert (sizeof (TCodepoint) == 2, ""); typedef TCodepoint codepoint_t; + static constexpr unsigned max_len = 2; static const codepoint_t * next (const codepoint_t *text, @@ -290,6 +292,7 @@ struct hb_utf32_xe_t { static_assert (sizeof (TCodepoint) == 4, ""); typedef TCodepoint codepoint_t; + static constexpr unsigned max_len = 1; static const TCodepoint * next (const TCodepoint *text, @@ -348,6 +351,7 @@ typedef hb_utf32_xe_t<uint32_t, false> hb_utf32_novalidate_t; struct hb_latin1_t { typedef uint8_t codepoint_t; + static constexpr unsigned max_len = 1; static const codepoint_t * next (const codepoint_t *text, @@ -399,12 +403,13 @@ struct hb_latin1_t struct hb_ascii_t { typedef uint8_t codepoint_t; + static constexpr unsigned max_len = 1; static const codepoint_t * next (const codepoint_t *text, const codepoint_t *end HB_UNUSED, hb_codepoint_t *unicode, - hb_codepoint_t replacement HB_UNUSED) + hb_codepoint_t replacement) { *unicode = *text++; if (*unicode >= 0x0080u) @@ -450,4 +455,27 @@ struct hb_ascii_t } }; +template <typename utf_t> +static inline const typename utf_t::codepoint_t * +hb_utf_offset_to_pointer (const typename utf_t::codepoint_t *start, + signed offset) +{ + hb_codepoint_t unicode; + + while (offset-- > 0) + start = utf_t::next (start, + start + utf_t::max_len, + &unicode, + HB_BUFFER_REPLACEMENT_CODEPOINT_DEFAULT); + + while (offset++ < 0) + start = utf_t::prev (start, + start - utf_t::max_len, + &unicode, + HB_BUFFER_REPLACEMENT_CODEPOINT_DEFAULT); + + return start; +} + + #endif /* HB_UTF_HH */ diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb-vector.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb-vector.hh index 9b52f5ca95647a6af5e63e3a923abe205c29c538..58d467a405fe86113bbdef78ff933e4123704782 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb-vector.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb-vector.hh @@ -45,7 +45,7 @@ struct hb_vector_t hb_vector_t () = default; hb_vector_t (std::initializer_list<Type> lst) : hb_vector_t () { - alloc (lst.size ()); + alloc (lst.size (), true); for (auto&& item : lst) push (item); } @@ -55,12 +55,12 @@ struct hb_vector_t { auto iter = hb_iter (o); if (iter.is_random_access_iterator) - alloc (hb_len (iter)); + alloc (hb_len (iter), true); hb_copy (iter, *this); } hb_vector_t (const hb_vector_t &o) : hb_vector_t () { - alloc (o.length); + alloc (o.length, true); if (unlikely (in_error ())) return; copy_vector (o); } @@ -116,7 +116,7 @@ struct hb_vector_t hb_vector_t& operator = (const hb_vector_t &o) { reset (); - alloc (o.length); + alloc (o.length, true); if (unlikely (in_error ())) return *this; copy_vector (o); @@ -233,6 +233,11 @@ struct hb_vector_t Type * realloc_vector (unsigned new_allocated) { + if (!new_allocated) + { + hb_free (arrayZ); + return nullptr; + } return (Type *) hb_realloc (arrayZ, new_allocated * sizeof (Type)); } template <typename T = Type, @@ -240,6 +245,11 @@ struct hb_vector_t Type * realloc_vector (unsigned new_allocated) { + if (!new_allocated) + { + hb_free (arrayZ); + return nullptr; + } Type *new_array = (Type *) hb_malloc (new_allocated * sizeof (Type)); if (likely (new_array)) { @@ -337,30 +347,53 @@ struct hb_vector_t } /* Allocate for size but don't adjust length. */ - bool alloc (unsigned int size) + bool alloc (unsigned int size, bool exact=false) { if (unlikely (in_error ())) return false; - if (likely (size <= (unsigned) allocated)) - return true; + unsigned int new_allocated; + if (exact) + { + /* If exact was specified, we allow shrinking the storage. */ + size = hb_max (size, length); + if (size <= (unsigned) allocated && + size >= (unsigned) allocated >> 2) + return true; - /* Reallocate */ + new_allocated = size; + } + else + { + if (likely (size <= (unsigned) allocated)) + return true; + + new_allocated = allocated; + while (size > new_allocated) + new_allocated += (new_allocated >> 1) + 8; + } - unsigned int new_allocated = allocated; - while (size >= new_allocated) - new_allocated += (new_allocated >> 1) + 8; - Type *new_array = nullptr; + /* Reallocate */ + bool overflows = (int) in_error () || - (new_allocated < (unsigned) allocated) || + (new_allocated < size) || hb_unsigned_mul_overflows (new_allocated, sizeof (Type)); - if (likely (!overflows)) - new_array = realloc_vector (new_allocated); - if (unlikely (!new_array)) + if (unlikely (overflows)) + { + allocated = -1; + return false; + } + + Type *new_array = realloc_vector (new_allocated); + + if (unlikely (new_allocated && !new_array)) { + if (new_allocated <= (unsigned) allocated) + return true; // shrinking failed; it's okay; happens in our fuzzer + allocated = -1; return false; } @@ -371,10 +404,10 @@ struct hb_vector_t return true; } - bool resize (int size_, bool initialize = true) + bool resize (int size_, bool initialize = true, bool exact = false) { unsigned int size = size_ < 0 ? 0u : (unsigned int) size_; - if (!alloc (size)) + if (!alloc (size, exact)) return false; if (size > length) @@ -391,6 +424,10 @@ struct hb_vector_t length = size; return true; } + bool resize_exact (int size_, bool initialize = true) + { + return resize (size_, initialize, true); + } Type pop () { @@ -422,13 +459,16 @@ struct hb_vector_t length--; } - void shrink (int size_) + void shrink (int size_, bool shrink_memory = true) { unsigned int size = size_ < 0 ? 0u : (unsigned int) size_; if (size >= length) return; shrink_vector (size); + + if (shrink_memory) + alloc (size, true); /* To force shrinking memory if needed. */ } diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb.h b/source/libs/harfbuzz/harfbuzz-src/src/hb.h index 360686ca687e2c1a4fc60f7c6637ab30d00a0bf4..5a6ae6607c2457835d06ede8502b31ef8eedb995 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb.h +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb.h @@ -36,6 +36,7 @@ #include "hb-face.h" #include "hb-font.h" #include "hb-map.h" +#include "hb-paint.h" #include "hb-set.h" #include "hb-shape.h" #include "hb-shape-plan.h" diff --git a/source/libs/harfbuzz/harfbuzz-src/src/hb.hh b/source/libs/harfbuzz/harfbuzz-src/src/hb.hh index 410d090d36d29ef84c12953c7bd2a0b4adde6718..857571b42fdba99221535fbe1c28710bfec0f793 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/hb.hh +++ b/source/libs/harfbuzz/harfbuzz-src/src/hb.hh @@ -103,20 +103,20 @@ #pragma GCC diagnostic warning "-Wdisabled-optimization" #pragma GCC diagnostic warning "-Wdouble-promotion" #pragma GCC diagnostic warning "-Wformat=2" +#pragma GCC diagnostic warning "-Wformat-signedness" #pragma GCC diagnostic warning "-Wignored-pragma-optimize" #pragma GCC diagnostic warning "-Wlogical-op" #pragma GCC diagnostic warning "-Wmaybe-uninitialized" #pragma GCC diagnostic warning "-Wmissing-format-attribute" #pragma GCC diagnostic warning "-Wundef" +#pragma GCC diagnostic warning "-Wunsafe-loop-optimizations" #pragma GCC diagnostic warning "-Wunused-but-set-variable" #endif /* Ignored currently, but should be fixed at some point. */ #ifndef HB_NO_PRAGMA_GCC_DIAGNOSTIC_IGNORED #pragma GCC diagnostic ignored "-Wconversion" // TODO fix -#pragma GCC diagnostic ignored "-Wformat-signedness" // TODO fix #pragma GCC diagnostic ignored "-Wshadow" // TODO fix -#pragma GCC diagnostic ignored "-Wunsafe-loop-optimizations" // TODO fix #pragma GCC diagnostic ignored "-Wunused-parameter" // TODO fix #if defined(__GNUC__) && !defined(__clang__) #pragma GCC diagnostic ignored "-Wunused-result" // TODO fix @@ -127,6 +127,7 @@ #ifndef HB_NO_PRAGMA_GCC_DIAGNOSTIC_IGNORED #pragma GCC diagnostic ignored "-Wclass-memaccess" #pragma GCC diagnostic ignored "-Wcast-function-type-strict" // https://github.com/harfbuzz/harfbuzz/pull/3859#issuecomment-1295409126 +#pragma GCC diagnostic ignored "-Wdangling-reference" // https://github.com/harfbuzz/harfbuzz/issues/4043 #pragma GCC diagnostic ignored "-Wformat-nonliteral" #pragma GCC diagnostic ignored "-Wformat-zero-length" #pragma GCC diagnostic ignored "-Wmissing-field-initializers" @@ -142,6 +143,7 @@ #include "hb-config.hh" +#include "hb-limits.hh" /* @@ -461,6 +463,37 @@ static int HB_UNUSED _hb_errno = 0; #endif #endif + +// Locale business + +#if !defined(HB_NO_SETLOCALE) && (!defined(HAVE_NEWLOCALE) || !defined(HAVE_USELOCALE)) +#define HB_NO_SETLOCALE 1 +#endif + +#ifndef HB_NO_SETLOCALE + +#include <locale.h> +#ifdef HAVE_XLOCALE_H +#include <xlocale.h> // Needed on BSD/OS X for uselocale +#endif + +#ifdef WIN32 +#define hb_locale_t _locale_t +#else +#define hb_locale_t locale_t +#endif +#define hb_setlocale setlocale +#define hb_uselocale uselocale + +#else + +#define hb_locale_t void * +#define hb_setlocale(Category, Locale) "C" +#define hb_uselocale(Locale) ((hb_locale_t) 0) + +#endif + + /* Lets assert int types. Saves trouble down the road. */ static_assert ((sizeof (hb_codepoint_t) == 4), ""); static_assert ((sizeof (hb_position_t) == 4), ""); diff --git a/source/libs/harfbuzz/harfbuzz-src/src/main.cc b/source/libs/harfbuzz/harfbuzz-src/src/main.cc index bb18ebe3862bef4740d6d77feea8092f560501dd..edc9872eed68e11269872072c448c3cc965c8e8b 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/main.cc +++ b/source/libs/harfbuzz/harfbuzz-src/src/main.cc @@ -220,7 +220,7 @@ layered_glyph_dump (hb_font_t *font, hb_draw_funcs_t *funcs, unsigned face_index hb_glyph_extents_t extents = {0}; if (!hb_font_get_glyph_extents (font, gid, &extents)) { - printf ("Skip gid: %d\n", gid); + printf ("Skip gid: %u\n", gid); continue; } @@ -270,7 +270,7 @@ dump_glyphs (hb_font_t *font, hb_draw_funcs_t *funcs, unsigned face_index) hb_glyph_extents_t extents = {0}; if (!hb_font_get_glyph_extents (font, gid, &extents)) { - printf ("Skip gid: %d\n", gid); + printf ("Skip gid: %u\n", gid); continue; } @@ -393,18 +393,18 @@ print_layout_info_using_private_api (hb_blob_t *blob) } unsigned num_faces = hb_face_count (blob); - printf ("%d font(s) found in file\n", num_faces); + printf ("%u font(s) found in file\n", num_faces); for (unsigned n_font = 0; n_font < num_faces; ++n_font) { const OpenTypeFontFace &font = ot.get_face (n_font); - printf ("Font %d of %d:\n", n_font, num_faces); + printf ("Font %u of %u:\n", n_font, num_faces); unsigned num_tables = font.get_table_count (); - printf (" %d table(s) found in font\n", num_tables); + printf (" %u table(s) found in font\n", num_tables); for (unsigned n_table = 0; n_table < num_tables; ++n_table) { const OpenTypeTable &table = font.get_table (n_table); - printf (" Table %2d of %2d: %.4s (0x%08x+0x%08x)\n", n_table, num_tables, + printf (" Table %2u of %2u: %.4s (0x%08x+0x%08x)\n", n_table, num_tables, (const char *) table.tag, (unsigned) table.offset, (unsigned) table.length); @@ -419,11 +419,11 @@ print_layout_info_using_private_api (hb_blob_t *blob) const GSUBGPOS &g = *reinterpret_cast<const GSUBGPOS *> (font_data + table.offset); unsigned num_scripts = g.get_script_count (); - printf (" %d script(s) found in table\n", num_scripts); + printf (" %u script(s) found in table\n", num_scripts); for (unsigned n_script = 0; n_script < num_scripts; ++n_script) { const Script &script = g.get_script (n_script); - printf (" Script %2d of %2d: %.4s\n", n_script, num_scripts, + printf (" Script %2u of %2u: %.4s\n", n_script, num_scripts, (const char *) g.get_script_tag (n_script)); if (!script.has_default_lang_sys ()) @@ -443,41 +443,41 @@ print_layout_info_using_private_api (hb_blob_t *blob) if (!langsys.has_required_feature ()) printf (" No required feature\n"); else - printf (" Required feature index: %d\n", + printf (" Required feature index: %u\n", langsys.get_required_feature_index ()); unsigned num_features = langsys.get_feature_count (); - printf (" %d feature(s) found in language system\n", num_features); + printf (" %u feature(s) found in language system\n", num_features); for (unsigned n_feature = 0; n_feature < num_features; ++n_feature) { - printf (" Feature index %2d of %2d: %d\n", n_feature, num_features, + printf (" Feature index %2u of %2u: %u\n", n_feature, num_features, langsys.get_feature_index (n_feature)); } } } unsigned num_features = g.get_feature_count (); - printf (" %d feature(s) found in table\n", num_features); + printf (" %u feature(s) found in table\n", num_features); for (unsigned n_feature = 0; n_feature < num_features; ++n_feature) { const Feature &feature = g.get_feature (n_feature); unsigned num_lookups = feature.get_lookup_count (); - printf (" Feature %2d of %2d: %c%c%c%c\n", n_feature, num_features, + printf (" Feature %2u of %2u: %c%c%c%c\n", n_feature, num_features, HB_UNTAG (g.get_feature_tag (n_feature))); - printf (" %d lookup(s) found in feature\n", num_lookups); + printf (" %u lookup(s) found in feature\n", num_lookups); for (unsigned n_lookup = 0; n_lookup < num_lookups; ++n_lookup) { - printf (" Lookup index %2d of %2d: %d\n", n_lookup, num_lookups, + printf (" Lookup index %2u of %2u: %u\n", n_lookup, num_lookups, feature.get_lookup_index (n_lookup)); } } unsigned num_lookups = g.get_lookup_count (); - printf (" %d lookup(s) found in table\n", num_lookups); + printf (" %u lookup(s) found in table\n", num_lookups); for (unsigned n_lookup = 0; n_lookup < num_lookups; ++n_lookup) { const Lookup &lookup = g.get_lookup (n_lookup); - printf (" Lookup %2d of %2d: type %d, props 0x%04X\n", n_lookup, num_lookups, + printf (" Lookup %2u of %2u: type %u, props 0x%04X\n", n_lookup, num_lookups, lookup.get_type (), lookup.get_props ()); } @@ -519,7 +519,7 @@ main (int argc, char **argv) hb_blob_t *blob = hb_blob_create_from_file_or_fail (argv[1]); assert (blob); - printf ("Opened font file %s: %d bytes long\n", argv[1], hb_blob_get_length (blob)); + printf ("Opened font file %s: %u bytes long\n", argv[1], hb_blob_get_length (blob)); #ifndef MAIN_CC_NO_PRIVATE_API print_layout_info_using_private_api (blob); #endif diff --git a/source/libs/harfbuzz/harfbuzz-src/src/meson.build b/source/libs/harfbuzz/harfbuzz-src/src/meson.build index 5d01d9862c72458ac6ca857d45d57d5ba620185f..435201c28c4533ce6fa10ae067348ef8ea914780 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/meson.build +++ b/source/libs/harfbuzz/harfbuzz-src/src/meson.build @@ -44,13 +44,19 @@ hb_base_sources = files( 'hb-dispatch.hh', 'hb-draw.cc', 'hb-draw.hh', + 'hb-paint.cc', + 'hb-paint.hh', + 'hb-paint-extents.cc', + 'hb-paint-extents.hh', 'hb-face.cc', 'hb-face.hh', + 'hb-face-builder.cc', 'hb-fallback-shape.cc', 'hb-font.cc', 'hb-font.hh', 'hb-iter.hh', 'hb-kern.hh', + 'hb-limits.hh', 'hb-machinery.hh', 'hb-map.cc', 'hb-map.hh', @@ -71,11 +77,6 @@ hb_base_sources = files( 'hb-ot-cff2-table.cc', 'hb-ot-cff2-table.hh', 'hb-ot-cmap-table.hh', - 'hb-ot-color-cbdt-table.hh', - 'hb-ot-color-colr-table.hh', - 'hb-ot-color-cpal-table.hh', - 'hb-ot-color-sbix-table.hh', - 'hb-ot-color-svg-table.hh', 'hb-ot-color.cc', 'hb-ot-face-table-list.hh', 'hb-ot-face.cc', @@ -93,6 +94,13 @@ hb_base_sources = files( 'hb-ot-layout-gdef-table.hh', 'hb-ot-layout-gpos-table.hh', 'hb-ot-layout-gsub-table.hh', + 'hb-outline.hh', + 'hb-outline.cc', + 'OT/Color/CBDT/CBDT.hh', + 'OT/Color/COLR/COLR.hh', + 'OT/Color/CPAL/CPAL.hh', + 'OT/Color/sbix/sbix.hh', + 'OT/Color/svg/svg.hh', 'OT/glyf/glyf.hh', 'OT/glyf/glyf-helpers.hh', 'OT/glyf/loca.hh', @@ -107,6 +115,7 @@ hb_base_sources = files( 'OT/Layout/Common/CoverageFormat1.hh', 'OT/Layout/Common/CoverageFormat2.hh', 'OT/Layout/Common/RangeRecord.hh', + 'OT/Layout/GDEF/GDEF.hh', 'OT/Layout/GPOS/AnchorFormat1.hh', 'OT/Layout/GPOS/AnchorFormat2.hh', 'OT/Layout/GPOS/AnchorFormat3.hh', @@ -161,6 +170,7 @@ hb_base_sources = files( 'OT/Layout/GSUB/SingleSubst.hh', 'OT/Layout/GSUB/SubstLookup.hh', 'OT/Layout/GSUB/SubstLookupSubTable.hh', + 'OT/name/name.hh', 'hb-ot-layout-gsubgpos.hh', 'hb-ot-layout-jstf-table.hh', 'hb-ot-layout.cc', @@ -250,7 +260,8 @@ hb_base_sources = files( hb_base_ragel_generated_sources = files( 'hb-buffer-deserialize-json.hh', - 'hb-buffer-deserialize-text.hh', + 'hb-buffer-deserialize-text-glyphs.hh', + 'hb-buffer-deserialize-text-unicode.hh', 'hb-number-parser.hh', 'hb-ot-shaper-indic-machine.hh', 'hb-ot-shaper-khmer-machine.hh', @@ -259,7 +270,8 @@ hb_base_ragel_generated_sources = files( ) hb_base_ragel_sources = [ 'hb-buffer-deserialize-json.rl', - 'hb-buffer-deserialize-text.rl', + 'hb-buffer-deserialize-text-glyphs.rl', + 'hb-buffer-deserialize-text-unicode.rl', 'hb-number-parser.rl', 'hb-ot-shaper-indic-machine.rl', 'hb-ot-shaper-khmer-machine.rl', @@ -276,6 +288,7 @@ hb_base_headers = files( 'hb-cplusplus.hh', 'hb-deprecated.h', 'hb-draw.h', + 'hb-paint.h', 'hb-face.h', 'hb-font.h', 'hb-map.h', @@ -301,7 +314,7 @@ hb_base_headers += hb_version_h # Optional Sources and Headers with external deps -hb_ft_sources = files('hb-ft.cc') +hb_ft_sources = files('hb-ft.cc', 'hb-ft-colr.hh') hb_ft_headers = files('hb-ft.h') hb_glib_sources = files('hb-glib.cc') @@ -344,6 +357,7 @@ hb_subset_sources = files( 'hb-subset-cff2.hh', 'hb-subset-input.cc', 'hb-subset-input.hh', + 'hb-subset-instancer-solver.cc', 'hb-subset-plan.cc', 'hb-subset-plan.hh', 'hb-subset-repacker.cc', @@ -415,40 +429,38 @@ harfbuzz_deps = [thread_dep, m_dep] + harfbuzz_extra_deps libharfbuzz_link_language = 'c' -hb_features = configuration_data() - if conf.get('HAVE_FREETYPE', 0) == 1 hb_sources += hb_ft_sources hb_headers += hb_ft_headers harfbuzz_deps += [freetype_dep] - hb_features.set('HB_HAS_FREETYPE', 1) endif +if conf.get('HAVE_GLIB', 0) == 1 + hb_sources += hb_glib_sources + hb_headers += hb_glib_headers + harfbuzz_deps += [glib_dep] +endif + +# We set those here to not include the sources below that are of no use to +# GObject Introspection +gir_sources = hb_sources + hb_gobject_sources +gir_headers = hb_headers + hb_gobject_headers + if conf.get('HAVE_GDI', 0) == 1 hb_sources += hb_gdi_sources hb_headers += hb_gdi_headers harfbuzz_deps += gdi_uniscribe_deps - hb_features.set('HB_HAS_GDI', 1) endif if conf.get('HAVE_GRAPHITE2', 0) == 1 hb_sources += hb_graphite2_sources hb_headers += hb_graphite2_headers harfbuzz_deps += [graphite2_dep, graphite_dep] - hb_features.set('HB_HAS_GRAPHITE', 1) -endif - -if conf.get('HAVE_GLIB', 0) == 1 - hb_sources += hb_glib_sources - hb_headers += hb_glib_headers - harfbuzz_deps += [glib_dep] - hb_features.set('HB_HAS_GLIB', 1) endif if conf.get('HAVE_UNISCRIBE', 0) == 1 hb_sources += hb_uniscribe_sources hb_headers += hb_uniscribe_headers - hb_features.set('HB_HAS_UNISCRIBE', 1) endif if conf.get('HAVE_DIRECTWRITE', 0) == 1 @@ -456,44 +468,69 @@ if conf.get('HAVE_DIRECTWRITE', 0) == 1 hb_headers += hb_directwrite_headers # hb-directwrite needs a C++ linker libharfbuzz_link_language = 'cpp' - hb_features.set('HB_HAS_DIRECTWRITE', 1) endif if conf.get('HAVE_CORETEXT', 0) == 1 hb_sources += hb_coretext_sources hb_headers += hb_coretext_headers harfbuzz_deps += coretext_deps - hb_features.set('HB_HAS_CORETEXT', 1) endif have_icu = conf.get('HAVE_ICU', 0) == 1 have_icu_builtin = conf.get('HAVE_ICU_BUILTIN', 0) == 1 - if have_icu and have_icu_builtin hb_sources += hb_icu_sources hb_headers += hb_icu_headers harfbuzz_deps += [icu_dep] - hb_features.set('HB_HAS_ICU', 1) endif +features = [ + 'CAIRO', + 'CORETEXT', + 'DIRECTWRITE', + 'FREETYPE', + 'GDI', + 'GLIB', + 'GOBJECT', + 'GRAPHITE', + 'ICU', + 'UNISCRIBE', +] + +hb_enabled_features = configuration_data() +hb_supported_features = configuration_data() +foreach feature : features + key = 'HB_HAS_@0@'.format(feature) + hb_enabled_features.set(key, conf.get('HAVE_@0@'.format(feature), false)) + hb_supported_features.set(key, 1) +endforeach + +# The enabled features. This file is installed. hb_features_h = configure_file(input: 'hb-features.h.in', output: 'hb-features.h', - configuration: hb_features, + configuration: hb_enabled_features, install: true, install_dir: get_option('includedir') / meson.project_name()) +# This file is generated to convince gtk-doc to generate documentation for all +# HB_HAS_* macros, whether they are enabled for the current build or not. +# This file should not be installed. +hb_supported_features_h = configure_file(input: 'hb-features.h.in', + output: 'hb-supported-features.h', + configuration: hb_supported_features, + install: false) + # Base and default-included sources and headers -# harfbuzz gen_def = find_program('gen-def.py') - -harfbuzz_def_command_args = [gen_def, '@OUTPUT@', '@INPUT@'] +gen_def_cmd = [gen_def, '@OUTPUT@', '@INPUT@'] if get_option('experimental_api') - harfbuzz_def_command_args += '--experimental-api' + gen_def_cmd += '--experimental-api' endif +# harfbuzz harfbuzz_def = custom_target('harfbuzz.def', - command: harfbuzz_def_command_args, + command: gen_def_cmd, input: hb_headers, output: 'harfbuzz.def') defs_list = [harfbuzz_def] @@ -535,10 +572,11 @@ libharfbuzz_dep = declare_dependency( link_with: libharfbuzz, include_directories: incsrc, dependencies: harfbuzz_deps) +meson.override_dependency('harfbuzz', libharfbuzz_dep) # harfbuzz-subset harfbuzz_subset_def = custom_target('harfbuzz-subset.def', - command: [gen_def, '@OUTPUT@', '@INPUT@'], + command: gen_def_cmd, input: hb_subset_headers, output: 'harfbuzz-subset.def') defs_list += [harfbuzz_subset_def] @@ -567,6 +605,55 @@ libharfbuzz_subset_dep = declare_dependency( link_with: libharfbuzz_subset, include_directories: incsrc, dependencies: [m_dep]) +meson.override_dependency('harfbuzz-subset', libharfbuzz_subset_dep) + +libharfbuzz_cairo_dep = null_dep +if conf.get('HAVE_CAIRO', 0) == 1 + hb_cairo_sources = [ + 'hb-cairo.cc', + 'hb-cairo-utils.cc', + 'hb-static.cc' + ] + + hb_cairo_headers = [ + 'hb-cairo.h', + ] + + cairo_dep = dependency('cairo') + + libharfbuzz_cairo = library('harfbuzz-cairo', hb_cairo_sources, + include_directories: incconfig, + dependencies: [m_dep, cairo_dep], + link_with: [libharfbuzz], + cpp_args: cpp_args + extra_hb_cpp_args, + soversion: hb_so_version, + version: version, + install: true, + darwin_versions: darwin_versions, + link_language: 'c', + ) + + install_headers(hb_cairo_headers, subdir: meson.project_name()) + + libharfbuzz_cairo_dep = declare_dependency( + link_with: libharfbuzz_cairo, + include_directories: incsrc, + dependencies: [m_dep, cairo_dep]) + meson.override_dependency('harfbuzz-cairo', libharfbuzz_cairo_dep) + + harfbuzz_cairo_def = custom_target('harfbuzz-cairo.def', + command: gen_def_cmd, + input: hb_cairo_headers, + output: 'harfbuzz-cairo.def') + defs_list += [harfbuzz_cairo_def] + + pkgmod.generate(libharfbuzz_cairo, + description: 'HarfBuzz cairo support', + requires: ['harfbuzz = @0@'.format(meson.project_version())], + subdirs: [meson.project_name()], + version: meson.project_version(), + ) +endif if get_option('tests').enabled() # TODO: MSVC gives the following, @@ -641,7 +728,7 @@ pkgmod.generate(libharfbuzz_subset, libharfbuzz_icu_dep = null_dep if have_icu and not have_icu_builtin harfbuzz_icu_def = custom_target('harfbuzz-icu.def', - command: [gen_def, '@OUTPUT@', '@INPUT@'], + command: gen_def_cmd, input: [hb_icu_headers], output: 'harfbuzz-icu.def') defs_list += [harfbuzz_icu_def] @@ -663,6 +750,7 @@ if have_icu and not have_icu_builtin link_with: libharfbuzz_icu, include_directories: incsrc, dependencies: icu_dep) + meson.override_dependency('harfbuzz-icu', libharfbuzz_icu_dep) pkgmod.generate(libharfbuzz_icu, description: 'HarfBuzz text shaping library ICU integration', @@ -687,6 +775,8 @@ configure_file(input: 'harfbuzz-config.cmake.in', install_dir: get_option('libdir') / 'cmake' / 'harfbuzz', ) +gobject_enums_c = [] +gobject_enums_h = [] libharfbuzz_gobject_dep = null_dep if have_gobject gnome = import('gnome') @@ -709,13 +799,13 @@ if have_gobject symbol_prefix: 'hb_gobject', ) - enum_c = custom_target('hb-gobject-enums.cc', + gobject_enums_c = custom_target('hb-gobject-enums.cc', input: enums[0], output: 'hb-gobject-enums.cc', command: [find_program('fix_get_types.py'), '@INPUT@', '@OUTPUT@'] ) - enum_h = custom_target('hb-gobject-enums.h', + gobject_enums_h = custom_target('hb-gobject-enums.h', input: enums[1], output: 'hb-gobject-enums.h', command: [find_program('fix_get_types.py'), '@INPUT@', '@OUTPUT@'], @@ -723,15 +813,15 @@ if have_gobject install_dir: get_option('prefix') / get_option('includedir') / meson.project_name(), ) - hb_gobject_sources += [enum_c] + hb_gobject_sources += [gobject_enums_c] harfbuzz_gobject_def = custom_target('harfbuzz-gobject.def', - command: [gen_def, '@OUTPUT@', '@INPUT@'], - input: [hb_gobject_headers, enum_h], + command: gen_def_cmd, + input: [hb_gobject_headers, gobject_enums_h], output: 'harfbuzz-gobject.def') defs_list += [harfbuzz_gobject_def] - libharfbuzz_gobject = library('harfbuzz-gobject', [hb_gobject_sources, enum_c, enum_h], + libharfbuzz_gobject = library('harfbuzz-gobject', [hb_gobject_sources, gobject_enums_c, gobject_enums_h], include_directories: incconfig, dependencies: [glib_dep, gobject_dep], link_with: [libharfbuzz], @@ -754,7 +844,7 @@ if have_gobject if build_gir conf.set('HAVE_INTROSPECTION', 1) hb_gen_files_gir = gnome.generate_gir(libharfbuzz_gobject, - sources: [hb_headers, hb_sources, hb_gobject_headers, hb_gobject_sources, enum_h], + sources: [gir_headers, gir_sources, gobject_enums_h], dependencies: libharfbuzz_dep, namespace: 'HarfBuzz', nsversion: '0.0', @@ -776,6 +866,7 @@ if have_gobject include_directories: incsrc, sources: build_gir ? hb_gen_files_gir : hb_gobject_sources, dependencies: [glib_dep, gobject_dep]) + meson.override_dependency('harfbuzz-gobject', libharfbuzz_gobject_dep) pkgmod.generate(libharfbuzz_gobject, description: 'HarfBuzz text shaping library GObject integration', diff --git a/source/libs/harfbuzz/harfbuzz-src/src/test-buffer-serialize.cc b/source/libs/harfbuzz/harfbuzz-src/src/test-buffer-serialize.cc index 8a887922be07c3518101fdbdb93c05d0208e6b75..aced1c8d1b4beb2b4791d05e4fac396aee70e14f 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/test-buffer-serialize.cc +++ b/source/libs/harfbuzz/harfbuzz-src/src/test-buffer-serialize.cc @@ -56,10 +56,6 @@ main (int argc, char **argv) hb_font_t *font = hb_font_create (face); hb_face_destroy (face); hb_font_set_scale (font, upem, upem); - //hb_ot_font_set_funcs (font); -#ifdef HAVE_FREETYPE - //hb_ft_font_set_funcs (font); -#endif hb_buffer_t *buf; buf = hb_buffer_create (); @@ -69,20 +65,43 @@ main (int argc, char **argv) { hb_buffer_clear_contents (buf); - const char *p = line; - while (hb_buffer_deserialize_glyphs (buf, + while (true) + { + const char *p = line; + if (!hb_buffer_deserialize_glyphs (buf, p, -1, &p, font, HB_BUFFER_SERIALIZE_FORMAT_TEXT)) - ; - if (*p && *p != '\n') - ret = false; - - hb_buffer_serialize_glyphs (buf, 0, hb_buffer_get_length (buf), - out, sizeof (out), nullptr, - font, HB_BUFFER_SERIALIZE_FORMAT_TEXT, - HB_BUFFER_SERIALIZE_FLAG_GLYPH_FLAGS); - puts (out); + { + ret = false; + break; + } + + if (*p == '\n') + break; + if (p == line) + { + ret = false; + break; + } + + unsigned len = strlen (p); + memmove (line, p, len); + if (!fgets (line + len, sizeof(line) - len, stdin)) + line[len] = '\0'; + } + + unsigned count = hb_buffer_get_length (buf); + for (unsigned offset = 0; offset < count;) + { + unsigned len; + offset += hb_buffer_serialize_glyphs (buf, offset, count, + out, sizeof (out), &len, + font, HB_BUFFER_SERIALIZE_FORMAT_TEXT, + HB_BUFFER_SERIALIZE_FLAG_GLYPH_FLAGS); + fwrite (out, 1, len, stdout); + } + fputs ("\n", stdout); } hb_buffer_destroy (buf); diff --git a/source/libs/harfbuzz/harfbuzz-src/src/test-map.cc b/source/libs/harfbuzz/harfbuzz-src/src/test-map.cc index da77a2f6c4e543133ad5f2282c9f002d82d2d70b..a0a59cbcd1b13d836b9b0bd556c4228c7d7e8012 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/test-map.cc +++ b/source/libs/harfbuzz/harfbuzz-src/src/test-map.cc @@ -237,16 +237,6 @@ main (int argc, char **argv) m.keys_ref (); m.values_ref (); } - /* Test more complex unique_ptr's. */ - { - hb_hashmap_t<int, hb::unique_ptr<hb_hashmap_t<int, int>>> m; - - m.get (0); - const hb::unique_ptr<hb_hashmap_t<int, int>> *v1; - m.has (0, &v1); - hb::unique_ptr<hb_hashmap_t<int, int>> *v2; - m.has (0, &v2); - } /* Test hashmap with complex shared_ptrs as keys. */ { hb_hashmap_t<hb::shared_ptr<hb_map_t>, unsigned> m; @@ -273,6 +263,7 @@ main (int argc, char **argv) m.set (1, bytes); assert (m.has (1)); + assert (m.get (1) == hb_bytes_t {"Test"}); } /* Test operators. */ { @@ -301,6 +292,67 @@ main (int argc, char **argv) m.set (1, hb_set_t {1, 2, 3}); m.reset (); } + /* Test iteration. */ + { + hb_map_t m; + m.set (1, 1); + m.set (4, 3); + m.set (5, 5); + m.set (2, 1); + m.set (3, 2); + m.set (6, 8); + + hb_codepoint_t k; + hb_codepoint_t v; + unsigned pop = 0; + for (signed i = -1; + m.next (&i, &k, &v);) + { + pop++; + if (k == 1) assert (v == 1); + else if (k == 2) assert (v == 1); + else if (k == 3) assert (v == 2); + else if (k == 4) assert (v == 3); + else if (k == 5) assert (v == 5); + else if (k == 6) assert (v == 8); + else assert (false); + } + assert (pop == m.get_population ()); + } + /* Test update */ + { + hb_map_t m1, m2; + m1.set (1, 2); + m1.set (2, 4); + m2.set (1, 3); + + m1.update (m2); + assert (m1.get_population () == 2); + assert (m1[1] == 3); + assert (m1[2] == 4); + } + /* Test keys / values */ + { + hb_map_t m; + m.set (1, 1); + m.set (4, 3); + m.set (5, 5); + m.set (2, 1); + m.set (3, 2); + m.set (6, 8); + + hb_set_t keys; + hb_set_t values; + + m.keys (keys); + m.values (values); + + assert (keys.is_equal (hb_set_t ({1, 2, 3, 4, 5, 6}))); + assert (values.is_equal (hb_set_t ({1, 1, 2, 3, 5, 8}))); + + assert (keys.is_equal (hb_set_t (m.keys ()))); + assert (values.is_equal (hb_set_t (m.values ()))); + } return 0; } diff --git a/source/libs/harfbuzz/harfbuzz-src/src/test-ot-meta.cc b/source/libs/harfbuzz/harfbuzz-src/src/test-ot-meta.cc index 7cf69dbcc34f9495698193d78eb028d36c910cbe..6daacc47d337379a009c35a2f02208ed119dec6b 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/test-ot-meta.cc +++ b/source/libs/harfbuzz/harfbuzz-src/src/test-ot-meta.cc @@ -54,9 +54,9 @@ main (int argc, char **argv) for (unsigned i = 0; i < count; ++i) { hb_blob_t *entry = hb_ot_meta_reference_entry (face, tags[i]); - printf ("%c%c%c%c, size: %d: %.*s\n", + printf ("%c%c%c%c, size: %u: %.*s\n", HB_UNTAG (tags[i]), hb_blob_get_length (entry), - hb_blob_get_length (entry), hb_blob_get_data (entry, nullptr)); + (int) hb_blob_get_length (entry), hb_blob_get_data (entry, nullptr)); hb_blob_destroy (entry); } free (tags); diff --git a/source/libs/harfbuzz/harfbuzz-src/src/test-set.cc b/source/libs/harfbuzz/harfbuzz-src/src/test-set.cc index e760c98f82a64a7d484f39b5bb95ff03cfcf7cce..9fe319da697093d40aec194a9115aee9806590a8 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/test-set.cc +++ b/source/libs/harfbuzz/harfbuzz-src/src/test-set.cc @@ -107,5 +107,35 @@ main (int argc, char **argv) assert (v2.get_population () == 3); } + /* Test inverted sets. */ + { + hb_set_t s; + s.invert(); + s.del (5); + + hb_codepoint_t start = HB_SET_VALUE_INVALID, last = HB_SET_VALUE_INVALID; + assert (s.next_range (&start, &last)); + assert (start == 0); + assert (last == 4); + assert (s.next_range (&start, &last)); + assert (start == 6); + assert (last == HB_SET_VALUE_INVALID - 1); + assert (!s.next_range (&start, &last)); + + start = HB_SET_VALUE_INVALID; + last = HB_SET_VALUE_INVALID; + assert (s.previous_range (&start, &last)); + assert (start == 6); + assert (last == HB_SET_VALUE_INVALID - 1); + assert (s.previous_range (&start, &last)); + assert (start == 0); + assert (last == 4); + assert (!s.previous_range (&start, &last)); + + assert (s.is_inverted ()); + /* Inverted set returns true for invalid value; oh well. */ + assert (s.has (HB_SET_VALUE_INVALID)); + } + return 0; } diff --git a/source/libs/harfbuzz/harfbuzz-src/src/test-unicode-ranges.cc b/source/libs/harfbuzz/harfbuzz-src/src/test-unicode-ranges.cc index 33cac6b71579bb86ab5f491a45755216429ff2fe..27b5b9e71586a3c75ac296d77cb5fd8f7671e204 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/test-unicode-ranges.cc +++ b/source/libs/harfbuzz/harfbuzz-src/src/test-unicode-ranges.cc @@ -32,7 +32,7 @@ test (hb_codepoint_t cp, unsigned int bit) { if (OT::_hb_ot_os2_get_unicode_range_bit (cp) != bit) { - fprintf (stderr, "got incorrect bit (%d) for cp 0x%X. Should have been %d.", + fprintf (stderr, "got incorrect bit (%u) for cp 0x%X. Should have been %u.", OT::_hb_ot_os2_get_unicode_range_bit (cp), cp, bit); diff --git a/source/libs/harfbuzz/harfbuzz-src/src/test.cc b/source/libs/harfbuzz/harfbuzz-src/src/test.cc index d848cf106225d90b4bdf823e29f95241b42a78e0..f7e4e7ecde88b6e33eebd40f44ad27ad9f317d16 100644 --- a/source/libs/harfbuzz/harfbuzz-src/src/test.cc +++ b/source/libs/harfbuzz/harfbuzz-src/src/test.cc @@ -75,7 +75,7 @@ main (int argc, char **argv) hb_glyph_info_t *info = &infos[i]; hb_glyph_position_t *pos = &positions[i]; - printf ("cluster %d glyph 0x%x at (%d,%d)+(%d,%d)\n", + printf ("cluster %u glyph 0x%x at (%d,%d)+(%d,%d)\n", info->cluster, info->codepoint, pos->x_offset, diff --git a/source/libs/harfbuzz/include/Makefile.am b/source/libs/harfbuzz/include/Makefile.am index 1c2c1ab9432b9ab5a1240b5e6dccde9a7bbe56dc..38f8fe51d40a41e49dda3e1db5c8658a020eb891 100644 --- a/source/libs/harfbuzz/include/Makefile.am +++ b/source/libs/harfbuzz/include/Makefile.am @@ -1,4 +1,4 @@ -## $Id: Makefile.am 62894 2022-04-03 22:28:02Z kakuto $ +## $Id: Makefile.am 65798 2023-02-12 04:02:23Z kakuto $ ## Proxy Makefile.am to install harfbuzz headers for TeX Live. ## ## Copyright 2015-2016 Karl Berry <tex-live@tug.org> @@ -25,6 +25,7 @@ hdr_links = \ $(HARFBUZZ_SRC)/hb-font.h \ $(HARFBUZZ_SRC)/hb-map.h \ $(HARFBUZZ_SRC)/hb-ot-deprecated.h \ + $(HARFBUZZ_SRC)/hb-paint.h \ $(HARFBUZZ_SRC)/hb-set.h \ $(HARFBUZZ_SRC)/hb-shape.h \ $(HARFBUZZ_SRC)/hb-shape-plan.h \ diff --git a/source/libs/harfbuzz/include/Makefile.in b/source/libs/harfbuzz/include/Makefile.in index 7604e5616a079874a19d5eaf198f9ca681e984c5..dcc992ca4ac49db8ac3d787dc796993ff3295f11 100644 --- a/source/libs/harfbuzz/include/Makefile.in +++ b/source/libs/harfbuzz/include/Makefile.in @@ -252,8 +252,9 @@ hdr_links = $(HARFBUZZ_SRC)/hb.h $(HARFBUZZ_SRC)/hb-aat-layout.h \ $(HARFBUZZ_SRC)/hb-deprecated.h $(HARFBUZZ_SRC)/hb-draw.h \ $(HARFBUZZ_SRC)/hb-face.h $(HARFBUZZ_SRC)/hb-font.h \ $(HARFBUZZ_SRC)/hb-map.h $(HARFBUZZ_SRC)/hb-ot-deprecated.h \ - $(HARFBUZZ_SRC)/hb-set.h $(HARFBUZZ_SRC)/hb-shape.h \ - $(HARFBUZZ_SRC)/hb-shape-plan.h $(HARFBUZZ_SRC)/hb-style.h \ + $(HARFBUZZ_SRC)/hb-paint.h $(HARFBUZZ_SRC)/hb-set.h \ + $(HARFBUZZ_SRC)/hb-shape.h $(HARFBUZZ_SRC)/hb-shape-plan.h \ + $(HARFBUZZ_SRC)/hb-style.h \ $(HARFBUZZ_SRC)/hb-subset-repacker.h \ $(HARFBUZZ_SRC)/hb-unicode.h $(HARFBUZZ_BLD)/hb-version.h \ $(HARFBUZZ_SRC)/hb-ot.h $(HARFBUZZ_SRC)/hb-ot-color.h \ diff --git a/source/libs/harfbuzz/version.ac b/source/libs/harfbuzz/version.ac index 346ee46cd63bebe8710182ede65a040afb758a01..c5ecaabc8c1ebc4371fd11b47d512365d99291b3 100644 --- a/source/libs/harfbuzz/version.ac +++ b/source/libs/harfbuzz/version.ac @@ -8,4 +8,4 @@ dnl dnl -------------------------------------------------------- dnl dnl m4-include this file to define the current harfbuzz version -m4_define([harfbuzz_version], [6.0.0]) +m4_define([harfbuzz_version], [7.0.1]) diff --git a/source/libs/libpng/ChangeLog b/source/libs/libpng/ChangeLog index 37517300d20815eaec1e4049daa175ae74640c08..5adeb74a25438f24586c900a3322aa2eae9875cd 100644 --- a/source/libs/libpng/ChangeLog +++ b/source/libs/libpng/ChangeLog @@ -1,3 +1,12 @@ +2023-01-22 Karl Berry <karl@freefriends.org> + + * configure.ac (KPSE_CANONICAL_HOST): call this, + since we use $host_cpu in the optimization checks. + Else could be determined wrong. Report from Dick Koch, + karl mail 22 Jan 2023 00:43:11. + (PNG_ARM_NEON, PNG_POWERPC_VSX): report results; + also sync comments with upstream (trivial typos). + 2022-11-21 Akira Kakuto <kakuto@jcom.zaq.ne.jp> Import libpng-1.6.39. diff --git a/source/libs/libpng/Makefile.in b/source/libs/libpng/Makefile.in index ac89bcea608cb9d8bdc74ff5b70a03f6edb46bed..7f7d404fc508274a95093c7bea927877df259eac 100644 --- a/source/libs/libpng/Makefile.in +++ b/source/libs/libpng/Makefile.in @@ -86,6 +86,8 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ @PNG_ARM_NEON_TRUE@am__append_1 = @LIBPNG_TREE@/arm/arm_init.c\ @PNG_ARM_NEON_TRUE@ @LIBPNG_TREE@/arm/filter_neon.S @LIBPNG_TREE@/arm/filter_neon_intrinsics.c \ @PNG_ARM_NEON_TRUE@ @LIBPNG_TREE@/arm/palette_neon_intrinsics.c @@ -454,6 +456,8 @@ am__DIST_COMMON = $(srcdir)/../../am/dist_hook.am \ $(srcdir)/../../am/rebuild.am $(srcdir)/../../am/reconfig.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/../../build-aux/compile \ + $(top_srcdir)/../../build-aux/config.guess \ + $(top_srcdir)/../../build-aux/config.sub \ $(top_srcdir)/../../build-aux/depcomp \ $(top_srcdir)/../../build-aux/install-sh \ $(top_srcdir)/../../build-aux/missing \ @@ -580,14 +584,22 @@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ +build = @build@ build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +host = @host@ host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ diff --git a/source/libs/libpng/aclocal.m4 b/source/libs/libpng/aclocal.m4 index 8c7b07821deca9e0998a8025462c5a549b8dcc92..881457a9e3e003d1ffe425600a4cb7c3e6dbea48 100644 --- a/source/libs/libpng/aclocal.m4 +++ b/source/libs/libpng/aclocal.m4 @@ -128,6 +128,43 @@ AC_DEFUN([AM_AUX_DIR_EXPAND], am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) +# AM_COND_IF -*- Autoconf -*- + +# Copyright (C) 2008-2021 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_COND_IF +# _AM_COND_ELSE +# _AM_COND_ENDIF +# -------------- +# These macros are only used for tracing. +m4_define([_AM_COND_IF]) +m4_define([_AM_COND_ELSE]) +m4_define([_AM_COND_ENDIF]) + +# AM_COND_IF(COND, [IF-TRUE], [IF-FALSE]) +# --------------------------------------- +# If the shell condition COND is true, execute IF-TRUE, otherwise execute +# IF-FALSE. Allow automake to learn about conditional instantiating macros +# (the AC_CONFIG_FOOS). +AC_DEFUN([AM_COND_IF], +[m4_ifndef([_AM_COND_VALUE_$1], + [m4_fatal([$0: no such condition "$1"])])dnl +_AM_COND_IF([$1])dnl +if test -z "$$1_TRUE"; then : + m4_n([$2])[]dnl +m4_ifval([$3], +[_AM_COND_ELSE([$1])dnl +else + $3 +])dnl +_AM_COND_ENDIF([$1])dnl +fi[]dnl +]) + # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2021 Free Software Foundation, Inc. diff --git a/source/libs/libpng/configure b/source/libs/libpng/configure index 57d56fd68bd60e04c9baa450afda637983793f4c..c50451e4232024acca714591fa17ae9c37fce7fb 100755 --- a/source/libs/libpng/configure +++ b/source/libs/libpng/configure @@ -676,6 +676,14 @@ am__fastdepCCAS_TRUE CCASDEPMODE CCASFLAGS CCAS +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build WARNING_CFLAGS am__fastdepCC_FALSE am__fastdepCC_TRUE @@ -1400,6 +1408,10 @@ Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi @@ -2433,7 +2445,7 @@ as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" # Auxiliary files required by this configure script. -ac_aux_files="compile missing install-sh" +ac_aux_files="config.guess config.sub compile missing install-sh" # Locations in which to look for auxiliary files. ac_aux_dir_candidates="${srcdir}/../../build-aux" @@ -4601,6 +4613,89 @@ WARNING_CFLAGS=$kpse_cv_warning_cflags +# Because we use $host_cpu below. + + + # Make sure we can run config.sub. +$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +printf %s "checking build system type... " >&6; } +if test ${ac_cv_build+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +printf "%s\n" "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +printf %s "checking host system type... " >&6; } +if test ${ac_cv_host+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || + as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +printf "%s\n" "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + +if test "x$host_alias" != x && test "x$build_alias" = x +then : + as_fn_error $? "when cross-compiling you must specify both --host and --build." "$LINENO" 5 +fi +eval kpse_build_alias=\${build_alias-$build} + + ac_config_headers="$ac_config_headers config.h" @@ -6582,7 +6677,7 @@ then : printf "%s\n" "#define PNG_ARM_NEON_OPT 0" >>confdefs.h # Prevent inclusion of the assembler files below: - enable_arm_neon=no;; + enable_arm_neon=no ;; check) printf "%s\n" "#define PNG_ARM_NEON_CHECK_SUPPORTED /**/" >>confdefs.h @@ -6607,14 +6702,14 @@ printf "%s\n" "$as_me: WARNING: --enable-arm-neon: please specify 'check' or 'ap fi -# Add ARM specific files to all builds where the host_cpu is arm ('arm*') or -# where ARM optimizations were explicitly requested (this allows a fallback if a -# future host CPU does not match 'arm*') +# Add ARM-specific files to all builds where the host_cpu is arm ('arm*') or +# where ARM optimizations were explicitly requested (this allows a fallback +# if a future host CPU does not match 'arm*') if test "$enable_arm_neon" != 'no' && case "$host_cpu" in - arm*|aarch64*) :;; - *) test "$enable_arm_neon" != '';; + arm*|aarch64*) : ;; + *) test "$enable_arm_neon" != '' ;; esac; then PNG_ARM_NEON_TRUE= PNG_ARM_NEON_FALSE='#' @@ -6624,6 +6719,14 @@ else fi +if test -z "$PNG_ARM_NEON_TRUE"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: arm_neon opts on (host_cpu=$host_cpu)" >&5 +printf "%s\n" "$as_me: arm_neon opts on (host_cpu=$host_cpu)" >&6;} +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: arm_neon opts off (host_cpu=$host_cpu)" >&5 +printf "%s\n" "$as_me: arm_neon opts off (host_cpu=$host_cpu)" >&6;} +fi + # emacs-page # PowerPC # === @@ -6639,8 +6742,8 @@ then : printf "%s\n" "#define PNG_POWERPC_VSX_OPT 0" >>confdefs.h - # Prevent inclusion of the platform specific files below: - enable_powerpc_vsx=no;; + # Prevent inclusion of the platform-specific files below: + enable_powerpc_vsx=no ;; check) printf "%s\n" "#define PNG_POWERPC_VSX_CHECK_SUPPORTED /**/" >>confdefs.h @@ -6659,23 +6762,23 @@ printf "%s\n" "#define PNG_POWERPC_VSX_OPT 2" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: --enable-powerpc-vsx: please specify 'check' or 'api', if you want the optimizations unconditionally pass '-maltivec -mvsx' - or '-mcpu=power8'to the compiler." >&5 + or '-mcpu=power8' to the compiler." >&5 printf "%s\n" "$as_me: WARNING: --enable-powerpc-vsx: please specify 'check' or 'api', if you want the optimizations unconditionally pass '-maltivec -mvsx' - or '-mcpu=power8'to the compiler." >&2;};; + or '-mcpu=power8' to the compiler." >&2;};; *) as_fn_error $? "--enable-powerpc-vsx=${enable_powerpc_vsx}: invalid value" "$LINENO" 5 esac fi -# Add PowerPC specific files to all builds where the host_cpu is powerpc('powerpc*') or -# where POWERPC optimizations were explicitly requested (this allows a fallback if a -# future host CPU does not match 'powerpc*') +# Add PowerPC-specific files to all builds where $host_cpu is powerpc('powerpc*') +# or where PowerPC optimizations were explicitly requested (this allows a fallback +# if a future host CPU does not match 'powerpc*') if test "$enable_powerpc_vsx" != 'no' && case "$host_cpu" in - powerpc*|ppc64*) :;; + powerpc*|ppc64*) : ;; esac; then PNG_POWERPC_VSX_TRUE= PNG_POWERPC_VSX_FALSE='#' @@ -6684,8 +6787,13 @@ else PNG_POWERPC_VSX_FALSE= fi - - +if test -z "$PNG_POWERPC_VSX_TRUE"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: powerpc_vsx opts on (host_cpu=$host_cpu)" >&5 +printf "%s\n" "$as_me: powerpc_vsx opts on (host_cpu=$host_cpu)" >&6;} +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: powerpc_vsx opts off (host_cpu=$host_cpu)" >&5 +printf "%s\n" "$as_me: powerpc_vsx opts off (host_cpu=$host_cpu)" >&6;} +fi ac_config_files="$ac_config_files Makefile include/Makefile" diff --git a/source/libs/libpng/configure.ac b/source/libs/libpng/configure.ac index ac973cbaa8651fe799155c19bf0c8c5cebc035d5..69b45ce5be65b6a70caade52022dd33504a00c00 100644 --- a/source/libs/libpng/configure.ac +++ b/source/libs/libpng/configure.ac @@ -1,7 +1,7 @@ -dnl $Id: configure.ac 54291 2020-03-14 16:03:19Z karl $ +dnl $Id: configure.ac 65609 2023-01-23 02:20:55Z karl $ dnl Process this file with autoconf to produce a configure script. dnl -dnl Copyright 2016-2020 Karl Berry <tex-live@tug.org> +dnl Copyright 2016-2023 Karl Berry <tex-live@tug.org> dnl Copyright 2009-2015 Peter Breitenlohner <tex-live@tug.org> dnl dnl This file is free software; the copyright holder @@ -17,6 +17,9 @@ AC_CONFIG_MACRO_DIR([../../m4]) KPSE_BASIC([libpng]) +# Because we use $host_cpu below. +KPSE_CANONICAL_HOST + AC_CONFIG_HEADERS([config.h]) AC_PROG_CC @@ -96,7 +99,7 @@ AC_ARG_ENABLE([arm-neon], AC_DEFINE([PNG_ARM_NEON_OPT], [0], [Disable ARM Neon optimizations]) # Prevent inclusion of the assembler files below: - enable_arm_neon=no;; + enable_arm_neon=no ;; check) AC_DEFINE([PNG_ARM_NEON_CHECK_SUPPORTED], [], [Check for ARM Neon support at run-time]);; @@ -113,17 +116,22 @@ AC_ARG_ENABLE([arm-neon], AC_MSG_ERROR([--enable-arm-neon=${enable_arm_neon}: invalid value]) esac]) -# Add ARM specific files to all builds where the host_cpu is arm ('arm*') or -# where ARM optimizations were explicitly requested (this allows a fallback if a -# future host CPU does not match 'arm*') +# Add ARM-specific files to all builds where the host_cpu is arm ('arm*') or +# where ARM optimizations were explicitly requested (this allows a fallback +# if a future host CPU does not match 'arm*') AM_CONDITIONAL([PNG_ARM_NEON], [test "$enable_arm_neon" != 'no' && case "$host_cpu" in - arm*|aarch64*) :;; - *) test "$enable_arm_neon" != '';; + arm*|aarch64*) : ;; + *) test "$enable_arm_neon" != '' ;; esac]) +AM_COND_IF([PNG_ARM_NEON], + AC_MSG_NOTICE([[arm_neon opts on (host_cpu=$host_cpu)]]), + AC_MSG_NOTICE([[arm_neon opts off (host_cpu=$host_cpu)]]), +) + # emacs-page # PowerPC # === @@ -142,8 +150,8 @@ AS_HELP_STRING([[[--enable-powerpc-vsx]]], # disable the default enabling on __ppc64__ systems: AC_DEFINE([PNG_POWERPC_VSX_OPT], [0], [Disable POWERPC VSX optimizations]) - # Prevent inclusion of the platform specific files below: - enable_powerpc_vsx=no;; + # Prevent inclusion of the platform-specific files below: + enable_powerpc_vsx=no ;; check) AC_DEFINE([PNG_POWERPC_VSX_CHECK_SUPPORTED], [], [Check for POWERPC VSX support at run-time]) @@ -157,22 +165,24 @@ AS_HELP_STRING([[[--enable-powerpc-vsx]]], [Enable POWERPC VSX optimizations]) AC_MSG_WARN([--enable-powerpc-vsx: please specify 'check' or 'api', if] [you want the optimizations unconditionally pass '-maltivec -mvsx'] - [or '-mcpu=power8'to the compiler.]);; + [or '-mcpu=power8' to the compiler.]);; *) AC_MSG_ERROR([--enable-powerpc-vsx=${enable_powerpc_vsx}: invalid value]) esac]) -# Add PowerPC specific files to all builds where the host_cpu is powerpc('powerpc*') or -# where POWERPC optimizations were explicitly requested (this allows a fallback if a -# future host CPU does not match 'powerpc*') +# Add PowerPC-specific files to all builds where $host_cpu is powerpc('powerpc*') +# or where PowerPC optimizations were explicitly requested (this allows a fallback +# if a future host CPU does not match 'powerpc*') AM_CONDITIONAL([PNG_POWERPC_VSX], [test "$enable_powerpc_vsx" != 'no' && case "$host_cpu" in - powerpc*|ppc64*) :;; + powerpc*|ppc64*) : ;; esac]) - - +AM_COND_IF([PNG_POWERPC_VSX], + AC_MSG_NOTICE([[powerpc_vsx opts on (host_cpu=$host_cpu)]]), + AC_MSG_NOTICE([[powerpc_vsx opts off (host_cpu=$host_cpu)]]), +) AC_CONFIG_FILES([Makefile include/Makefile]) AC_OUTPUT diff --git a/source/libs/libpng/include/Makefile.in b/source/libs/libpng/include/Makefile.in index 07be0edec0a8619c9ebc040d2d1fe56fc848d954..efb05a4d0cfe4cedcd808856c358d2014e948ea3 100644 --- a/source/libs/libpng/include/Makefile.in +++ b/source/libs/libpng/include/Makefile.in @@ -85,6 +85,8 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ subdir = include ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/../../m4/kpse-common.m4 \ @@ -194,14 +196,22 @@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ +build = @build@ build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ +host = @host@ host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ diff --git a/source/m4/ChangeLog b/source/m4/ChangeLog index facc649163e2881b5cd751766b1effa9d2b48434..5f2b5ab3fdcac8acd36973f1ff54927494d0682b 100644 --- a/source/m4/ChangeLog +++ b/source/m4/ChangeLog @@ -1,3 +1,10 @@ +2023-02-25 Werner Fink <werner@suse.de> + + * kpse-potrace-flags.m4 (KPSE_POTRACE_SYSTEM_FLAGS): define + using _KPSE_LIB_FLAGS_SYSTEM since there is no .pc file, + to allow --with-system-potrace to work. + https://tug.org/pipermail/tex-live/2023-February/048869.html + 2022-08-22 Luigi Scarso <luigi.scarso@gmail.com> * kpse-pkgs.m4 (KPSE_LIBS_PKGS): add potrace. diff --git a/source/m4/kpse-potrace-flags.m4 b/source/m4/kpse-potrace-flags.m4 index 5d24df9ae3b469e5abddbfc2052120fd0efc4028..44a7403a262511e0339e78bcb8a7c81340f56208 100644 --- a/source/m4/kpse-potrace-flags.m4 +++ b/source/m4/kpse-potrace-flags.m4 @@ -1,5 +1,6 @@ +# $Id: kpse-potrace-flags.m4 66135 2023-02-24 23:44:01Z karl $ # Public macros for the TeX Live (TL) tree. -# Copyright (C) 2022 Luigi Scarso <tex-live@tug.org> +# Copyright (C) 2022-2023 Luigi Scarso <tex-live@tug.org> # # This file is free software; the copyright holder # gives unlimited permission to copy and/or distribute it, @@ -27,5 +28,4 @@ AC_DEFUN([KPSE_POTRACE_OPTIONS], [_KPSE_LIB_OPTIONS([potrace], [$1])]) # KPSE_POTRACE_SYSTEM_FLAGS # ------------------------ -AC_DEFUN([KPSE_POTRACE_SYSTEM_FLAGS], [dnl -_KPSE_PKG_CONFIG_FLAGS([POTRACE], [POTRACE])]) +AC_DEFUN([KPSE_POTRACE_SYSTEM_FLAGS], [_KPSE_LIB_FLAGS_SYSTEM([potrace], [potrace])]) diff --git a/source/texk/README b/source/texk/README index d04844cd4470763ac660eeef26287b116f2be937..8b2c57510c52981a7070cf3968686a8ea7a462d9 100644 --- a/source/texk/README +++ b/source/texk/README @@ -1,5 +1,5 @@ -$Id: README 65276 2022-12-15 12:41:31Z hironobu $ -Copyright 2006-2022 TeX Users Group. +$Id: README 65770 2023-02-09 21:26:50Z karl $ +Copyright 2006-2023 TeX Users Group. You may freely use, modify and/or distribute this file. This TeX Live directory contains the programs that use the kpathsea @@ -63,7 +63,7 @@ dvipos - maintained here, by us dvipsk - maintained here, by us -dvisvgm 2.14 - checked 29aug22 +dvisvgm 3.0.2 - checked 1feb23 https://dvisvgm.de/Downloads/ https://github.com/mgieseki/dvisvgm https://ctan.org/pkg/dvisvgm diff --git a/source/texk/configure b/source/texk/configure index 97ee9a1368005be308407a0eb10128d758ee0a2f..b13d5ff4a0f084de6a206e560c93bcb15a7f9660 100755 --- a/source/texk/configure +++ b/source/texk/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for TeX Live texk 2023/dev. +# Generated by GNU Autoconf 2.71 for TeX Live texk 2023. # # Report bugs to <tex-live@tug.org>. # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='TeX Live texk' PACKAGE_TARNAME='tex-live-texk' -PACKAGE_VERSION='2023/dev' -PACKAGE_STRING='TeX Live texk 2023/dev' +PACKAGE_VERSION='2023' +PACKAGE_STRING='TeX Live texk 2023' PACKAGE_BUGREPORT='tex-live@tug.org' PACKAGE_URL='' @@ -739,8 +739,12 @@ enable_tex enable_tex_synctex enable_etex enable_etex_synctex +enable_ptex +enable_ptex_synctex enable_eptex enable_eptex_synctex +enable_uptex +enable_uptex_synctex enable_euptex enable_euptex_synctex enable_aleph @@ -1351,7 +1355,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures TeX Live texk 2023/dev to adapt to many kinds of systems. +\`configure' configures TeX Live texk 2023 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1422,7 +1426,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of TeX Live texk 2023/dev:";; + short | recursive ) echo "Configuration of TeX Live texk 2023:";; esac cat <<\_ACEOF @@ -1449,8 +1453,12 @@ Optional Features: --enable-tex-synctex build TeX with SyncTeX support --enable-etex compile and install e-TeX --disable-etex-synctex build e-TeX without SyncTeX support + --enable-ptex compile and install pTeX + --disable-ptex-synctex build pTeX without SyncTeX support --disable-eptex do not compile and install e-pTeX --disable-eptex-synctex build e-pTeX without SyncTeX support + --enable-uptex compile and install upTeX + --disable-uptex-synctex build upTeX without SyncTeX support --disable-euptex do not compile and install e-upTeX --disable-euptex-synctex build e-upTeX without SyncTeX support --disable-aleph do not compile and install Aleph @@ -1603,7 +1611,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -TeX Live texk configure 2023/dev +TeX Live texk configure 2023 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1726,7 +1734,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by TeX Live texk $as_me 2023/dev, which was +It was created by TeX Live texk $as_me 2023, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3944,6 +3952,28 @@ fi test "x$enable_web2c:$enable_etex" = xyes:yes && { need_zlib=yes } +# Check whether --enable-ptex was given. +if test ${enable_ptex+y} +then : + enableval=$enable_ptex; +fi +case $enable_ptex in #( + yes | no) : + ;; #( + *) : + enable_ptex=no ;; +esac + +# Check whether --enable-ptex-synctex was given. +if test ${enable_ptex_synctex+y} +then : + enableval=$enable_ptex_synctex; +fi + +test "x$enable_web2c:$enable_ptex" = xyes:yes && { + need_ptexenc=yes + need_zlib=yes +} # Check whether --enable-eptex was given. if test ${enable_eptex+y} then : @@ -3966,6 +3996,28 @@ test "x$enable_web2c:$enable_eptex" = xyes:yes && { need_ptexenc=yes need_zlib=yes } +# Check whether --enable-uptex was given. +if test ${enable_uptex+y} +then : + enableval=$enable_uptex; +fi +case $enable_uptex in #( + yes | no) : + ;; #( + *) : + enable_uptex=no ;; +esac + +# Check whether --enable-uptex-synctex was given. +if test ${enable_uptex_synctex+y} +then : + enableval=$enable_uptex_synctex; +fi + +test "x$enable_web2c:$enable_uptex" = xyes:yes && { + need_ptexenc=yes + need_zlib=yes +} # Check whether --enable-euptex was given. if test ${enable_euptex+y} then : @@ -5190,7 +5242,7 @@ fi # Define the identity of the package. PACKAGE='tex-live-texk' - VERSION='2023/dev' + VERSION='2023' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -6123,7 +6175,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by TeX Live texk $as_me 2023/dev, which was +This file was extended by TeX Live texk $as_me 2023, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -6182,7 +6234,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -TeX Live texk config.status 2023/dev +TeX Live texk config.status 2023 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/source/texk/kpathsea/ChangeLog b/source/texk/kpathsea/ChangeLog index 602513759b5facc429862bb3e93636ed93926e97..2911c2985e5d0382c0e08b2c1c02c38d05c3b033 100644 --- a/source/texk/kpathsea/ChangeLog +++ b/source/texk/kpathsea/ChangeLog @@ -1,3 +1,21 @@ +2023-02-19 TANAKA Takuji <ttk@t-lab.opal.ne.jp> + + * texmf.cnf (BIBINPUTS.bibtexu, BSTINPUTS.bibtexu): + New definition for BibTeXu which can import Japanese inputs + for pBibTeX in UTF-8. + +2023-02-18 Karl Berry <karl@tug.org> + + * texmf.cnf (TEXMFVAR, TEXMFCONFIG, doc): 2023. + +2023-02-09 Karl Berry <karl@freefriends.org> + + * version.ac (kpse_dev): no more /dev. + * NEWS, + * doc/kpathsea.texi, + * kpsewhich.c, + * texmf.cnf: copyright 2023. + 2022-12-20 Karl Berry <karl@freefriends.org> * doc/kpathsea.texi (Supported file formats): add .lua (LUAINPUTS). diff --git a/source/texk/kpathsea/NEWS b/source/texk/kpathsea/NEWS index ec4fb074ee03da34a16d8b0ac613caa84a969b71..1df4a908c4e13dfddd67807a3deef6243768c0d4 100644 --- a/source/texk/kpathsea/NEWS +++ b/source/texk/kpathsea/NEWS @@ -1,6 +1,10 @@ -$Id: NEWS 61654 2022-01-18 22:17:46Z karl $ +$Id: NEWS 65770 2023-02-09 21:26:50Z karl $ This file records noteworthy changes. (Public domain.) +6.3.5 (for TeX Live 2023) +* Support guessing input file encodings for Unix-ish platforms, as on + Windows; enabled for (e)p(la)tex, pbibtex, mendex. + 6.3.4 (for TeX Live 2022) * First return path from kpsewhich -all is now the same as non-all. (Internally, str_list_uniqify retains ordering.) diff --git a/source/texk/kpathsea/c-auto.in b/source/texk/kpathsea/c-auto.in index 1877cfe725e909afdab4c7c991e0687bee696a3e..d011f8d24f1a8df520c43375fa83888978487465 100644 --- a/source/texk/kpathsea/c-auto.in +++ b/source/texk/kpathsea/c-auto.in @@ -23,7 +23,7 @@ #define KPATHSEA_C_AUTO_H /* kpathsea: the version string. */ -#define KPSEVERSION "kpathsea version 6.3.5/dev" +#define KPSEVERSION "kpathsea version 6.3.5" /* Define to 1 if the `closedir' function returns void instead of int. */ #undef CLOSEDIR_VOID diff --git a/source/texk/kpathsea/configure b/source/texk/kpathsea/configure index adf88b5566e8864e4bff230b2787d7f3b433a725..64cc225cb5c280a383abea30d434be3ef6296e9e 100755 --- a/source/texk/kpathsea/configure +++ b/source/texk/kpathsea/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Kpathsea 6.3.5/dev. +# Generated by GNU Autoconf 2.71 for Kpathsea 6.3.5. # # Report bugs to <tex-k@tug.org>. # @@ -621,8 +621,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Kpathsea' PACKAGE_TARNAME='kpathsea' -PACKAGE_VERSION='6.3.5/dev' -PACKAGE_STRING='Kpathsea 6.3.5/dev' +PACKAGE_VERSION='6.3.5' +PACKAGE_STRING='Kpathsea 6.3.5' PACKAGE_BUGREPORT='tex-k@tug.org' PACKAGE_URL='' @@ -1376,7 +1376,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Kpathsea 6.3.5/dev to adapt to many kinds of systems. +\`configure' configures Kpathsea 6.3.5 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1447,7 +1447,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Kpathsea 6.3.5/dev:";; + short | recursive ) echo "Configuration of Kpathsea 6.3.5:";; esac cat <<\_ACEOF @@ -1575,7 +1575,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Kpathsea configure 6.3.5/dev +Kpathsea configure 6.3.5 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2331,7 +2331,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Kpathsea $as_me 6.3.5/dev, which was +It was created by Kpathsea $as_me 6.3.5, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3091,14 +3091,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -KPSEVERSION=6.3.5/dev +KPSEVERSION=6.3.5 KPSE_LT_VERSINFO=9:5:3 - WEB2CVERSION=" (TeX Live 2023/dev)" + WEB2CVERSION=" (TeX Live 2023)" am__api_version='1.16' @@ -8663,7 +8663,7 @@ fi # Define the identity of the package. PACKAGE='kpathsea' - VERSION='6.3.5/dev' + VERSION='6.3.5' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -15416,7 +15416,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Kpathsea $as_me 6.3.5/dev, which was +This file was extended by Kpathsea $as_me 6.3.5, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15484,7 +15484,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Kpathsea config.status 6.3.5/dev +Kpathsea config.status 6.3.5 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/source/texk/kpathsea/doc/kpathsea.info b/source/texk/kpathsea/doc/kpathsea.info index 5db4b49c73270ffd0a8246d3a207098c80cd9bb9..32cddefe1b517138f4d09c83d0593d5ec37fb04b 100644 --- a/source/texk/kpathsea/doc/kpathsea.info +++ b/source/texk/kpathsea/doc/kpathsea.info @@ -1,9 +1,9 @@ -This is kpathsea.info, produced by makeinfo version 7.0.1 from +This is kpathsea.info, produced by makeinfo version 6.5 from kpathsea.texi. This file documents the Kpathsea library for path searching. - Copyright © 1996–2022 Karl Berry & Olaf Weber. + Copyright (C) 1996-2023 Karl Berry & Olaf Weber. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are @@ -37,7 +37,7 @@ Kpathsea library **************** This manual documents the Kpathsea library for path searching. It -corresponds to version 6.3.4, released in December 2022. +corresponds to version 6.3.5, released in February 2023. * Menu: @@ -61,21 +61,21 @@ File: kpathsea.info, Node: Introduction, Next: unixtex.ftp, Prev: Top, Up: T 1 Introduction ************** -This manual corresponds to version 6.3.4 of the Kpathsea library, -released in December 2022. +This manual corresponds to version 6.3.5 of the Kpathsea library, +released in February 2023. - The library’s fundamental purpose is to return a filename from a list + The library's fundamental purpose is to return a filename from a list of directories specified by the user, similar to what shells do when looking up program names to execute. The following software, all of which is maintained in parallel, uses this library: - • Dviljk (see the ‘dvilj’ man page) - • Dvipsk (*note (dvips)::) - • GNU font utilities (*note (fontu)::) - • Web2c (*note (web2c)::) - • Xdvik (see the ‘xdvi’ man page) + * Dviljk (see the 'dvilj' man page) + * Dvipsk (*note (dvips)::) + * GNU font utilities (*note (fontu)::) + * Web2c (*note (web2c)::) + * Xdvik (see the 'xdvi' man page) Other software that we do not maintain also uses it. @@ -98,8 +98,8 @@ See accompanying files for the text of the GNU licenses, or <https://gnu.org/licenses>. If you know enough about TeX to be reading this manual, then you (or -your institution) should consider joining the TeX Users Group (if you’re -already a member, thanks!). TUG produces the periodical ‘TUGboat’, +your institution) should consider joining the TeX Users Group (if you're +already a member, thanks!). TUG produces the periodical 'TUGboat', sponsors an annual meeting and publishes the proceedings, and arranges courses on TeX for all levels of users throughout the world. See <https://tug.org> for information. @@ -116,8 +116,8 @@ File: kpathsea.info, Node: History, Up: Introduction This section is for those people who are curious about how the library came about. If you like to read historical accounts of software, we -urge you to seek out the GNU Autoconf manual and the “Errors of TeX†-paper by Don Knuth, published in his book ‘Digital Typography’, among +urge you to seek out the GNU Autoconf manual and the "Errors of TeX" +paper by Don Knuth, published in his book 'Digital Typography', among other places. [Karl writes.] My first ChangeLog entry for Web2c seems to be @@ -125,32 +125,32 @@ February 1990, but I may have done some work before then. In any case, Tim Morgan and I were jointly maintaining it for a time. (I should mention here that Tim had made Web2c into a real distribution long before I had ever used it or even heard of it, and Tom Rokicki did the -original implementation. When I started, I was using ‘pxp’ and ‘pc’ on -VAX 11/750’s and the hot new Sun 2 machines.) +original implementation. When I started, I was using 'pxp' and 'pc' on +VAX 11/750's and the hot new Sun 2 machines.) It must have been later in 1990 and 1991 that I started working on -‘TeX for the Impatient’. Dvips, Xdvi, Web2c, and the GNU fontutils +'TeX for the Impatient'. Dvips, Xdvi, Web2c, and the GNU fontutils (which I was also writing at the time) all used different environment variables, and, more importantly, had different bugs in their path searching. This became extremely painful, as I was stressing everything to the limit working on the book. I also desperately wanted to -implement subdirectory searching, since I couldn’t stand putting -everything in one big directory, and also couldn’t stand having to -explicitly specify ‘cm’, ‘pandora’, ... in a path. +implement subdirectory searching, since I couldn't stand putting +everything in one big directory, and also couldn't stand having to +explicitly specify 'cm', 'pandora', ... in a path. In the first incarnation, I just hacked separately on each -program—that was the original subdirectory searching code in both Xdvi +program--that was the original subdirectory searching code in both Xdvi and Dvips. That is, I tried to go with the flow in each program, rather -than changing the program’s calling sequences to conform to new +than changing the program's calling sequences to conform to new routines. Then, as bugs inevitably appeared, I found I was fixing the same thing three times (Web2c and fontutils were already sharing code, since -I maintained both of those—there was no Dvipsk or Xdvik or Dviljk at +I maintained both of those--there was no Dvipsk or Xdvik or Dviljk at this point). After a while, I finally started sharing source files. -They weren’t yet a library, though. I just kept things up to date with +They weren't yet a library, though. I just kept things up to date with shell scripts. (I was developing on a 386 running ISC 2.2 at the time, -and so didn’t have symbolic links. An awful experience.) +and so didn't have symbolic links. An awful experience.) The ChangeLogs for Xdvik and Dvipsk record initial releases of those distributions in May and June 1992. I think it was because I was tired @@ -159,14 +159,14 @@ because of the path searching. Autoconf was being developed by David MacKenzie and others, and I was adapting it to TeX and friends. I started to make a separate library that other programs could link -with on my birthday in April 1993, according to the ChangeLog. I don’t +with on my birthday in April 1993, according to the ChangeLog. I don't remember exactly why I finally took the time to make it a separate library; a conversation with david zuhn initiated it. Just seemed like it was time. Dviljk got started in March 1994 after I bought a Laserjet 4. (Kpathsea work got suspended while Norm Walsh and I, with Gustaf -Neumann’s help, implemented a way for TeX to get at all those neat +Neumann's help, implemented a way for TeX to get at all those neat builtin LJ4 fonts ... such a treat to have something to typeset in besides Palatino!) @@ -175,18 +175,18 @@ path-searching features in Kpathsea that I plan to, driven beyond my initial goals by Thomas Esser and others. I then started to integrate Web2c with Kpathsea. After the release of a stable Web2c, I hope to be able to stop development, and turn most of my attention back to making -fonts for GNU. (Always assuming Micros**t hasn’t completely obliterated -Unix by then, or that software patents haven’t stopped software +fonts for GNU. (Always assuming Micros**t hasn't completely obliterated +Unix by then, or that software patents haven't stopped software development by anybody smaller than a company with a million-dollar-a-year legal budget. Which is actually what I think is -likely to happen, but that’s another story...) +likely to happen, but that's another story...) [Olaf writes.] At the end of 1997, Unix is still alive and kicking, individuals still develop software, and Web2c development still continues. Karl had been looking for some time for someone to take up part of the burden, and I volunteered. - [Karl writes again.] Indeed, time goes on. As of 2006 or so, Olaf’s + [Karl writes again.] Indeed, time goes on. As of 2006 or so, Olaf's available time for Kpathsea was reduced, and I started taking overall care of it again, although I did not do any significant new development. In 2009, Taco Hoekwater implemented a major rearrangement to make the @@ -198,7 +198,7 @@ respect to the overall TeX Live build, where Kpathsea is now maintained. File: kpathsea.info, Node: unixtex.ftp, Next: Security, Prev: Introduction, Up: Top -2 ‘unixtex.ftp’: Obtaining TeX +2 'unixtex.ftp': Obtaining TeX ****************************** This is <ftp://tug.org/tex/unixtex.ftp>, a.k.a. @@ -216,13 +216,13 @@ released as a separate packages. Their sources are now maintained as part of TeX Live. The host ftp.cs.stanford.edu is the original source for the files for -which Donald Knuth is directly responsible: ‘tex.web’, ‘plain.tex’, etc. +which Donald Knuth is directly responsible: 'tex.web', 'plain.tex', etc. However, unless you want to undertake the project of building your TeX system from scratch, it is more reliable and less work to retrieve these files as part of a larger package. In any case, the Stanford ftp site is not the canonical source for -anything except what was created as part of Knuth’s original TeX, so do +anything except what was created as part of Knuth's original TeX, so do not rely on any other files available there being up-to-date. The best place to check for up-to-date files is CTAN (the Comprehensive TeX Archive Network), <https://ctan.org>. @@ -234,52 +234,52 @@ File: kpathsea.info, Node: Security, Next: TeX directory structure, Prev: uni ********** None of the programs in the TeX system require any special system -privileges, so there’s no first-level security concern of people gaining +privileges, so there's no first-level security concern of people gaining illegitimate root access. A TeX document, however, can write to arbitrary files, e.g., -‘~/.rhosts’, and thus an unwitting user who runs TeX on a random +'~/.rhosts', and thus an unwitting user who runs TeX on a random document is vulnerable to a trojan horse attack. This loophole is closed by default, but you can be permissive if you so desire in -‘texmf.cnf’. *Note (web2c)tex invocation::. MetaPost has the same +'texmf.cnf'. *Note (web2c)tex invocation::. MetaPost has the same issue. Dvips, Xdvi, and TeX can also execute shell commands under some -circumstances. To disable this, see the ‘-R’ option in *note +circumstances. To disable this, see the '-R' option in *note (dvips)Option details::, the xdvi man page, and *note (web2c)tex invocation::, respectively. - Another security issue arises because it’s very useful—almost -necessary—to make arbitrary fonts on user demand with ‘mktexpk’ and -friends. Where do these files get installed? By default, the ‘mktexpk’ -distributed with Kpathsea assumes a world-writable ‘/var/tmp’ directory; + Another security issue arises because it's very useful--almost +necessary--to make arbitrary fonts on user demand with 'mktexpk' and +friends. Where do these files get installed? By default, the 'mktexpk' +distributed with Kpathsea assumes a world-writable '/var/tmp' directory; this is a simple and convenient approach, but it may not suit your situation because it means that a local cache of fonts is created on every machine. To avoid this duplication, many people consider a shared, globally writable font tree desirable, in spite of the potential security -problems. To do this you should change the value of ‘VARTEXFONTS’ in -‘texmf.cnf’ to refer to some globally known directory. *Note mktex +problems. To do this you should change the value of 'VARTEXFONTS' in +'texmf.cnf' to refer to some globally known directory. *Note mktex configuration::. The first restriction you can apply is to make newly-created -directories under ‘texmf’ be append-only with an option in ‘mktex.cnf’. +directories under 'texmf' be append-only with an option in 'mktex.cnf'. *Note mktex configuration::. Another approach is to establish a group (or user) for TeX files, -make the ‘texmf’ tree writable only to that group (or user), and make -‘mktexpk’ et al. setgid to that group (or setuid to that user). Then -users must invoke the scripts to install things. (If you’re worried +make the 'texmf' tree writable only to that group (or user), and make +'mktexpk' et al. setgid to that group (or setuid to that user). Then +users must invoke the scripts to install things. (If you're worried about the inevitable security holes in scripts, then you could write a C wrapper to exec the script.) - The ‘mktex...’ scripts install files with the same read and write + The 'mktex...' scripts install files with the same read and write permissions as the directory they are installed in. The executable, sgid, suid, and sticky bits are always cleared. - Any directories created by the ‘mktex...’ scripts have the same -permissions as their parent directory, unless the ‘appendonlydir’ + Any directories created by the 'mktex...' scripts have the same +permissions as their parent directory, unless the 'appendonlydir' feature is used, in which case the sticky bit is always set. @@ -298,53 +298,53 @@ from <https://ctan.org/pkg/tds> (*note unixtex.ftp::). In short, here is a skeleton of the default directory structure, extracted from the TDS document: - PREFIX/ installation root (‘/usr/local’ by default) + PREFIX/ installation root ('/usr/local' by default) bin/ executables man/ man pages include/ C header files info/ GNU info files - lib/ libraries (‘libkpathsea.*’) + lib/ libraries ('libkpathsea.*') share/ architecture-independent files texmf/ TDS root bibtex/ BibTeX input files bib/ BibTeX databases - base/ base distribution (e.g., ‘xampl.bib’) + base/ base distribution (e.g., 'xampl.bib') misc/ single-file databases PKG/ name of a package bst/ BibTeX style files - base/ base distribution (e.g., ‘plain.bst’, ‘acm.bst’) + base/ base distribution (e.g., 'plain.bst', 'acm.bst') misc/ single-file styles PKG/ name of a package doc/ additional documentation - dvips/ ‘.pro’, ‘.ps’, ‘psfonts.map’ + dvips/ '.pro', '.ps', 'psfonts.map' fonts/ font-related files - TYPE/ file type (e.g., ‘tfm’, ‘pk’) - MODE/ type of output device (types ‘pk’ and ‘gf’ only) - SUPPLIER/ name of a font supplier (e.g., ‘public’) - TYPEFACE/ name of a typeface (e.g., ‘cm’) - dpiNNN/ font resolution (types ‘pk’ and ‘gf’ only) + TYPE/ file type (e.g., 'tfm', 'pk') + MODE/ type of output device (types 'pk' and 'gf' only) + SUPPLIER/ name of a font supplier (e.g., 'public') + TYPEFACE/ name of a typeface (e.g., 'cm') + dpiNNN/ font resolution (types 'pk' and 'gf' only) metafont/ Metafont (non-font) input files - base/ base distribution (e.g., ‘plain.mf’) - misc/ single-file packages (e.g., ‘modes.mf’) - PKG/ name of a package (e.g., ‘mfpic’) + base/ base distribution (e.g., 'plain.mf') + misc/ single-file packages (e.g., 'modes.mf') + PKG/ name of a package (e.g., 'mfpic') metapost/ MetaPost input files - base/ base distribution (e.g., ‘plain.mp’) + base/ base distribution (e.g., 'plain.mp') misc/ single-file packages PKG/ name of a package - support/ support files for MetaPost-related utilities (e.g., ‘trfonts.map’) - mft/ ‘MFT’ inputs (e.g., ‘plain.mft’) + support/ support files for MetaPost-related utilities (e.g., 'trfonts.map') + mft/ 'MFT' inputs (e.g., 'plain.mft') tex/ TeX input files - FORMAT/ name of a format (e.g., ‘plain’) - base/ base distribution for FORMAT (e.g., ‘plain.tex’) - misc/ single-file packages (e.g., ‘webmac.tex’) + FORMAT/ name of a format (e.g., 'plain') + base/ base distribution for FORMAT (e.g., 'plain.tex') + misc/ single-file packages (e.g., 'webmac.tex') local/ local additions to or local configuration files for FORMAT - PKG/ name of a package (e.g., ‘graphics’, ‘mfnfss’) + PKG/ name of a package (e.g., 'graphics', 'mfnfss') generic/ format-independent packages - hyphen/ hyphenation patterns (e.g., ‘hyphen.tex’) + hyphen/ hyphenation patterns (e.g., 'hyphen.tex') images/ image input files (e.g., Encapsulated PostScript) - misc/ single-file format-independent packages (e.g., ‘null.tex’). - PKG/ name of a package (e.g., ‘babel’) - web2c/ implementation-dependent files (‘.pool’, ‘.fmt’, ‘texmf.cnf’, etc.) + misc/ single-file format-independent packages (e.g., 'null.tex'). + PKG/ name of a package (e.g., 'babel') + web2c/ implementation-dependent files ('.pool', '.fmt', 'texmf.cnf', etc.) Some concrete examples for most file types: @@ -395,16 +395,16 @@ File: kpathsea.info, Node: Searching overview, Next: Path sources, Up: Path s 5.1 Searching overview ====================== -A “search path†is a colon-separated list of “path elementsâ€, which are +A "search path" is a colon-separated list of "path elements", which are directory names with a few extra frills. A search path can come from (a -combination of) many sources; see below. To look up a file ‘foo’ along -a path ‘.:/dir’, Kpathsea checks each element of the path in turn: first -‘./foo’, then ‘/dir/foo’, returning the first match (or possibly all +combination of) many sources; see below. To look up a file 'foo' along +a path '.:/dir', Kpathsea checks each element of the path in turn: first +'./foo', then '/dir/foo', returning the first match (or possibly all matches). - The “colon†and “slash†mentioned here aren’t necessarily ‘:’ and ‘/’ + The "colon" and "slash" mentioned here aren't necessarily ':' and '/' on non-Unix systems. Kpathsea tries to adapt to other operating -systems’ conventions. +systems' conventions. To check a particular path element E, Kpathsea first sees if a prebuilt database (*note Filename database::) applies to E, i.e., if the @@ -413,17 +413,17 @@ specification is matched against the contents of the database. If the database does not exist, or does not apply to this path element, or contains no matches, the filesystem is searched (if this was -not forbidden by the specification with ‘!!’ and if the file being +not forbidden by the specification with '!!' and if the file being searched for must exist). Kpathsea constructs the list of directories that correspond to this path element, and then checks in each for the file being searched for. (To help speed future lookups of files in the same directory, the directory in which a file is found is floated to the top of the directory list.) - The “file must exist†condition comes into play with VF files and -input files read by the TeX ‘\openin’ command. These files might very -well not exist (consider ‘cmr10.vf’), and so it would be wrong to search -the disk for them. Therefore, if you fail to update ‘ls-R’ when you + The "file must exist" condition comes into play with VF files and +input files read by the TeX '\openin' command. These files might very +well not exist (consider 'cmr10.vf'), and so it would be wrong to search +the disk for them. Therefore, if you fail to update 'ls-R' when you install a new VF file, it will not be found. Each path element is checked in turn: first the database, then the @@ -435,32 +435,32 @@ needed on a particular run. On Unix-like systems, if no match is found by any of the above, and the path element allows checking the filesystem (per the above), a final check is made for a case-insensitive match. Thus, looking for a name -like ‘./FooBar.TeX’ will match a file ‘./foobar.tex’, and vice versa. +like './FooBar.TeX' will match a file './foobar.tex', and vice versa. This is not done on Windows. *Note Casefolding search::. Although the simplest and most common path element is a directory name, Kpathsea supports additional features in search paths: layered -default values, environment variable names, config file values, users’ +default values, environment variable names, config file values, users' home directories, and recursive subdirectory searching. Thus, we say -that Kpathsea “expands†a path element, meaning transforming all the +that Kpathsea "expands" a path element, meaning transforming all the magic specifications into the basic directory name or names. This process is described in the sections below. It happens in the same order as the sections. Exception to all of the above: If the filename being searched for is -absolute or explicitly relative, i.e., starts with ‘/’ or ‘./’ or ‘../’, +absolute or explicitly relative, i.e., starts with '/' or './' or '../', Kpathsea simply checks if that file exists, with a fallback to a casefolding match if needed and enabled, as described above. Ordinarily, if Kpathsea tries to access a file or directory that cannot be read, it gives a warning. This is so you will be alerted to directories or files that accidentally lack any read permission (for -example, a ‘lost+found’ directory). If you prefer not to see these -warnings, include the value ‘readable’ in the ‘TEX_HUSH’ environment +example, a 'lost+found' directory). If you prefer not to see these +warnings, include the value 'readable' in the 'TEX_HUSH' environment variable or config file value. This generic path searching algorithm is implemented in -‘kpathsea/pathsearch.c’. It is employed by a higher-level algorithm +'kpathsea/pathsearch.c'. It is employed by a higher-level algorithm when searching for a file of a particular type (*note File lookup::, and *note Glyph lookup::). @@ -473,21 +473,21 @@ File: kpathsea.info, Node: Path sources, Next: Path expansion, Prev: Searchin A search path or other configuration value can come from many sources. In the order in which Kpathsea looks for them: - 1. A command-line option such as ‘--cnf-line’, available in - ‘kpsewhich’ and most TeX engines. *Note Path searching options::. + 1. A command-line option such as '--cnf-line', available in + 'kpsewhich' and most TeX engines. *Note Path searching options::. - A user-set environment variable, e.g., ‘TEXINPUTS’. Environment + A user-set environment variable, e.g., 'TEXINPUTS'. Environment variables with an underscore and the program name appended - override; for example, ‘TEXINPUTS_latex’ overrides ‘TEXINPUTS’ if - the program being run is named ‘latex’. + override; for example, 'TEXINPUTS_latex' overrides 'TEXINPUTS' if + the program being run is named 'latex'. - 2. A program-specific configuration file, e.g., an ‘S /a:/b’ line in - Dvips’ ‘config.ps’ (*note (dvips)Config files::). + 2. A program-specific configuration file, e.g., an 'S /a:/b' line in + Dvips' 'config.ps' (*note (dvips)Config files::). - 3. A line in a Kpathsea configuration file ‘texmf.cnf’, e.g., - ‘TEXINPUTS=/c:/d’ (see below). + 3. A line in a Kpathsea configuration file 'texmf.cnf', e.g., + 'TEXINPUTS=/c:/d' (see below). - 4. The compile-time default (specified in ‘kpathsea/paths.h’). + 4. The compile-time default (specified in 'kpathsea/paths.h'). You can see each of these values for a given search path by using the debugging options (*note Debugging::). @@ -497,7 +497,7 @@ expansion::). * Menu: -* Config files:: Kpathsea’s runtime config files (texmf.cnf). +* Config files:: Kpathsea's runtime config files (texmf.cnf). File: kpathsea.info, Node: Config files, Up: Path sources @@ -505,73 +505,73 @@ File: kpathsea.info, Node: Config files, Up: Path sources 5.2.1 Config files ------------------ -As mentioned above, Kpathsea reads “runtime configuration files†named -‘texmf.cnf’ for search path and other definitions. The search path used -to look for these configuration files is named ‘TEXMFCNF’, and is +As mentioned above, Kpathsea reads "runtime configuration files" named +'texmf.cnf' for search path and other definitions. The search path used +to look for these configuration files is named 'TEXMFCNF', and is constructed in the usual way, as described above, except that configuration files cannot be used to define the path, naturally; also, -an ‘ls-R’ database is not used to search for them. +an 'ls-R' database is not used to search for them. - Kpathsea reads _all_ ‘texmf.cnf’ files in the search path, not just + Kpathsea reads _all_ 'texmf.cnf' files in the search path, not just the first one found; definitions in earlier files override those in -later files. Thus, if the search path is ‘.:$TEXMF’, values from -‘./texmf.cnf’ override those from ‘$TEXMF/texmf.cnf’. +later files. Thus, if the search path is '.:$TEXMF', values from +'./texmf.cnf' override those from '$TEXMF/texmf.cnf'. - If Kpathsea cannot find any ‘texmf.cnf’ file, it reports a warning -including all the directories it checked. If you don’t want to see this -warning, set the environment variable ‘KPATHSEA_WARNING’ to the single -character ‘0’ (zero, not oh). + If Kpathsea cannot find any 'texmf.cnf' file, it reports a warning +including all the directories it checked. If you don't want to see this +warning, set the environment variable 'KPATHSEA_WARNING' to the single +character '0' (zero, not oh). While (or instead of) reading this description, you may find it -helpful to look at the distributed ‘texmf.cnf’, which uses or at least -mentions most features. The format of ‘texmf.cnf’ files follows: +helpful to look at the distributed 'texmf.cnf', which uses or at least +mentions most features. The format of 'texmf.cnf' files follows: - • Comments start with ‘%’ or ‘#’, either at the beginning of a line + * Comments start with '%' or '#', either at the beginning of a line or preceded by whitespace, and continue to the end of the line. That is, similar to most shells, a comment character in the - “middle†of a value does not start a comment. Examples: + "middle" of a value does not start a comment. Examples: % this is a comment var = a%b % but the value of var will be "a%b" - • Blank lines are ignored. + * Blank lines are ignored. - • A ‘\’ at the end of a line acts as a continuation character, i.e., + * A '\' at the end of a line acts as a continuation character, i.e., the next line is appended. Whitespace at the beginning of continuation lines is not ignored. - • Each remaining line will look like: + * Each remaining line will look like: VARIABLE [. PROGNAME] [=] VALUE - where the ‘=’ and surrounding whitespace is optional. + where the '=' and surrounding whitespace is optional. - • The VARIABLE name may contain any character other than whitespace, - ‘=’, or ‘.’, but sticking to ‘A-Za-z_’ is safest. + * The VARIABLE name may contain any character other than whitespace, + '=', or '.', but sticking to 'A-Za-z_' is safest. - • If ‘.PROGNAME’ is present (preceding spaces are ignored), the + * If '.PROGNAME' is present (preceding spaces are ignored), the definition only applies if the program that is running is named - (i.e., the last component of ‘argv[0]’ is) PROGNAME or - ‘PROGNAME.{exe,bat,cmd,...}’. Most notably, this allows different + (i.e., the last component of 'argv[0]' is) PROGNAME or + 'PROGNAME.{exe,bat,cmd,...}'. Most notably, this allows different flavors of TeX to have different search paths. The PROGNAME value is used literally, without variable or other expansions. - • Considered as strings, VALUE may contain any character. However, - in practice most ‘texmf.cnf’ values are related to path expansion, + * Considered as strings, VALUE may contain any character. However, + in practice most 'texmf.cnf' values are related to path expansion, and since various special characters are used in expansion, such as braces and commas, they cannot be used in directory names. - The ‘$VAR.PROG’ feature is not available on the right-hand side; + The '$VAR.PROG' feature is not available on the right-hand side; instead, you must use an additional variable (see below for example). - A ‘;’ in VALUE is translated to ‘:’ if running under Unix, in order - to have a single ‘texmf.cnf’ that can support both Unix and Windows + A ';' in VALUE is translated to ':' if running under Unix, in order + to have a single 'texmf.cnf' that can support both Unix and Windows systems. This translation happens with any value, not just search - paths, but fortunately in practice ‘;’ is not needed in other + paths, but fortunately in practice ';' is not needed in other values. - • All definitions are read before anything is expanded, so you can + * All definitions are read before anything is expanded, so you can use variables before they are defined (like Make, unlike most other programs). @@ -585,26 +585,26 @@ Here is a configuration file fragment illustrating most of these points: TEXINPUTS.latex2e = $latex2e_inputs TEXINPUTS.latex = $latex2e_inputs - The combination of spaces being ignored before the ‘.’ of a program -name qualifer and the optional ‘=’ for the assignment has an unexpected -consequence: if the value begins with a literal ‘.’ and the ‘=’ is + The combination of spaces being ignored before the '.' of a program +name qualifer and the optional '=' for the assignment has an unexpected +consequence: if the value begins with a literal '.' and the '=' is omitted, the intended value is interpreted as a program name. For -example, a line ‘var .;/some/path’ is taken as an empty value for ‘var’ -running under the program named ‘;/some/path’. To diagnose this, +example, a line 'var .;/some/path' is taken as an empty value for 'var' +running under the program named ';/some/path'. To diagnose this, Kpathsea warns if the program name contains a path separator or other special character. The simplest way to avoid the problem is to use the -‘=’. +'='. Exactly when a character will be considered special or act as itself depends on the context in which it is used. The rules are inherent in the multiple levels of interpretation of the configuration (parsing, expansion, search, ...) and so cannot be concisely stated, -unfortunately. There is no general escape mechanism; in particular, ‘\’ -is not an “escape character†in ‘texmf.cnf’ files. When it comes +unfortunately. There is no general escape mechanism; in particular, '\' +is not an "escape character" in 'texmf.cnf' files. When it comes choosing directory names for installation, it is safest to avoid them all. - The implementation of all this is in ‘kpathsea/cnf.c’. + The implementation of all this is in 'kpathsea/cnf.c'. File: kpathsea.info, Node: Path expansion, Next: Casefolding search, Prev: Path sources, Up: Path searching @@ -614,9 +614,9 @@ File: kpathsea.info, Node: Path expansion, Next: Casefolding search, Prev: Pa Kpathsea recognizes certain special characters and constructions in search paths, similar to that in shells. As a general example: -‘~$USER/{foo,bar}//baz’ expands to all subdirectories under directories -‘foo’ and ‘bar’ in $USER’s home directory that contain a directory or -file ‘baz’. +'~$USER/{foo,bar}//baz' expands to all subdirectories under directories +'foo' and 'bar' in $USER's home directory that contain a directory or +file 'baz'. These expansions are explained in the sections below. @@ -636,7 +636,7 @@ File: kpathsea.info, Node: Default expansion, Next: Variable expansion, Up: P ----------------------- If the highest-priority search path (*note Path sources::) contains an -“extra colon†(i.e., leading, trailing, or doubled), Kpathsea inserts at +"extra colon" (i.e., leading, trailing, or doubled), Kpathsea inserts at that point the next-highest-priority search path that is defined. If that inserted path has an extra colon, the same happens with the next-highest. (An extra colon in the compile-time default value has @@ -646,7 +646,7 @@ unpredictable results, so installers beware.) setenv TEXINPUTS /home/karl: -and a ‘TEXINPUTS’ value from ‘texmf.cnf’ of +and a 'TEXINPUTS' value from 'texmf.cnf' of .:$TEXMF//tex @@ -654,9 +654,9 @@ then the final value used for searching will be: /home/karl:.:$TEXMF//tex - Put another way, default expansion works on “formats†(search paths), + Put another way, default expansion works on "formats" (search paths), and not directly on environment variables. Example, showing the -trailing ‘:’ ignored in the first case and expanded in the second: +trailing ':' ignored in the first case and expanded in the second: $ env TTFONTS=/tmp: kpsewhich --expand-path '$TTFONTS' /tmp @@ -664,21 +664,21 @@ trailing ‘:’ ignored in the first case and expanded in the second: /tmp:.:/home/olaf/texmf/fonts/truetype//:... Since Kpathsea looks for multiple configuration files, it would be -natural to expect that (for example) an extra colon in ‘./texmf.cnf’ -would expand to the path in ‘$TEXMF/texmf.cnf’. Or, with Dvips’ -configuration files, that an extra colon in ‘config.$PRINTER’ would -expand to the path in ‘config.ps’. This doesn’t happen. It’s not clear +natural to expect that (for example) an extra colon in './texmf.cnf' +would expand to the path in '$TEXMF/texmf.cnf'. Or, with Dvips' +configuration files, that an extra colon in 'config.$PRINTER' would +expand to the path in 'config.ps'. This doesn't happen. It's not clear this would be desirable in all cases, and trying to devise a way to specify the path to which the extra colon should expand seemed truly baroque. Technicality: Since it would be useless to insert the default value -in more than one place, Kpathsea changes only one extra ‘:’ and leaves +in more than one place, Kpathsea changes only one extra ':' and leaves any others in place (they will eventually be ignored). Kpathsea checks -first for a leading ‘:’, then a trailing ‘:’, then a doubled ‘:’. +first for a leading ':', then a trailing ':', then a doubled ':'. - You can trace this by debugging “paths†(*note Debugging::). Default -expansion is implemented in the source file ‘kpathsea/kdefault.c’. + You can trace this by debugging "paths" (*note Debugging::). Default +expansion is implemented in the source file 'kpathsea/kdefault.c'. File: kpathsea.info, Node: Variable expansion, Next: Tilde expansion, Prev: Default expansion, Up: Path expansion @@ -686,34 +686,34 @@ File: kpathsea.info, Node: Variable expansion, Next: Tilde expansion, Prev: D 5.3.2 Variable expansion ------------------------ -‘$foo’ or ‘${foo}’ in a path element is replaced by (1) the value of an -environment variable ‘foo’ (if defined); (2) the value of ‘foo’ from -‘texmf.cnf’ (if defined); (3) the empty string. +'$foo' or '${foo}' in a path element is replaced by (1) the value of an +environment variable 'foo' (if defined); (2) the value of 'foo' from +'texmf.cnf' (if defined); (3) the empty string. - If the character after the ‘$’ is alphanumeric or ‘_’, the variable + If the character after the '$' is alphanumeric or '_', the variable name consists of all consecutive such characters. If the character -after the ‘$’ is a ‘{’, the variable name consists of everything up to -the next ‘}’ (braces may not be nested around variable names). -Otherwise, Kpathsea gives a warning and ignores the ‘$’ and its +after the '$' is a '{', the variable name consists of everything up to +the next '}' (braces may not be nested around variable names). +Otherwise, Kpathsea gives a warning and ignores the '$' and its following character. - You must quote the $’s and braces as necessary for your shell. + You must quote the $'s and braces as necessary for your shell. _Shell_ variable values cannot be seen by Kpathsea, i.e., ones defined -by ‘set’ in C shells and without ‘export’ in Bourne shells. +by 'set' in C shells and without 'export' in Bourne shells. For example, given setenv tex /home/texmf setenv TEXINPUTS .:$tex:${tex}prev -the final ‘TEXINPUTS’ path is the three directories: +the final 'TEXINPUTS' path is the three directories: .:/home/texmf:/home/texmfprev - The ‘.PROGNAME’ suffix on variables and ‘_PROGNAME’ on environment + The '.PROGNAME' suffix on variables and '_PROGNAME' on environment variable names are not implemented for general variable expansions. These are only recognized when search paths are initialized (*note Path sources::). Variable expansion is implemented in the source file -‘kpathsea/variable.c’. +'kpathsea/variable.c'. File: kpathsea.info, Node: Tilde expansion, Next: Brace expansion, Prev: Variable expansion, Up: Path expansion @@ -721,26 +721,26 @@ File: kpathsea.info, Node: Tilde expansion, Next: Brace expansion, Prev: Vari 5.3.3 Tilde expansion --------------------- -A leading ‘~’ in a path element is replaced by the value of the -environment variable ‘HOME’, or ‘.’ if ‘HOME’ is not set. On Windows, -the environment variable ‘USERPROFILE’ is checked instead of ‘HOME’. +A leading '~' in a path element is replaced by the value of the +environment variable 'HOME', or '.' if 'HOME' is not set. On Windows, +the environment variable 'USERPROFILE' is checked instead of 'HOME'. - A leading ‘~USER’ in a path element is replaced by USER’s home -directory from the system ‘passwd’ database. + A leading '~USER' in a path element is replaced by USER's home +directory from the system 'passwd' database. For example, setenv TEXINPUTS ~/mymacros: -will prepend a directory ‘mymacros’ in your home directory to the +will prepend a directory 'mymacros' in your home directory to the default path. - As a special case, if a home directory ends in ‘/’, the trailing -slash is dropped, to avoid inadvertently creating a ‘//’ construct in -the path. For example, if the home directory of the user ‘root’ is ‘/’, -the path element ‘~root/mymacros’ expands to just ‘/mymacros’, not -‘//mymacros’. + As a special case, if a home directory ends in '/', the trailing +slash is dropped, to avoid inadvertently creating a '//' construct in +the path. For example, if the home directory of the user 'root' is '/', +the path element '~root/mymacros' expands to just '/mymacros', not +'//mymacros'. - Tilde expansion is implemented in the source file ‘kpathsea/tilde.c’. + Tilde expansion is implemented in the source file 'kpathsea/tilde.c'. File: kpathsea.info, Node: Brace expansion, Next: KPSE_DOT expansion, Prev: Tilde expansion, Up: Path expansion @@ -748,38 +748,38 @@ File: kpathsea.info, Node: Brace expansion, Next: KPSE_DOT expansion, Prev: T 5.3.4 Brace expansion --------------------- -‘x{A,B}y’ expands to ‘xAy:xBy’. For example: +'x{A,B}y' expands to 'xAy:xBy'. For example: foo/{1,2}/baz -expands to ‘foo/1/baz:foo/2/baz’. ‘:’ is the path separator on the -current system; e.g., on a Windows system, it’s ‘;’. +expands to 'foo/1/baz:foo/2/baz'. ':' is the path separator on the +current system; e.g., on a Windows system, it's ';'. - Braces can be nested; for example, ‘x{A,B{1,2}}y’ expands to -‘xAy:xB1y:xB2y’. + Braces can be nested; for example, 'x{A,B{1,2}}y' expands to +'xAy:xB1y:xB2y'. Multiple non-nested braces are expanded from right to left; for -example, ‘x{A,B}{1,2}y’ expands to ‘x{A,B}1y:x{A,B}2y’, which expands to -‘xA1y:xB1y:xA2y:xB2y’. +example, 'x{A,B}{1,2}y' expands to 'x{A,B}1y:x{A,B}2y', which expands to +'xA1y:xB1y:xA2y:xB2y'. This feature can be used to implement multiple TeX hierarchies, by -assigning a brace list to ‘$TEXMF’, as mentioned in ‘texmf.in’. +assigning a brace list to '$TEXMF', as mentioned in 'texmf.in'. You can also use the path separator instead of the comma. The last -example could have been written ‘x{A:B}{1:2}y’ (on Unix). +example could have been written 'x{A:B}{1:2}y' (on Unix). Brace expansion is implemented in the source file -‘kpathsea/expand.c’. +'kpathsea/expand.c'. File: kpathsea.info, Node: KPSE_DOT expansion, Next: Subdirectory expansion, Prev: Brace expansion, Up: Path expansion -5.3.5 ‘KPSE_DOT’ expansion +5.3.5 'KPSE_DOT' expansion -------------------------- -When ‘KPSE_DOT’ is defined in the environment, it names a directory that +When 'KPSE_DOT' is defined in the environment, it names a directory that should be considered the current directory for the purpose of looking up -files in the search paths. This feature is needed by the ‘mktex...’ +files in the search paths. This feature is needed by the 'mktex...' scripts *note mktex scripts::, because these change the working directory. You should not ever define it yourself. @@ -793,16 +793,16 @@ Two or more consecutive slashes in a path element following a directory D is replaced by all subdirectories of D: first those subdirectories directly under D, then the subsubdirectories under those, and so on. At each level, the order in which the directories are searched is -unspecified. (It’s “directory orderâ€, and definitely not alphabetical.) +unspecified. (It's "directory order", and definitely not alphabetical.) - If you specify any filename components after the ‘//’, only + If you specify any filename components after the '//', only subdirectories which match those components are included. For example, -‘/a//b’ would expand into directories ‘/a/1/b’, ‘/a/2/b’, ‘/a/1/1/b’, -and so on, but not ‘/a/b/c’ or ‘/a/1’. +'/a//b' would expand into directories '/a/1/b', '/a/2/b', '/a/1/1/b', +and so on, but not '/a/b/c' or '/a/1'. - You can include multiple ‘//’ constructs in the path. + You can include multiple '//' constructs in the path. - ‘//’ at the beginning of a path is ignored; you didn’t really want to + '//' at the beginning of a path is ignored; you didn't really want to search every directory on the system, did you? I should mention one related implementation trick, which I took from @@ -811,28 +811,28 @@ it. The trick is that in every real Unix implementation (as opposed to the POSIX specification), a directory which contains no subdirectories -will have exactly two links (namely, one for ‘.’ and one for ‘..’). -That is to say, the ‘st_nlink’ field in the ‘stat’ structure will be -two. Thus, we don’t have to stat everything in the bottom-level (leaf) -directories—we can just check ‘st_nlink’, notice it’s two, and do no +will have exactly two links (namely, one for '.' and one for '..'). +That is to say, the 'st_nlink' field in the 'stat' structure will be +two. Thus, we don't have to stat everything in the bottom-level (leaf) +directories--we can just check 'st_nlink', notice it's two, and do no more work. But if you have a directory that contains a single subdirectory and -500 regular files, ‘st_nlink’ will be 3, and Kpathsea has to stat every +500 regular files, 'st_nlink' will be 3, and Kpathsea has to stat every one of those 501 entries. Therein lies slowness. - You can disable the trick by undefining ‘ST_NLINK_TRICK’ in -‘kpathsea/config.h’. (It is undefined by default except under Unix.) + You can disable the trick by undefining 'ST_NLINK_TRICK' in +'kpathsea/config.h'. (It is undefined by default except under Unix.) - Unfortunately, in some cases files in leaf directories are ‘stat’’d: -if the path specification is, say, ‘$TEXMF/fonts//pk//’, then files in a -subdirectory ‘.../pk’, even if it is a leaf, are checked. The reason + Unfortunately, in some cases files in leaf directories are 'stat''d: +if the path specification is, say, '$TEXMF/fonts//pk//', then files in a +subdirectory '.../pk', even if it is a leaf, are checked. The reason cannot be explained without reference to the implementation, so read -‘kpathsea/elt-dirs.c’ (search for ‘may descend’) if you are curious. +'kpathsea/elt-dirs.c' (search for 'may descend') if you are curious. And if you find a way to solve the problem, please let me know. Subdirectory expansion is implemented in the source file -‘kpathsea/elt-dirs.c’. +'kpathsea/elt-dirs.c'. File: kpathsea.info, Node: Casefolding search, Next: Filename database, Prev: Path expansion, Up: Path searching @@ -847,8 +847,8 @@ path element allows for checking the filesystem, a second check is made for a case-insensitive match. This is enabled at compile-time on Unix systems, and enabled at -runtime by setting the configuration variable ‘texmf_casefold_search’, -to a true value, e.g., ‘1’; this is done by default in TeX Live. +runtime by setting the configuration variable 'texmf_casefold_search', +to a true value, e.g., '1'; this is done by default in TeX Live. * Menu: @@ -866,9 +866,9 @@ documents between case-insensitive (file)systems and case-sensitive ones. In particular, Apple decided to make the default filesystem on Macs be case-insensitive some years ago, and this has exacerbated a problem of people creating documents that use, say, an image under the -name ‘foo.jpg’, while the actual file is named ‘foo.JPG’ or ‘Foo.jpg’. +name 'foo.jpg', while the actual file is named 'foo.JPG' or 'Foo.jpg'. It works on the Mac but if the document is transferred and run on a -standard case-sensitive Unix (file)system, the file can’t be found, due +standard case-sensitive Unix (file)system, the file can't be found, due only to differences in case. This same problematic scenario has always existed on Windows, but for @@ -880,7 +880,7 @@ Kpathsea behavior. Windows, where (for practical purposes) all file names are case-insensitive at the kernel level, and so the normal search will already have definitively matched or not. Therefore, search results in -unusual cases can be different on Windows and Unix—but this has always +unusual cases can be different on Windows and Unix--but this has always been true. @@ -900,60 +900,60 @@ mismatches are rare to begin with, and name collisions with respect only to case thus even more rare, the hope is that it will not cause difficulties in practice. - If it’s desirable in a given situation to have the exact same search + If it's desirable in a given situation to have the exact same search behavior as previously, that can be accomplished by setting the -configuration variable ‘texmf_casefold_search’ to ‘0’ (*note Path +configuration variable 'texmf_casefold_search' to '0' (*note Path sources::). Some examples to illustrate the new behavior follow. - Example #1: suppose the file ‘./foobar.tex’ exists. Now, searching -for ‘./FooBar.TeX’ (or any other case variation) will succeed, returning -‘./foobar.tex’—the name as stored on disk. In previous releases, or if -‘texmf_casefold_search’ is false, the search would fail. + Example #1: suppose the file './foobar.tex' exists. Now, searching +for './FooBar.TeX' (or any other case variation) will succeed, returning +'./foobar.tex'--the name as stored on disk. In previous releases, or if +'texmf_casefold_search' is false, the search would fail. Example #2: suppose we are using a case-sensitive (file)system, and -the search path is ‘.:/somedir’, and the files ‘./foobar.tex’ and -‘/somedir/FooBar.TeX’ both exist. Both now and previously, searching -for ‘foobar.tex’ returns ‘./foobar.tex’. However, searching for -‘FooBar.TeX’ now returns ‘./foobar.tex’ instead of -‘/somedir/FooBar.TeX’; this is the incompatibility mentioned above. -Also (as expected), searching for ‘FOOBAR.TEX’ (or whatever variation) -will now return ‘./foobar.tex’, whereas before it would fail. Searching -for all (‘kpsewhich --all’) ‘foobar.tex’ will return both matches. +the search path is '.:/somedir', and the files './foobar.tex' and +'/somedir/FooBar.TeX' both exist. Both now and previously, searching +for 'foobar.tex' returns './foobar.tex'. However, searching for +'FooBar.TeX' now returns './foobar.tex' instead of +'/somedir/FooBar.TeX'; this is the incompatibility mentioned above. +Also (as expected), searching for 'FOOBAR.TEX' (or whatever variation) +will now return './foobar.tex', whereas before it would fail. Searching +for all ('kpsewhich --all') 'foobar.tex' will return both matches. Example #3: same as example #2, but on a case-insensitive -(file)system: both now and previously, searching for ‘FooBar.TeX’ -returns ‘./foobar.tex’, since the system considers that a match. The +(file)system: both now and previously, searching for 'FooBar.TeX' +returns './foobar.tex', since the system considers that a match. The Kpathsea casefolding never comes into play. Example #4: if we have (on a case-sensitive system) both -‘./foobar.tex’ and ‘./FOOBAR.TEX’, searching with the exact case returns -that exact match, now and previously. Searching for ‘FooBar.tex’ will +'./foobar.tex' and './FOOBAR.TEX', searching with the exact case returns +that exact match, now and previously. Searching for 'FooBar.tex' will now return one or the other (chosen arbitrarily), rather than failing. -Perhaps unexpectedly, searching for all ‘foobar.tex’ or ‘FooBar.tex’ +Perhaps unexpectedly, searching for all 'foobar.tex' or 'FooBar.tex' will also return only one or the other, not both (see more below). - Example #5: the font file ‘STIX-Regular.otf’ is included in TeX Live -in the system directory ‘texmf-dist/fonts/opentype/public/stix’. + Example #5: the font file 'STIX-Regular.otf' is included in TeX Live +in the system directory 'texmf-dist/fonts/opentype/public/stix'. Because Kpathsea never searches the disk in the big system directory, -the casefolding is not done, and a search for ‘stix-regular.otf’ will +the casefolding is not done, and a search for 'stix-regular.otf' will fail (on case-sensitive systems), as it always has. The caveat about not searching the disk amounts to saying that -casefolding does not happen in the trees specified with ‘!!’ (*note -ls-R::), that is, where only database (‘ls-R’) searching is done. In -TeX Live, that is the ‘texmf-local’ and ‘texmf-dist’ trees (also -‘$TEXMFSYSCONFIG’ and ‘$TEXMFSYSVAR’, but those are rarely noticed). +casefolding does not happen in the trees specified with '!!' (*note +ls-R::), that is, where only database ('ls-R') searching is done. In +TeX Live, that is the 'texmf-local' and 'texmf-dist' trees (also +'$TEXMFSYSCONFIG' and '$TEXMFSYSVAR', but those are rarely noticed). The rationale for this is that in practice, case mangling happens with user-created files, not with packages distributed as part of the TeX system. - One more caveat: the purpose of ‘kpsewhich’ is to exercise the path + One more caveat: the purpose of 'kpsewhich' is to exercise the path searching in Kpathsea as it is actually done. Therefore, as shown -above, ‘kpsewhich --all’ will not return all matches regardless of case +above, 'kpsewhich --all' will not return all matches regardless of case within a given path element. If you want to find all matches in all -directories, ‘find’ is the best tool, although the setup takes a couple +directories, 'find' is the best tool, although the setup takes a couple steps: kpsewhich -show-path=tex >/tmp/texpath # search path specification @@ -961,30 +961,30 @@ steps: tr ':' '\n' </tmp/texdirs >/tmp/texdirlist # colons to newlines find `cat /tmp/texdirlist` -iname somefile.tex -print </tmp/texdirlist - Sorry that it’s annoyingly lengthy, but implementing this inside + Sorry that it's annoyingly lengthy, but implementing this inside Kpathsea would be a lot of error-prone trouble for something that is -only useful for debugging. If your ‘find’ does not support ‘-iname’, +only useful for debugging. If your 'find' does not support '-iname', you can get GNU Find from <https://gnu.org/software/findutils>. The casefolding search is implemented in the source file -‘kpathsea/pathsearch.c’. Two implementation points: +'kpathsea/pathsearch.c'. Two implementation points: - • Kpathsea never tries to check if a given directory resides on a + * Kpathsea never tries to check if a given directory resides on a case-insensitive filesystem, because there is no efficient and portable way to do so. All it does is try to see if a potential - file name is a readable normal file (with, usually, the ‘access’ + file name is a readable normal file (with, usually, the 'access' system call). - • Kpathsea does not do any case-insensitive matching of the - directories along the path. It’s not going to find - ‘/Some/Random/file.tex’ when looking for ‘/some/random/file.tex’. + * Kpathsea does not do any case-insensitive matching of the + directories along the path. It's not going to find + '/Some/Random/file.tex' when looking for '/some/random/file.tex'. The casefolding only happens with the elements of the leaf directory. File: kpathsea.info, Node: Filename database, Next: Invoking kpsewhich, Prev: Casefolding search, Up: Path searching -5.5 Filename database (‘ls-R’) +5.5 Filename database ('ls-R') ============================== Kpathsea goes to some lengths to minimize disk accesses for searches @@ -992,15 +992,15 @@ Kpathsea goes to some lengths to minimize disk accesses for searches every possible directory in typical TeX installations takes an excessively long time. - Therefore, Kpathsea can use an externally-built “filename database†-file named ‘ls-R’ that maps files to directories, thus avoiding the need + Therefore, Kpathsea can use an externally-built "filename database" +file named 'ls-R' that maps files to directories, thus avoiding the need to exhaustively search the disk. - A second database file ‘aliases’ allows you to give additional names -to the files listed in ‘ls-R’. + A second database file 'aliases' allows you to give additional names +to the files listed in 'ls-R'. - The ‘ls-R’ and ‘aliases’ features are implemented in the source file -‘kpathsea/db.c’. + The 'ls-R' and 'aliases' features are implemented in the source file +'kpathsea/db.c'. * Menu: @@ -1011,77 +1011,77 @@ to the files listed in ‘ls-R’. File: kpathsea.info, Node: ls-R, Next: Filename aliases, Up: Filename database -5.5.1 ‘ls-R’ +5.5.1 'ls-R' ------------ -As mentioned above, you must name the main filename database ‘ls-R’. +As mentioned above, you must name the main filename database 'ls-R'. You can put one at the root of each TeX installation hierarchy you wish -to search (‘$TEXMF’ by default, which expands to a braced list of +to search ('$TEXMF' by default, which expands to a braced list of several hierarchies in TeX Live). - Kpathsea looks for ‘ls-R’ files along the ‘TEXMFDBS’ path. It is -best for this to contain all and only those hierarchies from ‘$TEXMF’ -which are specified with ‘!!’—and also to specify them with ‘!!’ in -‘TEXMFDBS’. (See the end of this section for more on ‘!!’.) + Kpathsea looks for 'ls-R' files along the 'TEXMFDBS' path. It is +best for this to contain all and only those hierarchies from '$TEXMF' +which are specified with '!!'--and also to specify them with '!!' in +'TEXMFDBS'. (See the end of this section for more on '!!'.) - The recommended way to create and maintain ‘ls-R’ is to run the -‘mktexlsr’ script, which is installed in ‘$(bindir)’ (‘/usr/local/bin’ + The recommended way to create and maintain 'ls-R' is to run the +'mktexlsr' script, which is installed in '$(bindir)' ('/usr/local/bin' by default). That script goes to some trouble to follow symbolic links -as necessary, etc. It’s also invoked by the distributed ‘mktex...’ +as necessary, etc. It's also invoked by the distributed 'mktex...' scripts. - At its simplest, though, you can build ‘ls-R’ with the command + At its simplest, though, you can build 'ls-R' with the command cd /YOUR/TEXMF/ROOT && ls -LAR ./ >ls-R -presuming your ‘ls’ produces the right output format (see the section -below). GNU ‘ls’, for example, outputs in this format. Also presuming -your ‘ls’ hasn’t been aliased in a system file (e.g., ‘/etc/profile’) to -something problematic, e.g., ‘ls --color=tty’. In that case, you will -have to disable the alias before generating ‘ls-R’. For the precise +presuming your 'ls' produces the right output format (see the section +below). GNU 'ls', for example, outputs in this format. Also presuming +your 'ls' hasn't been aliased in a system file (e.g., '/etc/profile') to +something problematic, e.g., 'ls --color=tty'. In that case, you will +have to disable the alias before generating 'ls-R'. For the precise definition of the file format, see *note Database format::. Regardless of whether you use the supplied script or your own, you -will almost certainly want to invoke it via ‘cron’, so when you make +will almost certainly want to invoke it via 'cron', so when you make changes in the installed files (say if you install a new LaTeX package), -‘ls-R’ will be automatically updated. However, for those using TeX Live -or system distributions, the package managers should run ‘mktexlsr’ as +'ls-R' will be automatically updated. However, for those using TeX Live +or system distributions, the package managers should run 'mktexlsr' as needed. - The ‘-A’ option to ‘ls’ includes files beginning with ‘.’ (except for -‘.’ and ‘..’), such as the file ‘.tex’ included with the LaTeX tools -package. (On the other hand, _directories_ whose names begin with ‘.’ + The '-A' option to 'ls' includes files beginning with '.' (except for +'.' and '..'), such as the file '.tex' included with the LaTeX tools +package. (On the other hand, _directories_ whose names begin with '.' are always ignored.) - If your system does not support symbolic links, omit the ‘-L’. + If your system does not support symbolic links, omit the '-L'. - ‘ls -LAR /YOUR/TEXMF/ROOT’ will also work. But using ‘./’ avoids + 'ls -LAR /YOUR/TEXMF/ROOT' will also work. But using './' avoids embedding absolute pathnames, so the hierarchy can be easily transported. It also avoids possible trouble with automounters or other network filesystem conventions. - Kpathsea warns you if it finds an ‘ls-R’ file, but the file does not -contain any usable entries. The usual culprit is running plain ‘ls -R’ -instead of ‘ls -LR ./’ or ‘ls -R /YOUR/TEXMF/ROOT’. Another possibility -is some system directory name starting with a ‘.’ (perhaps if you are + Kpathsea warns you if it finds an 'ls-R' file, but the file does not +contain any usable entries. The usual culprit is running plain 'ls -R' +instead of 'ls -LR ./' or 'ls -R /YOUR/TEXMF/ROOT'. Another possibility +is some system directory name starting with a '.' (perhaps if you are using AFS); Kpathsea ignores everything under such directories. - If a particular path element begins with ‘!!’, _only_ the database + If a particular path element begins with '!!', _only_ the database will be searched for that element, never the disk; and if the database does not exist, nothing at all will be searched. In TeX Live, most of -the trees are specified with ‘!!’. +the trees are specified with '!!'. - For path elements that do not begin with ‘!!’, if the database + For path elements that do not begin with '!!', if the database exists, it will be used, and the disk will not be searched. However, in this case, if the database does not exist, the disk will be searched. -In TeX Live, the most notable case of this is the ‘TEXMFHOME’ tree, to +In TeX Live, the most notable case of this is the 'TEXMFHOME' tree, to allow users to add and remove files from their own tree without having -to worry about ‘ls-R’. +to worry about 'ls-R'. - (Aside: there are uncommon cases where a ‘!!’ tree will be searched -on disk even if the ‘ls-R’ file exists; they are too obscure to try to -explain here. See ‘pathsearch.c’ in the source if you need to know.) + (Aside: there are uncommon cases where a '!!' tree will be searched +on disk even if the 'ls-R' file exists; they are too obscure to try to +explain here. See 'pathsearch.c' in the source if you need to know.) - To sum up: do not create an ‘ls-R’ file unless you also take care to + To sum up: do not create an 'ls-R' file unless you also take care to keep it up to date. Otherwise newly-installed files will not be found. @@ -1092,24 +1092,24 @@ File: kpathsea.info, Node: Filename aliases, Next: Database format, Prev: ls- In some circumstances, you may wish to find a file under several names. For example, suppose a TeX document was created using a DOS system and -tries to read ‘longtabl.sty’. But now it’s being run on a Unix system, -and the file has its original name, ‘longtable.sty’. The file won’t be -found. You need to give the actual file ‘longtable.sty’ an alias -‘longtabl.sty’. +tries to read 'longtabl.sty'. But now it's being run on a Unix system, +and the file has its original name, 'longtable.sty'. The file won't be +found. You need to give the actual file 'longtable.sty' an alias +'longtabl.sty'. - You can handle this by creating a file ‘aliases’ as a companion to -the ‘ls-R’ for the hierarchy containing the file in question. (You must -have an ‘ls-R’ for the alias feature to work.) + You can handle this by creating a file 'aliases' as a companion to +the 'ls-R' for the hierarchy containing the file in question. (You must +have an 'ls-R' for the alias feature to work.) - The format of ‘aliases’ is simple: two whitespace-separated words per -line; the first is the real name ‘longtable.sty’, and second is the -alias (‘longtabl.sty’). These must be base filenames, with no directory -components. ‘longtable.sty’ must be in the sibling ‘ls-R’. + The format of 'aliases' is simple: two whitespace-separated words per +line; the first is the real name 'longtable.sty', and second is the +alias ('longtabl.sty'). These must be base filenames, with no directory +components. 'longtable.sty' must be in the sibling 'ls-R'. - Also, blank lines and lines starting with ‘%’ or ‘#’ are ignored in -‘aliases’, to allow for comments. + Also, blank lines and lines starting with '%' or '#' are ignored in +'aliases', to allow for comments. - If a real file ‘longtabl.sty’ exists, it is used regardless of any + If a real file 'longtabl.sty' exists, it is used regardless of any aliases. @@ -1118,22 +1118,22 @@ File: kpathsea.info, Node: Database format, Prev: Filename aliases, Up: Filen 5.5.3 Database format --------------------- -The “database†read by Kpathsea is a line-oriented file of plain text. -The format is that generated by GNU (and most other) ‘ls’ programs given -the ‘-R’ option, as follows. +The "database" read by Kpathsea is a line-oriented file of plain text. +The format is that generated by GNU (and most other) 'ls' programs given +the '-R' option, as follows. - • Blank lines are ignored. + * Blank lines are ignored. - • If a line begins with ‘/’ or ‘./’ or ‘../’ and ends with a colon, - it’s the name of a directory. (‘../’ lines aren’t useful, however, + * If a line begins with '/' or './' or '../' and ends with a colon, + it's the name of a directory. ('../' lines aren't useful, however, and should not be generated.) - • All other lines define entries in the most recently seen directory. - /’s in such lines will produce possibly-strange results. + * All other lines define entries in the most recently seen directory. + /'s in such lines will produce possibly-strange results. - • Files with no preceding directory line are ignored. + * Files with no preceding directory line are ignored. - For example, here’s the first few lines of ‘ls-R’ (which totals about + For example, here's the first few lines of 'ls-R' (which totals about 30K bytes) on my system: bibtex @@ -1158,21 +1158,21 @@ the ‘-R’ option, as follows. File: kpathsea.info, Node: Invoking kpsewhich, Prev: Filename database, Up: Path searching -5.6 ‘kpsewhich’: Standalone path searching +5.6 'kpsewhich': Standalone path searching ========================================== The Kpsewhich program exercises the path searching functionality independent of any particular application. This can also be useful as a -sort of ‘find’ program to locate files in your TeX hierarchies, perhaps +sort of 'find' program to locate files in your TeX hierarchies, perhaps in administrative scripts. It is used heavily in the distributed -‘mktex...’ scripts. +'mktex...' scripts. Synopsis: kpsewhich OPTION... FILENAME... The options and filename(s) to look up can be intermixed. Options -can start with either ‘-’ or ‘--’, and any unambiguous abbreviation is +can start with either '-' or '--', and any unambiguous abbreviation is accepted. * Menu: @@ -1180,7 +1180,7 @@ accepted. * Path searching options:: Changing the mode, resolution, etc. * Specially-recognized files:: Default formats for texmf.cnf, etc. * Auxiliary tasks:: Path and variable expansion, etc. -* Standard options:: ‘--help’ and ‘--version’. +* Standard options:: '--help' and '--version'. File: kpathsea.info, Node: Path searching options, Next: Specially-recognized files, Up: Invoking kpsewhich @@ -1193,80 +1193,80 @@ filename, and returns the first file found. Various options alter the path searching behavior: -‘--all’ +'--all' Report all matches found, one per line. By default, if there is more than one match, just one will be reported (chosen effectively - at random). Exception: with the glyph formats (‘pk’, ‘gf’), this + at random). Exception: with the glyph formats ('pk', 'gf'), this option has no effect and only the first match is returned. -‘--casefold-search’ -‘--no-casefold-search’ +'--casefold-search' +'--no-casefold-search' Explicitly enable or disable the fallback to a case-insensitive search on Unix platforms (*note Casefolding search::); no effect on - Windows. The default is enabled, set in ‘texmf.cnf’. Disabling - (‘--no-casefold-search’) does not mean that searches magically + Windows. The default is enabled, set in 'texmf.cnf'. Disabling + ('--no-casefold-search') does not mean that searches magically become case-sensitive when the underlying (file)system is case-insensitive, it merely means that Kpathsea does not do any casefolding itself. -‘--cnf-line=STR’ - Parse STR as if it were a line in the ‘texmf.cnf’ configuration +'--cnf-line=STR' + Parse STR as if it were a line in the 'texmf.cnf' configuration file (*note Config files::), overriding settings in the actual configuration files, and also in the environment (*note Path sources::). This is implemented by making any settings from STR in the environment, overwriting any value already there. Thus, an - extra colon in a ‘--cnf-line’ value will refer to the value from a + extra colon in a '--cnf-line' value will refer to the value from a configuration file, not a user-set environment variable. Furthermore, any variable set from STR will also be set with the - program name suffix. For example, ‘pdftex - --cnf-line=TEXINPUTS=/foo:’ will set both ‘TEXINPUTS’ and - ‘TEXINPUTS_pdftex’ in the environment (and the value will be ‘/foo’ - followed by the setting from ‘texmf.cnf’, ignoring any user-set - ‘TEXINPUTS’). + program name suffix. For example, 'pdftex + --cnf-line=TEXINPUTS=/foo:' will set both 'TEXINPUTS' and + 'TEXINPUTS_pdftex' in the environment (and the value will be '/foo' + followed by the setting from 'texmf.cnf', ignoring any user-set + 'TEXINPUTS'). This behavior is desirable because, in practice, many variables in - the distributed ‘texmf.cnf’ are program-specific, and the intuitive - behavior is for values set on the command line with ‘--cnf-line’ to + the distributed 'texmf.cnf' are program-specific, and the intuitive + behavior is for values set on the command line with '--cnf-line' to override them. -‘--dpi=NUM’ - Set the resolution to NUM; this only affects ‘gf’ and ‘pk’ lookups. - ‘-D’ is a synonym, for compatibility with Dvips. Default is 600. +'--dpi=NUM' + Set the resolution to NUM; this only affects 'gf' and 'pk' lookups. + '-D' is a synonym, for compatibility with Dvips. Default is 600. -‘--engine=NAME’ +'--engine=NAME' Set the engine name to NAME. By default it is not set. The engine name is used in some search paths to allow files with the same name but used by different engines to coexist. - In particular, since the memory dump files (‘.fmt’/‘.base’/‘.mem’) - are now stored in subdirectories named for the engine (‘tex’, - ‘pdftex’, ‘xetex’, etc.), you must specify an engine name in order - to find them. For example, ‘cont-en.fmt’ typically exists for both - ‘pdftex’ and ‘xetex’. With the default path settings, you can use - ‘--engine=/’ to look for any dump file, regardless of engine; if a - dump file exists for more than one engine, it’s indeterminate which - one is returned. (The ‘/’ ends up specifying a normal recursive + In particular, since the memory dump files ('.fmt'/'.base'/'.mem') + are now stored in subdirectories named for the engine ('tex', + 'pdftex', 'xetex', etc.), you must specify an engine name in order + to find them. For example, 'cont-en.fmt' typically exists for both + 'pdftex' and 'xetex'. With the default path settings, you can use + '--engine=/' to look for any dump file, regardless of engine; if a + dump file exists for more than one engine, it's indeterminate which + one is returned. (The '/' ends up specifying a normal recursive search along the path where the dumps are stored, namely - ‘$TEXMF/web2c{/$engine,}’.) + '$TEXMF/web2c{/$engine,}'.) -‘--format=NAME’ +'--format=NAME' Set the format for lookup to NAME. By default, the format is - guessed from the filename, with ‘tex’ being used if nothing else + guessed from the filename, with 'tex' being used if nothing else fits. The recognized filename extensions (including any leading - ‘.’) are also allowable NAMEs. + '.') are also allowable NAMEs. All formats also have a name, which is the only way to specify formats with no associated suffix. For example, for Dvips - configuration files you can use ‘--format="dvips config"’. (The + configuration files you can use '--format="dvips config"'. (The quotes are for the sake of the shell.) - Here’s the current list of recognized names and the associated + Here's the current list of recognized names and the associated suffixes. *Note Supported file formats::, for more information on each of these. The strings in parentheses are abbreviations recognized only by - ‘kpsewhich’ (not the underlying library calls). They are provided + 'kpsewhich' (not the underlying library calls). They are provided when it would otherwise require an argument containing a space to specify the format, to simplify quoting of calls from shells. @@ -1330,151 +1330,151 @@ filename, and returns the first file found. ris: .ris bltxml: .bltxml - This option and ‘--path’ are mutually exclusive. + This option and '--path' are mutually exclusive. -‘--interactive’ +'--interactive' After processing the command line, read additional filenames to look up from standard input. -‘--mktex=FILETYPE’ -‘--no-mktex=FILETYPE’ - Turn on or off the ‘mktex’ script associated with FILETYPE. Usual - values for FILETYPE are ‘pk’, ‘mf’, ‘tex’, and ‘tfm’. By default, +'--mktex=FILETYPE' +'--no-mktex=FILETYPE' + Turn on or off the 'mktex' script associated with FILETYPE. Usual + values for FILETYPE are 'pk', 'mf', 'tex', and 'tfm'. By default, all are off in Kpsewhich, even if they are enabled for TeX. This - option implies setting ‘--must-exist’. *Note mktex scripts::. + option implies setting '--must-exist'. *Note mktex scripts::. -‘--mode=STRING’ - Set the mode name to STRING; this also only affects ‘gf’ and ‘pk’ +'--mode=STRING' + Set the mode name to STRING; this also only affects 'gf' and 'pk' lookups. No default: any mode will be found. *Note mktex script arguments::. -‘--must-exist’ +'--must-exist' Do everything possible to find the files, notably including - searching the disk and running the ‘mktex’ scripts. By default, - only the ‘ls-R’ database is checked, in the interest of efficiency. + searching the disk and running the 'mktex' scripts. By default, + only the 'ls-R' database is checked, in the interest of efficiency. -‘--path=STRING’ +'--path=STRING' Search along the path STRING (colon-separated as usual), instead of - guessing the search path from the filename. ‘//’ and all the usual + guessing the search path from the filename. '//' and all the usual expansions are supported (*note Path expansion::). This option and - ‘--format’ are mutually exclusive. To output the complete + '--format' are mutually exclusive. To output the complete directory expansion of a path, instead of doing a one-shot lookup, - see ‘--expand-path’ and ‘--show-path’ in the following section. + see '--expand-path' and '--show-path' in the following section. -‘--progname=NAME’ - Set the program name to NAME; default is ‘kpsewhich’. This can - affect the search paths via the ‘.PROGNAM’ feature in configuration +'--progname=NAME' + Set the program name to NAME; default is 'kpsewhich'. This can + affect the search paths via the '.PROGNAM' feature in configuration files (*note Config files::). -‘--subdir=STRING’ +'--subdir=STRING' Report only those matches whose directory part _ends_ with STRING (compared literally, except case is ignored on a case-insensitive operating system). For example, suppose there are two matches for a given name: kpsewhich foo.sty - ⇒ /some/where/foo.sty + => /some/where/foo.sty /another/place/foo.sty Then we can narrow the result to what we are interested in with - ‘--subdir’: + '--subdir': kpsewhich --subdir=where foo.sty - ⇒ /some/where/foo.sty + => /some/where/foo.sty kpsewhich --subdir=place foo.sty - ⇒ /another/place/foo.sty + => /another/place/foo.sty The string to match must be at the end of the directory part of the match, and it is taken literally, with no pattern matching: kpsewhich --subdir=another foo.sty - ⇒ + => The string to match may cross directory components: kpsewhich --subdir=some/where foo.sty - ⇒ /some/where/foo.sty + => /some/where/foo.sty - ‘--subdir’ implies ‘--all’; if there is more than one match, they - will all be reported (in our example, both ‘where’ and ‘place’ end - in ‘e’): + '--subdir' implies '--all'; if there is more than one match, they + will all be reported (in our example, both 'where' and 'place' end + in 'e'): kpsewhich --subdir=e - ⇒ /some/where/foo.sty + => /some/where/foo.sty /another/place/foo.sty - Because of the above rules, the presence of a leading ‘/’ is - important, since it “anchors†the match to a full component name: + Because of the above rules, the presence of a leading '/' is + important, since it "anchors" the match to a full component name: kpsewhich --subdir=/lace foo.sty - ⇒ + => - However, a trailing ‘/’ is immaterial (and ignored), since the + However, a trailing '/' is immaterial (and ignored), since the match always takes place at the end of the directory part: kpsewhich --subdir=lace/ foo.sty - ⇒ /another/place/foo.sty + => /another/place/foo.sty The purpose of these rules is to make it convenient to find results only within a particular area of the tree. For instance, a given - script named ‘foo.lua’ might exist within both - ‘texmf-dist/scripts/pkg1/’ and ‘texmf-dist/scripts/pkg2/’. By - specifying, say, ‘--subdir=/pkg1’, you can be sure of getting the + script named 'foo.lua' might exist within both + 'texmf-dist/scripts/pkg1/' and 'texmf-dist/scripts/pkg2/'. By + specifying, say, '--subdir=/pkg1', you can be sure of getting the one you are interested in. We only match at the end because a site might happen to install TeX - in ‘/some/coincidental/pkg1/path/’, and we wouldn’t want to match - ‘texmf-dist/scripts/pkg2/’ that when searching for ‘/pkg1’. + in '/some/coincidental/pkg1/path/', and we wouldn't want to match + 'texmf-dist/scripts/pkg2/' that when searching for '/pkg1'. File: kpathsea.info, Node: Specially-recognized files, Next: Auxiliary tasks, Prev: Path searching options, Up: Invoking kpsewhich -5.6.2 Specially-recognized files for ‘kpsewhich’ +5.6.2 Specially-recognized files for 'kpsewhich' ------------------------------------------------ -‘kpsewhich’ recognizes a few special filenames on the command line and -defaults to using the ‘known’ file formats for them, merely to save the +'kpsewhich' recognizes a few special filenames on the command line and +defaults to using the 'known' file formats for them, merely to save the time and trouble of specifying the format. This is only a feature of -‘kpsewhich’; when using the Kpathsea library itself, none of these -special filenames are recognized, and it’s still up to the caller to +'kpsewhich'; when using the Kpathsea library itself, none of these +special filenames are recognized, and it's still up to the caller to specify the desired format. - Here is the list of special filenames to ‘kpsewhich’, along with + Here is the list of special filenames to 'kpsewhich', along with their corresponding format: -‘config.ps’ - ‘dvips config’ +'config.ps' + 'dvips config' -‘dvipdfmx.cfg’ - ‘other text files’ +'dvipdfmx.cfg' + 'other text files' -‘fmtutil.cnf’ - ‘web2c files’ +'fmtutil.cnf' + 'web2c files' -‘glyphlist.txt’ - ‘map’ +'glyphlist.txt' + 'map' -‘mktex.cnf’ - ‘web2c files’ +'mktex.cnf' + 'web2c files' -‘pdfglyphlist.txt’ - ‘map’ +'pdfglyphlist.txt' + 'map' -‘pdftex.cfg’ - ‘pdftex config’ (although ‘pdftex.cfg’ is not used any more; look - for the file ‘pdftexconfig.tex’ instead.) +'pdftex.cfg' + 'pdftex config' (although 'pdftex.cfg' is not used any more; look + for the file 'pdftexconfig.tex' instead.) -‘texmf.cnf’ - ‘cnf’ +'texmf.cnf' + 'cnf' -‘XDvi’ - ‘other text files’ +'XDvi' + 'other text files' A user-specified format will override the above defaults. - Another useful configuration file in this regard is ‘tcfmgr.map’, -found in ‘texmf/texconfig/tcfmgr.map’, which records various information + Another useful configuration file in this regard is 'tcfmgr.map', +found in 'texmf/texconfig/tcfmgr.map', which records various information about the above configuration files (among others). @@ -1485,84 +1485,84 @@ File: kpathsea.info, Node: Auxiliary tasks, Next: Standard options, Prev: Spe Kpsewhich provides some features in addition to path lookup as such: -‘--debug=NUM’ +'--debug=NUM' Set debugging options to NUM. *Note Debugging::. -‘--expand-braces=STRING’ +'--expand-braces=STRING' Output variable, tilde, and brace expansion of STRING, which is assumed to be a single path element. *Note Path expansion::. -‘--expand-path=STRING’ +'--expand-path=STRING' Output the complete expansion of STRING, with each element - separated by the usual path separator on the current system (‘;’ on - Windows, ‘:’ otherwise). This may be useful to construct a custom + separated by the usual path separator on the current system (';' on + Windows, ':' otherwise). This may be useful to construct a custom search path for a format not otherwise supported. To retrieve the search path for a format that is already supported, see - ‘--show-path’. + '--show-path'. Nonexistent directories are culled from the output: $ kpsewhich --expand-path '/tmp' - ⇒ /tmp + => /tmp $ kpsewhich --expand-path '/nonesuch' - ⇒ + => For one-shot uses of an arbitrary (not built in to Kpathsea) path, - see ‘--path’ (*note Path searching options::). + see '--path' (*note Path searching options::). -‘--expand-var=STRING’ +'--expand-var=STRING' Output the variable and tilde expansion of STRING. For example, - with the usual ‘texmf.cnf’, ‘kpsewhich --expand-var='$TEXMF'’ + with the usual 'texmf.cnf', 'kpsewhich --expand-var='$TEXMF'' returns the TeX system hierarchy root(s). *Note Path expansion::. The specified STRING can contain anything, though, not just - variable references. This calls ‘kpse_var_expand’ (*note + variable references. This calls 'kpse_var_expand' (*note Programming with config files::). -‘--help-formats’ +'--help-formats' Output information about each supported format (*note Supported file formats::), including the names and abbreviations, variables looked for, and the original path. -‘--safe-in-name=NAME’ -‘--safe-out-name=NAME’ +'--safe-in-name=NAME' +'--safe-out-name=NAME' Exit successfully if NAME is safe to open for reading or writing, respectively, else unsuccessfully. No output is written. These tests take account of the related Kpathsea configuration settings (*note Calling sequence::). -‘--show-path=NAME’ +'--show-path=NAME' Show the path that would be used for file lookups of file type - NAME. Either a filename extension (‘pk’, ‘.vf’, etc.) or an - integer can be used, just as with ‘--format’, described in the + NAME. Either a filename extension ('pk', '.vf', etc.) or an + integer can be used, just as with '--format', described in the previous section. -‘--var-brace-value=VARIABLE’ - Like ‘--var-value’ (next), but also expands ‘{...}’ constructs. +'--var-brace-value=VARIABLE' + Like '--var-value' (next), but also expands '{...}' constructs. (*note Brace expansion::). Thus, the value is assumed to possibly - be several path elements, and ‘~’ is expanded at the beginning of + be several path elements, and '~' is expanded at the beginning of each. The path separator is changed to that of the current system in the expansion. - Example: ‘FOO='.;~' kpsewhich --var-brace-value=FOO’ outputs (on a - Unix-ish system) ‘.:/home/karl’, supposing the latter is the - current user’s home directory. Note that the ‘;’ in the source - value, as commonly used in ‘texmf.cnf’, has changed to a ‘:’, as + Example: 'FOO='.;~' kpsewhich --var-brace-value=FOO' outputs (on a + Unix-ish system) '.:/home/karl', supposing the latter is the + current user's home directory. Note that the ';' in the source + value, as commonly used in 'texmf.cnf', has changed to a ':', as the normal path separator on the current system. On a Windows-ish - system, the ‘;’ would remain. + system, the ';' would remain. -‘--var-value=VARIABLE’ +'--var-value=VARIABLE' Outputs the value of VARIABLE (a simple identifier like - ‘TEXMFDIST’, with no ‘$’ or other constructs), expanding ‘$’ (*note - Variable expansion::) and ‘~’ (*note Tilde expansion::) constructs - in the value. ‘~’ expansion happens at the beginning of the + 'TEXMFDIST', with no '$' or other constructs), expanding '$' (*note + Variable expansion::) and '~' (*note Tilde expansion::) constructs + in the value. '~' expansion happens at the beginning of the overall value and at the beginning of a variable expansion, but not arbitrarily within the string. Braces are not expanded. - Example: ‘--var-value=texmf_casefold_search’ outputs (if the - default is not changed) ‘1’. + Example: '--var-value=texmf_casefold_search' outputs (if the + default is not changed) '1'. - Example to contrast with ‘--var-brace-value’: ‘FOO='.;~' kpsewhich - --var-value=FOO’ outputs ‘.;~’, i.e., the same as the input value, + Example to contrast with '--var-brace-value': 'FOO='.;~' kpsewhich + --var-value=FOO' outputs '.;~', i.e., the same as the input value, on all systems. @@ -1573,10 +1573,10 @@ File: kpathsea.info, Node: Standard options, Prev: Auxiliary tasks, Up: Invok Kpsewhich accepts the standard GNU options: - • ‘--help’ prints a help message on standard output and exits + * '--help' prints a help message on standard output and exits successfully. - • ‘--version’ prints the Kpathsea version number and exits + * '--version' prints the Kpathsea version number and exits successfully. @@ -1599,8 +1599,8 @@ particularly). Kpathsea provides a standard way to search for files of any of the supported file types; glyph fonts are a bit different than all the rest. -Searches are based solely on names of files, not their contents—if a GF -file is (mis)named ‘cmr10.600pk’, it will be found as a PK file. +Searches are based solely on names of files, not their contents--if a GF +file is (mis)named 'cmr10.600pk', it will be found as a PK file. * Menu: @@ -1623,253 +1623,253 @@ finding files (see the next section). Some also define additional suffixes, and/or a program to be run to create missing files on the fly. Since environment variables containing periods, such as -‘TEXINPUTS.latex’, are not allowed on some systems, Kpathsea looks for -environment variables with an underscore, e.g., ‘TEXINPUTS_latex’ (*note +'TEXINPUTS.latex', are not allowed on some systems, Kpathsea looks for +environment variables with an underscore, e.g., 'TEXINPUTS_latex' (*note Config files::). The following table lists the above information. You can also get -the list by giving the ‘--help-formats’ option to ‘kpsewhich’ (*note +the list by giving the '--help-formats' option to 'kpsewhich' (*note Auxiliary tasks::). -‘afm’ - (Adobe font metrics, *note (dvips)Metric files::) ‘AFMFONTS’; - suffix ‘.afm’. +'afm' + (Adobe font metrics, *note (dvips)Metric files::) 'AFMFONTS'; + suffix '.afm'. -‘base’ - (Metafont memory dump, *note (web2c)Memory dumps::) ‘MFBASES’, - ‘TEXMFINI’; suffix ‘.base’. +'base' + (Metafont memory dump, *note (web2c)Memory dumps::) 'MFBASES', + 'TEXMFINI'; suffix '.base'. -‘bib’ +'bib' (BibTeX bibliography source, *note (web2c)bibtex invocation::) - ‘BIBINPUTS’, ‘TEXBIB’; suffix ‘.bib’. + 'BIBINPUTS', 'TEXBIB'; suffix '.bib'. -‘bltxml’ +'bltxml' (BibLaTeXML bibliography files for Biber, - <https://ctan.org/pkg/biber>) ‘BLTXMLINPUTS’ suffix ‘.bltxml’. + <https://ctan.org/pkg/biber>) 'BLTXMLINPUTS' suffix '.bltxml'. -‘bst’ +'bst' (BibTeX style, *note Basic BibTeX style files: (web2c)Basic BibTeX - style files.) ‘BSTINPUTS’; suffix ‘.bst’. + style files.) 'BSTINPUTS'; suffix '.bst'. -‘clua’ +'clua' (dynamic libraries for Lua, <https://ctan.org/pkg/luatex>) - ‘CLUAINPUTS’ suffixes ‘.dll’ and ‘.so’. + 'CLUAINPUTS' suffixes '.dll' and '.so'. -‘cmap’ - (character map files) ‘CMAPFONTS’; suffix ‘.cmap’. +'cmap' + (character map files) 'CMAPFONTS'; suffix '.cmap'. -‘cnf’ - (Runtime configuration files, *note Config files::) ‘TEXMFCNF’; - suffix ‘.cnf’. +'cnf' + (Runtime configuration files, *note Config files::) 'TEXMFCNF'; + suffix '.cnf'. -‘cweb’ - (CWEB input files) ‘CWEBINPUTS’; suffixes ‘.w’, ‘.web’; additional - suffix ‘.ch’. +'cweb' + (CWEB input files) 'CWEBINPUTS'; suffixes '.w', '.web'; additional + suffix '.ch'. -‘dvips config’ - (Dvips ‘config.*’ files, such as ‘config.ps’, *note (dvips)Config - files::) ‘TEXCONFIG’. +'dvips config' + (Dvips 'config.*' files, such as 'config.ps', *note (dvips)Config + files::) 'TEXCONFIG'. -‘enc files’ - (encoding vectors) ‘ENCFONTS’; suffix ‘.enc’. +'enc files' + (encoding vectors) 'ENCFONTS'; suffix '.enc'. -‘fmt’ - (TeX memory dump, *note (web2c)Memory dumps::) ‘TEXFORMATS’, - ‘TEXMFINI’; suffix ‘.fmt’. +'fmt' + (TeX memory dump, *note (web2c)Memory dumps::) 'TEXFORMATS', + 'TEXMFINI'; suffix '.fmt'. -‘font cid map’ - (CJK mapping) ‘FONTCIDMAPS’ suffix ‘.cid’. +'font cid map' + (CJK mapping) 'FONTCIDMAPS' suffix '.cid'. -‘font feature files’ - (primarily for OpenType font features) ‘FONTFEATURES’ suffix - ‘.fea’. +'font feature files' + (primarily for OpenType font features) 'FONTFEATURES' suffix + '.fea'. -‘gf’ - (generic font bitmap, *note (dvips)Glyph files::) ‘PROGRAMFONTS’, - ‘GFFONTS’, ‘GLYPHFONTS’, ‘TEXFONTS’; suffix ‘gf’. +'gf' + (generic font bitmap, *note (dvips)Glyph files::) 'PROGRAMFONTS', + 'GFFONTS', 'GLYPHFONTS', 'TEXFONTS'; suffix 'gf'. -‘graphic/figure’ +'graphic/figure' (Encapsulated PostScript figures, *note (dvips)PostScript - figures::) ‘TEXPICTS’, ‘TEXINPUTS’; additional suffixes: ‘.eps’, - ‘.epsi’. + figures::) 'TEXPICTS', 'TEXINPUTS'; additional suffixes: '.eps', + '.epsi'. -‘ist’ - (makeindex style files) ‘TEXINDEXSTYLE’, ‘INDEXSTYLE’; suffix - ‘.ist’. +'ist' + (makeindex style files) 'TEXINDEXSTYLE', 'INDEXSTYLE'; suffix + '.ist'. -‘lig files’ - (ligature definition files) ‘LIGFONTS’; suffix ‘.lig’. +'lig files' + (ligature definition files) 'LIGFONTS'; suffix '.lig'. -‘ls-R’ - (Filename databases, *note Filename database::) ‘TEXMFDBS’. +'ls-R' + (Filename databases, *note Filename database::) 'TEXMFDBS'. -‘lua’ - (Lua scripts, <https://ctan.org/pkg/luatex>) ‘LUAINPUTS’ suffixes - ‘.lua’, ‘.luatex’, ‘.luc’, ‘.luctex’, ‘.texlua’, ‘.texluc’, ‘.tlu’. +'lua' + (Lua scripts, <https://ctan.org/pkg/luatex>) 'LUAINPUTS' suffixes + '.lua', '.luatex', '.luc', '.luctex', '.texlua', '.texluc', '.tlu'. -‘map’ - (Fontmaps, *note Fontmap::) ‘TEXFONTMAPS’; suffix ‘.map’. +'map' + (Fontmaps, *note Fontmap::) 'TEXFONTMAPS'; suffix '.map'. -‘mem’ - (MetaPost memory dump, *note (web2c)Memory dumps::) ‘MPMEMS’, - ‘TEXMFINI’; suffix ‘.mem’. +'mem' + (MetaPost memory dump, *note (web2c)Memory dumps::) 'MPMEMS', + 'TEXMFINI'; suffix '.mem'. -‘MetaPost support’ +'MetaPost support' (MetaPost support files, used by DMP; *note (web2c)dmp - invocation::) ‘MPSUPPORT’. + invocation::) 'MPSUPPORT'. -‘mf’ - (Metafont source, *note (web2c)mf invocation::) ‘MFINPUTS’; suffix - ‘.mf’; dynamic creation program: ‘mktexmf’. +'mf' + (Metafont source, *note (web2c)mf invocation::) 'MFINPUTS'; suffix + '.mf'; dynamic creation program: 'mktexmf'. -‘mfpool’ +'mfpool' (Metafont program strings, *note (web2c)pooltype invocation::) - ‘MFPOOL’, ‘TEXMFINI’; suffix ‘.pool’. + 'MFPOOL', 'TEXMFINI'; suffix '.pool'. -‘mft’ - (‘MFT’ style file, *note (web2c)mft invocation::) ‘MFTINPUTS’; - suffix ‘.mft’. +'mft' + ('MFT' style file, *note (web2c)mft invocation::) 'MFTINPUTS'; + suffix '.mft'. -‘misc fonts’ - (font-related files that don’t fit the other categories) - ‘MISCFONTS’ +'misc fonts' + (font-related files that don't fit the other categories) + 'MISCFONTS' -‘mlbib’ - (MlBibTeX bibliography source) ‘MLBIBINPUTS’, ‘BIBINPUTS’, - ‘TEXBIB’; suffixes ‘.mlbib’, ‘.mlbib’. +'mlbib' + (MlBibTeX bibliography source) 'MLBIBINPUTS', 'BIBINPUTS', + 'TEXBIB'; suffixes '.mlbib', '.mlbib'. -‘mlbst’ - (MlBibTeX style) ‘MLBSTINPUTS’, ‘BSTINPUTS’; suffixes ‘.mlbst’, - ‘.bst’. +'mlbst' + (MlBibTeX style) 'MLBSTINPUTS', 'BSTINPUTS'; suffixes '.mlbst', + '.bst'. -‘mp’ - (MetaPost source, *note (web2c)mpost invocation::) ‘MPINPUTS’; - suffix ‘.mp’. +'mp' + (MetaPost source, *note (web2c)mpost invocation::) 'MPINPUTS'; + suffix '.mp'. -‘mppool’ +'mppool' (MetaPost program strings, *note (web2c)pooltype invocation::) - ‘MPPOOL’, ‘TEXMFINI’; suffix ‘.pool’. + 'MPPOOL', 'TEXMFINI'; suffix '.pool'. -‘ocp’ - (Omega compiled process files) ‘OCPINPUTS’; - suffix ‘.ocp’; dynamic creation program: ‘MakeOmegaOCP’. +'ocp' + (Omega compiled process files) 'OCPINPUTS'; + suffix '.ocp'; dynamic creation program: 'MakeOmegaOCP'. -‘ofm’ - (Omega font metrics) ‘OFMFONTS’, ‘TEXFONTS’; - suffixes ‘.ofm’, ‘.tfm’; dynamic creation program: ‘MakeOmegaOFM’. +'ofm' + (Omega font metrics) 'OFMFONTS', 'TEXFONTS'; + suffixes '.ofm', '.tfm'; dynamic creation program: 'MakeOmegaOFM'. -‘opentype fonts’ - (OpenType fonts) ‘OPENTYPEFONTS’. +'opentype fonts' + (OpenType fonts) 'OPENTYPEFONTS'. -‘opl’ - (Omega property lists) ‘OPLFONTS’, ‘TEXFONTS’; suffix ‘.opl’. +'opl' + (Omega property lists) 'OPLFONTS', 'TEXFONTS'; suffix '.opl'. -‘otp’ - (Omega translation process files) ‘OTPINPUTS’; suffix ‘.otp’. +'otp' + (Omega translation process files) 'OTPINPUTS'; suffix '.otp'. -‘ovf’ - (Omega virtual fonts) ‘OVFFONTS’, ‘TEXFONTS’; suffix ‘.ovf’. +'ovf' + (Omega virtual fonts) 'OVFFONTS', 'TEXFONTS'; suffix '.ovf'. -‘ovp’ - (Omega virtual property lists) ‘OVPFONTS’, ‘TEXFONTS’; suffix - ‘.ovp’. +'ovp' + (Omega virtual property lists) 'OVPFONTS', 'TEXFONTS'; suffix + '.ovp'. -‘pdftex config’ - (PDFTeX-specific configuration files) ‘PDFTEXCONFIG’. +'pdftex config' + (PDFTeX-specific configuration files) 'PDFTEXCONFIG'. -‘pk’ - (packed bitmap fonts, *note (dvips)Glyph files::) ‘PROGRAMFONTS’ - (PROGRAM being ‘XDVI’, etc.), ‘PKFONTS’, ‘TEXPKS’, ‘GLYPHFONTS’, - ‘TEXFONTS’; suffix ‘pk’; dynamic creation program: ‘mktexpk’. +'pk' + (packed bitmap fonts, *note (dvips)Glyph files::) 'PROGRAMFONTS' + (PROGRAM being 'XDVI', etc.), 'PKFONTS', 'TEXPKS', 'GLYPHFONTS', + 'TEXFONTS'; suffix 'pk'; dynamic creation program: 'mktexpk'. -‘PostScript header’ +'PostScript header' (downloadable PostScript, *note (dvips)Header files::) - ‘TEXPSHEADERS’, ‘PSHEADERS’; additional suffix ‘.pro’. + 'TEXPSHEADERS', 'PSHEADERS'; additional suffix '.pro'. -‘ris’ +'ris' (RIS bibliography files, primarily for Biber, - <https://ctan.org/pkg/biber>) ‘RISINPUTS’ suffix ‘.ris’. + <https://ctan.org/pkg/biber>) 'RISINPUTS' suffix '.ris'. -‘subfont definition files’ - (subfont definition files) ‘SFDFONTS’ suffix ‘.sfd’. +'subfont definition files' + (subfont definition files) 'SFDFONTS' suffix '.sfd'. -‘tex’ - (TeX source, *note (web2c)tex invocation::) ‘TEXINPUTS’; suffix - ‘.tex’; additional suffixes: none, because such a list cannot be - complete; dynamic creation program: ‘mktextex’. +'tex' + (TeX source, *note (web2c)tex invocation::) 'TEXINPUTS'; suffix + '.tex'; additional suffixes: none, because such a list cannot be + complete; dynamic creation program: 'mktextex'. -‘TeX system documentation’ - (Documentation files for the TeX system) ‘TEXDOCS’. +'TeX system documentation' + (Documentation files for the TeX system) 'TEXDOCS'. -‘TeX system sources’ - (Source files for the TeX system) ‘TEXSOURCES’. +'TeX system sources' + (Source files for the TeX system) 'TEXSOURCES'. -‘texmfscripts’ +'texmfscripts' (Architecture-independent executables distributed in the texmf - trees) ‘TEXMFSCRIPTS’. + trees) 'TEXMFSCRIPTS'. -‘texpool’ +'texpool' (TeX program strings, *note (web2c)pooltype invocation::) - ‘TEXPOOL’, ‘TEXMFINI’; suffix ‘.pool’. + 'TEXPOOL', 'TEXMFINI'; suffix '.pool'. -‘tfm’ - (TeX font metrics, *note (dvips)Metric files::) ‘TFMFONTS’, - ‘TEXFONTS’; suffix ‘.tfm’; dynamic creation program: ‘mktextfm’. +'tfm' + (TeX font metrics, *note (dvips)Metric files::) 'TFMFONTS', + 'TEXFONTS'; suffix '.tfm'; dynamic creation program: 'mktextfm'. -‘Troff fonts’ +'Troff fonts' (Troff fonts, used by DMP; *note (web2c)DMP invocation::) - ‘TRFONTS’. + 'TRFONTS'. -‘truetype fonts’ - (TrueType outline fonts) ‘TTFONTS’; suffixes ‘.ttf’ and ‘.TTF’, - ‘.ttc’ and ‘.TTC’, ‘.dfont’. +'truetype fonts' + (TrueType outline fonts) 'TTFONTS'; suffixes '.ttf' and '.TTF', + '.ttc' and '.TTC', '.dfont'. -‘type1 fonts’ +'type1 fonts' (Type 1 PostScript outline fonts, *note (dvips)Glyph files::) - ‘T1FONTS’, ‘T1INPUTS’, ‘TEXPSHEADERS’, ‘DVIPSHEADERS’; suffixes - ‘.pfa’, ‘.pfb’. + 'T1FONTS', 'T1INPUTS', 'TEXPSHEADERS', 'DVIPSHEADERS'; suffixes + '.pfa', '.pfb'. -‘type42 fonts’ - (Type 42 PostScript outline fonts) ‘T42FONTS’. +'type42 fonts' + (Type 42 PostScript outline fonts) 'T42FONTS'. -‘vf’ - (virtual fonts, *note (dvips)Virtual fonts::) ‘VFFONTS’, - ‘TEXFONTS’; suffix ‘.vf’. +'vf' + (virtual fonts, *note (dvips)Virtual fonts::) 'VFFONTS', + 'TEXFONTS'; suffix '.vf'. -‘web’ - (WEB input files) ‘WEBINPUTS’; suffix ‘.web’; additional suffix - ‘.ch’. +'web' + (WEB input files) 'WEBINPUTS'; suffix '.web'; additional suffix + '.ch'. -‘web2c files’ - (files specific to the web2c implementation) ‘WEB2C’. +'web2c files' + (files specific to the web2c implementation) 'WEB2C'. There are two special cases, because the paths and environment variables always depend on the name of the program: the variable name is constructed by converting the program name to upper case, and then -appending ‘INPUTS’. Assuming the program is called ‘foo’, this gives us +appending 'INPUTS'. Assuming the program is called 'foo', this gives us the following table. -‘other text files’ - (text files used by ‘foo’) ‘FOOINPUTS’. +'other text files' + (text files used by 'foo') 'FOOINPUTS'. -‘other binary files’ - (binary files used by ‘foo’) ‘FOOINPUTS’. +'other binary files' + (binary files used by 'foo') 'FOOINPUTS'. If an environment variable by these names are set, the corresponding -‘texmf.cnf’ definition won’t be looked at (unless, as usual, the -environment variable value has an extra ‘:’). *Note Default +'texmf.cnf' definition won't be looked at (unless, as usual, the +environment variable value has an extra ':'). *Note Default expansion::. For the font variables, the intent is that: - • ‘TEXFONTS’ is the default for everything. + * 'TEXFONTS' is the default for everything. - • ‘GLYPHFONTS’ is the default for bitmap (or, more precisely, + * 'GLYPHFONTS' is the default for bitmap (or, more precisely, non-metric) files. - • Each font format has a variable of its own. + * Each font format has a variable of its own. - • Each program has its own font override path as well; e.g., - ‘DVIPSFONTS’ for Dvipsk. Again, this is for bitmaps, not metrics. + * Each program has its own font override path as well; e.g., + 'DVIPSFONTS' for Dvipsk. Again, this is for bitmaps, not metrics. File: kpathsea.info, Node: File lookup, Next: Glyph lookup, Prev: Supported file formats, Up: TeX support @@ -1885,31 +1885,31 @@ searches are the exception, as described in the next section). 1. If the file format defines default suffixes, and the suffix of NAME name is not already a known suffix for that format, try the name with each default appended, and use alternative names found in the - fontmaps if necessary. Example: given ‘foo.bar’, look for - ‘foo.bar.tex’. + fontmaps if necessary. Example: given 'foo.bar', look for + 'foo.bar.tex'. 2. Search for NAME, and if necessary for alternative names found in - the fontmaps. Example: given ‘foo.bar’, we also look for - ‘foo.bar’. + the fontmaps. Example: given 'foo.bar', we also look for + 'foo.bar'. 3. If the file format defines a program to invoke to create missing files, run it (*note mktex scripts::). - The order in which we search for “suffixed†name (item 1) or the -“as-is†name (item 2) is controlled by the ‘try_std_extension_first’ -configuration value. The default set in ‘texmf.cnf’ is true, since -common suffixes are already recognized: ‘babel.sty’ will only look for -‘babel.sty’, not ‘babel.sty.tex’, regardless of this setting. + The order in which we search for "suffixed" name (item 1) or the +"as-is" name (item 2) is controlled by the 'try_std_extension_first' +configuration value. The default set in 'texmf.cnf' is true, since +common suffixes are already recognized: 'babel.sty' will only look for +'babel.sty', not 'babel.sty.tex', regardless of this setting. - When the suffix is unknown (e.g., ‘foo.bar’), both names are always + When the suffix is unknown (e.g., 'foo.bar'), both names are always tried; the difference is the order in which they are tried. - ‘try_std_extension_first’ only affects names being looked up which -*already* have an extension. A name without an extension (e.g., ‘tex -story’) will always have an extension added first. + 'try_std_extension_first' only affects names being looked up which +*already* have an extension. A name without an extension (e.g., 'tex +story') will always have an extension added first. - This algorithm is implemented in the function ‘kpathsea_find_file’ in -the source file ‘kpathsea/tex-file.c’. You can watch it in action with + This algorithm is implemented in the function 'kpathsea_find_file' in +the source file 'kpathsea/tex-file.c'. You can watch it in action with the debugging options (*note Debugging::). @@ -1919,7 +1919,7 @@ File: kpathsea.info, Node: Glyph lookup, Next: Suppressing warnings, Prev: Fi ================ This section describes how Kpathsea searches for a bitmap font in GF or -PK format (or either) given a font name (e.g., ‘cmr10’) and a resolution +PK format (or either) given a font name (e.g., 'cmr10') and a resolution (e.g., 600). Here is an outline of the search strategy (details in the sections @@ -1930,16 +1930,16 @@ successful lookup. format(s). 2. If NAME is an alias for a file F in the fontmap file - ‘texfonts.map’, look for F.DPI. + 'texfonts.map', look for F.DPI. - 3. Run an external program (typically named ‘mktexpk’) to generate the + 3. Run an external program (typically named 'mktexpk') to generate the font (*note mktex scripts::) 4. Look for FALLBACK.DPI, where FALLBACK is some last-resort font - (typically ‘cmr10’). + (typically 'cmr10'). - This is implemented in ‘kpathsea_find_glyph’ in -‘kpathsea/tex-glyph.c’. + This is implemented in 'kpathsea_find_glyph' in +'kpathsea/tex-glyph.c'. * Menu: @@ -1955,16 +1955,16 @@ File: kpathsea.info, Node: Basic glyph lookup, Next: Fontmap, Up: Glyph looku When Kpathsea looks for a bitmap font NAME at resolution DPI in a format FORMAT, it first checks each directory in the search path for a file -‘NAME.DPIFORMAT’; for example, ‘cmr10.600pk’. Kpathsea looks for a PK +'NAME.DPIFORMAT'; for example, 'cmr10.600pk'. Kpathsea looks for a PK file first, then a GF file. - If that fails, Kpathsea looks for ‘dpiDPI/NAME.FORMAT’; for example, -‘dpi600/cmr10.pk’. This is how fonts are typically stored on + If that fails, Kpathsea looks for 'dpiDPI/NAME.FORMAT'; for example, +'dpi600/cmr10.pk'. This is how fonts are typically stored on filesystems (such as DOS) that permit only three-character extensions. If that fails, Kpathsea looks for a font with a close-enough DPI. -“Close enough†is defined by the macro ‘KPSE_BITMAP_TOLERANCE’ in -‘kpathsea/tex-glyph.h’ to be ‘DPI / 500 + 1’. This is slightly more +"Close enough" is defined by the macro 'KPSE_BITMAP_TOLERANCE' in +'kpathsea/tex-glyph.h' to be 'DPI / 500 + 1'. This is slightly more than the 0.2% minimum allowed by the DVI standard (<CTAN:/dviware/driv-standard/level-0>). @@ -1975,51 +1975,51 @@ File: kpathsea.info, Node: Fontmap, Next: Fallback font, Prev: Basic glyph lo ------------- If a bitmap font or metric file is not found with the original name (see -the previous section), Kpathsea looks through any “fontmap†files for an -“alias†for the original font name. These files are named -‘texfonts.map’ and searched for along the ‘TEXFONTMAPS’ -environment/config file variable. All ‘texfonts.map’ files that are +the previous section), Kpathsea looks through any "fontmap" files for an +"alias" for the original font name. These files are named +'texfonts.map' and searched for along the 'TEXFONTMAPS' +environment/config file variable. All 'texfonts.map' files that are found are read; earlier definitions override later ones. This feature is intended to help in two respects: 1. An alias name is limited in length only by available memory, not by - your filesystem. Therefore, if you want to ask for ‘Times-Roman’ - instead of ‘ptmr’, you can (you get ‘ptmr8r’). + your filesystem. Therefore, if you want to ask for 'Times-Roman' + instead of 'ptmr', you can (you get 'ptmr8r'). 2. A few fonts have historically had multiple names: specifically, - LaTeX’s “circle font†has variously been known as ‘circle10’, - ‘lcircle10’, and ‘lcirc10’. Aliases can make all the names + LaTeX's "circle font" has variously been known as 'circle10', + 'lcircle10', and 'lcirc10'. Aliases can make all the names equivalent, so that it no longer matters what the name of the installed file is; TeX documents will find their favorite name. The format of fontmap files: - • Comments start with the last ‘%’ on a line and continue to the end + * Comments start with the last '%' on a line and continue to the end of the line. (This provides for names that include a %, ill-advised as that may be.) - • Blank lines are ignored. + * Blank lines are ignored. - • Each nonblank line is broken up into a series of “wordsâ€: a + * Each nonblank line is broken up into a series of "words": a sequence of non-whitespace characters. - • If the first word is ‘include’, the second word is used as a + * If the first word is 'include', the second word is used as a filename, and it is searched for and read. - • Otherwise, the first word on each line is the true filename; + * Otherwise, the first word on each line is the true filename; - • the second word is the alias; + * the second word is the alias; - • subsequent words are ignored. + * subsequent words are ignored. If an alias has an extension, it matches only those files with that extension; otherwise, it matches anything with the same root, regardless -of extension. For example, an alias ‘foo.tfm’ matches only when -‘foo.tfm’ is being searched for; but an alias ‘foo’ matches ‘foo.vf’, -‘foo.600pk’, etc. +of extension. For example, an alias 'foo.tfm' matches only when +'foo.tfm' is being searched for; but an alias 'foo' matches 'foo.vf', +'foo.600pk', etc. - As an example, here is an excerpt from the ‘texfonts.map’ in the + As an example, here is an excerpt from the 'texfonts.map' in the Web2c distribution. It makes the old and new names of the LaTeX circle fonts equivalent. @@ -2031,7 +2031,7 @@ fonts equivalent. lcirc10 lcircle10 ... - Fontmaps are implemented in the file ‘kpathsea/fontmap.c’. The + Fontmaps are implemented in the file 'kpathsea/fontmap.c'. The Fontname distribution has much more information on font naming (*note (fontname)::). @@ -2042,17 +2042,17 @@ File: kpathsea.info, Node: Fallback font, Prev: Fontmap, Up: Glyph lookup ------------------- If a bitmap font cannot be found or created at the requested size, -Kpathsea looks for the font at a set of “fallback resolutionsâ€. You +Kpathsea looks for the font at a set of "fallback resolutions". You specify these resolutions as a colon-separated list (like search paths). Kpathsea looks first for a program-specific environment variable (e.g., -‘DVIPSSIZES’ for Dvipsk), then the environment variable ‘TEXSIZES’, then +'DVIPSSIZES' for Dvipsk), then the environment variable 'TEXSIZES', then a default specified at compilation time (the Make variable -‘default_texsizes’). You can set this list to be empty if you prefer to +'default_texsizes'). You can set this list to be empty if you prefer to find fonts at their stated size or not at all. Finally, if the font cannot be found even at the fallback -resolutions, Kpathsea looks for a fallback font, typically ‘cmr10’. -Programs must enable this feature by calling ‘kpathsea_init_prog’ (*note +resolutions, Kpathsea looks for a fallback font, typically 'cmr10'. +Programs must enable this feature by calling 'kpathsea_init_prog' (*note Calling sequence::); the default is no fallback font. @@ -2065,52 +2065,52 @@ Kpathsea provides a way to suppress selected usually-harmless warnings; this is useful at large sites where most users are not administrators, and thus the warnings are merely a source of confusion, not a help. To do this, you set the environment variable or configuration file value -‘TEX_HUSH’ to a colon-separated list of values. Here are the +'TEX_HUSH' to a colon-separated list of values. Here are the possibilities: -‘all’ +'all' Suppress everything possible. -‘checksum’ +'checksum' Suppress mismatched font checksum warnings. -‘lostchar’ +'lostchar' Suppress warnings when a character is missing from a font that a DVI or VF file tries to typeset. -‘none’ - Don’t suppress any warnings. +'none' + Don't suppress any warnings. -‘readable’ +'readable' Suppress warnings about attempts to access a file whose permissions render it unreadable. -‘special’ - Suppresses warnings about an unimplemented or unparsable ‘\special’ +'special' + Suppresses warnings about an unimplemented or unparsable '\special' command. -‘tex-hush.c’ defines the function that checks the variable value. Each +'tex-hush.c' defines the function that checks the variable value. Each driver implements its own checks where appropriate. File: kpathsea.info, Node: mktex scripts, Prev: Suppressing warnings, Up: TeX support -6.5 ‘mktex’ scripts +6.5 'mktex' scripts =================== If Kpathsea cannot otherwise find a file, for some file types it is configured by default to invoke an external program to create it dynamically (*note mktex configuration::). These are collectively known -as “‘mktex’ scriptsâ€, since most of them are named ‘mktex...’. +as "'mktex' scripts", since most of them are named 'mktex...'. - For example, this is useful for fonts (bitmaps, TFM’s, and + For example, this is useful for fonts (bitmaps, TFM's, and arbitrarily-sizable Metafont sources such as the Sauter and EC fonts), since any given document can use fonts never before referenced. Building all fonts in advance is therefore impractical, if not impossible. - It is also useful for the TeX ‘.fmt’ (and Metafont ‘.base’ and -Metapost ‘.mem’ files, *note (Web2c)Memory dumps::), where + It is also useful for the TeX '.fmt' (and Metafont '.base' and +Metapost '.mem' files, *note (Web2c)Memory dumps::), where pre-generating every format consumes a lot of both time and space. The script is passed the name of the file to create and possibly @@ -2127,13 +2127,13 @@ diagnostics to standard error. File: kpathsea.info, Node: mktex configuration, Next: mktex script names, Up: mktex scripts -6.5.1 ‘mktex’ configuration +6.5.1 'mktex' configuration --------------------------- The list of file types and program names that can run an external program to create missing files is listed in the next section. In the -absence of ‘configure’ options specifying otherwise, everything but -‘mktextex’ will be enabled by default. The ‘configure’ options to +absence of 'configure' options specifying otherwise, everything but +'mktextex' will be enabled by default. The 'configure' options to change the defaults are: --without-mktexfmt-default @@ -2144,186 +2144,186 @@ change the defaults are: --without-mktextfm-default --with-mktextex-default - The ‘configure’ setting is overridden if the environment variable or -configuration file value named for the script is set; e.g., ‘MKTEXPK’ + The 'configure' setting is overridden if the environment variable or +configuration file value named for the script is set; e.g., 'MKTEXPK' (*note mktex script arguments::). - ‘mktexfmt’ reads a file ‘fmtutil.cnf’, typically located in -‘texmf/web2c/’ to glean its configuration information. The rest of the + 'mktexfmt' reads a file 'fmtutil.cnf', typically located in +'texmf/web2c/' to glean its configuration information. The rest of the files and features in this section are primarily intended for the font generation scripts. - As distributed, all the scripts source a file ‘texmf/web2c/mktex.cnf’ -if it exists, so you can override various defaults. See ‘mktex.opt’, + As distributed, all the scripts source a file 'texmf/web2c/mktex.cnf' +if it exists, so you can override various defaults. See 'mktex.opt', for instance, which defines the default mode, resolution, some special directory names, etc. If you prefer not to change the distributed -scripts, you can simply create ‘mktex.cnf’ with the appropriate +scripts, you can simply create 'mktex.cnf' with the appropriate definitions (you do not need to create it if you have nothing to put in -it). ‘mktex.cnf’ has no special syntax; it’s an arbitrary Bourne shell -script. The distribution contains a sample ‘mktex.cnf’ for you to copy +it). 'mktex.cnf' has no special syntax; it's an arbitrary Bourne shell +script. The distribution contains a sample 'mktex.cnf' for you to copy and modify as you please (it is not installed anywhere). In addition, you can configure a number of features with the -‘MT_FEATURES’ variable, which you can define: +'MT_FEATURES' variable, which you can define: - • in ‘mktex.opt’, as just mentioned; + * in 'mktex.opt', as just mentioned; - • by editing the file ‘mktex.opt’, either before ‘make install’ (in + * by editing the file 'mktex.opt', either before 'make install' (in the source hierarchy) or after (in the installed hierarchy); - • or in the environment. + * or in the environment. - If none of the options below are enabled, ‘mktexpk’, ‘mktextfm’, and -‘mktexmf’ follow the following procedure to decide where fonts should be -installed. Find the tree where the font’s sources are, and test the -permissions of the ‘fonts’ directory of that tree to determine whether + If none of the options below are enabled, 'mktexpk', 'mktextfm', and +'mktexmf' follow the following procedure to decide where fonts should be +installed. Find the tree where the font's sources are, and test the +permissions of the 'fonts' directory of that tree to determine whether it is writable. If it is, put the files in the tree in appropriate -locations. If it isn’t writable, see whether the tree is a system tree -(named in ‘SYSTEXMF’). If so, the ‘VARTEXFONTS’ tree is used. In all +locations. If it isn't writable, see whether the tree is a system tree +(named in 'SYSTEXMF'). If so, the 'VARTEXFONTS' tree is used. In all other cases the working directory is used. - The ‘appendonlydir’ option is enabled by default. + The 'appendonlydir' option is enabled by default. -‘appendonlydir’ - Tell ‘mktexdir’ to create directories append-only, i.e., set their +'appendonlydir' + Tell 'mktexdir' to create directories append-only, i.e., set their sticky bit (*note (coreutils)Mode Structure::). This feature is silently ignored on non-Unix platforms (e.g. Windows/NT and - MS-DOS) which don’t support similar functionality. This feature is + MS-DOS) which don't support similar functionality. This feature is enabled by default. -‘dosnames’ - Use 8.3 names; e.g., ‘dpi600/cmr10.pk’ instead of ‘cmr10.600pk’. +'dosnames' + Use 8.3 names; e.g., 'dpi600/cmr10.pk' instead of 'cmr10.600pk'. Note that this feature only affects filenames that would otherwise - clash with other TeX-related filenames; ‘mktex’ scripts do nothing + clash with other TeX-related filenames; 'mktex' scripts do nothing about filenames which exceed the 8+3 MS-DOS limits but remain unique when truncated (by the OS) to these limits, and nether do - the scripts care about possible clashes with files which aren’t - related with TeX. For example, ‘cmr10.600pk’ would clash with - ‘cmr10.600gf’ and is therefore changed when ‘dosnames’ is in - effect, but ‘mf.pool’ and ‘mp.base’ don’t clash with any + the scripts care about possible clashes with files which aren't + related with TeX. For example, 'cmr10.600pk' would clash with + 'cmr10.600gf' and is therefore changed when 'dosnames' is in + effect, but 'mf.pool' and 'mp.base' don't clash with any TeX-related files and are therefore unchanged. This feature is turned on by default on MS-DOS. If you do not wish - ‘dosnames’ to be set on an MS-DOS platform, you need to set the - ‘MT_FEATURES’ environment variable to a value that doesn’t include - ‘dosnames’. You can also change the default setting by editing - ‘mktex.opt’, but only if you use the ‘mktex’ shell scripts; the - emulation programs don’t consult ‘mktex.opt’. + 'dosnames' to be set on an MS-DOS platform, you need to set the + 'MT_FEATURES' environment variable to a value that doesn't include + 'dosnames'. You can also change the default setting by editing + 'mktex.opt', but only if you use the 'mktex' shell scripts; the + emulation programs don't consult 'mktex.opt'. -‘fontmaps’ +'fontmaps' Instead of deriving the location of a font in the destination tree from the location of the sources, the aliases and directory names from the Fontname distribution are used. (*note Introduction: (fontname)Top.). -‘nomfdrivers’ +'nomfdrivers' Let mktexpk and mktextfm create metafont driver files in a temporary directory. These will be used for just one metafont run and not installed permanently. -‘nomode’ +'nomode' Omit the directory level for the mode name; this is fine as long as you generate fonts for only one mode. -‘stripsupplier’ +'stripsupplier' Omit the font supplier name directory level. -‘striptypeface’ +'striptypeface' Omit the font typeface name directory level. -‘strip’ +'strip' Omit the font supplier and typeface name directory levels. This - feature is deprecated in favour of ‘stripsupplier’ and - ‘striptypeface’. + feature is deprecated in favour of 'stripsupplier' and + 'striptypeface'. -‘varfonts’ +'varfonts' When this option is enabled, fonts that would otherwise be written - in system texmf tree go to the ‘VARTEXFONTS’ tree instead. The - default value in ‘kpathsea/Makefile.in’ is ‘/var/tmp/texfonts’. - The ‘Linux File System Standard’ recommends ‘/var/tex/fonts’. + in system texmf tree go to the 'VARTEXFONTS' tree instead. The + default value in 'kpathsea/Makefile.in' is '/var/tmp/texfonts'. + The 'Linux File System Standard' recommends '/var/tex/fonts'. - The ‘varfonts’ setting in ‘MT_FEATURES’ is overridden by the - ‘USE_VARTEXFONTS’ environment variable: if set to ‘1’, the feature - is enabled, and if set to ‘0’, the feature is disabled. + The 'varfonts' setting in 'MT_FEATURES' is overridden by the + 'USE_VARTEXFONTS' environment variable: if set to '1', the feature + is enabled, and if set to '0', the feature is disabled. -‘texmfvar’ +'texmfvar' Force generated files that would go into a system tree (as defined - by ‘SYSTEXMF’) into ‘TEXMFVAR’. Starting with teTeX-3.0, the - variable ‘TEXMFVAR’ is always set. The ‘varfonts’ feature takes + by 'SYSTEXMF') into 'TEXMFVAR'. Starting with teTeX-3.0, the + variable 'TEXMFVAR' is always set. The 'varfonts' feature takes precedence if also set. - The ‘texmfvar’ setting in ‘MT_FEATURES’ is overridden by the - ‘USE_TEXMFVAR’ environment variable: if set to ‘1’, the feature is - enabled, and if set to ‘0’, the feature is disabled. + The 'texmfvar' setting in 'MT_FEATURES' is overridden by the + 'USE_TEXMFVAR' environment variable: if set to '1', the feature is + enabled, and if set to '0', the feature is disabled. File: kpathsea.info, Node: mktex script names, Next: mktex script arguments, Prev: mktex configuration, Up: mktex scripts -6.5.2 ‘mktex’ script names +6.5.2 'mktex' script names -------------------------- The following table shows the default name of the script for each of the file types which support runtime generation. -‘mktexfmt’ - (‘.fmt’, ‘.base’, ‘.mem’) TeX/Metafont/MetaPost formats. This - script is also named ‘fmtutil’, and reads ‘fmtutil.cnf’ for +'mktexfmt' + ('.fmt', '.base', '.mem') TeX/Metafont/MetaPost formats. This + script is also named 'fmtutil', and reads 'fmtutil.cnf' for configuration information. -‘mktexmf’ - (‘.mf’) Metafont input files. +'mktexmf' + ('.mf') Metafont input files. -‘mkocp’ - (‘.ocp’) Omega compiled process files. +'mkocp' + ('.ocp') Omega compiled process files. -‘mkofm’ - (‘.ofm’) Omega font metric files. +'mkofm' + ('.ofm') Omega font metric files. -‘mktexpk’ - (‘pk’) Glyph fonts. +'mktexpk' + ('pk') Glyph fonts. -‘mktextex’ - (‘.tex’) TeX input files (disabled by default). +'mktextex' + ('.tex') TeX input files (disabled by default). -‘mktextfm’ - (‘.tfm’) TFM files. +'mktextfm' + ('.tfm') TFM files. These names can be overridden by an environment variable specific to the -program—for example, ‘DVIPSMAKEPK’ for Dvipsk. +program--for example, 'DVIPSMAKEPK' for Dvipsk. - If a ‘mktex...’ script fails, the invocation is appended to a file -‘missfont.log’ (by default) in the current directory. You can then + If a 'mktex...' script fails, the invocation is appended to a file +'missfont.log' (by default) in the current directory. You can then execute the log file to create the missing files after fixing the problem. If the current directory is not writable and the environment variable -or configuration file value ‘TEXMFOUTPUT’ is set, its value is used. -Otherwise, nothing is written. The name ‘missfont.log’ is overridden by -the ‘MISSFONT_LOG’ environment variable or configuration file value. +or configuration file value 'TEXMFOUTPUT' is set, its value is used. +Otherwise, nothing is written. The name 'missfont.log' is overridden by +the 'MISSFONT_LOG' environment variable or configuration file value. File: kpathsea.info, Node: mktex script arguments, Prev: mktex script names, Up: mktex scripts -6.5.3 ‘mktex’ script arguments +6.5.3 'mktex' script arguments ------------------------------ -The first argument to a ‘mktex’ script is always the name of the file to +The first argument to a 'mktex' script is always the name of the file to be created. - In the default ‘mktexpk’ implementation, additional arguments may + In the default 'mktexpk' implementation, additional arguments may also be passed: -‘--dpi NUM’ +'--dpi NUM' Sets the resolution of the generated font to NUM. -‘--mfmode NAME’ +'--mfmode NAME' Sets the Metafont mode to NAME. -‘--bdpi NUM’ - Sets the “base dpi†for the font. This must match the mode being +'--bdpi NUM' + Sets the "base dpi" for the font. This must match the mode being used. -‘--mag STRING’ - A “magstep†string suitable for the Metafont ‘mag’ variable. This +'--mag STRING' + A "magstep" string suitable for the Metafont 'mag' variable. This must match the combination of BDPI and DPI being used. -‘--destdir STRING’ +'--destdir STRING' A directory name. If the directory is absolute, it is used as-is. Otherwise, it is appended to the root destination directory set in the script. @@ -2364,34 +2364,34 @@ translation. When looking at these program sources, you should know that previous versions of the library had a different programming interface; the current interface supports re-entrancy. Historically, the library -function names were prefixed with ‘kpse_’ instead of ‘kpathsea_’, and +function names were prefixed with 'kpse_' instead of 'kpathsea_', and they did not need an instance variable as first argument. This change was made in 2009. The old functions will never disappear, and can reliably continue to be used when they suffice, as they do for the programs above. The main application using the re-entrant API is the MetaPost library used by MetaPost and LuaTeX. - Beyond these examples, the ‘.h’ files in the Kpathsea source describe -the interfaces and functionality (and of course the ‘.c’ files define + Beyond these examples, the '.h' files in the Kpathsea source describe +the interfaces and functionality (and of course the '.c' files define the actual routines, which are the ultimate documentation). -‘pathsearch.h’ declares the basic searching routine. ‘tex-file.h’ and -‘tex-glyph.h’ define the interfaces for looking up particular kinds of +'pathsearch.h' declares the basic searching routine. 'tex-file.h' and +'tex-glyph.h' define the interfaces for looking up particular kinds of files. In view of the way the headers depend on each other, it is -recommended to use ‘#include <kpathsea/kpathsea.h>’, which includes +recommended to use '#include <kpathsea/kpathsea.h>', which includes every Kpathsea header. If you want to include only specific headers, you should still -consider including ‘kpathsea/config.h’ before including any other +consider including 'kpathsea/config.h' before including any other Kpathsea header, as it provides symbols used in the other headers. Note -that ‘kpathsea/config.h’ includes ‘kpathsea/c-auto.h’, which is +that 'kpathsea/config.h' includes 'kpathsea/c-auto.h', which is generated by Autoconf. The library provides no way for an external program to register new -file types: ‘tex-file.[ch]’ must be modified to do this. For example, +file types: 'tex-file.[ch]' must be modified to do this. For example, Kpathsea has support for looking up Dvips config files, even though no program other than Dvips will likely ever want to do so. I felt this was acceptable, since along with new file types should also come new -defaults in ‘texmf.cnf’ (and its descendant ‘paths.h’), since it’s +defaults in 'texmf.cnf' (and its descendant 'paths.h'), since it's simplest for users if they can modify one configuration file for all kinds of paths. @@ -2409,51 +2409,51 @@ File: kpathsea.info, Node: Calling sequence, Next: Program-specific files, Pr The typical way to use Kpathsea in your program goes something like this: - 1. Call ‘kpathsea_new’ to create a new library instance. This + 1. Call 'kpathsea_new' to create a new library instance. This variable must be passed as the first argument to all the following - library functions. The rest of this manual will be using ‘kpse’ as + library functions. The rest of this manual will be using 'kpse' as a placeholder for the name of this variable. - 2. Call ‘kpathsea_set_program_name’ with ‘argv[0]’ as the second - argument; the third argument is a string or ‘NULL’. The third - argument is used by Kpathsea as the program name for the ‘.PROGRAM’ + 2. Call 'kpathsea_set_program_name' with 'argv[0]' as the second + argument; the third argument is a string or 'NULL'. The third + argument is used by Kpathsea as the program name for the '.PROGRAM' feature of config files (*note Config files::). If the third - argument is ‘NULL’, the value of the second argument is used. This + argument is 'NULL', the value of the second argument is used. This function must be called before any other use of the Kpathsea library. - ‘kpathsea_set_program_name’ always sets the variables - ‘kpse->invocation_name’ and ‘kpse->invocation_short_name’. These + 'kpathsea_set_program_name' always sets the variables + 'kpse->invocation_name' and 'kpse->invocation_short_name'. These variables are used in the error message macros defined in - ‘kpathsea/lib.h’. It sets the variable ‘kpse->program_name’ to the + 'kpathsea/lib.h'. It sets the variable 'kpse->program_name' to the program name it uses. It also initializes debugging options based on the environment - variable ‘KPATHSEA_DEBUG’ (if that is set). + variable 'KPATHSEA_DEBUG' (if that is set). - Finally, it sets the environment variables ‘SELFAUTOLOC’, - ‘SELFAUTODIR’ and ‘SELFAUTOPARENT’ to the location, parent and - grandparent directory of the executable, removing ‘.’ and ‘..’ path + Finally, it sets the environment variables 'SELFAUTOLOC', + 'SELFAUTODIR' and 'SELFAUTOPARENT' to the location, parent and + grandparent directory of the executable, removing '.' and '..' path elements and resolving symbolic links. These are used in the default configuration file to allow people to invoke TeX from - anywhere. You can use ‘kpsewhich --expand-var=\$SELFAUTOLOC’, + anywhere. You can use 'kpsewhich --expand-var=\$SELFAUTOLOC', etc., to see the values. - 3. Set debugging options. *Note Debugging::. If your program doesn’t + 3. Set debugging options. *Note Debugging::. If your program doesn't have a debugging option already, you can define one and set - ‘kpse->debug’ to the number that the user supplies (as in Dviljk + 'kpse->debug' to the number that the user supplies (as in Dviljk and Web2c), or you can just omit this altogether (people can always - set ‘KPATHSEA_DEBUG’). If you do have runtime debugging already, - you need to merge Kpathsea’s options with yours (as in Dvipsk and + set 'KPATHSEA_DEBUG'). If you do have runtime debugging already, + you need to merge Kpathsea's options with yours (as in Dvipsk and Xdvik). 4. If your program has its own configuration files that can define - search paths, you should assign those paths to the ‘client_path’ - member in the appropriate element of the ‘kpse->format_info’ array. - (This array is indexed by file type; see ‘tex-file.h’.) See - ‘resident.c’ in Dvipsk for an example. + search paths, you should assign those paths to the 'client_path' + member in the appropriate element of the 'kpse->format_info' array. + (This array is indexed by file type; see 'tex-file.h'.) See + 'resident.c' in Dvipsk for an example. - 5. Call ‘kpathsea_init_prog’ (see ‘proginit.c’). It’s useful for the + 5. Call 'kpathsea_init_prog' (see 'proginit.c'). It's useful for the DVI drivers, at least, but for other programs it may be simpler to extract the parts of it that actually apply. This does not initialize any paths, it just looks for (and sets) certain @@ -2463,61 +2463,61 @@ this: BibTeX search paths in a DVI driver.) 6. The routine to actually find a file of type FORMAT is - ‘kpathsea_find_file’. You can call ‘kpathsea_find_file’ after + 'kpathsea_find_file'. You can call 'kpathsea_find_file' after doing only the first and second of the initialization steps - above—Kpathsea automatically reads the ‘texmf.cnf’ generic config + above--Kpathsea automatically reads the 'texmf.cnf' generic config files, looks for environment variables, and does expansions at the first lookup. 7. To find PK and/or GF bitmap fonts, the routine is - ‘kpathsea_find_glyph’, defined in ‘tex-glyph.h’. This returns a + 'kpathsea_find_glyph', defined in 'tex-glyph.h'. This returns a structure in addition to the resultant filename, because fonts can be found in so many ways. See the documentation in the source. 8. To actually open a file, not just return a filename, call - ‘kpathsea_open_file’. This function takes the name to look up and - a Kpathsea file format as arguments, and returns the usual ‘FILE - *’. It always assumes the file must exist, and thus will search - the disk if necessary (unless the search path specified ‘!!’, + 'kpathsea_open_file'. This function takes the name to look up and + a Kpathsea file format as arguments, and returns the usual 'FILE + *'. It always assumes the file must exist, and thus will search + the disk if necessary (unless the search path specified '!!', etc.). In other words, if you are looking up a VF or some other - file that need not exist, don’t use this. + file that need not exist, don't use this. - 9. TeX can write output files, via the ‘\openout’ primitive; this + 9. TeX can write output files, via the '\openout' primitive; this opens a security hole vulnerable to Trojan horse attack: an unwitting user could run a TeX program that overwrites, say, - ‘~/.rhosts’. Analogous security holes exist for many other + '~/.rhosts'. Analogous security holes exist for many other programs. To alleviate this, there is a configuration variable - ‘openout_any’, which selects one of three levels of security. When - it is set to ‘a’ (for “anyâ€), no restrictions are imposed. When it - is set to ‘r’ (for “restrictedâ€), filenames beginning with ‘.’ are - disallowed (except ‘.tex’ because LaTeX needs it). When it is set - to ‘p’ (for “paranoidâ€) additional restrictions are imposed: an + 'openout_any', which selects one of three levels of security. When + it is set to 'a' (for "any"), no restrictions are imposed. When it + is set to 'r' (for "restricted"), filenames beginning with '.' are + disallowed (except '.tex' because LaTeX needs it). When it is set + to 'p' (for "paranoid") additional restrictions are imposed: an absolute filename must refer to a file in (a subdirectory) of - ‘TEXMFOUTPUT’, and any attempt to go up a directory level is - forbidden (that is, paths may not contain a ‘..’ component). The - paranoid setting is the default. (For backwards compatibility, ‘y’ - and ‘1’ are synonyms of ‘a’, while ‘n’ and ‘0’ are synonyms for - ‘r’.) The function ‘kpathsea_out_name_ok’, with a filename as - second argument, returns ‘true’ if that filename is acceptable to - be opend for output or ‘false’ otherwise. - - 10. Similarly, the function ‘kpathsea_in_name_ok’, with a filename as - second argument, returns ‘true’ if that filename is acceptable to - be opend for input or ‘false’ otherwise, depending on the value of - the configuration variable ‘openin_any’ (with ‘a’ as default). + 'TEXMFOUTPUT', and any attempt to go up a directory level is + forbidden (that is, paths may not contain a '..' component). The + paranoid setting is the default. (For backwards compatibility, 'y' + and '1' are synonyms of 'a', while 'n' and '0' are synonyms for + 'r'.) The function 'kpathsea_out_name_ok', with a filename as + second argument, returns 'true' if that filename is acceptable to + be opend for output or 'false' otherwise. + + 10. Similarly, the function 'kpathsea_in_name_ok', with a filename as + second argument, returns 'true' if that filename is acceptable to + be opend for input or 'false' otherwise, depending on the value of + the configuration variable 'openin_any' (with 'a' as default). 11. To close the kpathsea library instance you are using, call - ‘kpathsea_finish’. This function closes any open log files and + 'kpathsea_finish'. This function closes any open log files and frees the memory used by the instance. Kpathsea also provides many utility routines. Some are generic: hash tables, memory allocation, string concatenation and copying, string lists, reading input lines of arbitrary length, etc. Others are -filename-related: default path, tilde, and variable expansion, ‘stat’ -calls, etc. (Perhaps someday I’ll move the former to a separate +filename-related: default path, tilde, and variable expansion, 'stat' +calls, etc. (Perhaps someday I'll move the former to a separate library.) - The ‘c-*.h’ header files can also help your program adapt to many + The 'c-*.h' header files can also help your program adapt to many different systems. You will almost certainly want to use Autoconf and probably Automake for configuring and building your software if you use Kpathsea; I strongly recommend using Autoconf and Automake regardless. @@ -2533,17 +2533,17 @@ Many programs will need to find some configuration files. Kpathsea contains some support to make it easy to place them in their own directories. The Standard TeX directory structure (*note Introduction: (tds)Top.), specifies that such files should go into a subdirectory -named after the program, like ‘texmf/ttf2pk’. +named after the program, like 'texmf/ttf2pk'. - Two formats, ‘kpse_program_text_format’ and -‘kpse_program_binary_format’, use ‘.:$TEXMF/PROGRAM//’ as their + Two formats, 'kpse_program_text_format' and +'kpse_program_binary_format', use '.:$TEXMF/PROGRAM//' as their compiled-in search path. To override this default, you can use the -variable ‘PROGRAMINPUTS’ in the environment and/or ‘texmf.cnf’. That is +variable 'PROGRAMINPUTS' in the environment and/or 'texmf.cnf'. That is to say, the name of the variable is constructed by converting the name -of the program to upper case, and appending ‘INPUTS’. +of the program to upper case, and appending 'INPUTS'. The only difference between these two formats is whether -‘kpathsea_open_file’ will open the files it finds in text or binary +'kpathsea_open_file' will open the files it finds in text or binary mode. @@ -2552,30 +2552,30 @@ File: kpathsea.info, Node: Programming with config files, Prev: Program-specif 7.4 Programming with config files ================================= -You can (and probably should) use the same ‘texmf.cnf’ configuration +You can (and probably should) use the same 'texmf.cnf' configuration file that Kpathsea uses for your program. This helps installers by keeping all configuration in one place. To retrieve a value for a configuration variable VAR, the best way is -to call ‘kpathsea_var_value’ on the string ‘VAR’. This will look first +to call 'kpathsea_var_value' on the string 'VAR'. This will look first for an environment variable VAR, then a config file value. The result -will be the value found or ‘NULL’. This function is declared in -‘kpathsea/variable.h’. For an example, see the ‘shell_escape’ code in -‘web2c/lib/texmfmp.c’. +will be the value found or 'NULL'. This function is declared in +'kpathsea/variable.h'. For an example, see the 'shell_escape' code in +'web2c/lib/texmfmp.c'. The routine to do full variable and tilde expansion of an arbitrary string in the context of a search path (as opposed to simply retrieving -a value) is ‘kpathsea_var_expand’, also declared in -‘kpathsea/variable.h’. However, it’s generally only necessary to set +a value) is 'kpathsea_var_expand', also declared in +'kpathsea/variable.h'. However, it's generally only necessary to set the search path structure components as explained in the previous section instead of using this directly. Because of its usage with any -input string, undefined ‘$FOO’ constructs in the argument to -‘kpathsea_var_expand’ are returned literally (‘"$FOO"’), while undefined -‘${FOO}’ constructs are expanded to the empty string. +input string, undefined '$FOO' constructs in the argument to +'kpathsea_var_expand' are returned literally ('"$FOO"'), while undefined +'${FOO}' constructs are expanded to the empty string. If for some reason you want to retrieve a value _only_ from a config file, not automatically looking for a corresponding environment -variable, call ‘kpathsea_cnf_get’ (declared in ‘kpathsea/cnf.h’) with +variable, call 'kpathsea_cnf_get' (declared in 'kpathsea/cnf.h') with the string VAR. No initialization calls are needed. @@ -2607,7 +2607,7 @@ File: kpathsea.info, Node: Bug checklist, Next: Mailing lists, Up: Reporting 8.1 Bug checklist ================= -Before reporting a bug, please check below to be sure it isn’t already +Before reporting a bug, please check below to be sure it isn't already known (*note Common problems::). Bug reports should be sent via electronic mail to <tex-k@tug.org>. @@ -2616,60 +2616,60 @@ known (*note Common problems::). information necessary for reproduction. Therefore, to enable investigation, your report should include the following: - • The version number(s) of the program(s) involved, and of Kpathsea - itself. You can get the former by giving a sole option ‘--version’ - to the program, and the latter by running ‘kpsewhich --version’. - The ‘NEWS’ and ‘ChangeLog’ files also contain the version number. + * The version number(s) of the program(s) involved, and of Kpathsea + itself. You can get the former by giving a sole option '--version' + to the program, and the latter by running 'kpsewhich --version'. + The 'NEWS' and 'ChangeLog' files also contain the version number. - • The hardware, operating system (including version), compiler, and - ‘make’ program you are using (the output of ‘uname -a’ is a start + * The hardware, operating system (including version), compiler, and + 'make' program you are using (the output of 'uname -a' is a start on the first two, though incomplete). - • Any options you gave to ‘configure’. This is recorded in the - ‘config.status’ files. + * Any options you gave to 'configure'. This is recorded in the + 'config.status' files. - If you are reporting a bug in ‘configure’ itself, it’s probably + If you are reporting a bug in 'configure' itself, it's probably system-dependent, and it will be unlikely the maintainers can do anything useful if you merely report that thus-and-such is broken. Therefore, you need to do some additional work: for some bugs, you - can look in the file ‘config.log’ where the test that failed should + can look in the file 'config.log' where the test that failed should appear, along with the compiler invocation and source program in question. You can then compile it yourself by hand, and discover - why the test failed. Other ‘configure’ bugs do not involve the + why the test failed. Other 'configure' bugs do not involve the compiler; in that case, the only recourse is to inspect the - ‘configure’ shell script itself, or the Autoconf macros that - generated ‘configure’. + 'configure' shell script itself, or the Autoconf macros that + generated 'configure'. - • The log of all debugging output, if the bug is in path searching. + * The log of all debugging output, if the bug is in path searching. You can get this by setting the environment variable - ‘KPATHSEA_DEBUG’ to ‘-1’ before running the program. Please look + 'KPATHSEA_DEBUG' to '-1' before running the program. Please look at the log yourself to make sure the behavior is really a bug - before reporting it; perhaps “old†environment variable settings + before reporting it; perhaps "old" environment variable settings are causing files not to be found, for example. - • The contents of any input files necessary to reproduce the bug. + * The contents of any input files necessary to reproduce the bug. For bugs in DVI-reading programs, for example, this generally means - a DVI file (and any EPS or other files it uses)—TeX source files - are helpful, but the DVI file is required, because that’s the + a DVI file (and any EPS or other files it uses)--TeX source files + are helpful, but the DVI file is required, because that's the actual program input. - • If you are sending a patch (do so if you can!), please do so in the - form of a context diff (‘diff -c’) against the original + * If you are sending a patch (do so if you can!), please do so in the + form of a context diff ('diff -c') against the original distribution source. Any other form of diff is either not as complete or harder for me to understand. Please also include a - ‘ChangeLog’ entry. + 'ChangeLog' entry. - • If the bug involved is an actual crash (i.e., core dump), it is + * If the bug involved is an actual crash (i.e., core dump), it is easy and useful to include a stack trace from a debugger (I recommend the GNU debugger GDB (<https://gnu.org/software/gdb>). - If the cause is apparent (a ‘NULL’ value being dereferenced, for + If the cause is apparent (a 'NULL' value being dereferenced, for example), please send the details along. If the program involved is TeX or Metafont, and the crash is happening at apparently-sound code, however, the bug may well be in the compiler, rather than in the program or the library (*note TeX or Metafont failing: TeX or Metafont failing.). - • Any additional information that will be helpful in reproducing, + * Any additional information that will be helpful in reproducing, diagnosing, or fixing the bug. @@ -2699,22 +2699,22 @@ File: kpathsea.info, Node: Debugging, Next: Logging, Prev: Mailing lists, Up Kpathsea provides a number of runtime debugging options, detailed below by their names and corresponding numeric values. When the files you -expect aren’t being found, the thing to do is enable these options and +expect aren't being found, the thing to do is enable these options and examine the output. - You can set these with some runtime argument (e.g., ‘-d’) to the + You can set these with some runtime argument (e.g., '-d') to the program; in that case, you should use the numeric values described in -the program’s documentation (which, for Dvipsk and Xdvik, are different -than those below). It’s best to give the ‘-d’ (or whatever) option +the program's documentation (which, for Dvipsk and Xdvik, are different +than those below). It's best to give the '-d' (or whatever) option first, for maximal output. Dvipsk and Xdvik have additional program-specific debugging options as well. - You can also set the environment variable ‘KPATHSEA_DEBUG’; in this + You can also set the environment variable 'KPATHSEA_DEBUG'; in this case, you should use the numbers below. If you run the program under a -debugger and set the instance variable ‘kpse->debug’, also use the +debugger and set the instance variable 'kpse->debug', also use the numbers below. - In any case, by far the simplest value to use is ‘-1’, which will + In any case, by far the simplest value to use is '-1', which will turn on all debugging output. This is usually better than guessing which particular values will yield the output you need. @@ -2726,81 +2726,81 @@ it easily. For example, in Bourne-compatible shells: (*note Invoking kpsewhich::), instead of the original program. In any case, you cannot use the names below; you must always use -somebody’s numbers. (Sorry.) To set more than one option, just sum the +somebody's numbers. (Sorry.) To set more than one option, just sum the corresponding numbers. -‘KPSE_DEBUG_STAT (1)’ - Report ‘stat’(2) calls. This is useful for verifying that your +'KPSE_DEBUG_STAT (1)' + Report 'stat'(2) calls. This is useful for verifying that your directory structure is not forcing Kpathsea to do many additional file tests (*note Slow path searching::, and *note Subdirectory - expansion::). If you are using an up-to-date ‘ls-R’ database + expansion::). If you are using an up-to-date 'ls-R' database (*note Filename database::), this should produce no output unless a nonexistent file that must exist is searched for. -‘KPSE_DEBUG_HASH (2)’ - Report lookups in all hash tables: ‘ls-R’ and ‘aliases’ (*note +'KPSE_DEBUG_HASH (2)' + Report lookups in all hash tables: 'ls-R' and 'aliases' (*note Filename database::); font aliases (*note Fontmap::); and config file values (*note Config files::). Useful when expected values are not being found, e.g.., file searches are looking at the disk - instead of using ‘ls-R’. + instead of using 'ls-R'. -‘KPSE_DEBUG_FOPEN (4)’ +'KPSE_DEBUG_FOPEN (4)' Report file openings and closings. Especially useful when your - system’s file table is full, for seeing which files have been + system's file table is full, for seeing which files have been opened but never closed. In case you want to set breakpoints in a - debugger: this works by redefining ‘fopen’ (‘fclose’) to be - ‘kpse_fopen_trace’ (‘kpse_fclose_trace’). + debugger: this works by redefining 'fopen' ('fclose') to be + 'kpse_fopen_trace' ('kpse_fclose_trace'). -‘KPSE_DEBUG_PATHS (8)’ +'KPSE_DEBUG_PATHS (8)' Report general path information for each file type Kpathsea is asked to search. This is useful when you are trying to track down - how a particular path got defined—from ‘texmf.cnf’, ‘config.ps’, an - environment variable, the compile-time default, etc. This is the - contents of the ‘kpse_format_info_type’ structure defined in - ‘tex-file.h’. + how a particular path got defined--from 'texmf.cnf', 'config.ps', + an environment variable, the compile-time default, etc. This is + the contents of the 'kpse_format_info_type' structure defined in + 'tex-file.h'. -‘KPSE_DEBUG_EXPAND (16)’ +'KPSE_DEBUG_EXPAND (16)' Report the directory list corresponding to each path element Kpathsea searches. This is only relevant when Kpathsea searches - the disk, since ‘ls-R’ searches don’t look through directory lists + the disk, since 'ls-R' searches don't look through directory lists in this way. -‘KPSE_DEBUG_SEARCH (32)’ +'KPSE_DEBUG_SEARCH (32)' Report on each file search: the name of the file searched for, the path searched in, whether or not the file must exist (when drivers - search for ‘cmr10.vf’, it need not exist), and whether or not we + search for 'cmr10.vf', it need not exist), and whether or not we are collecting all occurrences of the file in the path (as with, - e.g., ‘texmf.cnf’ and ‘texfonts.map’), or just the first (as with + e.g., 'texmf.cnf' and 'texfonts.map'), or just the first (as with most lookups). This can help you correlate what Kpathsea is doing with what is in your input file. -‘KPSE_DEBUG_VARS (64)’ +'KPSE_DEBUG_VARS (64)' Report the value of each variable Kpathsea looks up. This is useful for verifying that variables do indeed obtain their correct values. -‘GSFTOPK_DEBUG (128)’ - Activates debugging printout specific to ‘gsftopk’ program. +'GSFTOPK_DEBUG (128)' + Activates debugging printout specific to 'gsftopk' program. -‘MAKETEX_DEBUG (512)’ - If you use the optional ‘mktex’ programs instead of the traditional +'MAKETEX_DEBUG (512)' + If you use the optional 'mktex' programs instead of the traditional shell scripts, this will report the name of the site file - (‘mktex.cnf’ by default) which is read, directories created by - ‘mktexdir’, the full path of the ‘ls-R’ database built by - ‘mktexlsr’, font map searches, ‘MT_FEATURES’ in effect, parameters - from ‘mktexnam’, filenames added by ‘mktexupd’, and some subsidiary + ('mktex.cnf' by default) which is read, directories created by + 'mktexdir', the full path of the 'ls-R' database built by + 'mktexlsr', font map searches, 'MT_FEATURES' in effect, parameters + from 'mktexnam', filenames added by 'mktexupd', and some subsidiary commands run by the programs. -‘MAKETEX_FINE_DEBUG (1024)’ - When the optional ‘mktex’ programs are used, this will print +'MAKETEX_FINE_DEBUG (1024)' + When the optional 'mktex' programs are used, this will print additional debugging info from functions internal to these programs. Debugging output from Kpathsea is always written to standard error, -and begins with the string ‘kdebug:’. (Except for hash table buckets, +and begins with the string 'kdebug:'. (Except for hash table buckets, which just start with the number, but you can only get that output -running under a debugger. See comments at the ‘hash_summary_only’ -variable in ‘kpathsea/db.c’.) +running under a debugger. See comments at the 'hash_summary_only' +variable in 'kpathsea/db.c'.) File: kpathsea.info, Node: Logging, Next: Common problems, Prev: Debugging, Up: Reporting bugs @@ -2813,18 +2813,18 @@ search. This may be useful in finding good candidates for deletion when your filesystem is full, or in discovering usage patterns at your site. To do this, define the environment or config file variable -‘TEXMFLOG’. The value is the name of the file to append the information -to. The file is created if it doesn’t exist, and appended to if it +'TEXMFLOG'. The value is the name of the file to append the information +to. The file is created if it doesn't exist, and appended to if it does. Each successful search turns into one line in the log file: two words separated by a space. The first word is the time of the search, as the -integer number of seconds since “the epochâ€, i.e., UTC midnight 1 -January 1970 (more precisely, the result of the ‘time’ system call). +integer number of seconds since "the epoch", i.e., UTC midnight 1 +January 1970 (more precisely, the result of the 'time' system call). The second word is the filename. - For example, after ‘setenv TEXMFLOG /tmp/log’, running Dvips on -‘story.dvi’ appends the following lines: + For example, after 'setenv TEXMFLOG /tmp/log', running Dvips on +'story.dvi' appends the following lines: 774455887 /usr/local/share/texmf/dvips/config.ps 774455887 /usr/local/share/texmf/dvips/psfonts.map @@ -2837,13 +2837,13 @@ The second word is the filename. Only filenames that are absolute are recorded, to preserve some semblance of privacy. - In addition to this Kpathsea-specific logging, ‘pdftex’ provides an -option ‘-recorder’ to write the names of all files accessed during a run -to the file ‘BASEFILE.fls’. + In addition to this Kpathsea-specific logging, 'pdftex' provides an +option '-recorder' to write the names of all files accessed during a run +to the file 'BASEFILE.fls'. Finally, most systems provide a general tool to output each system call, thus including opening and closing files. It might be named -‘strace’, ‘truss’, ‘struss’, or something else. +'strace', 'truss', 'struss', or something else. File: kpathsea.info, Node: Common problems, Prev: Logging, Up: Reporting bugs @@ -2856,7 +2856,7 @@ execution, ... * Menu: -* Unable to find files:: If your program can’t find fonts (or whatever). +* Unable to find files:: If your program can't find fonts (or whatever). * Slow path searching:: If it takes forever to find anything. * Unable to generate fonts:: If mktexpk fails. * TeX or Metafont failing:: Likely compiler bugs. @@ -2871,21 +2871,21 @@ If a program complains it cannot find fonts (or other input files), any of several things might be wrong. In any case, you may find the debugging options helpful. *Note Debugging::. - • Perhaps you simply haven’t installed all the necessary files; the + * Perhaps you simply haven't installed all the necessary files; the basic fonts and input files are distributed separately from the programs. *Note unixtex.ftp::. - • You have (perhaps unknowingly) told Kpathsea to use search paths - that don’t reflect where the files actually are. One common cause + * You have (perhaps unknowingly) told Kpathsea to use search paths + that don't reflect where the files actually are. One common cause is having environment variables set from a previous installation, - thus overriding what you carefully set in ‘texmf.cnf’ (*note - Supported file formats::). System ‘/etc/profile’ or other files + thus overriding what you carefully set in 'texmf.cnf' (*note + Supported file formats::). System '/etc/profile' or other files such may be the culprit. - • Your files reside in a directory that is only pointed to via a - symbolic link, in a leaf directory and is not listed in ‘ls-R’. + * Your files reside in a directory that is only pointed to via a + symbolic link, in a leaf directory and is not listed in 'ls-R'. - Unfortunately, Kpathsea’s subdirectory searching has an + Unfortunately, Kpathsea's subdirectory searching has an irremediable deficiency: If a directory D being searched for subdirectories contains plain files and symbolic links to other directories, but no true subdirectories, D will be considered a @@ -2896,21 +2896,21 @@ debugging options helpful. *Note Debugging::. subdirectory in D. Then D will no longer be a leaf, and the symlinks will be followed. - The directory immediately followed by the ‘//’ in the path + The directory immediately followed by the '//' in the path specification, however, is always searched for subdirectories, even if it is a leaf. Presumably you would not have asked for the - directory to be searched for subdirectories if you didn’t want it + directory to be searched for subdirectories if you didn't want it to be. - • If the fonts (or whatever) don’t already exist, ‘mktexpk’ (or - ‘mktexmf’ or ‘mktextfm’) will try to create them. If these rather - complicated shell scripts fail, you’ll eventually get an error - message saying something like ‘Can't find font FONTNAME’. The best - solution is to fix (or at least report) the bug in ‘mktexpk’; the + * If the fonts (or whatever) don't already exist, 'mktexpk' (or + 'mktexmf' or 'mktextfm') will try to create them. If these rather + complicated shell scripts fail, you'll eventually get an error + message saying something like 'Can't find font FONTNAME'. The best + solution is to fix (or at least report) the bug in 'mktexpk'; the workaround is to generate the necessary fonts by hand with Metafont, or to grab them from a CTAN site (*note unixtex.ftp::). - • There is a bug in the library. *Note Reporting bugs::. + * There is a bug in the library. *Note Reporting bugs::. File: kpathsea.info, Node: Slow path searching, Next: Unable to generate fonts, Prev: Unable to find files, Up: Common problems @@ -2922,20 +2922,20 @@ If your program takes an excessively long time to find fonts or other input files, but does eventually succeed, here are some possible culprits: - • Most likely, you just have a lot of directories to search, and that + * Most likely, you just have a lot of directories to search, and that takes a noticeable time. The solution is to create and maintain a - separate ‘ls-R’ file that lists all the files in your main TeX - hierarchy. *Note Filename database::. Kpathsea always uses ‘ls-R’ - if it’s present; there’s no need to recompile or reconfigure any of + separate 'ls-R' file that lists all the files in your main TeX + hierarchy. *Note Filename database::. Kpathsea always uses 'ls-R' + if it's present; there's no need to recompile or reconfigure any of the programs. - • Your recursively-searched directories (e.g., - ‘/usr/local/share/texmf/fonts//’), contain a mixture of files and + * Your recursively-searched directories (e.g., + '/usr/local/share/texmf/fonts//'), contain a mixture of files and directories. This prevents Kpathsea from using a useful optimization (*note Subdirectory expansion::). - It is best to have only directories (and perhaps a ‘README’) in the - upper levels of the directory structure, and it’s very important to + It is best to have only directories (and perhaps a 'README') in the + upper levels of the directory structure, and it's very important to have _only_ files, and no subdirectories, in the leaf directories where the dozens of TFM, PK, or whatever files reside. @@ -2955,17 +2955,17 @@ quality of output. Some DVI-to-whatever programs, such as Dvips, try to generate these on the fly when they are needed, but this generation may fail in several cases. - If ‘mktexpk’ runs, but fails with this error: + If 'mktexpk' runs, but fails with this error: mktexpk: Can't guess mode for NNN dpi devices. mktexpk: Use a config file to specify the mode, or update me. you need to ensure the resolution and mode match; just specifying the -resolution, as in ‘-D 360’, is not enough. +resolution, as in '-D 360', is not enough. - You can specify the mode name with the ‘-mode’ option on the Dvips + You can specify the mode name with the '-mode' option on the Dvips command line, or in a Dvips configuration file (*note (dvips)Config -files::), such as ‘config.ps’ in your document directory, ‘~/.dvipsrc’ +files::), such as 'config.ps' in your document directory, '~/.dvipsrc' in your home directory, or in a system directory (again named -‘config.ps’). (Other drivers use other files, naturally.) +'config.ps'). (Other drivers use other files, naturally.) For example, if you need 360dpi fonts, you could include this in a configuration file: @@ -2973,7 +2973,7 @@ configuration file: M lqmed If Metafont runs, but generates fonts at the wrong resolution or for -the wrong device, most likely ‘mktexpk’’s built-in guess for the mode is +the wrong device, most likely 'mktexpk''s built-in guess for the mode is wrong, and you should override it as above. See <https://ctan.org/pkg/modes> for a list of resolutions and mode @@ -2982,19 +2982,19 @@ names for most devices (additional submissions are welcome). If Metafont runs but generates fonts at a resolution of 2602dpi (and prints out the name of each character as well as just a character number, and maybe tries to display the characters), then your Metafont -base file probably hasn’t been made properly. (It’s using the default -‘proof’ mode, instead of an actual device mode.) To make a proper -‘plain.base’, assuming the local mode definitions are contained in a -file ‘modes.mf’, run the following command (assuming Unix): +base file probably hasn't been made properly. (It's using the default +'proof' mode, instead of an actual device mode.) To make a proper +'plain.base', assuming the local mode definitions are contained in a +file 'modes.mf', run the following command (assuming Unix): inimf "plain; input modes; dump" -Then copy the ‘plain.base’ file from the current directory to where the -base files are stored on your system (‘/usr/local/share/texmf/web2c’ by -default), and make a link (either hard or soft) from ‘plain.base’ to -‘mf.base’ in that directory. *Note (web2c)inimf invocation::. +Then copy the 'plain.base' file from the current directory to where the +base files are stored on your system ('/usr/local/share/texmf/web2c' by +default), and make a link (either hard or soft) from 'plain.base' to +'mf.base' in that directory. *Note (web2c)inimf invocation::. - If ‘mf’ is a command not found at all by ‘mktexpk’, then you need to + If 'mf' is a command not found at all by 'mktexpk', then you need to install Metafont (*note unixtex.ftp::). @@ -3009,9 +3009,9 @@ running a normal input file, the problem is usually a compiler bug passed, problems may lurk. Optimization occasionally causes trouble in programs other than TeX and Metafont themselves, too. - For a workaround, if you enabled any optimization flags, it’s best to + For a workaround, if you enabled any optimization flags, it's best to omit optimization entirely. In any case, the way to find the facts is -to run the program under the debugger and see where it’s failing. +to run the program under the debugger and see where it's failing. Also, if you have trouble with a system C compiler, I advise trying the GNU C compiler. And vice versa, unfortunately; but in that case I @@ -3021,7 +3021,7 @@ also recommend reporting a bug to the GCC mailing list; see *note To report compiler bugs effectively requires perseverance and perspicacity: you must find the miscompiled line, and that usually involves delving backwards in time from the point of error, checking -through TeX’s (or whatever program’s) data structures. Good luck. +through TeX's (or whatever program's) data structures. Good luck. File: kpathsea.info, Node: Index, Prev: Reporting bugs, Up: Top @@ -3508,7 +3508,7 @@ Index (line 27) * KPATHSEA_DEBUG: Calling sequence. (line 28) * KPATHSEA_DEBUG <1>: Debugging. (line 18) -* kpathsea_find_file: File lookup. (line 37) +* kpathsea_find_file: File lookup. (line 38) * kpathsea_find_file <1>: Calling sequence. (line 62) * kpathsea_find_glyph: Glyph lookup. (line 26) * kpathsea_finish: Calling sequence. (line 106) @@ -3614,7 +3614,7 @@ Index * mktexfmt: mktex script names. (line 10) * mktexmf: mktex script names. (line 15) * mktexpk: mktex script names. (line 24) -* mktexpk can’t guess mode: Unable to generate fonts. +* mktexpk can't guess mode: Unable to generate fonts. (line 12) * mktextex: mktex script names. (line 27) * mktextfm: mktex script names. (line 30) @@ -3809,8 +3809,8 @@ Index * TeX file lookup: File lookup. (line 6) * TeX glyph lookup: Glyph lookup. (line 6) * TeX support: TeX support. (line 6) -* TeX Users Group: Introduction. (line 42) -* tex-file.c: File lookup. (line 37) +* TeX Users Group: Introduction. (line 43) +* tex-file.c: File lookup. (line 38) * tex-file.h: Programming overview. (line 26) * tex-glyph.c: Glyph lookup. (line 26) @@ -3966,67 +3966,62 @@ Index Tag Table: -Node: Top1483 -Node: Introduction2266 -Node: History4362 -Node: unixtex.ftp9012 -Node: Security10496 -Node: TeX directory structure13068 -Node: Path searching17243 -Node: Searching overview18201 -Node: Path sources22126 -Node: Config files23400 -Node: Path expansion28458 -Node: Default expansion29429 -Node: Variable expansion31565 -Node: Tilde expansion33036 -Node: Brace expansion34086 -Node: KPSE_DOT expansion35083 -Node: Subdirectory expansion35608 -Node: Casefolding search38063 -Node: Casefolding rationale38840 -Node: Casefolding examples40201 -Node: Filename database45430 -Node: ls-R46444 -Node: Filename aliases50321 -Node: Database format51567 -Node: Invoking kpsewhich52628 -Node: Path searching options53611 -Node: Specially-recognized files63552 -Node: Auxiliary tasks65017 -Node: Standard options68902 -Node: TeX support69270 -Node: Supported file formats70629 -Node: File lookup79384 -Node: Glyph lookup81197 -Node: Basic glyph lookup82345 -Node: Fontmap83257 -Node: Fallback font85871 -Node: Suppressing warnings86807 -Node: mktex scripts87972 -Node: mktex configuration89217 -Node: mktex script names95326 -Node: mktex script arguments96813 -Node: Programming97736 -Node: Programming overview98309 -Node: Calling sequence101228 -Node: Program-specific files108028 -Node: Programming with config files109083 -Node: Reporting bugs110732 -Node: Bug checklist111410 -Node: Mailing lists114978 -Node: Debugging115655 -Node: Logging120925 -Node: Common problems122838 -Node: Unable to find files123317 -Node: Slow path searching125785 -Node: Unable to generate fonts127186 -Node: TeX or Metafont failing129728 -Node: Index130938 +Node: Top1480 +Node: Introduction2263 +Node: History4333 +Node: unixtex.ftp8929 +Node: Security10399 +Node: TeX directory structure12903 +Node: Path searching16942 +Node: Searching overview17900 +Node: Path sources21719 +Node: Config files22945 +Node: Path expansion27817 +Node: Default expansion28770 +Node: Variable expansion30840 +Node: Tilde expansion32241 +Node: Brace expansion33221 +Node: KPSE_DOT expansion34160 +Node: Subdirectory expansion34673 +Node: Casefolding search37021 +Node: Casefolding rationale37790 +Node: Casefolding examples39136 +Node: Filename database44182 +Node: ls-R45164 +Node: Filename aliases48840 +Node: Database format50018 +Node: Invoking kpsewhich51031 +Node: Path searching options51986 +Node: Specially-recognized files61589 +Node: Auxiliary tasks62944 +Node: Standard options66669 +Node: TeX support67025 +Node: Supported file formats68379 +Node: File lookup76198 +Node: Glyph lookup77947 +Node: Basic glyph lookup79071 +Node: Fontmap79951 +Node: Fallback font82461 +Node: Suppressing warnings83373 +Node: mktex scripts84500 +Node: mktex configuration85715 +Node: mktex script names91518 +Node: mktex script arguments92904 +Node: Programming93783 +Node: Programming overview94356 +Node: Calling sequence97217 +Node: Program-specific files103746 +Node: Programming with config files104769 +Node: Reporting bugs106356 +Node: Bug checklist107034 +Node: Mailing lists110503 +Node: Debugging111180 +Node: Logging116257 +Node: Common problems118124 +Node: Unable to find files118601 +Node: Slow path searching121011 +Node: Unable to generate fonts122386 +Node: TeX or Metafont failing124858 +Node: Index126060 End Tag Table - - -Local Variables: -coding: utf-8 -End: diff --git a/source/texk/kpathsea/doc/kpathsea.texi b/source/texk/kpathsea/doc/kpathsea.texi index ffbc12043ca89051e486f07683b3d74eec877ebf..ce95244b31a5bc98dd12183ce649c9757e2002d3 100644 --- a/source/texk/kpathsea/doc/kpathsea.texi +++ b/source/texk/kpathsea/doc/kpathsea.texi @@ -2,13 +2,13 @@ @setfilename kpathsea.info @settitle Kpathsea: A library for path searching -@set version 6.3.4 -@set month-year December 2022 +@set version 6.3.5 +@set month-year February 2023 @copying This file documents the Kpathsea library for path searching. -Copyright @copyright{} 1996--2022 Karl Berry & Olaf Weber. +Copyright @copyright{} 1996--2023 Karl Berry & Olaf Weber. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are diff --git a/source/texk/kpathsea/kpsewhich.c b/source/texk/kpathsea/kpsewhich.c index 63a7232245675481dd1e15eaa0a41f6556fd2355..32f83b00af76ae0eafb7069b373a0a9ef795ff04 100644 --- a/source/texk/kpathsea/kpsewhich.c +++ b/source/texk/kpathsea/kpsewhich.c @@ -1,7 +1,7 @@ /* kpsewhich -- standalone path lookup and variable expansion for Kpathsea. Ideas from Thomas Esser, Pierre MacKay, and many others. - Copyright 1995-2022 Karl Berry & Olaf Weber. + Copyright 1995-2023 Karl Berry & Olaf Weber. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -736,7 +736,7 @@ read_command_line (kpathsea kpse, int argc, string *argv) } else if (ARGUMENT_IS ("version")) { puts (kpathsea_version_string); - puts ("Copyright 2022 Karl Berry & Olaf Weber.\n\ + puts ("Copyright 2023 Karl Berry & Olaf Weber.\n\ License LGPLv2.1+: GNU Lesser GPL version 2.1 or later <https://gnu.org/licenses/lgpl.html>\n\ This is free software: you are free to change and redistribute it.\n\ There is NO WARRANTY, to the extent permitted by law.\n"); diff --git a/source/texk/kpathsea/texmf.cnf b/source/texk/kpathsea/texmf.cnf index 8cc17505443c1ef7652fc98abd79bd4f4bc8ba97..0927bed4688fb18b07cd370c155e44aed4fa9e57 100644 --- a/source/texk/kpathsea/texmf.cnf +++ b/source/texk/kpathsea/texmf.cnf @@ -4,8 +4,8 @@ % If you modify this original file, YOUR CHANGES WILL BE LOST when it is % updated. Instead, put your changes -- and only your changes, not an % entire copy! -- in ../../texmf.cnf. That is, if this file is -% installed in /some/path/to/texlive/2022/texmf-dist/web2c/texmf.cnf, -% put your custom settings in /some/path/to/texlive/2022/texmf.cnf. +% installed in /some/path/to/texlive/2023/texmf-dist/web2c/texmf.cnf, +% put your custom settings in /some/path/to/texlive/2023/texmf.cnf. % (Below, we use YYYY in place of the specific year.) % % What follows is a super-summary of what this .cnf file can @@ -84,10 +84,10 @@ TEXMFSYSCONFIG = $TEXMFROOT/texmf-config TEXMFHOME = ~/texmf % TEXMFVAR, where texconfig/updmap/fmtutil store cached runtime data. -TEXMFVAR = ~/.texlive2022/texmf-var +TEXMFVAR = ~/.texlive2023/texmf-var % TEXMFCONFIG, where texconfig/updmap/fmtutil store configuration data. -TEXMFCONFIG = ~/.texlive2022/texmf-config +TEXMFCONFIG = ~/.texlive2023/texmf-config % This is the value manipulated by tlmgr's auxtrees subcommand in the % root texmf.cnf. Kpathsea warns about a literally empty string for a @@ -372,6 +372,10 @@ BSTINPUTS.pbibtex = $TEXMFDOTDIR;$TEXMF/{pbibtex,bibtex}/bst// BIBINPUTS.upbibtex = $TEXMFDOTDIR;$TEXMF/{upbibtex,pbibtex,bibtex}/bib// BSTINPUTS.upbibtex = $TEXMFDOTDIR;$TEXMF/{upbibtex,pbibtex,bibtex}/bst// +% BibTeXu bibliographies and style files. +BIBINPUTS.bibtexu = $TEXMFDOTDIR;$TEXMF/{bibtexu,upbibtex,pbibtex,bibtex}/bib// +BSTINPUTS.bibtexu = $TEXMFDOTDIR;$TEXMF/{bibtexu,upbibtex,pbibtex,bibtex}/bst// + % .ris and .bltxml bibliography formats. RISINPUTS = $TEXMFDOTDIR;$TEXMF/biber/ris// BLTXMLINPUTS = $TEXMFDOTDIR;$TEXMF/biber/bltxml// diff --git a/source/texk/kpathsea/version.ac b/source/texk/kpathsea/version.ac index 81093903fb0a748d88fb74e06919a54eda786bd0..ada0b816dbbcff6f706e23260714728823b6b72b 100644 --- a/source/texk/kpathsea/version.ac +++ b/source/texk/kpathsea/version.ac @@ -1,5 +1,5 @@ -dnl $Id: version.ac 62887 2022-04-03 17:27:53Z karl $ -dnl Copyright 2016-2022 Karl Berry <tex-live@tug.org> +dnl $Id: version.ac 65770 2023-02-09 21:26:50Z karl $ +dnl Copyright 2016-2023 Karl Berry <tex-live@tug.org> dnl Copyright 2011-2015 Peter Breitenlohner <tex-live@tug.org> dnl dnl This file is free software; the copyright holder @@ -20,4 +20,4 @@ dnl append "dev", to distinguish binaries built between releases. dnl -------------------------------------------------------- dnl dnl This file is m4-included from configure.ac. -m4_define([kpse_version], [6.3.5/dev]) +m4_define([kpse_version], [6.3.5]) diff --git a/source/texk/texlive/configure b/source/texk/texlive/configure index 7f01885b930aa88e3c0db4bfaf710748ae83c95d..dcc0864da604e3dcb25b9c784829ced63eb10e55 100755 --- a/source/texk/texlive/configure +++ b/source/texk/texlive/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for TeX Live Scripts 2023/dev. +# Generated by GNU Autoconf 2.71 for TeX Live Scripts 2023. # # Report bugs to <tex-k@tug.org>. # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='TeX Live Scripts' PACKAGE_TARNAME='tex-live-scripts' -PACKAGE_VERSION='2023/dev' -PACKAGE_STRING='TeX Live Scripts 2023/dev' +PACKAGE_VERSION='2023' +PACKAGE_STRING='TeX Live Scripts 2023' PACKAGE_BUGREPORT='tex-k@tug.org' PACKAGE_URL='' @@ -1281,7 +1281,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures TeX Live Scripts 2023/dev to adapt to many kinds of systems. +\`configure' configures TeX Live Scripts 2023 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1349,7 +1349,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of TeX Live Scripts 2023/dev:";; + short | recursive ) echo "Configuration of TeX Live Scripts 2023:";; esac cat <<\_ACEOF @@ -1445,7 +1445,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -TeX Live Scripts configure 2023/dev +TeX Live Scripts configure 2023 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1521,7 +1521,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by TeX Live Scripts $as_me 2023/dev, which was +It was created by TeX Live Scripts $as_me 2023, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -2786,7 +2786,7 @@ fi # Define the identity of the package. PACKAGE='tex-live-scripts' - VERSION='2023/dev' + VERSION='2023' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -4914,7 +4914,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by TeX Live Scripts $as_me 2023/dev, which was +This file was extended by TeX Live Scripts $as_me 2023, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4973,7 +4973,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -TeX Live Scripts config.status 2023/dev +TeX Live Scripts config.status 2023 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/source/texk/texlive/linked_scripts/Makefile.am b/source/texk/texlive/linked_scripts/Makefile.am index a9eef4d0f02b2f994e563dff9c87742c95f91f86..ea7ba63ce4eadd7f1c257a74d7664b7709b890c6 100644 --- a/source/texk/texlive/linked_scripts/Makefile.am +++ b/source/texk/texlive/linked_scripts/Makefile.am @@ -1,4 +1,4 @@ -## $Id: Makefile.am 65465 2023-01-04 23:22:48Z karl $ +## $Id: Makefile.am 65625 2023-01-24 21:10:39Z karl $ ## Makefile.am for the TeX Live subdirectory texk/texlive/linked_scripts/ ## ## Copyright 2016-2022 Karl Berry <tex-live@tug.org> @@ -69,6 +69,8 @@ texmf_shell_scripts = \ listbib/listbib \ listings-ext/listings-ext.sh \ ltxfileinfo/ltxfileinfo \ + pagelayout/pagelayoutapi \ + pagelayout/textestvis \ pdfbook2/pdfbook2 \ pdfjam/pdfjam \ pdftex-quiet/pdftex-quiet \ @@ -98,9 +100,7 @@ texmf_shell_scripts = \ texosquery/texosquery-jre8.sh \ tikztosvg/tikztosvg \ typeoutfileinfo/typeoutfileinfo.sh \ - wordcount/wordcount.sh \ - xput/xput \ - xput/xputserver + wordcount/wordcount.sh texmf_other_scripts = \ a2ping/a2ping.pl \ diff --git a/source/texk/texlive/linked_scripts/Makefile.in b/source/texk/texlive/linked_scripts/Makefile.in index 506b66d3f19c5507bfe1c72a8d51cda57823ab4a..e37a2a4a282e07f6105f47a397b0aec3e15f9e14 100644 --- a/source/texk/texlive/linked_scripts/Makefile.in +++ b/source/texk/texlive/linked_scripts/Makefile.in @@ -283,6 +283,8 @@ texmf_shell_scripts = \ listbib/listbib \ listings-ext/listings-ext.sh \ ltxfileinfo/ltxfileinfo \ + pagelayout/pagelayoutapi \ + pagelayout/textestvis \ pdfbook2/pdfbook2 \ pdfjam/pdfjam \ pdftex-quiet/pdftex-quiet \ @@ -312,9 +314,7 @@ texmf_shell_scripts = \ texosquery/texosquery-jre8.sh \ tikztosvg/tikztosvg \ typeoutfileinfo/typeoutfileinfo.sh \ - wordcount/wordcount.sh \ - xput/xput \ - xput/xputserver + wordcount/wordcount.sh texmf_other_scripts = \ a2ping/a2ping.pl \ diff --git a/source/texk/web2c/ChangeLog b/source/texk/web2c/ChangeLog index 749a3c9c1481cc5de0197a68312ffd05ad94ff15..bda62667c65143fbf18189a1a8e3c05d0a21abf8 100644 --- a/source/texk/web2c/ChangeLog +++ b/source/texk/web2c/ChangeLog @@ -1,3 +1,31 @@ +2023-02-14 Hironori Kitagawa <h_kitagawa2001@yahoo.co.jp> + + * tests/fn-generate.perl: + Avoid errors on parallel test processing. + Report from Ken Brown. + +2023-02-13 Karl Berry <karl@freefriends.org> + + * enctexdir/enctex-pdftex.ch: move "\special shipout" + change here, from enctex2.ch, so it is not applied to tex (which + doesn't have it). + +2023-02-12 Phelype Oleinik <phe.h.o1@gmail.com> + and Karl Berry <karl@freefriends.org> + + * enctexdir/enctex2.ch: make parallel change for ``late'' + \special shipout. This code is what avoids the invalid + write_stream(tail):=null assignment in the original code. + See pdftex.web (Implement \.{\\special}) for more. + +2023-01-28 TANAKA Takuji <ttk@t-lab.opal.ne.jp> + + * Makefile.in, ac/web2c.ac (ptex, uptex): + Revert options --enable-(u)ptex(-synctex) for configure. + By default, we do not build binaries of (u)pTeX (ptex, uptex) + and we use alias of e-upTeX (eptex, euptex) for them. + https://github.com/texjporg/tex-jp-build/issues/32 + 2023-01-15 TANAKA Takuji <ttk@t-lab.opal.ne.jp> * configure.ac, ac/web2c.ac (ptex, uptex): diff --git a/source/texk/web2c/Makefile.in b/source/texk/web2c/Makefile.in index f7881a2e61b56c599ca6e239d19a4234dae5fa57..07d987cba5fd9abdb7c01afe0a81979704ab1ef7 100644 --- a/source/texk/web2c/Makefile.in +++ b/source/texk/web2c/Makefile.in @@ -112,21 +112,22 @@ bin_PROGRAMS = tangle$(EXEEXT) ctangle$(EXEEXT) $(am__EXEEXT_4) \ $(am__EXEEXT_20) $(am__EXEEXT_21) $(am__EXEEXT_22) \ $(am__EXEEXT_23) $(am__EXEEXT_24) $(am__EXEEXT_25) \ $(am__EXEEXT_26) $(am__EXEEXT_27) $(am__EXEEXT_28) \ - $(am__EXEEXT_29) + $(am__EXEEXT_29) $(am__EXEEXT_30) $(am__EXEEXT_31) noinst_PROGRAMS = tangleboot$(EXEEXT) ctangleboot$(EXEEXT) \ - $(am__EXEEXT_30) $(am__EXEEXT_31) $(am__EXEEXT_32) \ - $(am__EXEEXT_33) $(am__EXEEXT_34) $(am__EXEEXT_35) \ - $(am__EXEEXT_36) $(am__EXEEXT_37) $(am__EXEEXT_38) \ - $(am__EXEEXT_39) $(am__EXEEXT_40) -TESTS = tangle.test $(am__EXEEXT_43) ctiedir/ctie.test \ + $(am__EXEEXT_32) $(am__EXEEXT_33) $(am__EXEEXT_34) \ + $(am__EXEEXT_35) $(am__EXEEXT_36) $(am__EXEEXT_37) \ + $(am__EXEEXT_38) $(am__EXEEXT_39) $(am__EXEEXT_40) \ + $(am__EXEEXT_41) $(am__EXEEXT_42) +TESTS = tangle.test $(am__EXEEXT_45) ctiedir/ctie.test \ cwebdir/cweave.test tiedir/tie.test $(am__append_6) \ $(am__append_16) $(am__append_25) $(am__append_34) \ $(am__append_42) $(am__append_55) $(am__append_56) \ - $(am__append_58) $(am__append_63) $(am__append_67) \ - $(am__append_70) $(am__append_75) $(am__append_78) \ - $(am__append_99) $(am__append_100) $(am__append_101) \ - $(am__append_102) $(am__append_110) $(am__append_112) \ - $(am__append_114) $(am__append_141) libmd5/md5.test + $(am__append_58) $(am__append_62) $(am__EXEEXT_46) \ + $(am__append_68) $(am__append_73) $(am__append_76) \ + $(am__append_79) $(am__append_84) $(am__append_87) \ + $(am__append_108) $(am__append_109) $(am__append_110) \ + $(am__append_111) $(am__append_119) $(am__append_121) \ + $(am__append_123) $(am__append_150) libmd5/md5.test @WEB_TRUE@am__append_1 = $(web_programs) @WEB_TRUE@am__append_2 = $(web_tests) @TEX_TRUE@am__append_3 = tex @@ -191,154 +192,153 @@ TESTS = tangle.test $(am__EXEEXT_43) ctiedir/ctie.test \ @ETEX_TRUE@am__append_58 = $(etex_tests) @ETEX_TRUE@am__append_59 = etrip.diffs @ETEX_TRUE@am__append_60 = etrip-clean -@EPTEX_TRUE@am__append_61 = eptex -@EPTEX_TRUE@am__append_62 = eptex$(EXEEXT):ptex -@EPTEX_TRUE@am__append_63 = $(eptex_tests) -@EPTEX_TRUE@am__append_64 = eptrip.diffs -@EPTEX_TRUE@am__append_65 = eptrip-clean - -#if UPTEX -#bin_PROGRAMS += uptex -#endif UPTEX -@UPWEB_TRUE@am__append_66 = $(upweb_programs) - -#if UPTEX -#TESTS += $(uptex_tests) -#TRIPTRAP += uptrip.diffs -#TRIPTRAP_CLEAN += uptrip-clean -#endif UPTEX -@UPWEB_TRUE@am__append_67 = $(upweb_tests) -@EUPTEX_TRUE@am__append_68 = euptex -@EUPTEX_TRUE@am__append_69 = euptex$(EXEEXT):uptex -@EUPTEX_TRUE@am__append_70 = $(euptex_tests) -@EUPTEX_TRUE@am__append_71 = euptrip.diffs -@EUPTEX_TRUE@am__append_72 = euptrip-clean -@HITEX_TRUE@am__append_73 = hitex hishrink histretch -@HITEX_TRUE@am__append_74 = himktables -@HITEX_TRUE@am__append_75 = $(hitex_tests) -@MINGW32_TRUE@am__append_76 = \ +@PTEX_TRUE@am__append_61 = ptex +@PTEX_TRUE@am__append_62 = $(ptex_tests) +@PTEX_TRUE@am__append_63 = ptrip.diffs +@PTEX_TRUE@am__append_64 = ptrip-clean +@PWEB_TRUE@am__append_65 = $(pweb_tests) +@EPTEX_TRUE@am__append_66 = eptex +@EPTEX_TRUE@@PTEX_FALSE@am__append_67 = eptex$(EXEEXT):ptex +@EPTEX_TRUE@am__append_68 = $(eptex_tests) +@EPTEX_TRUE@am__append_69 = eptrip.diffs +@EPTEX_TRUE@am__append_70 = eptrip-clean +@UPTEX_TRUE@am__append_71 = uptex +@UPWEB_TRUE@am__append_72 = $(upweb_programs) +@UPTEX_TRUE@am__append_73 = $(uptex_tests) +@UPTEX_TRUE@am__append_74 = uptrip.diffs +@UPTEX_TRUE@am__append_75 = uptrip-clean +@UPWEB_TRUE@am__append_76 = $(upweb_tests) +@EUPTEX_TRUE@am__append_77 = euptex +@EUPTEX_TRUE@@UPTEX_FALSE@am__append_78 = euptex$(EXEEXT):uptex +@EUPTEX_TRUE@am__append_79 = $(euptex_tests) +@EUPTEX_TRUE@am__append_80 = euptrip.diffs +@EUPTEX_TRUE@am__append_81 = euptrip-clean +@HITEX_TRUE@am__append_82 = hitex hishrink histretch +@HITEX_TRUE@am__append_83 = himktables +@HITEX_TRUE@am__append_84 = $(hitex_tests) +@MINGW32_TRUE@am__append_85 = \ @MINGW32_TRUE@ pdftexdir/regex/regex.c \ @MINGW32_TRUE@ pdftexdir/regex/regex.h -@PDFTEX_TRUE@am__append_77 = pdftex ttf2afm pdftosrc -@PDFTEX_TRUE@am__append_78 = $(pdftex_tests) $(ttf2afm_tests) \ +@PDFTEX_TRUE@am__append_86 = pdftex ttf2afm pdftosrc +@PDFTEX_TRUE@am__append_87 = $(pdftex_tests) $(ttf2afm_tests) \ @PDFTEX_TRUE@ $(pdftosrc_tests) -@LUATEX_TRUE@am__append_79 = luatex -@LUATEX_TRUE@@WIN32_TRUE@am__append_80 = call_luatex -@LUATEX_TRUE@@WIN32_TRUE@am__append_81 = install-luatex-links -@LUATEX_TRUE@@WIN32_TRUE@am__append_82 = uninstall-luatex-links -@LUATEX_TRUE@@WIN32_FALSE@am__append_83 = luatex$(EXEEXT):texlua luatex$(EXEEXT):texluac -@LUAHBTEX_TRUE@am__append_84 = luahbtex -@LUAHBTEX_TRUE@@WIN32_TRUE@am__append_85 = call_luahbtex -@LUAHBTEX_TRUE@@WIN32_TRUE@am__append_86 = install-luahbtex-links -@LUAHBTEX_TRUE@@WIN32_TRUE@am__append_87 = uninstall-luahbtex-links +@LUATEX_TRUE@am__append_88 = luatex +@LUATEX_TRUE@@WIN32_TRUE@am__append_89 = call_luatex +@LUATEX_TRUE@@WIN32_TRUE@am__append_90 = install-luatex-links +@LUATEX_TRUE@@WIN32_TRUE@am__append_91 = uninstall-luatex-links +@LUATEX_TRUE@@WIN32_FALSE@am__append_92 = luatex$(EXEEXT):texlua luatex$(EXEEXT):texluac +@LUAHBTEX_TRUE@am__append_93 = luahbtex +@LUAHBTEX_TRUE@@WIN32_TRUE@am__append_94 = call_luahbtex +@LUAHBTEX_TRUE@@WIN32_TRUE@am__append_95 = install-luahbtex-links +@LUAHBTEX_TRUE@@WIN32_TRUE@am__append_96 = uninstall-luahbtex-links # keep texlua[c] as links to luatex unless luatex is not installed. -@LUAHBTEX_TRUE@@LUATEX_FALSE@@WIN32_FALSE@am__append_88 = luahbtex$(EXEEXT):texlua luahbtex$(EXEEXT):texluac -@LUAJITTEX_TRUE@am__append_89 = luajittex -@LUAJITTEX_TRUE@@WIN32_TRUE@am__append_90 = call_luajittex -@LUAJITTEX_TRUE@@WIN32_TRUE@am__append_91 = install-luajittex-links -@LUAJITTEX_TRUE@@WIN32_TRUE@am__append_92 = uninstall-luajittex-links -@LUAJITTEX_TRUE@@WIN32_FALSE@am__append_93 = luajittex$(EXEEXT):texluajit luajittex$(EXEEXT):texluajitc -@LUAJITHBTEX_TRUE@am__append_94 = luajithbtex -@LUAJITHBTEX_TRUE@@WIN32_TRUE@am__append_95 = call_luajithbtex -@LUAJITHBTEX_TRUE@@WIN32_TRUE@am__append_96 = install-luajithbtex-links -@LUAJITHBTEX_TRUE@@WIN32_TRUE@am__append_97 = uninstall-luajithbtex-links +@LUAHBTEX_TRUE@@LUATEX_FALSE@@WIN32_FALSE@am__append_97 = luahbtex$(EXEEXT):texlua luahbtex$(EXEEXT):texluac +@LUAJITTEX_TRUE@am__append_98 = luajittex +@LUAJITTEX_TRUE@@WIN32_TRUE@am__append_99 = call_luajittex +@LUAJITTEX_TRUE@@WIN32_TRUE@am__append_100 = install-luajittex-links +@LUAJITTEX_TRUE@@WIN32_TRUE@am__append_101 = uninstall-luajittex-links +@LUAJITTEX_TRUE@@WIN32_FALSE@am__append_102 = luajittex$(EXEEXT):texluajit luajittex$(EXEEXT):texluajitc +@LUAJITHBTEX_TRUE@am__append_103 = luajithbtex +@LUAJITHBTEX_TRUE@@WIN32_TRUE@am__append_104 = call_luajithbtex +@LUAJITHBTEX_TRUE@@WIN32_TRUE@am__append_105 = install-luajithbtex-links +@LUAJITHBTEX_TRUE@@WIN32_TRUE@am__append_106 = uninstall-luajithbtex-links # keep texluajit[c] as links to luajittex unless luajittex is not installed. -@LUAJITHBTEX_TRUE@@LUAJITTEX_FALSE@@WIN32_FALSE@am__append_98 = luajithbtex$(EXEEXT):texluajit luajithbtex$(EXEEXT):texluajitc -@LUATEX_TRUE@am__append_99 = $(luatex_tests) -@LUAHBTEX_TRUE@am__append_100 = $(luahbtex_tests) -@LUAJITTEX_TRUE@am__append_101 = $(luajittex_tests) -@LUAJITHBTEX_TRUE@am__append_102 = $(luajithbtex_tests) -@XETEX_TRUE@am__append_103 = xetex -@XETEX_MACOSX_TRUE@am__append_104 = -DXETEX_MAC -@XETEX_MACOSX_TRUE@am__append_105 = -std=c++11 -@XETEX_MACOSX_FALSE@am__append_106 = $(FONTCONFIG_INCLUDES) -@XETEX_MACOSX_FALSE@am__append_107 = $(FONTCONFIG_LIBS) -@XETEX_MACOSX_TRUE@am__append_108 = \ +@LUAJITHBTEX_TRUE@@LUAJITTEX_FALSE@@WIN32_FALSE@am__append_107 = luajithbtex$(EXEEXT):texluajit luajithbtex$(EXEEXT):texluajitc +@LUATEX_TRUE@am__append_108 = $(luatex_tests) +@LUAHBTEX_TRUE@am__append_109 = $(luahbtex_tests) +@LUAJITTEX_TRUE@am__append_110 = $(luajittex_tests) +@LUAJITHBTEX_TRUE@am__append_111 = $(luajithbtex_tests) +@XETEX_TRUE@am__append_112 = xetex +@XETEX_MACOSX_TRUE@am__append_113 = -DXETEX_MAC +@XETEX_MACOSX_TRUE@am__append_114 = -std=c++11 +@XETEX_MACOSX_FALSE@am__append_115 = $(FONTCONFIG_INCLUDES) +@XETEX_MACOSX_FALSE@am__append_116 = $(FONTCONFIG_LIBS) +@XETEX_MACOSX_TRUE@am__append_117 = \ @XETEX_MACOSX_TRUE@ xetexdir/XeTeXFontInst_Mac.cpp \ @XETEX_MACOSX_TRUE@ xetexdir/XeTeXFontInst_Mac.h \ @XETEX_MACOSX_TRUE@ xetexdir/XeTeXFontMgr_Mac.mm \ @XETEX_MACOSX_TRUE@ xetexdir/XeTeXFontMgr_Mac.h \ @XETEX_MACOSX_TRUE@ xetexdir/XeTeX_mac.c -@XETEX_MACOSX_FALSE@am__append_109 = \ +@XETEX_MACOSX_FALSE@am__append_118 = \ @XETEX_MACOSX_FALSE@ xetexdir/XeTeXFontMgr_FC.cpp \ @XETEX_MACOSX_FALSE@ xetexdir/XeTeXFontMgr_FC.h -@XETEX_TRUE@am__append_110 = $(xetex_tests) -@OTANGLE_TRUE@am__append_111 = $(omegaware_programs) -@OTANGLE_TRUE@am__append_112 = $(OTANGLE_tests) $(OMFONTS_tests) -@ALEPH_TRUE@am__append_113 = aleph -@ALEPH_TRUE@am__append_114 = $(aleph_tests) -@SYNCTEX_TRUE@am__append_115 = synctex -@SYNCTEX_TRUE@am__append_116 = $(LTLIBSYNCTEX) -@SYNCTEX_TRUE@am__append_117 = $(LIBSYNCTEX) -@MINGW32_TRUE@am__append_118 = $(KPATHSEA_INCLUDES) -@MINGW32_TRUE@am__append_119 = -lshlwapi $(KPATHSEA_LIBS) -@MINGW32_TRUE@am__append_120 = -lshlwapi -@TEX_SYNCTEX_TRUE@am__append_121 = -I$(srcdir)/synctexdir \ +@XETEX_TRUE@am__append_119 = $(xetex_tests) +@OTANGLE_TRUE@am__append_120 = $(omegaware_programs) +@OTANGLE_TRUE@am__append_121 = $(OTANGLE_tests) $(OMFONTS_tests) +@ALEPH_TRUE@am__append_122 = aleph +@ALEPH_TRUE@am__append_123 = $(aleph_tests) +@SYNCTEX_TRUE@am__append_124 = synctex +@SYNCTEX_TRUE@am__append_125 = $(LTLIBSYNCTEX) +@SYNCTEX_TRUE@am__append_126 = $(LIBSYNCTEX) +@MINGW32_TRUE@am__append_127 = $(KPATHSEA_INCLUDES) +@MINGW32_TRUE@am__append_128 = -lshlwapi $(KPATHSEA_LIBS) +@MINGW32_TRUE@am__append_129 = -lshlwapi +@TEX_SYNCTEX_TRUE@am__append_130 = -I$(srcdir)/synctexdir \ @TEX_SYNCTEX_TRUE@ $(ZLIB_INCLUDES) -D__SyncTeX__ \ @TEX_SYNCTEX_TRUE@ -DSYNCTEX_ENGINE_H=\"synctex-tex.h\" -@TEX_SYNCTEX_TRUE@am__append_122 = $(ZLIB_LIBS) -@TEX_SYNCTEX_TRUE@am__append_123 = $(ZLIB_DEPEND) -@TEX_SYNCTEX_TRUE@am__append_124 = \ +@TEX_SYNCTEX_TRUE@am__append_131 = $(ZLIB_LIBS) +@TEX_SYNCTEX_TRUE@am__append_132 = $(ZLIB_DEPEND) +@TEX_SYNCTEX_TRUE@am__append_133 = \ @TEX_SYNCTEX_TRUE@ synctexdir/synctex.c \ @TEX_SYNCTEX_TRUE@ synctexdir/synctex.h \ @TEX_SYNCTEX_TRUE@ synctexdir/synctex-common.h \ @TEX_SYNCTEX_TRUE@ synctexdir/synctex-tex.h -@ETEX_SYNCTEX_TRUE@am__append_125 = -I$(srcdir)/synctexdir \ +@ETEX_SYNCTEX_TRUE@am__append_134 = -I$(srcdir)/synctexdir \ @ETEX_SYNCTEX_TRUE@ $(ZLIB_INCLUDES) -D__SyncTeX__ \ @ETEX_SYNCTEX_TRUE@ -DSYNCTEX_ENGINE_H=\"synctex-etex.h\" -@ETEX_SYNCTEX_TRUE@am__append_126 = $(ZLIB_LIBS) -@ETEX_SYNCTEX_TRUE@am__append_127 = $(ZLIB_DEPEND) -@ETEX_SYNCTEX_TRUE@am__append_128 = \ +@ETEX_SYNCTEX_TRUE@am__append_135 = $(ZLIB_LIBS) +@ETEX_SYNCTEX_TRUE@am__append_136 = $(ZLIB_DEPEND) +@ETEX_SYNCTEX_TRUE@am__append_137 = \ @ETEX_SYNCTEX_TRUE@ synctexdir/synctex.c \ @ETEX_SYNCTEX_TRUE@ synctexdir/synctex.h \ @ETEX_SYNCTEX_TRUE@ synctexdir/synctex-common.h \ @ETEX_SYNCTEX_TRUE@ synctexdir/synctex-etex.h -@EPTEX_SYNCTEX_TRUE@am__append_129 = -I$(srcdir)/synctexdir \ +@EPTEX_SYNCTEX_TRUE@am__append_138 = -I$(srcdir)/synctexdir \ @EPTEX_SYNCTEX_TRUE@ $(ZLIB_INCLUDES) -D__SyncTeX__ \ @EPTEX_SYNCTEX_TRUE@ -DSYNCTEX_ENGINE_H=\"synctex-eptex.h\" -@EPTEX_SYNCTEX_TRUE@am__append_130 = $(ZLIB_LIBS) -@EPTEX_SYNCTEX_TRUE@am__append_131 = $(ZLIB_DEPEND) -@EPTEX_SYNCTEX_TRUE@am__append_132 = \ +@EPTEX_SYNCTEX_TRUE@am__append_139 = $(ZLIB_LIBS) +@EPTEX_SYNCTEX_TRUE@am__append_140 = $(ZLIB_DEPEND) +@EPTEX_SYNCTEX_TRUE@am__append_141 = \ @EPTEX_SYNCTEX_TRUE@ synctexdir/synctex.c \ @EPTEX_SYNCTEX_TRUE@ synctexdir/synctex.h \ @EPTEX_SYNCTEX_TRUE@ synctexdir/synctex-common.h \ @EPTEX_SYNCTEX_TRUE@ synctexdir/synctex-eptex.h -@EUPTEX_SYNCTEX_TRUE@am__append_133 = -I$(srcdir)/synctexdir \ +@EUPTEX_SYNCTEX_TRUE@am__append_142 = -I$(srcdir)/synctexdir \ @EUPTEX_SYNCTEX_TRUE@ $(ZLIB_INCLUDES) -D__SyncTeX__ \ @EUPTEX_SYNCTEX_TRUE@ -DSYNCTEX_ENGINE_H=\"synctex-euptex.h\" -@EUPTEX_SYNCTEX_TRUE@am__append_134 = $(ZLIB_LIBS) -@EUPTEX_SYNCTEX_TRUE@am__append_135 = $(ZLIB_DEPEND) -@EUPTEX_SYNCTEX_TRUE@am__append_136 = \ +@EUPTEX_SYNCTEX_TRUE@am__append_143 = $(ZLIB_LIBS) +@EUPTEX_SYNCTEX_TRUE@am__append_144 = $(ZLIB_DEPEND) +@EUPTEX_SYNCTEX_TRUE@am__append_145 = \ @EUPTEX_SYNCTEX_TRUE@ synctexdir/synctex.c \ @EUPTEX_SYNCTEX_TRUE@ synctexdir/synctex.h \ @EUPTEX_SYNCTEX_TRUE@ synctexdir/synctex-common.h \ @EUPTEX_SYNCTEX_TRUE@ synctexdir/synctex-euptex.h -@PDFTEX_SYNCTEX_TRUE@am__append_137 = -I$(srcdir)/synctexdir \ +@PDFTEX_SYNCTEX_TRUE@am__append_146 = -I$(srcdir)/synctexdir \ @PDFTEX_SYNCTEX_TRUE@ -D__SyncTeX__ \ @PDFTEX_SYNCTEX_TRUE@ -DSYNCTEX_ENGINE_H=\"synctex-pdftex.h\" -@PDFTEX_SYNCTEX_TRUE@am__append_138 = \ +@PDFTEX_SYNCTEX_TRUE@am__append_147 = \ @PDFTEX_SYNCTEX_TRUE@ synctexdir/synctex.c \ @PDFTEX_SYNCTEX_TRUE@ synctexdir/synctex.h \ @PDFTEX_SYNCTEX_TRUE@ synctexdir/synctex-common.h \ @PDFTEX_SYNCTEX_TRUE@ synctexdir/synctex-pdftex.h -@XETEX_SYNCTEX_TRUE@am__append_139 = -I$(srcdir)/synctexdir \ +@XETEX_SYNCTEX_TRUE@am__append_148 = -I$(srcdir)/synctexdir \ @XETEX_SYNCTEX_TRUE@ -D__SyncTeX__ \ @XETEX_SYNCTEX_TRUE@ -DSYNCTEX_ENGINE_H=\"synctex-xetex.h\" -@XETEX_SYNCTEX_TRUE@am__append_140 = \ +@XETEX_SYNCTEX_TRUE@am__append_149 = \ @XETEX_SYNCTEX_TRUE@ synctexdir/synctex.c \ @XETEX_SYNCTEX_TRUE@ synctexdir/synctex.h \ @XETEX_SYNCTEX_TRUE@ synctexdir/synctex-common.h \ @XETEX_SYNCTEX_TRUE@ synctexdir/synctex-xetex.h -@SYNCTEX_TRUE@am__append_141 = $(synctex_tests) +@SYNCTEX_TRUE@am__append_150 = $(synctex_tests) subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/web2c-disable.m4 \ @@ -422,36 +422,38 @@ am__EXEEXT_3 = odvicopy$(EXEEXT) odvitype$(EXEEXT) otangle$(EXEEXT) \ @PMP_TRUE@am__EXEEXT_14 = pmpost$(EXEEXT) @UPMP_TRUE@am__EXEEXT_15 = upmpost$(EXEEXT) @ETEX_TRUE@am__EXEEXT_16 = etex$(EXEEXT) -@EPTEX_TRUE@am__EXEEXT_17 = eptex$(EXEEXT) -@UPWEB_TRUE@am__EXEEXT_18 = $(am__EXEEXT_2) -@EUPTEX_TRUE@am__EXEEXT_19 = euptex$(EXEEXT) -@HITEX_TRUE@am__EXEEXT_20 = hitex$(EXEEXT) hishrink$(EXEEXT) \ +@PTEX_TRUE@am__EXEEXT_17 = ptex$(EXEEXT) +@EPTEX_TRUE@am__EXEEXT_18 = eptex$(EXEEXT) +@UPTEX_TRUE@am__EXEEXT_19 = uptex$(EXEEXT) +@UPWEB_TRUE@am__EXEEXT_20 = $(am__EXEEXT_2) +@EUPTEX_TRUE@am__EXEEXT_21 = euptex$(EXEEXT) +@HITEX_TRUE@am__EXEEXT_22 = hitex$(EXEEXT) hishrink$(EXEEXT) \ @HITEX_TRUE@ histretch$(EXEEXT) -@PDFTEX_TRUE@am__EXEEXT_21 = pdftex$(EXEEXT) ttf2afm$(EXEEXT) \ +@PDFTEX_TRUE@am__EXEEXT_23 = pdftex$(EXEEXT) ttf2afm$(EXEEXT) \ @PDFTEX_TRUE@ pdftosrc$(EXEEXT) -@LUATEX_TRUE@am__EXEEXT_22 = luatex$(EXEEXT) -@LUAHBTEX_TRUE@am__EXEEXT_23 = luahbtex$(EXEEXT) -@LUAJITTEX_TRUE@am__EXEEXT_24 = luajittex$(EXEEXT) -@LUAJITHBTEX_TRUE@am__EXEEXT_25 = luajithbtex$(EXEEXT) -@XETEX_TRUE@am__EXEEXT_26 = xetex$(EXEEXT) -@OTANGLE_TRUE@am__EXEEXT_27 = $(am__EXEEXT_3) -@ALEPH_TRUE@am__EXEEXT_28 = aleph$(EXEEXT) -@SYNCTEX_TRUE@am__EXEEXT_29 = synctex$(EXEEXT) +@LUATEX_TRUE@am__EXEEXT_24 = luatex$(EXEEXT) +@LUAHBTEX_TRUE@am__EXEEXT_25 = luahbtex$(EXEEXT) +@LUAJITTEX_TRUE@am__EXEEXT_26 = luajittex$(EXEEXT) +@LUAJITHBTEX_TRUE@am__EXEEXT_27 = luajithbtex$(EXEEXT) +@XETEX_TRUE@am__EXEEXT_28 = xetex$(EXEEXT) +@OTANGLE_TRUE@am__EXEEXT_29 = $(am__EXEEXT_3) +@ALEPH_TRUE@am__EXEEXT_30 = aleph$(EXEEXT) +@SYNCTEX_TRUE@am__EXEEXT_31 = synctex$(EXEEXT) am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libdir)" \ "$(DESTDIR)$(libdir)" "$(DESTDIR)$(man1dir)" \ "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(pkgconfigdir)" \ "$(DESTDIR)$(syncincludedir)" -@MF_TRUE@@WIN32_TRUE@am__EXEEXT_30 = call_mf$(EXEEXT) -@MFLUA_TRUE@@WIN32_TRUE@am__EXEEXT_31 = call_mflua$(EXEEXT) -@MFLUAJIT_TRUE@@WIN32_TRUE@am__EXEEXT_32 = call_mfluajit$(EXEEXT) -@MP_TRUE@@WIN32_TRUE@am__EXEEXT_33 = call_mpost$(EXEEXT) -@PMP_TRUE@@WIN32_TRUE@am__EXEEXT_34 = call_pmpost$(EXEEXT) -@UPMP_TRUE@@WIN32_TRUE@am__EXEEXT_35 = call_upmpost$(EXEEXT) -@HITEX_TRUE@am__EXEEXT_36 = himktables$(EXEEXT) -@LUATEX_TRUE@@WIN32_TRUE@am__EXEEXT_37 = call_luatex$(EXEEXT) -@LUAHBTEX_TRUE@@WIN32_TRUE@am__EXEEXT_38 = call_luahbtex$(EXEEXT) -@LUAJITTEX_TRUE@@WIN32_TRUE@am__EXEEXT_39 = call_luajittex$(EXEEXT) -@LUAJITHBTEX_TRUE@@WIN32_TRUE@am__EXEEXT_40 = \ +@MF_TRUE@@WIN32_TRUE@am__EXEEXT_32 = call_mf$(EXEEXT) +@MFLUA_TRUE@@WIN32_TRUE@am__EXEEXT_33 = call_mflua$(EXEEXT) +@MFLUAJIT_TRUE@@WIN32_TRUE@am__EXEEXT_34 = call_mfluajit$(EXEEXT) +@MP_TRUE@@WIN32_TRUE@am__EXEEXT_35 = call_mpost$(EXEEXT) +@PMP_TRUE@@WIN32_TRUE@am__EXEEXT_36 = call_pmpost$(EXEEXT) +@UPMP_TRUE@@WIN32_TRUE@am__EXEEXT_37 = call_upmpost$(EXEEXT) +@HITEX_TRUE@am__EXEEXT_38 = himktables$(EXEEXT) +@LUATEX_TRUE@@WIN32_TRUE@am__EXEEXT_39 = call_luatex$(EXEEXT) +@LUAHBTEX_TRUE@@WIN32_TRUE@am__EXEEXT_40 = call_luahbtex$(EXEEXT) +@LUAJITTEX_TRUE@@WIN32_TRUE@am__EXEEXT_41 = call_luajittex$(EXEEXT) +@LUAJITHBTEX_TRUE@@WIN32_TRUE@am__EXEEXT_42 = \ @LUAJITHBTEX_TRUE@@WIN32_TRUE@ call_luajithbtex$(EXEEXT) PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -1555,12 +1557,18 @@ nodist_pooltype_OBJECTS = pooltype.$(OBJEXT) pooltype_OBJECTS = $(nodist_pooltype_OBJECTS) pooltype_LDADD = $(LDADD) pooltype_DEPENDENCIES = $(proglib) $(am__DEPENDENCIES_1) +dist_ptex_OBJECTS = ptexdir/ptex-ptexextra.$(OBJEXT) +am__objects_57 = ptex-ptexini.$(OBJEXT) ptex-ptex0.$(OBJEXT) +nodist_ptex_OBJECTS = $(am__objects_57) ptex-ptex-pool.$(OBJEXT) +ptex_OBJECTS = $(dist_ptex_OBJECTS) $(nodist_ptex_OBJECTS) +am__DEPENDENCIES_11 = libkanji.a $(pproglib) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) am_synctex_OBJECTS = synctexdir/synctex-synctex_main.$(OBJEXT) synctex_OBJECTS = $(am_synctex_OBJECTS) -am__DEPENDENCIES_11 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -@MINGW32_TRUE@am__DEPENDENCIES_12 = $(am__DEPENDENCIES_1) -synctex_DEPENDENCIES = $(am__DEPENDENCIES_11) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_12) +am__DEPENDENCIES_12 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +@MINGW32_TRUE@am__DEPENDENCIES_13 = $(am__DEPENDENCIES_1) +synctex_DEPENDENCIES = $(am__DEPENDENCIES_12) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_13) nodist_tangle_OBJECTS = tangle.$(OBJEXT) tangle_OBJECTS = $(nodist_tangle_OBJECTS) tangle_LDADD = $(LDADD) @@ -1571,14 +1579,14 @@ tangleboot_LDADD = $(LDADD) am__dist_tex_SOURCES_DIST = texextra.c synctexdir/synctex.c \ synctexdir/synctex.h synctexdir/synctex-common.h \ synctexdir/synctex-tex.h -@TEX_SYNCTEX_TRUE@am__objects_57 = synctexdir/tex-synctex.$(OBJEXT) -dist_tex_OBJECTS = tex-texextra.$(OBJEXT) $(am__objects_57) -am__objects_58 = tex-texini.$(OBJEXT) tex-tex0.$(OBJEXT) -nodist_tex_OBJECTS = $(am__objects_58) tex-tex-pool.$(OBJEXT) +@TEX_SYNCTEX_TRUE@am__objects_58 = synctexdir/tex-synctex.$(OBJEXT) +dist_tex_OBJECTS = tex-texextra.$(OBJEXT) $(am__objects_58) +am__objects_59 = tex-texini.$(OBJEXT) tex-tex0.$(OBJEXT) +nodist_tex_OBJECTS = $(am__objects_59) tex-tex-pool.$(OBJEXT) tex_OBJECTS = $(dist_tex_OBJECTS) $(nodist_tex_OBJECTS) -@TEX_SYNCTEX_TRUE@am__DEPENDENCIES_13 = $(am__DEPENDENCIES_1) +@TEX_SYNCTEX_TRUE@am__DEPENDENCIES_14 = $(am__DEPENDENCIES_1) tex_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_13) + $(am__DEPENDENCIES_14) nodist_tftopl_OBJECTS = tftopl.$(OBJEXT) tftopl_OBJECTS = $(nodist_tftopl_OBJECTS) tftopl_LDADD = $(LDADD) @@ -1597,39 +1605,39 @@ twill_DEPENDENCIES = $(proglib) $(am__DEPENDENCIES_1) am_upbibtex_OBJECTS = nodist_upbibtex_OBJECTS = upbibtex-upbibtex.$(OBJEXT) upbibtex_OBJECTS = $(am_upbibtex_OBJECTS) $(nodist_upbibtex_OBJECTS) -am__DEPENDENCIES_14 = libukanji.a $(pproglib) $(am__DEPENDENCIES_1) \ +am__DEPENDENCIES_15 = libukanji.a $(pproglib) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) am_updvitype_OBJECTS = nodist_updvitype_OBJECTS = updvitype-updvitype.$(OBJEXT) updvitype_OBJECTS = $(am_updvitype_OBJECTS) \ $(nodist_updvitype_OBJECTS) -am__objects_59 = upmpost-pmp.$(OBJEXT) -am__objects_60 = upmpost-pmpmath.$(OBJEXT) -am__objects_61 = upmpost-pmpmathbinary.$(OBJEXT) -am__objects_62 = upmpost-pmpmathdecimal.$(OBJEXT) -am__objects_63 = upmpost-pmpmathdouble.$(OBJEXT) -am__objects_64 = upmpost-pmpstrings.$(OBJEXT) -am__objects_65 = upmpost-pmpxout.$(OBJEXT) -am__objects_66 = upmpost-ppngout.$(OBJEXT) -am__objects_67 = upmpost-ppsout.$(OBJEXT) -am__objects_68 = upmpost-psvgout.$(OBJEXT) -am__objects_69 = $(am__objects_59) $(am__objects_60) $(am__objects_61) \ - $(am__objects_62) $(am__objects_63) upmpost-pmpost.$(OBJEXT) \ - $(am__objects_64) $(am__objects_65) $(am__objects_66) \ - $(am__objects_67) $(am__objects_68) upmpost-ptfmin.$(OBJEXT) -nodist_upmpost_OBJECTS = $(am__objects_69) +am__objects_60 = upmpost-pmp.$(OBJEXT) +am__objects_61 = upmpost-pmpmath.$(OBJEXT) +am__objects_62 = upmpost-pmpmathbinary.$(OBJEXT) +am__objects_63 = upmpost-pmpmathdecimal.$(OBJEXT) +am__objects_64 = upmpost-pmpmathdouble.$(OBJEXT) +am__objects_65 = upmpost-pmpstrings.$(OBJEXT) +am__objects_66 = upmpost-pmpxout.$(OBJEXT) +am__objects_67 = upmpost-ppngout.$(OBJEXT) +am__objects_68 = upmpost-ppsout.$(OBJEXT) +am__objects_69 = upmpost-psvgout.$(OBJEXT) +am__objects_70 = $(am__objects_60) $(am__objects_61) $(am__objects_62) \ + $(am__objects_63) $(am__objects_64) upmpost-pmpost.$(OBJEXT) \ + $(am__objects_65) $(am__objects_66) $(am__objects_67) \ + $(am__objects_68) $(am__objects_69) upmpost-ptfmin.$(OBJEXT) +nodist_upmpost_OBJECTS = $(am__objects_70) upmpost_OBJECTS = $(nodist_upmpost_OBJECTS) -am__DEPENDENCIES_15 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ +am__DEPENDENCIES_16 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) libmputil.a -upmpost_DEPENDENCIES = $(am__DEPENDENCIES_15) +upmpost_DEPENDENCIES = $(am__DEPENDENCIES_16) am_uppltotf_OBJECTS = nodist_uppltotf_OBJECTS = uppltotf-uppltotf.$(OBJEXT) uppltotf_OBJECTS = $(am_uppltotf_OBJECTS) $(nodist_uppltotf_OBJECTS) dist_uptex_OBJECTS = uptexdir/uptex-uptexextra.$(OBJEXT) -am__objects_70 = uptex-uptexini.$(OBJEXT) uptex-uptex0.$(OBJEXT) -nodist_uptex_OBJECTS = $(am__objects_70) uptex-uptex-pool.$(OBJEXT) +am__objects_71 = uptex-uptexini.$(OBJEXT) uptex-uptex0.$(OBJEXT) +nodist_uptex_OBJECTS = $(am__objects_71) uptex-uptex-pool.$(OBJEXT) uptex_OBJECTS = $(dist_uptex_OBJECTS) $(nodist_uptex_OBJECTS) am_uptftopl_OBJECTS = nodist_uptftopl_OBJECTS = uptftopl-uptftopl.$(OBJEXT) @@ -1667,20 +1675,20 @@ am__dist_xetex_SOURCES_DIST = xetexdir/xetexextra.c \ xetexdir/xetex_version.h synctexdir/synctex.c \ synctexdir/synctex.h synctexdir/synctex-common.h \ synctexdir/synctex-xetex.h -@XETEX_SYNCTEX_TRUE@am__objects_71 = \ +@XETEX_SYNCTEX_TRUE@am__objects_72 = \ @XETEX_SYNCTEX_TRUE@ synctexdir/xetex-synctex.$(OBJEXT) dist_xetex_OBJECTS = xetexdir/xetex-xetexextra.$(OBJEXT) \ - $(am__objects_71) -am__objects_72 = xetex-xetexini.$(OBJEXT) xetex-xetex0.$(OBJEXT) -nodist_xetex_OBJECTS = $(am__objects_72) xetex-xetex-pool.$(OBJEXT) + $(am__objects_72) +am__objects_73 = xetex-xetexini.$(OBJEXT) xetex-xetex0.$(OBJEXT) +nodist_xetex_OBJECTS = $(am__objects_73) xetex-xetex-pool.$(OBJEXT) xetex_OBJECTS = $(dist_xetex_OBJECTS) $(nodist_xetex_OBJECTS) -@XETEX_MACOSX_FALSE@am__DEPENDENCIES_16 = $(am__DEPENDENCIES_1) -am__DEPENDENCIES_17 = $(libxetex) $(am__DEPENDENCIES_1) \ +@XETEX_MACOSX_FALSE@am__DEPENDENCIES_17 = $(am__DEPENDENCIES_1) +am__DEPENDENCIES_18 = $(libxetex) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) libmd5.a $(am__DEPENDENCIES_16) -xetex_DEPENDENCIES = $(am__DEPENDENCIES_17) $(am__DEPENDENCIES_2) \ + $(am__DEPENDENCIES_1) libmd5.a $(am__DEPENDENCIES_17) +xetex_DEPENDENCIES = $(am__DEPENDENCIES_18) $(am__DEPENDENCIES_2) \ $(am__DEPENDENCIES_1) xetex_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(xetex_CXXFLAGS) \ @@ -1775,11 +1783,13 @@ am__depfiles_remade = ./$(DEPDIR)/aleph-aleph-pool.Po \ ./$(DEPDIR)/pmpost-pmpxout.Po ./$(DEPDIR)/pmpost-ppngout.Po \ ./$(DEPDIR)/pmpost-ppsout.Po ./$(DEPDIR)/pmpost-psvgout.Po \ ./$(DEPDIR)/pmpost-ptfmin.Po ./$(DEPDIR)/pooltype.Po \ - ./$(DEPDIR)/tangle.Po ./$(DEPDIR)/tangleboot.Po \ - ./$(DEPDIR)/tex-tex-pool.Po ./$(DEPDIR)/tex-tex0.Po \ - ./$(DEPDIR)/tex-texextra.Po ./$(DEPDIR)/tex-texini.Po \ - ./$(DEPDIR)/tftopl.Po ./$(DEPDIR)/tie-tie.Po \ - ./$(DEPDIR)/twill.Po ./$(DEPDIR)/upbibtex-upbibtex.Po \ + ./$(DEPDIR)/ptex-ptex-pool.Po ./$(DEPDIR)/ptex-ptex0.Po \ + ./$(DEPDIR)/ptex-ptexini.Po ./$(DEPDIR)/tangle.Po \ + ./$(DEPDIR)/tangleboot.Po ./$(DEPDIR)/tex-tex-pool.Po \ + ./$(DEPDIR)/tex-tex0.Po ./$(DEPDIR)/tex-texextra.Po \ + ./$(DEPDIR)/tex-texini.Po ./$(DEPDIR)/tftopl.Po \ + ./$(DEPDIR)/tie-tie.Po ./$(DEPDIR)/twill.Po \ + ./$(DEPDIR)/upbibtex-upbibtex.Po \ ./$(DEPDIR)/updvitype-updvitype.Po ./$(DEPDIR)/upmpost-pmp.Po \ ./$(DEPDIR)/upmpost-pmpmath.Po \ ./$(DEPDIR)/upmpost-pmpmathbinary.Po \ @@ -2340,6 +2350,7 @@ am__depfiles_remade = ./$(DEPDIR)/aleph-aleph-pool.Po \ pdftexdir/regex/$(DEPDIR)/libpdftex_a-regexec.Po \ ptexdir/$(DEPDIR)/libkanji_a-kanji.Po \ ptexdir/$(DEPDIR)/libkanji_a-kanji_dump.Po \ + ptexdir/$(DEPDIR)/ptex-ptexextra.Po \ synctexdir/$(DEPDIR)/eptex-synctex.Po \ synctexdir/$(DEPDIR)/etex-synctex.Po \ synctexdir/$(DEPDIR)/euptex-synctex.Po \ @@ -2489,22 +2500,22 @@ SOURCES = $(libff_a_SOURCES) $(libkanji_a_SOURCES) \ $(nodist_EXTRA_pdftosrc_SOURCES) $(nodist_pktogf_SOURCES) \ $(nodist_pktype_SOURCES) $(nodist_pltotf_SOURCES) \ $(nodist_pmpost_SOURCES) $(nodist_pooltype_SOURCES) \ - $(synctex_SOURCES) $(nodist_tangle_SOURCES) \ - $(nodist_tangleboot_SOURCES) $(dist_tex_SOURCES) \ - $(nodist_tex_SOURCES) $(nodist_tftopl_SOURCES) \ - $(nodist_tie_SOURCES) $(ttf2afm_SOURCES) \ - $(EXTRA_ttf2afm_SOURCES) $(nodist_twill_SOURCES) \ - $(upbibtex_SOURCES) $(nodist_upbibtex_SOURCES) \ - $(updvitype_SOURCES) $(nodist_updvitype_SOURCES) \ - $(nodist_upmpost_SOURCES) $(uppltotf_SOURCES) \ - $(nodist_uppltotf_SOURCES) $(dist_uptex_SOURCES) \ - $(nodist_uptex_SOURCES) $(uptftopl_SOURCES) \ - $(nodist_uptftopl_SOURCES) $(nodist_vftovp_SOURCES) \ - $(nodist_vptovf_SOURCES) $(nodist_weave_SOURCES) \ - $(nodist_wofm2opl_SOURCES) $(nodist_wopl2ofm_SOURCES) \ - $(nodist_wovf2ovp_SOURCES) $(nodist_wovp2ovf_SOURCES) \ - $(dist_xetex_SOURCES) $(nodist_xetex_SOURCES) \ - $(nodist_EXTRA_xetex_SOURCES) + $(dist_ptex_SOURCES) $(nodist_ptex_SOURCES) $(synctex_SOURCES) \ + $(nodist_tangle_SOURCES) $(nodist_tangleboot_SOURCES) \ + $(dist_tex_SOURCES) $(nodist_tex_SOURCES) \ + $(nodist_tftopl_SOURCES) $(nodist_tie_SOURCES) \ + $(ttf2afm_SOURCES) $(EXTRA_ttf2afm_SOURCES) \ + $(nodist_twill_SOURCES) $(upbibtex_SOURCES) \ + $(nodist_upbibtex_SOURCES) $(updvitype_SOURCES) \ + $(nodist_updvitype_SOURCES) $(nodist_upmpost_SOURCES) \ + $(uppltotf_SOURCES) $(nodist_uppltotf_SOURCES) \ + $(dist_uptex_SOURCES) $(nodist_uptex_SOURCES) \ + $(uptftopl_SOURCES) $(nodist_uptftopl_SOURCES) \ + $(nodist_vftovp_SOURCES) $(nodist_vptovf_SOURCES) \ + $(nodist_weave_SOURCES) $(nodist_wofm2opl_SOURCES) \ + $(nodist_wopl2ofm_SOURCES) $(nodist_wovf2ovp_SOURCES) \ + $(nodist_wovp2ovf_SOURCES) $(dist_xetex_SOURCES) \ + $(nodist_xetex_SOURCES) $(nodist_EXTRA_xetex_SOURCES) DIST_SOURCES = $(libff_a_SOURCES) $(libkanji_a_SOURCES) \ $(libluaharfbuzz_a_SOURCES) $(libluajitharfbuzz_a_SOURCES) \ $(dist_libluajittex_a_SOURCES) $(dist_libluatex_a_SOURCES) \ @@ -2521,11 +2532,11 @@ DIST_SOURCES = $(libff_a_SOURCES) $(libkanji_a_SOURCES) \ $(dist_mf_SOURCES) $(dist_mf_nowin_SOURCES) \ $(dist_mflua_SOURCES) $(dist_mfluajit_SOURCES) \ $(am__dist_pdftex_SOURCES_DIST) $(pdftosrc_SOURCES) \ - $(synctex_SOURCES) $(am__dist_tex_SOURCES_DIST) \ - $(ttf2afm_SOURCES) $(EXTRA_ttf2afm_SOURCES) \ - $(upbibtex_SOURCES) $(updvitype_SOURCES) $(uppltotf_SOURCES) \ - $(dist_uptex_SOURCES) $(uptftopl_SOURCES) \ - $(am__dist_xetex_SOURCES_DIST) + $(dist_ptex_SOURCES) $(synctex_SOURCES) \ + $(am__dist_tex_SOURCES_DIST) $(ttf2afm_SOURCES) \ + $(EXTRA_ttf2afm_SOURCES) $(upbibtex_SOURCES) \ + $(updvitype_SOURCES) $(uppltotf_SOURCES) $(dist_uptex_SOURCES) \ + $(uptftopl_SOURCES) $(am__dist_xetex_SOURCES_DIST) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ @@ -2731,14 +2742,15 @@ am__set_TESTS_bases = \ bases=`echo $$bases` AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' RECHECK_LOGS = $(TEST_LOGS) -am__EXEEXT_41 = bibtex.test dvicopy.test dvitype.test gftodvi.test \ +am__EXEEXT_43 = bibtex.test dvicopy.test dvitype.test gftodvi.test \ gftopk.test gftype.test mft.test patgen.test pktogf.test \ pktype.test pltotf.test pooltype.test tftopl.test vftovp.test \ vptovf.test weave.test twill.test -am__EXEEXT_42 = $(am__EXEEXT_41) tests/bibtex-openout-test.pl \ +am__EXEEXT_44 = $(am__EXEEXT_43) tests/bibtex-openout-test.pl \ tests/bibtex-longline-test.pl tests/bibtex-mem.test \ tests/bibtex-bigauth.test tests/bibtex-auxinclude.test -@WEB_TRUE@am__EXEEXT_43 = $(am__EXEEXT_42) +@WEB_TRUE@am__EXEEXT_45 = $(am__EXEEXT_44) +am__EXEEXT_46 = TEST_SUITE_LOG = test-suite.log am__test_logs1 = $(TESTS:=.log) am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) @@ -2969,7 +2981,7 @@ NM = @NM@ NMEDIT = @NMEDIT@ OBJCXX = @OBJCXX@ OBJCXXDEPMODE = @OBJCXXDEPMODE@ -OBJCXXFLAGS = @OBJCXXFLAGS@ $(am__append_105) +OBJCXXFLAGS = @OBJCXXFLAGS@ $(am__append_114) OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTANGLE = @OTANGLE@ @@ -3116,8 +3128,8 @@ EXTRA_LIBRARIES = libmf.a libmflua.a libmfluaotfcc.a libmfluapotrace.a \ libluaharfbuzz.a libluajitharfbuzz.a libxetex.a libsynctex.a \ libmd5.a EXTRA_LTLIBRARIES = libsynctex.la -lib_LIBRARIES = $(am__append_117) -lib_LTLIBRARIES = $(am__append_116) +lib_LIBRARIES = $(am__append_126) +lib_LTLIBRARIES = $(am__append_125) dist_man_MANS = synctexdir/man1/synctex.1 synctexdir/man5/synctex.5 nodist_man_MANS = TEST_EXTENSIONS = .pl .test @@ -3204,12 +3216,13 @@ EXTRA_DIST = PROJECTS cftests cpascal.h help.h w2c/config.h \ etexdir/etrip/trip2.in $(ptex_web_srcs) $(ptex_ch_srcs) \ ptexdir/ptex.defines ptexdir/COPYRIGHT ptexdir/COPYRIGHT.jis \ ptexdir/ChangeLog ptexdir/Changes.txt ptexdir/INSTALL.txt \ - ptexdir/README.txt ptexdir/tests/nissya.bst \ - ptexdir/tests/sample.bib tests/testfield.bst tests/enc-asc.bib \ - tests/enc-jis.bib tests/enc-sjis.bib tests/enc-euc.bib \ - tests/enc-utf8.bib tests/enc-utf8a.bib tests/enc-utf8b.bib \ - tests/enc-amb0.bib tests/enc-amb1.bib tests/enc-amb2.bib \ - tests/enc.aux tests/enc-e.aux tests/enc-s.aux tests/enc-u.aux \ + ptexdir/README.txt $(ptex_tests) $(pweb_tests) \ + ptexdir/tests/nissya.bst ptexdir/tests/sample.bib \ + tests/testfield.bst tests/enc-asc.bib tests/enc-jis.bib \ + tests/enc-sjis.bib tests/enc-euc.bib tests/enc-utf8.bib \ + tests/enc-utf8a.bib tests/enc-utf8b.bib tests/enc-amb0.bib \ + tests/enc-amb1.bib tests/enc-amb2.bib tests/enc.aux \ + tests/enc-e.aux tests/enc-s.aux tests/enc-u.aux \ tests/enc-p.bbl tests/enc-ep.bbl tests/enc-sp.bbl \ tests/enc-up.bbl tests/memdata1.bst tests/memdata2.bst \ tests/memdata3.bst ptexdir/tests/ptex3.tex \ @@ -3556,81 +3569,86 @@ DISTCLEANFILES = CXXLD.sh tangle.c tangle.h tangle.p tangle-web2c \ $(nodist_etex_SOURCES) etex.web etex.ch etex-web2c etex.p \ etex.pool etex-tangle etrip.diffs ewprob.log ewprob.tex \ $(nodist_ptex_SOURCES) ptex.web ptex.ch ptex-web2c ptex.p \ - ptex.pool ptex-tangle ptests/nissya_bib.* ptests/xexampl.aux \ - ptests/xexampl.bbl ptests/xexampl.blg ptests/xenc*.* \ - ptests/fn*.* ptests/memtest.bib ptests/memtest?.* \ - ptests/xstory.dvityp ptests/xpagenum.typ ptests/xptex[34]*.typ \ - ptests/xcmr10.tfm ptests/xcmr10.pl ptests/xsample*.typ \ - ptests/x*min10.* ptests/xchcode*.* ptests/xskipjfmp.* \ - ptrip.diffs $(nodist_eptex_SOURCES) eptex.web eptex.ch \ - eptex-web2c eptex.p eptex.pool eptex-tangle eptrip.diffs \ - pdfprimitive-eptex.* $(nodist_uptex_SOURCES) uptex.web \ - uptex.ch uptex-web2c uptex.p uptex.pool uptex-tangle \ - $(upweb_programs:=.c) $(upweb_programs:=.h) \ - $(upweb_programs:=.p) $(upweb_programs:=-web2c) \ - $(upweb_programs:=.web) uptests/nissya_bib.* \ - uptests/xexampl.aux uptests/xexampl.bbl uptests/xexampl.blg \ - uptests/xenc*.* uptests/fn*.* uptests/memtest.bib \ - uptests/memtest?.* uptests/xstory.dvityp uptests/xpagenum.typ \ - uptests/x*ptex[34]*.typ uptests/xcmr10.tfm uptests/xcmr10.pl \ - uptests/xsample*.typ uptests/x*min10.* uptests/xchcode*.* \ - uptests/xtestnewu.* uptests/xuparse.* uptests/yuparse.* \ - uptests/ygkhuge*.* uptests/xskipjfmp.* uptrip.diffs \ - $(nodist_euptex_SOURCES) euptex.web euptex.ch euptex-web2c \ - euptex.p euptex.pool euptex-tangle euptrip.diffs \ - pdfprimitive-euptex.* $(nodist_hitex_SOURCES) \ - $(nodist_hishrink_SOURCES) $(nodist_histretch_SOURCES) \ - hiformat-tangle hitex-tangle hello.log rule.log \ - $(nodist_pdftex_SOURCES) pdftex-final.ch pdftex-web2c pdftex.p \ - pdftex.pool pdftex-tangle pwprob.log pwprob.tex pdfimage.fmt \ - pdfimage.log pdfimage.pdf expanded.log cnfline.log \ - partoken-ok.log partoken-xfail.log pdftests/fn*.* postV3.afm \ - postV7.afm test-13.pdf test-13.xref test-15.pdf test-15.xref \ - $(nodist_libluatex_sources) luaimage.* luajitimage.* \ - $(nodist_xetex_SOURCES) xetex.web xetex-final.ch xetex-web2c \ - xetex.p xetex.pool xetex-tangle bug73.fmt bug73.log bug73.out \ - bug73.tex filedump.log filedump.out filedump.tex xetests/fn*.* \ - $(omegaware_programs:=.c) $(omegaware_programs:=.h) \ - $(omegaware_programs:=.p) $(omegaware_programs:=-web2c) \ - ofm2opl.web opl2ofm.web ovf2ovp.web ovp2ovf.web \ - omegaware/bad*.* omegaware/tests/charwdr.* \ - omegaware/tests/charwdv.* omegaware/tests/xcheck* \ - omegaware/tests/xlevel1.* omegaware/tests/xlig*.* ofont*vf \ - omegaware/tests/xpagenum.* omegaware/tests/xofont* \ - omegaware/tests/Cherokee.tfm omegaware/tests/OCherokee.ofm \ - omegaware/tests/OCherokee.opl omegaware/tests/OCherokee.ovf \ - omegaware/tests/xCherokee.* omegaware/tests/xOCherokee.* \ - ocftest.* omegaware/tests/xinbmp* omegaware/tests/xoverbmp* \ - omegaware/tests/xrealnum.* omegaware/tests/xrepeated.* \ - omegaware/tests/sample*.ofm omegaware/tests/sample*.ovf \ - omegaware/tests/sample1-h.opl omegaware/tests/xsample*.out \ - omegaware/tests/shortend.* omegaware/tests/specialhex.ofm \ - omegaware/tests/specialhex.opl omegaware/tests/specialhex.ovf \ - omegaware/tests/xspecialhex.* omegaware/tests/yrepeat* \ - omegaware/tests/*yarabic* $(nodist_aleph_SOURCES) aleph.web \ - aleph.ch aleph-web2c aleph.p aleph.pool aleph-tangle + ptex.pool ptex-tangle $(pweb_programs:=.c) \ + $(pweb_programs:=.h) $(pweb_programs:=.p) \ + $(pweb_programs:=-web2c) $(pweb_programs:=.web) \ + ptests/nissya_bib.* ptests/xexampl.aux ptests/xexampl.bbl \ + ptests/xexampl.blg ptests/xenc*.* ptests/fn*.* \ + ptests/memtest.bib ptests/memtest?.* ptests/xstory.dvityp \ + ptests/xpagenum.typ ptests/xptex[34]*.typ ptests/xcmr10.tfm \ + ptests/xcmr10.pl ptests/xsample*.typ ptests/x*min10.* \ + ptests/xchcode*.* ptests/xskipjfmp.* ptrip.diffs \ + $(nodist_eptex_SOURCES) eptex.web eptex.ch eptex-web2c eptex.p \ + eptex.pool eptex-tangle eptrip.diffs pdfprimitive-eptex.* \ + $(nodist_uptex_SOURCES) uptex.web uptex.ch uptex-web2c uptex.p \ + uptex.pool uptex-tangle $(upweb_programs:=.c) \ + $(upweb_programs:=.h) $(upweb_programs:=.p) \ + $(upweb_programs:=-web2c) $(upweb_programs:=.web) \ + uptests/nissya_bib.* uptests/xexampl.aux uptests/xexampl.bbl \ + uptests/xexampl.blg uptests/xenc*.* uptests/fn*.* \ + uptests/memtest.bib uptests/memtest?.* uptests/xstory.dvityp \ + uptests/xpagenum.typ uptests/x*ptex[34]*.typ \ + uptests/xcmr10.tfm uptests/xcmr10.pl uptests/xsample*.typ \ + uptests/x*min10.* uptests/xchcode*.* uptests/xtestnewu.* \ + uptests/xuparse.* uptests/yuparse.* uptests/ygkhuge*.* \ + uptests/xskipjfmp.* uptrip.diffs $(nodist_euptex_SOURCES) \ + euptex.web euptex.ch euptex-web2c euptex.p euptex.pool \ + euptex-tangle euptrip.diffs pdfprimitive-euptex.* \ + $(nodist_hitex_SOURCES) $(nodist_hishrink_SOURCES) \ + $(nodist_histretch_SOURCES) hiformat-tangle hitex-tangle \ + hello.log rule.log $(nodist_pdftex_SOURCES) pdftex-final.ch \ + pdftex-web2c pdftex.p pdftex.pool pdftex-tangle pwprob.log \ + pwprob.tex pdfimage.fmt pdfimage.log pdfimage.pdf expanded.log \ + cnfline.log partoken-ok.log partoken-xfail.log pdftests/fn*.* \ + postV3.afm postV7.afm test-13.pdf test-13.xref test-15.pdf \ + test-15.xref $(nodist_libluatex_sources) luaimage.* \ + luajitimage.* $(nodist_xetex_SOURCES) xetex.web xetex-final.ch \ + xetex-web2c xetex.p xetex.pool xetex-tangle bug73.fmt \ + bug73.log bug73.out bug73.tex filedump.log filedump.out \ + filedump.tex xetests/fn*.* $(omegaware_programs:=.c) \ + $(omegaware_programs:=.h) $(omegaware_programs:=.p) \ + $(omegaware_programs:=-web2c) ofm2opl.web opl2ofm.web \ + ovf2ovp.web ovp2ovf.web omegaware/bad*.* \ + omegaware/tests/charwdr.* omegaware/tests/charwdv.* \ + omegaware/tests/xcheck* omegaware/tests/xlevel1.* \ + omegaware/tests/xlig*.* ofont*vf omegaware/tests/xpagenum.* \ + omegaware/tests/xofont* omegaware/tests/Cherokee.tfm \ + omegaware/tests/OCherokee.ofm omegaware/tests/OCherokee.opl \ + omegaware/tests/OCherokee.ovf omegaware/tests/xCherokee.* \ + omegaware/tests/xOCherokee.* ocftest.* omegaware/tests/xinbmp* \ + omegaware/tests/xoverbmp* omegaware/tests/xrealnum.* \ + omegaware/tests/xrepeated.* omegaware/tests/sample*.ofm \ + omegaware/tests/sample*.ovf omegaware/tests/sample1-h.opl \ + omegaware/tests/xsample*.out omegaware/tests/shortend.* \ + omegaware/tests/specialhex.ofm omegaware/tests/specialhex.opl \ + omegaware/tests/specialhex.ovf omegaware/tests/xspecialhex.* \ + omegaware/tests/yrepeat* omegaware/tests/*yarabic* \ + $(nodist_aleph_SOURCES) aleph.web aleph.ch aleph-web2c aleph.p \ + aleph.pool aleph-tangle CLEANFILES = $(EXTRA_PROGRAMS) $(EXTRA_LIBRARIES) $(EXTRA_LTLIBRARIES) TRIPTRAP_CLEAN = $(am__append_8) $(am__append_18) $(am__append_27) \ $(am__append_36) $(am__append_44) $(am__append_60) \ - $(am__append_65) $(am__append_72) + $(am__append_64) $(am__append_70) $(am__append_75) \ + $(am__append_81) TRIPTRAP = $(am__append_7) $(am__append_17) $(am__append_26) \ $(am__append_35) $(am__append_43) $(am__append_59) \ - $(am__append_64) $(am__append_71) + $(am__append_63) $(am__append_69) $(am__append_74) \ + $(am__append_80) bin_links = $(am__append_5) $(am__append_14) $(am__append_15) \ $(am__append_24) $(am__append_33) $(am__append_41) \ - $(am__append_49) $(am__append_54) $(am__append_62) \ + $(am__append_49) $(am__append_54) $(am__append_67) \ upbibtex$(EXEEXT):pbibtex updvitype$(EXEEXT):pdvitype \ uppltotf$(EXEEXT):ppltotf uptftopl$(EXEEXT):ptftopl \ - $(am__append_69) $(am__append_83) $(am__append_88) \ - $(am__append_93) $(am__append_98) + $(am__append_78) $(am__append_92) $(am__append_97) \ + $(am__append_102) $(am__append_107) install_exe_links = $(am__append_12) $(am__append_22) $(am__append_31) \ $(am__append_39) $(am__append_47) $(am__append_52) \ - $(am__append_81) $(am__append_86) $(am__append_91) \ - $(am__append_96) + $(am__append_90) $(am__append_95) $(am__append_100) \ + $(am__append_105) uninstall_exe_links = $(am__append_13) $(am__append_23) \ $(am__append_32) $(am__append_40) $(am__append_48) \ - $(am__append_53) $(am__append_82) $(am__append_87) \ - $(am__append_92) $(am__append_97) + $(am__append_53) $(am__append_91) $(am__append_96) \ + $(am__append_101) $(am__append_106) NEVER_DIST = `find . $(NEVER_NAMES)` cwebdir/cweave.log \ cwebdir/cweave.trs cwebdir/ctwill.log cwebdir/ctwill.trs \ cwebdir/refsort.log cwebdir/refsort.trs cwebdir/twinx.log \ @@ -3806,18 +3824,18 @@ tie_CPPFLAGS = $(AM_CPPFLAGS) -DNOT_WEB2C initex_CPPFLAGS = -DEXEPROG=\"tex.exe\" nodist_initex_SOURCES = callexe.c initex_LDADD = -tex_CPPFLAGS = $(AM_CPPFLAGS) $(am__append_121) +tex_CPPFLAGS = $(AM_CPPFLAGS) $(am__append_130) # With --enable-ipc, TeX may need to link with -lsocket. -tex_LDADD = $(LDADD) $(ipc_socketlibs) $(am__append_122) +tex_LDADD = $(LDADD) $(ipc_socketlibs) $(am__append_131) # TeX C sources tex_c_h = texini.c tex0.c texcoerce.h texd.h nodist_tex_SOURCES = $(tex_c_h) tex-pool.c -dist_tex_SOURCES = texextra.c $(am__append_124) +dist_tex_SOURCES = texextra.c $(am__append_133) # We must create texd.h before building the tex_OBJECTS. -tex_prereq = texd.h $(am__append_123) +tex_prereq = texd.h $(am__append_132) tex_ch_srcs = \ tex.web \ tex.ch \ @@ -4313,21 +4331,21 @@ libmplib_web = mplibdir/mp.w mplibdir/psout.w mplibdir/svgout.w \ mplibdir/pngout.w mplibdir/mpmath.w mplibdir/mpmathbinary.w \ mplibdir/mpmathdecimal.w mplibdir/mpmathdouble.w \ mplibdir/mpstrings.w mplibdir/tfmin.w -etex_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_INCLUDES) $(am__append_125) +etex_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_INCLUDES) $(am__append_134) # With --enable-ipc, e-TeX may need to link with -lsocket. -etex_LDADD = $(LDADD) $(ZLIB_LIBS) $(ipc_socketlibs) $(am__append_126) +etex_LDADD = $(LDADD) $(ZLIB_LIBS) $(ipc_socketlibs) $(am__append_135) etex_DEPENDENCIES = $(ZLIB_DEPEND) # e-TeX C sources etex_c_h = etexini.c etex0.c etexcoerce.h etexd.h nodist_etex_SOURCES = $(etex_c_h) etex-pool.c dist_etex_SOURCES = etexdir/etexextra.c etexdir/etexextra.h \ - etexdir/etex_version.h $(am__append_128) + etexdir/etex_version.h $(am__append_137) # We must create etexd.h and etexdir/etex_version.h before building the # etex_OBJECTS. -etex_prereq = etexd.h etexdir/etex_version.h $(am__append_127) +etex_prereq = etexd.h etexdir/etex_version.h $(am__append_136) etex_web_srcs = \ tex.web \ etexdir/etex.ch @@ -4351,11 +4369,25 @@ etex_tests = etexdir/wprob.test etexdir/etriptest.test ptex_cppflags = $(PTEXENC_INCLUDES) $(AM_CPPFLAGS) $(ZLIB_INCLUDES) ptex_ldadd = libkanji.a $(pproglib) $(PTEXENC_LIBS) $(LDADD) $(ZLIB_LIBS) ptex_dependencies = libkanji.a $(pproglib) $(PTEXENC_DEPEND) $(ZLIB_DEPEND) $(default_dependencies) +p_tangle = $(tangle_silent)WEBINPUTS=.:$(srcdir)/ptexdir:$(srcdir) $(buildenv) $(TANGLE) pproglib = lib/libp.a libkanji_a_SOURCES = ptexdir/kanji.c ptexdir/kanji.h ptexdir/kanji_dump.c libkanji_a_CPPFLAGS = $(ptex_cppflags) +#if PWEB +#bin_PROGRAMS += $(pweb_programs) +#endif PWEB +#EXTRA_PROGRAMS += ptex $(pweb_programs) ptex_CPPFLAGS = $(ptex_cppflags) +# With --enable-ipc, pTeX may need to link with -lsocket. +ptex_LDADD = $(ptex_ldadd) $(ipc_socketlibs) +ptex_DEPENDENCIES = $(ptex_dependencies) + +# pTeX C sources +ptex_c_h = ptexini.c ptex0.c ptexcoerce.h ptexd.h +nodist_ptex_SOURCES = $(ptex_c_h) ptex-pool.c +dist_ptex_SOURCES = ptexdir/ptexextra.c ptexdir/ptexextra.h ptexdir/ptex_version.h + # We must create ptexd.h and ptexdir/ptex_version.h before building the ptex_OBJECTS. ptex_prereq = ptexd.h ptexdir/ptex_version.h ptex_web_srcs = \ @@ -4370,23 +4402,27 @@ ptex_ch_srcs = \ $(ptex_ch_synctex) \ tex-binpool.ch + +# pTeX Tests +# +ptex_tests = ptexdir/ptriptest.test ptexdir/pver.test ptexdir/wcfname.test eptex_CPPFLAGS = $(PTEXENC_INCLUDES) $(AM_CPPFLAGS) -I$(srcdir)/libmd5 \ - $(ZLIB_INCLUDES) $(am__append_129) + $(ZLIB_INCLUDES) $(am__append_138) # With --enable-ipc, e-pTeX may need to link with -lsocket. eptex_LDADD = libkanji.a $(pproglib) $(PTEXENC_LIBS) $(LDADD) \ - $(ipc_socketlibs) libmd5.a $(ZLIB_LIBS) $(am__append_130) + $(ipc_socketlibs) libmd5.a $(ZLIB_LIBS) $(am__append_139) eptex_DEPENDENCIES = libkanji.a $(pproglib) $(PTEXENC_DEPEND) $(default_dependencies) libmd5.a $(ZLIB_DEPEND) # e-pTeX C sources eptex_c_h = eptexini.c eptex0.c eptexcoerce.h eptexd.h nodist_eptex_SOURCES = $(eptex_c_h) eptex-pool.c dist_eptex_SOURCES = eptexdir/eptexextra.c eptexdir/eptexextra.h \ - eptexdir/eptex_version.h $(am__append_132) + eptexdir/eptex_version.h $(am__append_141) # We must create eptexd.h and eptexdir/eptex_version.h before building the eptex_OBJECTS. eptex_prereq = eptexd.h etexdir/etex_version.h ptexdir/ptex_version.h \ - eptexdir/eptex_version.h $(am__append_131) + eptexdir/eptex_version.h $(am__append_140) eptex_web_srcs = \ tex.web \ etexdir/etex.ch \ @@ -4468,6 +4504,9 @@ uptftopl_SOURCES = uptexdir/kanji.h uptftopl_CPPFLAGS = $(uptex_cppflags) uptftopl_LDADD = $(uptex_ldadd) uptftopl_DEPENDENCIES = $(uptex_dependencies) + +# upTeX Tests +uptex_tests = uptexdir/uptriptest.test uptexdir/ptriptest.test uptexdir/upver.test uptexdir/upkcat.test uptexdir/wcfname.test # uppPLtoTF/upTFtoPL upweb_tests = uptexdir/upbibtex.test uptexdir/updvitype.test \ uptexdir/uppltotf.test uptexdir/uptftopl.test \ @@ -4477,23 +4516,23 @@ upweb_tests = uptexdir/upbibtex.test uptexdir/updvitype.test \ uptexdir/yokotate.test uptexdir/skipjfmp.test \ uptexdir/newjfm.test uptexdir/uparse.test uptexdir/gkhuge.test euptex_CPPFLAGS = $(PTEXENC_INCLUDES) $(AM_CPPFLAGS) \ - -I$(srcdir)/libmd5 $(ZLIB_INCLUDES) $(am__append_133) + -I$(srcdir)/libmd5 $(ZLIB_INCLUDES) $(am__append_142) # With --enable-ipc, e-upTeX may need to link with -lsocket. euptex_LDADD = libukanji.a $(pproglib) $(PTEXENC_LIBS) $(LDADD) \ - $(ipc_socketlibs) libmd5.a $(ZLIB_LIBS) $(am__append_134) + $(ipc_socketlibs) libmd5.a $(ZLIB_LIBS) $(am__append_143) euptex_DEPENDENCIES = libukanji.a $(pproglib) $(PTEXENC_DEPEND) $(default_dependencies) libmd5.a $(ZLIB_DEPEND) # e-upTeX C sources euptex_c_h = euptexini.c euptex0.c euptexcoerce.h euptexd.h nodist_euptex_SOURCES = $(euptex_c_h) euptex-pool.c dist_euptex_SOURCES = euptexdir/euptexextra.c euptexdir/euptexextra.h \ - $(am__append_136) + $(am__append_145) # We must create euptexd.h and [eu]ptexdir/[eu]ptex_version.h before building the euptex_OBJECTS. euptex_prereq = euptexd.h etexdir/etex_version.h \ ptexdir/ptex_version.h eptexdir/eptex_version.h \ - uptexdir/uptex_version.h $(am__append_135) + uptexdir/uptex_version.h $(am__append_144) euptex_web_srcs = \ tex.web \ etexdir/etex.ch \ @@ -4605,7 +4644,7 @@ libpdftex_a_SOURCES = pdftexdir/avl.c pdftexdir/avl.h \ pdftexdir/writejbig2.c pdftexdir/writejpg.c \ pdftexdir/writepng.c pdftexdir/writet1.c pdftexdir/writet3.c \ pdftexdir/writettf.c pdftexdir/writettf.h pdftexdir/writezip.c \ - $(am__append_76) + $(am__append_85) @MINGW32_TRUE@REGEX_INCLUDES = -I$(srcdir)/pdftexdir/regex EXTRA_libpdftex_a_SOURCES = pdftexdir/macnames.c \ pdftexdir/regex/regcomp.c pdftexdir/regex/regex_internal.c \ @@ -4621,7 +4660,7 @@ pdftex_dependencies = $(proglib) $(KPATHSEA_DEPEND) $(LIBPNG_DEPEND) \ # Force Automake to use CXXLD for linking nodist_EXTRA_pdftex_SOURCES = dummy.cxx pdf_tangle = WEBINPUTS=.:$(srcdir)/pdftexdir AM_V_P=$(AM_V_P) $(SHELL) ./tangle-sh $@ $(TANGLE) -pdftex_CPPFLAGS = $(pdftex_cppflags) $(am__append_137) +pdftex_CPPFLAGS = $(pdftex_cppflags) $(am__append_146) pdftex_CXXFLAGS = $(WARNING_CXXFLAGS) # With --enable-ipc, pdfTeX may need to link with -lsocket. @@ -4634,7 +4673,7 @@ pdftex_c_h = pdftexini.c pdftex0.c pdftexcoerce.h pdftexd.h nodist_pdftex_SOURCES = $(pdftex_c_h) pdftex-pool.c dist_pdftex_SOURCES = pdftexdir/pdftexextra.c pdftexdir/pdftexextra.h \ pdftexdir/pdftex_version.h pdftexdir/etex_version.h \ - $(am__append_138) + $(am__append_147) pdftex_ch_srcs = \ pdftexdir/pdftex.web \ pdftexdir/tex.ch0 \ @@ -5311,18 +5350,18 @@ libxetex = libxetex.a xetex_cppflags = $(AM_CPPFLAGS) -I$(srcdir)/xetexdir $(ICU_INCLUDES) \ $(FREETYPE2_INCLUDES) $(TECKIT_INCLUDES) $(HARFBUZZ_INCLUDES) \ $(GRAPHITE2_INCLUDES) $(LIBPNG_INCLUDES) $(ZLIB_INCLUDES) \ - $(PPLIB_INCLUDES) -I$(srcdir)/libmd5 $(am__append_104) \ - $(am__append_106) + $(PPLIB_INCLUDES) -I$(srcdir)/libmd5 $(am__append_113) \ + $(am__append_115) xetex_ldadd = $(libxetex) $(HARFBUZZ_LIBS) $(GRAPHITE2_LIBS) \ $(ICU_LIBS) $(ICU_LIBS_EXTRA) $(TECKIT_LIBS) $(LIBPNG_LIBS) \ $(FREETYPE2_LIBS) $(PPLIB_LIBS) $(ZLIB_LIBS) libmd5.a \ - $(am__append_107) + $(am__append_116) xetex_dependencies = $(proglib) $(KPATHSEA_DEPEND) $(ICU_DEPEND) \ $(TECKIT_DEPEND) $(HARFBUZZ_DEPEND) $(GRAPHITE2_DEPEND) \ $(LIBPNG_DEPEND) $(FREETYPE2_DEPEND) $(ZLIB_DEPEND) \ $(PPLIB_DEPEND) libmd5.a @XETEX_MACOSX_TRUE@xetex_LDFLAGS = -framework ApplicationServices -framework Cocoa -xetex_CPPFLAGS = $(xetex_cppflags) $(am__append_139) +xetex_CPPFLAGS = $(xetex_cppflags) $(am__append_148) xetex_CFLAGS = $(WARNING_CFLAGS) xetex_CXXFLAGS = # $(WARNING_CXXFLAGS) xetex_LDADD = $(xetex_ldadd) $(LDADD) $(ipc_socketlibs) @@ -5331,7 +5370,7 @@ xetex_c_h = xetexini.c xetex0.c xetexcoerce.h xetexd.h nodist_xetex_SOURCES = $(xetex_c_h) xetex-pool.c dist_xetex_SOURCES = xetexdir/xetexextra.c xetexdir/xetexextra.h \ xetexdir/etex_version.h xetexdir/xetex_version.h \ - $(am__append_140) + $(am__append_149) xetex_ch_srcs = \ xetexdir/xetex.web \ xetexdir/tex.ch0 \ @@ -5363,7 +5402,7 @@ libxetex_a_SOURCES = xetexdir/XeTeXFontInst.cpp \ xetexdir/image/jpegimage.h xetexdir/image/mfileio.c \ xetexdir/image/mfileio.h xetexdir/image/numbers.c \ xetexdir/image/numbers.h xetexdir/image/pngimage.c \ - xetexdir/image/pngimage.h $(am__append_108) $(am__append_109) + xetexdir/image/pngimage.h $(am__append_117) $(am__append_118) # We must create xetexd.h etc. before building the libxetex_a_OBJECTS. libxetex_prereq = xetexd.h $(xetex_dependencies) @@ -5443,7 +5482,8 @@ aleph_web_srcs = \ alephdir/eonewdir.ch \ alephdir/eover.ch \ alephdir/eopage.ch \ - alephdir/eochar.ch + alephdir/eochar.ch \ + alephdir/latespecial.ch # Generate aleph.ch @@ -5468,13 +5508,13 @@ aleph_tests = alephdir/aleph.test synctex_SOURCES = \ synctexdir/synctex_main.c -synctex_CPPFLAGS = -I$(srcdir)/synctexdir $(am__append_118) -synctex_LDADD = $(libsynctex) $(ZLIB_LIBS) $(am__append_119) +synctex_CPPFLAGS = -I$(srcdir)/synctexdir $(am__append_127) +synctex_LDADD = $(libsynctex) $(ZLIB_LIBS) $(am__append_128) libsynctex = $(LTLIBSYNCTEX) $(LIBSYNCTEX) libsynctex_la_CPPFLAGS = -I$(srcdir)/synctexdir $(ZLIB_INCLUDES) -DSYNCTEX_USE_LOCAL_HEADER libsynctex_a_CPPFLAGS = $(libsynctex_la_CPPFLAGS) libsynctex_la_LDFLAGS = -rpath @libdir@ -bindir @bindir@ -no-undefined -version-info $(SYNCTEX_LT_VERSINFO) -libsynctex_la_LIBADD = $(ZLIB_LIBS) $(am__append_120) +libsynctex_la_LIBADD = $(ZLIB_LIBS) $(am__append_129) libsynctex_la_SOURCES = \ synctexdir/synctex_parser.c \ synctexdir/synctex_parser_local.h \ @@ -8210,6 +8250,12 @@ pmpost$(EXEEXT): $(pmpost_OBJECTS) $(pmpost_DEPENDENCIES) $(EXTRA_pmpost_DEPENDE pooltype$(EXEEXT): $(pooltype_OBJECTS) $(pooltype_DEPENDENCIES) $(EXTRA_pooltype_DEPENDENCIES) @rm -f pooltype$(EXEEXT) $(AM_V_CCLD)$(LINK) $(pooltype_OBJECTS) $(pooltype_LDADD) $(LIBS) +ptexdir/ptex-ptexextra.$(OBJEXT): ptexdir/$(am__dirstamp) \ + ptexdir/$(DEPDIR)/$(am__dirstamp) + +ptex$(EXEEXT): $(ptex_OBJECTS) $(ptex_DEPENDENCIES) $(EXTRA_ptex_DEPENDENCIES) + @rm -f ptex$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ptex_OBJECTS) $(ptex_LDADD) $(LIBS) synctexdir/synctex-synctex_main.$(OBJEXT): synctexdir/$(am__dirstamp) \ synctexdir/$(DEPDIR)/$(am__dirstamp) @@ -8498,6 +8544,9 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pmpost-psvgout.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pmpost-ptfmin.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pooltype.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ptex-ptex-pool.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ptex-ptex0.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ptex-ptexini.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tangle.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tangleboot.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tex-tex-pool.Po@am__quote@ # am--include-marker @@ -9078,6 +9127,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@pdftexdir/regex/$(DEPDIR)/libpdftex_a-regexec.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@ptexdir/$(DEPDIR)/libkanji_a-kanji.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@ptexdir/$(DEPDIR)/libkanji_a-kanji_dump.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@ptexdir/$(DEPDIR)/ptex-ptexextra.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@synctexdir/$(DEPDIR)/eptex-synctex.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@synctexdir/$(DEPDIR)/etex-synctex.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@synctexdir/$(DEPDIR)/euptex-synctex.Po@am__quote@ # am--include-marker @@ -18020,6 +18070,62 @@ pmpost-ptfmin.obj: ptfmin.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pmpost_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pmpost-ptfmin.obj `if test -f 'ptfmin.c'; then $(CYGPATH_W) 'ptfmin.c'; else $(CYGPATH_W) '$(srcdir)/ptfmin.c'; fi` +ptexdir/ptex-ptexextra.o: ptexdir/ptexextra.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ptex_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ptexdir/ptex-ptexextra.o -MD -MP -MF ptexdir/$(DEPDIR)/ptex-ptexextra.Tpo -c -o ptexdir/ptex-ptexextra.o `test -f 'ptexdir/ptexextra.c' || echo '$(srcdir)/'`ptexdir/ptexextra.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ptexdir/$(DEPDIR)/ptex-ptexextra.Tpo ptexdir/$(DEPDIR)/ptex-ptexextra.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ptexdir/ptexextra.c' object='ptexdir/ptex-ptexextra.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ptex_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ptexdir/ptex-ptexextra.o `test -f 'ptexdir/ptexextra.c' || echo '$(srcdir)/'`ptexdir/ptexextra.c + +ptexdir/ptex-ptexextra.obj: ptexdir/ptexextra.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ptex_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ptexdir/ptex-ptexextra.obj -MD -MP -MF ptexdir/$(DEPDIR)/ptex-ptexextra.Tpo -c -o ptexdir/ptex-ptexextra.obj `if test -f 'ptexdir/ptexextra.c'; then $(CYGPATH_W) 'ptexdir/ptexextra.c'; else $(CYGPATH_W) '$(srcdir)/ptexdir/ptexextra.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ptexdir/$(DEPDIR)/ptex-ptexextra.Tpo ptexdir/$(DEPDIR)/ptex-ptexextra.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ptexdir/ptexextra.c' object='ptexdir/ptex-ptexextra.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ptex_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ptexdir/ptex-ptexextra.obj `if test -f 'ptexdir/ptexextra.c'; then $(CYGPATH_W) 'ptexdir/ptexextra.c'; else $(CYGPATH_W) '$(srcdir)/ptexdir/ptexextra.c'; fi` + +ptex-ptexini.o: ptexini.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ptex_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ptex-ptexini.o -MD -MP -MF $(DEPDIR)/ptex-ptexini.Tpo -c -o ptex-ptexini.o `test -f 'ptexini.c' || echo '$(srcdir)/'`ptexini.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ptex-ptexini.Tpo $(DEPDIR)/ptex-ptexini.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ptexini.c' object='ptex-ptexini.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ptex_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ptex-ptexini.o `test -f 'ptexini.c' || echo '$(srcdir)/'`ptexini.c + +ptex-ptexini.obj: ptexini.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ptex_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ptex-ptexini.obj -MD -MP -MF $(DEPDIR)/ptex-ptexini.Tpo -c -o ptex-ptexini.obj `if test -f 'ptexini.c'; then $(CYGPATH_W) 'ptexini.c'; else $(CYGPATH_W) '$(srcdir)/ptexini.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ptex-ptexini.Tpo $(DEPDIR)/ptex-ptexini.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ptexini.c' object='ptex-ptexini.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ptex_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ptex-ptexini.obj `if test -f 'ptexini.c'; then $(CYGPATH_W) 'ptexini.c'; else $(CYGPATH_W) '$(srcdir)/ptexini.c'; fi` + +ptex-ptex0.o: ptex0.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ptex_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ptex-ptex0.o -MD -MP -MF $(DEPDIR)/ptex-ptex0.Tpo -c -o ptex-ptex0.o `test -f 'ptex0.c' || echo '$(srcdir)/'`ptex0.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ptex-ptex0.Tpo $(DEPDIR)/ptex-ptex0.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ptex0.c' object='ptex-ptex0.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ptex_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ptex-ptex0.o `test -f 'ptex0.c' || echo '$(srcdir)/'`ptex0.c + +ptex-ptex0.obj: ptex0.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ptex_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ptex-ptex0.obj -MD -MP -MF $(DEPDIR)/ptex-ptex0.Tpo -c -o ptex-ptex0.obj `if test -f 'ptex0.c'; then $(CYGPATH_W) 'ptex0.c'; else $(CYGPATH_W) '$(srcdir)/ptex0.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ptex-ptex0.Tpo $(DEPDIR)/ptex-ptex0.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ptex0.c' object='ptex-ptex0.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ptex_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ptex-ptex0.obj `if test -f 'ptex0.c'; then $(CYGPATH_W) 'ptex0.c'; else $(CYGPATH_W) '$(srcdir)/ptex0.c'; fi` + +ptex-ptex-pool.o: ptex-pool.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ptex_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ptex-ptex-pool.o -MD -MP -MF $(DEPDIR)/ptex-ptex-pool.Tpo -c -o ptex-ptex-pool.o `test -f 'ptex-pool.c' || echo '$(srcdir)/'`ptex-pool.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ptex-ptex-pool.Tpo $(DEPDIR)/ptex-ptex-pool.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ptex-pool.c' object='ptex-ptex-pool.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ptex_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ptex-ptex-pool.o `test -f 'ptex-pool.c' || echo '$(srcdir)/'`ptex-pool.c + +ptex-ptex-pool.obj: ptex-pool.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ptex_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ptex-ptex-pool.obj -MD -MP -MF $(DEPDIR)/ptex-ptex-pool.Tpo -c -o ptex-ptex-pool.obj `if test -f 'ptex-pool.c'; then $(CYGPATH_W) 'ptex-pool.c'; else $(CYGPATH_W) '$(srcdir)/ptex-pool.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ptex-ptex-pool.Tpo $(DEPDIR)/ptex-ptex-pool.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ptex-pool.c' object='ptex-ptex-pool.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ptex_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ptex-ptex-pool.obj `if test -f 'ptex-pool.c'; then $(CYGPATH_W) 'ptex-pool.c'; else $(CYGPATH_W) '$(srcdir)/ptex-pool.c'; fi` + synctexdir/synctex-synctex_main.o: synctexdir/synctex_main.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(synctex_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT synctexdir/synctex-synctex_main.o -MD -MP -MF synctexdir/$(DEPDIR)/synctex-synctex_main.Tpo -c -o synctexdir/synctex-synctex_main.o `test -f 'synctexdir/synctex_main.c' || echo '$(srcdir)/'`synctexdir/synctex_main.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) synctexdir/$(DEPDIR)/synctex-synctex_main.Tpo synctexdir/$(DEPDIR)/synctex-synctex_main.Po @@ -19735,6 +19841,9 @@ distclean: distclean-recursive -rm -f ./$(DEPDIR)/pmpost-psvgout.Po -rm -f ./$(DEPDIR)/pmpost-ptfmin.Po -rm -f ./$(DEPDIR)/pooltype.Po + -rm -f ./$(DEPDIR)/ptex-ptex-pool.Po + -rm -f ./$(DEPDIR)/ptex-ptex0.Po + -rm -f ./$(DEPDIR)/ptex-ptexini.Po -rm -f ./$(DEPDIR)/tangle.Po -rm -f ./$(DEPDIR)/tangleboot.Po -rm -f ./$(DEPDIR)/tex-tex-pool.Po @@ -20315,6 +20424,7 @@ distclean: distclean-recursive -rm -f pdftexdir/regex/$(DEPDIR)/libpdftex_a-regexec.Po -rm -f ptexdir/$(DEPDIR)/libkanji_a-kanji.Po -rm -f ptexdir/$(DEPDIR)/libkanji_a-kanji_dump.Po + -rm -f ptexdir/$(DEPDIR)/ptex-ptexextra.Po -rm -f synctexdir/$(DEPDIR)/eptex-synctex.Po -rm -f synctexdir/$(DEPDIR)/etex-synctex.Po -rm -f synctexdir/$(DEPDIR)/euptex-synctex.Po @@ -20509,6 +20619,9 @@ maintainer-clean: maintainer-clean-recursive -rm -f ./$(DEPDIR)/pmpost-psvgout.Po -rm -f ./$(DEPDIR)/pmpost-ptfmin.Po -rm -f ./$(DEPDIR)/pooltype.Po + -rm -f ./$(DEPDIR)/ptex-ptex-pool.Po + -rm -f ./$(DEPDIR)/ptex-ptex0.Po + -rm -f ./$(DEPDIR)/ptex-ptexini.Po -rm -f ./$(DEPDIR)/tangle.Po -rm -f ./$(DEPDIR)/tangleboot.Po -rm -f ./$(DEPDIR)/tex-tex-pool.Po @@ -21089,6 +21202,7 @@ maintainer-clean: maintainer-clean-recursive -rm -f pdftexdir/regex/$(DEPDIR)/libpdftex_a-regexec.Po -rm -f ptexdir/$(DEPDIR)/libkanji_a-kanji.Po -rm -f ptexdir/$(DEPDIR)/libkanji_a-kanji_dump.Po + -rm -f ptexdir/$(DEPDIR)/ptex-ptexextra.Po -rm -f synctexdir/$(DEPDIR)/eptex-synctex.Po -rm -f synctexdir/$(DEPDIR)/etex-synctex.Po -rm -f synctexdir/$(DEPDIR)/euptex-synctex.Po @@ -21818,6 +21932,8 @@ ptex.web: tie$(EXEEXT) $(ptex_web_srcs) # Generate ptex.ch ptex.ch: tie$(EXEEXT) ptex.web $(ptex_ch_srcs) $(tie_c) ptex.web $(ptex_ch_srcs) +ptexdir/ptriptest.log: ptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT) +ptexdir/pver.log ptexdir/wcfname.log: ptex$(EXEEXT) ptrip.diffs: ptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT) $(triptrap_diffs) $@ .PHONY: ptrip-clean @@ -21923,10 +22039,7 @@ uptftopl.p: tangle$(EXEEXT) uptftopl.web uptexdir/uptftopl.ch $(up_tangle) uptftopl uptftopl uptftopl.web: tie$(EXEEXT) tftopl.web tftopl.ch $(tie_m) tftopl.web tftopl.ch - -# upTeX Tests -#uptex_tests = uptexdir/uptriptest.test uptexdir/upver.test uptexdir/upkcat.test uptexdir/wcfname.test -uptexdir/uptriptest.log: uptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT) +uptexdir/uptriptest.log uptexdir/ptriptest.log: uptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT) uptexdir/upver.log uptexdir/upkcat.log uptexdir/wcfname.log: uptex$(EXEEXT) uptexdir/upbibtex.log: upbibtex$(EXEEXT) uptexdir/updvitype.log: updvitype$(EXEEXT) diff --git a/source/texk/web2c/NEWS b/source/texk/web2c/NEWS index edbe29bbff5bd08f2bbdb49caf6731f70587e6de..c73a3e3378e39309fee906477542ae92e9608c7b 100644 --- a/source/texk/web2c/NEWS +++ b/source/texk/web2c/NEWS @@ -1,5 +1,18 @@ This file records noteworthy changes. (Public domain.) + +2023 (for TeX Live 2023) + +* (u)pTeX: now using as aliases of e(u)ptex. Also support guessing input + encodings with these and (u)pbibtex. + +* bibtex: check options early to avoid looking for texmf.cnf unnecessarily; + use max_print_line texmf.cnf variable. + +* ctangle: with option +u, transliterate UTF-8 in C source. + +* mflua{,jit}: add potrace support. + 2022 (for TeX Live 2022, 21 March 2022) diff --git a/source/texk/web2c/ac/web2c.ac b/source/texk/web2c/ac/web2c.ac index 2af9023627802c96f749d3e5e5ff91a419645283..918d7df5f7eda776c94cc7977ca5b2283ab660c8 100644 --- a/source/texk/web2c/ac/web2c.ac +++ b/source/texk/web2c/ac/web2c.ac @@ -1,4 +1,4 @@ -dnl $Id: web2c.ac 65543 2023-01-15 05:09:14Z takuji $ +dnl $Id: web2c.ac 65655 2023-01-28 05:27:55Z takuji $ # texk/web2c/ac/web2c.ac: configure.ac fragment for TL subdir dnl dnl Copyright 2015-2021 Karl Berry <tex-live@tug.org> @@ -31,7 +31,9 @@ dnl [PROG, BUILD-OR-NO, SYNC-OR-NO, TEXT, REQUIRED-LIBS] m4_define([kpse_tex_progs], [dnl [[tex], [yes], [no], [TeX], []], [[etex], [no], [yes], [e-TeX], [zlib]], +[[ptex], [no], [yes], [pTeX], [ptexenc zlib]], [[eptex], [yes], [yes], [e-pTeX], [ptexenc zlib]], +[[uptex], [no], [yes], [upTeX], [ptexenc zlib]], [[euptex], [yes], [yes], [e-upTeX], [ptexenc zlib]], [[aleph], [yes], [], [Aleph], []], [[hitex], [yes], [], [HiTeX], [zlib]], diff --git a/source/texk/web2c/alephdir/am/aleph.am b/source/texk/web2c/alephdir/am/aleph.am index 4b7dde861d2c61f83b8eece50eafd84017704fff..59fb63ba79cc25d16d66f9963c5269d556ce8a72 100644 --- a/source/texk/web2c/alephdir/am/aleph.am +++ b/source/texk/web2c/alephdir/am/aleph.am @@ -1,7 +1,7 @@ -## $Id: aleph.am 61575 2022-01-11 22:47:10Z karl $ +## $Id: aleph.am 65847 2023-02-15 22:44:14Z karl $ ## texk/web2c/alephdir/am/aleph.am: Makefile fragment for Aleph. ## -## Copyright 2015-2022 Karl Berry <tex-live@tug.org> +## Copyright 2015-2023 Karl Berry <tex-live@tug.org> ## Copyright 2009-2015 Peter Breitenlohner <tex-live@tug.org> ## You may freely use, modify and/or distribute this file. @@ -69,7 +69,8 @@ aleph_web_srcs = \ alephdir/eonewdir.ch \ alephdir/eover.ch \ alephdir/eopage.ch \ - alephdir/eochar.ch + alephdir/eochar.ch \ + alephdir/latespecial.ch aleph.web: tie$(EXEEXT) $(aleph_web_srcs) $(tie_m) $(aleph_web_srcs) diff --git a/source/texk/web2c/configure b/source/texk/web2c/configure index f337967ad61ac808d7293a54cdedab0701ab2478..e9b8c6e4219ba2c1c6654de2eb585d4c53299405 100755 --- a/source/texk/web2c/configure +++ b/source/texk/web2c/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Web2C 2023/dev. +# Generated by GNU Autoconf 2.71 for Web2C 2023. # # Report bugs to <tex-k@tug.org>. # @@ -629,8 +629,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Web2C' PACKAGE_TARNAME='web2c' -PACKAGE_VERSION='2023/dev' -PACKAGE_STRING='Web2C 2023/dev' +PACKAGE_VERSION='2023' +PACKAGE_STRING='Web2C 2023' PACKAGE_BUGREPORT='tex-k@tug.org' PACKAGE_URL='' @@ -834,10 +834,18 @@ EUPTEX_SYNCTEX_FALSE EUPTEX_SYNCTEX_TRUE EUPTEX_FALSE EUPTEX_TRUE +UPTEX_SYNCTEX_FALSE +UPTEX_SYNCTEX_TRUE +UPTEX_FALSE +UPTEX_TRUE EPTEX_SYNCTEX_FALSE EPTEX_SYNCTEX_TRUE EPTEX_FALSE EPTEX_TRUE +PTEX_SYNCTEX_FALSE +PTEX_SYNCTEX_TRUE +PTEX_FALSE +PTEX_TRUE ETEX_SYNCTEX_FALSE ETEX_SYNCTEX_TRUE ETEX_FALSE @@ -1034,8 +1042,12 @@ enable_tex enable_tex_synctex enable_etex enable_etex_synctex +enable_ptex +enable_ptex_synctex enable_eptex enable_eptex_synctex +enable_uptex +enable_uptex_synctex enable_euptex enable_euptex_synctex enable_aleph @@ -1663,7 +1675,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Web2C 2023/dev to adapt to many kinds of systems. +\`configure' configures Web2C 2023 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1738,7 +1750,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Web2C 2023/dev:";; + short | recursive ) echo "Configuration of Web2C 2023:";; esac cat <<\_ACEOF @@ -1773,8 +1785,12 @@ Optional Features: --enable-tex-synctex build TeX with SyncTeX support --enable-etex compile and install e-TeX --disable-etex-synctex build e-TeX without SyncTeX support + --enable-ptex compile and install pTeX + --disable-ptex-synctex build pTeX without SyncTeX support --disable-eptex do not compile and install e-pTeX --disable-eptex-synctex build e-pTeX without SyncTeX support + --enable-uptex compile and install upTeX + --disable-uptex-synctex build upTeX without SyncTeX support --disable-euptex do not compile and install e-upTeX --disable-euptex-synctex build e-upTeX without SyncTeX support --disable-aleph do not compile and install Aleph @@ -1960,7 +1976,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Web2C configure 2023/dev +Web2C configure 2023 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2950,7 +2966,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Web2C $as_me 2023/dev, which was +It was created by Web2C $as_me 2023, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3926,7 +3942,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -WEB2CVERSION=2023/dev +WEB2CVERSION=2023 am__api_version='1.16' @@ -9491,7 +9507,7 @@ fi # Define the identity of the package. PACKAGE='web2c' - VERSION='2023/dev' + VERSION='2023' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -19712,6 +19728,28 @@ fi test "x$enable_web2c:$enable_etex" = xyes:yes && { need_zlib=yes } +# Check whether --enable-ptex was given. +if test ${enable_ptex+y} +then : + enableval=$enable_ptex; +fi +case $enable_ptex in #( + yes | no) : + ;; #( + *) : + enable_ptex=no ;; +esac + +# Check whether --enable-ptex-synctex was given. +if test ${enable_ptex_synctex+y} +then : + enableval=$enable_ptex_synctex; +fi + +test "x$enable_web2c:$enable_ptex" = xyes:yes && { + need_ptexenc=yes + need_zlib=yes +} # Check whether --enable-eptex was given. if test ${enable_eptex+y} then : @@ -19734,6 +19772,28 @@ test "x$enable_web2c:$enable_eptex" = xyes:yes && { need_ptexenc=yes need_zlib=yes } +# Check whether --enable-uptex was given. +if test ${enable_uptex+y} +then : + enableval=$enable_uptex; +fi +case $enable_uptex in #( + yes | no) : + ;; #( + *) : + enable_uptex=no ;; +esac + +# Check whether --enable-uptex-synctex was given. +if test ${enable_uptex_synctex+y} +then : + enableval=$enable_uptex_synctex; +fi + +test "x$enable_web2c:$enable_uptex" = xyes:yes && { + need_ptexenc=yes + need_zlib=yes +} # Check whether --enable-euptex was given. if test ${enable_euptex+y} then : @@ -22375,6 +22435,35 @@ esac else ETEX_SYNCTEX_TRUE='#' ETEX_SYNCTEX_FALSE= +fi + if test "x$enable_ptex" = xyes; then + PTEX_TRUE= + PTEX_FALSE='#' +else + PTEX_TRUE='#' + PTEX_FALSE= +fi + +case $enable_native_texlive_build:$enable_ptex_synctex in #( + yes:yes | no:yes | no:no) : + ;; #( + *) : + if test -z "$enable_ptex_synctex" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-ptex-synctex=yes'" >&5 +printf "%s\n" "$as_me: Assuming \`--enable-ptex-synctex=yes'" >&6;} +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Enforcing \`--enable-ptex-synctex=yes' (native TeX Live build)" >&5 +printf "%s\n" "$as_me: WARNING: Enforcing \`--enable-ptex-synctex=yes' (native TeX Live build)" >&2;} +fi + enable_ptex_synctex=yes ;; +esac + if test "x$enable_ptex_synctex" = xyes; then + PTEX_SYNCTEX_TRUE= + PTEX_SYNCTEX_FALSE='#' +else + PTEX_SYNCTEX_TRUE='#' + PTEX_SYNCTEX_FALSE= fi if test "x$enable_eptex" = xyes; then EPTEX_TRUE= @@ -22404,6 +22493,35 @@ esac else EPTEX_SYNCTEX_TRUE='#' EPTEX_SYNCTEX_FALSE= +fi + if test "x$enable_uptex" = xyes; then + UPTEX_TRUE= + UPTEX_FALSE='#' +else + UPTEX_TRUE='#' + UPTEX_FALSE= +fi + +case $enable_native_texlive_build:$enable_uptex_synctex in #( + yes:yes | no:yes | no:no) : + ;; #( + *) : + if test -z "$enable_uptex_synctex" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-uptex-synctex=yes'" >&5 +printf "%s\n" "$as_me: Assuming \`--enable-uptex-synctex=yes'" >&6;} +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Enforcing \`--enable-uptex-synctex=yes' (native TeX Live build)" >&5 +printf "%s\n" "$as_me: WARNING: Enforcing \`--enable-uptex-synctex=yes' (native TeX Live build)" >&2;} +fi + enable_uptex_synctex=yes ;; +esac + if test "x$enable_uptex_synctex" = xyes; then + UPTEX_SYNCTEX_TRUE= + UPTEX_SYNCTEX_FALSE='#' +else + UPTEX_SYNCTEX_TRUE='#' + UPTEX_SYNCTEX_FALSE= fi if test "x$enable_euptex" = xyes; then EUPTEX_TRUE= @@ -25260,7 +25378,7 @@ Usage: $0 [OPTIONS] Report bugs to <bug-libtool@gnu.org>." lt_cl_version="\ -Web2C config.lt 2023/dev +Web2C config.lt 2023 configured by $0, generated by GNU Autoconf 2.71. Copyright (C) 2011 Free Software Foundation, Inc. @@ -27061,11 +27179,13 @@ then : withval=$with_potrace_libdir; fi if test "x$with_system_potrace" = xyes; then - if $PKG_CONFIG POTRACE; then - POTRACE_INCLUDES=`$PKG_CONFIG POTRACE --cflags` - POTRACE_LIBS=`$PKG_CONFIG POTRACE --libs` -elif test "x$need_POTRACE:$with_system_POTRACE" = xyes:yes; then - as_fn_error $? "did not find POTRACE" "$LINENO" 5 + ##tldbg _KPSE_LIB_FLAGS_SYSTEM: potrace (potrace). +if test "x$with_potrace_includes" != x && test "x$with_potrace_includes" != xyes; then + POTRACE_INCLUDES="-I$with_potrace_includes" +fi +POTRACE_LIBS="-lpotrace" +if test "x$with_potrace_libdir" != x && test "x$with_potrace_libdir" != xyes; then + POTRACE_LIBS="-L$with_potrace_libdir $POTRACE_LIBS" fi else POTRACE_INCLUDES="-I$kpse_BLD/libs/potrace/include" @@ -28300,6 +28420,14 @@ if test -z "${ETEX_SYNCTEX_TRUE}" && test -z "${ETEX_SYNCTEX_FALSE}"; then as_fn_error $? "conditional \"ETEX_SYNCTEX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${PTEX_TRUE}" && test -z "${PTEX_FALSE}"; then + as_fn_error $? "conditional \"PTEX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${PTEX_SYNCTEX_TRUE}" && test -z "${PTEX_SYNCTEX_FALSE}"; then + as_fn_error $? "conditional \"PTEX_SYNCTEX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${EPTEX_TRUE}" && test -z "${EPTEX_FALSE}"; then as_fn_error $? "conditional \"EPTEX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -28308,6 +28436,14 @@ if test -z "${EPTEX_SYNCTEX_TRUE}" && test -z "${EPTEX_SYNCTEX_FALSE}"; then as_fn_error $? "conditional \"EPTEX_SYNCTEX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${UPTEX_TRUE}" && test -z "${UPTEX_FALSE}"; then + as_fn_error $? "conditional \"UPTEX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${UPTEX_SYNCTEX_TRUE}" && test -z "${UPTEX_SYNCTEX_FALSE}"; then + as_fn_error $? "conditional \"UPTEX_SYNCTEX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${EUPTEX_TRUE}" && test -z "${EUPTEX_FALSE}"; then as_fn_error $? "conditional \"EUPTEX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -28807,7 +28943,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Web2C $as_me 2023/dev, which was +This file was extended by Web2C $as_me 2023, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -28879,7 +29015,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Web2C config.status 2023/dev +Web2C config.status 2023 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/source/texk/web2c/doc/web2c.info b/source/texk/web2c/doc/web2c.info index de5ce04906ebb9b46b8b949f7a86b05aa8e1b3ca..724f07c477161af25b3f36f72be2e6d050c6b133 100644 --- a/source/texk/web2c/doc/web2c.info +++ b/source/texk/web2c/doc/web2c.info @@ -1,4 +1,4 @@ -This is web2c.info, produced by makeinfo version 6.8 from web2c.texi. +This is web2c.info, produced by makeinfo version 6.5 from web2c.texi. This file documents the installation and use of the programs in Web2c, an implementation of Donald Knuth's TeX system. @@ -58,7 +58,7 @@ Web2c This document describes how to install and use the programs in the Web2c implementation of the TeX system, especially for Unix systems. It -corresponds to Web2c version 2022, released in January 2022. +corresponds to Web2c version 2023, released in February 2022. * Menu: @@ -83,7 +83,7 @@ File: web2c.info, Node: Introduction, Next: Installation, Prev: Top, Up: Top 1 Introduction ************** -This manual corresponds to version 2022 of Web2c, released in January +This manual corresponds to version 2023 of Web2c, released in February 2022. "Web2c" (also spelled Web2C) is the name of a TeX implementation, @@ -3570,7 +3570,7 @@ Index * -base=BASE: Determining the memory dump to use. (line 15) * -base=DUMPNAME: Common options. (line 39) -* -change=CHFILE: mft invocation. (line 62) +* -change=CHFILE: mft invocation. (line 63) * -charcode-format=TYPE: tftopl invocation. (line 27) * -charcode-format=TYPE <1>: vftovp invocation. (line 30) * -cnf-line: Common options. (line 25) @@ -3632,7 +3632,7 @@ Index * -shell-restricted: tex invocation. (line 122) * -show-opcodes: dvitype invocation. (line 52) * -strict: tangle invocation. (line 46) -* -style=MFTFILE: mft invocation. (line 66) +* -style=MFTFILE: mft invocation. (line 67) * -T: mpost invocation. (line 111) * -terse: bibtex invocation. (line 28) * -tex=TEXPROGRAM: mpost invocation. (line 114) @@ -3782,7 +3782,7 @@ Index * c-sources Makefile target: Additional targets. (line 12) * caveats for \input filenames: \input filename caveats. (line 6) -* change files, and MFT: mft invocation. (line 62) +* change files, and MFT: mft invocation. (line 63) * change files, and Tangle: tangle invocation. (line 11) * change files, and Weave: weave invocation. (line 14) * changing error messages style: Common options. (line 31) @@ -3802,7 +3802,7 @@ Index (line 69) * cm.base: Initial Metafont. (line 26) * cmbase.mf: Initial Metafont. (line 26) -* cmbase.mft: mft invocation. (line 72) +* cmbase.mft: mft invocation. (line 73) * cmmf.base not recommended: Initial Metafont. (line 26) * color, in DVItoMP: dvitomp invocation. (line 15) * comments, in TCX files: TCX files. (line 70) @@ -3815,7 +3815,7 @@ Index (line 6) * Computer Modern fonts, and Troff: mpost invocation. (line 61) * Computer Modern macros: Initial Metafont. (line 26) -* Computer Modern Typefaces, production of: mft invocation. (line 72) +* Computer Modern Typefaces, production of: mft invocation. (line 73) * configuration: Installation. (line 6) * configuration file reading: Path searching. (line 6) * configuration file values: Runtime options. (line 6) @@ -3888,7 +3888,7 @@ Index * e response at error prompt: Editor invocation. (line 6) * e-circumflex: \charsubdef. (line 20) * e-TeX: TeX extensions. (line 20) -* e.mft: mft invocation. (line 72) +* e.mft: mft invocation. (line 73) * EC fonts: tex invocation. (line 41) * EC fonts <1>: mf invocation. (line 24) * editing of bitmap fonts: Font utilities available elsewhere. @@ -4140,7 +4140,7 @@ Index (line 15) * MetaPost input files: mpost invocation. (line 26) * MetaPost invocation: mpost invocation. (line 6) -* MetaPost source, prettyprinting: mft invocation. (line 77) +* MetaPost source, prettyprinting: mft invocation. (line 79) * MetaPost, initial: Initial MetaPost. (line 6) * MetaPost, TeX, and Metafont: Three programs. (line 6) * metatype1: Font utilities available elsewhere. @@ -4257,7 +4257,7 @@ Index * plain.bst: Basic BibTeX style files. (line 11) * plain.fmt: Initial TeX. (line 13) -* plain.mft: mft invocation. (line 66) +* plain.mft: mft invocation. (line 67) * pltotf: pltotf invocation. (line 6) * pool file, writing: tangle invocation. (line 16) * Poole, Simon: Online Metafont graphics. @@ -4303,7 +4303,7 @@ Index * quoted filename for \input: \input quoted filename. (line 6) * Raichle, Bernd: MLTeX. (line 6) -* reading, additional: Introduction. (line 71) +* reading, additional: Introduction. (line 72) * readonly directory, running TeX in: Output file location. (line 15) * readonly directory, running TeX in <1>: Output file location. @@ -4366,7 +4366,7 @@ Index * string pool, writing: tangle invocation. (line 16) * string representation: pooltype invocation. (line 30) * style design, for BibTeX: bibtex invocation. (line 49) -* style files: mft invocation. (line 66) +* style files: mft invocation. (line 67) * substitutions of font glyphs: MLTeX. (line 6) * sun: Online Metafont graphics. (line 42) @@ -4553,82 +4553,77 @@ Index Tag Table: Node: Top2759 -Node: Introduction3833 -Node: Installation7591 -Node: configure options9635 -Node: Compile-time options11657 -Node: Additional targets12759 -Node: Triptrap14036 -Node: Commonalities15539 -Node: Option conventions16196 -Node: Common options17419 -Node: Path searching22037 -Node: Output file location23009 -Node: Three programs24311 -Node: Runtime options25018 -Node: Initial and virgin28159 -Node: Memory dumps29108 -Node: Creating memory dumps29560 -Node: Determining the memory dump to use30767 -Node: Hardware and memory dumps32344 -Node: Editor invocation35094 -Node: \input filenames35957 -Node: \input quoted filename37508 -Node: \input braced filename38285 -Node: \input filename caveats39215 -Node: TeX40729 -Node: tex invocation41897 -Node: Initial TeX48883 -Node: Formats50247 -Node: Languages and hyphenation53064 -Node: MLTeX53494 -Node: \charsubdef55122 -Node: \tracingcharsubdef57445 -Node: TCX files58020 -Node: patgen invocation63460 -Node: Shell escapes64167 -Node: IPC and TeX67747 -Node: TeX extensions68317 -Node: Metafont71098 -Node: mf invocation72386 -Node: Initial Metafont76223 -Node: Modes77853 -Node: Online Metafont graphics80103 -Node: gftodvi invocation83528 -Node: mft invocation86348 -Node: MetaPost90346 -Node: mpost invocation91182 -Node: Initial MetaPost96218 -Node: dvitomp invocation97140 -Node: BibTeX97805 -Node: bibtex invocation98166 -Node: Basic BibTeX style files100640 -Node: WEB101970 -Node: tangle invocation103179 -Node: weave invocation105303 -Node: pooltype invocation106710 -Node: DVI utilities107840 -Node: dvicopy invocation108774 -Node: dvitype invocation110059 -Node: dvitype output example112390 -Node: Font utilities115443 -Node: Font file formats116623 -Node: gftopk invocation119890 -Node: pktogf invocation121081 -Node: pktype invocation122247 -Node: gftype invocation125070 -Node: tftopl invocation129573 -Node: pltotf invocation134166 -Node: vftovp invocation135217 -Node: vptovf invocation137452 -Node: Font utilities available elsewhere138479 -Node: Legalisms140684 -Node: References142131 -Node: Index146264 +Node: Introduction3834 +Node: Installation7593 +Node: configure options9637 +Node: Compile-time options11659 +Node: Additional targets12761 +Node: Triptrap14038 +Node: Commonalities15541 +Node: Option conventions16198 +Node: Common options17421 +Node: Path searching22039 +Node: Output file location23011 +Node: Three programs24313 +Node: Runtime options25020 +Node: Initial and virgin28161 +Node: Memory dumps29110 +Node: Creating memory dumps29562 +Node: Determining the memory dump to use30769 +Node: Hardware and memory dumps32346 +Node: Editor invocation35096 +Node: \input filenames35959 +Node: \input quoted filename37510 +Node: \input braced filename38287 +Node: \input filename caveats39217 +Node: TeX40731 +Node: tex invocation41899 +Node: Initial TeX48885 +Node: Formats50249 +Node: Languages and hyphenation53066 +Node: MLTeX53496 +Node: \charsubdef55124 +Node: \tracingcharsubdef57447 +Node: TCX files58022 +Node: patgen invocation63462 +Node: Shell escapes64169 +Node: IPC and TeX67749 +Node: TeX extensions68319 +Node: Metafont71100 +Node: mf invocation72388 +Node: Initial Metafont76225 +Node: Modes77855 +Node: Online Metafont graphics80105 +Node: gftodvi invocation83530 +Node: mft invocation86350 +Node: MetaPost90348 +Node: mpost invocation91184 +Node: Initial MetaPost96220 +Node: dvitomp invocation97142 +Node: BibTeX97807 +Node: bibtex invocation98168 +Node: Basic BibTeX style files100642 +Node: WEB101972 +Node: tangle invocation103181 +Node: weave invocation105305 +Node: pooltype invocation106712 +Node: DVI utilities107842 +Node: dvicopy invocation108776 +Node: dvitype invocation110061 +Node: dvitype output example112392 +Node: Font utilities115445 +Node: Font file formats116625 +Node: gftopk invocation119892 +Node: pktogf invocation121083 +Node: pktype invocation122249 +Node: gftype invocation125072 +Node: tftopl invocation129575 +Node: pltotf invocation134168 +Node: vftovp invocation135219 +Node: vptovf invocation137454 +Node: Font utilities available elsewhere138481 +Node: Legalisms140686 +Node: References142133 +Node: Index146266 End Tag Table - - -Local Variables: -coding: utf-8 -End: diff --git a/source/texk/web2c/doc/web2c.texi b/source/texk/web2c/doc/web2c.texi index 23d827c5fc6b092f87d497085a367aefc6ae400e..bde46587aac10b666dd8fc97feba0b37a7780e7d 100644 --- a/source/texk/web2c/doc/web2c.texi +++ b/source/texk/web2c/doc/web2c.texi @@ -11,8 +11,8 @@ The latest version is available from ftp://ftp.tug.org/tex/texinfo.tex.} \fi @end tex -@set version 2022 -@set month-year January 2022 +@set version 2023 +@set month-year February 2022 @c Define new indices for commands in auxiliary files, filenames, and options. @defcodeindex cm diff --git a/source/texk/web2c/eptexdir/am/eptex.am b/source/texk/web2c/eptexdir/am/eptex.am index 286b570bc3fd310ed7db46590086a0d5f0101b09..605df0abadf6d7cb513537ee2596f47e0b322b07 100644 --- a/source/texk/web2c/eptexdir/am/eptex.am +++ b/source/texk/web2c/eptexdir/am/eptex.am @@ -1,4 +1,4 @@ -## $Id: eptex.am 65543 2023-01-15 05:09:14Z takuji $ +## $Id: eptex.am 65655 2023-01-28 05:27:55Z takuji $ ## texk/web2c/eptexdir/am/eptex.am: Makefile fragment for e-pTeX. ## ## Copyright 2015-2022 Karl Berry <tex-live@tug.org> @@ -9,7 +9,9 @@ ## if EPTEX bin_PROGRAMS += eptex +if !PTEX bin_links += eptex$(EXEEXT):ptex +endif !PTEX endif EPTEX EXTRA_PROGRAMS += eptex diff --git a/source/texk/web2c/eptexdir/eptex_version.h b/source/texk/web2c/eptexdir/eptex_version.h index b3fa0965685012e7f4b7a57fd1c9c55c4eef63ab..297bd81e7f37118b7ab6d62a57b26ca1d2594f61 100644 --- a/source/texk/web2c/eptexdir/eptex_version.h +++ b/source/texk/web2c/eptexdir/eptex_version.h @@ -1 +1 @@ -#define EPTEX_VERSION "220214" +#define EPTEX_VERSION "230214" diff --git a/source/texk/web2c/euptexdir/am/euptex.am b/source/texk/web2c/euptexdir/am/euptex.am index da74ce71bc2e72e600564a63f512955448283dbc..6910909685d6c40edeb56314197f53a459337ac1 100644 --- a/source/texk/web2c/euptexdir/am/euptex.am +++ b/source/texk/web2c/euptexdir/am/euptex.am @@ -1,4 +1,4 @@ -## $Id: euptex.am 65543 2023-01-15 05:09:14Z takuji $ +## $Id: euptex.am 65655 2023-01-28 05:27:55Z takuji $ ## texk/web2c/euptexdir/am/euptex.am: Makefile fragment for e-upTeX. ## ## Copyright 2015-2022 Karl Berry <tex-live@tug.org> @@ -9,7 +9,9 @@ ## if EUPTEX bin_PROGRAMS += euptex +if !UPTEX bin_links += euptex$(EXEEXT):uptex +endif !UPTEX endif EUPTEX EXTRA_PROGRAMS += euptex diff --git a/source/texk/web2c/luatexdir/luatex_svnversion.h b/source/texk/web2c/luatexdir/luatex_svnversion.h index 9bca73d52a6cbbb8121bfef44534a9632e5bf11d..5b0f16cc844cff2ffb8600c8838a1b5452222deb 100644 --- a/source/texk/web2c/luatexdir/luatex_svnversion.h +++ b/source/texk/web2c/luatexdir/luatex_svnversion.h @@ -1,4 +1,4 @@ #ifndef luatex_svn_revision_h #define luatex_svn_revision_h -#define luatex_svn_revision 7562 +#define luatex_svn_revision 7563 #endif diff --git a/source/texk/web2c/mfluadir/am/mflualpeg.am b/source/texk/web2c/mfluadir/am/mflualpeg.am index 5e2ce30c268069e40984dad88945259d9f3d4bae..a6c34bfd2320dccd2cfaae0245a1abae5eada031 100644 --- a/source/texk/web2c/mfluadir/am/mflualpeg.am +++ b/source/texk/web2c/mfluadir/am/mflualpeg.am @@ -1,6 +1,6 @@ ## texk/web2c/mfluadir/am/mflualpeg.am: Makefile fragment for libmflualpeg. ## -## Copyright (C) 2022 Luigi Scarso <tex-live@tug.org> +## Copyright (C) 2023 Luigi Scarso <tex-live@tug.org> ## You may freely use, modify and/or distribute this file. ## mflualpeg diff --git a/source/texk/web2c/mfluadir/am/mfluaotfcc.am b/source/texk/web2c/mfluadir/am/mfluaotfcc.am index 0f2da82a5ca3b52bc0495d4f979017fba75694ce..308822214174f44641e6fd0e0ddabffaf2233524 100644 --- a/source/texk/web2c/mfluadir/am/mfluaotfcc.am +++ b/source/texk/web2c/mfluadir/am/mfluaotfcc.am @@ -1,6 +1,6 @@ ## texk/web2c/luatexdir/am/mfluaotfcc.am: Makefile fragment for libmfluaotfcc. ## -## Copyright (C) 2021 Luigi Scarso <tex-live@tug.org> +## Copyright (C) 2023 Luigi Scarso <tex-live@tug.org> ## You may freely use, modify and/or distribute this file. ## mfluaotfcc diff --git a/source/texk/web2c/mfluadir/am/mfluapotrace.am b/source/texk/web2c/mfluadir/am/mfluapotrace.am index 91967bc574f30eca42f236d38481a12387462baf..d2b9213809bcfb432f0581d2c32bd3e6231fd0d1 100644 --- a/source/texk/web2c/mfluadir/am/mfluapotrace.am +++ b/source/texk/web2c/mfluadir/am/mfluapotrace.am @@ -1,6 +1,6 @@ ## texk/web2c/luatexdir/am/mfluapotrace.am: Makefile fragment for libmfluapotrace. ## -## Copyright (C) 2022 Luigi Scarso <tex-live@tug.org> +## Copyright (C) 2023 Luigi Scarso <tex-live@tug.org> ## You may freely use, modify and/or distribute this file. ## mfluapotrace diff --git a/source/texk/web2c/mfluajitdir/am/mfluajitlpeg.am b/source/texk/web2c/mfluajitdir/am/mfluajitlpeg.am index 41c4661735f1270bb1145e35bcc108dc0a2695fb..a9245cae4a13edb4ff3894d1e76b1704190f71d4 100644 --- a/source/texk/web2c/mfluajitdir/am/mfluajitlpeg.am +++ b/source/texk/web2c/mfluajitdir/am/mfluajitlpeg.am @@ -1,6 +1,6 @@ ## texk/web2c/mfluajitdir/am/mfluajitlpeg.am: Makefile fragment for libmfluajitlpeg. ## -## Copyright (C) 2022 Luigi Scarso <tex-live@tug.org> +## Copyright (C) 2023 Luigi Scarso <tex-live@tug.org> ## You may freely use, modify and/or distribute this file. ## mfluajitlpeg diff --git a/source/texk/web2c/mplibdir/ChangeLog b/source/texk/web2c/mplibdir/ChangeLog index 55ab2c8571e8de9d2f8e258f7b74459595fc3876..e1c385f3d4c166a3150b0df3c27a8e1ab84b5f68 100644 --- a/source/texk/web2c/mplibdir/ChangeLog +++ b/source/texk/web2c/mplibdir/ChangeLog @@ -1,3 +1,6 @@ +2023-01-19 Luigi Scarso <luigi.scarso@gmail.com> + * MetaPost: svg->dx, svg->dy are now double (better precision) . + 2022-07-31 Luigi Scarso <luigi.scarso@gmail.com> * MetaPost: Working on the file extension (work in progress). diff --git a/source/texk/web2c/mplibdir/svgout.w b/source/texk/web2c/mplibdir/svgout.w index 3c35d55933bde64481473c490aa10220f944bf3c..b1a74049582eebd1db07df48f22782dde75405cb 100644 --- a/source/texk/web2c/mplibdir/svgout.w +++ b/source/texk/web2c/mplibdir/svgout.w @@ -382,8 +382,9 @@ The two correction values are calculated by the function that writes the initial |<svg>| tag, and are stored in two globals: @<Globals@>= -integer dx; -integer dy; +double dx; +double dy; + @ @c void mp_svg_pair_out (MP mp,double x, double y) { diff --git a/source/texk/web2c/pdftexdir/pdftex_version.h b/source/texk/web2c/pdftexdir/pdftex_version.h index 493b324a99cdcddcd623d23489116dadd4c87295..3f342bcd8083ad99d3327523bea7cb1afc449529 100644 --- a/source/texk/web2c/pdftexdir/pdftex_version.h +++ b/source/texk/web2c/pdftexdir/pdftex_version.h @@ -1 +1 @@ -#define PDFTEX_VERSION "1.40.24" +#define PDFTEX_VERSION "1.40.25" diff --git a/source/texk/web2c/ptexdir/am/ptex.am b/source/texk/web2c/ptexdir/am/ptex.am index c45a1acd6b76f83a1adba8b2692333656f65128c..3f86cc484191181f8fd74592dd900f2fdccb5f67 100644 --- a/source/texk/web2c/ptexdir/am/ptex.am +++ b/source/texk/web2c/ptexdir/am/ptex.am @@ -1,4 +1,4 @@ -## $Id: ptex.am 65543 2023-01-15 05:09:14Z takuji $ +## $Id: ptex.am 65655 2023-01-28 05:27:55Z takuji $ ## texk/web2c/ptexdir/am/ptex.am: Makefile fragment for pTeX. ## ## Copyright 2015-2022 Karl Berry <tex-live@tug.org> @@ -8,6 +8,7 @@ ptex_cppflags = $(PTEXENC_INCLUDES) $(AM_CPPFLAGS) $(ZLIB_INCLUDES) ptex_ldadd = libkanji.a $(pproglib) $(PTEXENC_LIBS) $(LDADD) $(ZLIB_LIBS) ptex_dependencies = libkanji.a $(pproglib) $(PTEXENC_DEPEND) $(ZLIB_DEPEND) $(default_dependencies) +p_tangle = $(tangle_silent)WEBINPUTS=.:$(srcdir)/ptexdir:$(srcdir) $(buildenv) $(TANGLE) ## pTeX library @@ -23,8 +24,27 @@ EXTRA_LIBRARIES += libkanji.a libkanji_a_SOURCES = ptexdir/kanji.c ptexdir/kanji.h ptexdir/kanji_dump.c libkanji_a_CPPFLAGS = $(ptex_cppflags) +## pTeX +## +if PTEX +bin_PROGRAMS += ptex +endif PTEX +#if PWEB +#bin_PROGRAMS += $(pweb_programs) +#endif PWEB +#EXTRA_PROGRAMS += ptex $(pweb_programs) + ptex_CPPFLAGS = $(ptex_cppflags) +# With --enable-ipc, pTeX may need to link with -lsocket. +ptex_LDADD = $(ptex_ldadd) $(ipc_socketlibs) +ptex_DEPENDENCIES = $(ptex_dependencies) + +# pTeX C sources +ptex_c_h = ptexini.c ptex0.c ptexcoerce.h ptexd.h +nodist_ptex_SOURCES = $(ptex_c_h) ptex-pool.c +dist_ptex_SOURCES = ptexdir/ptexextra.c ptexdir/ptexextra.h ptexdir/ptex_version.h + # We must create ptexd.h and ptexdir/ptex_version.h before building the ptex_OBJECTS. ptex_prereq = ptexd.h ptexdir/ptex_version.h $(ptex_OBJECTS): $(ptex_prereq) @@ -80,6 +100,25 @@ EXTRA_DIST += \ ptexdir/INSTALL.txt \ ptexdir/README.txt +# pTeX Tests +# +ptex_tests = ptexdir/ptriptest.test ptexdir/pver.test ptexdir/wcfname.test +ptexdir/ptriptest.log: ptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT) +ptexdir/pver.log ptexdir/wcfname.log: ptex$(EXEEXT) + +EXTRA_DIST += $(ptex_tests) $(pweb_tests) +DISTCLEANFILES += $(pweb_programs:=.c) $(pweb_programs:=.h) \ + $(pweb_programs:=.p) $(pweb_programs:=-web2c) $(pweb_programs:=.web) + +if PTEX +TESTS += $(ptex_tests) +TRIPTRAP += ptrip.diffs +TRIPTRAP_CLEAN += ptrip-clean +endif PTEX +if PWEB +TESTS += $(pweb_tests) +endif PWEB + ## Test data and results ## ## ptexdir/nissya.test diff --git a/source/texk/web2c/synctexdir/ChangeLog b/source/texk/web2c/synctexdir/ChangeLog index ede9fe64547a344dd208f26cee62cfbafdcb50c0..43312b4bb36f1f0ebde68a0c618a4fd349b922ce 100644 --- a/source/texk/web2c/synctexdir/ChangeLog +++ b/source/texk/web2c/synctexdir/ChangeLog @@ -1,3 +1,42 @@ +2023-02-23 Hironobu Yamashita <h.y.acetaminophen@gmail.com> + + Sync with GH 2020 branch. + + * Changed files (on https://github.com/jlaurens/synctex): + synctex_parser.c + synctex_parser_utils.c + synctex_parser_utils.h + + - Fix compilation on MSVC. + https://github.com/jlaurens/synctex/pull/59 + - Fix some GCC warnings. + https://github.com/jlaurens/synctex/pull/57 + +2023-01-19 Hironobu Yamashita <h.y.acetaminophen@gmail.com> + + Comparing TL r55094 (by JL) and GH 2020 branch. + + * Changed files (on https://github.com/jlaurens/synctex): + synctex_main.c + synctex_parser.c + synctex_parser_readme.md + synctex_parser_utils.c + + - Fix compilation with clang with -Wformat-nonliteral. + https://github.com/jlaurens/synctex/pull/38 + - Fix build when compiling with -Werror=implicit-function-declaration. + https://github.com/jlaurens/synctex/pull/39 + - More explanations. + - Remove recursion form _synctex_free_handle_old. + - Fix a Bug in post scriptum parser y_offset. + https://github.com/jlaurens/synctex/issues/50 + - Fix a Memory leak when opening files. + https://github.com/jlaurens/synctex/issues/49 + - Fix memleaks when a file cannot be parsed. + https://github.com/jlaurens/synctex/issues/48 + - Fix memleaks when freeing iterators + https://github.com/jlaurens/synctex/issues/55 + 2023-01-15 TANAKA Takuji <ttk@t-lab.opal.ne.jp> * am/synctex.am: Remove ptex and uptex. diff --git a/source/texk/web2c/uptexdir/am/uptex.am b/source/texk/web2c/uptexdir/am/uptex.am index 36182cea17aca39b0ccdfab44109dd9cbca7c831..e520d4e94eae4d3df1bc609d02731e198cf1681d 100644 --- a/source/texk/web2c/uptexdir/am/uptex.am +++ b/source/texk/web2c/uptexdir/am/uptex.am @@ -1,4 +1,4 @@ -## $Id: uptex.am 65543 2023-01-15 05:09:14Z takuji $ +## $Id: uptex.am 65655 2023-01-28 05:27:55Z takuji $ ## texk/web2c/uptexdir/am/uptex.am: Makefile fragment for upTeX. ## ## Copyright 2016-2022 Karl Berry <tex-live@tug.org> @@ -20,9 +20,9 @@ libukanji_a_CPPFLAGS = $(uptex_cppflags) ## upTeX ## -#if UPTEX -#bin_PROGRAMS += uptex -#endif UPTEX +if UPTEX +bin_PROGRAMS += uptex +endif UPTEX if UPWEB bin_PROGRAMS += $(upweb_programs) endif UPWEB @@ -165,8 +165,8 @@ EXTRA_DIST += \ uptexdir/ChangeLog # upTeX Tests -#uptex_tests = uptexdir/uptriptest.test uptexdir/upver.test uptexdir/upkcat.test uptexdir/wcfname.test -uptexdir/uptriptest.log: uptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT) +uptex_tests = uptexdir/uptriptest.test uptexdir/ptriptest.test uptexdir/upver.test uptexdir/upkcat.test uptexdir/wcfname.test +uptexdir/uptriptest.log uptexdir/ptriptest.log: uptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT) uptexdir/upver.log uptexdir/upkcat.log uptexdir/wcfname.log: uptex$(EXEEXT) upweb_tests = \ uptexdir/upbibtex.test \ @@ -198,11 +198,11 @@ EXTRA_DIST += $(uptex_tests) $(upweb_tests) DISTCLEANFILES += $(upweb_programs:=.c) $(upweb_programs:=.h) \ $(upweb_programs:=.p) $(upweb_programs:=-web2c) $(upweb_programs:=.web) -#if UPTEX -#TESTS += $(uptex_tests) -#TRIPTRAP += uptrip.diffs -#TRIPTRAP_CLEAN += uptrip-clean -#endif UPTEX +if UPTEX +TESTS += $(uptex_tests) +TRIPTRAP += uptrip.diffs +TRIPTRAP_CLEAN += uptrip-clean +endif UPTEX if UPWEB TESTS += $(upweb_tests) endif UPWEB diff --git a/source/texk/web2c/web2c/configure b/source/texk/web2c/web2c/configure index 6b0f7ecbd2d3ea0dac737fc1f73fd07d11891ab2..2874fe77f97f843be47972d276809b591866b173 100755 --- a/source/texk/web2c/web2c/configure +++ b/source/texk/web2c/web2c/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Web2C Tools 2023/dev. +# Generated by GNU Autoconf 2.71 for Web2C Tools 2023. # # Report bugs to <tex-k@tug.org>. # @@ -621,8 +621,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Web2C Tools' PACKAGE_TARNAME='web2c-tools' -PACKAGE_VERSION='2023/dev' -PACKAGE_STRING='Web2C Tools 2023/dev' +PACKAGE_VERSION='2023' +PACKAGE_STRING='Web2C Tools 2023' PACKAGE_BUGREPORT='tex-k@tug.org' PACKAGE_URL='' @@ -1365,7 +1365,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Web2C Tools 2023/dev to adapt to many kinds of systems. +\`configure' configures Web2C Tools 2023 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1436,7 +1436,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Web2C Tools 2023/dev:";; + short | recursive ) echo "Configuration of Web2C Tools 2023:";; esac cat <<\_ACEOF @@ -1559,7 +1559,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Web2C Tools configure 2023/dev +Web2C Tools configure 2023 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2315,7 +2315,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Web2C Tools $as_me 2023/dev, which was +It was created by Web2C Tools $as_me 2023, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -8637,7 +8637,7 @@ fi # Define the identity of the package. PACKAGE='web2c-tools' - VERSION='2023/dev' + VERSION='2023' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -15371,7 +15371,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Web2C Tools $as_me 2023/dev, which was +This file was extended by Web2C Tools $as_me 2023, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15439,7 +15439,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Web2C Tools config.status 2023/dev +Web2C Tools config.status 2023 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/source/texk/web2c/xetexdir/xetex_version.h b/source/texk/web2c/xetexdir/xetex_version.h index 0775de56589b99ac1a07f9733c03c8392fa903be..06996fcec3df06cd54eb61356053fa36b313d318 100644 --- a/source/texk/web2c/xetexdir/xetex_version.h +++ b/source/texk/web2c/xetexdir/xetex_version.h @@ -1 +1 @@ -#define XETEX_VERSION "0.999994" +#define XETEX_VERSION "0.999995" diff --git a/source/utils/README b/source/utils/README index 50e69297f92f80b78f83e008bacb27ce6946a30c..73dbf3f36862e426769717c66a8c3816c480ecaa 100644 --- a/source/utils/README +++ b/source/utils/README @@ -1,10 +1,10 @@ -$Id: README 64381 2022-09-14 13:18:47Z hironobu $ +$Id: README 65812 2023-02-13 01:53:20Z kakuto $ Public domain. Originally written 2005 by Karl Berry. Extra utilities we (optionally) compile for TeX Live. See comments in ../texk/README. -asymptote 2.79 - checked 8mar22 +asymptote 2.85 - checked 9feb23 update to TL from CTAN, to include prebuilt doc. see https://tug.org/texlive/build.html#asymptote and tlpkg/bin/tl-update-asy @@ -23,7 +23,7 @@ lacheck - maintained here, by us m-tx 0.63d - checked 14sep22 https://ctan.org/pkg/m-tx/ -pmx 2.9.8a - checked 08mar22 +pmx 3.0.0 - checked 13feb23 https://ctan.org/pkg/pmx/ ps2eps 1.70 - checked 03jul21 diff --git a/source/utils/configure b/source/utils/configure index c72c2da3b3628cee42cd0beb36be9a4402d8233b..ffd1a226dd1f6cb45fc907a1fc06edc5f34bd529 100755 --- a/source/utils/configure +++ b/source/utils/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for TeX Live utils 2023/dev. +# Generated by GNU Autoconf 2.71 for TeX Live utils 2023. # # Report bugs to <tex-k@tug.org>. # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='TeX Live utils' PACKAGE_TARNAME='tex-live-utils' -PACKAGE_VERSION='2023/dev' -PACKAGE_STRING='TeX Live utils 2023/dev' +PACKAGE_VERSION='2023' +PACKAGE_STRING='TeX Live utils 2023' PACKAGE_BUGREPORT='tex-k@tug.org' PACKAGE_URL='' @@ -739,8 +739,12 @@ enable_tex enable_tex_synctex enable_etex enable_etex_synctex +enable_ptex +enable_ptex_synctex enable_eptex enable_eptex_synctex +enable_uptex +enable_uptex_synctex enable_euptex enable_euptex_synctex enable_aleph @@ -1351,7 +1355,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures TeX Live utils 2023/dev to adapt to many kinds of systems. +\`configure' configures TeX Live utils 2023 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1422,7 +1426,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of TeX Live utils 2023/dev:";; + short | recursive ) echo "Configuration of TeX Live utils 2023:";; esac cat <<\_ACEOF @@ -1449,8 +1453,12 @@ Optional Features: --enable-tex-synctex build TeX with SyncTeX support --enable-etex compile and install e-TeX --disable-etex-synctex build e-TeX without SyncTeX support + --enable-ptex compile and install pTeX + --disable-ptex-synctex build pTeX without SyncTeX support --disable-eptex do not compile and install e-pTeX --disable-eptex-synctex build e-pTeX without SyncTeX support + --enable-uptex compile and install upTeX + --disable-uptex-synctex build upTeX without SyncTeX support --disable-euptex do not compile and install e-upTeX --disable-euptex-synctex build e-upTeX without SyncTeX support --disable-aleph do not compile and install Aleph @@ -1603,7 +1611,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -TeX Live utils configure 2023/dev +TeX Live utils configure 2023 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1726,7 +1734,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by TeX Live utils $as_me 2023/dev, which was +It was created by TeX Live utils $as_me 2023, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3944,6 +3952,28 @@ fi test "x$enable_web2c:$enable_etex" = xyes:yes && { need_zlib=yes } +# Check whether --enable-ptex was given. +if test ${enable_ptex+y} +then : + enableval=$enable_ptex; +fi +case $enable_ptex in #( + yes | no) : + ;; #( + *) : + enable_ptex=no ;; +esac + +# Check whether --enable-ptex-synctex was given. +if test ${enable_ptex_synctex+y} +then : + enableval=$enable_ptex_synctex; +fi + +test "x$enable_web2c:$enable_ptex" = xyes:yes && { + need_ptexenc=yes + need_zlib=yes +} # Check whether --enable-eptex was given. if test ${enable_eptex+y} then : @@ -3966,6 +3996,28 @@ test "x$enable_web2c:$enable_eptex" = xyes:yes && { need_ptexenc=yes need_zlib=yes } +# Check whether --enable-uptex was given. +if test ${enable_uptex+y} +then : + enableval=$enable_uptex; +fi +case $enable_uptex in #( + yes | no) : + ;; #( + *) : + enable_uptex=no ;; +esac + +# Check whether --enable-uptex-synctex was given. +if test ${enable_uptex_synctex+y} +then : + enableval=$enable_uptex_synctex; +fi + +test "x$enable_web2c:$enable_uptex" = xyes:yes && { + need_ptexenc=yes + need_zlib=yes +} # Check whether --enable-euptex was given. if test ${enable_euptex+y} then : @@ -5190,7 +5242,7 @@ fi # Define the identity of the package. PACKAGE='tex-live-utils' - VERSION='2023/dev' + VERSION='2023' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -6111,7 +6163,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by TeX Live utils $as_me 2023/dev, which was +This file was extended by TeX Live utils $as_me 2023, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -6170,7 +6222,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -TeX Live utils config.status 2023/dev +TeX Live utils config.status 2023 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/source/version.ac b/source/version.ac index 94b1189f2333158ef983c2d21497e8c2134b97af..8e83756c3ebf7b4b1eb31ea1792be76ac4061c2b 100644 --- a/source/version.ac +++ b/source/version.ac @@ -1,5 +1,5 @@ -dnl $Id: version.ac 62887 2022-04-03 17:27:53Z karl $ -dnl Copyright 2016-2022 Karl Berry <tex-live@tug.org> +dnl $Id: version.ac 65770 2023-02-09 21:26:50Z karl $ +dnl Copyright 2016-2023 Karl Berry <tex-live@tug.org> dnl Copyright 2010-2015 Peter Breitenlohner <tex-live@tug.org> dnl dnl This file is free software; the copyright holder @@ -9,4 +9,4 @@ dnl dnl -------------------------------------------------------- dnl dnl m4-include this file to define the current TeX Live version -m4_define([tex_live_version], [2023/dev]) +m4_define([tex_live_version], [2023])