Skip to main content

Posts

Showing posts from July, 2021

Working with long text tag names.

Pango is really useful for creating markup strings although it does some caveats. It is markup for display purposes and not interactive editing. Some work has been done in bridging the gap between the display widgets and the text editor by creating preset markup tags which are meaningful names as tag whilst being valid pango strings. Pango also has some convenience tags although extending this list is not possible at all, nor its is directly possible through the Gtk api to directly convert pango attributes to tag properties or vice versa.  To exchange formatted data between the text edit and display widgets needs a degree of creative programming on the part of the coder:   set txt [gnocl::text -useMarkup 0 -wrapMode word] gnocl::window -child $txt -setSize 0.2 -onDelete {exit} $txt tag create "<span rise='3000' font_size='small'>" -fontRise 3 -fontSize 8 -foreground red -editable 0 puts [$txt tag names] $txt insert end AAAA -tags [$txt tag names] $txt in...

July updates.

Added some useful functionality during June although some work still needs to be completed. The most annoying thing to be fixed was nagging issues over lineEnd and sentenceEnd, which was a simple logic matter. Of the most pleasing, reworking of dump. The aim being to provide the scripter with the ability to created serialized text files, Blog post to follow. 2021-06: gnocl::text o issues with lineEnd and sentenceEnd offset keywords now fixed.  gnocl::labelEntry o cget -value now works properly. gnocl::tmpFile o convenience command to create a temporary file name, with prefix. gnocl::languages o return information on languages supported and their naming conventions . gnocl::text o reworking dump command. o new tag option -markup, assign pango markup equivalent (not validated). o mark options -gravity and -visible can now be set on creation