bluewaysw / pcgeos

#FreeGEOS source codes. The offical home of the PC/GEOS operating system technology. For personal computing fans. For all developers and assembly lovers. For YOU!
Apache License 2.0
659 stars 83 forks source link

TTF driver: printing in PS file incorrect with some fonts #603

Closed nschulux closed 1 month ago

nschulux commented 1 month ago

I have replaced Nimbus Sans with Hinting Info but now it's printed faulty in PS file. Perhaps Kerning faulty ? Original Font make same fault.

Font in previous Version was printed correcty in PS file.

New Font with Hinting: image

Old Font : image

jirkakunze commented 1 month ago

The font Nimbus Sans Regular in the repository has no kerning table. I assume you have added kerning information to your version of the font. Can you post your version of the font here to analyze it?

nschulux commented 1 month ago

Old Font that Works. nimbsre.zip

How can i see if Kerning is in the Font ? Original TTF Font (no Fontquirrel) makes same fault.

jirkakunze commented 1 month ago

Not all fonts are affected: grafik

affected:

@nschulux With which version of the TTF driver (creation date) did you successfully test the scenario?

nschulux commented 1 month ago

I am not sure when we testet , but I am not sure if we tested the Printing.

I have sayed to Falk that some Fonts have Fault prints.

The Nimbus Sans that is OK has no Hintings.

I Attache you the Font.

I can't see the Kerning Info.

If I print toPS with Postscipt kompatibel that Works so:

Fonts are from here:

ArtifexSoftware/urw-base35-fonts: Repo for URW++ base 35 font set (github.com)

from Nico

Am 16.07.2024 um 10:58 schrieb Jirka Kunze @.***>:

Not all fonts are affected: grafik.png (view on web)

affected: Nimbus Sans (has no kerning table) NYT Franklin (has no kerning table) Century 59 (has no kerning table) Cooper* Black (has no kerning table) Futura (has kerning)

@nschulux With which version of the TTF driver (creation date) did you successfully test the scenario?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.

nschulux commented 1 month ago

Could it be the Hinting information that makes this Error ?

I can't add kerning I can not work with fonts.

from Nico

Am 15.07.2024 um 22:55 schrieb Jirka Kunze @.***>:

The font Nimbus Sans Regular in the repository has no kerning table. I assume you have added kerning information to your version of the font. Can you post your version of the font here to analyze it?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.

nschulux commented 1 month ago

I have now found a way to solve the Issue , with FontForge I open the ttf and has created a Codepage Geos. Only Nimbus Sans no chance it was terrible slow in the Help so i used Nimbus SansL changed the Name and this works. I cant see if there is Kerning but they have Hinting information. Create the Font from source and print now with GhostScript to PS correctly. image

nschulux commented 1 month ago

Now i have seen Fonts print not always in Bold : image image In Geowrite they are displayed correctly ! Fonts also in Windows shown correctly ! Checked all Font Subfamilies are OK. The Printed PS Files are differently : PS-File Nimbus Sans : SPM newpath [1 0 0 1 57 57] SOT [ [(Das ist ein Test) {0 0 0 SGC } 0 /X520020 false 12 [1.125 0 0 1 0 0] ] ] 0 87.9258 0 45 DSG

X520020 contains Font-characters : /X520020 exch definefont pop

PS-File: Mono SPM newpath [1 0 0 1 57 57] SOT [ [(Das ist ein Test) {0 0 0 SGC } 0 /Courier-Bold true 12 [1 0 0 1 0 0] ] ] 0 115.125 0 44 DSG

jirkakunze commented 1 month ago

As I only have a little information, I can only speculate. The print with Nimbus Sans looks as if the style bold and bold/italic were calculated by the driver. This may be because these styles were not found. If I remember correctly, you have renamed the Nimbus Sans L font to Nimbus Sans. This could be the problem, because the font family name is used to create the font ID. If the styles have a different family name (a typing error is enough), then a different font ID is also calculated and for GEOS this is then a different font.

I do not understand the sense or purpose of this renaming. Why is it a problem if the font is called Nimbus Sans L?

nschulux commented 1 month ago

In PC/GEOS Geowrite the Font is shown correctly the rename was better to replace URW Sans and Displays correct in the Font Tool. It was also Falk who found this better. image

nschulux commented 1 month ago

I have tried the Nimbus SanL without modifiecations : image

nschulux commented 1 month ago

Here the two PS files NMONO4.PS and NSANS4.PS look inside with TextEditor at my advice the PS Driver doesen't handle the Bold not correctly. spoolPS.zip

jirkakunze commented 1 month ago

Problem found why the horizontal position is not correct when printing PS. I hope I can submit a PR for this at the weekend.

nschulux commented 1 month ago

Great Work !!! With wich Font You tested ? With them in the Build ? Should I close the PR with Updated Fonts ! What is with the BOLD in PS Printing ?

jirkakunze commented 1 month ago

I have tested the fix with different fonts (Futura, original Nimbus Sans L, Cooper*Black, PT Mono, PT Sans). Unfortunately, the incorrect printing of the bold style has not been corrected. I have not yet investigated where this problem is. After correcting the horizontal position when printing, I will continue to work on the problem in the bytecode interpreter. If the bytecode interpreter runs in the driver, the driver is functionally complete and I can continue with bug fixes and optimizations.

nschulux commented 1 month ago

Please test the Font Nimbus Sans from ArtifexSoftware/urw-base35-fonts: Repo for URW++ base 35 font set this I found look better in Bold.