Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
83 user(s) are online (71 user(s) are browsing Forums)

Members: 0
Guests: 83

more...

Support us!

Headlines

 
  Register To Post  

http://wiki.amigaos.net/wiki/Graphics_Library_and_Text
Home away from home
Home away from home


See User information
Hi

http://wiki.amigaos.net/wiki/Graphics_Library_and_Text

Just translated the ASM memory layout example
And successfully rendered some glyphs.

How do I commit changes to wiki page?


Edited by LiveForIt on 2016/2/7 9:41:45
(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: http://wiki.amigaos.net/wiki/Graphics_Library_and_Text
Home away from home
Home away from home


See User information
@LiveForIt

Small comment on my findings.

I'm investigating using Amiga fonts to display UTF-8, the issue I have, is that I need to find a way for glyph that can be 0x00000000 to 0xFFFFFFFF, to fit in side the TextFont struct.

tf_LoChar and lt_HiChar, that dictates fist and last glyph inside a TextFont struct. Is only 8bit 0x00 to 0xFF.

tf_CharLoc table that dictates the start bit and bit width of glyph, Is two words (16bit).

Start bit can be 0x0000 to 0xFFFF, is signed value so 0 to -/+ 32767.
That makes number of glyps limited to (32767-glyph_width) / glyph_width.
This number looks ok, so you can have more then 256 symbols in theory.

If the structure was extended to hold larger 32bit tf_LoGlyph and lt_HiGlyph.

On other operating system the problems that comes from UTF8, is that font often don't support the glyph's.

http://stackoverflow.com/questions/13 ... l-characters-dont-show-up

But that’s a user error, not technical problem.

The real elephant in the room, is that current TextFont system is outdated and need to be upgraded, and open source alternatives like TrueType has existed for years, that don't have that limitation, the sad fact is that OS4 fonts where true type fonts, converted to Amiga fonts. Now they can't be used by TrueType anymore, the problem is for someone like my self-writing software is I need to be careful using TrueType fonts because they have copyrights, and also they not compatible with AmigaOS, so they need to be stored elsewhere.

The real issue is that the world has adapted UTF-8, all parts of the internet and as text file format.
JOE, XML files are UTF8, web pages are UTF8, and more and more text files are UTF8 formatted. So feels silly to having to convert UTF8 text into ASCII text before displaying the text.

By the way is slow process as I have to look a 256 bytes charset table to find the glyphs, for etch of glyphs in the text.


Edited by LiveForIt on 2016/2/7 11:41:15
Edited by LiveForIt on 2016/2/7 11:59:11
Edited by LiveForIt on 2016/2/7 13:02:38
(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: http://wiki.amigaos.net/wiki/Graphics_Library_and_Text
Home away from home
Home away from home


See User information
OK, uploaded to OS4Depot.net, so anyone can have look at it.

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: http://wiki.amigaos.net/wiki/Graphics_Library_and_Text
Just popping in
Just popping in


See User information
You may wanna take a look at the diskfont autodoc entries for
OpenOutlineFont(), EOpenEngine() and EObtainInfoA() for using all glyphs of an outline font.

I think netsurf also does this to render the text. Look into http://source.netsurf-browser.org/net ... /tree/amiga/font_bullet.c

Go to top
Re: http://wiki.amigaos.net/wiki/Graphics_Library_and_Text
Just popping in
Just popping in


See User information
@LiveForIt

Interesting code, thank you very much!

slightly OT:

If anybody with an AmigaOS Wiki account reads here: The measuretext.c example is unusable in it´s current form. Several typos and wrong Tag naming, not to mention "interesting" code practices ;)

I made up a version that is at least compiling with the latest public SDK. The code needs some overhaul to reflect latest recommendations regarding typing etc.

Go to top
Re: http://wiki.amigaos.net/wiki/Graphics_Library_and_Text
Home away from home
Home away from home


See User information
@whose

Your welcome, I don't know how useful it is but, at least, it's not 680x0 assembler.

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: http://wiki.amigaos.net/wiki/Graphics_Library_and_Text
Home away from home
Home away from home


See User information
@LiveForIt

Quote:

the sad fact is that OS4 fonts where true type fonts, converted to Amiga fonts. Now they can't be used by TrueType anymore,


This statement is not remotely true.

For example.

FONTS:Arial Bold.font
FONTS:Arial Bold.otag
FONTS:_TrueType/Arialbd.TTF

And OWB uses the amiga font systems to render utf-8 encoded pages, via the bullet API.


Go to top
Re: http://wiki.amigaos.net/wiki/Graphics_Library_and_Text
Home away from home
Home away from home


See User information
@Gazelle

Thanks, I looked at code for a while now, really studding it, to find out where I went wrong. I managed finally to get some glyphs rendered using OutlineFonts.

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: http://wiki.amigaos.net/wiki/Graphics_Library_and_Text
Home away from home
Home away from home


See User information
@broadblues

Quote:
This statement is not remotely true.


What is the TypeManager in Sys:System for?

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: http://wiki.amigaos.net/wiki/Graphics_Library_and_Text
Amigans Defender
Amigans Defender


See User information
@LiveForIt

Quote:
What is the TypeManager in Sys:System for?


It creates the .font and .otag files required for diskfont to be able to use them (exactly as it has been with CG fonts since they were introduced).

Go to top
Re: http://wiki.amigaos.net/wiki/Graphics_Library_and_Text
Just can't stay away
Just can't stay away


See User information
@Chris

It also gives you tons of information about the font's content, glyphs, kerning and other parameters etc. etc., as well as a preview.

Best regards,

Niels

Go to top
Re: http://wiki.amigaos.net/wiki/Graphics_Library_and_Text
Amigans Defender
Amigans Defender


See User information
@whose

Quote:
If anybody with an AmigaOS Wiki account reads here: The measuretext.c example is unusable in it´s current form. Several typos and wrong Tag naming, not to mention "interesting" code practices ;)

