### Install Font on Linux Source: https://context7.com/justfont/open-huninn-font/llms.txt Provides commands to install the jf open-huninn font on a Linux system. This involves copying the font file to the system's font directory and updating the font cache. Verification is done using `fc-list`. ```bash # Navigate to the font directory cd /path/to/open-huninn-font/font # Copy the latest font to system fonts directory sudo cp jf-openhuninn-2.1.ttf /usr/share/fonts/truetype/ # Update font cache sudo fc-cache -f -v # Verify installation fc-list | grep "jf-openhuninn" # Expected output: /usr/share/fonts/truetype/jf-openhuninn-2.1.ttf: jf open 粉圓,jf open 粉圓 1.1:style=Regular ``` -------------------------------- ### Install Font on macOS Source: https://context7.com/justfont/open-huninn-font/llms.txt Explains how to install the jf open-huninn font on macOS. This can be done by opening the font file with Font Book or by manually copying it to the user's font directory. ```bash # Open the font file with Font Book open ./font/jf-openhuninn-2.1.ttf # Alternatively, copy to user fonts directory cp ./font/jf-openhuninn-2.1.ttf ~/Library/Fonts/ # Verify installation using Font Book or terminal system_profiler SPFontsDataType | grep "jf" ``` -------------------------------- ### Install Font on Windows (PowerShell) Source: https://context7.com/justfont/open-huninn-font/llms.txt A PowerShell script to install the jf open-huninn font on Windows. It copies the font file to the system's Fonts directory and registers it in the Windows registry. ```powershell # PowerShell script to install font $fontPath = "C:\path\to\open-huninn-font\font\jf-openhuninn-2.1.ttf" $fontsFolder = [System.Environment]::GetFolderPath('Fonts') # Copy font to Windows Fonts directory Copy-Item $fontPath -Destination "$fontsFolder\jf-openhuninn-2.1.ttf" # Register font in registry $fontName = "jf open huninn (TrueType)" $registryPath = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts" Set-ItemProperty -Path $registryPath -Name $fontName -Value "jf-openhuninn-2.1.ttf" ``` -------------------------------- ### HTML Usage Example with jf open-huninn Font Source: https://context7.com/justfont/open-huninn-font/llms.txt An example of an HTML page that utilizes the jf open-huninn font. It includes the necessary CSS `@font-face` declaration within the `

jf open 粉圓字體示範

這是一個開源的繁體中文字型,專為臺灣使用者設計。

支援注音符號:ㄅㄆㄇㄈㄉㄊㄋㄌ

臺語拼音:Tâi-gí pheng-im

``` -------------------------------- ### Check Font Metadata with fonttools (Bash) Source: https://context7.com/justfont/open-huninn-font/llms.txt This section provides bash commands to inspect the metadata of the jf open huninn font using the 'fonttools' library. It covers extracting font information, checking character set support, verifying the font version, and listing OpenType features. Ensure 'fonttools' is installed via pip. ```bash # Using fonttools to inspect font metadata pip install fonttools # Extract font information ttx -t name ./font/jf-openhuninn-2.1.ttf # Check supported characters fc-query --format='%{charset}\n' ./font/jf-openhuninn-2.1.ttf # Verify font version otfinfo -v ./font/jf-openhuninn-2.1.ttf # Expected output: Version 2.1 # List all available OpenType features otfinfo -f ./font/jf-openhuninn-2.1.ttf ``` -------------------------------- ### Generate Document with jf open huninn Font (Python) Source: https://context7.com/justfont/open-huninn-font/llms.txt This Python script demonstrates how to create a .docx document using the 'jf open huninn' font. It utilizes the python-docx library to set font properties for headings and paragraphs, including specific characters like Zhuyin. Ensure 'python-docx' and 'jf open huninn' font are installed. ```python # Python script to generate document with jf open huninn from docx import Document from docx.shared import Pt, RGBColor from docx.enum.text import WD_ALIGN_PARAGRAPH # Create new document doc = Document() # Set default font style = doc.styles['Normal'] font = style.font font.name = 'jf open huninn' font.size = Pt(12) # Add content heading = doc.add_heading('使用 jf open 粉圓字體', 0) heading.runs[0].font.name = 'jf open huninn' paragraph = doc.add_paragraph('這是使用 jf open 粉圓字體的示範文件。') paragraph.runs[0].font.name = 'jf open huninn' paragraph.runs[0].font.size = Pt(14) # Add Zhuyin example zhuyin = doc.add_paragraph('注音符號:ㄅㄆㄇㄈㄉㄔㄕㄖㄗㄘㄙ') zhuyin.runs[0].font.name = 'jf open huninn' # Save document doc.save('jf-openhuninn-demo.docx') print("Document created successfully with jf open huninn font") ``` -------------------------------- ### CSS @font-face Declaration for Web Source: https://context7.com/justfont/open-huninn-font/llms.txt Demonstrates how to declare the jf open-huninn font using CSS's `@font-face` rule for web applications. It includes basic declaration, application to body and headings, and an example with Traditional Chinese text. ```css /* Basic @font-face declaration */ @font-face { font-family: 'jf open huninn'; src: url('./font/jf-openhuninn-2.1.ttf') format('truetype'); font-weight: normal; font-style: normal; font-display: swap; /* Improves loading performance */ } /* Apply to Traditional Chinese content */ body { font-family: 'jf open huninn', 'PingFang TC', 'Microsoft JhengHei', sans-serif; font-size: 16px; line-height: 1.8; } /* Specific usage for headings */ h1, h2, h3 { font-family: 'jf open huninn', sans-serif; font-weight: normal; letter-spacing: 0.05em; } /* Example with Chinese text */ .traditional-chinese { font-family: 'jf open huninn', serif; text-align: justify; } ``` -------------------------------- ### Compare Font Versions Character Sets (Python) Source: https://context7.com/justfont/open-huninn-font/llms.txt This Python script compares the character sets of different versions of the jf open huninn font (v1.1, v2.0, v2.1) using the 'fontTools' library. It extracts the supported characters for each version, calculates the differences, and prints the number of characters added in v2.0 and v2.1. This helps in understanding the evolution of glyph coverage across versions. Ensure 'fontTools' is installed. ```python # Python script to compare character sets between versions from fontTools.ttLib import TTFont def get_character_set(font_path): """Extract all supported characters from font""" font = TTFont(font_path) cmap = font['cmap'].getBestCmap() return set(cmap.keys()) # Load all versions v11_chars = get_character_set('./font/jf-openhuninn-1.1.ttf') v20_chars = get_character_set('./font/jf-openhuninn-2.0.ttf') v21_chars = get_character_set('./font/jf-openhuninn-2.1.ttf') # Calculate differences new_in_v20 = v20_chars - v11_chars new_in_v21 = v21_chars - v20_chars print(f"Version 1.1: {len(v11_chars)} characters") print(f"Version 2.0: {len(v20_chars)} characters (+{len(new_in_v20)})") print(f"Version 2.1: {len(v21_chars)} characters (+{len(new_in_v21)})") # Show newly added characters in v2.1 print("\nNew characters in v2.1 (first 50):") for i, code_point in enumerate(sorted(new_in_v21)[:50]): try: char = chr(code_point) print(f"U+{code_point:04X}: {char}", end=" ") if (i + 1) % 10 == 0: print() except: print(f"U+{code_point:04X}: [unprintable]", end=" ") ``` -------------------------------- ### Test Character Support with fontTools (Python) Source: https://context7.com/justfont/open-huninn-font/llms.txt This Python script uses the 'fontTools' library to test if the jf open huninn font supports a specific set of characters, including Traditional Chinese, Zhuyin, Taiwanese Romanization, and Taiwanese Hokkien. It iterates through defined characters, checks their presence in the font's cmap table, and prints the support status. Ensure 'fontTools' is installed. ```python # Python script to test character coverage from fontTools.ttLib import TTFont import sys def check_character_support(font_path, test_chars): """Check if font supports specific characters""" font = TTFont(font_path) cmap = font['cmap'].getBestCmap() results = {} for char in test_chars: code_point = ord(char) results[char] = code_point in cmap return results # Test characters test_chars = [ '繁', '體', '中', '文', # Traditional Chinese 'ㄅ', 'ㄆ', 'ㄇ', 'ㄈ', # Zhuyin 'ā', 'ē', 'ī', 'ō', 'ū', # Taiwanese Romanization '臺', '灣', '客', '語', # Taiwanese Hokkien ] font_path = './font/jf-openhuninn-2.1.ttf' results = check_character_support(font_path, test_chars) print("Character Support Test Results:") print("-" * 40) for char, supported in results.items(): status = "✓ Supported" if supported else "✗ Not Supported" print(f"{char} (U+{ord(char):04X}): {status}") # Expected: All characters should be supported in version 2.1 ``` -------------------------------- ### View Glyph Charts (Bash) Source: https://context7.com/justfont/open-huninn-font/llms.txt This provides bash commands to view the glyph chart PDFs for different versions of the jf open huninn font. It shows how to list available charts and open the latest version using system-specific commands for Linux, macOS, and Windows. This helps in visually inspecting the characters supported by the font. ```bash # Available glyph chart PDFs for each version ls -lh ./glyphs-chart/ # jf-open-huninn-1.1-glyphs-chart.pdf # jf-open-huninn-2.0-glyphs-chart.pdf # jf-open-huninn-2.1-glyphs-chart.pdf # Open latest glyph chart (Linux) xdg-open ./glyphs-chart/jf-open-huninn-2.1-glyphs-chart.pdf # Open on macOS open ./glyphs-chart/jf-open-huninn-2.1-glyphs-chart.pdf # Open on Windows start ./glyphs-chart/jf-open-huninn-2.1-glyphs-chart.pdf ``` -------------------------------- ### List Available Font Versions Source: https://context7.com/justfont/open-huninn-font/llms.txt Lists the different versions of the jf open-huninn font available, including their release dates and character counts. These are provided as TrueType (.ttf) files. ```bash # Version 1.1 - Released April 4, 2020 # Includes 301 Taiwanese and Hokkien characters ./font/jf-openhuninn-1.1.ttf # Version 2.0 - Released March 14, 2023 # Added and adjusted 1,168 characters ./font/jf-openhuninn-2.0.ttf # Version 2.1 - Released September 19, 2024 (Latest) # Added 727 characters to fulfill jf7000 charset ./font/jf-openhuninn-2.1.ttf ``` -------------------------------- ### LaTeX Document Integration with jf open-huninn Font Source: https://context7.com/justfont/open-huninn-font/llms.txt Shows how to integrate the jf open-huninn font into a LaTeX document using `fontspec` and `xeCJK` packages. It requires XeLaTeX or LuaLaTeX and demonstrates setting the main CJK font and applying it within a document structure. ```latex % XeLaTeX or LuaLaTeX required for TrueType fonts \documentclass{article} \usepackage{fontspec} \usepackage{xeCJK} % Set main CJK font to jf open huninn \setCJKmainfont{jf-openhuninn-2.1.ttf}[ Path = ./font/, Extension = .ttf, BoldFont = jf-openhuninn-2.1, ItalicFont = jf-openhuninn-2.1 ] % Alternative: Use font name if system-installed % \setCJKmainfont{jf open huninn} \begin{document} \section{繁體中文排版示範} jf open 粉圓是一個圓體字型,適合用於各種文件排版。 \subsection{特色} \begin{itemize} \item 完整支援臺灣常用字 \item 包含注音符號:ㄅㄆㄇㄈ \item 支援臺客語拼音 \end{itemize} \end{document} ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.