https://wiki.archlinux.org/api.php?action=feedcontributions&user=AAlpine&feedformat=atomArchWiki - User contributions [en]2024-03-28T20:39:17ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Bluetooth_headset&diff=644197Bluetooth headset2020-12-08T18:01:45Z<p>AAlpine: Add one more troubleshooting solution to "protocol not available" error</p>
<hr />
<div>[[Category:Sound]]<br />
[[Category:Bluetooth]]<br />
[[ja:Bluetooth ヘッドセット]]<br />
[[zh-hans:Bluetooth headset]]<br />
{{Related articles start}}<br />
{{Related|Bluetooth}}<br />
{{Related articles end}}<br />
<br />
Currently, Arch Linux supports the A2DP profile (Audio Sink) for remote audio playback with the default installation.<br />
<br />
== Headset via Bluez5/PulseAudio ==<br />
<br />
{{Merge|Bluetooth|Significant redundancy with general setup on Bluetooth page. Should be merged there. Headset-specific info would stay on this page.|Talk:Bluetooth#Merging general setup from Keyboard, Mouse, Headset pages}}<br />
<br />
[[Install]] {{Pkg|pulseaudio-alsa}}, {{Pkg|pulseaudio-bluetooth}} and {{Pkg|bluez-utils}} providing the {{ic|bluetoothctl}} utility.<br />
<br />
{{Note|Before continuing, ensure that the bluetooth device is not blocked by [[rfkill]].}}<br />
<br />
=== Configuration via CLI ===<br />
[[Start]] the {{ic|bluetooth.service}} systemd unit.<br />
<br />
Now we can use the ''bluetoothctl'' command line utility to pair and connect. For troubleshooting and more detailed explanations of ''bluetoothctl'' see the [[Bluetooth]] article. Run<br />
<br />
$ bluetoothctl<br />
<br />
to be greeted by its internal command prompt. Then enter:<br />
<br />
[bluetooth]# power on<br />
[bluetooth]# agent on<br />
[bluetooth]# default-agent<br />
[bluetooth]# scan on<br />
<br />
Now make sure that your headset is in pairing mode. It should be discovered shortly. For example,<br />
[NEW] Device 00:1D:43:6D:03:26 Lasmex LBT10<br />
shows a device that calls itself ''"Lasmex LBT10"'' and has MAC address ''"00:1D:43:6D:03:26"''. We will now use that MAC address to initiate the pairing:<br />
<br />
[bluetooth]# pair 00:1D:43:6D:03:26<br />
<br />
After pairing, you also need to explicitly connect the device (if this does not work, try the {{ic|trust}} command below ''before'' attempting to connect):<br />
<br />
[bluetooth]# connect 00:1D:43:6D:03:26<br />
<br />
If you are getting a connection error {{ic|org.bluez.Error.Failed}} retry by killing existing PulseAudio daemon first:<br />
<br />
$ pulseaudio -k<br />
[bluetooth]# connect 00:1D:43:6D:03:26<br />
<br />
Finally, if you want to automatically connect to this device in the future:<br />
<br />
[bluetooth]# trust 00:1D:43:6D:03:26<br />
<br />
If everything works correctly, you now have a separate output device in [[PulseAudio]].<br />
{{Note|The device may be off by default. Select its audio profile ({{ic|OFF}}, {{ic|A2DP}}, {{ic|HFP}}) in the "Configuration" tab of {{Pkg|pavucontrol}}.}}<br />
You can now redirect any audio through that device using the "Playback" and "Recording" tabs of {{Pkg|pavucontrol}}.<br />
<br />
You can now disable scanning again and exit the program:<br />
[bluetooth]# scan off<br />
[bluetooth]# exit<br />
<br />
==== Setting up auto connection ====<br />
<br />
To make your headset auto connect you need to enable PulseAudio's switch-on-connect module. Do this by adding the following lines to {{ic|/etc/pulse/default.pa}}:<br />
{{hc|/etc/pulse/default.pa|<br />
### Automatically switch to newly-connected devices<br />
load-module module-switch-on-connect<br />
}}<br />
<br />
Now make ''bluetoothctl'' trust your Bluetooth headset by running ''trust 00:1D:43:6D:03:26'' inside the ''bluetoothctl'' console to prevent errors similar to:<br />
bluetoothd[487]: Authentication attempt without agent<br />
bluetoothd[487]: Access denied: org.bluez.Error.Rejected<br />
<br />
[bluetooth]# trust 00:1D:43:6D:03:26<br />
<br />
By default, your Bluetooth adapter will not power on after a reboot. The former method by using {{ic|hciconfig hci0 up}} is deprecated, see the [http://www.bluez.org/release-of-bluez-5-35/ release note]. Now you just need to add the line {{ic|1=AutoEnable=true}} in {{ic|/etc/bluetooth/main.conf}} at the bottom in the {{ic|[Policy]}} section:<br />
{{hc|1=/etc/bluetooth/main.conf|2=<br />
[Policy]<br />
AutoEnable=true<br />
}}<br />
<br />
==== Media controls ====<br />
<br />
{{Note|Some headphones like the Sony WH-1000XM3 provide an AVRCP interface. For these types ''mpris-proxy'' is not required. Just make sure you have [[key binding]]s set up for media keys.}}<br />
<br />
To use the media controls they may be forwarded to [https://specifications.freedesktop.org/mpris-spec/latest/ MPRIS2], where they can be picked up by media players that support mpris for external control. Install {{Pkg|bluez-utils}} and run.<br />
<br />
$ mpris-proxy<br />
<br />
In order to start up mpris-proxy in the background and/or when your system starts, you may create a systemd user script<br />
<br />
{{hc|~/.config/systemd/user/mpris-proxy.service|<nowiki><br />
[Unit]<br />
Description=Forward bluetooth midi controls via mpris2 so they are picked up by supporting media players<br />
<br />
[Service]<br />
Type=simple<br />
ExecStart=/usr/bin/mpris-proxy<br />
<br />
[Install]<br />
WantedBy=default.target<br />
</nowiki>}}<br />
<br />
Then start it<br />
<br />
$ systemctl --user start mpris-proxy<br />
<br />
and enable it to start at login<br />
<br />
$ systemctl --user enable mpris-proxy<br />
<br />
=== Configuration via GNOME Bluetooth ===<br />
{{Note| The A2DP profile will not activate using this method with pulseaudio 9/10 due to an ongoing bug, leading to possible low quality mono sound. See [[#A2DP not working with PulseAudio]] for a possible solution.}}<br />
You can use [[Bluetooth#Graphical|GNOME Bluetooth]] graphical front-end to easily configure your bluetooth headset. <br />
<br />
First, you need to be sure that {{ic|bluetooth.service}} systemd unit is running. <br />
<br />
Open GNOME Bluetooth and activate the bluetooth. After scanning for devices, you can connect to your headset selecting it on the device list. You can directly access to sound configuration panel from the device menu. On the sound panel, a new sink should appear when your device is connected.<br />
<br />
=== LDAC/aptX ===<br />
[[wikipedia:LDAC_(codec)|LDAC]]/[[wikipedia:aptX|aptX]] codec support can be enabled by installing {{aur|pulseaudio-modules-bt}} and {{aur|libldac}}. See its [https://github.com/EHfive/pulseaudio-modules-bt project page] for configuration tips.<br />
<br />
=== Troubleshooting ===<br />
<br />
{{Note|Many users report frustration with getting A2DP/Bluetooth Headsets to work. see [[#Switch between HSP/HFP and A2DP setting]] for additional information.}}<br />
<br />
==== Bad sound / Static noise / "Muddy" sound ====<br />
<br />
If you experience bad sound quality with your headset, it could in all likelihood be because your headset is not set to the correct profile.<br />
See [[#Switch between HSP/HFP and A2DP setting]] to solve the problem.<br />
<br />
==== Selected audio profile, but headset inactive and audio cannot be redirected ====<br />
<br />
Deceptively, this menu is available before the device has been connected; annoyingly it will have no effect. The menu seems to be created as soon as the receiver recognizes the device.<br />
<br />
Make sure to run bluetoothctl (with sudo/as root) and connect the device manually. There may be configuration options to remove the need to do this each time, but neither pairing nor trusting induce automatic connecting for me.<br />
<br />
==== Pairing fails with AuthenticationFailed ====<br />
<br />
If pairing fails, you can try enabling or [https://stackoverflow.com/questions/12888589/linux-command-line-howto-accept-pairing-for-bluetooth-device-without-pin disabling SSPMode] with:<br />
# btmgmt ssp off<br />
or<br />
# btmgmt ssp on<br />
<br />
You may need to turn off BlueTooth while you run this command.<br />
<br />
==== Pairing works, but connecting does not ====<br />
<br />
You might see the following error in ''bluetoothctl'':<br />
<br />
[bluetooth]# connect 00:1D:43:6D:03:26<br />
Attempting to connect to 00:1D:43:6D:03:26<br />
Failed to connect: org.bluez.Error.Failed<br />
<br />
To further investigate, have a look at the log via one of the following commands:<br />
<br />
# systemctl status bluetooth<br />
# journalctl -n 20<br />
<br />
You might see a message like this:<br />
<br />
bluetoothd[5556]: a2dp-sink profile connect failed for 00:1D:43:6D:03:26: Protocol not available<br />
<br />
This may be due to the {{Pkg|pulseaudio-bluetooth}} package not being installed (or {{Pkg|pulseaudio-modules-bt-git}} [https://github.com/EHfive/pulseaudio-modules-bt/issues/140 needing a clean reinstall]). Install it if it missing, then restart pulseaudio.<br />
<br />
It can also be due to permission, especially if starting pulseaudio as root allows you to connect. Add your user to the ''lp'' group, then restart pulseaudio.<br />
See {{ic|/etc/dbus-1/system.d/bluetooth.conf}} for reference.<br />
<br />
If the issue is not due to the missing package, the problem in this case is that PulseAudio is not catching up. A common solution to this problem is to restart PulseAudio. Note that it is perfectly fine to run ''bluetoothctl'' as root while PulseAudio runs as user. After restarting PulseAudio, retry to connect. It is not necessary to repeat the pairing.<br />
<br />
If restarting PulseAudio does not work, you need to load module-bluetooth-discover.<br />
<br />
# pactl load-module module-bluetooth-discover<br />
<br />
The same load-module command can be added to {{ic|/etc/pulse/default.pa}}.<br />
<br />
If that still does not work, or you are using PulseAudio's system-wide mode, also load the following PulseAudio modules (again these can be loaded via your {{ic|default.pa}} or {{ic|system.pa}}):<br />
<br />
module-bluetooth-policy<br />
module-bluez5-device<br />
module-bluez5-discover<br />
<br />
It's also possible there are no write permissions for the owner of /var/lib/bluetooth. If this is the case, you may get the device to work by removing and re-pairing it, but the issue will return after rebooting. Restoring write permissions fixes this issue:<br />
<br />
chmod -R u+w /var/lib/bluetooth<br />
<br />
==== Connecting works, but there are sound glitches all the time ====<br />
<br />
This is very likely to occur when the Bluetooth and the WiFi share the same chip as they share the same physical antenna and possibly band range (2.4GHz). Although this works seamlessly on Windows, this is not the case on Linux.<br />
<br />
A possible solution is to move your WiFi network to 5GHz so that there will be no interference. If your card/router does not support this, you can upgrade your WiFi drivers/firmware. This approach works on Realtek 8723BE and latest rtl drivers for this chip from AUR.<br />
<br />
If nothing of the previous is possible, a less effective mitigation is to tweak the fragment size and the latency on PulseAudio output port, trying to compensate interference. Reasonable values must be chosen, because these settings can make the audio out of sync (e.g. when playing videos). To change the latency of the bluetooth headset's port (e.g. to 125000 microseconds in the following example):<br />
$ pactl set-port-latency-offset <bluez_card> headset-output '''125000'''<br />
where the identifier of the card can be found with<br />
$ pacmd list-sinks | egrep -o 'bluez_card[^>]*'<br />
The fragment size can be set in the config file {{ic|/etc/pulse/daemon.conf}} and takes effect after a restart of PulseAudio (for more details please see [[PulseAudio/Troubleshooting#Setting the default fragment number and buffer size in PulseAudio]]).<br />
<br />
Perhaps it will help to add "options ath9k btcoex_enable = 1" to the {{ic|/etc/modprobe.d/ath9k.conf}} (with the appropriate bluetooth adapter):<br />
{{hc|1=/etc/modprobe.d/ath9k.conf|2=<br />
# possibly fix for sound glitches<br />
options ath9k btcoex_enable = 1<br />
}}<br />
<br />
Then restart.<br />
<br />
==== Connecting works, but I cannot play sound ====<br />
<br />
Make sure that you see the following messages in your system log:<br />
<br />
bluetoothd[5556]: Endpoint registered: sender=:1.83 path=/MediaEndpoint/A2DPSource<br />
bluetoothd[5556]: Endpoint registered: sender=:1.83 path=/MediaEndpoint/A2DPSink<br />
<br />
If you see a message similar to this, you can go on and investigate your PulseAudio configuration. Otherwise, go back and ensure the connection is successful.<br />
<br />
{{Move|PulseAudio/Troubleshooting|2=The following seems to be general issue: [https://wiki.archlinux.org/index.php?title=PulseAudio/Troubleshooting&diff=next&oldid=421986]}}<br />
<br />
When using [[GDM]], another instance of PulseAudio is started, which "captures" your bluetooth device connection. This can be prevented by [[mask]]ing the pulseaudio socket for the GDM user by doing the following:<br />
<br />
# mkdir -p /var/lib/gdm/.config/systemd/user<br />
# ln -s /dev/null /var/lib/gdm/.config/systemd/user/pulseaudio.socket<br />
<br />
On next reboot the second instance of PulseAudio will not be started.<br />
<br />
It may happen that bluez wrongly considers an headset as not a2dp capable. In this case, search the index of the bluetooth device with<br />
<br />
$ pacmd ls<br />
<br />
Among the output there should be a section related to the bluetooth headset, containing something similar to<br />
<br />
{{hc<br />
|1=pacmd ls<br />
|2=index: 2<br />
name: <bluez_card.XX_XX_XX_XX_XX_XX><br />
driver: <module-bluez5-device.c><br />
owner module: 27<br />
properties:<br />
device.description = "SONY MDR-100ABN"<br />
device.string = "XX:XX:XX:XX:XX:XX"<br />
device.api = "bluez"<br />
device.class = "sound"<br />
...}}<br />
<br />
To manually set the profile, run<br />
<br />
$ pacmd set-card-profile 2 a2dp_sink<br />
<br />
where 2 is the index of the device retrieved through {{ic|pacmd ls}}.<br />
<br />
==== Connecting works, sound plays fine until headphones become idle, then stutters ====<br />
<br />
If the headphones play sound correctly until they become idle and then stutter on resume (e.g. because the sound is paused, or because no sound is played for a while), try disabling PulseAudio's automatic sink/source suspension on idle.<br />
<br />
See [[PulseAudio/Troubleshooting#Bluetooth headset replay problems]] for steps.<br />
<br />
==== UUIDs has unsupported type ====<br />
<br />
During pairing you might see this output in ''bluetoothctl'':<br />
<br />
[CHG] Device 00:1D:43:6D:03:26 UUIDs has unsupported type<br />
<br />
This message is a very common one and can be ignored.<br />
<br />
==== PC shows device as paired, but is not recognized by device ====<br />
<br />
This might be due to the device not supporting bluetooth LE for pairing. <br />
<br />
Try setting {{ic|1=ControllerMode = bredr}} in {{ic|/etc/bluetooth/main.conf}}. See [https://unix.stackexchange.com/questions/292189/pairing-bose-qc-35-over-bluetooth-on-fedora].<br />
<br />
==== Device connects, then disconnects after a few moments ====<br />
<br />
If you see messages like the following in {{ic|journalctl}} output, and your device fails to connect or disconnects shortly after connecting:<br />
<br />
bluetoothd: Unable to get connect data for Headset Voice gateway: getpeername: Transport endpoint is not connected (107)<br />
bluetoothd: connect error: Connection refused (111)<br />
<br />
This may be because you have already paired the device with another operating system using the same bluetooth adapter (e.g., dual-booting). Some devices cannot handle multiple pairings associated with the same MAC address (i.e., bluetooth adapter). You can fix this by re-pairing the device. Start by removing the device:<br />
<br />
$ bluetoothctl<br />
[bluetooth]# devices<br />
Device XX:XX:XX:XX:XX:XX My Device<br />
[bluetooth]# remove XX:XX:XX:XX:XX:XX<br />
<br />
Then [[restart]] {{ic|bluetooth.service}}, turn on your bluetooth adapter, make your device discoverable, re-scan for devices, and re-pair your device. Depending on your bluetooth manager, you may need to perform a full reboot in order to re-discover the device.<br />
<br />
==== Apple AirPods have low volume ====<br />
<br />
Edit {{ic|bluetooth.service}} by running {{ic|systemctl edit --full bluetooth.service}} and change the line:<br />
<br />
ExecStart=/usr/lib/bluetooth/bluetoothd<br />
<br />
to:<br />
<br />
ExecStart=/usr/lib/bluetooth/bluetoothd --noplugin=avrcp<br />
<br />
Finally [[restart]] {{ic|bluetooth.service}}, [[reload]] systemd manager configuration<br />
<br />
Reconnect your headset.<br />
<br />
==== HSP problem: the bluetooth sink and source are created, but no audio is being transmitted ====<br />
<br />
You may be missing firmware or the SCO (audio protocol of HSP and HFP) routing might be wrong. See [https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Bluetooth/#index10h3] - the firmware for BCM20702 can be installed via {{AUR|bcm20702a1-firmware}} or {{AUR|bcm20702b0-firmware}}.<br />
<br />
== Headset via Bluez5/bluez-alsa ==<br />
<br />
{{Note|Bluez5 has dropped direct integration for [[ALSA]] and supports [[PulseAudio]] only. Follow the instructions below if you cannot or do not want to use PulseAudio.}}<br />
<br />
First, ensure that your headset is correctly paired and connected to the system (see for example {{ic|bluetoothctl}}).<br />
<br />
Then, install {{AUR|bluez-alsa-git}}, start (and enable) the {{ic|bluealsa}} service, and add your user to the {{ic|audio}} group.<br />
<br />
Run the following command to check if everything is working as intended (replace {{ic|XX:XX:XX:XX:XX:XX}} and {{ic|FILE}} below):<br />
$ aplay -D bluealsa:SRV=org.bluealsa,DEV=XX:XX:XX:XX:XX:XX,PROFILE=a2dp FILE.wav<br />
<br />
Finally, add the following lines to your {{ic|~/.asoundrc}}:<br />
<br />
{{hc|~/.asoundrc|<br />
defaults.bluealsa {<br />
service "org.bluealsa"<br />
device "XX:XX:XX:XX:XX:XX"<br />
profile "a2dp"<br />
}<br />
}}<br />
<br />
You can now use the bluealsa device to reach your headset. Volume management is conducted normally via {{ic|alsamixer}} with the option {{ic|-D bluealsa}}.<br />
<br />
== Legacy documentation: ALSA, bluez5 and PulseAudio method ==<br />
<br />
{{Accuracy|Describes two different methods, see the [[Talk:Bluetooth headset#bluez5 method: overcomplicated instructions|talk page]] for details.|Talk:Bluetooth_Headset#bluez5_method:_overcomplicated_instructions}}<br />
<br />
[[ALSA]], [[bluez|bluez5]], and [[PulseAudio]] work together to allow a wireless [[Bluetooth]] headset to play audio. The following method works with a Lenovo T61p laptop and SoundBot SB220 wireless bluetooth headset. The required software stack is extensive and failure to include all components can produce errors which are difficult to understand. The following list of software packages might not be the minimum required set and needs to be examined more closely.<br />
<br />
Bluez5 has a regression causing HSP/HFP Telephone profile to not be available. This regression is documented in the [https://www.freedesktop.org/wiki/Software/PulseAudio/Notes/5.0/ draft release notes for Pulseaudio 5.0] which say (in "Notes for packagers"): "PulseAudio now supports BlueZ 5, but only the A2DP profile. BlueZ 4 is still the only way to make HSP/HFP work." ([https://fedoraproject.org/wiki/Common_F20_bugs#bluez5-profile from here])<br />
<br />
=== Install Software Packages ===<br />
<br />
The core software components are [[ALSA]], Bluez5, [[PulseAudio]]. However there are additional libraries which are required. As well as a player which can play audio files. The following section lists the software packages installed in order to connect the headset and play audio over the headset.<br />
<br />
==== Install ALSA and associated libraries ====<br />
<br />
[[ALSA]] works with the linux kernel to provide audio services to user mode software. The following packages are used with the [[Bluetooth]] headset: {{Pkg|alsa-utils}}, {{Pkg|alsa-plugins}}, {{Pkg|alsa-tools}}.<br />
<br />
==== Install Bluez5 ====<br />
<br />
Bluez5 is the latest [[Bluetooth]] stack. It is required for [[PulseAudio]] to interface with wireless headsets. Required packages: {{Pkg|bluez}}, {{Pkg|bluez-utils}}, {{Pkg|bluez-libs}}.<br />
<br />
==== Install Audacious ====<br />
<br />
[[Audacious]] is a program which plays audio files. It can work directly with [[ALSA]] or with [[PulseAudio]]. Required packages: {{Pkg|audacious}}, {{Pkg|audacious-plugins}}.<br />
<br />
=== Procedure ===<br />
<br />
Once the required packages are installed, use this procedure to play audio with a bluetooth headset. The high level overview of the procedure is to pair the headset, connect the headset, configure the player and pulse audio controller and then play audio.<br />
<br />
[[Start]] the bluetooth service as root.<br />
<br />
Verify Bluetooth is started<br />
# systemctl status bluetooth<br />
bluetooth.service - Bluetooth service<br />
Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; disabled)<br />
Active: active (running) since Sat 2013-12-07 12:31:14 PST; 12s ago<br />
Docs: man:bluetoothd(8)<br />
Main PID: 3136 (bluetoothd)<br />
Status: "Running"<br />
CGroup: /system.slice/bluetooth.service<br />
└─3136 /usr/lib/bluetooth/bluetoothd<br />
<br />
Dec 07 12:31:14 t61p systemd[1]: Starting Bluetooth service...<br />
Dec 07 12:31:14 t61p bluetoothd[3136]: Bluetooth daemon 5.11<br />
Dec 07 12:31:14 t61p systemd[1]: Started Bluetooth service.<br />
Dec 07 12:31:14 t61p bluetoothd[3136]: Starting SDP server<br />
Dec 07 12:31:14 t61p bluetoothd[3136]: Bluetooth management interface 1.3 i...ed<br />
Hint: Some lines were ellipsized, use -l to show in full.<br />
<br />
Start the PulseAudio daemon. This must be done after X windows is started and as a normal user.<br />
$ pulseaudio -D<br />
<br />
Verify the PulseAudio daemon is running.<br />
$ pulseaudio --check -v<br />
I: [pulseaudio] main.c: Daemon running as PID 3186<br />
<br />
Start up bluetoothctl as root and pair and connect your headset. As a regular user, bluetoothctl will pair but not connect. Perhaps this is related to the config file (shown below) which is setup for what appears to be the root user.<br />
Note: the procedure shown below is for an initial pair and connect of the headphone. If the headset is already paired, then the procedure below can be shortened to: power on, agent on, default-agent, connect <mac address>. The mac address can be seen from the devices command output.<br />
<br />
$ bluetoothctl <br />
[NEW] Controller 00:1E:4C:F4:98:5B t61p-0 [default]<br />
[NEW] Device 00:1A:7D:12:36:B9 SoundBot SB220<br />
[bluetooth]# show<br />
Controller 00:1E:4C:F4:98:5B<br />
Name: t61p<br />
Alias: t61p-0<br />
Class: 0x000000<br />
Powered: no<br />
Discoverable: no<br />
Pairable: yes<br />
UUID: PnP Information (00001200-0000-1000-8000-00805f9b34fb)<br />
UUID: Generic Access Profile (00001800-0000-1000-8000-00805f9b34fb)<br />
UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)<br />
UUID: A/V Remote Control (0000110e-0000-1000-8000-00805f9b34fb)<br />
UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)<br />
UUID: Audio Source (0000110a-0000-1000-8000-00805f9b34fb)<br />
UUID: Audio Sink (0000110b-0000-1000-8000-00805f9b34fb)<br />
Modalias: usb:v1D6Bp0246d050B<br />
Discovering: no<br />
[bluetooth]# power on<br />
[CHG] Controller 00:1E:4C:F4:98:5B Class: 0x0c010c<br />
Changing power on succeeded<br />
[CHG] Controller 00:1E:4C:F4:98:5B Powered: yes<br />
[bluetooth]# agent on<br />
Agent registered<br />
[bluetooth]# default-agent<br />
Default agent request successful<br />
<br />
<power on your headset in pairing mode. Eventually you will see what appears to be a mac address.><br />
[bluetooth]# scan on<br />
Discovery started<br />
[CHG] Controller 00:1E:4C:F4:98:5B Discovering: yes<br />
[CHG] Device 00:1A:7D:12:36:B9 RSSI: -61<br />
[bluetooth]# pair 00:1A:7D:12:36:B9<br />
Attempting to pair with 00:1A:7D:12:36:B9<br />
[CHG] Device 00:1A:7D:12:36:B9 Connected: yes<br />
[CHG] Device 00:1A:7D:12:36:B9 UUIDs has unsupported type<br />
[CHG] Device 00:1A:7D:12:36:B9 Paired: yes<br />
Pairing successful<br />
[bluetooth]# connect 00:1A:7D:12:36:B9<br />
[CHG] Device 00:1A:7D:12:36:B9 Connected: yes<br />
Connection successful<br />
[bluetooth]# info 00:1A:7D:12:36:B9<br />
Device 00:1A:7D:12:36:B9<br />
Name: SoundBot SB220<br />
Alias: SoundBot SB220<br />
Class: 0x240404<br />
Icon: audio-card<br />
Paired: yes<br />
Trusted: no<br />
Blocked: no<br />
Connected: yes<br />
LegacyPairing: yes<br />
UUID: Headset (00001108-0000-1000-8000-00805f9b34fb)<br />
UUID: Audio Sink (0000110b-0000-1000-8000-00805f9b34fb)<br />
UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)<br />
UUID: A/V Remote Control (0000110e-0000-1000-8000-00805f9b34fb)<br />
UUID: Handsfree (0000111e-0000-1000-8000-00805f9b34fb)<br />
<br />
Start up alsamixer, for simplicity un-mute all your outputs. Oddly enough some can be muted though. The ones I had muted during playback were:<br />
* Headphones<br />
* SPIDF<br />
<br />
Start up audacious. Use the menu to select PulseAudio as your output. Somewhere I read that bluez5 requires pulseaudio-git and this jives with my experience.<br />
<br />
Start up pavucontrol in a terminal. In the Outputs tab select the bluetooth headset.<br />
<br />
[https://netskink.blogspot.com/2013/12/pulseaudio-pavucontrol-and-audacious.html screenshot of application settings]<br />
<br />
==== Miscellaneous configuration files ====<br />
<br />
For reference, these settings were also done.<br />
<br />
===== ALSA /etc/asound.conf =====<br />
<br />
The settings shown at the top of this page was used, but the additional modification for Intel laptop sound cards.<br />
<br />
{{bc|<nowiki><br />
pcm.btheadset {<br />
type plug<br />
slave {<br />
pcm {<br />
type bluetooth<br />
device 00:1A:7D:12:36:B9<br />
profile "auto"<br />
}<br />
}<br />
hint {<br />
show on<br />
description "BT Headset"<br />
}<br />
}<br />
ctl.btheadset {<br />
type bluetooth<br />
}<br />
options snd-hda-intel model=laptop<br />
</nowiki>}}<br />
<br />
===== /etc/dbus-1/system.d/bluetooth.conf =====<br />
<br />
The settings here seem to be enabled for root only. See the policy user="root" section. However, if a regular user is specified here, the system fails to start. Someone with more knowledge could explain why.<br />
<br />
{{hc|/etc/dbus-1/system.d/bluetooth.conf|<nowiki><br />
<!-- This configuration file specifies the required security policies for Bluetooth core daemon to work. --><br />
<br />
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"<br />
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"><br />
<busconfig><br />
<br />
<!-- ../system.conf have denied everything, so we just punch some holes --><br />
<br />
<policy user="root"><br />
<allow own="org.bluez"/><br />
<allow send_destination="org.bluez"/><br />
<allow send_interface="org.bluez.Agent1"/><br />
<allow send_interface="org.bluez.MediaEndpoint1"/><br />
<allow send_interface="org.bluez.MediaPlayer1"/><br />
<allow send_interface="org.bluez.ThermometerWatcher1"/><br />
<allow send_interface="org.bluez.AlertAgent1"/><br />
<allow send_interface="org.bluez.Profile1"/><br />
<allow send_interface="org.bluez.HeartRateWatcher1"/><br />
<allow send_interface="org.bluez.CyclingSpeedWatcher1"/><br />
</policy><br />
<br />
<policy at_console="true"><br />
<allow send_destination="org.bluez"/><br />
</policy><br />
<br />
<!-- allow users of lp group (printing subsystem) to communicate with bluetoothd --><br />
<policy group="lp"><br />
<allow send_destination="org.bluez"/><br />
</policy><br />
<br />
<policy context="default"><br />
<deny send_destination="org.bluez"/><br />
</policy><br />
<br />
</busconfig><br />
</nowiki>}}<br />
<br />
===== Tested applications =====<br />
<br />
As noted above this will work easily with audacious. YouTube videos with Chromium and Flash Player will work on some videos. If the video has ads it will not work, but if the video does not have ads it will work. Just make sure that after audacious is working with Bluetooth headset, start Chromium, and navigate to YouTube. Find a video without leading ads, and it should play the audio. If the settings icon has the a menu with two drop-down combo boxes for Speed and Quality it will play.<br />
<br />
== Switch between HSP/HFP and A2DP setting ==<br />
<br />
This can easily be achieved by the following command where the {{ic|''card_number''}} can be obtained by running {{ic|pacmd list-cards}}.<br />
<br />
$ pacmd set-card-profile ''card_number'' a2dp_sink<br />
<br />
For enabling automatic profile switching from A2DP to HSP when a recording stream appears without any role set, you can append {{ic|1=auto_switch=2}} to {{ic|load-module module-bluetooth-policy}} in {{ic|/etc/pulse/default.pa}}.<br />
<br />
For more information about PulseAudio profiles, see [https://freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Bluetooth/#index1h2 PulseAudio Documentation].<br />
<br />
=== A2DP not working with PulseAudio ===<br />
<br />
==== Socket interface problem ====<br />
<br />
If PulseAudio fails when changing the profile to A2DP with bluez 4.1+ and PulseAudio 3.0+, you can try disabling the Socket interface from {{ic|/etc/bluetooth/main.conf}} by removing the line {{ic|1=Enable=Socket}} and adding line {{ic|1=Disable=Socket}}.<br />
<br />
==== A2DP sink profile is unavailable ====<br />
<br />
When the A2DP sink profile is unavailable it will not be possible to switch to the A2DP sink (output) with a PulseAudio front-end and the A2DP sink will not even be listed. This can be confirmed with {{ic|pactl}}.<br />
<br />
$ pactl list | grep -C2 A2DP<br />
Profiles:<br />
headset_head_unit: Headset Head Unit (HSP/HFP) (sinks: 1, sources: 1, priority: 30, available: yes)<br />
a2dp_sink: High Fidelity Playback (A2DP Sink) (sinks: 1, sources: 0, priority: 40, available: no)<br />
off: Off (sinks: 0, sources: 0, priority: 0, available: yes)<br />
Active Profile: headset_head_unit<br />
<br />
Trying to manually set the card profile with {{ic|pacmd}} will fail.<br />
<br />
$ pacmd set-card-profile bluez_card.C4_45_67_09_12_00 a2dp_sink<br />
Failed to set card profile to 'a2dp_sink'.<br />
<br />
This is known to happen from version 10.0 of Pulseaudio when connecting to Bluetooth headphones via Bluedevil or another BlueZ front-end. See [https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/525 related bug report.]<br />
<br />
This issue also appears after initial pairing of Headphones with some Bluetooth controllers (e.g. {{ic|0a12:0001, Cambridge Silicon Radio}}) which might default to the {{ic|Handsfree}} or {{ic|Headset - HS}} service and will not allow switching to the A2DP PulseAudio sink that requires the {{ic|AudioSink}} service.<br />
<br />
Possible solutions:<br />
<br />
* For some headsets, using the headset's volume or play/pause controls while connected can trigger the A2DP profile to become available.<br />
<br />
* It is possible that connecting to a headset via {{ic|bluetoothctl}} from {{pkg|bluez-utils}} will make the A2DP sink profile available. There is an automation for this every time a bluetooth device is connected: {{AUR|fix-bt-a2dp}} ([https://github.com/pastleo/fix-bt-a2dp#usage detailed usage])<br />
<br />
[bluetooth]# connect ''[headset MAC here]''<br />
<br />
* Manually switching to Bluetooth's {{ic|AudioSink}} service which would make the A2DP profile and its A2DP PulseAudio sink available. This can be done with blueman-manager which included in {{pkg|blueman}} or by registering the UUID of the AudioSink service with {{ic|bluetoothctl}} .<br />
<br />
$ bluetoothctl<br />
[bluetooth]# menu gatt<br />
[bluetooth]# register-service 0000110b-0000-1000-8000-00805f9b34fb<br />
[bluetooth]# quit<br />
<br />
* Disable the headset profile<br />
{{hc|/etc/bluetooth/main.conf|<nowiki><br />
[General]<br />
Disable=Headset<br />
</nowiki>}}<br />
<br />
* Enable MultiProfile support. This may help with headsets that support A2DP as well as Headset audio.<br />
{{hc|/etc/bluetooth/main.conf|<nowiki><br />
[General]<br />
MultiProfile=multiple<br />
</nowiki>}}<br />
<br />
* Sometimes, none of the steps above will work. You may have tried rebooting and powering bluetooth off and on to no avail. In this case, try [[restart]]ing the {{ic|bluetooth.service}}.<br />
<br />
* Alternatively, replacing {{Pkg|pulseaudio-bluetooth}} with {{AUR|pulseaudio-modules-bt}} or {{AUR|pulseaudio-modules-bt-git}}, which provides additional Bluetooth codecs, may resolve the issue.<br />
<br />
==== Gnome with GDM ====<br />
<br />
{{Merge|#Connecting works, but I cannot play sound|duplicate instructions}}<br />
<br />
The instructions below were tested on Gnome 3.24.2 and PulseAudio 10.0 however they may still be applicable and useful for other versions.<br />
<br />
If PulseAudio fails when changing the profile to A2DP while using GNOME with GDM, you need to prevent GDM from starting its own instance of PulseAudio:<br />
<br />
* Prevent Pulseaudio clients from automatically starting a server if one is not running by adding the following:<br />
<br />
{{hc|/var/lib/gdm/.config/pulse/client.conf|<nowiki><br />
autospawn = no<br />
daemon-binary = /bin/true<br />
</nowiki>}}<br />
<br />
* Prevent systemd from starting Pulseaudio anyway with socket activation:<br />
<br />
$ sudo -ugdm mkdir -p /var/lib/gdm/.config/systemd/user<br />
$ sudo -ugdm ln -s /dev/null /var/lib/gdm/.config/systemd/user/pulseaudio.socket<br />
<br />
* Restart, and check that there is no PulseAudio process for the {{ic|gdm}} user using:<br />
<br />
$ pgrep -u gdm pulseaudio<br />
<br />
Further discussion about this problem and alternative fixes can be found [https://bbs.archlinux.org/viewtopic.php?id=194006 here] and [https://bbs.archlinux.org/viewtopic.php?id=196689 here]. Alternatively, one may try and install {{AUR|fix-bt-a2dp}}.<br />
<br />
=== HFP not working with PulseAudio ===<br />
<br />
HFP-only bluetooth headsets may not be usable in the standard configuration of pulseaudio. The respective profiles occur, but they are not available:<br />
<br />
* {{ic|bluetoothctl info}} output shows:<br />
UUID: Audio Sink (0000110b-0000-1000-8000-00805f9b34fb)<br />
UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)<br />
UUID: A/V Remote Control (0000110e-0000-1000-8000-00805f9b34fb)<br />
UUID: Handsfree (0000111e-0000-1000-8000-00805f9b34fb)<br />
<br />
* {{ic|pactl list}} of respective device shows:<br />
...<br />
Profiles:<br />
...<br />
headset_head_unit: Headset Head Unit (HSP/HFP) (sinks: 1, sources: 1, priority: 30, available: no)<br />
<br />
To solve the respective issue, update to pulseaudio (>=13) and potentially {{AUR|pulseaudio-modules-bt-git}} and bluez (>=5.5) to latest versions. Then install {{AUR|ofono}} (start and enable using systemctl) and {{AUR|phonesim}} and create / activate a fake modem as described here [https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Bluetooth/#index1h3]:<br />
<br />
* Create {{ic|/etc/ofono/phonesim.conf}} with:<br />
[phonesim]<br />
Address=127.0.0.1<br />
Driver=phonesim<br />
Port=12345<br />
<br />
* Start as user:<br />
phonesim -p 12345 /usr/share/phonesim/default.xml &<br />
<br />
* [[Enable]] and [[start]] {{ic|ofono}} service.<br />
<br />
* Power modem:<br />
dbus-send --print-reply --system --dest=org.ofono /phonesim org.ofono.Modem.SetProperty string:"Powered" variant:boolean:true<br />
<br />
* Activate modem:<br />
dbus-send --print-reply --system --dest=org.ofono /phonesim org.ofono.Modem.SetProperty string:"Online" variant:boolean:true<br />
<br />
* If you want to check the results of this, download ofono git sources ([https://github.com/rilmodem/ofono.git]) and call {{ic|list-modems}} from the {{ic|ofono/test}} directory. The output of the respective modem section should read like this:<br />
...<br />
[ /phonesim ]<br />
Online = 1<br />
Powered = 1<br />
Lockdown = 0<br />
Emergency = 0<br />
Manufacturer = MeeGo<br />
...<br />
<br />
* Finally, restart pulseaudio and reconnect headset. Now, HFP should be available:<br />
headset_head_unit: Headset Head Unit (HSP/HFP) (sinks: 1, sources: 1, priority: 30, available: yes)<br />
<br />
{{Note|HFP support is not stable and may cause glitches with switching to A2DP; try reconnecting, if the needed mode is not available.}}<br />
<br />
== See also ==<br />
<br />
For using a bluetooth device in a dual boot setup:<br />
<br />
* [[Bluetooth#Dual boot pairing]]<br />
* [http://ubuntuforums.org/showthread.php?p=9363229#post9363229 Dual booting with a Bluetooth keyboard]</div>AAlpinehttps://wiki.archlinux.org/index.php?title=Fonts&diff=551968Fonts2018-10-29T18:02:42Z<p>AAlpine: Removed references of ttf-droid being included in ttf-google-fonts-git because that's incorrect now: https://aur.archlinux.org/cgit/aur.git/commit/?h=ttf-google-fonts-git&id=51764ef1349a8a8093f411677333d09cb58bb46f</p>
<hr />
<div>[[Category:Fonts]]<br />
[[cs:Fonts]]<br />
[[de:Schriftarten]]<br />
[[es:Fonts]]<br />
[[it:Fonts]]<br />
[[ja:フォント]]<br />
[[ru:Fonts]]<br />
[[zh-hans:Fonts]]<br />
[[zh-hant:Fonts]]<br />
{{Related articles start}}<br />
{{Related|Font configuration}}<br />
{{Related|Linux console#Fonts}}<br />
{{Related|Java Runtime Environment Fonts}}<br />
{{Related|Metric-compatible fonts}}<br />
{{Related articles end}}<br />
<br />
From [[Wikipedia:Computer font]]: "A computer font (or font) is an electronic data file containing a set of glyphs, characters, or symbols such as dingbats."<br />
<br />
Note that certain font licenses may impose some legal limitations.<br />
<br />
== Font formats ==<br />
<br />
Most computer fonts used today are in either ''bitmap'' or ''outline'' data formats. <br />
;Bitmap fonts: Consist of a matrix of dots or pixels representing the image of each glyph in each face and size.<br />
;Outline or ''vector'' fonts: Use Bézier curves, drawing instructions and mathematical formulae to describe each glyph, which make the character outlines scalable to any size.<br />
<br />
=== Bitmap formats ===<br />
<br />
* [[Wikipedia:Glyph Bitmap Distribution Format|Bitmap Distribution Format]] (BDF) by Adobe<br />
* [[Wikipedia:Portable Compiled Format|Portable Compiled Format]] (PCF) by Xorg<br />
* [[Wikipedia:PC Screen Font|PC Screen Font]] (PSF) used by the Kernel for console fonts, not supported by Xorg (for Unicode PSF files the extension is {{ic|psfu}})<br />
<br />
These formats can also be gzipped. See [[#Bitmap]] for the available bitmap fonts.<br />
<br />
=== Outline formats ===<br />
<br />
* [[Wikipedia:PostScript fonts|PostScript fonts]] by Adobe – has various formats, e.g: Printer Font ASCII (PFA) and Printer Font Binary (PFB)<br />
* [[Wikipedia:TrueType|TrueType]] by Apple and Microsoft (file extension: {{ic|ttf}})<br />
* [[Wikipedia:OpenType|OpenType]] by Microsoft, built on TrueType (file extensions: {{ic|otf}}, {{ic|ttf}})<br />
<br />
For most purposes, the technical differences between TrueType and OpenType can be ignored.<br />
<br />
=== Other formats ===<br />
<br />
The typesetting application, ''TeX,'' and its companion font software, ''Metafont,'' render characters using their own methods. Some of the file extensions used for fonts by these two programs are {{ic|*pk}}, {{ic|*gf}}, {{ic|mf}} and {{ic|vf}}.<br />
<br />
[https://fontforge.github.io/en-US/ FontForge] ({{Pkg|fontforge}}), a font editing application, can store fonts in its native text-based format, {{ic|sfd}}, ''s''pline ''f''ont ''d''atabase.<br />
<br />
The [http://www.w3.org/TR/SVG/fonts.html SVG] format also has its own font description method.<br />
<br />
== Installation ==<br />
<br />
There are various methods for installing fonts.<br />
<br />
=== Pacman ===<br />
<br />
Fonts and font collections in the enabled repositories can be installed using [[pacman]].<br />
<br />
Available fonts may be found by [[pacman#Querying package databases|querying packages]] (e.g. for {{ic|font}} or {{ic|ttf}}).<br />
<br />
=== Creating a package ===<br />
<br />
You should give pacman the ability to manage your fonts, which is done by creating an Arch package. These can also be shared with the community in the [[AUR]]. The packages to install fonts are particularly similar; simply taking an existing [https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/adobe-source-code-pro-fonts package] as template should work well. To learn about how to modify it for your font, please refer to [[Creating packages]].<br />
<br />
The family name of a font file can be aquired with the use of {{ic|fc-query}} for example: {{ic|fc-query -f '%{family[0]}\n' /path/to/file}}. The formatting is described in the FcPatternFormat(3) manual.<br />
<br />
=== Manual installation ===<br />
<br />
The recommended way of adding fonts that are not in the repositories to your system is described in [[#Creating a package]]. This gives pacman the ability to remove or update them at a later time. Fonts can alternately be installed manually as well.<br />
<br />
To install fonts system-wide (available for all users), move the folder to the {{ic|/usr/share/fonts/}} directory. The files need to be readable by every user, use [[chmod]] to set the correct permissions (i.e. at least {{ic|0444}} for files and {{ic|0555}} for directories). To install fonts for only a single user, use {{ic|~/.local/share/fonts}} ({{ic|~/.fonts/}} is now deprecated).<br />
<br />
For Xserver to load fonts directly (as opposed to the use of a ''font server'') the directory for your newly added font must be added with a FontPath entry. This entry is located in the ''Files'' section [[Xorg#Configuration|of your Xorg configuration file]] (e.g. {{ic|/etc/X11/xorg.conf}} or {{ic|/etc/xorg.conf}}). See [[#Older applications]] for more detail.<br />
<br />
Then update the fontconfig font cache: (usually unnecessary as software using the fontconfig library does this)<br />
<br />
$ fc-cache<br />
<br />
=== Older applications ===<br />
<br />
With older applications that do not support fontconfig (e.g. GTK+ 1.x applications, and {{ic|xfontsel}}) the index will need to be created in the font directory:<br />
<br />
$ mkfontscale<br />
$ mkfontdir<br />
<br />
Or to include more than one folder with one command:<br />
<br />
$ for dir in /font/dir1/ /font/dir2/; do xset +fp $dir; done && xset fp rehash<br />
<br />
Or if fonts were installed in a different sub-folders under the e.g. {{ic|/usr/share/fonts}}:<br />
<br />
$ for dir in * ; do if [ -d "$dir" ]; then cd "$dir";xset +fp "$PWD" ;mkfontscale; mkfontdir;cd .. ;fi; done && xset fp rehash<br />
<br />
At times the X server may fail to load the fonts directory and you will need to rescan all the {{ic|fonts.dir}} files:<br />
<br />
# xset +fp /usr/share/fonts/misc # Inform the X server of new directories<br />
# xset fp rehash # Forces a new rescan<br />
<br />
To check that the font(s) is included:<br />
<br />
$ xlsfonts | grep fontname<br />
<br />
{{note|Many packages will automatically configure Xorg to use the font upon installation. If that is the case with your font, this step is not necessary.}}<br />
<br />
This can also be set globally in {{ic|/etc/X11/xorg.conf}} or {{ic|/etc/X11/xorg.conf.d}}.<br />
<br />
Here is an example of the section that must be added to {{ic|/etc/X11/xorg.conf}}. Add or remove paths based on your particular font requirements.<br />
<br />
# Let X.Org know about the custom font directories<br />
Section "Files"<br />
FontPath "/usr/share/fonts/100dpi"<br />
FontPath "/usr/share/fonts/75dpi"<br />
FontPath "/usr/share/fonts/cantarell"<br />
FontPath "/usr/share/fonts/cyrillic"<br />
FontPath "/usr/share/fonts/encodings"<br />
FontPath "/usr/share/fonts/misc"<br />
FontPath "/usr/share/fonts/truetype"<br />
FontPath "/usr/share/fonts/TTF"<br />
FontPath "/usr/share/fonts/util"<br />
EndSection<br />
<br />
=== Pango Warnings ===<br />
<br />
When [http://www.pango.org/ Pango] is in use on your system it will read from [http://www.freedesktop.org/wiki/Software/fontconfig fontconfig] to sort out where to source fonts.<br />
<br />
(process:5741): Pango-WARNING **: failed to choose a font, expect ugly output. engine-type='PangoRenderFc', script='common'<br />
(process:5741): Pango-WARNING **: failed to choose a font, expect ugly output. engine-type='PangoRenderFc', script='latin'<br />
<br />
If you are seeing errors similar to this and/or seeing blocks instead of characters in your application then you need to add fonts and update the font cache. This example uses the {{Pkg|ttf-liberation}} fonts to illustrate the solution (after successful installation of the package) and runs as root to enable them system-wide.<br />
<br />
# fc-cache<br />
/usr/share/fonts: caching, new cache contents: 0 fonts, 3 dirs<br />
/usr/share/fonts/TTF: caching, new cache contents: 16 fonts, 0 dirs<br />
/usr/share/fonts/encodings: caching, new cache contents: 0 fonts, 1 dirs<br />
/usr/share/fonts/encodings/large: caching, new cache contents: 0 fonts, 0 dirs<br />
/usr/share/fonts/util: caching, new cache contents: 0 fonts, 0 dirs<br />
/var/cache/fontconfig: cleaning cache directory<br />
fc-cache: succeeded<br />
<br />
You can test for a default font being set like so:<br />
<br />
# fc-match<br />
LiberationMono-Regular.ttf: "Liberation Mono" "Regular"<br />
<br />
== Font packages ==<br />
<br />
This is a selective list that includes many font packages from the [[AUR]] along with those in the official repositories. Fonts are tagged "Unicode" if they have wide Unicode support, see the project or <br />
Wikipedia pages for detail.<br />
<br />
The [https://github.com/ternstor/distrofonts Archfonts Python script] can be used to generate an overview of all the TTF fonts found in the official repositories / the AUR (the image generation is done using {{AUR|ttf2png}}).<br />
<br />
=== Bitmap ===<br />
<br />
* Default 8x16<br />
* [http://www.dcmembers.com/jibsen/download/61/ Dina] ({{Pkg|dina-font}}) – 6pt, 8pt, 9pt, 10pt, monospaced, based on Proggy<br />
* [http://openlab.jp/efont/unicode/ Efont] ({{AUR|efont-unicode-bdf}}) – 10px, 12px, 14px, 16px, 24px, normal, bold and italic<br />
* [http://font.gohu.org/ Gohu] ({{AUR|gohufont}}) – 11px, 14px, normal and bold<br />
* [http://artwizaleczapka.sourceforge.net/ Lime] ({{Pkg|artwiz-fonts}})<br />
* [http://tobiasjung.name/profont/ ProFont] ({{Pkg|profont}}{{Broken package link|package not found}}) – 10px, 11px, 12px, 15px, 17px, 22px, 29px, normal<br />
* [[Wikipedia:Proggy programming fonts|Proggy]] ({{AUR|proggyfonts}}) – has different variants<br />
* [http://www.fial.com/~scott/tamsyn-font/ Tamsyn] ({{Pkg|tamsyn-font}})<br />
* [http://terminus-font.sourceforge.net/ Terminus] ({{Pkg|terminus-font}})<br />
* [https://github.com/lucy/tewi-font Tewi] ({{AUR|bdf-tewi-git}})<br />
* [http://unifoundry.com/unifont.html Unifont] ([[Wikipedia:Unicode font#Comparison of fonts|most extensive]] Unicode coverage of any font) ({{Pkg|bdf-unifont}})<br />
<br />
=== Latin script ===<br />
<br />
==== Families ====<br />
<br />
* [[Wikipedia:Luxi fonts|Luxi fonts]] ({{Pkg|font-bh-ttf}}) – X.Org Luxi fonts<br />
* [[Wikipedia:Bitstream Vera|Bitstream Vera]] ({{Pkg|ttf-bitstream-vera}}) – serif, sans-serif, and monospace<br />
* [https://quoteunquoteapps.com/courierprime/ Courier Prime] ({{AUR|ttf-courier-prime}}) – Courier font alternative optimized for screenplays<br />
* [[Wikipedia:Croscore fonts|Croscore fonts]] ({{Pkg|ttf-croscore}}) – Google's substitute for Windows' Arial, Times New Roman, and Courier New<br />
* [[Wikipedia:DejaVu fonts|DejaVu fonts]] ({{Pkg|ttf-dejavu}}) – Bitstream Vera modified for greater Unicode coverage<br />
* [[Wikipedia:Droid (font)|Droid]] ({{Pkg|ttf-droid}}) – default font for older Android versions<br />
* [[Wikipedia:Roboto|Roboto]] ({{Pkg|ttf-roboto}}) – default font for newer Android versions<br />
* [[Wikipedia:Noto fonts|Google Noto]] ({{Pkg|noto-fonts}}) – Unicode<br />
* [[Wikipedia:Liberation fonts|Liberation fonts]] ({{Pkg|ttf-liberation}}) – free metric-compatible substitute for the Arial, Arial Narrow, Times New Roman and Courier New fonts found in Windows and Microsoft Office products<br />
* [[Wikipedia:Ubuntu Font Family|Ubuntu Font Family]] ({{Pkg|ttf-ubuntu-font-family}})<br />
* [[Microsoft fonts]] ({{AUR|ttf-ms-win10}}) – Windows 10 fonts<br />
Legacy Microsoft font packages:<br />
* [http://corefonts.sourceforge.net/ Microsoft fonts] ({{AUR|ttf-ms-fonts}}) – Andalé Mono, Courier New, Arial, Arial Black, Comic Sans, Impact, Lucida Sans, Microsoft Sans Serif, Trebuchet, Verdana, Georgia, Times New Roman<br />
* Vista fonts ({{AUR|ttf-vista-fonts}}) – Consolas, Calibri, Candara, Corbel, Cambria, Constantia<br />
<br />
==== Monospaced ====<br />
<br />
For more monospaced fonts see [[#Bitmap]] and [[#Families]].<br />
<br />
* [http://www.marksimonson.com/fonts/view/anonymous-pro Anonymous Pro] ({{pkg|ttf-anonymous-pro}}, included in {{AUR|ttf-google-fonts-git}})<br />
* [https://damieng.com/blog/2008/05/26/envy-code-r-preview-7-coding-font-released Envy Code R] ({{AUR|ttf-envy-code-r}})<br />
* Fantasque Sans Mono ({{AUR|ttf-fantasque-sans-git}})<br />
* [[Wikipedia:Fira Sans|Fira Mono]] ({{pkg|ttf-fira-mono}}, {{pkg|otf-fira-mono}}) – designed for Firefox OS<br />
* [[Wikipedia:GNU FreeFont|FreeMono]] ({{Pkg|ttf-freefont}}) - Unicode<br />
* [https://sourcefoundry.org/hack/ Hack] ({{pkg|ttf-hack}}) - an open source monospaced font, used as the default in KDE Plasma<br />
* [[Wikipedia:Inconsolata|Inconsolata]] ({{Pkg|ttf-inconsolata}}, included in {{AUR|ttf-google-fonts-git}}) - inspired by Consolas<br />
* [https://leonardo-m.livejournal.com/77079.html Inconsolata-g] ({{AUR|ttf-inconsolata-g}}) - adds some programmer-friendly modifications<br />
* [https://be5invis.github.io/Iosevka/ Iosevka] ({{AUR|ttf-iosevka}}) – Iosevka is a slender monospace sans-serif and slab-serif typeface inspired by Pragmata Pro, M+ and PF DIN Mono, designed to be the ideal font for programming.<br />
* [[Wikipedia:Lucida Typewriter|Lucida Typewriter]] (included in package {{AUR|jre}})<br />
* [[Wikipedia:Menlo (typeface)|Menlo]] (derivative: {{AUR|ttf-meslo}}) - default monospaced font of OS X<br />
* [[Wikipedia:Monaco (typeface)|Monaco]] ({{AUR|ttf-monaco}}) - proprietary font designed by Apple for OS X<br />
* Monofur ({{AUR|ttf-monofur}})<br />
* [https://madmalik.github.io/mononoki Mononoki] ({{AUR|ttf-mononoki}})<br />
* [[Wikipedia:Source_Code_Pro|Source Code Pro]] ({{pkg|adobe-source-code-pro-fonts}})<br />
<br />
Relevant websites:<br />
<br />
* [http://hivelogic.com/articles/top-10-programming-fonts Dan Benjamin's Top 10 Programming Fonts].<br />
* [http://www.lowing.org/fonts/ Trevor Lowing's font list]<br />
* [https://www.slant.co/topics/67/~what-are-the-best-programming-fonts Slant: What are the best programming fonts?]<br />
* [https://stackoverflow.com/questions/4689/recommended-fonts-for-programming Stack Overflow: Recommended fonts for programming]<br />
<br />
==== Sans-serif ====<br />
<br />
* [http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=andika Andika] ({{AUR|ttf-andika}})<br />
* [[Wikipedia:GNU FreeFont|FreeSans]] ({{Pkg|ttf-freefont}}) - Unicode<br />
* [https://github.com/rsms/inter Inter UI] ({{AUR|ttf-inter-ui}}) – designed for user interfaces<br />
* [[Wikipedia:Linux Libertine|Linux Biolinum]] ({{Pkg|ttf-linux-libertine}}) – free substitute for Times New Roman<br />
* [[Wikipedia:PT Sans|PT Sans]] ({{AUR|ttf-google-fonts-git}}) - 3 major variations: normal, narrow, and caption - Unicode: Latin, Cyrillic<br />
* [[Wikipedia:Source Sans Pro|Source Sans Pro]] ({{pkg|adobe-source-sans-pro-fonts}})<br />
* [[Wikipedia:Tahoma (typeface)|Tahoma]] ({{AUR|ttf-tahoma}})<br />
<br />
==== Serif ====<br />
<br />
* [http://www.georgduffner.at/ebgaramond/ EB Garamond] ({{AUR|otf-eb-garamond}})<br />
* [[Wikipedia:GNU FreeFont|FreeSerif]] ({{Pkg|ttf-freefont}}) - Unicode<br />
* [[Wikipedia:Gentium|Gentium]] ({{Pkg|ttf-gentium}}) - Unicode: Latin, Greek, Cyrillic, Phonetic Alphabet<br />
* [[Wikipedia:Linux Libertine|Linux Libertine]] ({{Pkg|ttf-linux-libertine}}) - Unicode: Latin, Greek, Cyrillic, Hebrew<br />
<br />
==== Unsorted ====<br />
<br />
{{Style|This section should be absorbed into the Monospace/Serif/Sans-Serif structure}}<br />
<br />
* {{Pkg|ttf-cheapskate}} - Font collection from ''dustismo.com''<br />
* {{Pkg|ttf-junicode}} - Junius font containing almost complete medieval latin script glyphs<br />
* {{Pkg|ttf-mph-2b-damase}} - Covers full plane 1 and several scripts<br />
* {{Pkg|xorg-fonts-type1}} - IBM Courier and Adobe Utopia sets of [[Wikipedia:PostScript fonts|PostScript fonts]]<br />
* {{AUR|all-repository-fonts}} - Meta package for all fonts in the official repositories.<br />
* {{AUR|ttf-google-fonts-git}} - a huge collection of free fonts (including Ubuntu, Inconsolata, Roboto, etc.) - Note: Your font dialog might get very long as >100 fonts will be added.<br />
<br />
=== Non-latin scripts ===<br />
<br />
==== Ancient Scripts ====<br />
<br />
* {{AUR|ttf-ancient-fonts}} - Font containing Unicode symbols for Aegean, Egyptian, Cuneiform, Anatolian, Maya, and Analecta scripts<br />
<br />
==== Arabic ====<br />
<br />
* {{AUR|ttf-amiri}} - A classical Arabic typeface in Naskh style poineered by Amiria Press<br />
* {{AUR|ttf-arabeyes-fonts}} - Collection of free Arabic fonts<br />
* {{AUR|ttf-qurancomplex-fonts}} - Fonts by King Fahd Glorious Quran Printing Complex in al-Madinah al-Munawwarah<br />
* {{AUR|ttf-sil-lateef}} - Unicode Arabic font from SIL<br />
* {{AUR|ttf-sil-scheherazade}} - Unicode Arabic font from SIL (Alternative for Traditional Arabic font)<br />
<br />
==== Braille ====<br />
<br />
*{{Pkg|ttf-ubraille}} - Font containing Unicode symbols for ''braille''<br />
<br />
==== Chinese, Japanese, Korean, Vietnamese ====<br />
<br />
===== Pan-CJK =====<br />
*adobe source han fonts - Large collection of fonts which comprehensively support Simplified Chinese, Traditional Chinese, Japanese, and Korean, with a consistent design and look.<br />
**{{Pkg|adobe-source-han-sans-otc-fonts}} - Sans fonts<br />
**{{Pkg|adobe-source-han-serif-otc-fonts}} - Serif fonts<br />
<br />
*{{Pkg|noto-fonts-cjk}} - Large collection of fonts which comprehensively support Simplified Chinese, Traditional Chinese, Japanese, and Korean, with a consistent design and look. It is currently a rebadged version of {{Pkg|adobe-source-han-sans-otc-fonts}}.<br />
<br />
===== Chinese =====<br />
<br />
{{Move|Localization/Chinese#Fonts|It makes sense to group language-specific things together.|section=Move CJK and Indic fonts to Localization subpages}}<br />
<br />
* adobe source han fonts<br />
** {{Pkg|adobe-source-han-sans-cn-fonts}} - Simplified Chinese OpenType/CFF Sans fonts<br />
** {{Pkg|adobe-source-han-sans-tw-fonts}} - Traditional Chinese OpenType/CFF Sans fonts<br />
** {{Pkg|adobe-source-han-serif-cn-fonts}} - Simplified Chinese OpenType/CFF Serif fonts<br />
** {{Pkg|adobe-source-han-serif-tw-fonts}} - Traditional Chinese OpenType/CFF Serif fonts<br />
<br />
* noto Chinese fonts<br />
** {{AUR|noto-fonts-sc}} - Noto CJK-SC fonts for Simplified Chinese<br />
** {{AUR|noto-fonts-tc}} - Noto CJK-TC fonts for Traditional Chinese<br />
<br />
* wqy fonts<br />
** {{Pkg|wqy-microhei}} - WenQuanYi Micro Hei font family (also known as Hei, Gothic or Dotum) is a sans-serif style derived from Droid Sans Fallback, it offers high quality CJK outline font and it is extremely compact (~5M).<br />
** {{Pkg|wqy-zenhei}} - Hei Ti Style (sans-serif) Chinese Outline font embedded with bitmapped Song Ti (also supporting Japanese (partial) and Korean characters).<br />
** {{Pkg|wqy-bitmapfont}} - Bitmapped Song Ti (serif) Chinese font.<br />
<br />
* arphic fonts<br />
** {{Pkg|ttf-arphic-ukai}} - ''Kaiti'' (brush stroke) Unicode font (enabling anti-aliasing is suggested)<br />
** {{Pkg|ttf-arphic-uming}} - ''Mingti'' (printed) Unicode font<br />
<br />
* {{Pkg|opendesktop-fonts}} - ''New Sung'' font, previously is ttf-fireflysung package<br />
<br />
* {{Pkg|ttf-hannom}} - Chinese and Vietnamese ttf fonts<br />
<br />
* Standart fonts of the Republic of China ministry of education in Taiwan<br />
** {{AUR|ttf-tw}} - Kai and Song traditional Chinese font from the Ministry of Education of Taiwan<br />
** {{AUR|ttf-twcns-fonts}} Chinese TrueType fonts by Ministry of Education of Taiwan government, support CNS11643 standard, including Kai and Sung fontface.<br />
<br />
*Windows Chinese fonts<br />
**{{AUR|ttf-ms-win8-zh_cn}} - windows8 simple Chinese fonts。<br />
**{{AUR|ttf-ms-win8-zh_tw}} - windows8 traditional Chinese fonts。<br />
**{{AUR|ttf-ms-win10-zh_cn}} - windows10 simple Chinese fonts。<br />
**{{AUR|ttf-ms-win10-zh_tw}} - windows10 traditional Chinese fonts。<br />
<br />
* {{AUR|ttf-i.bming}} - CJK serif font that emphasis on an old-style typeface.<br />
<br />
===== Japanese =====<br />
<br />
{{Move|Localization/Japanese#Fonts|It makes sense to group language-specific things together.|section=Move CJK and Indic fonts to Localization subpages}}<br />
<br />
* {{Pkg|adobe-source-han-sans-jp-fonts}} - Japanese OpenType/CFF fonts<br />
* {{Pkg|otf-ipafont}} - Formal style Japanese Gothic (sans-serif) and Mincho (serif) fonts set; one of the highest quality open source font. Default of openSUSE-ja.<br />
* {{Pkg|ttf-hanazono}} - A free Japanese kanji font, style Mincho (serif).<br />
* {{Pkg|ttf-sazanami}} - Japanese free TrueType font. This is outdated and not maintained any more, but may be defined as a fallback font on several environments.<br />
* {{AUR|ttf-koruri}} - Japanese TrueType font obtained by mixing {{AUR|ttf-mplus}} and Open Sans<br />
* {{AUR|ttf-monapo}} - Japanese fonts to show [[wikipedia:2channel_Shift_JIS_art|2channel Shift JIS art]] properly.<br />
* {{AUR|ttf-mplus}} - Modern Gothic style Japanese outline fonts. It includes all of Japanese Hiragana/Katakana, Basic Latin, Latin-1 Supplement, Latin Extended-A, IPA Extensions and most of Japanese Kanji, Greek, Cyrillic, Vietnamese with 7 weights (proportional) or 5 weights (monospace).<br />
* {{AUR|ttf-vlgothic}} - Japanese Gothic fonts. Default of Debian/Fedora/Vine Linux<br />
<br />
===== Korean =====<br />
<br />
{{Move|Localization/Korean#Fonts|It makes sense to group language-specific things together.|section=Move CJK and Indic fonts to Localization subpages}}<br />
<br />
* {{Pkg|adobe-source-han-sans-kr-fonts}} - Korean OpenType/CFF fonts<br />
* {{Pkg|ttf-baekmuk}} - Collection of Korean TrueType fonts<br />
* {{AUR|spoqa-han-sans}} - Source Han Sans customized by Spoqa<br />
* {{AUR|ttf-d2coding}} - D2Coding fixed width TrueType font made by Naver<br />
* {{AUR|ttf-nanum}} - Nanum series TrueType fonts<br />
* {{AUR|ttf-nanumgothic_coding}} - Nanum series fixed width TrueType fonts<br />
* {{AUR|ttf-kopub}}/{{AUR|otf-kopub}} - Korean TrueType/OpenType fonts by Korea Publisher Society<br />
* {{AUR|ttf-unfonts-core-ibx}} - A collection of Korean TrueType fonts by KLDP<br />
<br />
===== Vietnamese =====<br />
<br />
* {{Pkg|ttf-hannom}} - Vietnamese TrueType font for chữ Nôm characters<br />
<br />
==== Cyrillic ====<br />
<br />
See also [[#Latin script]].<br />
<br />
* {{AUR|ttf-paratype}} - Font family by ParaType: sans, serif, mono, extended cyrillic and latin, OFL license<br />
* {{AUR|otf-russkopis}} - A free OpenType cursive font for Cyrillic script<br />
<br />
==== Greek ====<br />
<br />
Almost all Unicode fonts contain the Greek character set (polytonic included). Some additional font packages, which might not contain the complete Unicode set but utilize high quality Greek (and Latin, of course) typefaces are:<br />
<br />
* {{AUR|otf-gfs}} - Selection of OpenType fonts from the Greek Font Society<br />
* {{AUR|ttf-mgopen}} - Professional TrueType fonts from Magenta<br />
<br />
==== Hebrew ====<br />
<br />
* {{AUR|opensiddur-hebrew-fonts}} - Large collection of Open-source licensed Hebrew fonts<br />
* {{AUR|culmus}} - Nice collection of free Hebrew fonts<br />
<br />
==== Indic ====<br />
<br />
{{Move|Localization/Indic#Fonts|It makes sense to group language-specific things together.|section=Move CJK and Indic fonts to Localization subpages}}<br />
<br />
* {{Pkg|ttf-freebanglafont}} - Font for Bangla<br />
* {{Pkg|ttf-indic-otf}} - Indic OpenType Fonts collection (containing ttf-freebanglafont), provides the character [http://www.fileformat.info/info/unicode/char/ca0/index.htm U+0CA0] "ಠ"<br />
* {{AUR|lohit-fonts}} - Indic TrueType fonts from Fedora Project (containing Oriya Fonts and more)<br />
* {{AUR|ttf-devanagarifonts}} - Devanagari TrueType fonts (contains 283 fonts)<br />
* {{AUR|ttf-gurmukhi-fonts_sikhnet}} - TrueType Gurmukhi fonts (gurbaniwebthick,prabhki)<br />
* {{AUR|ttf-gurmukhi_punjabi}} - TTF Gurmukhi / Punjabi (contains 252 fonts)<br />
* {{AUR|ttf-gujrati-fonts}} - TTF Gujarati fonts (Avantika,Gopika,Shree768)<br />
* {{AUR|ttf-kannada-font}} - Kannada, the language of Karnataka state in India<br />
* {{AUR|ttf-lklug}} - Sinhala Unicode font<br />
* {{AUR|ttf-tamil}} - Tamil Unicode fonts<br />
* {{AUR|ttf-urdufonts}} - Urdu fonts (Jameel Noori Nastaleeq (+kasheeda), Nafees Web Naskh, PDMS Saleem Quran Font) and font configuration to set Jameel Noori Nastaleeq as default font for Urdu<br />
* {{AUR|fonts-smc-malayalam}} - Malayalam Unicode Fonts released by 'Swathanthra Malayalam Computing' (contains 11 fonts).<br />
<br />
==== Khmer ====<br />
<br />
* {{Pkg|ttf-khmer}} - Font covering glyphs for Khmer language<br />
* [https://www.google.com/fonts/specimen/Hanuman Hanuman] ({{AUR|ttf-google-fonts-git}})<br />
<br />
==== Mongolic and Tungusic ====<br />
<br />
* {{AUR|ttf-abkai}} - Fonts for Sibe, Manchu and Daur scripts (incomplete, currently in development)<br />
<br />
==== Persian ====<br />
<br />
* {{AUR|persian-fonts}} - Meta package for installing all Persian fonts in AUR.<br />
* {{AUR|borna-fonts}} - Borna Rayaneh Co. Persian B font series.<br />
* {{AUR|iran-nastaliq-fonts}} - A free Unicode calligraphic Persian font.<br />
* {{AUR|iranian-fonts}} - Iranian-Sans and Iranian-Serif Persian font family.<br />
* {{AUR|ir-standard-fonts}} - Iran Supreme Council of Information and Communication Technology (SCICT) standard Persian fonts.<br />
* {{AUR|persian-hm-ftx-fonts}} - A Persian font series derived from X Series 2, Metafont and FarsiTeX fonts with Kashida feature.<br />
* {{AUR|persian-hm-xs2-fonts}} - A Persian font series derived from X Series 2 fonts with Kashida feature.<br />
* {{AUR|sina-fonts}} - Sina Pardazesh Co. Persian font series.<br />
* {{AUR|gandom-fonts}}, {{AUR|parastoo-fonts}}, {{AUR|sahel-fonts}}, {{AUR|samim-fonts}}, {{AUR|shabnam-fonts}}, {{AUR|tanha-fonts}}, {{AUR|vazir-fonts}}, {{AUR|vazir-code-fonts}} - Beautiful Persian fonts made by Ali Rasti Kerdar.<br />
* {{AUR|ttf-yas}} - The Yas Persian font series (with '''hollow zero''').<br />
* {{AUR|ttf-x2}} - Free fonts with support for Persian, Arabic, Urdu, Pashto, Dari, Uzbek, Kurdish, Uighur, old Turkish (Ottoman) and modern Turkish (Roman).<br />
<br />
==== Tai–Kadai ====<br />
<br />
* {{Pkg|fonts-tlwg}} - Collection of scalable Thai fonts<br />
* {{AUR|ttf-lao}} - Lao TTF font (Phetsarath_OT)<br />
* {{AUR|ttf-lao-fonts}} - Lao TTF fonts, both Unicode and non-Unicode for Windows<br />
<br />
==== Tibeto-Burman ====<br />
<br />
* {{Pkg|ttf-tibetan-machine}} - Tibetan Machine TTFont<br />
* {{AUR|ttf-myanmar-fonts}} - 121 Fonts from myordbok.com<br />
<br />
=== Emoji and symbols ===<br />
<br />
A section of the Unicode standard is designated for pictographic characters called "emoji".<br />
<br />
* {{Pkg|noto-fonts-emoji}} - Google's own emoji font, like on Android or Google Hangouts.<br />
* {{AUR|ttf-symbola}} - provides many Unicode symbols, including emoji, in outline style.<br />
* {{AUR|ttf-emojione}} - Official colorful EmojiOne font.<br />
* {{AUR|ttf-emojione-color}} - a color and B&W emoji SVGinOT font built from EmojiOne.<br />
* {{AUR|ttf-twemoji-color}} - Twitter's open-sourced emoji glyphs.<br />
<br />
[[wikipedia:Emoticon#Japanese_style|Kaomoji]] are sometimes referred to as "Japanese emoticons" and are composed of characters from various character sets, including CJK and Indic fonts. For example, the following set of packages covers most of existing kaomoji: {{Pkg|ttf-freefont}}, {{Pkg|ttf-arphic-uming}}, and {{Pkg|ttf-indic-otf}}.<br />
<br />
=== Math ===<br />
<br />
* {{Pkg|font-mathematica}} - Mathematica fonts by Wolfram Research, Inc.<br />
* {{Pkg|texlive-core}} and {{Pkg|texlive-fontsextra}} contain many math fonts such as Latin Modern Math and [[Wikipedia:STIX Fonts project|STIX Fonts]]. See [[TeX Live#Making fonts available to Fontconfig]] for configuration.<br />
* {{AUR|otf-stix}} - A standalone, more recent version of STIX<br />
* {{Pkg|otf-latin-modern}}, {{Pkg|otf-latinmodern-math}} - Improved version of Computer Modern fonts as used in LaTeX<br />
* {{AUR|ttf-computer-modern-fonts}}, {{AUR|otf-cm-unicode}} - [[wikipedia:Computer Modern|Computer Modern]] (of TeX fame)<br />
* {{AUR|ttf-mathtype}} - MathType fonts<br />
<br />
=== Other operating system fonts ===<br />
<br />
* {{AUR|ttf-mac-fonts}} - Apple MacOS TrueType fonts<br />
<br />
See [[Metric-compatible fonts]], which lists available alternatives for [[Microsoft fonts]].<br />
<br />
== Fallback font order with X11 ==<br />
<br />
Fontconfig automatically chooses a font that matches the current requirement. That is to say, if one is looking at a window containing English and Chinese for example, it will switch to another font for the Chinese text if the default one does not support it.<br />
<br />
Fontconfig lets every user configure the order they want via {{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}}.<br />
If you want a particular Chinese font to be selected after your favorite Serif font, your file would look like this:<br />
<br />
<?xml version="1.0"?><br />
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"><br />
<fontconfig><br />
<alias><br />
<family>serif</family><br />
<prefer><br />
<family>Your favorite Latin Serif font name</family><br />
<family>Your Chinese font name</family><br />
</prefer><br />
</alias><br />
</fontconfig><br />
<br />
{{Tip|If you use a Chinese locale, set {{ic|LC_LANG}} to {{ic|und}} to make this work. Otherwise both English and Chinese text will be rendered in the Chinese font.}}<br />
<br />
You can add a section for sans-serif and monospace as well. For more information, have a look at the fontconfig manual.<br />
<br />
See also [[Font configuration#Replace or set default fonts]].<br />
<br />
== Font alias ==<br />
<br />
There are several font aliases which represent other fonts in order that applications may use similar fonts. The most common aliases are: {{ic|serif}} for a font of the serif type (e.g. DejaVu Serif); {{ic|sans-serif}} for a font of the sans-serif type (e.g. DejaVu Sans); and {{ic|monospace}} for a monospaced font (e.g. DejaVu Sans Mono). However, the fonts which these aliases represent may vary and the relationship is often not shown in font management tools, such as those found in [[KDE]] and other [[desktop environments]].<br />
<br />
To reverse an alias and find which font it is representing, run:<br />
<br />
{{hc|$ fc-match monospace|<br />
DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"<br />
}}<br />
<br />
In this case, {{ic|DejaVuSansMono.ttf}} is the font represented by the monospace alias.<br />
<br />
== Tips and tricks ==<br />
<br />
=== List all installed fonts ===<br />
<br />
You can use the following command to list all installed Fontconfig fonts that are available on your system. <br />
<br />
$ fc-list<br />
<br />
=== Lists installed fonts for a particular language ===<br />
<br />
Applications and browsers select and display fonts depending upon fontconfig preferences and available font glyph for Unicode text. To list installed fonts for a particular language, issue a command {{ic|<nowiki>fc-list :lang="two letter language code"</nowiki>}}. For instance, to list installed Arabic fonts or fonts supporting Arabic glyph:<br />
{{hc|$ fc-list -f '%{file}\n' :lang&#61;ar|2=<br />
<nowiki><br />
/usr/share/fonts/TTF/FreeMono.ttf<br />
/usr/share/fonts/TTF/DejaVuSansCondensed.ttf<br />
/usr/share/fonts/truetype/custom/DroidKufi-Bold.ttf<br />
/usr/share/fonts/TTF/DejaVuSansMono.ttf<br />
/usr/share/fonts/TTF/FreeSerif.ttf<br />
</nowiki><br />
}}<br />
<br />
=== Set terminal font on-the-fly ===<br />
<br />
{{Expansion|Which terminals specifically support this method? Where is the documentation for the escape codes?}}<br />
<br />
For terminal emulators that use {{ic|Xresources}}, fonts can be set by using escape sequences. Specifically, {{ic|echo -e "\033]710;$font\007"}} to change the normal font ({{ic|*font}} in {{ic|~/.Xresources}}), and replace {{ic|710}} with {{ic|711}}, {{ic|712}}, and {{ic|713}} to change the {{ic|*boldFont}}, {{ic|*italicFont}}, and {{ic|*boldItalicFont}}, respectively.<br />
<br />
{{ic|$font}} uses the same syntax as in {{ic|~/.Xresources}} and can be anything the terminal emulator will support. (Example: {{ic|1=xft:dejavu sans mono:size=9}})<br />
<br />
=== Application-specific font cache ===<br />
<br />
Matplotlib ({{pkg|python-matplotlib}} or {{pkg|python2-matplotlib}}) uses its own font cache, so after updating fonts, be sure to remove {{ic|~/.matplotlib/fontList.cache}}, <br />
{{ic|~/.cache/matplotlib/fontList.cache}}, {{ic|~/.sage/matplotlib-1.2.1/fontList.cache}}, etc. so it will regenerate its cache and find the new fonts [http://matplotlib.1069221.n5.nabble.com/getting-matplotlib-to-recognize-a-new-font-td40500.html].<br />
<br />
== See also ==<br />
<br />
* [http://behdad.org/text/ State of Text Rendering]<br />
* [https://fontlibrary.org/en Font Library] - Fonts under Free licenses<br />
* [https://screenshots.debian.net/packages?search=fonts&show=with Fonts on screenshots.debian.net]</div>AAlpine