END_TEST;
}
+int UtcDaliFontClientNew(void)
+{
+ TestApplication application;
+
+ TextAbstraction::FontClient fontClient = TextAbstraction::FontClient::Get();
+ fontClient.SetDpi(30, 40);
+ TextAbstraction::FontClient anotherClient = TextAbstraction::FontClient::New(50, 60);
+
+ uint32_t horizontalDpi;
+ uint32_t verticalDpi;
+
+ tet_printf("Check default font client set dpi well\n");
+ fontClient.GetDpi(horizontalDpi, verticalDpi);
+
+ DALI_TEST_EQUALS(30, horizontalDpi, TEST_LOCATION);
+ DALI_TEST_EQUALS(40, verticalDpi, TEST_LOCATION);
+
+ tet_printf("Check another font client set dpi well\n");
+ anotherClient.GetDpi(horizontalDpi, verticalDpi);
+
+ DALI_TEST_EQUALS(50, horizontalDpi, TEST_LOCATION);
+ DALI_TEST_EQUALS(60, verticalDpi, TEST_LOCATION);
+
+ END_TEST;
+}
int UtcDaliFontClientAtlasLimitation(void)
{
TestApplication application;
/*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
return Internal::FontClient::Get();
}
+FontClient FontClient::New(uint32_t horizontalDpi, uint32_t verticalDpi)
+{
+ auto fontClientImpl = new Internal::FontClient();
+
+ fontClientImpl->SetDpi(horizontalDpi, verticalDpi);
+
+ return FontClient(fontClientImpl);
+}
+
FontClient::FontClient()
{
}
#define DALI_PLATFORM_TEXT_ABSTRACTION_FONT_CLIENT_H
/*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
static FontClient Get();
/**
+ * @brief Create a handle to the new FontClient instance.
+ *
+ * @param[in] horizontalDpi The horizontal resolution in DPI.
+ * @param[in] verticalDpi The vertical resolution in DPI.
+ * @return A handle to the FontClient
+ */
+ static FontClient New(uint32_t horizontalDpi, uint32_t verticalDpi);
+
+ /**
* @brief Create an uninitialized TextAbstraction handle.
*/
FontClient();