Jump to content


Photo

Use Specific font in plugin skin

plugin skin font

  • Please log in to reply
4 replies to this topic

#1 momi133

  • Senior Member
  • 73 posts

0
Neutral

Posted 24 October 2019 - 15:08

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



Re: Use Specific font in plugin skin #2 mfaraj57

  • Senior Member
  • 1,605 posts

+286
Excellent

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"/>'''



Re: Use Specific font in plugin skin #3 momi133

  • Senior Member
  • 73 posts

0
Neutral

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!



Re: Use Specific font in plugin skin #4 momi133

  • Senior Member
  • 73 posts

0
Neutral

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.


Re: Use Specific font in plugin skin #5 mfaraj57

  • Senior Member
  • 1,605 posts

+286
Excellent

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.




Also tagged with one or more of these keywords: plugin, skin, font

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users