第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

無(wú)法在 quasar 框架中加載我自己的字體

無(wú)法在 quasar 框架中加載我自己的字體

SMILET 2023-07-06 09:58:30
我正在構(gòu)建一個(gè)僅適用于平板電腦的應(yīng)用程序,我想使用我自己的 ttf 格式的字體。如何將 .ttf 字體加載到 quasar 中?另一種選擇是將其轉(zhuǎn)換為 woff?我在 app.scss 中嘗試過(guò)此操作,但沒(méi)有成功:@font-face {  font-family: 'MyFont';  src: url('css/fonts/MyFont.ttf') format('truetype');  font-weight: 700;  font-style: italic;}.my-custom-font {  font-family: 'Cookies', Fallback sans-serif;}
查看完整描述

2 回答

?
收到一只叮咚

TA貢獻(xiàn)1821條經(jīng)驗(yàn) 獲得超5個(gè)贊

從 quasar.config.js 文件中刪除“roboto-font”(除非您仍打算將其用作輔助字體)。從 Google Fonts 中選擇一種字體進(jìn)行導(dǎo)入,或下載要包含的字體系列 .WOFF 文件。

您應(yīng)該導(dǎo)入字體系列,但它應(yīng)該進(jìn)入“src/css/quasar.variables.*”文件。然后,更改一個(gè)或多個(gè)默認(rèn)樣式變量。

我將假設(shè)使用 Sass 作為以下示例:

// Example: Import Open Sans with multiple weights

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700;800&display=swap')


// Set the default font-family

$typography-font-family : 'Open Sans', sans-serif !default


// Fix font-weight values to match the imported font family weights

$text-weights: (thin: 300, light: 400, regular: 600, medium: 700, bold: 800, bolder: 800) !default

$button-font-weight: 600 // or 400 if you prefer thinner


查看完整回答
反對(duì) 回復(fù) 2023-07-06
?
慕萊塢森

TA貢獻(xiàn)1810條經(jīng)驗(yàn) 獲得超4個(gè)贊

1-將字體文件放入 ./src/css/fonts 文件夾中


2-在./src/css/app.css中聲明字體名稱


@font-face {

  font-family: "vazir";

  font-style: normal;

  font-weight: 400;

  src: url("./fonts/Vazir-Medium.woff2") format("woff2"),

    url("./fonts/Vazir-Medium.ttf") format("truetype"),

    url("./fonts/Vazir-Medium.woff") format("woff");

  font-display: swap;

}

3-在./src/css/quasar.variables.scss中定義字體


$primary: #1976d2;

$secondary: #26a69a;

$accent: #9c27b0;


$dark: #1d1d1d;

$dark-page: #121212;


$positive: #21ba45;

$negative: #c10015;

$info: #31ccec;

$warning: #f2c037;


$typography-font-family: "vazir";

4-Comment robots-font inside ./quasar.config.js


 extras: [

      // 'ionicons-v4',

      // 'mdi-v5',

      // 'fontawesome-v6',

      // 'eva-icons',

      // 'themify',

      // 'line-awesome',

      // 'roboto-font-latin-ext', // this or either 'roboto-font', NEVER both!

      //"vazir",

      // "roboto-font", // optional, you are not bound to it

      "material-icons", // optional, you are not bound to it

    ],


查看完整回答
反對(duì) 回復(fù) 2023-07-06
?
開(kāi)滿天機(jī)

TA貢獻(xiàn)1786條經(jīng)驗(yàn) 獲得超13個(gè)贊

我使用手寫筆,沒(méi)有像其他人建議的那樣刪除任何字體線,而是通過(guò)執(zhí)行以下步驟:

  1. 將字體下載到特定文件夾,即“ assets/fonts/plex

  2. 聲明字體名稱。

  3. 設(shè)置$typography-font-familyquasar.variables.styl

應(yīng)用程序風(fēng)格:

// app global css in Stylus form


@font-face {

  font-family: plex;

  src: url(../assets/fonts/plex/IBM-Plex-Sans-Arabic/fonts/complete/woff/IBMPlexSansArabic-Regular.woff);

}

類星體.變量.styl:


// Quasar Stylus Variables

// --------------------------------------------------

// To customize the look and feel of this app, you can override

// the Stylus variables found in Quasar's source Stylus files.


// Check documentation for full list of Quasar variables


// Your own variables (that are declared here) and Quasar's own

// ones will be available out of the box in your .vue/.styl files


// It's highly recommended to change the default colors

// to match your app's branding.

// Tip: Use the "Theme Builder" on Quasar's documentation website.


$primary   = #1976D2

$secondary = #26A69A

$accent    = #9C27B0


$dark      = #1D1D1D


$positive  = #21BA45

$negative  = #C10015

$info      = #31CCEC

$warning   = #F2C037


$typography-font-family = 'plex'

類星體安裝配置:


App dir........... /home/abuabdellah/work/.../quasar

    App URL........... http://localhost:8080

    Dev mode.......... spa

    Pkg quasar........ v1.15.23

    Pkg @quasar/app... v2.2.10

    Transpiled JS..... yes (Babel)


查看完整回答
反對(duì) 回復(fù) 2023-07-06
  • 2 回答
  • 0 關(guān)注
  • 270 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)