Tag: 字体

Node.js发送空字体文件

我尝试使用Node.js镜像我的公共CDN服务器(Microsoft IIS)进行本地开发。 我有这个服务器: var express = require('express'); var app = express(); app.use(express.static('../../resources')); var server = app.listen(8282); 并请求在我的网站,加载一个字体文件glyphicons的CSS文件。 但由于某种原因,我没有在铬中的数据,不pipe字体的types。 在公共CDN上一切正常。 节点服务器有什么问题?

获得ngPrime为Angular 2工作

我已经在Angular 2项目上工作了,到目前为止GMap和Chartjs的工作。 但现在我有问题,如果我包括一个Accordeon它没有得到格式正确。 我包括primeng和primeui通过 npm install primeng –save npm install primeui –save 还有font-awesome via npm安装字体真棒 – 保存 这是我的angular-cli.json "styles": [ "styles.css", "../node_modules/primeng/resources/themes/omega/theme.css", "../node_modules/font-awesome/css/font-awesome.min.css", "../node_modules/primeng/resources/primeng.min.css", "../node_modules/primeui/primeui-ng-all.min.css" ], "scripts": [ "../node_modules/jquery/dist/jquery.js", "../node_modules/bootstrap/dist/js/bootstrap.js", "../node_modules/primeui/primeui-ng-all.min.js" ], 这是迄今为止的结果。 产生的输出 这将是很好,如果有人可以提出一些build议:-)

从NPM复制资产

