Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Baseline shifts text box position in Khmer language

Community Beginner ,
Jul 30, 2024 Jul 30, 2024

Hi all, I'm creating a lower-third speaker template in the Khmer language to be used in Premiere Pro. For lowerthirds, they place an honorific (simillar to Dr., Mr. or Mrs.) in front of every name, but they requested the font weight and size to be different than the name for distinction purposes.

 

Because you can't change the style of individual words without changing the style of the entire template in Premiere, I created two text boxes with editable fields (one for honorific and one for name) and linked their anchor points so that the name's x position would change based on the length of the honorific. But I'm having trouble with the y positions.

 

In the Khmer language, they have words that act as descenders and ascenders in the font, which change the height of the text box based on what's in it. Unlike in English where the baseline remains the same even with a difference in ascenders and descenders, Khmer's text boxes don't behave the same way. I'm trying to make it so that the text aligns with the guide, even when these characters are added/removed. Any idea how to solve this?

 

 

Screenshot 2024-07-30 at 1.46.32 PM.pngScreenshot 2024-07-30 at 1.47.20 PM.pngScreenshot 2024-07-30 at 2.02.32 PM.png

TOPICS
Expressions , FAQ , How to
275
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jul 30, 2024 Jul 30, 2024

If you can use After Effects (Beta), it's quite simple, you can style individual characters.

 

honorifics = ["Dr.", "Mr.", "Mrs."];
firstWord = text.sourceText.split(' ')[0];
honorifics.indexOf(firstWord) !== -1 ? text.sourceText.style.setFontSize(100, 0, firstWord.length).setFauxBold(true, 0, firstWord.length) : value

 

screenshot.png

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 31, 2024 Jul 31, 2024

I believe this would work if the language was English, but I am typing in Khmer. Is there a way to change the language of this text box with an expression so that it recognizes Khmer characters as letters?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jul 31, 2024 Jul 31, 2024

It should work with any characters:

honorifics = ["Dr.", "សម្ដេច", "Mrs."];
firstWord = text.sourceText.split(' ')[0];
honorifics.indexOf(firstWord) !== -1 ? text.sourceText.style.setFontSize(100, 0, firstWord.length).setFauxBold(true, 0, firstWord.length) : value

 

screenshot.png

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 31, 2024 Jul 31, 2024

When all of the options in the array are in Khmer, I receive this eror message

 

Screenshot 2024-07-31 at 1.53.08 PM.png

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jul 31, 2024 Jul 31, 2024

You need to use After Effects Beta 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 06, 2024 Aug 06, 2024

YES, it worked!! Thank you 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 13, 2024 Aug 13, 2024
LATEST

Update: The templates do not work in Premiere Pro, I believe this is because I'm using After Effects Beta to create them and regular Premiere to use them. Is there a workaround for this that doesn't involve using Premiere Pro Beta?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines