ONLYOFFICE / DocumentServer

ONLYOFFICE Docs is a free collaborative online office suite comprising viewers and editors for texts, spreadsheets and presentations, forms and PDF, fully compatible with Office Open XML formats: .docx, .xlsx, .pptx and enabling collaborative editing in real time.
https://www.onlyoffice.com
GNU Affero General Public License v3.0
4.86k stars 1.09k forks source link

Custom fonts printing problem (Korean languange) #2668

Closed KhristoforovEvgenii closed 4 months ago

KhristoforovEvgenii commented 7 months ago

This issue is unique.

Operating System of DocumentServer

Docker

Version information

7.0-ee

Expected Behavior

  1. Сustom fonts should not affect the printing of default fonts
  2. Custom fonts should be shown in print window

Actual Behavior

I have a problem loading certain custom fonts, here they are

When adding any of these fonts, when printing a document, Korean characters are not displayed even in the standard font as in the screenshot (Arial) Product Roadmaps

I also have a problem with other fonts, they are installed and visible in the editor window, but they also disappear in the print window (but do not cause the same problem as I described above). Here examples of these fonts Product Roadmaps (2) But some fonts work correctly, for example this work font.zip

Reproduction Steps

Issue that breaks default fonts:

  1. Put some font from Broken fonts into /usr/share/fonts/custom/ directory in container
  2. Type some korean word, e.g. 안녕하세요 (with default font, e.g. Arial)
  3. Open print window

Issue that doesn't show custom fonts:

  1. Put some font from example fonts archive into /usr/share/fonts/custom/ directory in container
  2. Type some word (with custom font)
  3. Open print window

Additional information

No response

TatianaKirillova commented 7 months ago

Hello @KhristoforovEvgenii ! Thank you for your request. I can't reproduce your problem. Please indicate the ONLYOFFICE editor version, OS and browser you are using. If possible, please also attach the file that reproduces the problem

KhristoforovEvgenii commented 7 months ago

@TatianaKirillova hello! This is my setup:

  1. Running by docker-compose with onlyoffice/documentserver-ee:7.0 image
  2. Browser Google Chrome 122.0.6261.128
  3. Archive with broken fonts: Broken.fonts.zip
TatianaKirillova commented 7 months ago

@KhristoforovEvgenii Thank you!

TatianaKirillova commented 7 months ago

@KhristoforovEvgenii In version 8.0.1 the problem does not recur. For reliability of verification, please send the docx file itself, where the text disappears when printed

KhristoforovEvgenii commented 7 months ago

@TatianaKirillova here is the file example file.docx Thank you!

TatianaKirillova commented 7 months ago

@KhristoforovEvgenii In version 8.0.1. your file is displayed correctly when printed. Need to update version

image

KhristoforovEvgenii commented 7 months ago

@TatianaKirillova thank you for the info! I just tried to deploy document server version 8.0.1 with this configuration:

  onlyoffice-documentserver:
    image: onlyoffice/documentserver:8.0.1
    container_name: onlyoffice-documentserver
    depends_on:
      - onlyoffice-postgresql
      - onlyoffice-rabbitmq
    environment:
      - DB_TYPE=postgres
      - DB_HOST=onlyoffice-postgresql
      - DB_PORT=5432
      - DB_NAME=onlyoffice
      - DB_USER=onlyoffice
      - AMQP_URI=amqp://guest:guest@onlyoffice-rabbitmq
      # Uncomment strings below to enable the JSON Web Token validation.
      - JWT_ENABLED=false
      #- JWT_SECRET=secret
      #- JWT_HEADER=Authorization
      #- JWT_IN_BODY=true
    ports:
      - '88:88'
      - '443:443'
    stdin_open: true
    restart: always
    stop_grace_period: 60s
    volumes:
       - /var/www/onlyoffice/Data
       - /var/log/onlyoffice
       - /var/lib/onlyoffice/documentserver/App_Data/cache/files
       - /var/www/onlyoffice/documentserver-example/public/files
       - ./broken_fonts:/usr/share/fonts/truetype/custom

  onlyoffice-rabbitmq:
    container_name: onlyoffice-rabbitmq
    image: rabbitmq
    restart: always
    expose:
      - '5672'

  onlyoffice-postgresql:
    container_name: onlyoffice-postgresql
    image: postgres:9.5
    environment:
      - POSTGRES_DB=onlyoffice
      - POSTGRES_USER=onlyoffice
      - POSTGRES_HOST_AUTH_METHOD=trust
    restart: always
    expose:
      - '5432'

but the error persisted. (cleared browser cache). image

May be I miss something?

TatianaKirillova commented 7 months ago

@KhristoforovEvgenii I was able to reproduce the problem! I created issue #67095 for your problem.

KhristoforovEvgenii commented 7 months ago

@TatianaKirillova nice! Thank you very much

TatianaKirillova commented 4 months ago

Hello @KhristoforovEvgenii ! The problem with the words not being printed in a certain font is that you do not have permissions for the fonts on that server. The problem is solved with the command: chmod 646 /usr/share/fonts/truetype/custom/*

Rita-Bubnova commented 4 months ago

I close this issue. Feel free to comment or reopen it if you got further questions.