我试图用npm使用font-awesome ,但是用最新版本(> 4),我很难findfonts目录。 之前,我正在使用像cp -R ./node_modules/font-awesome/fonts/* dist/assets/这样的npm脚本,但是当我的库被一个程序使用时,这将不再工作,该程序将重新组合所有模块根目录。 有一个安全的方法来知道他们在哪里或任何其他可以实现相同的目标的伎俩? 谢谢

如何保护节点的webkit应用程序的字体?

我想创build一个Node-Webkit应用程序,但避免重新分配字体文件。 我想到了一些方法。 我正在考虑托pipe字体解决scheme使用的模型,其中包含字体文件的临时URL被托pipe。 我有一种方法来encryption字体文件。 您可以将字体转换为base64将其分配给JavaScript库中的一个局部variables与闭包。 JavaScript文件被编译为二进制文件,不能被最终用户读取。 将base64值设置为style属性可能会将该字体作为base64值暴露给DOM。 我想要做的是创build一个临时路由到字体文件,我从私有的base64值呈现,然后删除路由一旦被访问。 我可以看到如何实现这个作为node.js应用程序,但我是新的Node-Webkit,并没有看到路由器上的任何文档。 似乎托pipe字体解决scheme允许一次性访问字体文件,以便用户不能下载文件。 那么Node-Webkit是否有能力执行路由?

Webpack 2和SASS:一个SASS脚本无法find它的字体依赖关系时,它是@导入到另一个SASS文件

我想利用Webpack 2和Materialise挖掘现代前端开发。 因为我可能会自定义样式,所以我想将Materialise SASS文件导入到我自己的SASS文件中,这样我就可以覆盖东西了。 但是,如果我这样做,Webpack 2无法编译我的SASS文件了,因为它没有findMaterialize字体。 这是我目前的webpack.config.js ,从互联网上复制: const ExtractTextPlugin = require('extract-text-webpack-plugin'); const extractSass = new ExtractTextPlugin({ filename: "style.css", disable: process.env.NODE_ENV === "development" }); module.exports = { entry: './src/js/index.js', output: { path: __dirname + '/public/dist', filename: 'app.js' }, module: { rules: [ { test: /\.scss$/, use: extractSass.extract({ use: [{ loader: "css-loader" }, { loader: "sass-loader" […]

什么是npm字体?

每当我searchnpm font我得到一些npm模块,我不能找出这个标志的字体https://www.npmjs.com/ 。 npm是JavaScript运行时环境Node.js的默认包pipe理器。 我试图得到一些相关的反馈,如果有一些谷歌字体接近npmjs字体是,但我失败了。

Webpack @ font-face相对path问题

我有一个在angular2应用程序中使用相对path加载字体的问题。 在app.ts我有这两个import import '../../../public/css/fonts.less'; import '../../../public/css/main.less'; 在字体里面我有@ font-face声明: @font-face { font-family: 'Montserrat'; src: url('/public/fonts/Montserrat/Montserrat-Regular.eot'); /* IE9 Compat Modes */ src: url('/public/fonts/Montserrat/Montserrat-Regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('/public/fonts/Montserrat/Montserrat-Regular.ttf') format('truetype'), /* Safari, Android, iOS */ url('/public/fonts/Montserrat/Montserrat-Regular.svg#Montserrat-Regular') format('svg'); /* Legacy iOS */ font-style: normal; font-weight: normal; text-rendering: optimizeLegibility; } 这工作正常。 但是,如果我试图改变相对的path,例如 url('../../fonts/Montserrat/Montserrat-Regular.eot'); 我得到这个错误: 错误:./~/css-loader!./~/less-loader!./public/css/fonts.less模块​​未find:错误:无法parsing“文件”或“目录”../fonts/Montserrat/Montserrat -Regular.eot in [./~/css-loader!./~/less-loader!./public/css/fonts.less 6:85-138 ERROR […]

npm使用css和font来发布组件

我想在NPM上发布一个angular度2的组件。 这个组件使用引用一些字体的css。 至于发布.ts文件,我可以做到这一点。 但是我对于CSS和字体感到迷茫。 我有 : despotic-turtle.component.ts despotic-turtle.component.css fonts/font.ttf .svg … 我在我的CSS这个: @font-face { font-family: 'despotic-turtle'; src: url('despotic-turtle/fonts/font.eot?ggipqk'); /* ….*/ } 我不能离开CSS和字体,所以可以做些什么?

带有NPM和Gulp的Google Material Design图标字体

我正在尝试将Google材料devise图标字体导入到我的项目中。 我已经安装了NPM软件包 npm install material-design-icons –save-dev 它存在,但我不知道如何让它包含在我的SCSS文件。 我试过导入几种不同的方法,他们都失败了。 我也试过从node_modules中引用字体文件,这也是行不通的。 必须有一种方法来将此字体包含或导入到SCSS中。

通过LESS将字体松鼠生成的字体集成到Twitter Bootstrap中

我试图使用字体松鼠生成的字体作为Twitter Bootstrap的基础字体(从LESS文件编译)。 我在Node.js中使用Express.js,并在字体目录中包含了字体文件 myapp |_ public |_ stylesheets |_ font 我已经通过更改bootstrap.less的variables来“安装”Font Awesome,并让它工作,所以我知道目录结构是正确的。 使用字体目录中的自定义字体文件,我下一步要去哪里? 我是否需要制作一个包含@font-face声明的my-custom-font.less文件,还是需要在引导LESS文件之一中声明这个文件? 我知道基础字体是通过@baseFontFamily属性在variables.less声明的,但正如我所描述的,我不太确定如何声明这是我的自定义字体系列。 提前致谢。 编辑 下面是我尝试使用的代码片段: @ChatypePath: "font"; @font-face { font-family: 'chatypeb2.1regular'; src: url('@{ChatypePathPath}/chatypeb2.1regular-webfont.eot?v=3.0.1'); src: url('@{ChatypePathPath}/chatypeb2.1regular-webfont.eot?#iefix&v=3.0.1') format('embedded-opentype'), url('@{ChatypePathPath}/chatypeb2.1regular-webfont.woff?v=3.0.1') format('woff'), url('@{ChatypePathPath}/chatypeb2.1regular-webfont.ttf?v=3.0.1') format('truetype'); } 注 :这里有一些错误。 更新: 正确的声明: @chatypeFontFamily: "ChatypeB2.1ThinThin", "Courier New", monospace; @font-face { font-family: 'ChatypeB2.1ThinThin'; src: url('font/chatypeb2.1thin-webfont.eot'); src: url('font/chatypeb2.1thin-webfont.eot?#iefix') format('embedded-opentype'), url('font/chatypeb2.1thin-webfont.woff') format('woff'), url('font/chatypeb2.1thin-webfont.ttf') […]