OS2 World Community Forum

WebSite Information => Article Discussions => Topic started by: Einar Lygre on January 19, 2017, 02:36:48 pm

Title: What program for font preview
Post by: Einar Lygre on January 19, 2017, 02:36:48 pm
I have hundreds of fonts in some folders. I have downloaded them from internet and the intention was to use some of them in Scribus. But of course I have lost track of them. I need to delete many of them, but which ones?
Is there a program that can, in a simple way, display them, preferable many at the same time.

Cheers

Einar Lygre
Title: Re: What program for font preview
Post by: ivan on January 19, 2017, 04:47:12 pm
You could use Fontviewer which is a java program.  It works with openjdk6 but you will need to know where your fonts are.
Title: Re: What program for font preview
Post by: Dave Yeo on January 19, 2017, 08:23:38 pm
I used http://hobbes.nmsu.edu/download/pub/os2/util/font/fntf30a.zip (http://hobbes.nmsu.edu/download/pub/os2/util/font/fntf30a.zip) a long time back. Worked well except it is abandoned shareware so stops working after a month or so. Nice thing is it is native and can install and uninstall the fonts.
 
Title: Re: What program for font preview
Post by: ivan on January 20, 2017, 12:03:39 am
I remember that one Dave but the problem was I could never find a way of actually displaying what the font looked like.  At least you can do that easily with Fontviewer.
Title: Re: What program for font preview
Post by: Dave Yeo on January 20, 2017, 12:38:26 am
Right click on a font and at the bottom of the menu, choose font browser. Though the graphics aren't the best.
Fonts look much better if opened through the fonts folder under system setup (installed by Xworkplace?). Probably the old fontfolder used the original truetype engine rather then freetype.
Have to look at Fontviewer.
Title: Re: What program for font preview
Post by: Dave Yeo on January 20, 2017, 12:46:40 am
How are you running Fontviewer? Here trying to start it with java -jar FontViewer.jar results in it crashing due to not being able to load the shell folder ID list.
Title: Re: What program for font preview
Post by: Pete on January 20, 2017, 01:07:24 am
Hi All

Thought I'd give FontViewer a try so clicked on the link at the bottom of ivans post. Seamonkey (User agent: Mozilla/5.0 (OS/2; Warp 4.5; rv:38.0) Gecko/20100101 Firefox/38.0 SeaMonkey/2.35) popped up the Open/Save dialog, I selected Save and clicked OK. No follow up dialog asking where to download to though.

I get the same problem when trying to download the accompanying icon file.

Is this Seamonkey misbehaving or is there something wrong with the download link? - Can anyone else download these files with this build of Seamonkey?


Regards

Pete
Title: Re: What program for font preview
Post by: Dave Yeo on January 20, 2017, 02:13:33 am
Worked fine here with the latest SM. I have seen similar though and IIRC, fixed it by changing the options under Preferences-->Downloads, I think When Saving a file and then back.
Title: Re: What program for font preview
Post by: Einar Lygre on January 20, 2017, 10:34:12 am
You could use Fontviewer which is a java program.  It works with openjdk6 but you will need to know where your fonts are.

