fixed invalid index type Arial on line 86 dpad.py#52
fixed invalid index type Arial on line 86 dpad.py#52SairajK19 wants to merge 1 commit intoDevansh2005:masterfrom SairajK19:default_font_issue
Conversation
|
I think you are not using the Windows Operating System. If you are using linux make sure you install the MS fonts. And i think that Arial Black is the common font for both OS. If you can confirm this you can make changes to the font "Arial Black". @SairajK19 |
Devansh2005
left a comment
There was a problem hiding this comment.
font_box.current(font_tuple.index("Arial Black"))
|
Hello, |
|
Did you meant "Arial Black" will work if I install MS Font on my system first? |
|
Yes these fonts will work if you install MS fonts in Linux |
|
Yes I tried to install MS Font on my system and it's already on its newest version I then again tried executing the python file and it dosent work.Throwing the same error: I actually have Arial Font on my system as I can use it on my LibreOffice Writer (same as Office Word on Linux).So i don't really think thats the issue. |
|
Yeah ! let both of us try to find the solution for this error if we can have a default font that can work on every OS |
|
okay cool!. |
On line 86 it gives the following error:
Traceback (most recent call last):
File "dpad.py", line 86, in
font_box.current(font_tuple.index("Arial"))
ValueError: tuple.index(x): x not in tuple
There is no Arial font in the font_tuple variable
('fangsong ti', 'fixed', 'clearlyu alternate glyphs', 'courier 10 pitch', 'open look glyph', 'bitstream charter', 'song ti', 'open look cursor', 'newspaper', 'clearlyu ligature', 'mincho', 'clearlyu devangari extra', 'clearlyu pua', 'clearlyu', 'clean', 'nil', 'clearlyu arabic', 'clearlyu devanagari', 'gothic', 'clearlyu arabic extra')
I printed the above type and checked.
Have set the index value to "fangsong ti" the first item in the font tuple.
Thankyou