how to get the font.ttf with some words?

mc 5,206 Reputation points
2023-08-21T09:48:09.65+00:00

I want to use custom(download from web) font .but it is too large how to get a font from all using my words in the site?

for example in my website I only use 10 character and how to get the font-face with this 10 characters?

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,815 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Viorel 121.3K Reputation points
    2023-08-21T11:03:59.34+00:00

    For example, if you need some captions made from 10 characters, then consider using pictures instead of text captions. Use Visual Studio or any graphical editor to make the captions.


  2. Qing Guo - MSFT 896 Reputation points Microsoft External Staff
    2023-08-22T07:04:16.21+00:00

    Hi @mc ,

    for example in my website I only use 10 character and how to get the font-face with this 10 characters?

    You can add style to this 10 characters, below is a demo you can refer to it.

    <!doctype html>
    <html lang="en-US">
      <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width" />
        <title>Web Font Sample</title>
        <style media="screen, print">
          @@font-face {
            font-family: "Bitstream Vera Serif Bold";
            src: url("https://mdn.github.io/css-examples/web-fonts/VeraSeBd.ttf");
          }
          
        </style>
      </head>
      <body>
        
          This is Bitstream Vera Serif Bold.
    
        <div style=" font-family:Bitstream Vera Serif Bold">fontfamily</div>
      </body>
    </html>
    
    

    result:

    m3


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Best regards,

    Qing Guo

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.