游戏人生
首页
(current)
GameDevTools
登陆
|
注册
个人中心
注销
ImGui-WebAssembly
Introduction
Introduction
前言
前言
1. WebAssembly开发环境
1. WebAssembly开发环境
1.1 安装emsdk
2. ImGui Web
2. ImGui Web
2.1 编译ImGui Web
2.2 加载字体文件
2.3 字体模糊
2.4 中文字体
3. 内存限制
3. 内存限制
代码资源下载
点我下载
Github
点赞、收藏、关注
目录
<< 2.2 加载字体文件
2.4 中文字体 >>
## 字体模糊 ```text 「ImGui Web」是一本开源电子书,PDF/随书代码/资源下载: https://github.com/ThisisGame/imgui_web_book ``` 用imgui自带的example编译到网页后,字体很模糊。  到Github找了一个比较清晰的:`https://github.com/jnmaloney/WebGui` 在线演示:`https://jnmaloney.github.io/WebGui/imgui.html` <a id="antiCollectorAdTxt" href="https://github.com/ThisisGame/imgui_web_book">「ImGui Web」是一本开源电子书,PDF/随书代码/资源下载: https://github.com/ThisisGame/imgui_web_book</a> 把它复制到`F:\webassembly_book\files\imgui\examples\WebGui`,和其他示例放到一起。 然后把`files\imgui\examples\example_glfw_wgpu\Makefile.emscripten`复制过来,再把自带的`files\imgui\examples\WebGui\Makefile`的一些配置挪过来。 编译,然后启动http服务器,看看效果。  看着其实效果不是很好,最后发现应该是Windows系统的字体缩放导致的,Win系统将字体放大到了125%,ctrl+鼠标滚轮将网页缩小到80%后,效果就和exe一致清晰了。
<< 2.2 加载字体文件
2.4 中文字体 >>
12
代码资源下载
点我下载
Github
点赞、收藏、关注
目录
Introduction
Introduction
前言
前言
1. WebAssembly开发环境
1. WebAssembly开发环境
1.1 安装emsdk
2. ImGui Web
2. ImGui Web
2.1 编译ImGui Web
2.2 加载字体文件
2.3 字体模糊
2.4 中文字体
3. 内存限制
3. 内存限制