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
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
    Laptop 2: Windows 11 Pro 24H2,  16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU
iPad:  iPad Pro M1, 12.9": iPadOS 18.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.0.1

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

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...
×
×
  • 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.