<feed xmlns='http://www.w3.org/2005/Atom'>
<title>emacs/src/sfnt.h, branch scratch/split-package.el</title>
<subtitle>Emacs is the extensible, customizable, self-documenting real-time display editor. 
</subtitle>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/'/>
<entry>
<title>Update copyright year to 2025</title>
<updated>2025-01-01T07:39:17+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2025-01-01T07:39:17+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=4da38c632161867e914b3a13dc760f8019255f94'/>
<id>4da38c632161867e914b3a13dc760f8019255f94</id>
<content type='text'>
Run "TZ=UTC0 admin/update-copyright".
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Run "TZ=UTC0 admin/update-copyright".
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Remove redundant byte-swapping boundary"</title>
<updated>2024-08-03T09:34:32+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2024-08-03T09:34:18+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=8d073823c61017c581a18853c89ec84432018d60'/>
<id>8d073823c61017c581a18853c89ec84432018d60</id>
<content type='text'>
This reverts commit daefd6771a4879bb8e71ea67f69522700155df01.

* src/sfnt.c (sfnt_read_OS_2_table): Restore realignment after
s_family_class, as it occupies byte 32, not 34.  Reported by Pip
Cet &lt;pipcet@protonmail.com&gt;.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit daefd6771a4879bb8e71ea67f69522700155df01.

* src/sfnt.c (sfnt_read_OS_2_table): Restore realignment after
s_family_class, as it occupies byte 32, not 34.  Reported by Pip
Cet &lt;pipcet@protonmail.com&gt;.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove redundant byte-swapping boundary</title>
<updated>2024-04-04T05:52:52+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2024-04-04T05:52:52+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=daefd6771a4879bb8e71ea67f69522700155df01'/>
<id>daefd6771a4879bb8e71ea67f69522700155df01</id>
<content type='text'>
* src/sfnt.c (sfnt_read_OS_2_table):

* src/sfnt.h (struct sfnt_OS_2_table): Don't redundantly realign
after s_family_class.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/sfnt.c (sfnt_read_OS_2_table):

* src/sfnt.h (struct sfnt_OS_2_table): Don't redundantly realign
after s_family_class.
</pre>
</div>
</content>
</entry>
<entry>
<title>; Spelling fixes</title>
<updated>2024-01-31T01:23:25+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2024-01-31T01:09:37+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=17771b2a425e776c81e7454d942ec238264ce12b'/>
<id>17771b2a425e776c81e7454d942ec238264ce12b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Properly instruct Italic Arial or BS Mono at small PPEM sizes</title>
<updated>2024-01-08T07:51:51+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2024-01-08T07:32:07+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=2656d756851d97434da7846a5a30202baafb2241'/>
<id>2656d756851d97434da7846a5a30202baafb2241</id>
<content type='text'>
* src/sfnt.c (sfnt_read_simple_glyph): Correct alignment errors.
(PUSH2_UNCHECKED): Don't shift negative signed value to the
left.
(SLOOP): Permit LOOP to be set to 0, which inhibits the
execution of instructions it affects.
(sfnt_address_zp2, sfnt_address_zp1, sfnt_address_zp0): Permit X
and Y to be NULL.
(sfnt_dot_fix_14): Guarantee that the final value is rounded to
negative infinity, not zero.
(sfnt_project_zp1_zp0_org): New function.
(sfnt_interpret_mdrp): Avoid rounding issues by computing
original distance from unscaled coordinates, if at all possible.
(sfnt_interpret_simple_glyph, sfnt_interpret_compound_glyph_2):
Set zone-&gt;simple.
(all_tests) &lt;LOOP&gt;: Update test.
(sfnt_identify_instruction, main): Adjust tests.

* src/sfnt.h (struct sfnt_interpreter_zone): New field simple.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/sfnt.c (sfnt_read_simple_glyph): Correct alignment errors.
(PUSH2_UNCHECKED): Don't shift negative signed value to the
left.
(SLOOP): Permit LOOP to be set to 0, which inhibits the
execution of instructions it affects.
(sfnt_address_zp2, sfnt_address_zp1, sfnt_address_zp0): Permit X
and Y to be NULL.
(sfnt_dot_fix_14): Guarantee that the final value is rounded to
negative infinity, not zero.
(sfnt_project_zp1_zp0_org): New function.
(sfnt_interpret_mdrp): Avoid rounding issues by computing
original distance from unscaled coordinates, if at all possible.
(sfnt_interpret_simple_glyph, sfnt_interpret_compound_glyph_2):
Set zone-&gt;simple.
(all_tests) &lt;LOOP&gt;: Update test.
(sfnt_identify_instruction, main): Adjust tests.

* src/sfnt.h (struct sfnt_interpreter_zone): New field simple.
</pre>
</div>
</content>
</entry>
<entry>
<title>; Add 2024 to copyright years</title>
<updated>2024-01-02T02:30:05+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2024-01-02T02:30:05+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=070cb32463a8c606bf4384574a6c7ea60167e87d'/>
<id>070cb32463a8c606bf4384574a6c7ea60167e87d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Obey USE_MY_METRICS in compound glyphs</title>
<updated>2023-12-29T06:58:41+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2023-12-29T06:58:19+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=ea3d211f3f7ecc5b59d5affc1aed812a2ded62b0'/>
<id>ea3d211f3f7ecc5b59d5affc1aed812a2ded62b0</id>
<content type='text'>
* src/sfnt.c (struct sfnt_compound_glyph_context): New fields
holding the positions of both phantom points.
(sfnt_decompose_compound_glyph): New argument METRICS_RETURN;
return the metrics of components with USE_MY_METRICS within this
field.
(sfnt_decompose_glyph): New argument METRICS_RETURN, which
serves the same purpose.
(sfnt_build_glyph_outline): Apply glyph advance and origin
distortion to METRICS, and return the metrics as altered by
compound glyphs in there.
(sfnt_lookup_glyph_metrics): Trim away two unused parameters,
PIXEL_SIZE and HEAD, whose functionality has been superseeded by
sfnt_scale_metrics and the implicit scaling the interpreter
performs.
(sfnt_interpret_compound_glyph_2): Save phantom points within
fields provided to that end in CONTEXT.
(sfnt_interpret_compound_glyph_1): Save and source phantom
points for each glyph to and from the context.
(sfnt_test_get_metrics, main): Adjust tests correspondingly.

* src/sfnt.h: Update prototypes.

* src/sfntfont.c (sfntfont_get_metrics): Remove obsolete
parameters.
(sfntfont_get_glyph_outline): Don't change temp by the metrics
distortions, which is now the task of sfnt_decompose_glyph.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/sfnt.c (struct sfnt_compound_glyph_context): New fields
holding the positions of both phantom points.
(sfnt_decompose_compound_glyph): New argument METRICS_RETURN;
return the metrics of components with USE_MY_METRICS within this
field.
(sfnt_decompose_glyph): New argument METRICS_RETURN, which
serves the same purpose.
(sfnt_build_glyph_outline): Apply glyph advance and origin
distortion to METRICS, and return the metrics as altered by
compound glyphs in there.
(sfnt_lookup_glyph_metrics): Trim away two unused parameters,
PIXEL_SIZE and HEAD, whose functionality has been superseeded by
sfnt_scale_metrics and the implicit scaling the interpreter
performs.
(sfnt_interpret_compound_glyph_2): Save phantom points within
fields provided to that end in CONTEXT.
(sfnt_interpret_compound_glyph_1): Save and source phantom
points for each glyph to and from the context.
(sfnt_test_get_metrics, main): Adjust tests correspondingly.

* src/sfnt.h: Update prototypes.

* src/sfntfont.c (sfntfont_get_metrics): Remove obsolete
parameters.
(sfntfont_get_glyph_outline): Don't change temp by the metrics
distortions, which is now the task of sfnt_decompose_glyph.
</pre>
</div>
</content>
</entry>
<entry>
<title>Consistently round glyph advances in the SFNT font backend</title>
<updated>2023-12-26T06:10:57+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2023-12-26T06:07:58+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=cd91ecedcbdf03ae13f45cb173360b11f13a0bc0'/>
<id>cd91ecedcbdf03ae13f45cb173360b11f13a0bc0</id>
<content type='text'>
* src/sfnt.h (SFNT_ROUND_FIXED): New macro.

