Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
This question was closed Oct 15, 2012 at 03:11 PM by franky303 for the following reason:

Problem is not reproducible or outdated

avatar image
0
Question by franky303 · Sep 20, 2012 at 10:35 AM · guitextgui.label

How do adjust GUI.Label lineHeight?

I am developing a GUI which uses a ScrollView and inside this scrollView i am displaying several texts. I'm using GUI.Label for displaying these texts, and it is well working on iOS using the imported Arial Unicode Font (i need to support cyrillic etc.).

However, it is using a completely wrong lineheight/linespacing setting so the letters of different lines are too close, partially overlapping.

How can this be fixed? lineHeight is read-only, and I've seen there is a lineSpacing for GUIText however i cannot use this because i'm inside a scroll view, right?

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Bunny83 · Sep 20, 2012 at 04:20 PM 0
Share

Do you use GUI.Label or GUILayout.Label? Also the different lines, are they generated automatically (by line breaks in the text) or do you use multiple labels? I never had overlapping issues, but i also never used any characters outside the ascii set, so it might be a problem of the font iself. Can you post a simple piece of code which reproduces the issue?

avatar image Sundar · Sep 20, 2012 at 04:32 PM 0
Share

Select font in project and reduce font size and see whether you are getting required effect or you can scale up your label or both.

1 Reply

  • Sort: 
avatar image
1

Answer by franky303 · Sep 25, 2012 at 12:02 PM

I'm using GUI.Label and the problem occurs with both self-defined newlines as well as automatic word wrapping. The font is arial unicode MS and the fonts aren't used in "dynamic" mode but as a font texture, because it is an iOS project. Overlapping happens with both cyrillic letters as well as western letters. I have now developed a workaround: i've written my own word wrapper class and insert enough newlines so it won't overlap anymore. but it only works because the newlines are small enough to roughly adjust the line spacing.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Bunny83 · Sep 25, 2012 at 12:37 PM 0
Share

I would suggest to prepare a small test project which reproduces the issue and file a bug report. "Automatic wrapping" should always work otherwise it's pointless.

avatar image franky303 · Sep 25, 2012 at 05:42 PM 0
Share

Yes, that's true! Especially as this is a very annoying issue. - I plan to do this right after passing the deadline for my project!

Follow this Question

Answers Answers and Comments

11 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

In game message displayed on GUI - text and texture 1 Answer

GUIText doesn't update 2 Answers

Changing the font size of GUIText (on Unity iPhone)? 1 Answer

GUI Text line break Alt+Enter doesn't work 1 Answer

How do i make a text box appear on screen after a chest has been opened? 3 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges