Skip to content

Instantly share code, notes, and snippets.

@dskjal
Created September 5, 2016 04:43
Show Gist options
  • Select an option

  • Save dskjal/a3adec7072c39b6861ee53533ab26d28 to your computer and use it in GitHub Desktop.

Select an option

Save dskjal/a3adec7072c39b6861ee53533ab26d28 to your computer and use it in GitHub Desktop.
Unity でフォントの高さをピクセルで取得する
private int getFontHeight(GUIStyle style) {
var labelSize = style.CalcSize(new GUIContent("ABC"));
return (int)labelSize.y;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment