[Plugin] Color Embled Fix (CEFix)
#1

Color Embled Fix
I used two days to develop this plugin however it has some bugs and can’t work. This was my first time to develop a plugin on c++. Thai language has tone marks/vowels for example "อ้า อี่ อู่", but in other languages, this becomes useless, and the plugin can’t work. I believe SAMP staff will agree that we don’t have a good community in Thai to assist us. Our forum looks like "Free system /Asura kills everyone in the server" or "Help me how to make gang/faction on GF game mode" 90% SAMP owned server in Thailand use Godfather Game mode (FeaR) to edit and sell.

Quote:
Edit: Now It work perfectly, In conclusion, the problem of the Thai alphabet is mixed with the tonal, resulting in a shorter text length for the display. So colors are created according to the size of the original text. It can not be used with Thai characters mixed with tonal.

Explain:
  • Suppose 'A' is a normal character like
  • Suppose 'B' is a vowel/tone character like

  • Suppose 'C' = A+B
    If next to 'A' are 'B' they will display like this
simple color embled in English
{00FF00}JKL{FF0000}P: count 4 character, color start after 'L' (index 10) = index 11
Display: JKLP

simple color embled in Thai
{00FF00}AAB{FF0000}A: count 4 character, color start after 'B' (index 10) = index 11 << But not like this...
When display It will be: {00FF00}ACA{FF0000}: count 4 also but vowel/tone will merge to normal character, color start after index 11
Display: ACA
{00FF00}ACA{FF0000} << Here!! red color will disappear.
(My plugin will left shift color embled for 1 step per total vowel found before current embled tag to fix this. example AC{FF0000}A will display correct color like ACA)

Problem:
Input

Output


If I replace all vowel to other normal character, Text will show normally because some vowel (TH lang) will merge with nearby character. Ex.

Embed color will show not correctly on their position.


Download: https://github.com/aktah/SAMP-CEFix

If possible, I would like you to create this or revise it.... (I don't know this call bug or something...)

Issue thread:
- https://sampforum.blast.hk/showthread.php?tid=560702


Pastebin: https://pastebin.com/9x1aidUr
Reply
#2

Quote:
Originally Posted by Y_Less
View Post
1) You need the source code, regardless of its state, before you can release something.

2) Does this work for all of unicode, or just one language (looks like Thai, but I can't be certain)? Thanks.
2) I think hes only test for Thai language because this thing just happen to Thai language or some language probably.
Reply
#3

Please post that code in your post.
So Kalcor can easily test it without having to go through the issue of trying to recreate it from a picture...
Reply
#4

This plugin use simple source from https://sampforum.blast.hk/showthread.php?tid=295798
(developed on MVC++ 2010)


Quote:

2) Does this work for all of unicode, or just one language (looks like Thai, but I can't be certain)? Thanks.

I'm only fixes some characters with problems. It needs someone to write this system. I don't know this prob shown only Thai language or not ?
Reply
#5

Quote:
Originally Posted by Y_Less
View Post
It seems to me that a simpler solution would be to look up each character's unicode class and use that to determine how to move the colour position.
What do you recommend to me ? I would like to make plugin useful more than this.

old version



new then above

Reply
#6

This looks very useful, but I have no idea from your description what it actually does and how it works.
Reply
#7

Now release 2.0, it work perfectly. (not support on /fontsize 1 and 4 )

In conclusion, the problem of the Thai alphabet is mixed with the tonal, resulting in a shorter text length for the display. So colors are created according to the size of the original text. It can not be used with Thai characters mixed with tonal.

Release source code: Github

Explain:
  • Suppose 'A' is a normal character like
  • Suppose 'B' is a vowel/tone character like

  • Suppose 'C' = A+B
    If next to 'A' are 'B' they will display like this
simple color embled in English
{00FF00}JKL{FF0000}P: count 4 character, color start after 'L' (index 10) = index 11
Display: JKLP

simple color embled in Thai
{00FF00}AAB{FF0000}A: count 4 character, color start after 'B' (index 10) = index 11 << But not like this...
When display It will be: {00FF00}ACA{FF0000}: count 4 also but vowel/tone will merge to normal character, color start after index 11
Display: ACA
{00FF00}ACA{FF0000} << Here!! red color will disappear.
(My plugin will left shift color embled for 1 step per total vowel found before current embled tag to fix this. example AC{FF0000}A will display correct color like ACA)

And have more some vowel with blank space " " need to shift too. Going github for more information.






I think my post was ignored. Just because it does not involve you. We feel so bad

We could not get a good reception, maybe because of Alien language. Good luck!!
Reply
#8

There isn't any active member from Thai since I visited this forum(2012) so yeah.
Good job anyway.
Reply
#9

What a beautiful language you have. Unfortunately, I don't speak it. Good job for your plugin which seems to solve a serious problem!
Reply
#10

Quote:
Originally Posted by Dayrion
View Post
What a beautiful language you have. Unfortunately, I don't speak it. Good job for your plugin which seems to solve a serious problem!
Quote:
Originally Posted by Verc
View Post
There isn't any active member from Thai since I visited this forum(2012) so yeah.
Good job anyway.
I'm glad to hear that, Maybe someone has to use it in the future.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)