petrvanblokland / TYPETR-Bitcount

Bitcount VF
SIL Open Font License 1.1
3 stars 1 forks source link

"Element layers" #5

Closed simoncozens closed 1 year ago

simoncozens commented 1 year ago

This PR implements the sketch of two overlapping layers, each containing a grid of element shapes, like so:

Screenshot 2023-06-07 at 14 54 21

Each layer can be independently moved and scaled. The layers are not (currently) composited in any clever way; they're just superimposed.

Screenshot 2023-06-07 at 14 59 00Screenshot 2023-06-07 at 14 57 11

We can use PaintComposite to have more fun, if you like.

The elements are defined by glyphs in the Bitcount-LayerElements.ufo file, and then painted into layers in the colrv1.py code. This code has been extensively annotated, so it should be possible for you to edit from here, but I can answer any questions!

petrvanblokland commented 1 year ago

Wow, thank you. I'm gonna play with it. P

On Jun 7, 2023, at 4:10 PM, Simon Cozens @.***> wrote:

This PR implements the sketch of two overlapping layers, each containing a grid of element shapes, like so:

Screenshot.2023-06-07.at.14.54.21.png (view on web) https://github.com/petrvanblokland/TYPETR-Bitcount/assets/106728/90b922e4-3a68-4a1e-ac58-0bfefa8e0ec8 Each layer can be independently moved and scaled. The layers are not (currently) composited in any clever way; they're just superimposed.

Screenshot.2023-06-07.at.14.59.00.png (view on web) https://github.com/petrvanblokland/TYPETR-Bitcount/assets/106728/72bd8371-323c-449d-8773-add456ec1856Screenshot.2023-06-07.at.14.57.11.png (view on web) https://github.com/petrvanblokland/TYPETR-Bitcount/assets/106728/5727a938-1418-41bc-a7d0-dd7eea0a126e We can use PaintComposite to have more fun, if you like.

The elements are defined by glyphs in the Bitcount-LayerElements.ufo file, and then painted into layers in the colrv1.py code. This code has been extensively annotated, so it should be possible for you to edit from here, but I can answer any questions!

You can view, comment on, or merge this pull request online at:

https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5

Commit Summary

3f159b9 https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5/commits/3f159b94bb079a9cfa070a223ae7603b947427d8 Narrate the COLRv1 paints file a8e293e https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5/commits/a8e293e1db5864c6a744ce4bea5a4690ca2a2f53 Add glyphs from LayerElements.ufo to the default master 3ef3052 https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5/commits/3ef3052a31e285e92ea5f9262594a7de028db643 New two-layer paints 4436f7b https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5/commits/4436f7b78a421686185828ddbf5b5675051f50d8 Generated files 574f7ae https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5/commits/574f7aef0d764a4fbbd73973fbdb6eb84989d4f8 Add paints to all glyphs, not just subset File Changes (15 files https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5/files) M sources/scriptsLib/init.py https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5/files#diff-89c71e513fc59b0e5d1256345b50a1357afa3ccc170006ece2c79e18ccab3997 (7) M sources/scriptsLib/colrv1.py https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5/files#diff-bb7c0e83bc61bad96b0f51dbc7578e355550608ef067117409b26c6a881a8103 (363) M sources/scriptsLib/glyphData.py https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5/files#diff-c481a8130fd8ad88fea00e3a021cf9bf6ec08d59c08d590b46e592390dee24bf (7) M sources/scriptsLib/make.py https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5/files#diff-1d032ffa8fbb8d8f8e179f4dd9f7496c0a7569b33f7f95b24920b84e886b15d7 (7) A sources/ufo/Bitcount-LayerElements.ufo/fontinfo.plist https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5/files#diff-9f68918ed2d3159eb515b4b0952b3f29fa22f06ebabb7b787e1aa4d13d005e40 (46) A sources/ufo/Bitcount-LayerElements.ufo/glyphs/circle.glif https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5/files#diff-70b54a4574031bcea251a9b7f082d702e3487da984e55b73597b447cf904d605 (26) A sources/ufo/Bitcount-LayerElements.ufo/glyphs/contents.plist https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5/files#diff-132acac44c41a20c7d7361df5fa9d24870cc79749f1397e6dd5a55d97889d6b3 (14) A sources/ufo/Bitcount-LayerElements.ufo/glyphs/square.glif https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5/files#diff-d5ad11ffb883079993377bb9158b24e30e456c7fb03ae7aa2c744a6c27852608 (18) A sources/ufo/Bitcount-LayerElements.ufo/glyphs/stripe.glif https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5/files#diff-6dff82c9a647d138247036cc6e944a6e95f16ed49f72e233065b6e77973ac467 (18) A sources/ufo/Bitcount-LayerElements.ufo/glyphs/zigzag.glif https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5/files#diff-0bbbffece9d8e59cbfcf331a94e3fb770e1e6ecbf8ea71b4236a0293dda13323 (42) A sources/ufo/Bitcount-LayerElements.ufo/layercontents.plist https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5/files#diff-1b9f79c434f3db79cb36747b6b5fa6e065bdfa5f63ffe1045a65cd8f1d2409ba (10) A sources/ufo/Bitcount-LayerElements.ufo/lib.plist https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5/files#diff-f84856961daeabe88d322582e3892719b98f901822e966b920671166bab7c9ea (30) A sources/ufo/Bitcount-LayerElements.ufo/metainfo.plist https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5/files#diff-133c4b2b3e3151c94c730a7cae92089c9c5b4e0ab22208d1e56baf4f65a415ee (10) M sources/vf/Bitcount_Mono_Double4-COLRv1-009.ttf https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5/files#diff-ca538157b75c1db9dcdac503f8084a41824cd8167419388ad553fbd98bcee5d7 (0) M sources/vf/Bitcount_Mono_Double4-COLRv1-009_COLRv1.ttf https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5/files#diff-03f991004b305b27b8a22af562087b27ea2a53b2d6e84163bc4b7a13485528d3 (0) Patch Links:

