YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
21 stars 8 forks source link

In-Game: font_enable_effects() needs a more accurate code error message for when the font simply does not have SDF enabled #2049

Closed gm-bug-reporter[bot] closed 10 months ago

gm-bug-reporter[bot] commented 10 months ago

Description

I added the fonts from my game maker studio 2's main directory over to my project folder as well, then copied the path onto the font_add's 1st argument, though I continue to get this error:

ERROR in
action number 1
of Create Event
for object obj_character:

font_enable_effects() - font not found
 at gml_Object_obj_character_Create_0 (line 10)

However, the font does exist - it's just that it has not been enabled for SDF use in the Font Editor.

Expected Change

The runner is changed such that it can detect that the font exits, but does not support SDF, and then the code error message is changed to match - e.g., "font has not been enabled for SDF", rather than "font not found".

Steps To Reproduce

  1. Start GameMaker and import the attached sample
  2. Run it

3508e8d8-e17e-4b53-8a65-389a267b56d9

rwkay commented 10 months ago

did you enable SDF for the font? you need to do that to get the font effects....

ghost commented 10 months ago

did you enable SDF for the font? you need to do that to get the font effects....

Hello, thanks for the reply, yes I enabled SDF in the font.

Screenshot 2023-10-27 114812 Screenshot 2023-10-27 111601

rwkay commented 10 months ago

but not in the code you gave above... the screenshot is for a font called Font1 the code above is for fnt_glow that is created in font_add but SDF is not enabled for that see https://manual.yoyogames.com/GameMaker_Language/GML_Reference/Asset_Management/Fonts/font_enable_sdf.htm

ghost commented 10 months ago

but not in the code you gave above... the screenshot is for a font called Font1 the code above is for fnt_glow that is created in font_add but SDF is not enabled for that see https://manual.yoyogames.com/GameMaker_Language/GML_Reference/Asset_Management/Fonts/font_enable_sdf.htm

thanks, so if I want to use Times New Roman instead of "STENCIL.TTF", would I type "Times New Roman.ttf" or "TIMES_NEW_ROMAN.TTF" i'm not sure how to implement fonts with spaces into the argument string.

Screenshot 2023-10-27 121403

ghost commented 10 months ago

but not in the code you gave above... the screenshot is for a font called Font1 the code above is for fnt_glow that is created in font_add but SDF is not enabled for that see https://manual.yoyogames.com/GameMaker_Language/GML_Reference/Asset_Management/Fonts/font_enable_sdf.htm

I'm starting to understand how the directory works now, thanks for your help.

Screenshot 2023-10-27 121403

YYDan commented 10 months ago

I am not convinced there is any bug here - the sample as attached has no Font asset in the project and instead relies on a font which lives in a hardcoded OneDive path on the user's PC, and so legitimately will not be found if we run the project (making the in-game code error message entirely correct).

I have attached a cleaned sample which shows the actual code in question runs just fine if there is a font file which can be loaded and there is no requirement to do anything extra to enable SDF before the text draws correctly.

Suspect the real issue was fixed by the reporter when Russell was offering coding-help above, and that the code error was entirely correct at that time.

TextSample.zip

Steps To Reproduce:

  1. Start GameMaker and import the attached sample
  2. Run it for (e.g.) Windows VM
  3. Observe the lack of in-game code error about the font being missing.
  4. Press-and-release your spacebar key to see the new font being used correctly (minus the glow effect, as this has not been enabled).
  5. (Optional) Stop the game and uncomment the font_enable_sdf() line in the Create event, then repeat steps 2-4 to see the SDF works now, but that clearly this was not the cause of this bug report.
YYDan commented 10 months ago

As an aside, there's really no need to use disrespectful language in your bug sample project names. Please don't do this again in future. Thank you.

ghost commented 10 months ago

Hold up MF, don't tell me what I can and can't do, if you got a problem with my language, you talk to me like a man, dont be a little girl and leave btch notes and walk away.

On Mon, Oct 30, 2023, 9:21 AM yymrennie @.***> wrote:

Closed #2049 https://github.com/YoYoGames/GameMaker-Bugs/issues/2049 as not planned.

— Reply to this email directly, view it on GitHub https://github.com/YoYoGames/GameMaker-Bugs/issues/2049#event-10808569932, or unsubscribe https://github.com/notifications/unsubscribe-auth/A67GHTATRBAXROVTEWK2OC3YB6ZYDAVCNFSM6AAAAAA6TATGR2VHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJQHAYDQNJWHE4TGMQ . You are receiving this because you commented.Message ID: @.***>

ghost commented 10 months ago

As an aside, B!tch you think just because you think your entitled you can tell people what they can and can't say or do? You probably align yourself with socialist and communist ideaology too huh? I'll say whatever the fuck I want pussy. IDGAF if you don't like it you fucking pansy wanker

On Mon, Oct 30, 2023, 8:55 AM Daniel Cleaton @.***> wrote:

As an aside, there's really no need to use disrespectful language in your bug sample project names. Please don't do this again in future. Thank you.

— Reply to this email directly, view it on GitHub https://github.com/YoYoGames/GameMaker-Bugs/issues/2049#issuecomment-1785255738, or unsubscribe https://github.com/notifications/unsubscribe-auth/A67GHTHDB3T7MYWPGQVPUKTYB6WW5AVCNFSM6AAAAAA6TATGR2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBVGI2TKNZTHA . You are receiving this because you commented.Message ID: @.***>