Epiphany can't find fonts

DoneSubmitted by Leo Prikler.
Details
4 participants
  • Jack Hill
  • Leo Prikler
  • Maxim Cournoyer
  • Wensheng Xie
Owner
unassigned
Severity
normal
L
L
Leo Prikler wrote on 10 May 2020 15:02
(address . bug-guix@gnu.org)
fd99e9d8ea7a19bcb104ef23a7b11d276d853a8f.camel@student.tugraz.at
Hi Guix,
when trying to set fonts in Epiphany, it appears as though fonts otherthan "Serif", "Sans" and "Monospace" do not apply. Some symbols, suchas CJK, are also missing in text (but not tooltips interestingly) evenif a font supporting them is installed. I tried refreshing and alsoremoving the fontconfig cache, but that didn't help.
Regards, Leo
L
L
Leo Prikler wrote on 18 May 2020 02:27
(address . 41174@debbugs.gnu.org)
fb82400bf2d20e3428981183516d36664a87163b.camel@student.tugraz.at
Hi Guix,
After some discussion in IRC and testing, I found out that adding$GUIX_PROFILE/share/fonts to the webkit sandbox (during initializationvia `webkit_web_context_add_path_to_sandbox') resolves this problem. Amore general solution would be to iterate over $XDG_DATA_DIRS, append`/fonts' to each item and add the resulting path to the sandbox (if itis a directory).
As this is a problem related to the webkit sandbox, it probably affectsother packages, that make use of it, as well. Looking even deeper(i.e. diving into the webkitgtk source), it appears that there isindeed a `bindFonts' procedure in the BubblewrapLauncher, but that onlyconsiders $XDG_DATA_HOME/fonts, not all of $XDG_DATA_DIRS. As this isthe root of the issue, it should probably be fixed there.
Regards,Leo
Note for those looking for a workaround: Assuming you're installingyour fonts to $GUIX_PROFILE/share/fonts, making $XDG_CACHE_HOME/fontsor $HOME/.fonts a symlink to that should work.
L
L
Leo Prikler wrote on 26 May 2020 20:13
[PATCH] gnu: webkitgtk: Add patch to share all fonts.
(address . 41174@debbugs.gnu.org)
20200526181345.32726-1-leo.prikler@student.tugraz.at
* gnu/packages/patches/webkitgtk-bind-all-fonts.patch: New file.* gnu/packages/webkit.scm (webkitgtk)[source]<patches>: Use it here.* gnu/local.mk: Add it here.--- gnu/local.mk | 1 + .../patches/webkitgtk-bind-all-fonts.patch | 37 +++++++++++++++++++ gnu/packages/webkit.scm | 3 +- 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/webkitgtk-bind-all-fonts.patch
Toggle diff (71 lines)diff --git a/gnu/local.mk b/gnu/local.mkindex d34e7e6ae5..7a694e551a 100644--- a/gnu/local.mk+++ b/gnu/local.mk@@ -1580,6 +1580,7 @@ dist_patch_DATA = \ %D%/packages/patches/warsow-qfusion-fix-bool-return-type.patch \ %D%/packages/patches/weasyprint-library-paths.patch \ %D%/packages/patches/webkitgtk-share-store.patch \+ %D%/packages/patches/webkitgtk-bind-all-fonts.patch \ %D%/packages/patches/websocketpp-fix-for-boost-1.70.patch \ %D%/packages/patches/wicd-bitrate-none-fix.patch \ %D%/packages/patches/wicd-get-selected-profile-fix.patch \diff --git a/gnu/packages/patches/webkitgtk-bind-all-fonts.patch b/gnu/packages/patches/webkitgtk-bind-all-fonts.patchnew file mode 100644index 0000000000..fec0b812f1--- /dev/null+++ b/gnu/packages/patches/webkitgtk-bind-all-fonts.patch@@ -0,0 +1,37 @@+Add fonts from all XDG_DATA_DIRS, not just XDG_DATA_HOME.++See <http://bugs.gnu.org/41174>.+Author: Leo Prikler <leo.prikler@student.tugraz.at>+Index: webkitgtk-2.28.2/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp+===================================================================+--- webkitgtk-2.28.2.orig/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp++++ webkitgtk-2.28.2/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp+@@ -385,8 +385,8 @@ static void bindFonts(Vector<CString>& a+ {+ const char* configDir = g_get_user_config_dir();+ const char* homeDir = g_get_home_dir();+- const char* dataDir = g_get_user_data_dir();+ const char* cacheDir = g_get_user_cache_dir();++ const char* const * dataDirs = g_get_system_data_dirs();++ // Configs can include custom dirs but then we have to parse them...+ GUniquePtr<char> fontConfig(g_build_filename(configDir, "fontconfig", nullptr));+@@ -394,15 +394,17 @@ static void bindFonts(Vector<CString>& a+ GUniquePtr<char> fontCache(g_build_filename(cacheDir, "fontconfig", nullptr));+ GUniquePtr<char> fontHomeConfig(g_build_filename(homeDir, ".fonts.conf", nullptr));+ GUniquePtr<char> fontHomeConfigDir(g_build_filename(configDir, ".fonts.conf.d", nullptr));+- GUniquePtr<char> fontData(g_build_filename(dataDir, "fonts", nullptr));+ GUniquePtr<char> fontHomeData(g_build_filename(homeDir, ".fonts", nullptr));+ bindIfExists(args, fontConfig.get());+ bindIfExists(args, fontConfigHome.get());+ bindIfExists(args, fontCache.get(), BindFlags::ReadWrite);+ bindIfExists(args, fontHomeConfig.get());+ bindIfExists(args, fontHomeConfigDir.get());+- bindIfExists(args, fontData.get());+ bindIfExists(args, fontHomeData.get());++ for (auto dataDir = dataDirs; dataDir != nullptr && *dataDir != nullptr; dataDir++) {++ GUniquePtr<char> fontDataDir(g_build_filename(*dataDir, "fonts", nullptr));++ bindIfExists(args, fontDataDir.get());++ }+ bindIfExists(args, "/var/cache/fontconfig"); // Used by Debian.+ }diff --git a/gnu/packages/webkit.scm b/gnu/packages/webkit.scmindex 90be7d2625..a5c2b3fee2 100644--- a/gnu/packages/webkit.scm+++ b/gnu/packages/webkit.scm@@ -129,7 +129,8 @@ engine that uses Wayland for graphics output.") (sha256 (base32 "1g9hik3bprki5s9d7y5288q5irwckbzajr6rnlvjrlnqrwjkblmr"))- (patches (search-patches "webkitgtk-share-store.patch"))))+ (patches (search-patches "webkitgtk-share-store.patch"+ "webkitgtk-bind-all-fonts.patch")))) (build-system cmake-build-system) (outputs '("out" "doc")) (arguments-- 2.26.2
J
J
Jack Hill wrote on 26 May 2020 21:47
(name . Leo Prikler)(address . leo.prikler@student.tugraz.at)(address . 41174@debbugs.gnu.org)
alpine.DEB.2.20.2005261546210.5735@marsh.hcoop.net
On Tue, 26 May 2020, Leo Prikler wrote:
Toggle quote (10 lines)> * gnu/packages/patches/webkitgtk-bind-all-fonts.patch: New file.> * gnu/packages/webkit.scm (webkitgtk)[source]<patches>: Use it here.> * gnu/local.mk: Add it here.> ---> gnu/local.mk | 1 +> .../patches/webkitgtk-bind-all-fonts.patch | 37 +++++++++++++++++++> gnu/packages/webkit.scm | 3 +-> 3 files changed, 40 insertions(+), 1 deletion(-)> create mode 100644 gnu/packages/patches/webkitgtk-bind-all-fonts.patch
Hi,
I tested this patch on my local system, and it seems to resolve the issue for me. Thanks!
Is this something that should be submitted for inclusion in WebKit upstream?
Best,Jack
L
L
Leo Prikler wrote on 26 May 2020 23:56
(name . Jack Hill)(address . jackhill@jackhill.us)(address . 41174@debbugs.gnu.org)
1b9e299efed71d54ee14fbe904647553864bdc73.camel@student.tugraz.at
Am Dienstag, den 26.05.2020, 15:47 -0400 schrieb Jack Hill:
Toggle quote (26 lines)> On Tue, 26 May 2020, Leo Prikler wrote:> > > * gnu/packages/patches/webkitgtk-bind-all-fonts.patch: New file.> > * gnu/packages/webkit.scm (webkitgtk)[source]<patches>: Use it> > here.> > * gnu/local.mk: Add it here.> > ---> > gnu/local.mk | 1 +> > .../patches/webkitgtk-bind-all-fonts.patch | 37> > +++++++++++++++++++> > gnu/packages/webkit.scm | 3 +-> > 3 files changed, 40 insertions(+), 1 deletion(-)> > create mode 100644 gnu/packages/patches/webkitgtk-bind-all-> > fonts.patch> > Hi,> > I tested this patch on my local system, and it seems to resolve the> issue > for me. Thanks!> > Is this something that should be submitted for inclusion in WebKit > upstream?> > Best,> Jack
Hi,
I don't see anything in the patch itself, that is specific to Guix, soit should probably work upstream as well. This issue is likely goingto affect other functional package managers like Nix too, so it wouldbe nice, if we can get the patch to be accepted upstream. However, itdoes add a specific exception just for fonts, while other resources arestill taken from XDG_DATA_HOME. As such, it is still rather an ad-hocsolution to a very specific annoyance than something "general".
I'm also not quite sure, whether this could cause problems with thenumber of arguments being passed to the bwrap process exceeding somelimit. It has not yet come up so far, but I thought I'd mention it. However, if it does, we're going to be the first to notice with ourhuge environment variables, so that's probably a bigger deal here thanelsewhere.
Regards,Leo
J
J
Jack Hill wrote on 27 May 2020 03:18
(name . Leo Prikler)(address . leo.prikler@student.tugraz.at)(address . 41174@debbugs.gnu.org)
alpine.DEB.2.20.2005262115370.5735@marsh.hcoop.net
On Tue, 26 May 2020, Leo Prikler wrote:
Toggle quote (10 lines)> Hi,>> I don't see anything in the patch itself, that is specific to Guix, so> it should probably work upstream as well. This issue is likely going> to affect other functional package managers like Nix too, so it would> be nice, if we can get the patch to be accepted upstream. However, it> does add a specific exception just for fonts, while other resources are> still taken from XDG_DATA_HOME. As such, it is still rather an ad-hoc> solution to a very specific annoyance than something "general".
Ah, I see. I missed the special exception for fonts.
Toggle quote (7 lines)> I'm also not quite sure, whether this could cause problems with the> number of arguments being passed to the bwrap process exceeding some> limit. It has not yet come up so far, but I thought I'd mention it.> However, if it does, we're going to be the first to notice with our> huge environment variables, so that's probably a bigger deal here than> elsewhere.
I don't think this should be a problem. bwrap supports having its arguments passed over a file describer (with the --args option), and this is what WebKitGTK does.
Best,Jack
L
L
Leo Prikler wrote on 2 Aug 2020 12:05
bug#42618: epiphany does not display Chinese
(address . xiewensheng@hotmail.com)
cf75060d96e7b589b4f5d737003df6990cd4b8c5.camel@student.tugraz.at
I'm not sure whether the warnings generated are related to thebehaviour you're experiencing. There is a way of forcing Epiphany touse another locale for a website, so perhaps you can try that.
In relation to displaying text correctly, I already reported 41174 andhave not noticed it being fixed since.
Regards,Leo
Full quote for ML readers:
Toggle quote (48 lines)> Using guix 1.1.0> > guix (GNU Guix) 2621c6a9ea726cd57c39317329575b7b9fdd7b96> > error:> @guix ~$ epiphany > > ** (epiphany:1968): CRITICAL **: 20:43:43.285: void > webkit_web_context_register_uri_scheme(WebKitWebContext*, const> char*, > WebKitURISchemeRequestCallback, gpointer, GDestroyNotify): assertion > 'g_ascii_strcasecmp(scheme, "ftp") != 0' failed> > (process:2): Gtk-WARNING **: 20:43:45.107: Locale not supported by C> library.> Using the fallback 'C' locale.> > (process:2): Gtk-WARNING **: 20:43:45.117: Locale not supported by C> library.> Using the fallback 'C' locale.> > (process:2): Gtk-WARNING **: 20:43:45.458: Locale not supported by C> library.> Using the fallback 'C' locale.> > (process:2): Gtk-WARNING **: 20:43:45.573: Locale not supported by C> library.> Using the fallback 'C' locale.> > (process:2): Gtk-WARNING **: 20:43:45.848: Locale not supported by C> library.> Using the fallback 'C' locale.> > (process:2): Gtk-WARNING **: 20:43:45.915: Locale not supported by C> library.> Using the fallback 'C' locale.> > (process:2): Gtk-WARNING **: 20:43:46.093: Locale not supported by C> library.> Using the fallback 'C' locale.> > =======> using nyxt browser, the Chinese is displayed correctly.> > How can I fix this?> > best regards,> wxie
W
W
Wensheng Xie wrote on 2 Aug 2020 16:02
(name . Leo Prikler)(address . leo.prikler@student.tugraz.at)
VI1P190MB028617703D8BEED84A82F03FB04C0@VI1P190MB0286.EURP190.PROD.OUTLOOK.COM
Thank you, Leo.

What's the way to force Epiphany to use another locale for web?

best regards,
wxie
On 2020/8/2 下午6:05, Leo Prikler wrote:
Toggle quote (59 lines)> I'm not sure whether the warnings generated are related to the> behaviour you're experiencing. There is a way of forcing Epiphany to> use another locale for a website, so perhaps you can try that.>> In relation to displaying text correctly, I already reported 41174 and> have not noticed it being fixed since.>> Regards,> Leo>> Full quote for ML readers:>> Using guix 1.1.0>>>> guix (GNU Guix) 2621c6a9ea726cd57c39317329575b7b9fdd7b96>>>> error:>> @guix ~$ epiphany>>>> ** (epiphany:1968): CRITICAL **: 20:43:43.285: void>> webkit_web_context_register_uri_scheme(WebKitWebContext*, const>> char*,>> WebKitURISchemeRequestCallback, gpointer, GDestroyNotify): assertion>> 'g_ascii_strcasecmp(scheme, "ftp") != 0' failed>>>> (process:2): Gtk-WARNING **: 20:43:45.107: Locale not supported by C>> library.>> Using the fallback 'C' locale.>>>> (process:2): Gtk-WARNING **: 20:43:45.117: Locale not supported by C>> library.>> Using the fallback 'C' locale.>>>> (process:2): Gtk-WARNING **: 20:43:45.458: Locale not supported by C>> library.>> Using the fallback 'C' locale.>>>> (process:2): Gtk-WARNING **: 20:43:45.573: Locale not supported by C>> library.>> Using the fallback 'C' locale.>>>> (process:2): Gtk-WARNING **: 20:43:45.848: Locale not supported by C>> library.>> Using the fallback 'C' locale.>>>> (process:2): Gtk-WARNING **: 20:43:45.915: Locale not supported by C>> library.>> Using the fallback 'C' locale.>>>> (process:2): Gtk-WARNING **: 20:43:46.093: Locale not supported by C>> library.>> Using the fallback 'C' locale.>>>> =======>> using nyxt browser, the Chinese is displayed correctly.>>>> How can I fix this?>>>> best regards,>> wxie
L
L
Leo Prikler wrote on 2 Aug 2020 16:06
(name . Wensheng Xie)(address . xiewensheng@hotmail.com)
fec834b8739450592e033bb702ea4c35580cc4cd.camel@student.tugraz.at
I'm not quite sure how it's called in your language, but you can set anencoding using the fifth button from below in the main menu.
Am Sonntag, den 02.08.2020, 22:02 +0800 schrieb Wensheng Xie:
Toggle quote (80 lines)> Thank you, Leo.> > > What's the way to force Epiphany to use another locale for web?> > > best regards,> > wxie> > On 2020/8/2 下午6:05, Leo Prikler wrote:> > I'm not sure whether the warnings generated are related to the> > behaviour you're experiencing. There is a way of forcing Epiphany> > to> > use another locale for a website, so perhaps you can try that.> > > > In relation to displaying text correctly, I already reported 41174> > and> > have not noticed it being fixed since.> > > > Regards,> > Leo> > > > Full quote for ML readers:> > > Using guix 1.1.0> > > > > > guix (GNU Guix) 2621c6a9ea726cd57c39317329575b7b9fdd7b96> > > > > > error:> > > @guix ~$ epiphany> > > > > > ** (epiphany:1968): CRITICAL **: 20:43:43.285: void> > > webkit_web_context_register_uri_scheme(WebKitWebContext*, const> > > char*,> > > WebKitURISchemeRequestCallback, gpointer, GDestroyNotify):> > > assertion> > > 'g_ascii_strcasecmp(scheme, "ftp") != 0' failed> > > > > > (process:2): Gtk-WARNING **: 20:43:45.107: Locale not supported> > > by C> > > library.> > > Using the fallback 'C' locale.> > > > > > (process:2): Gtk-WARNING **: 20:43:45.117: Locale not supported> > > by C> > > library.> > > Using the fallback 'C' locale.> > > > > > (process:2): Gtk-WARNING **: 20:43:45.458: Locale not supported> > > by C> > > library.> > > Using the fallback 'C' locale.> > > > > > (process:2): Gtk-WARNING **: 20:43:45.573: Locale not supported> > > by C> > > library.> > > Using the fallback 'C' locale.> > > > > > (process:2): Gtk-WARNING **: 20:43:45.848: Locale not supported> > > by C> > > library.> > > Using the fallback 'C' locale.> > > > > > (process:2): Gtk-WARNING **: 20:43:45.915: Locale not supported> > > by C> > > library.> > > Using the fallback 'C' locale.> > > > > > (process:2): Gtk-WARNING **: 20:43:46.093: Locale not supported> > > by C> > > library.> > > Using the fallback 'C' locale.> > > > > > =======> > > using nyxt browser, the Chinese is displayed correctly.> > > > > > How can I fix this?> > > > > > best regards,> > > wxie
W
W
Wensheng Xie wrote on 2 Aug 2020 16:10
(name . Leo Prikler)(address . leo.prikler@student.tugraz.at)
VI1P190MB028681A9CCD77590C4ED62DAB04C0@VI1P190MB0286.EURP190.PROD.OUTLOOK.COM
I had tried that for all possibility, and none had worked.
This is so strange.

On 2020/8/2 下午10:06, Leo Prikler wrote:
Toggle quote (84 lines)> I'm not quite sure how it's called in your language, but you can set an> encoding using the fifth button from below in the main menu.>> Am Sonntag, den 02.08.2020, 22:02 +0800 schrieb Wensheng Xie:>> Thank you, Leo.>>>>>> What's the way to force Epiphany to use another locale for web?>>>>>> best regards,>>>> wxie>>>> On 2020/8/2 下午6:05, Leo Prikler wrote:>>> I'm not sure whether the warnings generated are related to the>>> behaviour you're experiencing. There is a way of forcing Epiphany>>> to>>> use another locale for a website, so perhaps you can try that.>>>>>> In relation to displaying text correctly, I already reported 41174>>> and>>> have not noticed it being fixed since.>>>>>> Regards,>>> Leo>>>>>> Full quote for ML readers:>>>> Using guix 1.1.0>>>>>>>> guix (GNU Guix) 2621c6a9ea726cd57c39317329575b7b9fdd7b96>>>>>>>> error:>>>> @guix ~$ epiphany>>>>>>>> ** (epiphany:1968): CRITICAL **: 20:43:43.285: void>>>> webkit_web_context_register_uri_scheme(WebKitWebContext*, const>>>> char*,>>>> WebKitURISchemeRequestCallback, gpointer, GDestroyNotify):>>>> assertion>>>> 'g_ascii_strcasecmp(scheme, "ftp") != 0' failed>>>>>>>> (process:2): Gtk-WARNING **: 20:43:45.107: Locale not supported>>>> by C>>>> library.>>>> Using the fallback 'C' locale.>>>>>>>> (process:2): Gtk-WARNING **: 20:43:45.117: Locale not supported>>>> by C>>>> library.>>>> Using the fallback 'C' locale.>>>>>>>> (process:2): Gtk-WARNING **: 20:43:45.458: Locale not supported>>>> by C>>>> library.>>>> Using the fallback 'C' locale.>>>>>>>> (process:2): Gtk-WARNING **: 20:43:45.573: Locale not supported>>>> by C>>>> library.>>>> Using the fallback 'C' locale.>>>>>>>> (process:2): Gtk-WARNING **: 20:43:45.848: Locale not supported>>>> by C>>>> library.>>>> Using the fallback 'C' locale.>>>>>>>> (process:2): Gtk-WARNING **: 20:43:45.915: Locale not supported>>>> by C>>>> library.>>>> Using the fallback 'C' locale.>>>>>>>> (process:2): Gtk-WARNING **: 20:43:46.093: Locale not supported>>>> by C>>>> library.>>>> Using the fallback 'C' locale.>>>>>>>> =======>>>> using nyxt browser, the Chinese is displayed correctly.>>>>>>>> How can I fix this?>>>>>>>> best regards,>>>> wxie
M
M
Maxim Cournoyer wrote on 16 Aug 2020 22:19
Re: bug#41174: [PATCH] gnu: webkitgtk: Add patch to share all fonts.
(name . Leo Prikler)(address . leo.prikler@student.tugraz.at)(address . 41174-done@debbugs.gnu.org)
87a6yuxs0m.fsf@gmail.com
Hi Leo,
Leo Prikler <leo.prikler@student.tugraz.at> writes:
Toggle quote (4 lines)> * gnu/packages/patches/webkitgtk-bind-all-fonts.patch: New file.> * gnu/packages/webkit.scm (webkitgtk)[source]<patches>: Use it here.> * gnu/local.mk: Add it here.
I've expounded a bit the commit message,
Toggle quote (56 lines)> ---> gnu/local.mk | 1 +> .../patches/webkitgtk-bind-all-fonts.patch | 37 +++++++++++++++++++> gnu/packages/webkit.scm | 3 +-> 3 files changed, 40 insertions(+), 1 deletion(-)> create mode 100644 gnu/packages/patches/webkitgtk-bind-all-fonts.patch>> diff --git a/gnu/local.mk b/gnu/local.mk> index d34e7e6ae5..7a694e551a 100644> --- a/gnu/local.mk> +++ b/gnu/local.mk> @@ -1580,6 +1580,7 @@ dist_patch_DATA = \> %D%/packages/patches/warsow-qfusion-fix-bool-return-type.patch \> %D%/packages/patches/weasyprint-library-paths.patch \> %D%/packages/patches/webkitgtk-share-store.patch \> + %D%/packages/patches/webkitgtk-bind-all-fonts.patch \> %D%/packages/patches/websocketpp-fix-for-boost-1.70.patch \> %D%/packages/patches/wicd-bitrate-none-fix.patch \> %D%/packages/patches/wicd-get-selected-profile-fix.patch \> diff --git a/gnu/packages/patches/webkitgtk-bind-all-fonts.patch b/gnu/packages/patches/webkitgtk-bind-all-fonts.patch> new file mode 100644> index 0000000000..fec0b812f1> --- /dev/null> +++ b/gnu/packages/patches/webkitgtk-bind-all-fonts.patch> @@ -0,0 +1,37 @@> +Add fonts from all XDG_DATA_DIRS, not just XDG_DATA_HOME.> +> +See <http://bugs.gnu.org/41174>.> +Author: Leo Prikler <leo.prikler@student.tugraz.at>> +Index: webkitgtk-2.28.2/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp> +===================================================================> +--- webkitgtk-2.28.2.orig/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp> ++++ webkitgtk-2.28.2/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp> +@@ -385,8 +385,8 @@ static void bindFonts(Vector<CString>& a> + {> + const char* configDir = g_get_user_config_dir();> + const char* homeDir = g_get_home_dir();> +- const char* dataDir = g_get_user_data_dir();> + const char* cacheDir = g_get_user_cache_dir();> ++ const char* const * dataDirs = g_get_system_data_dirs();> +> + // Configs can include custom dirs but then we have to parse them...> + GUniquePtr<char> fontConfig(g_build_filename(configDir, "fontconfig", nullptr));> +@@ -394,15 +394,17 @@ static void bindFonts(Vector<CString>& a> + GUniquePtr<char> fontCache(g_build_filename(cacheDir, "fontconfig", nullptr));> + GUniquePtr<char> fontHomeConfig(g_build_filename(homeDir, ".fonts.conf", nullptr));> + GUniquePtr<char> fontHomeConfigDir(g_build_filename(configDir, ".fonts.conf.d", nullptr));> +- GUniquePtr<char> fontData(g_build_filename(dataDir, "fonts", nullptr));> + GUniquePtr<char> fontHomeData(g_build_filename(homeDir, ".fonts", nullptr));> + bindIfExists(args, fontConfig.get());> + bindIfExists(args, fontConfigHome.get());> + bindIfExists(args, fontCache.get(), BindFlags::ReadWrite);> + bindIfExists(args, fontHomeConfig.get());> + bindIfExists(args, fontHomeConfigDir.get());> +- bindIfExists(args, fontData.get());
removed the above deleted lines from your patch, so as to continuehonoring XDG_DATA_HOME,
Toggle quote (22 lines)> + bindIfExists(args, fontHomeData.get());> ++ for (auto dataDir = dataDirs; dataDir != nullptr && *dataDir != nullptr; dataDir++) {> ++ GUniquePtr<char> fontDataDir(g_build_filename(*dataDir, "fonts", nullptr));> ++ bindIfExists(args, fontDataDir.get());> ++ }> + bindIfExists(args, "/var/cache/fontconfig"); // Used by Debian.> + }> diff --git a/gnu/packages/webkit.scm b/gnu/packages/webkit.scm> index 90be7d2625..a5c2b3fee2 100644> --- a/gnu/packages/webkit.scm> +++ b/gnu/packages/webkit.scm> @@ -129,7 +129,8 @@ engine that uses Wayland for graphics output.")> (sha256> (base32> "1g9hik3bprki5s9d7y5288q5irwckbzajr6rnlvjrlnqrwjkblmr"))> - (patches (search-patches "webkitgtk-share-store.patch"))))> + (patches (search-patches "webkitgtk-share-store.patch"> + "webkitgtk-bind-all-fonts.patch"))))> (build-system cmake-build-system)> (outputs '("out" "doc"))> (arguments
And validated it worked well with a './pre-inst-env guix system vmepiphany-ratpoison.scm' generated VM (it exhibited the problem afterall, when used in a VM).
For completeness sake, the test VM operating system is attached. It'snot necessary to include bubblewrap to trigger the font problem.
;;; Try reproducing the font problem in Epiphany. ;;; Run VM with: /gnu/store/w0m677q3d94rpvyaas74qahdvs8zfrcq-run-vm.sh (use-modules (gnu) (gnu system nss)) (use-service-modules desktop ssh) (use-package-modules bootloaders certs ratpoison suckless wm xorg) (define %extra-packages (map specification->package '("font-adobe-source-han-sans" "epiphany" ; "bubblewrap" "strace" "fontconfig" "zile"))) (operating-system (host-name "antelope") (timezone "Europe/Paris") (locale "en_US.utf8") ;; Use the UEFI variant of GRUB with the EFI System ;; Partition mounted on /boot/efi. (bootloader (bootloader-configuration (bootloader grub-efi-bootloader) (target "/boot/efi"))) ;; Assume the target root file system is labelled "my-root", ;; and the EFI System Partition has UUID 1234-ABCD. (file-systems (append (list (file-system (device (file-system-label "my-root")) (mount-point "/") (type "ext4")) (file-system (device (uuid "1234-ABCD" 'fat)) (mount-point "/boot/efi") (type "vfat"))) %base-file-systems)) (users (cons (user-account (name "alice") (comment "Bob's sister") (group "users") (supplementary-groups '("wheel" "netdev" "audio" "video"))) %base-user-accounts)) ;; Add a bunch of window managers; we can choose one at ;; the log-in screen with F1. (packages (append (list ratpoison ;; terminal emulator xterm ;; for HTTPS access nss-certs) %extra-packages %base-packages)) ;; Use the "desktop" services, which include the X11 ;; log-in service, networking with NetworkManager, and more. (services (cons* (service openssh-service-type (openssh-configuration (x11-forwarding? #t) (permit-root-login 'without-password))) %desktop-services)) ;; Allow resolution of '.local' host names with mDNS. (name-service-switch %mdns-host-lookup-nss))
The fix is now merged in master as of commit bc549a276c.
Thanks for investigating and fixing the issue!
Closing,
Maxim
Closed
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send email to 41174@debbugs.gnu.org