I made up a version that is at least compiling with the latest public SDK. The code needs some overhaul to reflect latest recommendations regarding typing etc.

I have access to the AmigaOS wiki and I'll be happy to post your updated example there; just PM me.

The Rear Window blog

AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
Go to top
Re: http://wiki.amigaos.net/wiki/Graphics_Library_and_Text
Just popping in
Just popping in


See User information
I still see 68k code at the end, any plan to update it?
Kamelito

Go to top
Re: http://wiki.amigaos.net/wiki/Graphics_Library_and_Text
Home away from home
Home away from home


See User information
@Kamelito

http://os4depot.net/index.php?functio ... /tutorial/textfont_ex.lha

See test2_c.cpp and test3_c.cpp

My C version of that code can downloaded from OS4Depot.net, as wrote before, while it be nice if some one updated the code on wikipage, you most consider that code is old, and not the best way to render glyph's anymore.

The best way to render glyphs is using the bullet API, but AmigaOS4 does have support for UTF8, so you need to download my UTF8.library, to render text.

Or you need to re-invent the wheel, make your own functions to render text.

You should look up UTF8.library, I have included some new function to render text in UTF8 format, the latest version of UTF8.library you should find in my LiveForIt-Music demo's, the example codes can be found on OS4Depot.net

http://database-org.com/index.php?pro ... eForItMusic&page=programs

http://os4depot.net/index.php?functio ... ary/misc/utf8_library.lha

Note the UTF8 libraries are not backwards compatible, sometime I sort the function table and so on so its alphabetic, not added at end for backwards compatibility, if try open a version that is too old version program would fail open the library, too new version program will fail to open. Only when you try to open the precise version of UTF8 library will it work.

This behavior might change in the future, but right now I do consider it under development.


Edited by LiveForIt on 2016/6/13 17:05:13
Edited by LiveForIt on 2016/6/13 17:12:50
(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project