1ForeverHD / TopbarPlus

Construct dynamic and intuitive topbar icons. Enhance the appearance and behaviour of these icons with features such as themes, dropdowns and menus.
https://devforum.roblox.com/t/topbarplus/1017485
Mozilla Public License 2.0
105 stars 135 forks source link

Font Clipping Issue Type:Bug #60

Closed Inctus closed 2 years ago

Inctus commented 2 years ago

Reproduction Code and Place Link

Reproduction Place Link: https://www.roblox.com/games/10845284955/TopbarPlus-Text-Clipping-Repro

Icon.new()
    :setLabel("Hello World")
    :set("iconFont", Enum.Font.Arcade)

Description of Issue | Proposed General Fix

The issue occurs as a result of the TextBounds not being recalculated for each font change.

1ForeverHD commented 2 years ago

Thanks for the report! This is likely also related to: https://github.com/1ForeverHD/TopbarPlus/issues/38#issuecomment-1003734899

We can use the recently released Font APIs to overcome these more effectively: https://devforum.roblox.com/t/new-font-ui-beta/1967004

Explore using ContentText instead: https://devforum.roblox.com/t/topbarplus-v276-construct-intuitive-topbar-icons-customise-them-with-themes-dropdowns-captions-labels-and-much-more/1017485/666?u=foreverhd

Also explore using ContentText instead of AbsoluteSize (this is important for removing styling tags used with rich text): https://devforum.roblox.com/t/topbarplus-v276-construct-intuitive-topbar-icons-customise-them-with-themes-dropdowns-captions-labels-and-much-more/1017485/666?u=foreverhd

1ForeverHD commented 2 years ago

Exploring further here: https://devforum.roblox.com/t/how-to-remove-all-richtext-tags-from-text-without-using-textcontenttext-or-how-to-get-size-of-text-while-ignoring-richtext-tags/1994576

1ForeverHD commented 2 years ago

Resolved in v.2.8.0!