Text-Editor
Text-Editor copied to clipboard
Arial font error in Linux
font_tuple tuple have no entry arial.
Traceback (most recent call last):
File "dpad.py", line 83, in <module>
font_box.current(font_tuple.index("Arial"))
ValueError: tuple.index(x): x not in tuple
Also there are lot of bugs. e.g. requirements.txt doesn't require tkinter as it is not a python package, you should better provide installing it in readme, nor does it require platform_version . requirements.txt is used so that anyone can install all dependences using pip install -r .
There are no bugs in dpad.py and as in line 83 font_box.current(font_tuple.index("Arial")) - Arial is the selected default font when notepad starts. Also check line 82 if something is wrong giving values to font box. @Deshdeepak1 please ignore that requirement.txt file. I was just teaching someone to use git. The main file is dpad.py and the icons2 folder. Also give a try passing different font.
Also check if you import font from tkinter .
There are no bugs in dpad.py
https://github.com/Devansh2005/Text-Editor/blob/cdba37244a366e13cf6558a7f9ecdb87dc775783/dpad.py#L322 It should be tk.END .
and as in line 83 font_box.current(font_tuple.index("Arial")) - Arial is the selected default font when notepad starts. Also check line 82 if something is wrong giving values to font box.
ok I was using linux and found out that arial is a microsoft font and it needed to be installed. Is Arial Black available in your font tuple? Do you want this to work just on windows?
Yehh..It was a typing mistake. I don't know why line 322 not giving the error. Anyways its now corrected.I don't know anything about linux. Noob for it.
Can I make changes to make it run on linux too ?
Yeh sure ! I'll be happy to learn from you.
I fixed this issue on my Linux computer by calling the first font in the tuple. Can I upload the code change?