Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การแก้ไขปัญหา >> ข้อผิดพลาด Windows

วิธี Rebuild Font Cache บน Windows 10 เพื่อแสดงผลเร็วและถูกต้อง

Font Cache ทำงานคล้าย Icon Cache Windows สร้าง Cache สำหรับ Fonts เพื่อโหลดเร็วและแสดงผลบน Interface ของ App, Explorer ฯลฯ หาก Font Cache เสียหาย (Corrupted) Fonts อาจแสดงผลผิด หรือแสดง Invalid Font Characters ใน Windows 10 ต้อง Rebuild Font Cache ซึ่งในโพสต์นี้จะสอนวิธีทำ

ไฟล์ Font Cache เกิดอยู่ที่: C:\Windows\ServiceProfiles\LocalService\AppData\Local\FontCache ไม่สามารถเข้าถึงโฟลเดอร์นี้โดยตรงได้ เพราะ Windows ป้องกัน Fonts ถูก Cache ในหลายไฟล์ในโฟลเดอร์นี้

Rebuild Font Cache in Windows 10

สร้าง Restore Point ก่อน

วิธีที่ 1: Rebuild Font Cache ด้วยตนเอง (Manual)

  1. Win+R > services.msc Enter
  2. เลื่อนหา Windows Font Cache Service (กด W บนคีย์บอร์ดเพื่อหาเร็ว)
  3. คลิกขวา Windows Font Cache Service > Properties
  4. กด Stop ตั้ง Startup Type = Disabled
  5. Apply > OK
  6. ทำซ้ำขั้นตอน 3-5 สำหรับ Windows Presentation Foundation Font Cache 3.0.0.0
  7. เข้าโฟลเดอร์ทีละขั้น (อย่าคัดลอก Path เพราะ Windows ป้องกัน):
    C:\Windows\ServiceProfiles\LocalService\AppData\Local
    ต้อง Double-click แต่ละโฟลเดอร์ คลิก Continue เพื่อเข้า
  8. ในโฟลเดอร์ Local ลบไฟล์ทุกไฟล์ที่ชื่อขึ้นต้น FontCache และนามสกุล .dat
  9. ดับเบิลคลิกโฟลเดอร์ FontCache ลบเนื้อหาทั้งหมด
  10. ลบไฟล์ FNTCACHE.DAT จาก C:\Windows\System32\
  11. Reboot PC
  12. หลัง Reboot เริ่ม Service ทั้ง 2 ตัว และตั้ง Startup Type = Automatic:
    Windows Font Cache Service
    Windows Presentation Foundation Font Cache 3.0.0.0
  13. เสร็จสิ้น Rebuild Font Cache in Windows 10

ถ้ายังเห็น Invalid Characters หลัง Restart ต้อง Repair Windows 10 ด้วย DISM

วิธีที่ 2: Rebuild Font Cache ด้วย BAT File

  1. เปิด Notepad Copy & Paste โค้ดนี้:
    @echo off :: Stop and disable "Windows Font Cache Service" service :FontCache sc stop "FontCache" sc config "FontCache" start=disabled sc query FontCache | findstr /I /C:"STOPPED" if not %errorlevel%==0 (goto FontCache) :: Grant access rights to current user for "%WinDir%\ServiceProfiles\LocalService" folder and contents icacls "%WinDir%\ServiceProfiles\LocalService" /grant "%UserName%":F /C /T /Q :: Delete font cache del /A /F /Q "%WinDir%\ServiceProfiles\LocalService\AppData\Local\FontCache\*FontCache*" del /A /F /Q "%WinDir%\System32\FNTCACHE.DAT" :: Enable and start "Windows Font Cache Service" service sc config "FontCache" start=auto sc start "FontCache"
  2. Notepad Menu > File > Save as
  3. Save as type: All Files File name: Rebuild_FontCache.bat (ต้องมี .bat)
  4. Save ที่ Desktop
  5. ดับเบิลคลิก Rebuild_FontCache.bat รัน แล้ว Reboot PC