Jump to content

Strange Text Outlines? - Trying To Polish Beta1...


JeZxLee
 Share

Recommended Posts

Hi,

We are ahead of schedule for a Beta1 release.
Trying to polish the game now...

We are seeing weird text outlines in the game?
Our text code is below, what could be the problem?(see attached screenshot)

Thanks!

JeZxLee

function PlaceTextOntoScreen(size, justification, texts, screenX, screenY, rFillT, gFillT, bFillT, rFillB, gFillB, bFillB, rOutline, gOutline, bOutline, alphaVal)
{
	var outlineThinkness = 3;
	if (ScreenToDisplay == AboutScreen)  outlineThinkness = 7;
	
	var style = new PIXI.TextStyle({
		font: "FreeSans",
		fontSize: size,
		fill: [PIXI.utils.rgb2hex([rFillT, gFillT, bFillT]), PIXI.utils.rgb2hex([rFillB, gFillB, bFillB])],
		stroke: PIXI.utils.rgb2hex([rOutline, gOutline, bOutline]),
		strokeThickness: outlineThinkness
	});

	TextSprites[CurrentTextSpriteIndex] = new PIXI.Text( texts, style );

	if (justification == TextLeft)  TextSprites[CurrentTextSpriteIndex].position.set(screenX + (TextSprites[CurrentTextSpriteIndex].width/2), screenY);
	else if (justification == TextCenter)  TextSprites[CurrentTextSpriteIndex].position.set(screenX, screenY );
	else if (justification == TextRight)  TextSprites[CurrentTextSpriteIndex].position.set( (OriginalCanvasWidth - screenX - (TextSprites[CurrentTextSpriteIndex].width/2) ), screenY );

	TextSprites[CurrentTextSpriteIndex].alpha = alphaVal;
	TextSprites[CurrentTextSpriteIndex].anchor.set(0.5);

	stage.addChild(TextSprites[CurrentTextSpriteIndex]);

	if (CurrentTextSpriteIndex < 100)  CurrentTextSpriteIndex++;
	return(CurrentTextSpriteIndex-1);
}

 

PixiJSv4-StangeTextOutlines-01.png

Link to comment
Share on other sites

Sorry, code got cut off:

function PlaceTextOntoScreen(size, justification, texts, screenX, screenY, rFillT, gFillT, bFillT, rFillB, gFillB, bFillB, rOutline, gOutline, bOutline, alphaVal)
{
    var outlineThinkness = 3;
    if (ScreenToDisplay == AboutScreen)  outlineThinkness = 7;
    
    var style = new PIXI.TextStyle({
        font: "FreeSans",
        fontSize: size,
        fill: [PIXI.utils.rgb2hex([rFillT, gFillT, bFillT]), PIXI.utils.rgb2hex([rFillB, gFillB, bFillB])],
        stroke: PIXI.utils.rgb2hex([rOutline, gOutline, bOutline]),
        strokeThickness: outlineThinkness
    });

    TextSprites[CurrentTextSpriteIndex] = new PIXI.Text( texts, style );

    if (justification == TextLeft)  TextSprites[CurrentTextSpriteIndex].position.set(screenX + (TextSprites[CurrentTextSpriteIndex].width/2), screenY);
    else if (justification == TextCenter)  TextSprites[CurrentTextSpriteIndex].position.set(screenX, screenY );
    else if (justification == TextRight)  TextSprites[CurrentTextSpriteIndex].position.set( (OriginalCanvasWidth - screenX - (TextSprites[CurrentTextSpriteIndex].width/2) ), screenY );

    TextSprites[CurrentTextSpriteIndex].alpha = alphaVal;
    TextSprites[CurrentTextSpriteIndex].anchor.set(0.5);

    stage.addChild(TextSprites[CurrentTextSpriteIndex]);

    if (CurrentTextSpriteIndex < 100)  CurrentTextSpriteIndex++;
    return(CurrentTextSpriteIndex-1);
}
 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...