bancika / diy-layout-creator

multi platform circuit layout and schematic drawing tool
http://diy-fever.com
GNU General Public License v3.0
925 stars 101 forks source link

text character width too tight in PDF export #568

Closed htor closed 4 years ago

htor commented 4 years ago

when exporting a layout to PDF the spacing between characters in text appears is too tight - resulting in bad readability, especially when zoomed out.

normal in DIYLC:

Screen Shot 2020-08-16 at 13 31 19 Screen Shot 2020-08-16 at 13 31 22

exported PDF:

Screen Shot 2020-08-16 at 13 31 06 Screen Shot 2020-08-16 at 13 30 59

macos 10.13 diylc 4.7.0

bancika commented 4 years ago

does it happen with any font or only certain ones?

htor commented 4 years ago

some fonts it seems have better spacing and some will have too narrow spacing.

i noticed some group of fonts all result in the same PDF rendering regardless of selected font under edit > project settings. looks like it defaults to some standard PDF font during export in those cases?

for instance selecting .SF NS Text, Menlo or Courier New will convert my canvas text into that font, but exporting will use another "sans serif" looking font, with the above narrow spacing. it looks like the Dialog font is used somtimes by default on drawn text boxes also.

bancika commented 4 years ago

Can you please try the latest preview version and see if it helps? I switched to another vendor for PDF conversion. It's lightweight and allows me to render fonts to vectors, to avoid any interpretation issues and make sure that it's 100% as rendered in the app.

diylc-4.9.0.zip

diylc-4.9.0-osx.zip

htor commented 4 years ago

ah, can't get it to start, it hangs at splash screen:

~/Downloads $ ./DIYLC.app/Contents/MacOS/JavaAppLauncher 
18:34:49,419  INFO [main] ConfigurationManager - Initializing configuration
18:34:49,649  INFO [main] ConfigurationManager - Saving configuration
18:34:49,739  INFO [main] DIYLCStarter - Loading languages...
18:34:49,744  INFO [main] LangUtil - Loading translation for English
18:34:49,759 ERROR [main] LangUtil - Error loading language file
java.nio.file.NoSuchFileException: lang/English.txt
    at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
    at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
    at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
    at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
    at java.nio.file.Files.newByteChannel(Files.java:361)
    at java.nio.file.Files.newByteChannel(Files.java:407)
    at java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:384)
    at java.nio.file.Files.newInputStream(Files.java:152)
    at java.nio.file.Files.newBufferedReader(Files.java:2784)
    at java.nio.file.Files.lines(Files.java:3744)
    at org.diylc.lang.LangUtil.load(Unknown Source)
    at org.diylc.lang.LangUtil.configure(Unknown Source)
    at org.diylc.DIYLCStarter.main(Unknown Source)
18:34:49,761 DEBUG [main] DIYLCStarter - Java version: 1.8.0_261-b12 by Oracle Corporation
18:34:49,761 DEBUG [main] DIYLCStarter - OS: Mac OS X 10.13.6
18:34:49,761  INFO [main] DIYLCStarter - Starting DIYLC with working directory /Users/htor/Downloads
18:34:49,761  INFO [main] DIYLCStarter - Configuration dump start.
18:34:49,761  INFO [main] DIYLCStarter - antiAliasing = true
18:34:49,761  INFO [main] DIYLCStarter - hiQualityRender = false
18:34:49,761  INFO [main] DIYLCStarter - exportGrid = false
18:34:49,761  INFO [main] DIYLCStarter - stickyPoints = false
18:34:49,762  INFO [main] DIYLCStarter - metric = true
18:34:49,762  INFO [main] DIYLCStarter - snapTo = Grid
18:34:49,762  INFO [main] DIYLCStarter - continuousCreation = false
18:34:49,762  INFO [main] DIYLCStarter - wheelZoom = false
18:34:49,762  INFO [main] DIYLCStarter - outline = false
18:34:49,762  INFO [main] DIYLCStarter - showRulers = false
18:34:49,762  INFO [main] DIYLCStarter - showGrid = true
18:34:49,762  INFO [main] DIYLCStarter - highlightContinuityArea = false
18:34:49,762  INFO [main] DIYLCStarter - hardwareAcceleration = true
18:34:49,762  INFO [main] DIYLCStarter - extraSpace = true
18:34:49,762  INFO [main] DIYLCStarter - renumberOnPaste = false
18:34:49,763  INFO [main] DIYLCStarter - defaultTemplatesImported = true
18:34:49,763  INFO [main] DIYLCStarter - defaultBlocksImported = true
18:34:49,763  INFO [main] DIYLCStarter - Configuration dump end.
18:34:49,766 DEBUG [Thread-1] DIYLCStarter - Starting font pre-loading
18:34:49,770 DEBUG [Thread-1] ResourceLoader - Detected OSX bundle path: /Users/htor/Downloads/DIYLC.app
18:34:49,770 DEBUG [Thread-1] ResourceLoader - Looking for files in: /Users/htor/Downloads/DIYLC.app/Contents/Resources/fonts
18:34:49,770  INFO [Thread-1] DIYLCStarter - Dynamically loading font: square721_bt.ttf
18:34:49,943  INFO [main] Presenter - Current DIYLC version: 4.9.0
Exception in thread "main" java.lang.NoSuchMethodError: org.diylc.presenter.Presenter.<init>(Lorg/diylc/core/IView;Lorg/diylc/appframework/miscutils/IConfigurationManager;)V
    at org.diylc.swing.gui.MainFrame.<init>(Unknown Source)
    at org.diylc.DIYLCStarter.main(Unknown Source)
18:34:50,932  INFO [Thread-1] DIYLCStarter - Dynamically loading font: consola.ttf
18:34:50,932  INFO [Thread-1] DIYLCStarter - Dynamically loading font: lucon.ttf
18:34:51,166 DEBUG [Thread-1] DIYLCStarter - Finished font pre-loading
bancika commented 4 years ago

Let's try one more time.

diylc-4.9.0-osx.zip diylc-4.9.0.zip

htor commented 4 years ago

nice! the rendering looks very good now in this build:

Screen Shot 2020-09-16 at 23 26 57 Screen Shot 2020-09-16 at 23 30 12

the problem is gone. tried with a couple of fonts, but no issue with spacing. looks pixel identical!

bancika commented 4 years ago

Cool. Thanks for checking it out. I'll include with the next version.

On Wed, Sep 16, 2020, 11:34 PM htor notifications@github.com wrote:

nice! the rendering looks very good now in this build:

[image: Screen Shot 2020-09-16 at 23 26 57] https://user-images.githubusercontent.com/1709263/93394667-d912bc80-f874-11ea-9fa7-ed62d2cfa71c.png

[image: Screen Shot 2020-09-16 at 23 30 12] https://user-images.githubusercontent.com/1709263/93394676-dca64380-f874-11ea-8dd4-221c4dd6f195.png

the problem is gone. tried with a couple of fonts, but no issue with spacing. looks pixel identical!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bancika/diy-layout-creator/issues/568#issuecomment-693677917, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACXONCPCVZZ7DKIN5SZOLKTSGEVNZANCNFSM4QAZCPAQ .

htor commented 4 years ago

thanks for looking into it