[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Text scale mode and additional fonts
From: |
Rahguzar |
Subject: |
Text scale mode and additional fonts |
Date: |
Sat, 30 Dec 2023 12:10:31 +0100 |
User-agent: |
mu4e 1.10.5; emacs 29.1.90 |
Hi,
I sometimes write documents with a mix of Urdu and English. For Urdu I
have this in my config:
(setq +bidi-arabic-font (font-spec :family "Mehr Nastaliq Web"))
(set-fontset-font t 'arabic +bidi-arabic-font)
The font can be found here
https://mehrtype.com/product/mehr-nastaliq-web/
This works but Urdu text is too small. I can use `text-scale-increase`
but that also makes the English text bigger. So I tried this snippet
instead:
(setq +bidi-arabic-font (font-spec :family "Mehr Nastaliq Web" :size 28))
(set-fontset-font t 'arabic +bidi-arabic-font)
this makes the initial situation better but now the Urdu text is not
affected by the `text-scale-mode` commands.
To overcome this I have added a hook to `text-scale-mode-hook` to
manually adjust the font size. This improves the situation but feels
wrong since the `text-scale-mode` uses face remapping machinery which is
buffer local but the font sizes are global.
Is there a way to set a different size for my Urdu font that makes it
work seamlessly with `text-scale-mode`?
Thanks,
Rahguzar
- Text scale mode and additional fonts,
Rahguzar <=