SGI: Development

newest fontforge - Page 2

hamei wrote:
about the fontforge void* ... no suggestions ? The newer version sounds like a definite improvement. But it's not written in APT, so I'm pretty useless at getting it fixed :(


This might work, depending on what they intended with that double cast:

Code:
ggcd[i][k].data=(void *)((intpt)CID_GlyphList+(0*100+i*20));

_________________
:Octane: halo , oct ane
N.B.: I tend to talk out of my ass. Do not take it too seriously.
duck wrote:
This might work ...

There's ducks and there's
Attachment:
duck_on_the_loose.jpg
duck_on_the_loose.jpg [ 34.48 KiB | Viewed 189 times ]

Dang, you're good, quacky ! Thank you. Made that change then zoomed right on to http.c
Code:
cc-1070 cc: ERROR File = http.c, Line = 150
The indicated type is incomplete.

struct timeval tv;
^

cc-1070 cc: ERROR File = http.c, Line = 180
The indicated type is incomplete.

struct timeval tv;
^

A little searching found that inserting
Code:
struct timeval {
int32_t tv_sec; /* seconds */
int32_t tv_usec; /* and microseconds */
};

fixed that problem and now the 2012 version of fontforge compiles !! woo-hoo, I be a cut-n-paste C programmer now ! Thank you again, Mr Duck.

Thanks to all for the assistance. If you have a compiler it's worth taking a shot at it, there are significant advances in the program. I'll try making a tardist later if no one more talented gets to it first ... but I have to quad-size the graphics for myself first.

here's an .Xdefaults I found that helps the appearance somewhat. Still not perfect (the menu items are hidden in there somewhere, need to be oblique helvetica) but better than stock ...
Code:
! fontforge

!
!  Gdraw.GMenu.Box.NormalBackground: #3c3b37
!  Gdraw.GMenu.Box.NormalForeground: #e0dddc
!  Gdraw.GMenu.Box.BorderOuterCol:   #373632
!  Gdraw.GLine.Box.BorderDarkest:    #373632
!  Gdraw.GLine.Box.BorderDarker:     #373632
!  Gdraw.GLine.Box.BorderBrighter:   #43423e
!  Gdraw.GLine.Box.BorderBrightest:  #43423e
!
! To change the color theme, search for and replace the following colors:
!
!  Hightlight Brightest: #f9c3ac
!  Hightlight Brighter:  #faae90
!  Hightlight:           #f59f7b
!  Hightlight Darker:    #f18458
!  Hightlight Darkest:   #f07746
!  Hightlight Border:    #b69385

Gdraw.Background:            #f2f1f0
Gdraw.Foreground:            #3c3b37

Gdraw.GGadget.Box.ActiveBorder:         #f18458
Gdraw.GGadget.Box.BorderOuterCol:      #a9a5a2
Gdraw.GGadget.Box.BorderBrighter:      #f7f6f6
Gdraw.GGadget.Box.BorderBrightest:      #f7f6f6
Gdraw.GGadget.Box.BorderDarker:         #e0dddc
Gdraw.GGadget.Box.BorderDarkest:      #eeeeee
Gdraw.GGadget.Box.DisabledBackground:      #f2f1f0
Gdraw.GGadget.Box.DisabledForeground:      #a9a5a2
Gdraw.GGadget.Box.PressedBackground:      #a9a5a2
Gdraw.GGadget.Box.NormalBackground:      #f2f1f0
Gdraw.GGadget.Box.NormalForeground:      #3c3b37
Gdraw.GGadget.Font:            11pt helvetica
Gdraw.GGadget.ImagePath:         ~/.FontForge/theme-ambiance:~/.FontForge/pixmaps:

Gdraw.GGadget.Popup.Background:         #000000
Gdraw.GGadget.Popup.Foreground:         #ffffff
Gdraw.GGadget.Popup.Font:         11pt helvetica

Gdraw.GButton.Box.ActiveInner:         false
Gdraw.GButton.Box.ActiveOuter:         true
Gdraw.GButton.Box.BorderInner:         false
Gdraw.GButton.Box.BorderOuter:         true
Gdraw.GButton.Box.BorderShape:         roundrect
Gdraw.GButton.Box.BorderType:         raised
Gdraw.GButton.Box.BorderWidth:         1
Gdraw.GButton.Box.DrawDefault:         false
Gdraw.GButton.Box.GradientBG:         true
Gdraw.GButton.Box.GradientStartCol:      #d3d0cd
Gdraw.GButton.Box.NormalBackground:      #eeeeee
Gdraw.GButton.Box.Padding:         2
Gdraw.GButton.Box.Radius:         2
Gdraw.GButton.ShiftOnPress:         true

Gdraw.GDefaultButton.Box.BorderOuterCol:   #b69385
Gdraw.GDefaultButton.Box.BorderBrightest:   #faae90
Gdraw.GDefaultButton.Box.BorderBrighter:   #f9c3ac
Gdraw.GDefaultButton.Box.BorderDarker:      #f59f7b
Gdraw.GDefaultButton.Box.BorderDarkest:      #faae90
Gdraw.GDefaultButton.Box.GradientStartCol:   #f18458
Gdraw.GDefaultButton.Box.NormalBackground:   #f9c3ac
Gdraw.GDefaultButton.Box.PressedBackground:   #f07746

Gdraw.GCheckBoxOn.Box.BorderType:      none
Gdraw.GCheckBoxOn.Box.BorderWidth:      0
Gdraw.GCheckBoxOn.Box.Padding:         0
Gdraw.GCheckBoxOn.Box.DoDepressedBackground:   false
Gdraw.GCheckBoxOn.DisabledImage:      GCheckBoxOnDisabled.png
Gdraw.GCheckBoxOn.Image:         GCheckBoxOn.png
Gdraw.GCheckBoxOff.Box.BorderType:      none
Gdraw.GCheckBoxOff.Box.BorderWidth:      0
Gdraw.GCheckBoxOff.Box.Padding:         0
Gdraw.GCheckBoxOff.Box.DoDepressedBackground:   false
Gdraw.GCheckBoxOff.DisabledImage:      GCheckBoxOffDisabled.png
Gdraw.GCheckBoxOff.Image:         GCheckBoxOff.png

Gdraw.GVisibilityBoxOn.DisabledImage:      GVisibilityBoxOnDisabled.png
Gdraw.GVisibilityBoxOn.Image:         GVisibilityBoxOn.png
Gdraw.GVisibilityBoxOff.DisabledImage:      GVisibilityBoxOffDisabled.png
Gdraw.GVisibilityBoxOff.Image:         GVisibilityBoxOff.png
Gdraw.GVisibilityBoxOn.Box.ActiveInner:      true
Gdraw.GVisibilityBoxOff.Box.ActiveInner:   true

Gdraw.GComboBoxMenu.Box.ActiveInner:      false
Gdraw.GComboBoxMenu.Box.ActiveOuter:      false
Gdraw.GComboBoxMenu.Box.BorderShape:      roundrect
Gdraw.GComboBoxMenu.Box.BorderType:      raised
Gdraw.GComboBoxMenu.Box.BorderWidth:      1
Gdraw.GComboBoxMenu.Box.DrawDefault:      false
Gdraw.GComboBoxMenu.Box.GradientBG:      true
Gdraw.GComboBoxMenu.Box.GradientStartCol:   #d3d0cd
Gdraw.GComboBoxMenu.Box.NormalBackground:   #eeeeee
Gdraw.GComboBoxMenu.Box.ActiveBackground:   #000000
Gdraw.GComboBoxMenu.Box.Padding:      2
Gdraw.GComboBoxMenu.Box.Radius:         2
Gdraw.GComboBoxMenu.ShiftOnPress:      true

Gdraw.GGroup.Box.BorderOuter:         true
Gdraw.GGroup.Box.BorderType:         box
Gdraw.GGroup.Box.BorderShape:         roundrect
Gdraw.GGroup.Box.BorderWidth:         1
Gdraw.GGroup.Box.Radius:         2

Gdraw.GList.Box.BorderOuter:         true
Gdraw.GList.Box.BorderType:         box
Gdraw.GList.Box.BorderWidth:         0
Gdraw.GList.Box.NormalBackground:      #ffffff

Gdraw.GListMark.DisabledImage:         GListMarkDisabled.png
Gdraw.GListMark.Image:            GListMark.png
Gdraw.GListMark.Width:            11

Gdraw.GMatrixEdit.ActiveBG:         #f07746
Gdraw.GMatrixEdit.FrozenCol:         #a9a5a2
Gdraw.GMatrixEdit.RuleCol:         #a9a5a2
Gdraw.GMatrixEdit.TitleBG:         #e0dddc
Gdraw.GMatrixEdit.TitleDivider:         #a9a5a2
Gdraw.GMatrixEdit.TitleFG:         #000000
Gdraw.GMatrixEdit.TitleFont:    -adobe-helvetica-bold-o-normal--24-240-75-75-p-138-iso8859-1


Gdraw.GMenu.Box.BorderType:         none
Gdraw.GMenu.Box.BorderBrightest:      #a9a5a2
Gdraw.GMenu.Box.BorderBrighter:         #a9a5a2
Gdraw.GMenu.Box.BorderDarker:         #a9a5a2
Gdraw.GMenu.Box.BorderDarkest:         #a9a5a2
Gdraw.GMenu.Box.BorderWidth:         1

Gdraw.GMenuBar.Box.BorderWidth:         0
Gdraw.GMenuBar.Box.BorderInner:         false
Gdraw.GMenuBar.Box.BorderOuter:         false
Gdraw.GMenuBar.Box.ActiveBorder:      #4d4b44
Gdraw.GMenuBar.Box.NormalBackground:      #c1c1c1
Gdraw.GMenuBar.Box.NormalForeground:      #e0dddc
Gdraw.GMenuBar.Box.Padding:         2

Gdraw.GNumericFieldSpinner.Box.BorderType:   raised
Gdraw.GNumericFieldSpinner.Box.BorderWidth:   1
Gdraw.GNumericFieldSpinner.Box.ActiveOuter:   false
Gdraw.GNumericFieldSpinner.Box.BorderOuter:   true
Gdraw.GNumericFieldSpinner.Box.GradientBG:   true
Gdraw.GNumericFieldSpinner.Box.GradientStartCol:#d3d0cd
Gdraw.GNumericFieldSpinner.Box.NormalBackground:#eeeeee
Gdraw.GNumericFieldSpinner.Box.ActiveBackground:#000000
Gdraw.GNumericFieldSpinner.Box.Padding:      1
Gdraw.GNumericFieldSpinner.Box.Radius:      2
Gdraw.GNumericFieldSpinner.ShiftOnPress:   true

Gdraw.GProgress.FillColor:         #f18458
Gdraw.GProgress.Font:            11pt helvetica

Gdraw.GRadioOn.Box.BorderShape:         rect
Gdraw.GRadioOn.Box.BorderType:         none
Gdraw.GRadioOn.Box.BorderWidth:         0
Gdraw.GRadioOn.Box.Padding:         0
Gdraw.GRadioOn.Box.DoDepressedBackground:   false
Gdraw.GRadioOn.Image:            GRadioOn.png
Gdraw.GRadioOn.DisabledImage:         GRadioOnDisabled.png
Gdraw.GRadioOff.Box.BorderShape:      rect
Gdraw.GRadioOff.Box.BorderType:         none
Gdraw.GRadioOff.Box.BorderWidth:      0
Gdraw.GRadioOff.Box.Padding:         0
Gdraw.GRadioOff.Box.DoDepressedBackground:   false
Gdraw.GRadioOff.Image:            GRadioOff.png
Gdraw.GRadioOff.DisabledImage:         GRadioOffDisabled.png

Gdraw.GScrollBar.Box.BorderInner:      false
Gdraw.GScrollBar.Box.BorderOuter:      false
Gdraw.GScrollBar.Box.NormalBackground:      #f7f6f6
Gdraw.GScrollBar.Box.DoDepressedBackground:   true
Gdraw.GScrollBar.Box.PressedBackground:      #d3d0cd
Gdraw.GScrollBar.Box.BorderShape:      rect
Gdraw.GScrollBar.Box.BorderWidth:      0
Gdraw.GScrollBar.Box.Padding:         0
Gdraw.GScrollBar.Box.Radius:         0
Gdraw.GScrollBar.Width:            11

Gdraw.GScrollBarThumb.Box.NormalForeground:   #676461
Gdraw.GScrollBarThumb.Box.NormalBackground:   #f2f1f0
Gdraw.GScrollBarThumb.Box.BorderDarker:      #eae8e7
Gdraw.GScrollBarThumb.Box.BorderDarkest:   #eae8e7
Gdraw.GScrollBarThumb.Box.BorderInner:      false
Gdraw.GScrollBarThumb.Box.BorderOuter:      true
Gdraw.GScrollBarThumb.Box.BorderShape:      roundrect
Gdraw.GScrollBarThumb.Box.BorderType:      raised
Gdraw.GScrollBarThumb.Box.BorderWidth:      3
Gdraw.GScrollBarThumb.Box.Padding:      0
Gdraw.GScrollBarThumb.Box.Radius:      0

Gdraw.GTabSet.Box.DoDepressedBackground:   true
Gdraw.GTabSet.Box.PressedBackground:      #e7e5e4
Gdraw.GTabSet.Box.BorderType:         raised
Gdraw.GTabSet.Box.BorderShape:         roundrect
Gdraw.GTabSet.Box.BorderOuter:         true
Gdraw.GTabSet.Box.BorderOuterCol:      #f2f1f0
Gdraw.GTabSet.Box.BorderInner:         true
Gdraw.GTabSet.Box.BorderInnerCol:      #f2f1f0
Gdraw.GTabSet.Box.BorderBrightest:      #a9a5a2
Gdraw.GTabSet.Box.BorderBrighter:      #a9a5a2
Gdraw.GTabSet.Box.BorderDarker:         #a9a5a2
Gdraw.GTabSet.Box.BorderDarkest:      #a9a5a2
Gdraw.GTabSet.Box.BorderWidth:         1
Gdraw.GTabSet.Box.Radius:         3
Gdraw.GTabSet.Box.Padding:         1

Gdraw.GTextField.Box.BorderOuter:      true
Gdraw.GTextField.Box.ActiveOuter:      true
Gdraw.GTextField.Box.ActiveInner:      false
Gdraw.GTextField.Box.NormalBackground:      #ffffff
Gdraw.GTextField.Box.BorderType:      lowered
Gdraw.GTextField.Box.BorderShape:      roundrect
Gdraw.GTextField.Box.BorderWidth:      1
Gdraw.GTextField.Box.Padding:         2
Gdraw.GTextField.Box.Radius:         2
Gdraw.GTextField.Font:            11pt helvetica

Gdraw.SFTextArea.Box.BorderShape:      roundrect
Gdraw.SFTextArea.Box.BorderType:      box
Gdraw.SFTextArea.Box.BorderWidth:      1
Gdraw.SFTextArea.Box.NormalBackground:      #ffffff
Gdraw.SFTextArea.Box.Padding:         0
Gdraw.SFTextArea.Box.Radius:         2

fontforge.BDFProperties.Font:         11pt helvetica
fontforge.CharView.HintLabelColor:      #007777
fontforge.CharView.InfoFamily:         11pt helvetica
fontforge.CharView.SelectedPointColor:      #ffff00
fontforge.CharView.Measure.Font:      8pt helvetica
fontforge.Combinations.Font:         11pt helvetica
fontforge.CVT.Font:            11pt helvetica
fontforge.DebugView.Font:         11pt helvetica
fontforge.FontInfo.Font:         italic 11pt helvetica
fontforge.FontView.ChangedColor:      #000000
fontforge.FontView.SelectedColor:      #f07746
fontforge.FontView.HintingNeededColor:      #f07746
fontforge.FontView.SelectedFgColor:      #ffffff
fontforge.View.Background:         #f7f6f6
fontforge.GlyphInfo.Font:         11pt helvetica
fontforge.Groups.Font:            11pt helvetica
fontforge.Histogram.Font:         11pt helvetica
fontforge.KernClass.Font:         11pt helvetica
fontforge.LayersPalette.Font:         11pt helvetica
fontforge.Math.Font:            11pt helvetica
fontforge.Math.BoldFont:         bold 11pt helvetica
fontforge.MetricsView.Font:         11pt helvetica
fontforge.OFLib.Font:            11pt helvetica
fontforge.SearchView.Font:         italic 11pt helvetica
fontforge.SearchView.BoldFont:         italic bold 11pt helvetica
fontforge.SFTextArea.Font:         italic 11pt helvetica
fontforge.ShowATT.Font:            11pt helvetica
fontforge.ShowATT.MonoFont:         11pt helvetica
fontforge.Splash.Font:            italic 11pt helvetica
fontforge.Splash.ItalicFont:         italic 11pt helvetica
fontforge.StateMachine.Font:         11pt helvetica
fontforge.TilePath.Font:         11pt helvetica
fontforge.TilePath.BoldFont:         bold 11pt helvetica
fontforge.ToolsPalette.Font:         8pt 11pt helvetica
fontforge.TTInstruction.Font:         11pt helvetica
fontforge.Validate.Font:         11pt helvetica
fontforge.Warnings.Font:         11pt helvetica

_________________
lemon tree very pretty and the flower very sweet ...
hamei wrote:
Dang, you're good, quacky ! Thank you. Made that change then zoomed right on to http.c
Code:
cc-1070 cc: ERROR File = http.c, Line = 150
The indicated type is incomplete.

struct timeval tv;
^

cc-1070 cc: ERROR File = http.c, Line = 180
The indicated type is incomplete.

struct timeval tv;
^

A little searching found that inserting
Code:
struct timeval {
int32_t tv_sec; /* seconds */
int32_t tv_usec; /* and microseconds */
};

fixed that problem and now the 2012 version of fontforge compiles !! woo-hoo, I be a cut-n-paste C programmer now ! Thank you again, Mr Duck.

Thanks to all for the assistance. If you have a compiler it's worth taking a shot at it, there are significant advances in the program. I'll try making a tardist later if no one more talented gets to it first ... but I have to quad-size the graphics for myself first.


You're welcome, my obsessive compulsion to fix things flared up again :-)

Might be a more proper solution to include sys/time.h ; anything that uses gettimeofday(2) really should do this, so I'm not sure what's going on. Perhaps there are some braindead ifdefs somewhere.

_________________
:Octane: halo , oct ane
N.B.: I tend to talk out of my ass. Do not take it too seriously.
duck wrote:
Might be a more proper solution to include sys/time.h ; anything that uses gettimeofday(2) really should do this, so I'm not sure what's going on. Perhaps there are some braindead ifdefs somewhere.

Indeed, there are some weird ifdefs in sys/time.h.

I know that I've encountered the same problem in the past when compiling something. (Looking through my notes, I can't find it at the moment though.) In all likelihood, sys/time.h is already being included...but the definition of struct timeval is surrounded by ifdefs. IIRC (from memory and a quick glance at that header file), the quick and easy way to fix the problem was to add -D_BSD_TYPES to CPPFLAGS.

I could be wrong about the specific fix, but I know you're right, duck, about sys/time.h and ifdefs!

_________________
:Indigo2IMP: :Octane: :Indigo: :O3x0:
Sun SPARCstation 20, Blade 2500
HP C8000
jpstewart wrote:
duck wrote:
Might be a more proper solution to include sys/time.h ; anything that uses gettimeofday(2) really should do this, so I'm not sure what's going on. Perhaps there are some braindead ifdefs somewhere.

Indeed, there are some weird ifdefs in sys/time.h.

I'm not qualified to be in this conversation but fools rush in ...

About the time.h thing, while looking for an answer I found where neko had the same problem once compiling openssl. Couldn't get to the answer from here but putting the structure into the c file seemed to work. Here's the time.h from /usr/include/
Code:
#ifndef __TIME_H__
#define __TIME_H__

#include <internal/time_core.h>

__SGI_LIBC_USING_FROM_STD(size_t)
__SGI_LIBC_USING_FROM_STD(clock_t)
__SGI_LIBC_USING_FROM_STD(time_t)
__SGI_LIBC_USING_FROM_STD(clock)
__SGI_LIBC_USING_FROM_STD(difftime)
__SGI_LIBC_USING_FROM_STD(mktime)
__SGI_LIBC_USING_FROM_STD(time)
__SGI_LIBC_USING_FROM_STD(asctime)
__SGI_LIBC_USING_FROM_STD(ctime)
__SGI_LIBC_USING_FROM_STD(gmtime)
__SGI_LIBC_USING_FROM_STD(localtime)
__SGI_LIBC_USING_FROM_STD(strftime)

#endif /* !__TIME_H__ */

which didn't really tell me anything :) I can try jp's suggestion and report back.

The program does have a few problems : one menu option crashes it immediately
Code:
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request:  1.0 (X_CreateWindow)
Serial number of failed request:  37475
Failed resource ID:  0

[1]    Abort                  fontforge

Luckily, that's not an important function, it is supposed to open an Xdefaults editor in a separate window ...

But a bigger problem is that the program runs fine from where it's compiled. However, if you move it to /usr/nekoware via gmake install, it freezes, crashes, locks up, and generally fails to run. Possible path problems ? Not sure yet but life is never simple, is it ?


edit : It seems to run pretty fast, is generally an improvement over the 2006 version we have in nekoware, and even looks semi-presentable with some xdefault changes. If anyone knowledgeable wants to pitch in here (hint hint) this would be a good upgrade to nekoware ...

update : Tried the addition of -D_BSD_TYPES to the CPPFLAGS with no success :( Adding the < structure > code still works though.

_________________
lemon tree very pretty and the flower very sweet ...
hamei wrote:
About the time.h thing, while looking for an answer I found where neko had the same problem once compiling openssl. Couldn't get to the answer from here but putting the structure into the c file seemed to work. Here's the time.h from /usr/include/

It's actually /usr/include/sys/time.h that duck mentioned...a completely different file. That's where you'll find the definition of struct timeval.

hamei wrote:
update : Tried the addition of -D_BSD_TYPES to the CPPFLAGS with no success :( Adding the < structure > code still works though.

Which is not surprising. It was a vague memory of a past problem I had, and since I can't find my notes from whichever of my projects had that problem I can't be sure that was the solution. If whatever you're compiling isn't doing an #include <sys/time.h> then it cannot possibly help anyway. And, as duck said earlier, there might be even more "braindead ifdefs" to sort out.

Directly adding the definition as you did does no harm.

_________________
:Indigo2IMP: :Octane: :Indigo: :O3x0:
Sun SPARCstation 20, Blade 2500
HP C8000
jpstewart wrote:
It's actually /usr/include/sys/time.h that duck mentioned...a completely different file. That's where you'll find the definition of struct timeval.

ho ho ho, merrry christmas !
http.c wrote:
#include <stdio.h>
#include <unistd.h>
#include <sys/select.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <errno.h>
#include <pthread.h>

A small change to
jp and duck wrote:
#include <sys/time.h>

and awaaaay we go !

gracias, muchachos.

Onward and upward.

_________________
lemon tree very pretty and the flower very sweet ...