Install fonts on Linux server

That is what I thought. So you can install as root. That method is appropriate as well for desktop Linux, and is described in the second link I mentioned in my first post .

Interestingly enough, another member Xojo Cloud user in https://forum.xojo.com/15744-copy-canvas-to-imageview still seems to wait for a solution to the same problem.

[quote=130894:@Michel Bujardet]And guess what ? It finds Metropolitain:style=Regular (metro.ttf)

Yet, the said font still is not seen by the web app with the regular Font(i) Xojo code.[/quote]
Yes - and as @Tim Hare mentioned, your user and your app are not being run with the same user environment.

You can see it because you are logged in as bu1471a, but your web app would only see that added font of it was running as a user named bu1471a (and I’m pretty sure that is not the case on a shared server).

[quote=131020:@Tim Jones]Yes - and as @Tim Hare mentioned, your user and your app are not being run with the same user environment.

You can see it because you are logged in as bu1471a, but your web app would only see that added font of it was running as a user named bu1471a (and I’m pretty sure that is not the case on a shared server).[/quote]

No, it is something else. I just verified with ps aux, and my test application is running as bu1471a as well, just like SSH.

But if needed on another host, an app could use shell to install the font as the right user.

In your test runs, are you still getting no fonts listed? If that’s the case, you may need to update the recognized user environment when you run the test app.

For WE:
Is FontCount() returning 0?
Do you get some fonts ( Font(i) ) and not some others (some are missing from the list)?
Are all those fonts chmod 644 owned by root? (should be, except for your private ones at ~/.fonts)

fc-list | less shows all fonts, including the one I installed in the user ~/.Fonts folder.

[quote=131039:@Rick Araujo]For WE:
Is FontCount() returning 0?
Do you get some fonts ( Font(i) ) and not some others (some are missing from the list)?
Are all those fonts chmod 644 owned by root? (should be, except for your private ones at ~/.fonts)[/quote]

As stated above, all fonts appear when I list from the command line fc-list. The FontCount shows correctly all the fonts installed at root, and they are listed by their names by Font(i).

It is not a major issue for me, since the fonts I needed have been installed by Phillip. So my immediate problem is solved. The matter of installing fonts on other hosts may surface eventually, though, and I posted that in case someone did a search.

Furthermore, as it appeared in the other thread, when no fonts are installed, DrawString does not work in Web Edition without generating an error. At first we thought of a bug, until we realized the fonts were missing. This may happen to other members and it is important to make a note of the solution.

BTW, the ~/.fonts method works flawlessly under Linux Mint.

Should works flawlessly under any linux desktop environment. For a server you probably need freetype and dependencies installed.

But that does not explain why the root install works, and not the user install, then.

Well, this is one of those things that I can’t think of unless I have access to the server and explore the issue. May 1701 could investigate. :wink:

Errata: Maybe 1701 …