Author Topic: Referenced Atlas's and Fonts  (Read 3362 times)

milali

  • Guest
Referenced Atlas's and Fonts
« on: April 05, 2013, 04:35:04 AM »
So I am wondering about fonts and referenced atlas's.

I have several atlas's of the same images but with a different colour scheme. I want to be able to instantly switch them over instantly so we can look at different colour schemes easily.

So I am wondering about setting up the fonts, should I need to duplicate the fonts from the same data using different names for each font? as the referenced texture is the same for every font they should update correctly yes?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Referenced Atlas's and Fonts
« Reply #1 on: April 05, 2013, 11:57:53 AM »
It's the same as having SD/HD/UHD atlases. If one atlas has sprite ABC, another should have the same sprite. Same with fonts.

Tutanhomon

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 13
    • View Profile
Re: Referenced Atlas's and Fonts
« Reply #2 on: April 06, 2013, 05:12:26 AM »
HI
just want to extend a question a little, seems like the topic is rather close

I have Reference atlas, HD and SD atlases (they are similar, SD atlas were made by duplicating HD atlas and making texture 2x smaller)
So, both atlases contain font named "Calibri". Sprites for the fonts display correctly in atlas inspector.

Next, I have calibri uifont that uses Reference atlas, and as far as I understand it takes "Calibri" sprite from one of the atlases, that reference atlas references to :)

The problem is, that when I switch atlases in my reference atlas, the font in the label is displayed correctly only for HD atlas, for SD atlas it loses it's coordinates (it seems like rect's position is OK, just the size of sprite isn't twice smaller for SD atlas).
Sprites' coords are set to "UV" for both HD and SD atlases.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Referenced Atlas's and Fonts
« Reply #3 on: April 06, 2013, 11:40:39 AM »
You need to swap the font as well -- reference font, not just reference atlas.

milali

  • Guest
Re: Referenced Atlas's and Fonts
« Reply #4 on: April 07, 2013, 09:32:18 PM »
AH The font needs to be referenced too

awesome thanks I think we're there now with this knowledge