Thank you. Works fine, but I should like to see more the one font at a time, just to compare them before selecting one.
Title: Re: What program for font preview
Post by: Alex Taylor on January 20, 2017, 11:35:03 am
There is also fontinfo (https://github.com/altsan/os2-fontinfo/releases) which is mine.  It's admittedly designed more for inspecting font headers than for previewing, but you can view individual characters.  If you associate it with TTF, OTF and/or PFB files, you should be able to open several files at a time in separate instances using the WPS or a file manager.
Title: Re: What program for font preview
Post by: ivan on January 20, 2017, 12:50:26 pm
Hi Dave,

I use a program object with the following in the 'Program' page:
                           
C:\OPENJDK6-GA3\BIN\JAVAW.EXE
-Duser.home=f:\java-apps\fontviewer -jar fontviewer.jar
F:\JAVA-APPS\FONTVIEWER

And       Font Display on the 'Icon' page.

Obviously you need to change paths as necessary.
                               

Title: Re: What program for font preview
Post by: Pete on January 20, 2017, 08:57:30 pm
Hi Dave

The download works as long as Preferences -> Downloads  -> when saving a file is set to "Save files to" but not when set to "Always ask where...".

As I can download files from other websites with the option "Always ask where..." set  - no problems downloading Fontfolder using the url supplied in your above post - I can only guess there is something different with downloading files from os2world that Seamonkey does not like.


Later:
I think I may have found the problem. If I use Shift-Click Seamonkey bypasses the Download dialog and opens the Save to dialog which shows the filename as index.php

Having downloaded index.php I can confirm it is actually FontViewer.jar

Does this indicate the problem is with the download link and related website code?



Regards

Pete
Title: Re: What program for font preview
Post by: Ian Manners on January 21, 2017, 07:06:29 pm
Hi Pete,

Quote
Does this indicate the problem is with the download link and related website code?

I just downloaded the jar and icon files and it went flawlessly in Firefox. This would suggest the website code is ok, well, at least with Firefox.
Both gave me the dialog box on first click that asks me where to save each file. And both files where then saved fine.
I do have 'Ask me' ticked on the download options.
Title: Re: What program for font preview
Post by: Dave Yeo on January 21, 2017, 07:13:33 pm
Hi Pete, you've probably got some profile corruption somewhere. You could test with a new profile.
Hi Ivan, pretty much how I was trying to run it. Double checked I have the latest Java, re-installed Odin and tested with a different Odin and even wiped the registry. Same error.
Not too important as other java programs run.
Title: Re: What program for font preview
Post by: ivan on January 21, 2017, 08:17:09 pm
Hi Dave,  This appears to be one of the java programs that requires openjdk6-ga3 to run. 

I have a few java programs that will not run with openjdk6-ga5.  I don't think there are supposed to be that many differences between ga3 and ga5 but there are enough not to let some java programs work that is why I have both versions on this computer.
Title: Re: What program for font preview
Post by: Joop on January 21, 2017, 08:40:04 pm
Hi Dave,  This appears to be one of the java programs that requires openjdk6-ga3 to run. 

I have a few java programs that will not run with openjdk6-ga5.  I don't think there are supposed to be that many differences between ga3 and ga5 but there are enough not to let some java programs work that is why I have both versions on this computer.
Its best to run latest Odin and latest Java for our system, ie openjdk6-ga5. I don't have problems with latest Odin. I did test openjdk6-ga2 up ga4 and all do have errors some way with programs. What programs don't want to run with openjdk6-ga5?
Title: Re: What program for font preview
Post by: Pete on January 22, 2017, 01:58:09 am
Hi All

@ivan
FontViewer works fine with openjdk full version "1.6.0_27-b01-GA5" using the following command

  J:\JAVA\OPENJDK\BIN\JAVAW.EXE -jar G:\OS2\FontViewer.jar

Obviously change Drives/Paths to suit other systems.


@Dave
Having tested with a new profile it looks like this problem is profile related - but only seems to affect os2world at the moment.

What in a Profile would cause Seamonkey to fail to display the "Save to..." dialog? - and why does it work fine on other websites?


Regards

Pete
Title: Re: What program for font preview
Post by: Dave Yeo on January 22, 2017, 05:17:29 am
Fontviewer doesn't work here with the latest Java. The only difference is that I'm using a cmd file to add the java directory to the front of %PATH%.
As for SeaMonkey, in the old days, I'd say something in prefs.js but now a days it could be in one of the sqlite3 files, probably places.sqlite, which no longer seems to get finalized when shutting the browser down.
You could test. After backing up your profile, with SM closed, try replacing prefs.js with the new one and test. If it works, then you have the fun job of diffing the old and new prefs.js. You can do the same with places.sqlite (move places.sqlite-wal along with it) but it is hard to diff them and with the wal file, you can't even open the sqlite3 file in a sqlite editor. The wal file is sorta a journal, stands for write ahead log. Sometimes using an older SM (2.21 or older) will fix the sqlite file. Make sure you have your profile backed up. I back mine up daily due to problems like this, keep losing some history or not having it stick for some domains.
Title: Re: What program for font preview
Post by: Pete on January 22, 2017, 08:44:42 pm
Hi Dave

No problems starting from a cmd file here

/* fontviewer.cmd */

'@set PATH=J:\JAVA\OPENJDK\BIN;%PATH%'
'@javaw -jar G:\OS2\FontViewer.jar'


Alternatively have you tried starting fontviewer from a command line using the full paths to java and fontviewer? - if that does not work maybe you will get a helpful error message.

As for seamonkey I'll have to find time to do some testing and see if I can spot the problem. Strange that so far it only seems to affect downloading from os2world.


Regards

Pete
Title: Re: What program for font preview
Post by: roberto on January 22, 2017, 10:51:50 pm
You can see too the program sample in Qt4, fontsampler.exe, you have the sample and source. Only can see one by one font, but only with push a key.
Saludos
Title: Re: What program for font preview
Post by: André Heldoorn on January 26, 2017, 08:28:33 pm
Make sure you have your profile backed up. I back mine up daily due to problems like this, keep losing some history or not having it stick for some domains.

FF (or SM) wasn't able to find NSPR4.DLL, according to a quickly disappearing pop-up window behind the browser's main window. Would copying NSPR4.DLL from a %LIBPATH% directory to the browser's main directory improve the stability? Is there a hard-coded reference to a wrong (i.e. the current) directory indeed?
Title: Re: What program for font preview
Post by: Dave Yeo on January 26, 2017, 08:33:22 pm
The Firefox was not able to fine nspr4.dll or xpcom.dll is not a very informative error as it actually means that nspr4 can't find one of its dependencies.
Try running PMDLL on your nspr4.dll to hopefully see which dll you're missing.
Title: Re: What program for font preview
Post by: André Heldoorn on January 28, 2017, 03:50:11 am
Try running PMDLL on your nspr4.dll to hopefully see which dll you're missing.

It was that type of pop-up, yes, albeit behind the main window. I've seen it at least twice. There's a possibility that the system was quite busy during the whole session, for example due to some unavoidable script.

NSPR4.DLL can load all DLLs it requires, but I'll now assume that the pop-up cannot be avoided by moving the DLL to the browser's own directory. I was more worried about a pop-up behind the main window, because sometimes you may have to answer a question (to stop a script, for example) which cannot be answered because the pop-up window is hidden behind the main window. From an user's point of view I didn't notice any problem related to (not) being able to load the DLL, other than seeing the pop-up window.
Title: Re: What program for font preview
Post by: Dave Yeo on January 28, 2017, 04:54:49 am
That's strange and have never come across the popup appearing when loading the browser successfully. Actually more often it is that it can't find xpcom.dll such as yesterday when I tried to launch Thunderbird and got the popup. In that case I was down to about 3 MBs of lower shared memory and once the share memory came back TB launched fine. Dmik has tried to make the popups more informative but it really seems non-trivial.
Generally Mozilla has no problems finding its DLLs as long as it knows where its program directory is, which is why the working directory has to be correctly set at times.
ps by Mozilla I mean all 4 apps (Firefox, SeaMonkey, Thunderbird and InstantBird) that are built here from the same tree.
Title: Re: What program for font preview
Post by: André Heldoorn on January 28, 2017, 05:43:52 am
That's strange and have never come across the popup appearing when loading the browser successfully. Actually more often it is that it can't find xpcom.dll such as yesterday when I tried to launch Thunderbird and got the popup.

Generally Mozilla has no problems finding its DLLs as long as it knows where its program directory is, which is why the working directory has to be correctly set at times.

I haven't retried it, but I should be able to launch FF/SM without a NSPR4.DLL installed, without seeing a pop-up or any PM DLL warning. So it was an unexpected DLL name which popped up. With extremely slow systems and enlarged SWAPPER.DATs a window behind the main window is not unusual, so maybe the CPU load (P4, 2 GB) was 100% for too long. Next time, if any, I'll try to pay more attention to details.

In all (both?) cases the working directory was set okay, including LIBPATHSTRICT and BEGINLIBPATH. Anyway, copying NSPR4.DLL to the FF/SM directory probably won't avoid the pop-up, and trying to avoid the pop-up was the main question. Thank you.
Title: Re: What program for font preview
Post by: Dave Yeo on January 28, 2017, 07:20:29 am
OK, I'm getting forgetful in my old age. I'm a SeaMonkey user (and also use Thunderbird for testing since I seem to be the maintainer) and am using the same SM that I uploaded. I've been basically following Bitwise lead as they're maintaining Gecko (I sure can't) and as they've mostly ignored all my requests/patches I've been sticking to their moves pretty closely, it's too hard to fork with my dial-up connection and I'm not a programmer but would like to meet the licensing requirements such as making source available. My tree is a couple of GBs now.
Anyways what I ended up doing is moving all the missing DLLs, the ones that are now installed in @UNIXROOT/usr/lib such as nspr4 and the nss* ones, from the previous release into my SM program directory. I found it much more stable.