赞 | 58 |
VIP | 37 |
好人卡 | 59 |
积分 | 12 |
经验 | 66255 |
最后登录 | 2023-5-29 |
在线时间 | 1017 小时 |
Lv3.寻梦者
- 梦石
- 0
- 星屑
- 1232
- 在线时间
- 1017 小时
- 注册时间
- 2011-4-30
- 帖子
- 1516
|
- //=============================================================================
- // 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);
复制代码 使用这个插件,然后在插件设置那里写上字体名称,
比如 '黑体','微软雅黑','楷体'
差不多应该可以,多写几个,应该可以确保万无一失 |
评分
-
查看全部评分
|