Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify the GetGlyph() interface to ensure that const2bit works properly #46

Merged
merged 2 commits into from
Oct 19, 2024

Conversation

sago35
Copy link
Member

@sago35 sago35 commented Oct 17, 2024

Use Glypher inteface for cases where different rendering, such as const2bit, is required.
No heap allocations occur.
Additionally, this change makes const2bit available. (#43)

Use Glypher for cases where different rendering, such as const2bit, is required
This further modifies the changes made in 05eb156
No heap allocations occur
Additionally, this change makes const2bit available
@sago35
Copy link
Member Author

sago35 commented Oct 17, 2024

For example, you can create a font using const2bit as shown below.
Since it's a 2-bit font, you'll generally need a display with 4 or more colors.

$ go run ./cmd/tinyfontgen-ttf --size 16 --verbose ./_fonts/NotoSansJP-Regular.otf

https://fonts.google.com/noto/specimen/Noto+Sans+JP

tinyfont.go Show resolved Hide resolved
@sago35
Copy link
Member Author

sago35 commented Oct 18, 2024

I believe it was originally ready for review, but after a self-check, I only made corrections to func GetGlyph. Everything else should be fine.

@deadprogram deadprogram changed the base branch from release to dev October 19, 2024 10:24
@deadprogram
Copy link
Member

OK got it. Thanks for the improvement @sago35 now merging.

Note that I switched this PR to dev branch.

@deadprogram deadprogram merged commit e5ee53c into dev Oct 19, 2024
1 check passed
@deadprogram deadprogram deleted the glypher branch October 19, 2024 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants