Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 22 Nov 2017, 01:48
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
InkscapeLite, bug fix, another needs fixing
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 2 [23 Posts]   Goto page: Previous 1, 2
Author Message
jamesbond

Joined: 26 Feb 2007
Posts: 3075
Location: The Blue Marble

PostPosted: Sat 23 Apr 2016, 14:12    Post subject:  

@SFR - The crash happens in libfontconfig, while making XftListsFont call. Apparently you can make this call successful (???) by doing View -> Advanced Text Tool and the set default font to anything other than helvetica. And then the standard text tool will work. But it does not make sense. I'm going to check what's wrong with libXft and libfontconfig - this seems to be generic and not tied to inkscapelite at all, but I may be wrong.

On the other hand, the report from gjuhash above is disheartening. zigbert's SVG icons are quite simple (if I recall correctly. he actually hand-tuned the SVG paths). If inkscapelite can't even process a simple SVG correctly, I'm having a hard time to justify the effort in trying to make it work.

_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread.
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 4755
Location: Ontario

PostPosted: Sat 23 Apr 2016, 15:08    Post subject:  

Quote:
I'm having a hard time to justify the effort in trying to make it work.


Barry K knows about the problem of Inkscapelite recognising the more recent Inkscape SVG images.

...but he likes it because you can make a SVG image and the image will be compatible
with the current programs.

_________________________________________________
Back to top
View user's profile Send private message 
SFR


Joined: 26 Oct 2011
Posts: 1641

PostPosted: Sat 23 Apr 2016, 16:33    Post subject:  

jamesbond wrote:
@SFR - The crash happens in libfontconfig, while making XftListsFont call. Apparently you can make this call successful (???) by doing View -> Advanced Text Tool and the set default font to anything other than helvetica. And then the standard text tool will work. But it does not make sense. I'm going to check what's wrong with libXft and libfontconfig - this seems to be generic and not tied to inkscapelite at all, but I may be wrong.

Yes, that's exactly where I got stuck.

jamesbond wrote:
On the other hand, the report from gjuhash above is disheartening. zigbert's SVG icons are quite simple (if I recall correctly. he actually hand-tuned the SVG paths). If inkscapelite can't even process a simple SVG correctly, I'm having a hard time to justify the effort in trying to make it work.

Yeah, if you check the sources, there's a lot of "Unimplemented" stuff.
Well, that's _almost_ a show-stopper to me, but if I consider it as just a tiny, lightweight app for creating (not editing existing ones) simple vector images, it becomes quite handy.

Anyway, I have a working build, whoever is interested can get it from my previous post, so no biggie.
And thank you again for checking it out!

Greetings!

_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Back to top
View user's profile Send private message 
jamesbond

Joined: 26 Feb 2007
Posts: 3075
Location: The Blue Marble

PostPosted: Mon 25 Apr 2016, 05:27    Post subject:  

My contribution:

text-tool-crash.patch (64-bit only - not needed for 32-bit build):
Code:
Force all arguments to be 64-bit (required by FcPatternVapBuild - which
is what XftListFonts eventually calls).

James 2016

diff -ur inkscapelite-old/src/libnrtype/nr-type-xft.c inkscapelite-0.36.3/src/libnrtype/nr-type-xft.c
--- inkscapelite-old/src/libnrtype/nr-type-xft.c   2016-04-25 12:52:42.023359902 +0700
+++ inkscapelite-0.36.3/src/libnrtype/nr-type-xft.c   2016-04-25 13:05:54.136712770 +0700
@@ -127,9 +127,9 @@
    }
 
    /* Get family list */
-   fs = XftListFonts (GDK_DISPLAY (), 0,
-            XFT_SCALABLE, XftTypeBool, 1, XFT_OUTLINE, XftTypeBool, 1, 0,
-            XFT_FAMILY, 0);
+   fs = XftListFonts (GDK_DISPLAY (), 0L,
+            XFT_SCALABLE, XftTypeBool, 1L, XFT_OUTLINE, XftTypeBool, 1L, 0L,
+            XFT_FAMILY, 0L);
    NRXftFamilies.length = fs->nfont;
    NRXftFamilies.names = nr_new (gchar *, NRXftFamilies.length);
    NRXftFamilies.destructor = NULL;
@@ -140,9 +140,9 @@
    }
 
    /* Get typeface list */
