Is your feature request related to a problem? Please describe.
The Text label tool lacks the ability to choose font or font size, input multi-line text, choose background color/texture, control size when zooming.
Describe the solution you'd like
Add controls for the following:
If it allowed the use of HTML in the text, most of that could be handled though not as user-friendly.
Describe alternatives you've considered
The use of _info_ objects with notes is about the only alternative currently.
For fonts, do we start packing font in campaign as an asset (license issue?) or just let it fall back to font family?
Just getting ahead of bug reports "my players don't see the same text as me!"
I think @cwisniew was adding it to the "asset" list for HTML5 usage so may already be covered under that issue? It would be nice if MT packaged the font for you if used.
Bundling fonts would be iffy for license reasons as you say. Perhaps just font-families. Or we could bundle in a jillion of Google's free fonts. lol
I'd say bundle a bunch of fonts that we can confirm the license will work. To clarify/expand on one of the asks in the original post would be an option such that the size says fixed relative to the map (if you zoom out the map, the text gets smaller, you zoom in the map and the text gets larger, etc.)
So only let them pick fonts bundled with MapTool? Microsoft embeds fonts in Word/PowerPoint all the time, can't we do the same?
amending, i guess unless we can embed so it's secure and can not be extracted, it won't satisfy most licenses...
Most font licensing seems to be incredibly annoying.
True dat. Also, do you only show fonts MT packages? If not how do I know if it's a packages font vs system font?
We certainly could find a dozen or 2 curated fonts that are open source but?
Unless you can interrogate a font and know if it's open?
FWIW it would be nice to be able to use custom fonts in HTML5.
Or we just fall back to letting folks call out font families using fallback with a generic font at the end of their style: serif, sans-serif, monospace, cursive or fantasy
p.a {
font-family: "My Cool Font", Luminari, fantasy;
}
Do we support downloadable fonts?
@font-face {
font-family: "My Custom Font";
src: url(http://www.example.org/mycustomfont.ttf) format("truetype");
}
p.customfont {
font-family: "My Custom Font", Verdana, Tahoma;
}
After digging into this a bit, I think that retrofitting our current system to add these capabilities would be clunky and prone to breaking. We'd essentially have to re-implement the token scaling code, and there's a good chance we would have edge cases that are hard to detect.
I'd suggest instead we split Token into an AbstractToken/MapObject class and a Token subclass (which behaves like the current Token). We could then make a TextMapObject subclass of AbstractToken/MapObject which behave in some (but not all) ways like a normal token. Specifically, it'd be placable on a map, can be scaled, moved around, etc.
The existing text feature feels like a UI element, but the intended use-case for these text extensions is to mark up maps. If we wanted to keep the existing text objects, we could have the text entry dialog box have a checkbox that chooses between creating the old text object and one of these new TextMapObjects.
Why wouldn't we just make them function more like drawings? Drawings already scale with the maps. Labels are already movable.
I feel that what we're looking for shares more in common with Tokens than it does with drawings. If we were to make them closer to drawings, we'd have to re-implement a bunch of code, add properties, etc. where as if we made them closer to tokens we'd be removing a bunch of code in favor of the existing and very tested token code, and avoid duplicating a bunch of the functionality which the Tokens already have for us, such as layers.
It'd basically be like taking a token, stripping out some pieces of it, and rendering text instead of an image, but otherwise treating it the same.
Having multiple lines of text is similar to the Notes/GMNotes fields and we could use something similar to the Token properties dialog in concept rather than trying to recreate everything all over again which we'd need to do if we were to make them more akin to drawings.
I'd suggest instead we split
Tokeninto anAbstractToken/MapObjectclass and aTokensubclass (which behaves like the currentToken). We could then make aTextMapObjectsubclass ofAbstractToken/MapObjectwhich behave in some (but not all) ways like a normal token. Specifically, it'd be placable on a map, can be scaled, moved around, etc.
I hear the sounds of campaign file formats breaking...
Welcome to https://github.com/maptool/tree/develop-2.0 :)
I think this points to the fact we really need to go with an Entity Component System.
Would it also be possible for the text to be flagged as gm only?
That would certainly be handy.
Most helpful comment
I hear the sounds of campaign file formats breaking...
Welcome to https://github.com/maptool/tree/develop-2.0 :)
I think this points to the fact we really need to go with an Entity Component System.