Wings 3D Development Forum

Full Version: [solved] When make a text primitive,Wings load system Fonts only(in OSX).
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Note:This is issue of Text Primitive plugin.
(There is no problem when selecting the UI font for system/user font.)

In OSX built-in Font dialog,it had list to fonts which system fonts and users installed fonts.
So I tried to select to user installed fonts,but returned an error message that "the font can't find".

Could you makes able to using both font?
In OSX, it is separate places of the system fonts and user installed fonts.
I suspect this issue may happen on Linux too.


Regards
-------------
tkbd
Somebody is working on this problem?
I made a debug version of wpc_tt module for fix this problem.
So in this version,if your OS is MacOSX, program will also scans for user font directory path(/User/Username/Library/Fonts/).

File is here; wpc_tt modify for Wings3D 2.x.x
http://brace.client.jp/wings3d_141/file.html#cjkdemo
wpc_tt_mod_for_wings2.0.2.zip

--------------------------------
But,I've found the cause of aother bugs on TextPrimitive.
That was serious.

On OSX Native Font dialog,this doesn't return correct values for font that has multiple weights.
(For example "ExtraLight","Extrabold",Regular and "Heavy" etc...).

At present, the dialog will return only a particular style type.
(ForExample Italic,bold,nomal,light)

So Wings3D fails to font acquisition.
To resolve the problem, it will need to fix the Wxwidgets side....



Changed features and Attension:

*This version contain the features that CJK font support and Vertical Text.
*Also add the menu to select a fontfile directly(Relief measures for Native font dialog problem)
*This is debug version,so Please use carefully.

About Wings3D debugging log output:
* Location list of fonts that are installed.
* And character code corresponding to the input character, the sequence number of Cmap table.
* The return value from the native font selector
* Outputs and information about WxFont related TrueType.

For example:
Code:
Matching Table Of wings
           {{"Gen Shin Gothic ExtraLight",normal,normal}, "/Users/username/Library/Fonts/GenShinGothic-ExtraLight.ttf"},
           {{"Gen Shin Gothic Heavy",normal,bold}, "/Users/username/Library/Fonts/GenShinGothic-Heavy.ttf"},
           {{"Gen Shin Gothic Light",normal,normal}, "/Users/username/Library/Fonts/GenShinGothic-Light.ttf"},

About test to OSX Native Font Problem.
*** Arial *** OK!!
User Selected : Arial normal normal
Font_Path =  "/Library/Fonts" , Fixed: "/Library/Fonts/Arial.ttf"
Matched!!

*** Gen shin gothic Extra Light *** Native selector is return "normal light"
User Selected : "Gen Shin Gothic" normal light
Font_Path =  "." , Fixed: "./unknown"
Fail     {{"Gen Shin Gothic Light",normal,normal}, "/Users/username/Library/Fonts/GenShinGothic-Light.ttf"},


***Gen shin gothic Extra Light *** But Native Font selector return  normal light
User Selected : "Gen Shin Gothic" normal light
Font_Path =  "." , Fixed: "./unknown"
Fail    {{"Gen Shin Gothic ExtraLight",normal,normal}, "/Users/username/Library/Fonts/GenShinGothic-ExtraLight.ttf"},
---------------
tkbd
Can you send a pull request on github also, it is so much easier for me to add it to wings.
And it is easier to discuss about the code if there is something I think you should change.
dgud,Thanks for reply!

I did a debug version of the pull request.
It is contains a code for verification and debugging.

Best regards.
-----------------
tkbd
I have re-written the font plugin now, please tests 2.2.5
dgud,Thank you for re-write text primitive plugin.
OK,I checked with Wings3D v2.2.5.
Then,When make 3D text, It choose system fonts that located under '/System/Library/Fonts/' directory load to failed.Sad

For example
Quote:/System/Library/Fonts/ZapfDingbats.ttf
/System/Library/Fonts/Apple\ Braille\ Outline\ 6\ Dot.ttf
/System/Library/Fonts/ヒラギノ角ゴシック W8.ttc
/System/Library/Fonts/Monaco.dfont
/System/Library/Fonts/Courier.dfont
/System/Library/Fonts/Times.ttc
/System/Library/Fonts/Avenir.ttc
/System/Library/Fonts/Helvetica.ttc

Reference:
Mac Users choose a font from a category called a 'Collection' in a font palette invoked by Wings3D.
See https://developer.apple.com/design/human...graphy.png
but actualy, It seems that OSX native font palette access a following directories.
  • System(Default installed font for system use) /System/Library/Fonts/*
  • User(Installed for only Current user) /Users/Username/Library/Fonts/*
  • All users(Installed for All users) /Library/Fonts/*
The fonts that for 'User' and 'All users' installed were OK.Smile


P.S
The plugin become very powerful!!
As far as I can confirm, I was able to load some fonts ,and make 3d text object from otf, ttc, ttf font that contains CJK mixed charactor's glyphs.
Ok, thanks, I have now added "/System/Library/Fonts" to the search path.

It's strange I didn't find that when I googled where the directories where, must have missed that.