arduino / arduino/Arduino

Chinese font width error when using third party font

Open
#10,933 1 comment 0 reactions 0 assignees View on GitHub
Component: IDE Type: Bug
Dominant language
Java
Stars
14.6k
Forks
7k
PR merge metrics
No merged PRs in 30d

Description

Hi,
When I change default font to some third party font
such as
`editor.font=Source Code Pro,plain,13`
and
`editor.font=JetBrains Mono,plain,13`
in `preferences.txt`, Chinese font width(2 English character width) narrowed, but display as expected.
When selecting Chinese text, the highlight width is only one English character width.
![img](https://user-images.githubusercontent.com/55868015/98440548-57ccfd00-2134-11eb-88b4-97a5162e2114.png)

```
Arduino IDE version: 1.8.13 (also tested in the nighty version)
Operating system: Archlinux
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue in Arduino IDE 1.8.13 on Arch Linux using preferences.txt with Source Code Pro and JetBrains Mono. Start by tracing the editor's font measurement and text-selection highlighting behavior; done means Chinese selection highlights span the displayed two-character width with third-party fonts.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.