Rebase onto master and address packaging feedback

This commit is contained in:
2026-10-20 13:39:18 -06:00
parent 0a4dd938cb
commit 6023c51ee6
12 changed files with 49 additions and 19 deletions
+1
View File
@@ -45,6 +45,7 @@ jobs:
rm -rf build rm -rf build
meson setup build \ meson setup build \
--prefix=/usr \ --prefix=/usr \
-Dinstall-docs=true \
-Dtext-frontend=true \ -Dtext-frontend=true \
-Dwith-perl=perl \ -Dwith-perl=perl \
-Dwith-python=python3 \ -Dwith-python=python3 \
-1
View File
@@ -40,7 +40,6 @@ jobs:
python -m pip install --upgrade pip python -m pip install --upgrade pip
python -m pip install cffi python -m pip install cffi
python -m pip install zstandard python -m pip install zstandard
python -m pip install sphinx
$ProgressPreference = 'SilentlyContinue' $ProgressPreference = 'SilentlyContinue'
function Download-WithRetry { function Download-WithRetry {
+11 -5
View File
@@ -5,10 +5,14 @@ Unicode Emoji 17.0. It is vendored from Debian's
`fonts-noto-color-emoji` 2.051 package, built from the corresponding `fonts-noto-color-emoji` 2.051 package, built from the corresponding
Google Noto Emoji release. Google Noto Emoji release.
Every GTK build installs this exact file: Windows (installer and portable By default, GTK builds install this exact file, including Windows
build files), AppImage, Flatpak and native Meson/RPM builds. It is loaded (installer and portable builds), AppImage, Flatpak, and native Meson/RPM.
into a private Pango/FreeType font map as `ZoiteChat Emoji`; an older system Meson packagers can set `-Dinstall-emoji-font=false` to omit the bundled
Noto font cannot replace it. No font is installed globally on Windows. font and its installed notices and use system emoji fonts instead. An
explicit `ZOITECHAT_EMOJI_FONT` path still enables the private font map
in such builds. With the bundled font, it is registered privately as
`ZoiteChat Emoji`; an older system Noto font cannot replace it. No font
is installed globally on Windows.
Chat windows and the emoji picker share this map. Fontconfig still loads Chat windows and the emoji picker share this map. Fontconfig still loads
system fonts and configuration for ordinary text, and the configured text system fonts and configuration for ordinary text, and the configured text
@@ -29,7 +33,9 @@ directory; Windows resolves it relative to the executable. AppImage sets
ZOITECHAT_EMOJI_FONT="$PWD/data/fonts/NotoColorEmoji.ttf" build/src/fe-gtk/zoitechat ZOITECHAT_EMOJI_FONT="$PWD/data/fonts/NotoColorEmoji.ttf" build/src/fe-gtk/zoitechat
``` ```
A missing/unloadable file logs a warning and retains system-font fallback. An unexpectedly missing or unloadable bundled font logs a warning and retains
system-font fallback. When installation is disabled deliberately, fallback is
quiet unless an explicit `ZOITECHAT_EMOJI_FONT` override is invalid.
CI verifies the installed copy and tests catalog/font coverage; AppImage and CI verifies the installed copy and tests catalog/font coverage; AppImage and
Windows also run the interactive picker regression tests. Native themes, Windows also run the interactive picker regression tests. Native themes,
DPI and different Pango/Cairo versions can still affect pixel-level output. DPI and different Pango/Cairo versions can still affect pixel-level output.
+6 -4
View File
@@ -1,13 +1,15 @@
emoji_font_dir = join_paths(get_option('datadir'), 'fonts', 'zoitechat') emoji_font_dir = join_paths(get_option('datadir'), 'fonts', 'zoitechat')
emoji_font_doc_dir = join_paths(get_option('datadir'), 'doc', 'zoitechat', 'fonts') emoji_font_doc_dir = join_paths(get_option('datadir'), 'doc', 'zoitechat', 'fonts')
install_data( if get_option('install-emoji-font')
install_data(
'NotoColorEmoji.ttf', 'NotoColorEmoji.ttf',
install_dir: emoji_font_dir, install_dir: emoji_font_dir,
) )
install_data( install_data(
'OFL.txt', 'OFL.txt',
'README.md', 'README.md',
install_dir: emoji_font_doc_dir, install_dir: emoji_font_doc_dir,
) )
endif
+6
View File
@@ -71,6 +71,12 @@ Packagers may exclude `docs/_theme/basicstrap/` from the source package.
The default theme continues to build without that directory. No pre-minified The default theme continues to build without that directory. No pre-minified
third-party assets need to be added or rebuilt for this theme. third-party assets need to be added or rebuilt for this theme.
The Meson option `-Dinstall-docs` defaults to `false`, so platforms that
do not ship offline documentation do not need Sphinx just to build ZoiteChat.
Pass `-Dinstall-docs=true` when packaging local HTML documentation. Fedora
and AppImage enable it explicitly; the Debian documentation package can do
the same.
Build with the distribution's `python3-sphinx`. After installing the HTML Build with the distribution's `python3-sphinx`. After installing the HTML
into the package staging directory, use `dh_sphinxdoc` (or `dh --with into the package staging directory, use `dh_sphinxdoc` (or `dh --with
sphinxdoc`) to replace Sphinx's standard JavaScript files with system sphinxdoc`) to replace Sphinx's standard JavaScript files with system
+1 -1
View File
@@ -807,7 +807,7 @@ a.headerlink:focus-visible {
:root { :root {
--page: var(--bg); --page: var(--bg);
--panel: var(--chrome); --panel: var(--chrome);
--font: system-ui, -apple-system, "Segoe UI", sans-serif; --font: system-ui, -apple-system, "Segoe UI", "DejaVu Sans", sans-serif;
} }
.site-header { padding: 0; } .site-header { padding: 0; }
.appearance select { min-height: 0; border-radius: 3px; } .appearance select { min-height: 0; border-radius: 3px; }
+2 -2
View File
@@ -16,7 +16,7 @@
--success: #236741; --success: #236741;
--code: #f2f4f6; --code: #f2f4f6;
--shadow: none; --shadow: none;
--mono: Consolas,"Liberation Mono",monospace; --mono: Consolas,"DejaVu Sans Mono","Liberation Mono",monospace;
} }
html[data-theme=dark] { html[data-theme=dark] {
@@ -45,7 +45,7 @@ body {
margin: 0; margin: 0;
background: var(--bg); background: var(--bg);
color: var(--text); color: var(--text);
font: 15px/1.6 system-ui,-apple-system,"Segoe UI",sans-serif; font: 15px/1.6 system-ui,-apple-system,"Segoe UI","DejaVu Sans",sans-serif;
} }
a { a {
+1
View File
@@ -38,6 +38,7 @@ endif
config_h = configuration_data() config_h = configuration_data()
config_h.set('HAVE_GTK_MAC', host_machine.system() == 'darwin' and gtk_mac_dep.found()) config_h.set('HAVE_GTK_MAC', host_machine.system() == 'darwin' and gtk_mac_dep.found())
config_h.set10('ZOITECHAT_INSTALL_EMOJI_FONT', get_option('install-emoji-font'))
config_h.set_quoted('PACKAGE_VERSION', meson.project_version()) config_h.set_quoted('PACKAGE_VERSION', meson.project_version())
config_h.set_quoted('PACKAGE_NAME', meson.project_name()) config_h.set_quoted('PACKAGE_NAME', meson.project_name())
config_h.set_quoted('GETTEXT_PACKAGE', 'zoitechat') config_h.set_quoted('GETTEXT_PACKAGE', 'zoitechat')
+4 -1
View File
@@ -37,7 +37,10 @@ option('install-appdata', type: 'boolean',
option('install-plugin-metainfo', type: 'boolean', value: false, option('install-plugin-metainfo', type: 'boolean', value: false,
description: 'Installs metainfo files for enabled plugins, useful when distros create split packages' description: 'Installs metainfo files for enabled plugins, useful when distros create split packages'
) )
option('install-docs', type: 'boolean', value: true, option('install-emoji-font', type: 'boolean', value: true,
description: 'Install the bundled Noto Color Emoji font instead of using system emoji fonts'
)
option('install-docs', type: 'boolean', value: false,
description: 'Build and install the local HTML documentation' description: 'Build and install the local HTML documentation'
) )
+1
View File
@@ -53,6 +53,7 @@ systems.
%build %build
%meson \ %meson \
-Dinstall-docs=true \
-Dtext-frontend=false \ -Dtext-frontend=false \
-Dwith-checksum=true \ -Dwith-checksum=true \
-Dwith-fishlim=true \ -Dwith-fishlim=true \
+1
View File
@@ -48,6 +48,7 @@ def main() -> None:
"--prefix=/", "--libdir=lib", "--buildtype=release", "-Dgtk-frontend=true", "--prefix=/", "--libdir=lib", "--buildtype=release", "-Dgtk-frontend=true",
"-Dtext-frontend=false", "-Dmac-integration=enabled", "-Ddbus=disabled", "-Dtext-frontend=false", "-Dmac-integration=enabled", "-Ddbus=disabled",
"-Dlibcanberra=disabled", "-Dappindicator=disabled", "-Dinstall-appdata=false", "-Dlibcanberra=disabled", "-Dappindicator=disabled", "-Dinstall-appdata=false",
"-Dinstall-docs=false",
"-Dwith-sysinfo=false", "-Dwith-python=false", "-Dwith-perl=false", "-Dwith-sysinfo=false", "-Dwith-python=false", "-Dwith-perl=false",
"-Dwith-lua=lua", "-Dwith-fishlim=true", "-Dwith-checksum=true", "-Dwith-lua=lua", "-Dwith-fishlim=true", "-Dwith-checksum=true",
"-Dplugin=" + ("false" if args.store_experimental else "true"), "-Dplugin=" + ("false" if args.store_experimental else "true"),
+10
View File
@@ -52,6 +52,16 @@ emoji_font_get_map (void)
return map; return map;
attempted = TRUE; attempted = TRUE;
#if defined(ZOITECHAT_INSTALL_EMOJI_FONT) && !ZOITECHAT_INSTALL_EMOJI_FONT
/* A distribution package can deliberately omit our private font. Keep
* its native/system emoji rendering unless an explicit font is given. */
{
const char *override = g_getenv ("ZOITECHAT_EMOJI_FONT");
if (!override || !*override)
return NULL;
}
#endif
path = emoji_font_path (); path = emoji_font_path ();
if (!path || !g_file_test (path, G_FILE_TEST_IS_REGULAR)) if (!path || !g_file_test (path, G_FILE_TEST_IS_REGULAR))
{ {