General XMetaL Discussion
deng September 7, 2010 at 1:09 pm
Changing font type in normal view of XMetaL AuthorSeptember 7, 2010 at 1:09 pmParticipants 4Replies 5Last Activity 11 years, 9 months ago
Is it possible to change the font type in normal view of XMetaL Author?
Some characters cannot be displayed in normal view.
In plain text view, it is fine, but once I turn to normal view, the characters become white boxes with codes inside. Those are chinese characters. They are well displayed if I open the xml with notepad or microsoft word. I am not concerned with any output. I am concerned with the xml itself.
It seems that the default font in normal view does not support the encoding for those character. So I would like to know if thre is any method that I can change the font type in normal view so that those characters can be diaplyed properly.Derek Read September 7, 2010 at 10:58 pm
Reply to: Changing font type in normal view of XMetaL AuthorSeptember 7, 2010 at 10:58 pm
You need to create a customization that includes a CSS file that specifies a value for font-family to use a font that contains glyphs for Chinese. If you have not created a CSS file a basic one will have been automatically generated for you. You can either start with it or create a new one. The CSS file defines how your document will appear in Tag On and Normal view.
For font-family in your CSS file you could (and probably would) specify the same font you specified when viewing your documents in Notepad or in XMetaL Author's Plain Text view. How Plain Text view appears is purely controlled by the settings in Tools > Options > Plain Text View. In Notepad the font setting is in Format > Font.
Creating and editing CSS files is documented in the Customization Guide included with XMetaL Developer as well as how to create a deploy customizations and various other things you may need to know. The Customization Guide is also available here:
We have various partners and a Professional Services team that specialize in customizing the product for use with specific schemas (DTD or W3C Schema).deng September 8, 2010 at 2:52 am
Reply to: Changing font type in normal view of XMetaL AuthorSeptember 8, 2010 at 2:52 am
Can you point out where the CSS is located?
In the manual, it is said that CSS is usually in the same folder as dtd files. But when I edit the sample files of XMetal in “my documents”, I am not able to find any CSS.
Is there GUI in XMetal to create a CSS? or do I need to create it via notepad?Derek Read September 8, 2010 at 6:45 am
Reply to: Changing font type in normal view of XMetaL AuthorSeptember 8, 2010 at 6:45 am
XMetaL Author itself does not include a CSS editor. Customizations can be created with XMetaL Developer, which includes a CSS editor, CTM editor, script editor, forms (XFT) editor and other functionality for creating customizations including compiling scripts into MCR files, debugging capabilities, the Programmer and Customization Guides and the ability to generate XAC files.
However, the CSS files consumed by XMetaL Author are just standard CSS files that follow the W3C CSS recommendations and so in theory any CSS editor or plain text editor can be used to create them.
If you are running a newer version of XMetaL Author (5.5+) the auto-generated CSS file (if one was created for you) will have been generated here in order to be compatible with requirements for writing out per-user files in newer versions of Windows:
When it was generated a dialog would have been displayed telling you the exact path to the file.
An example on Windows 7 where my DTD is located at C:testtest.dtd:
However, you can ignore all of that if you will be creating your CSS file using XMetaL Developer. If you don't have Developer you might wish to find that file in order to get some example of what you might wish to start with. In a typical customization you would place your CSS file in the same folder as your DTD or XSD file (as noted in the Customization Guide), giving it the same name as your DTD or XSD file but with a .CSS file extension. If this file is present it will be loaded. When it is not present then you get the auto-generated file (and you are notified of its creation).
Alternatively, you can create an XAC file (using XMetaL Developer) which contains your CSS file, CTM file, schema, and other optional files (MCR, XFT, etc).deng September 9, 2010 at 7:15 am
Reply to: Changing font type in normal view of XMetaL AuthorSeptember 9, 2010 at 7:15 am
I tried altering the css file to change the font type in normal view. The font type supports the Chinese characters, but still they are not displayed properly. More specifically, those are “CJK Unified Ideographs Extension B Block” Chinese characters. I would like to know whether or not XMetal Author supports those characters. I use font type “PMingLiU-ExtB” in word and notepad. Those Chinese characters are displayed properly. But even I change the font type to”PMingLiU-ExtB” in the normal view of XMetal Author, while boxes with codes inside are displayed.Derek Read September 9, 2010 at 8:59 am
Reply to: Changing font type in normal view of XMetaL AuthorSeptember 9, 2010 at 8:59 am
Current versions of XMetaL Author and XMAX support the rendering of characters in the Unicode Base Multilingual Plane (BMP) only. The Unicode BMP includes the first 65,536 characters of the Unicode specification, or U+0000 thru U+FFFF.
Characters above U+FFFF (U+10000 and up, including your block which is U+20000 thru U+2A6DF) cannot be rendered using glyphs and may appear as numbered entity references (if so, you will see the number inside a white rectangle which is XMetaL's way of rendering entities in Tags On view).
Ultimately we plan to support the rendering of characters in Unicode Planes 1 and higher (above the BMP). However, due to lack of demand (in comparison to other features we are implementing) this feature is currently not in any development schedule.
Some limitations in Windows (not entirely related to fonts and rendering the characters they define) may also need to be overcome before complete support for these Unicode planes can be provided. One of these is that (to the best of my understanding and after some limited testing) is that the Windows JScript engine, and possibly also VBScript engine, cannot currently properly handle these code points. Many XMetaL customizations use these scripting languages and so any of the APIs we provide for manipulating text might be limited by the characters that the engine(s) are capable of handling.
- You must be logged in to reply to this topic.