<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ghostty.git/src/font/nerd_font_codegen.py, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/ghostty.git/'/>
<entry>
<title>fix(font): Additional scale group tweaks (#9152)</title>
<updated>2025-10-12T02:48:08+00:00</updated>
<author>
<name>Daniel Wennberg</name>
<email>daniel.wennberg@gmail.com</email>
</author>
<published>2025-10-12T02:48:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/ghostty.git/commit/?id=2e34f4e0e574612c7bae4730325e57a4154236b9'/>
<id>2e34f4e0e574612c7bae4730325e57a4154236b9</id>
<content type='text'>
Of course #9142 would require a minor follow-up!

* Scale groups can cut across patch sets, but not across fonts. We had
some scale group mixing between Font Awesome and the weather symbols,
which is removed by this PR.[^cp_table_full]
* There's one case where a scale group includes a glyph that's not part
of any patch sets, just for padding out the group bounding box.
Previously, an unrelated glyph from a different font would be pulled in.
Now we use an appropriate stand-in. (See code comment for details.)
* I noticed overlaps weren't being split between each side of the
bounding box, they were added to both sides, resulting in twice as much
padding as specified.

Screenshots showing the extra vertical padding for progress bar elements
due to the second bullet point:

**Before**
&lt;img width="191" height="42" alt="Screenshot 2025-10-11 at 15 33 54"
src="https://github.com/user-attachments/assets/cf288cce-86d3-46fd-ae86-18e5c274b0e4"
/&gt;

**After**
&lt;img width="191" height="42" alt="Screenshot 2025-10-11 at 15 33 20"
src="https://github.com/user-attachments/assets/7ac799c7-bf50-4e65-a74a-f8a2c42d2441"
/&gt;

[^cp_table_full]: Forming and using the merged `cp_table_full` table
should have been a red flag. Such a table doesn't make sense, it would
be a one-to-many map. You need the names of the original fonts to
disambiguate.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Of course #9142 would require a minor follow-up!

* Scale groups can cut across patch sets, but not across fonts. We had
some scale group mixing between Font Awesome and the weather symbols,
which is removed by this PR.[^cp_table_full]
* There's one case where a scale group includes a glyph that's not part
of any patch sets, just for padding out the group bounding box.
Previously, an unrelated glyph from a different font would be pulled in.
Now we use an appropriate stand-in. (See code comment for details.)
* I noticed overlaps weren't being split between each side of the
bounding box, they were added to both sides, resulting in twice as much
padding as specified.

Screenshots showing the extra vertical padding for progress bar elements
due to the second bullet point:

**Before**
&lt;img width="191" height="42" alt="Screenshot 2025-10-11 at 15 33 54"
src="https://github.com/user-attachments/assets/cf288cce-86d3-46fd-ae86-18e5c274b0e4"
/&gt;

**After**
&lt;img width="191" height="42" alt="Screenshot 2025-10-11 at 15 33 20"
src="https://github.com/user-attachments/assets/7ac799c7-bf50-4e65-a74a-f8a2c42d2441"
/&gt;

[^cp_table_full]: Forming and using the merged `cp_table_full` table
should have been a red flag. Such a table doesn't make sense, it would
be a one-to-many map. You need the names of the original fonts to
disambiguate.</pre>
</div>
</content>
</entry>
<entry>
<title>font(fix): Extract and apply Nerd Font codepoint mapping table (#9142)</title>
<updated>2025-10-11T20:12:13+00:00</updated>
<author>
<name>Daniel Wennberg</name>
<email>daniel.wennberg@gmail.com</email>
</author>
<published>2025-10-11T20:12:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/ghostty.git/commit/?id=4af93975ed69ade2fcb4a915bab7d81dcbd5ebb8'/>
<id>4af93975ed69ade2fcb4a915bab7d81dcbd5ebb8</id>
<content type='text'>
Fixes #9076

**Before** 
&lt;img width="128" height="57" alt="Screenshot 2025-10-11 at 00 07 09"
src="https://github.com/user-attachments/assets/a6b416d5-dae1-4cea-a836-00640ceaf39b"
/&gt;

**After**
&lt;img width="128" height="57" alt="Screenshot 2025-10-11 at 00 07 31"
src="https://github.com/user-attachments/assets/7d2df7b1-4767-4e2d-84d2-8301da5c6602"
/&gt;

These screenshots show the chevrons mentioned in
https://github.com/ghostty-org/ghostty/discussions/7820#discussioncomment-14617170,
which should be scaled as a group but were not until this PR.

The added code downloads each individual symbol font file from the Nerd
Fonts github repo (making sure to get the version corresponding to the
vendored `font-patcher.py`) and iterates over all of them to build the
correct and complete codepoint mapping table. The table is saved to
`nerd_font_codepoint_tables.py`, which `nerd_font_codegen.py` will reuse
if possible instead of downloading the font files again.

I'm not going to utter any famous last words or anything, but... after
this, I don't think the number of remaining issues with icon
scaling/alignment is _large._</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #9076

**Before** 
&lt;img width="128" height="57" alt="Screenshot 2025-10-11 at 00 07 09"
src="https://github.com/user-attachments/assets/a6b416d5-dae1-4cea-a836-00640ceaf39b"
/&gt;

**After**
&lt;img width="128" height="57" alt="Screenshot 2025-10-11 at 00 07 31"
src="https://github.com/user-attachments/assets/7d2df7b1-4767-4e2d-84d2-8301da5c6602"
/&gt;

These screenshots show the chevrons mentioned in
https://github.com/ghostty-org/ghostty/discussions/7820#discussioncomment-14617170,
which should be scaled as a group but were not until this PR.

The added code downloads each individual symbol font file from the Nerd
Fonts github repo (making sure to get the version corresponding to the
vendored `font-patcher.py`) and iterates over all of them to build the
correct and complete codepoint mapping table. The table is saved to
`nerd_font_codepoint_tables.py`, which `nerd_font_codegen.py` will reuse
if possible instead of downloading the font files again.

I'm not going to utter any famous last words or anything, but... after
this, I don't think the number of remaining issues with icon
scaling/alignment is _large._</pre>
</div>
</content>
</entry>
<entry>
<title>Handle font_patcher codepoint range overlaps</title>
<updated>2025-10-03T20:50:11+00:00</updated>
<author>
<name>Daniel Wennberg</name>
<email>daniel.wennberg@gmail.com</email>
</author>
<published>2025-09-22T07:59:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/ghostty.git/commit/?id=78f1bf18071db54f16651aec0295387028658959'/>
<id>78f1bf18071db54f16651aec0295387028658959</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Handle font_patcher codepoint offsets</title>
<updated>2025-10-03T20:50:11+00:00</updated>
<author>
<name>Daniel Wennberg</name>
<email>daniel.wennberg@gmail.com</email>
</author>
<published>2025-09-22T07:55:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/ghostty.git/commit/?id=44951d9b1c8b1dddba5abd5e146dbcd15cc8c69b'/>
<id>44951d9b1c8b1dddba5abd5e146dbcd15cc8c69b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Skip patchsets and codepoints not in SymbolsNF</title>
<updated>2025-10-03T20:50:11+00:00</updated>
<author>
<name>Daniel Wennberg</name>
<email>daniel.wennberg@gmail.com</email>
</author>
<published>2025-09-22T07:16:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/ghostty.git/commit/?id=d07237fff5f2ad7e5526f7b6c91a299ef83554ab'/>
<id>d07237fff5f2ad7e5526f7b6c91a299ef83554ab</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add font_patcher's grouped vs individual alignment</title>
<updated>2025-10-03T20:50:11+00:00</updated>
<author>
<name>Daniel Wennberg</name>
<email>daniel.wennberg@gmail.com</email>
</author>
<published>2025-09-06T23:57:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/ghostty.git/commit/?id=a1b7ea2e712b225f74afdb889baf15f50805c5b2'/>
<id>a1b7ea2e712b225f74afdb889baf15f50805c5b2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Rewrite constraint code for improved icon scaling/alignment</title>
<updated>2025-09-29T19:09:21+00:00</updated>
<author>
<name>Daniel Wennberg</name>
<email>daniel.wennberg@gmail.com</email>
</author>
<published>2025-09-07T02:21:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/ghostty.git/commit/?id=e3ebdc79756985ee541b6b1ed402da596b39318b'/>
<id>e3ebdc79756985ee541b6b1ed402da596b39318b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>font: constrain dingbats</title>
<updated>2025-09-04T00:01:40+00:00</updated>
<author>
<name>Qwerasd</name>
<email>qwerasd205@users.noreply.github.com</email>
</author>
<published>2025-09-04T00:01:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/ghostty.git/commit/?id=24647288519117a0841e4824f8663598810483bc'/>
<id>24647288519117a0841e4824f8663598810483bc</id>
<content type='text'>
This was a regression, we were giving dingbats an extra cell of
constraint width but not actually applying constraints to them.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was a regression, we were giving dingbats an extra cell of
constraint width but not actually applying constraints to them.
</pre>
</div>
</content>
</entry>
<entry>
<title>font: use non-mono symbols nerd font for embedded symbols</title>
<updated>2025-07-25T18:41:00+00:00</updated>
<author>
<name>Qwerasd</name>
<email>qwerasd205@users.noreply.github.com</email>
</author>
<published>2025-07-25T18:41:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/ghostty.git/commit/?id=92fa2228e9effa18a695dbb8b739f17077a9600a'/>
<id>92fa2228e9effa18a695dbb8b739f17077a9600a</id>
<content type='text'>
I changed my mind, this is a pretty small change and relevant to the
intent of the PR. This brings the appearance of the embedded symbols
much closer to patched fonts.

With this, the sizes of most symbols are nearly identical to a patched
font, the only big difference is positioning (and TBH I think we do a
better job positioning than the patcher does, since we have knowledge
about the cell size).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I changed my mind, this is a pretty small change and relevant to the
intent of the PR. This brings the appearance of the embedded symbols
much closer to patched fonts.

With this, the sizes of most symbols are nearly identical to a patched
font, the only big difference is positioning (and TBH I think we do a
better job positioning than the patcher does, since we have knowledge
about the cell size).
</pre>
</div>
</content>
</entry>
<entry>
<title>font: add scale groups to nerd font constraints</title>
<updated>2025-07-08T18:00:22+00:00</updated>
<author>
<name>Qwerasd</name>
<email>qwerasd205@users.noreply.github.com</email>
</author>
<published>2025-07-08T18:00:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/ghostty.git/commit/?id=8b8e0bedadf2c4c4b2b08f9c78a0c333c358a68b'/>
<id>8b8e0bedadf2c4c4b2b08f9c78a0c333c358a68b</id>
<content type='text'>
We do this by characterizing the shared bounding boxes in a static copy
of the symbols only nerd font when we're doing the codegen. This allows
us to get results of our scaling that are just as good as in a patched
font, since related glyphs can now be sized and positioned relative to
each other.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We do this by characterizing the shared bounding boxes in a static copy
of the symbols only nerd font when we're doing the codegen. This allows
us to get results of our scaling that are just as good as in a patched
font, since related glyphs can now be sized and positioned relative to
each other.
</pre>
</div>
</content>
</entry>
</feed>
