Text-Editor icon indicating copy to clipboard operation
Text-Editor copied to clipboard

Arial font error in Linux

Open Deshdeepak1 opened this issue 4 years ago • 7 comments

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 .

Deshdeepak1 avatar Oct 24 '20 11:10 Deshdeepak1

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.

Devansh2005 avatar Oct 24 '20 12:10 Devansh2005

Also check if you import font from tkinter .

Devansh2005 avatar Oct 24 '20 12:10 Devansh2005

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?

Deshdeepak1 avatar Oct 24 '20 15:10 Deshdeepak1

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.

Devansh2005 avatar Oct 25 '20 05:10 Devansh2005

Can I make changes to make it run on linux too ?

Deshdeepak1 avatar Oct 25 '20 08:10 Deshdeepak1

Yeh sure ! I'll be happy to learn from you.

Devansh2005 avatar Oct 25 '20 09:10 Devansh2005

I fixed this issue on my Linux computer by calling the first font in the tuple. Can I upload the code change?

thecomputerguru avatar Apr 20 '22 04:04 thecomputerguru