Opened 10 years ago
Closed 9 years ago
#2448 closed defect (fixed)
Fontconfig error with cairo on Windows
Reported by: | annakrat | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.0.4 |
Component: | Display | Version: | 7.0.0 |
Keywords: | font, text, legend, scale bar | Cc: | |
CPU: | Unspecified | Platform: | MSWindows 8 |
Description
With selected cairo driver, d.* commands don't render any labels and you get an error:
Fontconfig error: Cannot load default config file
GRASS installation seems to be fine. This error appears only on some Windows 7/8 computers. After switching to png driver, text labels are visible again. I hoped that the recent fix in installer (r62107) could help this and indeed, one user stopped having this problem, but on a different computer with fresh version, the problem persists.
Change History (74)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
Replying to annakrat:
With selected cairo driver, d.* commands don't render any labels and you get an error:
Fontconfig error: Cannot load default config file
tested with
System Info GRASS Version: 7.1.svn GRASS SVN Revision: 62255 Erstellungsdatum: 2014-10-15 Build Platform: i686-pc-mingw32 GDAL/OGR: 1.11.0 PROJ.4: 4.8.0 GEOS: 3.4.2 SQLite: 3.7.17 Python: 2.7.4 wxPython: 2.8.12.1 Platform: Windows-7-6.1.7601-SP1 (OSGeo4W)
I can not confirm the error Fontconfig error: Cannot load default config file, but the labels aren't displayed with cairo; it is with the png display driver.
comment:3 by , 10 years ago
Replying to annakrat:
With selected cairo driver, d.* commands don't render any labels and you get an error:
Fontconfig error: Cannot load default config file
some further tests:
- cairo enabled: vector labels are displayed only when d.vect map=myvect and font=myfont (a font name) is given in the command
- png enabled: vector labels are displayed by the command d.vect map=myvect , no font option is needed
follow-ups: 5 6 comment:4 by , 10 years ago
Does anyone know where this config file should be located and where does it come from?
comment:5 by , 10 years ago
Replying to annakrat:
Does anyone know where this config file should be located and where does it come from?
he related data lives in C:\OSGeo4W\apps\grass\grass-7.1.svn\etc\fontcap and AFAIK it is generated during compilation by g.mkfontcap [1].
for the wingrass standalone installer years ago I've implemented a new g.mkfontcap run during installation as the fonts list differs between the compilation computer (Martin's compiling server) and your computer.
[1] http://grass.osgeo.org/grass71/manuals/g.mkfontcap.html
[2] http://trac.osgeo.org/grass/browser/grass/trunk/mswindows/GRASS-Installer.nsi.tmpl#L538
comment:6 by , 10 years ago
Replying to annakrat:
Does anyone know where this config file should be located and where does it come from?
in the d.font-manual:
font=name Name of a font type, from among the font types italicized below. Default: romans Options: (italized) cyrilc Cyrillic gothgbt Gothic Great Britain triplex gothgrt Gothic German triplex gothitt Gothic Italian triplex greekc Greek complex greekcs Greek complex script greekp Greek plain greeks Greek simplex italicc Italian complex italiccs Italian complex small italict Italian triplex romanc Roman complex romancs Roman complex small romand Roman duplex romanp Roman plain romans Roman simplex romant Roman triplex scriptc Script complex scripts Script simplex
these are the fonts bundled with GRASS GIS livin in C:\OSGeo4W\apps\grass\grass-7.1.svn\fonts
with Default: romans
a quick look in the fontcap file C:\OSGeo4W\apps\grass\grass-7.1.svn\etc\fontcap of OSGeo4W-winGRASS
cyrilc|Cyrillic|0|C:\OSGeo4W\src\grass7_trunk\dist.i686-pc-mingw32\fonts\cyrilc.hmp|0|utf-8| gothgbt|Gothic Great Britain triplex|0|C:\OSGeo4W\src\grass7_trunk\dist.i686-pc-mingw32\fonts\gothgbt.hmp|0|utf-8| gothgrt|Gothic German triplex|0|C:\OSGeo4W\src\grass7_trunk\dist.i686-pc-mingw32\fonts\gothgrt.hmp|0|utf-8| gothitt|Gothic Italian triplex|0|C:\OSGeo4W\src\grass7_trunk\dist.i686-pc-mingw32\fonts\gothitt.hmp|0|utf-8| greekc|Greek complex|0|C:\OSGeo4W\src\grass7_trunk\dist.i686-pc-mingw32\fonts\greekc.hmp|0|utf-8| greekcs|Greek complex script|0|C:\OSGeo4W\src\grass7_trunk\dist.i686-pc-mingw32\fonts\greekcs.hmp|0|utf-8| greekp|Greek plain|0|C:\OSGeo4W\src\grass7_trunk\dist.i686-pc-mingw32\fonts\greekp.hmp|0|utf-8| greeks|Greek simplex|0|C:\OSGeo4W\src\grass7_trunk\dist.i686-pc-mingw32\fonts\greeks.hmp|0|utf-8| italicc|Italian complex|0|C:\OSGeo4W\src\grass7_trunk\dist.i686-pc-mingw32\fonts\italicc.hmp|0|utf-8| italiccs|Italian complex small|0|C:\OSGeo4W\src\grass7_trunk\dist.i686-pc-mingw32\fonts\italiccs.hmp|0|utf-8| italict|Italian triplex|0|C:\OSGeo4W\src\grass7_trunk\dist.i686-pc-mingw32\fonts\italict.hmp|0|utf-8| romanc|Roman complex|0|C:\OSGeo4W\src\grass7_trunk\dist.i686-pc-mingw32\fonts\romanc.hmp|0|utf-8| romancs|Roman complex small|0|C:\OSGeo4W\src\grass7_trunk\dist.i686-pc-mingw32\fonts\romancs.hmp|0|utf-8| romand|Roman duplex|0|C:\OSGeo4W\src\grass7_trunk\dist.i686-pc-mingw32\fonts\romand.hmp|0|utf-8| romans|Roman simplex|0|C:\OSGeo4W\src\grass7_trunk\dist.i686-pc-mingw32\fonts\romans.hmp|0|utf-8| romant|Roman triplex|0|C:\OSGeo4W\src\grass7_trunk\dist.i686-pc-mingw32\fonts\romant.hmp|0|utf-8| scriptc|Script complex|0|C:\OSGeo4W\src\grass7_trunk\dist.i686-pc-mingw32\fonts\scriptc.hmp|0|utf-8| scripts|Script simplex|0|C:\OSGeo4W\src\grass7_trunk\dist.i686-pc-mingw32\fonts\scripts.hmp|0|utf-8|
and in a standalone winGRASS
C:\Program Files\GRASS GIS 7.1.svn\etc\fontcap
cyrilc|Cyrillic|0|C:\Program Files\GRASS GIS 7.1.svn\fonts\cyrilc.hmp|0|utf-8| gothgbt|Gothic Great Britain triplex|0|C:\Program Files\GRASS GIS 7.1.svn\fonts\gothgbt.hmp|0|utf-8| gothgrt|Gothic German triplex|0|C:\Program Files\GRASS GIS 7.1.svn\fonts\gothgrt.hmp|0|utf-8| gothitt|Gothic Italian triplex|0|C:\Program Files\GRASS GIS 7.1.svn\fonts\gothitt.hmp|0|utf-8| greekc|Greek complex|0|C:\Program Files\GRASS GIS 7.1.svn\fonts\greekc.hmp|0|utf-8| greekcs|Greek complex script|0|C:\Program Files\GRASS GIS 7.1.svn\fonts\greekcs.hmp|0|utf-8| greekp|Greek plain|0|C:\Program Files\GRASS GIS 7.1.svn\fonts\greekp.hmp|0|utf-8| greeks|Greek simplex|0|C:\Program Files\GRASS GIS 7.1.svn\fonts\greeks.hmp|0|utf-8| italicc|Italian complex|0|C:\Program Files\GRASS GIS 7.1.svn\fonts\italicc.hmp|0|utf-8| italiccs|Italian complex small|0|C:\Program Files\GRASS GIS 7.1.svn\fonts\italiccs.hmp|0|utf-8| italict|Italian triplex|0|C:\Program Files\GRASS GIS 7.1.svn\fonts\italict.hmp|0|utf-8| romanc|Roman complex|0|C:\Program Files\GRASS GIS 7.1.svn\fonts\romanc.hmp|0|utf-8| romancs|Roman complex small|0|C:\Program Files\GRASS GIS 7.1.svn\fonts\romancs.hmp|0|utf-8| romand|Roman duplex|0|C:\Program Files\GRASS GIS 7.1.svn\fonts\romand.hmp|0|utf-8| romans|Roman simplex|0|C:\Program Files\GRASS GIS 7.1.svn\fonts\romans.hmp|0|utf-8| romant|Roman triplex|0|C:\Program Files\GRASS GIS 7.1.svn\fonts\romant.hmp|0|utf-8| scriptc|Script complex|0|C:\Program Files\GRASS GIS 7.1.svn\fonts\scriptc.hmp|0|utf-8| scripts|Script simplex|0|C:\Program Files\GRASS GIS 7.1.svn\fonts\scripts.hmp|0|utf-8|
so it seems in OSGeo4W-winGRASS there is a compilation computer leftover in the path.
is your error in OSGeo4W-winGRASS or in standalone winGRASS?
tested here with both:
- standalone winGRASS: vector labelling with cairo driver works as the path to the bundled fonts is correct
- OSGeo4W-winGRASS: vector labelling with cairo driver fails as the path to the bundled fonts is incorrect
follow-up: 8 comment:7 by , 10 years ago
The problem appears with standalone installer too. Fontcap file has the osgeo4w absolute path. The problem is that during installation, run_gmkfontcap fails and the error message (when I run it afterwards separately) is:
ERROR: Cannot open C:\Program Files (x86)\GRASS GIS svn/etc/fontcap for writing: Permission denied
Running run_gmkfontcap as administrator doesn't help.
comment:8 by , 10 years ago
Replying to annakrat:
The problem appears with standalone installer too. Fontcap file has the osgeo4w absolute path. The problem is that during installation, run_gmkfontcap fails and the error message (when I run it afterwards separately) is:
ERROR: Cannot open C:\Program Files (x86)\GRASS GIS svn/etc/fontcap for writing: Permission deniedRunning run_gmkfontcap as administrator doesn't help.
mmhh, it seems there is some change in file access permission control in win8 in comparison to win7 (already poped up in other places).
no win8 available here on my side.
is it possible to open the windows task manager during winGRASS installation to see if invoking the bat file as a child process of the installer fails or the access to the existing fontcap file fails?
follow-up: 10 comment:9 by , 10 years ago
Keywords: | text legend scale bar added |
---|---|
Milestone: | 7.0.0 → 7.0.1 |
Seems that this happens even on systems where it was working previously. Now tested on MS Windows 8 with GRASS GIS 7.0.0 (standalone).
Adding workaround to GRASS User Wiki:
If you add legend or scale bar to the Map Display and you see only the colors or the bar but not text, in the menu go to Settings > Preferences, then select Map Display tab. Use Set font button to set Default font for GRASS displays. From the list choose arial
or another font you wish to use.
BTW, there is no 7.0.0
Version in Trac. And also, is there some possibility to remove some 6.4.x
Versions, e.g. turn all *RCs
into releasebranch64
?.
follow-up: 11 comment:10 by , 10 years ago
Replying to wenzeslaus:
BTW, there is no
7.0.0
Version in Trac. And also, is there some possibility to remove some6.4.x
Versions, e.g. turn all *RCs
intoreleasebranch64
?.
done. Martin
comment:11 by , 10 years ago
Version: | svn-trunk → 7.0.0 |
---|
Replying to martinl:
Replying to wenzeslaus:
BTW, there is no
7.0.0
Version in Trac. And also, is there some possibility to remove some6.4.x
Versions, e.g. turn all *RCs
intoreleasebranch64
?.done. Martin
Thanks, Martin.
Changing Version of this from trunk to 7.0.0. However, note that it was true for release branch also before 7.0.0, e.g. 7.0.0beta4. It probably depends on update of MS Windows.
follow-up: 13 comment:12 by , 10 years ago
I made a screencast to see what's in the terminal which just flashes during the installation. I get:
Setup of WinGRASS-7.0.0 Generating the font configuration file by scanning various directories for fonts Please wait. Console window will close automatically .... ERROR: GISRC - variable not set
This is the same what happens if you run run_gmkfontcap from windows command prompt.
follow-up: 14 comment:13 by , 10 years ago
Replying to annakrat:
I made a screencast to see what's in the terminal which just flashes during the installation. I get:
Setup of WinGRASS-7.0.0 Generating the font configuration file by scanning various directories for fonts Please wait. Console window will close automatically .... ERROR: GISRC - variable not setThis is the same what happens if you run run_gmkfontcap from windows command prompt.
is this a fresh system without any previous winGRASS-installation before?
I've added gmkfontcap.bat (Run g.mkfontcap outside a grass session during installation) years ago.
relevant lines of codes g.mkfontcap and following.
534 IfErrors done_create_run_gmkfontcap.bat 535 FileWrite $0 '@echo off$\r$\n' 536 FileWrite $0 'rem #########################################################################$\r$\n' 537 FileWrite $0 'rem #$\r$\n' 538 FileWrite $0 'rem # Run g.mkfontcap outside a grass session during installation$\r$\n' 539 FileWrite $0 'rem #$\r$\n' 540 FileWrite $0 'rem #########################################################################$\r$\n' 541 FileWrite $0 'echo Setup of WinGRASS-${VERSION_NUMBER}$\r$\n' 542 FileWrite $0 'echo Generating the font configuration file by scanning various directories for fonts.$\r$\n' 543 FileWrite $0 'echo Please wait. Console window will close automatically ....$\r$\n' 544 FileWrite $0 '$\r$\n' 545 FileWrite $0 'rem set gisbase$\r$\n' 546 FileWrite $0 'set GISBASE=$INSTALL_DIR$\r$\n' 547 FileWrite $0 '$\r$\n' 548 FileWrite $0 'rem set path to freetype dll$\r$\n' 549 FileWrite $0 'set FREETYPEBASE=$INSTALL_DIR\extrabin;$INSTALL_DIR\msys\bin;$INSTALL_DIR\lib$\r$\n' 550 FileWrite $0 '$\r$\n' 551 FileWrite $0 'rem set dependecies path$\r$\n' 552 FileWrite $0 'set PATH=%FREETYPEBASE%;%PATH%$\r$\n' 553 FileWrite $0 '$\r$\n' 554 FileWrite $0 'rem run g.mkfontcap outside a grass session$\r$\n' 555 FileWrite $0 '"%GISBASE%\bin\g.mkfontcap.exe" -o$\r$\n' 556 FileWrite $0 'exit$\r$\n' 557 FileClose $0
any idea which variable isn't set?
follow-ups: 15 16 comment:14 by , 10 years ago
Replying to hellik:
Replying to annakrat:
I made a screencast to see what's in the terminal which just flashes during the installation. I get:
... ERROR: GISRC - variable not set
This is the same what happens if you run run_gmkfontcap from windows command prompt.
relevant lines of codes g.mkfontcap and following.
... 546 FileWrite $0 'set GISBASE=$INSTALL_DIR$\r$\n' 547 FileWrite $0 '$\r$\n' 548 FileWrite $0 'rem set path to freetype dll$\r$\n' 549 FileWrite $0 'set FREETYPEBASE=$INSTALL_DIR\extrabin;$INSTALL_DIR\msys\bin;$INSTALL_DIR\lib$\r$\n' 550 FileWrite $0 '$\r$\n' 551 FileWrite $0 'rem set dependecies path$\r$\n' 552 FileWrite $0 'set PATH=%FREETYPEBASE%;%PATH%$\r$\n' ...
any idea which variable isn't set?
It is the GISRC variable which is not set.
The issue is that you have to set it and probably also create a valid file. It rcfile and GISRC
variable handling seems nontrivial and I don't understand what is the actual goal here but perhaps you will be more successful.
We could perhaps avoid this problem altogether if we would just tell GRASS GIS what to run (#2579), although this might have its own problems during installation.
One other thing is that it is not clear to me what changed that now GISRC variable is required but it was not before.
comment:15 by , 10 years ago
Replying to wenzeslaus:
One other thing is that it is not clear to me what changed that now GISRC variable is required but it was not before.
the same here ...
It is the GISRC variable which is not set.
within a OSGeo4W-winGRASS7.1-session:
C:\>echo %GISRC% C:\Users\xxxx\AppData\Local\Temp\grass7-xxxx-6188\gisrc
the content of gisrc:
DEBUG: 0 MAPSET: srtmbgld GISDBASE: C:\grassdata LOCATION_NAME: srtm GUI: wxpython
follow-ups: 17 20 comment:16 by , 10 years ago
Replying to wenzeslaus:
Replying to hellik:
Replying to annakrat:
I made a screencast to see what's in the terminal which just flashes during the installation. I get:
... ERROR: GISRC - variable not setThis is the same what happens if you run run_gmkfontcap from windows command prompt.
relevant lines of codes g.mkfontcap and following.
... 546 FileWrite $0 'set GISBASE=$INSTALL_DIR$\r$\n' 547 FileWrite $0 '$\r$\n' 548 FileWrite $0 'rem set path to freetype dll$\r$\n' 549 FileWrite $0 'set FREETYPEBASE=$INSTALL_DIR\extrabin;$INSTALL_DIR\msys\bin;$INSTALL_DIR\lib$\r$\n' 550 FileWrite $0 '$\r$\n' 551 FileWrite $0 'rem set dependecies path$\r$\n' 552 FileWrite $0 'set PATH=%FREETYPEBASE%;%PATH%$\r$\n' ...any idea which variable isn't set?
It is the GISRC variable which is not set. [...] We could perhaps avoid this problem altogether if we would just tell GRASS GIS what to run (#2579),
After r65252 and r65294 (see #2579) you can use (in trunk, upcoming 7.1 release):
C:\path\to\grass C:\path\to\demomapset --exec g.mkfontcap
This should run g.mkfontcap
in a regular GRASS session but without touching user's GRASS rc file in home directory (if it does, it's a bug), so the last used Mapset will be still whatever user or installer sets.
although this might have its own problems during installation.
GRASS is installed, right? So this should work in theory.
One other thing is that it is not clear to me what changed that now GISRC variable is required but it was not before.
Let's say that we don't need to deal with this because it is expected that GRASS module requires GISRC
to be set. I'm just not sure why it is expected by g.mkfontcap
(probably it calls some GRASS library functions).
follow-up: 18 comment:17 by , 10 years ago
Replying to wenzeslaus:
Replying to wenzeslaus:
Replying to hellik:
Replying to annakrat:
I made a screencast to see what's in the terminal which just flashes during the installation. I get:
... ERROR: GISRC - variable not setThis is the same what happens if you run run_gmkfontcap from windows command prompt.
relevant lines of codes g.mkfontcap and following.
... 546 FileWrite $0 'set GISBASE=$INSTALL_DIR$\r$\n' 547 FileWrite $0 '$\r$\n' 548 FileWrite $0 'rem set path to freetype dll$\r$\n' 549 FileWrite $0 'set FREETYPEBASE=$INSTALL_DIR\extrabin;$INSTALL_DIR\msys\bin;$INSTALL_DIR\lib$\r$\n' 550 FileWrite $0 '$\r$\n' 551 FileWrite $0 'rem set dependecies path$\r$\n' 552 FileWrite $0 'set PATH=%FREETYPEBASE%;%PATH%$\r$\n' ...any idea which variable isn't set?
It is the GISRC variable which is not set. [...] We could perhaps avoid this problem altogether if we would just tell GRASS GIS what to run (#2579),
After r65252 and r65294 (see #2579) you can use (in trunk, upcoming 7.1 release):
C:\path\to\grass C:\path\to\demomapset --exec g.mkfontcapThis should run
g.mkfontcap
in a regular GRASS session but without touching user's GRASS rc file in home directory (if it does, it's a bug), so the last used Mapset will be still whatever user or installer sets.although this might have its own problems during installation.
GRASS is installed, right? So this should work in theory.
One other thing is that it is not clear to me what changed that now GISRC variable is required but it was not before.
Let's say that we don't need to deal with this because it is expected that GRASS module requires
GISRC
to be set. I'm just not sure why it is expected byg.mkfontcap
(probably it calls some GRASS library functions).
the discussion about a g.mkfontcap outside a winGRASS session dates back to 2010.
I've found following in this long discussion:
http://lists.osgeo.org/pipermail/grass-dev/2010-March/049491.html
On Sat, 6 Mar 2010, Helmut Kudrnovsky wrote: > from the grass-windows-point-of-view: > > I've tested in the last days a lot the issues in > http://trac.osgeo.org/grass/ticket/908 > > r40857 (see http://trac.osgeo.org/grass/ticket/908#comment:9) should be > backported to grass64. g.mkfontcap with this fixes is working outside a > grass-session. Just to note, the Linux install script (binaryInstall.src) runs g.mkfontcap outside of a GRASS session by simply setting GISRC to a junk value: GISBASE="$DESTDIR" GISRC=junk LD_LIBRARY_PATH_VAR="${DESTDIR}/lib:$LD_LIBRARY_PATH_VAR" "${DESTDIR}/bin/g.mkfontcap" -o (In Windows the equivalent would be to run the command set GISRC=junk before running g.mkfontcap) Not 100% sure if that's relevant here, but thought it might be worth mentioning to give some context. Paul
should we try this solution in winGRASS7.x-series?
Helmut
follow-up: 19 comment:18 by , 10 years ago
Replying to hellik:
GISBASE="$DESTDIR" GISRC=junk LD_LIBRARY_PATH_VAR="${DESTDIR}/lib:$LD_LIBRARY_PATH_VAR" "${DESTDIR}/bin/g.mkfontcap" -o
it's here:
https://trac.osgeo.org/grass/browser/grass/trunk/binaryInstall.src#L343
341 echo "Generating display font configuration file..." 342 343 GISBASE="$DESTDIR" GISRC=junk LD_LIBRARY_PATH_VAR="${DESTDIR}/lib:$LD_LIBRARY_PATH_VAR" "${DESTDIR}/bin/g.mkfontcap" -o 344 345 echo""
comment:19 by , 10 years ago
Replying to hellik:
Replying to hellik:
GISBASE="$DESTDIR" GISRC=junk LD_LIBRARY_PATH_VAR="${DESTDIR}/lib:$LD_LIBRARY_PATH_VAR" "${DESTDIR}/bin/g.mkfontcap" -o
it's here:
https://trac.osgeo.org/grass/browser/grass/trunk/binaryInstall.src#L343
341 echo "Generating display font configuration file..." 342 343 GISBASE="$DESTDIR" GISRC=junk LD_LIBRARY_PATH_VAR="${DESTDIR}/lib:$LD_LIBRARY_PATH_VAR" "${DESTDIR}/bin/g.mkfontcap" -o 344 345 echo""
see also here https://trac.osgeo.org/grass/ticket/908
follow-up: 21 comment:20 by , 10 years ago
Replying to wenzeslaus:
Let's say that we don't need to deal with this because it is expected that GRASS module requires
GISRC
to be set. I'm just not sure why it is expected byg.mkfontcap
(probably it calls some GRASS library functions).
see Changeset r40856 Inhibit reading of $GISRC for g.dirseps and g.mkfontcap
comment:21 by , 10 years ago
ERROR: GISRC - variable not set
comes from undocumented open_env() function. I think that
G_set_gisrc_mode(G_GISRC_MODE_MEMORY); G_no_gisinit();
in g.mkfontcap
are trying to account for that but G_GISRC_MODE_MEMORY
is not checked in open_env()
but only in read_env()
which is called later on. Well, what is called when is actually hard to say because open_env()
calls read_env()
as well as the other way around. I don't have an idea what G_GISRC_MODE_MEMORY
means and if it is OK to not set GISRC
environmental variable in this case.
There is no documentation for it and from the code I don't have any clue what was the author's intention there. I don't have time to debug line by line in order to figure out what is happening there. If somebody knows what the code is about and what is the expected behavior, please write some documentation. Documentation will help now and certainly safe time in the long run.
follow-up: 23 comment:22 by , 10 years ago
I added the dummy GISRC in r65440 to installer. I tested it by changing the already generated bat file and that seemed to work.
follow-up: 24 comment:23 by , 9 years ago
Replying to annakrat:
I added the dummy GISRC in r65440 to installer. I tested it by changing the already generated bat file and that seemed to work.
tested locally here in a simple windows command line (outside any winGRASS session, not in a OSGeo4W-command line):
C:\Users\xxxx>set GISBASE=C:\OSGeo4W_use\apps\grass\grass-7.0.0 C:\Users\xxxx>set FREETYPEBASE=C:\OSGeo4W_use\bin;C:\OSGeo4W_use\apps\msys\bin;C:\OSGeo4W_use\apps\grass\grass-7.0.0\lib C:\Users\xxxx>set PATH=%FREETYPEBASE%;%PATH% C:\Users\xxxx>set GISRC=dummy C:\Users\xxxx>"%GISBASE%\bin\g.mkfontcap.exe" -o
+1 for backporting it works
comment:24 by , 9 years ago
Replying to hellik:
Replying to annakrat:
I added the dummy GISRC in r65440 to installer. I tested it by changing the already generated bat file and that seemed to work.
tested locally here in a simple windows command line (outside any winGRASS session, not in a OSGeo4W-command line):
C:\Users\xxxx>set GISBASE=C:\OSGeo4W_use\apps\grass\grass-7.0.0 C:\Users\xxxx>set FREETYPEBASE=C:\OSGeo4W_use\bin;C:\OSGeo4W_use\apps\msys\bin;C:\OSGeo4W_use\apps\grass\grass-7.0.0\lib C:\Users\xxxx>set PATH=%FREETYPEBASE%;%PATH% C:\Users\xxxx>set GISRC=dummy C:\Users\xxxx>"%GISBASE%\bin\g.mkfontcap.exe" -o+1 for backporting it works
Done in r65452. Thanks. I will close it for now, we can reopen if needed.
follow-up: 27 comment:26 by , 9 years ago
Unfortunately, I got multiple reports about this problem in 7.0.1, so it's not fixed yet. I will try to investigate further.
follow-up: 28 comment:27 by , 9 years ago
Replying to annakrat:
Unfortunately, I got multiple reports about this problem in 7.0.1, so it's not fixed yet. I will try to investigate further.
Unfortunately I can't reproduce it. Could it be a antivirus issue which blocks g.mkfontconfig running during installation?
comment:28 by , 9 years ago
Replying to hellik:
Replying to annakrat:
Unfortunately, I got multiple reports about this problem in 7.0.1, so it's not fixed yet. I will try to investigate further.
Unfortunately I can't reproduce it. Could it be a antivirus issue which blocks g.mkfontconfig running during installation?
tested here on several different win boxes.
follow-ups: 30 31 32 comment:29 by , 9 years ago
I can replicate the problem on windows 10 in virtual box. The run_gmkfontcap.bat seems to run during the installation and there are no erros in the terminal (I recorded a video to make sure I haven't missed anything). When I manually run the bat file with admin rights, I can see legend with text again.
comment:30 by , 9 years ago
Replying to annakrat:
I can replicate the problem on windows 10 in virtual box. The run_gmkfontcap.bat seems to run during the installation and there are no erros in the terminal (I recorded a video to make sure I haven't missed anything). When I manually run the bat file with admin rights, I can see legend with text again.
any chance to check with which MS windows version (7,8,10...?) this behaviour started? maybe an issue with admin rights which should be reported to nsis?
follow-up: 33 comment:31 by , 9 years ago
Replying to annakrat:
I can replicate the problem on windows 10 in virtual box. The run_gmkfontcap.bat seems to run during the installation and there are no erros in the terminal (I recorded a video to make sure I haven't missed anything). When I manually run the bat file with admin rights, I can see legend with text again.
tested here now with
WinGRASS-7.0.2svn-r66066-127-Setup.exe
C:\Program Files\GRASS GIS 7.0.2svn\etc\fontcap with following entries:
cyrilc|Cyrillic|0|C:\Program Files\GRASS GIS 7.0.2svn\fonts\cyrilc.hmp|0|utf-8| gothgbt|Gothic Great Britain triplex|0|C:\Program Files\GRASS GIS 7.0.2svn\fonts\gothgbt.hmp|0|utf-8| gothgrt|Gothic German triplex|0|C:\Program Files\GRASS GIS 7.0.2svn\fonts\gothgrt.hmp|0|utf-8| [...] verdana|Verdana Regular|1|C:\Windows\Fonts\verdana.ttf|0|utf-8| verdanab|Verdana Bold|1|C:\Windows\Fonts\verdanab.ttf|0|utf-8| verdanai|Verdana Italic|1|C:\Windows\Fonts\verdanai.ttf|0|utf-8| verdanaz|Verdana Bold Italic|1|C:\Windows\Fonts\verdanaz.ttf|0|utf-8| Vivaldii|Vivaldi Italic|1|C:\Windows\Fonts\Vivaldii.TTF|0|utf-8| vrinda|Vrinda Regular|1|C:\Windows\Fonts\vrinda.ttf|0|utf-8| waker___|Waker Regular|1|C:\Windows\Fonts\waker___.ttf|0|utf-8| webdings|Webdings Regular|1|C:\Windows\Fonts\webdings.ttf|0|utf-8| wingding|Wingdings Regular|1|C:\Windows\Fonts\wingding.ttf|0|utf-8| WINGDNG2|Wingdings 2 Regular|1|C:\Windows\Fonts\WINGDNG2.TTF|0|utf-8| WINGDNG3|Wingdings 3 Regular|1|C:\Windows\Fonts\WINGDNG3.TTF|0|utf-8|
and with
WinGRASS-7.1.svn-r66072-44-Setup.exe
C:\Program Files\GRASS GIS 7.1.svn\etc\fontcap with following entries:
cyrilc|Cyrillic|0|C:\Program Files\GRASS GIS 7.1.svn\fonts\cyrilc.hmp|0|utf-8| gothgbt|Gothic Great Britain triplex|0|C:\Program Files\GRASS GIS 7.1.svn\fonts\gothgbt.hmp|0|utf-8| gothgrt|Gothic German triplex|0|C:\Program Files\GRASS GIS 7.1.svn\fonts\gothgrt.hmp|0|utf-8| gothitt|Gothic Italian triplex|0|C:\Program Files\GRASS GIS 7.1.svn\fonts\gothitt.hmp|0|utf-8| [...] verdana|Verdana Regular|1|C:\Windows\Fonts\verdana.ttf|0|utf-8| verdanab|Verdana Bold|1|C:\Windows\Fonts\verdanab.ttf|0|utf-8| verdanai|Verdana Italic|1|C:\Windows\Fonts\verdanai.ttf|0|utf-8| verdanaz|Verdana Bold Italic|1|C:\Windows\Fonts\verdanaz.ttf|0|utf-8| Vivaldii|Vivaldi Italic|1|C:\Windows\Fonts\Vivaldii.TTF|0|utf-8| vrinda|Vrinda Regular|1|C:\Windows\Fonts\vrinda.ttf|0|utf-8| waker___|Waker Regular|1|C:\Windows\Fonts\waker___.ttf|0|utf-8| webdings|Webdings Regular|1|C:\Windows\Fonts\webdings.ttf|0|utf-8| wingding|Wingdings Regular|1|C:\Windows\Fonts\wingding.ttf|0|utf-8| WINGDNG2|Wingdings 2 Regular|1|C:\Windows\Fonts\WINGDNG2.TTF|0|utf-8| WINGDNG3|Wingdings 3 Regular|1|C:\Windows\Fonts\WINGDNG3.TTF|0|utf-8|
run_gmkfontcap.bat works here on my side as expected, the fontcap file is updated.
before you run the bat file with admin rights manually, can you check
(1) if the fontcap file exists in C:\Program Files\GRASS GIS 7.1.svn\etc\ ? (2) if yes, what is the content of fontcap ? (just open the file in a text editor)
comment:32 by , 9 years ago
Replying to annakrat:
I can replicate the problem on windows 10 in virtual box. The run_gmkfontcap.bat seems to run during the installation and there are no erros in the terminal (I recorded a video to make sure I haven't missed anything). When I manually run the bat file with admin rights, I can see legend with text again.
what I can imagine that file permission control may have changed between windows versions (Vista, 7,8,10).
e.g. we had to introduce
https://trac.osgeo.org/grass/browser/grass/trunk/mswindows/GRASS-Installer.nsi.tmpl#L894
in order to set grassxy.py executable in win 7 and later.
maybe we have to do similar with the fontcap file
for more information:
http://nsis.sourceforge.net/AccessControl_plug-in.
another related thing may be to raise run_gmkfontcap.bat's access control.
at the moment we set it accordingliy:
https://trac.osgeo.org/grass/browser/grass/trunk/mswindows/GRASS-Installer.nsi.tmpl#L578
so may change
<requestedExecutionLevel level=“asInvoker“ uiAccess=“false“ />
to:
<requestedExecutionLevel level=“requireAdministrator“ uiAccess=“false“ />
could help.
follow-up: 34 comment:33 by , 9 years ago
Replying to hellik:
before you run the bat file with admin rights manually, can you check
(1) if the fontcap file exists in C:\Program Files\GRASS GIS 7.1.svn\etc\ ? (2) if yes, what is the content of fontcap ? (just open the file in a text editor)
cyrilc|Cyrillic|0|c:\osgeo4w\usr\src\grass701\dist.i686-pc-mingw32\fonts\cyrilc.hmp|0|utf-8| gothgbt|Gothic Great Britain triplex|0|c:\osgeo4w\usr\src\grass701\dist.i686-pc-mingw32\fonts\gothgbt.hmp|0|utf-8| gothgrt|Gothic German triplex|0|c:\osgeo4w\usr\src\grass701\dist.i686-pc-mingw32\fonts\gothgrt.hmp|0|utf-8| gothitt|Gothic Italian triplex|0|c:\osgeo4w\usr\src\grass701\dist.i686-pc-mingw32\fonts\gothitt.hmp|0|utf-8| greekc|Greek complex|0|c:\osgeo4w\usr\src\grass701\dist.i686-pc-mingw32\fonts\greekc.hmp|0|utf-8| greekcs|Greek complex script|0|c:\osgeo4w\usr\src\grass701\dist.i686-pc-mingw32\fonts\greekcs.hmp|0|utf-8| greekp|Greek plain|0|c:\osgeo4w\usr\src\grass701\dist.i686-pc-mingw32\fonts\greekp.hmp|0|utf-8| greeks|Greek simplex|0|c:\osgeo4w\usr\src\grass701\dist.i686-pc-mingw32\fonts\greeks.hmp|0|utf-8| italicc|Italian complex|0|c:\osgeo4w\usr\src\grass701\dist.i686-pc-mingw32\fonts\italicc.hmp|0|utf-8| italiccs|Italian complex small|0|c:\osgeo4w\usr\src\grass701\dist.i686-pc-mingw32\fonts\italiccs.hmp|0|utf-8| italict|Italian triplex|0|c:\osgeo4w\usr\src\grass701\dist.i686-pc-mingw32\fonts\italict.hmp|0|utf-8| romanc|Roman complex|0|c:\osgeo4w\usr\src\grass701\dist.i686-pc-mingw32\fonts\romanc.hmp|0|utf-8| romancs|Roman complex small|0|c:\osgeo4w\usr\src\grass701\dist.i686-pc-mingw32\fonts\romancs.hmp|0|utf-8| romand|Roman duplex|0|c:\osgeo4w\usr\src\grass701\dist.i686-pc-mingw32\fonts\romand.hmp|0|utf-8| romans|Roman simplex|0|c:\osgeo4w\usr\src\grass701\dist.i686-pc-mingw32\fonts\romans.hmp|0|utf-8| romant|Roman triplex|0|c:\osgeo4w\usr\src\grass701\dist.i686-pc-mingw32\fonts\romant.hmp|0|utf-8| scriptc|Script complex|0|c:\osgeo4w\usr\src\grass701\dist.i686-pc-mingw32\fonts\scriptc.hmp|0|utf-8| scripts|Script simplex|0|c:\osgeo4w\usr\src\grass701\dist.i686-pc-mingw32\fonts\scripts.hmp|0|utf-8| ahronbd|Aharoni Bold|1|C:\Windows\Fonts\ahronbd.ttf|0|utf-8| andlso|Andalus Regular|1|C:\Windows\Fonts\andlso.ttf|0|utf-8| angsa|Angsana New Regular|1|C:\Windows\Fonts\angsa.ttf|0|utf-8| angsab|Angsana New Bold|1|C:\Windows\Fonts\angsab.ttf|0|utf-8| angsai|Angsana New Italic|1|C:\Windows\Fonts\angsai.ttf|0|utf-8| angsau|AngsanaUPC Regular|1|C:\Windows\Fonts\angsau.ttf|0|utf-8| angsaub|AngsanaUPC Bold|1|C:\Windows\Fonts\angsaub.ttf|0|utf-8| angsaui|AngsanaUPC Italic|1|C:\Windows\Fonts\angsaui.ttf|0|utf-8| angsauz|AngsanaUPC Bold Italic|1|C:\Windows\Fonts\angsauz.ttf|0|utf-8| angsaz|Angsana New Bold Italic|1|C:\Windows\Fonts\angsaz.ttf|0|utf-8| aparaj|Aparajita Regular|1|C:\Windows\Fonts\aparaj.ttf|0|utf-8| aparajb|Aparajita Bold|1|C:\Windows\Fonts\aparajb.ttf|0|utf-8| aparajbi|Aparajita Bold Italic|1|C:\Windows\Fonts\aparajbi.ttf|0|utf-8| aparaji|Aparajita Italic|1|C:\Windows\Fonts\aparaji.ttf|0|utf-8| arabtype|Arabic Typesetting Regular|1|C:\Windows\Fonts\arabtype.ttf|0|utf-8| arial|Arial Regular|1|C:\Windows\Fonts\arial.ttf|0|utf-8| arialbd|Arial Bold|1|C:\Windows\Fonts\arialbd.ttf|0|utf-8| arialbi|Arial Bold Italic|1|C:\Windows\Fonts\arialbi.ttf|0|utf-8| ariali|Arial Italic|1|C:\Windows\Fonts\ariali.ttf|0|utf-8| ariblk|Arial Black|1|C:\Windows\Fonts\ariblk.ttf|0|utf-8| batang|Batang Regular|1|C:\Windows\Fonts\batang.ttc|0|utf-8| browa|Browallia New Regular|1|C:\Windows\Fonts\browa.ttf|0|utf-8| browab|Browallia New Bold|1|C:\Windows\Fonts\browab.ttf|0|utf-8| browai|Browallia New Italic|1|C:\Windows\Fonts\browai.ttf|0|utf-8| browau|BrowalliaUPC Regular|1|C:\Windows\Fonts\browau.ttf|0|utf-8| browaub|BrowalliaUPC Bold|1|C:\Windows\Fonts\browaub.ttf|0|utf-8| browaui|BrowalliaUPC Italic|1|C:\Windows\Fonts\browaui.ttf|0|utf-8| browauz|BrowalliaUPC Bold Italic|1|C:\Windows\Fonts\browauz.ttf|0|utf-8| browaz|Browallia New Bold Italic|1|C:\Windows\Fonts\browaz.ttf|0|utf-8| Caladea-Bold|Caladea Bold|1|C:\Windows\Fonts\Caladea-Bold.ttf|0|utf-8| Caladea-BoldItalic|Caladea Bold Italic|1|C:\Windows\Fonts\Caladea-BoldItalic.ttf|0|utf-8| Caladea-Italic|Caladea Italic|1|C:\Windows\Fonts\Caladea-Italic.ttf|0|utf-8| Caladea-Regular|Caladea Regular|1|C:\Windows\Fonts\Caladea-Regular.ttf|0|utf-8| calibri|Calibri Regular|1|C:\Windows\Fonts\calibri.ttf|0|utf-8| calibrib|Calibri Bold|1|C:\Windows\Fonts\calibrib.ttf|0|utf-8| ...
follow-up: 35 comment:34 by , 9 years ago
Replying to annakrat:
cyrilc|Cyrillic|0|c:\osgeo4w\usr\src\grass701\dist.i686-pc-mingw32\fonts\cyrilc.hmp|0|utf-8| gothgbt|Gothic Great Britain triplex|0|c:\osgeo4w\usr\src\grass701\dist.i686-pc-mingw32\fonts\gothgbt.hmp|0|utf-8|
the fontcap file isn't updated; it includes still the path to fonts of the build environment (i.e. c:\osgeo4w\usr\src\grass701\dist.i686-pc-mingw32\fonts\).
it seems to be a permission issue in the newer windows version.
try to fix it
follow-up: 36 comment:35 by , 9 years ago
Replying to hellik:
Replying to annakrat:
cyrilc|Cyrillic|0|c:\osgeo4w\usr\src\grass701\dist.i686-pc-mingw32\fonts\cyrilc.hmp|0|utf-8| gothgbt|Gothic Great Britain triplex|0|c:\osgeo4w\usr\src\grass701\dist.i686-pc-mingw32\fonts\gothgbt.hmp|0|utf-8|the fontcap file isn't updated; it includes still the path to fonts of the build environment (i.e. c:\osgeo4w\usr\src\grass701\dist.i686-pc-mingw32\fonts\).
it seems to be a permission issue in the newer windows version.
try to fix it
r66079 - grass/trunk
r66080 - grass/branches/releasebranch_7_0
builtin users are now granted to write/delete the fontcap
can you test the next standalone dailys?
comment:36 by , 9 years ago
follow-ups: 38 41 comment:37 by , 9 years ago
Unfortunately built 66083 still has the same problem. The content of fontcap seems to be the same. When I display legend, I get this in terminal, am not sure if it was there before
C:\Users\anna>Fontconfig error: Cannot load default config file GRASS_INFO_WARNING(2248,1): Unable to open font map 'C:\Program Files (x86)\GRASS GIS 7.1.svn/fonts/.hmp': No such file or directory. Try running 'g.mkfontcap -o' GRASS_INFO_END(2248,1)
follow-up: 40 comment:38 by , 9 years ago
Replying to annakrat:
Unfortunately built 66083 still has the same problem. The content of fontcap seems to be the same. When I display legend, I get this in terminal, am not sure if it was there before
C:\Users\anna>Fontconfig error: Cannot load default config file
In stackexchange I found a hint that this file might be needed (no idea how to map that in Windows):
/etc/fonts/fonts.conf
In Linux, it comes with the "fontconfig" package. In OSGeo4W, it should also be there (please verify):
https://trac.osgeo.org/osgeo4w/wiki/pkg-cairo#Installselectedpackages
Some similar font related discussion here:
https://github.com/Shoes3/shoes3/issues/46
GRASS_INFO_WARNING(2248,1): Unable to open font map 'C:\Program Files (x86)\GRASS GIS 7.1.svn/fonts/.hmp': No such file or directory.
I see that \ and / are being used but especially, that the font name is missing.
comment:39 by , 9 years ago
There is a default font config file coming with GRASS, right? So, what about including a special one in Windows installer which would contain some fonts typical for MS Windows/MS Office such as Arial which are in general present on all MS Windows machines?
comment:40 by , 9 years ago
Replying to neteler:
Replying to annakrat:
Unfortunately built 66083 still has the same problem. The content of fontcap seems to be the same. When I display legend, I get this in terminal, am not sure if it was there before
C:\Users\anna>Fontconfig error: Cannot load default config fileIn stackexchange I found a hint that this file might be needed (no idea how to map that in Windows):
/etc/fonts/fonts.conf
In Linux, it comes with the "fontconfig" package. In OSGeo4W, it should also be there (please verify):
https://trac.osgeo.org/osgeo4w/wiki/pkg-cairo#Installselectedpackages
Some similar font related discussion here:
https://github.com/Shoes3/shoes3/issues/46
GRASS_INFO_WARNING(2248,1): Unable to open font map 'C:\Program Files (x86)\GRASS GIS 7.1.svn/fonts/.hmp': No such file or directory.I see that \ and / are being used but especially, that the font name is missing.
the odd thing is that it works nicely on some win boxes (e.g. here for me on win 7), and on some not.
follow-up: 42 comment:41 by , 9 years ago
Replying to annakrat:
Unfortunately built 66083 still has the same problem. The content of fontcap seems to be the same. When I display legend, I get this in terminal, am not sure if it was there before
C:\Users\anna>Fontconfig error: Cannot load default config file GRASS_INFO_WARNING(2248,1): Unable to open font map 'C:\Program Files (x86)\GRASS GIS 7.1.svn/fonts/.hmp': No such file or directory. Try running 'g.mkfontcap -o' GRASS_INFO_END(2248,1)
I've changed [GRASS-SVN] r66148 - grass/trunk/mswindows [GRASS-SVN] r66149 - grass/branches/releasebranch_7_0/mswindows
Can you test the next Installer?
I've done some research, file permissions changed a lot between Windows versions (7,8,10).
follow-ups: 43 44 comment:42 by , 9 years ago
Replying to hellik:
I've changed [GRASS-SVN] r66148 - grass/trunk/mswindows [GRASS-SVN] r66149 - grass/branches/releasebranch_7_0/mswindows
Can you test the next Installer?
I've done some research, file permissions changed a lot between Windows versions (7,8,10).
Unfortunately, no change. I wonder if the problem is something different then permissions. The problem is I don't get any error during installation. Maybe we could print more messages during the font configuration? Thanks for all the work on this.
follow-up: 45 comment:43 by , 9 years ago
Replying to annakrat:
Replying to hellik:
I've done some research, file permissions changed a lot between Windows versions (7,8,10).
Unfortunately, no change. I wonder if the problem is something different then permissions. The problem is I don't get any error during installation. Maybe we could print more messages during the font configuration? Thanks for all the work on this.
What about that hardcoding of some fonts for MS Windows into a MS Windows specific file? This is a great workaround and I have no idea how it should be done but it seems that it is appropriate on a platform where API is changing often and is under-documented.
follow-up: 47 comment:44 by , 9 years ago
Replying to annakrat:
Unfortunately, no change. I wonder if the problem is something different then permissions.
I'm quite sure that it is a file writing permission issue in a usually non-writeable folder (c:\Program Files\your program\folder to change something) in win 8 and above.
tested it on several win 7 boxes here, it works fine. unfortunately no win 8 oder win 10 box here on my side.
follow-up: 46 comment:45 by , 9 years ago
Replying to wenzeslaus:
Replying to annakrat:
Replying to hellik:
I've done some research, file permissions changed a lot between Windows versions (7,8,10).
Unfortunately, no change. I wonder if the problem is something different then permissions. The problem is I don't get any error during installation. Maybe we could print more messages during the font configuration? Thanks for all the work on this.
What about that hardcoding of some fonts for MS Windows into a MS Windows specific file? This is a great workaround and I have no idea how it should be done but it seems that it is appropriate on a platform where API is changing often and is under-documented.
see https://grass.osgeo.org/grass70/manuals/g.mkfontcap.html
there is a -s flag:
-s Write font configuration file to standard output instead of $GISBASE/etc
a feasable way may be:
- another flag e.g. to write fontcap file to %APPDATA%GRASS7 where already the addons are stored
- all the modules which are working with fonts seems to search for the fontcap file in $GISBASE/etc; adding a second search path (e.g. %APPDATA%GRASS7) to these modules if the file is not available in $GISBASE/etc
follow-ups: 48 49 comment:46 by , 9 years ago
Replying to hellik:
Replying to wenzeslaus:
Replying to annakrat:
Replying to hellik:
I've done some research, file permissions changed a lot between Windows versions (7,8,10).
Unfortunately, no change. I wonder if the problem is something different then permissions. The problem is I don't get any error during installation. Maybe we could print more messages during the font configuration? Thanks for all the work on this.
What about that hardcoding of some fonts for MS Windows into a MS Windows specific file? This is a great workaround and I have no idea how it should be done but it seems that it is appropriate on a platform where API is changing often and is under-documented.
Shouldn't be there a file with the default GRASS fonts somewhere already? Or is everything generated?
a feasable way may be:
- another flag e.g. to write fontcap file to %APPDATA%GRASS7 where already the addons are stored
How would this work in a multi-user environment?
follow-ups: 50 51 comment:47 by , 9 years ago
Replying to hellik:
Replying to annakrat:
Unfortunately, no change. I wonder if the problem is something different then permissions.
I'm quite sure that it is a file writing permission issue in a usually non-writeable folder (c:\Program Files\your program\folder to change something) in win 8 and above.
tested it on several win 7 boxes here, it works fine. unfortunately no win 8 oder win 10 box here on my side.
If you want to spend even more time on it, you can download/use windows 10 for free, and run it in virtual box. But it is not just windows 10 issue from what I've seen.
comment:48 by , 9 years ago
Replying to wenzeslaus:
Replying to hellik:
Replying to wenzeslaus:
Replying to annakrat:
Replying to hellik:
I've done some research, file permissions changed a lot between Windows versions (7,8,10).
Unfortunately, no change. I wonder if the problem is something different then permissions. The problem is I don't get any error during installation. Maybe we could print more messages during the font configuration? Thanks for all the work on this.
What about that hardcoding of some fonts for MS Windows into a MS Windows specific file? This is a great workaround and I have no idea how it should be done but it seems that it is appropriate on a platform where API is changing often and is under-documented.
Shouldn't be there a file with the default GRASS fonts somewhere already? Or is everything generated?
see https://trac.osgeo.org/grass/ticket/2448#comment:33
yes, the file is there (e.g. C:\Program Files\GRASS GIS 7.1.svn\etc\fontcap), but the content of the file refers to the OSGeo4W-build environment (e.g. cyrilc|Cyrillic|0|c:\osgeo4w\usr\src\grass701\dist.i686-pc-mingw32\fonts\cyrilc.hmp|0|utf-8|) , and includes not the installation path.
for this situation: the nsis-winGRASS installer normally invokes a g.mkfontcap-run, which updates the fontcap file; unfortunately in newer windows version the file write permissions in e.g. C:\Program Files\your software\somefolder for installer subprocesses has changed.
IMHO there is some safety issue if write permission to the whole C:\Program Files\GRASS GIS 7.1.svn\etc\ folder is granted to all users after installation.
therefore Microsoft has implemented the %APPDATA% to store there changing application files.
so a workaround may be,
(1) grant write access to the whole folder (2) run g.mkfontcap (3) change afterwards again back to no write access
unfortunately you can't run g.mkfontcap successfully afterwards during a GRASS session
comment:49 by , 9 years ago
Replying to wenzeslaus:
- another flag e.g. to write fontcap file to %APPDATA%GRASS7 where already the addons are stored
How would this work in a multi-user environment?
there is the C:\Users\All Users folder.
follow-up: 53 comment:50 by , 9 years ago
Replying to annakrat:
Replying to hellik:
Replying to annakrat:
Unfortunately, no change. I wonder if the problem is something different then permissions.
I'm quite sure that it is a file writing permission issue in a usually non-writeable folder (c:\Program Files\your program\folder to change something) in win 8 and above.
tested it on several win 7 boxes here, it works fine. unfortunately no win 8 oder win 10 box here on my side.
If you want to spend even more time on it, you can download/use windows 10 for free, and run it in virtual box. But it is not just windows 10 issue from what I've seen.
see r66166
Log: GRASS-Installer.nsi.tmpl: attempt to fix #2448 make folder and file writeable before run g.mkfontcap change after g.mkfontcap run back to only readable
it's only in trunk, can you the test one of the next dailys?
follow-up: 52 comment:51 by , 9 years ago
Replying to annakrat:
Replying to hellik:
Replying to annakrat:
Unfortunately, no change. I wonder if the problem is something different then permissions.
I'm quite sure that it is a file writing permission issue in a usually non-writeable folder (c:\Program Files\your program\folder to change something) in win 8 and above.
tested it on several win 7 boxes here, it works fine. unfortunately no win 8 oder win 10 box here on my side.
If you want to spend even more time on it, you can download/use windows 10 for free, and run it in virtual box. But it is not just windows 10 issue from what I've seen.
see
http://lists.osgeo.org/pipermail/grass-dev/2015-September/076229.html http://lists.osgeo.org/pipermail/grass-dev/2015-September/076234.html
GRASS_FONT_CAP
[g.mkfontcap, d.font, display drivers] specifies an alternative location (to $GISBASE/etc/fontcap) for the font
configuration file.
this may the way to go using it in the winGRASS-installer.
comment:52 by , 9 years ago
Replying to hellik:
Replying to annakrat:
Replying to hellik:
Replying to annakrat:
Unfortunately, no change. I wonder if the problem is something different then permissions.
I'm quite sure that it is a file writing permission issue in a usually non-writeable folder (c:\Program Files\your program\folder to change something) in win 8 and above.
tested it on several win 7 boxes here, it works fine. unfortunately no win 8 oder win 10 box here on my side.
If you want to spend even more time on it, you can download/use windows 10 for free, and run it in virtual box. But it is not just windows 10 issue from what I've seen.
see
http://lists.osgeo.org/pipermail/grass-dev/2015-September/076229.html http://lists.osgeo.org/pipermail/grass-dev/2015-September/076234.html
GRASS_FONT_CAP
[g.mkfontcap, d.font, display drivers] specifies an alternative location (to $GISBASE/etc/fontcap) for the font
configuration file.
this may the way to go using it in the winGRASS-installer.
a possible procedure:
the windows variable where all users have access: %ALLUSERSPROFILE% [1]
(1) add to https://trac.osgeo.org/grass/browser/grass/trunk/mswindows/env.bat
set GRASS_FONT_CAP=%ALLUSERSPROFILE%\GRASS7
(2) create by winGRASS installer folder %ALLUSERSPROFILE%\GRASS7
(3) add to run_gmkfontcap.bat
set GRASS_FONT_CAP=%ALLUSERSPROFILE%\GRASS7
(3) run run_gmkfontcap.bat by the installer
[1] https://technet.microsoft.com/en-us/library/cc749104%28v=ws.10%29.aspx
follow-ups: 54 55 comment:53 by , 9 years ago
comment:54 by , 9 years ago
Replying to annakrat:
Replying to hellik:
see r66166
Log: GRASS-Installer.nsi.tmpl: attempt to fix #2448 make folder and file writeable before run g.mkfontcap change after g.mkfontcap run back to only readable
it's only in trunk, can you the test one of the next dailys?
Still doesn't work...
just asked in the nsis user forum, maybe we'll get some hints from there.
follow-up: 56 comment:55 by , 9 years ago
Replying to annakrat:
Replying to hellik:
see r66166
Log: GRASS-Installer.nsi.tmpl: attempt to fix #2448 make folder and file writeable before run g.mkfontcap change after g.mkfontcap run back to only readable
it's only in trunk, can you the test one of the next dailys?
Still doesn't work...
can you test installer r66253 or higher?
follow-up: 57 comment:56 by , 9 years ago
Replying to hellik:
Replying to annakrat:
Replying to hellik:
see r66166
Log: GRASS-Installer.nsi.tmpl: attempt to fix #2448 make folder and file writeable before run g.mkfontcap change after g.mkfontcap run back to only readable
it's only in trunk, can you the test one of the next dailys?
Still doesn't work...
can you test installer r66253 or higher?
r66254 or higher
follow-up: 58 comment:57 by , 9 years ago
follow-ups: 59 60 comment:58 by , 9 years ago
Replying to hellik:
Replying to hellik:
r66254 or higher
in the show detail log, setting folder/file permission success should now be indicated by twice ok
[...] Output folder: C:\Program Files\GRASS GIS 7.1.svn ok ok Execute: "C:\Program Files\GRASS GIS 7.1.svn\etc\run_gmkfontcap.bat" [...]
where should I see this log? I still can't see any text in the legend...
comment:59 by , 9 years ago
Replying to annakrat:
Replying to hellik:
Replying to hellik:
r66254 or higher
in the show detail log, setting folder/file permission success should now be indicated by twice ok
[...] Output folder: C:\Program Files\GRASS GIS 7.1.svn ok ok Execute: "C:\Program Files\GRASS GIS 7.1.svn\etc\run_gmkfontcap.bat" [...]where should I see this log? I still can't see any text in the legend...
if the installer runs, a button called "show Detail" (or similar) is shown ; press this button and the installer activities are shown.
near the end this lines mentioned are listed.
the "fixes" are only in trunk ; the latest daily installer is tested in win 7 32/64 bit and win 8.1 64 bit ; it is working correctly on all this tested win boxes.
What is your exact win version and bitness?
follow-up: 61 comment:60 by , 9 years ago
Replying to annakrat:
Replying to hellik:
Replying to hellik:
r66254 or higher
in the show detail log, setting folder/file permission success should now be indicated by twice ok
[...] Output folder: C:\Program Files\GRASS GIS 7.1.svn ok ok Execute: "C:\Program Files\GRASS GIS 7.1.svn\etc\run_gmkfontcap.bat" [...]where should I see this log? I still can't see any text in the legend...
some special security rules? antivirus sw? virtual windows or real windows box?
follow-up: 62 comment:61 by , 9 years ago
Replying to hellik:
Replying to annakrat:
Replying to hellik:
Replying to hellik:
r66254 or higher
in the show detail log, setting folder/file permission success should now be indicated by twice ok
[...] Output folder: C:\Program Files\GRASS GIS 7.1.svn ok ok Execute: "C:\Program Files\GRASS GIS 7.1.svn\etc\run_gmkfontcap.bat" [...]where should I see this log? I still can't see any text in the legend...
Oh I see. Yes I can see there the 2 oks.
some special security rules? antivirus sw? virtual windows or real windows box?
I am running windows 10 in a virtual machine, I didn't do anything special, I haven't installed any antivirus software. Sorry, I know it's frustrating...
follow-up: 63 comment:62 by , 9 years ago
Replying to annakrat:
where should I see this log? I still can't see any text in the legend...
Oh I see. Yes I can see there the 2 oks.
some special security rules? antivirus sw? virtual windows or real windows box?
I am running windows 10 in a virtual machine, I didn't do anything special, I haven't installed any antivirus software. Sorry, I know it's frustrating...
for the record the conversation on the nsis forum:
http://forums.winamp.com/showthread.php?t=382427
I've tested the modified installer now on following win boxes with different locales:
win Vista 32bit win 7 32bit and 64bit win 8.1 64bit
it works nicely there, so no idea here from my side at the moment what is going on ...
from the nsis forum:
I don't think .bat files support manifests but if the parent process is elevated then the .bat file should be elevated as well. I assume you have verified the permissions on the security tab in the properties for the files/folders in question on the systems it fails on? If it works on some systems and not on others you should probably move your investigation to g.mkfontcap.exe...
can you look at the permissions of the $installdir/etc folder and the fontcap file by right click on folder/file -> properties -> security tab?
follow-ups: 64 65 comment:63 by , 9 years ago
Replying to hellik:
can you look at the permissions of the $installdir/etc folder and the fontcap file by right click on folder/file -> properties -> security tab?
There are different groups, I don't know which one are you interested in:
For etc folder:
- All application packages: Allow Read & execute, Read
- Creator owner: Special permissions
- System: Allow Full control, Modify, Read & execute, List folder contents, Read, Write
- Administrators: the same as System
- Users: the same as All application packages
For fontcap folder:
- All application packages: Allow Read & execute, List folder contents, Read
- System: Allow Full control, Modify, Read & execute, List folder contents, Read, Write
- Administrators: the same as System
- Users: the same as System, but the check marks of Full control, Modify and Write are bold for some reason
comment:64 by , 9 years ago
Replying to annakrat:
file and folder permissions looks like expected.
so g.mkfontcap.exe (as a subprocess of the permission elevated run_gmkfontcap.bat) may not be permission elevated as expected on some win boxes (e.g. win 10 virtual); as it is working correctly on some other win boxes which I and others have tested (e.g. win Vista 32bit, win 7 32bit and 64bit, win 8.1 64bit, ... )
For fontcap folder:
- Users: the same as System, but the check marks of Full control, Modify and Write are bold for some reason
I've implemented that the fontcap file is allowed to be changed by an user (e.g. a g.mkfontcap run during a GRASS GIS session).
as you are logged in as a user, you can change the permissions controls for this file; therefore these items are in bold.
comment:65 by , 9 years ago
Replying to annakrat:
Replying to hellik:
can you look at the permissions of the $installdir/etc folder and the fontcap file by right click on folder/file -> properties -> security tab?
There are different groups, I don't know which one are you interested in:
For etc folder:
- All application packages: Allow Read & execute, Read
- Creator owner: Special permissions
- System: Allow Full control, Modify, Read & execute, List folder contents, Read, Write
- Administrators: the same as System
- Users: the same as All application packages
For fontcap folder:
- All application packages: Allow Read & execute, List folder contents, Read
- System: Allow Full control, Modify, Read & execute, List folder contents, Read, Write
- Administrators: the same as System
- Users: the same as System, but the check marks of Full control, Modify and Write are bold for some reason
could you add in following file
C:\Program Files (x86)\GRASS GIS 7.1.svn\etc\env.bat
this line?
set GRASS_FONT_CAP=%TEMP%\fontcap
then start a windows console and type
echo %TEMP%
to look to where %TEMP% shows, e.g. C:\Users\userxyz\AppData\Local\Temp
start a normal winGRASS session, run g.mkfontcap. and see if the file is written in this folder?
tested here: the fontcap file is written to C:\Users\userxyz\AppData\Local\Temp\fontcap
a workaround during installation may be to add GRASS_FONT_CAP=%TEMP%\fontcap as environment variable to run_gmkfontcap.bat and then copy back the file to C:\Program Files (x86)\GRASS GIS 7.1.svn\etc in order to be available to for all users of a windows box ...
follow-up: 68 comment:67 by , 9 years ago
Just tried latest 7.0.3svn standalone wingrass (32bit) on my virtual machine and all d.* command crash. I assume it's somehow related to this problem. The fontcap file in etc now looks correct. So I don't understand what's happening. Could people test more if it's just my problem? Otherwise it would be a blocker. I have 7.0.2 installed and it runs (d.* commands are not crashing), although with the font problem.
follow-up: 69 comment:68 by , 9 years ago
Replying to annakrat:
The fontcap file in etc now looks correct.
could you post the first few lines of the fontcap file?
follow-up: 70 comment:69 by , 9 years ago
Replying to hellik:
Replying to annakrat:
The fontcap file in etc now looks correct.
could you post the first few lines of the fontcap file?
cyrilc|Cyrillic|0|C:\Program Files (x86)\GRASS GIS 7.0.3svn\fonts\cyrilc.hmp|0|utf-8| gothgbt|Gothic Great Britain triplex|0|C:\Program Files (x86)\GRASS GIS 7.0.3svn\fonts\gothgbt.hmp|0|utf-8| gothgrt|Gothic German triplex|0|C:\Program Files (x86)\GRASS GIS 7.0.3svn\fonts\gothgrt.hmp|0|utf-8| gothitt|Gothic Italian triplex|0|C:\Program Files (x86)\GRASS GIS 7.0.3svn\fonts\gothitt.hmp|0|utf-8| greekc|Greek complex|0|C:\Program Files (x86)\GRASS GIS 7.0.3svn\fonts\greekc.hmp|0|utf-8| greekcs|Greek complex script|0|C:\Program Files (x86)\GRASS GIS 7.0.3svn\fonts\greekcs.hmp|0|utf-8| greekp|Greek plain|0|C:\Program Files (x86)\GRASS GIS 7.0.3svn\fonts\greekp.hmp|0|utf-8| greeks|Greek simplex|0|C:\Program Files (x86)\GRASS GIS 7.0.3svn\fonts\greeks.hmp|0|utf-8| italicc|Italian complex|0|C:\Program Files (x86)\GRASS GIS 7.0.3svn\fonts\italicc.hmp|0|utf-8| italiccs|Italian complex small|0|C:\Program Files (x86)\GRASS GIS 7.0.3svn\fonts\italiccs.hmp|0|utf-8| italict|Italian triplex|0|C:\Program Files (x86)\GRASS GIS 7.0.3svn\fonts\italict.hmp|0|utf-8| romanc|Roman complex|0|C:\Program Files (x86)\GRASS GIS 7.0.3svn\fonts\romanc.hmp|0|utf-8| romancs|Roman complex small|0|C:\Program Files (x86)\GRASS GIS 7.0.3svn\fonts\romancs.hmp|0|utf-8| romand|Roman duplex|0|C:\Program Files (x86)\GRASS GIS 7.0.3svn\fonts\romand.hmp|0|utf-8| romans|Roman simplex|0|C:\Program Files (x86)\GRASS GIS 7.0.3svn\fonts\romans.hmp|0|utf-8| romant|Roman triplex|0|C:\Program Files (x86)\GRASS GIS 7.0.3svn\fonts\romant.hmp|0|utf-8| scriptc|Script complex|0|C:\Program Files (x86)\GRASS GIS 7.0.3svn\fonts\scriptc.hmp|0|utf-8| scripts|Script simplex|0|C:\Program Files (x86)\GRASS GIS 7.0.3svn\fonts\scripts.hmp|0|utf-8| arial|Arial Regular|1|C:\Windows\Fonts\arial.ttf|0|utf-8| arialbd|Arial Bold|1|C:\Windows\Fonts\arialbd.ttf|0|utf-8| arialbi|Arial Bold Italic|1|C:\Windows\Fonts\arialbi.ttf|0|utf-8|
comment:70 by , 9 years ago
Replying to annakrat:
Replying to hellik:
Replying to annakrat:
The fontcap file in etc now looks correct.
could you post the first few lines of the fontcap file?
cyrilc|Cyrillic|0|C:\Program Files (x86)\GRASS GIS 7.0.3svn\fonts\cyrilc.hmp|0|utf-8| gothgbt|Gothic Great Britain triplex|0|C:\Program Files (x86)\GRASS GIS 7.0.3svn\fonts\gothgbt.hmp|0|utf-8| [...]
thanks. yes the fontcap file is now updated and points to the right font folder, e.g.:
cyrilc|Cyrillic|0|C:\Program Files (x86)\GRASS GIS 7.0.3svn\fonts\cyrilc.hmp|0|utf-8|
comment:74 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Replying to neteler:
Is this still open?
It seems to work now, although not sure which change did the trick.
Not sure if related but I checked my script which runs "configure" for me with all switches I need and found therein
Maybe worth trying? Don't remember why I put it there, perhaps due to this hint:
http://lists.osgeo.org/pipermail/grass-dev/2010-August/051801.html