So I'm asking is it possible to have a special design for a special text pattern in a font (ttf)?

So what I mean, for example, is it possible to create a TrueType font which normally all text is serif, but when you type a string like san for example the style for that three letter will turn to sans-serif. And it'll only apply to san if it's type as san, case sensitive and if you miss or add any other letter all letter will turn back to serif.

Is it possible to create a font that works like this?

  • I'm not sure but I don't think this is possible. At least not in ttf format. But what do you need this for anyway (which application)? You could possibly achieve similar behavior in a layout program.
    – Wolff
    Sep 25, 2018 at 14:48
  • It seems I've completely misunderstood your question. It's not very clear, but from the comments you posted on my now deleted answer it is now clearer. You should really edit your question with those extra details. It would seem you are trying to do something like a GREP command, which you can apply in Adobe InDesign.
    – Billy Kerr
    Sep 25, 2018 at 16:34

1 Answer 1


Yes. You an use contextual alternates of open type fonts to do this, and prime them to react on the word 'san'. However this isn't particularly useful or portable. When copied to another font it loses this feature and not all software support contextual alternates.

  • Is this possible in ttf fonts?
    – Wolff
    Sep 25, 2018 at 15:43
  • @Wolff many fonts with ttf ending are in opentype containers, actually . But no its not possible with old ttf fonts. However both features can live ins same container. so old style code just ignores the opetype features
    – joojaa
    Sep 25, 2018 at 15:45
  • I see. I'm just curious. But I never really liked tampering with fonts to achieve aesthetic results. Or using fonts with logos or clip-arts. To me it's simpler and safer to create solutions in the layout application instead.
    – Wolff
    Sep 25, 2018 at 15:49
  • @Wolff i dont disagree, but you can do this if your interested. I have fonts that turn certain sequence of letters to logos. This can be handy in some cases.
    – joojaa
    Sep 25, 2018 at 15:53
  • I can see that. Fonts like FF Chartwell looks fun as well. But I'm old fashioned and wants to do everything myself :-)
    – Wolff
    Sep 25, 2018 at 16:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.