* src/sfntfont.c (sfntfont_get_glyph_outline): Don't apply
advance width distortion before the glyph is instructed or
decomposed.  Round advance width as measured between both
phantom points subsequent to instruction code execution.
(sfntfont_draw): Don't take the advance's ceiling when advancing
origin point.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/sfnt.h (SFNT_ROUND_FIXED): New macro.

* src/sfntfont.c (sfntfont_get_glyph_outline): Don't apply
advance width distortion before the glyph is instructed or
decomposed.  Round advance width as measured between both
phantom points subsequent to instruction code execution.
(sfntfont_draw): Don't take the advance's ceiling when advancing
origin point.
</pre>
</div>
</content>
</entry>
<entry>
<title>Respect glyph metrics modified by instruction code</title>
<updated>2023-12-23T03:22:21+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2023-12-23T03:22:21+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=9aea075f5fd6e1d6b7f6d7fe35de8f3da752c3e7'/>
<id>9aea075f5fd6e1d6b7f6d7fe35de8f3da752c3e7</id>
<content type='text'>
* src/sfnt.c (sfnt_read_glyph): Clear advance and origin
distortion returning an empty glyph.
(sfnt_build_instructed_outline): New parameter *ADVANCE_WIDTH,
in which the glyph's advance width is saved.
(sfnt_interpret_compound_glyph_1): Refine commentary.
(sfnt_verbose, main): Adjust tests.

* src/sfnt.h: Update prototypes correspondingly.

* src/sfntfont.c (sfntfont_get_glyph_outline): If an instructed
outline is available, derive the advance and lbearing from the
measurements within.
(sfntfont_probe_widths): Call sfntfont_measure_pcm to establish
average widths.
(sfntfont_open): Do so after instruction code initialization
completes.
(sfntfont_measure_pcm): Revise commentary.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/sfnt.c (sfnt_read_glyph): Clear advance and origin
distortion returning an empty glyph.
(sfnt_build_instructed_outline): New parameter *ADVANCE_WIDTH,
in which the glyph's advance width is saved.
(sfnt_interpret_compound_glyph_1): Refine commentary.
(sfnt_verbose, main): Adjust tests.

* src/sfnt.h: Update prototypes correspondingly.

* src/sfntfont.c (sfntfont_get_glyph_outline): If an instructed
outline is available, derive the advance and lbearing from the
measurements within.
(sfntfont_probe_widths): Call sfntfont_measure_pcm to establish
average widths.
(sfntfont_open): Do so after instruction code initialization
completes.
(sfntfont_measure_pcm): Revise commentary.
</pre>
</div>
</content>
</entry>
<entry>
<title>Enable the new font scaler</title>
<updated>2023-12-18T03:10:40+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2023-12-18T03:10:40+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=103f36cced37eed1bb51cd704b0a64b42f7b8144'/>
<id>103f36cced37eed1bb51cd704b0a64b42f7b8144</id>
<content type='text'>
* src/sfnt.c (sfnt_curve_is_flat): Tighten threshold for flat
curves.
(sfnt_insert_raster_step): Rewrite loop for clarity.
(sfnt_poly_set_steps): New function; fill small spans with a
plain unexceptional loop rather than memset.
(sfnt_poly_steps): Call that function.
(sfnt_verbose, main): Adjust tests such that the scaler can be
selected at runtime.

* src/sfnt.h: Update prototypes.

* src/sfntfont.c (sfntfont_get_glyph_raster)
(syms_of_sfntfont) &lt;sfnt_raster_glyphs_exactly&gt;: New variable.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/sfnt.c (sfnt_curve_is_flat): Tighten threshold for flat
curves.
(sfnt_insert_raster_step): Rewrite loop for clarity.
(sfnt_poly_set_steps): New function; fill small spans with a
plain unexceptional loop rather than memset.
(sfnt_poly_steps): Call that function.
(sfnt_verbose, main): Adjust tests such that the scaler can be
selected at runtime.

* src/sfnt.h: Update prototypes.

* src/sfntfont.c (sfntfont_get_glyph_raster)
(syms_of_sfntfont) &lt;sfnt_raster_glyphs_exactly&gt;: New variable.
</pre>
</div>
</content>
</entry>
</feed>
