Search found 21 matches

by qwdqwqwffqw
Wed Mar 20, 2024 2:02 pm
Forum: Support and Development
Topic: Why fonts look different on LOVE than on web browser?
Replies: 5
Views: 1168

Re: Why fonts look different on LOVE than on web browser?

Oh, sorry for not providing any examples & code. Here is an example with Segoe UI TTF file(system font. file could be found in C:\Windows\Fonts), but similar difference could be found in other font files including OTF ones. 1. A paragraph from love2d github page(I added "/" for better ...
by qwdqwqwffqw
Wed Mar 13, 2024 12:05 am
Forum: Support and Development
Topic: [SOLVED] Question about Tilemap
Replies: 3
Views: 695

Re: Question about Tilemap

I think error is because of using "=" instead of "==", in "if tile = 11 then"?
by qwdqwqwffqw
Tue Mar 12, 2024 11:37 pm
Forum: Support and Development
Topic: Why fonts look different on LOVE than on web browser?
Replies: 5
Views: 1168

Why fonts look different on LOVE than on web browser?

It's nothing really problematic, but I've been wondering why same font(+ same size & same text) looks different on Love, than on web browser, pdf viewer, etc. The text rendered in love seems to have same heights but narrower width. After several testing, I noticed it's not only letter spacing &a...
by qwdqwqwffqw
Wed May 31, 2023 2:10 pm
Forum: Support and Development
Topic: Font kerning not working (and mouse cursor control)
Replies: 4
Views: 976

Re: Font kerning not working (and mouse cursor control)

love 12 has much better glyph/text positioning in love.graphics.print and friends than previous versions for a lot of fonts, since it uses Harfbuzz for text shaping. But that new text shaping doesn't really match with the concept of computing glyphs independently and adding together offsets and ker...
by qwdqwqwffqw
Fri May 26, 2023 10:21 pm
Forum: Support and Development
Topic: Font kerning not working (and mouse cursor control)
Replies: 4
Views: 976

Re: Font kerning not working (and mouse cursor control)

After still getting same result(kerning=0) with your suggested font file, I found out that it only happens in 12.0 version(in-development version). And yes, it works well in 11.4 released version.
Binary search would be definitely better option. Thanks for the help!
by qwdqwqwffqw
Fri May 26, 2023 9:55 am
Forum: Support and Development
Topic: Font kerning not working (and mouse cursor control)
Replies: 4
Views: 976

Font kerning not working (and mouse cursor control)

Hi. I'm trying to make editable text box in LOVE. In order to place cursor and select texts with mouse, calculating which character x position of mouse cursor lays on is necessary. However, font:getKerning() function doesn't seem to be working. It always returns zero, even when font:getWidth() of tw...
by qwdqwqwffqw
Wed Nov 30, 2022 6:45 pm
Forum: Support and Development
Topic: [Solved] FFI Safety?
Replies: 6
Views: 2037

Re: FFI Safety?

That clears up all my questions. Appreciate your help!! :ultrahappy:
by qwdqwqwffqw
Wed Nov 30, 2022 12:24 pm
Forum: Support and Development
Topic: [Solved] FFI Safety?
Replies: 6
Views: 2037

Re: FFI Safety?

Thank you for the answer. To elucidate my concern, there are four cases : 1) Writing on wrong memory location, which is NOT used by any other process >> but no crashing. 2) Writing on wrong memory location, which is NOT used by any other process >> LOVE crashes. 3) Writing on wrong memory location, ...
by qwdqwqwffqw
Tue Nov 29, 2022 11:21 pm
Forum: Support and Development
Topic: [Solved] FFI Safety?
Replies: 6
Views: 2037

Re: FFI Safety?

Yes, I am talking about if there is potential risk in simple memory writing, not in untrustable code/functions(where there is always a different type of risk). To give explicit example : ffi = require "ffi" x = love.data.newByteData(10) -- 10-byte object a = ffi.cast("uint8_t*", ...
by qwdqwqwffqw
Tue Nov 29, 2022 4:39 pm
Forum: Support and Development
Topic: [Solved] FFI Safety?
Replies: 6
Views: 2037

[Solved] FFI Safety?

Hi. I'm currently trying to improve performance and memory usage on my game by using C data structures instead of lua tables. I am not talking about security problems from malicious codes or anything like that, but about what the mistakes in code writing data on memory might cause on the machine its...