微信小程序外部字体的导入

微信小程序-开发者工具更新后所有程序都报wxss编译错误 立即下载
  • 事先准备
    因为微信不支持外部文件夹的权限,所以首先去下载一个自己选中的字体,也就是ttf文件,将该ttf文件上传至https://transfonter.org/
    注意选中 Base64 encode 然后点击convert转换并下载压缩文件,用Dw打开其中的css文件,将其中的代码,复制到页面的.wxss文件下
    再选择并调用。

存在问题:1、加入代码后界面所有格式混乱,图标移动位置,乱套

原因:跟下载后生成的css文本的代码内容的大小有关,可能超出了微信小程序空间的极限

2、加入代码后不再报错,但是,一运行,显示找不到该字体
或者显示如下

Failed to load font http://1109080104.debug.open.weixin.qq.com/pages/my/Heirloom.eot-do-not-use-local-path-./pages/my/my.wxss&126&6 : the server responded with a status of 404 (HTTP/1.1 404 Not Found) 
From server 127.0.0.1

可能原因:该字体面向英文字母的字体,而你开始用的是中文。

Qt基础之十九:进程与QProcess 进程就是一个程序的执行实例,也就是正在运行的程序。对操作系统来说,进程就是一个担当分配系统资源CPU时间、内存的实体。在Qt 中,我们使用QProcess来表示一个进程。这个类可以允许我们的应用程序启动一个新的外部程序,并且与这个程序进行通讯。当外部程序开始启动时,QProcess的状态为Starting;外部程序已经启动时,QProcess的状态为Running,并发送started()信号;当外部层序退出了,QProcess的状态为NotRunning(初始状态),并发送finished()信号。 阅读详情

相关推荐

[官方培训]22-UE资产优化 Epic 肖月 笔记

Nanite+Lumen目标:面向TA,美术,不影响视觉的前提下,优化运行和编辑效率引擎:UE5.1延迟管线平台:主流PC,Windows 10 with DX12。

Tcohneyn的博客 1576

wxss无法使用本地图片 uniapp do-not-use-local-path

