Hi again, <br>ok, just for fun, here's a patch to a basic functional version...(and the modified files in case patch is not working acording to plans...)<br>it's tiny modifications to src/highlighting.c and src/highlighting.h :D <br>
<br>once the patch applied you should be able to add to styling sections of filetypes.whatever<br>a font name, and a font size...<br>in that fashion:<br>a_style=fg_color;bg_color;bold?;italic?;fontname;font_size<br><br>I've attached a filetype example to see how to use...<br>
if you leave it the way it is...then you just get the usual highlighting...<br><br>I've only tested it with Python and C.... <br><br>as mentionned earlier, if you change the default font during a session, it will break the custom styling for the duration of the session....<br>
i'll work on that...<br><br>later on I'll provide extra options to change margin sizes, markers and such.... <br><br>let me know if it works<br><br>cheers,<br>jimmy<br><br><div class="gmail_quote">2009/5/8 Jimmy Paillet <span dir="ltr"><<a href="mailto:jimmy.paillet@gmail.com">jimmy.paillet@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">nevermind...just used a strcpy...went just fine...<br>i'll probably make decent advances now...<br>
cheers<br>j<br><br><div class="gmail_quote">2009/5/8 Jimmy Paillet <span dir="ltr"><<a href="mailto:jimmy.paillet@gmail.com" target="_blank">jimmy.paillet@gmail.com</a>></span><div><div></div><div class="h5"><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br>I think i can express it clearly now....<br>this my GeanyLexerStyle:<br><br>typedef struct GeanyLexerStyle<br>

{<br>    gint    foreground;    /**< Foreground text colour, in @c 0xBBGGRR format. */<br>    gint    background;    /**< Background text colour, in @c 0xBBGGRR format. */<br>
    gboolean bold;        /**< Bold. */<br>    gboolean italic;    /**< Italic. */<br>    gchar* font_perso;    /**  A font name*/<br>    gint font_size;<br>}<br>GeanyLexerStyle;<br><br>in get_keyfile_style, this struct is filled (as least for c)...<br>


thanks to a gchar** list... pointing to the [styling] sections of filetypes.foo <br><br>of course at the end of this function, list is free'd....so my pointer font_perso points to crap outside the func...hence my pb... :D<br>


when I comment out the free statement, thinhs behave logically...<br><br>what do you reckon? free the list variable later on?<br><br>jimmy <br><br><div class="gmail_quote">2009/5/8 Enrico Tröger <span dir="ltr"><<a href="mailto:enrico.troeger@uvena.de" target="_blank">enrico.troeger@uvena.de</a>></span><br>


<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div><div>On Fri, 8 May 2009 18:26:15 +0200, Jimmy wrote:<br>
<br>
>> >functions...i'm facing pointer pbs, basically...my font name does<br>
>> >not propagate properly through functions...<br>
>><br>
>> If you need help for a specific problem, just ask.<br>
><br>
><br>
>ok...it's probably silly, as i'm not an experienced C programmer...and<br>
>didn't spend a lot of time on it...<br>
>but as I told you, I expanded the GeanyLexerStyle structure....<br>
><br>
>in get_keyfile_style and get_key_file_hex my adds to the filetypes.foo<br>
>are properly read...<br>
>and when i print out my new element of the struct it's either null or<br>
>the fontname I've just entered in the file....<br>
><br>
>but when i try to access my new entry in a another function (such as<br>
>set_sci_style), it has been obviously been written over by something<br>
<br>
</div>Hard to say without any code but it sounds like the char* pointer is<br>
either freed in between or it's a static string which is only valid<br>
within a function. Just create a diff of your current code and send it<br>
to the list or me or some paste bin or whatever.<br>
<div><div></div><div><br>
<br>
Regards,<br>
Enrico<br>
<br>
--<br>
Get my GPG key from <a href="http://www.uvena.de/pub.asc" target="_blank">http://www.uvena.de/pub.asc</a><br>
</div></div><br></div></div><div>_______________________________________________<br>
Geany-devel mailing list<br>
<a href="mailto:Geany-devel@uvena.de" target="_blank">Geany-devel@uvena.de</a><br>
<a href="http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel" target="_blank">http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel</a><br>
<br></div></blockquote></div><br>
</blockquote></div></div></div><br>
</blockquote></div><br>