奇怪的演示图标替换了项目中的符号和标志。

huangapple go评论57阅读模式
英文:

Weird demo icon replacing symbols and signs in project

问题

我能帮你解决这个奇怪的问题。

我在本地运行我的Next.js项目(使用Sanity和styled components),一些符号被奇怪的演示图标所替代(请参见下面的图片)。字母似乎没有受到这个图标的影响,但是像,.-&这样的符号、数字和标志被替换了。这似乎也不是完全一致的,所以同样的符号在某些地方被替换,但在其他地方则没有。

奇怪的演示图标替换了项目中的符号和标志。

这张图片应该显示一个带有减号的计数器(左侧)、一个数字(中间)和一个加号(右侧)。

以下是我的package.json,如果有些库做了这种魔术:

"dependencies": {
  "@portabletext/react": "^3.0.0",
  "@sanity/client": "^5.4.2",
  "@sanity/image-url": "^1.0.2",
  "@types/node": "18.15.11",
  "@types/react": "18.0.34",
  "@types/react-dom": "18.0.11",
  "eslint": "8.38.0",
  "eslint-config-next": "13.3.0",
  "next": "13.3.0",
  "react": "18.2.0",
  "react-dom": "18.2.0",
  "styled-components": "^5.3.9",
  "typescript": "5.0.4"
},
"resolutions": {
  "styled-components": "^5"
},
"devDependencies": {
  "@types/styled-components": "^5.1.26",
  "babel-plugin-styled-components": "^2.1.1",
  "csstype": "^3.1.2"
}
英文:

I was wondering if anyone could help me solve this weird issue.

I'm running my Next.js (with Sanity and styled components) project locally and some of the symbols gets replaced by this weird demo icon (see picture below). Letters don't seem to be affected by this icon, but symbols, numbers and signs like ,.-& gets replaced. It doesn't seem to be entirely consistent either, so the same sign could be replaced some places, but not other places.

奇怪的演示图标替换了项目中的符号和标志。

This picture should've shown a counter with a minus sign (on the left), a number (in the middle) and a plus sign (on the right).

Here's my package.json in case there's some library doing this magic:

"dependencies": {
  "@portabletext/react": "^3.0.0",
  "@sanity/client": "^5.4.2",
  "@sanity/image-url": "^1.0.2",
  "@types/node": "18.15.11",
  "@types/react": "18.0.34",
  "@types/react-dom": "18.0.11",
  "eslint": "8.38.0",
  "eslint-config-next": "13.3.0",
  "next": "13.3.0",
  "react": "18.2.0",
  "react-dom": "18.2.0",
  "styled-components": "^5.3.9",
  "typescript": "5.0.4"
},
"resolutions": {
  "styled-components": "^5"
},
"devDependencies": {
  "@types/styled-components": "^5.1.26",
  "babel-plugin-styled-components": "^2.1.1",
  "csstype": "^3.1.2"
}

答案1

得分: 0

我发现项目中使用的字体出现了错误,这就是图标的来源。希望对将来的某人有所帮助!

英文:

I found out that there was an error with the font I was using in the project, and that was where the icon was coming from. Hope it helps someone in the future!

huangapple
  • 本文由 发表于 2023年6月12日 12:05:14
  • 转载请务必保留本文链接:https://go.coder-hub.com/76453583.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定