微信小程序使用background-image没有图片显示 报错信息:图片-do-not-use-local-path pages/index/index.wxss 中的本地资源图片无法通过 WXSS 获取 解决方法:可以使用网络图片,或者 base64,或者使用标签。 .container { display: flex; background-repeat:no-repeat; background-image: url('../../images/user_bg.jpg'

IT匠人的博客 4798

JAVA进阶面试题:如何设计一个高并发系统?

如何设计一个高并发系统? 面试官心理分析 说实话,如果面试官问你这个题目,那么你必须要使出全身吃奶劲了。为啥?因为你没看到现在很多公司招聘的 JD 里都是说啥,有高并发就经验者优先。 如果你确实有真才实学,在互联网公司里干过高并发系统,那你确实拿 offer 基本如探囊取物,没啥问题。面试官也绝对不会这样来问你,否则他就是蠢。 假设你在某知名电商公司干过高并发系统,用户上亿,一天流量几十亿,高峰期并发量上万,甚至是十万。那么人家一定会仔细盘问你的系统架构,你们系统啥架构?怎么部署的?部署了多少台机器

uuop155的博客 1021

小程序:引入字体报错解决办法

提示: Failed to load local font resource /DIN-RegularItalic.eot-do-not-use-local-path-./app.wxss&229&9 net::ERR_CACHE_MISS 报错图: 前提:字体文件引入路径正确 Bug测试:仿照错误代码结构添加子结构view 出现报错。 使用...

轻风细雨_林木木 7956

在Proteus中用80C51模拟4线SPI点亮OLED屏幕

在Proteus里用80C51模拟4线SPI控制OLED屏幕使其显示图案(汇编实现)。

Connor3093的博客 5004

从零搭建风电场:手把手教你用WAsP+WindPRO完成风资源评估全流程

本文详细介绍了从零开始搭建风电场的全流程,重点讲解如何使用WAsP和WindPRO进行风资源评估和风场布局优化。内容包括软件配置、数据采集规范、风图谱建模实战、机组选型策略以及常见问题解决方案,帮助工程师掌握风电开发的核心技术,提升项目成功率。

year5的博客 372

微信小程序 本地资源图片无法通过 WXSS 获取,可以使用网络图片,或者 base64,或者使用image标签。

微信小程序不能使用background-image问题解决。 报错信息: pages/index/index.wxss 中的本地资源图片无法通过 WXSS 获取,可以使用网络图片,或者 base64,或者使用标签。 报错位置 background-image: .user-container { display: flex; flex-direction: column; ...

记录编程生活 6万+

uniapp - 强力解决H5网页浏览器跨域问题,如何解决uniapp请求接口在浏览器跨域问题,UniApp H5 跨域代理配置详细教程完美解决所有uniapp跨域(调用第三方接口或服务器api跨域)

uni-app 跨域,uniApp解决h5跨域问题,解决uni-app请求接口在浏览器跨域问题,uni.request请求跨域问题解决方案,uni-app-跨域解决方法,彻底解决uniapp发布为H5的跨域问题,uniapp H5页面设置跨域请求_uniapp h5跨域配置,uniapp开发 H5 解决跨域问题,uniApp请求解决跨域问题,uniapp request如何实现前端请求跨域,解决uniapp调试过程中的请求跨域和环境配置,Uniapp调用外部api接口跨域请求,uni-app发布H5页面跨域

🏆 前端领域优质创作者 5354

【实战】前端必会 —— 微信小程序引入背景图

wxss中直接引用本地图片会报错: 使用本地图片的话,需要在行内样式中引用 ,外部wxss只能引用线上图片(需要上传服务器后引用)背景图片既可以直接在最外层view使用background,也可以在relative的外层view内使用absolute的image标签(记得宽高设置100%)...

程序边界 8882

深度学习图神经网络 (GNN) —— 处理图结构数据(六十九)

本文系统介绍了图神经网络(GNN)的核心概念、主流模型及其应用。主要内容包括: GNN基础:阐述了图结构数据的特性(节点数不定、连接不规则),以及GNN相比CNN/RNN的优势在于处理非欧式空间的图数据。 核心机制:重点讲解了消息传递框架(MPNN),通过聚合邻居信息迭代更新节点表示,并分析了GCN的归一化邻接矩阵计算和GAT的注意力权重机制。 典型模型: GCN:基于归一化邻接矩阵的特征传播 GAT:引入注意力机制区分邻居重要性 GraphSAGE:通过采样解决大图扩展性问题 GIN:理论表达能力最强的图

hello.reader 300

1、硬件工程师笔面试真题汇总(2025版本)

答:按照使用习惯,电源指示灯用红色,信号指示灯用绿色这两种颜色的LED 灯技术最成熟,价格最便宜通孔是贯穿整个PCB 的过孔盲孔是从PCB 表层连接到内层的过孔埋孔是埋在PCB 内层的过孔。大多数PCB厂家的加工能力是这样的:大于等于8mil 的过孔可以做机械孔小于等于6mil 的过孔需要做激光孔对小于等于6mil 的微型孔,在钻孔空间不够时,允许一部分过打在PCB 焊盘上。

XU157303764的博客 2万+

UNI-APP引入第三方字体库问题

一、背景描述 在开发APP的时候,经常需要引入第三方字体图标,由于第一次使用UNI-APP这一前端混合框架做APP开发,在引入阿里巴巴矢量图标库不小心踩到了坑。 二、问题描述 VM176:5 Failed to load local font resource /static/iconfont/iconfont.ttf-do-not-use-local-path-./common/main....

dong_chl的专栏 2万+

2026华为OD面试题029:勇攀数字高峰

在给定的数字地形图里寻找登山路径,数字代表当前位置的海拔高度。要求从最低海拔出发,不断攀登,最终到达最高山峰。地图保证最低海拔和最高山峰都只有一个。 登山规则: - 路径上的海拔必须严格递增 - 只能向上下左右 4 个方向移动 - 路径必须从最低海拔开始,到最高海拔结束 - 每个地点只能走一次 - 每一步的攀登高度差必须大于 0,且不超过指定值 `K` 输出满足条件的登山路径的数量。

琅嬛福地 121

【教程】微信小程序导入外部字体详细流程

本文介绍了如何在微信小程序中导入外部字体,包括字体导入API的使用以及字体资源在服务器上的部署和访问等内容

WHY的博客 6998

廖雪峰Python教程[完整版]

廖雪峰的python教程整理的,已经排好版了,而且还是完整的,适合小白

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

微信小程序导入外部字体的详细流程

同时,根据实际需求和性能考虑,合理选择使用自定义字体或系统默认字体,以达到最佳的用户体验效果。对于微信小程序开发者而言,如何在小程序中导入外部字体,让品牌信息在小程序中完美呈现,是一个值得探讨的问题。在资源管理页面中,找到“上传资源”选项,并选择“字体”分类。在微信小程序页面中,您可以使用自定义字体样式来应用导入的外部字体。在小程序的js文件中,使用wx.getFontList API获取自定义字体的类名,并在页面中引用该类名。在wxml文件中,通过引用自定义字体的类名,即可将外部字体应用到页面元素上。

qq_56579776的博客 4449

Data-Structures-and-Algorithm-Analysis-in-Java.pdf

作者: Weiss, Mark A. 出版社: Addison Wesley Data Structures and Algorithm Analysis in Java is an “advanced algorithms” book that fits between traditional CS2 and Algorithms Analysis courses. In the old ACM Curriculum Guidelines, this course was known as CS7. This text is for readers who want to learn good programming and algorithm analysis skills simultaneously so that they can develop such programs with the maximum amo...

微信小程序导入其他字体会不会影响运行_微信小程序外部引入使用字体图标

项目中常常需要使用到字体图标,微信小程序中使用字体图标与在平常的web前端中类似但是又有区别。下面以使用阿里图标为例子讲解如何在微信小程序中使用字体图标。第一步:下载需要的字体图标进入阿里图标官网http://iconfont.cn/搜索自己想要的图标,如这里需要一个购物车的图标,流程为:搜索“购物车”图标--->点击“添加入库”-->点击购物车进入购物车-->点击下载代码按钮。...

weixin_34476045的博客 164

SIMATIC S7-1200, S7-1500 PID 控制[手册]

SIMATIC S7-1200, S7-1500 PID 控制[手册]

在微信小程序使用外部字体

小程序引用外包字体包!

挚友阳光的博客 3941

微信小程序导入其他字体会不会影响运行_微信小程序 如何引入外部字体库iconfont的图标...

如何引入外部字体库iconfont的图标,具体如下直接使用阿里巴巴的网络路径选择iconfont图标全局引入app.wxss@font-face {font-family: 'iconfont'; /* project id 518032 */src: url('//at.alicdn.com/t/font_518032_t2q88z3jok8iwwmi.eot');src: url('//at....

weixin_39989222的博客 190

微信小程序导入其他字体会不会影响运行_微信小程序 如何引入外部字体库iconfont...

如何引入外部字体库iconfont的图标,具体如下直接使用阿里巴巴的网络路径选择iconfont图标官网:阿里巴巴矢量字体库步骤:阿里巴巴字体库使用方法全局引入app.wxss?12345678910111213141516171819202122232425262728293031323334@font-face {font-family: 'iconfont'; /* project id ...

weixin_34662764的博客 220

微信小程序导入其他字体会不会影响运行_微信小程序如何引入外部字体库 Iconfont...

url('data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAAVUAAsAAAAAB9QAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAARAAAAFZW7koLY21hcAAAAYAAAABnAAABnNDmcCRnbHlmA...

weixin_39781363的博客 303

微信小程序导入其他字体会不会影响运行_微信小程序:引入外部中文字体 最简单...

本人最近在做学校的暑期社会实践微信小程序项目,今天在改index页面的时候觉得默认的中文字体不太好看,就想换个字体。没想到微信小程序引入外部字体还挺复杂,断断续续搞了一天终于搞好了。⚠️此办法需要使用github pages同样可以用的办法:转为base64(适用于英文字体,中文转了之后会特别大,超出微信小程序2M大小的限制)------------------------------------...

weixin_39761573的博客 310

如何将外部字体引入微信小程序?

文章目录方法一:方法二:缺陷:方法:第一步、压缩字体包(字体包的css文件大小在1M以下的忽略这一步)第二步、将字体包引入小程序 方法一: 一种是将字体文件上传至服务器,微信小程序引入服务器中的字体即可,详细参见这里 这种方法很好,很实用,但是却满足不了强迫症的我,难道我连加载个页面都需要从服务器中获取吗?? 方法二: 将对应的字体文件,上传到https://transfonter.org/,通过...

Bleach的博客 1136

【微信小程序】使用外部字体

将所有内容复制到app.wxss中,接下来我们就可以在小程序中任意使用我们导入的外部字体了,另外此中方法也适用于阿里巴巴iconfont字体的导入哦,有兴趣的朋友不妨去试试。在修改的过程中又留下了一些什么坑,当然本文并不旨在谈论这些坑和其解决方案,因为太多了,本文的重点是如何在小程序中使用外部字体。微信小程序其实说白了就是一个浏览器,一个基于webkit内核的浏览器,我们浏览特定的小程序其实就是在浏览特定的网页。答案当然是可以的,我们需要借助一个第三方网站。其实对于一般的需求,系统预置的字体已经够用了。

Qianmoer的博客 802

微信小程序自定义字体

参考:https://developers.weixin.qq.com/community/develop/doc/0002800c5dc43067d4aa906845b000?_at=1651138727050 参考:https://blog.youkuaiyun.com/weixin_40762926/article/details/108886989?spm=1001.2101.3001.6650.3&utm_medium=distribute.pc_relevant.none-task-blog-2%7

GXQ的博客 1259

引用外部css 微信小程序_【微信小程序】——wxss引用外部CSS文件及iconfont

小程序引入外部文件的方式是:@import "*/*.wxss";因为业务需要,正在开发的小程序中需要使用iconfont,很容易想到了H5的引入方式:````@font-face {font-family: "iconfont";src: url('iconfont.eot?t=1485242349767'); /* IE9*/src: url('iconfont.eot?t=148524234...

weixin_42372837的博客 518
上一篇: JavaScript库
下一篇: 微信小程序点击实现隐藏和点击实现显示
zero_1996
博客等级 码龄10年 13粉丝 27原创
评论 2
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值