Drop Caps custom font

12 views
Skip to first unread message

Ihor Olkhovskyi

unread,
Apr 27, 2025, 7:44:04 AMApr 27
to anthemion-jutoh
Hello!

I was trying to set custom font via Drop Caps.
What I did:
1. Styles - Character Styles - Edit "Drop Caps" style and set font setting
2. Added Drop Caps to a paragraph setting Character Style to "Drop Caps" explicitly.
3. Compiled book
4. After I checked CSS in compiled Epub, font setting from this style (P_Body_Text__And__Drop_Caps) was not set.

Is it something expected or a bug? (To add, on this font there is a substitution option, means this font on compilation substituted for embedded one)

Thanks in advance!

Julian Smart

unread,
Apr 27, 2025, 11:06:58 AMApr 27
to anthemi...@googlegroups.com
Hello Ihor,

The character style "Drop Caps" is unrelated to the paragraph drop caps facility - it's a remnant from before the latter was added. So changing the style for "Drop Caps" won't change it for the paragraph style. In fact I assume you don't want the font changed for the whole paragraph style anyway, just the drop caps letter, so in that case you could apply a character style to the first letter as normal. If you want a custom font for the whole paragraph, you could create a new style e.g. "Body Text First Paragraph", set a custom font and enable drop caps in the relevant tab, and then apply it to your first paragraph.

Regards,

Julian
--
You received this message because you are subscribed to the Google Groups "anthemion-jutoh" group.
To unsubscribe from this group and stop receiving emails from it, send an email to anthemion-jut...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/anthemion-jutoh/534e5f95-a0d1-42ad-9d98-24d275be8587n%40googlegroups.com.


Ihor Olkhovskyi

unread,
Apr 27, 2025, 11:14:43 AMApr 27
to anthemion-jutoh
Julian,

Thanks for an answer! 
No, as you've said, I want to have only dropped caps character (like 1 character) to be with a different font.
So, what does exactly this option for in this case?

Screenshot_20250427_171049.png

In help it stated "An optional character style", so I assume that if I define custom font in "Drop Caps" character style, it should apply to a Drop Caps character in this case?

Thanks!

Julian Smart

unread,
Apr 27, 2025, 11:43:34 AMApr 27
to anthemi...@googlegroups.com
Hi Ihor,

The problem may be that the existing "Drop Caps" style has custom CSS that doesn't include the embedded font.

So, ignore the existing "Drop Caps" character style. Create a new character style, say "Drop Caps First Paragraph", and change the font to your embedded font. Specify *this* style in your paragraph's style "Character style" in the "Drop Caps" tab.

Now you should find a style in your generated CSS file .C_Drop_Caps_First_Character {
font-family: "Your Specified Embedded Font";
}

and also an automatically named and generated .C_... character style combining the attributes from the paragraph style's drop caps specification and your character style. This is then applied to the first letter(s) of the paragraph HTML, e.g.

<p class="P_Body_Text_First_Paragraph"><span class="C_Char_Drop_Caps__And__CAC_Champagne__And__Drop_Caps">T</span>his is left-aligned text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas aliquet urna justo, faucibus scelerisque est posuere et. Morbi ullamcorper facilisis orci eget mattis. Praesent neque purus, euismod accumsan rutrum sit amet, consectetur et turpis. In hac habitasse platea dictumst.</p>

Regards,

Julian

Ihor Olkhovskyi

unread,
Apr 28, 2025, 4:42:35 AMApr 28
to anthemion-jutoh
Julian,

Thanks, this works!
Reply all
Reply to author
Forward
0 new messages