I wrote a gimp python plugin to create an image, add a text layer, and write some text into it. Similar to this one. I want to apply a different formatting to a portion of this text but I can't find the function to do it when I browse Filters > Script-Fu > Console > Browser.
how to select and manipulate a portion of text inside a text layer using python-fu
208 Views Asked by delki8 At
1
There are 1 best solutions below
Related Questions in GIMP
- merging two images with triangle crop
- gimp: resize and "unsharp mask" via script
- GiMP (Scheme) Script-fu error "illegal function"
- Compiling GIMP from source code
- gimp python plug in: how to trigger another user input
- is there any way to connect GIMP with PHP?
- script-fu multiplication : not enought argument
- Remove lens distortion from images captured by an wide angle (180) camera
- Batch fit image in Linux (e.g. GIMP)
- Is there an image format that supports alpha-transparency and animation. While being supported by most browsers?
- Programmatic equivalent of Gimp's Contiguous selection tool
- python-fu select copy paste
- Gimp save all layers to files with the layers size
- ImageMagick: Possible to remove middle in picture?
- Gimp script-fu working only sometimes
Related Questions in SCRIPT-FU
- GiMP (Scheme) Script-fu error "illegal function"
- script-fu multiplication : not enought argument
- Gimp save all layers to files with the layers size
- Gimp script-fu working only sometimes
- script-fu - paste a layer in an alpha mask
- How to use Script-fu to select stroke line as in the "Stroke Path" - "Stroke Line" dialog
- Mix command and variables in shell scripting
- GIMP:Script-Fu-script error
- Using gimp as server on windows
- Gimp Scheme Script. How can I keep the same file name when exporting the images from Gimp
- Canvas resize and changing resolution in Script-Fu Gimp on indexed image
- How to get a list of files (*. jpg) from all folders?
- GIMP Script-FU - Error: not enough arguments
- How to call an external command in Gimp Plugin?
- Gimp Script-Fu: Script to create new image won't run unless another image is open
Related Questions in PYTHON-FU
- gimp python plug in: how to trigger another user input
- python-fu select copy paste
- Gimp save all layers to files with the layers size
- How could I convert this henna tattoo to black and white?
- GIMP newly adder RGBA layer in Python-Fu, trouble getting new layer added behind source image to be transparent
- Python-fu GIMP script do not paste image
- Run GIMP Python script from command line
- Gimp python script from current image
- What does the 'gimp_histogram' procedure require to work?
- Gimp automation(Scripz Fu/Python Fu)
- How do I set properties for different icon layers using file_ico_save in Python-Fu?
- GIMP bash, add layer to existing GUI instance
- Gimp python-fu how to change menu text (label)
- GIMP pythonfu get drawable from current image
- How to call pdb.gimp_pencil in Gimp Python-fu plugin
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?

Very complicated. You can get the info in the "parasite" attached to the text layer:
So for instance, for an image like this:
Data looks like this:
Markup is possibly related to Cairo (which is the library used by Gimp to draw text and curves). However,
Edited:
It seems creating or updating the parasite doesn't work and Gimp seems to ignored the parasite. It only considers it when loading the file, and when the file is saved, it generates a new parasite from the actual layer contents.
It may be easier for you to format several individual text layers side-by-side. To align them to the same baseline: if you use
pdb.gimp_text_get_extents_fontname()with a character that has a flat bottom (I typically use "X") the "ascent" is the distance of the baseline from the top of the layer (round character such as "O" can extent slightly under the baseline).