'Segoe UI' font with font-face & local

后端 未结 3 460
旧巷少年郎
旧巷少年郎 2020-12-28 16:35

I want to use the \"Segoe UI\" font in a website if it is installed in the user\'s computer.

I have declared all the styles with @font-face in order to

3条回答
  •  感情败类
    2020-12-28 16:57

    @font-face {
        font-family: 'Segoe UI';
        src: url('./ui/segoeui.eot');
        src: local("Segoe UI"),
             local("Segoe"),
             local("Segoe WP"),
             url('./ui/segoeui.eot?#iefix') format('embedded-opentype'),
             url('./ui/segoeui.woff') format('woff'),
             url('./ui/segoeui.svg#SegoeUI') format('svg');
        font-weight: normal;
        font-style: normal;
    }
    
    @font-face {
        font-family: 'Segoe UI Semibold';
        src: url('/semibold/seguisb.eot');
        src: local("Segoe Semibold"),
             local("Segoe WP Semibold"), 
             url('/semibold/seguisb.eot?#iefix') format('embedded-opentype'),
             url('/semibold/seguisb.woff') format('woff'),
             url('/semibold/seguisb.svg#SegoeUISemibold') format('svg');
        font-weight: normal;
        font-style: normal;
    }
    
    @font-face {
        font-family: 'Segoe UI Bold';
        src: url('/bold/segoeuib.eot');
        src: local("Segoe Bold"),
             local("Segoe WP Bold"),
             url('/bold/segoeuib.eot?#iefix') format('eot'), /* Wrong format will tell IE9+ to ignore and use WOFF instead. MSHAR-2822 */
             url('/bold/segoeuib.woff') format('woff'),
             url('/bold/segoeuib.svg#SegoeUIBold') format('svg');
        font-weight: normal;
        font-style: normal;
    }
    
    @font-face {
        font-family: 'Segoe UI Light';
        src: url('/light/segoeuil.eot');
        src: local("Segoe UI Light"),
             local("Segoe WP Light"),
             url('/light/segoeuil.eot?#iefix') format('embedded-opentype'),
             url('/light/segoeuil.woff') format('woff'),
             url('/light/segoeuil.svg#SegoeUILight') format('svg');
        font-weight: normal;
        font-style: normal;
    }
    

    Download:

    https://github.com/KingRider/frontcom/tree/master/css/fonts

提交回复
热议问题