ตอนนี้ใช้ Oracle 10g ทำการเขียนโปรแกรมใน Form Builder แล้วได้เลือกแบบตัวหนังสือ ซึ่งใน layout ที่ทำการดีไซน์ ตัวหนังสือก็เป็นไปตามที่เราเลือกค่ะ
แต่พอรันหน้าจอที่ browser แล้ว ตัวหนังสือไม่เป็นไปตัวที่เราเลือกไว้ในตัว develop จะเป็นตัวเดิมตลอด ไม่ว่าเราจะเปลี่ยนแบบตัวหนังสืออะไรใน Form Builder
เลยอยากทราบว่า วิธีเปลี่ยนตัวหนังสือที่แสดงบนเว็บ browser ต้องไปเปลี่ยนตรงไหนคะ ขอบคุณมากค่ะ
Page 1 of 1
รัน FormBuilder บนเว็บ browser แล้วตัวหนังสือไม่เป็นไปตามที่เซ็ตในตัว develop
#2
Posted 10 November 2009 - 04:56 PM
เท่าที่หามาได้จาก metalink ครับ แต่ผมยังไม่ได้ทดลองดู ถ้าลองแล้วได้ผลอย่างไร feedback ด้วยนะครับ ขอบคุณครับ
1. Fonts on the Canvas, Menu items:
-------------------------------------
a. Registry.dat ($O_H\forms90\java\oracle\forms\registry\Registry.dat )
In this file are mapped(on the Server):
fonts from Forms application = fonts from Java(JVM - in our case: OC4J for Forms).
The responsible section is:
default.fontMap.appFontnames=Courier New,Courier,courier,System,Terminal,Fixed,Fixedsys,Times,Times New Roman,MS Sans Serif,Arial,sAdC128D
default.fontMap.javaFontnames=MonoSpaced,MonoSpaced,MonoSpaced,Dialog,MonoSpaced
,Dialog,Dialog,Serif,Serif,Dialog, SansSerif,Dialog
The last mapping is a custom example: sAdC128D --> Dialog
b. font.properties ( C:\Program Files\Oracle\JInitiator 1.3.1.18\lib\font.properties )
In this file there are the reverse mappings (on the client machine):
First (at the beginning of the file) - first mapping:
font_server(from JVM)=font_OS . See (*)
And down the file, the second mapping (in the case that the first one if not effective):
font_OS=*.ttf file. See (**)
Example(it continues the above idea with sAdC128D):
(*)
dialog.plain.0=sAdC128D,WE8MSWIN1252
dialog.plain.1=sAdC128D,WE8MSWIN1252
dialog.plain.2=sAdC128D,WE8MSWIN1252
dialog.plain.3=sAdC128D,WE8MSWIN1252
dialog.plain.4=sAdC128D,WE8MSWIN1252
dialog.plain.5=sAdC128D,WE8MSWIN1252
dialog.plain.6=sAdC128D,WE8MSWIN1252
dialog.plain.7=sAdC128D,WE8MSWIN1252
dialog.bold.0=sAdC128D,WE8MSWIN1252
dialog.bold.1=sAdC128D,WE8MSWIN1252
dialog.bold.2=sAdC128D,WE8MSWIN1252
dialog.bold.3=sAdC128D,WE8MSWIN1252
dialog.bold.4=sAdC128D,WE8MSWIN1252
dialog.bold.5=sAdC128D,WE8MSWIN1252
dialog.bold.6=sAdC128D,WE8MSWIN1252
dialog.bold.7=sAdC128D,WE8MSWIN1252
(**)filename.sAdC128D=sAdC128D.TTF
Then close all browser windows and start again.
This example will make to appear bar font(sAdC128D) anywhere it should appear System, Fixed, Fixedsys, MS Sans Serif si sAdC128D like the mapping from Registry.dat shows). This will happen even in JInitiator console.
Note: sAdC128D is just a dummy font. The desired font can be choose instead of it.
================================================================================
========================
2. Fonts of the fields(items).
The client character set used for Oracle should be equivalent to the character set supported for your terminal.
Typically this character set should be equivalent to or a subset of the character set used for your database so that every character input through the terminal has a matching character to map to in the database. Note, however, this is NOT always the case.
When more than one language is needed in the same application/DB use UTF8 characters set which has the capability to define over a million characters. And the same character set is needed on the midtier too. (Registry and/or default.env).
Examples:
JAPANESE_JAPAN.WE8MSWIN1252 will *not* allow you to store Japanese as WE8MSWIN1252 does not know Japanese characters.
AMERICAN_AMERICA.JA16SJIS *will* allow you to store Japanese (if the database is also in a characterset that can store Japanese like UTF8 or JA16SJIS)
For multiple language applications it is needed to have for both Forms and RDBMS:
NLS_LANG = [Language].[Territory].UTF8
[Language].[Territory] LANGUAGE and TERRITORY have nothing to do with the ability to *store* characters in a database(just character set does this).
As a parenthesis:
What does the language part of NLS_LANG control?
-the language of messages, and day and month names
-the default sort sequence
-Also specifies default values for territory and character set so if language is specified then the other two arguments can be omitted.
What does the territory part of NLS_LANG control?
-the default date format
-the decimal character and group separator
-the local currency symbol
-the week start day
IMPORTANT NOTES:
1.- IT IS NEEDED THAT NLS_LANG FROM MIDTIER AND DB TO BE AT LEAST COMPATIBLE IF NOT THE
SAME.
- JUST THE CHARACTERSET IS RESPONSIBLE FOR THE ABILITY TO "*store* characters in a database".
2.- The word "default", from entries like "default.fontMap.defaultFontname" or "default.fontMap.appFontnames", is customizable and can be used in conjunction with serverApp parameter from formsweb.cfg file in order to have specific settings for specific applications. For example it is possible to have in Registry.dat: development.fontMap.defaultSize=1000 and production.fontMap.defaultSize=500, and in formsweb.cfg: [config_section1] serverApp=developemnt and [config_section2] serverApp=production. Then, when calling a Forms application using config=config_section1 or config=config_section2, the differences will be evident.
1. Fonts on the Canvas, Menu items:
-------------------------------------
a. Registry.dat ($O_H\forms90\java\oracle\forms\registry\Registry.dat )
In this file are mapped(on the Server):
fonts from Forms application = fonts from Java(JVM - in our case: OC4J for Forms).
The responsible section is:
default.fontMap.appFontnames=Courier New,Courier,courier,System,Terminal,Fixed,Fixedsys,Times,Times New Roman,MS Sans Serif,Arial,sAdC128D
default.fontMap.javaFontnames=MonoSpaced,MonoSpaced,MonoSpaced,Dialog,MonoSpaced
,Dialog,Dialog,Serif,Serif,Dialog, SansSerif,Dialog
The last mapping is a custom example: sAdC128D --> Dialog
b. font.properties ( C:\Program Files\Oracle\JInitiator 1.3.1.18\lib\font.properties )
In this file there are the reverse mappings (on the client machine):
First (at the beginning of the file) - first mapping:
font_server(from JVM)=font_OS . See (*)
And down the file, the second mapping (in the case that the first one if not effective):
font_OS=*.ttf file. See (**)
Example(it continues the above idea with sAdC128D):
(*)
dialog.plain.0=sAdC128D,WE8MSWIN1252
dialog.plain.1=sAdC128D,WE8MSWIN1252
dialog.plain.2=sAdC128D,WE8MSWIN1252
dialog.plain.3=sAdC128D,WE8MSWIN1252
dialog.plain.4=sAdC128D,WE8MSWIN1252
dialog.plain.5=sAdC128D,WE8MSWIN1252
dialog.plain.6=sAdC128D,WE8MSWIN1252
dialog.plain.7=sAdC128D,WE8MSWIN1252
dialog.bold.0=sAdC128D,WE8MSWIN1252
dialog.bold.1=sAdC128D,WE8MSWIN1252
dialog.bold.2=sAdC128D,WE8MSWIN1252
dialog.bold.3=sAdC128D,WE8MSWIN1252
dialog.bold.4=sAdC128D,WE8MSWIN1252
dialog.bold.5=sAdC128D,WE8MSWIN1252
dialog.bold.6=sAdC128D,WE8MSWIN1252
dialog.bold.7=sAdC128D,WE8MSWIN1252
(**)filename.sAdC128D=sAdC128D.TTF
Then close all browser windows and start again.
This example will make to appear bar font(sAdC128D) anywhere it should appear System, Fixed, Fixedsys, MS Sans Serif si sAdC128D like the mapping from Registry.dat shows). This will happen even in JInitiator console.
Note: sAdC128D is just a dummy font. The desired font can be choose instead of it.
================================================================================
========================
2. Fonts of the fields(items).
The client character set used for Oracle should be equivalent to the character set supported for your terminal.
Typically this character set should be equivalent to or a subset of the character set used for your database so that every character input through the terminal has a matching character to map to in the database. Note, however, this is NOT always the case.
When more than one language is needed in the same application/DB use UTF8 characters set which has the capability to define over a million characters. And the same character set is needed on the midtier too. (Registry and/or default.env).
Examples:
JAPANESE_JAPAN.WE8MSWIN1252 will *not* allow you to store Japanese as WE8MSWIN1252 does not know Japanese characters.
AMERICAN_AMERICA.JA16SJIS *will* allow you to store Japanese (if the database is also in a characterset that can store Japanese like UTF8 or JA16SJIS)
For multiple language applications it is needed to have for both Forms and RDBMS:
NLS_LANG = [Language].[Territory].UTF8
[Language].[Territory] LANGUAGE and TERRITORY have nothing to do with the ability to *store* characters in a database(just character set does this).
As a parenthesis:
What does the language part of NLS_LANG control?
-the language of messages, and day and month names
-the default sort sequence
-Also specifies default values for territory and character set so if language is specified then the other two arguments can be omitted.
What does the territory part of NLS_LANG control?
-the default date format
-the decimal character and group separator
-the local currency symbol
-the week start day
IMPORTANT NOTES:
1.- IT IS NEEDED THAT NLS_LANG FROM MIDTIER AND DB TO BE AT LEAST COMPATIBLE IF NOT THE
SAME.
- JUST THE CHARACTERSET IS RESPONSIBLE FOR THE ABILITY TO "*store* characters in a database".
2.- The word "default", from entries like "default.fontMap.defaultFontname" or "default.fontMap.appFontnames", is customizable and can be used in conjunction with serverApp parameter from formsweb.cfg file in order to have specific settings for specific applications. For example it is possible to have in Registry.dat: development.fontMap.defaultSize=1000 and production.fontMap.defaultSize=500, and in formsweb.cfg: [config_section1] serverApp=developemnt and [config_section2] serverApp=production. Then, when calling a Forms application using config=config_section1 or config=config_section2, the differences will be evident.
#3
Posted 11 November 2009 - 08:47 AM
ขอบคุณคุณ siamnobi มากเลยนะคะ
แต่มีข้อสงสัยค่ะ ว่าวิธีการที่คุณ siamnobi สามารถเปลี่ยนแบบตัวหนังสือตามที่เราเลือกใน develop หรือเปลี่ยนตามได้แค่ในส่วนนี้อ่ะคะ
แต่ตอนนี้ยังไม่ได้ลองทำค่ะ อ่านแล้วยังงงๆ อยู่เลย
แต่มีข้อสงสัยค่ะ ว่าวิธีการที่คุณ siamnobi สามารถเปลี่ยนแบบตัวหนังสือตามที่เราเลือกใน develop หรือเปลี่ยนตามได้แค่ในส่วนนี้อ่ะคะ
Quote
The responsible section is:
default.fontMap.appFontnames=Courier New,Courier,courier,System,Terminal,Fixed,Fixedsys,Times,Times New Roman,MS Sans Serif,Arial,sAdC128D
default.fontMap.javaFontnames=MonoSpaced,MonoSpaced,MonoSpaced,Dialog,MonoSpaced
,Dialog,Dialog,Serif,Serif,Dialog, SansSerif,Dialog
default.fontMap.appFontnames=Courier New,Courier,courier,System,Terminal,Fixed,Fixedsys,Times,Times New Roman,MS Sans Serif,Arial,sAdC128D
default.fontMap.javaFontnames=MonoSpaced,MonoSpaced,MonoSpaced,Dialog,MonoSpaced
,Dialog,Dialog,Serif,Serif,Dialog, SansSerif,Dialog
แต่ตอนนี้ยังไม่ได้ลองทำค่ะ อ่านแล้วยังงงๆ อยู่เลย
#4
Posted 11 November 2009 - 11:07 AM
ตามความเข้าใจของผมนะครับ
default.fontMap.appFontnames บรรทัดนี้จะระบุชื่อ ฟอนท์ที่ใช้ในฟอร์มที่เราสร้างขึ้น ซึ่งในตัวอย่างที่เขายกมาคือ sAdC128D
ส่วน default.fontMap.javaFontnames บรรทัดนี้จะระบุชื่อฟอนท์ที่ java applet นำไปใช้ ซึ่งจับคู่กับบรรทัดก่อนหน้าตามลำดับ
เช่น Courier New,Courier,courier, Terminal จะกลายเป็น MonoSpaced
System,,Fixed,Fixedsys,MS Sans Serif, sAdC128D จะกลายเป็น Dialog
Times,Times New Roman จะกลายเป็น Serif
Arial จะกลายเป็น SansSerif
จากนั้น เวลาที่ applet ถูกสร้างขึ้นบนฝั่ง client มันก็จะไปดูที่ไฟล์ font.properties (ผมเดาว่า ในกรณีที่เซ็ต region เป็น thai อาจต้องใช้ไฟล์ ไฟล์ font.properties.th แทน อาจต้องลองทั้งสองที่นะครับ แต่ลองทีละที่แล้วดูการเปลี่ยนแปลงนะครับ)
dialog.plain.0=sAdC128D,WE8MSWIN1252
dialog.plain.1=sAdC128D,WE8MSWIN1252
dialog.plain.2=sAdC128D,WE8MSWIN1252
dialog.plain.3=sAdC128D,WE8MSWIN1252
dialog.plain.4=sAdC128D,WE8MSWIN1252
dialog.plain.5=sAdC128D,WE8MSWIN1252
dialog.plain.6=sAdC128D,WE8MSWIN1252
บรรทัดพวกนี้จะบอกว่า ฟอนท์ dialog จะถูกแทนด้วยฟอนท์จริงบน windows ตัวไหน ซึ่งในที่นี้จะกลายเป็น sAdC128D ไป
ดังนั้นทุก ฟอนท์ที่ java มองว่าเป็น dialog ได้แก่ System,,Fixed,Fixedsys,MS Sans Serif, sAdC128D
ก็จะถูกแสดงด้วย sAdC128D ทั้งหมด โดยฟอนท์ sAdC128D ต้องเป็นฟอนท์ที่ client มี
filename.sAdC128D=sAdC128D.TTF --> บรรทัดคือชื่อไฟล์ของฟอนท์ที่จะใช้
การทำงานคร่าว ๆ จะเป็นแบบนี้ครับ
อย่างไรก็ดี ผมไม่แน่ใจว่าจะตามแก้ ไฟล์ใน jinitiator ของทุก client ได้อย่างไร เนื่องจากผมไม่มี application server ไว้ทดสอบ
คุณ bonny18 อาจต้องศึกษาเพิ่มเติมอีกหน่อยว่า ต้องแก้ที่ไฟล์ใดใน application server เพื่อให้ client โหลดไปได้
หวังว่าคงพอจะช่วยได้นะครับ
default.fontMap.appFontnames บรรทัดนี้จะระบุชื่อ ฟอนท์ที่ใช้ในฟอร์มที่เราสร้างขึ้น ซึ่งในตัวอย่างที่เขายกมาคือ sAdC128D
ส่วน default.fontMap.javaFontnames บรรทัดนี้จะระบุชื่อฟอนท์ที่ java applet นำไปใช้ ซึ่งจับคู่กับบรรทัดก่อนหน้าตามลำดับ
เช่น Courier New,Courier,courier, Terminal จะกลายเป็น MonoSpaced
System,,Fixed,Fixedsys,MS Sans Serif, sAdC128D จะกลายเป็น Dialog
Times,Times New Roman จะกลายเป็น Serif
Arial จะกลายเป็น SansSerif
จากนั้น เวลาที่ applet ถูกสร้างขึ้นบนฝั่ง client มันก็จะไปดูที่ไฟล์ font.properties (ผมเดาว่า ในกรณีที่เซ็ต region เป็น thai อาจต้องใช้ไฟล์ ไฟล์ font.properties.th แทน อาจต้องลองทั้งสองที่นะครับ แต่ลองทีละที่แล้วดูการเปลี่ยนแปลงนะครับ)
dialog.plain.0=sAdC128D,WE8MSWIN1252
dialog.plain.1=sAdC128D,WE8MSWIN1252
dialog.plain.2=sAdC128D,WE8MSWIN1252
dialog.plain.3=sAdC128D,WE8MSWIN1252
dialog.plain.4=sAdC128D,WE8MSWIN1252
dialog.plain.5=sAdC128D,WE8MSWIN1252
dialog.plain.6=sAdC128D,WE8MSWIN1252
บรรทัดพวกนี้จะบอกว่า ฟอนท์ dialog จะถูกแทนด้วยฟอนท์จริงบน windows ตัวไหน ซึ่งในที่นี้จะกลายเป็น sAdC128D ไป
ดังนั้นทุก ฟอนท์ที่ java มองว่าเป็น dialog ได้แก่ System,,Fixed,Fixedsys,MS Sans Serif, sAdC128D
ก็จะถูกแสดงด้วย sAdC128D ทั้งหมด โดยฟอนท์ sAdC128D ต้องเป็นฟอนท์ที่ client มี
filename.sAdC128D=sAdC128D.TTF --> บรรทัดคือชื่อไฟล์ของฟอนท์ที่จะใช้
การทำงานคร่าว ๆ จะเป็นแบบนี้ครับ
อย่างไรก็ดี ผมไม่แน่ใจว่าจะตามแก้ ไฟล์ใน jinitiator ของทุก client ได้อย่างไร เนื่องจากผมไม่มี application server ไว้ทดสอบ
คุณ bonny18 อาจต้องศึกษาเพิ่มเติมอีกหน่อยว่า ต้องแก้ที่ไฟล์ใดใน application server เพื่อให้ client โหลดไปได้
หวังว่าคงพอจะช่วยได้นะครับ
Share this topic:
Page 1 of 1

Help










