Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
avatar image
0
Question by Agustin Petrini · Jun 17, 2011 at 09:47 PM · texture2dexportfont

Exported PNG font texture with SaveFontTexture.js is all white

Hi. I'm having problems exporting a PNG with this script. http://www.unifycommunity.com/wiki/index.php?title=SaveFontTexture When I export the texture everything is white. Already changed the Character parameter (and played a lot with the rest of parameters) but no luck. I've checked the GetPixels result and it seems that every pixel is white, so the issue is probably either in that function or in the casting Selection.activeObject as Texture2D.

I've tryed with 2 different fonts and had the same result. Example: http://www.1001freefonts.com/font/ChopinScript.zip

Anybody been here already ?

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Eric5h5 · Jun 17, 2011 at 10:03 PM

It works fine; make sure you apply any changes to the font after you make them (the Character parameter can't be dynamic, since there is no actual font texture in that case; it's made dynamically at run-time). If you're looking at the preview in Unity, switch to alpha view instead of rgb view.

Comment
Add comment · Show 4 · 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 Agustin Petrini · Jun 17, 2011 at 10:12 PM 0
Share

Hey Eric. Thanks for the script and taking the time to reply me. I did apply the changes. I dunno what I'm doing wrong.

It is friday and after the 9th coding hour so maybe I just need to take a fresh look at this next week. I will try with more fonts and further debugging.

Cheers !

avatar image Eric5h5 · Jun 17, 2011 at 10:17 PM 1
Share

I tried the font you linked to and it worked with no issues. Note that the pixels are all white; the difference is that some are transparent and some aren't.

avatar image Agustin Petrini · Jun 18, 2011 at 01:28 PM 0
Share

And that's why you shouldn't code friday night.

Thanks Eric.

avatar image Eric5h5 · Jun 18, 2011 at 01:33 PM 0
Share

Depends on what you were doing earlier that evening, I guess. ;)

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

2 People are following this question.

avatar image avatar image

Related Questions

SetPixels and ExportToPNG - Alpha value missing?, 2 Answers

Is there a way to measure the pixel with/height of a string with a given font? 2 Answers

How to find a font via script? 2 Answers

Unity 5.2 Text Rendering issue 0 Answers

Is it possible to export base texture from unity terrain? 1 Answer


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