-
Notifications
You must be signed in to change notification settings - Fork 41
fixed invalid index type Arial on line 86 dpad.py #52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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