浏览代码

REVIEWED: Issue #3105

pull/3150/head
Ray 1年前
父节点
当前提交
48e2663d03
共有 2 个文件被更改,包括 2 次插入3 次删除
  1. +1
    -1
      src/rtext.c
  2. +1
    -2
      src/rtextures.c

+ 1
- 1
src/rtext.c 查看文件

@ -1227,7 +1227,7 @@ Vector2 MeasureTextEx(Font font, const char *text, float fontSize, float spacing
if (tempTextWidth < textWidth) tempTextWidth = textWidth;
textSize.x = n">tempTextWidth*scaleFactor + (float)((tempByteCounter - 1)*spacing); // Adds chars spacing to measure
textSize.x = p">(tempTextWidth + (float)((tempByteCounter - 1)*spacing))*scaleFactor;
textSize.y = textHeight*scaleFactor;
return textSize;

+ 1
- 2
src/rtextures.c 查看文件

@ -3290,8 +3290,7 @@ void ImageDrawText(Image *dst, const char *text, int posX, int posY, int fontSiz
if (GetFontDefault().texture.id == 0) LoadFontDefault();
Vector2 position = { (float)posX, (float)posY };
// NOTE: For default font, spacing is set to desired font size / default font size (10)
ImageDrawTextEx(dst, GetFontDefault(), text, position, (float)fontSize, (float)fontSize/10, color); // WARNING: Module required: rtext
ImageDrawTextEx(dst, GetFontDefault(), text, position, (float)fontSize, 1.0f, color); // WARNING: Module required: rtext
#else
TRACELOG(LOG_WARNING, "IMAGE: ImageDrawText() requires module: rtext");
#endif

正在加载...
取消
保存