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
212 views Asked by delki8 At
1
There are 1 answers
Related Questions in GIMP
- Why 2nd layer of image attached to 1st in Gimp?
- Is there any equivalent to noise reduction in Gimp Python-fu?
- how to automatically zoom to cropped image in GIMP
- Colors washed out in cam preview but vibrant in Google Photo, Gimp, Lightroom mobile
- Replay image transformation
- Problems getting alpha blending working correctly using GIMP and Pygame
- What is GIMP's algorithm for generating an optimum palette for indexed images?
- Imagemagick results of +transparent (remove all colors but one) produces color residues
- Python 3: How do I assert that the value of a gobject.GParamSpec is of a particular type?
- Gimp Preferences/Folders shows no script folder
- Edge detection with GIMP/Sobel vs. OpenCV/Sobel
- Imagemagick linear invert as in Gimp?
- How to change the 'color temperature' in script-fu/scheme?
- "graphicsmagick identify" results in error "Backing store not supported " for a lot of jpegs, how to fix?
- GEGL Library Installation on Windows
Related Questions in SCRIPT-FU
- How to change the 'color temperature' in script-fu/scheme?
- Gimp Scheme Script. How can I keep the same file name when exporting the images from Gimp
- Is there a way to change the active tool assigned to a device using Script-Fu?
- So weir in script-fu, cadr function not work
- How generate scriptfu scheme code in GIMP?
- Attempting to script the addition of a small logo on top of a QR code using GIMP and Script-Fu. Second image doesn't show
- How can I export an image with Script-Fu to the folder with the GIMP file?
- how to select and manipulate a portion of text inside a text layer using python-fu
- Gimp won't run on cloud run but works from local dockers image
- how would I turn a "magic-wand" selection into a path object in GIMP using batch scripting
- Get error on 'gimp-image-set-active-layer' when trying to use script-fu-drop-shadow
- What is the error in this GIMP Script-fu code?
- How to auto close DarkTable when loading RAW files via Gimp script-fu?
- Gimp 'gimp-image-convert-indexed' produces huge files
- invoke GIMP script-fu from command line
Related Questions in PYTHON-FU
- Is there any equivalent to noise reduction in Gimp Python-fu?
- GIMP newly adder RGBA layer in Python-Fu, trouble getting new layer added behind source image to be transparent
- GIMP - Get a point within selection from python script
- Python-fu: How to batch process color-to-alpha and opacity threshold
- Gimp gimp_image_convert_color_profile_from_file does not work
- Is there a way to make text italic with Python-Fu for GIMP?
- how to select and manipulate a portion of text inside a text layer using python-fu
- GIMP python-fu, How to get the directory of the last saved image
- How to programmatically set color in gimp (pythonfu)?
- gimp python-fu resize text box
- GIMP pythonfu get drawable from current image
- How to prevent Color Banding with GIMP?
- Adjust levels for RGB channels in Gimp python-fu?
- How to change GIMP print size with script-fu
- How to save an image as a lossless webp using only GIMP's python-fu
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?
Popular Tags
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)

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).