Font size

Asked by Manuel on 2011-01-27

Hi!,

Good editor, but I've a problem with small fonts, It's possible to change the font size of the editor (or the font type)?

Thanks!!

Question information

Language:
English Edit question
Status:
Solved
For:
Deditor Edit question
Assignee:
No assignee Edit question
Last query:
2011-01-31
Last reply:
2011-02-07
Kruptein (darragh-ssa) said : #1

hi,

first of all: thanks :p

I'm working on making it easier to customize deditor, there is a plugin called customize which now features themes, these themes support font types/sizes.
I'm currently on the wrong computer but I will send you a file that you can temporarily use untill a better update to the customize plugin comes! (you can btw also zoom in/out using ctrl + and ctrl - )

can I also ask you from where you know deditor? :p

Kruptein (darragh-ssa) said : #2

Okay, I quickly added simple font support to the customize plugin
replace "/usr/share/deditor/Plugins/customize.py" with http://kruptein.alwaysdata.net/downloads/py/customize.py

note: only the name of the font and the size are used, other style types specified in the font picker are not used in any way.
note2: if some files are still using the old font, just reload them (ctrl+r / File->Reload)

Manuel (mmartinortiz) said : #3

Hi Kruptein,

I ound Deditor in this post:

http://ubuntulife.wordpress.com/2011/01/26/deditor-otro-editor-para-python/

I've installed your file, but when i go to plugins to activate it, it raise this exception:

Traceback (most recent call last):
  File "/usr/share/deditor/deditor.py", line 588, in _switcher
    return self.PlugCheck(i)
  File "/usr/share/deditor/deditor.py", line 608, in PlugCheck
    dplug.run("dplug", plug, dplug)
  File "/usr/share/deditor/com.py", line 92, in run
    getattr(module[1], func)(args)
  File "/usr/share/deditor/Plugins/customize.py", line 6, in dplug
    instance.plugins.customize = Customize(instance)
  File "/usr/share/deditor/Plugins/customize.py", line 34, in __init__
    self.theme()
  File "/usr/share/deditor/Plugins/customize.py", line 53, in theme
    self.set_font(font, int(size))
  File "/usr/share/deditor/Plugins/customize.py", line 59, in set_font
    sheet[1].StyleSetFontAttr(i, size, name, 0, 0, 0)
  File "/usr/lib/python2.6/dist-packages/wx-2.8-gtk2-unicode/wx/stc.py", line 4923, in StyleSetFontAttr
    return _stc.StyledTextCtrl_StyleSetFontAttr(*args, **kwargs)
TypeError: String or Unicode type required

I've try to use Ctrl + and Ctrl -, but only the second works :P

Thanks for your work!

Kruptein (darragh-ssa) said : #4

Okay, In the meanwhile I made some more changes, I will upload a new .deb soon and post it also here
if ctrl + does not work try ctrl + = (the "=" is on the same button as the "+" for me...)

can you also attach this file (if you use the network plugin, remove your password in the attachment :p)
"/usr/share/deditor/pluginconf.ded"

Manuel (mmartinortiz) said : #5

Here you have the file:

"/usr/share/deditor/pluginconf.ded"

[python]
config_method = pylint
autoindent = True
config_command = pylint -d C0103 --reports=y
pyonlyindent = True

[customize]
theme = default

[general]
disabled = dialogs,codecompletion,macro,sheetupdate,customize,projects,network
enabled = python, projects, codecompletion, sheetupdate, customize, network, macro
allowed = True

"""

I tried 'Ctrl + =' and 'shift + ctrl + =' but don't work. My keyboard layout is Spanish (http://en.wikipedia.org/wiki/Keyboard_layout#Spanish_.28Spain.29.2C_aka_Spanish_.28International_sort.29)

I'll wait to the new version ;-), I hope to be helpfull

Kruptein (darragh-ssa) said : #6

You can download the first bugfix release from the main page :)

( or if you have 0.2.4 you can just start deditor which should warn you that there is a new file available, however this may not work )

Manuel (mmartinortiz) said : #7

I've installed the 0.2.4.1 release, I'm not sure if now this is the appropiate place or I should report a bug, anyway I'll tell you here:

If I go to Customize plugin and change the font and size (save and later restart) nothing happen, I have to edit the pluginconf.ded file to change family font and size, if now I open the Customize plugin, "Sans 10" keeps as the default font (but the editor now works with Monospace 12 (for example))

Kruptein (darragh-ssa) said : #8

Manuel did you check the button to overwrite the theme font?

Manuel (mmartinortiz) said : #9

Yes, I did it. The only visual change was the theme :-(

Kruptein (darragh-ssa) said : #10

And if you reload the file you were editing? (ctrl+r or File>Reload)
or restart deditor?

(can you post the pluginconf.ded file once again please?)

Manuel (mmartinortiz) said : #11

Hi!

With version 0.2.4.2 I can change the font size and font family in "Customize menu" using "Overwrite theme fonts" (Reload doesn't change anything, I must restart), then I can write with the new fonts. If I close and open again Deditor I still write with my selected fonts but "pluginconf.ded" doesn't change:

[python]
config_method = pylint
autoindent = True
config_command = pylint -d C0103 --reports=y
pyonlyindent = True

[customize]
theme = default
font = Ubuntu
overwrite = True
size = 11

[network]
sftp_password =
sftp_savloc = False
ssh_username =
sftp_username =
ssh_host =
sftp_host =
ssh_password =
ssh_onsav = ext
sftp_onsav = ext
ssh_savloc = False

[general]
disabled = dialogs
enabled = sheetupdate,customize,network,macro,codecompletion,projects,python
allowed = True

Where is saved the new configuration?

Some other tips for Deditor:

- Deditor doesn't ask you confirmation when you close a file don't saved
- Could be a good idea a small 'x' to close configuration tabs instead use 'Shift + Ctrl + C'

I have never programed interfaces with wx (always GTK or QT) and I can't help (I don't have enough time to learn WX :-( ), sorry

Kruptein (darragh-ssa) said : #12

What did you expect to happen? from what I read the settings are correct?

the closing file warning is something I'm working on ;)
I will consider the configuration "x" button :p

Although you're not familiar with wx, you've been very helpful thanks for that!

Manuel (mmartinortiz) said : #13

I expected to see, for example, something like this:

[customize]
theme = default
font = Monospace
overwrite = True
size = 14

I assumed that the settings would be saved in this file

Kruptein (darragh-ssa) said : #14

you're totally right, there are two simple solutions:

1) comment out lines 138,139,140 from /usr/share/deditor/Plugins/customize.py
2) replace /usr/share/deditor/Plugins/customize.py with http://kruptein.alwaysdata.net/downloads/py/customize.py

it was totally my fault, I somehow forget to uncomment those lines after the debugging period :p
thanks for pointing out, and thanks for your time!

Manuel (mmartinortiz) said : #15

Has been a pleasure ;-)

Kruptein (darragh-ssa) said : #16

update 0.2.4.4 solves this issue