Pages: 1
Print
Author Topic: Changing font type in normal view of XMetaL Author  (Read 1013 times)
deng
Member

Posts: 3


« on: September 07, 2010, 07:09:41 AM »

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.
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 1404



WWW
« Reply #1 on: September 07, 2010, 04:58:11 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:
http://na.justsystems.com/content-support-user-guides

We have various partners and a Professional Services team that specialize in customizing the product for use with specific schemas (DTD or W3C Schema).
« Last Edit: September 07, 2010, 06:12:10 PM by Derek Read » Logged
deng
Member

Posts: 3


« Reply #2 on: September 07, 2010, 08:52:51 PM »

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?
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 1404



WWW
« Reply #3 on: September 08, 2010, 12:45:36 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:
%appdata\SoftQuad\XMetaL\<version>\gen\<recreation of path to DTD or XSD file, including drive letter>\<schema name>.css

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:\test\test.dtd:
C:\Users\DerekRead\AppData\Roaming\SoftQuad\XMetaL\6.0\gen\C\text\test.css

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).
Logged
deng
Member

Posts: 3


« Reply #4 on: September 09, 2010, 01:15:36 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.
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 1404



WWW
« Reply #5 on: September 09, 2010, 02:59:11 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.
« Last Edit: September 09, 2010, 03:04:09 AM by Derek Read » Logged
Pages: 1
Print
Jump to: