vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   embed font (https://vborg.vbsupport.ru/showthread.php?t=211179)

WoGuziczek 04-14-2009 10:59 AM

embed font
 
Hi!
I wanted to put in my forum external font "Myriad Pro".

I have the code:
Code:

@font-face
(
Font-family: "Myriad Pro";
Src: url (path/ fonts/MyriadPro-Regular.otf);
Font-style: normal;
Font-weight: normal;
)

Where do I put it?

TigerC10 04-14-2009 04:25 PM

You can't do it that way. You have to use either a .pfr font or a .eot font. If you use the .eot font, then it only works with internet explorer, so you should find/use a .pfr instead.

You can use a program like this one to convert the font:
http://www.fontlab.com/font-converter/transtype/


After you have the correct font type...

Use this code (for the PFR fonts) in the headinclude template:
Code:

<LINK rel = "fontdef" src="url/YourFontName.pfr">


Use this code (for the EOT fonts) anywhere on the page (headinclude template is best):
Code:

<STYLE TYPE="text/css">
<--!
@font-face {
  font-family: Arial;
  font-style:  normal;
  font-weight: normal;
  src:url(url/EOTfileName.eot);
}
-->
</STYLE>


You should consider that people will have longer download times when viewing your pages, so watch out for large font files. Also, some browsers will complain about security concerns. Embeddable fonts on websites have been a method of attack on a user's computer for years and some browsers will prompt security dialogues about it.


All times are GMT. The time now is 11:53 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01058 seconds
  • Memory Usage 1,713KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete