Project1
标题:
能把字体去掉吗?
[打印本页]
作者:
v2sam
时间:
2015-11-6 10:13
标题:
能把字体去掉吗?
搞了个最小体积的打包,仍然有30M大,发现字体就占20M,能把这个字体去掉,直接调用玩家的系统字体吗?
作者:
欧买歌
时间:
2015-11-6 10:22
https://rpg.blue/thread-384831-1-3.html
此贴方法可以更改字体,黑体才有10M左右,直接把字体删掉我也不知道能不能运行,自己试试吧。
作者:
汪汪
时间:
2015-11-6 23:56
//=============================================================================
// Fonts.js
//=============================================================================
/*:
* @plugindesc Change game default fonts and waiting fonts to load
* @author 0nepeop1e
*
* @param Bitmap Font
* @desc Default font face used for bitmap in game.
* @default GameFont
*
* @param Window Font
* @desc Default font face used for window in game.
* @default GameFont
*
* @param Fonts
* @desc List of font face definded in gamefont.css, seperate with ';'
* @default GameFont
*/
Function.prototype.clone = function() {
var that = this;
var temp = function () { return that.apply(this, arguments); };
for(var key in this) {
if (this.hasOwnProperty(key)) {
temp[key] = this[key];
}
}
return temp;
};
(function(pm){
ft = {};
ft.bitmapFont = pm.parameters('Fonts')["Bitmap Font"] || "GameFont";
ft.windowFont = pm.parameters('Fonts')["Window Font"] || "GameFont";
ft.fontsList = (pm.parameters('Fonts')["Fonts"] || "GameFont").split(";");
Scene_Boot.prototype.isGameFontLoaded = function() {
var loaded = Graphics.isFontLoaded(ft.fontsList[0]);
for(var i = 1; i < ft.fontsList.length; i++)
loaded = loaded && Graphics.isFontLoaded(ft.fontsList[i]);
if (loaded) {
return true;
} else {
var elapsed = Date.now() - this._startDate;
if (elapsed >= (20000 * ft.fontsList.length)) {
throw new Error('Failed to load Fonts');
}
}
};
ft._initBitmap = Bitmap.prototype.initialize.clone();
Bitmap.prototype.initialize = function(){
ft._initBitmap.apply(this, arguments);
this.fontFace = ft.bitmapFont;
};
Window_Base.prototype.standardFontFace = function() {
return ft.windowFont;
};
})(PluginManager);
复制代码
使用这个插件,然后在插件设置那里写上字体名称,
比如 '黑体','微软雅黑','楷体'
差不多应该可以,多写几个,应该可以确保万无一失
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1