servo / servo/font-kit

'load_font_table' returns None for BASE table

Open
#182 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
840
Forks
137
Avg merge
4h 56m
Merged PRs (30d)
1

Description

I am trying to use the 'BASE' table in OpenType font and the following code returns None for some reason:

let BASE_TABLE_TAG = 0x62736c6e; // The hex code for BASE
println!("{:?}", font.load_font_table(BASE_TABLE_TAG)); // prints None

I am also curious if font_kit supports a better way to determine the baseline for multiple fonts on the same line. Currently I am using the ascent value in font metrics as the shift from the top to the baseline but different fonts have different ascents and I couldn't figure out a way to align these fonts uniformly.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the linked OpenType BASE specification and tracing the load_font_table path for the BASE tag. Then inspect how font metrics expose ascent and how multiple fonts could share a baseline. Done means the BASE-table behavior is resolved or clearly documented, with a supported approach for consistent baseline alignment.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
desktop-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.