[Geany-Users] per filetype font

Lex Trotman elextr at xxxxx
Sun Jun 15 09:43:49 UTC 2014


On 15 June 2014 19:01, Johannes Lange <johannes.lange at rwth-aachen.de> wrote:
> On Sun 15 Jun 2014 10:54:38 CEST,
>
> Lex Trotman <elextr at gmail.com> wrote:
>>
>> On 15 June 2014 18:14, Johannes Lange <johannes.lange at rwth-aachen.de>
>> wrote:
>>>
>>> Hi everyone,
>>>
>>> I am looking for a way to choose a font "per filetype".
>>> E.g. I normally use a Monospace font for coding, but if I am writing
>>> continuous text like with LaTeX, I'd prefer a proportional one.
>>> Now I am using different filetypes in one session and don't want to
>>> switch
>>> the font manually.
>>>
>>> Am I right that there is no way achieving this by the normal
>>> filetype-settings?
>>> Or is there a plugin doing something like this?
>>
>>
>> Unfortunately there is only one font setting for all editor objects.
>> Setting the font is not available in the plugin API so even a plugin
>> can't change it.  Also it is set for all windows by Geany, so it would
>> overwrite any plugin setting.
>
>
> Thanks for the quick reply!
> That's sad, I thought about writing a plugin for that already...
> Would it be difficult to implement the font settings editor-wise?

No, and yes :)

The underlying editor widget allows the font to be set per style, not
just per window, so the underlying basis is there and is available in
the plugin API.

But then a method of selecting a font per filetype needs to be added,
and how that interacts with the code that sets the font from the GUI
menu has to be decided, because at the moment the GUI is likely to
overwrite that per filetype choice, but if it doesn't is it going to
be confusing if the GUI now doesn't work on some files? etc

In other words there is more to it than might first appear.

It likely will require changes in core, it cannot be done just from a
plugin without Geany possibly overwriting the plugins choice.

Cheers
Lex

>
> _______________________________________________
> Users mailing list
> Users at lists.geany.org
> https://lists.geany.org/cgi-bin/mailman/listinfo/users


More information about the Users mailing list