haashemi.dev – Telegram
haashemi.dev
105 subscribers
38 photos
2 files
50 links
Personal channel

Contact: @Byfron
Website: https://haashemi.dev
Download Telegram
🫥 How fonts actually work?

🫥 To implement the Writer in the right way, I should have some knowledge about them first.

🧊 So, I'll share interesting/useful things here.

stdlib packages:
—— x/image/font
—— x/image/font/opentype
—— x/image/font/sfnt

Docs, Articles, blogs, etc.
—— Naming table (OpenType)
—— Naming table Example
—— FreeType Glyph Conventions

🔹 This post will be edited until I start the implementation.

.
Please open Telegram to view this post
VIEW IN TELEGRAM
4🤡3👍1🔥1111
⭐️ Where are fonts stored? (mostly)

🔹 Windows: [source]
C:\Windows\Fonts

🔹 MacOS: [source]
~/Library/Fonts/
/Library/Fonts/
and some cutsom dirs? (doesn't matter)

🔹 Linux: [source]
No one knows how this shit works, but:
/usr/share/fonts
/usr/local/share/fonts
~/.local/share/fonts

.
🤡44👍2👎1111
Realtime Colors

🔹 You may already know it. But I finally used it tonight, and it's so damn good!

🪄 https://www.realtimecolors.com

.
🤡75👎1111
⭐️ TGO is now stable!

🔹| Its Bot API is now on v7.0 (which was released just ~3 hours ago!)

🔹| Almost all of its methods and types are fully documented (thanks to the contributors)

🤪| And ready to use in production!

🪄 https://github.com/haashemi/tgo
Please open Telegram to view this post
VIEW IN TELEGRAM
10👍1111
Painter is now using NRGBA

Yesterday, I've been trying to do a color conversion on some images [here]. Everything seemed to be right, except the output images. (see the example image)

After about an hour of struggling with the code, I found out that it's because of Golang's PNG encoder!

🔸 but why? Well, the Go team has already described it (way better than I possibly could) in their blog post at the end of the Colors and Color Models section.

🪄 Blogpost: https://go.dev/blog/image

🎨 Painter
5211
🐔 For some reason, we reached Level 10...

🪄 https://news.1rj.ru/str/HaashemiDev?boost
Please open Telegram to view this post
VIEW IN TELEGRAM
13642111
⚡️ Painter is getting faster!

🔹 Drawing methods will be +1.3 times faster after doing some API changes. (more details, soon)

🔹 The change is planned to be pushed within the next week. 😂

🪄 [github.com/haashemi/painter]
Please open Telegram to view this post
VIEW IN TELEGRAM
32221
⚡️ Painter v0.1.0 released!

🔹 This update came for just two reasons:
More simplicity
More performance

🔥 Release notes: [CLICK HERE]

🪄 [Painter]
Please open Telegram to view this post
VIEW IN TELEGRAM
432211111
⚡️ Painter's Writer: Soon.

🔹 Issue: [CLICK HERE]

🪄 [Painter]
Please open Telegram to view this post
VIEW IN TELEGRAM
22221
⚡️ Conic Gradient added to Painter!

🔹 Well... Yeah, the implementation of Writer has been cancelled, but Painter will still get its updates!

🔸 Its performance is the same as linear gradient; on the R9 5900HS, it is ~10ms for a single 1920x1080 image.

🔻 There are still a few small differences in the orientations compared to Adobe Photoshop, but it works for now! (I have to do research about it for sure.)

🪄 [Painter]
Please open Telegram to view this post
VIEW IN TELEGRAM
4411
⚡️ TGO v1.0.1 released!

🔹 Release notes:
https://github.com/haashemi/tgo/releases/tag/v1.0.1

🪄 [TGO]
Please open Telegram to view this post
VIEW IN TELEGRAM
5411
Bezier_curves.pdf
491.4 KB
👍 A maybe useful PDF about Bezier curves I've found at [here] from [here].
Please open Telegram to view this post
VIEW IN TELEGRAM
5111
🤪 They did it!

🪄 https://go.dev/doc/go1.22
Please open Telegram to view this post
VIEW IN TELEGRAM
6221
⚡️ TGO v1.1.0 released!

🔹 TGO's API has been updated to Bot API v7.1

🪄 [TGO]
Please open Telegram to view this post
VIEW IN TELEGRAM
6321
😼 بالاخره بازگشتیم!

👍 پس از گذروندن هزار و یک جور مسائل (IRL)، بالاخره موفق شدم بایندینگ harfbuzz رو به یک جایی برسونم!

😃 متن تصویر بالا، تماما به واسطه بایندینگ harfbuzz در زبان Go (متاسفانه CGO) نوشته شده!

😐 اگه بخوایم جزئی‌نگر تر باشیم، گرادینتِ بک‌گراند با پکیج painter انجام شده، سپس کار های مربوط به متن، فونت، shaping و حتی اجرای توابع Rasterizer (پکیج vector گو) تماما توسط harfbuzz انجام شده!!

❤️ توسعه‌ی این دو پکیج در مراحل خیلی اولیه‌ی خودشون به سر می‌برن و راه درازی تا حتی "عرضه‌ی اولیه" دارن.

🥺 با این‌حال خودم هم مشتاق خروجی نهایی‌ام و مایلم ببینم تا چه حد می‌تونم خودم رو در روند توسعه این پکیج به چالش بکشم.

.
Please open Telegram to view this post
VIEW IN TELEGRAM
1131111
⚡️ Writer is getting ready

🔹 What's writer?
— Writer is an easy-to-use Harfbuzz wrapper to write any text on images.

🔹 I decided to make it as simple as possible, but also make it flexible enough to add more and more features to it instead of basic one-line text writing. (bi-directional texts are planned too)

❤️ Any feedbacks? comment bellow!
Please open Telegram to view this post
VIEW IN TELEGRAM
51111
haashemi.dev
bi-directional texts are planned
⚡️ Bidi text support is done!

🔹 Loading fonts, creating faces, getting basic text bounds, writing on image with bidi support are all done!

❤️ I'll try to publish it by the end of this week (a little code cleanup is required), and hopefully I can add more features to it to make it as advanced as possible while keeping its API simple in the near future.

‌‌‌‌
Please open Telegram to view this post
VIEW IN TELEGRAM
44211111
⚡️ Writer comes with image-as-color support!

🔹 Using standard Go's font package, you are able to pass an image instead of a color for your text. The good news is that you can do the same thing with writer too!

🥺 I also changed its API a little, I'll talk about that later.

Please open Telegram to view this post
VIEW IN TELEGRAM
622
⚡️ Writer is now publicly available!

🔹 Writer is a simple and easy-to-use package to write texts on images.

🔹 Its goal is to make writing any text in any language possible with least effort, without even depending on multiple packages! writer tries its best to do it all for you.

❤️ From now on, I'm looking for everyone's feedback!

🪄 https://github.com/haashemi/writer
⭐️ Giving a star is highly appreciated
Please open Telegram to view this post
VIEW IN TELEGRAM
5433
⚡️ OpenType features support added to Writer!

🔹 Now you can use any OpenType feature you want! Most of the common features have already been added to the package!

🪄 https://github.com/haashemi/writer
Please open Telegram to view this post
VIEW IN TELEGRAM
6