-   NRXftPatterns = XftListFonts (GDK_DISPLAY (), 0,
-                  XFT_SCALABLE, XftTypeBool, 1, XFT_OUTLINE, XftTypeBool, 1, 0,
-                  XFT_FAMILY, XFT_WEIGHT, XFT_SLANT, XFT_FILE, XFT_INDEX, 0);
+   NRXftPatterns = XftListFonts (GDK_DISPLAY (), 0L,
+                  XFT_SCALABLE, XftTypeBool, 1L, XFT_OUTLINE, XftTypeBool, 1L, 0L,
+                  XFT_FAMILY, XFT_WEIGHT, XFT_SLANT, XFT_FILE, XFT_INDEX, 0L);
    NRXftTypefaces.length = NRXftPatterns->nfont;
    NRXftTypefaces.names = nr_new (gchar *, NRXftTypefaces.length);
    NRXftTypefaces.destructor = NULL;


Missing number labels in ruler patch:
Code:
Hard code the ruler font to use dejavu sans mono. Depending on gtkstyle font
does not always work anymore.

James 2016

diff -ur inkscapelite-old/src/widgets/ruler.c inkscapelite-0.36.3/src/widgets/ruler.c
--- inkscapelite-old/src/widgets/ruler.c   2016-04-25 12:52:13.373359193 +0700
+++ inkscapelite-0.36.3/src/widgets/ruler.c   2016-04-25 15:47:53.433619191 +0700
@@ -17,7 +17,7 @@
 #include <string.h>
 #include "ruler.h"
 
-
+#define RULER_FONT            "-misc-dejavu sans mono-medium-r-normal--12-*-*-*-m-*-*-*"
 #define RULER_WIDTH           14
 #define RULER_HEIGHT          14
 #define MINIMUM_INCR          5
@@ -150,8 +150,9 @@
 
   gc = widget->style->fg_gc[GTK_STATE_NORMAL];
   bg_gc = widget->style->bg_gc[GTK_STATE_NORMAL];
-  font = gtk_style_get_font(widget->style);
+  //font = gtk_style_get_font(widget->style);
 
+  font = gdk_font_load (RULER_FONT);
   xthickness = widget->style->xthickness;
   ythickness = widget->style->ythickness;
   digit_height = font->ascent; /* assume descent == 0 ? */
@@ -441,7 +442,8 @@
 
   gc = widget->style->fg_gc[GTK_STATE_NORMAL];
   bg_gc = widget->style->bg_gc[GTK_STATE_NORMAL];
-  font = gtk_style_get_font(widget->style);
+  //font = gtk_style_get_font(widget->style);
+  font = gdk_font_load (RULER_FONT);
   xthickness = widget->style->xthickness;
   ythickness = widget->style->ythickness;
   digit_height = font->ascent; /* assume descent == 0 ? */



Apply this patch after applying inklite.patch from SFR (earlier in this thread).

_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread.
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 8312
Location: Perth, Western Australia

PostPosted: Mon 25 Apr 2016, 06:22    Post subject:  

jamesbond wrote:
My contribution:

text-tool-crash.patch (64-bit only - not needed for 32-bit build):
Code:
Force all arguments to be 64-bit (required by FcPatternVapBuild - which
is what XftListFonts eventually calls).

James 2016

diff -ur inkscapelite-old/src/libnrtype/nr-type-xft.c inkscapelite-0.36.3/src/libnrtype/nr-type-xft.c
--- inkscapelite-old/src/libnrtype/nr-type-xft.c   2016-04-25 12:52:42.023359902 +0700
+++ inkscapelite-0.36.3/src/libnrtype/nr-type-xft.c   2016-04-25 13:05:54.136712770 +0700
@@ -127,9 +127,9 @@
    }
 
    /* Get family list */
-   fs = XftListFonts (GDK_DISPLAY (), 0,
-            XFT_SCALABLE, XftTypeBool, 1, XFT_OUTLINE, XftTypeBool, 1, 0,
-            XFT_FAMILY, 0);
+   fs = XftListFonts (GDK_DISPLAY (), 0L,
+            XFT_SCALABLE, XftTypeBool, 1L, XFT_OUTLINE, XftTypeBool, 1L, 0L,
+            XFT_FAMILY, 0L);
    NRXftFamilies.length = fs->nfont;
    NRXftFamilies.names = nr_new (gchar *, NRXftFamilies.length);
    NRXftFamilies.destructor = NULL;
@@ -140,9 +140,9 @@
    }
 
    /* Get typeface list */
