2024-12-12 09:19:46|Myriagame |source:minecraft skins
Overview
Caxton is named after William Caxtonon, which adds TrueType and OpenType font support.
The effect after using caxton
Characteristic
With the help of MSDF technology to present a clear text of any size;
Really crude and oblique fonts;
Complex text presentation;
Do not use AWT.
Current restrictions
Arabic plastic surgery (Shaping) in old fonts does not support old fonts.It is very complicated to work in the case of style and proper two -way text processing because we cannot use the ICU4J API.If you want to present the Arabic text correctly, then the player will have to use fonts supporting Arabic under Caxton.
It takes time to generate MTSDF from fonts, and it takes about 4 minutes to load 3 languages.Therefore, CAXTON will operate in parallel and cache the result after the first completion.
In addition, many UI elements in Minecraft have made incorrect assumptions on text rendering.Let them realize that two -way text (not to mention things like words) will be a major task. Welcome to make patch in this field.
In response to this problem, the GUI element has been patch, but no matter what its basic direction, the displayed text will be left to the left.
It is estimated that font hinting will never be supported.
Module/resource package compatibility
Conditional compatibility
The contour text will be errors when the use of sodium 0.5.5 (github)
ImmediaTelyfast ≥ 1.2.0
Disable the reusetextRendrerdrawer and sorttextRenderlayers option (automatic completion)
Exordium all
Disable EXORDIUM notice cushion function (Github)
Incompatible
Iris does not support the custom core color device (github); text that uses MSDF fonts in the world cannot be rendered at all
EMOJIFUL all Outright replaced Minecraft's default text rendering device
Memory leakage repair
(Memory Leak Fix)
≤1.1.1vanillaiccreamFix
all
At launch
Puting lib
1.18.2 All;
1.19.2 may all
Github conflict with Fabric API's core color device GitHub (Github)
[AOA3] Nothing World 3
(Advent of Ascension 3)
1.20.4-3.7.7
It will not collapse, but the outline text of AOA does not use MSDF fonts, AOA's scroll pane components will not
Partition (CLIP) uses the text of the MSDF font (plans to make compatible affiliated modules)
Can't properly handle the layout
It is known that the following modules cannot properly handle the text layout.They should not collapse the game, but the GUI elements of these modules may have unexpected behaviors, and may cause log printed warnings about "unsupported text processing methods".
Using the custom text field control (Widget), most of the rendering code (Github) of the original Minecraft of the original Minecraft (Github)
[Rei] Rei item manager
(ROUGHLY ENOUGH Items)
All of the unwilling methods (github) in certain controls (github)
Text -related core color device resource package
The resource packages of the core color device (such as Vanilla Tweaks "Dark UI" and "Transparent UI" resource package of Vanilla Tweaks need to be modified to be compatible with the CAXTON font.Operating system support
CAXTON uses native library to assist text plastic surgery and MSDF generation.The preparation of the module is bundled with a version of the library suitable for X86_64 Windows and Linux platforms.If you play games on other platforms, then you will have to build a copy of the module yourself.
If the module is still unable to identify your platform, change the RustTarget settings in config/caxton.json, change it to one of the names corresponding to the Rust platform corresponding to your platform, and report the problem to the author.
The author claims that there is no MAC in the family. Due to licenses, it is impossible to build binary files for MacOS.
How to use
CAXTON currently has two built -in font resource packages.The first font contains is Internet, while the second font is Open Sans.
If these cannot meet your needs, you can use your own fonts through a resource package.Before distributing a resource package containing font files, please read the font permit to ensure that you have the right to distribute the font.
Add fonts through resource packages
CAXTON adds a Caxton type font provider, which supports keys such as Regular, Bold, Italic, Bold_italic.Each one can be set as a identifier, wherein
{// the only necessary element."File": "If there are objects in the caxt_Providers key in the font json file, and a caxtON is installed, the object will be used instead of provident.This can be used to load the CAXTON font, and at the same time, it can also be retreated without installation of CAXTON.If you are not specified in caxtOn_providers, you will use Providers.: ", // The font is zoomed at the default size.// If this item is 1.0, after the font is zoomed, the top of the top (that is, the distance from the baseline] is exactly the 7 pixels of the default position.// Add to CaxTon 0.3.0."Scale_factor": 1.0, // The shadow offset is a multiple of the size of the Memefont pixel."Shadow_offset": 1.0, // The offset of rendering text on the X and Y axis (in the memefont pixel).// Add to 0.4.4 in caxton."Shift": [0.0, 0.0], // A 32 -bit integer number, which is interpreted as a 32 -bit floating point number, describing the tilt of the character.// This can be used to simulate the oblique body in the font without the oblique variant, but if there is a special oblique variant, it is best to use a dedicated oblique variant.// Add to 0.5.6 in caxton."The_font_designer_couldnt_be_asset_to_an_AN_ITALIC_SO_SLANT_SLANT_TEXT": 0, // A list of a feature label of OpenType.See below grammar: // https://docs.rs/rustybuzz/0.6.0/rustybuzz/strut.feature.html#Method.from_Str "Features": [], // only affects raster (Raster) technology.MSDF fonts always use interpolation.// If it is set to True, the textla (TEXELS) in Glyph Bitmap will be interspersed.// Add to caxton 0.4.0."Blur": False}
You can also add assets/
{// Specify the actual path of the font file because it will appear in the caxt font provider.// Generally speaking, this item should be omitted, but if you use a variable font, this item may be useful."PATH": "global configuration", // All these options are optional and the value provided by the default.// The texture of the texture concentrates the number of font units corresponding to each pixel.// If you use the MSDF font rendering technology, it can be set to a higher value.// If you use Raster, set it to a lower value."Shrinkage": 32.0, // Pixels to each side around the glyph boundary frame.// This should be greater than Range. If you leave empty, take the value of Range by default."Margin": 4, // The width between the smallest and maximum representing the symbolic distance around the glyphs.// This is a positive integer that is not greater than 255.// This also determines the width of the boundary drawing of the textbook text."Range": 4, // Whether there is a symbol distance field (SDF, Signed Distance Field).// If this item is null, then CaxTon will try to automatically determine it, but you can cover it to avoid guessing errors."INVERT": FALSE, // This item is used to set up a variable shaft coordinates in variable fonts.// The format of each element is as follows: // {"axis": , "value": } "variaations": [], // The font used in the font collection (font color)index.// If you are not sure, keep it as 0.// Add to CaxTon 0.3.0."FACE_INDEX": 0, // Specifying the use of MSDF -based rendering methods ("MSDF") or using the glywed bitmap ("Raster" -The experiments).// For most of the number, it is recommended to use MSDF, but Raster is more suitable for pixel fonts. // In addition, only Raster and Iris Shaders are completely compatible-if the color device is loaded, the text using the MSDF font will not be displayed in the world.// Add to caxton 0.4.0."Tech": "msdf", // maximum mipmap level (0 - 4).// If the MSDF rendering technology is used, it is meaningless to set this value.// However, when you use Raster rendering technology, it is useful for non -pixel fonts.// Add to caxton 0.4.0."Max_mipmap": 0}
The following options are located in config/caux.json:
{// One of the Rust platform names corresponding to your platform // (https://doc.rust-lang.org/nightly/rustc/platform-html)Essence// If this item is NULL, Caxton will determine the correct value for your platform, so it is recommended to change this value only if necessary.// Add to caxton 0.2.1."Rusttarget": NULL, // Use different methods to draw the level text on the experience bar: // For the Caxton font, the text is used to draw text.// Originally use the contour color to draw four offset copies, and then use the fill color to draw the main text.// This item is mainly used to make the experience level text better when using contour fonts.// It used to be a solution to the wrong rendering of ImmediaTelyfast, but there will be problems with the new version of the IF.// From CAXTON 0.5.0, CAXTON will detect whether IF 1.2.0 and updated versions are installed, and // use its API to alleviate the problem when the setting is opened.// See: //*https://gitLab.com/kyarei/caxton//isSues/31 //*https://github.com/raphimc/immediaateFast/49 // NonInfluence.// Add to caxton 0.4.0."TweakeXPtext": True, // Sort the chart on the Caxtonon text rendering layer from behind to before.// Theoretically, disable this option may cause text rendering errors; //, if IF expects to disable this option, and if developers have not received reports of rendering problems after disability.// If you encounter the rendering problem, some of the texts seem to be drawn in the wrong Z order, // Please try to enable this option and disable HUD batching in IF.// See: https://github.com/raphimc/immediaatelyfast/49 // Add to caxton 0.4.0."SorttextRenderlayers": False, // When using a non -caxton font to draw text, reuse a single TextRenderer.Drawer instance.Construction from the source code// This avoids creating a new object for each old thread group (Run Group), but it may lead to IF collapse.// When IF is detected, this item will be automatically disabled.// See: https://gitlab.com/kyarei/caxton//isSues/50 // Add to 0.4.7."ReusetextRenderErdrawer": true, // Some text processing methods are essentially problematic and are not supported by caxton.// Whenever these methods are called, caxton records a warning.// If this is true, caxton will throw an exception.// This option is mainly used for debugging.If you have any questions, please set it to FALSE.// Add to caxton 0.2.1."FatalonBrokenMethodCall": False, // Follow the information about when the Caxton font is added or deleted, for debugging.// If you have any questions, please set it to FALSE.// Add to CaxTon 0.3.0."DebugrefcountChanges": False, // Disable the Easter eggs of flashing slogans on a specific date.// Add to 0.5.6 in caxton."DisableEasteteeggs": False}
If you want to use the source code to build caxton, in addition to Gradle, you also need to install the Rust tool chain and CLANG.
By default, the local bank will only be constructed for hosting (referring to your computer) platform.To build it for other platforms, use the target ternary group (with comma separation) to specify other targets in xyz.flirora.caxTon.AdDITINALTATATS attributes.
For example, if you want to build a library for X86_64 Windows, then you can use it
Gradle Build -DXYZ.FLIRORora.caxton.adDitionalTargets = x86_64-PC-Windows-GNU
If there is an error about unknown targets, modify the variable cargocrossbuildtasksks in Caxton-IMPL/Build.gradle.
Compare with other modules
Betterfonts / TTFR
Betterfonts/TrueType Font Replacement was originally created by THVORTEX on 1.4.4, was updated from Bechill to 1.4.7, and then updated from the_minINGCRAFTER to 1.5.2 (MCF), and then the SecretDataz was updated. To 1.6.x-1.7.X (github) and then updated from Cubex2 to 1.8.9-1.12.2 (github).It was then updated from Secretdataz to 1.13 again.This module uses Java AWT's text layout function to lay out text.To render the shape, it willize them into a bitmap.The resolution is very limited.
However, unlike other modules listed below, it correctly implements the thick body and oblique style and complex script.
Smooth font
[SF] Smooth font, created by Bre2el, suitable for 1.7-1.12.The module also improved different proportion of text rendering and achieved some optimization of text rendering.
As for how it works, Who The RENDERTYPE KNOWS?This module is ARR.
Thaifixes
Thaifixes, created by Lion328 on FORGE 1.12.2 and Rift 1.13 (Github), and was updated from SecretDataz to 1.18.2 (gitHub) on Fabric.
This module has implemented its own shaping program for Thailand.Therefore, it is useless to require other complex rendering languages.
Modernization UI
[MUI] Modern UI (Modern UI), created by Blockamlimb on Forge, is 1.15-1.20.
From a screenshot, this MOD supports complex text rendering and real thick body and oblique style.It also fixes many issues of the original text layout (such as MC-117311).
Judging from the code, Modern UI has a surprising complex layout algorithm.However, the author has not studied it too much.
However, this module cannot render text with clear border.It also uses AWT to execute the text layout.
Minecraft 1.13 and above
Starting from 1.13, Minecraft supports TrueType and OpenType fonts.
However, this implementation is not different from the bit map font -the game converts the glyphs into a bitmap, and the text is naive.
In addition, it also mistakenly handle the glyphs, causing misplaced TTF text.
National Service DNF Dark Ni
2025-01-28 09:19:27The new screenshot of the be
2025-01-28 09:18:57The 15th anniversary wallpap
2025-01-28 09:18:273DM Xuanyuan Sinicization Gr
2025-01-28 09:17:57French magazine is the first
2025-01-28 09:17:27The sneak game "Republic" wi
2025-01-28 09:16:57The story between humans and
2025-01-28 09:16:27Capture "Trinity 3: Artifact
2025-01-28 09:15:27Wind direction change "Myste
2025-01-28 09:14:57DICE's new project "Dream" w
2025-01-28 09:14:27Pirate Minecraft Skins
Minecraft Skins
2024-12-10 04:11:27Pirate Minecraft Skins
Minecraft Skins
2024-12-10 04:11:26Master Minecraft Skins
Minecraft Skins
2024-12-10 04:11:25King Minecraft Skins
Minecraft Skins
2024-12-10 04:11:25Guide Minecraft Skins
Minecraft Skins
2024-12-10 04:11:24Dark Knight Minecraft Skins
Minecraft Skins
2024-12-10 04:11:23Sparta Minecraft Skins
Minecraft Skins
2024-12-10 04:11:23Moncraft Skins of the War
Minecraft Skins
2024-12-10 04:11:22Red Witch Minecraft Skins
Minecraft Skins
2024-12-10 04:11:22Golden Cavaliers Minecraft S
Minecraft Skins
2024-12-10 04:11:22