Skip to main content
cmykfangirl
Participating Frequently
July 30, 2024
Question

Baseline shifts text box position in Khmer language

  • July 30, 2024
  • 1 reply
  • 498 views

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?

 

 

This topic has been closed for replies.

1 reply

Legend
July 31, 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

 

 

cmykfangirl
Participating Frequently
July 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?

Legend
July 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