-
Notifications
You must be signed in to change notification settings - Fork 333
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
Arcade (pyglet?) improperly rendering text #2484
Comments
I can't replicate this on Linux. This may be a Windows-specific issue. @elegantiron Can you try adding The code for the GDI+ font renderer in the "fix" PR does not look pretty (pyglet/pyglet#459), so it's worth checking if you're using the DirectWrite. @DigiDuncan Can you give this a try? I get the following under 3.12 for both:
Here's the code: |
I added this to the file that defines and calls my
I am not knowledgeable enough to know if label_instances = []
shared_data = dict(
font_name="FairydustB",
color=arcade.color.RUBINE_RED,
font_size=40,
width=window.width,
x=window.height // 2,
batch=batch,
align="center",
anchor_x="center",
anchor_y="top",
)
# Create labels, re-used from an old pyglet thing I did
label_data = [
(pyglet.text.Label, ("Such's Life With Big Letter Serifs",), shared_data),
]
for label_class, args, kwargs in label_data:
current_y = (window.height // 2) - (len(label_data) // 2) * 20
label = label_class(*args, y=current_y, **kwargs)
label_instances.append(label) Is equivalent to the code I'm using, which uses |
I've updated both gists to be simpler and include the pyglet options line. You're right, the paste I uploaded was both not quite right and too complicated. |
At least one user on the pyglet Discord claims they can replicate it on the pyglet-only file. @elegantiron do you have any other similar fonts you can replicate this issue with? |
I do not. I'm sure I could find more if I went looking, as it seems the elongated serifs aren't too rare a style. I took a look at the updated gist, and it seems like some old code got included. There are multiple definitions for I will be able to test this in a few hours and will provide another update with results. |
I rearranged the imports thusly: import pyglet
pyglet.options.win32_gdi_font = False
import arcade And I am still getting cut-off serifs on the font. I tried executing the pyglet example verbatim and still have cut-off serifs. I have found some more fonts which seem to exhibit the same issue (Note that the licenses for the below fonts vary): |
Ty for the extra font info. Here's an outline of what I understand the current situation to be:
|
Bug Report
Letters in arcade.Text objects are cut off if they overlap other letters. This is possibly a regression of #937.
System Info
Actual behavior:
Expected behavior:
Letters are not cut off
Steps to reproduce/example code:
I'm not sure how to attach the font in question, but it can be obtained from dafont.com (direct link) with a 100% free license.
The text was updated successfully, but these errors were encountered: