如何使用ASP.NET Core v2在Visual Studio 2017中安装超赞字体 [英] How to install font-awesome in Visual Studio 2017 using ASP.NET Core v2

查看:274
本文介绍了如何使用ASP.NET Core v2在Visual Studio 2017中安装超赞字体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用ASP.NET Core v2构建网页,并且希望使用超棒的字体.

I am building a webpage using ASP.NET Core v2 and would like to use font-awesome.

首先让我说我尝试了几件事.例如从NPM安装Bower,从NPM安装font-awesome,从VS中的Bower软件包安装font-awesome,但似乎无济于事.

First let me say that I have tried several things. like installing Bower from NPM, installing font-awesome from NPM, installing font-awesome from Bower packages in VS but nothing seem to work.

有人可以提供安装真棒字体的正确方法吗(首选而不使用大量控制台命令或手动复制文件的方式).

can someone please provide the correct way to install font-awesome, (preferred without using a lot of console commands or manual copying of files.)

这是我目前行之有效的样子

This is what my depedencises currently looks like

推荐答案

我建议为此使用LibMan(

I would recommend using LibMan for this (Short documentation how to use it).

我是手动编写的,打赌您可以通过添加->客户端库"添加它.这是我的libman.json

I wrote it manually, bet you could add it through "Add -> Client-Side Library". Here is mine libman.json

{
  "version": "1.0",
  "defaultProvider": "cdnjs",
    "libraries": [
        {
            "library": "font-awesome@4.7.0",
            "destination": "wwwroot/lib/font-awesome",
            "files": [
                "css/font-awesome.min.css",
                "fonts/fontawesome-webfont.eot",
                "fonts/fontawesome-webfont.svg",
                "fonts/fontawesome-webfont.ttf",
                "fonts/fontawesome-webfont.woff",
                "fonts/fontawesome-webfont.woff2",
                "fonts/FontAwesome.otf"
            ]
        }
    ]
}

这篇关于如何使用ASP.NET Core v2在Visual Studio 2017中安装超赞字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