Convert Figma logo to code with AI

Pal3love logoSource-Han-TrueType

TrueType version of Source Han Sans, Source Han Serif and Source Han Mono

1,030
60
1,030
1

Top Related Projects

Source Han Sans | 思源黑体 | 思源黑體 | 思源黑體 香港 | 源ノ角ゴシック | 본고딕

Source Han Serif | 思源宋体 | 思源宋體 | 思源宋體 香港 | 源ノ明朝 | 본명조

Noto CJK fonts

Noto fonts, except for CJK and emoji

Sarasa Gothic / 更纱黑体 / 更紗黑體 / 更紗ゴシック / 사라사 고딕

Quick Overview

The Pal3love/Source-Han-TrueType repository contains a collection of TrueType font files for the Source Han Sans and Source Han Serif typefaces. These fonts are based on the open-source CJK (Chinese, Japanese, and Korean) font project, providing high-quality typographic options for users working with East Asian languages.

Pros

  • Comprehensive Language Support: The fonts cover a wide range of CJK characters, making them suitable for a variety of East Asian language applications.
  • Open-Source Licensing: The fonts are released under the SIL Open Font License, allowing for free use, modification, and distribution.
  • High-Quality Rendering: The TrueType format ensures smooth font rendering across different platforms and applications.
  • Active Maintenance: The repository is actively maintained, with regular updates and improvements to the font files.

Cons

  • Limited Customization: As a font collection, the project does not provide tools for customizing or modifying the font files directly.
  • No Specific Features: The repository does not offer any additional features beyond the font files themselves, such as font management tools or integration with design software.
  • Lack of Documentation: The project's documentation is relatively sparse, which may make it challenging for users to get started or troubleshoot issues.
  • No Versioning: The repository does not provide clear version information for the font files, which can make it difficult to track changes or ensure compatibility.

Getting Started

To use the fonts from the Pal3love/Source-Han-TrueType repository, follow these steps:

  1. Clone the repository to your local machine:
git clone https://github.com/Pal3love/Source-Han-TrueType.git
  1. Navigate to the cloned repository:
cd Source-Han-TrueType
  1. Locate the font files you need, which are organized by font family and weight. For example, to use the Source Han Sans Regular font, you would find the file SourceHanSans-Regular.ttf in the SourceHanSans directory.

  2. Install the font files on your operating system. The process for installing fonts varies depending on your platform, but typically involves double-clicking the font file or using a font management application.

  3. Once the fonts are installed, you can use them in your applications, such as word processors, design software, or web browsers, by selecting the appropriate font from the available options.

Competitor Comparisons

Source Han Sans | 思源黑体 | 思源黑體 | 思源黑體 香港 | 源ノ角ゴシック | 본고딕

Pros of Source-Han-Sans

  • Official Adobe repository with regular updates and maintenance
  • Comprehensive CJK (Chinese, Japanese, Korean) font coverage
  • Available in multiple weights and styles

Cons of Source-Han-Sans

  • Large file size due to extensive character set
  • May require more system resources when rendering

Code Comparison

Source-Han-Sans:

<font-face font-family="Source Han Sans" font-weight="400" font-style="normal">
  <font-face-src>
    <font-face-name name="SourceHanSans-Regular"/>
  </font-face-src>
</font-face>

Source-Han-TrueType:

<font-face font-family="Source Han Sans TrueType" font-weight="400" font-style="normal">
  <font-face-src>
    <font-face-name name="SourceHanSansTrueType-Regular"/>
  </font-face-src>
</font-face>

Key Differences

  • Source-Han-Sans is the official Adobe repository, while Source-Han-TrueType is a community-driven project
  • Source-Han-TrueType focuses on providing TrueType versions of the font, which may have better compatibility with certain systems
  • Source-Han-Sans offers a wider range of weights and styles compared to Source-Han-TrueType
  • Source-Han-TrueType may have smaller file sizes, making it more suitable for web use or systems with limited resources

Source Han Serif | 思源宋体 | 思源宋體 | 思源宋體 香港 | 源ノ明朝 | 본명조

Pros of Source-Han-Serif

  • Official Adobe repository for the Source Han Serif font family
  • Comprehensive CJK (Chinese, Japanese, Korean) character support
  • Regular updates and maintenance from Adobe