-   NRXftPatterns = XftListFonts (GDK_DISPLAY (), 0,
-                  XFT_SCALABLE, XftTypeBool, 1, XFT_OUTLINE, XftTypeBool, 1, 0,
-                  XFT_FAMILY, XFT_WEIGHT, XFT_SLANT, XFT_FILE, XFT_INDEX, 0);
+   NRXftPatterns = XftListFonts (GDK_DISPLAY (), 0L,
+                  XFT_SCALABLE, XftTypeBool, 1L, XFT_OUTLINE, XftTypeBool, 1L, 0L,
+                  XFT_FAMILY, XFT_WEIGHT, XFT_SLANT, XFT_FILE, XFT_INDEX, 0L);
    NRXftTypefaces.length = NRXftPatterns->nfont;
    NRXftTypefaces.names = nr_new (gchar *, NRXftTypefaces.length);
    NRXftTypefaces.destructor = NULL;


Missing number labels in ruler patch:
Code:
Hard code the ruler font to use dejavu sans mono. Depending on gtkstyle font
does not always work anymore.

James 2016

diff -ur inkscapelite-old/src/widgets/ruler.c inkscapelite-0.36.3/src/widgets/ruler.c
--- inkscapelite-old/src/widgets/ruler.c   2016-04-25 12:52:13.373359193 +0700
+++ inkscapelite-0.36.3/src/widgets/ruler.c   2016-04-25 15:47:53.433619191 +0700
@@ -17,7 +17,7 @@
 #include <string.h>
 #include "ruler.h"
 
-
+#define RULER_FONT            "-misc-dejavu sans mono-medium-r-normal--12-*-*-*-m-*-*-*"
 #define RULER_WIDTH           14
 #define RULER_HEIGHT          14
 #define MINIMUM_INCR          5
@@ -150,8 +150,9 @@
 
   gc = widget->style->fg_gc[GTK_STATE_NORMAL];
   bg_gc = widget->style->bg_gc[GTK_STATE_NORMAL];
-  font = gtk_style_get_font(widget->style);
+  //font = gtk_style_get_font(widget->style);
 
+  font = gdk_font_load (RULER_FONT);
   xthickness = widget->style->xthickness;
   ythickness = widget->style->ythickness;
   digit_height = font->ascent; /* assume descent == 0 ? */
@@ -441,7 +442,8 @@
 
   gc = widget->style->fg_gc[GTK_STATE_NORMAL];
   bg_gc = widget->style->bg_gc[GTK_STATE_NORMAL];
-  font = gtk_style_get_font(widget->style);
+  //font = gtk_style_get_font(widget->style);
+  font = gdk_font_load (RULER_FONT);
   xthickness = widget->style->xthickness;
   ythickness = widget->style->ythickness;
   digit_height = font->ascent; /* assume descent == 0 ? */



Apply this patch after applying inklite.patch from SFR (earlier in this thread).


james,
Thanks, I have put these into T2. Haven't tried them yet.

_________________
http://barryk.org/news/
Back to top
View user's profile Send private message Visit poster's website 
01micko


Joined: 11 Oct 2008
Posts: 8659
Location: qld

PostPosted: Mon 25 Apr 2016, 07:20    Post subject:  

Working ok(ish) in slacko64.

Any text certainly would crash the thing. This image (below) isn't rendered correctly though as it is 360x200. Still.. it will do. It is 'home grown' in the zigbert style.
inkscape.png
 Description   
 Filesize   48.83 KB
 Viewed   247 Time(s)

inkscape.png


_________________
Puppy Linux Blog - contact me for access
Back to top
View user's profile Send private message Visit poster's website 
SFR


Joined: 26 Oct 2011
Posts: 1641

PostPosted: Mon 25 Apr 2016, 07:44    Post subject:  

jamesbond wrote:
My contribution:

text-tool-crash.patch (64-bit only - not needed for 32-bit build):
[...]
Missing number labels in ruler patch:
[...]

Thanks a lot! Just tried it and builds/works fine.

Greetings!

_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Back to top
View user's profile Send private message 
Pelo

Joined: 10 Sep 2011
Posts: 12591
Location: Mer méditerrannée (1 kms°)

PostPosted: Sat 29 Jul 2017, 22:19    Post subject: Nice tool,  

Nice tool, to include in a trilogy Inskscapelite first, then MTpaint, and last Lazpaint.
I never got bug with inkscapelite. A chance, i use it a lot. Some versions of Lazpaint crash, only from time to time.
manipulate
akim.jpg
 Description   You can do better. For fun.
 Filesize   104.15 KB
 Viewed   14 Time(s)

akim.jpg


_________________
Passenger Pelo ! don't ask him to repair the aircraft. Don't use him as a demining dog .... pleeease.
Back to top
View user's profile Send private message Yahoo Messenger 
Display posts from previous:   Sort by:   
Page 2 of 2 [23 Posts]   Goto page: Previous 1, 2
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0732s ][ Queries: 13 (0.0072s) ][ GZIP on ]