Jump to content

Recommended Posts

Posted

Hi everyone,

I'm interested in creating a text style where the first and last letter of a word has a stylistic set. However, I'm running into a problem where the letters in-between will also be given the stylistic set setting. How do I only have it applied to the first and last letter? Please see photos attached. Thank you!

Screenshot 2023-11-28 at 8.40.17 PM.png

Screenshot 2023-11-28 at 8.41.15 PM.png

Posted

EDIT: sorry, doesn't work for all words of a paragraph. For the first character only it could be set in the paragraph style with a drop cap + the stylistic character style.

For the last character I personally don't see a way in Affinity and assume the missing Grep Style feature would be required. – As workaround it might be possible to assign it after text creation via Find & Replace with a search via Regex for characters that are followed by a space character or punctuation mark and assign the style to the found letter only.

• MacBookPro Retina 15" |  macOS 10.14.6  | Eizo 27" | Affinity V1  
• iPad 10.Gen.  |  iOS 18.5.  |  Affinity V2.6

Posted
7 minutes ago, Karen_ said:

What do you mean by drop cap + the stylistic character style?

I just noticed it wouldn't work (and edited my post). Drop caps is a paragraph style option and enables you to get a certain number of first letter(s) of a paragraph in a certain size and character style.

So, currently I only see the workaround via F&R and Regex for both, the first and the last characters.

• MacBookPro Retina 15" |  macOS 10.14.6  | Eizo 27" | Affinity V1  
• iPad 10.Gen.  |  iOS 18.5.  |  Affinity V2.6

Posted
45 minutes ago, Karen_ said:

quickly explain how to F&R and Regex?

Sorry, I can't do it quickly / I am not familiar enough with Regex. I just know for instance that, if you have Regex enabled in the F&R panel, the find/search expression

[A-Z]\s

would find all letters that are followed by a space. Via the cog icon next to "Replace with" you can choose a style to assign to the found results. Maybe someone more experienced will pop-in. Or you try to get more info in this site that also enables you to test in/output: https://regex101.com/

Or this tutorials/dictionaries for instance:
https://www.regular-expressions.info/ 
https://regexone.com/lesson/introduction_abcs

• MacBookPro Retina 15" |  macOS 10.14.6  | Eizo 27" | Affinity V1  
• iPad 10.Gen.  |  iOS 18.5.  |  Affinity V2.6

Posted

Quickly? Not really. Regex is wildcards on springbreak. Here is one I use frequently

\{(.+?)\}

Honestly it is quite useful. I am looking for all the letters, numbers, and punctuation between curly braces. And I am storing the stuff between the braces but not the braces themselves. I can use what was found and replace it with 

\1  

and assign a Character style to the string.

Mac Pro (Late 2013) Mac OS 12.7.6 
Affinity Designer 2.6.0 | Affinity Photo 2.6.0 | Affinity Publisher 2.6.0 | Beta versions as they appear.

I have never mastered color management, period, so I cannot help with that.

Posted
1 minute ago, Karen_ said:

the "find and replace" button in Affinity Designer

It's a panel and available in Affinity Publisher only.

Here's a 60 minute intro video of an APub user:

• MacBookPro Retina 15" |  macOS 10.14.6  | Eizo 27" | Affinity V1  
• iPad 10.Gen.  |  iOS 18.5.  |  Affinity V2.6

Posted

Does the font support contextual alternates? This is exactly the scenario that contextual alternates are designed to avoid.

If the font supports this OpenType feature, you would be able to set it for the entire range of text and not have to worry about swash characters colliding in the middle of a word.

Look for the Contextual Alternates option in the Typography window. Just because the option is present doesn't mean the characters you want are contextual but it's worth checking for.

Posted

Here an example for F&R Regex to replace the last letters of words …
i.e. every word character that is followed by any white space while letters followed by punctuation aren't included

([\w])(?=\s)

… with a character style that has a stylistic alternative activated. – It appears useful to handle first vs. last characters differently, the "Replace with" format can only be one for all, so it seems to require separate styles for different variants if the font doesn't deliver glyphs for automatic change via "Contextual" options as 'Monkey' in this example:

For the first letter:    (?<=\s)([\w])

• MacBookPro Retina 15" |  macOS 10.14.6  | Eizo 27" | Affinity V1  
• iPad 10.Gen.  |  iOS 18.5.  |  Affinity V2.6

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.