fiatjaf
ba42ca42e2
fix sitemap url.
...
closes https://github.com/fiatjaf/njump/issues/27
2023-12-29 18:09:28 -03:00
Daniele Tonon
37a05bf2a4
Improve dynamic font size calculation in text-image
2023-12-29 14:51:22 +01:00
Daniele Tonon
8d6b3f5cd9
Merge branch 'use-go-text-typesetting'
2023-12-29 13:42:53 +01:00
Daniele Tonon
83cb6f4cc1
Add dynamic font resizing for <140 chars notes
2023-12-28 23:16:03 +01:00
Daniele Tonon
f748b99eb1
Show cut gradient at the text-image bottom only if necessary
2023-12-28 23:00:22 +01:00
Daniele Tonon
89ed30c1ec
Fix different Telegram padding in the text-image
2023-12-28 21:40:10 +01:00
Daniele Tonon
6c85d22962
Render author name using drawText() to support emoji
2023-12-28 21:22:49 +01:00
fiatjaf
0940f0f981
this requires a variation of go-text/typesetting that exposes .Codepoint
2023-12-28 16:27:23 -03:00
fiatjaf
46a4891048
use emojiBuffer as the rule and make mainBuffer adapt to it, removing glyphs as necessary.
2023-12-28 16:22:18 -03:00
fiatjaf
f06badf393
trying to remove unused glyphs from mainBuffer since they got merged in emojiBuffer.
2023-12-28 15:39:44 -03:00
fiatjaf
bfb1477ce6
fix newline replacer code and remove \t and \r before rendering.
2023-12-28 09:03:14 -03:00
fiatjaf
e17b3e2b45
fix emojiMask not working correctly.
...
its index was being reset for each wrapped line thus not corresponding to the actual position in the full paragraph content anymore.
basically if the emojiMask was [false, false, false, true, false] for "abc🔛 d" but that text was split in two lines like:
"abc
🔛 d"
then the emojiMask would be read at 0, 1, 2, then 0, 1.
now that is fixed.
2023-12-28 06:48:14 -03:00
fiatjaf
a500e7bb79
add cyrillic and make latin/unknown be just the fallback, not compete against other scripts in the identification race.
2023-12-27 20:57:45 -03:00
fiatjaf
1a154f57e9
use fiatjaf/emoji for IsEmoji().
2023-12-27 19:19:18 -03:00
fiatjaf
7d604c4c86
use go build instead of go run in just dev.
2023-12-27 10:53:42 -03:00
fiatjaf
16d8d49747
just check-samples opens chromium with images and pages from samples.txt
2023-12-27 10:53:22 -03:00
fiatjaf
6f9ca1862f
just check-samples opens chromium with images and pages from samples.txt
2023-12-27 10:52:58 -03:00
fiatjaf
9f30fbeac9
document the mess we made with the font rendering stuff.
2023-12-26 22:16:31 -03:00
fiatjaf
1022fb76fa
successfully mixing in a normal font + the emoji font for some runes only through a myriad of weird hacks.
2023-12-26 22:08:24 -03:00
fiatjaf
9be417fc7c
bring in HarfbuzzShaper into code as a function so we can modify it.
2023-12-26 19:38:27 -03:00
fiatjaf
124dc390d4
basically revert the previous commit.
2023-12-26 11:05:40 -03:00
fiatjaf
86f6a09ea3
using a custom RunIterator that takes emojis into account and shapes them with a different font.
...
it doesn't actually work since the different outputs returned are treated by LineWrapper as necessarily belonging to different lines, so we'll have to do something different.
2023-12-26 11:02:45 -03:00
fiatjaf
b8600ba205
add syriac, hindi, add default language and direction maps based on script.
2023-12-25 23:42:18 -03:00
fiatjaf
fff2b84090
use "regular" NotoSansJP.
2023-12-25 23:27:23 -03:00
fiatjaf
28d7a73adf
shorten URLs when rendering text image so they don't use all the space.
2023-12-25 23:27:23 -03:00
fiatjaf
3d20906bab
use go build instead of go run in just dev.
2023-12-25 23:27:23 -03:00
fiatjaf
1044c31900
fix script matching bug.
2023-12-25 23:27:23 -03:00
fiatjaf
a7b56f046b
rendering everything with nice script and language detection and font-picking.
2023-12-25 23:27:23 -03:00
fiatjaf
5df944705e
use go-text/typesetting library to render text better: rendering farsi.
2023-12-25 23:27:09 -03:00
Daniele Tonon
f478d17219
Fix handling of ?/# separators in media regexps
2023-12-25 19:07:58 +01:00
Daniele Tonon
3455eb38a3
Reduce the width of the text-image cache element to keep it out of view
2023-12-25 18:43:28 +01:00
Daniele Tonon
d790729fb6
Optimize masking for long author names
2023-12-24 22:38:22 +01:00
Daniele Tonon
bb3cfc1157
Add a cut gradient to author name if it's too long
2023-12-24 19:06:08 +01:00
Daniele Tonon
ee076ef22b
Fix text-image date position for Twitter
2023-12-24 18:58:31 +01:00
Yasuhiro Matsumoto
ba7261eee8
Safely close databases
2023-12-24 14:05:09 -03:00
Yasuhiro Matsumoto
5e40dc96ba
fix typos
2023-12-24 14:04:48 -03:00
Daniele Tonon
572e9f2974
Fix text-image bar rendering for Twitter
2023-12-24 17:27:43 +01:00
fiatjaf
9c1a7c0ee9
upgrade eventstore.
2023-12-24 07:50:51 -03:00
Daniele Tonon
83a7fc6e69
Use a custom url for CSS when deploy to bypass the cache
2023-12-24 09:16:44 +01:00
fiatjaf
a7213289ea
do not fail everything just because fetching the author picture failed.
2023-12-23 20:54:41 -03:00
Daniele Tonon
a95f13d176
Fix images rendering
2023-12-24 00:39:32 +01:00
fiatjaf
857adab3f5
more detail in image rendering error.
2023-12-23 19:17:33 -03:00
fiatjaf
ba15931747
stop excluding wss://relay.noswhere.com since it is perfectly fine for nip19.
2023-12-23 18:28:50 -03:00
fiatjaf
f79cb1e9a2
get rid of shouldUseRelayForNip19(), use isntRealRelay().
2023-12-23 18:28:23 -03:00
fiatjaf
d24cbc8e81
get rid of false positives for isntRealRelay() by not eliminating the path from the relay URL.
2023-12-23 18:27:48 -03:00
Daniele Tonon
8074a38d89
Optimize empty lines in the preview text image
2023-12-21 16:46:48 +01:00
Daniele Tonon
58f265c4e2
Fix text-image profile position for Twitter
...
S
S
s
s
s
2023-12-21 16:45:06 +01:00
Daniele Tonon
89a1bb3104
Update text-image design with the author's details and the event date
2023-12-21 14:35:22 +01:00
fiatjaf
6ba71d8485
remove nostrmo, nozzle, plasma android; add plebstr, freefrom ios.
2023-12-20 09:19:52 -03:00
TsukemonoGit
25c6e0b121
update nostter URL
2023-12-20 09:19:39 -03:00