• User Attivo

    problema font

    Ciao a tutti ho provato a inserire nella mia pagina (catanianuoto2000.it/prova.htm) questo codice CSS per inserire un font esterno:

    <STYLE TYPE="text/css" MEDIA="screen, print">
          @font-face {
            font-family: "Bimini";
            src: url("http://www.catanianuoto2000.it/font/BIMINR__.TTF")
          }
          H1 { font-family: "Bimini", serif }
        </STYLE>
    

    Secondo quello indicato nel sito w3.org:

    15.3.1 Font Descriptions and @font-face

    The font description provides the bridge between an author's font specification and the font data, which is the data needed to format text and to render the abstract glyphs to which the characters map - the actual scalable outlines or bitmaps. Fonts are referenced by style sheet properties.
    The font description is added to the font database and then used to select the relevant font data. The font description contains descriptors such as the location of the font data on the Web, and characterizations of that font data. The font descriptors are also needed to match the style sheet font properties to particular font data. The level of detail of a font description can vary from just the name of the font up to a list of glyph widths. Font descriptors may be classified into three types:

    • those that provide the link between the CSS usage of the font and the font description (these have the same names as the corresponding CSS font properties),
    • the URI for the location of the font data,
    • those that further characterize the font, to provide a link between the font description and the font data.All font descriptions are specified via a @font-face at-rule. The general form is:
      @font-face { <font-description> }
      where the <font-description> has the form: descriptor: value;descriptor: value;[...]descriptor: value;
      Each @font-face rule specifies a value for every font descriptor, either implicitly or explicitly. Those not given explicit values in the rule take the initial value listed with each descriptor in this specification. These descriptors apply solely within the context of the @font-face rule in which they are defined, and do not apply to document language elements. Thus, there is no notion of which elements the descriptors apply to, or whether the values are inherited by child elements.
      The available font descriptors are described in later sections of this specification.
      For example, here the font 'Robson Celtic' is defined and referenced in a style sheet contained in an HTML document. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"><HTML> <HEAD> <TITLE>Font test</TITLE> <STYLE TYPE="text/css" MEDIA="screen, print"> @font-face { font-family: "Robson Celtic"; src: url("http://site/fonts/rob-celt") } H1 { font-family: "Robson Celtic", serif } </STYLE> </HEAD> <BODY> <H1> This heading is displayed using Robson Celtic</H1> </BODY></HTML>
      The style sheet (in the STYLE element) contains a CSS rule that sets all H1 elements to use the 'Robson Celtic' font family.
      A CSS1 implementation will search the client for a font whose family name and other properties match 'Robson Celtic' and, if it fails to find it, will use the UA-specific fallback serif font (which is defined to exist).
      A user agent implementing CSS2 will first examine @font-face rules in search of a font description defining 'Robson Celtic'. This example contains a rule that matches. Although this rule doesn't contain much font data, it does have a URI where the font can be retrieved for rendering this document. Downloaded fonts should not be made available to other applications. If no matching @font-face is found, the user agent will attempt the same match as a user agent implementing CSS1. Note that if the font 'Robson Celtic' had been installed on the client system, this would have caused the UA to add an entry in the font database for the installed copy as described in the section on the font matching algorithm. The installed copy would have been matched before the downloadable font in the example above.

    CSS1 implementations, which do not understand the @font-face rule, will encounter the opening curly brackets and will ignore forward until the matching closing curly brackets. This at-rule conforms with the forward-compatible parsing requirement of CSS. Parsers may ignore these rules without error.
    Having the font descriptors separate from the font data has a benefit beyond being able to do font selection and/or substitution. The data protection and replication restrictions on the font descriptors may be much weaker than on the full font data. Thus, it may be possible to install the font definition locally, or at least to have it in a local cache if it occurs in a commonly referenced style sheet; this would not require accessing the full font definition over the Web more than once per named font.
    If a font descriptor is duplicated, the last occurring descriptor wins and the rest must be ignored. Also, any descriptors that are not recognized or useful to the user agent must be ignored. Future versions of CSS may allow additional descriptors for the purpose of better font substitution, matching, or synthesis.

    Mi dite in cosa sbaglio?
    Perchè non si vede il font richiesto?
    grazie!!!


  • User Attivo

    Ciao Talkoman,
    non si può, per ora, usare i font in questo modo.

    @font-face fa parte delle specifiche CSS2, PERÒ non delle specifiche CSS2.1 (che sono quelle implementate dagli attuali browsers).

    @font-face è però presente nella working draft dei CSS3, che dovrebbero essere alle porte.

    Quindi per includere un font personalizzato, o aspetti, o ricorri ad altri metodi quali sIFR (fai un ricerca qua nel forum che ne abbiamo già parlato).

    :ciauz:


  • User Attivo

    @Laburno said:

    Quindi per includere un font personalizzato, o aspetti, o ricorri ad altri metodi quali sIFR (fai un ricerca qua nel forum che ne abbiamo già parlato).

    mi dici dove per favore?xkè non ho trovato granchè...
    grazie
    :ciauz:


  • User Attivo

    @talkoman said:

    mi dici dove per favore?xkè non ho trovato granchè...
    grazie
    :ciauz:

    Certamente, eccola qui:
    http://www.mikeindustries.com/sifr

    ne esistono diverse versioni, questa dovrebbe essere quella base.

    :ciauz:


  • User Attivo

    azz mi hanno rubato il nome 😄 😄 (l'aggiunta della 'O' finale risale solo a 2-3 anni fa)