A Brief Discussion on Fonts

A while back, I found that Matplotlib couldn’t display Chinese characters properly. While solving the problem, I learned a fair bit about how font rendering works. Here are my notes. 1. Encoding and Fonts We know that to store characters in a computer, we assign a numeric code to each character. This artificial convention is called character encoding. Common encodings include ASCII, GBK, Unicode, and so on. Character encoding is the data representation of characters....

May 5, 2024 · 7 min · 1340 words · Wokron

Introduction to the QEMU Emulator

This article is part of the BUAA Operating Systems course preparatory tutorial. This version was written by me. In 2024, the course lab environment was changed from GXemul to QEMU. To help students adapt to the new environment, two new articles were added to the preparatory tutorial: “GDB: Dissecting Programs” and “Introduction to the QEMU Emulator.” An operating system is a program that runs directly on computer hardware, managing hardware resources below while providing unified services to software above....

January 21, 2024 · 8 min · 1654 words · Wokron

GDB: Dissecting Programs

This article is part of the BUAA Operating Systems course preparatory tutorial. This version was written by me. In 2024, the course lab environment was changed from GXemul to QEMU. To help students adapt to the new environment, two new articles were added to the preparatory tutorial: “GDB: Dissecting Programs” and “Introduction to the QEMU Emulator.” Think back to when you first entered the world of programming. Everyone has had this experience: a carefully written program just won’t produce the correct result, and even after reviewing the code from top to bottom several times, the hidden bug remains elusive....

January 18, 2024 · 16 min · 3402 words · Wokron

Understanding LLVM IR — Start by Writing It by Hand

1. Overview There are several reasons you might want to learn about LLVM. Maybe you’re a tech enthusiast who wants to create a new programming language, or a university student stuck in the quagmire of a compilers course. Whatever the case, you likely want LLVM for just one thing: generating target code. But it’s not an easy journey. You’ve probably already struggled through the compiler frontend, and now another mountain stands before you: LLVM IR....

November 3, 2023 · 24 min · 5002 words · Wokron

A Practical CMake Tutorial

1. Introduction I’ve been working on a C++ project recently and had to learn CMake. Honestly, CMake’s quirky syntax can be quite intimidating at first. But once you get hands-on, you’ll find that only a small subset is needed day-to-day, and it generally follows predictable patterns. Master this subset and you can likely organize a fairly large project. That’s exactly what this tutorial aims to cover. Of course, you’ll need to understand compilation and linking before reading this....

September 3, 2023 · 7 min · 1408 words · Wokron

Test

Article Test A test — the first post I wonder if this can be seen… // this is what a string cat can do. StringCat.new("black").meow(2).jump().sleep(1000);

September 10, 2022 · 1 min · 25 words · Wokron