nextcloud / nextcloud/server

Characters from Korean, Chinese, etc don’t show in txt/md file previews

Open
#4,198 26 comments 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop 28-feedback bug feature: language/translations (l10n/i18n) feature: previews and thumbnails
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

Steps to reproduce
  1. Create a text file in Korean
  2. Preview image has broken fonts because the default OpenSans-Regular.ttf has no Korean fonts
Expected behaviour

There should be a way to specify a user font file for TXT preview in config.php. Something like $CONFIG['fontFile']

Actual behaviour

Broken text in preview or I have to modify lib/private/Preview/TXT.php to point $fontFile to a user font file.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with lib/private/Preview/TXT.php and the config.php setting described in the issue to understand how TXT previews select their font. Verify the behavior with Korean or Chinese text, then confirm that the preview renders those characters using a configurable font file without breaking existing previews.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.