Repository: vscode
Issue: Visual Studio Code on Ubuntu displays incorrect characters in languages with diacritical marks
Labels: bug,linux,font-rendering,confirmation-pending


Type: <b>Bug</b>

I have tried changing to various fonts in VSCode such as Consolas, Monospace, and many other monospace fonts. In all cases, they display characters incorrectly. 

The following text will be used to test the display in VSCode:

> Phương pháp sSMC-FCM hồi quy được trình bày ở mục
> \ref{sec:ssmc_fcm_regression} và cách thức dự đoán dung lượng Pin từ
> phương pháp này (mục
> \ref{sec:build_battery_capacity_prediction_model}) sẽ được sử dụng để
> thực hiện thử nghiệm dự đoán dung lượng Pin. So sánh với phương pháp
> này sẽ là các thuật toán học máy khác lần lượt là CatBoost, LightGBM,
> CART, XGBoost, Random Forest và Multi Layer Perceptron.

Here is an example of how VSCode on Ubuntu display Vietnamese characters with Consolas font:

[![enter image description here](https://i.sstatic.net/eAnVqOQv.png)](https://i.sstatic.net/eAnVqOQv.png)

The highlighted words are the ones that are displayed incorrectly. The diacritical marks on these words are misaligned from their correct positions. Below is the same text displayed correctly with Consolas font in Text Editor, the default text editing software on Ubuntu:

[![](https://i.sstatic.net/ylKx440w.png)](https://i.sstatic.net/ylKx440w.png)

I have tried using various fonts, and monospace fonts like Consolas display incorrectly in VSCode. However, when I tried using Times New Roman, VSCode displayed the diacritical marks correctly. Unfortunately, this font does not look very good for writing code. Here is an example of how VSCode on Ubuntu display Vietnamese characters with Consolas font: 

[![enter image description here](https://i.sstatic.net/XSBF7Ccg.png)](https://i.sstatic.net/XSBF7Ccg.png)

How can I fix this issue?


VS Code version: Code 1.91.1 (f1e16e1e6214d7c44d078b1f0607b2388f29d729, 2024-07-09T22:08:12.169Z)
OS version: Linux x64 6.8.0-38-generic
Modes:

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz (8 x 3841)|
|GPU Status|2d_canvas: enabled<br>canvas_oop_rasterization: disabled_off<br>direct_rendering_display_compositor: disabled_off_ok<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>opengl: enabled_on<br>rasterization: enabled<br>raw_draw: disabled_off_ok<br>skia_graphite: disabled_off<br>video_decode: enabled<br>video_encode: disabled_software<br>vulkan: disabled_off<br>webgl: enabled<br>webgl2: enabled<br>webgpu: disabled_off|
|Load (avg)|1, 1, 1|
|Memory (System)|15.39GB (9.57GB free)|
|Process Argv|--crash-reporter-id 78fbf8f4-24dd-44bd-8f16-c5e3ea6900de|
|Screen Reader|yes|
|VM|0%|
|DESKTOP_SESSION|ubuntu|
|XDG_CURRENT_DESKTOP|Unity|
|XDG_SESSION_DESKTOP|ubuntu|
|XDG_SESSION_TYPE|wayland|
</details><details><summary>Extensions (4)</summary>

Extension|Author (truncated)|Version
---|---|---
copilot|Git|1.214.0
copilot-chat|Git|0.17.1
latex-workshop|Jam|10.1.0
vs-keybindings|ms-|0.2.1


</details><details>
<summary>A/B Experiments</summary>

```
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492:30256859
vstes627:30244334
vscorecescf:30445987
vscod805cf:30301675
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
pythongtdpath:30769146
welcomedialog:30910333
pythonnoceb:30805159
asynctok:30898717
pythonregdiag2:30936856
pythonmypyd1:30879173
2e7ec940:31000449
pythontbext0:30879054
accentitlementsc:30995553
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
945dj816:31013170
pythoncenvpt:31062603
a69g1124:31058053
dvdeprecation:31068756
dwnewjupytercf:31046870
legacy_priority:31094926
refactort:31101459
hdi1a554:31097393
wkspc-onlycs-t:31100202

```

</details>

<!-- generated by issue reporter -->