https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5.patch https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5.diff — Reply to this email directly, view it on GitHub https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAC4DQIQSY23633IFU3UI3TXKCDT7ANCNFSM6AAAAAAY555DXU. You are receiving this because you are subscribed to this thread.


Petr van Blokland Mastodon @. Instagram @petrvanblokland Intentionally not on FaceBook since 1990 and Twitter stopped. @. | designdesign.space | typetr.com mobile +31 6 24 219 502

Claudia Mens | @.*** mobile +31 6 41 367 689

Rotterdamseweg 150-d 2628 AP Delft The Netherlands

petrvanblokland commented 1 year ago

Testing on your generated VF, there seems to be an offset difference between the pixels and the /canvas The area in the white square of the /canvas should be the same as what is visible in the pixels. Scale max should become larger, but I'll figure that out when playing with it. This helps a lot, thank you. P

On Jun 7, 2023, at 4:10 PM, Simon Cozens @.***> wrote:

This PR implements the sketch of two overlapping layers, each containing a grid of element shapes, like so:

Screenshot.2023-06-07.at.14.54.21.png (view on web) https://github.com/petrvanblokland/TYPETR-Bitcount/assets/106728/90b922e4-3a68-4a1e-ac58-0bfefa8e0ec8 Each layer can be independently moved and scaled. The layers are not (currently) composited in any clever way; they're just superimposed.

Screenshot.2023-06-07.at.14.59.00.png (view on web) https://github.com/petrvanblokland/TYPETR-Bitcount/assets/106728/72bd8371-323c-449d-8773-add456ec1856Screenshot.2023-06-07.at.14.57.11.png (view on web) https://github.com/petrvanblokland/TYPETR-Bitcount/assets/106728/5727a938-1418-41bc-a7d0-dd7eea0a126e We can use PaintComposite to have more fun, if you like.

The elements are defined by glyphs in the Bitcount-LayerElements.ufo file, and then painted into layers in the colrv1.py code. This code has been extensively annotated, so it should be possible for you to edit from here, but I can answer any questions!

You can view, comment on, or merge this pull request online at:

https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5

Commit Summary

