Skip to content

Conversation

@Pidroh
Copy link

@Pidroh Pidroh commented Mar 18, 2020

When mixing drawBox with scale, text does not wrap up correctly

This happens because FC_GetBufferFitToColumn takes scale as a parameter but does not actually scale anything. I solved this problem by adding

width = (int)(width / scale.x);

To the beginning of FC_GetBufferFitToColumn.
There is also a similar problem of scale not being taken into account on the line distance. I fixed it by changing
y += FC_GetLineHeight(font);
to
y += FC_GetLineHeight(font)*scale.y;

When mixing drawBox with scale, text does not wrap up correctly

This happens because FC_GetBufferFitToColumn takes scale as a parameter but does not actually scale anything. I solved this problem by adding 

width = (int)(width / scale.x);

To the beginning of FC_GetBufferFitToColumn.
There is also a similar problem of scale not being taken into account on the line distance. I fixed it by changing 
y += FC_GetLineHeight(font);
to
y += FC_GetLineHeight(font)*scale.y;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant