赞 | 3 |
VIP | 0 |
好人卡 | 39 |
积分 | 1 |
经验 | 101436 |
最后登录 | 2017-9-1 |
在线时间 | 2276 小时 |
Lv1.梦旅人 路人党员
- 梦石
- 0
- 星屑
- 52
- 在线时间
- 2276 小时
- 注册时间
- 2010-12-30
- 帖子
- 3225
|
在gamefont.css里定义font-face后用我的插件- //=============================================================================
- // Fonts.js
- //=============================================================================
- /*:
- * @plugindesc Manage Game Fonts
- * @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);
复制代码 |
评分
-
查看全部评分
|