Characters from Korean, Chinese, etc don’t show in txt/md file previews
Open
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
- Create a text file in Korean
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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