3f159b9 https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5/commits/3f159b94bb079a9cfa070a223ae7603b947427d8 Narrate the COLRv1 paints file a8e293e https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5/commits/a8e293e1db5864c6a744ce4bea5a4690ca2a2f53 Add glyphs from LayerElements.ufo to the default master 3ef3052 https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5/commits/3ef3052a31e285e92ea5f9262594a7de028db643 New two-layer paints 4436f7b https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5/commits/4436f7b78a421686185828ddbf5b5675051f50d8 Generated files 574f7ae https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5/commits/574f7aef0d764a4fbbd73973fbdb6eb84989d4f8 Add paints to all glyphs, not just subset File Changes (15 files https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5/files) M sources/scriptsLib/init.py https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5/files#diff-89c71e513fc59b0e5d1256345b50a1357afa3ccc170006ece2c79e18ccab3997 (7) M sources/scriptsLib/colrv1.py https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5/files#diff-bb7c0e83bc61bad96b0f51dbc7578e355550608ef067117409b26c6a881a8103 (363) M sources/scriptsLib/glyphData.py https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5/files#diff-c481a8130fd8ad88fea00e3a021cf9bf6ec08d59c08d590b46e592390dee24bf (7) M sources/scriptsLib/make.py https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5/files#diff-1d032ffa8fbb8d8f8e179f4dd9f7496c0a7569b33f7f95b24920b84e886b15d7 (7) A sources/ufo/Bitcount-LayerElements.ufo/fontinfo.plist https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5/files#diff-9f68918ed2d3159eb515b4b0952b3f29fa22f06ebabb7b787e1aa4d13d005e40 (46) A sources/ufo/Bitcount-LayerElements.ufo/glyphs/circle.glif https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5/files#diff-70b54a4574031bcea251a9b7f082d702e3487da984e55b73597b447cf904d605 (26) A sources/ufo/Bitcount-LayerElements.ufo/glyphs/contents.plist https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5/files#diff-132acac44c41a20c7d7361df5fa9d24870cc79749f1397e6dd5a55d97889d6b3 (14) A sources/ufo/Bitcount-LayerElements.ufo/glyphs/square.glif https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5/files#diff-d5ad11ffb883079993377bb9158b24e30e456c7fb03ae7aa2c744a6c27852608 (18) A sources/ufo/Bitcount-LayerElements.ufo/glyphs/stripe.glif https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5/files#diff-6dff82c9a647d138247036cc6e944a6e95f16ed49f72e233065b6e77973ac467 (18) A sources/ufo/Bitcount-LayerElements.ufo/glyphs/zigzag.glif https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5/files#diff-0bbbffece9d8e59cbfcf331a94e3fb770e1e6ecbf8ea71b4236a0293dda13323 (42) A sources/ufo/Bitcount-LayerElements.ufo/layercontents.plist https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5/files#diff-1b9f79c434f3db79cb36747b6b5fa6e065bdfa5f63ffe1045a65cd8f1d2409ba (10) A sources/ufo/Bitcount-LayerElements.ufo/lib.plist https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5/files#diff-f84856961daeabe88d322582e3892719b98f901822e966b920671166bab7c9ea (30) A sources/ufo/Bitcount-LayerElements.ufo/metainfo.plist https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5/files#diff-133c4b2b3e3151c94c730a7cae92089c9c5b4e0ab22208d1e56baf4f65a415ee (10) M sources/vf/Bitcount_Mono_Double4-COLRv1-009.ttf https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5/files#diff-ca538157b75c1db9dcdac503f8084a41824cd8167419388ad553fbd98bcee5d7 (0) M sources/vf/Bitcount_Mono_Double4-COLRv1-009_COLRv1.ttf https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5/files#diff-03f991004b305b27b8a22af562087b27ea2a53b2d6e84163bc4b7a13485528d3 (0) Patch Links:

https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5.patch https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5.diff — Reply to this email directly, view it on GitHub https://github.com/petrvanblokland/TYPETR-Bitcount/pull/5, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAC4DQIQSY23633IFU3UI3TXKCDT7ANCNFSM6AAAAAAY555DXU. You are receiving this because you are subscribed to this thread.


Petr van Blokland Mastodon @. Instagram @petrvanblokland Intentionally not on FaceBook since 1990 and Twitter stopped. @. | designdesign.space | typetr.com mobile +31 6 24 219 502

Claudia Mens | @.*** mobile +31 6 41 367 689

Rotterdamseweg 150-d 2628 AP Delft The Netherlands

simoncozens commented 1 year ago

Yeah, for some reason the pixels and the canvas are only the same when the scale is at default. I haven't been able to fix that, but I figured the canvas is mainly for debugging anyway.

You can change the max scale in the scale_factor and scale_factor2 variables.