You are not logged in.

#1 2020-05-11 19:19:23

mjd119
Member
Registered: 2020-05-07
Posts: 119

[Solved] Black and White Emojis or Missing

I am trying to get emojis to work in Arch and emojis either default to black and white or they are missing (block character indicating missing font). Looking at this page https://getemoji.com/ and inspecting elements tells me that these are part of the Segoe UI Emoji Font which I believe is exclusive to Windows 10 (I have not installed the ttf-ms-win10 fonts from the AUR). Before I installed some extra fonts from the Arch wiki (both official and AUR), there were some fonts missing (block character), other characters were in color, and other characters in black and white. I installed noto-fonts-emoji, ttf-symbola (AUR), ttf-joypixels, and ttf-twemoji-color (AUR). I have not edited the $XDG_CONFIG_HOME/fontconfig/fonts.conf file or the /etc/fonts.conf file manually.

Screenshot of website:
https://i.imgur.com/pu3heKK.png

/etc/fonts.conf has:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts/fonts.conf file to configure system font access -->
<fontconfig>
	<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
		<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
	</its:rules>

	<description>Default configuration file</description>

<!--
	DO NOT EDIT THIS FILE.
	IT WILL BE REPLACED WHEN FONTCONFIG IS UPDATED.
	LOCAL CHANGES BELONG IN 'local.conf'.

	The intent of this standard configuration file is to be adequate for
	most environments.  If you have a reasonably normal environment and
	have found problems with this configuration, they are probably
	things that others will also want fixed.  Please submit any
	problems to the fontconfig bugzilla system located at fontconfig.org

	Note that the normal 'make install' procedure for fontconfig is to
	replace any existing fonts.conf file with the new version.  Place
	any local customizations in local.conf which this file references.

	Keith Packard
-->

<!-- Font directory list -->

	<dir>/usr/share/fonts</dir>
	<dir>/usr/local/share/fonts</dir>
	<dir prefix="xdg">fonts</dir>
	<!-- the following element will be removed in the future -->
	<dir>~/.fonts</dir>

<!--
  Accept deprecated 'mono' alias, replacing it with 'monospace'
-->
	<match target="pattern">
		<test qual="any" name="family">
			<string>mono</string>
		</test>
		<edit name="family" mode="assign" binding="same">
			<string>monospace</string>
		</edit>
	</match>

<!--
  Accept alternate 'sans serif' spelling, replacing it with 'sans-serif'
-->
	<match target="pattern">
		<test qual="any" name="family">
			<string>sans serif</string>
		</test>
		<edit name="family" mode="assign" binding="same">
			<string>sans-serif</string>
		</edit>
	</match>

<!--
  Accept deprecated 'sans' alias, replacing it with 'sans-serif'
-->
	<match target="pattern">
		<test qual="any" name="family">
			<string>sans</string>
		</test>
		<edit name="family" mode="assign" binding="same">
			<string>sans-serif</string>
		</edit>
	</match>
<!--
  Accept alternate 'system ui' spelling, replacing it with 'system-ui'
-->
	<match target="pattern">
		<test qual="any" name="family">
			<string>system ui</string>
		</test>
		<edit name="family" mode="assign" binding="same">
			<string>system-ui</string>
		</edit>
	</match>

<!--
  Load local system customization file
-->
	<include ignore_missing="yes">conf.d</include>

<!-- Font cache directory list -->

	<cachedir>/var/cache/fontconfig</cachedir>
	<cachedir prefix="xdg">fontconfig</cachedir>
	<!-- the following element will be removed in the future -->
	<cachedir>~/.fontconfig</cachedir>

	<config>
<!--
  Rescan configuration every 30 seconds when FcFontSetList is called
 -->
		<rescan>
			<int>30</int>
		</rescan>
	</config>

</fontconfig>

and the $XDG_CONFIG_HOME/fontconfig/fonts.conf file has:

<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
 <its:rules version="1.0" xmlns:its="http://www.w3.org/2005/11/its">
  <its:translateRule selector="/fontconfig/*[not(self::description)]" translate="no"/>
 </its:rules>
 <!-- 
 Artificial oblique for fonts without an italic or oblique version
 -->
 <match target="font">
  <!-- check to see if the font is roman -->
  <test name="slant">
   <const>roman</const>
  </test>
  <!-- check to see if the pattern requested non-roman -->
  <test target="pattern" name="slant" compare="not_eq">
   <const>roman</const>
  </test>
  <!-- multiply the matrix to slant the font -->
  <edit mode="assign" name="matrix">
   <times>
    <name>matrix</name>
    <matrix>
     <double>1</double>
     <double>0.2</double>
     <double>0</double>
     <double>1</double>
    </matrix>
   </times>
  </edit>
  <!-- pretend the font is oblique now -->
  <edit mode="assign" name="slant">
   <const>oblique</const>
  </edit>
  <!-- and disable embedded bitmaps for artificial oblique -->
  <edit mode="assign" name="embeddedbitmap">
   <bool>false</bool>
  </edit>
 </match>
 <!--
 Synthetic emboldening for fonts that do not have bold face available
 -->
 <match target="font">
  <!-- check to see if the weight in the font is less than medium which possibly need emboldening -->
  <test name="weight" compare="less_eq">
   <const>medium</const>
  </test>
  <!-- check to see if the pattern requests bold -->
  <test target="pattern" name="weight" compare="more_eq">
   <const>bold</const>
  </test>
  <!--
		  set the embolden flag
		  needed for applications using cairo, e.g. gucharmap, gedit, ...
		-->
  <edit mode="assign" name="embolden">
   <bool>true</bool>
  </edit>
  <!--
		 set weight to bold
		 needed for applications using Xft directly, e.g. Firefox, ...
		-->
  <edit mode="assign" name="weight">
   <const>bold</const>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="rgba">
   <const>rgb</const>
  </edit>
 </match>
</fontconfig>

UPDATE:
I created a font config file in my home directory with this guide: https://www.christitus.com/emoji and now I have color emojis where I want for the most part.

Last edited by mjd119 (2020-05-12 16:07:47)

Offline

Board footer

Powered by FluxBB