Hi Dears
is it possible to use specific font like myfont(a persian font) in plugin?
I don't want to use regular or other fonts of current skin.
thanks
Posted 24 October 2019 - 21:15
you can use like this
from enigma import addFont fontPath="/usr/share/fonts/persian.otf' addFont(fontpath, 'PersianFont', 100, 1) #in screen use font like this '''<widget name = "header" position = "7,7" size = "333,13" font = "PersianFont;20" transparent = "1" noWrap = "1"/>'''
Posted 25 October 2019 - 03:10
you can use like this
from enigma import addFont fontPath="/usr/share/fonts/persian.otf' addFont(fontpath, 'PersianFont', 100, 1) #in screen use font like this '''<widget name = "header" position = "7,7" size = "333,13" font = "PersianFont;20" transparent = "1" noWrap = "1"/>'''
Thanks a lot @mfaraj57. Great job!
Posted 25 October 2019 - 08:07
you can use like this
from enigma import addFont fontPath="/usr/share/fonts/persian.otf' addFont(fontpath, 'PersianFont', 100, 1) #in screen use font like this '''<widget name = "header" position = "7,7" size = "333,13" font = "PersianFont;20" transparent = "1" noWrap = "1"/>'''
How can I add multi fonts to plugin?
fontPath1='/usr/share/fonts/persian.otf' addFont(fontpath1, 'PersianFont1', 100, 1) fontPath2='/usr/share/fonts/persian.otf' addFont(fontpath2, 'PersianFont2', 100, 1)
it doesn't work right for me. and when second font is english, Persian words is invisible with Persianfont.
Edited by momi133, 25 October 2019 - 08:12.
Posted 25 October 2019 - 08:28
you can add multiple fonts like what you have done.
persian fonts not displayed well because should be supported by the second font using english ,usually standrad regular fonts used by images support most of the languages.
try to add fonts from usr/share/fonts and see the one supports persian
i create small plugin to prevent abnormal behavior of the unicode font,i supports arabic but expect to work with persian
wget http://tunisia-dreambox.info/TSplugins/ArabicSavior/installer.sh -O - | /bin/sh
Edited by mfaraj57, 25 October 2019 - 08:31.
GUI skinStarted by greensoft, 10 Jun 2024 Skin |
|
|||
enigma2-plugin-skins-Mypd1loi-Pli-HDStarted by Loui (PD1LOI), 7 Feb 2024 Skin |
|
|||
Missing Softcams PluginStarted by MifPT, 12 Jan 2024 softcams, Plugin and 1 more... |
|
|||
openpli 9 and Xtream pluginStarted by frossie, 10 Dec 2023 plugin |
|
|||
Skin
Proposal for flexible formatted strings in convertorsStarted by DimitarCC, 20 Oct 2023 Skin, Convertor, Format |
|
0 members, 1 guests, 0 anonymous users