Author Topic: ResolutionSwitchController is based on one font for each SD, HD, and SHD.  (Read 5248 times)

TokyoDan

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 53
    • View Profile
ResolutionSwitchController is based on one font for each SD, HD, and SHD.

See http://www.tasharen.com/forum/index.php?topic=832

I have three fonts for each. e.g.:

SD: Ventura-S, Ventura-M, Ventura-L     (sizes 12, 18, 24)
HD: Ventura-S, Ventura-M, Ventura-L    (sizes 24, 36, 48)
SHD: Ventura-S, Ventura-M, Ventura-L   (sizes 48, 72, 96)

How do I set this up? (In ResolutionSwitchController, what would I use for SDFontName,
HDFontName, SHDFontName?)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
You should ask in that thread, not create a new one (as that script is not a part of NGUI).

But generally you'd set it up like so:

SD Atlas: Pixel Size 1
HD Atlas: Pixel Size 0.5
SHD Atlas: Pixel Size 0.25

TokyoDan

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 53
    • View Profile
I initially asked in the corresponding thread but I got a warning that it hasn't been posted to in six months and if I wanted to start a new thread. So I did.

But that doesn't answer the question I asked. I already knew that and set it up....

I have three atlases (SD, HD & SHD with the proper pixel sizes). But my problem is that in each atlas I have three fonts (small, medium, and large versions named Venera-S, Venera-M, and Venera-L). Using the Font Maker tool adds the three fonts to each atlas but also creates three prefabs, one for each font. So I have 9 prefabs, three in each of the SD, HD, and SHD folders.

Actually the SD atlas's font sizes are 12, 18, 24. (named Venera-S, Venera-M, and Venera-L respectively.)
HD atlas's font sizes are 24, 36, 48. (named Venera-S, Venera-M, and Venera-L respectively.)
SHD atlas's font sizes are 48, 72, 96. (named Venera-S, Venera-M, and Venera-L respectively.)

Which of those prefabs should I enter in the SDFont Name, HDFont Name and SHDFont Name fields of ResolutionSwitchController ? There's only room for one each.

Regards,
Dan

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Sounds like that script was written to work with one font at a time, so you have to either use 3 instances of it, or create a combo script that has more fields.

TokyoDan

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 53
    • View Profile
I got the script working by adding more similar variables to hold the additional size fonts.

Sounds like that script was written to work with one font at a time, so you have to either use 3 instances of it, or create a combo script that has more fields.