[osd] Spent 81.084 ms in osd_render (slow!) ([osd/libass] fontselect: failed to find any fallback with glyph ...)
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 37k
- Forks
- 3.5k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 22
Description
mpv Information
mpv v0.41.0 Copyright © 2000-2025 mpv/MPlayer/mplayer2 projects
built on Feb 11 2026 22:07:06
libplacebo version: v7.360.0
FFmpeg version: n8.0.1
FFmpeg library versions:
libavcodec 62.11.100
libavdevice 62.1.100
libavfilter 11.4.100
libavformat 62.3.100
libavutil 60.8.100
libswresample 6.1.100
libswscale 9.1.100
Other Information
- Linux version: Arch Linux
- Kernel Version: 6.18.10
- GPU Model: Radeon RX 5700 XT
- Mesa/GPU Driver Version: 25.3.5
- Window Manager and Version: Plasma 6.5.5
- Source of mpv: Arch Linux extra repo
- Latest known working version: x
- Issue started after the following happened: x
Reproduction Steps
I found #13194 before opening this issue, but since that PR seems to be more about about subtitles, I decided to open a new one instead of commenting there. Apologies if it's a duplicate of a known issue, but I feel like this hasn't received any attention for a while now and I have a bit more detail to share.
Issue:
The entire mpv application starts severely lagging when it's trying to render font glyphs in its OSD that can't be displayed. This effect is amplified by the number of glyphs that can't be displayed. It's especially annoying if mpv is launched from another program which sets --force-media-title with dynamic content (so it doesn't depend on the actual media title).
Consider this example:
$ mpv --no-config --force-media-title='🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻' "$file"
This continuously spams the following info log message and makes the application unusable while the OSD is being rendered:
[osd/libass] fontselect: failed to find any fallback with glyph 0x1F43B for font: (sans-serif, 400, 0)
If I however also set --osd-font=Adwaita for example
$ mpv --no-config --osd-font=Adwaita --force-media-title='🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻🐻'
this is spammed, but mpv does not lag as much (it still renders the OSD slowly though)
[osd/libass] fontselect: failed to find any fallback with glyph 0x1F43B for font: (Adwaita, 400, 0)
I am aware that this sounds like a libass issue, but I don't know anything about that and how mpv uses it, so maybe there's a way to at least fix the mpv OSD from being rendered slowly, despite log spam emitted from libass.
Some font config details about my system:
$ fc-list :charset=1F43B
/usr/share/fonts/TTF/Noto Emoji Nerd Font Complete Mono.ttf: NotoEmoji Nerd Font Mono:style=Book
/usr/share/fonts/noto/NotoColorEmoji.ttf: Noto Color Emoji:style=Regular
$ pacman -Qqo /usr/share/fonts/ | pacman -Q -
adwaita-fonts 49.0-2
gsfonts 20200910-6
inter-font 4.1-1
nerd-fonts-complete-mono-glyphs 2.1.0-1
noto-fonts 1:2026.02.01-1
noto-fonts-cjk 20240730-1
otf-san-francisco-mono 1-15
otf-san-francisco-pro 16.0d11e1-1
ttc-iosevka-ss14 34.1.0-1
ttf-blobmoji2 17r1-1
ttf-dejavu 2.37+18+g9b5d1b2f-7
ttf-hack 3.003-7
ttf-liberation 2.1.5-2
xorg-font-util 1.4.1-2
xorg-fonts-100dpi 1.0.4-3
xorg-fonts-75dpi 1.0.4-2
xorg-fonts-alias-100dpi 1.0.6-1
xorg-fonts-alias-75dpi 1.0.6-1
xorg-fonts-encodings 1.1.0-1
$ pacman -Ql ttf-blobmoji2 | grep .ttf
ttf-blobmoji2 /usr/share/fonts/noto/NotoColorEmoji.ttf
$ cat /etc/fonts/conf.d/75-noto-color-emoji.conf
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!-- Add generic family. -->
<match target="pattern">
<test qual="any" name="family"><string>emoji</string></test>
<edit name="family" mode="assign" binding="same"><string>Noto Color Emoji</string></edit>
</match>
<!-- This adds Noto Color Emoji as a final fallback font for the default font families. -->
<match target="pattern">
<test name="family"><string>sans</string></test>
<edit name="family" mode="append"><string>Noto Color Emoji</string></edit>
</match>
<match target="pattern">
<test name="family"><string>serif</string></test>
<edit name="family" mode="append"><string>Noto Color Emoji</string></edit>
</match>
<match target="pattern">
<test name="family"><string>sans-serif</string></test>
<edit name="family" mode="append"><string>Noto Color Emoji</string></edit>
</match>
<match target="pattern">
<test name="family"><string>monospace</string></test>
<edit name="family" mode="append"><string>Noto Color Emoji</string></edit>
</match>
<!-- Block Symbola from the list of fallback fonts. -->
<selectfont>
<rejectfont>
<pattern>
<patelt name="family">
<string>Symbola</string>
</patelt>
</pattern>
</rejectfont>
</selectfont>
<!-- Use Noto Color Emoji when other popular fonts are being specifically requested. -->
<match target="pattern">
<test qual="any" name="family"><string>Apple Color Emoji</string></test>
<edit name="family" mode="assign" binding="same"><string>Noto Color Emoji</string></edit>
</match>
<!--
<match target="pattern">
<test qual="any" name="family"><string>Segoe UI Emoji</string></test>
<edit name="family" mode="assign" binding="same"><string>Noto Color Emoji</string></edit>
</match>
<match target="pattern">
<test qual="any" name="family"><string>Segoe UI Symbol</string></test>
<edit name="family" mode="assign" binding="same"><string>Noto Color Emoji</string></edit>
</match>
-->
<match target="pattern">
<test qual="any" name="family"><string>Android Emoji</string></test>
<edit name="family" mode="assign" binding="same"><string>Noto Color Emoji</string></edit>
</match>
<match target="pattern">
<test qual="any" name="family"><string>Twitter Color Emoji</string></test>
<edit name="family" mode="assign" binding="same"><string>Noto Color Emoji</string></edit>
</match>
<match target="pattern">
<test qual="any" name="family"><string>Twemoji</string></test>
<edit name="family" mode="assign" binding="same"><string>Noto Color Emoji</string></edit>
</match>
<match target="pattern">
<test qual="any" name="family"><string>Twemoji Mozilla</string></test>
<edit name="family" mode="assign" binding="same"><string>Noto Color Emoji</string></edit>
</match>
<match target="pattern">
<test qual="any" name="family"><string>TwemojiMozilla</string></test>
<edit name="family" mode="assign" binding="same"><string>Noto Color Emoji</string></edit>
</match>
<match target="pattern">
<test qual="any" name="family"><string>EmojiTwo</string></test>
<edit name="family" mode="assign" binding="same"><string>Noto Color Emoji</string></edit>
</match>
<match target="pattern">
<test qual="any" name="family"><string>Emoji Two</string></test>
<edit name="family" mode="assign" binding="same"><string>Noto Color Emoji</string></edit>
</match>
<match target="pattern">
<test qual="any" name="family"><string>EmojiSymbols</string></test>
<edit name="family" mode="assign" binding="same"><string>Noto Color Emoji</string></edit>
</match>
<match target="pattern">
<test qual="any" name="family"><string>Symbola</string></test>
<edit name="family" mode="assign" binding="same"><string>Noto Color Emoji</string></edit>
</match>
</fontconfig>
Expected Behavior
x
Actual Behavior
--osd-font=sans-serif(default)
[osd] Spent 81.084 ms in osd_render (slow!) (~12fps)
--osd-font=Adwaita
[osd] Spent 13.914 ms in osd_render (slow!) (still within the time frame of my 60hz display)
Log File
Sample Files
Doesn't depend on the media file if --force-media-title is set.
I carefully read all instruction and confirm that I did the following:
- I tested with the latest mpv version to validate that the issue is not already fixed.
- I provided all required information including system and mpv version.
- I produced the log file with the exact same set of files, parameters, and conditions used in "Reproduction Steps", with the addition of
--log-file=output.txt. - I produced the log file while the behaviors described in "Actual Behavior" were actively observed.
- I attached the full, untruncated log file.
- I attached the backtrace in the case of a crash.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the supplied --force-media-title command and compare the reported osd_render timings for the default and Adwaita fonts. Start at the OSD rendering path and the libass font fallback behavior described in the logs; done means the missing-glyph case no longer makes OSD rendering unusably slow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100