help me! About fonts for Vietnamese

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
nguyenchiduc
Posts: 78
Joined: Sat Nov 13, 2010 7:27 am

help me! About fonts for Vietnamese

Post by nguyenchiduc »

Hello everyone

As introduced ...

My name is Nguyen Chi Duc, I come from Vietnam. I am 34 years old.

Exactly my name in Vietnam is "Nguyễn Chí Đức". Capitalization is "NGUYỄN CHÍ ĐỨC".

======================

I checked most of the examples of HMG and I found very interesting. Many of them fit my work is done. The Vietnamese fonts display for the button, textbox, lablel, browse, gird ... is very good.

But there is a command "EDIT EXTEND" no font option.

"UNICODE" in HMG cause errors when displaying fonts in Vietnamese.

I switch characters became no letters in English. For example: The first records of the Customer Name

ĐỖ BÁ HOÀN => DO BA HOAN

Image
User avatar
Rathinagiri
Posts: 5482
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: help me! About fonts for Vietnamese

Post by Rathinagiri »

First of all, HMG is not unicode ready. Regarding edit extended I will go through the source code.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
nguyenchiduc
Posts: 78
Joined: Sat Nov 13, 2010 7:27 am

Re: help me! About fonts for Vietnamese

Post by nguyenchiduc »

rathinagiri wrote:First of all, HMG is not unicode ready. Regarding edit extended I will go through the source code.
I checked Report, Grid, Browse can choose font, so it works well.
But EDIT and EDIT EXTEND no font options.

I used fonts ".vntime" for lowercase and ".vntimeh" for uppercase
User avatar
nguyenchiduc
Posts: 78
Joined: Sat Nov 13, 2010 7:27 am

Another way of displaying font Vietnam

Post by nguyenchiduc »

Hello everyone

I can open a file .dbf
Not declare parameters HEADERS, WIDTHS, COLUMNCONTROLS, COLUMNFIELDS in GRID

I use '. Vntime' to show the Vietnamese font
File: c:\temp\data.dbf

Here are the commands of the program:

=======================

Code: Select all

#include "hmg.ch"
#include "Dbinfo.ch"
#include "Dbstruct.ch"

Function Main
  LOCAL header := {}, field := {}, width := {}, control := {}, i := 0
    
  REQUEST DBFCDX
  USE c:\temp\data.dbf alias data SHARED NEW via "DBFCDX"
  
  FOR i := 1 to FCOUNT() 
      AADD(header , FIELDNAME(i))
      AADD(field , FIELDNAME(i))
      AADD(width , DBFIELDINFO(DBS_LEN,i)*10)
    
      DO CASE
      CASE DBFIELDINFO(DBS_TYPE,i) == "C" 
          AADD(control,{"TEXTBOX","CHARACTER"})
      CASE DBFIELDINFO(DBS_TYPE,i) == "N"
          AADD(control,{"TEXTBOX","NUMERIC"})
      CASE DBFIELDINFO(DBS_TYPE,i) == "D"
          AADD(control,{"TEXTBOX","DATE"})
      ENDCASE
  
  NEXT
  
  DEFINE WINDOW Main AT 0,0 WIDTH 800 HEIGHT 600 MAIN ;
      ON RELEASE Closetable() ;
      FONT '.vntime' SIZE 11
                                     	                
     @ 10,10 GRID data_view WIDTH 770 HEIGHT 400 ROWSOURCE 'data' ;
     HEADERS header WIDTHS width COLUMNCONTROLS control COLUMNFIELDS field
        	     
  END WINDOW
		
  CENTER WINDOW Main
  ACTIVATE WINDOW Main
   
RETURN

FUNCTION Closetable()
       close all
RETURN NIL
User avatar
nguyenchiduc
Posts: 78
Joined: Sat Nov 13, 2010 7:27 am

Re: help me! About fonts for Vietnamese

Post by nguyenchiduc »

Finally, I have found a way.

In the file: "C:\HMG\SOURCE\EDITEX\h_edit_ex.prg" and "C:\hmg\SOURCE\EDIT\h_edit.prg"

I replaced the phrase "ms sans serif" or "Arial" or "COURIER NEW" to =>".Vntime" or ".Vntimeh"

Then run the bat command : MAKELIB

Hopefully, if you encounter any similar cases can be solved this way.

Thank you
Post Reply