It is currently Wed Jul 24, 2024 2:25 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 63 posts ]  Go to page 1, 2, 3, 4  Next
Author Message
 Post subject: Re: hejian's text-font plugin [Win64bit & Linux the c-file is included
PostPosted: Mon Feb 03, 2014 9:42 am  (#11) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14729
Location: USA
Graechan can you edit your script to center the font on the image layer? It doesn't seem to be doing that.

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: hejian's text-font plugin [Win64bit & Linux the c-file is included
PostPosted: Mon Feb 03, 2014 2:22 pm  (#12) 
Offline
GimpChat Founder
User avatar

Joined: May 22, 2008
Posts: 5242
Location: Gimpville
@Graechan - Been looking over the plug-in. Reading the C code is not the problem. Figuring out how C plug-ins interface with GIMP is where the learning curve is. It doesn't look too bad, though. It is something I'm interested in pursuing.

There's some pretty good "getting started" info here.
http://developer.gimp.org/index.html

_________________
“If you reach for the stars, you just might land on a decently sized hill.” - Stuart Hill


Top
 Post subject: Re: hejian's text-font plugin [Win64bit & Linux the c-file is included
PostPosted: Mon Feb 03, 2014 4:26 pm  (#13) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2260
Location: Poland
Thanks for sharing ideas and solutions !

According to me - Gimp version 2.8. ? - This functionality has been enabled ( and expanded) - so I guess so - further development was abandoned ...

This plugin ( in this version ) offers only more fonts in the preview - is not enough.
If it were possible to add more features ( the script or plugin ) - it's my wish list would be very long:

Step 1 (the most important ) :
At any layer ( context menu ) creates a text layer - with the fields :
- Text (to be introduced )
- Font name
- Font size ;
- Font color ;
- Position.
..........................................................................................................................
Step 2 .. 3 .. 4 ( a lot of ideas - but it does not matter without the implementation of step 1 )
..........................................................................................................................
Last step - check the look for different fonts (call text- font.exe )


Attachments:
Test of possibility 1.png
Test of possibility 1.png [ 189.79 KiB | Viewed 1562 times ]
Test of possibility 2.png
Test of possibility 2.png [ 183.02 KiB | Viewed 1562 times ]

_________________
Image

Slava
Ukraini!
Top
 Post subject: Re: hejian's text-font plugin [Win64bit & Linux the c-file is included
PostPosted: Mon Feb 03, 2014 4:39 pm  (#14) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4827
Location: Bendigo Vic. Australia
Thank you to all who helped with composing the plugin

_________________
Image
No matter how much you push the envelope, it'll still be stationery.


Top
 Post subject: Re: hejian's text-font plugin [Windows & Linux the c-file is included]
PostPosted: Tue Feb 04, 2014 12:17 am  (#15) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4827
Location: Bendigo Vic. Australia
I have updated the zip to include the correct plugin for your particular operating system
another thank you to all who assisted in this endeavor
I have also tested the plugin in a simple script

_________________
Image
No matter how much you push the envelope, it'll still be stationery.


Top
 Post subject: Re: hejian's text-font plugin [Windows & Linux the c-file is included]
PostPosted: Tue Feb 04, 2014 12:23 am  (#16) 
Offline
GimpChat Founder
User avatar

Joined: May 22, 2008
Posts: 5242
Location: Gimpville
Graechan,

I've modified the C plug-in to add the functionality you requested. The plug-in will now make the selected font active and outputs a message.

You will need to compile it for Windows.

I'm attaching the updated source code and the binary for Linux_x64. :bigthup

Latest update located here

_________________
“If you reach for the stars, you just might land on a decently sized hill.” - Stuart Hill


Top
 Post subject: Re: hejian's text-font plugin [Windows & Linux the c-file is included]
PostPosted: Tue Feb 04, 2014 12:38 am  (#17) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4827
Location: Bendigo Vic. Australia
Thank you GnuTux Hopefully Rod can compile for Windows, should it be named text-font-001 or something similiar so that this version is different

_________________
Image
No matter how much you push the envelope, it'll still be stationery.


Top
 Post subject: Re: hejian's text-font plugin [Windows & Linux the c-file is included]
PostPosted: Tue Feb 04, 2014 12:42 am  (#18) 
Offline
GimpChat Founder
User avatar

Joined: May 22, 2008
Posts: 5242
Location: Gimpville
Shouldn't the name remain the same, so it can be just overwritten in the plug-ins folder? Having two versions of the same plug-ins, with different names, can cause PDB/Menu registration problems.

I've updated the text in the source code to note that updates have been made.

Is there not a Free Open Source "C" compiler for Windows? Once you get the C compiler and the GIMP libs/deps installed, you should be able to use gimptool to compile small plug-ins.

_________________
“If you reach for the stars, you just might land on a decently sized hill.” - Stuart Hill


Top
 Post subject: Re: hejian's text-font plugin [Windows & Linux the c-file is included]
PostPosted: Tue Feb 04, 2014 9:26 am  (#19) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14729
Location: USA
Thanks Tux.

Screenshot.
Image

Image

Works in Windows Vista 32 bit Tux. :)

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: hejian's text-font plugin [Windows & Linux the c-file is included]
PostPosted: Tue Feb 04, 2014 1:03 pm  (#20) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2260
Location: Poland
Again Thanks for Graechan, GnuTux and Rod.
In this composition I became of hope for ideas for new solutions.
Guided by his own idea - before compiling in Windows
I changed this:
   gimp_plugin_menu_register (PLUG_IN_PROC, "<image> / Filters / Beautify");

on

gimp_plugin_menu_register (PLUG_IN_PROC, "<Fonts> /
")

It is still shown in the Fonts menu (PPM) - but you can not run.
Any tips?

ps. ROD - from which the build environment are you using?
You built yourself? - If (like me) use of building Samji - for which thanks are due after each successful compilation
Scream out loud - SAMJI BACK


Attachments:
Why inability to start.png
Why inability to start.png [ 10.52 KiB | Viewed 1493 times ]

_________________
Image

Slava
Ukraini!
Top
 Post subject: Re: hejian's text-font plugin [Windows & Linux the c-file is included]
PostPosted: Tue Feb 04, 2014 2:22 pm  (#21) 
Offline
GimpChat Founder
User avatar

Joined: May 22, 2008
Posts: 5242
Location: Gimpville
MareroQ wrote:
It is still shown in the Fonts menu (PPM) - but you can not run.
Any tips?

This plug-in is not going to run from that location. It requires a drawable with an active text layer.

_________________
“If you reach for the stars, you just might land on a decently sized hill.” - Stuart Hill


Top
 Post subject: Re: hejian's text-font plugin [Windows & Linux the c-file is included]
PostPosted: Tue Feb 04, 2014 2:46 pm  (#22) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2260
Location: Poland
You know that I am a beginner in coding - before a long road of science - a clue ?

_________________
Image

Slava
Ukraini!


Top
 Post subject: Re: hejian's text-font plugin [Windows & Linux the c-file is included]
PostPosted: Tue Feb 04, 2014 2:56 pm  (#23) 
Offline
GimpChat Founder
User avatar

Joined: May 22, 2008
Posts: 5242
Location: Gimpville
For the plug-in it to run directly from the fonts dialog, the plug-in would need to create an image with a text layer from the selected font, as the fist step. This might be a good task for Graechan's script.

I do agree the menu location of the Text-Font plug-in should not be under Filters/Beautify. Maybe Filters/Fonts would be a better location.

_________________
“If you reach for the stars, you just might land on a decently sized hill.” - Stuart Hill


Top
 Post subject: Re: hejian's text-font plugin [Windows & Linux the c-file is included]
PostPosted: Tue Feb 04, 2014 3:29 pm  (#24) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2446
I recompiled (linux 32) incorporating the changes shown earlier. While editing changed the location to Tools/TextFont. Works ok from there.

Rods suggestion of changing the menu location by editing pluginrc also works very well.

_________________
Image


Top
 Post subject: Re: hejian's text-font plugin [Windows & Linux the c-file is included]
PostPosted: Tue Feb 04, 2014 3:31 pm  (#25) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14729
Location: USA
GnuTux wrote:
For the plug-in it to run directly from the fonts dialog, the plug-in would need to create an image with a text layer from the selected font, as the fist step. This might be a good task for Graechan's script.

I do agree the menu location of the Text-Font plug-in should not be under Filters/Beautify. Maybe Filters/Fonts would be a better location.


I can re edit the plugin to show at Filters>Text i do have that menu item already listed for Freetype and other filters. :). Maybe that would be a better spot?

MareroQ i am using the latest SamJ Environment on my desktop. It actually has decided to start working again. YAY! For now anyway. :lol Anyways i have had the environment set up for a long time (same one i used to use before). I also have my Qt build environment back! That's exciting too.

Yes i agree a shout out to SamJ - We need you back Sam! We miss you too. :)

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: hejian's text-font plugin [Windows & Linux the c-file is included]
PostPosted: Tue Feb 04, 2014 3:52 pm  (#26) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4827
Location: Bendigo Vic. Australia
Samj was a genius with doing builds for windows and I've been hoping to to see Samj pop in to this discussion, but maybe Rod could talk me through with what I need for the Win64bit build and I'll give it a try

_________________
Image
No matter how much you push the envelope, it'll still be stationery.


Top
 Post subject: Re: hejian's text-font plugin [Windows & Linux the c-file is included]
PostPosted: Tue Feb 04, 2014 4:00 pm  (#27) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14729
Location: USA
Ok i re compiled to show the new menu location <Image>/Filters/Text.
Attached with src. :)

Image

Maybe we should clean up this thread to list ONLY newer compiles?

Graechan just download the latest environment SamJ posted a link to.
If your environment is 64 Bit your plugin will compile as such. :)
Download here - http://www.aljacom.com/~gmic/petit-msys-mingw-gimp28.7z - and unpack to C in Windows directory.
You need to unpack the "small-msys-mingw-gimp28.7z" archive in C:\ for C:\petit-msys-mingw-gimp28
The instructions are in the text file : C:\petit-msys-mingw-gimp28\Readme_petit-msys-mingw-gimp28.txt

Open the Make file and edit it to contain the name of the C src you are compiling. Like so.
################################################################

B_CFLAGS = -I/mingw/include -I/mingw/x86_64-w64-mingw32/include -I/python/include -pipe -O3 -mms-bitfields -march=i686 -s
B_LDFLAGS = -L/mingw/lib -L/mingw/x86_64-w64-mingw32/lib -mwindows
GIMPARGS = $(shell gimptool-2.0 --cflags --libs)
PCREARGS = $(shell pcre-config --cflags --libs)

make:
   /env/compilers_win32/MinGW/bin/gcc.exe -o text-font.exe -Wall -O3 -Wno-unused-variable -Wno-pointer-sign -Wno-parentheses text-font.c $(B_CFLAGS) $(B_LDFLAGS) $(GIMPARGS) $(PCREARGS) -DGIMP_DISABLE_DEPRECATED

################################################################


Though yours should read
   /env/msys/bin/gcc.exe


More information here.
viewtopic.php?f=7&t=8222
I suggest read the whole topic thread. :)

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: hejian's text-font plugin [Windows & Linux the c-file is included]
PostPosted: Tue Feb 04, 2014 4:32 pm  (#28) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4827
Location: Bendigo Vic. Australia
Thankyou Rod but I'm confused is the link for 32bit or 64bit as the files seem to indicate it's 32bit

_________________
Image
No matter how much you push the envelope, it'll still be stationery.


Top
 Post subject: Re: hejian's text-font plugin [Windows & Linux the c-file is included]
PostPosted: Tue Feb 04, 2014 4:37 pm  (#29) 
Offline
GimpChat Founder
User avatar

Joined: May 22, 2008
Posts: 5242
Location: Gimpville
That environment might do both, Graechan. Check the readme.

The Win 64bit environment is here.

http://www.aljacom.com/~gimp/divers.html

More info
viewtopic.php?f=7&t=8459

_________________
“If you reach for the stars, you just might land on a decently sized hill.” - Stuart Hill


Top
 Post subject: Re: hejian's text-font plugin [Windows & Linux the c-file is included]
PostPosted: Tue Feb 04, 2014 5:15 pm  (#30) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4827
Location: Bendigo Vic. Australia
GnuTux Thank you for the link, I'm downloading now

_________________
Image
No matter how much you push the envelope, it'll still be stationery.


Top
Post new topic Reply to topic  [ 63 posts ]  Go to page 1, 2, 3, 4  Next

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) GEGL Text Style Collection - plugin with many fancy text styles

14

No new posts Attachment(s) GEGL ROCK TEXT 2 - Advance rock text plugin -requires Gimp 2.10.32+

8

No new posts Attachment(s) Using Custom Font Faux 3D with text layers

2

No new posts Looking for the Text Stamp Plugin/Script

4

No new posts Attachment(s) GEGL Crayon Text plugin

2



* Login  



Powered by phpBB3 © phpBB Group