Lỗi font chữ trong visual studio 2023 fontfamily
Visual studio code (VSC) đang là một trong những text editor được ưa chuộng nhất bởi nó kế thừa được các điểm mạnh của các editors khác như Sublime Text, Vim,... và có những tính năng rất tuyệt vời của riêng mình. Tuy vẫn còn một số điểm yếu về tốc độ (khi so với Sublime Text hoặc Vim), nhưng những tiện ích mà VScode mang lại vẫn khiến nó là lựa chọn gần như tốt nhất cho các lập trình viên hiện nay. Mình đã từng sử dụng qua khá nhiều những text editors và ide như Sublime, Vim, Atom hay Webstorm, chúng đều là những công cụ rất mạnh mẽ, nhưng lại tồn tại những khuyết điểm mà mình khá khó chấp nhận: Sublime nhanh nhưng khả năng hỗ trợ các ngôn ngữ hiện đại chưa tốt và có vẻ ít phát triển thêm, Vim thì hơi khó dùng, Atom thì mình cảm giác hơi chậm, Webstorm khiến mình hài lòng nhất nhưng lại phải crack :v. Vscode chính là text editors có thể khác phục những điều đó và ngày hôm nay, mình sẽ cùng với các bạn cài đặt và cấu hình vscode để có thể làm việc với nó một cách thoải mái nhất. Let's start! Cài đặtTheo mình biết thì hiện tại, VSC đã hỗ trợ đầy đủ các hệ điều hành phổ biến như Linux, Windows, Mac, ở đây, mình đang dùng hệ điều hành Linux nên sẽ minh họa quá trình cài đặt trên hệ điều hành này, quá trình cài đặt trên hệ điều hành khác cũng tuơng tự
Các cấu hình cơ bảnMặc định, khi cài xong, vscode đã rất đầy đủ chức năng rồi và bạn có thể code luôn. Tuy nhiên, đối với một đứa (khá) lười và thích ide đẹp như mình (và hi vọng các bạn cũng thế) thì có khá nhiều việc phải làm. Mình sẽ list ra các đầu việc sau đây để chúng ta có thể hình dung được những bước cần làm:
Thiết lập fontMặc định thì font của vscode theo mình khá xấu (hoặc do mình dùng quen font khác rồi). 2 fonts mình thấy đẹp và dùng ổn nhất là Source Code Pro và Pragmata Pro (mình thích Source Code Pro hơn một chút vì đồng bộ luôn với Terminal của mình và do nó được support bởi Adobe nên dùng rất chuẩn và ít bị lỗi) Để thiết lập fonts, các bạn làm như sau:
Ok, fonts như vậy với mình là ổn, các bạn kỹ tính hơn có thể đọc ở Default Settings của VScode để có thể tìm được những cài đặt nâng cao hơn I have some source files that have comments written in Japanese. When I open these files in Visual Studio they appear like this:
I am using the English version of WinXP, but is there a way to get Visual Studio to display the actual Japanese characters rather than the random jibberish it currently is? asked Oct 16, 2008 at 22:40 1 Presumably VS is interpreting the file with the wrong encoding. Reopen it using "File -> Open -> File... -> Open -> Open With... -> Source Code (Text) Editor With Encoding" and try various encodings. answered Oct 16, 2008 at 22:44 2 I found a general solution to the problem. This worked for me in Chinese text for Visual Studio 2013 and Windows 8.1. per https://msdn.microsoft.com/en-us/library/ms246590.aspx
answered Jul 6, 2015 at 15:05 puziopuzio 611 silver badge1 bronze badge 1 Have you turned on support for Eastern languages for Windows? I have that turned on and I can see Chinese characters in Visual Studio 2005 on WinXP. To turn it on you'll probably need the installation DVD for Windows. The setting is under Regional and Language Options in the Control Panel. I think you just need to check the "Install files for East Asian languages" option. Microsoft's support page for internationalization has some screenshots and instructions. answered Oct 16, 2008 at 22:45 ryan_sryan_s 7,8663 gold badges28 silver badges28 bronze badges 1 I faced the same issue and have found a solution that works for me. The problem is that the files aren't unicode and VS is trying to open them with an encoding that matches your location. Luckily, you can set Windows default behavior for non-unicode files. Check out this link, http://msdn.microsoft.com/en-us/library/ms246590.aspx. Look under "To correctly display characters that are not included in the current code page." These directions are incorrect for Windows 8 (I can't speak for 7 or older.) For Windows 8:
Most of your programs should continue to function in English as this setting is only applied when programs and files don't support unicode. answered Jul 10, 2014 at 17:44 DubiousPusherDubiousPusher 1,1422 gold badges8 silver badges19 bronze badges i have just gotten this problem and fixed it by changing config "files.encoding" in file "setting.json" . Go to Menu => File => Reference => setting to open the file. Search for "files.encoding" and change value to Encoding of your file (my file encoded in Shift-JIS , i checked ending by using Notpad++) answered Sep 14, 2017 at 1:28 Windows 10 : --> Control Panel\Clock and Region\Region Bugs 4,4999 gold badges32 silver badges41 bronze badges answered Sep 6, 2018 at 4:46 You can also convert the text encoding to UTF-8 using Notepad++.
It should now display correctly regardless of local region. answered Aug 8, 2019 at 14:53 You need to encoding file to UTF-8 BOM (not UTF-8) in Notepad++. After that, you can use your file in visual studio. It's work for me. |