Cons of Source-Han-Serif

  • Large file size due to extensive character set
  • May require more system resources when rendering

Code Comparison

Source-Han-TrueType:

# No relevant code available for comparison

Source-Han-Serif:

# Example of font usage in CSS
body {
  font-family: 'Source Han Serif', serif;
}

Summary

Source-Han-Serif is Adobe's official repository for the Source Han Serif font family, offering comprehensive CJK character support and regular updates. However, it comes with larger file sizes and potentially higher resource requirements. Source-Han-TrueType, on the other hand, is a third-party project that may offer optimized TrueType versions of the font, potentially with smaller file sizes but possibly lacking the latest updates or full character support of the official Adobe repository.

Noto CJK fonts

Pros of Noto CJK

  • Broader language support, covering Chinese, Japanese, Korean, and other CJK scripts
  • Regularly updated and maintained by Google, ensuring ongoing improvements and bug fixes
  • Extensive documentation and usage guidelines available

Cons of Noto CJK

  • Larger file sizes due to comprehensive character coverage
  • May require more system resources when rendering complex scripts
  • Less focused on specific optimizations for TrueType hinting

Code Comparison

While both repositories primarily contain font files rather than code, here's a comparison of their directory structures:

Source-Han-TrueType:

/OTF
/TTF
/Subset
README.md

Noto CJK:

/Sans
/Serif
/Mono
/Variable
/Tools
README.md

Source-Han-TrueType focuses on providing TrueType versions of the Source Han fonts, with a simpler directory structure. Noto CJK offers a more diverse range of font styles and includes tools for font manipulation.

Both projects aim to improve CJK font rendering and accessibility, but they take different approaches. Source-Han-TrueType specializes in optimizing TrueType hinting for Source Han fonts, while Noto CJK provides a comprehensive set of fonts for various CJK scripts and styles.

Noto fonts, except for CJK and emoji

Pros of noto-fonts

  • Comprehensive coverage of Unicode scripts and languages
  • Regular updates and maintenance by Google
  • Extensive documentation and community support

Cons of noto-fonts

  • Larger file sizes due to comprehensive character sets
  • May require more system resources for rendering

Code comparison

While both repositories primarily contain font files rather than code, here's a comparison of their directory structures:

noto-fonts:

noto-fonts/
├── hinted/
├── unhinted/
├── alpha/
└── src/

Source-Han-TrueType:

Source-Han-TrueType/
├── OTC/
├── OTF/
└── Subset/

noto-fonts has a more complex structure, separating hinted and unhinted fonts, while Source-Han-TrueType focuses on different font formats and subsets.

Summary

noto-fonts offers a wider range of scripts and languages, with regular updates and strong community support. However, it may have larger file sizes and higher resource requirements. Source-Han-TrueType provides a more focused selection of CJK fonts in various formats, potentially offering smaller file sizes for specific use cases.

Sarasa Gothic / 更纱黑体 / 更紗黑體 / 更紗ゴシック / 사라사 고딕

Pros of Sarasa-Gothic

  • Supports multiple languages and writing systems, including Latin, Greek, Cyrillic, and CJK
  • Offers multiple weights and styles, providing more design flexibility
  • Includes programming-specific ligatures and features for improved readability in code editors

Cons of Sarasa-Gothic

  • Larger file size due to extensive character coverage and multiple styles
  • May require more system resources to render complex glyphs
  • Less focused on optimizing specifically for CJK characters

Code Comparison

While both projects are font-related, they don't contain directly comparable code. However, here's an example of how they might be used in CSS:

Source-Han-TrueType:

@font-face {
  font-family: 'Source Han Sans';
  src: url('SourceHanSans-Regular.ttf') format('truetype');
}

Sarasa-Gothic:

@font-face {
  font-family: 'Sarasa Gothic';
  src: url('sarasa-gothic-regular.ttf') format('truetype');
}

Both fonts can be applied to elements using standard CSS font properties.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

English

思源 TrueType

思源黑体、思源宋体和思源等宽的 TrueType 版本

思源黑体、思源宋体以及思源等宽是由 Adobe 主导开发的开源及跨中日韩地区的多语言字体。这些字体的 OpenType/CFF 文件以及 CID 源文件均由 [SIL 开源字体协议(http://scripts.sil.org/OFL) 授权(另请参阅常见问题)。

本项目在完整保留曲线精度、尺寸和功能的前提下,提供思源所有字体的 **TrueType 版本**。TrueType 格式在 Microsoft Windows、Microsoft Office 以及前端领域的兼容性要优于 OpenType/CFF (OTF) 格式。本项目提供的所有 TrueType 字体均可与思源 OTF 原版无缝替换,无需返工修订设计文稿。

非官方版本

虽然本项目在字体设计和功能性上与 OTF 原版保持一致,但需要指出,此项目并非由 Adobe 官方发布。本项目遵循 SIL 开源字体协议,可免费用于商业用途。

下载与安装

请前往发布页面下载最新版本的压缩包,解压后即可得到 TTF/TTC 字体文件。当前页面的“Code”按钮仅包含转换所需的代码和源文件,不包含 TrueType 字体。

  • macOS
  • Linux
  • Windows
  • Windows 用户请注意:从 Windows 10 1809 开始,Windows 会将字体文件默认安装到用户文件夹下,该行为可能会导致一部分软件找不到字体。建议在字体文件上单击右键,选择“为所有用户安装”,以全局安装。

技术规格

  • OpenType 功能(竖排支持等):完整收录
  • Microsoft Office Style-Link:加粗按钮(B)链接常规与粗体字重
  • **Microsoft Office 字体嵌入**:支持 Word、Excel、PowerPoint 等软件的字体嵌入功能
  • 封装格式:完整版为 TrueType Collection (TTC),子集版为 TrueType (TTF)
  • 曲线格式:二次贝塞尔曲线
  • 曲线精度(UPM):2048,即原版 OpenType/CFF 三次曲线的无损转换
  • **屏显渲染策略**:全字号亚像素抗锯齿(Windows 10 及更新版本)

可变版本

Adobe 官方已提供思源黑体和思源宋体的可变版 TrueType 字体文件,请前往以下发布页面下载。

Adobe 软件的行高过大问题

Adobe 软件(如 Photoshop、Illustrator 等)的行高过大问题是由 OTF 原版字体中的“3 em vertical dash”字符所导致的。思源字体的全局字框为了容纳该字符而撑得很高。本项目与思源 OTF 原版的所有功能保持完全一致,因而不会修改该设计。**如需修正行高的版本,请前往梦源字体系列**。该系列除修正行高之外,更提供了多达 27 个字重的丰富选择。

编译

如需在本地完成转换过程,请参考以下指南。

硬盘空间

脚本将生成约 5 GB 临时文件,加上最终的 ZIP 压缩包共计约 6 GB 总硬盘空间。临时文件将在运行结束时自动删除。

平台依赖

本项目支持 Windows Linux 子系统(WSL)、Linux x86-64(带有 Wine)与 macOS 平台。请先确保以下依赖已安装:

  • Python 3.8 及以上
  • PyPI 包管理(pip)
  • pip install afdko: Adobe Font Development Kit for OpenType (AFDKO)
  • 使用包管理器安装 zip,如 sudo apt install zip(仅供 WSL 和 Linux;macOS 已自带)

OTF 源文件

为节约体积,本仓库不自带原版思源 OTF 字体文件。请前往官方仓库下载 OTF 字体并分别放在 source 目录内的三个子目录内:

执行脚本

  • WSL: cd 进 script 目录后,执行 ./build_ttfs.sh wsl <最大并行数>
  • Linux: cd 进 script 目录后,执行 ./build_ttfs.sh linux <最大并行数>
  • macOS: cd 进 script 目录后,执行 ./build_ttfs.sh mac <最大并行数>
  • 其中,**最大并行数**决定最多并行处理的字体数量。每个字体占用约 1.5 CPU 线程和最多 600 MB 内存,请根据自己的电脑配置酌情选择。譬如,AMD Ryzen 9 3950X 可将此参数设为 28,在内存足够的情况下,可达 97% CPU 使用率。
  • 脚本运行完成后,最终字体的 ZIP 压缩包将位于根目录下新创建的 release 目录内。运行过程中产生的临时文件将会在结束时自动删除。

更多信息

如需获取 Adobe 思源系列字体的设计、使用以及其他信息,请访问以下官方 GitHub 仓库: