[Gimp-user] Setting text markup from python script
- From: Burbly <forums gimpusers com>
- To: gimp-user-list gnome org
- Cc: notifications gimpusers com
- Subject: [Gimp-user] Setting text markup from python script
- Date: Sat, 06 Sep 2014 21:48:43 +0200
[Working on WinXP/Win 8, GIMP 2.8.14, Python 2.7.5 started via GIMP's menu.]
I'm using Python scripting to create a large number of GIMP images from
templates. The images contain some text fields, and some words in the paragraphs
of text need markup applied (e.g. bold, or colour). AFAICS, since
gimp-text-layer-set-markup isn't available in the pdb, there's no way to do
this. (Cf. https://bugzilla.gnome.org/show_bug.cgi?id=724101 for more context --
as I'm working on Windows, I unfortunately can't just apply the patch.)
I think I'm going to have to write my own mini text-formatting algorithm -- use
GIMP to insert a word (with appropriate formatting), measure its dimensions,
move a space's width to the right, insert the next word, and so on, until
there's no more room for the next word, at which point you wrap a line + start
again. But before implementing that I thought it was asking if there was any
workaround that would just let me use markup!
thanks,
Mohan
--
Burbly (via www.gimpusers.com/forums)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]