Post Reply 

gimp-text-get-extents-fontname -- pass literal '\'

Mar 11, 2012, 11:51
Post: #1
gimp-text-get-extents-fontname -- pass literal '\'
Hello I've developed a GNU I/O FIFOed interface toward Gimp's functionalities; one of the interface function passes a text string to the plugin gimp-text-get-extents-fontname and receives the extents elaborated by Gimp.
I noticed that in this plugin escape characters do exist and are attributed to '\'; for eg. newline is \n. But a literal '\' doesn't seem possible to be passed, even prefixing it with another '\'.
How can '\' pass thru, or better, is there a table with all the recognized escapes?
Thank you.
Find all posts by this user
Quote this message in a reply
Mar 11, 2012, 14:03
Post: #2
RE: gimp-text-get-extents-fontname -- pass literal '\'
My interface is literally attached to the standard input/output of the 'gimp-console' program; that is, by redirection.
Find all posts by this user
Quote this message in a reply
Mar 11, 2012, 15:57 (This post was last modified: Mar 11, 2012 16:11 by Davide.)
Post: #3
RE: gimp-text-get-extents-fontname -- pass literal '\'
Sorry if I wasn't clear. The language is neither Scheme or Python. It's a Bash script connected to the I/O of gimp-console, writing and reading text directly into the terminal, like if it was a user typing into and reading, so any text processing/pre-processing is performed in the same way as it is for a human interactively using gimp-console, or gimp --no-interface.

EDIT: gimp-console (or gimp --no-interface) can run only Scheme (at least it seems).
Find all posts by this user
Quote this message in a reply
Mar 11, 2012, 17:04
Post: #4
RE: gimp-text-get-extents-fontname -- pass literal '\'
(Mar 11, 2012 16:11)ofnuts Wrote:  As far as I know (and as far as I can test on my Linux system) Gimp doesn't even read standard input when used that way.
Of course it does.

(Mar 11, 2012 16:11)ofnuts Wrote:  Where did you find this thing documented?
I'm afraid nowhere at all.

(Mar 11, 2012 16:11)ofnuts Wrote:  And can you post the kind of commands you are entering in such a mode?
Exactly the same Scheme interpreted by the script-foo Gimp's window, but for the sake of clarity:
[Image: 13314852683897-Screenshot-031112-17:38:08.png]

I forgot to mention that among the command-line options there is '-b -'.
Also, gimp --version GNU Image Manipulation Program version 2.6.10
Find all posts by this user
Quote this message in a reply
Mar 11, 2012, 18:48
Post: #5
RE: gimp-text-get-extents-fontname -- pass literal '\'
Thank you; Scheme's escapes are as simple as http://sisc-scheme.org/manual/html/ch03.html#Strings , among those there is '\\'.

Who is in charge for this? and bug report board?
Find all posts by this user
Quote this message in a reply
Mar 11, 2012, 21:11
Post: #6
RE: gimp-text-get-extents-fontname -- pass literal '\'
It was rater hard but finally after seek-and-debug hunting I discovered that passing backslashes to gimp thru my interface, 1 \ every \\ was cut away by the interface itself. No problem in Gimp.
Find all posts by this user
Quote this message in a reply
Mar 12, 2012, 01:54 (This post was last modified: Mar 12, 2012 02:00 by Davide.)
Post: #7
RE: gimp-text-get-extents-fontname -- pass literal '\'
You missed a couple of points, too. But there's no reason to bother making mistakes the center of topic, right?
- just a syntactical question mark.
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Does gimp have optical filter imitations? godek 1 50 Dec 11, 2017 11:40
Last Post: paynekj
  plugin save for web in Gimp 2.9.6 Dkk 1 225 Oct 19, 2017 09:02
Last Post: paynekj
  Script-fu: How to create new, addressable layer using gimp-floating-sel-to-layer Bertholom√§us 1 271 Aug 31, 2017 14:32
Last Post: Bertholomäus
  Late binding / COM for opening an image into GIMP? i73 2 224 Aug 4, 2017 17:39
Last Post: i73
  Loading PythonFu Plugin: ImportError for .../python/gimp.so (GIMP 2.8.22/OSX/Py2.7.9) joroek 1 362 Jul 11, 2017 07:26
Last Post: ythgilb

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS