I just updated, did a make distclean, and recompiled GRASS 6.3.
mkftcap is not working on my Mac Intel MacBook Pro (OS X 4.9)
When I compiled, there was an error in compiling mkftcap. I changed to the mkftcap directory and ran make and it compiled without apparent error. But when I try to run it, I get an error. I list all below. My freetypecap file is empty.
Michael
***************************ORIGINAL ERROR WITH MAKE
mkftcap
if [ ! -d /Users/cmbarton/grass_dev/grass6/dist.i686-apple-darwin8.9.1/scripts ]; then mkdir /Users/cmbarton/grass_dev/grass6/dist.i686-apple-darwin8.9.1/scripts; fi
/usr/bin/install -c mkftcap /Users/cmbarton/grass_dev/grass6/dist.i686-apple-darwin8.9.1/scripts/mkftcap
GISRC=/Users/cmbarton/grass_dev/grass6/dist.i686-apple-darwin8.9.1/demolocation/.grassrc63 GISBASE=/Users/cmbarton/grass_dev/grass6/dist.i686-apple-darwin8.9.1 PATH=“/Users/cmbarton/grass_dev/grass6/dist.i686-apple-darwin8.9.1/bin:$PATH” DYLD_LIBRARY_PATH=“/Users/cmbarton/grass_dev/grass6/dist.i686-apple-darwin8.9.1/bin:/Users/cmbarton/grass_dev/grass6/dist.i686-apple-darwin8.9.1/lib:” LC_ALL=C /Users/cmbarton/grass_dev/grass6/dist.i686-apple-darwin8.9.1/scripts/mkftcap --html-description | grep -v ‘|’ > mkftcap.tmp.html ; true
find: -printf: unknown expression primary
find: -printf: unknown expression primary
find: -printf: unknown expression primary
find: -printf: unknown expression primary
mkdir -p /Users/cmbarton/grass_dev/grass6/dist.i686-apple-darwin8.9.1/docs/html
mv -f mkftcap.tmp.html /Users/cmbarton/grass_dev/grass6/dist.i686-apple-darwin8.9.1/docs/html/mkftcap.html
for file in *.png .jpg ; do
head -n 1 $file | grep ‘^#!’ > /dev/null ;
if [ $? -ne 0 ] ; then
/usr/bin/install -c -m 644 $file /Users/cmbarton/grass_dev/grass6/dist.i686-apple-darwin8.9.1/docs/html ;
fi
done 2> /dev/null ; true
GISRC=/Users/cmbarton/grass_dev/grass6/dist.i686-apple-darwin8.9.1/demolocation/.grassrc63 GISBASE=/Users/cmbarton/grass_dev/grass6/dist.i686-apple-darwin8.9.1 PATH=/Users/cmbarton/grass_dev/grass6/dist.i686-apple-darwin8.9.1/bin:$PATH DYLD_LIBRARY_PATH=“/Users/cmbarton/grass_dev/grass6/dist.i686-apple-darwin8.9.1/lib:” g.parser -t mkftcap | sed s/"/\\"/g | sed 's/./_(“&”)/’ > …/…/locale/scriptstrings/mkftcap_to_translate.c ; true
/Users/cmbarton/grass_dev/grass6/dist.i686-apple-darwin8.9.1/scripts/mkftcap > /Users/cmbarton/grass_dev/grass6/dist.i686-apple-darwin8.9.1/etc/freetypecap
You must be in GRASS GIS to run this program
make[2]: *** [/Users/cmbarton/grass_dev/grass6/dist.i686-apple-darwin8.9.1/etc/freetypecap] Error 1
***************************RESULTS AFTER RUNING MAKE IN THE MKFTCAP DIRECTORY
cmb-MBP:~/grass_dev/grass6 cmbarton$ cd ./tools/mkftcap
cmb-MBP:~/grass_dev/grass6/tools/mkftcap cmbarton$ make
GISRC=/Users/cmbarton/grass_dev/grass6/dist.i686-apple-darwin8.9.1/demolocation/.grassrc63 GISBASE=/Users/cmbarton/grass_dev/grass6/dist.i686-apple-darwin8.9.1 PATH=“/Users/cmbarton/grass_dev/grass6/dist.i686-apple-darwin8.9.1/bin:$PATH” DYLD_LIBRARY_PATH=“/Users/cmbarton/grass_dev/grass6/dist.i686-apple-darwin8.9.1/bin:/Users/cmbarton/grass_dev/grass6/dist.i686-apple-darwin8.9.1/lib:” LC_ALL=C /Users/cmbarton/grass_dev/grass6/dist.i686-apple-darwin8.9.1/scripts/mkftcap --html-description | grep -v ‘|’ > mkftcap.tmp.html ; true
find: -printf: unknown expression primary
find: -printf: unknown expression primary
find: -printf: unknown expression primary
find: -printf: unknown expression primary
mkdir -p /Users/cmbarton/grass_dev/grass6/dist.i686-apple-darwin8.9.1/docs/html
mv -f mkftcap.tmp.html /Users/cmbarton/grass_dev/grass6/dist.i686-apple-darwin8.9.1/docs/html/mkftcap.html
for file in *.png .jpg ; do
head -n 1 $file | grep ‘^#!’ > /dev/null ;
if [ $? -ne 0 ] ; then
/usr/bin/install -c -m 644 $file /Users/cmbarton/grass_dev/grass6/dist.i686-apple-darwin8.9.1/docs/html ;
fi
done 2> /dev/null ; true
GISRC=/Users/cmbarton/grass_dev/grass6/dist.i686-apple-darwin8.9.1/demolocation/.grassrc63 GISBASE=/Users/cmbarton/grass_dev/grass6/dist.i686-apple-darwin8.9.1 PATH=/Users/cmbarton/grass_dev/grass6/dist.i686-apple-darwin8.9.1/bin:$PATH DYLD_LIBRARY_PATH=“/Users/cmbarton/grass_dev/grass6/dist.i686-apple-darwin8.9.1/lib:” g.parser -t mkftcap | sed s/"/\\"/g | sed 's/./_(“&”)/’ > …/…/locale/scriptstrings/mkftcap_to_translate.c ; true
***************************ERROR ON RUNING MKFTCAP
I just updated, did a make distclean, and recompiled GRASS 6.3.
mkftcap is not working on my Mac Intel MacBook Pro (OS X 4.9)
When I compiled, there was an error in compiling mkftcap. I changed to the
mkftcap directory and ran make and it compiled without apparent error. But
when I try to run it, I get an error. I list all below. My freetypecap file
is empty.
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University
> The command in question is:
>
> find "$dir" -type f -iname '*.ttf' -printf '%f:%p:utf-8:\n'
>
> Does OSX have a command called "find" which isn't the standard Unix
> "find" command?
>
find
usage: find [-H | -L | -P] [-EXdsx] [-f file] [file ...] [expression]
Is this different from the standard?
No, that's the right command; it appears -printf is a GNU extension.
That shouldn't be a problem in this case; using:
find "$dir" -type f -iname '*.ttf' -print | sed 's!^\(.*\)/\(.*\)$!\2:\1/\2:utf-8:!'
No, that's the right command; it appears -printf is a GNU extension.
That shouldn't be a problem in this case; using:
find "$dir" -type f -iname '*.ttf' -print | sed
's!^\(.*\)/\(.*\)$!\2:\1/\2:utf-8:!'
should do the same job.
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University
I'm having a different problem with mkftcap - it's getting hung up doing nothing. One on my processors maxes out and there is no disk activity for the find operations.
I tried cutting out each part separately - find and fc-list - to see if one of those was the problem, but no go.
Further cutting points to something wrong in the sed lines - if I remove those so the raw find and fc-list results are returned, it finishes.
On May 2, 2007, at 3:00 AM, Glynn Clements wrote:
Michael Barton wrote:
The command in question is:
find "$dir" -type f -iname '*.ttf' -printf '%f:%p:utf-8:\n'
Does OSX have a command called "find" which isn't the standard Unix
"find" command?
First Pogril: Why is life like sticking your head in a bucket filled with hyena offal?
Second Pogril: I don't know. Why IS life like sticking your head in a bucket filled with hyena offal?
First Pogril: I don't know either. Wretched, isn't it?
In fact, I was too hasty in my optimistic report. mkftcap works, but it
doesn't put the output into my $GISBASE/etc/freetypecap file. It just
outputs it to the terminal. I can manually deal with this
mkftcap>$GISBASE/etc/freetypecap
but something is not working right. Maybe need to recompile.
Michael
On 5/2/07 8:41 AM, "William Kyngesburye" <woklist@kyngchaos.com> wrote:
I'm having a different problem with mkftcap - it's getting hung up
doing nothing. One on my processors maxes out and there is no disk
activity for the find operations.
I tried cutting out each part separately - find and fc-list - to see
if one of those was the problem, but no go.
Further cutting points to something wrong in the sed lines - if I
remove those so the raw find and fc-list results are returned, it
finishes.
On May 2, 2007, at 3:00 AM, Glynn Clements wrote:
Michael Barton wrote:
The command in question is:
find "$dir" -type f -iname '*.ttf' -printf '%f:%p:utf-8:\n'
Does OSX have a command called "find" which isn't the standard Unix
"find" command?
First Pogril: Why is life like sticking your head in a bucket filled
with hyena offal?
Second Pogril: I don't know. Why IS life like sticking your head in
a bucket filled with hyena offal?
First Pogril: I don't know either. Wretched, isn't it?
-HitchHiker's Guide to the Galaxy
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University
On May 2, 2007, at 10:41 AM, William Kyngesburye wrote:
I'm having a different problem with mkftcap - it's getting hung up doing nothing. One on my processors maxes out and there is no disk activity for the find operations.
I tried cutting out each part separately - find and fc-list - to see if one of those was the problem, but no go.
Further cutting points to something wrong in the sed lines - if I remove those so the raw find and fc-list results are returned, it finishes.
I found the source of my problem - in my .bash_profile, I set:
but I don't need to change that for mkftcap to work.
I set these (maybe naively?) so my Terminals match the default OSX charset of utf8. The window display settings for Terminal.app default to utf8 (and I didn't need to change that either).
"Mon Dieu! but they are all alike. Cheating, murdering, lying, fighting, and all for things that the beasts of the jungle would not deign to possess - money to purchase the effeminate pleasures of weaklings. And yet withal bound down by silly customs that make them slaves to their unhappy lot while firm in the belief that they be the lords of creation enjoying the only real pleasures of existence....
On May 2, 2007, at 2:11 PM, William Kyngesburye wrote:
On May 2, 2007, at 10:41 AM, William Kyngesburye wrote:
I'm having a different problem with mkftcap - it's getting hung up doing nothing. One on my processors maxes out and there is no disk activity for the find operations.
I tried cutting out each part separately - find and fc-list - to see if one of those was the problem, but no go.
Further cutting points to something wrong in the sed lines - if I remove those so the raw find and fc-list results are returned, it finishes.
I found the source of my problem - in my .bash_profile, I set:
but I don't need to change that for mkftcap to work.
I set these (maybe naively?) so my Terminals match the default OSX charset of utf8. The window display settings for Terminal.app default to utf8 (and I didn't need to change that either).
After trying various combinations of these settings, it appears I don't need these any more. They are probably leftovers in my .bash_profile from the early OSX days when Terminal didn't handle UTF8 directly very well. It looks like the window setting takes care of this now.
In fact, I was too hasty in my optimistic report. mkftcap works, but it
doesn't put the output into my $GISBASE/etc/freetypecap file. It just
outputs it to the terminal. I can manually deal with this
mkftcap>$GISBASE/etc/freetypecap
but something is not working right. Maybe need to recompile.
It is meant to write to stdout; it originally wrote directly to the
freetypecap file, but was changed to improve flexibility.
On 5/2/07 4:59 PM, "Glynn Clements" <glynn@gclements.plus.com> wrote:
Michael Barton wrote:
In fact, I was too hasty in my optimistic report. mkftcap works, but it
doesn't put the output into my $GISBASE/etc/freetypecap file. It just
outputs it to the terminal. I can manually deal with this
mkftcap>$GISBASE/etc/freetypecap
but something is not working right. Maybe need to recompile.
It is meant to write to stdout; it originally wrote directly to the
freetypecap file, but was changed to improve flexibility.
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University
Now that mkftcap is not hanging for me, next problem. For some reason the resource fonts are getting filtered out.
The first part, listing ttf, seems to be working. The fc-list part should work - alone, the fc-list :outline file index command shows all the fonts. But after the sed, they're gone. Could it be because they don't have a file extension?
Arial Narrow, Arial Rounded Bold, Times New Roman and Andale Mono
disappear after the sed.
replace spaces in font names with underscores?
Not a good idea - if you mean renaming the font files. These are standard fonts supplied with OSX. Renaming them can create possible OS update problems.
If I take enough time to let my brain process the sed command, it looks like it's something in:
\(.*\)\.\([^.]*\):
that is, the file extension is not optional. Spaces are OK in that.
[Trillian] What are you supposed to do WITH a maniacally depressed robot?
[Marvin] You think you have problems? What are you supposed to do if you ARE a maniacally depressed robot? No, don't try and answer, I'm 50,000 times more intelligent than you and even I don't know the answer...
> If I take enough time to let my brain process the sed command, it
> looks like it's something in:
>
> \(.*\)\.\([^.]*\):
>
> that is, the file extension is not optional. Spaces are OK in that.
Try \(.*\)(\.\([^.]*\))?: instead.
A ? in a sed regexp is a GNU extension.
I've updated mkftcap to handle files without an extension separately:
That works. (still a minor problem with Arial, but not the other Arial varieties, it's probably a corrupt font file or other non-fontconfig/grass issue)
One note - did you catch my other comment a while back? the index from fc-list is useless, since fc-list appears to only list font files, thus only showing index 0 for any font file. We'll have to find another way to figure out available faces within a font file.
On May 2, 2007, at 11:28 PM, Glynn Clements wrote:
Daniel Calvelo wrote:
If I take enough time to let my brain process the sed command, it
looks like it's something in:
\(.*\)\.\([^.]*\):
that is, the file extension is not optional. Spaces are OK in that.
Try \(.*\)(\.\([^.]*\))?: instead.
A ? in a sed regexp is a GNU extension.
I've updated mkftcap to handle files without an extension separately:
First Pogril: Why is life like sticking your head in a bucket filled with hyena offal?
Second Pogril: I don't know. Why IS life like sticking your head in a bucket filled with hyena offal?
First Pogril: I don't know either. Wretched, isn't it?