@font-face {
font-family: GameFont;
src: url("Gamefonts.ttf");
}
@font-face {
font-family: GameFont2;
src: url("UIfontsW4.ttf");
}
.IIV::-webkit-media-controls-play-button,
video::-webkit-media-controls-start-playback-button {
opacity: 0;
pointer-events: none;
width: 5px;
}
/* * @command dTextSetting * @text 文字列ピクチャ設定 * @desc 文字列ピクチャの表示方法に関する設定です。変更した設定は描画後も保持されます。未設定の項目は現状維持されます。 */ // 注册命令监听 PluginManagerEx.registerCommand(script, 'dTextSetting', function(args) { $gameScreen.setDtextSetting(args); }); //============================================================================= // Game_Screen // 動的ピクチャ用のプロパティを追加定義します。 //============================================================================= Game_Screen.prototype.setDtextSetting = function(setting) { if (setting.fontFace !== '') { this.dTextFontFace = setting.fontFace; } }; // 获取 文字图片 设置 Game_Screen.prototype.getDTextPictureInfo = function() { const prefix = param.prefixText || ''; return { value : prefix + this.dTextValue, size : this.dTextSize, color : this.dTextBackColor, realTime : this.dTextRealTime, windowFrame : this.dWindowFrame, gradationLeft : this.dTextGradationLeft, gradationRight: this.dTextGradationRight, align : this.dTextAlign, font : this.dTextFontFace, lineHeight : this.dTextLineHeight, windowOpacity : this.dTextWindowOpacity, pictureWidth : this.dTextPictureWidth, pictureHeight : this.dTextPictureHeight, vertical : this.dTextVertical }; }; // 显示 图片 Game_Picture.prototype.show = function(name, origin, x, y, scaleX, scaleY, opacity, blendMode) { if ($gameScreen.isSettingDText() && !name) { arguments[0] = Date.now().toString(); this.dTextInfo = $gameScreen.getDTextPictureInfo(); this.updateDText(); $gameScreen.clearDTextPicture(); } else { this.dTextInfo = null; this._dTextValue = null; } _Game_Picture_show.apply(this, arguments); };
505681468 发表于 2024-4-14 22:29
虽然没用过,但是试试直接更改 DTextPicture.js 中的 Game_Screen 的 dTextFontFace ?
没看到有 D_TEXT_ ...
// Game_Screen // 動的ピクチャ用のプロパティを追加定義します。 //============================================================================= var _Game_Screen_clear = Game_Screen.prototype.clear; Game_Screen.prototype.clear = function() { _Game_Screen_clear.call(this); this.clearDTextPicture(); }; Game_Screen.prototype.clearDTextPicture = function() { this.dTextValue = null; this.dTextOriginal = null; this.dTextRealTime = null; this.dTextSize = 0; this.dTextAlign = 0; this.dTextBackColor = null; this.dTextFont = null; this.dUsingVariables = null; this.dWindowFrame = null; this.dTextGradationRight = 0; this.dTextGradationLeft = 0; }; Game_Screen.prototype.setDTextPicture = function(value, size) { if (typeof TranslationManager !== 'undefined') { TranslationManager.translateIfNeed(value, function(translatedText) { value = translatedText; }); } this.dUsingVariables = (this.dUsingVariables || []).concat(getUsingVariables(value)); this.dTextValue = (this.dTextValue || '') + getArgString(value, false) + '\n'; this.dTextOriginal = (this.dTextOriginal || '') + value + '\n'; this.dTextSize = size; }; Game_Screen.prototype.setDTextWindowCursor = function(pictureId, rect) { var picture = this.picture(pictureId); if (picture) { picture.setWindowCursor(rect); picture.setWindowCursorActive(true); } }; Game_Screen.prototype.setDTextWindowCursorActive = function(pictureId, value) { var picture = this.picture(pictureId); if (picture) { picture.setWindowCursorActive(value); } }; Game_Screen.prototype.getDTextPictureInfo = function() { return { value : this.dTextValue, size : this.dTextSize || 0, align : this.dTextAlign || 0, color : this.dTextBackColor, font : this.dTextFont, usingVariables: this.dUsingVariables, realTime : this.dTextRealTime, originalValue : this.dTextOriginal, windowFrame : this.dWindowFrame, gradationLeft : this.dTextGradationLeft, gradationRight: this.dTextGradationRight, }; }; Game_Screen.prototype.isSettingDText = function() { return !!this.dTextValue; }; Game_Screen.prototype.setDtextFont = function(name) { this.dTextFont = name; }; var _Game_Screen_updatePictures = Game_Screen.prototype.updatePictures; Game_Screen.prototype.updatePictures = function() { _Game_Screen_updatePictures.apply(this, arguments); $gameVariables.clearChangedVariables(); };
3000Roger 发表于 2024-4-14 23:28
可能是版本不同,我的说明内的确有 D_TEXT_SETTING FONT [字体名称] : 更改描绘字体
所以该怎么直接修 ...
3000Roger 发表于 2024-4-15 00:30
感謝你的回答,我再試試看!
Searching 121 files for "GAMEFONT" js\rpg_core.js: 853 * @type String 854 */ 855: this.fontFace = 'GameFont'; 856 857 /** ... 2340 this._createFPSMeter(); 2341 this._createModeBox(); 2342: this._createGameFontLoader(); 2343 }; 2344 .... 2663 /** 2664 * @static 2665: * @method _createGameFontLoader 2666 * @private 2667 */ 2668: Graphics._createGameFontLoader = function() { 2669: this._createFontLoader('GameFont'); 2670 }; 2671 js\rpg_scenes.js: 372 Scene_Boot.prototype.isReady = function() { 373 if (Scene_Base.prototype.isReady.call(this)) { 374: return DataManager.isDatabaseLoaded() && this.isGameFontLoaded(); 375 } else { 376 return false; ... 378 }; 379 380: Scene_Boot.prototype.isGameFontLoaded = function() { 381: if (Graphics.isFontLoaded('GameFont')) { 382 return true; 383 } else if (!Graphics.canUseCssFontLoading()){ 384 var elapsed = Date.now() - this._startDate; 385 if (elapsed >= 60000) { 386: throw new Error('Failed to load GameFont'); 387 } 388 } js\rpg_windows.js: 43 return 'Dotum, AppleGothic, sans-serif'; 44 } else { 45: return 'GameFont'; 46 } 47 }; 10 matches across 3 files
505681468 发表于 2024-4-15 00:57
版本确实不一样,基本可以不用管了......
用 MV 版试了试,是没问题的(说不定还真有插件冲突?可以先用 ...
3000Roger 发表于 2024-4-15 01:45
我重新测试后效果跟你第一张图一样
那字体加载的代码要加在哪里?
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |