Jump to content

Vertical centering of text background color


Recommended Posts

I'm trying to migrate a InDesign project to Publisher and I'm currently stuck with this issue: I want to have a word (or more) with a dark background around it. In InDesign it is done with a ultra large bottom line. In Publisher I found the text background option that almost works. Almost... because it seems not to be a way to vcenter the word onto the background: the bottom part is noticably higher than the top part. Any idea? Is there a feature? Will it ever be one?

I attach two examples. The first one is how it appears on InDesign, the second one is how i managed to replicate it on Publisher.

Thank you

2019-05-29 01_11_07-_magazine_master_a4.indd @ 125% [Convertito].png2019-05-29 01_09_04-Affinity Publisher.png

Edited by NightSky
Link to comment
Share on other sites

Welcome to the forum NightSky.
I think the Character Background Colour only works the way you want it to work depending on which font you are using and how that font was designed.
I’ve tried to use it with various fonts with different results. For example, in the attached GIF, it’s fine with Cambria but not Cambria Math, and it’s fine with Cinzel but not Cinzel Decorative.
I don’t think you can use the ‘thick underline’ trick as Publisher doesn’t let you – as far as I know – specify the thickness of an underline.
I’ll try and think of a decent way to do what you want but I don’t think a solution will be nice.

character-background.gif

Edited by GarryP
Oops, forgot the GIF.
Link to comment
Share on other sites

You can create a text frame with a dark background and the highlighted text in white, centred vertically and horizontally. This can then be copied and pasted as a text character into the rest of the text. You'll need to select the inserted frame as if it were a character and baseline shift it to the right position. You might also need to do some work on the leading of the rest of the text too.

As GarryP said, it may not be nice, but it seems to work.

image.png.b573bb7a7c252242395ba27a03ea0554.png

Link to comment
Share on other sites

34 minutes ago, NigelH said:

You can create a text frame with a dark background and the highlighted text in white, centred vertically and horizontally. This can then be copied and pasted as a text character into the rest of the text. You'll need to select the inserted frame as if it were a character and baseline shift it to the right position. You might also need to do some work on the leading of the rest of the text too.

I'm having a hard time getting that to work, Nigel. Can you provide a sample .afpub file that demonstrates it?

-- Walt

   Desktop: new:  Windows 11 Home, version 21H2 (22000.613) 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090  (old: 16GB memory, Intel Core i7-6700K @ 4.00GHz, GeForce GTX 970 )
   Laptop:  Windows 10 Home, version 21H2 (19044.1706) 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
    Affinity Photo 1.10.5 (.1342) and 1.10.5.1342 Beta   / Affinity Designer 1.10.5 (.1342) and 1.10.5.1342 Beta  / Affinity Publisher 1.10.5 (.1342) and 1.10.5.1282 Beta
 iPad Pro M1, 12.9", iPadOS 15.4.1, Apple Pencil 2, Magic Keyboard

  Affinity Photo 1.10.5 (.280) and 1.10.2 (.266) Beta / Affinity Designer 1.10.5 (.21) and 1.10.3 (.19) Beta 

Link to comment
Share on other sites

The official Affinity name for pasting non-text items into a text frame is "Pinning" - it's outlined in the latest Help - and it hasn't been in Publisher for very long (only the last two betas, or something like that).

Link to comment
Share on other sites

Wow guys, I cannot leave you alone for one day and you already answred. Thank you, what a great community!

@GarryP Thank you for the GIF. In fact i think the "thick underline" was a workaround for InDesign. Will try what @NigelH sudgests.

Please let me know if any other idea comes up on this. There's maybe some room for new funcitonality? ;) 

Link to comment
Share on other sites

  • 3 years later...
Posted (edited)

I know its an old topic, but I came across a siomilar problem and found, that the character background extends to the highest and lowest character in that line. My workaround for now is to adjust the groundline for the space directly before the highlighted text with a positive value and the one directly after the highlighted text with a negative value. The spaces dont have to be part of the highlighted box - they just tell the highlighting box how far it has to stretch vertically. And the good part is, the space doesn't get compressed horizontally and doesn't affect the line-spacing, so apart from the desired effect nothing changes.
(see picture, where the doashed boxes represent the spaces with shifted groundline - even expanding into the line abouve without affecting it.

 

spacing.png

Edited by Johanness
Link to comment
Share on other sites

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...
 Share

×
×
  • Create New...

Important Information

Please note there is currently a delay in replying to some post. See pinned thread in the Questions forum. These are the Terms of Use you will be asked to agree to if you join the forum. | 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.