x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

UMG - Kerning whilst zooming is terrible on kerned pairs?

So, I seem to have an issue with kerned pairs (like TO, YO etc) whilst simply zooming in the editor. As you can see from my images below, at 1:1 zoom, everything is fine and as expected. When I get to -8 zoom, kerned pairs seem to go ballistic and start overlapping. I can only assume this hasn't been taken in to account whilst re-rendering the viewport? This is VERY large text (162pt) though I'm not sure that has anything to do with it.

I guess it's not a huge bug (not tried to PIE yet) but it definitely needs looking at - it makes layout somewhat difficult when you are working on a monitor that has a lower res than your intended resolution.

alt text

alt text

alt text

Product Version: UE 4.10
Tags:
1.jpg (81.3 kB)
2.jpg (70.1 kB)
3.jpg (96.1 kB)
more ▼

asked Apr 19 '16 at 04:20 PM in Using UE4

avatar image

dingster
1 1 2

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

I'm pretty sure this was fixed for 4.11. FreeType's scaled kerning seemed to produce some very bad results, so we resorted to scaling the kerning ourselves.

Are you able to test a copy of your project against 4.11 to verify this?

more ▼

answered Apr 19 '16 at 04:37 PM

avatar image

Jamie Dale STAFF
7.5k 176 66 304

avatar image dingster Apr 20 '16 at 07:49 AM

I'll do that - problem is we are stuck using 4.10.4. My next question is, can we integrate those changes made in 4.11 back to 4.10 ourselves?

avatar image Jamie Dale STAFF Apr 20 '16 at 11:59 AM

You can't really merge it because the font cache was re-organised between 4.10 and 4.11 to support shaped text, however you should be able to remake the changes in FFreeTypeInterface::GetKerning (FontCache.cpp).

Replace this:

 FT_Error Error = FT_Set_Char_Size( FontFace, 0, InSize*64, FontCacheConstants::HorizontalDPI, FontCacheConstants::VerticalDPI  );
 
 if( InScale != 1.0f )
 {
     FT_Matrix ScaleMatrix;
     ScaleMatrix.xy = 0;
     ScaleMatrix.xx = (FT_Fixed)(InScale * 65536);
     ScaleMatrix.yy = (FT_Fixed)(InScale * 65536);
     ScaleMatrix.yx = 0;
     FT_Set_Transform( FontFace, &ScaleMatrix, nullptr );
 }
 else
 {
     FT_Set_Transform( FontFace, nullptr, nullptr );
 }

With this:

 FT_Error Error = FT_Set_Char_Size( FontFace, 0, InSize*64, FontCacheConstants::HorizontalDPI, FontCacheConstants::VerticalDPI  );
 FT_Set_Transform( FontFace, nullptr, nullptr );

Replace this:

 // Return pixel sizes
 Kerning = KerningVec.x / 64;

With this:

 // Return pixel sizes
 Kerning = FT_MulFix(KerningVec.x, InScale * 65536) / 64;
avatar image dingster Apr 28 '16 at 01:07 PM

That worked brilliantly, thank you.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question